Drop webpackChunkName (#7778)

This commit is contained in:
Paulus Schoutsen 2020-11-23 10:39:40 +01:00 committed by GitHub
parent cd07553b59
commit 6d4569c89d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
107 changed files with 165 additions and 545 deletions

View File

@ -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

View File

@ -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);

View File

@ -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,
});
};

View File

@ -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,
});
};

View File

@ -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: {},
});
};

View File

@ -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,
});
};

View File

@ -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,
});
};

View File

@ -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,
});
};

View File

@ -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"),
},
},
};

View File

@ -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;

View File

@ -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);

View File

@ -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;

View File

@ -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> `;

View File

@ -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) {

View File

@ -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,
});
};

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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", {

View File

@ -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
);

View File

@ -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,

View File

@ -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",

View File

@ -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!);

View File

@ -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 => {

View File

@ -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

View File

@ -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() {

View File

@ -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,

View File

@ -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", {

View File

@ -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,

View File

@ -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,

View File

@ -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,
});
};

View File

@ -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,
});
};

View File

@ -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"),
},
},
};

View File

@ -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,

View File

@ -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,

View File

@ -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

View File

@ -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"),
},
},
};

View File

@ -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", {

View File

@ -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"),
},
},
};

View File

@ -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"),
},
},
};

View File

@ -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"),
},
},
};

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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"),
},
},
};

View File

@ -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"),
});
}
}

View File

@ -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 = (

View File

@ -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,

View File

@ -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"),
},
},
};

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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");
}

View File

@ -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");
}

View File

@ -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");
}

View File

@ -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");
}

View File

@ -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");
}

View File

@ -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");
}

View File

@ -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");
}

View File

@ -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");
}

View File

@ -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");
}

View File

@ -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");
}

View File

@ -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");
}

View File

@ -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");
}

View File

@ -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");
}

View File

@ -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");
}

View File

@ -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");
}

View File

@ -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");
}

View File

@ -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");
}

View File

@ -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");
}

View File

@ -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");
}

View File

@ -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");
}

View File

@ -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");
}

View File

@ -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");
}

View File

@ -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");
}

View File

@ -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");
}

View File

@ -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");
}

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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 = (

View File

@ -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,
});
};

View File

@ -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);

View File

@ -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 = (

View File

@ -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";
},

View File

@ -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");
}

View File

@ -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;

View File

@ -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")) {

View File

@ -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")) {

View File

@ -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);

View File

@ -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