Add compatibility for Lit 2.0 (#8878)

This commit is contained in:
Bram Kragten
2021-05-07 22:16:14 +02:00
committed by GitHub
parent 0f58214ba1
commit 9f032a61a9
521 changed files with 2512 additions and 2510 deletions

View File

@@ -13,9 +13,9 @@ import "@polymer/paper-dropdown-menu/paper-dropdown-menu-light";
import { PaperListboxElement } from "@polymer/paper-listbox";
import {
css,
CSSResult,
CSSResultGroup,
html,
internalProperty,
state,
LitElement,
property,
PropertyValues,
@@ -69,17 +69,17 @@ export class HaScriptEditor extends KeyboardShortcutMixin(LitElement) {
@property() public narrow!: boolean;
@internalProperty() private _config?: ScriptConfig;
@state() private _config?: ScriptConfig;
@internalProperty() private _entityId?: string;
@state() private _entityId?: string;
@internalProperty() private _idError = false;
@state() private _idError = false;
@internalProperty() private _dirty = false;
@state() private _dirty = false;
@internalProperty() private _errors?: string;
@state() private _errors?: string;
@internalProperty() private _mode: "gui" | "yaml" = "gui";
@state() private _mode: "gui" | "yaml" = "gui";
@query("ha-yaml-editor", true) private _editor?: HaYamlEditor;
@@ -681,7 +681,7 @@ export class HaScriptEditor extends KeyboardShortcutMixin(LitElement) {
this._saveScript();
}
static get styles(): CSSResult[] {
static get styles(): CSSResultGroup {
return [
haStyle,
css`