Skip to content

Commit 744a4d0

Browse files
committed
replace lit-element with lit
1 parent f5ac42c commit 744a4d0

11 files changed

+89
-40
lines changed

package-lock.json

+53-15
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/server_manager/package.json

+4
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,11 @@
4949
"google-auth-library": "^8.0.2",
5050
"intl-messageformat": "^7",
5151
"jsonic": "^0.3.1",
52+
<<<<<<< Updated upstream
5253
"lit-element": "^2.3.1",
54+
=======
55+
"lit": "^3.1.1",
56+
>>>>>>> Stashed changes
5357
"node-forge": "^1.3.1",
5458
"request": "^2.87.0",
5559
"web-animations-js": "^2.3.1"

src/server_manager/web_app/gallery_app/main.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ import '@polymer/paper-checkbox/paper-checkbox';
2626

2727
import {PaperCheckboxElement} from '@polymer/paper-checkbox/paper-checkbox';
2828
import IntlMessageFormat from 'intl-messageformat';
29-
import {css, customElement, html, LitElement, property} from 'lit-element';
29+
import {css, html, LitElement} from 'lit';
30+
import {customElement, property} from 'lit/decorators.js';
3031

3132
import * as gcp from '../../model/gcp';
3233
import {FakeManagedServer, FakeGcpAccount} from '../testing/models';
@@ -101,7 +102,7 @@ export class TestApp extends LitElement {
101102
@property({type: String}) gcpRefreshToken = '';
102103
@property({type: Boolean}) gcpAccountHasBillingAccounts = false;
103104

104-
static get styles() {
105+
static get css() {
105106
return [
106107
COMMON_STYLES,
107108
css`

src/server_manager/web_app/outline-gcp-create-server-app.ts

+8-7
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,9 @@ import '@polymer/paper-item/paper-item';
2020
import './ui_components/outline-step-view';
2121
import './ui_components/outline-region-picker-step';
2222

23-
import {css, customElement, html, internalProperty, LitElement, property} from 'lit-element';
24-
import {unsafeHTML} from 'lit-html/directives/unsafe-html';
23+
import {css, html, LitElement} from 'lit';
24+
import {customElement, property} from 'lit/decorators.js';
25+
import {unsafeHTML} from 'lit/directives/unsafe-html.js';
2526

2627
import {AppRoot} from './ui_components/app-root';
2728
import {BillingAccount, Project, Zone, Account} from '../model/gcp';
@@ -35,18 +36,18 @@ import {CloudLocation} from '../model/location';
3536
export class GcpCreateServerApp extends LitElement {
3637
@property({type: Function}) localize: (msgId: string, ...params: string[]) => string;
3738
@property({type: String}) language: string;
38-
@internalProperty() private currentPage = '';
39-
@internalProperty() private selectedProjectId = '';
40-
@internalProperty() private selectedBillingAccountId = '';
41-
@internalProperty() private isProjectBeingCreated = false;
39+
@property() private currentPage = '';
40+
@property() private selectedProjectId = '';
41+
@property() private selectedBillingAccountId = '';
42+
@property() private isProjectBeingCreated = false;
4243

4344
private account: GcpAccount;
4445
private project: Project;
4546
private billingAccounts: BillingAccount[] = [];
4647
private regionPicker: OutlineRegionPicker;
4748
private billingAccountsRefreshLoop: number = null;
4849

49-
static get styles() {
50+
static get css() {
5051
return [
5152
COMMON_STYLES,
5253
css`

src/server_manager/web_app/ui_components/cloud-install-styles.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*/
1616

1717
import {html} from '@polymer/polymer/lib/utils/html-tag';
18-
import {unsafeCSS} from 'lit-element';
18+
import {unsafeCSS} from 'lit';
1919

2020
// Polymer style module to share styles between steps
2121
// https://polymer-library.polymer-project.org/3.0/docs/devguide/style-shadow-dom#share-styles-between-elements

src/server_manager/web_app/ui_components/outline-gcp-oauth-step.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,16 @@ import '@polymer/polymer/polymer-legacy';
1616
import '@polymer/iron-pages/iron-pages';
1717
import './outline-step-view';
1818

19-
import {css, customElement, html, LitElement, property} from 'lit-element';
19+
import {css, html, LitElement} from 'lit';
20+
import {customElement, property} from 'lit/decorators.js';
2021
import {COMMON_STYLES} from '../ui_components/cloud-install-styles';
2122

2223
@customElement('outline-gcp-oauth-step')
2324
export class GcpConnectAccountApp extends LitElement {
2425
@property({type: Function}) onCancel: Function;
2526
@property({type: Function}) localize: Function;
2627

27-
static get styles() {
28+
static get css() {
2829
return [
2930
COMMON_STYLES,
3031
css`

src/server_manager/web_app/ui_components/outline-per-key-data-limit-dialog.ts

+7-6
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ import '@polymer/paper-listbox/paper-listbox';
2525
import {PaperDialogElement} from '@polymer/paper-dialog/paper-dialog';
2626
import {PaperInputElement} from '@polymer/paper-input/paper-input';
2727
import {PaperListboxElement} from '@polymer/paper-listbox/paper-listbox';
28-
import {css, customElement, html, internalProperty, LitElement, property} from 'lit-element';
28+
import {css, html, LitElement} from 'lit';
29+
import {customElement, property} from 'lit/decorators.js';
2930

3031
import {
3132
bytesToDisplayDataAmount,
@@ -46,7 +47,7 @@ import {COMMON_STYLES} from './cloud-install-styles';
4647
*/
4748
@customElement('outline-per-key-data-limit-dialog')
4849
export class OutlinePerKeyDataLimitDialog extends LitElement {
49-
static get styles() {
50+
static get css() {
5051
return [
5152
COMMON_STYLES,
5253
css`
@@ -132,21 +133,21 @@ export class OutlinePerKeyDataLimitDialog extends LitElement {
132133
/**
133134
* @member _keyName The displayed name of the UI access key representing the key we're working on.
134135
*/
135-
@internalProperty() _keyName = '';
136+
@property() private _keyName = '';
136137
/**
137138
* @member _activeDataLimitBytes The data limit, if it exists, on the access key we're working on.
138139
*/
139-
@internalProperty() _initialDataLimitBytes: number = undefined;
140+
@property() private _initialDataLimitBytes: number = undefined;
140141
/**
141142
* @member _showDataLimit Whether the menu for inputting the data limit should be shown.
142143
* Controlled by the checkbox.
143144
*/
144-
@internalProperty() _showDataLimit = false;
145+
@property() private _showDataLimit = false;
145146
/**
146147
* @member _enableSave Whether the save button is enabled. Controlled by the validator on the
147148
* input.
148149
*/
149-
@internalProperty() _enableSave = false;
150+
@property() private _enableSave = false;
150151

151152
/**
152153
* @member language The ISO 3166-1 alpha-2 language code used for i18n.

src/server_manager/web_app/ui_components/outline-region-picker-step.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ import '@polymer/paper-button/paper-button';
1717
import '@polymer/paper-progress/paper-progress';
1818
import './outline-step-view';
1919

20-
import {css, customElement, html, LitElement, property} from 'lit-element';
20+
import {css, html, LitElement} from 'lit';
21+
import {customElement, property} from 'lit/decorators.js';
2122

2223
import {COMMON_STYLES} from './cloud-install-styles';
2324
import {CloudLocationOption} from '../../model/location';
@@ -39,7 +40,7 @@ export class OutlineRegionPicker extends LitElement {
3940
@property({type: Function}) localize: (msgId: string, ...params: string[]) => string;
4041
@property({type: String}) language: string;
4142

42-
static get styles() {
43+
static get css() {
4344
return [
4445
COMMON_STYLES,
4546
css`

src/server_manager/web_app/ui_components/outline-server-list.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@
1414

1515
import './outline-server-view';
1616

17-
import {customElement, html, LitElement, property} from 'lit-element';
18-
import {repeat} from 'lit-html/directives/repeat';
17+
import {html, LitElement} from 'lit';
18+
import {customElement, property} from 'lit/decorators.js';
19+
import {repeat} from 'lit/directives/repeat.js';
1920

2021
import type {DisplayCloudId} from './cloud-assets';
2122
import type {ServerView} from './outline-server-view';

src/server_manager/web_app/ui_components/outline-server-progress-step.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ import '@polymer/paper-progress/paper-progress';
1717
import '@polymer/paper-button/paper-button';
1818
import './outline-progress-spinner';
1919
import './outline-step-view';
20-
import {css, customElement, html, LitElement, property} from 'lit-element';
20+
import {css, html, LitElement} from 'lit';
21+
import {customElement, property} from 'lit/decorators.js';
2122
import {COMMON_STYLES} from './cloud-install-styles';
2223

2324
@customElement('outline-server-progress-step')
@@ -26,7 +27,7 @@ export class OutlineServerProgressStep extends LitElement {
2627
@property({type: Number}) progress = 0;
2728
@property({type: Function}) localize: Function;
2829

29-
static get styles() {
30+
static get css() {
3031
return [
3132
COMMON_STYLES,
3233
css`

src/server_manager/web_app/ui_components/outline-sort-span.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
import '@polymer/iron-icon/iron-icon';
1616
import '@polymer/iron-icons/iron-icons';
1717

18-
import {css, html, LitElement, PropertyDeclarations} from 'lit-element';
18+
import {css, html, LitElement, PropertyDeclarations} from 'lit';
1919

2020
export class SortSpan extends LitElement {
2121
static get styles() {

0 commit comments

Comments
 (0)