mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-15 13:26:34 +00:00
Drop webpackChunkName (#7778)
This commit is contained in:
parent
cd07553b59
commit
6d4569c89d
@ -3,22 +3,10 @@ import { Lovelace } from "../../../src/panels/lovelace/types";
|
||||
import { DemoConfig } from "./types";
|
||||
|
||||
export const demoConfigs: Array<() => Promise<DemoConfig>> = [
|
||||
() =>
|
||||
import(/* webpackChunkName: "arsaboo" */ "./arsaboo").then(
|
||||
(mod) => mod.demoArsaboo
|
||||
),
|
||||
() =>
|
||||
import(/* webpackChunkName: "teachingbirds" */ "./teachingbirds").then(
|
||||
(mod) => mod.demoTeachingbirds
|
||||
),
|
||||
() =>
|
||||
import(/* webpackChunkName: "kernehed" */ "./kernehed").then(
|
||||
(mod) => mod.demoKernehed
|
||||
),
|
||||
() =>
|
||||
import(/* webpackChunkName: "jimpower" */ "./jimpower").then(
|
||||
(mod) => mod.demoJimpower
|
||||
),
|
||||
() => import("./arsaboo").then((mod) => mod.demoArsaboo),
|
||||
() => import("./teachingbirds").then((mod) => mod.demoTeachingbirds),
|
||||
() => import("./kernehed").then((mod) => mod.demoKernehed),
|
||||
() => import("./jimpower").then((mod) => mod.demoJimpower),
|
||||
];
|
||||
|
||||
// eslint-disable-next-line import/no-mutable-exports
|
||||
|
@ -7,7 +7,5 @@ import "./ha-demo";
|
||||
|
||||
/* polyfill for paper-dropdown */
|
||||
setTimeout(() => {
|
||||
import(
|
||||
/* webpackChunkName: "polyfill-web-animations-next" */ "web-animations-js/web-animations-next-lite.min"
|
||||
);
|
||||
import("web-animations-js/web-animations-next-lite.min");
|
||||
}, 1000);
|
||||
|
@ -11,10 +11,7 @@ export const showHassioMarkdownDialog = (
|
||||
): void => {
|
||||
fireEvent(element, "show-dialog", {
|
||||
dialogTag: "dialog-hassio-markdown",
|
||||
dialogImport: () =>
|
||||
import(
|
||||
/* webpackChunkName: "dialog-hassio-markdown" */ "./dialog-hassio-markdown"
|
||||
),
|
||||
dialogImport: () => import("./dialog-hassio-markdown"),
|
||||
dialogParams,
|
||||
});
|
||||
};
|
||||
|
@ -13,10 +13,7 @@ export const showNetworkDialog = (
|
||||
): void => {
|
||||
fireEvent(element, "show-dialog", {
|
||||
dialogTag: "dialog-hassio-network",
|
||||
dialogImport: () =>
|
||||
import(
|
||||
/* webpackChunkName: "dialog-hassio-network" */ "./dialog-hassio-network"
|
||||
),
|
||||
dialogImport: () => import("./dialog-hassio-network"),
|
||||
dialogParams,
|
||||
});
|
||||
};
|
||||
|
@ -4,10 +4,7 @@ import "./dialog-hassio-registries";
|
||||
export const showRegistriesDialog = (element: HTMLElement): void => {
|
||||
fireEvent(element, "show-dialog", {
|
||||
dialogTag: "dialog-hassio-registries",
|
||||
dialogImport: () =>
|
||||
import(
|
||||
/* webpackChunkName: "dialog-hassio-registries" */ "./dialog-hassio-registries"
|
||||
),
|
||||
dialogImport: () => import("./dialog-hassio-registries"),
|
||||
dialogParams: {},
|
||||
});
|
||||
};
|
||||
|
@ -13,10 +13,7 @@ export const showRepositoriesDialog = (
|
||||
): void => {
|
||||
fireEvent(element, "show-dialog", {
|
||||
dialogTag: "dialog-hassio-repositories",
|
||||
dialogImport: () =>
|
||||
import(
|
||||
/* webpackChunkName: "dialog-hassio-repositories" */ "./dialog-hassio-repositories"
|
||||
),
|
||||
dialogImport: () => import("./dialog-hassio-repositories"),
|
||||
dialogParams,
|
||||
});
|
||||
};
|
||||
|
@ -12,10 +12,7 @@ export const showHassioSnapshotDialog = (
|
||||
): void => {
|
||||
fireEvent(element, "show-dialog", {
|
||||
dialogTag: "dialog-hassio-snapshot",
|
||||
dialogImport: () =>
|
||||
import(
|
||||
/* webpackChunkName: "dialog-hassio-snapshot" */ "./dialog-hassio-snapshot"
|
||||
),
|
||||
dialogImport: () => import("./dialog-hassio-snapshot"),
|
||||
dialogParams,
|
||||
});
|
||||
};
|
||||
|
@ -13,10 +13,7 @@ export const showSnapshotUploadDialog = (
|
||||
): void => {
|
||||
fireEvent(element, "show-dialog", {
|
||||
dialogTag: "dialog-hassio-snapshot-upload",
|
||||
dialogImport: () =>
|
||||
import(
|
||||
/* webpackChunkName: "dialog-hassio-snapshot-upload" */ "./dialog-hassio-snapshot-upload"
|
||||
),
|
||||
dialogImport: () => import("./dialog-hassio-snapshot-upload"),
|
||||
dialogParams,
|
||||
});
|
||||
};
|
||||
|
@ -51,17 +51,11 @@ class HassioRouter extends HassRouterPage {
|
||||
system: "dashboard",
|
||||
addon: {
|
||||
tag: "hassio-addon-dashboard",
|
||||
load: () =>
|
||||
import(
|
||||
/* webpackChunkName: "hassio-addon-dashboard" */ "./addon-view/hassio-addon-dashboard"
|
||||
),
|
||||
load: () => import("./addon-view/hassio-addon-dashboard"),
|
||||
},
|
||||
ingress: {
|
||||
tag: "hassio-ingress-view",
|
||||
load: () =>
|
||||
import(
|
||||
/* webpackChunkName: "hassio-ingress-view" */ "./ingress-view/hassio-ingress-view"
|
||||
),
|
||||
load: () => import("./ingress-view/hassio-ingress-view"),
|
||||
},
|
||||
},
|
||||
};
|
||||
|
@ -18,7 +18,7 @@ import "./ha-auth-flow";
|
||||
import { extractSearchParamsObject } from "../common/url/search-params";
|
||||
import punycode from "punycode";
|
||||
|
||||
import(/* webpackChunkName: "pick-auth-provider" */ "./ha-pick-auth-provider");
|
||||
import("./ha-pick-auth-provider");
|
||||
|
||||
class HaAuthorize extends litLocalizeLiteMixin(LitElement) {
|
||||
@property() public clientId?: string;
|
||||
|
@ -13,13 +13,12 @@ export const setupLeafletMap = async (
|
||||
throw new Error("Cannot setup Leaflet map on disconnected element");
|
||||
}
|
||||
// eslint-disable-next-line
|
||||
const Leaflet = ((await import(
|
||||
/* webpackChunkName: "leaflet" */ "leaflet"
|
||||
)) as any).default as LeafletModuleType;
|
||||
const Leaflet = ((await import("leaflet")) as any)
|
||||
.default as LeafletModuleType;
|
||||
Leaflet.Icon.Default.imagePath = "/static/images/leaflet/images/";
|
||||
|
||||
if (draw) {
|
||||
await import(/* webpackChunkName: "leaflet-draw" */ "leaflet-draw");
|
||||
await import("leaflet-draw");
|
||||
}
|
||||
|
||||
const map = Leaflet.map(mapElement);
|
||||
|
@ -230,9 +230,7 @@ class HaChartBase extends mixinBehaviors(
|
||||
}
|
||||
|
||||
if (scriptsLoaded === null) {
|
||||
scriptsLoaded = import(
|
||||
/* webpackChunkName: "load_chart" */ "../../resources/ha-chart-scripts.js"
|
||||
);
|
||||
scriptsLoaded = import("../../resources/ha-chart-scripts.js");
|
||||
}
|
||||
scriptsLoaded.then((ChartModule) => {
|
||||
this.ChartClass = ChartModule.default;
|
||||
|
@ -107,7 +107,7 @@ class HaAttributes extends LitElement {
|
||||
(!Array.isArray(value) && value instanceof Object)
|
||||
) {
|
||||
if (!jsYamlPromise) {
|
||||
jsYamlPromise = import(/* webpackChunkName: "js-yaml" */ "js-yaml");
|
||||
jsYamlPromise = import("js-yaml");
|
||||
}
|
||||
const yaml = jsYamlPromise.then((jsYaml) => jsYaml.safeDump(value));
|
||||
return html` <pre>${until(yaml, "")}</pre> `;
|
||||
|
@ -107,9 +107,7 @@ class HaHLSPlayer extends LitElement {
|
||||
const useExoPlayerPromise = this._getUseExoPlayer();
|
||||
const masterPlaylistPromise = fetch(this.url);
|
||||
|
||||
const hls = ((await import(
|
||||
/* webpackChunkName: "hls.js" */ "hls.js"
|
||||
)) as any).default as HLSModule;
|
||||
const hls = ((await import("hls.js")) as any).default as HLSModule;
|
||||
let hlsSupported = hls.isSupported();
|
||||
|
||||
if (!hlsSupported) {
|
||||
|
@ -18,10 +18,7 @@ export const showMediaBrowserDialog = (
|
||||
): void => {
|
||||
fireEvent(element, "show-dialog", {
|
||||
dialogTag: "dialog-media-player-browse",
|
||||
dialogImport: () =>
|
||||
import(
|
||||
/* webpackChunkName: "dialog-media-player-browse" */ "./dialog-media-player-browse"
|
||||
),
|
||||
dialogImport: () => import("./dialog-media-player-browse"),
|
||||
dialogParams,
|
||||
});
|
||||
};
|
||||
|
@ -10,9 +10,7 @@ export interface ConfigEntrySystemOptionsDialogParams {
|
||||
}
|
||||
|
||||
export const loadConfigEntrySystemOptionsDialog = () =>
|
||||
import(
|
||||
/* webpackChunkName: "config-entry-system-options" */ "./dialog-config-entry-system-options"
|
||||
);
|
||||
import("./dialog-config-entry-system-options");
|
||||
|
||||
export const showConfigEntrySystemOptionsDialog = (
|
||||
element: HTMLElement,
|
||||
|
@ -89,10 +89,7 @@ export interface DataEntryFlowDialogParams {
|
||||
showAdvanced?: boolean;
|
||||
}
|
||||
|
||||
export const loadDataEntryFlowDialog = () =>
|
||||
import(
|
||||
/* webpackChunkName: "dialog-config-flow" */ "./dialog-data-entry-flow"
|
||||
);
|
||||
export const loadDataEntryFlowDialog = () => import("./dialog-data-entry-flow");
|
||||
|
||||
export const showFlowDialog = (
|
||||
element: HTMLElement,
|
||||
|
@ -12,9 +12,7 @@ export interface DeviceRegistryDetailDialogParams {
|
||||
}
|
||||
|
||||
export const loadDeviceRegistryDetailDialog = () =>
|
||||
import(
|
||||
/* webpackChunkName: "device-registry-detail-dialog" */ "./dialog-device-registry-detail"
|
||||
);
|
||||
import("./dialog-device-registry-detail");
|
||||
|
||||
export const showDeviceRegistryDetailDialog = (
|
||||
element: HTMLElement,
|
||||
|
@ -7,10 +7,7 @@ export interface HaDomainTogglerDialogParams {
|
||||
resetDomain: (domain: string) => void;
|
||||
}
|
||||
|
||||
export const loadDomainTogglerDialog = () =>
|
||||
import(
|
||||
/* webpackChunkName: "dialog-domain-toggler" */ "./dialog-domain-toggler"
|
||||
);
|
||||
export const loadDomainTogglerDialog = () => import("./dialog-domain-toggler");
|
||||
|
||||
export const showDomainTogglerDialog = (
|
||||
element: HTMLElement,
|
||||
|
@ -33,8 +33,7 @@ export interface DialogParams
|
||||
prompt?: boolean;
|
||||
}
|
||||
|
||||
export const loadGenericDialog = () =>
|
||||
import(/* webpackChunkName: "confirmation" */ "./dialog-box");
|
||||
export const loadGenericDialog = () => import("./dialog-box");
|
||||
|
||||
const showDialogHelper = (
|
||||
element: HTMLElement,
|
||||
|
@ -13,10 +13,7 @@ export interface HaImageCropperDialogParams {
|
||||
croppedCallback: (file: File) => void;
|
||||
}
|
||||
|
||||
const loadImageCropperDialog = () =>
|
||||
import(
|
||||
/* webpackChunkName: "image-cropper-dialog" */ "./image-cropper-dialog"
|
||||
);
|
||||
const loadImageCropperDialog = () => import("./image-cropper-dialog");
|
||||
|
||||
export const showImageCropperDialog = (
|
||||
element: HTMLElement,
|
||||
|
@ -5,8 +5,7 @@ export interface QuickBarParams {
|
||||
commandMode?: boolean;
|
||||
}
|
||||
|
||||
export const loadQuickBar = () =>
|
||||
import(/* webpackChunkName: "quick-bar-dialog" */ "./ha-quick-bar");
|
||||
export const loadQuickBar = () => import("./ha-quick-bar");
|
||||
|
||||
export const showQuickBar = (
|
||||
element: HTMLElement,
|
||||
|
@ -1,9 +1,6 @@
|
||||
import { fireEvent } from "../../common/dom/fire_event";
|
||||
|
||||
const loadVoiceCommandDialog = () =>
|
||||
import(
|
||||
/* webpackChunkName: "ha-voice-command-dialog" */ "./ha-voice-command-dialog"
|
||||
);
|
||||
const loadVoiceCommandDialog = () => import("./ha-voice-command-dialog");
|
||||
|
||||
export const showVoiceCommandDialog = (element: HTMLElement): void => {
|
||||
fireEvent(element, "show-dialog", {
|
||||
|
@ -9,9 +9,6 @@ import "../resources/roboto";
|
||||
|
||||
/* polyfill for paper-dropdown */
|
||||
setTimeout(
|
||||
() =>
|
||||
import(
|
||||
/* webpackChunkName: "polyfill-web-animations-next" */ "web-animations-js/web-animations-next-lite.min"
|
||||
),
|
||||
() => import("web-animations-js/web-animations-next-lite.min"),
|
||||
2000
|
||||
);
|
||||
|
@ -35,9 +35,9 @@ declare global {
|
||||
|
||||
const authProm = isExternal
|
||||
? () =>
|
||||
import(
|
||||
/* webpackChunkName: "external_auth" */ "../external_app/external_auth"
|
||||
).then(({ createExternalAuth }) => createExternalAuth(hassUrl))
|
||||
import("../external_app/external_auth").then(({ createExternalAuth }) =>
|
||||
createExternalAuth(hassUrl)
|
||||
)
|
||||
: () =>
|
||||
getAuth({
|
||||
hassUrl,
|
||||
|
@ -104,7 +104,7 @@ class HomeAssistantMain extends LitElement {
|
||||
}
|
||||
|
||||
protected firstUpdated() {
|
||||
import(/* webpackChunkName: "ha-sidebar" */ "../components/ha-sidebar");
|
||||
import("../components/ha-sidebar");
|
||||
|
||||
this.addEventListener(
|
||||
"hass-edit-sidebar",
|
||||
|
@ -59,9 +59,7 @@ export class HomeAssistantAppEl extends QuickBarMixin(HassElement) {
|
||||
this._initialize();
|
||||
setTimeout(() => registerServiceWorker(this), 1000);
|
||||
/* polyfill for paper-dropdown */
|
||||
import(
|
||||
/* webpackChunkName: "polyfill-web-animations-next" */ "web-animations-js/web-animations-next-lite.min"
|
||||
);
|
||||
import("web-animations-js/web-animations-next-lite.min");
|
||||
this.addEventListener("hass-suspend-when-hidden", (ev) => {
|
||||
this._updateHass({ suspendWhenHidden: ev.detail.suspend });
|
||||
storeState(this.hass!);
|
||||
|
@ -18,56 +18,22 @@ import {
|
||||
|
||||
const CACHE_URL_PATHS = ["lovelace", "developer-tools"];
|
||||
const COMPONENTS = {
|
||||
calendar: () =>
|
||||
import(
|
||||
/* webpackChunkName: "panel-calendar" */ "../panels/calendar/ha-panel-calendar"
|
||||
),
|
||||
config: () =>
|
||||
import(
|
||||
/* webpackChunkName: "panel-config" */ "../panels/config/ha-panel-config"
|
||||
),
|
||||
custom: () =>
|
||||
import(
|
||||
/* webpackChunkName: "panel-custom" */ "../panels/custom/ha-panel-custom"
|
||||
),
|
||||
calendar: () => import("../panels/calendar/ha-panel-calendar"),
|
||||
config: () => import("../panels/config/ha-panel-config"),
|
||||
custom: () => import("../panels/custom/ha-panel-custom"),
|
||||
"developer-tools": () =>
|
||||
import(
|
||||
/* webpackChunkName: "panel-developer-tools" */ "../panels/developer-tools/ha-panel-developer-tools"
|
||||
),
|
||||
lovelace: () =>
|
||||
import(
|
||||
/* webpackChunkName: "panel-lovelace" */ "../panels/lovelace/ha-panel-lovelace"
|
||||
),
|
||||
history: () =>
|
||||
import(
|
||||
/* webpackChunkName: "panel-history" */ "../panels/history/ha-panel-history"
|
||||
),
|
||||
iframe: () =>
|
||||
import(
|
||||
/* webpackChunkName: "panel-iframe" */ "../panels/iframe/ha-panel-iframe"
|
||||
),
|
||||
logbook: () =>
|
||||
import(
|
||||
/* webpackChunkName: "panel-logbook" */ "../panels/logbook/ha-panel-logbook"
|
||||
),
|
||||
mailbox: () =>
|
||||
import(
|
||||
/* webpackChunkName: "panel-mailbox" */ "../panels/mailbox/ha-panel-mailbox"
|
||||
),
|
||||
map: () =>
|
||||
import(/* webpackChunkName: "panel-map" */ "../panels/map/ha-panel-map"),
|
||||
profile: () =>
|
||||
import(
|
||||
/* webpackChunkName: "panel-profile" */ "../panels/profile/ha-panel-profile"
|
||||
),
|
||||
import("../panels/developer-tools/ha-panel-developer-tools"),
|
||||
lovelace: () => import("../panels/lovelace/ha-panel-lovelace"),
|
||||
history: () => import("../panels/history/ha-panel-history"),
|
||||
iframe: () => import("../panels/iframe/ha-panel-iframe"),
|
||||
logbook: () => import("../panels/logbook/ha-panel-logbook"),
|
||||
mailbox: () => import("../panels/mailbox/ha-panel-mailbox"),
|
||||
map: () => import("../panels/map/ha-panel-map"),
|
||||
profile: () => import("../panels/profile/ha-panel-profile"),
|
||||
"shopping-list": () =>
|
||||
import(
|
||||
/* webpackChunkName: "panel-shopping-list" */ "../panels/shopping-list/ha-panel-shopping-list"
|
||||
),
|
||||
import("../panels/shopping-list/ha-panel-shopping-list"),
|
||||
"media-browser": () =>
|
||||
import(
|
||||
/* webpackChunkName: "panel-media-browser" */ "../panels/media-browser/ha-panel-media-browser"
|
||||
),
|
||||
import("../panels/media-browser/ha-panel-media-browser"),
|
||||
};
|
||||
|
||||
const getRoutes = (panels: Panels): RouterOptions => {
|
||||
|
@ -117,12 +117,8 @@ class HaOnboarding extends litLocalizeLiteMixin(HassElement) {
|
||||
super.firstUpdated(changedProps);
|
||||
this._fetchOnboardingSteps();
|
||||
this._fetchDiscoveryInformation();
|
||||
import(
|
||||
/* webpackChunkName: "onboarding-integrations" */ "./onboarding-integrations"
|
||||
);
|
||||
import(
|
||||
/* webpackChunkName: "onboarding-core-config" */ "./onboarding-core-config"
|
||||
);
|
||||
import("./onboarding-integrations");
|
||||
import("./onboarding-core-config");
|
||||
registerServiceWorker(this, false);
|
||||
this.addEventListener("onboarding-step", (ev) => this._handleStepDone(ev));
|
||||
}
|
||||
@ -157,9 +153,7 @@ class HaOnboarding extends litLocalizeLiteMixin(HassElement) {
|
||||
].includes(response.installation_type);
|
||||
if (this._supervisor) {
|
||||
// Only load if we have supervisor
|
||||
import(
|
||||
/* webpackChunkName: "onboarding-restore-snapshot" */ "./onboarding-restore-snapshot"
|
||||
);
|
||||
import("./onboarding-restore-snapshot");
|
||||
}
|
||||
} catch (err) {
|
||||
// eslint-disable-next-line no-console
|
||||
|
@ -137,9 +137,7 @@ class OnboardingIntegrations extends LitElement {
|
||||
loadConfigFlowDialog();
|
||||
this._loadConfigEntries();
|
||||
/* polyfill for paper-dropdown */
|
||||
import(
|
||||
/* webpackChunkName: "polyfill-web-animations-next" */ "web-animations-js/web-animations-next-lite.min"
|
||||
);
|
||||
import("web-animations-js/web-animations-next-lite.min");
|
||||
}
|
||||
|
||||
private _createFlow() {
|
||||
|
@ -14,9 +14,7 @@ export interface AreaRegistryDetailDialogParams {
|
||||
}
|
||||
|
||||
export const loadAreaRegistryDetailDialog = () =>
|
||||
import(
|
||||
/* webpackChunkName: "area-registry-detail-dialog" */ "./dialog-area-registry-detail"
|
||||
);
|
||||
import("./dialog-area-registry-detail");
|
||||
|
||||
export const showAreaRegistryDetailDialog = (
|
||||
element: HTMLElement,
|
||||
|
@ -1,7 +1,6 @@
|
||||
import { fireEvent } from "../../../common/dom/fire_event";
|
||||
|
||||
export const loadNewAutomationDialog = () =>
|
||||
import(/* webpackChunkName: "thingtalk-dialog" */ "./dialog-new-automation");
|
||||
export const loadNewAutomationDialog = () => import("./dialog-new-automation");
|
||||
|
||||
export const showNewAutomationDialog = (element: HTMLElement): void => {
|
||||
fireEvent(element, "show-dialog", {
|
||||
|
@ -6,8 +6,7 @@ export interface ThingtalkDialogParams {
|
||||
input?: string;
|
||||
}
|
||||
|
||||
export const loadThingtalkDialog = () =>
|
||||
import(/* webpackChunkName: "thingtalk-dialog" */ "./dialog-thingtalk");
|
||||
export const loadThingtalkDialog = () => import("./dialog-thingtalk");
|
||||
|
||||
export const showThingtalkDialog = (
|
||||
element: HTMLElement,
|
||||
|
@ -1,9 +1,7 @@
|
||||
import { fireEvent } from "../../../common/dom/fire_event";
|
||||
|
||||
export const loadImportBlueprintDialog = () =>
|
||||
import(
|
||||
/* webpackChunkName: "add-blueprint-dialog" */ "./dialog-import-blueprint"
|
||||
);
|
||||
import("./dialog-import-blueprint");
|
||||
|
||||
export const showAddBlueprintDialog = (
|
||||
element: HTMLElement,
|
||||
|
@ -11,10 +11,7 @@ export const showCloudCertificateDialog = (
|
||||
): void => {
|
||||
fireEvent(element, "show-dialog", {
|
||||
dialogTag: "dialog-cloud-certificate",
|
||||
dialogImport: () =>
|
||||
import(
|
||||
/* webpackChunkName: "dialog-cloud-certificate" */ "./dialog-cloud-certificate"
|
||||
),
|
||||
dialogImport: () => import("./dialog-cloud-certificate"),
|
||||
dialogParams: webhookDialogParams,
|
||||
});
|
||||
};
|
||||
|
@ -14,10 +14,7 @@ export const showManageCloudhookDialog = (
|
||||
): void => {
|
||||
fireEvent(element, "show-dialog", {
|
||||
dialogTag: "dialog-manage-cloudhook",
|
||||
dialogImport: () =>
|
||||
import(
|
||||
/* webpackChunkName: "cloud-webhook-manage-dialog" */ "./dialog-manage-cloudhook"
|
||||
),
|
||||
dialogImport: () => import("./dialog-manage-cloudhook"),
|
||||
dialogParams: webhookDialogParams,
|
||||
});
|
||||
};
|
||||
|
@ -47,32 +47,22 @@ class HaConfigCloud extends HassRouterPage {
|
||||
},
|
||||
register: {
|
||||
tag: "cloud-register",
|
||||
load: () =>
|
||||
import(
|
||||
/* webpackChunkName: "cloud-register" */ "./register/cloud-register"
|
||||
),
|
||||
load: () => import("./register/cloud-register"),
|
||||
},
|
||||
"forgot-password": {
|
||||
tag: "cloud-forgot-password",
|
||||
load: () =>
|
||||
import(
|
||||
/* webpackChunkName: "cloud-forgot-password" */ "./forgot-password/cloud-forgot-password"
|
||||
),
|
||||
load: () => import("./forgot-password/cloud-forgot-password"),
|
||||
},
|
||||
account: {
|
||||
tag: "cloud-account",
|
||||
},
|
||||
"google-assistant": {
|
||||
tag: "cloud-google-assistant",
|
||||
load: () =>
|
||||
import(
|
||||
/* webpackChunkName: "cloud-google-assistant" */ "./google-assistant/cloud-google-assistant"
|
||||
),
|
||||
load: () => import("./google-assistant/cloud-google-assistant"),
|
||||
},
|
||||
alexa: {
|
||||
tag: "cloud-alexa",
|
||||
load: () =>
|
||||
import(/* webpackChunkName: "cloud-alexa" */ "./alexa/cloud-alexa"),
|
||||
load: () => import("./alexa/cloud-alexa"),
|
||||
},
|
||||
},
|
||||
};
|
||||
|
@ -6,9 +6,7 @@ export interface MQTTDeviceDebugInfoDialogParams {
|
||||
}
|
||||
|
||||
export const loadMQTTDeviceDebugInfoDialog = () =>
|
||||
import(
|
||||
/* webpackChunkName: "dialog-mqtt-device-debug-info" */ "./dialog-mqtt-device-debug-info"
|
||||
);
|
||||
import("./dialog-mqtt-device-debug-info");
|
||||
|
||||
export const showMQTTDeviceDebugInfoDialog = (
|
||||
element: HTMLElement,
|
||||
|
@ -6,9 +6,7 @@ export interface DeviceAutomationDialogParams {
|
||||
}
|
||||
|
||||
export const loadDeviceAutomationDialog = () =>
|
||||
import(
|
||||
/* webpackChunkName: "device-automation-dialog" */ "./ha-device-automation-dialog"
|
||||
);
|
||||
import("./ha-device-automation-dialog");
|
||||
|
||||
export const showDeviceAutomationDialog = (
|
||||
element: HTMLElement,
|
||||
|
@ -8,10 +8,7 @@ export interface EntityRegistryDetailDialogParams {
|
||||
tab?: string;
|
||||
}
|
||||
|
||||
export const loadEntityEditorDialog = () =>
|
||||
import(
|
||||
/* webpackChunkName: "entity-editor-dialog" */ "./dialog-entity-editor"
|
||||
);
|
||||
export const loadEntityEditorDialog = () => import("./dialog-entity-editor");
|
||||
|
||||
const getDialog = () => {
|
||||
return document
|
||||
|
@ -203,178 +203,109 @@ class HaPanelConfig extends HassRouterPage {
|
||||
routes: {
|
||||
areas: {
|
||||
tag: "ha-config-areas",
|
||||
load: () =>
|
||||
import(
|
||||
/* webpackChunkName: "panel-config-areas" */ "./areas/ha-config-areas"
|
||||
),
|
||||
load: () => import("./areas/ha-config-areas"),
|
||||
},
|
||||
automation: {
|
||||
tag: "ha-config-automation",
|
||||
load: () =>
|
||||
import(
|
||||
/* webpackChunkName: "panel-config-automation" */ "./automation/ha-config-automation"
|
||||
),
|
||||
load: () => import("./automation/ha-config-automation"),
|
||||
},
|
||||
blueprint: {
|
||||
tag: "ha-config-blueprint",
|
||||
load: () =>
|
||||
import(
|
||||
/* webpackChunkName: "panel-config-blueprint" */ "./blueprint/ha-config-blueprint"
|
||||
),
|
||||
load: () => import("./blueprint/ha-config-blueprint"),
|
||||
},
|
||||
tags: {
|
||||
tag: "ha-config-tags",
|
||||
load: () =>
|
||||
import(
|
||||
/* webpackChunkName: "panel-config-tags" */ "./tags/ha-config-tags"
|
||||
),
|
||||
load: () => import("./tags/ha-config-tags"),
|
||||
},
|
||||
cloud: {
|
||||
tag: "ha-config-cloud",
|
||||
load: () =>
|
||||
import(
|
||||
/* webpackChunkName: "panel-config-cloud" */ "./cloud/ha-config-cloud"
|
||||
),
|
||||
load: () => import("./cloud/ha-config-cloud"),
|
||||
},
|
||||
core: {
|
||||
tag: "ha-config-core",
|
||||
load: () =>
|
||||
import(
|
||||
/* webpackChunkName: "panel-config-core" */ "./core/ha-config-core"
|
||||
),
|
||||
load: () => import("./core/ha-config-core"),
|
||||
},
|
||||
devices: {
|
||||
tag: "ha-config-devices",
|
||||
load: () =>
|
||||
import(
|
||||
/* webpackChunkName: "panel-config-devices" */ "./devices/ha-config-devices"
|
||||
),
|
||||
load: () => import("./devices/ha-config-devices"),
|
||||
},
|
||||
server_control: {
|
||||
tag: "ha-config-server-control",
|
||||
load: () =>
|
||||
import(
|
||||
/* webpackChunkName: "panel-config-server-control" */ "./server_control/ha-config-server-control"
|
||||
),
|
||||
load: () => import("./server_control/ha-config-server-control"),
|
||||
},
|
||||
logs: {
|
||||
tag: "ha-config-logs",
|
||||
load: () =>
|
||||
import(
|
||||
/* webpackChunkName: "panel-config-logs" */ "./logs/ha-config-logs"
|
||||
),
|
||||
load: () => import("./logs/ha-config-logs"),
|
||||
},
|
||||
info: {
|
||||
tag: "ha-config-info",
|
||||
load: () =>
|
||||
import(
|
||||
/* webpackChunkName: "panel-config-info" */ "./info/ha-config-info"
|
||||
),
|
||||
load: () => import("./info/ha-config-info"),
|
||||
},
|
||||
customize: {
|
||||
tag: "ha-config-customize",
|
||||
load: () =>
|
||||
import(
|
||||
/* webpackChunkName: "panel-config-customize" */ "./customize/ha-config-customize"
|
||||
),
|
||||
load: () => import("./customize/ha-config-customize"),
|
||||
},
|
||||
dashboard: {
|
||||
tag: "ha-config-dashboard",
|
||||
load: () =>
|
||||
import(
|
||||
/* webpackChunkName: "panel-config-dashboard" */ "./dashboard/ha-config-dashboard"
|
||||
),
|
||||
load: () => import("./dashboard/ha-config-dashboard"),
|
||||
},
|
||||
entities: {
|
||||
tag: "ha-config-entities",
|
||||
load: () =>
|
||||
import(
|
||||
/* webpackChunkName: "panel-config-entities" */ "./entities/ha-config-entities"
|
||||
),
|
||||
load: () => import("./entities/ha-config-entities"),
|
||||
},
|
||||
integrations: {
|
||||
tag: "ha-config-integrations",
|
||||
load: () =>
|
||||
import(
|
||||
/* webpackChunkName: "panel-config-integrations" */ "./integrations/ha-config-integrations"
|
||||
),
|
||||
load: () => import("./integrations/ha-config-integrations"),
|
||||
},
|
||||
lovelace: {
|
||||
tag: "ha-config-lovelace",
|
||||
load: () =>
|
||||
import(
|
||||
/* webpackChunkName: "panel-config-lovelace" */ "./lovelace/ha-config-lovelace"
|
||||
),
|
||||
load: () => import("./lovelace/ha-config-lovelace"),
|
||||
},
|
||||
person: {
|
||||
tag: "ha-config-person",
|
||||
load: () =>
|
||||
import(
|
||||
/* webpackChunkName: "panel-config-person" */ "./person/ha-config-person"
|
||||
),
|
||||
load: () => import("./person/ha-config-person"),
|
||||
},
|
||||
script: {
|
||||
tag: "ha-config-script",
|
||||
load: () =>
|
||||
import(
|
||||
/* webpackChunkName: "panel-config-script" */ "./script/ha-config-script"
|
||||
),
|
||||
load: () => import("./script/ha-config-script"),
|
||||
},
|
||||
scene: {
|
||||
tag: "ha-config-scene",
|
||||
load: () =>
|
||||
import(
|
||||
/* webpackChunkName: "panel-config-scene" */ "./scene/ha-config-scene"
|
||||
),
|
||||
load: () => import("./scene/ha-config-scene"),
|
||||
},
|
||||
helpers: {
|
||||
tag: "ha-config-helpers",
|
||||
load: () =>
|
||||
import(
|
||||
/* webpackChunkName: "panel-config-helpers" */ "./helpers/ha-config-helpers"
|
||||
),
|
||||
load: () => import("./helpers/ha-config-helpers"),
|
||||
},
|
||||
users: {
|
||||
tag: "ha-config-users",
|
||||
load: () =>
|
||||
import(
|
||||
/* webpackChunkName: "panel-config-users" */ "./users/ha-config-users"
|
||||
),
|
||||
load: () => import("./users/ha-config-users"),
|
||||
},
|
||||
zone: {
|
||||
tag: "ha-config-zone",
|
||||
load: () =>
|
||||
import(
|
||||
/* webpackChunkName: "panel-config-zone" */ "./zone/ha-config-zone"
|
||||
),
|
||||
load: () => import("./zone/ha-config-zone"),
|
||||
},
|
||||
zha: {
|
||||
tag: "zha-config-dashboard-router",
|
||||
load: () =>
|
||||
import(
|
||||
/* webpackChunkName: "panel-config-zha" */ "./integrations/integration-panels/zha/zha-config-dashboard-router"
|
||||
"./integrations/integration-panels/zha/zha-config-dashboard-router"
|
||||
),
|
||||
},
|
||||
zwave: {
|
||||
tag: "ha-config-zwave",
|
||||
load: () =>
|
||||
import(
|
||||
/* webpackChunkName: "panel-config-zwave" */ "./integrations/integration-panels/zwave/ha-config-zwave"
|
||||
),
|
||||
import("./integrations/integration-panels/zwave/ha-config-zwave"),
|
||||
},
|
||||
mqtt: {
|
||||
tag: "mqtt-config-panel",
|
||||
load: () =>
|
||||
import(
|
||||
/* webpackChunkName: "panel-config-mqtt" */ "./integrations/integration-panels/mqtt/mqtt-config-panel"
|
||||
),
|
||||
import("./integrations/integration-panels/mqtt/mqtt-config-panel"),
|
||||
},
|
||||
ozw: {
|
||||
tag: "ozw-config-router",
|
||||
load: () =>
|
||||
import(
|
||||
/* webpackChunkName: "panel-config-ozw" */ "./integrations/integration-panels/ozw/ozw-config-router"
|
||||
),
|
||||
import("./integrations/integration-panels/ozw/ozw-config-router"),
|
||||
},
|
||||
},
|
||||
};
|
||||
|
@ -1,9 +1,6 @@
|
||||
import { fireEvent } from "../../../common/dom/fire_event";
|
||||
|
||||
export const loadHelperDetailDialog = () =>
|
||||
import(
|
||||
/* webpackChunkName: "helper-detail-dialog" */ "./dialog-helper-detail"
|
||||
);
|
||||
export const loadHelperDetailDialog = () => import("./dialog-helper-detail");
|
||||
|
||||
export const showHelperDetailDialog = (element: HTMLElement) => {
|
||||
fireEvent(element, "show-dialog", {
|
||||
|
@ -37,17 +37,11 @@ class OZWConfigRouter extends HassRouterPage {
|
||||
routes: {
|
||||
dashboard: {
|
||||
tag: "ozw-config-dashboard",
|
||||
load: () =>
|
||||
import(
|
||||
/* webpackChunkName: "ozw-config-dashboard" */ "./ozw-config-dashboard"
|
||||
),
|
||||
load: () => import("./ozw-config-dashboard"),
|
||||
},
|
||||
network: {
|
||||
tag: "ozw-network-router",
|
||||
load: () =>
|
||||
import(
|
||||
/* webpackChunkName: "ozw-network-router" */ "./ozw-network-router"
|
||||
),
|
||||
load: () => import("./ozw-network-router"),
|
||||
},
|
||||
},
|
||||
};
|
||||
|
@ -43,22 +43,15 @@ class OZWNetworkRouter extends HassRouterPage {
|
||||
routes: {
|
||||
dashboard: {
|
||||
tag: "ozw-network-dashboard",
|
||||
load: () =>
|
||||
import(
|
||||
/* webpackChunkName: "ozw-network-dashboard" */ "./ozw-network-dashboard"
|
||||
),
|
||||
load: () => import("./ozw-network-dashboard"),
|
||||
},
|
||||
nodes: {
|
||||
tag: "ozw-network-nodes",
|
||||
load: () =>
|
||||
import(
|
||||
/* webpackChunkName: "ozw-network-nodes" */ "./ozw-network-nodes"
|
||||
),
|
||||
load: () => import("./ozw-network-nodes"),
|
||||
},
|
||||
node: {
|
||||
tag: "ozw-node-router",
|
||||
load: () =>
|
||||
import(/* webpackChunkName: "ozw-node-router" */ "./ozw-node-router"),
|
||||
load: () => import("./ozw-node-router"),
|
||||
},
|
||||
},
|
||||
};
|
||||
|
@ -48,15 +48,11 @@ class OZWNodeRouter extends HassRouterPage {
|
||||
routes: {
|
||||
dashboard: {
|
||||
tag: "ozw-node-dashboard",
|
||||
load: () =>
|
||||
import(
|
||||
/* webpackChunkName: "ozw-node-dashboard" */ "./ozw-node-dashboard"
|
||||
),
|
||||
load: () => import("./ozw-node-dashboard"),
|
||||
},
|
||||
config: {
|
||||
tag: "ozw-node-config",
|
||||
load: () =>
|
||||
import(/* webpackChunkName: "ozw-node-config" */ "./ozw-node-config"),
|
||||
load: () => import("./ozw-node-config"),
|
||||
},
|
||||
},
|
||||
};
|
||||
|
@ -5,10 +5,7 @@ export interface OZWRefreshNodeDialogParams {
|
||||
node_id: number;
|
||||
}
|
||||
|
||||
export const loadRefreshNodeDialog = () =>
|
||||
import(
|
||||
/* webpackChunkName: "dialog-ozw-refresh-node" */ "./dialog-ozw-refresh-node"
|
||||
);
|
||||
export const loadRefreshNodeDialog = () => import("./dialog-ozw-refresh-node");
|
||||
|
||||
export const showOZWRefreshNodeDialog = (
|
||||
element: HTMLElement,
|
||||
|
@ -5,10 +5,7 @@ export interface ZHAClusterDialogParams {
|
||||
device: ZHADevice;
|
||||
}
|
||||
|
||||
export const loadZHAClusterDialog = () =>
|
||||
import(
|
||||
/* webpackChunkName: "dialog-zha-device-zigbee-info" */ "./dialog-zha-cluster"
|
||||
);
|
||||
export const loadZHAClusterDialog = () => import("./dialog-zha-cluster");
|
||||
|
||||
export const showZHAClusterDialog = (
|
||||
element: HTMLElement,
|
||||
|
@ -6,9 +6,7 @@ export interface ZHADeviceZigbeeInfoDialogParams {
|
||||
}
|
||||
|
||||
export const loadZHADeviceZigbeeInfoDialog = () =>
|
||||
import(
|
||||
/* webpackChunkName: "dialog-zha-device-zigbee-info" */ "./dialog-zha-device-zigbee-info"
|
||||
);
|
||||
import("./dialog-zha-device-zigbee-info");
|
||||
|
||||
export const showZHADeviceZigbeeInfoDialog = (
|
||||
element: HTMLElement,
|
||||
|
@ -24,36 +24,23 @@ class ZHAConfigDashboardRouter extends HassRouterPage {
|
||||
routes: {
|
||||
dashboard: {
|
||||
tag: "zha-config-dashboard",
|
||||
load: () =>
|
||||
import(
|
||||
/* webpackChunkName: "zha-config-dashboard" */ "./zha-config-dashboard"
|
||||
),
|
||||
load: () => import("./zha-config-dashboard"),
|
||||
},
|
||||
add: {
|
||||
tag: "zha-add-devices-page",
|
||||
load: () =>
|
||||
import(
|
||||
/* webpackChunkName: "zha-add-devices-page" */ "./zha-add-devices-page"
|
||||
),
|
||||
load: () => import("./zha-add-devices-page"),
|
||||
},
|
||||
groups: {
|
||||
tag: "zha-groups-dashboard",
|
||||
load: () =>
|
||||
import(
|
||||
/* webpackChunkName: "zha-groups-dashboard" */ "./zha-groups-dashboard"
|
||||
),
|
||||
load: () => import("./zha-groups-dashboard"),
|
||||
},
|
||||
group: {
|
||||
tag: "zha-group-page",
|
||||
load: () =>
|
||||
import(/* webpackChunkName: "zha-group-page" */ "./zha-group-page"),
|
||||
load: () => import("./zha-group-page"),
|
||||
},
|
||||
"group-add": {
|
||||
tag: "zha-add-group-page",
|
||||
load: () =>
|
||||
import(
|
||||
/* webpackChunkName: "zha-add-group-page" */ "./zha-add-group-page"
|
||||
),
|
||||
load: () => import("./zha-add-group-page"),
|
||||
},
|
||||
},
|
||||
};
|
||||
|
@ -137,10 +137,7 @@ class OzwLog extends LocalizeMixin(EventsMixin(PolymerElement)) {
|
||||
this.fire("register-dialog", {
|
||||
dialogShowEvent: "show-ozwlog-dialog",
|
||||
dialogTag: "zwave-log-dialog",
|
||||
dialogImport: () =>
|
||||
import(
|
||||
/* webpackChunkName: "zwave-log-dialog" */ "./zwave-log-dialog"
|
||||
),
|
||||
dialogImport: () => import("./zwave-log-dialog"),
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -20,10 +20,7 @@ const registerDialog = (element: HTMLElement) =>
|
||||
fireEvent(element, "register-dialog", {
|
||||
dialogShowEvent,
|
||||
dialogTag,
|
||||
dialogImport: () =>
|
||||
import(
|
||||
/* webpackChunkName: "system-log-detail-dialog" */ "./dialog-system-log-detail"
|
||||
),
|
||||
dialogImport: () => import("./dialog-system-log-detail"),
|
||||
});
|
||||
|
||||
export const showSystemLogDetailDialog = (
|
||||
|
@ -16,9 +16,7 @@ export interface LovelaceDashboardDetailsDialogParams {
|
||||
}
|
||||
|
||||
export const loadDashboardDetailDialog = () =>
|
||||
import(
|
||||
/* webpackChunkName: "lovelace-dashboard-detail-dialog" */ "./dialog-lovelace-dashboard-detail"
|
||||
);
|
||||
import("./dialog-lovelace-dashboard-detail");
|
||||
|
||||
export const showDashboardDetailDialog = (
|
||||
element: HTMLElement,
|
||||
|
@ -34,18 +34,12 @@ class HaConfigLovelace extends HassRouterPage {
|
||||
routes: {
|
||||
dashboards: {
|
||||
tag: "ha-config-lovelace-dashboards",
|
||||
load: () =>
|
||||
import(
|
||||
/* webpackChunkName: "panel-config-lovelace-dashboards" */ "./dashboards/ha-config-lovelace-dashboards"
|
||||
),
|
||||
load: () => import("./dashboards/ha-config-lovelace-dashboards"),
|
||||
cache: true,
|
||||
},
|
||||
resources: {
|
||||
tag: "ha-config-lovelace-resources",
|
||||
load: () =>
|
||||
import(
|
||||
/* webpackChunkName: "panel-config-lovelace-resources" */ "./resources/ha-config-lovelace-resources"
|
||||
),
|
||||
load: () => import("./resources/ha-config-lovelace-resources"),
|
||||
},
|
||||
},
|
||||
};
|
||||
|
@ -14,9 +14,7 @@ export interface LovelaceResourceDetailsDialogParams {
|
||||
}
|
||||
|
||||
export const loadResourceDetailDialog = () =>
|
||||
import(
|
||||
/* webpackChunkName: "lovelace-resource-detail-dialog" */ "./dialog-lovelace-resource-detail"
|
||||
);
|
||||
import("./dialog-lovelace-resource-detail");
|
||||
|
||||
export const showResourceDetailDialog = (
|
||||
element: HTMLElement,
|
||||
|
@ -11,10 +11,7 @@ export interface PersonDetailDialogParams {
|
||||
removeEntry: () => Promise<boolean>;
|
||||
}
|
||||
|
||||
export const loadPersonDetailDialog = () =>
|
||||
import(
|
||||
/* webpackChunkName: "person-detail-dialog" */ "./dialog-person-detail"
|
||||
);
|
||||
export const loadPersonDetailDialog = () => import("./dialog-person-detail");
|
||||
|
||||
export const showPersonDetailDialog = (
|
||||
element: HTMLElement,
|
||||
|
@ -12,8 +12,7 @@ export interface TagDetailDialogParams {
|
||||
removeEntry?: () => Promise<boolean>;
|
||||
}
|
||||
|
||||
export const loadTagDetailDialog = () =>
|
||||
import(/* webpackChunkName: "dialog-tag-detail" */ "./dialog-tag-detail");
|
||||
export const loadTagDetailDialog = () => import("./dialog-tag-detail");
|
||||
|
||||
export const showTagDetailDialog = (
|
||||
element: HTMLElement,
|
||||
|
@ -6,8 +6,7 @@ export interface AddUserDialogParams {
|
||||
name?: string;
|
||||
}
|
||||
|
||||
export const loadAddUserDialog = () =>
|
||||
import(/* webpackChunkName: "add-user-dialog" */ "./dialog-add-user");
|
||||
export const loadAddUserDialog = () => import("./dialog-add-user");
|
||||
|
||||
export const showAddUserDialog = (
|
||||
element: HTMLElement,
|
||||
|
@ -7,8 +7,7 @@ export interface UserDetailDialogParams {
|
||||
removeEntry: () => Promise<boolean>;
|
||||
}
|
||||
|
||||
export const loadUserDetailDialog = () =>
|
||||
import(/* webpackChunkName: "user-detail-dialog" */ "./dialog-user-detail");
|
||||
export const loadUserDetailDialog = () => import("./dialog-user-detail");
|
||||
|
||||
export const showUserDetailDialog = (
|
||||
element: HTMLElement,
|
||||
|
@ -8,8 +8,7 @@ export interface ZoneDetailDialogParams {
|
||||
removeEntry?: () => Promise<boolean>;
|
||||
}
|
||||
|
||||
export const loadZoneDetailDialog = () =>
|
||||
import(/* webpackChunkName: "zone-detail-dialog" */ "./dialog-zone-detail");
|
||||
export const loadZoneDetailDialog = () => import("./dialog-zone-detail");
|
||||
|
||||
export const showZoneDetailDialog = (
|
||||
element: HTMLElement,
|
||||
|
@ -42,9 +42,7 @@ const BUTTONS = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "", "0", "clear"];
|
||||
@customElement("hui-alarm-panel-card")
|
||||
class HuiAlarmPanelCard extends LitElement implements LovelaceCard {
|
||||
public static async getConfigElement() {
|
||||
await import(
|
||||
/* webpackChunkName: "hui-alarm-panel-card-editor" */ "../editor/config-elements/hui-alarm-panel-card-editor"
|
||||
);
|
||||
await import("../editor/config-elements/hui-alarm-panel-card-editor");
|
||||
return document.createElement("hui-alarm-panel-card-editor");
|
||||
}
|
||||
|
||||
|
@ -41,9 +41,7 @@ import { ButtonCardConfig } from "./types";
|
||||
@customElement("hui-button-card")
|
||||
export class HuiButtonCard extends LitElement implements LovelaceCard {
|
||||
public static async getConfigElement(): Promise<LovelaceCardEditor> {
|
||||
await import(
|
||||
/* webpackChunkName: "hui-button-card-editor" */ "../editor/config-elements/hui-button-card-editor"
|
||||
);
|
||||
await import("../editor/config-elements/hui-button-card-editor");
|
||||
return document.createElement("hui-button-card-editor");
|
||||
}
|
||||
|
||||
|
@ -35,9 +35,7 @@ import type { CalendarCardConfig } from "./types";
|
||||
@customElement("hui-calendar-card")
|
||||
export class HuiCalendarCard extends LitElement implements LovelaceCard {
|
||||
public static async getConfigElement(): Promise<LovelaceCardEditor> {
|
||||
await import(
|
||||
/* webpackChunkName: "hui-calendar-card-editor" */ "../editor/config-elements/hui-calendar-card-editor"
|
||||
);
|
||||
await import("../editor/config-elements/hui-calendar-card-editor");
|
||||
return document.createElement("hui-calendar-card-editor");
|
||||
}
|
||||
|
||||
|
@ -9,9 +9,7 @@ import { ConditionalCardConfig } from "./types";
|
||||
@customElement("hui-conditional-card")
|
||||
class HuiConditionalCard extends HuiConditionalBase implements LovelaceCard {
|
||||
public static async getConfigElement(): Promise<LovelaceCardEditor> {
|
||||
await import(
|
||||
/* webpackChunkName: "hui-conditional-card-editor" */ "../editor/config-elements/hui-conditional-card-editor"
|
||||
);
|
||||
await import("../editor/config-elements/hui-conditional-card-editor");
|
||||
return document.createElement("hui-conditional-card-editor");
|
||||
}
|
||||
|
||||
|
@ -34,9 +34,7 @@ import { EntitiesCardConfig } from "./types";
|
||||
@customElement("hui-entities-card")
|
||||
class HuiEntitiesCard extends LitElement implements LovelaceCard {
|
||||
public static async getConfigElement(): Promise<LovelaceCardEditor> {
|
||||
await import(
|
||||
/* webpackChunkName: "hui-entities-card-editor" */ "../editor/config-elements/hui-entities-card-editor"
|
||||
);
|
||||
await import("../editor/config-elements/hui-entities-card-editor");
|
||||
return document.createElement("hui-entities-card-editor");
|
||||
}
|
||||
|
||||
|
@ -35,9 +35,7 @@ import { computeCardSize } from "../common/compute-card-size";
|
||||
@customElement("hui-entity-card")
|
||||
export class HuiEntityCard extends LitElement implements LovelaceCard {
|
||||
public static async getConfigElement(): Promise<LovelaceCardEditor> {
|
||||
await import(
|
||||
/* webpackChunkName: "hui-entity-card-editor" */ "../editor/config-elements/hui-entity-card-editor"
|
||||
);
|
||||
await import("../editor/config-elements/hui-entity-card-editor");
|
||||
return document.createElement("hui-entity-card-editor");
|
||||
}
|
||||
|
||||
|
@ -35,9 +35,7 @@ export const severityMap = {
|
||||
@customElement("hui-gauge-card")
|
||||
class HuiGaugeCard extends LitElement implements LovelaceCard {
|
||||
public static async getConfigElement(): Promise<LovelaceCardEditor> {
|
||||
await import(
|
||||
/* webpackChunkName: "hui-gauge-card-editor" */ "../editor/config-elements/hui-gauge-card-editor"
|
||||
);
|
||||
await import("../editor/config-elements/hui-gauge-card-editor");
|
||||
return document.createElement("hui-gauge-card-editor");
|
||||
}
|
||||
|
||||
|
@ -40,9 +40,7 @@ import { GlanceCardConfig, GlanceConfigEntity } from "./types";
|
||||
@customElement("hui-glance-card")
|
||||
export class HuiGlanceCard extends LitElement implements LovelaceCard {
|
||||
public static async getConfigElement(): Promise<LovelaceCardEditor> {
|
||||
await import(
|
||||
/* webpackChunkName: "hui-glance-card-editor" */ "../editor/config-elements/hui-glance-card-editor"
|
||||
);
|
||||
await import("../editor/config-elements/hui-glance-card-editor");
|
||||
return document.createElement("hui-glance-card-editor");
|
||||
}
|
||||
|
||||
|
@ -26,9 +26,7 @@ import { HistoryGraphCardConfig } from "./types";
|
||||
@customElement("hui-history-graph-card")
|
||||
export class HuiHistoryGraphCard extends LitElement implements LovelaceCard {
|
||||
public static async getConfigElement() {
|
||||
await import(
|
||||
/* webpackChunkName: "hui-history-graph-card-editor" */ "../editor/config-elements/hui-history-graph-card-editor"
|
||||
);
|
||||
await import("../editor/config-elements/hui-history-graph-card-editor");
|
||||
return document.createElement("hui-history-graph-card-editor");
|
||||
}
|
||||
|
||||
|
@ -30,9 +30,7 @@ import { HumidifierCardConfig } from "./types";
|
||||
@customElement("hui-humidifier-card")
|
||||
export class HuiHumidifierCard extends LitElement implements LovelaceCard {
|
||||
public static async getConfigElement(): Promise<LovelaceCardEditor> {
|
||||
await import(
|
||||
/* webpackChunkName: "hui-humidifier-card-editor" */ "../editor/config-elements/hui-humidifier-card-editor"
|
||||
);
|
||||
await import("../editor/config-elements/hui-humidifier-card-editor");
|
||||
return document.createElement("hui-humidifier-card-editor");
|
||||
}
|
||||
|
||||
|
@ -16,9 +16,7 @@ import { IframeCardConfig } from "./types";
|
||||
@customElement("hui-iframe-card")
|
||||
export class HuiIframeCard extends LitElement implements LovelaceCard {
|
||||
public static async getConfigElement(): Promise<LovelaceCardEditor> {
|
||||
await import(
|
||||
/* webpackChunkName: "hui-iframe-card-editor" */ "../editor/config-elements/hui-iframe-card-editor"
|
||||
);
|
||||
await import("../editor/config-elements/hui-iframe-card-editor");
|
||||
return document.createElement("hui-iframe-card-editor");
|
||||
}
|
||||
|
||||
|
@ -37,9 +37,7 @@ import { LightCardConfig } from "./types";
|
||||
@customElement("hui-light-card")
|
||||
export class HuiLightCard extends LitElement implements LovelaceCard {
|
||||
public static async getConfigElement(): Promise<LovelaceCardEditor> {
|
||||
await import(
|
||||
/* webpackChunkName: "hui-light-card-editor" */ "../editor/config-elements/hui-light-card-editor"
|
||||
);
|
||||
await import("../editor/config-elements/hui-light-card-editor");
|
||||
return document.createElement("hui-light-card-editor");
|
||||
}
|
||||
|
||||
|
@ -29,9 +29,7 @@ import type { LogbookCardConfig } from "./types";
|
||||
@customElement("hui-logbook-card")
|
||||
export class HuiLogbookCard extends LitElement implements LovelaceCard {
|
||||
public static async getConfigElement(): Promise<LovelaceCardEditor> {
|
||||
await import(
|
||||
/* webpackChunkName: "hui-logbook-card-editor" */ "../editor/config-elements/hui-logbook-card-editor"
|
||||
);
|
||||
await import("../editor/config-elements/hui-logbook-card-editor");
|
||||
return document.createElement("hui-logbook-card-editor");
|
||||
}
|
||||
|
||||
|
@ -45,9 +45,7 @@ import { MapCardConfig } from "./types";
|
||||
@customElement("hui-map-card")
|
||||
class HuiMapCard extends LitElement implements LovelaceCard {
|
||||
public static async getConfigElement() {
|
||||
await import(
|
||||
/* webpackChunkName: "hui-map-card-editor" */ "../editor/config-elements/hui-map-card-editor"
|
||||
);
|
||||
await import("../editor/config-elements/hui-map-card-editor");
|
||||
return document.createElement("hui-map-card-editor");
|
||||
}
|
||||
|
||||
|
@ -25,9 +25,7 @@ import type { MarkdownCardConfig } from "./types";
|
||||
@customElement("hui-markdown-card")
|
||||
export class HuiMarkdownCard extends LitElement implements LovelaceCard {
|
||||
public static async getConfigElement(): Promise<LovelaceCardEditor> {
|
||||
await import(
|
||||
/* webpackChunkName: "hui-markdown-card-editor" */ "../editor/config-elements/hui-markdown-card-editor"
|
||||
);
|
||||
await import("../editor/config-elements/hui-markdown-card-editor");
|
||||
return document.createElement("hui-markdown-card-editor");
|
||||
}
|
||||
|
||||
|
@ -161,9 +161,7 @@ const customGenerator = (colors: Swatch[]) => {
|
||||
@customElement("hui-media-control-card")
|
||||
export class HuiMediaControlCard extends LitElement implements LovelaceCard {
|
||||
public static async getConfigElement(): Promise<LovelaceCardEditor> {
|
||||
await import(
|
||||
/* webpackChunkName: "hui-media-control-card-editor" */ "../editor/config-elements/hui-media-control-card-editor"
|
||||
);
|
||||
await import("../editor/config-elements/hui-media-control-card-editor");
|
||||
return document.createElement("hui-media-control-card-editor");
|
||||
}
|
||||
|
||||
|
@ -23,9 +23,7 @@ import { PictureCardConfig } from "./types";
|
||||
@customElement("hui-picture-card")
|
||||
export class HuiPictureCard extends LitElement implements LovelaceCard {
|
||||
public static async getConfigElement(): Promise<LovelaceCardEditor> {
|
||||
await import(
|
||||
/* webpackChunkName: "hui-picture-card-editor" */ "../editor/config-elements/hui-picture-card-editor"
|
||||
);
|
||||
await import("../editor/config-elements/hui-picture-card-editor");
|
||||
return document.createElement("hui-picture-card-editor");
|
||||
}
|
||||
|
||||
|
@ -32,9 +32,7 @@ import { PictureEntityCardConfig } from "./types";
|
||||
@customElement("hui-picture-entity-card")
|
||||
class HuiPictureEntityCard extends LitElement implements LovelaceCard {
|
||||
public static async getConfigElement(): Promise<LovelaceCardEditor> {
|
||||
await import(
|
||||
/* webpackChunkName: "hui-picture-entity-card-editor" */ "../editor/config-elements/hui-picture-entity-card-editor"
|
||||
);
|
||||
await import("../editor/config-elements/hui-picture-entity-card-editor");
|
||||
return document.createElement("hui-picture-entity-card-editor");
|
||||
}
|
||||
|
||||
|
@ -38,9 +38,7 @@ const STATES_OFF = new Set(["closed", "locked", "not_home", "off"]);
|
||||
@customElement("hui-picture-glance-card")
|
||||
class HuiPictureGlanceCard extends LitElement implements LovelaceCard {
|
||||
public static async getConfigElement(): Promise<LovelaceCardEditor> {
|
||||
await import(
|
||||
/* webpackChunkName: "hui-picture-glance-card-editor" */ "../editor/config-elements/hui-picture-glance-card-editor"
|
||||
);
|
||||
await import("../editor/config-elements/hui-picture-glance-card-editor");
|
||||
return document.createElement("hui-picture-glance-card-editor");
|
||||
}
|
||||
|
||||
|
@ -34,9 +34,7 @@ const SENSORS = {
|
||||
@customElement("hui-plant-status-card")
|
||||
class HuiPlantStatusCard extends LitElement implements LovelaceCard {
|
||||
public static async getConfigElement(): Promise<LovelaceCardEditor> {
|
||||
await import(
|
||||
/* webpackChunkName: "hui-plant-status-card-editor" */ "../editor/config-elements/hui-plant-status-card-editor"
|
||||
);
|
||||
await import("../editor/config-elements/hui-plant-status-card-editor");
|
||||
return document.createElement("hui-plant-status-card-editor");
|
||||
}
|
||||
|
||||
|
@ -10,9 +10,7 @@ import { EntityCardConfig, SensorCardConfig } from "./types";
|
||||
@customElement("hui-sensor-card")
|
||||
class HuiSensorCard extends HuiEntityCard {
|
||||
public static async getConfigElement(): Promise<LovelaceCardEditor> {
|
||||
await import(
|
||||
/* webpackChunkName: "hui-sensor-card-editor" */ "../editor/config-elements/hui-sensor-card-editor"
|
||||
);
|
||||
await import("../editor/config-elements/hui-sensor-card-editor");
|
||||
return document.createElement("hui-sensor-card-editor");
|
||||
}
|
||||
|
||||
|
@ -33,9 +33,7 @@ import { SensorCardConfig, ShoppingListCardConfig } from "./types";
|
||||
class HuiShoppingListCard extends SubscribeMixin(LitElement)
|
||||
implements LovelaceCard {
|
||||
public static async getConfigElement(): Promise<LovelaceCardEditor> {
|
||||
await import(
|
||||
/* webpackChunkName: "hui-shopping-list-editor" */ "../editor/config-elements/hui-shopping-list-editor"
|
||||
);
|
||||
await import("../editor/config-elements/hui-shopping-list-editor");
|
||||
return document.createElement("hui-shopping-list-card-editor");
|
||||
}
|
||||
|
||||
|
@ -18,9 +18,7 @@ export abstract class HuiStackCard<T extends StackCardConfig = StackCardConfig>
|
||||
extends LitElement
|
||||
implements LovelaceCard {
|
||||
public static async getConfigElement(): Promise<LovelaceCardEditor> {
|
||||
await import(
|
||||
/* webpackChunkName: "hui-stack-card-editor" */ "../editor/config-elements/hui-stack-card-editor"
|
||||
);
|
||||
await import("../editor/config-elements/hui-stack-card-editor");
|
||||
return document.createElement("hui-stack-card-editor");
|
||||
}
|
||||
|
||||
|
@ -49,9 +49,7 @@ const modeIcons: { [mode in HvacMode]: string } = {
|
||||
@customElement("hui-thermostat-card")
|
||||
export class HuiThermostatCard extends LitElement implements LovelaceCard {
|
||||
public static async getConfigElement(): Promise<LovelaceCardEditor> {
|
||||
await import(
|
||||
/* webpackChunkName: "hui-thermostat-card-editor" */ "../editor/config-elements/hui-thermostat-card-editor"
|
||||
);
|
||||
await import("../editor/config-elements/hui-thermostat-card-editor");
|
||||
return document.createElement("hui-thermostat-card-editor");
|
||||
}
|
||||
|
||||
|
@ -41,9 +41,7 @@ const DAY_IN_MILLISECONDS = 86400000;
|
||||
@customElement("hui-weather-forecast-card")
|
||||
class HuiWeatherForecastCard extends LitElement implements LovelaceCard {
|
||||
public static async getConfigElement(): Promise<LovelaceCardEditor> {
|
||||
await import(
|
||||
/* webpackChunkName: "hui-weather-forecast-card-editor" */ "../editor/config-elements/hui-weather-forecast-card-editor"
|
||||
);
|
||||
await import("../editor/config-elements/hui-weather-forecast-card-editor");
|
||||
return document.createElement("hui-weather-forecast-card-editor");
|
||||
}
|
||||
|
||||
|
@ -8,10 +8,7 @@ export interface CreateCardDialogParams {
|
||||
entities?: string[]; // We can pass entity id's that will be added to the config when a card is picked
|
||||
}
|
||||
|
||||
const importCreateCardDialog = () =>
|
||||
import(
|
||||
/* webpackChunkName: "hui-dialog-create-card" */ "./hui-dialog-create-card"
|
||||
);
|
||||
const importCreateCardDialog = () => import("./hui-dialog-create-card");
|
||||
|
||||
export const showCreateCardDialog = (
|
||||
element: HTMLElement,
|
||||
|
@ -6,10 +6,7 @@ export interface DeleteCardDialogParams {
|
||||
cardConfig?: LovelaceCardConfig;
|
||||
}
|
||||
|
||||
const importDeleteCardDialog = () =>
|
||||
import(
|
||||
/* webpackChunkName: "hui-dialog-delete-card" */ "./hui-dialog-delete-card"
|
||||
);
|
||||
const importDeleteCardDialog = () => import("./hui-dialog-delete-card");
|
||||
|
||||
export const showDeleteCardDialog = (
|
||||
element: HTMLElement,
|
||||
|
@ -8,10 +8,7 @@ export interface EditCardDialogParams {
|
||||
cardConfig?: LovelaceCardConfig;
|
||||
}
|
||||
|
||||
const importEditCardDialog = () =>
|
||||
import(
|
||||
/* webpackChunkName: "hui-dialog-edit-card" */ "./hui-dialog-edit-card"
|
||||
);
|
||||
const importEditCardDialog = () => import("./hui-dialog-edit-card");
|
||||
|
||||
export const showEditCardDialog = (
|
||||
element: HTMLElement,
|
||||
|
@ -10,10 +10,7 @@ export interface SuggestCardDialogParams {
|
||||
cardConfig?: LovelaceCardConfig[]; // We can pass a suggested config
|
||||
}
|
||||
|
||||
const importsuggestCardDialog = () =>
|
||||
import(
|
||||
/* webpackChunkName: "hui-dialog-suggest-card" */ "./hui-dialog-suggest-card"
|
||||
);
|
||||
const importsuggestCardDialog = () => import("./hui-dialog-suggest-card");
|
||||
|
||||
export const showSuggestCardDialog = (
|
||||
element: HTMLElement,
|
||||
|
@ -8,9 +8,7 @@ export interface CreateHeaderFooterDialogParams {
|
||||
}
|
||||
|
||||
const importCreateHeaderFooterDialog = () =>
|
||||
import(
|
||||
/* webpackChunkName: "hui-dialog-create-headerfooter" */ "./hui-dialog-create-headerfooter"
|
||||
);
|
||||
import("./hui-dialog-create-headerfooter");
|
||||
|
||||
export const showCreateHeaderFooterDialog = (
|
||||
element: HTMLElement,
|
||||
|
@ -16,10 +16,7 @@ const registerEditLovelaceDialog = (element: HTMLElement): Event =>
|
||||
fireEvent(element, "register-dialog", {
|
||||
dialogShowEvent,
|
||||
dialogTag,
|
||||
dialogImport: () =>
|
||||
import(
|
||||
/* webpackChunkName: "hui-dialog-edit-lovelace" */ "./hui-dialog-edit-lovelace"
|
||||
),
|
||||
dialogImport: () => import("./hui-dialog-edit-lovelace"),
|
||||
});
|
||||
|
||||
export const showEditLovelaceDialog = (
|
||||
|
@ -20,10 +20,7 @@ export const showSelectViewDialog = (
|
||||
): void => {
|
||||
fireEvent(element, "show-dialog", {
|
||||
dialogTag: "hui-dialog-select-view",
|
||||
dialogImport: () =>
|
||||
import(
|
||||
/* webpackChunkName: "hui-dialog-select-view" */ "./hui-dialog-select-view"
|
||||
),
|
||||
dialogImport: () => import("./hui-dialog-select-view"),
|
||||
dialogParams: selectViewDialogParams,
|
||||
});
|
||||
};
|
||||
|
@ -27,10 +27,7 @@ export const showSaveDialog = (
|
||||
fireEvent(element, "register-dialog", {
|
||||
dialogShowEvent,
|
||||
dialogTag,
|
||||
dialogImport: () =>
|
||||
import(
|
||||
/* webpackChunkName: "hui-dialog-save-config" */ "./hui-dialog-save-config"
|
||||
),
|
||||
dialogImport: () => import("./hui-dialog-save-config"),
|
||||
});
|
||||
}
|
||||
fireEvent(element, dialogShowEvent, saveDialogParams);
|
||||
|
@ -28,10 +28,7 @@ const registerEditViewDialog = (element: HTMLElement): Event =>
|
||||
fireEvent(element, "register-dialog", {
|
||||
dialogShowEvent,
|
||||
dialogTag,
|
||||
dialogImport: () =>
|
||||
import(
|
||||
/* webpackChunkName: "hui-dialog-edit-view" */ "./hui-dialog-edit-view"
|
||||
),
|
||||
dialogImport: () => import("./hui-dialog-edit-view"),
|
||||
});
|
||||
|
||||
export const showEditViewDialog = (
|
||||
|
@ -289,7 +289,7 @@ class LovelacePanel extends LitElement {
|
||||
enableFullEditMode: () => {
|
||||
if (!editorLoaded) {
|
||||
editorLoaded = true;
|
||||
import(/* webpackChunkName: "lovelace-yaml-editor" */ "./hui-editor");
|
||||
import("./hui-editor");
|
||||
}
|
||||
this._state = "yaml-editor";
|
||||
},
|
||||
|
@ -27,9 +27,7 @@ const DAY = 86400000;
|
||||
export class HuiGraphHeaderFooter extends LitElement
|
||||
implements LovelaceHeaderFooter {
|
||||
public static async getConfigElement(): Promise<LovelaceHeaderFooterEditor> {
|
||||
await import(
|
||||
/* webpackChunkName: "hui-graph-footer-editor" */ "../editor/config-elements/hui-graph-footer-editor"
|
||||
);
|
||||
await import("../editor/config-elements/hui-graph-footer-editor");
|
||||
return document.createElement("hui-graph-footer-editor");
|
||||
}
|
||||
|
||||
|
@ -734,9 +734,7 @@ class HUIRoot extends LitElement {
|
||||
if (viewIndex === "hass-unused-entities") {
|
||||
const unusedEntities = document.createElement("hui-unused-entities");
|
||||
// Wait for promise to resolve so that the element has been upgraded.
|
||||
import(
|
||||
/* webpackChunkName: "hui-unused-entities" */ "./editor/unused-entities/hui-unused-entities"
|
||||
).then(() => {
|
||||
import("./editor/unused-entities/hui-unused-entities").then(() => {
|
||||
unusedEntities.hass = this.hass!;
|
||||
unusedEntities.lovelace = this.lovelace!;
|
||||
unusedEntities.narrow = this.narrow;
|
||||
|
@ -114,9 +114,7 @@ export class MasonryView extends LitElement implements LovelaceViewElement {
|
||||
|
||||
if (this.lovelace?.editMode && !editCodeLoaded) {
|
||||
editCodeLoaded = true;
|
||||
import(
|
||||
/* webpackChunkName: "default-layout-editable" */ "./default-view-editable"
|
||||
);
|
||||
import("./default-view-editable");
|
||||
}
|
||||
|
||||
if (changedProperties.has("hass")) {
|
||||
|
@ -47,9 +47,7 @@ export class PanelView extends LitElement implements LovelaceViewElement {
|
||||
|
||||
if (this.lovelace?.editMode && !editCodeLoaded) {
|
||||
editCodeLoaded = true;
|
||||
import(
|
||||
/* webpackChunkName: "default-layout-editable" */ "./default-view-editable"
|
||||
);
|
||||
import("./default-view-editable");
|
||||
}
|
||||
|
||||
if (changedProperties.has("cards")) {
|
||||
|
@ -162,10 +162,7 @@ class HaPanelMailbox extends EventsMixin(LocalizeMixin(PolymerElement)) {
|
||||
this.fire("register-dialog", {
|
||||
dialogShowEvent: "show-audio-message-dialog",
|
||||
dialogTag: "ha-dialog-show-audio-message",
|
||||
dialogImport: () =>
|
||||
import(
|
||||
/* webpackChunkName: "ha-dialog-show-audio-message" */ "./ha-dialog-show-audio-message"
|
||||
),
|
||||
dialogImport: () => import("./ha-dialog-show-audio-message"),
|
||||
});
|
||||
}
|
||||
this.hassChanged = this.hassChanged.bind(this);
|
||||
|
@ -12,10 +12,7 @@ export const showWebBrowserPlayMediaDialog = (
|
||||
): void => {
|
||||
fireEvent(element, "show-dialog", {
|
||||
dialogTag: "hui-dialog-web-browser-play-media",
|
||||
dialogImport: () =>
|
||||
import(
|
||||
/* webpackChunkName: "hui-dialog-media-player" */ "./hui-dialog-web-browser-play-media"
|
||||
),
|
||||
dialogImport: () => import("./hui-dialog-web-browser-play-media"),
|
||||
dialogParams: webBrowserPlayMediaDialogParams,
|
||||
});
|
||||
};
|
||||
|
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