diff --git a/hassio/src/addon-view/info/hassio-addon-info.ts b/hassio/src/addon-view/info/hassio-addon-info.ts index a7b3796909..28343352c7 100644 --- a/hassio/src/addon-view/info/hassio-addon-info.ts +++ b/hassio/src/addon-view/info/hassio-addon-info.ts @@ -14,15 +14,14 @@ import { mdiPound, mdiShield, } from "@mdi/js"; -import "@polymer/paper-tooltip/paper-tooltip"; import { css, CSSResult, customElement, html, + internalProperty, LitElement, property, - internalProperty, TemplateResult, } from "lit-element"; import { classMap } from "lit-html/directives/class-map"; @@ -34,6 +33,7 @@ import "../../../../src/components/buttons/ha-progress-button"; import "../../../../src/components/ha-card"; import "../../../../src/components/ha-label-badge"; import "../../../../src/components/ha-markdown"; +import "../../../../src/components/ha-settings-row"; import "../../../../src/components/ha-svg-icon"; import "../../../../src/components/ha-switch"; import { @@ -52,7 +52,6 @@ import { HomeAssistant } from "../../../../src/types"; import "../../components/hassio-card-content"; import { showHassioMarkdownDialog } from "../../dialogs/markdown/show-dialog-hassio-markdown"; import { hassioStyle } from "../../resources/hassio-style"; -import "../../../../src/components/ha-settings-row"; const STAGE_ICON = { stable: mdiCheckCircle, diff --git a/src/dialogs/config-flow/dialog-data-entry-flow.ts b/src/dialogs/config-flow/dialog-data-entry-flow.ts index 976a98d301..79a95c2bc2 100644 --- a/src/dialogs/config-flow/dialog-data-entry-flow.ts +++ b/src/dialogs/config-flow/dialog-data-entry-flow.ts @@ -1,21 +1,22 @@ import "@material/mwc-button"; import "@polymer/paper-dialog-scrollable/paper-dialog-scrollable"; -import "../../components/ha-icon-button"; -import "../../components/ha-circular-progress"; -import "@polymer/paper-tooltip/paper-tooltip"; import type { UnsubscribeFunc } from "home-assistant-js-websocket"; import { css, CSSResultArray, customElement, html, - LitElement, internalProperty, + LitElement, PropertyValues, TemplateResult, } from "lit-element"; +import { fireEvent } from "../../common/dom/fire_event"; +import { computeRTL } from "../../common/util/compute_rtl"; +import "../../components/ha-circular-progress"; import "../../components/ha-dialog"; import "../../components/ha-form/ha-form"; +import "../../components/ha-icon-button"; import "../../components/ha-markdown"; import { AreaRegistryEntry, @@ -35,8 +36,6 @@ import "./step-flow-external"; import "./step-flow-form"; import "./step-flow-loading"; import "./step-flow-pick-handler"; -import { fireEvent } from "../../common/dom/fire_event"; -import { computeRTL } from "../../common/util/compute_rtl"; let instance = 0; diff --git a/src/dialogs/config-flow/step-flow-form.ts b/src/dialogs/config-flow/step-flow-form.ts index a0d13a98e6..660595b2f3 100644 --- a/src/dialogs/config-flow/step-flow-form.ts +++ b/src/dialogs/config-flow/step-flow-form.ts @@ -1,5 +1,4 @@ import "@material/mwc-button"; -import "../../components/ha-circular-progress"; import "@polymer/paper-tooltip/paper-tooltip"; import { css, @@ -12,6 +11,7 @@ import { TemplateResult, } from "lit-element"; import { fireEvent } from "../../common/dom/fire_event"; +import "../../components/ha-circular-progress"; import "../../components/ha-form/ha-form"; import type { HaFormSchema } from "../../components/ha-form/ha-form"; import "../../components/ha-markdown"; @@ -91,7 +91,7 @@ class StepFlowForm extends LitElement { ${!allRequiredInfoFilledIn ? html` - ${this.hass.localize( "ui.panel.config.integrations.config_flow.not_all_required_fields" )} diff --git a/src/dialogs/notifications/persistent-notification-item.ts b/src/dialogs/notifications/persistent-notification-item.ts index a8f2a20777..cc5359f306 100644 --- a/src/dialogs/notifications/persistent-notification-item.ts +++ b/src/dialogs/notifications/persistent-notification-item.ts @@ -43,12 +43,9 @@ export class HuiPersistentNotificationItem extends LitElement { .hass=${this.hass} .datetime="${this.notification.created_at}" > - ${this._computeTooltip( - this.hass, - this.notification - )} + + ${this._computeTooltip(this.hass, this.notification)} + diff --git a/src/layouts/hass-tabs-subpage-data-table.ts b/src/layouts/hass-tabs-subpage-data-table.ts index dce430e320..58ea90fb99 100644 --- a/src/layouts/hass-tabs-subpage-data-table.ts +++ b/src/layouts/hass-tabs-subpage-data-table.ts @@ -11,6 +11,7 @@ import { TemplateResult, } from "lit-element"; import { navigate } from "../common/navigate"; +import { computeRTLDirection } from "../common/util/compute_rtl"; import "../components/data-table/ha-data-table"; import type { DataTableColumnContainer, @@ -20,7 +21,6 @@ import type { import type { HomeAssistant, Route } from "../types"; import "./hass-tabs-subpage"; import type { PageNavigation } from "./hass-tabs-subpage"; -import { computeRTLDirection } from "../common/util/compute_rtl"; @customElement("hass-tabs-subpage-data-table") export class HaTabsSubpageDataTable extends LitElement { @@ -136,7 +136,7 @@ export class HaTabsSubpageDataTable extends LitElement { ? html`
- + ${this.hass.localize( "ui.panel.config.filtering.filtering_by" )} diff --git a/src/panels/config/areas/ha-config-area-page.ts b/src/panels/config/areas/ha-config-area-page.ts index 41bd615b2d..7f3d7cc2d1 100644 --- a/src/panels/config/areas/ha-config-area-page.ts +++ b/src/panels/config/areas/ha-config-area-page.ts @@ -4,9 +4,9 @@ import { CSSResult, customElement, html, + internalProperty, LitElement, property, - internalProperty, TemplateResult, } from "lit-element"; import { ifDefined } from "lit-html/directives/if-defined"; @@ -175,8 +175,8 @@ class HaConfigAreaPage extends LitElement { ${!state.attributes.id ? html` - ${this.hass.localize( + + ${this.hass.localize( "ui.panel.config.devices.cant_edit" )} @@ -228,8 +228,8 @@ class HaConfigAreaPage extends LitElement { ${!state.attributes.id ? html` - ${this.hass.localize( + + ${this.hass.localize( "ui.panel.config.devices.cant_edit" )} diff --git a/src/panels/config/automation/ha-automation-picker.ts b/src/panels/config/automation/ha-automation-picker.ts index 57286eccd4..e56b62fe2b 100644 --- a/src/panels/config/automation/ha-automation-picker.ts +++ b/src/panels/config/automation/ha-automation-picker.ts @@ -1,12 +1,13 @@ -import "../../../components/ha-icon-button"; +import "@material/mwc-fab"; +import { mdiPlus } from "@mdi/js"; import "@polymer/paper-tooltip/paper-tooltip"; import { + CSSResult, customElement, html, LitElement, property, TemplateResult, - CSSResult, } from "lit-element"; import { ifDefined } from "lit-html/directives/if-defined"; import memoizeOne from "memoize-one"; @@ -16,7 +17,8 @@ import { fireEvent } from "../../../common/dom/fire_event"; import { computeStateName } from "../../../common/entity/compute_state_name"; import { DataTableColumnContainer } from "../../../components/data-table/ha-data-table"; import "../../../components/entity/ha-entity-toggle"; -import "@material/mwc-fab"; +import "../../../components/ha-icon-button"; +import "../../../components/ha-svg-icon"; import { AutomationConfig, AutomationEntity, @@ -28,8 +30,6 @@ import { haStyle } from "../../../resources/styles"; import { HomeAssistant, Route } from "../../../types"; import { configSections } from "../ha-panel-config"; import { showThingtalkDialog } from "./show-dialog-thingtalk"; -import "../../../components/ha-svg-icon"; -import { mdiPlus } from "@mdi/js"; @customElement("ha-automation-picker") class HaAutomationPicker extends LitElement { @@ -138,7 +138,7 @@ class HaAutomationPicker extends LitElement { ${!automation.attributes.id ? html` - + ${this.hass.localize( "ui.panel.config.automation.picker.only_editable" )} diff --git a/src/panels/config/devices/ha-config-device-page.ts b/src/panels/config/devices/ha-config-device-page.ts index e3577eb5dd..0287b084cd 100644 --- a/src/panels/config/devices/ha-config-device-page.ts +++ b/src/panels/config/devices/ha-config-device-page.ts @@ -4,9 +4,9 @@ import { CSSResult, customElement, html, + internalProperty, LitElement, property, - internalProperty, TemplateResult, } from "lit-element"; import { ifDefined } from "lit-html/directives/if-defined"; @@ -14,6 +14,7 @@ import memoizeOne from "memoize-one"; import { isComponentLoaded } from "../../../common/config/is_component_loaded"; import { computeStateName } from "../../../common/entity/compute_state_name"; import { compare } from "../../../common/string/compare"; +import { slugify } from "../../../common/string/slugify"; import "../../../components/entity/ha-battery-icon"; import "../../../components/ha-icon-next"; import { AreaRegistryEntry } from "../../../data/area_registry"; @@ -25,8 +26,8 @@ import { } from "../../../data/device_registry"; import { EntityRegistryEntry, - findBatteryEntity, findBatteryChargingEntity, + findBatteryEntity, updateEntityRegistryEntry, } from "../../../data/entity_registry"; import { SceneEntities, showSceneEditor } from "../../../data/scene"; @@ -35,6 +36,7 @@ import { loadDeviceRegistryDetailDialog, showDeviceRegistryDetailDialog, } from "../../../dialogs/device-registry-detail/show-dialog-device-registry-detail"; +import { showConfirmationDialog } from "../../../dialogs/generic/show-dialog-box"; import "../../../layouts/hass-error-screen"; import "../../../layouts/hass-tabs-subpage"; import { HomeAssistant, Route } from "../../../types"; @@ -43,8 +45,6 @@ import { configSections } from "../ha-panel-config"; import "./device-detail/ha-device-entities-card"; import "./device-detail/ha-device-info-card"; import { showDeviceAutomationDialog } from "./device-detail/show-dialog-device-automation"; -import { slugify } from "../../../common/string/slugify"; -import { showConfirmationDialog } from "../../../dialogs/generic/show-dialog-box"; export interface EntityRegistryStateEntry extends EntityRegistryEntry { stateName?: string | null; @@ -296,8 +296,8 @@ export class HaConfigDevicePage extends LitElement { ${!state.attributes.id ? html` - ${this.hass.localize( + + ${this.hass.localize( "ui.panel.config.devices.cant_edit" )} @@ -369,7 +369,9 @@ export class HaConfigDevicePage extends LitElement { ${!state.attributes.id ? html` ${this.hass.localize( + animation-delay="0" + > + ${this.hass.localize( "ui.panel.config.devices.cant_edit" )} diff --git a/src/panels/config/entities/ha-config-entities.ts b/src/panels/config/entities/ha-config-entities.ts index 9d3ad306d6..ad7c3d9e3d 100644 --- a/src/panels/config/entities/ha-config-entities.ts +++ b/src/panels/config/entities/ha-config-entities.ts @@ -1,4 +1,6 @@ import "@material/mwc-list/mwc-list-item"; +import type { RequestSelectedDetail } from "@material/mwc-list/mwc-list-item"; +import { mdiFilterVariant } from "@mdi/js"; import "@polymer/paper-checkbox/paper-checkbox"; import "@polymer/paper-dropdown-menu/paper-dropdown-menu"; import "@polymer/paper-item/paper-icon-item"; @@ -10,9 +12,9 @@ import { CSSResult, customElement, html, + internalProperty, LitElement, property, - internalProperty, query, TemplateResult, } from "lit-element"; @@ -56,8 +58,6 @@ import { loadEntityEditorDialog, showEntityEditorDialog, } from "./show-dialog-entity-editor"; -import { mdiFilterVariant } from "@mdi/js"; -import type { RequestSelectedDetail } from "@material/mwc-list/mwc-list-item"; export interface StateEntity extends EntityRegistryEntry { readonly?: boolean; @@ -192,7 +192,7 @@ export class HaConfigEntities extends SubscribeMixin(LitElement) { ? "hass:cancel" : "hass:pencil-off"} > - + ${entity.restored ? this.hass.localize( "ui.panel.config.entities.picker.status.restored" @@ -390,7 +390,7 @@ export class HaConfigEntities extends SubscribeMixin(LitElement) { icon="hass:undo" @click=${this._enableSelected} > - + ${this.hass.localize( "ui.panel.config.entities.picker.enable_selected.button" )} @@ -400,7 +400,7 @@ export class HaConfigEntities extends SubscribeMixin(LitElement) { icon="hass:cancel" @click=${this._disableSelected} > - + ${this.hass.localize( "ui.panel.config.entities.picker.disable_selected.button" )} @@ -410,7 +410,7 @@ export class HaConfigEntities extends SubscribeMixin(LitElement) { icon="hass:delete" @click=${this._removeSelected} > - + ${this.hass.localize( "ui.panel.config.entities.picker.remove_selected.button" )} @@ -433,7 +433,7 @@ export class HaConfigEntities extends SubscribeMixin(LitElement) { ${this.narrow ? html`
- + ${this.hass.localize( "ui.panel.config.filtering.filtering_by" )} diff --git a/src/panels/config/helpers/dialog-helper-detail.ts b/src/panels/config/helpers/dialog-helper-detail.ts index b752a5037d..a7320a5e0e 100644 --- a/src/panels/config/helpers/dialog-helper-detail.ts +++ b/src/panels/config/helpers/dialog-helper-detail.ts @@ -6,9 +6,9 @@ import { CSSResult, customElement, html, + internalProperty, LitElement, property, - internalProperty, query, TemplateResult, } from "lit-element"; @@ -136,7 +136,7 @@ export class DialogHelperDetail extends LitElement { ${!isLoaded ? html` - ${this.hass.localize( "ui.dialogs.helper_settings.platform_not_loaded", "platform", diff --git a/src/panels/config/helpers/ha-config-helpers.ts b/src/panels/config/helpers/ha-config-helpers.ts index e03b5463ad..fe96b3389e 100644 --- a/src/panels/config/helpers/ha-config-helpers.ts +++ b/src/panels/config/helpers/ha-config-helpers.ts @@ -1,3 +1,5 @@ +import "@material/mwc-fab"; +import { mdiPlus } from "@mdi/js"; import "@polymer/paper-checkbox/paper-checkbox"; import "@polymer/paper-dropdown-menu/paper-dropdown-menu"; import "@polymer/paper-item/paper-icon-item"; @@ -7,9 +9,9 @@ import { HassEntity } from "home-assistant-js-websocket"; import { customElement, html, + internalProperty, LitElement, property, - internalProperty, PropertyValues, TemplateResult, } from "lit-element"; @@ -21,8 +23,8 @@ import { DataTableColumnContainer, RowClickedEvent, } from "../../../components/data-table/ha-data-table"; -import "@material/mwc-fab"; import "../../../components/ha-icon"; +import "../../../components/ha-svg-icon"; import "../../../layouts/hass-loading-screen"; import "../../../layouts/hass-tabs-subpage-data-table"; import { HomeAssistant, Route } from "../../../types"; @@ -30,8 +32,6 @@ import { showEntityEditorDialog } from "../entities/show-dialog-entity-editor"; import { configSections } from "../ha-panel-config"; import { HELPER_DOMAINS } from "./const"; import { showHelperDetailDialog } from "./show-dialog-helper-detail"; -import "../../../components/ha-svg-icon"; -import { mdiPlus } from "@mdi/js"; @customElement("ha-config-helpers") export class HaConfigHelpers extends LitElement { @@ -110,7 +110,7 @@ export class HaConfigHelpers extends LitElement { style="display:inline-block; position: relative;" > - + ${this.hass.localize( "ui.panel.config.entities.picker.status.readonly" )} diff --git a/src/panels/config/lovelace/dashboards/ha-config-lovelace-dashboards.ts b/src/panels/config/lovelace/dashboards/ha-config-lovelace-dashboards.ts index 2edb4d0b8e..90205aa8a7 100644 --- a/src/panels/config/lovelace/dashboards/ha-config-lovelace-dashboards.ts +++ b/src/panels/config/lovelace/dashboards/ha-config-lovelace-dashboards.ts @@ -1,11 +1,12 @@ import "@material/mwc-fab"; +import { mdiPlus } from "@mdi/js"; import "@polymer/paper-tooltip/paper-tooltip"; import { customElement, html, + internalProperty, LitElement, property, - internalProperty, PropertyValues, TemplateResult, } from "lit-element"; @@ -18,6 +19,7 @@ import { } from "../../../../components/data-table/ha-data-table"; import "../../../../components/ha-icon"; import "../../../../components/ha-icon-button"; +import "../../../../components/ha-svg-icon"; import { createDashboard, deleteDashboard, @@ -33,8 +35,6 @@ import "../../../../layouts/hass-tabs-subpage-data-table"; import { HomeAssistant, Route } from "../../../../types"; import { lovelaceTabs } from "../ha-config-lovelace"; import { showDashboardDetailDialog } from "./show-dialog-lovelace-dashboard-detail"; -import "../../../../components/ha-svg-icon"; -import { mdiPlus } from "@mdi/js"; @customElement("ha-config-lovelace-dashboards") export class HaConfigLovelaceDashboards extends LitElement { @@ -76,7 +76,7 @@ export class HaConfigLovelaceDashboards extends LitElement { style="padding-left: 10px;" icon="hass:check-circle-outline" > - + ${this.hass.localize( `ui.panel.config.lovelace.dashboards.default_dashboard` )} diff --git a/src/panels/config/lovelace/resources/ha-config-lovelace-resources.ts b/src/panels/config/lovelace/resources/ha-config-lovelace-resources.ts index 0bfb4d68ca..5d35134956 100644 --- a/src/panels/config/lovelace/resources/ha-config-lovelace-resources.ts +++ b/src/panels/config/lovelace/resources/ha-config-lovelace-resources.ts @@ -1,15 +1,15 @@ +import "@material/mwc-fab"; +import { mdiPlus } from "@mdi/js"; import "@polymer/paper-checkbox/paper-checkbox"; import "@polymer/paper-dropdown-menu/paper-dropdown-menu"; import "@polymer/paper-item/paper-icon-item"; import "@polymer/paper-listbox/paper-listbox"; -import "@polymer/paper-tooltip/paper-tooltip"; -import "@material/mwc-fab"; import { customElement, html, + internalProperty, LitElement, property, - internalProperty, PropertyValues, TemplateResult, } from "lit-element"; @@ -20,6 +20,7 @@ import { RowClickedEvent, } from "../../../../components/data-table/ha-data-table"; import "../../../../components/ha-icon"; +import "../../../../components/ha-svg-icon"; import { createResource, deleteResource, @@ -37,8 +38,6 @@ import { HomeAssistant, Route } from "../../../../types"; import { loadLovelaceResources } from "../../../lovelace/common/load-resources"; import { lovelaceTabs } from "../ha-config-lovelace"; import { showResourceDetailDialog } from "./show-dialog-lovelace-resource-detail"; -import "../../../../components/ha-svg-icon"; -import { mdiPlus } from "@mdi/js"; @customElement("ha-config-lovelace-resources") export class HaConfigLovelaceRescources extends LitElement { diff --git a/src/panels/config/scene/ha-scene-dashboard.ts b/src/panels/config/scene/ha-scene-dashboard.ts index f2835f405b..e8b46223f7 100644 --- a/src/panels/config/scene/ha-scene-dashboard.ts +++ b/src/panels/config/scene/ha-scene-dashboard.ts @@ -1,4 +1,5 @@ -import "../../../components/ha-icon-button"; +import "@material/mwc-fab"; +import { mdiPlus } from "@mdi/js"; import "@polymer/paper-tooltip/paper-tooltip"; import { css, @@ -13,8 +14,11 @@ import { ifDefined } from "lit-html/directives/if-defined"; import memoizeOne from "memoize-one"; import { fireEvent } from "../../../common/dom/fire_event"; import { computeStateName } from "../../../common/entity/compute_state_name"; +import { stateIcon } from "../../../common/entity/state_icon"; import { DataTableColumnContainer } from "../../../components/data-table/ha-data-table"; -import "@material/mwc-fab"; +import "../../../components/ha-icon"; +import "../../../components/ha-icon-button"; +import "../../../components/ha-svg-icon"; import { forwardHaptic } from "../../../data/haptics"; import { activateScene, SceneEntity } from "../../../data/scene"; import { showAlertDialog } from "../../../dialogs/generic/show-dialog-box"; @@ -23,10 +27,6 @@ import { haStyle } from "../../../resources/styles"; import { HomeAssistant, Route } from "../../../types"; import { showToast } from "../../../util/toast"; import { configSections } from "../ha-panel-config"; -import "../../../components/ha-icon"; -import "../../../components/ha-svg-icon"; -import { mdiPlus } from "@mdi/js"; -import { stateIcon } from "../../../common/entity/state_icon"; @customElement("ha-scene-dashboard") class HaSceneDashboard extends LitElement { @@ -117,7 +117,7 @@ class HaSceneDashboard extends LitElement { ${!scene.attributes.id ? html` - + ${this.hass.localize( "ui.panel.config.scene.picker.only_editable" )} diff --git a/src/panels/config/users/dialog-user-detail.ts b/src/panels/config/users/dialog-user-detail.ts index fb5e29ce27..d662248f02 100644 --- a/src/panels/config/users/dialog-user-detail.ts +++ b/src/panels/config/users/dialog-user-detail.ts @@ -139,7 +139,7 @@ class DialogUserDetail extends LitElement { ${user.system_generated ? html` - + ${this.hass.localize( "ui.panel.config.users.editor.system_generated_users_not_removable" )} @@ -166,7 +166,7 @@ class DialogUserDetail extends LitElement { ${user.system_generated ? html` - + ${this.hass.localize( "ui.panel.config.users.editor.system_generated_users_not_editable" )} diff --git a/src/panels/config/zone/ha-config-zone.ts b/src/panels/config/zone/ha-config-zone.ts index b1690c6930..83910d3c15 100644 --- a/src/panels/config/zone/ha-config-zone.ts +++ b/src/panels/config/zone/ha-config-zone.ts @@ -11,9 +11,9 @@ import { CSSResult, customElement, html, + internalProperty, LitElement, property, - internalProperty, PropertyValues, query, TemplateResult, @@ -198,7 +198,7 @@ export class HaConfigZone extends SubscribeMixin(LitElement) { : mdiPencilOff} > - + ${state.entity_id === "zone.home" ? this.hass.localize( `ui.panel.config.zone.${ diff --git a/src/panels/profile/ha-refresh-tokens-card.js b/src/panels/profile/ha-refresh-tokens-card.js index e4f7e4f58c..9c4db68a7a 100644 --- a/src/panels/profile/ha-refresh-tokens-card.js +++ b/src/panels/profile/ha-refresh-tokens-card.js @@ -1,17 +1,17 @@ -import "../../components/ha-icon-button"; import "@polymer/paper-tooltip/paper-tooltip"; import { html } from "@polymer/polymer/lib/utils/html-tag"; /* eslint-plugin-disable lit */ import { PolymerElement } from "@polymer/polymer/polymer-element"; import { formatDateTime } from "../../common/datetime/format_date_time"; import "../../components/ha-card"; -import { EventsMixin } from "../../mixins/events-mixin"; -import LocalizeMixin from "../../mixins/localize-mixin"; +import "../../components/ha-icon-button"; +import "../../components/ha-settings-row"; import { showAlertDialog, showConfirmationDialog, } from "../../dialogs/generic/show-dialog-box"; -import "../../components/ha-settings-row"; +import { EventsMixin } from "../../mixins/events-mixin"; +import LocalizeMixin from "../../mixins/localize-mixin"; /* * @appliesMixin EventsMixin @@ -39,7 +39,7 @@ class HaRefreshTokens extends LocalizeMixin(EventsMixin(PolymerElement)) {
[[_formatLastUsed(item)]]