mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-15 13:26:34 +00:00
Sort imports (#8104)
This commit is contained in:
parent
131a7f3782
commit
a1d07e5a00
@ -26,6 +26,9 @@
|
|||||||
"[typescript]": {
|
"[typescript]": {
|
||||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||||
},
|
},
|
||||||
|
"[javascript]": {
|
||||||
|
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||||
|
},
|
||||||
"files.trimTrailingWhitespace": true
|
"files.trimTrailingWhitespace": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
import {
|
import {
|
||||||
customElement,
|
customElement,
|
||||||
html,
|
html,
|
||||||
property,
|
|
||||||
internalProperty,
|
internalProperty,
|
||||||
|
property,
|
||||||
TemplateResult,
|
TemplateResult,
|
||||||
} from "lit-element";
|
} from "lit-element";
|
||||||
import { mockHistory } from "../../../../demo/src/stubs/history";
|
import { mockHistory } from "../../../../demo/src/stubs/history";
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import "web-animations-js/web-animations-next-lite.min";
|
import "web-animations-js/web-animations-next-lite.min";
|
||||||
import "../../../src/resources/roboto";
|
|
||||||
import "../../../src/resources/ha-style";
|
import "../../../src/resources/ha-style";
|
||||||
|
import "../../../src/resources/roboto";
|
||||||
import "./layout/hc-lovelace";
|
import "./layout/hc-lovelace";
|
||||||
|
@ -3,8 +3,8 @@ import {
|
|||||||
CSSResult,
|
CSSResult,
|
||||||
customElement,
|
customElement,
|
||||||
html,
|
html,
|
||||||
LitElement,
|
|
||||||
internalProperty,
|
internalProperty,
|
||||||
|
LitElement,
|
||||||
TemplateResult,
|
TemplateResult,
|
||||||
} from "lit-element";
|
} from "lit-element";
|
||||||
import { CastManager } from "../../../src/cast/cast_manager";
|
import { CastManager } from "../../../src/cast/cast_manager";
|
||||||
|
@ -3,9 +3,9 @@ import {
|
|||||||
css,
|
css,
|
||||||
CSSResult,
|
CSSResult,
|
||||||
html,
|
html,
|
||||||
|
internalProperty,
|
||||||
LitElement,
|
LitElement,
|
||||||
property,
|
property,
|
||||||
internalProperty,
|
|
||||||
TemplateResult,
|
TemplateResult,
|
||||||
} from "lit-element";
|
} from "lit-element";
|
||||||
import { until } from "lit-html/directives/until";
|
import { until } from "lit-html/directives/until";
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
import "../../src/resources/safari-14-attachshadow-patch";
|
|
||||||
import "@polymer/polymer/lib/elements/dom-if";
|
import "@polymer/polymer/lib/elements/dom-if";
|
||||||
import "@polymer/polymer/lib/elements/dom-repeat";
|
import "@polymer/polymer/lib/elements/dom-repeat";
|
||||||
import "../../src/resources/ha-style";
|
import "../../src/resources/ha-style";
|
||||||
import "../../src/resources/roboto";
|
import "../../src/resources/roboto";
|
||||||
|
import "../../src/resources/safari-14-attachshadow-patch";
|
||||||
import "./ha-demo";
|
import "./ha-demo";
|
||||||
|
|
||||||
/* polyfill for paper-dropdown */
|
/* polyfill for paper-dropdown */
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
// Compat needs to be first import
|
||||||
import "../../src/resources/compatibility";
|
import "../../src/resources/compatibility";
|
||||||
import { isNavigationClick } from "../../src/common/dom/is-navigation-click";
|
import { isNavigationClick } from "../../src/common/dom/is-navigation-click";
|
||||||
import { navigate } from "../../src/common/navigate";
|
import { navigate } from "../../src/common/navigate";
|
||||||
|
@ -2,10 +2,10 @@ import "@polymer/app-layout/app-toolbar/app-toolbar";
|
|||||||
import { html } from "@polymer/polymer/lib/utils/html-tag";
|
import { html } from "@polymer/polymer/lib/utils/html-tag";
|
||||||
/* eslint-plugin-disable lit */
|
/* eslint-plugin-disable lit */
|
||||||
import { PolymerElement } from "@polymer/polymer/polymer-element";
|
import { PolymerElement } from "@polymer/polymer/polymer-element";
|
||||||
import "../../../src/components/ha-switch";
|
|
||||||
import "../../../src/components/ha-formfield";
|
|
||||||
import "./demo-card";
|
|
||||||
import { applyThemesOnElement } from "../../../src/common/dom/apply_themes_on_element";
|
import { applyThemesOnElement } from "../../../src/common/dom/apply_themes_on_element";
|
||||||
|
import "../../../src/components/ha-formfield";
|
||||||
|
import "../../../src/components/ha-switch";
|
||||||
|
import "./demo-card";
|
||||||
|
|
||||||
class DemoCards extends PolymerElement {
|
class DemoCards extends PolymerElement {
|
||||||
static get template() {
|
static get template() {
|
||||||
|
@ -2,8 +2,8 @@ import { html } from "@polymer/polymer/lib/utils/html-tag";
|
|||||||
/* eslint-plugin-disable lit */
|
/* eslint-plugin-disable lit */
|
||||||
import { PolymerElement } from "@polymer/polymer/polymer-element";
|
import { PolymerElement } from "@polymer/polymer/polymer-element";
|
||||||
import "../../../src/components/ha-card";
|
import "../../../src/components/ha-card";
|
||||||
import "../../../src/state-summary/state-card-content";
|
|
||||||
import "../../../src/dialogs/more-info/more-info-content";
|
import "../../../src/dialogs/more-info/more-info-content";
|
||||||
|
import "../../../src/state-summary/state-card-content";
|
||||||
|
|
||||||
class DemoMoreInfo extends PolymerElement {
|
class DemoMoreInfo extends PolymerElement {
|
||||||
static get template() {
|
static get template() {
|
||||||
|
@ -2,10 +2,10 @@ import "@polymer/app-layout/app-toolbar/app-toolbar";
|
|||||||
import { html } from "@polymer/polymer/lib/utils/html-tag";
|
import { html } from "@polymer/polymer/lib/utils/html-tag";
|
||||||
/* eslint-plugin-disable lit */
|
/* eslint-plugin-disable lit */
|
||||||
import { PolymerElement } from "@polymer/polymer/polymer-element";
|
import { PolymerElement } from "@polymer/polymer/polymer-element";
|
||||||
import "../../../src/components/ha-switch";
|
|
||||||
import "../../../src/components/ha-formfield";
|
|
||||||
import "./demo-more-info";
|
|
||||||
import { applyThemesOnElement } from "../../../src/common/dom/apply_themes_on_element";
|
import { applyThemesOnElement } from "../../../src/common/dom/apply_themes_on_element";
|
||||||
|
import "../../../src/components/ha-formfield";
|
||||||
|
import "../../../src/components/ha-switch";
|
||||||
|
import "./demo-more-info";
|
||||||
|
|
||||||
class DemoMoreInfos extends PolymerElement {
|
class DemoMoreInfos extends PolymerElement {
|
||||||
static get template() {
|
static get template() {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import {
|
import {
|
||||||
|
customElement,
|
||||||
html,
|
html,
|
||||||
LitElement,
|
LitElement,
|
||||||
customElement,
|
|
||||||
PropertyValues,
|
PropertyValues,
|
||||||
query,
|
query,
|
||||||
TemplateResult,
|
TemplateResult,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import {
|
import {
|
||||||
|
customElement,
|
||||||
html,
|
html,
|
||||||
LitElement,
|
LitElement,
|
||||||
customElement,
|
|
||||||
PropertyValues,
|
PropertyValues,
|
||||||
query,
|
query,
|
||||||
TemplateResult,
|
TemplateResult,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import {
|
import {
|
||||||
|
customElement,
|
||||||
html,
|
html,
|
||||||
LitElement,
|
LitElement,
|
||||||
customElement,
|
|
||||||
PropertyValues,
|
PropertyValues,
|
||||||
query,
|
query,
|
||||||
TemplateResult,
|
TemplateResult,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import {
|
import {
|
||||||
|
customElement,
|
||||||
html,
|
html,
|
||||||
LitElement,
|
LitElement,
|
||||||
customElement,
|
|
||||||
PropertyValues,
|
PropertyValues,
|
||||||
query,
|
query,
|
||||||
TemplateResult,
|
TemplateResult,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import {
|
import {
|
||||||
|
customElement,
|
||||||
html,
|
html,
|
||||||
LitElement,
|
LitElement,
|
||||||
customElement,
|
|
||||||
PropertyValues,
|
PropertyValues,
|
||||||
query,
|
query,
|
||||||
TemplateResult,
|
TemplateResult,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import {
|
import {
|
||||||
|
customElement,
|
||||||
html,
|
html,
|
||||||
LitElement,
|
LitElement,
|
||||||
customElement,
|
|
||||||
PropertyValues,
|
PropertyValues,
|
||||||
query,
|
query,
|
||||||
TemplateResult,
|
TemplateResult,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import {
|
import {
|
||||||
|
customElement,
|
||||||
html,
|
html,
|
||||||
LitElement,
|
LitElement,
|
||||||
customElement,
|
|
||||||
PropertyValues,
|
PropertyValues,
|
||||||
query,
|
query,
|
||||||
TemplateResult,
|
TemplateResult,
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { html, LitElement, customElement, TemplateResult } from "lit-element";
|
import { customElement, html, LitElement, TemplateResult } from "lit-element";
|
||||||
import "../components/demo-cards";
|
import "../components/demo-cards";
|
||||||
|
|
||||||
const CONFIGS = [
|
const CONFIGS = [
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import {
|
import {
|
||||||
|
customElement,
|
||||||
html,
|
html,
|
||||||
LitElement,
|
LitElement,
|
||||||
customElement,
|
|
||||||
PropertyValues,
|
PropertyValues,
|
||||||
query,
|
query,
|
||||||
TemplateResult,
|
TemplateResult,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import {
|
import {
|
||||||
|
customElement,
|
||||||
html,
|
html,
|
||||||
LitElement,
|
LitElement,
|
||||||
customElement,
|
|
||||||
PropertyValues,
|
PropertyValues,
|
||||||
query,
|
query,
|
||||||
TemplateResult,
|
TemplateResult,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import {
|
import {
|
||||||
|
customElement,
|
||||||
html,
|
html,
|
||||||
LitElement,
|
LitElement,
|
||||||
customElement,
|
|
||||||
PropertyValues,
|
PropertyValues,
|
||||||
query,
|
query,
|
||||||
TemplateResult,
|
TemplateResult,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import {
|
import {
|
||||||
|
customElement,
|
||||||
html,
|
html,
|
||||||
LitElement,
|
LitElement,
|
||||||
customElement,
|
|
||||||
PropertyValues,
|
PropertyValues,
|
||||||
query,
|
query,
|
||||||
TemplateResult,
|
TemplateResult,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import {
|
import {
|
||||||
|
customElement,
|
||||||
html,
|
html,
|
||||||
LitElement,
|
LitElement,
|
||||||
customElement,
|
|
||||||
PropertyValues,
|
PropertyValues,
|
||||||
query,
|
query,
|
||||||
TemplateResult,
|
TemplateResult,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import {
|
import {
|
||||||
|
customElement,
|
||||||
html,
|
html,
|
||||||
LitElement,
|
LitElement,
|
||||||
customElement,
|
|
||||||
PropertyValues,
|
PropertyValues,
|
||||||
query,
|
query,
|
||||||
TemplateResult,
|
TemplateResult,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import {
|
import {
|
||||||
|
customElement,
|
||||||
html,
|
html,
|
||||||
LitElement,
|
LitElement,
|
||||||
customElement,
|
|
||||||
PropertyValues,
|
PropertyValues,
|
||||||
query,
|
query,
|
||||||
TemplateResult,
|
TemplateResult,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import {
|
import {
|
||||||
|
customElement,
|
||||||
html,
|
html,
|
||||||
LitElement,
|
LitElement,
|
||||||
customElement,
|
|
||||||
PropertyValues,
|
PropertyValues,
|
||||||
query,
|
query,
|
||||||
TemplateResult,
|
TemplateResult,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import {
|
import {
|
||||||
|
customElement,
|
||||||
html,
|
html,
|
||||||
LitElement,
|
LitElement,
|
||||||
customElement,
|
|
||||||
PropertyValues,
|
PropertyValues,
|
||||||
query,
|
query,
|
||||||
TemplateResult,
|
TemplateResult,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import {
|
import {
|
||||||
|
customElement,
|
||||||
html,
|
html,
|
||||||
LitElement,
|
LitElement,
|
||||||
customElement,
|
|
||||||
PropertyValues,
|
PropertyValues,
|
||||||
query,
|
query,
|
||||||
TemplateResult,
|
TemplateResult,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import {
|
import {
|
||||||
|
customElement,
|
||||||
html,
|
html,
|
||||||
LitElement,
|
LitElement,
|
||||||
customElement,
|
|
||||||
PropertyValues,
|
PropertyValues,
|
||||||
query,
|
query,
|
||||||
TemplateResult,
|
TemplateResult,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import {
|
import {
|
||||||
|
customElement,
|
||||||
html,
|
html,
|
||||||
LitElement,
|
LitElement,
|
||||||
customElement,
|
|
||||||
PropertyValues,
|
PropertyValues,
|
||||||
query,
|
query,
|
||||||
TemplateResult,
|
TemplateResult,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import {
|
import {
|
||||||
|
customElement,
|
||||||
html,
|
html,
|
||||||
LitElement,
|
LitElement,
|
||||||
customElement,
|
|
||||||
property,
|
property,
|
||||||
PropertyValues,
|
PropertyValues,
|
||||||
query,
|
query,
|
||||||
@ -10,20 +10,20 @@ import {
|
|||||||
import "../../../src/components/ha-card";
|
import "../../../src/components/ha-card";
|
||||||
import {
|
import {
|
||||||
SUPPORT_BRIGHTNESS,
|
SUPPORT_BRIGHTNESS,
|
||||||
|
SUPPORT_COLOR,
|
||||||
SUPPORT_COLOR_TEMP,
|
SUPPORT_COLOR_TEMP,
|
||||||
SUPPORT_EFFECT,
|
SUPPORT_EFFECT,
|
||||||
SUPPORT_FLASH,
|
SUPPORT_FLASH,
|
||||||
SUPPORT_COLOR,
|
|
||||||
SUPPORT_TRANSITION,
|
SUPPORT_TRANSITION,
|
||||||
SUPPORT_WHITE_VALUE,
|
SUPPORT_WHITE_VALUE,
|
||||||
} from "../../../src/data/light";
|
} from "../../../src/data/light";
|
||||||
|
import "../../../src/dialogs/more-info/more-info-content";
|
||||||
import { getEntity } from "../../../src/fake_data/entity";
|
import { getEntity } from "../../../src/fake_data/entity";
|
||||||
import {
|
import {
|
||||||
provideHass,
|
|
||||||
MockHomeAssistant,
|
MockHomeAssistant,
|
||||||
|
provideHass,
|
||||||
} from "../../../src/fake_data/provide_hass";
|
} from "../../../src/fake_data/provide_hass";
|
||||||
import "../components/demo-more-infos";
|
import "../components/demo-more-infos";
|
||||||
import "../../../src/dialogs/more-info/more-info-content";
|
|
||||||
|
|
||||||
const ENTITIES = [
|
const ENTITIES = [
|
||||||
getEntity("light", "bed_light", "on", {
|
getEntity("light", "bed_light", "on", {
|
||||||
|
@ -7,13 +7,14 @@ import {
|
|||||||
CSSResult,
|
CSSResult,
|
||||||
customElement,
|
customElement,
|
||||||
html,
|
html,
|
||||||
|
internalProperty,
|
||||||
LitElement,
|
LitElement,
|
||||||
property,
|
property,
|
||||||
internalProperty,
|
|
||||||
PropertyValues,
|
PropertyValues,
|
||||||
TemplateResult,
|
TemplateResult,
|
||||||
} from "lit-element";
|
} from "lit-element";
|
||||||
import "web-animations-js/web-animations-next-lite.min";
|
import "web-animations-js/web-animations-next-lite.min";
|
||||||
|
import "../../../../src/components/buttons/ha-progress-button";
|
||||||
import "../../../../src/components/ha-card";
|
import "../../../../src/components/ha-card";
|
||||||
import {
|
import {
|
||||||
HassioAddonDetails,
|
HassioAddonDetails,
|
||||||
@ -28,7 +29,6 @@ import { haStyle } from "../../../../src/resources/styles";
|
|||||||
import { HomeAssistant } from "../../../../src/types";
|
import { HomeAssistant } from "../../../../src/types";
|
||||||
import { suggestAddonRestart } from "../../dialogs/suggestAddonRestart";
|
import { suggestAddonRestart } from "../../dialogs/suggestAddonRestart";
|
||||||
import { hassioStyle } from "../../resources/hassio-style";
|
import { hassioStyle } from "../../resources/hassio-style";
|
||||||
import "../../../../src/components/buttons/ha-progress-button";
|
|
||||||
|
|
||||||
@customElement("hassio-addon-audio")
|
@customElement("hassio-addon-audio")
|
||||||
class HassioAddonAudio extends LitElement {
|
class HassioAddonAudio extends LitElement {
|
||||||
|
@ -7,11 +7,11 @@ import {
|
|||||||
property,
|
property,
|
||||||
TemplateResult,
|
TemplateResult,
|
||||||
} from "lit-element";
|
} from "lit-element";
|
||||||
|
import "../../../../src/components/ha-circular-progress";
|
||||||
import { HassioAddonDetails } from "../../../../src/data/hassio/addon";
|
import { HassioAddonDetails } from "../../../../src/data/hassio/addon";
|
||||||
import { haStyle } from "../../../../src/resources/styles";
|
import { haStyle } from "../../../../src/resources/styles";
|
||||||
import { HomeAssistant } from "../../../../src/types";
|
import { HomeAssistant } from "../../../../src/types";
|
||||||
import { hassioStyle } from "../../resources/hassio-style";
|
import { hassioStyle } from "../../resources/hassio-style";
|
||||||
import "../../../../src/components/ha-circular-progress";
|
|
||||||
import "./hassio-addon-audio";
|
import "./hassio-addon-audio";
|
||||||
import "./hassio-addon-config";
|
import "./hassio-addon-config";
|
||||||
import "./hassio-addon-network";
|
import "./hassio-addon-network";
|
||||||
|
@ -14,12 +14,12 @@ import {
|
|||||||
TemplateResult,
|
TemplateResult,
|
||||||
} from "lit-element";
|
} from "lit-element";
|
||||||
import memoizeOne from "memoize-one";
|
import memoizeOne from "memoize-one";
|
||||||
|
import "../../../src/components/ha-circular-progress";
|
||||||
import {
|
import {
|
||||||
fetchHassioAddonInfo,
|
fetchHassioAddonInfo,
|
||||||
HassioAddonDetails,
|
HassioAddonDetails,
|
||||||
} from "../../../src/data/hassio/addon";
|
} from "../../../src/data/hassio/addon";
|
||||||
import "../../../src/layouts/hass-tabs-subpage";
|
import "../../../src/layouts/hass-tabs-subpage";
|
||||||
import "../../../src/components/ha-circular-progress";
|
|
||||||
import type { PageNavigation } from "../../../src/layouts/hass-tabs-subpage";
|
import type { PageNavigation } from "../../../src/layouts/hass-tabs-subpage";
|
||||||
import { haStyle } from "../../../src/resources/styles";
|
import { haStyle } from "../../../src/resources/styles";
|
||||||
import { HomeAssistant, Route } from "../../../src/types";
|
import { HomeAssistant, Route } from "../../../src/types";
|
||||||
|
@ -7,8 +7,8 @@ import {
|
|||||||
property,
|
property,
|
||||||
TemplateResult,
|
TemplateResult,
|
||||||
} from "lit-element";
|
} from "lit-element";
|
||||||
import { HassioAddonDetails } from "../../../../src/data/hassio/addon";
|
|
||||||
import "../../../../src/components/ha-circular-progress";
|
import "../../../../src/components/ha-circular-progress";
|
||||||
|
import { HassioAddonDetails } from "../../../../src/data/hassio/addon";
|
||||||
import { haStyle } from "../../../../src/resources/styles";
|
import { haStyle } from "../../../../src/resources/styles";
|
||||||
import { HomeAssistant } from "../../../../src/types";
|
import { HomeAssistant } from "../../../../src/types";
|
||||||
import { hassioStyle } from "../../resources/hassio-style";
|
import { hassioStyle } from "../../resources/hassio-style";
|
||||||
|
@ -7,8 +7,8 @@ import {
|
|||||||
property,
|
property,
|
||||||
TemplateResult,
|
TemplateResult,
|
||||||
} from "lit-element";
|
} from "lit-element";
|
||||||
import { HassioAddonDetails } from "../../../../src/data/hassio/addon";
|
|
||||||
import "../../../../src/components/ha-circular-progress";
|
import "../../../../src/components/ha-circular-progress";
|
||||||
|
import { HassioAddonDetails } from "../../../../src/data/hassio/addon";
|
||||||
import { haStyle } from "../../../../src/resources/styles";
|
import { haStyle } from "../../../../src/resources/styles";
|
||||||
import { HomeAssistant } from "../../../../src/types";
|
import { HomeAssistant } from "../../../../src/types";
|
||||||
import { hassioStyle } from "../../resources/hassio-style";
|
import { hassioStyle } from "../../resources/hassio-style";
|
||||||
|
@ -3,9 +3,9 @@ import {
|
|||||||
CSSResult,
|
CSSResult,
|
||||||
customElement,
|
customElement,
|
||||||
html,
|
html,
|
||||||
|
internalProperty,
|
||||||
LitElement,
|
LitElement,
|
||||||
property,
|
property,
|
||||||
internalProperty,
|
|
||||||
TemplateResult,
|
TemplateResult,
|
||||||
} from "lit-element";
|
} from "lit-element";
|
||||||
import { createCloseHeading } from "../../../../src/components/ha-dialog";
|
import { createCloseHeading } from "../../../../src/components/ha-dialog";
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
|
// Compat needs to be first import
|
||||||
import "../../src/resources/compatibility";
|
import "../../src/resources/compatibility";
|
||||||
import "../../src/resources/safari-14-attachshadow-patch";
|
|
||||||
import "../../src/resources/roboto";
|
import "../../src/resources/roboto";
|
||||||
|
import "../../src/resources/safari-14-attachshadow-patch";
|
||||||
import "./hassio-main";
|
import "./hassio-main";
|
||||||
|
|
||||||
const styleEl = document.createElement("style");
|
const styleEl = document.createElement("style");
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
import { html, PropertyValues, customElement, property } from "lit-element";
|
import { customElement, html, property, PropertyValues } from "lit-element";
|
||||||
import "./hassio-router";
|
import { atLeastVersion } from "../../src/common/config/version";
|
||||||
import { HomeAssistant, Route } from "../../src/types";
|
|
||||||
import { HassioPanelInfo } from "../../src/data/hassio/supervisor";
|
|
||||||
import { applyThemesOnElement } from "../../src/common/dom/apply_themes_on_element";
|
import { applyThemesOnElement } from "../../src/common/dom/apply_themes_on_element";
|
||||||
import { fireEvent } from "../../src/common/dom/fire_event";
|
import { fireEvent } from "../../src/common/dom/fire_event";
|
||||||
|
import { HassioPanelInfo } from "../../src/data/hassio/supervisor";
|
||||||
import { makeDialogManager } from "../../src/dialogs/make-dialog-manager";
|
import { makeDialogManager } from "../../src/dialogs/make-dialog-manager";
|
||||||
import { atLeastVersion } from "../../src/common/config/version";
|
import { HomeAssistant, Route } from "../../src/types";
|
||||||
|
import "./hassio-router";
|
||||||
import { SupervisorBaseElement } from "./supervisor-base-element";
|
import { SupervisorBaseElement } from "./supervisor-base-element";
|
||||||
|
|
||||||
@customElement("hassio-main")
|
@customElement("hassio-main")
|
||||||
|
@ -1,14 +1,17 @@
|
|||||||
|
import { mdiMenu } from "@mdi/js";
|
||||||
import {
|
import {
|
||||||
css,
|
css,
|
||||||
CSSResult,
|
CSSResult,
|
||||||
customElement,
|
customElement,
|
||||||
html,
|
html,
|
||||||
|
internalProperty,
|
||||||
LitElement,
|
LitElement,
|
||||||
property,
|
property,
|
||||||
internalProperty,
|
|
||||||
PropertyValues,
|
PropertyValues,
|
||||||
TemplateResult,
|
TemplateResult,
|
||||||
} from "lit-element";
|
} from "lit-element";
|
||||||
|
import { fireEvent } from "../../../src/common/dom/fire_event";
|
||||||
|
import { navigate } from "../../../src/common/navigate";
|
||||||
import {
|
import {
|
||||||
fetchHassioAddonInfo,
|
fetchHassioAddonInfo,
|
||||||
HassioAddonDetails,
|
HassioAddonDetails,
|
||||||
@ -17,13 +20,10 @@ import {
|
|||||||
createHassioSession,
|
createHassioSession,
|
||||||
validateHassioSession,
|
validateHassioSession,
|
||||||
} from "../../../src/data/hassio/ingress";
|
} from "../../../src/data/hassio/ingress";
|
||||||
|
import { showAlertDialog } from "../../../src/dialogs/generic/show-dialog-box";
|
||||||
import "../../../src/layouts/hass-loading-screen";
|
import "../../../src/layouts/hass-loading-screen";
|
||||||
import "../../../src/layouts/hass-subpage";
|
import "../../../src/layouts/hass-subpage";
|
||||||
import { HomeAssistant, Route } from "../../../src/types";
|
import { HomeAssistant, Route } from "../../../src/types";
|
||||||
import { showAlertDialog } from "../../../src/dialogs/generic/show-dialog-box";
|
|
||||||
import { navigate } from "../../../src/common/navigate";
|
|
||||||
import { mdiMenu } from "@mdi/js";
|
|
||||||
import { fireEvent } from "../../../src/common/dom/fire_event";
|
|
||||||
|
|
||||||
@customElement("hassio-ingress-view")
|
@customElement("hassio-ingress-view")
|
||||||
class HassioIngressView extends LitElement {
|
class HassioIngressView extends LitElement {
|
||||||
|
@ -3,9 +3,9 @@ import {
|
|||||||
css,
|
css,
|
||||||
CSSResult,
|
CSSResult,
|
||||||
html,
|
html,
|
||||||
|
internalProperty,
|
||||||
LitElement,
|
LitElement,
|
||||||
property,
|
property,
|
||||||
internalProperty,
|
|
||||||
PropertyValues,
|
PropertyValues,
|
||||||
TemplateResult,
|
TemplateResult,
|
||||||
} from "lit-element";
|
} from "lit-element";
|
||||||
|
@ -2,15 +2,17 @@ import {
|
|||||||
css,
|
css,
|
||||||
CSSResult,
|
CSSResult,
|
||||||
html,
|
html,
|
||||||
|
internalProperty,
|
||||||
LitElement,
|
LitElement,
|
||||||
property,
|
property,
|
||||||
internalProperty,
|
|
||||||
PropertyValues,
|
PropertyValues,
|
||||||
} from "lit-element";
|
} from "lit-element";
|
||||||
|
import punycode from "punycode";
|
||||||
|
import { extractSearchParamsObject } from "../common/url/search-params";
|
||||||
import {
|
import {
|
||||||
AuthProvider,
|
AuthProvider,
|
||||||
fetchAuthProviders,
|
|
||||||
AuthUrlSearchParams,
|
AuthUrlSearchParams,
|
||||||
|
fetchAuthProviders,
|
||||||
} from "../data/auth";
|
} from "../data/auth";
|
||||||
import {
|
import {
|
||||||
DiscoveryInformation,
|
DiscoveryInformation,
|
||||||
@ -19,8 +21,6 @@ import {
|
|||||||
import { litLocalizeLiteMixin } from "../mixins/lit-localize-lite-mixin";
|
import { litLocalizeLiteMixin } from "../mixins/lit-localize-lite-mixin";
|
||||||
import { registerServiceWorker } from "../util/register-service-worker";
|
import { registerServiceWorker } from "../util/register-service-worker";
|
||||||
import "./ha-auth-flow";
|
import "./ha-auth-flow";
|
||||||
import { extractSearchParamsObject } from "../common/url/search-params";
|
|
||||||
import punycode from "punycode";
|
|
||||||
|
|
||||||
import("./ha-pick-auth-provider");
|
import("./ha-pick-auth-provider");
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { isComponentLoaded } from "./is_component_loaded";
|
|
||||||
import { PageNavigation } from "../../layouts/hass-tabs-subpage";
|
import { PageNavigation } from "../../layouts/hass-tabs-subpage";
|
||||||
import { HomeAssistant } from "../../types";
|
import { HomeAssistant } from "../../types";
|
||||||
|
import { isComponentLoaded } from "./is_component_loaded";
|
||||||
|
|
||||||
export const canShowPage = (hass: HomeAssistant, page: PageNavigation) => {
|
export const canShowPage = (hass: HomeAssistant, page: PageNavigation) => {
|
||||||
return (
|
return (
|
||||||
|
@ -3,9 +3,9 @@ import { UNAVAILABLE, UNKNOWN } from "../../data/entity";
|
|||||||
import { formatDate } from "../datetime/format_date";
|
import { formatDate } from "../datetime/format_date";
|
||||||
import { formatDateTime } from "../datetime/format_date_time";
|
import { formatDateTime } from "../datetime/format_date_time";
|
||||||
import { formatTime } from "../datetime/format_time";
|
import { formatTime } from "../datetime/format_time";
|
||||||
|
import { formatNumber } from "../string/format_number";
|
||||||
import { LocalizeFunc } from "../translations/localize";
|
import { LocalizeFunc } from "../translations/localize";
|
||||||
import { computeStateDomain } from "./compute_state_domain";
|
import { computeStateDomain } from "./compute_state_domain";
|
||||||
import { formatNumber } from "../string/format_number";
|
|
||||||
|
|
||||||
export const computeStateDisplay = (
|
export const computeStateDisplay = (
|
||||||
localize: LocalizeFunc,
|
localize: LocalizeFunc,
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
import { HassEntity } from "home-assistant-js-websocket";
|
import { HassEntity } from "home-assistant-js-websocket";
|
||||||
|
import { UNAVAILABLE } from "../../data/entity";
|
||||||
import { HomeAssistant } from "../../types";
|
import { HomeAssistant } from "../../types";
|
||||||
import { DOMAINS_WITH_CARD } from "../const";
|
import { DOMAINS_WITH_CARD } from "../const";
|
||||||
import { canToggleState } from "./can_toggle_state";
|
import { canToggleState } from "./can_toggle_state";
|
||||||
import { computeStateDomain } from "./compute_state_domain";
|
import { computeStateDomain } from "./compute_state_domain";
|
||||||
import { UNAVAILABLE } from "../../data/entity";
|
|
||||||
|
|
||||||
export const stateCardType = (hass: HomeAssistant, stateObj: HassEntity) => {
|
export const stateCardType = (hass: HomeAssistant, stateObj: HassEntity) => {
|
||||||
if (stateObj.state === UNAVAILABLE) {
|
if (stateObj.state === UNAVAILABLE) {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import Vibrant from "node-vibrant/lib/browser";
|
|
||||||
import MMCQ from "@vibrant/quantizer-mmcq";
|
|
||||||
import { BasicPipeline } from "@vibrant/core/lib/pipeline";
|
|
||||||
import { Swatch, Vec3 } from "@vibrant/color";
|
import { Swatch, Vec3 } from "@vibrant/color";
|
||||||
|
import { BasicPipeline } from "@vibrant/core/lib/pipeline";
|
||||||
|
import MMCQ from "@vibrant/quantizer-mmcq";
|
||||||
|
import Vibrant from "node-vibrant/lib/browser";
|
||||||
import { getRGBContrastRatio } from "../color/rgb";
|
import { getRGBContrastRatio } from "../color/rgb";
|
||||||
|
|
||||||
const CONTRAST_RATIO = 4.5;
|
const CONTRAST_RATIO = 4.5;
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
import "@material/mwc-icon-button/mwc-icon-button";
|
||||||
|
import { mdiClose, mdiMagnify } from "@mdi/js";
|
||||||
import "@polymer/paper-input/paper-input";
|
import "@polymer/paper-input/paper-input";
|
||||||
import {
|
import {
|
||||||
css,
|
css,
|
||||||
@ -10,8 +12,6 @@ import { html, TemplateResult } from "lit-html";
|
|||||||
import { classMap } from "lit-html/directives/class-map";
|
import { classMap } from "lit-html/directives/class-map";
|
||||||
import "../../components/ha-svg-icon";
|
import "../../components/ha-svg-icon";
|
||||||
import { fireEvent } from "../dom/fire_event";
|
import { fireEvent } from "../dom/fire_event";
|
||||||
import { mdiMagnify, mdiClose } from "@mdi/js";
|
|
||||||
import "@material/mwc-icon-button/mwc-icon-button";
|
|
||||||
|
|
||||||
@customElement("search-input")
|
@customElement("search-input")
|
||||||
class SearchInput extends LitElement {
|
class SearchInput extends LitElement {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import IntlMessageFormat from "intl-messageformat";
|
|
||||||
import { shouldPolyfill } from "@formatjs/intl-pluralrules/should-polyfill";
|
import { shouldPolyfill } from "@formatjs/intl-pluralrules/should-polyfill";
|
||||||
|
import IntlMessageFormat from "intl-messageformat";
|
||||||
import { Resources } from "../../types";
|
import { Resources } from "../../types";
|
||||||
|
|
||||||
export type LocalizeFunc = (key: string, ...args: any[]) => string;
|
export type LocalizeFunc = (key: string, ...args: any[]) => string;
|
||||||
|
@ -7,10 +7,9 @@ import {
|
|||||||
html,
|
html,
|
||||||
LitElement,
|
LitElement,
|
||||||
property,
|
property,
|
||||||
TemplateResult,
|
|
||||||
query,
|
query,
|
||||||
|
TemplateResult,
|
||||||
} from "lit-element";
|
} from "lit-element";
|
||||||
|
|
||||||
import "../ha-circular-progress";
|
import "../ha-circular-progress";
|
||||||
|
|
||||||
@customElement("ha-progress-button")
|
@customElement("ha-progress-button")
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
import { wrap } from "comlink";
|
import { wrap } from "comlink";
|
||||||
|
|
||||||
import type { api } from "./sort_filter_worker";
|
import type { api } from "./sort_filter_worker";
|
||||||
|
|
||||||
type FilterDataType = api["filterData"];
|
type FilterDataType = api["filterData"];
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
// @ts-nocheck
|
// @ts-nocheck
|
||||||
import Vue from "vue";
|
|
||||||
import wrap from "@vue/web-component-wrapper";
|
import wrap from "@vue/web-component-wrapper";
|
||||||
|
import { customElement } from "lit-element/lib/decorators";
|
||||||
|
import Vue from "vue";
|
||||||
import DateRangePicker from "vue2-daterange-picker";
|
import DateRangePicker from "vue2-daterange-picker";
|
||||||
import dateRangePickerStyles from "vue2-daterange-picker/dist/vue2-daterange-picker.css";
|
import dateRangePickerStyles from "vue2-daterange-picker/dist/vue2-daterange-picker.css";
|
||||||
import { fireEvent } from "../common/dom/fire_event";
|
import { fireEvent } from "../common/dom/fire_event";
|
||||||
import { Constructor } from "../types";
|
import { Constructor } from "../types";
|
||||||
import { customElement } from "lit-element/lib/decorators";
|
|
||||||
|
|
||||||
const Component = Vue.extend({
|
const Component = Vue.extend({
|
||||||
props: {
|
props: {
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import "@material/mwc-icon-button/mwc-icon-button";
|
|
||||||
import "@material/mwc-button/mwc-button";
|
import "@material/mwc-button/mwc-button";
|
||||||
|
import "@material/mwc-icon-button/mwc-icon-button";
|
||||||
|
import { mdiClose, mdiMenuDown, mdiMenuUp } from "@mdi/js";
|
||||||
import "@polymer/paper-input/paper-input";
|
import "@polymer/paper-input/paper-input";
|
||||||
import "@polymer/paper-item/paper-item";
|
import "@polymer/paper-item/paper-item";
|
||||||
import "@polymer/paper-item/paper-item-body";
|
import "@polymer/paper-item/paper-item-body";
|
||||||
@ -11,9 +12,9 @@ import {
|
|||||||
CSSResult,
|
CSSResult,
|
||||||
customElement,
|
customElement,
|
||||||
html,
|
html,
|
||||||
|
internalProperty,
|
||||||
LitElement,
|
LitElement,
|
||||||
property,
|
property,
|
||||||
internalProperty,
|
|
||||||
PropertyValues,
|
PropertyValues,
|
||||||
TemplateResult,
|
TemplateResult,
|
||||||
} from "lit-element";
|
} from "lit-element";
|
||||||
@ -37,9 +38,8 @@ import {
|
|||||||
import { SubscribeMixin } from "../../mixins/subscribe-mixin";
|
import { SubscribeMixin } from "../../mixins/subscribe-mixin";
|
||||||
import { PolymerChangedEvent } from "../../polymer-types";
|
import { PolymerChangedEvent } from "../../polymer-types";
|
||||||
import { HomeAssistant } from "../../types";
|
import { HomeAssistant } from "../../types";
|
||||||
import "./ha-devices-picker";
|
|
||||||
import "../ha-svg-icon";
|
import "../ha-svg-icon";
|
||||||
import { mdiClose, mdiMenuDown, mdiMenuUp } from "@mdi/js";
|
import "./ha-devices-picker";
|
||||||
|
|
||||||
interface DevicesByArea {
|
interface DevicesByArea {
|
||||||
[areaId: string]: AreaDevices;
|
[areaId: string]: AreaDevices;
|
||||||
|
@ -6,9 +6,9 @@ import {
|
|||||||
css,
|
css,
|
||||||
CSSResult,
|
CSSResult,
|
||||||
html,
|
html,
|
||||||
|
internalProperty,
|
||||||
LitElement,
|
LitElement,
|
||||||
property,
|
property,
|
||||||
internalProperty,
|
|
||||||
TemplateResult,
|
TemplateResult,
|
||||||
} from "lit-element";
|
} from "lit-element";
|
||||||
import { fireEvent } from "../../common/dom/fire_event";
|
import { fireEvent } from "../../common/dom/fire_event";
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import "../ha-svg-icon";
|
|
||||||
import "@material/mwc-icon-button/mwc-icon-button";
|
import "@material/mwc-icon-button/mwc-icon-button";
|
||||||
|
import { mdiClose, mdiMenuDown, mdiMenuUp } from "@mdi/js";
|
||||||
import "@polymer/paper-input/paper-input";
|
import "@polymer/paper-input/paper-input";
|
||||||
import "@polymer/paper-item/paper-item";
|
import "@polymer/paper-item/paper-item";
|
||||||
import "@polymer/paper-item/paper-item-body";
|
import "@polymer/paper-item/paper-item-body";
|
||||||
@ -38,7 +38,7 @@ import {
|
|||||||
import { SubscribeMixin } from "../../mixins/subscribe-mixin";
|
import { SubscribeMixin } from "../../mixins/subscribe-mixin";
|
||||||
import { PolymerChangedEvent } from "../../polymer-types";
|
import { PolymerChangedEvent } from "../../polymer-types";
|
||||||
import { HomeAssistant } from "../../types";
|
import { HomeAssistant } from "../../types";
|
||||||
import { mdiClose, mdiMenuUp, mdiMenuDown } from "@mdi/js";
|
import "../ha-svg-icon";
|
||||||
|
|
||||||
interface Device {
|
interface Device {
|
||||||
name: string;
|
name: string;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
|
import { customElement, html, LitElement, property } from "lit-element";
|
||||||
import { batteryIcon } from "../../common/entity/battery_icon";
|
import { batteryIcon } from "../../common/entity/battery_icon";
|
||||||
import "../ha-icon";
|
import "../ha-icon";
|
||||||
import { customElement, html, property, LitElement } from "lit-element";
|
|
||||||
|
|
||||||
@customElement("ha-battery-icon")
|
@customElement("ha-battery-icon")
|
||||||
export class HaBatteryIcon extends LitElement {
|
export class HaBatteryIcon extends LitElement {
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
import "@material/mwc-icon-button/mwc-icon-button";
|
||||||
import { mdiClose, mdiMenuDown, mdiMenuUp } from "@mdi/js";
|
import { mdiClose, mdiMenuDown, mdiMenuUp } from "@mdi/js";
|
||||||
import "@polymer/paper-input/paper-input";
|
import "@polymer/paper-input/paper-input";
|
||||||
import "@polymer/paper-item/paper-item";
|
import "@polymer/paper-item/paper-item";
|
||||||
@ -17,10 +18,9 @@ import {
|
|||||||
import { fireEvent } from "../../common/dom/fire_event";
|
import { fireEvent } from "../../common/dom/fire_event";
|
||||||
import { PolymerChangedEvent } from "../../polymer-types";
|
import { PolymerChangedEvent } from "../../polymer-types";
|
||||||
import { HomeAssistant } from "../../types";
|
import { HomeAssistant } from "../../types";
|
||||||
|
import { formatAttributeName } from "../../util/hass-attributes-util";
|
||||||
import "../ha-svg-icon";
|
import "../ha-svg-icon";
|
||||||
import "./state-badge";
|
import "./state-badge";
|
||||||
import { formatAttributeName } from "../../util/hass-attributes-util";
|
|
||||||
import "@material/mwc-icon-button/mwc-icon-button";
|
|
||||||
|
|
||||||
export type HaEntityPickerEntityFilterFunc = (entityId: HassEntity) => boolean;
|
export type HaEntityPickerEntityFilterFunc = (entityId: HassEntity) => boolean;
|
||||||
|
|
||||||
|
@ -1,21 +1,21 @@
|
|||||||
import "../ha-icon-button";
|
|
||||||
import { HassEntity } from "home-assistant-js-websocket";
|
import { HassEntity } from "home-assistant-js-websocket";
|
||||||
import {
|
import {
|
||||||
css,
|
css,
|
||||||
CSSResult,
|
CSSResult,
|
||||||
html,
|
html,
|
||||||
|
internalProperty,
|
||||||
LitElement,
|
LitElement,
|
||||||
property,
|
property,
|
||||||
internalProperty,
|
|
||||||
PropertyValues,
|
PropertyValues,
|
||||||
TemplateResult,
|
TemplateResult,
|
||||||
} from "lit-element";
|
} from "lit-element";
|
||||||
import { STATES_OFF } from "../../common/const";
|
import { STATES_OFF } from "../../common/const";
|
||||||
import { computeStateDomain } from "../../common/entity/compute_state_domain";
|
import { computeStateDomain } from "../../common/entity/compute_state_domain";
|
||||||
import { computeStateName } from "../../common/entity/compute_state_name";
|
import { computeStateName } from "../../common/entity/compute_state_name";
|
||||||
import { UNAVAILABLE_STATES, UNAVAILABLE } from "../../data/entity";
|
import { UNAVAILABLE, UNAVAILABLE_STATES } from "../../data/entity";
|
||||||
import { forwardHaptic } from "../../data/haptics";
|
import { forwardHaptic } from "../../data/haptics";
|
||||||
import { HomeAssistant } from "../../types";
|
import { HomeAssistant } from "../../types";
|
||||||
|
import "../ha-icon-button";
|
||||||
import "../ha-switch";
|
import "../ha-switch";
|
||||||
|
|
||||||
const isOn = (stateObj?: HassEntity) =>
|
const isOn = (stateObj?: HassEntity) =>
|
||||||
|
@ -4,9 +4,9 @@ import {
|
|||||||
CSSResult,
|
CSSResult,
|
||||||
customElement,
|
customElement,
|
||||||
html,
|
html,
|
||||||
|
internalProperty,
|
||||||
LitElement,
|
LitElement,
|
||||||
property,
|
property,
|
||||||
internalProperty,
|
|
||||||
PropertyValues,
|
PropertyValues,
|
||||||
TemplateResult,
|
TemplateResult,
|
||||||
} from "lit-element";
|
} from "lit-element";
|
||||||
@ -18,10 +18,10 @@ import { computeStateName } from "../../common/entity/compute_state_name";
|
|||||||
import { domainIcon } from "../../common/entity/domain_icon";
|
import { domainIcon } from "../../common/entity/domain_icon";
|
||||||
import { stateIcon } from "../../common/entity/state_icon";
|
import { stateIcon } from "../../common/entity/state_icon";
|
||||||
import { timerTimeRemaining } from "../../common/entity/timer_time_remaining";
|
import { timerTimeRemaining } from "../../common/entity/timer_time_remaining";
|
||||||
|
import { formatNumber } from "../../common/string/format_number";
|
||||||
|
import { UNAVAILABLE, UNKNOWN } from "../../data/entity";
|
||||||
import { HomeAssistant } from "../../types";
|
import { HomeAssistant } from "../../types";
|
||||||
import "../ha-label-badge";
|
import "../ha-label-badge";
|
||||||
import { UNAVAILABLE, UNKNOWN } from "../../data/entity";
|
|
||||||
import { formatNumber } from "../../common/string/format_number";
|
|
||||||
|
|
||||||
@customElement("ha-state-label-badge")
|
@customElement("ha-state-label-badge")
|
||||||
export class HaStateLabelBadge extends LitElement {
|
export class HaStateLabelBadge extends LitElement {
|
||||||
|
@ -11,14 +11,11 @@ import {
|
|||||||
} from "lit-element";
|
} from "lit-element";
|
||||||
import { ifDefined } from "lit-html/directives/if-defined";
|
import { ifDefined } from "lit-html/directives/if-defined";
|
||||||
import { styleMap } from "lit-html/directives/style-map";
|
import { styleMap } from "lit-html/directives/style-map";
|
||||||
|
|
||||||
import { computeActiveState } from "../../common/entity/compute_active_state";
|
import { computeActiveState } from "../../common/entity/compute_active_state";
|
||||||
import { computeStateDomain } from "../../common/entity/compute_state_domain";
|
import { computeStateDomain } from "../../common/entity/compute_state_domain";
|
||||||
import { stateIcon } from "../../common/entity/state_icon";
|
import { stateIcon } from "../../common/entity/state_icon";
|
||||||
import { iconColorCSS } from "../../common/style/icon_color_css";
|
import { iconColorCSS } from "../../common/style/icon_color_css";
|
||||||
|
|
||||||
import type { HomeAssistant } from "../../types";
|
import type { HomeAssistant } from "../../types";
|
||||||
|
|
||||||
import "../ha-icon";
|
import "../ha-icon";
|
||||||
|
|
||||||
export class StateBadge extends LitElement {
|
export class StateBadge extends LitElement {
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import "@polymer/paper-tooltip/paper-tooltip";
|
import "@polymer/paper-tooltip/paper-tooltip";
|
||||||
|
import type { HassEntity } from "home-assistant-js-websocket";
|
||||||
import {
|
import {
|
||||||
css,
|
css,
|
||||||
CSSResult,
|
CSSResult,
|
||||||
@ -8,12 +9,9 @@ import {
|
|||||||
property,
|
property,
|
||||||
TemplateResult,
|
TemplateResult,
|
||||||
} from "lit-element";
|
} from "lit-element";
|
||||||
import type { HassEntity } from "home-assistant-js-websocket";
|
|
||||||
|
|
||||||
import { computeStateName } from "../../common/entity/compute_state_name";
|
import { computeStateName } from "../../common/entity/compute_state_name";
|
||||||
import { computeRTL } from "../../common/util/compute_rtl";
|
import { computeRTL } from "../../common/util/compute_rtl";
|
||||||
import type { HomeAssistant } from "../../types";
|
import type { HomeAssistant } from "../../types";
|
||||||
|
|
||||||
import "../ha-relative-time";
|
import "../ha-relative-time";
|
||||||
import "./state-badge";
|
import "./state-badge";
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import "./ha-svg-icon";
|
|
||||||
import "@material/mwc-icon-button/mwc-icon-button";
|
import "@material/mwc-icon-button/mwc-icon-button";
|
||||||
|
import { mdiClose, mdiMenuDown, mdiMenuUp } from "@mdi/js";
|
||||||
import "@polymer/paper-input/paper-input";
|
import "@polymer/paper-input/paper-input";
|
||||||
import "@polymer/paper-item/paper-item";
|
import "@polymer/paper-item/paper-item";
|
||||||
import "@polymer/paper-item/paper-item-body";
|
import "@polymer/paper-item/paper-item-body";
|
||||||
@ -11,27 +11,21 @@ import {
|
|||||||
CSSResult,
|
CSSResult,
|
||||||
customElement,
|
customElement,
|
||||||
html,
|
html,
|
||||||
|
internalProperty,
|
||||||
LitElement,
|
LitElement,
|
||||||
property,
|
property,
|
||||||
internalProperty,
|
|
||||||
TemplateResult,
|
|
||||||
PropertyValues,
|
PropertyValues,
|
||||||
query,
|
query,
|
||||||
|
TemplateResult,
|
||||||
} from "lit-element";
|
} from "lit-element";
|
||||||
|
import memoizeOne from "memoize-one";
|
||||||
import { fireEvent } from "../common/dom/fire_event";
|
import { fireEvent } from "../common/dom/fire_event";
|
||||||
|
import { computeDomain } from "../common/entity/compute_domain";
|
||||||
import {
|
import {
|
||||||
AreaRegistryEntry,
|
AreaRegistryEntry,
|
||||||
createAreaRegistryEntry,
|
createAreaRegistryEntry,
|
||||||
subscribeAreaRegistry,
|
subscribeAreaRegistry,
|
||||||
} from "../data/area_registry";
|
} from "../data/area_registry";
|
||||||
import {
|
|
||||||
showAlertDialog,
|
|
||||||
showPromptDialog,
|
|
||||||
} from "../dialogs/generic/show-dialog-box";
|
|
||||||
import { SubscribeMixin } from "../mixins/subscribe-mixin";
|
|
||||||
import { PolymerChangedEvent } from "../polymer-types";
|
|
||||||
import { HomeAssistant } from "../types";
|
|
||||||
import memoizeOne from "memoize-one";
|
|
||||||
import {
|
import {
|
||||||
DeviceEntityLookup,
|
DeviceEntityLookup,
|
||||||
DeviceRegistryEntry,
|
DeviceRegistryEntry,
|
||||||
@ -41,9 +35,15 @@ import {
|
|||||||
EntityRegistryEntry,
|
EntityRegistryEntry,
|
||||||
subscribeEntityRegistry,
|
subscribeEntityRegistry,
|
||||||
} from "../data/entity_registry";
|
} from "../data/entity_registry";
|
||||||
import { computeDomain } from "../common/entity/compute_domain";
|
import {
|
||||||
|
showAlertDialog,
|
||||||
|
showPromptDialog,
|
||||||
|
} from "../dialogs/generic/show-dialog-box";
|
||||||
|
import { SubscribeMixin } from "../mixins/subscribe-mixin";
|
||||||
|
import { PolymerChangedEvent } from "../polymer-types";
|
||||||
|
import { HomeAssistant } from "../types";
|
||||||
import type { HaDevicePickerDeviceFilterFunc } from "./device/ha-device-picker";
|
import type { HaDevicePickerDeviceFilterFunc } from "./device/ha-device-picker";
|
||||||
import { mdiClose, mdiMenuDown, mdiMenuUp } from "@mdi/js";
|
import "./ha-svg-icon";
|
||||||
|
|
||||||
const rowRenderer = (
|
const rowRenderer = (
|
||||||
root: HTMLElement,
|
root: HTMLElement,
|
||||||
|
@ -7,7 +7,6 @@ import {
|
|||||||
svg,
|
svg,
|
||||||
TemplateResult,
|
TemplateResult,
|
||||||
} from "lit-element";
|
} from "lit-element";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
getValueInPercentage,
|
getValueInPercentage,
|
||||||
normalize,
|
normalize,
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
import "@material/mwc-button/mwc-button";
|
||||||
import "@material/mwc-icon-button/mwc-icon-button";
|
import "@material/mwc-icon-button/mwc-icon-button";
|
||||||
import {
|
import {
|
||||||
css,
|
css,
|
||||||
@ -11,7 +12,6 @@ import {
|
|||||||
import { fireEvent } from "../common/dom/fire_event";
|
import { fireEvent } from "../common/dom/fire_event";
|
||||||
import type { ToggleButton } from "../types";
|
import type { ToggleButton } from "../types";
|
||||||
import "./ha-svg-icon";
|
import "./ha-svg-icon";
|
||||||
import "@material/mwc-button/mwc-button";
|
|
||||||
|
|
||||||
@customElement("ha-button-toggle-group")
|
@customElement("ha-button-toggle-group")
|
||||||
export class HaButtonToggleGroup extends LitElement {
|
export class HaButtonToggleGroup extends LitElement {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { customElement, property } from "lit-element";
|
|
||||||
import { CircularProgress } from "@material/mwc-circular-progress";
|
import { CircularProgress } from "@material/mwc-circular-progress";
|
||||||
|
import { customElement, property } from "lit-element";
|
||||||
|
|
||||||
@customElement("ha-circular-progress")
|
@customElement("ha-circular-progress")
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
import "@polymer/iron-flex-layout/iron-flex-layout-classes";
|
import "@polymer/iron-flex-layout/iron-flex-layout-classes";
|
||||||
import "./ha-icon-button";
|
|
||||||
import { html } from "@polymer/polymer/lib/utils/html-tag";
|
import { html } from "@polymer/polymer/lib/utils/html-tag";
|
||||||
/* eslint-plugin-disable lit */
|
/* eslint-plugin-disable lit */
|
||||||
import { PolymerElement } from "@polymer/polymer/polymer-element";
|
import { PolymerElement } from "@polymer/polymer/polymer-element";
|
||||||
import { EventsMixin } from "../mixins/events-mixin";
|
import { EventsMixin } from "../mixins/events-mixin";
|
||||||
|
import "./ha-icon-button";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @appliesMixin EventsMixin
|
* @appliesMixin EventsMixin
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
import { HassEntity } from "home-assistant-js-websocket";
|
||||||
import {
|
import {
|
||||||
css,
|
css,
|
||||||
CSSResult,
|
CSSResult,
|
||||||
@ -7,11 +8,9 @@ import {
|
|||||||
property,
|
property,
|
||||||
TemplateResult,
|
TemplateResult,
|
||||||
} from "lit-element";
|
} from "lit-element";
|
||||||
import { HassEntity } from "home-assistant-js-websocket";
|
import { formatNumber } from "../common/string/format_number";
|
||||||
|
|
||||||
import { CLIMATE_PRESET_NONE } from "../data/climate";
|
import { CLIMATE_PRESET_NONE } from "../data/climate";
|
||||||
import type { HomeAssistant } from "../types";
|
import type { HomeAssistant } from "../types";
|
||||||
import { formatNumber } from "../common/string/format_number";
|
|
||||||
|
|
||||||
@customElement("ha-climate-state")
|
@customElement("ha-climate-state")
|
||||||
class HaClimateState extends LitElement {
|
class HaClimateState extends LitElement {
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
import "./ha-icon-button";
|
|
||||||
import "@polymer/paper-input/paper-input";
|
import "@polymer/paper-input/paper-input";
|
||||||
import "@polymer/paper-item/paper-item";
|
import "@polymer/paper-item/paper-item";
|
||||||
import { html } from "@polymer/polymer/lib/utils/html-tag";
|
import { html } from "@polymer/polymer/lib/utils/html-tag";
|
||||||
@ -6,6 +5,7 @@ import { html } from "@polymer/polymer/lib/utils/html-tag";
|
|||||||
import { PolymerElement } from "@polymer/polymer/polymer-element";
|
import { PolymerElement } from "@polymer/polymer/polymer-element";
|
||||||
import "@vaadin/vaadin-combo-box/theme/material/vaadin-combo-box-light";
|
import "@vaadin/vaadin-combo-box/theme/material/vaadin-combo-box-light";
|
||||||
import { EventsMixin } from "../mixins/events-mixin";
|
import { EventsMixin } from "../mixins/events-mixin";
|
||||||
|
import "./ha-icon-button";
|
||||||
|
|
||||||
class HaComboBox extends EventsMixin(PolymerElement) {
|
class HaComboBox extends EventsMixin(PolymerElement) {
|
||||||
static get template() {
|
static get template() {
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
import type { HassEntity } from "home-assistant-js-websocket";
|
||||||
import {
|
import {
|
||||||
css,
|
css,
|
||||||
CSSResult,
|
CSSResult,
|
||||||
@ -10,14 +11,11 @@ import {
|
|||||||
TemplateResult,
|
TemplateResult,
|
||||||
} from "lit-element";
|
} from "lit-element";
|
||||||
import { classMap } from "lit-html/directives/class-map";
|
import { classMap } from "lit-html/directives/class-map";
|
||||||
import type { HassEntity } from "home-assistant-js-websocket";
|
|
||||||
|
|
||||||
import type { HomeAssistant } from "../types";
|
|
||||||
import { UNAVAILABLE } from "../data/entity";
|
|
||||||
import CoverEntity from "../util/cover-model";
|
|
||||||
|
|
||||||
import "./ha-icon-button";
|
|
||||||
import { computeCloseIcon, computeOpenIcon } from "../common/entity/cover_icon";
|
import { computeCloseIcon, computeOpenIcon } from "../common/entity/cover_icon";
|
||||||
|
import { UNAVAILABLE } from "../data/entity";
|
||||||
|
import type { HomeAssistant } from "../types";
|
||||||
|
import CoverEntity from "../util/cover-model";
|
||||||
|
import "./ha-icon-button";
|
||||||
|
|
||||||
@customElement("ha-cover-controls")
|
@customElement("ha-cover-controls")
|
||||||
class HaCoverControls extends LitElement {
|
class HaCoverControls extends LitElement {
|
||||||
|
@ -1,21 +1,19 @@
|
|||||||
import { HassEntity } from "home-assistant-js-websocket";
|
import { HassEntity } from "home-assistant-js-websocket";
|
||||||
import {
|
import {
|
||||||
|
css,
|
||||||
|
CSSResult,
|
||||||
|
customElement,
|
||||||
|
html,
|
||||||
|
internalProperty,
|
||||||
LitElement,
|
LitElement,
|
||||||
property,
|
property,
|
||||||
internalProperty,
|
|
||||||
CSSResult,
|
|
||||||
css,
|
|
||||||
customElement,
|
|
||||||
TemplateResult,
|
|
||||||
html,
|
|
||||||
PropertyValues,
|
PropertyValues,
|
||||||
|
TemplateResult,
|
||||||
} from "lit-element";
|
} from "lit-element";
|
||||||
import { classMap } from "lit-html/directives/class-map";
|
import { classMap } from "lit-html/directives/class-map";
|
||||||
|
|
||||||
import { UNAVAILABLE } from "../data/entity";
|
import { UNAVAILABLE } from "../data/entity";
|
||||||
import { HomeAssistant } from "../types";
|
import { HomeAssistant } from "../types";
|
||||||
import CoverEntity from "../util/cover-model";
|
import CoverEntity from "../util/cover-model";
|
||||||
|
|
||||||
import "./ha-icon-button";
|
import "./ha-icon-button";
|
||||||
|
|
||||||
@customElement("ha-cover-tilt-controls")
|
@customElement("ha-cover-tilt-controls")
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
import "@material/mwc-button/mwc-button";
|
||||||
|
import "@material/mwc-list/mwc-list";
|
||||||
|
import { ActionDetail } from "@material/mwc-list/mwc-list-foundation";
|
||||||
|
import "@material/mwc-list/mwc-list-item";
|
||||||
|
import { mdiCalendar } from "@mdi/js";
|
||||||
|
import "@polymer/paper-input/paper-input";
|
||||||
import {
|
import {
|
||||||
css,
|
css,
|
||||||
CSSResult,
|
CSSResult,
|
||||||
@ -5,20 +11,14 @@ import {
|
|||||||
html,
|
html,
|
||||||
LitElement,
|
LitElement,
|
||||||
property,
|
property,
|
||||||
TemplateResult,
|
|
||||||
PropertyValues,
|
PropertyValues,
|
||||||
|
TemplateResult,
|
||||||
} from "lit-element";
|
} from "lit-element";
|
||||||
import { HomeAssistant } from "../types";
|
|
||||||
import { mdiCalendar } from "@mdi/js";
|
|
||||||
import { formatDateTime } from "../common/datetime/format_date_time";
|
import { formatDateTime } from "../common/datetime/format_date_time";
|
||||||
import "@material/mwc-button/mwc-button";
|
|
||||||
import "@material/mwc-list/mwc-list-item";
|
|
||||||
import "./ha-svg-icon";
|
|
||||||
import "@polymer/paper-input/paper-input";
|
|
||||||
import "@material/mwc-list/mwc-list";
|
|
||||||
import "./date-range-picker";
|
|
||||||
import { computeRTLDirection } from "../common/util/compute_rtl";
|
import { computeRTLDirection } from "../common/util/compute_rtl";
|
||||||
import { ActionDetail } from "@material/mwc-list/mwc-list-foundation";
|
import { HomeAssistant } from "../types";
|
||||||
|
import "./date-range-picker";
|
||||||
|
import "./ha-svg-icon";
|
||||||
|
|
||||||
export interface DateRangePickerRanges {
|
export interface DateRangePickerRanges {
|
||||||
[key: string]: [Date, Date];
|
[key: string]: [Date, Date];
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
import { mdiChevronDown } from "@mdi/js";
|
||||||
import {
|
import {
|
||||||
css,
|
css,
|
||||||
CSSResult,
|
CSSResult,
|
||||||
@ -8,10 +9,9 @@ import {
|
|||||||
query,
|
query,
|
||||||
TemplateResult,
|
TemplateResult,
|
||||||
} from "lit-element";
|
} from "lit-element";
|
||||||
|
import { classMap } from "lit-html/directives/class-map";
|
||||||
import { fireEvent } from "../common/dom/fire_event";
|
import { fireEvent } from "../common/dom/fire_event";
|
||||||
import "./ha-svg-icon";
|
import "./ha-svg-icon";
|
||||||
import { mdiChevronDown } from "@mdi/js";
|
|
||||||
import { classMap } from "lit-html/directives/class-map";
|
|
||||||
|
|
||||||
@customElement("ha-expansion-panel")
|
@customElement("ha-expansion-panel")
|
||||||
class HaExpansionPanel extends LitElement {
|
class HaExpansionPanel extends LitElement {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import type { Fab } from "@material/mwc-fab";
|
|
||||||
import "@material/mwc-fab";
|
import "@material/mwc-fab";
|
||||||
|
import type { Fab } from "@material/mwc-fab";
|
||||||
import { customElement } from "lit-element";
|
import { customElement } from "lit-element";
|
||||||
import { Constructor } from "../types";
|
import { Constructor } from "../types";
|
||||||
|
|
||||||
|
@ -1,15 +1,15 @@
|
|||||||
import {
|
import {
|
||||||
|
css,
|
||||||
|
CSSResult,
|
||||||
customElement,
|
customElement,
|
||||||
html,
|
html,
|
||||||
LitElement,
|
LitElement,
|
||||||
property,
|
property,
|
||||||
TemplateResult,
|
|
||||||
CSSResult,
|
|
||||||
css,
|
|
||||||
PropertyValues,
|
PropertyValues,
|
||||||
|
TemplateResult,
|
||||||
} from "lit-element";
|
} from "lit-element";
|
||||||
import { HaFormElement, HaFormConstantSchema } from "./ha-form";
|
|
||||||
import { fireEvent } from "../../common/dom/fire_event";
|
import { fireEvent } from "../../common/dom/fire_event";
|
||||||
|
import { HaFormConstantSchema, HaFormElement } from "./ha-form";
|
||||||
|
|
||||||
@customElement("ha-form-constant")
|
@customElement("ha-form-constant")
|
||||||
export class HaFormConstant extends LitElement implements HaFormElement {
|
export class HaFormConstant extends LitElement implements HaFormElement {
|
||||||
|
@ -9,19 +9,19 @@ import {
|
|||||||
CSSResult,
|
CSSResult,
|
||||||
customElement,
|
customElement,
|
||||||
html,
|
html,
|
||||||
|
internalProperty,
|
||||||
LitElement,
|
LitElement,
|
||||||
property,
|
property,
|
||||||
internalProperty,
|
|
||||||
query,
|
query,
|
||||||
TemplateResult,
|
TemplateResult,
|
||||||
} from "lit-element";
|
} from "lit-element";
|
||||||
import { fireEvent } from "../../common/dom/fire_event";
|
import { fireEvent } from "../../common/dom/fire_event";
|
||||||
|
import "../ha-icon";
|
||||||
import {
|
import {
|
||||||
HaFormElement,
|
HaFormElement,
|
||||||
HaFormMultiSelectData,
|
HaFormMultiSelectData,
|
||||||
HaFormMultiSelectSchema,
|
HaFormMultiSelectSchema,
|
||||||
} from "./ha-form";
|
} from "./ha-form";
|
||||||
import "../ha-icon";
|
|
||||||
|
|
||||||
@customElement("ha-form-multi_select")
|
@customElement("ha-form-multi_select")
|
||||||
export class HaFormMultiSelect extends LitElement implements HaFormElement {
|
export class HaFormMultiSelect extends LitElement implements HaFormElement {
|
||||||
|
@ -1,16 +1,16 @@
|
|||||||
import "../ha-icon-button";
|
|
||||||
import "@polymer/paper-input/paper-input";
|
import "@polymer/paper-input/paper-input";
|
||||||
import type { PaperInputElement } from "@polymer/paper-input/paper-input";
|
import type { PaperInputElement } from "@polymer/paper-input/paper-input";
|
||||||
import {
|
import {
|
||||||
customElement,
|
customElement,
|
||||||
html,
|
html,
|
||||||
|
internalProperty,
|
||||||
LitElement,
|
LitElement,
|
||||||
property,
|
property,
|
||||||
internalProperty,
|
|
||||||
query,
|
query,
|
||||||
TemplateResult,
|
TemplateResult,
|
||||||
} from "lit-element";
|
} from "lit-element";
|
||||||
import { fireEvent } from "../../common/dom/fire_event";
|
import { fireEvent } from "../../common/dom/fire_event";
|
||||||
|
import "../ha-icon-button";
|
||||||
import type {
|
import type {
|
||||||
HaFormElement,
|
HaFormElement,
|
||||||
HaFormStringData,
|
HaFormStringData,
|
||||||
|
@ -9,13 +9,13 @@ import {
|
|||||||
import { dynamicElement } from "../../common/dom/dynamic-element-directive";
|
import { dynamicElement } from "../../common/dom/dynamic-element-directive";
|
||||||
import { fireEvent } from "../../common/dom/fire_event";
|
import { fireEvent } from "../../common/dom/fire_event";
|
||||||
import "./ha-form-boolean";
|
import "./ha-form-boolean";
|
||||||
|
import "./ha-form-constant";
|
||||||
import "./ha-form-float";
|
import "./ha-form-float";
|
||||||
import "./ha-form-integer";
|
import "./ha-form-integer";
|
||||||
import "./ha-form-multi_select";
|
import "./ha-form-multi_select";
|
||||||
import "./ha-form-positive_time_period_dict";
|
import "./ha-form-positive_time_period_dict";
|
||||||
import "./ha-form-select";
|
import "./ha-form-select";
|
||||||
import "./ha-form-string";
|
import "./ha-form-string";
|
||||||
import "./ha-form-constant";
|
|
||||||
|
|
||||||
export type HaFormSchema =
|
export type HaFormSchema =
|
||||||
| HaFormConstantSchema
|
| HaFormConstantSchema
|
||||||
|
@ -1,18 +1,17 @@
|
|||||||
import {
|
import {
|
||||||
LitElement,
|
|
||||||
svg,
|
|
||||||
customElement,
|
|
||||||
css,
|
css,
|
||||||
property,
|
customElement,
|
||||||
internalProperty,
|
internalProperty,
|
||||||
|
LitElement,
|
||||||
|
property,
|
||||||
PropertyValues,
|
PropertyValues,
|
||||||
|
svg,
|
||||||
} from "lit-element";
|
} from "lit-element";
|
||||||
import { styleMap } from "lit-html/directives/style-map";
|
|
||||||
import { afterNextRender } from "../common/util/render-status";
|
|
||||||
import { ifDefined } from "lit-html/directives/if-defined";
|
import { ifDefined } from "lit-html/directives/if-defined";
|
||||||
|
import { styleMap } from "lit-html/directives/style-map";
|
||||||
import { getValueInPercentage, normalize } from "../util/calculate";
|
|
||||||
import { formatNumber } from "../common/string/format_number";
|
import { formatNumber } from "../common/string/format_number";
|
||||||
|
import { afterNextRender } from "../common/util/render-status";
|
||||||
|
import { getValueInPercentage, normalize } from "../util/calculate";
|
||||||
|
|
||||||
const getAngle = (value: number, min: number, max: number) => {
|
const getAngle = (value: number, min: number, max: number) => {
|
||||||
const percentage = getValueInPercentage(normalize(value, min, max), min, max);
|
const percentage = getValueInPercentage(normalize(value, min, max), min, max);
|
||||||
|
@ -1,15 +1,15 @@
|
|||||||
|
import "@material/mwc-icon-button/mwc-icon-button";
|
||||||
|
import { mdiArrowLeft, mdiArrowRight } from "@mdi/js";
|
||||||
import {
|
import {
|
||||||
|
customElement,
|
||||||
|
html,
|
||||||
|
internalProperty,
|
||||||
LitElement,
|
LitElement,
|
||||||
property,
|
property,
|
||||||
internalProperty,
|
|
||||||
TemplateResult,
|
TemplateResult,
|
||||||
html,
|
|
||||||
customElement,
|
|
||||||
} from "lit-element";
|
} from "lit-element";
|
||||||
import { mdiArrowLeft, mdiArrowRight } from "@mdi/js";
|
|
||||||
import "@material/mwc-icon-button/mwc-icon-button";
|
|
||||||
import "./ha-svg-icon";
|
|
||||||
import { HomeAssistant } from "../types";
|
import { HomeAssistant } from "../types";
|
||||||
|
import "./ha-svg-icon";
|
||||||
|
|
||||||
@customElement("ha-icon-button-arrow-next")
|
@customElement("ha-icon-button-arrow-next")
|
||||||
export class HaIconButtonArrowNext extends LitElement {
|
export class HaIconButtonArrowNext extends LitElement {
|
||||||
|
@ -1,15 +1,15 @@
|
|||||||
|
import "@material/mwc-icon-button/mwc-icon-button";
|
||||||
|
import { mdiArrowLeft, mdiArrowRight } from "@mdi/js";
|
||||||
import {
|
import {
|
||||||
|
customElement,
|
||||||
|
html,
|
||||||
|
internalProperty,
|
||||||
LitElement,
|
LitElement,
|
||||||
property,
|
property,
|
||||||
internalProperty,
|
|
||||||
TemplateResult,
|
TemplateResult,
|
||||||
html,
|
|
||||||
customElement,
|
|
||||||
} from "lit-element";
|
} from "lit-element";
|
||||||
import { mdiArrowLeft, mdiArrowRight } from "@mdi/js";
|
|
||||||
import "@material/mwc-icon-button/mwc-icon-button";
|
|
||||||
import "./ha-svg-icon";
|
|
||||||
import { HomeAssistant } from "../types";
|
import { HomeAssistant } from "../types";
|
||||||
|
import "./ha-svg-icon";
|
||||||
|
|
||||||
@customElement("ha-icon-button-arrow-prev")
|
@customElement("ha-icon-button-arrow-prev")
|
||||||
export class HaIconButtonArrowPrev extends LitElement {
|
export class HaIconButtonArrowPrev extends LitElement {
|
||||||
|
@ -1,15 +1,15 @@
|
|||||||
|
import "@material/mwc-icon-button";
|
||||||
|
import { mdiChevronLeft, mdiChevronRight } from "@mdi/js";
|
||||||
import {
|
import {
|
||||||
|
customElement,
|
||||||
|
html,
|
||||||
|
internalProperty,
|
||||||
LitElement,
|
LitElement,
|
||||||
property,
|
property,
|
||||||
internalProperty,
|
|
||||||
TemplateResult,
|
TemplateResult,
|
||||||
html,
|
|
||||||
customElement,
|
|
||||||
} from "lit-element";
|
} from "lit-element";
|
||||||
import { mdiChevronRight, mdiChevronLeft } from "@mdi/js";
|
|
||||||
import "@material/mwc-icon-button";
|
|
||||||
import "./ha-svg-icon";
|
|
||||||
import { HomeAssistant } from "../types";
|
import { HomeAssistant } from "../types";
|
||||||
|
import "./ha-svg-icon";
|
||||||
|
|
||||||
@customElement("ha-icon-button-next")
|
@customElement("ha-icon-button-next")
|
||||||
export class HaIconButtonNext extends LitElement {
|
export class HaIconButtonNext extends LitElement {
|
||||||
|
@ -1,15 +1,15 @@
|
|||||||
|
import "@material/mwc-icon-button/mwc-icon-button";
|
||||||
|
import { mdiChevronLeft, mdiChevronRight } from "@mdi/js";
|
||||||
import {
|
import {
|
||||||
|
customElement,
|
||||||
|
html,
|
||||||
|
internalProperty,
|
||||||
LitElement,
|
LitElement,
|
||||||
property,
|
property,
|
||||||
internalProperty,
|
|
||||||
TemplateResult,
|
TemplateResult,
|
||||||
html,
|
|
||||||
customElement,
|
|
||||||
} from "lit-element";
|
} from "lit-element";
|
||||||
import { mdiChevronRight, mdiChevronLeft } from "@mdi/js";
|
|
||||||
import "@material/mwc-icon-button/mwc-icon-button";
|
|
||||||
import "./ha-svg-icon";
|
|
||||||
import { HomeAssistant } from "../types";
|
import { HomeAssistant } from "../types";
|
||||||
|
import "./ha-svg-icon";
|
||||||
|
|
||||||
@customElement("ha-icon-button-prev")
|
@customElement("ha-icon-button-prev")
|
||||||
export class HaIconButtonPrev extends LitElement {
|
export class HaIconButtonPrev extends LitElement {
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
import "@material/mwc-icon-button";
|
import "@material/mwc-icon-button";
|
||||||
import {
|
import {
|
||||||
|
css,
|
||||||
|
CSSResult,
|
||||||
customElement,
|
customElement,
|
||||||
html,
|
html,
|
||||||
TemplateResult,
|
|
||||||
property,
|
|
||||||
LitElement,
|
LitElement,
|
||||||
CSSResult,
|
property,
|
||||||
css,
|
TemplateResult,
|
||||||
} from "lit-element";
|
} from "lit-element";
|
||||||
import "./ha-icon";
|
import "./ha-icon";
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
|
import { mdiChevronLeft, mdiChevronRight } from "@mdi/js";
|
||||||
import { HaSvgIcon } from "./ha-svg-icon";
|
import { HaSvgIcon } from "./ha-svg-icon";
|
||||||
import { mdiChevronRight, mdiChevronLeft } from "@mdi/js";
|
|
||||||
|
|
||||||
export class HaIconNext extends HaSvgIcon {
|
export class HaIconNext extends HaSvgIcon {
|
||||||
public connectedCallback() {
|
public connectedCallback() {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
|
import { mdiChevronLeft, mdiChevronRight } from "@mdi/js";
|
||||||
import { HaSvgIcon } from "./ha-svg-icon";
|
import { HaSvgIcon } from "./ha-svg-icon";
|
||||||
import { mdiChevronRight, mdiChevronLeft } from "@mdi/js";
|
|
||||||
|
|
||||||
export class HaIconPrev extends HaSvgIcon {
|
export class HaIconPrev extends HaSvgIcon {
|
||||||
public connectedCallback() {
|
public connectedCallback() {
|
||||||
|
@ -1,28 +1,28 @@
|
|||||||
import "@polymer/iron-icon/iron-icon";
|
import "@polymer/iron-icon/iron-icon";
|
||||||
import {
|
import {
|
||||||
customElement,
|
|
||||||
LitElement,
|
|
||||||
property,
|
|
||||||
internalProperty,
|
|
||||||
PropertyValues,
|
|
||||||
html,
|
|
||||||
TemplateResult,
|
|
||||||
css,
|
css,
|
||||||
CSSResult,
|
CSSResult,
|
||||||
|
customElement,
|
||||||
|
html,
|
||||||
|
internalProperty,
|
||||||
|
LitElement,
|
||||||
|
property,
|
||||||
|
PropertyValues,
|
||||||
|
TemplateResult,
|
||||||
} from "lit-element";
|
} from "lit-element";
|
||||||
import "./ha-svg-icon";
|
import { fireEvent } from "../common/dom/fire_event";
|
||||||
import { customIconsets, CustomIcon } from "../data/custom_iconsets";
|
import { debounce } from "../common/util/debounce";
|
||||||
|
import { CustomIcon, customIconsets } from "../data/custom_iconsets";
|
||||||
import {
|
import {
|
||||||
Chunks,
|
|
||||||
MDI_PREFIXES,
|
|
||||||
getIcon,
|
|
||||||
findIconChunk,
|
|
||||||
Icons,
|
|
||||||
checkCacheVersion,
|
checkCacheVersion,
|
||||||
|
Chunks,
|
||||||
|
findIconChunk,
|
||||||
|
getIcon,
|
||||||
|
Icons,
|
||||||
|
MDI_PREFIXES,
|
||||||
writeCache,
|
writeCache,
|
||||||
} from "../data/iconsets";
|
} from "../data/iconsets";
|
||||||
import { debounce } from "../common/util/debounce";
|
import "./ha-svg-icon";
|
||||||
import { fireEvent } from "../common/dom/fire_event";
|
|
||||||
|
|
||||||
interface DeprecatedIcon {
|
interface DeprecatedIcon {
|
||||||
[key: string]: {
|
[key: string]: {
|
||||||
|
@ -7,7 +7,6 @@ import {
|
|||||||
property,
|
property,
|
||||||
TemplateResult,
|
TemplateResult,
|
||||||
} from "lit-element";
|
} from "lit-element";
|
||||||
|
|
||||||
import "./ha-markdown-element";
|
import "./ha-markdown-element";
|
||||||
|
|
||||||
@customElement("ha-markdown")
|
@customElement("ha-markdown")
|
||||||
|
@ -2,8 +2,8 @@ import { html } from "@polymer/polymer/lib/utils/html-tag";
|
|||||||
/* eslint-plugin-disable lit */
|
/* eslint-plugin-disable lit */
|
||||||
import { PolymerElement } from "@polymer/polymer/polymer-element";
|
import { PolymerElement } from "@polymer/polymer/polymer-element";
|
||||||
import { getAppKey } from "../data/notify_html5";
|
import { getAppKey } from "../data/notify_html5";
|
||||||
import { EventsMixin } from "../mixins/events-mixin";
|
|
||||||
import { showPromptDialog } from "../dialogs/generic/show-dialog-box";
|
import { showPromptDialog } from "../dialogs/generic/show-dialog-box";
|
||||||
|
import { EventsMixin } from "../mixins/events-mixin";
|
||||||
import "./ha-switch";
|
import "./ha-switch";
|
||||||
|
|
||||||
export const pushSupported =
|
export const pushSupported =
|
||||||
|
@ -4,9 +4,9 @@ import {
|
|||||||
CSSResult,
|
CSSResult,
|
||||||
customElement,
|
customElement,
|
||||||
html,
|
html,
|
||||||
|
internalProperty,
|
||||||
LitElement,
|
LitElement,
|
||||||
property,
|
property,
|
||||||
internalProperty,
|
|
||||||
PropertyValues,
|
PropertyValues,
|
||||||
TemplateResult,
|
TemplateResult,
|
||||||
} from "lit-element";
|
} from "lit-element";
|
||||||
|
@ -1,12 +1,10 @@
|
|||||||
import {
|
import {
|
||||||
customElement,
|
customElement,
|
||||||
UpdatingElement,
|
|
||||||
property,
|
property,
|
||||||
PropertyValues,
|
PropertyValues,
|
||||||
|
UpdatingElement,
|
||||||
} from "lit-element";
|
} from "lit-element";
|
||||||
|
|
||||||
import relativeTime from "../common/datetime/relative_time";
|
import relativeTime from "../common/datetime/relative_time";
|
||||||
|
|
||||||
import type { HomeAssistant } from "../types";
|
import type { HomeAssistant } from "../types";
|
||||||
|
|
||||||
@customElement("ha-relative-time")
|
@customElement("ha-relative-time")
|
||||||
|
@ -6,10 +6,10 @@ import {
|
|||||||
LitElement,
|
LitElement,
|
||||||
property,
|
property,
|
||||||
} from "lit-element";
|
} from "lit-element";
|
||||||
import { HomeAssistant } from "../../types";
|
|
||||||
import { ActionSelector } from "../../data/selector";
|
|
||||||
import { Action } from "../../data/script";
|
import { Action } from "../../data/script";
|
||||||
|
import { ActionSelector } from "../../data/selector";
|
||||||
import "../../panels/config/automation/action/ha-automation-action";
|
import "../../panels/config/automation/action/ha-automation-action";
|
||||||
|
import { HomeAssistant } from "../../types";
|
||||||
|
|
||||||
@customElement("ha-selector-action")
|
@customElement("ha-selector-action")
|
||||||
export class HaActionSelector extends LitElement {
|
export class HaActionSelector extends LitElement {
|
||||||
|
@ -5,12 +5,12 @@ import {
|
|||||||
LitElement,
|
LitElement,
|
||||||
property,
|
property,
|
||||||
} from "lit-element";
|
} from "lit-element";
|
||||||
import { HomeAssistant } from "../../types";
|
|
||||||
import { AreaSelector } from "../../data/selector";
|
|
||||||
import "../ha-area-picker";
|
|
||||||
import { ConfigEntry, getConfigEntries } from "../../data/config_entries";
|
import { ConfigEntry, getConfigEntries } from "../../data/config_entries";
|
||||||
import { DeviceRegistryEntry } from "../../data/device_registry";
|
import { DeviceRegistryEntry } from "../../data/device_registry";
|
||||||
import { EntityRegistryEntry } from "../../data/entity_registry";
|
import { EntityRegistryEntry } from "../../data/entity_registry";
|
||||||
|
import { AreaSelector } from "../../data/selector";
|
||||||
|
import { HomeAssistant } from "../../types";
|
||||||
|
import "../ha-area-picker";
|
||||||
|
|
||||||
@customElement("ha-selector-area")
|
@customElement("ha-selector-area")
|
||||||
export class HaAreaSelector extends LitElement {
|
export class HaAreaSelector extends LitElement {
|
||||||
|
@ -5,11 +5,11 @@ import {
|
|||||||
LitElement,
|
LitElement,
|
||||||
property,
|
property,
|
||||||
} from "lit-element";
|
} from "lit-element";
|
||||||
|
import { ConfigEntry, getConfigEntries } from "../../data/config_entries";
|
||||||
|
import { DeviceRegistryEntry } from "../../data/device_registry";
|
||||||
|
import { DeviceSelector } from "../../data/selector";
|
||||||
import { HomeAssistant } from "../../types";
|
import { HomeAssistant } from "../../types";
|
||||||
import "../device/ha-device-picker";
|
import "../device/ha-device-picker";
|
||||||
import { DeviceRegistryEntry } from "../../data/device_registry";
|
|
||||||
import { ConfigEntry, getConfigEntries } from "../../data/config_entries";
|
|
||||||
import { DeviceSelector } from "../../data/selector";
|
|
||||||
|
|
||||||
@customElement("ha-selector-device")
|
@customElement("ha-selector-device")
|
||||||
export class HaDeviceSelector extends LitElement {
|
export class HaDeviceSelector extends LitElement {
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
import { HassEntity, UnsubscribeFunc } from "home-assistant-js-websocket";
|
||||||
import {
|
import {
|
||||||
customElement,
|
customElement,
|
||||||
html,
|
html,
|
||||||
@ -5,13 +6,12 @@ import {
|
|||||||
LitElement,
|
LitElement,
|
||||||
property,
|
property,
|
||||||
} from "lit-element";
|
} from "lit-element";
|
||||||
import { HomeAssistant } from "../../types";
|
|
||||||
import "../entity/ha-entity-picker";
|
|
||||||
import { HassEntity, UnsubscribeFunc } from "home-assistant-js-websocket";
|
|
||||||
import { computeStateDomain } from "../../common/entity/compute_state_domain";
|
import { computeStateDomain } from "../../common/entity/compute_state_domain";
|
||||||
import { subscribeEntityRegistry } from "../../data/entity_registry";
|
import { subscribeEntityRegistry } from "../../data/entity_registry";
|
||||||
import { SubscribeMixin } from "../../mixins/subscribe-mixin";
|
|
||||||
import { EntitySelector } from "../../data/selector";
|
import { EntitySelector } from "../../data/selector";
|
||||||
|
import { SubscribeMixin } from "../../mixins/subscribe-mixin";
|
||||||
|
import { HomeAssistant } from "../../types";
|
||||||
|
import "../entity/ha-entity-picker";
|
||||||
|
|
||||||
@customElement("ha-selector-entity")
|
@customElement("ha-selector-entity")
|
||||||
export class HaEntitySelector extends SubscribeMixin(LitElement) {
|
export class HaEntitySelector extends SubscribeMixin(LitElement) {
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
import "@polymer/paper-input/paper-input";
|
||||||
import {
|
import {
|
||||||
css,
|
css,
|
||||||
CSSResult,
|
CSSResult,
|
||||||
@ -6,12 +7,11 @@ import {
|
|||||||
LitElement,
|
LitElement,
|
||||||
property,
|
property,
|
||||||
} from "lit-element";
|
} from "lit-element";
|
||||||
import { HomeAssistant } from "../../types";
|
|
||||||
import { NumberSelector } from "../../data/selector";
|
|
||||||
import "@polymer/paper-input/paper-input";
|
|
||||||
import "../ha-slider";
|
|
||||||
import { fireEvent } from "../../common/dom/fire_event";
|
|
||||||
import { classMap } from "lit-html/directives/class-map";
|
import { classMap } from "lit-html/directives/class-map";
|
||||||
|
import { fireEvent } from "../../common/dom/fire_event";
|
||||||
|
import { NumberSelector } from "../../data/selector";
|
||||||
|
import { HomeAssistant } from "../../types";
|
||||||
|
import "../ha-slider";
|
||||||
|
|
||||||
@customElement("ha-selector-number")
|
@customElement("ha-selector-number")
|
||||||
export class HaNumberSelector extends LitElement {
|
export class HaNumberSelector extends LitElement {
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
import "@material/mwc-list/mwc-list";
|
||||||
|
import "@material/mwc-list/mwc-list-item";
|
||||||
|
import "@material/mwc-tab-bar/mwc-tab-bar";
|
||||||
|
import "@material/mwc-tab/mwc-tab";
|
||||||
|
import "@polymer/paper-input/paper-input";
|
||||||
|
import { HassEntity, UnsubscribeFunc } from "home-assistant-js-websocket";
|
||||||
import {
|
import {
|
||||||
css,
|
css,
|
||||||
CSSResult,
|
CSSResult,
|
||||||
@ -7,23 +13,17 @@ import {
|
|||||||
LitElement,
|
LitElement,
|
||||||
property,
|
property,
|
||||||
} from "lit-element";
|
} from "lit-element";
|
||||||
import { HomeAssistant } from "../../types";
|
|
||||||
import { TargetSelector } from "../../data/selector";
|
|
||||||
import { ConfigEntry, getConfigEntries } from "../../data/config_entries";
|
import { ConfigEntry, getConfigEntries } from "../../data/config_entries";
|
||||||
import { DeviceRegistryEntry } from "../../data/device_registry";
|
import { DeviceRegistryEntry } from "../../data/device_registry";
|
||||||
import "../ha-target-picker";
|
|
||||||
import "@material/mwc-list/mwc-list-item";
|
|
||||||
import "@polymer/paper-input/paper-input";
|
|
||||||
import "@material/mwc-list/mwc-list";
|
|
||||||
import {
|
import {
|
||||||
EntityRegistryEntry,
|
EntityRegistryEntry,
|
||||||
subscribeEntityRegistry,
|
subscribeEntityRegistry,
|
||||||
} from "../../data/entity_registry";
|
} from "../../data/entity_registry";
|
||||||
|
import { TargetSelector } from "../../data/selector";
|
||||||
import { Target } from "../../data/target";
|
import { Target } from "../../data/target";
|
||||||
import "@material/mwc-tab-bar/mwc-tab-bar";
|
|
||||||
import "@material/mwc-tab/mwc-tab";
|
|
||||||
import { HassEntity, UnsubscribeFunc } from "home-assistant-js-websocket";
|
|
||||||
import { SubscribeMixin } from "../../mixins/subscribe-mixin";
|
import { SubscribeMixin } from "../../mixins/subscribe-mixin";
|
||||||
|
import { HomeAssistant } from "../../types";
|
||||||
|
import "../ha-target-picker";
|
||||||
|
|
||||||
@customElement("ha-selector-target")
|
@customElement("ha-selector-target")
|
||||||
export class HaTargetSelector extends SubscribeMixin(LitElement) {
|
export class HaTargetSelector extends SubscribeMixin(LitElement) {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { customElement, html, LitElement, property } from "lit-element";
|
import { customElement, html, LitElement, property } from "lit-element";
|
||||||
import { HomeAssistant } from "../../types";
|
|
||||||
import { TimeSelector } from "../../data/selector";
|
|
||||||
import { fireEvent } from "../../common/dom/fire_event";
|
import { fireEvent } from "../../common/dom/fire_event";
|
||||||
|
import { TimeSelector } from "../../data/selector";
|
||||||
|
import { HomeAssistant } from "../../types";
|
||||||
import "../paper-time-input";
|
import "../paper-time-input";
|
||||||
|
|
||||||
const test = new Date().toLocaleString();
|
const test = new Date().toLocaleString();
|
||||||
|
@ -1,16 +1,15 @@
|
|||||||
import { customElement, html, LitElement, property } from "lit-element";
|
import { customElement, html, LitElement, property } from "lit-element";
|
||||||
import { dynamicElement } from "../../common/dom/dynamic-element-directive";
|
import { dynamicElement } from "../../common/dom/dynamic-element-directive";
|
||||||
import { HomeAssistant } from "../../types";
|
|
||||||
|
|
||||||
import "./ha-selector-entity";
|
|
||||||
import "./ha-selector-device";
|
|
||||||
import "./ha-selector-area";
|
|
||||||
import "./ha-selector-target";
|
|
||||||
import "./ha-selector-number";
|
|
||||||
import "./ha-selector-boolean";
|
|
||||||
import "./ha-selector-time";
|
|
||||||
import "./ha-selector-action";
|
|
||||||
import { Selector } from "../../data/selector";
|
import { Selector } from "../../data/selector";
|
||||||
|
import { HomeAssistant } from "../../types";
|
||||||
|
import "./ha-selector-action";
|
||||||
|
import "./ha-selector-area";
|
||||||
|
import "./ha-selector-boolean";
|
||||||
|
import "./ha-selector-device";
|
||||||
|
import "./ha-selector-entity";
|
||||||
|
import "./ha-selector-number";
|
||||||
|
import "./ha-selector-target";
|
||||||
|
import "./ha-selector-time";
|
||||||
|
|
||||||
@customElement("ha-selector")
|
@customElement("ha-selector")
|
||||||
export class HaSelector extends LitElement {
|
export class HaSelector extends LitElement {
|
||||||
|
@ -1,21 +1,21 @@
|
|||||||
|
import type { Ripple } from "@material/mwc-ripple";
|
||||||
|
import "@material/mwc-ripple/mwc-ripple";
|
||||||
|
import { RippleHandlers } from "@material/mwc-ripple/ripple-handlers";
|
||||||
import {
|
import {
|
||||||
css,
|
css,
|
||||||
CSSResult,
|
CSSResult,
|
||||||
customElement,
|
customElement,
|
||||||
|
eventOptions,
|
||||||
|
html,
|
||||||
|
internalProperty,
|
||||||
LitElement,
|
LitElement,
|
||||||
property,
|
property,
|
||||||
internalProperty,
|
|
||||||
TemplateResult,
|
|
||||||
html,
|
|
||||||
queryAsync,
|
queryAsync,
|
||||||
eventOptions,
|
TemplateResult,
|
||||||
} from "lit-element";
|
} from "lit-element";
|
||||||
import "@material/mwc-ripple/mwc-ripple";
|
import { ifDefined } from "lit-html/directives/if-defined";
|
||||||
import type { Ripple } from "@material/mwc-ripple";
|
|
||||||
import { RippleHandlers } from "@material/mwc-ripple/ripple-handlers";
|
|
||||||
import "./ha-icon";
|
import "./ha-icon";
|
||||||
import "./ha-svg-icon";
|
import "./ha-svg-icon";
|
||||||
import { ifDefined } from "lit-html/directives/if-defined";
|
|
||||||
|
|
||||||
@customElement("ha-tab")
|
@customElement("ha-tab")
|
||||||
export class HaTab extends LitElement {
|
export class HaTab extends LitElement {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import "@polymer/paper-tabs/paper-tabs";
|
|
||||||
import type { PaperIconButtonElement } from "@polymer/paper-icon-button/paper-icon-button";
|
import type { PaperIconButtonElement } from "@polymer/paper-icon-button/paper-icon-button";
|
||||||
import type { PaperTabElement } from "@polymer/paper-tabs/paper-tab";
|
import type { PaperTabElement } from "@polymer/paper-tabs/paper-tab";
|
||||||
|
import "@polymer/paper-tabs/paper-tabs";
|
||||||
import type { PaperTabsElement } from "@polymer/paper-tabs/paper-tabs";
|
import type { PaperTabsElement } from "@polymer/paper-tabs/paper-tabs";
|
||||||
import { customElement } from "lit-element";
|
import { customElement } from "lit-element";
|
||||||
import { Constructor } from "../types";
|
import { Constructor } from "../types";
|
||||||
|
@ -1,3 +1,16 @@
|
|||||||
|
// @ts-ignore
|
||||||
|
import chipStyles from "@material/chips/dist/mdc.chips.min.css";
|
||||||
|
import "@material/mwc-button/mwc-button";
|
||||||
|
import "@material/mwc-icon-button/mwc-icon-button";
|
||||||
|
import {
|
||||||
|
mdiClose,
|
||||||
|
mdiDevices,
|
||||||
|
mdiPlus,
|
||||||
|
mdiSofa,
|
||||||
|
mdiUnfoldMoreVertical,
|
||||||
|
} from "@mdi/js";
|
||||||
|
import "@polymer/paper-tooltip/paper-tooltip";
|
||||||
|
import { UnsubscribeFunc } from "home-assistant-js-websocket";
|
||||||
import {
|
import {
|
||||||
css,
|
css,
|
||||||
CSSResult,
|
CSSResult,
|
||||||
@ -9,22 +22,12 @@ import {
|
|||||||
query,
|
query,
|
||||||
unsafeCSS,
|
unsafeCSS,
|
||||||
} from "lit-element";
|
} from "lit-element";
|
||||||
import { HomeAssistant } from "../types";
|
|
||||||
// @ts-ignore
|
|
||||||
import chipStyles from "@material/chips/dist/mdc.chips.min.css";
|
|
||||||
import {
|
|
||||||
mdiSofa,
|
|
||||||
mdiDevices,
|
|
||||||
mdiClose,
|
|
||||||
mdiPlus,
|
|
||||||
mdiUnfoldMoreVertical,
|
|
||||||
} from "@mdi/js";
|
|
||||||
import "./ha-svg-icon";
|
|
||||||
import "./ha-icon";
|
|
||||||
import "@material/mwc-icon-button/mwc-icon-button";
|
|
||||||
import { classMap } from "lit-html/directives/class-map";
|
import { classMap } from "lit-html/directives/class-map";
|
||||||
import "@material/mwc-button/mwc-button";
|
import { fireEvent } from "../common/dom/fire_event";
|
||||||
import { UnsubscribeFunc } from "home-assistant-js-websocket";
|
import { ensureArray } from "../common/ensure-array";
|
||||||
|
import { computeDomain } from "../common/entity/compute_domain";
|
||||||
|
import { computeStateName } from "../common/entity/compute_state_name";
|
||||||
|
import { stateIcon } from "../common/entity/state_icon";
|
||||||
import {
|
import {
|
||||||
AreaRegistryEntry,
|
AreaRegistryEntry,
|
||||||
subscribeAreaRegistry,
|
subscribeAreaRegistry,
|
||||||
@ -38,19 +41,16 @@ import {
|
|||||||
EntityRegistryEntry,
|
EntityRegistryEntry,
|
||||||
subscribeEntityRegistry,
|
subscribeEntityRegistry,
|
||||||
} from "../data/entity_registry";
|
} from "../data/entity_registry";
|
||||||
import { SubscribeMixin } from "../mixins/subscribe-mixin";
|
|
||||||
import { computeStateName } from "../common/entity/compute_state_name";
|
|
||||||
import { stateIcon } from "../common/entity/state_icon";
|
|
||||||
import { fireEvent } from "../common/dom/fire_event";
|
|
||||||
import type { HaDevicePickerDeviceFilterFunc } from "./device/ha-device-picker";
|
|
||||||
import { computeDomain } from "../common/entity/compute_domain";
|
|
||||||
import { Target } from "../data/target";
|
import { Target } from "../data/target";
|
||||||
import { ensureArray } from "../common/ensure-array";
|
import { SubscribeMixin } from "../mixins/subscribe-mixin";
|
||||||
import "./entity/ha-entity-picker";
|
import { HomeAssistant } from "../types";
|
||||||
import "./device/ha-device-picker";
|
import "./device/ha-device-picker";
|
||||||
import "./ha-area-picker";
|
import type { HaDevicePickerDeviceFilterFunc } from "./device/ha-device-picker";
|
||||||
|
import "./entity/ha-entity-picker";
|
||||||
import type { HaEntityPickerEntityFilterFunc } from "./entity/ha-entity-picker";
|
import type { HaEntityPickerEntityFilterFunc } from "./entity/ha-entity-picker";
|
||||||
import "@polymer/paper-tooltip/paper-tooltip";
|
import "./ha-area-picker";
|
||||||
|
import "./ha-icon";
|
||||||
|
import "./ha-svg-icon";
|
||||||
|
|
||||||
@customElement("ha-target-picker")
|
@customElement("ha-target-picker")
|
||||||
export class HaTargetPicker extends SubscribeMixin(LitElement) {
|
export class HaTargetPicker extends SubscribeMixin(LitElement) {
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user