From 297c72122999d92edb4b73098d3fc8c334d3c865 Mon Sep 17 00:00:00 2001 From: Bram Kragten Date: Wed, 7 Feb 2024 15:24:14 +0100 Subject: [PATCH 001/425] Matter cleanup on close dialog (#19714) --- .../integration-panels/matter/dialog-matter-ping-node.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/panels/config/integrations/integration-panels/matter/dialog-matter-ping-node.ts b/src/panels/config/integrations/integration-panels/matter/dialog-matter-ping-node.ts index 738523d16d4b..63aec257bf5b 100644 --- a/src/panels/config/integrations/integration-panels/matter/dialog-matter-ping-node.ts +++ b/src/panels/config/integrations/integration-panels/matter/dialog-matter-ping-node.ts @@ -146,6 +146,7 @@ class DialogMatterPingNode extends LitElement { public closeDialog(): void { this.device_id = undefined; this._status = undefined; + this._pingResult = undefined; fireEvent(this, "dialog-closed", { dialog: this.localName }); } From 6671d24fa697ecd6c7bde0e8ddf3383875b140f7 Mon Sep 17 00:00:00 2001 From: Bram Kragten Date: Wed, 7 Feb 2024 15:52:04 +0100 Subject: [PATCH 002/425] Improve matter ping dialog (#19715) --- .../matter/dialog-matter-ping-node.ts | 64 ++++++++----------- 1 file changed, 27 insertions(+), 37 deletions(-) diff --git a/src/panels/config/integrations/integration-panels/matter/dialog-matter-ping-node.ts b/src/panels/config/integrations/integration-panels/matter/dialog-matter-ping-node.ts index 63aec257bf5b..77ec91ee245b 100644 --- a/src/panels/config/integrations/integration-panels/matter/dialog-matter-ping-node.ts +++ b/src/panels/config/integrations/integration-panels/matter/dialog-matter-ping-node.ts @@ -1,12 +1,12 @@ import "@material/mwc-button/mwc-button"; -import { mdiCheckCircle, mdiCloseCircle } from "@mdi/js"; +import { mdiAlertCircle, mdiCheckCircle, mdiCloseCircle } from "@mdi/js"; import { css, CSSResultGroup, html, LitElement, nothing } from "lit"; import { customElement, property, state } from "lit/decorators"; import { fireEvent } from "../../../../../common/dom/fire_event"; import "../../../../../components/ha-circular-progress"; import { createCloseHeading } from "../../../../../components/ha-dialog"; import { pingMatterNode, MatterPingResult } from "../../../../../data/matter"; -import { haStyleDialog } from "../../../../../resources/styles"; +import { haStyle, haStyleDialog } from "../../../../../resources/styles"; import { HomeAssistant } from "../../../../../types"; import { MatterPingNodeDialogParams } from "./show-dialog-matter-ping-node"; @@ -40,33 +40,24 @@ class DialogMatterPingNode extends LitElement { > ${this._pingResult ? html` -
- -
-

- ${this.hass.localize( - "ui.panel.config.matter.ping_node.ping_complete" - )} -

-
-
-
- - ${Object.entries(this._pingResult).map( - ([ip, success]) => - html`${ip} - - ` - )} - -
+

+ ${this.hass.localize( + "ui.panel.config.matter.ping_node.ping_complete" + )} +

+ + ${Object.entries(this._pingResult).map( + ([ip, success]) => + html`${ip} + + ` + )} + ${this.hass.localize("ui.common.close")} @@ -146,12 +137,12 @@ class DialogMatterPingNode extends LitElement { public closeDialog(): void { this.device_id = undefined; this._status = undefined; - this._pingResult = undefined; fireEvent(this, "dialog-closed", { dialog: this.localName }); } static get styles(): CSSResultGroup { return [ + haStyle, haStyleDialog, css` .success { @@ -171,23 +162,22 @@ class DialogMatterPingNode extends LitElement { margin-top: 16px; } - .stage ha-svg-icon { - width: 16px; - height: 16px; - } .stage { padding: 8px; } - ha-svg-icon { - width: 68px; - height: 48px; + mwc-list { + --mdc-list-side-padding: 0; } .flex-container ha-circular-progress, .flex-container ha-svg-icon { margin-right: 20px; } + .flex-container ha-svg-icon { + width: 68px; + height: 48px; + } `, ]; } From 989057d947178ba4fac1eec76af5bd58c1e52469 Mon Sep 17 00:00:00 2001 From: Paul Bottein Date: Wed, 7 Feb 2024 19:42:39 +0100 Subject: [PATCH 003/425] Show icon of disabled entities (#19717) --- .../entity-registry-settings-editor.ts | 15 +++++----- .../config/entities/ha-config-entities.ts | 28 +++++++++++++------ 2 files changed, 28 insertions(+), 15 deletions(-) diff --git a/src/panels/config/entities/entity-registry-settings-editor.ts b/src/panels/config/entities/entity-registry-settings-editor.ts index 41b70f48758a..03102930afb1 100644 --- a/src/panels/config/entities/entity-registry-settings-editor.ts +++ b/src/panels/config/entities/entity-registry-settings-editor.ts @@ -31,11 +31,11 @@ import "../../../components/ha-area-picker"; import "../../../components/ha-icon"; import "../../../components/ha-icon-button-next"; import "../../../components/ha-icon-picker"; -import "../../../components/ha-state-icon"; import "../../../components/ha-list-item"; import "../../../components/ha-radio"; import "../../../components/ha-select"; import "../../../components/ha-settings-row"; +import "../../../components/ha-state-icon"; import "../../../components/ha-switch"; import type { HaSwitch } from "../../../components/ha-switch"; import "../../../components/ha-textfield"; @@ -52,10 +52,6 @@ import { createConfigFlow, handleConfigFlowStep, } from "../../../data/config_flow"; -import { - createOptionsFlow, - handleOptionsFlowStep, -} from "../../../data/options_flow"; import { DataEntryFlowStepCreateEntry } from "../../../data/data_entry_flow"; import { DeviceRegistryEntry, @@ -70,9 +66,13 @@ import { subscribeEntityRegistry, updateEntityRegistryEntry, } from "../../../data/entity_registry"; -import { entityIcon } from "../../../data/icons"; +import { entityIcon, entryIcon } from "../../../data/icons"; import { domainToName } from "../../../data/integration"; import { getNumberDeviceClassConvertibleUnits } from "../../../data/number"; +import { + createOptionsFlow, + handleOptionsFlowStep, +} from "../../../data/options_flow"; import { getSensorDeviceClassConvertibleUnits, getSensorNumericDeviceClasses, @@ -392,7 +392,8 @@ export class EntityRegistrySettingsEditor extends LitElement { )} .placeholder=${this.entry.original_icon || stateObj?.attributes.icon || - (stateObj && until(entityIcon(this.hass, stateObj)))} + (stateObj && until(entityIcon(this.hass, stateObj))) || + until(entryIcon(this.hass, this.entry))} .disabled=${this.disabled} > ${!this._icon && !stateObj?.attributes.icon && stateObj diff --git a/src/panels/config/entities/ha-config-entities.ts b/src/panels/config/entities/ha-config-entities.ts index 0599d1e75e9d..6ca9b07bccec 100644 --- a/src/panels/config/entities/ha-config-entities.ts +++ b/src/panels/config/entities/ha-config-entities.ts @@ -25,6 +25,7 @@ import { customElement, property, query, state } from "lit/decorators"; import { classMap } from "lit/directives/class-map"; import { ifDefined } from "lit/directives/if-defined"; import { styleMap } from "lit/directives/style-map"; +import { until } from "lit/directives/until"; import memoize from "memoize-one"; import type { HASSDomEvent } from "../../../common/dom/fire_event"; import { computeDomain } from "../../../common/entity/compute_domain"; @@ -42,6 +43,7 @@ import type { } from "../../../components/data-table/ha-data-table"; import "../../../components/ha-button-menu"; import "../../../components/ha-check-list-item"; +import "../../../components/ha-icon"; import "../../../components/ha-icon-button"; import "../../../components/ha-svg-icon"; import { ConfigEntry, getConfigEntries } from "../../../data/config_entries"; @@ -53,6 +55,7 @@ import { removeEntityRegistryEntry, updateEntityRegistryEntry, } from "../../../data/entity_registry"; +import { entryIcon } from "../../../data/icons"; import { domainToName } from "../../../data/integration"; import { showAlertDialog, @@ -207,14 +210,23 @@ export class HaConfigEntities extends LitElement { title: "", label: localize("ui.panel.config.entities.picker.headers.state_icon"), type: "icon", - template: (entry) => html` - - `, + template: (entry) => + entry.icon + ? html` + + ` + : html` + + `, }, name: { main: true, From 4b768f06354e66c46e0890c0ba119284be24c1ba Mon Sep 17 00:00:00 2001 From: Paul Bottein Date: Thu, 8 Feb 2024 12:04:23 +0100 Subject: [PATCH 004/425] Use rgb theme variables for qrcode (#19726) --- src/components/ha-qr-code.ts | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/src/components/ha-qr-code.ts b/src/components/ha-qr-code.ts index 47190c180c36..ce9109e1ed1a 100644 --- a/src/components/ha-qr-code.ts +++ b/src/components/ha-qr-code.ts @@ -2,6 +2,7 @@ import { LitElement, PropertyValues, css, html, nothing } from "lit"; import { customElement, property, query, state } from "lit/decorators"; import QRCode from "qrcode"; import "./ha-alert"; +import { rgb2hex } from "../common/color/convert-color"; @customElement("ha-qr-code") export class HaQrCode extends LitElement { @@ -65,6 +66,26 @@ export class HaQrCode extends LitElement { changedProperties.has("centerImage")) ) { const computedStyles = getComputedStyle(this); + const textRgb = computedStyles.getPropertyValue( + "--rgb-primary-text-color" + ); + const backgroundRgb = computedStyles.getPropertyValue( + "--rgb-card-background-color" + ); + const textHex = rgb2hex( + textRgb.split(",").map((a) => parseInt(a, 10)) as [ + number, + number, + number, + ] + ); + const backgroundHex = rgb2hex( + backgroundRgb.split(",").map((a) => parseInt(a, 10)) as [ + number, + number, + number, + ] + ); QRCode.toCanvas(canvas, this.data, { errorCorrectionLevel: @@ -74,8 +95,8 @@ export class HaQrCode extends LitElement { margin: this.margin, maskPattern: this.maskPattern, color: { - light: computedStyles.getPropertyValue("--card-background-color"), - dark: computedStyles.getPropertyValue("--primary-text-color"), + light: backgroundHex, + dark: textHex, }, }).catch((err) => { this._error = err.message; From cc1658cbab1721faa061843162264b85d2061b1f Mon Sep 17 00:00:00 2001 From: Bram Kragten Date: Thu, 8 Feb 2024 13:33:10 +0100 Subject: [PATCH 005/425] Add service icons to traces (again :D) (#19728) * Add service icons to traces (again :D) * Update hat-graph-node.ts --- .../src/pages/automation/trace-timeline.ts | 1 - src/components/trace/hat-graph-node.ts | 17 ++++++++++---- src/components/trace/hat-script-graph.ts | 22 ++++++++++++++----- .../config/automation/ha-automation-trace.ts | 1 + src/panels/config/script/ha-script-trace.ts | 1 + 5 files changed, 31 insertions(+), 11 deletions(-) diff --git a/gallery/src/pages/automation/trace-timeline.ts b/gallery/src/pages/automation/trace-timeline.ts index 638da986e0ed..a9a0e1a9d5fd 100644 --- a/gallery/src/pages/automation/trace-timeline.ts +++ b/gallery/src/pages/automation/trace-timeline.ts @@ -3,7 +3,6 @@ import { css, html, LitElement, nothing } from "lit"; import { customElement, property } from "lit/decorators"; import "../../../../src/components/ha-card"; -import "../../../../src/components/trace/hat-script-graph"; import "../../../../src/components/trace/hat-trace-timeline"; import { provideHass } from "../../../../src/fake_data/provide_hass"; import { HomeAssistant } from "../../../../src/types"; diff --git a/src/components/trace/hat-graph-node.ts b/src/components/trace/hat-graph-node.ts index b9b6a499f0b5..4da3f7b7c3ce 100644 --- a/src/components/trace/hat-graph-node.ts +++ b/src/components/trace/hat-graph-node.ts @@ -5,6 +5,7 @@ import { html, TemplateResult, svg, + nothing, } from "lit"; import { customElement, property } from "lit/decorators"; import { NODE_SIZE, SPACING } from "./hat-graph-const"; @@ -51,7 +52,7 @@ export class HatGraphNode extends LitElement { : Math.ceil((NODE_SIZE + SPACING * 2) / 2)} ${width} ${height}" > ${this.graphStart - ? `` + ? nothing : svg` - } ${this.badge ? svg` @@ -81,9 +81,11 @@ export class HatGraphNode extends LitElement { >${this.badge > 9 ? "9+" : this.badge} ` - : ""} + : nothing} - ${this.iconPath ? svg`` : ""} + ${this.iconPath + ? svg`` + : svg``} @@ -152,6 +154,13 @@ export class HatGraphNode extends LitElement { path.icon { fill: var(--icon-clr); } + foreignObject { + width: 24px; + height: 24px; + } + .icon { + color: var(--icon-clr); + } `; } } diff --git a/src/components/trace/hat-script-graph.ts b/src/components/trace/hat-script-graph.ts index 29aad8056436..7bc0cbc0d91d 100644 --- a/src/components/trace/hat-script-graph.ts +++ b/src/components/trace/hat-script-graph.ts @@ -17,11 +17,10 @@ import { mdiRoomService, mdiShuffleDisabled, } from "@mdi/js"; -import { LitElement, PropertyValues, css, html } from "lit"; +import { LitElement, PropertyValues, css, html, nothing } from "lit"; import { customElement, property } from "lit/decorators"; import { ensureArray } from "../../common/array/ensure-array"; import { fireEvent } from "../../common/dom/fire_event"; -import { ACTION_ICONS } from "../../data/action"; import { Condition, Trigger } from "../../data/automation"; import { Action, @@ -41,11 +40,14 @@ import { IfActionTraceStep, TraceExtended, } from "../../data/trace"; +import { HomeAssistant } from "../../types"; import "../ha-icon-button"; +import "../ha-service-icon"; import "./hat-graph-branch"; import { BRANCH_HEIGHT, NODE_SIZE, SPACING } from "./hat-graph-const"; import "./hat-graph-node"; import "./hat-graph-spacer"; +import { ACTION_ICONS } from "../../data/action"; export interface NodeInfo { path: string; @@ -64,6 +66,8 @@ export class HatScriptGraph extends LitElement { @property({ attribute: false }) public selected?: string; + public hass!: HomeAssistant; + public renderedNodes: Record = {}; public trackedNodes: Record = {}; @@ -415,13 +419,21 @@ export class HatScriptGraph extends LitElement { return html` + > + ${node.service + ? html`` + : nothing} + `; } @@ -667,8 +679,6 @@ export class HatScriptGraph extends LitElement { } .parent { margin-left: 8px; - margin-inline-start: 8px; - margin-inline-end: initial; margin-top: 16px; } .error { diff --git a/src/panels/config/automation/ha-automation-trace.ts b/src/panels/config/automation/ha-automation-trace.ts index c8188bdcaa62..c752e562edc2 100644 --- a/src/panels/config/automation/ha-automation-trace.ts +++ b/src/panels/config/automation/ha-automation-trace.ts @@ -232,6 +232,7 @@ export class HaAutomationTrace extends LitElement {
Date: Thu, 8 Feb 2024 15:38:55 +0100 Subject: [PATCH 006/425] Fix suggest card dialog (#19735) --- .../lovelace/editor/card-editor/hui-dialog-create-card.ts | 7 +++++++ .../editor/card-editor/show-suggest-card-dialog.ts | 8 ++++---- .../editor/unused-entities/hui-unused-entities.ts | 8 ++++++++ 3 files changed, 19 insertions(+), 4 deletions(-) diff --git a/src/panels/lovelace/editor/card-editor/hui-dialog-create-card.ts b/src/panels/lovelace/editor/card-editor/hui-dialog-create-card.ts index 1752a24174ba..4ce93735d430 100644 --- a/src/panels/lovelace/editor/card-editor/hui-dialog-create-card.ts +++ b/src/panels/lovelace/editor/card-editor/hui-dialog-create-card.ts @@ -21,6 +21,7 @@ import "./hui-entity-picker-table"; import { CreateCardDialogParams } from "./show-create-card-dialog"; import { showEditCardDialog } from "./show-edit-card-dialog"; import { showSuggestCardDialog } from "./show-suggest-card-dialog"; +import { computeCards } from "../../common/generate-lovelace-config"; declare global { interface HASSDomEvents { @@ -242,11 +243,17 @@ export class HuiCreateDialogCard } private _suggestCards(): void { + const cardConfig = computeCards( + this.hass.states, + this._selectedEntities, + {} + ); showSuggestCardDialog(this, { lovelaceConfig: this._params!.lovelaceConfig, saveConfig: this._params!.saveConfig, path: this._params!.path as [number], entities: this._selectedEntities, + cardConfig, }); this.closeDialog(); diff --git a/src/panels/lovelace/editor/card-editor/show-suggest-card-dialog.ts b/src/panels/lovelace/editor/card-editor/show-suggest-card-dialog.ts index de8021649d16..ea43443d065f 100644 --- a/src/panels/lovelace/editor/card-editor/show-suggest-card-dialog.ts +++ b/src/panels/lovelace/editor/card-editor/show-suggest-card-dialog.ts @@ -7,11 +7,11 @@ export interface SuggestCardDialogParams { yaml?: boolean; saveConfig?: (config: LovelaceConfig) => void; path?: [number]; - entities?: string[]; // Entities used to generate the card config. We pass this to create dialog when user chooses "Pick own" - cardConfig?: LovelaceCardConfig[]; // We can pass a suggested config + entities?: string[]; // We pass this to create dialog when user chooses "Pick own" + cardConfig: LovelaceCardConfig[]; // We can pass a suggested config } -const importsuggestCardDialog = () => import("./hui-dialog-suggest-card"); +const importSuggestCardDialog = () => import("./hui-dialog-suggest-card"); export const showSuggestCardDialog = ( element: HTMLElement, @@ -19,7 +19,7 @@ export const showSuggestCardDialog = ( ): void => { fireEvent(element, "show-dialog", { dialogTag: "hui-dialog-suggest-card", - dialogImport: importsuggestCardDialog, + dialogImport: importSuggestCardDialog, dialogParams: suggestCardDialogParams, }); }; diff --git a/src/panels/lovelace/editor/unused-entities/hui-unused-entities.ts b/src/panels/lovelace/editor/unused-entities/hui-unused-entities.ts index 18ce15b683ad..98cd3f31633d 100644 --- a/src/panels/lovelace/editor/unused-entities/hui-unused-entities.ts +++ b/src/panels/lovelace/editor/unused-entities/hui-unused-entities.ts @@ -21,6 +21,7 @@ import "../card-editor/hui-entity-picker-table"; import { showSuggestCardDialog } from "../card-editor/show-suggest-card-dialog"; import { showSelectViewDialog } from "../select-view/show-select-view-dialog"; import { LovelaceConfig } from "../../../../data/lovelace/config/types"; +import { computeCards } from "../../common/generate-lovelace-config"; @customElement("hui-unused-entities") export class HuiUnusedEntities extends LitElement { @@ -126,12 +127,18 @@ export class HuiUnusedEntities extends LitElement { } private _addToLovelaceView(): void { + const cardConfig = computeCards( + this.hass.states, + this._selectedEntities, + {} + ); if (this.lovelace.config.views.length === 1) { showSuggestCardDialog(this, { lovelaceConfig: this.lovelace.config!, saveConfig: this.lovelace.saveConfig, path: [0], entities: this._selectedEntities, + cardConfig, }); return; } @@ -144,6 +151,7 @@ export class HuiUnusedEntities extends LitElement { saveConfig: this.lovelace.saveConfig, path: [viewIndex], entities: this._selectedEntities, + cardConfig, }); }, }); From e26c7c491a4dcdf3ac69ac5032bce77cfd2b60c8 Mon Sep 17 00:00:00 2001 From: Paul Bottein Date: Thu, 8 Feb 2024 15:40:03 +0100 Subject: [PATCH 007/425] Fix demo dashboard (#19734) --- demo/src/ha-demo.ts | 2 + demo/src/stubs/sensor.ts | 58 +++++++++++++++++++ demo/src/stubs/todo.ts | 1 + .../hui-input-select-entity-row.ts | 16 +++-- 4 files changed, 72 insertions(+), 5 deletions(-) create mode 100644 demo/src/stubs/sensor.ts diff --git a/demo/src/ha-demo.ts b/demo/src/ha-demo.ts index 17550a6af68e..0a9b131556ec 100644 --- a/demo/src/ha-demo.ts +++ b/demo/src/ha-demo.ts @@ -23,6 +23,7 @@ import { mockMediaPlayer } from "./stubs/media_player"; import { mockPersistentNotification } from "./stubs/persistent_notification"; import { mockRecorder } from "./stubs/recorder"; import { mockTodo } from "./stubs/todo"; +import { mockSensor } from "./stubs/sensor"; import { mockSystemLog } from "./stubs/system_log"; import { mockTemplate } from "./stubs/template"; import { mockTranslations } from "./stubs/translations"; @@ -50,6 +51,7 @@ export class HaDemo extends HomeAssistantAppEl { mockHistory(hass); mockRecorder(hass); mockTodo(hass); + mockSensor(hass); mockSystemLog(hass); mockTemplate(hass); mockEvents(hass); diff --git a/demo/src/stubs/sensor.ts b/demo/src/stubs/sensor.ts new file mode 100644 index 000000000000..19c9f2e3441b --- /dev/null +++ b/demo/src/stubs/sensor.ts @@ -0,0 +1,58 @@ +import { MockHomeAssistant } from "../../../src/fake_data/provide_hass"; + +export const mockSensor = (hass: MockHomeAssistant) => { + hass.mockWS("sensor/numeric_device_classes", () => [ + { + numeric_device_classes: [ + "volume_storage", + "gas", + "data_size", + "irradiance", + "wind_speed", + "volatile_organic_compounds", + "volatile_organic_compounds_parts", + "voltage", + "frequency", + "precipitation_intensity", + "volume", + "precipitation", + "battery", + "nitrogen_dioxide", + "speed", + "signal_strength", + "pm1", + "nitrous_oxide", + "atmospheric_pressure", + "data_rate", + "temperature", + "power_factor", + "aqi", + "current", + "volume_flow_rate", + "humidity", + "duration", + "ozone", + "distance", + "pressure", + "pm25", + "weight", + "energy", + "carbon_monoxide", + "apparent_power", + "illuminance", + "energy_storage", + "moisture", + "power", + "water", + "carbon_dioxide", + "ph", + "reactive_power", + "monetary", + "nitrogen_monoxide", + "pm10", + "sound_pressure", + "sulphur_dioxide", + ], + }, + ]); +}; diff --git a/demo/src/stubs/todo.ts b/demo/src/stubs/todo.ts index b0393f6c8800..71d49cdede68 100644 --- a/demo/src/stubs/todo.ts +++ b/demo/src/stubs/todo.ts @@ -21,4 +21,5 @@ export const mockTodo = (hass: MockHomeAssistant) => { }, ] as TodoItem[], })); + hass.mockWS("todo/item/subscribe", (_msg, _hass) => () => {}); }; diff --git a/src/panels/lovelace/entity-rows/hui-input-select-entity-row.ts b/src/panels/lovelace/entity-rows/hui-input-select-entity-row.ts index 4dbfd6f6bfd6..2d4f6e5bf369 100644 --- a/src/panels/lovelace/entity-rows/hui-input-select-entity-row.ts +++ b/src/panels/lovelace/entity-rows/hui-input-select-entity-row.ts @@ -40,14 +40,20 @@ class HuiInputSelectEntityRow extends LitElement implements LovelaceRow { protected updated(changedProps: PropertyValues) { super.updated(changedProps); + if (!this._config) { + return; + } if (changedProps.has("hass")) { const oldHass = changedProps.get("hass"); + const stateObj = this.hass?.states[this._config.entity] as + | InputSelectEntity + | undefined; + const oldStateObj = oldHass?.states[this._config.entity] as + | InputSelectEntity + | undefined; if ( - this.hass && - oldHass && - this._config?.entity && - this.hass.states[this._config.entity].attributes.options !== - oldHass.states[this._config.entity].attributes.options + stateObj && + stateObj.attributes.options !== oldStateObj?.attributes.options ) { this._haSelect.layoutOptions(); } From bad18da658889ba68c4682349dfdc75a192296a0 Mon Sep 17 00:00:00 2001 From: Bram Kragten Date: Thu, 8 Feb 2024 17:04:05 +0100 Subject: [PATCH 008/425] Fix icons in gallery, demo and cast (#19732) * Fix icons in gallery and demo * Add to lovelace gallery * Update icons.ts * add BACKWARDS_COMPAT support for icons * Update entity-state.ts * Update icons.ts * Update icons.ts --- demo/src/ha-demo.ts | 2 + demo/src/stubs/icons.ts | 33 + .../src/pages/lovelace/alarm-panel-card.ts | 2 + gallery/src/pages/lovelace/area-card.ts | 2 + .../src/pages/lovelace/conditional-card.ts | 2 + gallery/src/pages/lovelace/entities-card.ts | 2 + .../src/pages/lovelace/entity-button-card.ts | 2 + .../src/pages/lovelace/entity-filter-card.ts | 2 + gallery/src/pages/lovelace/gauge-card.ts | 2 + gallery/src/pages/lovelace/glance-card.ts | 2 + .../src/pages/lovelace/grid-and-stack-card.ts | 2 + gallery/src/pages/lovelace/light-card.ts | 2 + .../pages/lovelace/picture-elements-card.ts | 2 + .../src/pages/lovelace/picture-entity-card.ts | 2 + .../src/pages/lovelace/picture-glance-card.ts | 2 + gallery/src/pages/lovelace/plant-card.ts | 2 + gallery/src/pages/lovelace/thermostat-card.ts | 2 + gallery/src/pages/lovelace/tile-card.ts | 2 + gallery/src/pages/lovelace/todo-list-card.ts | 2 + gallery/src/pages/misc/entity-state.ts | 12 + src/data/icons.ts | 23 +- src/fake_data/demo_config.ts | 48 +- src/fake_data/entity_component_icons.ts | 962 ++++++++++++++++++ 23 files changed, 1109 insertions(+), 5 deletions(-) create mode 100644 demo/src/stubs/icons.ts create mode 100644 src/fake_data/entity_component_icons.ts diff --git a/demo/src/ha-demo.ts b/demo/src/ha-demo.ts index 0a9b131556ec..4b4d919d2b6e 100644 --- a/demo/src/ha-demo.ts +++ b/demo/src/ha-demo.ts @@ -17,6 +17,7 @@ import { energyEntities } from "./stubs/entities"; import { mockEntityRegistry } from "./stubs/entity_registry"; import { mockEvents } from "./stubs/events"; import { mockFrontend } from "./stubs/frontend"; +import { mockIcons } from "./stubs/icons"; import { mockHistory } from "./stubs/history"; import { mockLovelace } from "./stubs/lovelace"; import { mockMediaPlayer } from "./stubs/media_player"; @@ -57,6 +58,7 @@ export class HaDemo extends HomeAssistantAppEl { mockEvents(hass); mockMediaPlayer(hass); mockFrontend(hass); + mockIcons(hass); mockEnergy(hass); mockPersistentNotification(hass); mockConfigEntries(hass); diff --git a/demo/src/stubs/icons.ts b/demo/src/stubs/icons.ts new file mode 100644 index 000000000000..930a245d525b --- /dev/null +++ b/demo/src/stubs/icons.ts @@ -0,0 +1,33 @@ +import { IconCategory } from "../../../src/data/icons"; +import { ENTITY_COMPONENT_ICONS } from "../../../src/fake_data/entity_component_icons"; +import { MockHomeAssistant } from "../../../src/fake_data/provide_hass"; + +export const mockIcons = (hass: MockHomeAssistant) => { + hass.mockWS( + "frontend/get_icons", + async ({ + category, + integration, + }: { + category: IconCategory; + integration?: string; + }) => { + if (integration) { + try { + const response = await fetch( + `https://raw.githubusercontent.com/home-assistant/core/dev/homeassistant/components/${integration}/icons.json` + ).then((resp) => resp.json()); + return { resources: { [integration]: response[category] || {} } }; + } catch { + return { resources: {} }; + } + } + if (category === "entity_component") { + return { + resources: ENTITY_COMPONENT_ICONS, + }; + } + return { resources: {} }; + } + ); +}; diff --git a/gallery/src/pages/lovelace/alarm-panel-card.ts b/gallery/src/pages/lovelace/alarm-panel-card.ts index b55b1ca5d1c4..45a4c20b689e 100644 --- a/gallery/src/pages/lovelace/alarm-panel-card.ts +++ b/gallery/src/pages/lovelace/alarm-panel-card.ts @@ -3,6 +3,7 @@ import { customElement, query } from "lit/decorators"; import { getEntity } from "../../../../src/fake_data/entity"; import { provideHass } from "../../../../src/fake_data/provide_hass"; import "../../components/demo-cards"; +import { mockIcons } from "../../../../demo/src/stubs/icons"; const ENTITIES = [ getEntity("alarm_control_panel", "alarm", "disarmed", { @@ -84,6 +85,7 @@ class DemoAlarmPanelEntity extends LitElement { hass.updateTranslations(null, "en"); hass.updateTranslations("lovelace", "en"); hass.addEntities(ENTITIES); + mockIcons(hass); } } diff --git a/gallery/src/pages/lovelace/area-card.ts b/gallery/src/pages/lovelace/area-card.ts index 30f98b07de1f..ea7afd7db912 100644 --- a/gallery/src/pages/lovelace/area-card.ts +++ b/gallery/src/pages/lovelace/area-card.ts @@ -3,6 +3,7 @@ import { customElement, query } from "lit/decorators"; import { getEntity } from "../../../../src/fake_data/entity"; import { provideHass } from "../../../../src/fake_data/provide_hass"; import "../../components/demo-cards"; +import { mockIcons } from "../../../../demo/src/stubs/icons"; const ENTITIES = [ getEntity("light", "bed_light", "on", { @@ -146,6 +147,7 @@ class DemoArea extends LitElement { entity_id: "binary_sensor.kitchen_door", }, ]); + mockIcons(hass); } } diff --git a/gallery/src/pages/lovelace/conditional-card.ts b/gallery/src/pages/lovelace/conditional-card.ts index bdaf093ed3c0..b59d5b3bad26 100644 --- a/gallery/src/pages/lovelace/conditional-card.ts +++ b/gallery/src/pages/lovelace/conditional-card.ts @@ -3,6 +3,7 @@ import { customElement, query } from "lit/decorators"; import { getEntity } from "../../../../src/fake_data/entity"; import { provideHass } from "../../../../src/fake_data/provide_hass"; import "../../components/demo-cards"; +import { mockIcons } from "../../../../demo/src/stubs/icons"; const ENTITIES = [ getEntity("light", "controller_1", "on", { @@ -66,6 +67,7 @@ class DemoConditional extends LitElement { hass.updateTranslations(null, "en"); hass.updateTranslations("lovelace", "en"); hass.addEntities(ENTITIES); + mockIcons(hass); } } diff --git a/gallery/src/pages/lovelace/entities-card.ts b/gallery/src/pages/lovelace/entities-card.ts index aa6368878d08..a7131557e6a1 100644 --- a/gallery/src/pages/lovelace/entities-card.ts +++ b/gallery/src/pages/lovelace/entities-card.ts @@ -3,6 +3,7 @@ import { customElement, query } from "lit/decorators"; import { getEntity } from "../../../../src/fake_data/entity"; import { provideHass } from "../../../../src/fake_data/provide_hass"; import "../../components/demo-cards"; +import { mockIcons } from "../../../../demo/src/stubs/icons"; const ENTITIES = [ getEntity("light", "bed_light", "on", { @@ -323,6 +324,7 @@ class DemoEntities extends LitElement { hass.updateTranslations(null, "en"); hass.updateTranslations("lovelace", "en"); hass.addEntities(ENTITIES); + mockIcons(hass); } } diff --git a/gallery/src/pages/lovelace/entity-button-card.ts b/gallery/src/pages/lovelace/entity-button-card.ts index a90f7c776d32..daa607157127 100644 --- a/gallery/src/pages/lovelace/entity-button-card.ts +++ b/gallery/src/pages/lovelace/entity-button-card.ts @@ -3,6 +3,7 @@ import { customElement, query } from "lit/decorators"; import { getEntity } from "../../../../src/fake_data/entity"; import { provideHass } from "../../../../src/fake_data/provide_hass"; import "../../components/demo-cards"; +import { mockIcons } from "../../../../demo/src/stubs/icons"; const ENTITIES = [ getEntity("light", "bed_light", "on", { @@ -82,6 +83,7 @@ class DemoButtonEntity extends LitElement { hass.updateTranslations(null, "en"); hass.updateTranslations("lovelace", "en"); hass.addEntities(ENTITIES); + mockIcons(hass); } } diff --git a/gallery/src/pages/lovelace/entity-filter-card.ts b/gallery/src/pages/lovelace/entity-filter-card.ts index 879cf3bb71cb..86b0b9cb93a7 100644 --- a/gallery/src/pages/lovelace/entity-filter-card.ts +++ b/gallery/src/pages/lovelace/entity-filter-card.ts @@ -3,6 +3,7 @@ import { customElement, query } from "lit/decorators"; import { getEntity } from "../../../../src/fake_data/entity"; import { provideHass } from "../../../../src/fake_data/provide_hass"; import "../../components/demo-cards"; +import { mockIcons } from "../../../../demo/src/stubs/icons"; const ENTITIES = [ getEntity("device_tracker", "demo_paulus", "work", { @@ -123,6 +124,7 @@ class DemoEntityFilter extends LitElement { hass.updateTranslations(null, "en"); hass.updateTranslations("lovelace", "en"); hass.addEntities(ENTITIES); + mockIcons(hass); } } diff --git a/gallery/src/pages/lovelace/gauge-card.ts b/gallery/src/pages/lovelace/gauge-card.ts index ae99d1b1be64..43d3e60d19e0 100644 --- a/gallery/src/pages/lovelace/gauge-card.ts +++ b/gallery/src/pages/lovelace/gauge-card.ts @@ -3,6 +3,7 @@ import { customElement, query } from "lit/decorators"; import { getEntity } from "../../../../src/fake_data/entity"; import { provideHass } from "../../../../src/fake_data/provide_hass"; import "../../components/demo-cards"; +import { mockIcons } from "../../../../demo/src/stubs/icons"; const ENTITIES = [ getEntity("sensor", "brightness", "12", {}), @@ -128,6 +129,7 @@ class DemoGaugeEntity extends LitElement { hass.updateTranslations(null, "en"); hass.updateTranslations("lovelace", "en"); hass.addEntities(ENTITIES); + mockIcons(hass); } } diff --git a/gallery/src/pages/lovelace/glance-card.ts b/gallery/src/pages/lovelace/glance-card.ts index c2a7c22ecebc..ab2f29d9748a 100644 --- a/gallery/src/pages/lovelace/glance-card.ts +++ b/gallery/src/pages/lovelace/glance-card.ts @@ -3,6 +3,7 @@ import { customElement, query } from "lit/decorators"; import { getEntity } from "../../../../src/fake_data/entity"; import { provideHass } from "../../../../src/fake_data/provide_hass"; import "../../components/demo-cards"; +import { mockIcons } from "../../../../demo/src/stubs/icons"; const ENTITIES = [ getEntity("device_tracker", "demo_paulus", "home", { @@ -238,6 +239,7 @@ class DemoGlanceEntity extends LitElement { hass.updateTranslations(null, "en"); hass.updateTranslations("lovelace", "en"); hass.addEntities(ENTITIES); + mockIcons(hass); } } diff --git a/gallery/src/pages/lovelace/grid-and-stack-card.ts b/gallery/src/pages/lovelace/grid-and-stack-card.ts index 9fc7d6f5e7ac..bac8a6f157e2 100644 --- a/gallery/src/pages/lovelace/grid-and-stack-card.ts +++ b/gallery/src/pages/lovelace/grid-and-stack-card.ts @@ -4,6 +4,7 @@ import { mockHistory } from "../../../../demo/src/stubs/history"; import { getEntity } from "../../../../src/fake_data/entity"; import { provideHass } from "../../../../src/fake_data/provide_hass"; import "../../components/demo-cards"; +import { mockIcons } from "../../../../demo/src/stubs/icons"; const ENTITIES = [ getEntity("light", "kitchen_lights", "on", { @@ -214,6 +215,7 @@ class DemoStack extends LitElement { hass.updateTranslations("lovelace", "en"); hass.addEntities(ENTITIES); mockHistory(hass); + mockIcons(hass); } } diff --git a/gallery/src/pages/lovelace/light-card.ts b/gallery/src/pages/lovelace/light-card.ts index 3b0fc0101142..1590edce0fce 100644 --- a/gallery/src/pages/lovelace/light-card.ts +++ b/gallery/src/pages/lovelace/light-card.ts @@ -3,6 +3,7 @@ import { customElement, query } from "lit/decorators"; import { getEntity } from "../../../../src/fake_data/entity"; import { provideHass } from "../../../../src/fake_data/provide_hass"; import "../../components/demo-cards"; +import { mockIcons } from "../../../../demo/src/stubs/icons"; const ENTITIES = [ getEntity("light", "bed_light", "on", { @@ -76,6 +77,7 @@ class DemoLightEntity extends LitElement { hass.updateTranslations(null, "en"); hass.updateTranslations("lovelace", "en"); hass.addEntities(ENTITIES); + mockIcons(hass); } } diff --git a/gallery/src/pages/lovelace/picture-elements-card.ts b/gallery/src/pages/lovelace/picture-elements-card.ts index 588d6be9bfec..7f6b0c99cbb4 100644 --- a/gallery/src/pages/lovelace/picture-elements-card.ts +++ b/gallery/src/pages/lovelace/picture-elements-card.ts @@ -3,6 +3,7 @@ import { customElement, query } from "lit/decorators"; import { getEntity } from "../../../../src/fake_data/entity"; import { provideHass } from "../../../../src/fake_data/provide_hass"; import "../../components/demo-cards"; +import { mockIcons } from "../../../../demo/src/stubs/icons"; const ENTITIES = [ getEntity("light", "bed_light", "on", { @@ -138,6 +139,7 @@ class DemoPictureElements extends LitElement { hass.updateTranslations(null, "en"); hass.updateTranslations("lovelace", "en"); hass.addEntities(ENTITIES); + mockIcons(hass); } } diff --git a/gallery/src/pages/lovelace/picture-entity-card.ts b/gallery/src/pages/lovelace/picture-entity-card.ts index b88d97cbce76..1573f0dbec91 100644 --- a/gallery/src/pages/lovelace/picture-entity-card.ts +++ b/gallery/src/pages/lovelace/picture-entity-card.ts @@ -3,6 +3,7 @@ import { customElement, query } from "lit/decorators"; import { getEntity } from "../../../../src/fake_data/entity"; import { provideHass } from "../../../../src/fake_data/provide_hass"; import "../../components/demo-cards"; +import { mockIcons } from "../../../../demo/src/stubs/icons"; const ENTITIES = [ getEntity("light", "kitchen_lights", "on", { @@ -93,6 +94,7 @@ class DemoPictureEntity extends LitElement { hass.updateTranslations(null, "en"); hass.updateTranslations("lovelace", "en"); hass.addEntities(ENTITIES); + mockIcons(hass); } } diff --git a/gallery/src/pages/lovelace/picture-glance-card.ts b/gallery/src/pages/lovelace/picture-glance-card.ts index f698754ea617..dccc05e09b52 100644 --- a/gallery/src/pages/lovelace/picture-glance-card.ts +++ b/gallery/src/pages/lovelace/picture-glance-card.ts @@ -3,6 +3,7 @@ import { customElement, query } from "lit/decorators"; import { getEntity } from "../../../../src/fake_data/entity"; import { provideHass } from "../../../../src/fake_data/provide_hass"; import "../../components/demo-cards"; +import { mockIcons } from "../../../../demo/src/stubs/icons"; const ENTITIES = [ getEntity("switch", "decorative_lights", "on", { @@ -134,6 +135,7 @@ class DemoPictureGlance extends LitElement { hass.updateTranslations(null, "en"); hass.updateTranslations("lovelace", "en"); hass.addEntities(ENTITIES); + mockIcons(hass); } } diff --git a/gallery/src/pages/lovelace/plant-card.ts b/gallery/src/pages/lovelace/plant-card.ts index 99b6780aee6d..6f04b474b3cc 100644 --- a/gallery/src/pages/lovelace/plant-card.ts +++ b/gallery/src/pages/lovelace/plant-card.ts @@ -3,6 +3,7 @@ import { customElement, query } from "lit/decorators"; import { provideHass } from "../../../../src/fake_data/provide_hass"; import "../../components/demo-cards"; import { createPlantEntities } from "../../data/plants"; +import { mockIcons } from "../../../../demo/src/stubs/icons"; const CONFIGS = [ { @@ -43,6 +44,7 @@ export class DemoPlantEntity extends LitElement { hass.updateTranslations(null, "en"); hass.updateTranslations("lovelace", "en"); hass.addEntities(createPlantEntities()); + mockIcons(hass); } } diff --git a/gallery/src/pages/lovelace/thermostat-card.ts b/gallery/src/pages/lovelace/thermostat-card.ts index 623adf5e3436..1775a826e2b9 100644 --- a/gallery/src/pages/lovelace/thermostat-card.ts +++ b/gallery/src/pages/lovelace/thermostat-card.ts @@ -3,6 +3,7 @@ import { customElement, query } from "lit/decorators"; import { getEntity } from "../../../../src/fake_data/entity"; import { provideHass } from "../../../../src/fake_data/provide_hass"; import "../../components/demo-cards"; +import { mockIcons } from "../../../../demo/src/stubs/icons"; const ENTITIES = [ getEntity("climate", "ecobee", "auto", { @@ -116,6 +117,7 @@ class DemoThermostatEntity extends LitElement { hass.updateTranslations(null, "en"); hass.updateTranslations("lovelace", "en"); hass.addEntities(ENTITIES); + mockIcons(hass); } } diff --git a/gallery/src/pages/lovelace/tile-card.ts b/gallery/src/pages/lovelace/tile-card.ts index 7113f4d0480d..62ab5abd23ed 100644 --- a/gallery/src/pages/lovelace/tile-card.ts +++ b/gallery/src/pages/lovelace/tile-card.ts @@ -6,6 +6,7 @@ import { VacuumEntityFeature } from "../../../../src/data/vacuum"; import { getEntity } from "../../../../src/fake_data/entity"; import { provideHass } from "../../../../src/fake_data/provide_hass"; import "../../components/demo-cards"; +import { mockIcons } from "../../../../demo/src/stubs/icons"; const ENTITIES = [ getEntity("switch", "tv_outlet", "on", { @@ -184,6 +185,7 @@ class DemoTile extends LitElement { hass.updateTranslations(null, "en"); hass.updateTranslations("lovelace", "en"); hass.addEntities(ENTITIES); + mockIcons(hass); } } diff --git a/gallery/src/pages/lovelace/todo-list-card.ts b/gallery/src/pages/lovelace/todo-list-card.ts index 49a61a61a151..b03ffd1a9376 100644 --- a/gallery/src/pages/lovelace/todo-list-card.ts +++ b/gallery/src/pages/lovelace/todo-list-card.ts @@ -4,6 +4,7 @@ import { provideHass } from "../../../../src/fake_data/provide_hass"; import "../../components/demo-cards"; import { getEntity } from "../../../../src/fake_data/entity"; import { mockTodo } from "../../../../demo/src/stubs/todo"; +import { mockIcons } from "../../../../demo/src/stubs/icons"; const ENTITIES = [ getEntity("todo", "shopping_list", "2", { @@ -47,6 +48,7 @@ class DemoTodoListEntity extends LitElement { hass.updateTranslations(null, "en"); hass.updateTranslations("lovelace", "en"); hass.addEntities(ENTITIES); + mockIcons(hass); mockTodo(hass); } diff --git a/gallery/src/pages/misc/entity-state.ts b/gallery/src/pages/misc/entity-state.ts index 4c2194c95c39..e454553a4b31 100644 --- a/gallery/src/pages/misc/entity-state.ts +++ b/gallery/src/pages/misc/entity-state.ts @@ -11,6 +11,7 @@ import "../../../../src/components/data-table/ha-data-table"; import type { DataTableColumnContainer } from "../../../../src/components/data-table/ha-data-table"; import "../../../../src/components/entity/state-badge"; import { provideHass } from "../../../../src/fake_data/provide_hass"; +import { mockIcons } from "../../../../demo/src/stubs/icons"; import { HomeAssistant } from "../../../../src/types"; const SENSOR_DEVICE_CLASSES = [ @@ -291,6 +292,7 @@ const ENTITIES: HassEntity[] = [ createEntity("water_heater.high_demand", "high_demand"), createEntity("water_heater.heat_pump", "heat_pump"), createEntity("water_heater.gas", "gas"), + createEntity("select.speed", "ridiculous_speed"), ]; function createEntity( @@ -397,6 +399,16 @@ export class DemoEntityState extends LitElement { protected firstUpdated(changedProps) { super.firstUpdated(changedProps); const hass = provideHass(this); + mockIcons(hass); + hass.updateHass({ + entities: { + "select.speed": { + entity_id: "select.speed", + translation_key: "speed", + platform: "demo", + }, + }, + }); hass.updateTranslations(null, "en"); hass.updateTranslations("config", "en"); } diff --git a/src/data/icons.ts b/src/data/icons.ts index dbb1a1651556..dcb3952f5523 100644 --- a/src/data/icons.ts +++ b/src/data/icons.ts @@ -9,6 +9,7 @@ import { EntityRegistryEntry, } from "./entity_registry"; import { isComponentLoaded } from "../common/config/is_component_loaded"; +import { atLeastVersion } from "../common/config/version"; const resources: { entity: Record>; @@ -46,10 +47,10 @@ interface PlatformIcons { }; } -interface ComponentIcons { +export interface ComponentIcons { [device_class: string]: { - state: Record; - state_attributes: Record< + state?: Record; + state_attributes?: Record< string, { state: Record; @@ -91,7 +92,10 @@ export const getPlatformIcons = async ( if (!force && integration in resources.entity) { return resources.entity[integration]; } - if (!isComponentLoaded(hass, integration)) { + if ( + !isComponentLoaded(hass, integration) || + !atLeastVersion(hass.connection.haVersion, 2024, 2) + ) { return undefined; } const result = getHassIcons(hass, "entity", integration).then( @@ -106,6 +110,16 @@ export const getComponentIcons = async ( domain: string, force = false ): Promise => { + // For Cast, old instances can connect to it. + if ( + __BACKWARDS_COMPAT__ && + !atLeastVersion(hass.connection.haVersion, 2024, 2) + ) { + return import("../fake_data/entity_component_icons") + .then((mod) => mod.ENTITY_COMPONENT_ICONS) + .then((res) => res[domain]); + } + if ( !force && resources.entity_component.resources && @@ -113,6 +127,7 @@ export const getComponentIcons = async ( ) { return resources.entity_component.resources.then((res) => res[domain]); } + if (!isComponentLoaded(hass, domain)) { return undefined; } diff --git a/src/fake_data/demo_config.ts b/src/fake_data/demo_config.ts index caaf1bb55806..2d6a6fda1540 100644 --- a/src/fake_data/demo_config.ts +++ b/src/fake_data/demo_config.ts @@ -14,7 +14,53 @@ export const demoConfig: HassConfig = { wind_speed: "m/s", accumulated_precipitation: "mm", }, - components: ["notify.html5", "history", "todo", "forecast_solar", "energy"], + components: [ + "notify.html5", + "history", + "forecast_solar", + "energy", + "person", + "number", + "select", + "tts", + "datetime", + "vacuum", + "wake_word", + "light", + "alarm_control_panel", + "text", + "lawn_mower", + "siren", + "input_boolean", + "lock", + "calendar", + "image", + "device_tracker", + "scene", + "script", + "todo", + "cover", + "switch", + "button", + "water_heater", + "binary_sensor", + "sensor", + "humidifier", + "valve", + "time", + "media_player", + "air_quality", + "camera", + "date", + "fan", + "automation", + "weather", + "climate", + "stt", + "update", + "event", + "demo", + ], time_zone: "America/Los_Angeles", config_dir: "/config", version: "DEMO", diff --git a/src/fake_data/entity_component_icons.ts b/src/fake_data/entity_component_icons.ts new file mode 100644 index 000000000000..595c01cd0f2a --- /dev/null +++ b/src/fake_data/entity_component_icons.ts @@ -0,0 +1,962 @@ +import { ComponentIcons } from "../data/icons"; + +export const ENTITY_COMPONENT_ICONS: Record = { + person: { + _: { + default: "mdi:account", + state: { + not_home: "mdi:account-arrow-right", + }, + }, + }, + number: { + _: { + default: "mdi:ray-vertex", + }, + apparent_power: { + default: "mdi:flash", + }, + aqi: { + default: "mdi:air-filter", + }, + atmospheric_pressure: { + default: "mdi:thermometer-lines", + }, + battery: { + default: "mdi:battery", + }, + carbon_dioxide: { + default: "mdi:molecule-co2", + }, + carbon_monoxide: { + default: "mdi:molecule-co", + }, + current: { + default: "mdi:current-ac", + }, + data_rate: { + default: "mdi:transmission-tower", + }, + data_size: { + default: "mdi:database", + }, + distance: { + default: "mdi:arrow-left-right", + }, + duration: { + default: "mdi:progress-clock", + }, + energy: { + default: "mdi:lightning-bolt", + }, + energy_storage: { + default: "mdi:car-battery", + }, + frequency: { + default: "mdi:sine-wave", + }, + gas: { + default: "mdi:meter-gas", + }, + humidity: { + default: "mdi:water-percent", + }, + illuminance: { + default: "mdi:brightness-5", + }, + irradiance: { + default: "mdi:sun-wireless", + }, + moisture: { + default: "mdi:water-percent", + }, + monetary: { + default: "mdi:cash", + }, + nitrogen_dioxide: { + default: "mdi:molecule", + }, + nitrogen_monoxide: { + default: "mdi:molecule", + }, + nitrous_oxide: { + default: "mdi:molecule", + }, + ozone: { + default: "mdi:molecule", + }, + ph: { + default: "mdi:ph", + }, + pm1: { + default: "mdi:molecule", + }, + pm10: { + default: "mdi:molecule", + }, + pm25: { + default: "mdi:molecule", + }, + power: { + default: "mdi:flash", + }, + power_factor: { + default: "mdi:angle-acute", + }, + precipitation: { + default: "mdi:weather-rainy", + }, + precipitation_intensity: { + default: "mdi:weather-pouring", + }, + pressure: { + default: "mdi:gauge", + }, + reactive_power: { + default: "mdi:flash", + }, + signal_strength: { + default: "mdi:wifi", + }, + sound_pressure: { + default: "mdi:ear-hearing", + }, + speed: { + default: "mdi:speedometer", + }, + sulfur_dioxide: { + default: "mdi:molecule", + }, + temperature: { + default: "mdi:thermometer", + }, + volatile_organic_compounds: { + default: "mdi:molecule", + }, + volatile_organic_compounds_parts: { + default: "mdi:molecule", + }, + voltage: { + default: "mdi:sine-wave", + }, + volume: { + default: "mdi:car-coolant-level", + }, + volume_storage: { + default: "mdi:storage-tank", + }, + water: { + default: "mdi:water", + }, + weight: { + default: "mdi:weight", + }, + wind_speed: { + default: "mdi:weather-windy", + }, + }, + select: { + _: { + default: "mdi:format-list-bulleted", + }, + }, + tts: { + _: { + default: "mdi:speaker-message", + }, + }, + datetime: { + _: { + default: "mdi:calendar-clock", + }, + }, + vacuum: { + _: { + default: "mdi:robot-vacuum", + }, + }, + wake_word: { + _: { + default: "mdi:chat-sleep", + }, + }, + light: { + _: { + default: "mdi:lightbulb", + }, + }, + alarm_control_panel: { + _: { + default: "mdi:shield", + state: { + armed_away: "mdi:shield-lock", + armed_custom_bypass: "mdi:security", + armed_home: "mdi:shield-home", + armed_night: "mdi:shield-moon", + armed_vacation: "mdi:shield-airplane", + disarmed: "mdi:shield-off", + pending: "mdi:shield-outline", + triggered: "mdi:bell-ring", + }, + }, + }, + text: { + _: { + default: "mdi:form-textbox", + }, + }, + lawn_mower: { + _: { + default: "mdi:robot-mower", + }, + }, + siren: { + _: { + default: "mdi:bullhorn", + }, + }, + input_boolean: { + _: { + default: "mdi:check-circle-outline", + state: { + off: "mdi:close-circle-outline", + }, + }, + }, + lock: { + _: { + default: "mdi:lock", + state: { + jammed: "mdi:lock-alert", + locking: "mdi:lock-clock", + unlocked: "mdi:lock-open", + unlocking: "mdi:lock-clock", + }, + }, + }, + calendar: { + _: { + default: "mdi:calendar", + state: { + on: "mdi:calendar-check", + off: "mdi:calendar-blank", + }, + }, + }, + image: { + _: { + default: "mdi:image", + }, + }, + device_tracker: { + _: { + default: "mdi:account", + state: { + not_home: "mdi:account-arrow-right", + }, + }, + }, + scene: { + _: { + default: "mdi:palette", + }, + }, + script: { + _: { + default: "mdi:script-text", + state: { + on: "mdi:script-text-play", + }, + }, + }, + todo: { + _: { + default: "mdi:clipboard-list", + }, + }, + cover: { + _: { + default: "mdi:window-open", + state: { + closed: "mdi:window-closed", + closing: "mdi:arrow-down-box", + opening: "mdi:arrow-up-box", + }, + }, + blind: { + default: "mdi:blinds-horizontal", + state: { + closed: "mdi:blinds-horizontal-closed", + closing: "mdi:arrow-down-box", + opening: "mdi:arrow-up-box", + }, + }, + curtain: { + default: "mdi:curtains", + state: { + closed: "mdi:curtains-closed", + closing: "mdi:arrow-collapse-horizontal", + opening: "mdi:arrow-split-vertical", + }, + }, + damper: { + default: "mdi:circle", + state: { + closed: "mdi:circle-slice-8", + }, + }, + door: { + default: "mdi:door-open", + state: { + closed: "mdi:door-closed", + }, + }, + garage: { + default: "mdi:garage-open", + state: { + closed: "mdi:garage", + closing: "mdi:arrow-down-box", + opening: "mdi:arrow-up-box", + }, + }, + gate: { + default: "mdi:gate-open", + state: { + closed: "mdi:gate", + closing: "mdi:arrow-right", + opening: "mdi:arrow-right", + }, + }, + shade: { + default: "mdi:roller-shade", + state: { + closed: "mdi:roller-shade-closed", + closing: "mdi:arrow-down-box", + opening: "mdi:arrow-up-box", + }, + }, + shutter: { + default: "mdi:window-shutter-open", + state: { + closed: "mdi:window-shutter", + closing: "mdi:arrow-down-box", + opening: "mdi:arrow-up-box", + }, + }, + window: { + default: "mdi:window-open", + state: { + closed: "mdi:window-closed", + closing: "mdi:arrow-down-box", + opening: "mdi:arrow-up-box", + }, + }, + }, + switch: { + _: { + default: "mdi:toggle-switch-variant", + }, + switch: { + default: "mdi:toggle-switch-variant", + state: { + off: "mdi:toggle-switch-variant-off", + }, + }, + outlet: { + default: "mdi:power-plug", + state: { + off: "mdi:power-plug-off", + }, + }, + }, + button: { + _: { + default: "mdi:button-pointer", + }, + restart: { + default: "mdi:restart", + }, + identify: { + default: "mdi:crosshairs-question", + }, + update: { + default: "mdi:package-up", + }, + }, + water_heater: { + _: { + default: "mdi:water-boiler", + state: { + off: "mdi:water-boiler-off", + }, + state_attributes: { + operation_mode: { + default: "mdi:circle-medium", + state: { + eco: "mdi:leaf", + electric: "mdi:lightning-bolt", + gas: "mdi:fire-circle", + heat_pump: "mdi:heat-wave", + high_demand: "mdi:finance", + off: "mdi:power", + performance: "mdi:rocket-launch", + }, + }, + }, + }, + }, + binary_sensor: { + _: { + default: "mdi:radiobox-blank", + state: { + on: "mdi:checkbox-marked-circle", + }, + }, + battery: { + default: "mdi:battery", + state: { + on: "mdi:battery-outline", + }, + }, + battery_charging: { + default: "mdi:battery", + state: { + on: "mdi:battery-charging", + }, + }, + carbon_monoxide: { + default: "mdi:smoke-detector", + state: { + on: "mdi:smoke-detector-alert", + }, + }, + cold: { + default: "mdi:thermometer", + state: { + on: "mdi:snowflake", + }, + }, + connectivity: { + default: "mdi:close-network-outline", + state: { + on: "mdi:check-network-outline", + }, + }, + door: { + default: "mdi:door-closed", + state: { + on: "mdi:door-open", + }, + }, + garage_door: { + default: "mdi:garage", + state: { + on: "mdi:garage-open", + }, + }, + gas: { + default: "mdi:check-circle", + state: { + on: "mdi:alert-circle", + }, + }, + heat: { + default: "mdi:thermometer", + state: { + on: "mdi:fire", + }, + }, + light: { + default: "mdi:brightness-5", + state: { + on: "mdi:brightness-7", + }, + }, + lock: { + default: "mdi:lock", + state: { + on: "mdi:lock-open", + }, + }, + moisture: { + default: "mdi:water-off", + state: { + on: "mdi:water", + }, + }, + motion: { + default: "mdi:motion-sensor-off", + state: { + on: "mdi:motion-sensor", + }, + }, + moving: { + default: "mdi:arrow-right", + state: { + on: "mdi:octagon", + }, + }, + occupancy: { + default: "mdi:home-outline", + state: { + on: "mdi:home", + }, + }, + opening: { + default: "mdi:square", + state: { + on: "mdi:square-outline", + }, + }, + plug: { + default: "mdi:power-plug-off", + state: { + on: "mdi:power-plug", + }, + }, + power: { + default: "mdi:power-plug-off", + state: { + on: "mdi:power-plug", + }, + }, + presence: { + default: "mdi:home-outline", + state: { + on: "mdi:home", + }, + }, + problem: { + default: "mdi:check-circle", + state: { + on: "mdi:alert-circle", + }, + }, + running: { + default: "mdi:stop", + state: { + on: "mdi:play", + }, + }, + safety: { + default: "mdi:check-circle", + state: { + on: "mdi:alert-circle", + }, + }, + smoke: { + default: "mdi:smoke-detector-variant", + state: { + on: "mdi:smoke-detector-variant-alert", + }, + }, + sound: { + default: "mdi:music-note-off", + state: { + on: "mdi:music-note", + }, + }, + tamper: { + default: "mdi:check-circle", + state: { + on: "mdi:alert-circle", + }, + }, + update: { + default: "mdi:package", + state: { + on: "mdi:package-up", + }, + }, + vibration: { + default: "mdi:crop-portrait", + state: { + on: "mdi:vibrate", + }, + }, + window: { + default: "mdi:window-closed", + state: { + on: "mdi:window-open", + }, + }, + }, + sensor: { + _: { + default: "mdi:eye", + }, + apparent_power: { + default: "mdi:flash", + }, + aqi: { + default: "mdi:air-filter", + }, + atmospheric_pressure: { + default: "mdi:thermometer-lines", + }, + carbon_dioxide: { + default: "mdi:molecule-co2", + }, + carbon_monoxide: { + default: "mdi:molecule-co", + }, + current: { + default: "mdi:current-ac", + }, + data_rate: { + default: "mdi:transmission-tower", + }, + data_size: { + default: "mdi:database", + }, + date: { + default: "mdi:calendar", + }, + distance: { + default: "mdi:arrow-left-right", + }, + duration: { + default: "mdi:progress-clock", + }, + energy: { + default: "mdi:lightning-bolt", + }, + energy_storage: { + default: "mdi:car-battery", + }, + enum: { + default: "mdi:eye", + }, + frequency: { + default: "mdi:sine-wave", + }, + gas: { + default: "mdi:meter-gas", + }, + humidity: { + default: "mdi:water-percent", + }, + illuminance: { + default: "mdi:brightness-5", + }, + irradiance: { + default: "mdi:sun-wireless", + }, + moisture: { + default: "mdi:water-percent", + }, + monetary: { + default: "mdi:cash", + }, + nitrogen_dioxide: { + default: "mdi:molecule", + }, + nitrogen_monoxide: { + default: "mdi:molecule", + }, + nitrous_oxide: { + default: "mdi:molecule", + }, + ozone: { + default: "mdi:molecule", + }, + ph: { + default: "mdi:ph", + }, + pm1: { + default: "mdi:molecule", + }, + pm10: { + default: "mdi:molecule", + }, + pm25: { + default: "mdi:molecule", + }, + power: { + default: "mdi:flash", + }, + power_factor: { + default: "mdi:angle-acute", + }, + precipitation: { + default: "mdi:weather-rainy", + }, + precipitation_intensity: { + default: "mdi:weather-pouring", + }, + pressure: { + default: "mdi:gauge", + }, + reactive_power: { + default: "mdi:flash", + }, + signal_strength: { + default: "mdi:wifi", + }, + sound_pressure: { + default: "mdi:ear-hearing", + }, + speed: { + default: "mdi:speedometer", + }, + sulfur_dioxide: { + default: "mdi:molecule", + }, + temperature: { + default: "mdi:thermometer", + }, + timestamp: { + default: "mdi:clock", + }, + volatile_organic_compounds: { + default: "mdi:molecule", + }, + volatile_organic_compounds_parts: { + default: "mdi:molecule", + }, + voltage: { + default: "mdi:sine-wave", + }, + volume: { + default: "mdi:car-coolant-level", + }, + volume_storage: { + default: "mdi:storage-tank", + }, + water: { + default: "mdi:water", + }, + weight: { + default: "mdi:weight", + }, + wind_speed: { + default: "mdi:weather-windy", + }, + }, + humidifier: { + _: { + default: "mdi:air-humidifier", + state: { + off: "mdi:air-humidifier-off", + }, + state_attributes: { + action: { + default: "mdi:circle-medium", + state: { + drying: "mdi:arrow-down-bold", + humidifying: "mdi:arrow-up-bold", + idle: "mdi:clock-outline", + off: "mdi:power", + }, + }, + mode: { + default: "mdi:circle-medium", + state: { + auto: "mdi:refresh-auto", + away: "mdi:account-arrow-right", + baby: "mdi:baby-carriage", + boost: "mdi:rocket-launch", + comfort: "mdi:sofa", + eco: "mdi:leaf", + home: "mdi:home", + normal: "mdi:water-percent", + sleep: "mdi:power-sleep", + }, + }, + }, + }, + }, + valve: { + _: { + default: "mdi:pipe-valve", + }, + gas: { + default: "mdi:meter-gas", + }, + water: { + default: "mdi:pipe-valve", + }, + }, + time: { + _: { + default: "mdi:clock", + }, + }, + media_player: { + _: { + default: "mdi:cast", + state: { + off: "mdi:cast-off", + paused: "mdi:cast-connected", + playing: "mdi:cast-connected", + }, + }, + receiver: { + default: "mdi:audio-video", + state: { + off: "mdi:audio-video-off", + }, + }, + speaker: { + default: "mdi:speaker", + state: { + off: "mdi:speaker-off", + paused: "mdi:speaker-pause", + playing: "mdi:speaker-play", + }, + }, + tv: { + default: "mdi:television", + state: { + off: "mdi:television-off", + paused: "mdi:television-pause", + playing: "mdi:television-play", + }, + }, + }, + air_quality: { + _: { + default: "mdi:air-filter", + }, + }, + camera: { + _: { + default: "mdi:video", + state: { + off: "mdi:video-off", + }, + }, + }, + date: { + _: { + default: "mdi:calendar", + }, + }, + fan: { + _: { + default: "mdi:fan", + state: { + off: "mdi:fan-off", + }, + state_attributes: { + direction: { + default: "mdi:rotate-right", + state: { + reverse: "mdi:rotate-left", + }, + }, + }, + }, + }, + automation: { + _: { + default: "mdi:robot", + state: { + off: "mdi:robot-off", + unavailable: "mdi:robot-confused", + }, + }, + }, + weather: { + _: { + default: "mdi:weather-partly-cloudy", + state: { + "clear-night": "mdi:weather-night", + cloudy: "mdi:weather-cloudy", + exceptional: "mdi:alert-circle-outline", + fog: "mdi:weather-fog", + hail: "mdi:weather-hail", + lightning: "mdi:weather-lightning", + "lightning-rainy": "mdi:weather-lightning-rainy", + pouring: "mdi:weather-pouring", + rainy: "mdi:weather-rainy", + snowy: "mdi:weather-snowy", + "snowy-rainy": "mdi:weather-snowy-rainy", + sunny: "mdi:weather-sunny", + windy: "mdi:weather-windy", + "windy-variant": "mdi:weather-windy-variant", + }, + }, + }, + climate: { + _: { + default: "mdi:thermostat", + state_attributes: { + fan_mode: { + default: "mdi:circle-medium", + state: { + diffuse: "mdi:weather-windy", + focus: "mdi:target", + high: "mdi:speedometer", + low: "mdi:speedometer-slow", + medium: "mdi:speedometer-medium", + middle: "mdi:speedometer-medium", + off: "mdi:fan-off", + on: "mdi:fan", + }, + }, + hvac_action: { + default: "mdi:circle-medium", + state: { + cooling: "mdi:snowflake", + drying: "mdi:water-percent", + fan: "mdi:fan", + heating: "mdi:fire", + idle: "mdi:clock-outline", + off: "mdi:power", + preheating: "mdi:heat-wave", + }, + }, + preset_mode: { + default: "mdi:circle-medium", + state: { + activity: "mdi:motion-sensor", + away: "mdi:account-arrow-right", + boost: "mdi:rocket-launch", + comfort: "mdi:sofa", + eco: "mdi:leaf", + home: "mdi:home", + sleep: "mdi:bed", + }, + }, + swing_mode: { + default: "mdi:circle-medium", + state: { + both: "mdi:arrow-all", + horizontal: "mdi:arrow-left-right", + off: "mdi:arrow-oscillating-off", + on: "mdi:arrow-oscillating", + vertical: "mdi:arrow-up-down", + }, + }, + }, + }, + }, + stt: { + _: { + default: "mdi:microphone-message", + }, + }, + update: { + _: { + default: "mdi:package-up", + state: { + off: "mdi:package", + }, + }, + }, + event: { + _: { + default: "mdi:eye-check", + }, + button: { + default: "mdi:gesture-tap-button", + }, + doorbell: { + default: "mdi:doorbell", + }, + motion: { + default: "mdi:motion-sensor", + }, + }, +}; From 20560fb8474919187cf20cfc7a28ea1ed85f46af Mon Sep 17 00:00:00 2001 From: Bram Kragten Date: Thu, 8 Feb 2024 17:40:43 +0100 Subject: [PATCH 009/425] Fix cast launch screen (#19738) --- cast/src/receiver/layout/hc-launch-screen.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cast/src/receiver/layout/hc-launch-screen.ts b/cast/src/receiver/layout/hc-launch-screen.ts index 2b212860e88a..49be9d07003c 100644 --- a/cast/src/receiver/layout/hc-launch-screen.ts +++ b/cast/src/receiver/layout/hc-launch-screen.ts @@ -28,7 +28,6 @@ class HcLaunchScreen extends LitElement { :host { display: block; height: 100vh; - padding-top: 64px; background-color: white; font-size: 24px; } @@ -36,12 +35,13 @@ class HcLaunchScreen extends LitElement { display: flex; flex-direction: column; text-align: center; + align-items: center; + height: 100%; + justify-content: space-evenly; } img { - width: 717px; - height: 376px; - display: block; - margin: 0 auto; + max-width: 80%; + object-fit: cover; } .status { padding-right: 54px; From 03486e4125835241404cc3dbe64b05c6f5475891 Mon Sep 17 00:00:00 2001 From: Bram Kragten Date: Thu, 8 Feb 2024 17:43:50 +0100 Subject: [PATCH 010/425] cast allow empty view, pick first (#19739) --- cast/src/receiver/layout/hc-lovelace.ts | 5 ++++- cast/src/receiver/layout/hc-main.ts | 14 +++++++------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/cast/src/receiver/layout/hc-lovelace.ts b/cast/src/receiver/layout/hc-lovelace.ts index 0de33aa69dd8..01b6f03fb01c 100644 --- a/cast/src/receiver/layout/hc-lovelace.ts +++ b/cast/src/receiver/layout/hc-lovelace.ts @@ -17,7 +17,7 @@ class HcLovelace extends LitElement { @property({ attribute: false }) public lovelaceConfig!: LovelaceConfig; - @property() public viewPath?: string | number; + @property() public viewPath?: string | number | null; @property() public urlPath: string | null = null; @@ -93,6 +93,9 @@ class HcLovelace extends LitElement { } private get _viewIndex() { + if (this.viewPath === null) { + return 0; + } const selectedView = this.viewPath; const selectedViewInt = parseInt(selectedView as string, 10); for (let i = 0; i < this.lovelaceConfig.views.length; i++) { diff --git a/cast/src/receiver/layout/hc-main.ts b/cast/src/receiver/layout/hc-main.ts index dcf7a80eecaf..64b821817a12 100644 --- a/cast/src/receiver/layout/hc-main.ts +++ b/cast/src/receiver/layout/hc-main.ts @@ -51,10 +51,10 @@ export class HcMain extends HassElement { @state() private _lovelacePath: string | number | null = null; - @state() private _error?: string; - @state() private _urlPath?: string | null; + @state() private _error?: string; + private _hassUUID?: string; private _unsubLovelace?: UnsubscribeFunc; @@ -81,7 +81,7 @@ export class HcMain extends HassElement { if ( !this._lovelaceConfig || - this._lovelacePath === null || + this._urlPath === undefined || // Guard against part of HA not being loaded yet. !this.hass || !this.hass.states || @@ -99,8 +99,8 @@ export class HcMain extends HassElement { `; @@ -226,9 +226,9 @@ export class HcMain extends HassElement { this.initializeHass(auth, connection); if (this._hassUUID !== msg.hassUUID) { this._hassUUID = msg.hassUUID; - this._lovelacePath = null; - this._urlPath = undefined; this._lovelaceConfig = undefined; + this._urlPath = undefined; + this._lovelacePath = null; if (this._unsubLovelace) { this._unsubLovelace(); this._unsubLovelace = undefined; @@ -285,7 +285,7 @@ export class HcMain extends HassElement { ], }; this._urlPath = "energy"; - this._lovelacePath = 0; + this._lovelacePath = null; this._sendStatus(); return; } From 3469013f1a5cf1686634c41cdfa125aad65f9ba2 Mon Sep 17 00:00:00 2001 From: Bram Kragten Date: Thu, 8 Feb 2024 18:07:15 +0100 Subject: [PATCH 011/425] Bumped version to 20240207.1 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 058f7ffd6fe9..f0eef3c0351b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "home-assistant-frontend" -version = "20240207.0" +version = "20240207.1" license = {text = "Apache-2.0"} description = "The Home Assistant frontend" readme = "README.md" From f0a9185e4ac191a00ee5a5ca3c08d8ec7dae9ac7 Mon Sep 17 00:00:00 2001 From: Bram Kragten Date: Thu, 8 Feb 2024 18:31:23 +0100 Subject: [PATCH 012/425] handle undefined and null in cast --- cast/src/receiver/layout/hc-lovelace.ts | 2 +- cast/src/receiver/layout/hc-main.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cast/src/receiver/layout/hc-lovelace.ts b/cast/src/receiver/layout/hc-lovelace.ts index 01b6f03fb01c..d748b8184e3c 100644 --- a/cast/src/receiver/layout/hc-lovelace.ts +++ b/cast/src/receiver/layout/hc-lovelace.ts @@ -93,7 +93,7 @@ class HcLovelace extends LitElement { } private get _viewIndex() { - if (this.viewPath === null) { + if (this.viewPath === null || this.viewPath === undefined) { return 0; } const selectedView = this.viewPath; diff --git a/cast/src/receiver/layout/hc-main.ts b/cast/src/receiver/layout/hc-main.ts index 64b821817a12..cc0f3bc48f13 100644 --- a/cast/src/receiver/layout/hc-main.ts +++ b/cast/src/receiver/layout/hc-main.ts @@ -270,7 +270,7 @@ export class HcMain extends HassElement { } this._error = undefined; - if (msg.urlPath === "lovelace") { + if (msg.urlPath === "lovelace" || msg.urlPath === undefined) { msg.urlPath = null; } this._lovelacePath = msg.viewPath; From add2dedc7f5fc516b0552b2ad5e609f8af7084a6 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 16 Feb 2024 20:30:51 -0500 Subject: [PATCH 013/425] Update dependency hls.js to v1.5.5 (#19817) --- package.json | 2 +- yarn.lock | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 635042774fbb..2f5aabec9ef8 100644 --- a/package.json +++ b/package.json @@ -109,7 +109,7 @@ "element-internals-polyfill": "1.3.10", "fuse.js": "7.0.0", "google-timezones-json": "1.2.0", - "hls.js": "1.5.4", + "hls.js": "1.5.5", "home-assistant-js-websocket": "9.1.0", "idb-keyval": "6.2.1", "intl-messageformat": "10.5.11", diff --git a/yarn.lock b/yarn.lock index e2484f3833c5..4299c399a979 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9432,10 +9432,10 @@ __metadata: languageName: node linkType: hard -"hls.js@npm:1.5.4": - version: 1.5.4 - resolution: "hls.js@npm:1.5.4" - checksum: 10/b86ee818db7a9b3f576fa1fb6c325a91885d6018be6e6cf496a7e1e8fd9ae060979de4347fd6635af47e704170cb47a09ef0942a38409c165f9958044d232e4d +"hls.js@npm:1.5.5": + version: 1.5.5 + resolution: "hls.js@npm:1.5.5" + checksum: 10/f182f9d1819527b76cf493646ce9a5cffaa9bb0fae02eab446fb16063fe15c527655a1237ba7f2ba3a1c51d11c64c25fb2cfe01ad94980038a810dc2ea982340 languageName: node linkType: hard @@ -9589,7 +9589,7 @@ __metadata: gulp-merge-json: "npm:2.1.2" gulp-rename: "npm:2.0.0" gulp-zopfli-green: "npm:6.0.1" - hls.js: "npm:1.5.4" + hls.js: "npm:1.5.5" home-assistant-js-websocket: "npm:9.1.0" html-minifier-terser: "npm:7.2.0" husky: "npm:9.0.10" From ea642515c1e0188640bfd342cf97f796b2ccfded Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 17 Feb 2024 13:06:30 -0500 Subject: [PATCH 014/425] Update dependency husky to v9.0.11 (#19818) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 2f5aabec9ef8..4cc75ecf9c4c 100644 --- a/package.json +++ b/package.json @@ -212,7 +212,7 @@ "gulp-rename": "2.0.0", "gulp-zopfli-green": "6.0.1", "html-minifier-terser": "7.2.0", - "husky": "9.0.10", + "husky": "9.0.11", "instant-mocha": "1.5.2", "jszip": "3.10.1", "lint-staged": "15.2.2", diff --git a/yarn.lock b/yarn.lock index 4299c399a979..ae3d51067140 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9592,7 +9592,7 @@ __metadata: hls.js: "npm:1.5.5" home-assistant-js-websocket: "npm:9.1.0" html-minifier-terser: "npm:7.2.0" - husky: "npm:9.0.10" + husky: "npm:9.0.11" idb-keyval: "npm:6.2.1" instant-mocha: "npm:1.5.2" intl-messageformat: "npm:10.5.11" @@ -9874,12 +9874,12 @@ __metadata: languageName: node linkType: hard -"husky@npm:9.0.10": - version: 9.0.10 - resolution: "husky@npm:9.0.10" +"husky@npm:9.0.11": + version: 9.0.11 + resolution: "husky@npm:9.0.11" bin: husky: bin.mjs - checksum: 10/c303f1862e2b63873605df55a2b08303155e35c799585d7dd677628f62d716e7304bd984fc7d00ec44e740caac07d51720d1a0abb0a23a70a38859d89eb8e72d + checksum: 10/8a9b7cb9dc8494b470b3b47b386e65d579608c6206da80d3cc8b71d10e37947264af3dfe00092368dad9673b51d2a5ee87afb4b2291e77ba9e7ec1ac36e56cd1 languageName: node linkType: hard From 9a9fbda08b87c1f428f296975c70e332fc635c69 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 17 Feb 2024 13:09:59 -0500 Subject: [PATCH 015/425] Update dependency core-js to v3.36.0 (#19822) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 4cc75ecf9c4c..69eeb276dec5 100644 --- a/package.json +++ b/package.json @@ -100,7 +100,7 @@ "app-datepicker": "5.1.1", "chart.js": "4.4.1", "comlink": "4.4.1", - "core-js": "3.35.1", + "core-js": "3.36.0", "cropperjs": "1.6.1", "date-fns": "2.30.0", "date-fns-tz": "2.0.0", diff --git a/yarn.lock b/yarn.lock index ae3d51067140..18a64a6f857d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6977,10 +6977,10 @@ __metadata: languageName: node linkType: hard -"core-js@npm:3.35.1": - version: 3.35.1 - resolution: "core-js@npm:3.35.1" - checksum: 10/5d31f22eb05cf66bd1a2088a04b7106faa5d0b91c1ffa5d72c5203e4974c31bd7e11969297f540a806c00c74c23991eaad5639592df8b5dbe4412fff3c075cd5 +"core-js@npm:3.36.0": + version: 3.36.0 + resolution: "core-js@npm:3.36.0" + checksum: 10/896326c6391c1607dc645293c214cd31c6c535d4a77a88b15fc29e787199f9b06dc15986ddfbc798335bf7a7afd1e92152c94aa5a974790a7f97a98121774302 languageName: node linkType: hard @@ -9559,7 +9559,7 @@ __metadata: chai: "npm:5.1.0" chart.js: "npm:4.4.1" comlink: "npm:4.4.1" - core-js: "npm:3.35.1" + core-js: "npm:3.36.0" cropperjs: "npm:1.6.1" date-fns: "npm:2.30.0" date-fns-tz: "npm:2.0.0" From 4de3db52cb2b65657c229dbd56bfe9ec38c8727e Mon Sep 17 00:00:00 2001 From: Paul Bottein Date: Sun, 18 Feb 2024 02:33:50 +0100 Subject: [PATCH 016/425] Remove cancel button on edit view dialog (#19821) --- src/panels/lovelace/editor/view-editor/hui-dialog-edit-view.ts | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/panels/lovelace/editor/view-editor/hui-dialog-edit-view.ts b/src/panels/lovelace/editor/view-editor/hui-dialog-edit-view.ts index a16f8237f457..22583a359534 100644 --- a/src/panels/lovelace/editor/view-editor/hui-dialog-edit-view.ts +++ b/src/panels/lovelace/editor/view-editor/hui-dialog-edit-view.ts @@ -313,9 +313,6 @@ export class HuiDialogEditView extends LitElement { ` : ""} - ${this.hass!.localize("ui.common.cancel")} Date: Sun, 18 Feb 2024 00:42:48 -0500 Subject: [PATCH 017/425] Update dependency @bundle-stats/plugin-webpack-filter to v4.10.0 (#19825) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 69eeb276dec5..6c0677564e54 100644 --- a/package.json +++ b/package.json @@ -155,7 +155,7 @@ "@babel/plugin-transform-runtime": "7.23.9", "@babel/preset-env": "7.23.9", "@babel/preset-typescript": "7.23.3", - "@bundle-stats/plugin-webpack-filter": "4.9.2", + "@bundle-stats/plugin-webpack-filter": "4.10.0", "@koa/cors": "5.0.0", "@lokalise/node-api": "12.1.0", "@octokit/auth-oauth-device": "6.0.1", diff --git a/yarn.lock b/yarn.lock index 18a64a6f857d..ae2239705299 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1447,12 +1447,12 @@ __metadata: languageName: node linkType: hard -"@bundle-stats/plugin-webpack-filter@npm:4.9.2": - version: 4.9.2 - resolution: "@bundle-stats/plugin-webpack-filter@npm:4.9.2" +"@bundle-stats/plugin-webpack-filter@npm:4.10.0": + version: 4.10.0 + resolution: "@bundle-stats/plugin-webpack-filter@npm:4.10.0" peerDependencies: core-js: ^3.0.0 - checksum: 10/d57aeff530a1af099929f67d12402f5a563e018333d86de159af2c1714274b040de9e1a9f6dad1b3bbee6b7af0cde6f9668a368138f27ac13d34642beba8e2f0 + checksum: 10/43964bce792eab1e62571241278c71148b51513d262516823b7a8ba18c73da64e77cac2d93cd969db64f6699bad11bfb8f7d49de363bf4f9248b76e97479efcd languageName: node linkType: hard @@ -9451,7 +9451,7 @@ __metadata: "@babel/preset-typescript": "npm:7.23.3" "@babel/runtime": "npm:7.23.9" "@braintree/sanitize-url": "npm:7.0.0" - "@bundle-stats/plugin-webpack-filter": "npm:4.9.2" + "@bundle-stats/plugin-webpack-filter": "npm:4.10.0" "@codemirror/autocomplete": "npm:6.12.0" "@codemirror/commands": "npm:6.3.3" "@codemirror/language": "npm:6.10.1" From 63603a281e07288aa6a1f2f599f8d28efc453e42 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 18 Feb 2024 16:01:25 -0500 Subject: [PATCH 018/425] Update dependency webpack to v5.90.2 (#19828) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 6c0677564e54..446ea474d951 100644 --- a/package.json +++ b/package.json @@ -240,7 +240,7 @@ "typescript": "5.3.3", "vinyl-buffer": "1.0.1", "vinyl-source-stream": "2.0.0", - "webpack": "5.90.1", + "webpack": "5.90.2", "webpack-cli": "5.1.4", "webpack-dev-server": "4.15.1", "webpack-manifest-plugin": "5.0.0", diff --git a/yarn.lock b/yarn.lock index ae2239705299..631ab800ecf0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9648,7 +9648,7 @@ __metadata: vis-network: "npm:9.1.9" vue: "npm:2.7.16" vue2-daterange-picker: "npm:0.6.8" - webpack: "npm:5.90.1" + webpack: "npm:5.90.2" webpack-cli: "npm:5.1.4" webpack-dev-server: "npm:4.15.1" webpack-manifest-plugin: "npm:5.0.0" @@ -16157,9 +16157,9 @@ __metadata: languageName: node linkType: hard -"webpack@npm:5.90.1": - version: 5.90.1 - resolution: "webpack@npm:5.90.1" +"webpack@npm:5.90.2": + version: 5.90.2 + resolution: "webpack@npm:5.90.2" dependencies: "@types/eslint-scope": "npm:^3.7.3" "@types/estree": "npm:^1.0.5" @@ -16190,7 +16190,7 @@ __metadata: optional: true bin: webpack: bin/webpack.js - checksum: 10/6ad23518123f1742238177920cefa61152d981f986adac5901236845c86ba9bb375a3ba75e188925c856c3d2a76a2ba119e95b8a608a51424968389041089075 + checksum: 10/4eaeed1255c9c7738921c4ce4facdb3b78dbfcb3441496942f6d160a41fbcebd24fb2c6dbb64739b357c5ff78e5a298f6c82eca482438b95130a3ba4e16d084a languageName: node linkType: hard From 86626b185558934da56e1b025fac99ba591b8b83 Mon Sep 17 00:00:00 2001 From: karwosts <32912880+karwosts@users.noreply.github.com> Date: Mon, 19 Feb 2024 04:06:33 -0500 Subject: [PATCH 019/425] Localize Long Lived Token Dialog (#19830) --- src/panels/profile/ha-long-lived-access-token-dialog.ts | 4 +++- src/translations/en.json | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/panels/profile/ha-long-lived-access-token-dialog.ts b/src/panels/profile/ha-long-lived-access-token-dialog.ts index 4dd9fe129881..904680a2d164 100644 --- a/src/panels/profile/ha-long-lived-access-token-dialog.ts +++ b/src/panels/profile/ha-long-lived-access-token-dialog.ts @@ -74,7 +74,9 @@ export class HaLongLivedAccessTokenDialog extends LitElement { ? this._qrCode : html` - Generate QR code + ${this.hass.localize( + "ui.panel.profile.long_lived_access_tokens.generate_qr_code" + )} `}
diff --git a/src/translations/en.json b/src/translations/en.json index 12431163c683..d0cda35a1675 100644 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -5985,7 +5985,8 @@ "prompt_name": "Give the token a name", "prompt_copy_token": "Copy your access token. It will not be shown again.", "empty_state": "You have no long-lived access tokens yet.", - "qr_code_image": "QR code for token {name}" + "qr_code_image": "QR code for token {name}", + "generate_qr_code": "Generate QR Code" } }, "todo": { From 50cf6d2af9959e1eaa09fd5af04b513f2eb81321 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 19 Feb 2024 12:34:52 -0500 Subject: [PATCH 020/425] Lock file maintenance (#19832) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- yarn.lock | 711 ++++++++++++++++++++++++++++++------------------------ 1 file changed, 397 insertions(+), 314 deletions(-) diff --git a/yarn.lock b/yarn.lock index 631ab800ecf0..29f4b6d40ef0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -129,8 +129,8 @@ __metadata: linkType: hard "@babel/helper-create-class-features-plugin@npm:^7.22.15, @babel/helper-create-class-features-plugin@npm:^7.23.6, @babel/helper-create-class-features-plugin@npm:^7.23.9": - version: 7.23.9 - resolution: "@babel/helper-create-class-features-plugin@npm:7.23.9" + version: 7.23.10 + resolution: "@babel/helper-create-class-features-plugin@npm:7.23.10" dependencies: "@babel/helper-annotate-as-pure": "npm:^7.22.5" "@babel/helper-environment-visitor": "npm:^7.22.20" @@ -143,7 +143,7 @@ __metadata: semver: "npm:^6.3.1" peerDependencies: "@babel/core": ^7.0.0 - checksum: 10/91c8aa8888780bd90aa50f511917cb0953ccd61b2ea4abf61915c1d68d99bb14b472969a8ae5b391d7890759dfc22be79104297be07919c38351714a4ce2fe74 + checksum: 10/8b9f02526eeb03ef1d2bc89e3554377ae966b33a74078ab1f88168dfa725dc206ea5ecf4cf417c3651d8a6b3c70204f6939a9aa0401be3d0d32ddbf6024ea3c7 languageName: node linkType: hard @@ -1999,9 +1999,9 @@ __metadata: linkType: hard "@jridgewell/resolve-uri@npm:^3.0.3, @jridgewell/resolve-uri@npm:^3.1.0": - version: 3.1.1 - resolution: "@jridgewell/resolve-uri@npm:3.1.1" - checksum: 10/64d59df8ae1a4e74315eb1b61e012f1c7bc8aac47a3a1e683f6fe7008eab07bc512a742b7aa7c0405685d1421206de58c9c2e6adbfe23832f8bd69408ffc183e + version: 3.1.2 + resolution: "@jridgewell/resolve-uri@npm:3.1.2" + checksum: 10/97106439d750a409c22c8bff822d648f6a71f3aa9bc8e5129efdc36343cd3096ddc4eeb1c62d2fe48e9bdd4db37b05d4646a17114ecebd3bbcacfa2de51c3c1d languageName: node linkType: hard @@ -2040,12 +2040,12 @@ __metadata: linkType: hard "@jridgewell/trace-mapping@npm:^0.3.17, @jridgewell/trace-mapping@npm:^0.3.20, @jridgewell/trace-mapping@npm:^0.3.9": - version: 0.3.21 - resolution: "@jridgewell/trace-mapping@npm:0.3.21" + version: 0.3.22 + resolution: "@jridgewell/trace-mapping@npm:0.3.22" dependencies: "@jridgewell/resolve-uri": "npm:^3.1.0" "@jridgewell/sourcemap-codec": "npm:^1.4.14" - checksum: 10/925dda0620887e5a24f11b5a3a106f4e8b1a66155b49be6ceee61432174df33a17c243d8a89b2cd79ccebd281d817878759236a2fc42c47325ae9f73dfbfb90d + checksum: 10/48d3e3db00dbecb211613649a1849876ba5544a3f41cf5e6b99ea1130272d6cf18591b5b67389bce20f1c871b4ede5900c3b6446a7aab6d0a3b2fe806a834db7 languageName: node linkType: hard @@ -2089,11 +2089,11 @@ __metadata: linkType: hard "@lezer/lr@npm:^1.0.0": - version: 1.3.14 - resolution: "@lezer/lr@npm:1.3.14" + version: 1.4.0 + resolution: "@lezer/lr@npm:1.4.0" dependencies: "@lezer/common": "npm:^1.0.0" - checksum: 10/9d32701f91fdf7d570073f5e83cda028c80bea7633f928c809eb6977d4f0b5e32424f95fb78cafea98789c4c0dadc9694636903290f0c1c418d2a47ed7f18f46 + checksum: 10/7391d0d08e54cd9e4f4d46e6ee6aa81fbaf079b22ed9c13d01fc9928e0ffd16d0c2d21b2cedd55675ad6c687277db28349ea8db81c9c69222cd7e7c40edd026e languageName: node linkType: hard @@ -2126,9 +2126,9 @@ __metadata: linkType: hard "@lit-labs/ssr-dom-shim@npm:^1.0.0, @lit-labs/ssr-dom-shim@npm:^1.1.0": - version: 1.1.2 - resolution: "@lit-labs/ssr-dom-shim@npm:1.1.2" - checksum: 10/a930f7de57b952dc21317a5754aa0411e000bb4991053cde771c111b7792c4a4cdc896922f0353c832215bed71400431c5ab5a6252c8f4f70bb9ce0b37fe4752 + version: 1.2.0 + resolution: "@lit-labs/ssr-dom-shim@npm:1.2.0" + checksum: 10/33679defe08538ac6fb612854e7d32b4ea1e787cceba2c3373d26fd56baa9833881887da7bade3930a176ba518dc00bb42ce95d82ddb6af6b05b8fbe1fc3169f languageName: node linkType: hard @@ -3193,15 +3193,15 @@ __metadata: linkType: hard "@npmcli/agent@npm:^2.0.0": - version: 2.2.0 - resolution: "@npmcli/agent@npm:2.2.0" + version: 2.2.1 + resolution: "@npmcli/agent@npm:2.2.1" dependencies: agent-base: "npm:^7.1.0" http-proxy-agent: "npm:^7.0.0" https-proxy-agent: "npm:^7.0.1" lru-cache: "npm:^10.0.1" socks-proxy-agent: "npm:^8.0.1" - checksum: 10/822ea077553cd9cfc5cbd6d92380b0950fcb054a7027cd1b63a33bd0cbb16b0c6626ea75d95ec0e804643c8904472d3361d2da8c2444b1fb02a9b525d9c07c41 + checksum: 10/d4a48128f61e47f2f5c89315a5350e265dc619987e635bd62b52b29c7ed93536e724e721418c0ce352ceece86c13043c67aba1b70c3f5cc72fce6bb746706162 languageName: node linkType: hard @@ -3234,8 +3234,8 @@ __metadata: linkType: hard "@octokit/core@npm:^5.0.0": - version: 5.0.2 - resolution: "@octokit/core@npm:5.0.2" + version: 5.1.0 + resolution: "@octokit/core@npm:5.1.0" dependencies: "@octokit/auth-token": "npm:^4.0.0" "@octokit/graphql": "npm:^7.0.0" @@ -3244,7 +3244,7 @@ __metadata: "@octokit/types": "npm:^12.0.0" before-after-hook: "npm:^2.2.0" universal-user-agent: "npm:^6.0.0" - checksum: 10/bb991f88793fab043c4c09f9441432596fe0e6448caf42cd2209f52c1f26807418be488ad2cea7a8293e58e79e5c0019f38dda46e8cf96af5e89e43cca37ec3e + checksum: 10/8062e86a3088f24a691b36d2c3e9f33e864cefcb5f544b0633650358bce280708b111551cbe855ecf6a5190d6fc4fec1220117c329a2c27525940dd97b868614 languageName: node linkType: hard @@ -3317,13 +3317,13 @@ __metadata: linkType: hard "@octokit/plugin-rest-endpoint-methods@npm:^10.0.0": - version: 10.2.0 - resolution: "@octokit/plugin-rest-endpoint-methods@npm:10.2.0" + version: 10.3.0 + resolution: "@octokit/plugin-rest-endpoint-methods@npm:10.3.0" dependencies: - "@octokit/types": "npm:^12.3.0" + "@octokit/types": "npm:^12.4.0" peerDependencies: "@octokit/core": ">=5" - checksum: 10/0f8ca73b3e582b366b400278f19df6309f263efa3809a9d6ba613063e7a26f16d6f8d69c413bf9b23c2431ad4c795e4e06a43717b6acc1367186fb55347cfb69 + checksum: 10/be202aca31a513e9e06eda680ae761d05a944a2900523c2041a8ac6bc43e7a5bab0f76bcba09ef96ed48e3b1fabe4104a174b2f839dfb7a2a6f3d632023b4c6a languageName: node linkType: hard @@ -3352,14 +3352,14 @@ __metadata: linkType: hard "@octokit/request@npm:^8.0.0, @octokit/request@npm:^8.0.1, @octokit/request@npm:^8.0.2": - version: 8.1.6 - resolution: "@octokit/request@npm:8.1.6" + version: 8.2.0 + resolution: "@octokit/request@npm:8.2.0" dependencies: "@octokit/endpoint": "npm:^9.0.0" "@octokit/request-error": "npm:^5.0.0" "@octokit/types": "npm:^12.0.0" universal-user-agent: "npm:^6.0.0" - checksum: 10/aebea1c33d607d23c70f663cd5f8279a8bd932ab77b4ca5cca3b33968a347b4adb47476c886086f3a9aa1acefab3b79adac78ee7aa2dacd67eb1f2a05e272618 + checksum: 10/553ba8b99ea6fe2d3b66b2be6df06f7fe62a0b81e441d334ef25388cf0fcdab4a888fcfe2c1fb1ada262c233bcf7169da3ad5e03f024060ea5723f7753b0de3e languageName: node linkType: hard @@ -3375,12 +3375,12 @@ __metadata: languageName: node linkType: hard -"@octokit/types@npm:^12.0.0, @octokit/types@npm:^12.3.0, @octokit/types@npm:^12.4.0": - version: 12.4.0 - resolution: "@octokit/types@npm:12.4.0" +"@octokit/types@npm:^12.0.0, @octokit/types@npm:^12.4.0": + version: 12.5.0 + resolution: "@octokit/types@npm:12.5.0" dependencies: "@octokit/openapi-types": "npm:^19.1.0" - checksum: 10/b0a893e31fed59a919c2072ae67b671aa5f21e00ee3dee689af325f09f12ddd9175ce07c590b835d183bcb1cd2a2da908e02391b2fc33071881561366b2a35e7 + checksum: 10/a2c8e736e368c781b9389a41fe4ec2cf81563674cf8d74bcc28bf1901dfc4b0c092101c7b333309933b8c14a5a3d1de9ca7eaec93451c41b708b4936e0960894 languageName: node linkType: hard @@ -3878,11 +3878,11 @@ __metadata: linkType: hard "@sinonjs/commons@npm:^3.0.0": - version: 3.0.0 - resolution: "@sinonjs/commons@npm:3.0.0" + version: 3.0.1 + resolution: "@sinonjs/commons@npm:3.0.1" dependencies: type-detect: "npm:4.0.8" - checksum: 10/086720ae0bc370829322df32612205141cdd44e592a8a9ca97197571f8f970352ea39d3bda75b347c43789013ddab36b34b59e40380a49bdae1c2df3aa85fe4f + checksum: 10/a0af217ba7044426c78df52c23cedede6daf377586f3ac58857c565769358ab1f44ebf95ba04bbe38814fba6e316ca6f02870a009328294fc2c555d0f85a7117 languageName: node linkType: hard @@ -3978,12 +3978,12 @@ __metadata: linkType: hard "@types/chrome@npm:*": - version: 0.0.258 - resolution: "@types/chrome@npm:0.0.258" + version: 0.0.260 + resolution: "@types/chrome@npm:0.0.260" dependencies: "@types/filesystem": "npm:*" "@types/har-format": "npm:*" - checksum: 10/301f60ba009832f8eff232159234a4b73db2d7925eae1b67a1a4687da80d56022430bc722e8c4effc0a12c1868c0bb380e981ef8b6ba744bbe52bf47591a8198 + checksum: 10/4e7d6e5e3bd67bc481c6524aacce902568ba8f78b7da3fe1f2999f8f01863240847f1b05a358d38dbd2afdbe112dfd9ff84912a664c40595e9e4266eef3891cc languageName: node linkType: hard @@ -4037,14 +4037,14 @@ __metadata: linkType: hard "@types/cookies@npm:*": - version: 0.7.10 - resolution: "@types/cookies@npm:0.7.10" + version: 0.9.0 + resolution: "@types/cookies@npm:0.9.0" dependencies: "@types/connect": "npm:*" "@types/express": "npm:*" "@types/keygrip": "npm:*" "@types/node": "npm:*" - checksum: 10/85d4b434bac9a971d8a4122d5a7c947dcaaca98fee26e90e0b792b1046da1de414dc37ea164b1693653b9b59f72c501927de90412a3a1dff2c7bdb6abadc3608 + checksum: 10/88d2106834fca85cf9dfef984e99bf4969e77d48538d8e8408a29679b4d1f675fe4725d35f2e38d252a336b76d14a2bc84bcb34edc72238a7a8261c0808c7c56 languageName: node linkType: hard @@ -4083,14 +4083,14 @@ __metadata: linkType: hard "@types/express-serve-static-core@npm:*, @types/express-serve-static-core@npm:^4.17.33": - version: 4.17.41 - resolution: "@types/express-serve-static-core@npm:4.17.41" + version: 4.17.43 + resolution: "@types/express-serve-static-core@npm:4.17.43" dependencies: "@types/node": "npm:*" "@types/qs": "npm:*" "@types/range-parser": "npm:*" "@types/send": "npm:*" - checksum: 10/7647e19d9c3d57ddd18947d2b161b90ef0aedd15875140e5b824209be41c1084ae942d4fb43cd5f2051a6a5f8c044519ef6c9ac1b2ad86b9aa546b4f1f023303 + checksum: 10/9079e137470e0456bb8e77ae66df9505ee12591e94860bde574cfe52c5c60bbc5bf7dd44f5689c3cbb1baf0aa84442d9a21f53dcd921d18745727293cd5a5fd6 languageName: node linkType: hard @@ -4116,16 +4116,16 @@ __metadata: linkType: hard "@types/filewriter@npm:*": - version: 0.0.32 - resolution: "@types/filewriter@npm:0.0.32" - checksum: 10/fe2f19239c23c63c009c6d422227d692bc2a0cd1113f8ce31b0fb7048f32ec018003172199949843fdbb1c5988551c29e1e9e2238b9c160969b5e5edbfb76424 + version: 0.0.33 + resolution: "@types/filewriter@npm:0.0.33" + checksum: 10/495a4bb424c27eda967fe9ac3b8f7b781e6b3f9ce59403a991590cb1073022f9c5383d3c7d808ef6956b785550c36664c4fcd502dc0baf69e340bd481171e0ca languageName: node linkType: hard "@types/geojson@npm:*": - version: 7946.0.13 - resolution: "@types/geojson@npm:7946.0.13" - checksum: 10/b3b68457c89bc3f0445dc9eb54d07e6f89658672867c54989bc7f71f87d54e562195b291d43e1b84476493351271d7ccb9f5c6ab2012b29fbafbb0e8e43c4bca + version: 7946.0.14 + resolution: "@types/geojson@npm:7946.0.14" + checksum: 10/ae511bee6488ae3bd5a3a3347aedb0371e997b14225b8983679284e22fa4ebd88627c6e3ff8b08bf4cc35068cb29310c89427311ffc9322c255615821a922e71 languageName: node linkType: hard @@ -4315,11 +4315,11 @@ __metadata: linkType: hard "@types/node@npm:*": - version: 20.11.5 - resolution: "@types/node@npm:20.11.5" + version: 20.11.19 + resolution: "@types/node@npm:20.11.19" dependencies: undici-types: "npm:~5.26.4" - checksum: 10/9f31c471047d7b3e240ce7b77ff29b0d15e83be7e3feafb3d0b0d0931122b438b1eefa302a5a2e1e9849914ff3fd76aafbd8ccb372efb1331ba048da63bce6f8 + checksum: 10/c7f4705d6c84aa21679ad180c33c13ca9567f650e66e14bcee77c7c43d14619c7cd3b4d7b2458947143030b7b1930180efa6d12d999b45366abff9fed7a17472 languageName: node linkType: hard @@ -4414,9 +4414,9 @@ __metadata: linkType: hard "@types/semver@npm:^7.5.0": - version: 7.5.6 - resolution: "@types/semver@npm:7.5.6" - checksum: 10/e77282b17f74354e17e771c0035cccb54b94cc53d0433fa7e9ba9d23fd5d7edcd14b6c8b7327d58bbd89e83b1c5eda71dfe408e06b929007e2b89586e9b63459 + version: 7.5.7 + resolution: "@types/semver@npm:7.5.7" + checksum: 10/535d88ec577fe59e38211881f79a1e2ba391e9e1516f8fff74e7196a5ba54315bace9c67a4616c334c830c89027d70a9f473a4ceb634526086a9da39180f2f9a languageName: node linkType: hard @@ -4939,9 +4939,9 @@ __metadata: linkType: hard "@vscode/web-custom-data@npm:^0.4.2": - version: 0.4.8 - resolution: "@vscode/web-custom-data@npm:0.4.8" - checksum: 10/556106530e399321d1412d0074d1a4dcfc04c17fc334df8de4f10469a2ad6f83c7245caf92174817c5bf032ec5ffd894bc418889d76a2a7d163ad0e4c910adf0 + version: 0.4.9 + resolution: "@vscode/web-custom-data@npm:0.4.9" + checksum: 10/6ccc98c43b0ead4f320dab2e33df3570590d4d3e94edf54b722c3b376fc236abb5a6e9e7655942044cf7ebe4f305a58bc58c1d8d4b251b9434d1db1266797e2e languageName: node linkType: hard @@ -5681,13 +5681,13 @@ __metadata: languageName: node linkType: hard -"array-buffer-byte-length@npm:^1.0.0": - version: 1.0.0 - resolution: "array-buffer-byte-length@npm:1.0.0" +"array-buffer-byte-length@npm:^1.0.1": + version: 1.0.1 + resolution: "array-buffer-byte-length@npm:1.0.1" dependencies: - call-bind: "npm:^1.0.2" - is-array-buffer: "npm:^3.0.1" - checksum: 10/044e101ce150f4804ad19c51d6c4d4cfa505c5b2577bd179256e4aa3f3f6a0a5e9874c78cd428ee566ac574c8a04d7ce21af9fe52e844abfdccb82b33035a7c3 + call-bind: "npm:^1.0.5" + is-array-buffer: "npm:^3.0.4" + checksum: 10/53524e08f40867f6a9f35318fafe467c32e45e9c682ba67b11943e167344d2febc0f6977a17e699b05699e805c3e8f073d876f8bbf1b559ed494ad2cd0fae09e languageName: node linkType: hard @@ -5776,6 +5776,19 @@ __metadata: languageName: node linkType: hard +"array.prototype.filter@npm:^1.0.3": + version: 1.0.3 + resolution: "array.prototype.filter@npm:1.0.3" + dependencies: + call-bind: "npm:^1.0.2" + define-properties: "npm:^1.2.0" + es-abstract: "npm:^1.22.1" + es-array-method-boxes-properly: "npm:^1.0.0" + is-string: "npm:^1.0.7" + checksum: 10/3da2189afb00f95559cc73fc3c50f17a071a65bb705c0b2f2e2a2b2142781215b622442368c8b4387389b6ab251adf09ad347f9a8a4cf29d24404cc5ea1e295c + languageName: node + linkType: hard + "array.prototype.find@npm:^2.2.2": version: 2.2.2 resolution: "array.prototype.find@npm:2.2.2" @@ -5789,15 +5802,15 @@ __metadata: linkType: hard "array.prototype.findlastindex@npm:^1.2.3": - version: 1.2.3 - resolution: "array.prototype.findlastindex@npm:1.2.3" + version: 1.2.4 + resolution: "array.prototype.findlastindex@npm:1.2.4" dependencies: - call-bind: "npm:^1.0.2" - define-properties: "npm:^1.2.0" - es-abstract: "npm:^1.22.1" - es-shim-unscopables: "npm:^1.0.0" - get-intrinsic: "npm:^1.2.1" - checksum: 10/063cbab8eeac3aa01f3e980eecb9a8c5d87723032b49f7f814ecc6d75c33c03c17e3f43a458127a62e16303cab412f95d6ad9dc7e0ae6d9dc27a9bb76c24df7a + call-bind: "npm:^1.0.5" + define-properties: "npm:^1.2.1" + es-abstract: "npm:^1.22.3" + es-errors: "npm:^1.3.0" + es-shim-unscopables: "npm:^1.0.2" + checksum: 10/12d7de8da619065b9d4c40550d11c13f2fbbc863c4270ef01d022f49ef16fbe9022441ee9d60b1e952853c661dd4b3e05c21e4348d4631c6d93ddf802a252296 languageName: node linkType: hard @@ -5825,18 +5838,19 @@ __metadata: languageName: node linkType: hard -"arraybuffer.prototype.slice@npm:^1.0.2": - version: 1.0.2 - resolution: "arraybuffer.prototype.slice@npm:1.0.2" +"arraybuffer.prototype.slice@npm:^1.0.3": + version: 1.0.3 + resolution: "arraybuffer.prototype.slice@npm:1.0.3" dependencies: - array-buffer-byte-length: "npm:^1.0.0" - call-bind: "npm:^1.0.2" - define-properties: "npm:^1.2.0" - es-abstract: "npm:^1.22.1" - get-intrinsic: "npm:^1.2.1" - is-array-buffer: "npm:^3.0.2" + array-buffer-byte-length: "npm:^1.0.1" + call-bind: "npm:^1.0.5" + define-properties: "npm:^1.2.1" + es-abstract: "npm:^1.22.3" + es-errors: "npm:^1.2.1" + get-intrinsic: "npm:^1.2.3" + is-array-buffer: "npm:^3.0.4" is-shared-array-buffer: "npm:^1.0.2" - checksum: 10/c200faf437786f5b2c80d4564ff5481c886a16dee642ef02abdc7306c7edd523d1f01d1dd12b769c7eb42ac9bc53874510db19a92a2c035c0f6696172aafa5d3 + checksum: 10/0221f16c1e3ec7b67da870ee0e1f12b825b5f9189835392b59a22990f715827561a4f4cd5330dc7507de272d8df821be6cd4b0cb569babf5ea4be70e365a2f3d languageName: node linkType: hard @@ -5921,17 +5935,17 @@ __metadata: languageName: node linkType: hard -"available-typed-arrays@npm:^1.0.5": - version: 1.0.5 - resolution: "available-typed-arrays@npm:1.0.5" - checksum: 10/4d4d5e86ea0425696f40717882f66a570647b94ac8d273ddc7549a9b61e5da099e149bf431530ccbd776bd74e02039eb8b5edf426e3e2211ee61af16698a9064 +"available-typed-arrays@npm:^1.0.6": + version: 1.0.6 + resolution: "available-typed-arrays@npm:1.0.6" + checksum: 10/c1e2e3d3a694f21bf60e0a048d8275fa7358131a0b8e6b57714318d618b59522416db67fb9f56973af0ce596f4333ef1336ca12c37a41d5a72ef79885373a7fd languageName: node linkType: hard "axe-core@npm:^4.3.3": - version: 4.8.3 - resolution: "axe-core@npm:4.8.3" - checksum: 10/86d72bcdff867b8a4f223b910f90d1c963ddab1db3bdc5290e111453bae4e319ed14d667cd7a6ac97185ffa141261c88ac9a586aa007d007ffc19ed9ae81ee1d + version: 4.8.4 + resolution: "axe-core@npm:4.8.4" + checksum: 10/c8b3972b17afac33b9e151556fa500b9218086ca763866942de30e7f51ac50582902ad03ec16381796c95afaacfa8c33efb2d02ab4f09b6c09d6be58b95da978 languageName: node linkType: hard @@ -6199,17 +6213,17 @@ __metadata: languageName: node linkType: hard -"browserslist@npm:^4.21.10, browserslist@npm:^4.22.2": - version: 4.22.3 - resolution: "browserslist@npm:4.22.3" +"browserslist@npm:^4.21.10, browserslist@npm:^4.22.2, browserslist@npm:^4.22.3": + version: 4.23.0 + resolution: "browserslist@npm:4.23.0" dependencies: - caniuse-lite: "npm:^1.0.30001580" - electron-to-chromium: "npm:^1.4.648" + caniuse-lite: "npm:^1.0.30001587" + electron-to-chromium: "npm:^1.4.668" node-releases: "npm:^2.0.14" update-browserslist-db: "npm:^1.0.13" bin: browserslist: cli.js - checksum: 10/d46a906c79dfe95d9702c020afbe5b7b4dbe2019b85432e7a020326adff27e63e3c0a52dc8d4e73247060bbe2c13f000714741903cf96a16baae9c216dc74c75 + checksum: 10/496c3862df74565dd942b4ae65f502c575cbeba1fa4a3894dad7aa3b16130dc3033bc502d8848147f7b625154a284708253d9598bcdbef5a1e34cf11dc7bad8e languageName: node linkType: hard @@ -6328,14 +6342,16 @@ __metadata: languageName: node linkType: hard -"call-bind@npm:^1.0.0, call-bind@npm:^1.0.2, call-bind@npm:^1.0.4, call-bind@npm:^1.0.5": - version: 1.0.5 - resolution: "call-bind@npm:1.0.5" +"call-bind@npm:^1.0.2, call-bind@npm:^1.0.5, call-bind@npm:^1.0.6, call-bind@npm:^1.0.7": + version: 1.0.7 + resolution: "call-bind@npm:1.0.7" dependencies: + es-define-property: "npm:^1.0.0" + es-errors: "npm:^1.3.0" function-bind: "npm:^1.1.2" - get-intrinsic: "npm:^1.2.1" - set-function-length: "npm:^1.1.1" - checksum: 10/246d44db6ef9bbd418828dbd5337f80b46be4398d522eded015f31554cbb2ea33025b0203b75c7ab05a1a255b56ef218880cca1743e4121e306729f9e414da39 + get-intrinsic: "npm:^1.2.4" + set-function-length: "npm:^1.2.1" + checksum: 10/cd6fe658e007af80985da5185bff7b55e12ef4c2b6f41829a26ed1eef254b1f1c12e3dfd5b2b068c6ba8b86aba62390842d81752e67dcbaec4f6f76e7113b6b7 languageName: node linkType: hard @@ -6377,10 +6393,10 @@ __metadata: languageName: node linkType: hard -"caniuse-lite@npm:^1.0.30001580": - version: 1.0.30001580 - resolution: "caniuse-lite@npm:1.0.30001580" - checksum: 10/b626d25d792c766383a47c9efe1384f7d3c3b23e0ee70bf121e8b3a628806a96a21def16a44e58b75f4a5e23b5e008f51c2cc1e8be477b8c8d9493dcc170dd0e +"caniuse-lite@npm:^1.0.30001587": + version: 1.0.30001588 + resolution: "caniuse-lite@npm:1.0.30001588" + checksum: 10/09150ef2daa65c75cb2681832d5bc203760a02d9f71eb033dc0401fbfdbe026d3a84e54a8d2085f730a4f51eb074028b89013dd033841e1a0eb3c7323a50ed45 languageName: node linkType: hard @@ -6450,7 +6466,7 @@ __metadata: languageName: node linkType: hard -"chokidar@npm:3.5.3, chokidar@npm:^3.4.3, chokidar@npm:^3.5.3": +"chokidar@npm:3.5.3": version: 3.5.3 resolution: "chokidar@npm:3.5.3" dependencies: @@ -6492,6 +6508,25 @@ __metadata: languageName: node linkType: hard +"chokidar@npm:^3.4.3, chokidar@npm:^3.5.3": + version: 3.6.0 + resolution: "chokidar@npm:3.6.0" + dependencies: + anymatch: "npm:~3.1.2" + braces: "npm:~3.0.2" + fsevents: "npm:~2.3.2" + glob-parent: "npm:~5.1.2" + is-binary-path: "npm:~2.1.0" + is-glob: "npm:~4.0.1" + normalize-path: "npm:~3.0.0" + readdirp: "npm:~3.6.0" + dependenciesMeta: + fsevents: + optional: true + checksum: 10/c327fb07704443f8d15f7b4a7ce93b2f0bc0e6cea07ec28a7570aa22cd51fcf0379df589403976ea956c369f25aa82d84561947e227cd925902e1751371658df + languageName: node + linkType: hard + "chownr@npm:^2.0.0": version: 2.0.0 resolution: "chownr@npm:2.0.0" @@ -6969,11 +7004,11 @@ __metadata: linkType: hard "core-js-compat@npm:^3.31.0, core-js-compat@npm:^3.34.0": - version: 3.35.1 - resolution: "core-js-compat@npm:3.35.1" + version: 3.36.0 + resolution: "core-js-compat@npm:3.36.0" dependencies: - browserslist: "npm:^4.22.2" - checksum: 10/9a153c66591e23703e182b258ec6bdaff0a7c578dc5f9ac152fdfef2d09e8ec277f192e28d4634a8b576c8e1a6d3b1ac76ff6b8776e72b71b334e609e177a05e + browserslist: "npm:^4.22.3" + checksum: 10/633c49a254fe48981057e33651e5a74a0a14f14731aa5afed5d2e61fbe3c5cbc116ffd4feaa158c683c40d6dc4fd2e6aa0ebe12c45d157cfa571309d08400c98 languageName: node linkType: hard @@ -7216,14 +7251,14 @@ __metadata: languageName: node linkType: hard -"define-data-property@npm:^1.0.1, define-data-property@npm:^1.1.1": - version: 1.1.1 - resolution: "define-data-property@npm:1.1.1" +"define-data-property@npm:^1.0.1, define-data-property@npm:^1.1.2": + version: 1.1.4 + resolution: "define-data-property@npm:1.1.4" dependencies: - get-intrinsic: "npm:^1.2.1" + es-define-property: "npm:^1.0.0" + es-errors: "npm:^1.3.0" gopd: "npm:^1.0.1" - has-property-descriptors: "npm:^1.0.0" - checksum: 10/5573c8df96b5857408cad64d9b91b69152e305ce4b06218e5f49b59c6cafdbb90a8bd8a0bb83c7bc67a8d479c04aa697063c9bc28d849b7282f9327586d6bc7b + checksum: 10/abdcb2505d80a53524ba871273e5da75e77e52af9e15b3aa65d8aad82b8a3a424dad7aee2cc0b71470ac7acf501e08defac362e8b6a73cdb4309f028061df4ae languageName: node linkType: hard @@ -7371,9 +7406,9 @@ __metadata: linkType: hard "diff@npm:^5.1.0": - version: 5.1.0 - resolution: "diff@npm:5.1.0" - checksum: 10/f4557032a98b2967fe27b1a91dfcf8ebb6b9a24b1afe616b5c2312465100b861e9b8d4da374be535f2d6b967ce2f53826d7f6edc2a0d32b2ab55abc96acc2f9d + version: 5.2.0 + resolution: "diff@npm:5.2.0" + checksum: 10/01b7b440f83a997350a988e9d2f558366c0f90f15be19f4aa7f1bb3109a4e153dfc3b9fbf78e14ea725717017407eeaa2271e3896374a0181e8f52445740846d languageName: node linkType: hard @@ -7495,10 +7530,10 @@ __metadata: languageName: node linkType: hard -"electron-to-chromium@npm:^1.4.648": - version: 1.4.648 - resolution: "electron-to-chromium@npm:1.4.648" - checksum: 10/a18f06bafce9017ac7b587f76dac77063a0beb7dfcdf9d5971f72b322f56af6315e4fc3c59154a260a9188c168ac7632538797d57a8c53ab57025ace0c9441f2 +"electron-to-chromium@npm:^1.4.668": + version: 1.4.673 + resolution: "electron-to-chromium@npm:1.4.673" + checksum: 10/e9e82bec564f4398040a3ce5a8e344dfebac624e458545c7d9317bb54d65f7000648e552acebc1951cda4562e5d9cebcb7d9e76a376c8ad1e04f7860230935fa languageName: node linkType: hard @@ -7598,11 +7633,11 @@ __metadata: linkType: hard "envinfo@npm:^7.7.3": - version: 7.11.0 - resolution: "envinfo@npm:7.11.0" + version: 7.11.1 + resolution: "envinfo@npm:7.11.1" bin: envinfo: dist/cli.js - checksum: 10/8cba09db181329b243fe02b3384ec275ebf93d5d3663c31e2064697aa96576c7de9b7e1c878a250f8eaec0db8026bace747709dcdc8d8a4ecd9a653cdbc08926 + checksum: 10/5a18ead05954ac1643350170fefce2436a9cb758dc402e36fe4616553ee46469f766fcb6df72379d1741a2e5b55918949b343ff6174502c31c524a5cf75f05cd languageName: node linkType: hard @@ -7631,50 +7666,75 @@ __metadata: languageName: node linkType: hard -"es-abstract@npm:^1.22.1": - version: 1.22.3 - resolution: "es-abstract@npm:1.22.3" +"es-abstract@npm:^1.22.1, es-abstract@npm:^1.22.3": + version: 1.22.4 + resolution: "es-abstract@npm:1.22.4" dependencies: - array-buffer-byte-length: "npm:^1.0.0" - arraybuffer.prototype.slice: "npm:^1.0.2" - available-typed-arrays: "npm:^1.0.5" - call-bind: "npm:^1.0.5" - es-set-tostringtag: "npm:^2.0.1" + array-buffer-byte-length: "npm:^1.0.1" + arraybuffer.prototype.slice: "npm:^1.0.3" + available-typed-arrays: "npm:^1.0.6" + call-bind: "npm:^1.0.7" + es-define-property: "npm:^1.0.0" + es-errors: "npm:^1.3.0" + es-set-tostringtag: "npm:^2.0.2" es-to-primitive: "npm:^1.2.1" function.prototype.name: "npm:^1.1.6" - get-intrinsic: "npm:^1.2.2" - get-symbol-description: "npm:^1.0.0" + get-intrinsic: "npm:^1.2.4" + get-symbol-description: "npm:^1.0.2" globalthis: "npm:^1.0.3" gopd: "npm:^1.0.1" - has-property-descriptors: "npm:^1.0.0" + has-property-descriptors: "npm:^1.0.2" has-proto: "npm:^1.0.1" has-symbols: "npm:^1.0.3" - hasown: "npm:^2.0.0" - internal-slot: "npm:^1.0.5" - is-array-buffer: "npm:^3.0.2" + hasown: "npm:^2.0.1" + internal-slot: "npm:^1.0.7" + is-array-buffer: "npm:^3.0.4" is-callable: "npm:^1.2.7" is-negative-zero: "npm:^2.0.2" is-regex: "npm:^1.1.4" is-shared-array-buffer: "npm:^1.0.2" is-string: "npm:^1.0.7" - is-typed-array: "npm:^1.1.12" + is-typed-array: "npm:^1.1.13" is-weakref: "npm:^1.0.2" object-inspect: "npm:^1.13.1" object-keys: "npm:^1.1.1" - object.assign: "npm:^4.1.4" - regexp.prototype.flags: "npm:^1.5.1" - safe-array-concat: "npm:^1.0.1" - safe-regex-test: "npm:^1.0.0" + object.assign: "npm:^4.1.5" + regexp.prototype.flags: "npm:^1.5.2" + safe-array-concat: "npm:^1.1.0" + safe-regex-test: "npm:^1.0.3" string.prototype.trim: "npm:^1.2.8" string.prototype.trimend: "npm:^1.0.7" string.prototype.trimstart: "npm:^1.0.7" - typed-array-buffer: "npm:^1.0.0" + typed-array-buffer: "npm:^1.0.1" typed-array-byte-length: "npm:^1.0.0" typed-array-byte-offset: "npm:^1.0.0" typed-array-length: "npm:^1.0.4" unbox-primitive: "npm:^1.0.2" - which-typed-array: "npm:^1.1.13" - checksum: 10/e1ea9738ece15f810733b7bd71d825b555e01bb8c860272560d7d901467a9db1265214d6cf44f3beeb5d73ae421a609b9ad93a39aa47bbcd8cde510d5e0aa875 + which-typed-array: "npm:^1.1.14" + checksum: 10/062e562a000e280c0c0683ad4a7b81732f97463bc769110c668a8edb739cd5df56975fa55965f5304a3256fd6eee03b9b66a47d863076f8976c2050731946b1f + languageName: node + linkType: hard + +"es-array-method-boxes-properly@npm:^1.0.0": + version: 1.0.0 + resolution: "es-array-method-boxes-properly@npm:1.0.0" + checksum: 10/27a8a21acf20f3f51f69dce8e643f151e380bffe569e95dc933b9ded9fcd89a765ee21b5229c93f9206c93f87395c6b75f80be8ac8c08a7ceb8771e1822ff1fb + languageName: node + linkType: hard + +"es-define-property@npm:^1.0.0": + version: 1.0.0 + resolution: "es-define-property@npm:1.0.0" + dependencies: + get-intrinsic: "npm:^1.2.4" + checksum: 10/f66ece0a887b6dca71848fa71f70461357c0e4e7249696f81bad0a1f347eed7b31262af4a29f5d726dc026426f085483b6b90301855e647aa8e21936f07293c6 + languageName: node + linkType: hard + +"es-errors@npm:^1.0.0, es-errors@npm:^1.2.1, es-errors@npm:^1.3.0": + version: 1.3.0 + resolution: "es-errors@npm:1.3.0" + checksum: 10/96e65d640156f91b707517e8cdc454dd7d47c32833aa3e85d79f24f9eb7ea85f39b63e36216ef0114996581969b59fe609a94e30316b08f5f4df1d44134cf8d5 languageName: node linkType: hard @@ -7685,7 +7745,7 @@ __metadata: languageName: node linkType: hard -"es-set-tostringtag@npm:^2.0.1": +"es-set-tostringtag@npm:^2.0.2": version: 2.0.2 resolution: "es-set-tostringtag@npm:2.0.2" dependencies: @@ -7696,7 +7756,7 @@ __metadata: languageName: node linkType: hard -"es-shim-unscopables@npm:^1.0.0": +"es-shim-unscopables@npm:^1.0.0, es-shim-unscopables@npm:^1.0.2": version: 1.0.2 resolution: "es-shim-unscopables@npm:1.0.2" dependencies: @@ -7761,9 +7821,9 @@ __metadata: linkType: hard "escalade@npm:^3.1.1": - version: 3.1.1 - resolution: "escalade@npm:3.1.1" - checksum: 10/afa618e73362576b63f6ca83c975456621095a1ed42ff068174e3f5cea48afc422814dda548c96e6ebb5333e7265140c7292abcc81bbd6ccb1757d50d3a4e182 + version: 3.1.2 + resolution: "escalade@npm:3.1.2" + checksum: 10/a1e07fea2f15663c30e40b9193d658397846ffe28ce0a3e4da0d8e485fedfeca228ab846aee101a05015829adf39f9934ff45b2a3fca47bed37a29646bd05cd3 languageName: node linkType: hard @@ -8417,11 +8477,11 @@ __metadata: linkType: hard "fastq@npm:^1.6.0": - version: 1.16.0 - resolution: "fastq@npm:1.16.0" + version: 1.17.1 + resolution: "fastq@npm:1.17.1" dependencies: reusify: "npm:^1.0.4" - checksum: 10/de151543aab9d91900ed5da88860c46987ece925c628df586fac664235f25e020ec20729e1c032edb5fd2520fd4aa5b537d69e39b689e65e82112cfbecb4479e + checksum: 10/a443180068b527dd7b3a63dc7f2a47ceca2f3e97b9c00a1efe5538757e6cc4056a3526df94308075d7727561baf09ebaa5b67da8dcbddb913a021c5ae69d1f69 languageName: node linkType: hard @@ -8910,15 +8970,16 @@ __metadata: languageName: node linkType: hard -"get-intrinsic@npm:^1.0.2, get-intrinsic@npm:^1.1.1, get-intrinsic@npm:^1.1.3, get-intrinsic@npm:^1.2.0, get-intrinsic@npm:^1.2.1, get-intrinsic@npm:^1.2.2": - version: 1.2.2 - resolution: "get-intrinsic@npm:1.2.2" +"get-intrinsic@npm:^1.1.3, get-intrinsic@npm:^1.2.1, get-intrinsic@npm:^1.2.2, get-intrinsic@npm:^1.2.3, get-intrinsic@npm:^1.2.4": + version: 1.2.4 + resolution: "get-intrinsic@npm:1.2.4" dependencies: + es-errors: "npm:^1.3.0" function-bind: "npm:^1.1.2" has-proto: "npm:^1.0.1" has-symbols: "npm:^1.0.3" hasown: "npm:^2.0.0" - checksum: 10/aa96db4f809734d26d49b59bc8669d73a0ae792da561514e987735573a1dfaede516cd102f217a078ea2b42d4c4fb1f83d487932cb15d49826b726cc9cd4470b + checksum: 10/85bbf4b234c3940edf8a41f4ecbd4e25ce78e5e6ad4e24ca2f77037d983b9ef943fd72f00f3ee97a49ec622a506b67db49c36246150377efcda1c9eb03e5f06d languageName: node linkType: hard @@ -8943,13 +9004,14 @@ __metadata: languageName: node linkType: hard -"get-symbol-description@npm:^1.0.0": - version: 1.0.0 - resolution: "get-symbol-description@npm:1.0.0" +"get-symbol-description@npm:^1.0.2": + version: 1.0.2 + resolution: "get-symbol-description@npm:1.0.2" dependencies: - call-bind: "npm:^1.0.2" - get-intrinsic: "npm:^1.1.1" - checksum: 10/7e5f298afe0f0872747dce4a949ce490ebc5d6dd6aefbbe5044543711c9b19a4dfaebdbc627aee99e1299d58a435b2fbfa083458c1d58be6dc03a3bada24d359 + call-bind: "npm:^1.0.5" + es-errors: "npm:^1.3.0" + get-intrinsic: "npm:^1.2.4" + checksum: 10/e1cb53bc211f9dbe9691a4f97a46837a553c4e7caadd0488dc24ac694db8a390b93edd412b48dcdd0b4bbb4c595de1709effc75fc87c0839deedc6968f5bd973 languageName: node linkType: hard @@ -9343,12 +9405,12 @@ __metadata: languageName: node linkType: hard -"has-property-descriptors@npm:^1.0.0, has-property-descriptors@npm:^1.0.1": - version: 1.0.1 - resolution: "has-property-descriptors@npm:1.0.1" +"has-property-descriptors@npm:^1.0.0, has-property-descriptors@npm:^1.0.1, has-property-descriptors@npm:^1.0.2": + version: 1.0.2 + resolution: "has-property-descriptors@npm:1.0.2" dependencies: - get-intrinsic: "npm:^1.2.2" - checksum: 10/21a47bb080a24e79594aef1ce71e1a18a1c5ab4120308e218088f67ebb7f6f408847541e2d96e5bd00e90eef5c5a49e4ebbdc8fc2d5b365a2c379aef071642f0 + es-define-property: "npm:^1.0.0" + checksum: 10/2d8c9ab8cebb572e3362f7d06139a4592105983d4317e68f7adba320fe6ddfc8874581e0971e899e633fd5f72e262830edce36d5a0bc863dad17ad20572484b2 languageName: node linkType: hard @@ -9366,12 +9428,12 @@ __metadata: languageName: node linkType: hard -"has-tostringtag@npm:^1.0.0": - version: 1.0.0 - resolution: "has-tostringtag@npm:1.0.0" +"has-tostringtag@npm:^1.0.0, has-tostringtag@npm:^1.0.1": + version: 1.0.2 + resolution: "has-tostringtag@npm:1.0.2" dependencies: - has-symbols: "npm:^1.0.2" - checksum: 10/95546e7132efc895a9ae64a8a7cf52588601fc3d52e0304ed228f336992cdf0baaba6f3519d2655e560467db35a1ed79f6420c286cc91a13aa0647a31ed92570 + has-symbols: "npm:^1.0.3" + checksum: 10/c74c5f5ceee3c8a5b8bc37719840dc3749f5b0306d818974141dda2471a1a2ca6c8e46b9d6ac222c5345df7a901c9b6f350b1e6d62763fec877e26609a401bfe languageName: node linkType: hard @@ -9414,12 +9476,12 @@ __metadata: languageName: node linkType: hard -"hasown@npm:^2.0.0": - version: 2.0.0 - resolution: "hasown@npm:2.0.0" +"hasown@npm:^2.0.0, hasown@npm:^2.0.1": + version: 2.0.1 + resolution: "hasown@npm:2.0.1" dependencies: function-bind: "npm:^1.1.2" - checksum: 10/c330f8d93f9d23fe632c719d4db3d698ef7d7c367d51548b836069e06a90fa9151e868c8e67353cfe98d67865bf7354855db28fa36eb1b18fa5d4a3f4e7f1c90 + checksum: 10/b7f9107387ee68abed88e965c2b99e868b5e0e9d289db1ddd080706ffafb69533b4f538b0e6362585bae8d6cbd080249f65e79702f74c225990f66d6106be3f6 languageName: node linkType: hard @@ -9812,12 +9874,12 @@ __metadata: linkType: hard "http-proxy-agent@npm:^7.0.0": - version: 7.0.0 - resolution: "http-proxy-agent@npm:7.0.0" + version: 7.0.2 + resolution: "http-proxy-agent@npm:7.0.2" dependencies: agent-base: "npm:^7.1.0" debug: "npm:^4.3.4" - checksum: 10/dbaaf3d9f3fc4df4a5d7ec45d456ec50f575240b557160fa63427b447d1f812dd7fe4a4f17d2e1ba003d231f07edf5a856ea6d91cb32d533062ff20a7803ccac + checksum: 10/d062acfa0cb82beeb558f1043c6ba770ea892b5fb7b28654dbc70ea2aeea55226dd34c02a294f6c1ca179a5aa483c4ea641846821b182edbd9cc5d89b54c6848 languageName: node linkType: hard @@ -9851,12 +9913,12 @@ __metadata: linkType: hard "https-proxy-agent@npm:^7.0.1": - version: 7.0.2 - resolution: "https-proxy-agent@npm:7.0.2" + version: 7.0.4 + resolution: "https-proxy-agent@npm:7.0.4" dependencies: agent-base: "npm:^7.0.2" debug: "npm:4" - checksum: 10/9ec844f78fd643608239c9c3f6819918631df5cd3e17d104cc507226a39b5d4adda9d790fc9fd63ac0d2bb8a761b2f9f60faa80584a9bf9d7f2e8c5ed0acd330 + checksum: 10/405fe582bba461bfe5c7e2f8d752b384036854488b828ae6df6a587c654299cbb2c50df38c4b6ab303502c3c5e029a793fbaac965d1e86ee0be03faceb554d63 languageName: node linkType: hard @@ -9923,9 +9985,9 @@ __metadata: linkType: hard "ignore@npm:^5.2.0, ignore@npm:^5.2.4": - version: 5.3.0 - resolution: "ignore@npm:5.3.0" - checksum: 10/51594355cea4c6ad6b28b3b85eb81afa7b988a1871feefd7062baf136c95aa06760ee934fa9590e43d967bd377ce84a4cf6135fbeb6063e063f1182a0e9a3bcd + version: 5.3.1 + resolution: "ignore@npm:5.3.1" + checksum: 10/0a884c2fbc8c316f0b9f92beaf84464253b73230a4d4d286697be45fca081199191ca33e1c2e82d9e5f851f5e9a48a78e25a35c951e7eb41e59f150db3530065 languageName: node linkType: hard @@ -10036,14 +10098,14 @@ __metadata: languageName: node linkType: hard -"internal-slot@npm:^1.0.5": - version: 1.0.6 - resolution: "internal-slot@npm:1.0.6" +"internal-slot@npm:^1.0.5, internal-slot@npm:^1.0.7": + version: 1.0.7 + resolution: "internal-slot@npm:1.0.7" dependencies: - get-intrinsic: "npm:^1.2.2" + es-errors: "npm:^1.3.0" hasown: "npm:^2.0.0" side-channel: "npm:^1.0.4" - checksum: 10/bc2022eb1f277f2fcb2a60e7ced451c7ffc7a769b12e63c7a3fb247af8b5a1bed06428ce724046a8bca39ed6eb5b6832501a42f2e9a5ec4a9a7dc4e634431616 + checksum: 10/3e66720508831153ecf37d13def9f6856f9f2960989ec8a0a0476c98f887fca9eff0163127466485cb825c900c2d6fc601aa9117b7783b90ffce23a71ea5d053 languageName: node linkType: hard @@ -10080,6 +10142,16 @@ __metadata: languageName: node linkType: hard +"ip-address@npm:^9.0.5": + version: 9.0.5 + resolution: "ip-address@npm:9.0.5" + dependencies: + jsbn: "npm:1.1.0" + sprintf-js: "npm:^1.1.3" + checksum: 10/1ed81e06721af012306329b31f532b5e24e00cb537be18ddc905a84f19fe8f83a09a1699862bf3a1ec4b9dea93c55a3fa5faf8b5ea380431469df540f38b092c + languageName: node + linkType: hard + "ip@npm:^1.1.5": version: 1.1.8 resolution: "ip@npm:1.1.8" @@ -10087,13 +10159,6 @@ __metadata: languageName: node linkType: hard -"ip@npm:^2.0.0": - version: 2.0.0 - resolution: "ip@npm:2.0.0" - checksum: 10/1270b11e534a466fb4cf4426cbcc3a907c429389f7f4e4e3b288b42823562e88d6a509ceda8141a507de147ca506141f745005c0aa144569d94cf24a54eb52bc - languageName: node - linkType: hard - "ipaddr.js@npm:1.9.1": version: 1.9.1 resolution: "ipaddr.js@npm:1.9.1" @@ -10127,14 +10192,13 @@ __metadata: languageName: node linkType: hard -"is-array-buffer@npm:^3.0.1, is-array-buffer@npm:^3.0.2": - version: 3.0.2 - resolution: "is-array-buffer@npm:3.0.2" +"is-array-buffer@npm:^3.0.4": + version: 3.0.4 + resolution: "is-array-buffer@npm:3.0.4" dependencies: call-bind: "npm:^1.0.2" - get-intrinsic: "npm:^1.2.0" - is-typed-array: "npm:^1.1.10" - checksum: 10/dcac9dda66ff17df9cabdc58214172bf41082f956eab30bb0d86bc0fab1e44b690fc8e1f855cf2481245caf4e8a5a006a982a71ddccec84032ed41f9d8da8c14 + get-intrinsic: "npm:^1.2.1" + checksum: 10/34a26213d981d58b30724ef37a1e0682f4040d580fa9ff58fdfdd3cefcb2287921718c63971c1c404951e7b747c50fdc7caf6e867e951353fa71b369c04c969b languageName: node linkType: hard @@ -10571,12 +10635,12 @@ __metadata: languageName: node linkType: hard -"is-typed-array@npm:^1.1.10, is-typed-array@npm:^1.1.12, is-typed-array@npm:^1.1.9": - version: 1.1.12 - resolution: "is-typed-array@npm:1.1.12" +"is-typed-array@npm:^1.1.10, is-typed-array@npm:^1.1.13, is-typed-array@npm:^1.1.9": + version: 1.1.13 + resolution: "is-typed-array@npm:1.1.13" dependencies: - which-typed-array: "npm:^1.1.11" - checksum: 10/d953adfd3c41618d5e01b2a10f21817e4cdc9572772fa17211100aebb3811b6e3c2e308a0558cc87d218a30504cb90154b833013437776551bfb70606fb088ca + which-typed-array: "npm:^1.1.14" + checksum: 10/f850ba08286358b9a11aee6d93d371a45e3c59b5953549ee1c1a9a55ba5c1dd1bd9952488ae194ad8f32a9cf5e79c8fa5f0cc4d78c00720aa0bbcf238b38062d languageName: node linkType: hard @@ -10668,9 +10732,9 @@ __metadata: linkType: hard "isbinaryfile@npm:^5.0.0": - version: 5.0.0 - resolution: "isbinaryfile@npm:5.0.0" - checksum: 10/511bb5ce54c903e9881ca46fe7fe06759b29d9d01d6929f3c46cb95a4bf369320d9de858943d5bf4ac446a442b53be095b325b1deebca0e67ccd9f466c53ef74 + version: 5.0.2 + resolution: "isbinaryfile@npm:5.0.2" + checksum: 10/515d7c963b35c2c443457d18c9152d1f655f3a0e2dceb548448e482145c1897e57a92fc024dece7de98c85c2909f5528e34e3d720c307887529cd689d7a7cd36 languageName: node linkType: hard @@ -10785,6 +10849,13 @@ __metadata: languageName: node linkType: hard +"jsbn@npm:1.1.0": + version: 1.1.0 + resolution: "jsbn@npm:1.1.0" + checksum: 10/bebe7ae829bbd586ce8cbe83501dd8cb8c282c8902a8aeeed0a073a89dc37e8103b1244f3c6acd60278bcbfe12d93a3f83c9ac396868a3b3bbc3c5e5e3b648ef + languageName: node + linkType: hard + "jsesc@npm:^2.5.1": version: 2.5.2 resolution: "jsesc@npm:2.5.2" @@ -11468,9 +11539,9 @@ __metadata: linkType: hard "lru-cache@npm:^10.0.1, lru-cache@npm:^9.1.1 || ^10.0.0": - version: 10.1.0 - resolution: "lru-cache@npm:10.1.0" - checksum: 10/207278d6fa711fb1f94a0835d4d4737441d2475302482a14785b10515e4c906a57ebf9f35bf060740c9560e91c7c1ad5a04fd7ed030972a9ba18bce2a228e95b + version: 10.2.0 + resolution: "lru-cache@npm:10.2.0" + checksum: 10/502ec42c3309c0eae1ce41afca471f831c278566d45a5273a0c51102dee31e0e250a62fa9029c3370988df33a14188a38e682c16143b794de78668de3643e302 languageName: node linkType: hard @@ -12066,15 +12137,15 @@ __metadata: linkType: hard "nise@npm:^5.1.5": - version: 5.1.7 - resolution: "nise@npm:5.1.7" + version: 5.1.9 + resolution: "nise@npm:5.1.9" dependencies: "@sinonjs/commons": "npm:^3.0.0" "@sinonjs/fake-timers": "npm:^11.2.2" "@sinonjs/text-encoding": "npm:^0.7.2" just-extend: "npm:^6.2.0" path-to-regexp: "npm:^6.2.1" - checksum: 10/4754e3ae52654f66e947d44d0dd40ae823e594c201474ad7c5115acb2188c839c9b8617504327051857aea8042befac946e82918e1e53b99350cb275140332d0 + checksum: 10/971caf7638d42a0e106eadd63f05adac1217f864b0a7e4519546aea82a0dbfac68586e7ff430704d54a01ff5dbf6cad58f5f67c067e21112a7deacd7789c2172 languageName: node linkType: hard @@ -12251,7 +12322,7 @@ __metadata: languageName: node linkType: hard -"object-inspect@npm:^1.13.1, object-inspect@npm:^1.9.0": +"object-inspect@npm:^1.13.1": version: 1.13.1 resolution: "object-inspect@npm:1.13.1" checksum: 10/92f4989ed83422d56431bc39656d4c780348eb15d397ce352ade6b7fec08f973b53744bd41b94af021901e61acaf78fcc19e65bf464ecc0df958586a672700f0 @@ -12274,7 +12345,7 @@ __metadata: languageName: node linkType: hard -"object.assign@npm:^4.0.4, object.assign@npm:^4.1.0, object.assign@npm:^4.1.2, object.assign@npm:^4.1.4": +"object.assign@npm:^4.0.4, object.assign@npm:^4.1.0, object.assign@npm:^4.1.2, object.assign@npm:^4.1.5": version: 4.1.5 resolution: "object.assign@npm:4.1.5" dependencies: @@ -12321,14 +12392,15 @@ __metadata: linkType: hard "object.groupby@npm:^1.0.1": - version: 1.0.1 - resolution: "object.groupby@npm:1.0.1" + version: 1.0.2 + resolution: "object.groupby@npm:1.0.2" dependencies: - call-bind: "npm:^1.0.2" - define-properties: "npm:^1.2.0" - es-abstract: "npm:^1.22.1" - get-intrinsic: "npm:^1.2.1" - checksum: 10/b7123d91403f95d63978513b23a6079c30f503311f64035fafc863c291c787f287b58df3b21ef002ce1d0b820958c9009dd5a8ab696e0eca325639d345e41524 + array.prototype.filter: "npm:^1.0.3" + call-bind: "npm:^1.0.5" + define-properties: "npm:^1.2.1" + es-abstract: "npm:^1.22.3" + es-errors: "npm:^1.0.0" + checksum: 10/07c1bea1772c45f7967a63358a683ef7b0bd99cabe0563e6fee3e8acc061cc5984d2f01a46472ebf10b2cb439298c46776b2134550dce457fd7240baaaa4f592 languageName: node linkType: hard @@ -12621,12 +12693,12 @@ __metadata: linkType: hard "parse-bmfont-xml@npm:^1.1.4": - version: 1.1.4 - resolution: "parse-bmfont-xml@npm:1.1.4" + version: 1.1.6 + resolution: "parse-bmfont-xml@npm:1.1.6" dependencies: xml-parse-from-string: "npm:^1.0.0" - xml2js: "npm:^0.4.5" - checksum: 10/529d9c65da5e7840723d5382707d5a5177d25616e6ea434b4c474548e6229f1e64d0991bc9b38329762038e885c9097c562343007db78d9e9ca1e9b7157e6d7e + xml2js: "npm:^0.5.0" + checksum: 10/71a202da289a124db7bb7bee1b2a01b8a38b5ba36f93d6a98cea6fc1d140c16c8bc7bcccff48864ec886da035944d337b04cf70723393c411991af952fc6086b languageName: node linkType: hard @@ -13027,13 +13099,13 @@ __metadata: linkType: hard "postcss@npm:^8.4.14": - version: 8.4.33 - resolution: "postcss@npm:8.4.33" + version: 8.4.35 + resolution: "postcss@npm:8.4.35" dependencies: nanoid: "npm:^3.3.7" picocolors: "npm:^1.0.0" source-map-js: "npm:^1.0.2" - checksum: 10/e22a4594c255f26117f38419fb494d7ecab0f596cd409f7aadc8a6173abf180ed7ea970cd13fd366ab12b5840be901d2a09b25197700c2ebcb5a8077326bf519 + checksum: 10/93a7ce50cd6188f5f486a9ca98950ad27c19dfed996c45c414fa242944497e4d084a8760d3537f078630226f2bd3c6ab84b813b488740f4432e7c7039cd73a20 languageName: node linkType: hard @@ -13408,14 +13480,15 @@ __metadata: languageName: node linkType: hard -"regexp.prototype.flags@npm:^1.5.0, regexp.prototype.flags@npm:^1.5.1": - version: 1.5.1 - resolution: "regexp.prototype.flags@npm:1.5.1" +"regexp.prototype.flags@npm:^1.5.0, regexp.prototype.flags@npm:^1.5.2": + version: 1.5.2 + resolution: "regexp.prototype.flags@npm:1.5.2" dependencies: - call-bind: "npm:^1.0.2" - define-properties: "npm:^1.2.0" - set-function-name: "npm:^2.0.0" - checksum: 10/3fa5610b8e411bbc3a43ddfd13162f3a817beb43155fbd8caa24d4fd0ce2f431a8197541808772a5a06e5946cebfb68464c827827115bde0d11720a92fe2981a + call-bind: "npm:^1.0.6" + define-properties: "npm:^1.2.1" + es-errors: "npm:^1.3.0" + set-function-name: "npm:^2.0.1" + checksum: 10/9fffc01da9c4e12670ff95bc5204364615fcc12d86fc30642765af908675678ebb0780883c874b2dbd184505fb52fa603d80073ecf69f461ce7f56b15d10be9c languageName: node linkType: hard @@ -13703,9 +13776,9 @@ __metadata: linkType: hard "rfdc@npm:^1.3.0": - version: 1.3.0 - resolution: "rfdc@npm:1.3.0" - checksum: 10/76dedd9700cdf132947fde7ce1a8838c9cbb7f3e8f9188af0aaf97194cce745f42094dd2cf547426934cc83252ee2c0e432b2e0222a4415ab0db32de82665c69 + version: 1.3.1 + resolution: "rfdc@npm:1.3.1" + checksum: 10/44cc6a82e2fe1db13b7d3c54e9ffd0b40ef070cbde69ffbfbb38dab8cee46bd68ba686784b96365ff08d04798bc121c3465663a0c91f2c421c90546c4366f4a6 languageName: node linkType: hard @@ -13817,7 +13890,7 @@ __metadata: languageName: node linkType: hard -"safe-array-concat@npm:^1.0.1": +"safe-array-concat@npm:^1.1.0": version: 1.1.0 resolution: "safe-array-concat@npm:1.1.0" dependencies: @@ -13843,14 +13916,14 @@ __metadata: languageName: node linkType: hard -"safe-regex-test@npm:^1.0.0": - version: 1.0.2 - resolution: "safe-regex-test@npm:1.0.2" +"safe-regex-test@npm:^1.0.3": + version: 1.0.3 + resolution: "safe-regex-test@npm:1.0.3" dependencies: - call-bind: "npm:^1.0.5" - get-intrinsic: "npm:^1.2.2" + call-bind: "npm:^1.0.6" + es-errors: "npm:^1.3.0" is-regex: "npm:^1.1.4" - checksum: 10/0e6a472caa8f44a502c7842ea19749de42c2eb1b41cb00456061dc3746cf3468e907522f56e97a15f3b41d88f660bd3d4f9bdec064a39895f7babae0f7aafc6a + checksum: 10/b04de61114b10274d92e25b6de7ccb5de07f11ea15637ff636de4b5190c0f5cd8823fe586dde718504cf78055437d70fd8804976894df502fcf5a210c970afb3 languageName: node linkType: hard @@ -13945,13 +14018,13 @@ __metadata: linkType: hard "semver@npm:^7.3.4, semver@npm:^7.3.5, semver@npm:^7.5.4": - version: 7.5.4 - resolution: "semver@npm:7.5.4" + version: 7.6.0 + resolution: "semver@npm:7.6.0" dependencies: lru-cache: "npm:^6.0.0" bin: semver: bin/semver.js - checksum: 10/985dec0d372370229a262c737063860fabd4a1c730662c1ea3200a2f649117761a42184c96df62a0e885e76fbd5dace41087d6c1ac0351b13c0df5d6bcb1b5ac + checksum: 10/1b41018df2d8aca5a1db4729985e8e20428c650daea60fcd16e926e9383217d00f574fab92d79612771884a98d2ee2a1973f49d630829a8d54d6570defe62535 languageName: node linkType: hard @@ -14053,20 +14126,21 @@ __metadata: languageName: node linkType: hard -"set-function-length@npm:^1.1.1": - version: 1.2.0 - resolution: "set-function-length@npm:1.2.0" +"set-function-length@npm:^1.2.1": + version: 1.2.1 + resolution: "set-function-length@npm:1.2.1" dependencies: - define-data-property: "npm:^1.1.1" + define-data-property: "npm:^1.1.2" + es-errors: "npm:^1.3.0" function-bind: "npm:^1.1.2" - get-intrinsic: "npm:^1.2.2" + get-intrinsic: "npm:^1.2.3" gopd: "npm:^1.0.1" has-property-descriptors: "npm:^1.0.1" - checksum: 10/6d609cd060c488d7d2178a5d4c3689f8a6afa26fa4c48ff4a0516664ff9b84c1c0898915777f5628092dab55c4fcead205525e2edd15c659423bf86f790fdcae + checksum: 10/9ab1d200149574ab27c1a7acae56d6235e02568fc68655fe8afe63e4e02ccad3c27665f55c32408bd1ff40705939dbb7539abfb9c3a07fda27ecad1ab9e449f5 languageName: node linkType: hard -"set-function-name@npm:^2.0.0": +"set-function-name@npm:^2.0.0, set-function-name@npm:^2.0.1": version: 2.0.1 resolution: "set-function-name@npm:2.0.1" dependencies: @@ -14143,13 +14217,14 @@ __metadata: linkType: hard "side-channel@npm:^1.0.4": - version: 1.0.4 - resolution: "side-channel@npm:1.0.4" + version: 1.0.5 + resolution: "side-channel@npm:1.0.5" dependencies: - call-bind: "npm:^1.0.0" - get-intrinsic: "npm:^1.0.2" - object-inspect: "npm:^1.9.0" - checksum: 10/c4998d9fc530b0e75a7fd791ad868fdc42846f072734f9080ff55cc8dc7d3899abcda24fd896aa6648c3ab7021b4bb478073eb4f44dfd55bce9714bc1a7c5d45 + call-bind: "npm:^1.0.6" + es-errors: "npm:^1.3.0" + get-intrinsic: "npm:^1.2.4" + object-inspect: "npm:^1.13.1" + checksum: 10/27708b70b5d81bf18dc8cc23f38f1b6c9511691a64abc4aaf17956e67d132c855cf8b46f931e2fc5a6262b29371eb60da7755c1b9f4f862eccea8562b469f8f6 languageName: node linkType: hard @@ -14281,12 +14356,12 @@ __metadata: linkType: hard "socks@npm:^2.7.1": - version: 2.7.1 - resolution: "socks@npm:2.7.1" + version: 2.8.0 + resolution: "socks@npm:2.8.0" dependencies: - ip: "npm:^2.0.0" + ip-address: "npm:^9.0.5" smart-buffer: "npm:^4.2.0" - checksum: 10/5074f7d6a13b3155fa655191df1c7e7a48ce3234b8ccf99afa2ccb56591c195e75e8bb78486f8e9ea8168e95a29573cbaad55b2b5e195160ae4d2ea6811ba833 + checksum: 10/ed0224ce2c7daaa7690cb87cf53d9703ffc4e983aca221f6f5b46767b232658df49494fd86acd0bf97ada6de05248ea8ea625c2343d48155d8463fc40d4a340f languageName: node linkType: hard @@ -14410,9 +14485,9 @@ __metadata: linkType: hard "spdx-exceptions@npm:^2.1.0": - version: 2.3.0 - resolution: "spdx-exceptions@npm:2.3.0" - checksum: 10/cb69a26fa3b46305637123cd37c85f75610e8c477b6476fa7354eb67c08128d159f1d36715f19be6f9daf4b680337deb8c65acdcae7f2608ba51931540687ac0 + version: 2.5.0 + resolution: "spdx-exceptions@npm:2.5.0" + checksum: 10/bb127d6e2532de65b912f7c99fc66097cdea7d64c10d3ec9b5e96524dbbd7d20e01cba818a6ddb2ae75e62bb0c63d5e277a7e555a85cbc8ab40044984fa4ae15 languageName: node linkType: hard @@ -14427,9 +14502,9 @@ __metadata: linkType: hard "spdx-license-ids@npm:^3.0.0": - version: 3.0.16 - resolution: "spdx-license-ids@npm:3.0.16" - checksum: 10/6425c54132ca38d717315cdbd2b620235937d1859972c5978bbc95b4c14400438ffe113709d8aabb0d5498cc27a5b89876fca0fe21b4e26f5ce122bc86d0d88e + version: 3.0.17 + resolution: "spdx-license-ids@npm:3.0.17" + checksum: 10/8f6c6ae02ebb25b4ca658b8990d9e8a8f8d8a95e1d8b9fd84d87eed80a7dc8f8073d6a8d50b8a0295c0e8399e1f8814f5c00e2985e6bf3731540a16f7241cbf1 languageName: node linkType: hard @@ -14469,6 +14544,13 @@ __metadata: languageName: node linkType: hard +"sprintf-js@npm:^1.1.3": + version: 1.1.3 + resolution: "sprintf-js@npm:1.1.3" + checksum: 10/e7587128c423f7e43cc625fe2f87e6affdf5ca51c1cc468e910d8aaca46bb44a7fbcfa552f787b1d3987f7043aeb4527d1b99559e6621e01b42b3f45e5a24cbb + languageName: node + linkType: hard + "ssri@npm:^10.0.0": version: 10.0.5 resolution: "ssri@npm:10.0.5" @@ -14624,13 +14706,13 @@ __metadata: linkType: hard "string-width@npm:^7.0.0": - version: 7.0.0 - resolution: "string-width@npm:7.0.0" + version: 7.1.0 + resolution: "string-width@npm:7.1.0" dependencies: emoji-regex: "npm:^10.3.0" get-east-asian-width: "npm:^1.0.0" strip-ansi: "npm:^7.1.0" - checksum: 10/bc0de5700a2690895169fce447ec4ed44bc62de80312c2093d5606bfd48319bb88e48a99e97f269dff2bc9577448b91c26b3804c16e7d9b389699795e4655c3b + checksum: 10/a183573fe7209e0d294f661846d33f8caf72aa86d983e5b48a0ed45ab15bcccb02c6f0344b58b571988871105457137b8207855ea536827dbc4a376a0f31bf8f languageName: node linkType: hard @@ -14959,8 +15041,8 @@ __metadata: linkType: hard "terser@npm:^5.0.0, terser@npm:^5.15.1, terser@npm:^5.26.0": - version: 5.27.0 - resolution: "terser@npm:5.27.0" + version: 5.27.1 + resolution: "terser@npm:5.27.1" dependencies: "@jridgewell/source-map": "npm:^0.3.3" acorn: "npm:^8.8.2" @@ -14968,7 +15050,7 @@ __metadata: source-map-support: "npm:~0.5.20" bin: terser: bin/terser - checksum: 10/9b2c5cb00747dea5994034ca064fb3cc7efc1be6b79a35247662d51ab43bdbe9cbf002bbf29170b5f3bd068c811d0212e22d94acd2cf0d8562687b96f1bffc9f + checksum: 10/4b5c8c65548071ae09dc1d9fd64616262876229897eaac9f95cf2e44908a1f4a25d7837c2a38caef1a523cf1cf67d254e74a846e9a854d289c0ad3664d581c3c languageName: node linkType: hard @@ -15174,11 +15256,11 @@ __metadata: linkType: hard "ts-api-utils@npm:^1.0.1": - version: 1.0.3 - resolution: "ts-api-utils@npm:1.0.3" + version: 1.2.1 + resolution: "ts-api-utils@npm:1.2.1" peerDependencies: typescript: ">=4.2.0" - checksum: 10/1350a5110eb1e534e9a6178f4081fb8a4fcc439749e19f4ad699baec9090fcb90fe532d5e191d91a062dc6e454a14a8d7eb2ad202f57135a30c4a44a3024f039 + checksum: 10/6d7f60fd01e3885bb334607f22b9cb1002e72da81dad2e672fef1b0d1a2f640b0f0ff5310369401488fac90c7a7f5d39c89fd18789af59c672c9b5aef4cade3e languageName: node linkType: hard @@ -15389,14 +15471,14 @@ __metadata: languageName: node linkType: hard -"typed-array-buffer@npm:^1.0.0": - version: 1.0.0 - resolution: "typed-array-buffer@npm:1.0.0" +"typed-array-buffer@npm:^1.0.1": + version: 1.0.1 + resolution: "typed-array-buffer@npm:1.0.1" dependencies: - call-bind: "npm:^1.0.2" - get-intrinsic: "npm:^1.2.1" - is-typed-array: "npm:^1.1.10" - checksum: 10/3e0281c79b2a40cd97fe715db803884301993f4e8c18e8d79d75fd18f796e8cd203310fec8c7fdb5e6c09bedf0af4f6ab8b75eb3d3a85da69328f28a80456bd3 + call-bind: "npm:^1.0.6" + es-errors: "npm:^1.3.0" + is-typed-array: "npm:^1.1.13" + checksum: 10/1d65e46b2b9b7ec2a30df39b9ddf32e55ad08d6119aec33975506a3dba56057796bdc3c64dbeb7fdb61bf340a75e279dfd55b48ce8f3b874f01731e1da6833d2 languageName: node linkType: hard @@ -15413,15 +15495,16 @@ __metadata: linkType: hard "typed-array-byte-offset@npm:^1.0.0": - version: 1.0.0 - resolution: "typed-array-byte-offset@npm:1.0.0" + version: 1.0.1 + resolution: "typed-array-byte-offset@npm:1.0.1" dependencies: - available-typed-arrays: "npm:^1.0.5" - call-bind: "npm:^1.0.2" + available-typed-arrays: "npm:^1.0.6" + call-bind: "npm:^1.0.7" for-each: "npm:^0.3.3" + gopd: "npm:^1.0.1" has-proto: "npm:^1.0.1" - is-typed-array: "npm:^1.1.10" - checksum: 10/2d81747faae31ca79f6c597dc18e15ae3d5b7e97f7aaebce3b31f46feeb2a6c1d6c92b9a634d901c83731ffb7ec0b74d05c6ff56076f5ae39db0cd19b16a3f92 + is-typed-array: "npm:^1.1.13" + checksum: 10/b174c0bac20bcd8787d2f5ccd7bd8f5e5a128e060ffe0909ffe27d65e486de50a3552248a307a45e5c9c593fd8ec97f5acdf119c3e13806f11943b7a2ce555be languageName: node linkType: hard @@ -16285,16 +16368,16 @@ __metadata: languageName: node linkType: hard -"which-typed-array@npm:^1.1.11, which-typed-array@npm:^1.1.13": - version: 1.1.13 - resolution: "which-typed-array@npm:1.1.13" +"which-typed-array@npm:^1.1.14": + version: 1.1.14 + resolution: "which-typed-array@npm:1.1.14" dependencies: - available-typed-arrays: "npm:^1.0.5" - call-bind: "npm:^1.0.4" + available-typed-arrays: "npm:^1.0.6" + call-bind: "npm:^1.0.5" for-each: "npm:^0.3.3" gopd: "npm:^1.0.1" - has-tostringtag: "npm:^1.0.0" - checksum: 10/605e3e10b7118af904a0e79d0d50b95275102f06ec902734024989cd71354929f7acee50de43529d3baf5858e2e4eb32c75e6ebd226c888ad976d8140e4a3e71 + has-tostringtag: "npm:^1.0.1" + checksum: 10/56253d2c9d6b41b8a4af96d8c2751bac5508906bd500cdcd0dc5301fb082de0391a4311ab21258bc8d2609ed593f422c1a66f0020fcb3a1e97f719bc928b9018 languageName: node linkType: hard @@ -16659,13 +16742,13 @@ __metadata: languageName: node linkType: hard -"xml2js@npm:^0.4.5": - version: 0.4.23 - resolution: "xml2js@npm:0.4.23" +"xml2js@npm:^0.5.0": + version: 0.5.0 + resolution: "xml2js@npm:0.5.0" dependencies: sax: "npm:>=0.6.0" xmlbuilder: "npm:~11.0.0" - checksum: 10/52896ef39429f860f32471dd7bb2b89ef25b7e15528e3a4366de0bd5e55a251601565e7814763e70f9e75310c3afe649a42b8826442b74b41eff8a0ae333fccc + checksum: 10/27c4d759214e99be5ec87ee5cb1290add427fa43df509d3b92d10152b3806fd2f7c9609697a18b158ccf2caa01e96af067cdba93196f69ca10c90e4f79a08896 languageName: node linkType: hard From 2a803e09a4e200b23266abbc146a0270791a107e Mon Sep 17 00:00:00 2001 From: karwosts <32912880+karwosts@users.noreply.github.com> Date: Tue, 20 Feb 2024 08:14:04 -0500 Subject: [PATCH 021/425] Detail view for energy devices graph (#19068) * Detail view for energy devices graph * Use getCommonOptions * Remove visibility toggle on horizontal bar chart * make a new card * unneeded translations * graph titles * Update src/translations/en.json Co-authored-by: Paul Bottein --------- Co-authored-by: Paul Bottein --- src/components/chart/ha-chart-base.ts | 21 +- .../energy/strategies/energy-view-strategy.ts | 7 + .../hui-energy-devices-detail-graph-card.ts | 412 ++++++++++++++++++ src/panels/lovelace/cards/types.ts | 7 + .../create-element/create-card-element.ts | 2 + src/translations/en.json | 3 +- 6 files changed, 447 insertions(+), 5 deletions(-) create mode 100644 src/panels/lovelace/cards/energy/hui-energy-devices-detail-graph-card.ts diff --git a/src/components/chart/ha-chart-base.ts b/src/components/chart/ha-chart-base.ts index edccd2d22cbd..7bf2acc7392c 100644 --- a/src/components/chart/ha-chart-base.ts +++ b/src/components/chart/ha-chart-base.ts @@ -75,6 +75,8 @@ export class HaChartBase extends LitElement { private _paddingYAxisInternal = 0; + private _datasetOrder: number[] = []; + public disconnectedCallback() { super.disconnectedCallback(); this._releaseCanvas(); @@ -165,7 +167,17 @@ export class HaChartBase extends LitElement { } } + // put the legend labels in sorted order if provided if (changedProps.has("data")) { + this._datasetOrder = this.data.datasets.map((_, index) => index); + if (this.data?.datasets.some((dataset) => dataset.order)) { + this._datasetOrder.sort( + (a, b) => + (this.data.datasets[a].order || 0) - + (this.data.datasets[b].order || 0) + ); + } + if (this.externalHidden) { this._hiddenDatasets = new Set(); if (this.data?.datasets) { @@ -205,8 +217,9 @@ export class HaChartBase extends LitElement { ${this.options?.plugins?.legend?.display === true ? html`
    - ${this.data.datasets.map((dataset, index) => - this.extraData?.[index]?.show_legend === false + ${this._datasetOrder.map((index) => { + const dataset = this.data.datasets[index]; + return this.extraData?.[index]?.show_legend === false ? nothing : html`
  • -
  • ` - )} + `; + })}
` : ""} diff --git a/src/panels/energy/strategies/energy-view-strategy.ts b/src/panels/energy/strategies/energy-view-strategy.ts index 27a0a9137184..d41ea668ba59 100644 --- a/src/panels/energy/strategies/energy-view-strategy.ts +++ b/src/panels/energy/strategies/energy-view-strategy.ts @@ -154,6 +154,13 @@ export class EnergyViewStrategy extends ReactiveElement { // Only include if we have at least 1 device in the config. if (prefs.device_consumption.length) { + view.cards!.push({ + title: hass.localize( + "ui.panel.energy.cards.energy_devices_detail_graph_title" + ), + type: "energy-devices-detail-graph", + collection_key: "energy_dashboard", + }); view.cards!.push({ title: hass.localize( "ui.panel.energy.cards.energy_devices_graph_title" diff --git a/src/panels/lovelace/cards/energy/hui-energy-devices-detail-graph-card.ts b/src/panels/lovelace/cards/energy/hui-energy-devices-detail-graph-card.ts new file mode 100644 index 000000000000..c13f2dac8eb6 --- /dev/null +++ b/src/panels/lovelace/cards/energy/hui-energy-devices-detail-graph-card.ts @@ -0,0 +1,412 @@ +import { + ChartData, + ChartDataset, + ChartOptions, + ScatterDataPoint, +} from "chart.js"; +import { differenceInDays, endOfToday, startOfToday } from "date-fns/esm"; +import { HassConfig, UnsubscribeFunc } from "home-assistant-js-websocket"; +import { + css, + CSSResultGroup, + html, + LitElement, + nothing, + PropertyValues, +} from "lit"; +import { customElement, property, state } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; +import memoizeOne from "memoize-one"; +import { getColorByIndex } from "../../../../common/color/colors"; +import { ChartDatasetExtra } from "../../../../components/chart/ha-chart-base"; +import "../../../../components/ha-card"; +import { + DeviceConsumptionEnergyPreference, + EnergyData, + getEnergyDataCollection, +} from "../../../../data/energy"; +import { + calculateStatisticSumGrowth, + fetchStatistics, + getStatisticLabel, + Statistics, + StatisticsMetaData, + StatisticsUnitConfiguration, +} from "../../../../data/recorder"; +import { FrontendLocaleData } from "../../../../data/translation"; +import { SubscribeMixin } from "../../../../mixins/subscribe-mixin"; +import { HomeAssistant } from "../../../../types"; +import { LovelaceCard } from "../../types"; +import { EnergyDevicesDetailGraphCardConfig } from "../types"; +import { hasConfigChanged } from "../../common/has-changed"; +import { getCommonOptions } from "./common/energy-chart-options"; + +@customElement("hui-energy-devices-detail-graph-card") +export class HuiEnergyDevicesDetailGraphCard + extends SubscribeMixin(LitElement) + implements LovelaceCard +{ + @property({ attribute: false }) public hass!: HomeAssistant; + + @state() private _config?: EnergyDevicesDetailGraphCardConfig; + + @state() private _chartData: ChartData = { datasets: [] }; + + @state() private _chartDatasetExtra: ChartDatasetExtra[] = []; + + @state() private _data?: EnergyData; + + @state() private _statistics?: Statistics; + + @state() private _compareStatistics?: Statistics; + + @state() private _start = startOfToday(); + + @state() private _end = endOfToday(); + + @state() private _compareStart?: Date; + + @state() private _compareEnd?: Date; + + @state() private _unit?: string; + + @state() private _hiddenStats = new Set(); + + protected hassSubscribeRequiredHostProps = ["_config"]; + + public hassSubscribe(): UnsubscribeFunc[] { + return [ + getEnergyDataCollection(this.hass, { + key: this._config?.collection_key, + }).subscribe(async (data) => { + this._data = data; + await this._getStatistics(this._data); + this._processStatistics(); + }), + ]; + } + + public getCardSize(): Promise | number { + return 3; + } + + public setConfig(config: EnergyDevicesDetailGraphCardConfig): void { + this._config = config; + } + + protected shouldUpdate(changedProps: PropertyValues): boolean { + return ( + hasConfigChanged(this, changedProps) || + changedProps.size > 1 || + !changedProps.has("hass") + ); + } + + protected willUpdate(changedProps: PropertyValues) { + if (changedProps.has("_hiddenStats") && this._statistics) { + this._processStatistics(); + } + } + + protected render() { + if (!this.hass || !this._config) { + return nothing; + } + + return html` + + ${this._config.title + ? html`

${this._config.title}

` + : ""} +
+ +
+
+ `; + } + + private _datasetHidden(ev) { + ev.stopPropagation(); + this._hiddenStats.add( + this._data!.prefs.device_consumption[ev.detail.index].stat_consumption + ); + this.requestUpdate("_hiddenStats"); + } + + private _datasetUnhidden(ev) { + ev.stopPropagation(); + this._hiddenStats.delete( + this._data!.prefs.device_consumption[ev.detail.index].stat_consumption + ); + this.requestUpdate("_hiddenStats"); + } + + private _createOptions = memoizeOne( + ( + start: Date, + end: Date, + locale: FrontendLocaleData, + config: HassConfig, + unit?: string, + compareStart?: Date, + compareEnd?: Date + ): ChartOptions => { + const commonOptions = getCommonOptions( + start, + end, + locale, + config, + unit, + compareStart, + compareEnd + ); + + const options: ChartOptions = { + ...commonOptions, + interaction: { + mode: "nearest", + }, + plugins: { + ...commonOptions.plugins!, + legend: { + display: true, + labels: { + usePointStyle: true, + }, + }, + }, + }; + return options; + } + ); + + private async _getStatistics(energyData: EnergyData): Promise { + const dayDifference = differenceInDays( + energyData.end || new Date(), + energyData.start + ); + + const devices = energyData.prefs.device_consumption.map( + (device) => device.stat_consumption + ); + + const period = + dayDifference > 35 ? "month" : dayDifference > 2 ? "day" : "hour"; + + const lengthUnit = this.hass.config.unit_system.length || ""; + const units: StatisticsUnitConfiguration = { + energy: "kWh", + volume: lengthUnit === "km" ? "m³" : "ft³", + }; + this._unit = "kWh"; + + const statistics = await fetchStatistics( + this.hass, + energyData.start, + energyData.end, + devices, + period, + units, + ["change"] + ); + + let compareStatistics: Statistics | undefined; + + if (energyData.startCompare && energyData.endCompare) { + compareStatistics = await fetchStatistics( + this.hass, + energyData.startCompare, + energyData.endCompare, + devices, + period, + units, + ["change"] + ); + } + this._statistics = statistics; + this._compareStatistics = compareStatistics; + } + + private async _processStatistics() { + const energyData = this._data!; + const data = this._statistics!; + const compareData = this._compareStatistics; + + const growthValues = {}; + energyData.prefs.device_consumption.forEach((device) => { + const value = + device.stat_consumption in data + ? calculateStatisticSumGrowth(data[device.stat_consumption]) || 0 + : 0; + + growthValues[device.stat_consumption] = value; + }); + + const sorted_devices = energyData.prefs.device_consumption.map( + (device) => device.stat_consumption + ); + sorted_devices.sort((a, b) => growthValues[b] - growthValues[a]); + + const datasets: ChartDataset<"bar", ScatterDataPoint[]>[] = []; + const datasetExtras: ChartDatasetExtra[] = []; + + datasets.push( + ...this._processDataSet( + data, + energyData.statsMetadata, + energyData.prefs.device_consumption, + sorted_devices + ) + ); + + const items = datasets.length; + datasetExtras.push(...Array(items).fill({})); + + if (compareData) { + // Add empty dataset to align the bars + datasets.push({ + order: 0, + data: [], + }); + datasetExtras.push({ + show_legend: false, + }); + datasets.push({ + order: 999, + data: [], + xAxisID: "xAxisCompare", + }); + datasetExtras.push({ + show_legend: false, + }); + + datasets.push( + ...this._processDataSet( + compareData, + energyData.statsMetadata, + energyData.prefs.device_consumption, + sorted_devices, + true + ) + ); + datasetExtras.push( + ...Array(items).fill({ show_legend: false }) + ); + } + + this._start = energyData.start; + this._end = energyData.end || endOfToday(); + + this._compareStart = energyData.startCompare; + this._compareEnd = energyData.endCompare; + + this._chartData = { + datasets, + }; + this._chartDatasetExtra = datasetExtras; + } + + private _processDataSet( + statistics: Statistics, + statisticsMetaData: Record, + devices: DeviceConsumptionEnergyPreference[], + sorted_devices: string[], + compare = false + ) { + const data: ChartDataset<"bar", ScatterDataPoint[]>[] = []; + + devices.forEach((source, idx) => { + const color = getColorByIndex(idx); + + let prevStart: number | null = null; + + const consumptionData: ScatterDataPoint[] = []; + + // Process gas consumption data. + if (source.stat_consumption in statistics) { + const stats = statistics[source.stat_consumption]; + let end; + + for (const point of stats) { + if (point.change === null || point.change === undefined) { + continue; + } + if (prevStart === point.start) { + continue; + } + const date = new Date(point.start); + consumptionData.push({ + x: date.getTime(), + y: point.change, + }); + prevStart = point.start; + end = point.end; + } + if (consumptionData.length === 1) { + consumptionData.push({ + x: end, + y: 0, + }); + } + } + + data.push({ + label: getStatisticLabel( + this.hass, + source.stat_consumption, + statisticsMetaData[source.stat_consumption] + ), + hidden: this._hiddenStats.has(source.stat_consumption), + borderColor: compare ? color + "7F" : color, + backgroundColor: compare ? color + "32" : color + "7F", + data: consumptionData, + order: 1 + sorted_devices.indexOf(source.stat_consumption), + stack: "devices", + pointStyle: compare ? false : "circle", + xAxisID: compare ? "xAxisCompare" : undefined, + }); + }); + return data; + } + + static get styles(): CSSResultGroup { + return css` + .card-header { + padding-bottom: 0; + } + .content { + padding: 16px; + } + .has-header { + padding-top: 0; + } + `; + } +} + +declare global { + interface HTMLElementTagNameMap { + "hui-energy-devices-detail-graph-card": HuiEnergyDevicesDetailGraphCard; + } +} diff --git a/src/panels/lovelace/cards/types.ts b/src/panels/lovelace/cards/types.ts index d9a26be158b7..f87dde26cd4a 100644 --- a/src/panels/lovelace/cards/types.ts +++ b/src/panels/lovelace/cards/types.ts @@ -159,6 +159,13 @@ export interface EnergyDevicesGraphCardConfig extends LovelaceCardConfig { max_devices?: number; } +export interface EnergyDevicesDetailGraphCardConfig extends LovelaceCardConfig { + type: "energy-devices-detail-graph"; + title?: string; + collection_key?: string; + max_devices?: number; +} + export interface EnergySourcesTableCardConfig extends LovelaceCardConfig { type: "energy-sources-table"; title?: string; diff --git a/src/panels/lovelace/create-element/create-card-element.ts b/src/panels/lovelace/create-element/create-card-element.ts index 1884c79cc18c..3619a13c8a0e 100644 --- a/src/panels/lovelace/create-element/create-card-element.ts +++ b/src/panels/lovelace/create-element/create-card-element.ts @@ -44,6 +44,8 @@ const LAZY_LOAD_TYPES = { import("../cards/energy/hui-energy-date-selection-card"), "energy-devices-graph": () => import("../cards/energy/hui-energy-devices-graph-card"), + "energy-devices-detail-graph": () => + import("../cards/energy/hui-energy-devices-detail-graph-card"), "energy-distribution": () => import("../cards/energy/hui-energy-distribution-card"), "energy-gas-graph": () => import("../cards/energy/hui-energy-gas-graph-card"), diff --git a/src/translations/en.json b/src/translations/en.json index d0cda35a1675..1195ceb346c7 100644 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -6535,7 +6535,8 @@ "energy_water_graph_title": "Water consumption", "energy_distribution_title": "Energy distribution", "energy_sources_table_title": "Sources", - "energy_devices_graph_title": "Monitor individual devices" + "energy_devices_graph_title": "Individual devices total usage", + "energy_devices_detail_graph_title": "Individual devices detail usage" } }, "history": { From 86ec2725816f20da06c5c2cbff4dd1c600a1397e Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 20 Feb 2024 14:39:33 +0100 Subject: [PATCH 022/425] Update dependency @types/sortablejs to v1.15.8 (#19839) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 446ea474d951..56d12f744503 100644 --- a/package.json +++ b/package.json @@ -179,7 +179,7 @@ "@types/mocha": "10.0.6", "@types/qrcode": "1.5.5", "@types/serve-handler": "6.1.4", - "@types/sortablejs": "1.15.7", + "@types/sortablejs": "1.15.8", "@types/tar": "6.1.11", "@types/ua-parser-js": "0.7.39", "@types/webspeechapi": "0.0.29", diff --git a/yarn.lock b/yarn.lock index 29f4b6d40ef0..c6a64c764dd0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4468,10 +4468,10 @@ __metadata: languageName: node linkType: hard -"@types/sortablejs@npm:1.15.7": - version: 1.15.7 - resolution: "@types/sortablejs@npm:1.15.7" - checksum: 10/422fb6a4862723567a0750339aff0ed8cfdbb4c5bc2601111481c1c2a23de5d6679c7f8dfd76daf2037e2d4df02e42fcd3203251aead64d5629968ead220cf10 +"@types/sortablejs@npm:1.15.8": + version: 1.15.8 + resolution: "@types/sortablejs@npm:1.15.8" + checksum: 10/aea58b08cf45f5e9633707a8df0df1212595c731bbdfd29805487138fdd0d8c51fa5c741999738a645c1e801d43a92ba0d3fb5b45625b52e247c56588aef6c55 languageName: node linkType: hard @@ -9599,7 +9599,7 @@ __metadata: "@types/mocha": "npm:10.0.6" "@types/qrcode": "npm:1.5.5" "@types/serve-handler": "npm:6.1.4" - "@types/sortablejs": "npm:1.15.7" + "@types/sortablejs": "npm:1.15.8" "@types/tar": "npm:6.1.11" "@types/ua-parser-js": "npm:0.7.39" "@types/webspeechapi": "npm:0.0.29" From a26df88022c0771d688376a781093f7a2299638a Mon Sep 17 00:00:00 2001 From: karwosts <32912880+karwosts@users.noreply.github.com> Date: Wed, 21 Feb 2024 16:08:30 -0500 Subject: [PATCH 023/425] More accurate cardSize for Tile card (#19853) More accurate cardSize for tile card --- src/panels/lovelace/cards/hui-tile-card.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/panels/lovelace/cards/hui-tile-card.ts b/src/panels/lovelace/cards/hui-tile-card.ts index b1c279091a53..f85f182f881a 100644 --- a/src/panels/lovelace/cards/hui-tile-card.ts +++ b/src/panels/lovelace/cards/hui-tile-card.ts @@ -117,7 +117,11 @@ export class HuiTileCard extends LitElement implements LovelaceCard { } public getCardSize(): number { - return 1; + return ( + 1 + + (this._config?.vertical ? 1 : 0) + + (this._config?.features?.length || 0) + ); } private _handleAction(ev: ActionHandlerEvent) { From af6dd545dc9d9128127980c5d0cffe8fa875b68b Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 21 Feb 2024 21:59:27 +0000 Subject: [PATCH 024/425] Update dependency @bundle-stats/plugin-webpack-filter to v4.10.1 (#19844) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 56d12f744503..57226a6d4e20 100644 --- a/package.json +++ b/package.json @@ -155,7 +155,7 @@ "@babel/plugin-transform-runtime": "7.23.9", "@babel/preset-env": "7.23.9", "@babel/preset-typescript": "7.23.3", - "@bundle-stats/plugin-webpack-filter": "4.10.0", + "@bundle-stats/plugin-webpack-filter": "4.10.1", "@koa/cors": "5.0.0", "@lokalise/node-api": "12.1.0", "@octokit/auth-oauth-device": "6.0.1", diff --git a/yarn.lock b/yarn.lock index c6a64c764dd0..863281863bdc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1447,12 +1447,12 @@ __metadata: languageName: node linkType: hard -"@bundle-stats/plugin-webpack-filter@npm:4.10.0": - version: 4.10.0 - resolution: "@bundle-stats/plugin-webpack-filter@npm:4.10.0" +"@bundle-stats/plugin-webpack-filter@npm:4.10.1": + version: 4.10.1 + resolution: "@bundle-stats/plugin-webpack-filter@npm:4.10.1" peerDependencies: core-js: ^3.0.0 - checksum: 10/43964bce792eab1e62571241278c71148b51513d262516823b7a8ba18c73da64e77cac2d93cd969db64f6699bad11bfb8f7d49de363bf4f9248b76e97479efcd + checksum: 10/f389188a27a01b8c353bb8b90a3c9fe1eabf4c24ed9f28c52e4063204780490dfd73df109d55ac0b0331a82b61705c0f3dac68b04fe50fcbd0e4e2efff2eda89 languageName: node linkType: hard @@ -9513,7 +9513,7 @@ __metadata: "@babel/preset-typescript": "npm:7.23.3" "@babel/runtime": "npm:7.23.9" "@braintree/sanitize-url": "npm:7.0.0" - "@bundle-stats/plugin-webpack-filter": "npm:4.10.0" + "@bundle-stats/plugin-webpack-filter": "npm:4.10.1" "@codemirror/autocomplete": "npm:6.12.0" "@codemirror/commands": "npm:6.3.3" "@codemirror/language": "npm:6.10.1" From a088b20987cadcefea0b8112775df1831909f260 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 21 Feb 2024 17:43:38 -0500 Subject: [PATCH 025/425] Update dependency hls.js to v1.5.6 (#19843) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 57226a6d4e20..ccb14c19d0b6 100644 --- a/package.json +++ b/package.json @@ -109,7 +109,7 @@ "element-internals-polyfill": "1.3.10", "fuse.js": "7.0.0", "google-timezones-json": "1.2.0", - "hls.js": "1.5.5", + "hls.js": "1.5.6", "home-assistant-js-websocket": "9.1.0", "idb-keyval": "6.2.1", "intl-messageformat": "10.5.11", diff --git a/yarn.lock b/yarn.lock index 863281863bdc..d2802de70875 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9494,10 +9494,10 @@ __metadata: languageName: node linkType: hard -"hls.js@npm:1.5.5": - version: 1.5.5 - resolution: "hls.js@npm:1.5.5" - checksum: 10/f182f9d1819527b76cf493646ce9a5cffaa9bb0fae02eab446fb16063fe15c527655a1237ba7f2ba3a1c51d11c64c25fb2cfe01ad94980038a810dc2ea982340 +"hls.js@npm:1.5.6": + version: 1.5.6 + resolution: "hls.js@npm:1.5.6" + checksum: 10/795c1d41b5ee682a48c21a78fa995ab8aa2b5badf84593eb12965b0fc58050ca5330df36a115946b8757dff558ba172f9210bb2896b12241416e069269e15d95 languageName: node linkType: hard @@ -9651,7 +9651,7 @@ __metadata: gulp-merge-json: "npm:2.1.2" gulp-rename: "npm:2.0.0" gulp-zopfli-green: "npm:6.0.1" - hls.js: "npm:1.5.5" + hls.js: "npm:1.5.6" home-assistant-js-websocket: "npm:9.1.0" html-minifier-terser: "npm:7.2.0" husky: "npm:9.0.11" From b360c854a8caff3907aabc7b1c5f2a24bd88dc43 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 21 Feb 2024 20:28:37 -0500 Subject: [PATCH 026/425] Bump ip from 1.1.8 to 1.1.9 (#19855) --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index d2802de70875..a2e1e658acdc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10153,9 +10153,9 @@ __metadata: linkType: hard "ip@npm:^1.1.5": - version: 1.1.8 - resolution: "ip@npm:1.1.8" - checksum: 10/52975ebf84a090162d561fc6948fbc4c53775a8054c05371f09cfcb40e30a53aa225b4efb624f630cff5af2dd8124c82dd68e4df065dc1d1ca91d04e850e9cde + version: 1.1.9 + resolution: "ip@npm:1.1.9" + checksum: 10/29261559b806f64929ada21e6d7e3bf4e67f2b43a4cb67500fdb72cead2e655ce97451a2e325eca3f404081c634ff5c3a68472814744b7f2148ddffc0fdfe66c languageName: node linkType: hard From a6d73f76158b23d4bc102b6fd10eaaea0e0eddfb Mon Sep 17 00:00:00 2001 From: karwosts <32912880+karwosts@users.noreply.github.com> Date: Thu, 22 Feb 2024 04:42:15 -0500 Subject: [PATCH 027/425] Allow unhiding entity hidden by integration (#19753) --- src/panels/config/entities/entity-registry-settings-editor.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/panels/config/entities/entity-registry-settings-editor.ts b/src/panels/config/entities/entity-registry-settings-editor.ts index 03102930afb1..5c6b8607fe97 100644 --- a/src/panels/config/entities/entity-registry-settings-editor.ts +++ b/src/panels/config/entities/entity-registry-settings-editor.ts @@ -939,9 +939,7 @@ export class EntityRegistrySettingsEditor extends LitElement { > From 267fc3743d8456fe3ff633aef91733217ffa0e67 Mon Sep 17 00:00:00 2001 From: Paul Bottein Date: Thu, 22 Feb 2024 10:42:37 +0100 Subject: [PATCH 028/425] Fix device class icon not showing in entities config page (#19854) --- src/data/icons.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/data/icons.ts b/src/data/icons.ts index dcb3952f5523..f63a861e08fe 100644 --- a/src/data/icons.ts +++ b/src/data/icons.ts @@ -198,8 +198,9 @@ export const entryIcon = async ( if (entry.icon) { return entry.icon; } + const stateObj = hass.states[entry.entity_id] as HassEntity | undefined; const domain = computeDomain(entry.entity_id); - return getEntityIcon(hass, domain, undefined, undefined, entry); + return getEntityIcon(hass, domain, stateObj, undefined, entry); }; const getEntityIcon = async ( From 47f7cf5419f8fc3dacfe367e1dade2cf8cb5eb5b Mon Sep 17 00:00:00 2001 From: karwosts <32912880+karwosts@users.noreply.github.com> Date: Thu, 22 Feb 2024 10:23:06 -0500 Subject: [PATCH 029/425] Add devices to energy collection (#19849) * Include individual devices in energy collection * async cleanup, fix includeTypes filter --- src/data/energy.ts | 4 ++ .../hui-energy-devices-detail-graph-card.ts | 72 +++---------------- .../energy/hui-energy-devices-graph-card.ts | 47 +----------- 3 files changed, 15 insertions(+), 108 deletions(-) diff --git a/src/data/energy.ts b/src/data/energy.ts index fe7bf3d1a418..32340c020940 100644 --- a/src/data/energy.ts +++ b/src/data/energy.ts @@ -331,6 +331,9 @@ export const getReferencedStatisticIds = ( } } } + if (!(includeTypes && !includeTypes.includes("device"))) { + statIDs.push(...prefs.device_consumption.map((d) => d.stat_consumption)); + } return statIDs; }; @@ -383,6 +386,7 @@ const getEnergyData = async ( "solar", "battery", "gas", + "device", ]); const waterStatIds = getReferencedStatisticIds(prefs, info, ["water"]); diff --git a/src/panels/lovelace/cards/energy/hui-energy-devices-detail-graph-card.ts b/src/panels/lovelace/cards/energy/hui-energy-devices-detail-graph-card.ts index c13f2dac8eb6..5bd0e8ce33b0 100644 --- a/src/panels/lovelace/cards/energy/hui-energy-devices-detail-graph-card.ts +++ b/src/panels/lovelace/cards/energy/hui-energy-devices-detail-graph-card.ts @@ -4,7 +4,7 @@ import { ChartOptions, ScatterDataPoint, } from "chart.js"; -import { differenceInDays, endOfToday, startOfToday } from "date-fns/esm"; +import { endOfToday, startOfToday } from "date-fns/esm"; import { HassConfig, UnsubscribeFunc } from "home-assistant-js-websocket"; import { css, @@ -27,11 +27,9 @@ import { } from "../../../../data/energy"; import { calculateStatisticSumGrowth, - fetchStatistics, getStatisticLabel, Statistics, StatisticsMetaData, - StatisticsUnitConfiguration, } from "../../../../data/recorder"; import { FrontendLocaleData } from "../../../../data/translation"; import { SubscribeMixin } from "../../../../mixins/subscribe-mixin"; @@ -41,6 +39,8 @@ import { EnergyDevicesDetailGraphCardConfig } from "../types"; import { hasConfigChanged } from "../../common/has-changed"; import { getCommonOptions } from "./common/energy-chart-options"; +const UNIT = "kWh"; + @customElement("hui-energy-devices-detail-graph-card") export class HuiEnergyDevicesDetailGraphCard extends SubscribeMixin(LitElement) @@ -56,10 +56,6 @@ export class HuiEnergyDevicesDetailGraphCard @state() private _data?: EnergyData; - @state() private _statistics?: Statistics; - - @state() private _compareStatistics?: Statistics; - @state() private _start = startOfToday(); @state() private _end = endOfToday(); @@ -68,8 +64,6 @@ export class HuiEnergyDevicesDetailGraphCard @state() private _compareEnd?: Date; - @state() private _unit?: string; - @state() private _hiddenStats = new Set(); protected hassSubscribeRequiredHostProps = ["_config"]; @@ -78,9 +72,8 @@ export class HuiEnergyDevicesDetailGraphCard return [ getEnergyDataCollection(this.hass, { key: this._config?.collection_key, - }).subscribe(async (data) => { + }).subscribe((data) => { this._data = data; - await this._getStatistics(this._data); this._processStatistics(); }), ]; @@ -103,7 +96,7 @@ export class HuiEnergyDevicesDetailGraphCard } protected willUpdate(changedProps: PropertyValues) { - if (changedProps.has("_hiddenStats") && this._statistics) { + if (changedProps.has("_hiddenStats") && this._data) { this._processStatistics(); } } @@ -133,7 +126,7 @@ export class HuiEnergyDevicesDetailGraphCard this._end, this.hass.locale, this.hass.config, - this._unit, + UNIT, this._compareStart, this._compareEnd )} @@ -201,57 +194,10 @@ export class HuiEnergyDevicesDetailGraphCard } ); - private async _getStatistics(energyData: EnergyData): Promise { - const dayDifference = differenceInDays( - energyData.end || new Date(), - energyData.start - ); - - const devices = energyData.prefs.device_consumption.map( - (device) => device.stat_consumption - ); - - const period = - dayDifference > 35 ? "month" : dayDifference > 2 ? "day" : "hour"; - - const lengthUnit = this.hass.config.unit_system.length || ""; - const units: StatisticsUnitConfiguration = { - energy: "kWh", - volume: lengthUnit === "km" ? "m³" : "ft³", - }; - this._unit = "kWh"; - - const statistics = await fetchStatistics( - this.hass, - energyData.start, - energyData.end, - devices, - period, - units, - ["change"] - ); - - let compareStatistics: Statistics | undefined; - - if (energyData.startCompare && energyData.endCompare) { - compareStatistics = await fetchStatistics( - this.hass, - energyData.startCompare, - energyData.endCompare, - devices, - period, - units, - ["change"] - ); - } - this._statistics = statistics; - this._compareStatistics = compareStatistics; - } - - private async _processStatistics() { + private _processStatistics() { const energyData = this._data!; - const data = this._statistics!; - const compareData = this._compareStatistics; + const data = energyData.stats; + const compareData = energyData.statsCompare; const growthValues = {}; energyData.prefs.device_consumption.forEach((device) => { diff --git a/src/panels/lovelace/cards/energy/hui-energy-devices-graph-card.ts b/src/panels/lovelace/cards/energy/hui-energy-devices-graph-card.ts index 64a6b5eb8464..19a69db447c6 100644 --- a/src/panels/lovelace/cards/energy/hui-energy-devices-graph-card.ts +++ b/src/panels/lovelace/cards/energy/hui-energy-devices-graph-card.ts @@ -6,7 +6,6 @@ import { ScatterDataPoint, } from "chart.js"; import { getRelativePosition } from "chart.js/helpers"; -import { differenceInDays } from "date-fns/esm"; import { UnsubscribeFunc } from "home-assistant-js-websocket"; import { css, @@ -31,10 +30,7 @@ import "../../../../components/ha-card"; import { EnergyData, getEnergyDataCollection } from "../../../../data/energy"; import { calculateStatisticSumGrowth, - fetchStatistics, getStatisticLabel, - Statistics, - StatisticsUnitConfiguration, } from "../../../../data/recorder"; import { FrontendLocaleData } from "../../../../data/translation"; import { SubscribeMixin } from "../../../../mixins/subscribe-mixin"; @@ -186,47 +182,8 @@ export class HuiEnergyDevicesGraphCard ); private async _getStatistics(energyData: EnergyData): Promise { - const dayDifference = differenceInDays( - energyData.end || new Date(), - energyData.start - ); - - const devices = energyData.prefs.device_consumption.map( - (device) => device.stat_consumption - ); - - const period = - dayDifference > 35 ? "month" : dayDifference > 2 ? "day" : "hour"; - - const lengthUnit = this.hass.config.unit_system.length || ""; - const units: StatisticsUnitConfiguration = { - energy: "kWh", - volume: lengthUnit === "km" ? "m³" : "ft³", - }; - - const data = await fetchStatistics( - this.hass, - energyData.start, - energyData.end, - devices, - period, - units, - ["change"] - ); - - let compareData: Statistics | undefined; - - if (energyData.startCompare && energyData.endCompare) { - compareData = await fetchStatistics( - this.hass, - energyData.startCompare, - energyData.endCompare, - devices, - period, - units, - ["change"] - ); - } + const data = energyData.stats; + const compareData = energyData.statsCompare; const chartData: Array>["data"]> = []; From d95bf64edf85f226a47e00b2436d3b543cf4af82 Mon Sep 17 00:00:00 2001 From: Paul Bottein Date: Thu, 22 Feb 2024 20:51:48 +0100 Subject: [PATCH 030/425] Add experimental sections view (#19846) --- src/common/util/array-move.ts | 8 +- src/components/ha-sortable.ts | 44 +- src/data/lovelace.ts | 13 + src/data/lovelace/config/section.ts | 26 ++ src/data/lovelace/config/view.ts | 2 + .../device-detail/ha-device-entities-card.ts | 8 +- src/panels/lovelace/cards/hui-button-card.ts | 10 + src/panels/lovelace/cards/hui-sensor-card.ts | 4 + src/panels/lovelace/cards/hui-tile-card.ts | 31 +- src/panels/lovelace/cards/types.ts | 2 +- .../common/generate-lovelace-config.ts | 22 +- .../lovelace/components/hui-card-edit-mode.ts | 303 +++++++++++++ .../lovelace/components/hui-card-options.ts | 69 +-- .../create-element/create-card-element.ts | 1 + .../create-element/create-element-base.ts | 17 +- .../create-element/create-section-element.ts | 19 + .../create-element/create-view-element.ts | 1 + .../lovelace/editor/add-entities-to-view.ts | 5 + .../editor/card-editor/hui-card-picker.ts | 176 ++++++-- .../card-editor/hui-dialog-create-card.ts | 65 ++- .../card-editor/hui-dialog-edit-card.ts | 65 +-- .../card-editor/hui-dialog-suggest-card.ts | 111 ++++- .../editor/card-editor/hui-section-preview.ts | 104 +++++ .../card-editor/show-create-card-dialog.ts | 4 +- .../card-editor/show-edit-card-dialog.ts | 16 +- .../card-editor/show-suggest-card-dialog.ts | 7 +- src/panels/lovelace/editor/config-util.ts | 405 ++++++++---------- src/panels/lovelace/editor/delete-card.ts | 19 +- src/panels/lovelace/editor/lovelace-path.ts | 197 +++++++++ src/panels/lovelace/editor/types.ts | 1 + .../unused-entities/hui-unused-entities.ts | 9 +- .../editor/view-editor/hui-view-editor.ts | 4 +- src/panels/lovelace/sections/const.ts | 2 + .../lovelace/sections/hui-error-section.ts | 60 +++ .../lovelace/sections/hui-grid-section.ts | 246 +++++++++++ src/panels/lovelace/sections/hui-section.ts | 247 +++++++++++ .../lovelace/strategies/get-strategy.ts | 46 +- src/panels/lovelace/strategies/types.ts | 6 +- src/panels/lovelace/types.ts | 1 + src/panels/lovelace/views/const.ts | 7 +- .../lovelace/views/hui-sections-view.ts | 322 ++++++++++++++ src/panels/lovelace/views/hui-view.ts | 112 ++++- src/translations/en.json | 27 +- .../lovelace/editor/config-util.spec.ts | 65 +-- 44 files changed, 2424 insertions(+), 485 deletions(-) create mode 100644 src/data/lovelace/config/section.ts create mode 100644 src/panels/lovelace/components/hui-card-edit-mode.ts create mode 100644 src/panels/lovelace/create-element/create-section-element.ts create mode 100644 src/panels/lovelace/editor/card-editor/hui-section-preview.ts create mode 100644 src/panels/lovelace/editor/lovelace-path.ts create mode 100644 src/panels/lovelace/sections/const.ts create mode 100644 src/panels/lovelace/sections/hui-error-section.ts create mode 100644 src/panels/lovelace/sections/hui-grid-section.ts create mode 100644 src/panels/lovelace/sections/hui-section.ts create mode 100644 src/panels/lovelace/views/hui-sections-view.ts diff --git a/src/common/util/array-move.ts b/src/common/util/array-move.ts index 36a152a01917..0985f764c0f0 100644 --- a/src/common/util/array-move.ts +++ b/src/common/util/array-move.ts @@ -20,14 +20,14 @@ function findNestedItem( }, obj); } -export function nestedArrayMove( - obj: T | T[], +export function nestedArrayMove( + obj: A, oldIndex: number, newIndex: number, oldPath?: ItemPath, newPath?: ItemPath -): T | T[] { - const newObj = Array.isArray(obj) ? [...obj] : { ...obj }; +): A { + const newObj = (Array.isArray(obj) ? [...obj] : { ...obj }) as A; const from = oldPath ? findNestedItem(newObj, oldPath) : newObj; const to = newPath ? findNestedItem(newObj, newPath, true) : newObj; diff --git a/src/components/ha-sortable.ts b/src/components/ha-sortable.ts index 5258c2fc5fb6..1c83eef95091 100644 --- a/src/components/ha-sortable.ts +++ b/src/components/ha-sortable.ts @@ -14,9 +14,16 @@ declare global { oldPath?: ItemPath; newPath?: ItemPath; }; + "drag-start": undefined; + "drag-end": undefined; } } +export type HaSortableOptions = Omit< + SortableInstance.SortableOptions, + "onStart" | "onChoose" | "onEnd" +>; + @customElement("ha-sortable") export class HaSortable extends LitElement { private _sortable?: SortableInstance; @@ -36,14 +43,17 @@ export class HaSortable extends LitElement { @property({ type: String, attribute: "handle-selector" }) public handleSelector?: string; - @property({ type: String, attribute: "group" }) - public group?: string; - - @property({ type: Number, attribute: "swap-threshold" }) - public swapThreshold?: number; + @property({ type: String }) + public group?: string | SortableInstance.GroupOptions; @property({ type: Boolean, attribute: "invert-swap" }) - public invertSwap?: boolean; + public invertSwap: boolean = false; + + @property({ attribute: false }) + public options?: HaSortableOptions; + + @property({ type: Boolean }) + public rollback: boolean = true; protected updated(changedProperties: PropertyValues) { if (changedProperties.has("disabled")) { @@ -114,26 +124,20 @@ export class HaSortable extends LitElement { const options: SortableInstance.Options = { animation: 150, - swapThreshold: 1, + ...this.options, onChoose: this._handleChoose, + onStart: this._handleStart, onEnd: this._handleEnd, }; if (this.draggableSelector) { options.draggable = this.draggableSelector; } - - if (this.swapThreshold !== undefined) { - options.swapThreshold = this.swapThreshold; - } - if (this.invertSwap !== undefined) { - options.invertSwap = this.invertSwap; - } if (this.handleSelector) { options.handle = this.handleSelector; } - if (this.draggableSelector) { - options.draggable = this.draggableSelector; + if (this.invertSwap !== undefined) { + options.invertSwap = this.invertSwap; } if (this.group) { options.group = this.group; @@ -143,8 +147,9 @@ export class HaSortable extends LitElement { } private _handleEnd = async (evt: SortableEvent) => { + fireEvent(this, "drag-end"); // put back in original location - if ((evt.item as any).placeholder) { + if (this.rollback && (evt.item as any).placeholder) { (evt.item as any).placeholder.replaceWith(evt.item); delete (evt.item as any).placeholder; } @@ -170,7 +175,12 @@ export class HaSortable extends LitElement { }); }; + private _handleStart = () => { + fireEvent(this, "drag-start"); + }; + private _handleChoose = (evt: SortableEvent) => { + if (!this.rollback) return; (evt.item as any).placeholder = document.createComment("sort-placeholder"); evt.item.after((evt.item as any).placeholder); }; diff --git a/src/data/lovelace.ts b/src/data/lovelace.ts index 1d6ba571ac5a..48de53e7d636 100644 --- a/src/data/lovelace.ts +++ b/src/data/lovelace.ts @@ -10,8 +10,10 @@ import { LovelaceCard, } from "../panels/lovelace/types"; import { HomeAssistant } from "../types"; +import { LovelaceSectionConfig } from "./lovelace/config/section"; import { fetchConfig, LegacyLovelaceConfig } from "./lovelace/config/types"; import { LovelaceViewConfig } from "./lovelace/config/view"; +import { HuiSection } from "../panels/lovelace/sections/hui-section"; export interface LovelacePanelConfig { mode: "yaml" | "storage"; @@ -24,10 +26,21 @@ export interface LovelaceViewElement extends HTMLElement { index?: number; cards?: Array; badges?: LovelaceBadge[]; + sections?: HuiSection[]; isStrategy: boolean; setConfig(config: LovelaceViewConfig): void; } +export interface LovelaceSectionElement extends HTMLElement { + hass?: HomeAssistant; + lovelace?: Lovelace; + viewIndex?: number; + index?: number; + cards?: Array; + isStrategy: boolean; + setConfig(config: LovelaceSectionConfig): void; +} + type LovelaceUpdatedEvent = HassEventBase & { event_type: "lovelace_updated"; data: { diff --git a/src/data/lovelace/config/section.ts b/src/data/lovelace/config/section.ts new file mode 100644 index 000000000000..1c2168858521 --- /dev/null +++ b/src/data/lovelace/config/section.ts @@ -0,0 +1,26 @@ +import type { LovelaceCardConfig } from "./card"; +import type { LovelaceStrategyConfig } from "./strategy"; + +export interface LovelaceBaseSectionConfig { + title?: string; +} + +export interface LovelaceSectionConfig extends LovelaceBaseSectionConfig { + type?: string; + cards?: LovelaceCardConfig[]; +} + +export interface LovelaceStrategySectionConfig + extends LovelaceBaseSectionConfig { + strategy: LovelaceStrategyConfig; +} + +export type LovelaceSectionRawConfig = + | LovelaceSectionConfig + | LovelaceStrategySectionConfig; + +export function isStrategySection( + section: LovelaceSectionRawConfig +): section is LovelaceStrategySectionConfig { + return "strategy" in section; +} diff --git a/src/data/lovelace/config/view.ts b/src/data/lovelace/config/view.ts index 0c522b60a138..10b454c15d18 100644 --- a/src/data/lovelace/config/view.ts +++ b/src/data/lovelace/config/view.ts @@ -1,5 +1,6 @@ import type { LovelaceBadgeConfig } from "./badge"; import type { LovelaceCardConfig } from "./card"; +import type { LovelaceSectionRawConfig } from "./section"; import type { LovelaceStrategyConfig } from "./strategy"; export interface ShowViewConfig { @@ -23,6 +24,7 @@ export interface LovelaceViewConfig extends LovelaceBaseViewConfig { type?: string; badges?: Array; cards?: LovelaceCardConfig[]; + sections?: LovelaceSectionRawConfig[]; } export interface LovelaceStrategyViewConfig extends LovelaceBaseViewConfig { diff --git a/src/panels/config/devices/device-detail/ha-device-entities-card.ts b/src/panels/config/devices/device-detail/ha-device-entities-card.ts index d594df69528b..71a8b0acdf12 100644 --- a/src/panels/config/devices/device-detail/ha-device-entities-card.ts +++ b/src/panels/config/devices/device-detail/ha-device-entities-card.ts @@ -27,7 +27,10 @@ import { addEntitiesToLovelaceView } from "../../../lovelace/editor/add-entities import type { LovelaceRowConfig } from "../../../lovelace/entity-rows/types"; import { LovelaceRow } from "../../../lovelace/entity-rows/types"; import { EntityRegistryStateEntry } from "../ha-config-device-page"; -import { computeCards } from "../../../lovelace/common/generate-lovelace-config"; +import { + computeCards, + computeSection, +} from "../../../lovelace/common/generate-lovelace-config"; @customElement("ha-device-entities-card") export class HaDeviceEntitiesCard extends LitElement { @@ -235,6 +238,9 @@ export class HaDeviceEntitiesCard extends LitElement { computeCards(this.hass.states, entities, { title: this.deviceName, }), + computeSection(entities, { + title: this.deviceName, + }), entities ); } diff --git a/src/panels/lovelace/cards/hui-button-card.ts b/src/panels/lovelace/cards/hui-button-card.ts index d738a1be6cf4..129390fe5b1b 100644 --- a/src/panels/lovelace/cards/hui-button-card.ts +++ b/src/panels/lovelace/cards/hui-button-card.ts @@ -147,6 +147,16 @@ export class HuiButtonCard extends LitElement implements LovelaceCard { ); } + public getGridSize(): [number, number] { + if ( + (this._config?.show_icon && this._config?.show_name) || + this._config?.show_state + ) { + return [2, 2]; + } + return [1, 1]; + } + public setConfig(config: ButtonCardConfig): void { if (config.entity && !isValidEntityId(config.entity)) { throw new Error("Invalid entity"); diff --git a/src/panels/lovelace/cards/hui-sensor-card.ts b/src/panels/lovelace/cards/hui-sensor-card.ts index ee7937e54415..d90858862df3 100644 --- a/src/panels/lovelace/cards/hui-sensor-card.ts +++ b/src/panels/lovelace/cards/hui-sensor-card.ts @@ -72,6 +72,10 @@ class HuiSensorCard extends HuiEntityCard { super.setConfig(entityCardConfig); } + public getSize(): [number, number] { + return [2, 2]; + } + static get styles(): CSSResultGroup { return [ HuiEntityCard.styles, diff --git a/src/panels/lovelace/cards/hui-tile-card.ts b/src/panels/lovelace/cards/hui-tile-card.ts index f85f182f881a..1d56cc66bd86 100644 --- a/src/panels/lovelace/cards/hui-tile-card.ts +++ b/src/panels/lovelace/cards/hui-tile-card.ts @@ -124,6 +124,18 @@ export class HuiTileCard extends LitElement implements LovelaceCard { ); } + public getGridSize(): [number, number] { + const width = 2; + let height = 1; + if (this._config?.features?.length) { + height += Math.ceil((this._config.features.length * 2) / 3); + } + if (this._config?.vertical) { + height++; + } + return [width, height]; + } + private _handleAction(ev: ActionHandlerEvent) { handleAction(this, this.hass!, this._config!, ev.detail.action!); } @@ -441,12 +453,16 @@ export class HuiTileCard extends LitElement implements LovelaceCard { .secondary=${localizedState} >
- + ${this._config.features + ? html` + + ` + : nothing} `; } @@ -469,6 +485,9 @@ export class HuiTileCard extends LitElement implements LovelaceCard { transition: box-shadow 180ms ease-in-out, border-color 180ms ease-in-out; + display: flex; + flex-direction: column; + justify-content: space-between; } ha-card.active { --tile-color: var(--state-icon-color); diff --git a/src/panels/lovelace/cards/types.ts b/src/panels/lovelace/cards/types.ts index f87dde26cd4a..8a57d1b0d5e2 100644 --- a/src/panels/lovelace/cards/types.ts +++ b/src/panels/lovelace/cards/types.ts @@ -545,7 +545,7 @@ export interface TileCardConfig extends LovelaceCardConfig { state_content?: string | string[]; icon?: string; color?: string; - show_entity_picture?: string; + show_entity_picture?: boolean; vertical?: boolean; tap_action?: ActionConfig; hold_action?: ActionConfig; diff --git a/src/panels/lovelace/common/generate-lovelace-config.ts b/src/panels/lovelace/common/generate-lovelace-config.ts index 2b5437a93dff..c609f66dbd7c 100644 --- a/src/panels/lovelace/common/generate-lovelace-config.ts +++ b/src/panels/lovelace/common/generate-lovelace-config.ts @@ -8,12 +8,14 @@ import { stripPrefixFromEntityName } from "../../../common/entity/strip_prefix_f import { stringCompare } from "../../../common/string/compare"; import { LocalizeFunc } from "../../../common/translations/localize"; import type { AreaFilterValue } from "../../../components/ha-area-filter"; +import { areaCompare } from "../../../data/area_registry"; import { EnergyPreferences, GridSourceTypeEnergyPreference, } from "../../../data/energy"; import { domainToName } from "../../../data/integration"; import { LovelaceCardConfig } from "../../../data/lovelace/config/card"; +import { LovelaceSectionConfig } from "../../../data/lovelace/config/section"; import { LovelaceViewConfig } from "../../../data/lovelace/config/view"; import { computeUserInitials } from "../../../data/user"; import { HomeAssistant } from "../../../types"; @@ -25,10 +27,10 @@ import { PictureCardConfig, PictureEntityCardConfig, ThermostatCardConfig, + TileCardConfig, } from "../cards/types"; import { EntityConfig } from "../entity-rows/types"; import { ButtonsHeaderFooterConfig } from "../header-footer/types"; -import { areaCompare } from "../../../data/area_registry"; const HIDE_DOMAIN = new Set([ "automation", @@ -100,6 +102,24 @@ const splitByAreaDevice = ( }; }; +export const computeSection = ( + entityIds: string[], + sectionOptions?: Partial +): LovelaceSectionConfig => ({ + type: "grid", + cards: entityIds.map( + (entity) => + ({ + type: "tile", + entity, + show_entity_picture: ["person", "camera", "image"].includes( + computeDomain(entity) + ), + }) as TileCardConfig + ), + ...sectionOptions, +}); + export const computeCards = ( states: HassEntities, entityIds: string[], diff --git a/src/panels/lovelace/components/hui-card-edit-mode.ts b/src/panels/lovelace/components/hui-card-edit-mode.ts new file mode 100644 index 000000000000..bae22490ba73 --- /dev/null +++ b/src/panels/lovelace/components/hui-card-edit-mode.ts @@ -0,0 +1,303 @@ +import "@material/mwc-button"; +import { ActionDetail } from "@material/mwc-list/mwc-list-foundation"; +import { + mdiContentCopy, + mdiContentCut, + mdiContentDuplicate, + mdiDelete, + mdiDotsVertical, + mdiPencil, +} from "@mdi/js"; +import deepClone from "deep-clone-simple"; +import { CSSResultGroup, LitElement, TemplateResult, css, html } from "lit"; +import { customElement, property, state } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; +import { storage } from "../../../common/decorators/storage"; +import { fireEvent } from "../../../common/dom/fire_event"; +import "../../../components/ha-button-menu"; +import "../../../components/ha-icon-button"; +import "../../../components/ha-list-item"; +import "../../../components/ha-svg-icon"; +import { LovelaceCardConfig } from "../../../data/lovelace/config/card"; +import { haStyle } from "../../../resources/styles"; +import { HomeAssistant } from "../../../types"; +import { showEditCardDialog } from "../editor/card-editor/show-edit-card-dialog"; +import { + LovelaceCardPath, + findLovelaceCards, + getLovelaceContainerPath, + parseLovelaceCardPath, +} from "../editor/lovelace-path"; +import { Lovelace } from "../types"; + +@customElement("hui-card-edit-mode") +export class HuiCardEditMode extends LitElement { + @property({ attribute: false }) public hass!: HomeAssistant; + + @property({ attribute: false }) public lovelace!: Lovelace; + + @property({ type: Array }) public path!: LovelaceCardPath; + + @property({ type: Boolean }) public hiddenOverlay = false; + + @state() + public _menuOpened: boolean = false; + + @state() + public _hover: boolean = false; + + @state() + public _focused: boolean = false; + + @storage({ + key: "lovelaceClipboard", + state: false, + subscribe: false, + storage: "sessionStorage", + }) + protected _clipboard?: LovelaceCardConfig; + + private get _cards() { + const containerPath = getLovelaceContainerPath(this.path!); + return findLovelaceCards(this.lovelace!.config, containerPath)!; + } + + private _touchStarted = false; + + protected firstUpdated(): void { + this.addEventListener("focus", () => { + this._focused = true; + }); + this.addEventListener("blur", () => { + this._focused = false; + }); + this.addEventListener("touchstart", () => { + this._touchStarted = true; + }); + this.addEventListener("touchend", () => { + setTimeout(() => { + this._touchStarted = false; + }, 10); + }); + this.addEventListener("mouseenter", () => { + if (this._touchStarted) return; + this._hover = true; + }); + this.addEventListener("mouseout", () => { + this._hover = false; + }); + this.addEventListener("click", () => { + this._hover = true; + document.addEventListener("click", this._documentClicked); + }); + } + + disconnectedCallback(): void { + super.disconnectedCallback(); + document.removeEventListener("click", this._documentClicked); + } + + _documentClicked = (ev) => { + this._hover = ev.composedPath().includes(this); + document.removeEventListener("click", this._documentClicked); + }; + + protected render(): TemplateResult { + const showOverlay = + (this._hover || this._menuOpened || this._focused) && !this.hiddenOverlay; + + return html` +
+
+
+
+ +
+ + + + + + ${this.hass.localize( + "ui.panel.lovelace.editor.edit_card.duplicate" + )} + + + + ${this.hass.localize("ui.panel.lovelace.editor.edit_card.copy")} + + + + ${this.hass.localize("ui.panel.lovelace.editor.edit_card.cut")} + +
  • + + ${this.hass.localize("ui.panel.lovelace.editor.edit_card.delete")} + + +
    +
    + `; + } + + private _handleOpened() { + this._menuOpened = true; + } + + private _handleClosed() { + this._menuOpened = false; + } + + private _handleAction(ev: CustomEvent) { + switch (ev.detail.index) { + case 0: + this._duplicateCard(); + break; + case 1: + this._copyCard(); + break; + case 2: + this._cutCard(); + break; + case 3: + this._deleteCard(true); + break; + } + } + + private _duplicateCard(): void { + const { cardIndex } = parseLovelaceCardPath(this.path!); + const containerPath = getLovelaceContainerPath(this.path!); + const cardConfig = this._cards![cardIndex]; + showEditCardDialog(this, { + lovelaceConfig: this.lovelace!.config, + saveConfig: this.lovelace!.saveConfig, + path: containerPath, + cardConfig, + }); + } + + private _editCard(ev): void { + if (ev.defaultPrevented) { + return; + } + if (ev.type === "keydown" && ev.key !== "Enter" && ev.key !== " ") { + return; + } + ev.preventDefault(); + ev.stopPropagation(); + fireEvent(this, "ll-edit-card", { path: this.path! }); + } + + private _cutCard(): void { + this._copyCard(); + this._deleteCard(false); + } + + private _copyCard(): void { + const { cardIndex } = parseLovelaceCardPath(this.path!); + const cardConfig = this._cards[cardIndex]; + this._clipboard = deepClone(cardConfig); + } + + private _deleteCard(confirm: boolean): void { + fireEvent(this, "ll-delete-card", { path: this.path!, confirm }); + } + + static get styles(): CSSResultGroup { + return [ + haStyle, + css` + .card-overlay { + position: absolute; + opacity: 0; + pointer-events: none; + inset: 0; + display: flex; + align-items: center; + justify-content: center; + transition: opacity 180ms ease-in-out; + } + + .card-overlay.visible { + opacity: 1; + pointer-events: auto; + } + + .card-wrapper { + position: relative; + height: 100%; + z-index: 0; + } + + .edit { + outline: none !important; + cursor: pointer; + position: absolute; + inset: 0; + display: flex; + align-items: center; + justify-content: center; + border-radius: var(--ha-card-border-radius, 12px); + z-index: 0; + } + .edit-overlay { + position: absolute; + inset: 0; + opacity: 0.8; + background-color: var(--primary-background-color); + border: 1px solid var(--divider-color); + border-radius: var(--ha-card-border-radius, 12px); + z-index: 0; + } + .edit ha-svg-icon { + display: flex; + position: relative; + color: var(--primary-text-color); + border-radius: 50%; + padding: 12px; + background: var(--secondary-background-color); + --mdc-icon-size: 24px; + } + .more { + position: absolute; + right: -6px; + top: -6px; + } + .more ha-icon-button { + cursor: pointer; + border-radius: 50%; + background: var(--secondary-background-color); + --mdc-icon-button-size: 32px; + --mdc-icon-size: 20px; + } + `, + ]; + } +} + +declare global { + interface HTMLElementTagNameMap { + "hui-card-edit-mode": HuiCardEditMode; + } +} diff --git a/src/panels/lovelace/components/hui-card-options.ts b/src/panels/lovelace/components/hui-card-options.ts index 8d960e15f808..ec444bb9544f 100644 --- a/src/panels/lovelace/components/hui-card-options.ts +++ b/src/panels/lovelace/components/hui-card-options.ts @@ -28,7 +28,6 @@ import "../../../components/ha-icon-button"; import "../../../components/ha-list-item"; import { LovelaceCardConfig } from "../../../data/lovelace/config/card"; import { saveConfig } from "../../../data/lovelace/config/types"; -import { LovelaceViewConfig } from "../../../data/lovelace/config/view"; import { showAlertDialog, showPromptDialog, @@ -41,10 +40,15 @@ import { showEditCardDialog } from "../editor/card-editor/show-edit-card-dialog" import { addCard, deleteCard, - moveCard, - moveCardToPosition, - swapCard, + moveCardToContainer, + moveCardToIndex, } from "../editor/config-util"; +import { + LovelaceCardPath, + findLovelaceCards, + getLovelaceContainerPath, + parseLovelaceCardPath, +} from "../editor/lovelace-path"; import { showSelectViewDialog } from "../editor/select-view/show-select-view-dialog"; import { Lovelace, LovelaceCard } from "../types"; @@ -54,7 +58,7 @@ export class HuiCardOptions extends LitElement { @property({ attribute: false }) public lovelace?: Lovelace; - @property({ type: Array }) public path?: [number, number]; + @property({ type: Array }) public path?: LovelaceCardPath; @queryAssignedNodes() private _assignedNodes?: NodeListOf; @@ -76,17 +80,21 @@ export class HuiCardOptions extends LitElement { if (!changedProps.has("path") || !this.path) { return; } + const { viewIndex } = parseLovelaceCardPath(this.path); this.classList.toggle( "panel", - this.lovelace!.config.views[this.path![0]].panel + this.lovelace!.config.views[viewIndex].panel ); } - private get _currentView() { - return this.lovelace!.config.views[this.path![0]] as LovelaceViewConfig; + private get _cards() { + const containerPath = getLovelaceContainerPath(this.path!); + return findLovelaceCards(this.lovelace!.config, containerPath)!; } protected render(): TemplateResult { + const { cardIndex } = parseLovelaceCardPath(this.path!); + return html`
    @@ -107,7 +115,7 @@ export class HuiCardOptions extends LitElement { .path=${mdiMinus} class="move-arrow" @click=${this._decreaseCardPosiion} - ?disabled=${this.path![1] === 0} + ?disabled=${cardIndex === 0} > -
    ${this.path![1] + 1}
    +
    ${cardIndex + 1}
    ` : nothing} @@ -271,13 +278,14 @@ export class HuiCardOptions extends LitElement { } private _duplicateCard(): void { - const path = this.path!; - const cardConfig = this._currentView.cards![path[1]]; + const { cardIndex } = parseLovelaceCardPath(this.path!); + const containerPath = getLovelaceContainerPath(this.path!); + const cardConfig = this._cards![cardIndex]; showEditCardDialog(this, { lovelaceConfig: this.lovelace!.config, saveConfig: this.lovelace!.saveConfig, - path: [path[0], null], - newCardConfig: cardConfig, + path: containerPath, + cardConfig, }); } @@ -291,30 +299,29 @@ export class HuiCardOptions extends LitElement { } private _copyCard(): void { - const cardConfig = this._currentView.cards![this.path![1]]; + const { cardIndex } = parseLovelaceCardPath(this.path!); + const cardConfig = this._cards[cardIndex]; this._clipboard = deepClone(cardConfig); } private _decreaseCardPosiion(): void { const lovelace = this.lovelace!; const path = this.path!; - lovelace.saveConfig( - swapCard(lovelace.config, path, [path[0], path[1] - 1]) - ); + const { cardIndex } = parseLovelaceCardPath(path); + lovelace.saveConfig(moveCardToIndex(lovelace.config, path, cardIndex - 1)); } private _increaseCardPosition(): void { const lovelace = this.lovelace!; const path = this.path!; - lovelace.saveConfig( - swapCard(lovelace.config, path, [path[0], path[1] + 1]) - ); + const { cardIndex } = parseLovelaceCardPath(path); + lovelace.saveConfig(moveCardToIndex(lovelace.config, path, cardIndex + 1)); } private async _changeCardPosition(): Promise { const lovelace = this.lovelace!; const path = this.path!; - + const { cardIndex } = parseLovelaceCardPath(path); const positionString = await showPromptDialog(this, { title: this.hass!.localize( "ui.panel.lovelace.editor.change_position.title" @@ -324,7 +331,7 @@ export class HuiCardOptions extends LitElement { ), inputType: "number", inputMin: "1", - placeholder: String(path[1] + 1), + placeholder: String(cardIndex + 1), }); if (!positionString) return; @@ -333,7 +340,8 @@ export class HuiCardOptions extends LitElement { if (isNaN(position)) return; - lovelace.saveConfig(moveCardToPosition(lovelace.config, path, position)); + const newIndex = position - 1; + lovelace.saveConfig(moveCardToIndex(lovelace.config, path, newIndex)); } private _moveCard(): void { @@ -345,20 +353,17 @@ export class HuiCardOptions extends LitElement { viewSelectedCallback: async (urlPath, selectedDashConfig, viewIndex) => { if (urlPath === this.lovelace!.urlPath) { this.lovelace!.saveConfig( - moveCard(this.lovelace!.config, this.path!, [viewIndex]) + moveCardToContainer(this.lovelace!.config, this.path!, [viewIndex]) ); showSaveSuccessToast(this, this.hass!); return; } try { + const { cardIndex } = parseLovelaceCardPath(this.path!); await saveConfig( this.hass!, urlPath, - addCard( - selectedDashConfig, - [viewIndex], - this._currentView.cards![this.path![1]] - ) + addCard(selectedDashConfig, [viewIndex], this._cards[cardIndex]) ); this.lovelace!.saveConfig( deleteCard(this.lovelace!.config, this.path!) diff --git a/src/panels/lovelace/create-element/create-card-element.ts b/src/panels/lovelace/create-element/create-card-element.ts index 3619a13c8a0e..4a9a02fd67e4 100644 --- a/src/panels/lovelace/create-element/create-card-element.ts +++ b/src/panels/lovelace/create-element/create-card-element.ts @@ -24,6 +24,7 @@ const ALWAYS_LOADED_TYPES = new Set([ "entity-button", "glance", "grid", + "section", "light", "sensor", "thermostat", diff --git a/src/panels/lovelace/create-element/create-element-base.ts b/src/panels/lovelace/create-element/create-element-base.ts index d6d4c8d53ff0..48bf11bef9c9 100644 --- a/src/panels/lovelace/create-element/create-element-base.ts +++ b/src/panels/lovelace/create-element/create-element-base.ts @@ -1,27 +1,31 @@ import { fireEvent } from "../../../common/dom/fire_event"; -import { LovelaceViewElement } from "../../../data/lovelace"; +import { + LovelaceSectionElement, + LovelaceViewElement, +} from "../../../data/lovelace"; import { LovelaceBadgeConfig } from "../../../data/lovelace/config/badge"; import { LovelaceCardConfig } from "../../../data/lovelace/config/card"; +import { LovelaceSectionConfig } from "../../../data/lovelace/config/section"; import { LovelaceViewConfig } from "../../../data/lovelace/config/view"; import { isCustomType, stripCustomPrefix, } from "../../../data/lovelace_custom_cards"; +import { LovelaceCardFeatureConfig } from "../card-features/types"; import type { HuiErrorCard } from "../cards/hui-error-card"; import type { ErrorCardConfig } from "../cards/types"; import { LovelaceElement, LovelaceElementConfig } from "../elements/types"; import { LovelaceRow, LovelaceRowConfig } from "../entity-rows/types"; import { LovelaceHeaderFooterConfig } from "../header-footer/types"; -import { LovelaceCardFeatureConfig } from "../card-features/types"; import { LovelaceBadge, LovelaceCard, LovelaceCardConstructor, + LovelaceCardFeature, + LovelaceCardFeatureConstructor, LovelaceHeaderFooter, LovelaceHeaderFooterConstructor, LovelaceRowConstructor, - LovelaceCardFeature, - LovelaceCardFeatureConstructor, } from "../types"; const TIMEOUT = 2000; @@ -62,6 +66,11 @@ interface CreateElementConfigTypes { element: LovelaceCardFeature; constructor: LovelaceCardFeatureConstructor; }; + section: { + config: LovelaceSectionConfig; + element: LovelaceSectionElement; + constructor: unknown; + }; } export const createErrorCardElement = (config: ErrorCardConfig) => { diff --git a/src/panels/lovelace/create-element/create-section-element.ts b/src/panels/lovelace/create-element/create-section-element.ts new file mode 100644 index 000000000000..7b63d2742e17 --- /dev/null +++ b/src/panels/lovelace/create-element/create-section-element.ts @@ -0,0 +1,19 @@ +import { LovelaceSectionElement } from "../../../data/lovelace"; +import { LovelaceSectionConfig } from "../../../data/lovelace/config/section"; +import { HuiErrorCard } from "../cards/hui-error-card"; +import "../sections/hui-grid-section"; +import { createLovelaceElement } from "./create-element-base"; + +const ALWAYS_LOADED_LAYOUTS = new Set(["grid"]); + +const LAZY_LOAD_LAYOUTS = {}; + +export const createSectionElement = ( + config: LovelaceSectionConfig +): LovelaceSectionElement | HuiErrorCard => + createLovelaceElement( + "section", + config, + ALWAYS_LOADED_LAYOUTS, + LAZY_LOAD_LAYOUTS + ); diff --git a/src/panels/lovelace/create-element/create-view-element.ts b/src/panels/lovelace/create-element/create-view-element.ts index 158cf2da3180..65bd3e30b241 100644 --- a/src/panels/lovelace/create-element/create-view-element.ts +++ b/src/panels/lovelace/create-element/create-view-element.ts @@ -9,6 +9,7 @@ const ALWAYS_LOADED_LAYOUTS = new Set(["masonry"]); const LAZY_LOAD_LAYOUTS = { panel: () => import("../views/hui-panel-view"), sidebar: () => import("../views/hui-sidebar-view"), + sections: () => import("../views/hui-sections-view"), }; export const createViewElement = ( diff --git a/src/panels/lovelace/editor/add-entities-to-view.ts b/src/panels/lovelace/editor/add-entities-to-view.ts index 03b9a44ac28d..8706287c0394 100644 --- a/src/panels/lovelace/editor/add-entities-to-view.ts +++ b/src/panels/lovelace/editor/add-entities-to-view.ts @@ -1,5 +1,6 @@ import { LovelacePanelConfig } from "../../../data/lovelace"; import { LovelaceCardConfig } from "../../../data/lovelace/config/card"; +import { LovelaceSectionConfig } from "../../../data/lovelace/config/section"; import { LovelaceConfig, fetchConfig, @@ -15,6 +16,7 @@ export const addEntitiesToLovelaceView = async ( element: HTMLElement, hass: HomeAssistant, cardConfig: LovelaceCardConfig[], + sectionConfig?: LovelaceSectionConfig, entities?: string[] ) => { hass.loadFragmentTranslation("lovelace"); @@ -71,6 +73,7 @@ export const addEntitiesToLovelaceView = async ( // all storage dashboards are generated, but we have YAML dashboards just show the YAML config showSuggestCardDialog(element, { cardConfig, + sectionConfig, entities, yaml: true, }); @@ -93,6 +96,7 @@ export const addEntitiesToLovelaceView = async ( if (!storageDashs.length && lovelaceConfig.views.length === 1) { showSuggestCardDialog(element, { cardConfig, + sectionConfig, lovelaceConfig: lovelaceConfig!, saveConfig: async (newConfig: LovelaceConfig): Promise => { try { @@ -116,6 +120,7 @@ export const addEntitiesToLovelaceView = async ( viewSelectedCallback: (newUrlPath, selectedDashConfig, viewIndex) => { showSuggestCardDialog(element, { cardConfig, + sectionConfig, lovelaceConfig: selectedDashConfig, saveConfig: async (newConfig: LovelaceConfig): Promise => { try { diff --git a/src/panels/lovelace/editor/card-editor/hui-card-picker.ts b/src/panels/lovelace/editor/card-editor/hui-card-picker.ts index 382914e87f3c..2577822756e9 100644 --- a/src/panels/lovelace/editor/card-editor/hui-card-picker.ts +++ b/src/panels/lovelace/editor/card-editor/hui-card-picker.ts @@ -15,6 +15,7 @@ import { until } from "lit/directives/until"; import memoizeOne from "memoize-one"; import { storage } from "../../../../common/decorators/storage"; import { fireEvent } from "../../../../common/dom/fire_event"; +import { stringCompare } from "../../../../common/string/compare"; import "../../../../components/ha-circular-progress"; import "../../../../components/search-input"; import { isUnavailableState } from "../../../../data/entity"; @@ -46,6 +47,8 @@ interface CardElement { export class HuiCardPicker extends LitElement { @property({ attribute: false }) public hass?: HomeAssistant; + @property({ attribute: false }) public suggestedCards?: string[]; + @storage({ key: "lovelaceClipboard", state: true, @@ -92,6 +95,29 @@ export class HuiCardPicker extends LitElement { } ); + private _suggestedCards = memoizeOne( + (cardElements: CardElement[]): CardElement[] => + cardElements.filter( + (cardElement: CardElement) => cardElement.card.isSuggested + ) + ); + + private _customCards = memoizeOne( + (cardElements: CardElement[]): CardElement[] => + cardElements.filter( + (cardElement: CardElement) => + cardElement.card.isCustom && !cardElement.card.isSuggested + ) + ); + + private _otherCards = memoizeOne( + (cardElements: CardElement[]): CardElement[] => + cardElements.filter( + (cardElement: CardElement) => + !cardElement.card.isSuggested && !cardElement.card.isCustom + ) + ); + protected render() { if ( !this.hass || @@ -102,6 +128,10 @@ export class HuiCardPicker extends LitElement { return nothing; } + const suggestedCards = this._suggestedCards(this._cards); + const othersCards = this._otherCards(this._cards); + const customCardsItems = this._customCards(this._cards); + return html`
    - ${this._clipboard && !this._filter - ? html` - ${until( - this._renderCardElement( - { - type: this._clipboard.type, - showElement: true, - isCustom: false, - name: this.hass!.localize( - "ui.panel.lovelace.editor.card.generic.paste" - ), - description: `${this.hass!.localize( - "ui.panel.lovelace.editor.card.generic.paste_description", - { - type: this._clipboard.type, - } - )}`, - }, - this._clipboard - ), - html` -
    - -
    - ` + ${this._filter + ? this._filterCards(this._cards, this._filter).map( + (cardElement: CardElement) => cardElement.element + ) + : html` + ${suggestedCards.length > 0 + ? html` +
    + ${this.hass!.localize( + `ui.panel.lovelace.editor.card.generic.suggested_cards` + )} +
    + ` + : nothing} + ${this._renderClipboardCard()} + ${suggestedCards.map( + (cardElement: CardElement) => cardElement.element )} - ` - : nothing} - ${this._filterCards(this._cards, this._filter).map( - (cardElement: CardElement) => cardElement.element - )} + ${suggestedCards.length > 0 + ? html` +
    + ${this.hass!.localize( + `ui.panel.lovelace.editor.card.generic.other_cards` + )} +
    + ` + : nothing} + ${othersCards.map( + (cardElement: CardElement) => cardElement.element + )} + ${customCardsItems.length > 0 + ? html` +
    + ${this.hass!.localize( + `ui.panel.lovelace.editor.card.generic.custom_cards` + )} +
    + ` + : nothing} + ${customCardsItems.map( + (cardElement: CardElement) => cardElement.element + )} + `}
    { + if (a.isSuggested && !b.isSuggested) { + return -1; + } + if (!a.isSuggested && b.isSuggested) { + return 1; + } + return stringCompare( + a.name || a.type, + b.name || b.type, + this.hass?.language + ); + }); + if (customCards.length > 0) { cards = cards.concat( customCards.map((ccard: CustomCardEntry) => ({ @@ -244,6 +300,37 @@ export class HuiCardPicker extends LitElement { })); } + private _renderClipboardCard() { + if (!this._clipboard) { + return nothing; + } + + return html` ${until( + this._renderCardElement( + { + type: this._clipboard.type, + showElement: true, + isCustom: false, + name: this.hass!.localize( + "ui.panel.lovelace.editor.card.generic.paste" + ), + description: `${this.hass!.localize( + "ui.panel.lovelace.editor.card.generic.paste_description", + { + type: this._clipboard.type, + } + )}`, + }, + this._clipboard + ), + html` +
    + +
    + ` + )}`; + } + private _handleSearchChange(ev: CustomEvent) { const value = ev.detail.value; @@ -381,6 +468,14 @@ export class HuiCardPicker extends LitElement { margin: var(--card-picker-search-margin); } + .cards-container-header { + font-size: 16px; + font-weight: 500; + padding: 12px 8px 4px 8px; + margin: 0; + grid-column: 1 / -1; + } + .cards-container { display: grid; grid-gap: 8px 8px; @@ -455,6 +550,23 @@ export class HuiCardPicker extends LitElement { .manual { max-width: none; } + + .icon { + position: absolute; + top: 8px; + right: 8px + inset-inline-start: 8px; + inset-inline-end: 8px; + border-radius: 50%; + --mdc-icon-size: 16px; + line-height: 16px; + box-sizing: border-box; + color: var(--text-primary-color); + padding: 4px; + } + .icon.custom { + background: var(--warning-color); + } `, ]; } diff --git a/src/panels/lovelace/editor/card-editor/hui-dialog-create-card.ts b/src/panels/lovelace/editor/card-editor/hui-dialog-create-card.ts index 3c7798411f00..89a20ab0f57b 100644 --- a/src/panels/lovelace/editor/card-editor/hui-dialog-create-card.ts +++ b/src/panels/lovelace/editor/card-editor/hui-dialog-create-card.ts @@ -12,16 +12,27 @@ import { computeStateName } from "../../../../common/entity/compute_state_name"; import { DataTableRowData } from "../../../../components/data-table/ha-data-table"; import "../../../../components/ha-dialog"; import "../../../../components/ha-dialog-header"; +import { + isStrategySection, + LovelaceSectionConfig, +} from "../../../../data/lovelace/config/section"; import type { LovelaceViewConfig } from "../../../../data/lovelace/config/view"; import type { HassDialog } from "../../../../dialogs/make-dialog-manager"; import { haStyleDialog } from "../../../../resources/styles"; import type { HomeAssistant } from "../../../../types"; +import { + computeCards, + computeSection, +} from "../../common/generate-lovelace-config"; import "./hui-card-picker"; import "./hui-entity-picker-table"; import { CreateCardDialogParams } from "./show-create-card-dialog"; import { showEditCardDialog } from "./show-edit-card-dialog"; import { showSuggestCardDialog } from "./show-suggest-card-dialog"; -import { computeCards } from "../../common/generate-lovelace-config"; +import { + findLovelaceContainer, + parseLovelaceContainerPath, +} from "../lovelace-path"; declare global { interface HASSDomEvents { @@ -42,7 +53,9 @@ export class HuiCreateDialogCard @state() private _params?: CreateCardDialogParams; - @state() private _viewConfig!: LovelaceViewConfig; + @state() private _containerConfig!: + | LovelaceViewConfig + | LovelaceSectionConfig; @state() private _selectedEntities: string[] = []; @@ -50,8 +63,17 @@ export class HuiCreateDialogCard public async showDialog(params: CreateCardDialogParams): Promise { this._params = params; - const [view] = params.path; - this._viewConfig = params.lovelaceConfig.views[view]; + + const containerConfig = findLovelaceContainer( + params.lovelaceConfig, + params.path + ); + + if ("strategy" in containerConfig) { + throw new Error("Can't edit strategy"); + } + + this._containerConfig = containerConfig; } public closeDialog(): boolean { @@ -67,10 +89,10 @@ export class HuiCreateDialogCard return nothing; } - const title = this._viewConfig.title + const title = this._containerConfig.title ? this.hass!.localize( - "ui.panel.lovelace.editor.edit_card.pick_card_view_title", - { name: `"${this._viewConfig.title}"` } + "ui.panel.lovelace.editor.edit_card.pick_card_title", + { name: `"${this._containerConfig.title}"` } ) : this.hass!.localize("ui.panel.lovelace.editor.edit_card.pick_card"); @@ -112,6 +134,7 @@ export class HuiCreateDialogCard this._currTabIndex === 0 ? html` = {}; + + const { sectionIndex } = parseLovelaceContainerPath(this._params!.path); + const isSection = sectionIndex !== undefined; + + // If we are in a section, we want to keep the section options for the preview + if (isSection) { + const containerConfig = findLovelaceContainer( + this._params!.lovelaceConfig!, + this._params!.path! + ) as LovelaceSectionConfig; + if (!isStrategySection(containerConfig)) { + const { cards, title, ...rest } = containerConfig; + sectionOptions = rest; + } + } + + const sectionConfig = computeSection( + this._selectedEntities, + sectionOptions + ); + showSuggestCardDialog(this, { lovelaceConfig: this._params!.lovelaceConfig, saveConfig: this._params!.saveConfig, path: this._params!.path as [number], entities: this._selectedEntities, cardConfig, + sectionConfig, }); this.closeDialog(); diff --git a/src/panels/lovelace/editor/card-editor/hui-dialog-edit-card.ts b/src/panels/lovelace/editor/card-editor/hui-dialog-edit-card.ts index 44e47035677d..c27b7024a2c4 100644 --- a/src/panels/lovelace/editor/card-editor/hui-dialog-edit-card.ts +++ b/src/panels/lovelace/editor/card-editor/hui-dialog-edit-card.ts @@ -1,12 +1,12 @@ import { mdiClose, mdiHelpCircle } from "@mdi/js"; import deepFreeze from "deep-freeze"; import { - css, CSSResultGroup, - html, LitElement, - nothing, PropertyValues, + css, + html, + nothing, } from "lit"; import { customElement, property, query, state } from "lit/decorators"; import type { HASSDomEvent } from "../../../../common/dom/fire_event"; @@ -16,6 +16,14 @@ import "../../../../components/ha-circular-progress"; import "../../../../components/ha-dialog"; import "../../../../components/ha-dialog-header"; import "../../../../components/ha-icon-button"; +import { LovelaceCardConfig } from "../../../../data/lovelace/config/card"; +import { LovelaceSectionConfig } from "../../../../data/lovelace/config/section"; +import { LovelaceViewConfig } from "../../../../data/lovelace/config/view"; +import { + getCustomCardEntry, + isCustomType, + stripCustomPrefix, +} from "../../../../data/lovelace_custom_cards"; import { showConfirmationDialog } from "../../../../dialogs/generic/show-dialog-box"; import type { HassDialog } from "../../../../dialogs/make-dialog-manager"; import { haStyleDialog } from "../../../../resources/styles"; @@ -24,18 +32,12 @@ import { showSaveSuccessToast } from "../../../../util/toast-saved-success"; import { addCard, replaceCard } from "../config-util"; import { getCardDocumentationURL } from "../get-card-documentation-url"; import type { ConfigChangedEvent } from "../hui-element-editor"; +import { findLovelaceContainer } from "../lovelace-path"; import type { GUIModeChangedEvent } from "../types"; import "./hui-card-element-editor"; import type { HuiCardElementEditor } from "./hui-card-element-editor"; import "./hui-card-preview"; import type { EditCardDialogParams } from "./show-edit-card-dialog"; -import { LovelaceCardConfig } from "../../../../data/lovelace/config/card"; -import { LovelaceViewConfig } from "../../../../data/lovelace/config/view"; -import { - getCustomCardEntry, - isCustomType, - stripCustomPrefix, -} from "../../../../data/lovelace_custom_cards"; declare global { // for fire event @@ -61,7 +63,9 @@ export class HuiDialogEditCard @state() private _cardConfig?: LovelaceCardConfig; - @state() private _viewConfig!: LovelaceViewConfig; + @state() private _containerConfig!: + | LovelaceViewConfig + | LovelaceSectionConfig; @state() private _saving = false; @@ -84,18 +88,29 @@ export class HuiDialogEditCard this._params = params; this._GUImode = true; this._guiModeAvailable = true; - const [view, card] = params.path; - this._viewConfig = params.lovelaceConfig.views[view]; - this._cardConfig = - params.newCardConfig ?? - (card !== null ? this._viewConfig.cards![card] : undefined); + + const containerConfig = findLovelaceContainer( + params.lovelaceConfig, + params.path + ); + + if ("strategy" in containerConfig) { + throw new Error("Can't edit strategy"); + } + + this._containerConfig = containerConfig; + + if ("cardConfig" in params) { + this._cardConfig = params.cardConfig; + this._dirty = true; + } else { + this._cardConfig = this._containerConfig.cards?.[params.cardIndex]; + } + this.large = false; if (this._cardConfig && !Object.isFrozen(this._cardConfig)) { this._cardConfig = deepFreeze(this._cardConfig); } - if (params.newCardConfig) { - this._dirty = true; - } } public closeDialog(): boolean { @@ -171,10 +186,10 @@ export class HuiDialogEditCard { type: cardName } ); } else if (!this._cardConfig) { - heading = this._viewConfig.title + heading = this._containerConfig.title ? this.hass!.localize( "ui.panel.lovelace.editor.edit_card.pick_card_view_title", - { name: this._viewConfig.title } + { name: this._containerConfig.title } ) : this.hass!.localize("ui.panel.lovelace.editor.edit_card.pick_card"); } else { @@ -369,13 +384,13 @@ export class HuiDialogEditCard return; } this._saving = true; - const [view, card] = this._params!.path; + const path = this._params!.path; await this._params!.saveConfig( - card === null - ? addCard(this._params!.lovelaceConfig, [view], this._cardConfig!) + "cardConfig" in this._params! + ? addCard(this._params!.lovelaceConfig, path, this._cardConfig!) : replaceCard( this._params!.lovelaceConfig, - [view, card], + [...path, this._params!.cardIndex], this._cardConfig! ) ); diff --git a/src/panels/lovelace/editor/card-editor/hui-dialog-suggest-card.ts b/src/panels/lovelace/editor/card-editor/hui-dialog-suggest-card.ts index 8cf248ac016f..80e517d5ceae 100644 --- a/src/panels/lovelace/editor/card-editor/hui-dialog-suggest-card.ts +++ b/src/panels/lovelace/editor/card-editor/hui-dialog-suggest-card.ts @@ -5,13 +5,20 @@ import { fireEvent } from "../../../../common/dom/fire_event"; import "../../../../components/ha-yaml-editor"; import type { HaYamlEditor } from "../../../../components/ha-yaml-editor"; import { LovelaceCardConfig } from "../../../../data/lovelace/config/card"; +import { LovelaceSectionConfig } from "../../../../data/lovelace/config/section"; +import { isStrategyView } from "../../../../data/lovelace/config/view"; import { haStyleDialog } from "../../../../resources/styles"; import { HomeAssistant } from "../../../../types"; import { showSaveSuccessToast } from "../../../../util/toast-saved-success"; -import { addCards } from "../config-util"; +import { addCards, addSection } from "../config-util"; +import { + LovelaceContainerPath, + parseLovelaceContainerPath, +} from "../lovelace-path"; import "./hui-card-preview"; import { showCreateCardDialog } from "./show-create-card-dialog"; import { SuggestCardDialogParams } from "./show-suggest-card-dialog"; +import { LovelaceConfig } from "../../../../data/lovelace/config/types"; @customElement("hui-dialog-suggest-card") export class HuiDialogSuggestCard extends LitElement { @@ -21,6 +28,8 @@ export class HuiDialogSuggestCard extends LitElement { @state() private _cardConfig?: LovelaceCardConfig[]; + @state() private _sectionConfig?: LovelaceSectionConfig; + @state() private _saving = false; @query("ha-yaml-editor") private _yamlEditor?: HaYamlEditor; @@ -28,9 +37,13 @@ export class HuiDialogSuggestCard extends LitElement { public showDialog(params: SuggestCardDialogParams): void { this._params = params; this._cardConfig = params.cardConfig; + this._sectionConfig = params.sectionConfig; if (!Object.isFrozen(this._cardConfig)) { this._cardConfig = deepFreeze(this._cardConfig); } + if (!Object.isFrozen(this._sectionConfig)) { + this._sectionConfig = deepFreeze(this._sectionConfig); + } if (this._yamlEditor) { this._yamlEditor.setValue(this._cardConfig); } @@ -42,6 +55,45 @@ export class HuiDialogSuggestCard extends LitElement { fireEvent(this, "dialog-closed", { dialog: this.localName }); } + private get _viewSupportsSection(): boolean { + if (!this._params?.lovelaceConfig || !this._params?.path) { + return false; + } + + const { viewIndex } = parseLovelaceContainerPath(this._params.path); + const viewConfig = this._params!.lovelaceConfig.views[viewIndex]; + + return !isStrategyView(viewConfig) && viewConfig.type === "sections"; + } + + private _renderPreview() { + if (this._sectionConfig && this._viewSupportsSection) { + return html` +
    + +
    + `; + } + if (this._cardConfig) { + return html` +
    + ${this._cardConfig.map( + (cardConfig) => html` + + ` + )} +
    + `; + } + return nothing; + } + protected render() { if (!this._params) { return nothing; @@ -56,20 +108,7 @@ export class HuiDialogSuggestCard extends LitElement { )} >
    - ${this._cardConfig - ? html` -
    - ${this._cardConfig.map( - (cardConfig) => html` - - ` - )} -
    - ` - : ""} + ${this._renderPreview()} ${this._params.yaml && this._cardConfig ? html`
    @@ -79,7 +118,7 @@ export class HuiDialogSuggestCard extends LitElement { >
    ` - : ""} + : nothing}
    { if ( !this._params?.lovelaceConfig || @@ -188,13 +254,12 @@ export class HuiDialogSuggestCard extends LitElement { return; } this._saving = true; - await this._params!.saveConfig( - addCards( - this._params!.lovelaceConfig, - this._params!.path as [number], - this._cardConfig - ) + + const newConfig = this._computeNewConfig( + this._params.lovelaceConfig, + this._params.path ); + await this._params!.saveConfig(newConfig); this._saving = false; showSaveSuccessToast(this, this.hass); this.closeDialog(); diff --git a/src/panels/lovelace/editor/card-editor/hui-section-preview.ts b/src/panels/lovelace/editor/card-editor/hui-section-preview.ts new file mode 100644 index 000000000000..c569fcf4c164 --- /dev/null +++ b/src/panels/lovelace/editor/card-editor/hui-section-preview.ts @@ -0,0 +1,104 @@ +import { PropertyValues, ReactiveElement } from "lit"; +import { customElement, property } from "lit/decorators"; +import { LovelaceSectionElement } from "../../../../data/lovelace"; +import { LovelaceSectionConfig } from "../../../../data/lovelace/config/section"; +import { HomeAssistant } from "../../../../types"; +import { createSectionElement } from "../../create-element/create-section-element"; +import { createErrorSectionConfig } from "../../sections/hui-error-section"; +import { LovelaceConfig } from "../../../../data/lovelace/config/types"; + +@customElement("hui-section-preview") +export class HuiSectionPreview extends ReactiveElement { + @property({ attribute: false }) public hass?: HomeAssistant; + + @property({ attribute: false }) public lovelace?: LovelaceConfig; + + @property({ attribute: false }) public config?: LovelaceSectionConfig; + + private _element?: LovelaceSectionElement; + + private get _error() { + return this._element?.tagName === "HUI-ERROR-SECTION"; + } + + constructor() { + super(); + this.addEventListener("ll-rebuild", () => { + this._cleanup(); + if (this.config) { + this._createSection(this.config); + } + }); + } + + protected createRenderRoot() { + return this; + } + + protected update(changedProperties: PropertyValues) { + super.update(changedProperties); + + if (changedProperties.has("config")) { + const oldConfig = changedProperties.get("config") as + | undefined + | LovelaceSectionConfig; + + if (!this.config) { + this._cleanup(); + return; + } + + if (!this.config.type) { + this._createSection(createErrorSectionConfig("No section type found")); + return; + } + + if (!this._element) { + this._createSection(this.config); + return; + } + + // in case the element was an error element we always want to recreate it + if (!this._error && oldConfig && this.config.type === oldConfig.type) { + try { + this._element.setConfig(this.config); + } catch (err: any) { + this._createSection(createErrorSectionConfig(err.message)); + } + } else { + this._createSection(this.config); + } + } + + if (changedProperties.has("hass")) { + if (this._element) { + this._element.hass = this.hass; + } + } + } + + private _createSection(configValue: LovelaceSectionConfig): void { + this._cleanup(); + this._element = createSectionElement(configValue) as LovelaceSectionElement; + + if (this.hass) { + this._element!.hass = this.hass; + } + + this.appendChild(this._element!); + } + + private _cleanup() { + if (!this._element) { + return; + } + this.removeChild(this._element); + this._element = undefined; + } +} + +declare global { + interface HTMLElementTagNameMap { + "hui-section-preview": HuiSectionPreview; + } +} diff --git a/src/panels/lovelace/editor/card-editor/show-create-card-dialog.ts b/src/panels/lovelace/editor/card-editor/show-create-card-dialog.ts index 230047d39911..96c58879b260 100644 --- a/src/panels/lovelace/editor/card-editor/show-create-card-dialog.ts +++ b/src/panels/lovelace/editor/card-editor/show-create-card-dialog.ts @@ -1,10 +1,12 @@ import { fireEvent } from "../../../../common/dom/fire_event"; import type { LovelaceConfig } from "../../../../data/lovelace/config/types"; +import { LovelaceContainerPath } from "../lovelace-path"; export interface CreateCardDialogParams { lovelaceConfig: LovelaceConfig; saveConfig: (config: LovelaceConfig) => void; - path: [number]; + path: LovelaceContainerPath; + suggestedCards?: string[]; entities?: string[]; // We can pass entity id's that will be added to the config when a card is picked } diff --git a/src/panels/lovelace/editor/card-editor/show-edit-card-dialog.ts b/src/panels/lovelace/editor/card-editor/show-edit-card-dialog.ts index 46070fd7ffad..40391f6a1311 100644 --- a/src/panels/lovelace/editor/card-editor/show-edit-card-dialog.ts +++ b/src/panels/lovelace/editor/card-editor/show-edit-card-dialog.ts @@ -1,14 +1,20 @@ import { fireEvent } from "../../../../common/dom/fire_event"; import type { LovelaceCardConfig } from "../../../../data/lovelace/config/card"; import type { LovelaceConfig } from "../../../../data/lovelace/config/types"; +import { LovelaceContainerPath } from "../lovelace-path"; -export interface EditCardDialogParams { +export type EditCardDialogParams = { lovelaceConfig: LovelaceConfig; saveConfig: (config: LovelaceConfig) => void; - path: [number, number | null]; - // If specified, the card will be replaced with the new card. - newCardConfig?: LovelaceCardConfig; -} + path: LovelaceContainerPath; +} & ( + | { + cardIndex: number; + } + | { + cardConfig: LovelaceCardConfig; + } +); export const importEditCardDialog = () => import("./hui-dialog-edit-card"); diff --git a/src/panels/lovelace/editor/card-editor/show-suggest-card-dialog.ts b/src/panels/lovelace/editor/card-editor/show-suggest-card-dialog.ts index ea43443d065f..c95fed399e8d 100644 --- a/src/panels/lovelace/editor/card-editor/show-suggest-card-dialog.ts +++ b/src/panels/lovelace/editor/card-editor/show-suggest-card-dialog.ts @@ -1,14 +1,17 @@ import { fireEvent } from "../../../../common/dom/fire_event"; import { LovelaceCardConfig } from "../../../../data/lovelace/config/card"; +import { LovelaceSectionConfig } from "../../../../data/lovelace/config/section"; import { LovelaceConfig } from "../../../../data/lovelace/config/types"; +import { LovelaceContainerPath } from "../lovelace-path"; export interface SuggestCardDialogParams { lovelaceConfig?: LovelaceConfig; yaml?: boolean; saveConfig?: (config: LovelaceConfig) => void; - path?: [number]; + path?: LovelaceContainerPath; entities?: string[]; // We pass this to create dialog when user chooses "Pick own" - cardConfig: LovelaceCardConfig[]; // We can pass a suggested config + cardConfig: LovelaceCardConfig[]; // We can pass a suggested config,s + sectionConfig?: LovelaceSectionConfig; } const importSuggestCardDialog = () => import("./hui-dialog-suggest-card"); diff --git a/src/panels/lovelace/editor/config-util.ts b/src/panels/lovelace/editor/config-util.ts index f494544fb680..09d2e611fa9b 100644 --- a/src/panels/lovelace/editor/config-util.ts +++ b/src/panels/lovelace/editor/config-util.ts @@ -1,296 +1,160 @@ import { LovelaceCardConfig } from "../../../data/lovelace/config/card"; +import { LovelaceSectionRawConfig } from "../../../data/lovelace/config/section"; import { LovelaceConfig } from "../../../data/lovelace/config/types"; import { LovelaceViewConfig, isStrategyView, } from "../../../data/lovelace/config/view"; import type { HomeAssistant } from "../../../types"; +import { + LovelaceCardPath, + LovelaceContainerPath, + findLovelaceCards, + findLovelaceContainer, + getLovelaceContainerPath, + parseLovelaceCardPath, + parseLovelaceContainerPath, + updateLovelaceCards, + updateLovelaceContainer, +} from "./lovelace-path"; export const addCard = ( config: LovelaceConfig, - path: [number], + path: LovelaceContainerPath, cardConfig: LovelaceCardConfig ): LovelaceConfig => { - const [viewIndex] = path; - const views: LovelaceViewConfig[] = []; - - config.views.forEach((viewConf, index) => { - if (index !== viewIndex) { - views.push(config.views[index]); - return; - } - - if (isStrategyView(viewConf)) { - throw new Error("You cannot add a card in a strategy view."); - } - - const cards = viewConf.cards - ? [...viewConf.cards, cardConfig] - : [cardConfig]; - - views.push({ - ...viewConf, - cards, - }); - }); - - return { - ...config, - views, - }; + const cards = findLovelaceCards(config, path); + const newCards = cards ? [...cards, cardConfig] : [cardConfig]; + const newConfig = updateLovelaceCards(config, path, newCards); + return newConfig; }; export const addCards = ( config: LovelaceConfig, - path: [number], + path: LovelaceContainerPath, cardConfigs: LovelaceCardConfig[] ): LovelaceConfig => { - const [viewIndex] = path; - const views: LovelaceViewConfig[] = []; - - config.views.forEach((viewConf, index) => { - if (index !== viewIndex) { - views.push(config.views[index]); - return; - } - - if (isStrategyView(viewConf)) { - throw new Error("You cannot add cards in a strategy view."); - } - - const cards = viewConf.cards - ? [...viewConf.cards, ...cardConfigs] - : [...cardConfigs]; - - views.push({ - ...viewConf, - cards, - }); - }); - - return { - ...config, - views, - }; + const cards = findLovelaceCards(config, path); + const newCards = cards ? [...cards, ...cardConfigs] : [...cardConfigs]; + const newConfig = updateLovelaceCards(config, path, newCards); + return newConfig; }; export const replaceCard = ( config: LovelaceConfig, - path: [number, number], + path: LovelaceCardPath, cardConfig: LovelaceCardConfig ): LovelaceConfig => { - const [viewIndex, cardIndex] = path; - const views: LovelaceViewConfig[] = []; - - config.views.forEach((viewConf, index) => { - if (index !== viewIndex) { - views.push(config.views[index]); - return; - } - - if (isStrategyView(viewConf)) { - throw new Error("You cannot replace a card in a strategy view."); - } - - views.push({ - ...viewConf, - cards: (viewConf.cards || []).map((origConf, ind) => - ind === cardIndex ? cardConfig : origConf - ), - }); - }); + const { cardIndex } = parseLovelaceCardPath(path); + const containerPath = getLovelaceContainerPath(path); - return { - ...config, - views, - }; + const cards = findLovelaceCards(config, containerPath); + + const newCards = (cards ?? []).map((origConf, ind) => + ind === cardIndex ? cardConfig : origConf + ); + + const newConfig = updateLovelaceCards(config, containerPath, newCards); + return newConfig; }; export const deleteCard = ( config: LovelaceConfig, - path: [number, number] + path: LovelaceCardPath ): LovelaceConfig => { - const [viewIndex, cardIndex] = path; - const views: LovelaceViewConfig[] = []; - - config.views.forEach((viewConf, index) => { - if (index !== viewIndex) { - views.push(config.views[index]); - return; - } - - if (isStrategyView(viewConf)) { - throw new Error("You cannot delete a card in a strategy view."); - } - - views.push({ - ...viewConf, - cards: (viewConf.cards || []).filter( - (_origConf, ind) => ind !== cardIndex - ), - }); - }); + const { cardIndex } = parseLovelaceCardPath(path); + const containerPath = getLovelaceContainerPath(path); - return { - ...config, - views, - }; + const cards = findLovelaceCards(config, containerPath); + + const newCards = (cards ?? []).filter((_origConf, ind) => ind !== cardIndex); + + const newConfig = updateLovelaceCards(config, containerPath, newCards); + return newConfig; }; export const insertCard = ( config: LovelaceConfig, - path: [number, number], + path: LovelaceCardPath, cardConfig: LovelaceCardConfig ) => { - const [viewIndex, cardIndex] = path; - const views: LovelaceViewConfig[] = []; - - config.views.forEach((viewConf, index) => { - if (index !== viewIndex) { - views.push(config.views[index]); - return; - } - - if (isStrategyView(viewConf)) { - throw new Error("You cannot insert a card in a strategy view."); - } - - const cards = viewConf.cards - ? [ - ...viewConf.cards.slice(0, cardIndex), - cardConfig, - ...viewConf.cards.slice(cardIndex), - ] - : [cardConfig]; - - views.push({ - ...viewConf, - cards, - }); - }); - - return { - ...config, - views, - }; -}; - -export const swapCard = ( - config: LovelaceConfig, - path1: [number, number], - path2: [number, number] -): LovelaceConfig => { - const origView1 = config.views[path1[0]]; - const origView2 = config.views[path2[0]]; - - if (isStrategyView(origView1) || isStrategyView(origView2)) { - throw new Error("You cannot move swap cards in a strategy view."); - } + const { cardIndex } = parseLovelaceCardPath(path); + const containerPath = getLovelaceContainerPath(path); - const card1 = origView1.cards![path1[1]]; - const card2 = origView2.cards![path2[1]]; + const cards = findLovelaceCards(config, containerPath); - const newView1 = { - ...origView1, - cards: origView1.cards!.map((origCard, index) => - index === path1[1] ? card2 : origCard - ), - }; + const newCards = cards + ? [...cards.slice(0, cardIndex), cardConfig, ...cards.slice(cardIndex)] + : [cardConfig]; - const updatedOrigView2 = path1[0] === path2[0] ? newView1 : origView2; - const newView2 = { - ...updatedOrigView2, - cards: updatedOrigView2.cards!.map((origCard, index) => - index === path2[1] ? card1 : origCard - ), - }; - - return { - ...config, - views: config.views.map((origView, index) => - index === path2[0] ? newView2 : index === path1[0] ? newView1 : origView - ), - }; + const newConfig = updateLovelaceCards(config, containerPath, newCards); + return newConfig; }; -export const moveCardToPosition = ( +export const moveCardToIndex = ( config: LovelaceConfig, - path: [number, number], - position: number + path: LovelaceCardPath, + index: number ): LovelaceConfig => { - const view = config.views[path[0]]; + const { cardIndex } = parseLovelaceCardPath(path); + const containerPath = getLovelaceContainerPath(path); - if (isStrategyView(view)) { - throw new Error("You cannot move a card in a strategy view."); - } + const cards = findLovelaceCards(config, containerPath); - const oldIndex = path[1]; - const newIndex = Math.max(Math.min(position - 1, view.cards!.length - 1), 0); + const newCards = cards ? [...cards] : []; - const newCards = [...view.cards!]; + const oldIndex = cardIndex; + const newIndex = Math.max(Math.min(index, newCards.length - 1), 0); const card = newCards[oldIndex]; newCards.splice(oldIndex, 1); newCards.splice(newIndex, 0, card); - const newView = { - ...view, - cards: newCards, - }; - - return { - ...config, - views: config.views.map((origView, index) => - index === path[0] ? newView : origView - ), - }; + const newConfig = updateLovelaceCards(config, containerPath, newCards); + return newConfig; }; -export const moveCard = ( +export const moveCardToContainer = ( config: LovelaceConfig, - fromPath: [number, number], - toPath: [number] + fromPath: LovelaceCardPath, + toPath: LovelaceContainerPath ): LovelaceConfig => { - if (fromPath[0] === toPath[0]) { - throw new Error("You cannot move a card to the view it is in."); + const { + cardIndex: fromCardIndex, + viewIndex: fromViewIndex, + sectionIndex: fromSectionIndex, + } = parseLovelaceCardPath(fromPath); + const { viewIndex: toViewIndex, sectionIndex: toSectionIndex } = + parseLovelaceContainerPath(toPath); + + if (fromViewIndex === toViewIndex && fromSectionIndex === toSectionIndex) { + throw new Error("You cannot move a card to the view or section it is in."); } - const fromView = config.views[fromPath[0]]; - const toView = config.views[toPath[0]]; - if (isStrategyView(fromView)) { - throw new Error("You cannot move a card from a strategy view."); - } + const fromContainerPath = getLovelaceContainerPath(fromPath); + const cards = findLovelaceCards(config, fromContainerPath); + const card = cards![fromCardIndex]; - if (isStrategyView(toView)) { - throw new Error("You cannot move a card to a strategy view."); - } + let newConfig = addCard(config, toPath, card); + newConfig = deleteCard(newConfig, fromPath); - const card = fromView.cards![fromPath[1]]; - - const newView1 = { - ...fromView, - cards: (fromView.cards || []).filter( - (_origConf, ind) => ind !== fromPath[1] - ), - }; + return newConfig; +}; - const cards = toView.cards ? [...toView.cards, card] : [card]; +export const moveCard = ( + config: LovelaceConfig, + fromPath: LovelaceCardPath, + toPath: LovelaceCardPath +): LovelaceConfig => { + const { cardIndex: fromCardIndex } = parseLovelaceCardPath(fromPath); + const fromContainerPath = getLovelaceContainerPath(fromPath); + const cards = findLovelaceCards(config, fromContainerPath); + const card = cards![fromCardIndex]; - const newView2 = { - ...toView, - cards, - }; + let newConfig = deleteCard(config, fromPath); + newConfig = insertCard(newConfig, toPath, card); - return { - ...config, - views: config.views.map((origView, index) => - index === toPath[0] - ? newView2 - : index === fromPath[0] - ? newView1 - : origView - ), - }; + return newConfig; }; export const addView = ( @@ -356,3 +220,84 @@ export const deleteView = ( ...config, views: config.views.filter((_origView, index) => index !== viewIndex), }); + +export const addSection = ( + config: LovelaceConfig, + viewIndex: number, + sectionConfig: LovelaceSectionRawConfig +): LovelaceConfig => { + const view = findLovelaceContainer(config, [viewIndex]) as LovelaceViewConfig; + if (isStrategyView(view)) { + throw new Error("Deleting sections in a strategy is not supported."); + } + const sections = view.sections + ? [...view.sections, sectionConfig] + : [sectionConfig]; + + const newConfig = updateLovelaceContainer(config, [viewIndex], { + ...view, + sections, + }); + return newConfig; +}; + +export const deleteSection = ( + config: LovelaceConfig, + viewIndex: number, + sectionIndex: number +): LovelaceConfig => { + const view = findLovelaceContainer(config, [viewIndex]) as LovelaceViewConfig; + if (isStrategyView(view)) { + throw new Error("Deleting sections in a strategy is not supported."); + } + const sections = view.sections?.filter( + (_origSection, index) => index !== sectionIndex + ); + + const newConfig = updateLovelaceContainer(config, [viewIndex], { + ...view, + sections, + }); + return newConfig; +}; + +export const insertSection = ( + config: LovelaceConfig, + viewIndex: number, + sectionIndex: number, + sectionConfig: LovelaceSectionRawConfig +): LovelaceConfig => { + const view = findLovelaceContainer(config, [viewIndex]) as LovelaceViewConfig; + if (isStrategyView(view)) { + throw new Error("Inserting sections in a strategy is not supported."); + } + const sections = view.sections + ? [ + ...view.sections.slice(0, sectionIndex), + sectionConfig, + ...view.sections.slice(sectionIndex), + ] + : [sectionConfig]; + + const newConfig = updateLovelaceContainer(config, [viewIndex], { + ...view, + sections, + }); + return newConfig; +}; + +export const moveSection = ( + config: LovelaceConfig, + fromPath: [number, number], + toPath: [number, number] +): LovelaceConfig => { + const section = findLovelaceContainer( + config, + fromPath + ) as LovelaceSectionRawConfig; + + let newConfig = deleteSection(config, fromPath[0], fromPath[1]); + newConfig = insertSection(newConfig, toPath[0], toPath[1], section); + + return newConfig; +}; diff --git a/src/panels/lovelace/editor/delete-card.ts b/src/panels/lovelace/editor/delete-card.ts index f4b2c08b09fb..f3264bc0236d 100644 --- a/src/panels/lovelace/editor/delete-card.ts +++ b/src/panels/lovelace/editor/delete-card.ts @@ -1,22 +1,29 @@ -import { isStrategyView } from "../../../data/lovelace/config/view"; import { showAlertDialog } from "../../../dialogs/generic/show-dialog-box"; import { HomeAssistant } from "../../../types"; import { showDeleteSuccessToast } from "../../../util/toast-deleted-success"; import { Lovelace } from "../types"; import { showDeleteCardDialog } from "./card-editor/show-delete-card-dialog"; import { deleteCard, insertCard } from "./config-util"; +import { + LovelaceCardPath, + findLovelaceContainer, + getLovelaceContainerPath, + parseLovelaceCardPath, +} from "./lovelace-path"; export async function confDeleteCard( element: HTMLElement, hass: HomeAssistant, lovelace: Lovelace, - path: [number, number] + path: LovelaceCardPath ): Promise { - const view = lovelace.config.views[path[0]]; - if (isStrategyView(view)) { - throw new Error("Deleting cards in a strategy view is not supported."); + const containerPath = getLovelaceContainerPath(path); + const { cardIndex } = parseLovelaceCardPath(path); + const containerConfig = findLovelaceContainer(lovelace.config, containerPath); + if ("strategy" in containerConfig) { + throw new Error("Deleting cards in a strategy is not supported."); } - const cardConfig = view.cards![path[1]]; + const cardConfig = containerConfig.cards![cardIndex]; showDeleteCardDialog(element, { cardConfig, deleteCard: async () => { diff --git a/src/panels/lovelace/editor/lovelace-path.ts b/src/panels/lovelace/editor/lovelace-path.ts new file mode 100644 index 000000000000..2eaf9dadc6d1 --- /dev/null +++ b/src/panels/lovelace/editor/lovelace-path.ts @@ -0,0 +1,197 @@ +import { LovelaceCardConfig } from "../../../data/lovelace/config/card"; +import { + LovelaceSectionRawConfig, + isStrategySection, +} from "../../../data/lovelace/config/section"; +import { LovelaceConfig } from "../../../data/lovelace/config/types"; +import { + LovelaceViewRawConfig, + isStrategyView, +} from "../../../data/lovelace/config/view"; + +export type LovelaceCardPath = [number, number] | [number, number, number]; +export type LovelaceContainerPath = [number] | [number, number]; + +export const parseLovelaceCardPath = ( + path: LovelaceCardPath +): { viewIndex: number; sectionIndex?: number; cardIndex: number } => { + if (path.length === 2) { + return { + viewIndex: path[0], + cardIndex: path[1], + }; + } + return { + viewIndex: path[0], + sectionIndex: path[1], + cardIndex: path[2], + }; +}; + +export const parseLovelaceContainerPath = ( + path: LovelaceContainerPath +): { viewIndex: number; sectionIndex?: number } => { + if (path.length === 1) { + return { + viewIndex: path[0], + }; + } + return { + viewIndex: path[0], + sectionIndex: path[1], + }; +}; + +export const getLovelaceContainerPath = ( + path: LovelaceCardPath +): LovelaceContainerPath => path.slice(0, -1) as LovelaceContainerPath; + +export const findLovelaceContainer = ( + config: LovelaceConfig, + path: LovelaceContainerPath +): LovelaceViewRawConfig | LovelaceSectionRawConfig => { + const { viewIndex, sectionIndex } = parseLovelaceContainerPath(path); + + const view = config.views[viewIndex]; + + if (!view) { + throw new Error("View does not exist"); + } + if (sectionIndex === undefined) { + return view; + } + if (isStrategyView(view)) { + throw new Error("Can not find section in a strategy view"); + } + + const section = view.sections?.[sectionIndex]; + + if (!section) { + throw new Error("Section does not exist"); + } + return section; +}; + +export const findLovelaceCards = ( + config: LovelaceConfig, + path: LovelaceContainerPath +): LovelaceCardConfig[] | undefined => { + const { viewIndex, sectionIndex } = parseLovelaceContainerPath(path); + + const view = config.views[viewIndex]; + + if (!view) { + throw new Error("View does not exist"); + } + if (isStrategyView(view)) { + throw new Error("Can not find cards in a strategy view"); + } + if (sectionIndex === undefined) { + return view.cards; + } + + const section = view.sections?.[sectionIndex]; + + if (!section) { + throw new Error("Section does not exist"); + } + if (isStrategySection(section)) { + throw new Error("Can not find cards in a strategy section"); + } + return section.cards; +}; + +export const updateLovelaceContainer = ( + config: LovelaceConfig, + path: LovelaceContainerPath, + containerConfig: LovelaceViewRawConfig | LovelaceSectionRawConfig +): LovelaceConfig => { + const { viewIndex, sectionIndex } = parseLovelaceContainerPath(path); + + let updated = false; + const newViews = config.views.map((view, vIndex) => { + if (vIndex !== viewIndex) return view; + + if (sectionIndex === undefined) { + updated = true; + return containerConfig; + } + + if (isStrategyView(view)) { + throw new Error("Can not update section in a strategy view"); + } + + if (view.sections === undefined) { + throw new Error("Section does not exist"); + } + + const newSections = view.sections.map((section, sIndex) => { + if (sIndex !== sectionIndex) return section; + updated = true; + return containerConfig; + }); + return { + ...view, + sections: newSections, + }; + }); + + if (!updated) { + throw new Error("Can not update cards in a non-existing view/section"); + } + return { + ...config, + views: newViews, + }; +}; + +export const updateLovelaceCards = ( + config: LovelaceConfig, + path: LovelaceContainerPath, + cards: LovelaceCardConfig[] +): LovelaceConfig => { + const { viewIndex, sectionIndex } = parseLovelaceContainerPath(path); + + let updated = false; + const newViews = config.views.map((view, vIndex) => { + if (vIndex !== viewIndex) return view; + if (isStrategyView(view)) { + throw new Error("Can not update cards in a strategy view"); + } + if (sectionIndex === undefined) { + updated = true; + return { + ...view, + cards, + }; + } + + if (view.sections === undefined) { + throw new Error("Section does not exist"); + } + + const newSections = view.sections.map((section, sIndex) => { + if (sIndex !== sectionIndex) return section; + if (isStrategySection(section)) { + throw new Error("Can not update cards in a strategy section"); + } + updated = true; + return { + ...section, + cards, + }; + }); + return { + ...view, + sections: newSections, + }; + }); + + if (!updated) { + throw new Error("Can not update cards in a non-existing view/section"); + } + return { + ...config, + views: newViews, + }; +}; diff --git a/src/panels/lovelace/editor/types.ts b/src/panels/lovelace/editor/types.ts index 1edab843d127..44c42beac8b9 100644 --- a/src/panels/lovelace/editor/types.ts +++ b/src/panels/lovelace/editor/types.ts @@ -62,6 +62,7 @@ export interface Card { description?: string; showElement?: boolean; isCustom?: boolean; + isSuggested?: boolean; } export interface HeaderFooter { diff --git a/src/panels/lovelace/editor/unused-entities/hui-unused-entities.ts b/src/panels/lovelace/editor/unused-entities/hui-unused-entities.ts index 98cd3f31633d..dadd34449ea2 100644 --- a/src/panels/lovelace/editor/unused-entities/hui-unused-entities.ts +++ b/src/panels/lovelace/editor/unused-entities/hui-unused-entities.ts @@ -21,7 +21,10 @@ import "../card-editor/hui-entity-picker-table"; import { showSuggestCardDialog } from "../card-editor/show-suggest-card-dialog"; import { showSelectViewDialog } from "../select-view/show-select-view-dialog"; import { LovelaceConfig } from "../../../../data/lovelace/config/types"; -import { computeCards } from "../../common/generate-lovelace-config"; +import { + computeCards, + computeSection, +} from "../../common/generate-lovelace-config"; @customElement("hui-unused-entities") export class HuiUnusedEntities extends LitElement { @@ -132,6 +135,8 @@ export class HuiUnusedEntities extends LitElement { this._selectedEntities, {} ); + const sectionConfig = computeSection(this._selectedEntities, {}); + if (this.lovelace.config.views.length === 1) { showSuggestCardDialog(this, { lovelaceConfig: this.lovelace.config!, @@ -139,6 +144,7 @@ export class HuiUnusedEntities extends LitElement { path: [0], entities: this._selectedEntities, cardConfig, + sectionConfig, }); return; } @@ -152,6 +158,7 @@ export class HuiUnusedEntities extends LitElement { path: [viewIndex], entities: this._selectedEntities, cardConfig, + sectionConfig, }); }, }); diff --git a/src/panels/lovelace/editor/view-editor/hui-view-editor.ts b/src/panels/lovelace/editor/view-editor/hui-view-editor.ts index b693848a8d2a..3c4326d394dc 100644 --- a/src/panels/lovelace/editor/view-editor/hui-view-editor.ts +++ b/src/panels/lovelace/editor/view-editor/hui-view-editor.ts @@ -6,13 +6,14 @@ import { slugify } from "../../../../common/string/slugify"; import type { LocalizeFunc } from "../../../../common/translations/localize"; import "../../../../components/ha-form/ha-form"; import type { SchemaUnion } from "../../../../components/ha-form/types"; +import { LovelaceViewConfig } from "../../../../data/lovelace/config/view"; import type { HomeAssistant } from "../../../../types"; import { DEFAULT_VIEW_LAYOUT, + SECTION_VIEW_LAYOUT, PANEL_VIEW_LAYOUT, SIDEBAR_VIEW_LAYOUT, } from "../../views/const"; -import { LovelaceViewConfig } from "../../../../data/lovelace/config/view"; declare global { interface HASSDomEvents { @@ -53,6 +54,7 @@ export class HuiViewEditor extends LitElement { DEFAULT_VIEW_LAYOUT, SIDEBAR_VIEW_LAYOUT, PANEL_VIEW_LAYOUT, + SECTION_VIEW_LAYOUT, ] as const ).map((type) => ({ value: type, diff --git a/src/panels/lovelace/sections/const.ts b/src/panels/lovelace/sections/const.ts new file mode 100644 index 000000000000..8551f0fe92dd --- /dev/null +++ b/src/panels/lovelace/sections/const.ts @@ -0,0 +1,2 @@ +export const GRID_SECTION_LAYOUT = "grid"; +export const DEFAULT_SECTION_LAYOUT = GRID_SECTION_LAYOUT; diff --git a/src/panels/lovelace/sections/hui-error-section.ts b/src/panels/lovelace/sections/hui-error-section.ts new file mode 100644 index 000000000000..801f6f0379c9 --- /dev/null +++ b/src/panels/lovelace/sections/hui-error-section.ts @@ -0,0 +1,60 @@ +import { html, LitElement, nothing } from "lit"; +import { customElement, property, state } from "lit/decorators"; +import "../../../components/ha-label-badge"; +import "../../../components/ha-svg-icon"; +import { LovelaceSectionElement } from "../../../data/lovelace"; +import { LovelaceSectionConfig } from "../../../data/lovelace/config/section"; +import { HomeAssistant } from "../../../types"; + +export interface ErrorSectionConfig extends LovelaceSectionConfig { + error: string; +} + +export const createErrorSectionElement = (config: ErrorSectionConfig) => { + const el = document.createElement( + "hui-error-section" + ) as LovelaceSectionElement; + el.setConfig(config); + return el; +}; + +export const createErrorSectionConfig = ( + error: string +): ErrorSectionConfig => ({ + type: "error", + error, +}); + +@customElement("hui-error-section") +export class HuiErrorSection + extends LitElement + implements LovelaceSectionElement +{ + public hass?: HomeAssistant; + + @property({ type: Boolean }) public isStrategy = false; + + @state() private _config?: ErrorSectionConfig; + + public setConfig(config: ErrorSectionConfig): void { + this._config = config; + } + + protected render() { + if (!this._config) { + return nothing; + } + + // Todo improve + return html` +

    Error

    +

    ${this._config.error}

    + `; + } +} + +declare global { + interface HTMLElementTagNameMap { + "hui-error-section": HuiErrorSection; + } +} diff --git a/src/panels/lovelace/sections/hui-grid-section.ts b/src/panels/lovelace/sections/hui-grid-section.ts new file mode 100644 index 000000000000..1a6ed30ff7d8 --- /dev/null +++ b/src/panels/lovelace/sections/hui-grid-section.ts @@ -0,0 +1,246 @@ +import { mdiPlus } from "@mdi/js"; +import { CSSResultGroup, LitElement, css, html, nothing } from "lit"; +import { property, state } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; +import { repeat } from "lit/directives/repeat"; +import { styleMap } from "lit/directives/style-map"; +import { fireEvent } from "../../../common/dom/fire_event"; +import type { HaSortableOptions } from "../../../components/ha-sortable"; +import { LovelaceSectionElement } from "../../../data/lovelace"; +import { LovelaceCardConfig } from "../../../data/lovelace/config/card"; +import type { LovelaceSectionConfig } from "../../../data/lovelace/config/section"; +import { haStyle } from "../../../resources/styles"; +import type { HomeAssistant } from "../../../types"; +import { HuiErrorCard } from "../cards/hui-error-card"; +import "../components/hui-card-edit-mode"; +import { moveCard } from "../editor/config-util"; +import type { Lovelace, LovelaceCard } from "../types"; + +const CARD_SORTABLE_OPTIONS: HaSortableOptions = { + delay: 200, + delayOnTouchOnly: true, + direction: "vertical", + invertedSwapThreshold: 0.7, +} as HaSortableOptions; + +export class GridSection extends LitElement implements LovelaceSectionElement { + @property({ attribute: false }) public hass!: HomeAssistant; + + @property({ attribute: false }) public lovelace?: Lovelace; + + @property({ type: Number }) public index?: number; + + @property({ type: Number }) public viewIndex?: number; + + @property({ type: Boolean }) public isStrategy = false; + + @property({ attribute: false }) public cards: Array< + LovelaceCard | HuiErrorCard + > = []; + + @state() _config?: LovelaceSectionConfig; + + @state() _dragging = false; + + public setConfig(config: LovelaceSectionConfig): void { + this._config = config; + } + + private _cardConfigKeys = new WeakMap(); + + private _getKey(cardConfig: LovelaceCardConfig) { + if (!this._cardConfigKeys.has(cardConfig)) { + this._cardConfigKeys.set(cardConfig, Math.random().toString()); + } + return this._cardConfigKeys.get(cardConfig)!; + } + + render() { + if (!this.cards || !this._config) return nothing; + + const cardsConfig = this._config?.cards ?? []; + + const editMode = Boolean(this.lovelace?.editMode && !this.isStrategy); + + return html` + ${this._config.title || this.lovelace?.editMode + ? html` +

    + ${this._config.title || + this.hass.localize( + "ui.panel.lovelace.editor.section.unnamed_section" + )} +

    + ` + : nothing} + +
    + ${repeat( + cardsConfig, + (cardConfig) => this._getKey(cardConfig), + (_cardConfig, idx) => { + const card = this.cards![idx]; + (card as any).editMode = editMode; + const size = card && (card as any).getGridSize?.(); + return html` +
    + ${editMode + ? html` + + ${card} + + ` + : card} +
    + `; + } + )} + ${editMode + ? html` + + ` + : nothing} +
    +
    + `; + } + + private _cardMoved(ev) { + ev.stopPropagation(); + const { oldIndex, newIndex, oldPath, newPath } = ev.detail; + const newConfig = moveCard( + this.lovelace!.config, + [...oldPath, oldIndex] as [number, number, number], + [...newPath, newIndex] as [number, number, number] + ); + this.lovelace!.saveConfig(newConfig); + } + + private _dragStart() { + this._dragging = true; + } + + private _dragEnd() { + this._dragging = false; + } + + private _addCard() { + fireEvent(this, "ll-create-card", { suggested: ["tile"] }); + } + + static get styles(): CSSResultGroup { + return [ + haStyle, + css` + :host { + display: flex; + flex-direction: column; + gap: 8px; + } + .container { + --column-count: 4; + display: grid; + grid-template-columns: repeat(var(--column-count), minmax(0, 1fr)); + grid-auto-rows: minmax(66px, auto); + gap: 8px; + padding: 0; + margin: 0 auto; + } + + .container.edit-mode { + padding: 8px; + border-radius: var(--ha-card-border-radius, 12px); + border: 2px dashed var(--divider-color); + min-height: 66px; + } + + .title { + color: var(--primary-text-color); + font-size: 20px; + font-weight: normal; + margin: 0px; + letter-spacing: 0.1px; + line-height: 32px; + min-height: 32px; + display: block; + padding: 24px 10px 10px; + } + + .title.placeholder { + color: var(--secondary-text-color); + font-style: italic; + } + + .card { + border-radius: var(--ha-card-border-radius, 12px); + position: relative; + grid-row: span var(--row-size, 1); + grid-column: span var(--column-size, 4); + } + + .add { + outline: none; + grid-row: span var(--row-size, 1); + grid-column: span var(--column-size, 2); + background: none; + cursor: pointer; + border-radius: var(--ha-card-border-radius, 12px); + border: 2px dashed var(--primary-color); + height: 66px; + order: 1; + } + .add:focus { + border-style: solid; + } + .sortable-ghost { + border-radius: var(--ha-card-border-radius, 12px); + } + `, + ]; + } +} + +declare global { + interface HTMLElementTagNameMap { + "hui-grid-section": GridSection; + } +} + +customElements.define("hui-grid-section", GridSection); diff --git a/src/panels/lovelace/sections/hui-section.ts b/src/panels/lovelace/sections/hui-section.ts new file mode 100644 index 000000000000..b50b1df18abb --- /dev/null +++ b/src/panels/lovelace/sections/hui-section.ts @@ -0,0 +1,247 @@ +import { PropertyValues, ReactiveElement } from "lit"; +import { customElement, property, state } from "lit/decorators"; +import "../../../components/ha-svg-icon"; +import type { LovelaceSectionElement } from "../../../data/lovelace"; +import { LovelaceCardConfig } from "../../../data/lovelace/config/card"; +import { + LovelaceSectionConfig, + LovelaceSectionRawConfig, + isStrategySection, +} from "../../../data/lovelace/config/section"; +import type { HomeAssistant } from "../../../types"; +import type { HuiErrorCard } from "../cards/hui-error-card"; +import { createCardElement } from "../create-element/create-card-element"; +import { + createErrorCardConfig, + createErrorCardElement, +} from "../create-element/create-element-base"; +import { createSectionElement } from "../create-element/create-section-element"; +import { showCreateCardDialog } from "../editor/card-editor/show-create-card-dialog"; +import { showEditCardDialog } from "../editor/card-editor/show-edit-card-dialog"; +import { deleteCard } from "../editor/config-util"; +import { confDeleteCard } from "../editor/delete-card"; +import { parseLovelaceCardPath } from "../editor/lovelace-path"; +import { generateLovelaceSectionStrategy } from "../strategies/get-strategy"; +import type { Lovelace, LovelaceCard } from "../types"; +import { DEFAULT_SECTION_LAYOUT } from "./const"; + +@customElement("hui-section") +export class HuiSection extends ReactiveElement { + @property({ attribute: false }) public hass!: HomeAssistant; + + @property({ attribute: false }) public lovelace!: Lovelace; + + @property({ attribute: false }) public config!: LovelaceSectionRawConfig; + + @property({ type: Number }) public index!: number; + + @property({ type: Number }) public viewIndex!: number; + + @state() private _cards: Array = []; + + private _layoutElementType?: string; + + private _layoutElement?: LovelaceSectionElement; + + // Public to make demo happy + public createCardElement(cardConfig: LovelaceCardConfig) { + const element = createCardElement(cardConfig) as LovelaceCard; + try { + element.hass = this.hass; + } catch (e: any) { + return createErrorCardElement( + createErrorCardConfig(e.message, cardConfig) + ); + } + element.addEventListener( + "ll-rebuild", + (ev: Event) => { + // In edit mode let it go to hui-root and rebuild whole section. + if (!this.lovelace!.editMode) { + ev.stopPropagation(); + this._rebuildCard(element, cardConfig); + } + }, + { once: true } + ); + return element; + } + + protected createRenderRoot() { + return this; + } + + public willUpdate(changedProperties: PropertyValues): void { + super.willUpdate(changedProperties); + + /* + We need to handle the following use cases: + - initialization: create layout element, populate + - config changed to section with same layout element + - config changed to section with different layout element + - forwarded properties hass/narrow/lovelace/cards change + - cards change if one is rebuild when it was loaded later + - lovelace changes if edit mode is enabled or config has changed + */ + + const oldConfig = changedProperties.get("config"); + + // If config has changed, create element if necessary and set all values. + if ( + changedProperties.has("config") && + (!oldConfig || this.config !== oldConfig) + ) { + this._initializeConfig(); + } + } + + protected update(changedProperties) { + super.update(changedProperties); + + // If no layout element, we're still creating one + if (this._layoutElement) { + // Config has not changed. Just props + if (changedProperties.has("hass")) { + this._cards.forEach((element) => { + try { + element.hass = this.hass; + } catch (e: any) { + this._rebuildCard(element, createErrorCardConfig(e.message, null)); + } + }); + + this._layoutElement.hass = this.hass; + } + if (changedProperties.has("lovelace")) { + this._layoutElement.lovelace = this.lovelace; + } + if (changedProperties.has("_cards")) { + this._layoutElement.cards = this._cards; + } + } + } + + private async _initializeConfig() { + let sectionConfig = { ...this.config }; + let isStrategy = false; + + if (isStrategySection(sectionConfig)) { + isStrategy = true; + sectionConfig = await generateLovelaceSectionStrategy( + sectionConfig.strategy, + this.hass! + ); + } + + sectionConfig = { + ...sectionConfig, + type: sectionConfig.type || DEFAULT_SECTION_LAYOUT, + }; + + // Create a new layout element if necessary. + let addLayoutElement = false; + + if ( + !this._layoutElement || + this._layoutElementType !== sectionConfig.type + ) { + addLayoutElement = true; + this._createLayoutElement(sectionConfig); + } + + this._createCards(sectionConfig); + this._layoutElement!.isStrategy = isStrategy; + this._layoutElement!.hass = this.hass; + this._layoutElement!.lovelace = this.lovelace; + this._layoutElement!.index = this.index; + this._layoutElement!.viewIndex = this.viewIndex; + this._layoutElement!.cards = this._cards; + + if (addLayoutElement) { + while (this.lastChild) { + this.removeChild(this.lastChild); + } + this.appendChild(this._layoutElement!); + } + } + + private _createLayoutElement(config: LovelaceSectionConfig): void { + this._layoutElement = createSectionElement( + config + ) as LovelaceSectionElement; + this._layoutElementType = config.type; + this._layoutElement.addEventListener("ll-create-card", (ev) => { + ev.stopPropagation(); + showCreateCardDialog(this, { + lovelaceConfig: this.lovelace.config, + saveConfig: this.lovelace.saveConfig, + path: [this.viewIndex, this.index], + suggestedCards: ev.detail?.suggested, + }); + }); + this._layoutElement.addEventListener("ll-edit-card", (ev) => { + ev.stopPropagation(); + const { cardIndex } = parseLovelaceCardPath(ev.detail.path); + showEditCardDialog(this, { + lovelaceConfig: this.lovelace.config, + saveConfig: this.lovelace.saveConfig, + path: [this.viewIndex, this.index], + cardIndex, + }); + }); + this._layoutElement.addEventListener("ll-delete-card", (ev) => { + ev.stopPropagation(); + if (ev.detail.confirm) { + confDeleteCard(this, this.hass!, this.lovelace!, ev.detail.path); + } else { + const newLovelace = deleteCard(this.lovelace!.config, ev.detail.path); + this.lovelace.saveConfig(newLovelace); + } + }); + } + + private _createCards(config: LovelaceSectionConfig): void { + if (!config || !config.cards || !Array.isArray(config.cards)) { + this._cards = []; + return; + } + + this._cards = config.cards.map((cardConfig) => { + const element = this.createCardElement(cardConfig); + try { + element.hass = this.hass; + } catch (e: any) { + return createErrorCardElement( + createErrorCardConfig(e.message, cardConfig) + ); + } + return element; + }); + } + + private _rebuildCard( + cardElToReplace: LovelaceCard, + config: LovelaceCardConfig + ): void { + let newCardEl = this.createCardElement(config); + try { + newCardEl.hass = this.hass; + } catch (e: any) { + newCardEl = createErrorCardElement( + createErrorCardConfig(e.message, config) + ); + } + if (cardElToReplace.parentElement) { + cardElToReplace.parentElement!.replaceChild(newCardEl, cardElToReplace); + } + this._cards = this._cards!.map((curCardEl) => + curCardEl === cardElToReplace ? newCardEl : curCardEl + ); + } +} + +declare global { + interface HTMLElementTagNameMap { + "hui-section": HuiSection; + } +} diff --git a/src/panels/lovelace/strategies/get-strategy.ts b/src/panels/lovelace/strategies/get-strategy.ts index ee62115275df..927089deddfc 100644 --- a/src/panels/lovelace/strategies/get-strategy.ts +++ b/src/panels/lovelace/strategies/get-strategy.ts @@ -12,6 +12,7 @@ import { AsyncReturnType, HomeAssistant } from "../../../types"; import { cleanLegacyStrategyConfig, isLegacyStrategy } from "./legacy-strategy"; import { LovelaceDashboardStrategy, + LovelaceSectionStrategy, LovelaceStrategy, LovelaceViewStrategy, } from "./types"; @@ -27,13 +28,15 @@ const STRATEGIES: Record> = { "original-states": () => import("./original-states-view-strategy"), energy: () => import("../../energy/strategies/energy-view-strategy"), }, + section: {}, }; -export type LovelaceStrategyConfigType = "dashboard" | "view"; +export type LovelaceStrategyConfigType = "dashboard" | "view" | "section"; type Strategies = { dashboard: LovelaceDashboardStrategy; view: LovelaceViewStrategy; + section: LovelaceSectionStrategy; }; type StrategyConfig = AsyncReturnType< @@ -163,6 +166,24 @@ export const generateLovelaceViewStrategy = async ( hass ); +export const generateLovelaceSectionStrategy = async ( + strategyConfig: LovelaceStrategyConfig, + hass: HomeAssistant +): Promise => + generateStrategy( + "section", + (err) => ({ + cards: [ + { + type: "markdown", + content: `Error loading the section strategy:\n> ${err}`, + }, + ], + }), + strategyConfig, + hass + ); + /** * Find all references to strategies and replaces them with the generated output */ @@ -175,11 +196,24 @@ export const expandLovelaceConfigStrategies = async ( : { ...config }; newConfig.views = await Promise.all( - newConfig.views.map((view) => - isStrategyView(view) - ? generateLovelaceViewStrategy(view.strategy, hass) - : view - ) + newConfig.views.map(async (view) => { + const newView = isStrategyView(view) + ? await generateLovelaceViewStrategy(view.strategy, hass) + : { ...view }; + + if (newView.sections) { + newView.sections = await Promise.all( + newView.sections.map(async (section) => { + const newSection = isStrategyView(section) + ? await generateLovelaceSectionStrategy(section.strategy, hass) + : { ...section }; + return newSection; + }) + ); + } + + return newView; + }) ); return newConfig; diff --git a/src/panels/lovelace/strategies/types.ts b/src/panels/lovelace/strategies/types.ts index da2ab8ee3c00..ae1be1bbca4f 100644 --- a/src/panels/lovelace/strategies/types.ts +++ b/src/panels/lovelace/strategies/types.ts @@ -1,5 +1,6 @@ -import { LovelaceConfig } from "../../../data/lovelace/config/types"; +import { LovelaceSectionConfig } from "../../../data/lovelace/config/section"; import { LovelaceStrategyConfig } from "../../../data/lovelace/config/strategy"; +import { LovelaceConfig } from "../../../data/lovelace/config/types"; import { LovelaceViewConfig } from "../../../data/lovelace/config/view"; import { HomeAssistant } from "../../../types"; import { LovelaceGenericElementEditor } from "../types"; @@ -15,6 +16,9 @@ export interface LovelaceDashboardStrategy export interface LovelaceViewStrategy extends LovelaceStrategy {} +export interface LovelaceSectionStrategy + extends LovelaceStrategy {} + export interface LovelaceStrategyEditor extends LovelaceGenericElementEditor { setConfig(config: LovelaceStrategyConfig): void; } diff --git a/src/panels/lovelace/types.ts b/src/panels/lovelace/types.ts index b1d42984b8b3..31a87961f26d 100644 --- a/src/panels/lovelace/types.ts +++ b/src/panels/lovelace/types.ts @@ -44,6 +44,7 @@ export interface LovelaceCard extends HTMLElement { isPanel?: boolean; editMode?: boolean; getCardSize(): number | Promise; + getGridSize?(): [number, number]; setConfig(config: LovelaceCardConfig): void; } diff --git a/src/panels/lovelace/views/const.ts b/src/panels/lovelace/views/const.ts index 5cc4709bbb35..5633f05bbce4 100644 --- a/src/panels/lovelace/views/const.ts +++ b/src/panels/lovelace/views/const.ts @@ -1,4 +1,9 @@ export const DEFAULT_VIEW_LAYOUT = "masonry"; export const PANEL_VIEW_LAYOUT = "panel"; export const SIDEBAR_VIEW_LAYOUT = "sidebar"; -export const VIEWS_NO_BADGE_SUPPORT = [PANEL_VIEW_LAYOUT, SIDEBAR_VIEW_LAYOUT]; +export const SECTION_VIEW_LAYOUT = "sections"; +export const VIEWS_NO_BADGE_SUPPORT = [ + PANEL_VIEW_LAYOUT, + SIDEBAR_VIEW_LAYOUT, + SECTION_VIEW_LAYOUT, +]; diff --git a/src/panels/lovelace/views/hui-sections-view.ts b/src/panels/lovelace/views/hui-sections-view.ts new file mode 100644 index 000000000000..6e80a6266f60 --- /dev/null +++ b/src/panels/lovelace/views/hui-sections-view.ts @@ -0,0 +1,322 @@ +import { mdiArrowAll, mdiDelete, mdiPencil, mdiViewGridPlus } from "@mdi/js"; +import { CSSResultGroup, LitElement, css, html, nothing } from "lit"; +import { customElement, property, state } from "lit/decorators"; +import { repeat } from "lit/directives/repeat"; +import "../../../components/ha-icon-button"; +import "../../../components/ha-sortable"; +import "../../../components/ha-svg-icon"; +import type { LovelaceViewElement } from "../../../data/lovelace"; +import { LovelaceSectionConfig as LovelaceRawSectionConfig } from "../../../data/lovelace/config/section"; +import type { LovelaceViewConfig } from "../../../data/lovelace/config/view"; +import { + showConfirmationDialog, + showPromptDialog, +} from "../../../dialogs/generic/show-dialog-box"; +import type { HomeAssistant } from "../../../types"; +import { addSection, deleteSection, moveSection } from "../editor/config-util"; +import { + findLovelaceContainer, + updateLovelaceContainer, +} from "../editor/lovelace-path"; +import { HuiSection } from "../sections/hui-section"; +import type { Lovelace } from "../types"; + +@customElement("hui-sections-view") +export class SectionsView extends LitElement implements LovelaceViewElement { + @property({ attribute: false }) public hass!: HomeAssistant; + + @property({ attribute: false }) public lovelace?: Lovelace; + + @property({ type: Number }) public index?: number; + + @property({ type: Boolean }) public isStrategy = false; + + @property({ attribute: false }) public sections: HuiSection[] = []; + + @state() private _config?: LovelaceViewConfig; + + public setConfig(config: LovelaceViewConfig): void { + this._config = config; + } + + private _sectionConfigKeys = new WeakMap(); + + private _getKey(sectionConfig: LovelaceRawSectionConfig) { + if (!this._sectionConfigKeys.has(sectionConfig)) { + this._sectionConfigKeys.set(sectionConfig, Math.random().toString()); + } + return this._sectionConfigKeys.get(sectionConfig)!; + } + + protected render() { + if (!this.lovelace) return nothing; + + const sectionsConfig = this._config?.sections ?? []; + + const editMode = this.lovelace.editMode; + + return html` + +
    + ${repeat( + sectionsConfig, + (sectionConfig) => this._getKey(sectionConfig), + (_sectionConfig, idx) => { + const section = this.sections[idx]; + (section as any).itemPath = [idx]; + return html` +
    + ${editMode + ? html` +
    +
    + + + +
    +
    + ` + : nothing} +
    ${section}
    +
    + `; + } + )} + ${editMode + ? html` + + ` + : nothing} +
    +
    + `; + } + + private _addSection(): void { + const newConfig = addSection(this.lovelace!.config, this.index!, { + type: "grid", + cards: [], + }); + this.lovelace!.saveConfig(newConfig); + } + + private async _editSection(ev) { + const index = ev.currentTarget.index; + + const path = [this.index!, index] as [number, number]; + + const section = findLovelaceContainer( + this.lovelace!.config, + path + ) as LovelaceRawSectionConfig; + + const newTitle = !section.title; + + const title = await showPromptDialog(this, { + title: this.hass.localize( + `ui.panel.lovelace.editor.edit_section_title.${newTitle ? "title_new" : "title"}` + ), + inputLabel: this.hass.localize( + "ui.panel.lovelace.editor.edit_section_title.input_label" + ), + inputType: "string", + defaultValue: section.title, + confirmText: newTitle + ? this.hass.localize("ui.common.add") + : this.hass.localize("ui.common.save"), + }); + + if (title === null) { + return; + } + + const newConfig = updateLovelaceContainer(this.lovelace!.config, path, { + ...section, + title: title || undefined, + }); + + this.lovelace!.saveConfig(newConfig); + } + + private async _deleteSection(ev) { + const index = ev.currentTarget.index; + + const path = [this.index!, index] as [number, number]; + + const section = findLovelaceContainer( + this.lovelace!.config, + path + ) as LovelaceRawSectionConfig; + + const title = section.title; + const cardCount = section.cards?.length; + + if (title || cardCount) { + const sectionName = title?.trim() + ? this.hass.localize( + "ui.panel.lovelace.editor.delete_section.named_section", + { name: title } + ) + : this.hass.localize( + "ui.panel.lovelace.editor.delete_section.unnamed_section" + ); + + const content = cardCount + ? this.hass.localize( + "ui.panel.lovelace.editor.delete_section.text_section_and_cards", + { + section: sectionName, + } + ) + : this.hass.localize( + "ui.panel.lovelace.editor.delete_section.text_section_only", + { + section: sectionName, + } + ); + + const confirm = await showConfirmationDialog(this, { + title: this.hass.localize( + "ui.panel.lovelace.editor.delete_section.title" + ), + text: content, + confirmText: this.hass.localize("ui.common.delete"), + destructive: true, + }); + + if (!confirm) return; + } + + const newConfig = deleteSection(this.lovelace!.config, this.index!, index); + this.lovelace!.saveConfig(newConfig); + } + + private _sectionMoved(ev: CustomEvent) { + ev.stopPropagation(); + const { oldIndex, newIndex } = ev.detail; + + const newConfig = moveSection( + this.lovelace!.config, + [this.index!, oldIndex], + [this.index!, newIndex] + ); + this.lovelace!.saveConfig(newConfig); + } + + static get styles(): CSSResultGroup { + return css` + :host { + display: block; + } + + .section { + position: relative; + border-radius: var(--ha-card-border-radius, 12px); + } + + .container { + --column-count: 3; + display: grid; + grid-template-columns: repeat(var(--column-count), minmax(0, 1fr)); + gap: 8px 20px; + max-width: 1400px; + padding: 20px; + margin: 0 auto; + } + + @media (max-width: 1200px) { + .container { + --column-count: 2; + } + } + + @media (max-width: 600px) { + .container { + --column-count: 1; + padding: 8px; + } + } + + .section-actions { + position: absolute; + top: 0; + right: 0; + opacity: 1; + display: flex; + align-items: center; + justify-content: center; + transition: opacity 0.2s ease-in-out; + background-color: rgba(var(--rgb-card-background-color), 0.3); + border-radius: 18px; + background: var(--secondary-background-color); + --mdc-icon-button-size: 36px; + --mdc-icon-size: 20px; + color: var(--primary-text-color); + } + + .handle { + cursor: grab; + padding: 8px; + } + + .add { + margin-top: calc(66px + 8px); + outline: none; + background: none; + cursor: pointer; + border-radius: var(--ha-card-border-radius, 12px); + border: 2px dashed var(--primary-color); + order: 1; + height: 66px; + padding: 8px; + box-sizing: content-box; + } + + .add:focus { + border: 2px solid var(--primary-color); + } + + .sortable-ghost { + border-radius: var(--ha-card-border-radius, 12px); + } + `; + } +} + +declare global { + interface HTMLElementTagNameMap { + "hui-sections-view": SectionsView; + } +} diff --git a/src/panels/lovelace/views/hui-view.ts b/src/panels/lovelace/views/hui-view.ts index 4338bc9eff52..6d35d6a715d6 100644 --- a/src/panels/lovelace/views/hui-view.ts +++ b/src/panels/lovelace/views/hui-view.ts @@ -1,9 +1,17 @@ import { PropertyValues, ReactiveElement } from "lit"; import { customElement, property, state } from "lit/decorators"; import { applyThemesOnElement } from "../../../common/dom/apply_themes_on_element"; +import { HASSDomEvent } from "../../../common/dom/fire_event"; import "../../../components/entity/ha-state-label-badge"; import "../../../components/ha-svg-icon"; import type { LovelaceViewElement } from "../../../data/lovelace"; +import { LovelaceBadgeConfig } from "../../../data/lovelace/config/badge"; +import { LovelaceCardConfig } from "../../../data/lovelace/config/card"; +import { LovelaceSectionConfig } from "../../../data/lovelace/config/section"; +import { + LovelaceViewConfig, + isStrategyView, +} from "../../../data/lovelace/config/view"; import type { HomeAssistant } from "../../../types"; import { createErrorBadgeConfig, @@ -20,25 +28,25 @@ import { import { createViewElement } from "../create-element/create-view-element"; import { showCreateCardDialog } from "../editor/card-editor/show-create-card-dialog"; import { showEditCardDialog } from "../editor/card-editor/show-edit-card-dialog"; -import { confDeleteCard } from "../editor/delete-card"; import { deleteCard } from "../editor/config-util"; +import { confDeleteCard } from "../editor/delete-card"; +import { + LovelaceCardPath, + parseLovelaceCardPath, +} from "../editor/lovelace-path"; +import { createErrorSectionConfig } from "../sections/hui-error-section"; +import "../sections/hui-section"; +import type { HuiSection } from "../sections/hui-section"; import { generateLovelaceViewStrategy } from "../strategies/get-strategy"; import type { Lovelace, LovelaceBadge, LovelaceCard } from "../types"; -import { PANEL_VIEW_LAYOUT, DEFAULT_VIEW_LAYOUT } from "./const"; -import { LovelaceCardConfig } from "../../../data/lovelace/config/card"; -import { LovelaceBadgeConfig } from "../../../data/lovelace/config/badge"; -import { - LovelaceViewConfig, - isStrategyView, -} from "../../../data/lovelace/config/view"; -import { HASSDomEvent } from "../../../common/dom/fire_event"; +import { DEFAULT_VIEW_LAYOUT, PANEL_VIEW_LAYOUT } from "./const"; declare global { // for fire event interface HASSDomEvents { - "ll-create-card": undefined; - "ll-edit-card": { path: [number, number] }; - "ll-delete-card": { path: [number, number]; confirm: boolean }; + "ll-create-card": { suggested?: string[] } | undefined; + "ll-edit-card": { path: LovelaceCardPath }; + "ll-delete-card": { path: LovelaceCardPath; confirm: boolean }; } interface HTMLElementEventMap { "ll-create-card": HASSDomEvent; @@ -61,6 +69,8 @@ export class HUIView extends ReactiveElement { @state() private _badges: LovelaceBadge[] = []; + @state() private _sections: HuiSection[] = []; + private _layoutElementType?: string; private _layoutElement?: LovelaceViewElement; @@ -108,6 +118,27 @@ export class HUIView extends ReactiveElement { return element; } + // Public to make demo happy + public createSectionElement(sectionConfig: LovelaceSectionConfig) { + const element = document.createElement("hui-section"); + element.hass = this.hass; + element.lovelace = this.lovelace; + element.config = sectionConfig; + element.viewIndex = this.index; + element.addEventListener( + "ll-rebuild", + (ev: Event) => { + // In edit mode let it go to hui-root and rebuild whole view. + if (!this.lovelace!.editMode) { + ev.stopPropagation(); + this._rebuildSection(element, sectionConfig); + } + }, + { once: true } + ); + return element; + } + protected createRenderRoot() { return this; } @@ -139,7 +170,7 @@ export class HUIView extends ReactiveElement { } } - protected update(changedProperties) { + protected update(changedProperties: PropertyValues) { super.update(changedProperties); // If no layout element, we're still creating one @@ -162,6 +193,14 @@ export class HUIView extends ReactiveElement { } }); + this._sections.forEach((element) => { + try { + element.hass = this.hass; + } catch (e: any) { + this._rebuildSection(element, createErrorSectionConfig(e.message)); + } + }); + this._layoutElement.hass = this.hass; const oldHass = changedProperties.get("hass") as @@ -181,6 +220,14 @@ export class HUIView extends ReactiveElement { } if (changedProperties.has("lovelace")) { this._layoutElement.lovelace = this.lovelace; + this._sections.forEach((element) => { + try { + element.hass = this.hass; + element.lovelace = this.lovelace; + } catch (e: any) { + this._rebuildSection(element, createErrorSectionConfig(e.message)); + } + }); } if (changedProperties.has("_cards")) { this._layoutElement.cards = this._cards; @@ -220,6 +267,7 @@ export class HUIView extends ReactiveElement { this._createBadges(viewConfig); this._createCards(viewConfig); + this._createSections(viewConfig); this._layoutElement!.isStrategy = isStrategy; this._layoutElement!.hass = this.hass; this._layoutElement!.narrow = this.narrow; @@ -227,6 +275,7 @@ export class HUIView extends ReactiveElement { this._layoutElement!.index = this.index; this._layoutElement!.cards = this._cards; this._layoutElement!.badges = this._badges; + this._layoutElement!.sections = this._sections; applyThemesOnElement(this, this.hass.themes, viewConfig.theme); this._viewConfigTheme = viewConfig.theme; @@ -242,18 +291,21 @@ export class HUIView extends ReactiveElement { private _createLayoutElement(config: LovelaceViewConfig): void { this._layoutElement = createViewElement(config) as LovelaceViewElement; this._layoutElementType = config.type; - this._layoutElement.addEventListener("ll-create-card", () => { + this._layoutElement.addEventListener("ll-create-card", (ev) => { showCreateCardDialog(this, { lovelaceConfig: this.lovelace.config, saveConfig: this.lovelace.saveConfig, path: [this.index], + suggestedCards: ev.detail?.suggested, }); }); this._layoutElement.addEventListener("ll-edit-card", (ev) => { + const { cardIndex } = parseLovelaceCardPath(ev.detail.path); showEditCardDialog(this, { lovelaceConfig: this.lovelace.config, saveConfig: this.lovelace.saveConfig, - path: ev.detail.path, + path: [this.index], + cardIndex, }); }); this._layoutElement.addEventListener("ll-delete-card", (ev) => { @@ -303,6 +355,19 @@ export class HUIView extends ReactiveElement { }); } + private _createSections(config: LovelaceViewConfig): void { + if (!config || !config.sections || !Array.isArray(config.sections)) { + this._sections = []; + return; + } + + this._sections = config.sections.map((sectionConfig, index) => { + const element = this.createSectionElement(sectionConfig); + element.index = index; + return element; + }); + } + private _rebuildCard( cardElToReplace: LovelaceCard, config: LovelaceCardConfig @@ -343,6 +408,23 @@ export class HUIView extends ReactiveElement { curBadgeEl === badgeElToReplace ? newBadgeEl : curBadgeEl ); } + + private _rebuildSection( + sectionElToReplace: HuiSection, + config: LovelaceSectionConfig + ): void { + const newSectionEl = this.createSectionElement(config); + newSectionEl.index = sectionElToReplace.index; + if (sectionElToReplace.parentElement) { + sectionElToReplace.parentElement!.replaceChild( + newSectionEl, + sectionElToReplace + ); + } + this._sections = this._sections!.map((curSectionEl) => + curSectionEl === sectionElToReplace ? newSectionEl : curSectionEl + ); + } } declare global { diff --git a/src/translations/en.json b/src/translations/en.json index 1195ceb346c7..972c6753f50b 100644 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -5096,7 +5096,8 @@ "types": { "masonry": "Masonry (default)", "sidebar": "Sidebar", - "panel": "Panel (1 card)" + "panel": "Panel (1 card)", + "sections": "Sections (experimental)" }, "subview": "Subview", "subview_helper": "Subviews don't appear in tabs and have a back button.", @@ -5112,7 +5113,7 @@ "header": "Card configuration", "typed_header": "{type} Card configuration", "pick_card": "Which card would you like to add?", - "pick_card_view_title": "Which card would you like to add to your {name} view?", + "pick_card_title": "Which card would you like to add to {name}", "toggle_editor": "Toggle editor", "unsaved_changes": "You have unsaved changes", "confirm_cancel": "Are you sure you want to cancel?", @@ -5150,6 +5151,23 @@ "no_config": "No config found.", "no_views": "No views in this dashboard." }, + "section": { + "unnamed_section": "Unnamed section", + "add_card": "[%key:ui::panel::lovelace::editor::edit_card::add%]", + "add_section": "Add section" + }, + "delete_section": { + "title": "Delete section", + "named_section": "\"{name}\" section", + "unnamed_section": "This section", + "text_section_only": "{section} will be deleted.", + "text_section_and_cards": "{section} and all its cards will be deleted." + }, + "edit_section_title": { + "title": "Edit name", + "title_new": "Add name", + "input_label": "Name" + }, "suggest_card": { "header": "We created a suggestion for you", "create_own": "Pick different card", @@ -5455,7 +5473,10 @@ "state": "State", "secondary_info_attribute": "Secondary info attribute", "search": "Search", - "state_color": "Color icons based on state?" + "state_color": "Color icons based on state?", + "suggested_cards": "Suggested cards", + "other_cards": "Other cards", + "custom_cards": "Custom cards" }, "map": { "name": "Map", diff --git a/test/panels/lovelace/editor/config-util.spec.ts b/test/panels/lovelace/editor/config-util.spec.ts index a437b28cfab1..b62563673649 100644 --- a/test/panels/lovelace/editor/config-util.spec.ts +++ b/test/panels/lovelace/editor/config-util.spec.ts @@ -1,63 +1,12 @@ import { assert } from "chai"; +import { LovelaceConfig } from "../../../../src/data/lovelace/config/types"; import { - swapCard, - moveCard, + moveCardToContainer, swapView, } from "../../../../src/panels/lovelace/editor/config-util"; -import { LovelaceConfig } from "../../../../src/data/lovelace/config/types"; - -describe("swapCard", () => { - it("swaps 2 cards in same view", () => { - const config: LovelaceConfig = { - views: [ - {}, - { - cards: [{ type: "card1" }, { type: "card2" }], - }, - ], - }; - - const result = swapCard(config, [1, 0], [1, 1]); - const expected = { - views: [ - {}, - { - cards: [{ type: "card2" }, { type: "card1" }], - }, - ], - }; - assert.deepEqual(expected, result); - }); - - it("swaps 2 cards in different views", () => { - const config: LovelaceConfig = { - views: [ - { - cards: [{ type: "v1-c1" }, { type: "v1-c2" }], - }, - { - cards: [{ type: "v2-c1" }, { type: "v2-c2" }], - }, - ], - }; - - const result = swapCard(config, [0, 0], [1, 1]); - const expected: LovelaceConfig = { - views: [ - { - cards: [{ type: "v2-c2" }, { type: "v1-c2" }], - }, - { - cards: [{ type: "v2-c1" }, { type: "v1-c1" }], - }, - ], - }; - assert.deepEqual(expected, result); - }); -}); -describe("moveCard", () => { +describe("moveCardToContainer", () => { it("move a card to an empty view", () => { const config: LovelaceConfig = { views: [ @@ -68,7 +17,7 @@ describe("moveCard", () => { ], }; - const result = moveCard(config, [1, 0], [0]); + const result = moveCardToContainer(config, [1, 0], [0]); const expected: LovelaceConfig = { views: [ { @@ -94,7 +43,7 @@ describe("moveCard", () => { ], }; - const result = moveCard(config, [1, 0], [0]); + const result = moveCardToContainer(config, [1, 0], [0]); const expected: LovelaceConfig = { views: [ { @@ -121,12 +70,12 @@ describe("moveCard", () => { }; const result = () => { - moveCard(config, [1, 0], [1]); + moveCardToContainer(config, [1, 0], [1]); }; assert.throws( result, Error, - "You cannot move a card to the view it is in." + "You cannot move a card to the view or section it is in." ); }); }); From 3e51f9a505a8ec352fbc3982043eed129d17e4a9 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 22 Feb 2024 15:14:06 -0500 Subject: [PATCH 031/425] Update typescript-eslint monorepo to v7.0.2 (#19862) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package.json | 4 +- yarn.lock | 104 +++++++++++++++++++++++++-------------------------- 2 files changed, 54 insertions(+), 54 deletions(-) diff --git a/package.json b/package.json index ccb14c19d0b6..d2b7c161ec9f 100644 --- a/package.json +++ b/package.json @@ -183,8 +183,8 @@ "@types/tar": "6.1.11", "@types/ua-parser-js": "0.7.39", "@types/webspeechapi": "0.0.29", - "@typescript-eslint/eslint-plugin": "7.0.1", - "@typescript-eslint/parser": "7.0.1", + "@typescript-eslint/eslint-plugin": "7.0.2", + "@typescript-eslint/parser": "7.0.2", "@web/dev-server": "0.1.38", "@web/dev-server-rollup": "0.4.1", "babel-loader": "9.1.3", diff --git a/yarn.lock b/yarn.lock index a2e1e658acdc..b31a7efbdb90 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4524,15 +4524,15 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/eslint-plugin@npm:7.0.1": - version: 7.0.1 - resolution: "@typescript-eslint/eslint-plugin@npm:7.0.1" +"@typescript-eslint/eslint-plugin@npm:7.0.2": + version: 7.0.2 + resolution: "@typescript-eslint/eslint-plugin@npm:7.0.2" dependencies: "@eslint-community/regexpp": "npm:^4.5.1" - "@typescript-eslint/scope-manager": "npm:7.0.1" - "@typescript-eslint/type-utils": "npm:7.0.1" - "@typescript-eslint/utils": "npm:7.0.1" - "@typescript-eslint/visitor-keys": "npm:7.0.1" + "@typescript-eslint/scope-manager": "npm:7.0.2" + "@typescript-eslint/type-utils": "npm:7.0.2" + "@typescript-eslint/utils": "npm:7.0.2" + "@typescript-eslint/visitor-keys": "npm:7.0.2" debug: "npm:^4.3.4" graphemer: "npm:^1.4.0" ignore: "npm:^5.2.4" @@ -4545,44 +4545,44 @@ __metadata: peerDependenciesMeta: typescript: optional: true - checksum: 10/0862e8ec8677fcea794394fc9eab8dba11043c08452722790e0d296d4ee84713180676e1e3135be4203ace7bb73933c94159255cb9190c7bc13bf7f03a361915 + checksum: 10/430b2f7ca36ee73dc75c1d677088709f3c9d5bbb4fffa3cfbe1b7d63979ee397f7a4a2a1386e05a04991500fa0ab0dd5272e8603a2b20f42e4bf590603500858 languageName: node linkType: hard -"@typescript-eslint/parser@npm:7.0.1": - version: 7.0.1 - resolution: "@typescript-eslint/parser@npm:7.0.1" +"@typescript-eslint/parser@npm:7.0.2": + version: 7.0.2 + resolution: "@typescript-eslint/parser@npm:7.0.2" dependencies: - "@typescript-eslint/scope-manager": "npm:7.0.1" - "@typescript-eslint/types": "npm:7.0.1" - "@typescript-eslint/typescript-estree": "npm:7.0.1" - "@typescript-eslint/visitor-keys": "npm:7.0.1" + "@typescript-eslint/scope-manager": "npm:7.0.2" + "@typescript-eslint/types": "npm:7.0.2" + "@typescript-eslint/typescript-estree": "npm:7.0.2" + "@typescript-eslint/visitor-keys": "npm:7.0.2" debug: "npm:^4.3.4" peerDependencies: eslint: ^8.56.0 peerDependenciesMeta: typescript: optional: true - checksum: 10/b4ba1743ab730268a1924139f072e4a0a56959526fb6377e1b3964518b6c6851733ae446a44d29fed1cb96669e2913cca524895ce77a6205aaed8bda00e8cd5d + checksum: 10/18d6e1bda64013f7d66164164c57a10390f7979db55b265062ae9337e11e0921bffca10870e252cd0bd198f79ffa2e87a652e57110e5b1b4cc738453154c205c languageName: node linkType: hard -"@typescript-eslint/scope-manager@npm:7.0.1": - version: 7.0.1 - resolution: "@typescript-eslint/scope-manager@npm:7.0.1" +"@typescript-eslint/scope-manager@npm:7.0.2": + version: 7.0.2 + resolution: "@typescript-eslint/scope-manager@npm:7.0.2" dependencies: - "@typescript-eslint/types": "npm:7.0.1" - "@typescript-eslint/visitor-keys": "npm:7.0.1" - checksum: 10/dade6055bb853adb54de795cc3da5ab8550236d4186f108573fdb02e636ab7fc4300a55b506698ced4087ca43b143a5593931cb3195ab4790470b456d9ff8846 + "@typescript-eslint/types": "npm:7.0.2" + "@typescript-eslint/visitor-keys": "npm:7.0.2" + checksum: 10/773ea6e61f741777e69a469641f3db0d3c2301c0102667825fb235ed5a65c95f6d6b31b19e734b9a215acc0c7c576c65497635b8d5928eeddb58653ceb13d2d5 languageName: node linkType: hard -"@typescript-eslint/type-utils@npm:7.0.1": - version: 7.0.1 - resolution: "@typescript-eslint/type-utils@npm:7.0.1" +"@typescript-eslint/type-utils@npm:7.0.2": + version: 7.0.2 + resolution: "@typescript-eslint/type-utils@npm:7.0.2" dependencies: - "@typescript-eslint/typescript-estree": "npm:7.0.1" - "@typescript-eslint/utils": "npm:7.0.1" + "@typescript-eslint/typescript-estree": "npm:7.0.2" + "@typescript-eslint/utils": "npm:7.0.2" debug: "npm:^4.3.4" ts-api-utils: "npm:^1.0.1" peerDependencies: @@ -4590,23 +4590,23 @@ __metadata: peerDependenciesMeta: typescript: optional: true - checksum: 10/cf20a3c0e56121ac62467e48121e135798db6d2999bd4f96ed44edc39f2597812d12b1bd6a378adec54d6c5e7db75fa5f98a27ce399792a2c8a5bbd3649952f7 + checksum: 10/63bf19c9f5bbcb0f3e127f509d85dc49be4e5e51781d78f58c96786089e7c909b25d35d0248a6a758e2f7d5b5223d2262c2d597ab71f226af6beb499ae950645 languageName: node linkType: hard -"@typescript-eslint/types@npm:7.0.1": - version: 7.0.1 - resolution: "@typescript-eslint/types@npm:7.0.1" - checksum: 10/c08b2d34bab2a877a45a1e4c2923f50d03022b682b7aaba929ae2a9a5ad32db0e46265544a6616ccb98654b434250621be0e282fc5b21b8ccaf6b78741d68f67 +"@typescript-eslint/types@npm:7.0.2": + version: 7.0.2 + resolution: "@typescript-eslint/types@npm:7.0.2" + checksum: 10/2cba8a0355cc7357db142fa597d02cf39e1d1cb0ec87c80e91daaa2b87f2a794d2649def9d7b2aa435691c3810d2cbd4cdc21668b19b991863f0d54d4a22da82 languageName: node linkType: hard -"@typescript-eslint/typescript-estree@npm:7.0.1": - version: 7.0.1 - resolution: "@typescript-eslint/typescript-estree@npm:7.0.1" +"@typescript-eslint/typescript-estree@npm:7.0.2": + version: 7.0.2 + resolution: "@typescript-eslint/typescript-estree@npm:7.0.2" dependencies: - "@typescript-eslint/types": "npm:7.0.1" - "@typescript-eslint/visitor-keys": "npm:7.0.1" + "@typescript-eslint/types": "npm:7.0.2" + "@typescript-eslint/visitor-keys": "npm:7.0.2" debug: "npm:^4.3.4" globby: "npm:^11.1.0" is-glob: "npm:^4.0.3" @@ -4616,34 +4616,34 @@ __metadata: peerDependenciesMeta: typescript: optional: true - checksum: 10/b0b0adc84502d1ffcf3a0024179e0f2780be5f8b0a18328db46d430efc4e38a7965656b4392dd47d6176bbb1ee200aec6dd8581c39b606e260750574358cde9f + checksum: 10/307080e29c22fc69f0ce7ab7101e1629e05f45a9e541c250e03d06b61336ab0ccb5f0a7354ee3da4e38d5cade4dd2fb7bb396cd7cbe74c2c4b3e29706a70abcc languageName: node linkType: hard -"@typescript-eslint/utils@npm:7.0.1": - version: 7.0.1 - resolution: "@typescript-eslint/utils@npm:7.0.1" +"@typescript-eslint/utils@npm:7.0.2": + version: 7.0.2 + resolution: "@typescript-eslint/utils@npm:7.0.2" dependencies: "@eslint-community/eslint-utils": "npm:^4.4.0" "@types/json-schema": "npm:^7.0.12" "@types/semver": "npm:^7.5.0" - "@typescript-eslint/scope-manager": "npm:7.0.1" - "@typescript-eslint/types": "npm:7.0.1" - "@typescript-eslint/typescript-estree": "npm:7.0.1" + "@typescript-eslint/scope-manager": "npm:7.0.2" + "@typescript-eslint/types": "npm:7.0.2" + "@typescript-eslint/typescript-estree": "npm:7.0.2" semver: "npm:^7.5.4" peerDependencies: eslint: ^8.56.0 - checksum: 10/b7e0cb2994f73b3f416684dc175d4e1da5f8306d6c81abbad2f219fa3e4f29154063a3c9568e4a1f879a38b79c62250e596e4ed7265f7bd1ed9b3db806cb92b7 + checksum: 10/e68bac777419cd529371f7f29f534efaeca130c90ed9723bfc7aac451d61ca3fc4ebd310e2c015e29e8dc7be4734ae46258ca8755897d7f5e3bb502660d5372f languageName: node linkType: hard -"@typescript-eslint/visitor-keys@npm:7.0.1": - version: 7.0.1 - resolution: "@typescript-eslint/visitor-keys@npm:7.0.1" +"@typescript-eslint/visitor-keys@npm:7.0.2": + version: 7.0.2 + resolution: "@typescript-eslint/visitor-keys@npm:7.0.2" dependencies: - "@typescript-eslint/types": "npm:7.0.1" + "@typescript-eslint/types": "npm:7.0.2" eslint-visitor-keys: "npm:^3.4.1" - checksum: 10/915c5b19302a4c76e843cd2d04a9a2b11907e658d7018c8b55c338b090d9115d3719809aa05b8af130cc1b216c77626d210c20f705b732e83d04ceae0c112f6b + checksum: 10/da6c1b0729af99216cde3a65d4e91584a81fc6c9dff7ba291089f01bf7262de375f58c4c4246e5fbc29f51258db7725d9c830f82ccbd1cda812fd13c51480cda languageName: node linkType: hard @@ -9603,8 +9603,8 @@ __metadata: "@types/tar": "npm:6.1.11" "@types/ua-parser-js": "npm:0.7.39" "@types/webspeechapi": "npm:0.0.29" - "@typescript-eslint/eslint-plugin": "npm:7.0.1" - "@typescript-eslint/parser": "npm:7.0.1" + "@typescript-eslint/eslint-plugin": "npm:7.0.2" + "@typescript-eslint/parser": "npm:7.0.2" "@vaadin/combo-box": "npm:24.3.6" "@vaadin/vaadin-themable-mixin": "npm:24.3.6" "@vibrant/color": "npm:3.2.1-alpha.1" From 93046d78f6c86efa298da5a07987b26b62430d5c Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 22 Feb 2024 15:15:30 -0500 Subject: [PATCH 032/425] Update dependency webpackbar to v6.0.1 (#19859) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index d2b7c161ec9f..6d76a4e9c6ab 100644 --- a/package.json +++ b/package.json @@ -245,7 +245,7 @@ "webpack-dev-server": "4.15.1", "webpack-manifest-plugin": "5.0.0", "webpack-stats-plugin": "1.1.3", - "webpackbar": "6.0.0", + "webpackbar": "6.0.1", "workbox-build": "7.0.0" }, "_comment": "Polymer 3.2 contained a bug, fixed in https://github.com/Polymer/polymer/pull/5569, add as patch", diff --git a/yarn.lock b/yarn.lock index b31a7efbdb90..943145f70883 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9715,7 +9715,7 @@ __metadata: webpack-dev-server: "npm:4.15.1" webpack-manifest-plugin: "npm:5.0.0" webpack-stats-plugin: "npm:1.1.3" - webpackbar: "npm:6.0.0" + webpackbar: "npm:6.0.1" weekstart: "npm:2.0.0" workbox-build: "npm:7.0.0" workbox-cacheable-response: "npm:7.0.0" @@ -14628,7 +14628,7 @@ __metadata: languageName: node linkType: hard -"std-env@npm:^3.6.0": +"std-env@npm:^3.7.0": version: 3.7.0 resolution: "std-env@npm:3.7.0" checksum: 10/6ee0cca1add3fd84656b0002cfbc5bfa20340389d9ba4720569840f1caa34bce74322aef4c93f046391583e50649d0cf81a5f8fe1d411e50b659571690a45f12 @@ -16277,9 +16277,9 @@ __metadata: languageName: node linkType: hard -"webpackbar@npm:6.0.0": - version: 6.0.0 - resolution: "webpackbar@npm:6.0.0" +"webpackbar@npm:6.0.1": + version: 6.0.1 + resolution: "webpackbar@npm:6.0.1" dependencies: ansi-escapes: "npm:^4.3.2" chalk: "npm:^4.1.2" @@ -16287,11 +16287,11 @@ __metadata: figures: "npm:^3.2.0" markdown-table: "npm:^2.0.0" pretty-time: "npm:^1.1.0" - std-env: "npm:^3.6.0" + std-env: "npm:^3.7.0" wrap-ansi: "npm:^7.0.0" peerDependencies: webpack: 3 || 4 || 5 - checksum: 10/aa26c2dff6c2384f39b77e57375af52a65fbd3c54b9a5a8e1c53e79b0c25eaabc8602469ec3742bf93f7d178f5a96e3d6bd4fcbb256808e730eecb91091df466 + checksum: 10/9da47f8dcbc9173b19e41e3e1049fa451b0c02095ffa003e8c09c56aa2cc544334d1c6fff0797162a807b29090db9cf9a269cd5ec453196142543f9275cbbf70 languageName: node linkType: hard From 1869260868728a04236d2f79dd96d23c3ccf80c7 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 22 Feb 2024 15:17:02 -0500 Subject: [PATCH 033/425] Update CodeMirror (#19857) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package.json | 4 ++-- yarn.lock | 20 ++++++++++---------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/package.json b/package.json index 6d76a4e9c6ab..98f0b21bcfa8 100644 --- a/package.json +++ b/package.json @@ -32,8 +32,8 @@ "@codemirror/language": "6.10.1", "@codemirror/legacy-modes": "6.3.3", "@codemirror/search": "6.5.6", - "@codemirror/state": "6.4.0", - "@codemirror/view": "6.24.0", + "@codemirror/state": "6.4.1", + "@codemirror/view": "6.24.1", "@egjs/hammerjs": "2.0.17", "@formatjs/intl-datetimeformat": "6.12.2", "@formatjs/intl-displaynames": "6.6.6", diff --git a/yarn.lock b/yarn.lock index 943145f70883..2d5f02488748 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1519,21 +1519,21 @@ __metadata: languageName: node linkType: hard -"@codemirror/state@npm:6.4.0, @codemirror/state@npm:^6.0.0, @codemirror/state@npm:^6.4.0": - version: 6.4.0 - resolution: "@codemirror/state@npm:6.4.0" - checksum: 10/d9129c456d1589ca376594620bad10c51d3dcdb57950f34637cea0e2ea073a695d426dc1cfc9b909b07365c236a6312da1eaf740c384c853009742493b8c9935 +"@codemirror/state@npm:6.4.1, @codemirror/state@npm:^6.0.0, @codemirror/state@npm:^6.4.0": + version: 6.4.1 + resolution: "@codemirror/state@npm:6.4.1" + checksum: 10/a9ec56c7d7d52034ce8ebea3a9a4d216b9e972d701b32b5000e56c97790d0d46af129aeba0b80bed36648b4024b3ba3e4910cf5bfed11de4a9e89252e0707a70 languageName: node linkType: hard -"@codemirror/view@npm:6.24.0, @codemirror/view@npm:^6.0.0, @codemirror/view@npm:^6.17.0, @codemirror/view@npm:^6.23.0": - version: 6.24.0 - resolution: "@codemirror/view@npm:6.24.0" +"@codemirror/view@npm:6.24.1, @codemirror/view@npm:^6.0.0, @codemirror/view@npm:^6.17.0, @codemirror/view@npm:^6.23.0": + version: 6.24.1 + resolution: "@codemirror/view@npm:6.24.1" dependencies: "@codemirror/state": "npm:^6.4.0" style-mod: "npm:^4.1.0" w3c-keyname: "npm:^2.2.4" - checksum: 10/f8d4d4403d9483801cd4bab19abe6eba662d1c21f2726a54dbf9779770b9c034017fd28cf3c6cbf1230d1ec00370d5725dc4c9e81c55b9a534bfcf9fae264f4a + checksum: 10/66428da341241a865f75c88c4e2984234919ae46a76bba24822867166ba3d15a9df0235b120c491a5ffacdfed7f5d748cae083e19c48656ee9b93c40a5f3c7e1 languageName: node linkType: hard @@ -9519,8 +9519,8 @@ __metadata: "@codemirror/language": "npm:6.10.1" "@codemirror/legacy-modes": "npm:6.3.3" "@codemirror/search": "npm:6.5.6" - "@codemirror/state": "npm:6.4.0" - "@codemirror/view": "npm:6.24.0" + "@codemirror/state": "npm:6.4.1" + "@codemirror/view": "npm:6.24.1" "@egjs/hammerjs": "npm:2.0.17" "@formatjs/intl-datetimeformat": "npm:6.12.2" "@formatjs/intl-displaynames": "npm:6.6.6" From 766fd4cbf5c1de5f5b69dd7e2089f657a90b0f23 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 22 Feb 2024 15:19:44 -0500 Subject: [PATCH 034/425] Update dependency webpack to v5.90.3 (#19858) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 98f0b21bcfa8..9c3c68c1ca55 100644 --- a/package.json +++ b/package.json @@ -240,7 +240,7 @@ "typescript": "5.3.3", "vinyl-buffer": "1.0.1", "vinyl-source-stream": "2.0.0", - "webpack": "5.90.2", + "webpack": "5.90.3", "webpack-cli": "5.1.4", "webpack-dev-server": "4.15.1", "webpack-manifest-plugin": "5.0.0", diff --git a/yarn.lock b/yarn.lock index 2d5f02488748..52be67b231a1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9710,7 +9710,7 @@ __metadata: vis-network: "npm:9.1.9" vue: "npm:2.7.16" vue2-daterange-picker: "npm:0.6.8" - webpack: "npm:5.90.2" + webpack: "npm:5.90.3" webpack-cli: "npm:5.1.4" webpack-dev-server: "npm:4.15.1" webpack-manifest-plugin: "npm:5.0.0" @@ -16240,9 +16240,9 @@ __metadata: languageName: node linkType: hard -"webpack@npm:5.90.2": - version: 5.90.2 - resolution: "webpack@npm:5.90.2" +"webpack@npm:5.90.3": + version: 5.90.3 + resolution: "webpack@npm:5.90.3" dependencies: "@types/eslint-scope": "npm:^3.7.3" "@types/estree": "npm:^1.0.5" @@ -16273,7 +16273,7 @@ __metadata: optional: true bin: webpack: bin/webpack.js - checksum: 10/4eaeed1255c9c7738921c4ce4facdb3b78dbfcb3441496942f6d160a41fbcebd24fb2c6dbb64739b357c5ff78e5a298f6c82eca482438b95130a3ba4e16d084a + checksum: 10/48c9696eca950bfa7c943a24b8235fdf0575acd73a8eb1661f8189d3d1f431362f3a0e158e2941a7e4f0852ea6e32d7d4e89283149247e4389a8aad0fe6c247e languageName: node linkType: hard From 0ff27154e63523d36e5f80ad7165f0967bd39b17 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 23 Feb 2024 14:32:13 -0500 Subject: [PATCH 035/425] Update fullcalendar monorepo to v6.1.11 (#19865) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package.json | 12 ++++----- yarn.lock | 72 ++++++++++++++++++++++++++-------------------------- 2 files changed, 42 insertions(+), 42 deletions(-) diff --git a/package.json b/package.json index 9c3c68c1ca55..30bd82121d99 100644 --- a/package.json +++ b/package.json @@ -43,12 +43,12 @@ "@formatjs/intl-numberformat": "8.10.0", "@formatjs/intl-pluralrules": "5.2.12", "@formatjs/intl-relativetimeformat": "11.2.12", - "@fullcalendar/core": "6.1.10", - "@fullcalendar/daygrid": "6.1.10", - "@fullcalendar/interaction": "6.1.10", - "@fullcalendar/list": "6.1.10", - "@fullcalendar/luxon3": "6.1.10", - "@fullcalendar/timegrid": "6.1.10", + "@fullcalendar/core": "6.1.11", + "@fullcalendar/daygrid": "6.1.11", + "@fullcalendar/interaction": "6.1.11", + "@fullcalendar/list": "6.1.11", + "@fullcalendar/luxon3": "6.1.11", + "@fullcalendar/timegrid": "6.1.11", "@lezer/highlight": "1.2.0", "@lit-labs/context": "0.4.1", "@lit-labs/motion": "1.0.7", diff --git a/yarn.lock b/yarn.lock index 52be67b231a1..0e6215e337bc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1749,60 +1749,60 @@ __metadata: languageName: node linkType: hard -"@fullcalendar/core@npm:6.1.10": - version: 6.1.10 - resolution: "@fullcalendar/core@npm:6.1.10" +"@fullcalendar/core@npm:6.1.11": + version: 6.1.11 + resolution: "@fullcalendar/core@npm:6.1.11" dependencies: preact: "npm:~10.12.1" - checksum: 10/0ca26aefd3e553dac9019838e46ab0e73f7df4954f4d2cbbda4ad73f4e8b9889e4a016cdcc7ae5f548d08d147d6315dffede51f8e213eff5ef63f2dcca2d759f + checksum: 10/7624841879d34fdf769c7610e95cef820ea52eb45c74d51be426bb2acc05cb57806785fc1b1a1282b156470c1f04c976314327fbff63e1b115b7108649aeb1c8 languageName: node linkType: hard -"@fullcalendar/daygrid@npm:6.1.10, @fullcalendar/daygrid@npm:~6.1.10": - version: 6.1.10 - resolution: "@fullcalendar/daygrid@npm:6.1.10" +"@fullcalendar/daygrid@npm:6.1.11, @fullcalendar/daygrid@npm:~6.1.11": + version: 6.1.11 + resolution: "@fullcalendar/daygrid@npm:6.1.11" peerDependencies: - "@fullcalendar/core": ~6.1.10 - checksum: 10/6c58038c1a5b6ba439f0b5d3fb9d53e7fabbf23039d18d6d60036acceee399cd1cbf6038d4b8973ee4c54544029fb940d29ff7d26472a332248e24a6e5969bf6 + "@fullcalendar/core": ~6.1.11 + checksum: 10/c6165c22405d0fee19b2e4ac54b35115c8bc7e176e3ef60f06b1d7af93d4da1fa571acbd169faa3ea4743c55f6374c6e7f7cc774026a1ae0b83d80db33c4b391 languageName: node linkType: hard -"@fullcalendar/interaction@npm:6.1.10": - version: 6.1.10 - resolution: "@fullcalendar/interaction@npm:6.1.10" +"@fullcalendar/interaction@npm:6.1.11": + version: 6.1.11 + resolution: "@fullcalendar/interaction@npm:6.1.11" peerDependencies: - "@fullcalendar/core": ~6.1.10 - checksum: 10/890f7809e4587dc8aa37292d29806a932214848ce1de42092e7290d62206ee785957dc77468bf6b741ca2948cc0e8563bb4bc2397d83d52c440bb2b054da06f2 + "@fullcalendar/core": ~6.1.11 + checksum: 10/6d669d59f20615b71d42d0d053af39d512e824381d575554e016c9221f3f98e17b7770341711322f8455a9c4729450479e2cf4bf026ff123540bf671c6f59f33 languageName: node linkType: hard -"@fullcalendar/list@npm:6.1.10": - version: 6.1.10 - resolution: "@fullcalendar/list@npm:6.1.10" +"@fullcalendar/list@npm:6.1.11": + version: 6.1.11 + resolution: "@fullcalendar/list@npm:6.1.11" peerDependencies: - "@fullcalendar/core": ~6.1.10 - checksum: 10/773830aa2b67c7e10e38b64b9ecd9819901067dd6fd7c78c1ec840830c07166ca1280edd57b746a635ed93cbdbb732a8a5f2cf1725e9ba4d668e30765f61f337 + "@fullcalendar/core": ~6.1.11 + checksum: 10/13bb92c7ca4c7808ec57c1ada55a724ff7e8928bb118e1d9bbaf20fab8c6fb2486101e37b9422dc88ef50342354d35c436bbfa161b5ff09379a11c317f26c725 languageName: node linkType: hard -"@fullcalendar/luxon3@npm:6.1.10": - version: 6.1.10 - resolution: "@fullcalendar/luxon3@npm:6.1.10" +"@fullcalendar/luxon3@npm:6.1.11": + version: 6.1.11 + resolution: "@fullcalendar/luxon3@npm:6.1.11" peerDependencies: - "@fullcalendar/core": ~6.1.10 + "@fullcalendar/core": ~6.1.11 luxon: ^3.0.0 - checksum: 10/575c225cddff677f30d835d84c6957f47ac81b8f2a395f3e0d1d11ea4da75b2479b42431b2a3e16284a1caf5589796633289970eb63143fe9aa3ef818b78213f + checksum: 10/fc302aad0d1b080aac800956921358f10682d8b62d49ff78db85fbc6ea15c8799729679d164d70ac71cee77e0744da55cdfc9b295dcb35e0d6bf673649fd805d languageName: node linkType: hard -"@fullcalendar/timegrid@npm:6.1.10": - version: 6.1.10 - resolution: "@fullcalendar/timegrid@npm:6.1.10" +"@fullcalendar/timegrid@npm:6.1.11": + version: 6.1.11 + resolution: "@fullcalendar/timegrid@npm:6.1.11" dependencies: - "@fullcalendar/daygrid": "npm:~6.1.10" + "@fullcalendar/daygrid": "npm:~6.1.11" peerDependencies: - "@fullcalendar/core": ~6.1.10 - checksum: 10/0351679754f110610a87e1a08b60df3833837f828ede0bb804c07632d765d5061bd03913a06384078e567092ae3071826aa82620b79b7e92fb55b4c878000bcb + "@fullcalendar/core": ~6.1.11 + checksum: 10/b2794502a0aa35c33405e35b05d367abab983d15af568a285123a673414bf545c298f7227b661290f99a2ef37e90013513cab3e9d4d0c15840212cd3b429c99d languageName: node linkType: hard @@ -9530,12 +9530,12 @@ __metadata: "@formatjs/intl-numberformat": "npm:8.10.0" "@formatjs/intl-pluralrules": "npm:5.2.12" "@formatjs/intl-relativetimeformat": "npm:11.2.12" - "@fullcalendar/core": "npm:6.1.10" - "@fullcalendar/daygrid": "npm:6.1.10" - "@fullcalendar/interaction": "npm:6.1.10" - "@fullcalendar/list": "npm:6.1.10" - "@fullcalendar/luxon3": "npm:6.1.10" - "@fullcalendar/timegrid": "npm:6.1.10" + "@fullcalendar/core": "npm:6.1.11" + "@fullcalendar/daygrid": "npm:6.1.11" + "@fullcalendar/interaction": "npm:6.1.11" + "@fullcalendar/list": "npm:6.1.11" + "@fullcalendar/luxon3": "npm:6.1.11" + "@fullcalendar/timegrid": "npm:6.1.11" "@koa/cors": "npm:5.0.0" "@lezer/highlight": "npm:1.2.0" "@lit-labs/context": "npm:0.4.1" From a39cf99024c68a824cd52c403cc14fdc7588f745 Mon Sep 17 00:00:00 2001 From: Yosi Levy <37745463+yosilevy@users.noreply.github.com> Date: Mon, 26 Feb 2024 16:14:32 +0200 Subject: [PATCH 036/425] RTL updates (#19848) * RTL updates * Additional fixes * TODO fix --- src/components/ha-climate-state.ts | 1 + src/components/ha-metric.ts | 8 +++++++- src/components/ha-qr-scanner.ts | 2 ++ src/components/ha-textfield.ts | 3 +-- src/components/media-player/dialog-media-player-browse.ts | 1 - src/components/media-player/ha-media-player-browse.ts | 1 + .../lights/ha-more-info-light-favorite-colors.ts | 2 ++ .../more-info/components/lights/light-color-rgb-picker.ts | 2 ++ .../voice-command-dialog/ha-voice-command-dialog.ts | 2 ++ src/layouts/hass-tabs-subpage-data-table.ts | 2 ++ src/onboarding/onboarding-location.ts | 4 ++++ src/panels/config/areas/ha-config-area-page.ts | 7 +++++++ src/panels/config/cloud/account/cloud-remote-pref.ts | 2 ++ src/panels/config/hardware/dialog-hardware-available.ts | 2 ++ .../integrations/ha-config-integrations-dashboard.ts | 7 ++++++- .../config/integrations/ha-integration-action-card.ts | 2 ++ .../integration-panels/zha/zha-add-devices-page.ts | 2 ++ .../integration-panels/zha/zha-cluster-commands.ts | 2 ++ src/panels/config/storage/ha-config-section-storage.ts | 2 ++ .../voice-assistants/expose/expose-assistant-icon.ts | 2 ++ .../developer-tools/template/developer-tools-template.ts | 2 ++ src/panels/lovelace/cards/hui-media-control-card.ts | 2 ++ src/panels/lovelace/cards/hui-todo-list-card.ts | 2 ++ src/panels/lovelace/entity-rows/hui-number-entity-row.ts | 1 + src/panels/media-browser/ha-panel-media-browser.ts | 1 - 25 files changed, 58 insertions(+), 6 deletions(-) diff --git a/src/components/ha-climate-state.ts b/src/components/ha-climate-state.ts index ca5d3a00e9b0..c2f35979e82a 100644 --- a/src/components/ha-climate-state.ts +++ b/src/components/ha-climate-state.ts @@ -156,6 +156,7 @@ class HaClimateState extends LitElement { .current { color: var(--secondary-text-color); + direction: var(--direction); } .state-label { diff --git a/src/components/ha-metric.ts b/src/components/ha-metric.ts index 4a338129294b..9d0fd3431ec7 100644 --- a/src/components/ha-metric.ts +++ b/src/components/ha-metric.ts @@ -19,7 +19,9 @@ class HaMetric extends LitElement { ${this.heading}
    - ${roundedValue} % + +
    ${roundedValue} %
    +
    50, @@ -70,6 +72,10 @@ class HaMetric extends LitElement { padding-inline-start: initial; flex-shrink: 0; } + .value > div { + direction: ltr; + text-align: var(--float-start); + } `; } } diff --git a/src/components/ha-qr-scanner.ts b/src/components/ha-qr-scanner.ts index 9d437164cc89..b65f9ba07aa1 100644 --- a/src/components/ha-qr-scanner.ts +++ b/src/components/ha-qr-scanner.ts @@ -186,6 +186,8 @@ class HaQrScanner extends LitElement { position: absolute; bottom: 8px; right: 8px; + inset-inline-end: 8px; + inset-inline-start: initial; background: #727272b2; color: white; border-radius: 50%; diff --git a/src/components/ha-textfield.ts b/src/components/ha-textfield.ts index 170c0c179d73..175b8ae29052 100644 --- a/src/components/ha-textfield.ts +++ b/src/components/ha-textfield.ts @@ -90,7 +90,7 @@ export class HaTextField extends TextFieldBase { padding-right: var(--text-field-suffix-padding-right, 0px); padding-inline-start: var(--text-field-suffix-padding-left, 12px); padding-inline-end: var(--text-field-suffix-padding-right, 0px); - direction: var(--direction); + direction: ltr; } .mdc-text-field--with-leading-icon { padding-inline-start: var(--text-field-suffix-padding-left, 0px); @@ -199,7 +199,6 @@ export class HaTextField extends TextFieldBase { // safari workaround - must be explicit mainWindow.document.dir === "rtl" ? css` - .mdc-text-field__affix--suffix, .mdc-text-field--with-leading-icon, .mdc-text-field__icon--leading, .mdc-floating-label, diff --git a/src/components/media-player/dialog-media-player-browse.ts b/src/components/media-player/dialog-media-player-browse.ts index fd8bdba6732b..e0a66ae79c2b 100644 --- a/src/components/media-player/dialog-media-player-browse.ts +++ b/src/components/media-player/dialog-media-player-browse.ts @@ -223,7 +223,6 @@ class DialogMediaPlayerBrowse extends LitElement { ha-media-player-browse { --media-browser-max-height: calc(100vh - 65px); - direction: ltr; } :host(.opened) ha-media-player-browse { diff --git a/src/components/media-player/ha-media-player-browse.ts b/src/components/media-player/ha-media-player-browse.ts index e46c9e908c43..6f205de5fdd5 100644 --- a/src/components/media-player/ha-media-player-browse.ts +++ b/src/components/media-player/ha-media-player-browse.ts @@ -879,6 +879,7 @@ export class HaMediaPlayerBrowse extends LitElement { display: flex; flex-direction: column; position: relative; + direction: ltr; } ha-circular-progress { diff --git a/src/dialogs/more-info/components/lights/ha-more-info-light-favorite-colors.ts b/src/dialogs/more-info/components/lights/ha-more-info-light-favorite-colors.ts index 93a6b1528fd5..aa9893d000d5 100644 --- a/src/dialogs/more-info/components/lights/ha-more-info-light-favorite-colors.ts +++ b/src/dialogs/more-info/components/lights/ha-more-info-light-favorite-colors.ts @@ -322,6 +322,8 @@ export class HaMoreInfoLightFavoriteColors extends LitElement { position: absolute; top: -6px; right: -6px; + inset-inline-end: -6px; + inset-inline-start: initial; width: 20px; height: 20px; outline: none; diff --git a/src/dialogs/more-info/components/lights/light-color-rgb-picker.ts b/src/dialogs/more-info/components/lights/light-color-rgb-picker.ts index de42e5b054c5..a38cbe2b2eb1 100644 --- a/src/dialogs/more-info/components/lights/light-color-rgb-picker.ts +++ b/src/dialogs/more-info/components/lights/light-color-rgb-picker.ts @@ -446,6 +446,8 @@ class LightRgbColorPicker extends LitElement { position: absolute; top: 0; right: 0; + inset-inline-end: 0; + inset-inline-start: initial; z-index: 1; } diff --git a/src/dialogs/voice-command-dialog/ha-voice-command-dialog.ts b/src/dialogs/voice-command-dialog/ha-voice-command-dialog.ts index 700c6e8ea977..086e8b448d71 100644 --- a/src/dialogs/voice-command-dialog/ha-voice-command-dialog.ts +++ b/src/dialogs/voice-command-dialog/ha-voice-command-dialog.ts @@ -647,6 +647,8 @@ export class HaVoiceCommandDialog extends LitElement { position: absolute; --mdc-icon-size: 16px; right: 5px; + inset-inline-end: 5px; + inset-inline-start: initial; top: 0px; } diff --git a/src/layouts/hass-tabs-subpage-data-table.ts b/src/layouts/hass-tabs-subpage-data-table.ts index 7af35ded290c..096ec15e308f 100644 --- a/src/layouts/hass-tabs-subpage-data-table.ts +++ b/src/layouts/hass-tabs-subpage-data-table.ts @@ -377,6 +377,8 @@ export class HaTabsSubpageDataTable extends LitElement { color: var(--text-primary-color); position: absolute; right: 0; + inset-inline-end: 0; + inset-inline-start: initial; top: 4px; font-size: 0.65em; } diff --git a/src/onboarding/onboarding-location.ts b/src/onboarding/onboarding-location.ts index 1d031b81f3e7..3027a93f9e5a 100644 --- a/src/onboarding/onboarding-location.ts +++ b/src/onboarding/onboarding-location.ts @@ -499,6 +499,8 @@ class OnboardingLocation extends LitElement { position: absolute; top: 10px; right: 10px; + inset-inline-end: 10px; + inset-inline-start: initial; --mdc-icon-button-size: 36px; --mdc-icon-size: 20px; color: var(--secondary-text-color); @@ -509,6 +511,8 @@ class OnboardingLocation extends LitElement { ha-textfield > ha-circular-progress { position: relative; left: 12px; + inset-inline-start: 12px; + inset-inline-end: initial; } ha-locations-editor { display: block; diff --git a/src/panels/config/areas/ha-config-area-page.ts b/src/panels/config/areas/ha-config-area-page.ts index 62abd48d4e25..18ce4dd5b915 100644 --- a/src/panels/config/areas/ha-config-area-page.ts +++ b/src/panels/config/areas/ha-config-area-page.ts @@ -710,6 +710,8 @@ class HaConfigAreaPage extends LitElement { position: absolute; top: 4px; right: 4px; + inset-inline-end: 4px; + inset-inline-start: initial; display: none; } .img-container:hover .img-edit-btn { @@ -736,6 +738,11 @@ class HaConfigAreaPage extends LitElement { padding: 16px; color: var(--secondary-text-color); } + + mwc-button > ha-svg-icon { + margin-inline-start: 0; + margin-inline-end: 8px; + } `, ]; } diff --git a/src/panels/config/cloud/account/cloud-remote-pref.ts b/src/panels/config/cloud/account/cloud-remote-pref.ts index b74e94dce372..e94e50b56b38 100644 --- a/src/panels/config/cloud/account/cloud-remote-pref.ts +++ b/src/panels/config/cloud/account/cloud-remote-pref.ts @@ -226,6 +226,8 @@ export class CloudRemotePref extends LitElement { position: absolute; right: 24px; top: 24px; + inset-inline-end: 24px; + inset-inline-start: initial; } .card-actions { display: flex; diff --git a/src/panels/config/hardware/dialog-hardware-available.ts b/src/panels/config/hardware/dialog-hardware-available.ts index b11d34410b44..5cc858b1c897 100644 --- a/src/panels/config/hardware/dialog-hardware-available.ts +++ b/src/panels/config/hardware/dialog-hardware-available.ts @@ -172,6 +172,8 @@ class DialogHardwareAvailable extends LitElement implements HassDialog { position: absolute; right: 16px; top: 10px; + inset-inline-end: 16px; + inset-inline-start: initial; text-decoration: none; color: var(--primary-text-color); } diff --git a/src/panels/config/integrations/ha-config-integrations-dashboard.ts b/src/panels/config/integrations/ha-config-integrations-dashboard.ts index 8e0ed86b4520..7a960576e887 100644 --- a/src/panels/config/integrations/ha-config-integrations-dashboard.ts +++ b/src/panels/config/integrations/ha-config-integrations-dashboard.ts @@ -877,6 +877,8 @@ class HaConfigIntegrationsDashboard extends SubscribeMixin(LitElement) { color: var(--text-primary-color); position: absolute; right: 0px; + inset-inline-end: 0px; + inset-inline-start: initial; top: 4px; font-size: 0.65em; } @@ -884,7 +886,10 @@ class HaConfigIntegrationsDashboard extends SubscribeMixin(LitElement) { position: relative; } h1 { - margin: 8px 0 0 16px; + margin-top: 8px; + margin-left: 16px; + margin-inline-start: 16px; + margin-inline-end: initial; } ha-button-menu { color: var(--primary-text-color); diff --git a/src/panels/config/integrations/ha-integration-action-card.ts b/src/panels/config/integrations/ha-integration-action-card.ts index 189b5d4b4698..ada2e3b76bb0 100644 --- a/src/panels/config/integrations/ha-integration-action-card.ts +++ b/src/panels/config/integrations/ha-integration-action-card.ts @@ -90,6 +90,8 @@ export class HaIntegrationActionCard extends LitElement { position: absolute; top: 8px; right: 8px; + inset-inline-end: 8px; + inset-inline-start: initial; } .filler { flex: 1; diff --git a/src/panels/config/integrations/integration-panels/zha/zha-add-devices-page.ts b/src/panels/config/integrations/integration-panels/zha/zha-add-devices-page.ts index 11d37b198899..a7570e0a4635 100644 --- a/src/panels/config/integrations/integration-panels/zha/zha-add-devices-page.ts +++ b/src/panels/config/integrations/integration-panels/zha/zha-add-devices-page.ts @@ -269,6 +269,8 @@ class ZHAAddDevicesPage extends LitElement { margin-inline-start: initial; top: -6px; right: 0; + inset-inline-end: 0; + inset-inline-start: initial; color: var(--primary-color); } .search-button { diff --git a/src/panels/config/integrations/integration-panels/zha/zha-cluster-commands.ts b/src/panels/config/integrations/integration-panels/zha/zha-cluster-commands.ts index 4872fde8e1ed..d6932b10ff30 100644 --- a/src/panels/config/integrations/integration-panels/zha/zha-cluster-commands.ts +++ b/src/panels/config/integrations/integration-panels/zha/zha-cluster-commands.ts @@ -241,6 +241,8 @@ export class ZHAClusterCommands extends LitElement { float: right; top: -6px; right: 0; + inset-inline-end: 0; + inset-inline-start: initial; padding-right: 0px; padding-inline-end: 0px; padding-inline-start: initial; diff --git a/src/panels/config/storage/ha-config-section-storage.ts b/src/panels/config/storage/ha-config-section-storage.ts index 708f79e861eb..89b5fc7cf040 100644 --- a/src/panels/config/storage/ha-config-section-storage.ts +++ b/src/panels/config/storage/ha-config-section-storage.ts @@ -334,6 +334,8 @@ class HaConfigSectionStorage extends LitElement { position: relative; top: -10px; right: 10px; + inset-inline-end: 10px; + inset-inline-start: initial; } .no-mounts { diff --git a/src/panels/config/voice-assistants/expose/expose-assistant-icon.ts b/src/panels/config/voice-assistants/expose/expose-assistant-icon.ts index 46d2291aa658..69d0bcf8215d 100644 --- a/src/panels/config/voice-assistants/expose/expose-assistant-icon.ts +++ b/src/panels/config/voice-assistants/expose/expose-assistant-icon.ts @@ -93,6 +93,8 @@ export class VoiceAssistantExposeAssistantIcon extends LitElement { --mdc-icon-size: 16px; right: 10px; top: -7px; + inset-inline-end: 10px; + inset-inline-start: initial; } `; } diff --git a/src/panels/developer-tools/template/developer-tools-template.ts b/src/panels/developer-tools/template/developer-tools-template.ts index 7732ad776012..e4162d307786 100644 --- a/src/panels/developer-tools/template/developer-tools-template.ts +++ b/src/panels/developer-tools/template/developer-tools-template.ts @@ -290,6 +290,8 @@ class HaPanelDevTemplate extends LitElement { position: absolute; top: 8px; right: 8px; + inset-inline-end: 8px; + inset-inline-start: initial; } ha-alert { diff --git a/src/panels/lovelace/cards/hui-media-control-card.ts b/src/panels/lovelace/cards/hui-media-control-card.ts index 7d5a1d8cc358..d28d0f612f8f 100644 --- a/src/panels/lovelace/cards/hui-media-control-card.ts +++ b/src/panels/lovelace/cards/hui-media-control-card.ts @@ -726,6 +726,8 @@ export class HuiMediaControlCard extends LitElement implements LovelaceCard { position: absolute; right: 4px; --mdc-icon-size: 24px; + inset-inline-end: 4px; + inset-inline-start: initial; } .top-info { diff --git a/src/panels/lovelace/cards/hui-todo-list-card.ts b/src/panels/lovelace/cards/hui-todo-list-card.ts index 5094ea3d73e1..bed42344a77f 100644 --- a/src/panels/lovelace/cards/hui-todo-list-card.ts +++ b/src/panels/lovelace/cards/hui-todo-list-card.ts @@ -732,6 +732,8 @@ export class HuiTodoListCard extends LitElement implements LovelaceCard { .deleteItemButton { position: relative; left: 8px; + inset-inline-start: 8px; + inset-inline-end: initial; } ha-textfield { diff --git a/src/panels/lovelace/entity-rows/hui-number-entity-row.ts b/src/panels/lovelace/entity-rows/hui-number-entity-row.ts index 13afe9d3c5bc..1b57c6ee4135 100644 --- a/src/panels/lovelace/entity-rows/hui-number-entity-row.ts +++ b/src/panels/lovelace/entity-rows/hui-number-entity-row.ts @@ -139,6 +139,7 @@ class HuiNumberEntityRow extends LitElement implements LovelaceRow { } ha-textfield { text-align: end; + direction: ltr !important; } ha-slider { width: 100%; diff --git a/src/panels/media-browser/ha-panel-media-browser.ts b/src/panels/media-browser/ha-panel-media-browser.ts index 8713bed2a4c7..c5bc566f07c1 100644 --- a/src/panels/media-browser/ha-panel-media-browser.ts +++ b/src/panels/media-browser/ha-panel-media-browser.ts @@ -343,7 +343,6 @@ class PanelMediaBrowser extends LitElement { ha-media-player-browse { height: calc(100vh - (100px + var(--header-height))); - direction: ltr; } :host([narrow]) ha-media-player-browse { From e8fca5d93c5d34dbc614a04d9009ce2787881153 Mon Sep 17 00:00:00 2001 From: chammp <57918757+chammp@users.noreply.github.com> Date: Mon, 26 Feb 2024 15:21:02 +0100 Subject: [PATCH 037/425] Directly prompt for lock code in dashboards (#19835) Prompt for lock codes in more places --- src/panels/lovelace/entity-rows/hui-lock-entity-row.ts | 10 ++++++---- src/state-summary/state-card-lock.ts | 10 +++++----- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/src/panels/lovelace/entity-rows/hui-lock-entity-row.ts b/src/panels/lovelace/entity-rows/hui-lock-entity-row.ts index 6c757e22d756..128a80808a7c 100644 --- a/src/panels/lovelace/entity-rows/hui-lock-entity-row.ts +++ b/src/panels/lovelace/entity-rows/hui-lock-entity-row.ts @@ -14,6 +14,7 @@ import { hasConfigOrEntityChanged } from "../common/has-changed"; import "../components/hui-generic-entity-row"; import { createEntityNotFoundWarning } from "../components/hui-warning"; import { EntityConfig, LovelaceRow } from "./types"; +import { callProtectedLockService } from "../../../data/lock"; @customElement("hui-lock-entity-row") class HuiLockEntityRow extends LitElement implements LovelaceRow { @@ -75,10 +76,11 @@ class HuiLockEntityRow extends LitElement implements LovelaceRow { private _callService(ev): void { ev.stopPropagation(); const stateObj = this.hass!.states[this._config!.entity]; - this.hass!.callService( - "lock", - stateObj.state === "locked" ? "unlock" : "lock", - { entity_id: stateObj.entity_id } + callProtectedLockService( + this, + this.hass!, + stateObj, + stateObj.state === "locked" ? "unlock" : "lock" ); } } diff --git a/src/state-summary/state-card-lock.ts b/src/state-summary/state-card-lock.ts index c35c4e30070a..117a7c992bd5 100644 --- a/src/state-summary/state-card-lock.ts +++ b/src/state-summary/state-card-lock.ts @@ -11,7 +11,7 @@ import { import { customElement, property } from "lit/decorators"; import { supportsFeature } from "../common/entity/supports-feature"; import "../components/entity/state-info"; -import { LockEntityFeature } from "../data/lock"; +import { callProtectedLockService, LockEntityFeature } from "../data/lock"; import { HomeAssistant } from "../types"; import { haStyle } from "../resources/styles"; @@ -56,10 +56,10 @@ class StateCardLock extends LitElement { private async _callService(ev) { ev.stopPropagation(); const service = ev.target.dataset.service; - const data = { - entity_id: this.stateObj.entity_id, - }; - await this.hass.callService("lock", service, data); + if (!this.hass || !this.stateObj) { + return; + } + await callProtectedLockService(this, this.hass, this.stateObj, service); } static get styles(): CSSResultGroup { From 3a8e2c429fb5ef4dfd11b8c26303ccbf29c79b87 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 26 Feb 2024 18:38:40 -0500 Subject: [PATCH 038/425] Update dependency eslint to v8.57.0 (#19882) --- package.json | 2 +- yarn.lock | 24 ++++++++++++------------ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/package.json b/package.json index 30bd82121d99..8c8f0f103cc3 100644 --- a/package.json +++ b/package.json @@ -191,7 +191,7 @@ "babel-plugin-template-html-minifier": "4.1.0", "chai": "5.1.0", "del": "7.1.0", - "eslint": "8.56.0", + "eslint": "8.57.0", "eslint-config-airbnb-base": "15.0.0", "eslint-config-airbnb-typescript": "17.1.0", "eslint-config-prettier": "9.1.0", diff --git a/yarn.lock b/yarn.lock index 0e6215e337bc..b08526992420 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1597,10 +1597,10 @@ __metadata: languageName: node linkType: hard -"@eslint/js@npm:8.56.0": - version: 8.56.0 - resolution: "@eslint/js@npm:8.56.0" - checksum: 10/97a4b5ccf7e24f4d205a1fb0f21cdcd610348ecf685f6798a48dd41ba443f2c1eedd3050ff5a0b8f30b8cf6501ab512aa9b76e531db15e59c9ebaa41f3162e37 +"@eslint/js@npm:8.57.0": + version: 8.57.0 + resolution: "@eslint/js@npm:8.57.0" + checksum: 10/3c501ce8a997cf6cbbaf4ed358af5492875e3550c19b9621413b82caa9ae5382c584b0efa79835639e6e0ddaa568caf3499318e5bdab68643ef4199dce5eb0a0 languageName: node linkType: hard @@ -1815,7 +1815,7 @@ __metadata: languageName: node linkType: hard -"@humanwhocodes/config-array@npm:^0.11.13": +"@humanwhocodes/config-array@npm:^0.11.14": version: 0.11.14 resolution: "@humanwhocodes/config-array@npm:0.11.14" dependencies: @@ -8080,15 +8080,15 @@ __metadata: languageName: node linkType: hard -"eslint@npm:8.56.0": - version: 8.56.0 - resolution: "eslint@npm:8.56.0" +"eslint@npm:8.57.0": + version: 8.57.0 + resolution: "eslint@npm:8.57.0" dependencies: "@eslint-community/eslint-utils": "npm:^4.2.0" "@eslint-community/regexpp": "npm:^4.6.1" "@eslint/eslintrc": "npm:^2.1.4" - "@eslint/js": "npm:8.56.0" - "@humanwhocodes/config-array": "npm:^0.11.13" + "@eslint/js": "npm:8.57.0" + "@humanwhocodes/config-array": "npm:^0.11.14" "@humanwhocodes/module-importer": "npm:^1.0.1" "@nodelib/fs.walk": "npm:^1.2.8" "@ungap/structured-clone": "npm:^1.2.0" @@ -8124,7 +8124,7 @@ __metadata: text-table: "npm:^0.2.0" bin: eslint: bin/eslint.js - checksum: 10/ef6193c6e4cef20774b985a5cc2fd4bf6d3c4decd423117cbc4a0196617861745db291217ad3c537bc3a160650cca965bc818f55e1f3e446af1fcb293f9940a5 + checksum: 10/00496e218b23747a7a9817bf58b522276d0dc1f2e546dceb4eea49f9871574088f72f1f069a6b560ef537efa3a75261b8ef70e51ef19033da1cc4c86a755ef15 languageName: node linkType: hard @@ -9629,7 +9629,7 @@ __metadata: deep-freeze: "npm:0.0.1" del: "npm:7.1.0" element-internals-polyfill: "npm:1.3.10" - eslint: "npm:8.56.0" + eslint: "npm:8.57.0" eslint-config-airbnb-base: "npm:15.0.0" eslint-config-airbnb-typescript: "npm:17.1.0" eslint-config-prettier: "npm:9.1.0" From bf56f50e0a6fbb13321ca4d6725c918b20e071a7 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 27 Feb 2024 11:26:11 +0100 Subject: [PATCH 039/425] Update dependency gulp-json-transform to v0.5.0 (#19885) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 27 +++++---------------------- 2 files changed, 6 insertions(+), 23 deletions(-) diff --git a/package.json b/package.json index 8c8f0f103cc3..207dca4cb65a 100644 --- a/package.json +++ b/package.json @@ -207,7 +207,7 @@ "glob": "10.3.10", "gulp": "4.0.2", "gulp-flatmap": "1.0.2", - "gulp-json-transform": "0.4.8", + "gulp-json-transform": "0.5.0", "gulp-merge-json": "2.1.2", "gulp-rename": "2.0.0", "gulp-zopfli-green": "6.0.1", diff --git a/yarn.lock b/yarn.lock index b08526992420..fb0f4f42d5cb 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5854,13 +5854,6 @@ __metadata: languageName: node linkType: hard -"asap@npm:~2.0.6": - version: 2.0.6 - resolution: "asap@npm:2.0.6" - checksum: 10/b244c0458c571945e4b3be0b14eb001bea5596f9868cc50cc711dc03d58a7e953517d3f0dad81ccde3ff37d1f074701fa76a6f07d41aaa992d7204a37b915dda - languageName: node - linkType: hard - "assertion-error@npm:^2.0.1": version: 2.0.1 resolution: "assertion-error@npm:2.0.1" @@ -9305,17 +9298,16 @@ __metadata: languageName: node linkType: hard -"gulp-json-transform@npm:0.4.8": - version: 0.4.8 - resolution: "gulp-json-transform@npm:0.4.8" +"gulp-json-transform@npm:0.5.0": + version: 0.5.0 + resolution: "gulp-json-transform@npm:0.5.0" dependencies: ansi-colors: "npm:^1.0.1" fancy-log: "npm:^1.3.2" plugin-error: "npm:^1.0.1" - promise: "npm:^8.0.1" through2: "npm:^2.0.3" vinyl: "npm:^2.1.0" - checksum: 10/5b117e59cd806e530cb4f67089e28eb1a6234bfb1461497e540be2a24cd94c5a8ce573d5ff9222c1481d951316054742a2212c044df0e047256ce10ce7bcd328 + checksum: 10/0879149337450e4ada1363fa72c351d2386b249df31aa8313c699c267cae3ece14ff1ab77dc7bb6a67827902db68ee0e0232d67ebfca55900dc17f3cfe219c42 languageName: node linkType: hard @@ -9647,7 +9639,7 @@ __metadata: google-timezones-json: "npm:1.2.0" gulp: "npm:4.0.2" gulp-flatmap: "npm:1.0.2" - gulp-json-transform: "npm:0.4.8" + gulp-json-transform: "npm:0.5.0" gulp-merge-json: "npm:2.1.2" gulp-rename: "npm:2.0.0" gulp-zopfli-green: "npm:6.0.1" @@ -13193,15 +13185,6 @@ __metadata: languageName: node linkType: hard -"promise@npm:^8.0.1": - version: 8.3.0 - resolution: "promise@npm:8.3.0" - dependencies: - asap: "npm:~2.0.6" - checksum: 10/55e9d0d723c66810966bc055c6c77a3658c0af7e4a8cc88ea47aeaf2949ca0bd1de327d9c631df61236f5406ad478384fa19a77afb3f88c0303eba9e5eb0a8d8 - languageName: node - linkType: hard - "proxy-addr@npm:~2.0.7": version: 2.0.7 resolution: "proxy-addr@npm:2.0.7" From bf8a33e086f54ade28c4f8d8a0e14ca09ad54d18 Mon Sep 17 00:00:00 2001 From: Paul Bottein Date: Tue, 27 Feb 2024 12:50:37 +0100 Subject: [PATCH 040/425] Fix button card and sensor card in grid section (#19887) --- src/panels/lovelace/cards/hui-button-card.ts | 4 ++-- src/panels/lovelace/cards/hui-sensor-card.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/panels/lovelace/cards/hui-button-card.ts b/src/panels/lovelace/cards/hui-button-card.ts index 129390fe5b1b..2d440a303688 100644 --- a/src/panels/lovelace/cards/hui-button-card.ts +++ b/src/panels/lovelace/cards/hui-button-card.ts @@ -149,8 +149,8 @@ export class HuiButtonCard extends LitElement implements LovelaceCard { public getGridSize(): [number, number] { if ( - (this._config?.show_icon && this._config?.show_name) || - this._config?.show_state + this._config?.show_icon && + (this._config?.show_name || this._config?.show_state) ) { return [2, 2]; } diff --git a/src/panels/lovelace/cards/hui-sensor-card.ts b/src/panels/lovelace/cards/hui-sensor-card.ts index d90858862df3..709a6591d981 100644 --- a/src/panels/lovelace/cards/hui-sensor-card.ts +++ b/src/panels/lovelace/cards/hui-sensor-card.ts @@ -72,7 +72,7 @@ class HuiSensorCard extends HuiEntityCard { super.setConfig(entityCardConfig); } - public getSize(): [number, number] { + public getGridSize(): [number, number] { return [2, 2]; } From bb25817baeafa11f926c4a981131943f3ebfeb86 Mon Sep 17 00:00:00 2001 From: Paul Bottein Date: Tue, 27 Feb 2024 12:50:59 +0100 Subject: [PATCH 041/425] Reduce drag and drop delay on touch (#19888) --- src/panels/lovelace/sections/hui-grid-section.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/panels/lovelace/sections/hui-grid-section.ts b/src/panels/lovelace/sections/hui-grid-section.ts index 1a6ed30ff7d8..b63e9fac8f9d 100644 --- a/src/panels/lovelace/sections/hui-grid-section.ts +++ b/src/panels/lovelace/sections/hui-grid-section.ts @@ -17,7 +17,7 @@ import { moveCard } from "../editor/config-util"; import type { Lovelace, LovelaceCard } from "../types"; const CARD_SORTABLE_OPTIONS: HaSortableOptions = { - delay: 200, + delay: 100, delayOnTouchOnly: true, direction: "vertical", invertedSwapThreshold: 0.7, From b9935717dc6da595ae7190bd2b1b886ab3c597c4 Mon Sep 17 00:00:00 2001 From: Paul Bottein Date: Tue, 27 Feb 2024 12:51:35 +0100 Subject: [PATCH 042/425] Focus cancel button on destructive confirmation dialog (#19889) --- src/dialogs/generic/dialog-box.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/dialogs/generic/dialog-box.ts b/src/dialogs/generic/dialog-box.ts index 2660b5679971..216b79b6374e 100644 --- a/src/dialogs/generic/dialog-box.ts +++ b/src/dialogs/generic/dialog-box.ts @@ -89,7 +89,12 @@ class DialogBox extends LitElement {
    ${confirmPrompt && html` - + ${this._params.dismissText ? this._params.dismissText : this.hass.localize("ui.dialogs.generic.cancel")} @@ -97,7 +102,8 @@ class DialogBox extends LitElement { `} Date: Tue, 27 Feb 2024 07:17:29 -0500 Subject: [PATCH 043/425] Resolve iframe CORS errors - Fix #19724 (#19884) * Resolve iframe CORS errors - Fix #19724 * add newline --- src/common/dom/get_main_window.ts | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/common/dom/get_main_window.ts b/src/common/dom/get_main_window.ts index a2a5cca7b147..0f727eb24400 100644 --- a/src/common/dom/get_main_window.ts +++ b/src/common/dom/get_main_window.ts @@ -1,8 +1,13 @@ import { MAIN_WINDOW_NAME } from "../../data/main_window"; -export const mainWindow = - window.name === MAIN_WINDOW_NAME - ? window - : parent.name === MAIN_WINDOW_NAME - ? parent - : top!; +export const mainWindow = (() => { + try { + return window.name === MAIN_WINDOW_NAME + ? window + : parent.name === MAIN_WINDOW_NAME + ? parent + : top!; + } catch { + return window; + } +})(); From 8fe7711634c09a01ee02990d2050c0c19299f711 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 27 Feb 2024 08:05:46 -0500 Subject: [PATCH 044/425] Bump es5-ext from 0.10.62 to 0.10.63 (#19883) Bumps [es5-ext](https://github.com/medikoo/es5-ext) from 0.10.62 to 0.10.63. - [Release notes](https://github.com/medikoo/es5-ext/releases) - [Changelog](https://github.com/medikoo/es5-ext/blob/main/CHANGELOG.md) - [Commits](https://github.com/medikoo/es5-ext/compare/v0.10.62...v0.10.63) --- updated-dependencies: - dependency-name: es5-ext dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 31 +++++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/yarn.lock b/yarn.lock index fb0f4f42d5cb..d7d6e089e5a5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7769,14 +7769,15 @@ __metadata: languageName: node linkType: hard -"es5-ext@npm:^0.10.35, es5-ext@npm:^0.10.46, es5-ext@npm:^0.10.50": - version: 0.10.62 - resolution: "es5-ext@npm:0.10.62" +"es5-ext@npm:^0.10.35, es5-ext@npm:^0.10.46, es5-ext@npm:^0.10.50, es5-ext@npm:^0.10.62, es5-ext@npm:~0.10.14": + version: 0.10.63 + resolution: "es5-ext@npm:0.10.63" dependencies: es6-iterator: "npm:^2.0.3" es6-symbol: "npm:^3.1.3" + esniff: "npm:^2.0.1" next-tick: "npm:^1.1.0" - checksum: 10/3f6a3bcdb7ff82aaf65265799729828023c687a2645da04005b8f1dc6676a0c41fd06571b2517f89dcf143e0268d3d9ef0fdfd536ab74580083204c688d6fb45 + checksum: 10/69e373ffcf4664f12697adfab4a043a5cd93386c5e9d9b3eda4bd59f3591c7bebba3647475a3c9ccb1b48ec941b93c9507bf54727f0311a65e7220bc895eade9 languageName: node linkType: hard @@ -8121,6 +8122,18 @@ __metadata: languageName: node linkType: hard +"esniff@npm:^2.0.1": + version: 2.0.1 + resolution: "esniff@npm:2.0.1" + dependencies: + d: "npm:^1.0.1" + es5-ext: "npm:^0.10.62" + event-emitter: "npm:^0.3.5" + type: "npm:^2.7.2" + checksum: 10/f6a2abd2f8c5fe57c5fcf53e5407c278023313d0f6c3a92688e7122ab9ac233029fd424508a196ae5bc561aa1f67d23f4e2435b1a0d378030f476596129056ac + languageName: node + linkType: hard + "espree@npm:^9.6.0, espree@npm:^9.6.1": version: 9.6.1 resolution: "espree@npm:9.6.1" @@ -8199,6 +8212,16 @@ __metadata: languageName: node linkType: hard +"event-emitter@npm:^0.3.5": + version: 0.3.5 + resolution: "event-emitter@npm:0.3.5" + dependencies: + d: "npm:1" + es5-ext: "npm:~0.10.14" + checksum: 10/a7f5ea80029193f4869782d34ef7eb43baa49cd397013add1953491b24588468efbe7e3cc9eb87d53f33397e7aab690fd74c079ec440bf8b12856f6bdb6e9396 + languageName: node + linkType: hard + "eventemitter3@npm:^4.0.0": version: 4.0.7 resolution: "eventemitter3@npm:4.0.7" From d6d61a4137cc91998d3883d2d8348d0bd030bbcd Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Tue, 27 Feb 2024 09:05:28 -0500 Subject: [PATCH 045/425] Show script fields in Script more info dialog (#19879) * Show script fields in more info dialog * Apply suggestions from code review Co-authored-by: Bram Kragten * Guard for state obj changes * Update src/components/ha-service-control.ts Co-authored-by: Marc Geurts --------- Co-authored-by: Bram Kragten Co-authored-by: Marc Geurts --- src/components/ha-service-control.ts | 58 +++++---- src/dialogs/more-info/const.ts | 2 +- .../more-info/controls/more-info-script.ts | 110 +++++++++++++++++- .../entity-rows/hui-script-entity-row.ts | 12 +- src/state-summary/state-card-script.ts | 13 ++- 5 files changed, 166 insertions(+), 29 deletions(-) diff --git a/src/components/ha-service-control.ts b/src/components/ha-service-control.ts index 57c3e2b3baa9..778216f7926f 100644 --- a/src/components/ha-service-control.ts +++ b/src/components/ha-service-control.ts @@ -93,6 +93,8 @@ export class HaServiceControl extends LitElement { @property({ type: Boolean, reflect: true }) public hidePicker = false; + @property({ type: Boolean }) public hideDescription = false; + @state() private _value!: this["value"]; @state() private _checkedKeys = new Set(); @@ -373,7 +375,8 @@ export class HaServiceControl extends LitElement { )) || serviceData?.description; - return html`${this.hidePicker + return html` + ${this.hidePicker ? nothing : html``} -
    + ${this.hideDescription + ? nothing + : html` +
    + ${description ? html`

    ${description}

    ` : ""} + ${this._manifest + ? html` + + ` + : nothing} +
    + `} ${serviceData && "target" in serviceData ? html` ${hasOptional @@ -517,7 +524,8 @@ export class HaServiceControl extends LitElement { > ` : ""; - })}`; + })} + `; } private _localizeValueCallback = (key: string) => { diff --git a/src/dialogs/more-info/const.ts b/src/dialogs/more-info/const.ts index 65375a6f6d3d..b9fe72039a43 100644 --- a/src/dialogs/more-info/const.ts +++ b/src/dialogs/more-info/const.ts @@ -5,7 +5,7 @@ import { computeGroupDomain, GroupEntity } from "../../data/group"; import { CONTINUOUS_DOMAINS } from "../../data/logbook"; import { HomeAssistant } from "../../types"; -export const DOMAINS_NO_INFO = ["camera", "configurator"]; +export const DOMAINS_NO_INFO = ["camera", "configurator", "script"]; /** * Entity domains that should be editable *if* they have an id present; * {@see shouldShowEditIcon}. diff --git a/src/dialogs/more-info/controls/more-info-script.ts b/src/dialogs/more-info/controls/more-info-script.ts index c53da01be120..aed21e711e64 100644 --- a/src/dialogs/more-info/controls/more-info-script.ts +++ b/src/dialogs/more-info/controls/more-info-script.ts @@ -1,8 +1,21 @@ +import "@material/mwc-button"; import { HassEntity } from "home-assistant-js-websocket"; -import { css, CSSResultGroup, html, LitElement, nothing } from "lit"; +import { + css, + CSSResultGroup, + html, + LitElement, + nothing, + PropertyValues, +} from "lit"; import { customElement, property } from "lit/decorators"; import "../../../components/ha-relative-time"; +import "../../../components/ha-service-control"; +import "../../../components/entity/state-info"; import { HomeAssistant } from "../../../types"; +import { canRun, ScriptEntity } from "../../../data/script"; +import { isUnavailableState } from "../../../data/entity"; +import { computeObjectId } from "../../../common/entity/compute_object_id"; @customElement("more-info-script") class MoreInfoScript extends LitElement { @@ -10,12 +23,61 @@ class MoreInfoScript extends LitElement { @property({ attribute: false }) public stateObj?: HassEntity; + private _scriptData: Record = {}; + protected render() { if (!this.hass || !this.stateObj) { return nothing; } + const stateObj = this.stateObj as ScriptEntity; + + const fields = + this.hass.services.script[computeObjectId(this.stateObj.entity_id)] + ?.fields; + + const hasFields = fields && Object.keys(fields).length > 0; return html` +
    + + ${stateObj.state === "on" + ? html` + ${stateObj.attributes.mode !== "single" && + (stateObj.attributes.current || 0) > 0 + ? this.hass.localize("ui.card.script.cancel_multiple", { + number: stateObj.attributes.current, + }) + : this.hass.localize("ui.card.script.cancel")} + ` + : nothing} + ${stateObj.state === "off" || stateObj.attributes.max + ? html` + ${this.hass!.localize("ui.card.script.run")} + ` + : nothing} +
    + + ${hasFields + ? html` + + ` + : nothing} +
    @@ -36,17 +98,63 @@ class MoreInfoScript extends LitElement { `; } + protected override willUpdate(changedProperties: PropertyValues): void { + super.willUpdate(changedProperties); + + if (!changedProperties.has("stateObj")) { + return; + } + + const oldState = changedProperties.get("stateObj") as + | HassEntity + | undefined; + const newState = this.stateObj; + + if (newState && (!oldState || oldState.entity_id !== newState.entity_id)) { + this._scriptData = { service: newState.entity_id, data: {} }; + } + } + + private _cancelScript(ev: Event) { + ev.stopPropagation(); + this._callService("turn_off"); + } + + private async _runScript(ev: Event) { + ev.stopPropagation(); + this.hass.callService( + "script", + computeObjectId(this.stateObj!.entity_id), + this._scriptData + ); + } + + private _callService(service: string): void { + this.hass.callService("script", service, { + entity_id: this.stateObj!.entity_id, + }); + } + + private _scriptDataChanged(ev: CustomEvent): void { + this._scriptData = { ...this._scriptData, ...ev.detail.value }; + } + static get styles(): CSSResultGroup { return css` .flex { display: flex; justify-content: space-between; + margin-bottom: 16px; } hr { border-color: var(--divider-color); border-bottom: none; margin: 16px 0; } + ha-service-control { + --service-control-padding: 0; + --service-control-items-border-top: none; + } `; } } diff --git a/src/panels/lovelace/entity-rows/hui-script-entity-row.ts b/src/panels/lovelace/entity-rows/hui-script-entity-row.ts index 6fa20512ea05..1147d405b42e 100644 --- a/src/panels/lovelace/entity-rows/hui-script-entity-row.ts +++ b/src/panels/lovelace/entity-rows/hui-script-entity-row.ts @@ -15,6 +15,8 @@ import { hasConfigOrEntityChanged } from "../common/has-changed"; import "../components/hui-generic-entity-row"; import { createEntityNotFoundWarning } from "../components/hui-warning"; import { ActionRowConfig, LovelaceRow } from "./types"; +import { computeObjectId } from "../../../common/entity/compute_object_id"; +import { showMoreInfoDialog } from "../../../dialogs/more-info/show-ha-more-info-dialog"; @customElement("hui-script-entity-row") class HuiScriptEntityRow extends LitElement implements LovelaceRow { @@ -92,7 +94,15 @@ class HuiScriptEntityRow extends LitElement implements LovelaceRow { private _runScript(ev): void { ev.stopPropagation(); - this._callService("turn_on"); + + const fields = + this.hass!.services.script[computeObjectId(this._config!.entity)]?.fields; + + if (fields && Object.keys(fields).length > 0) { + showMoreInfoDialog(this, { entityId: this._config!.entity }); + } else { + this._callService("turn_on"); + } } private _callService(service: string): void { diff --git a/src/state-summary/state-card-script.ts b/src/state-summary/state-card-script.ts index f8014684e783..fc375d8d25f5 100644 --- a/src/state-summary/state-card-script.ts +++ b/src/state-summary/state-card-script.ts @@ -8,6 +8,8 @@ import { isUnavailableState } from "../data/entity"; import { canRun, ScriptEntity } from "../data/script"; import { haStyle } from "../resources/styles"; import { HomeAssistant } from "../types"; +import { computeObjectId } from "../common/entity/compute_object_id"; +import { showMoreInfoDialog } from "../dialogs/more-info/show-ha-more-info-dialog"; @customElement("state-card-script") class StateCardScript extends LitElement { @@ -56,7 +58,16 @@ class StateCardScript extends LitElement { private _runScript(ev: Event) { ev.stopPropagation(); - this._callService("turn_on"); + + const fields = + this.hass!.services.script[computeObjectId(this.stateObj.entity_id)] + ?.fields; + + if (fields && Object.keys(fields).length > 0) { + showMoreInfoDialog(this, { entityId: this.stateObj.entity_id }); + } else { + this._callService("turn_on"); + } } private _callService(service: string): void { From 45e09a262b6be5dfd933ee0d7f144f454cb017d0 Mon Sep 17 00:00:00 2001 From: Steve Repsher Date: Tue, 27 Feb 2024 09:20:13 -0500 Subject: [PATCH 046/425] Fix issues with state_color as false (#19776) * Fix issues with state_color as false * Remove format from glance timestamp * Restore type assertion hack and remove conditional * Revert "removal of glance timestamp format and adjust types to make it work * Revert to minimal change just to pass false state_color --- src/components/entity/state-badge.ts | 6 ++++-- src/panels/lovelace/cards/hui-button-card.ts | 6 +----- src/panels/lovelace/cards/hui-entities-card.ts | 4 ++-- src/panels/lovelace/cards/hui-entity-card.ts | 6 +----- src/panels/lovelace/cards/hui-glance-card.ts | 17 ++++++++--------- src/panels/lovelace/cards/types.ts | 6 ++++-- 6 files changed, 20 insertions(+), 25 deletions(-) diff --git a/src/components/entity/state-badge.ts b/src/components/entity/state-badge.ts index 75d077ed51f7..13b874a5e4c9 100644 --- a/src/components/entity/state-badge.ts +++ b/src/components/entity/state-badge.ts @@ -32,7 +32,9 @@ export class StateBadge extends LitElement { @property() public overrideImage?: string; - @property({ type: Boolean }) public stateColor = false; + // Cannot be a boolean attribute because undefined is treated different than + // false. When it is undefined, state is still colored for light entities. + @property({ attribute: false }) public stateColor?: boolean; @property() public color?: string; @@ -70,7 +72,7 @@ export class StateBadge extends LitElement { const domain = this.stateObj ? computeStateDomain(this.stateObj) : undefined; - return this.stateColor || (domain === "light" && this.stateColor !== false); + return this.stateColor ?? domain === "light"; } protected render() { diff --git a/src/panels/lovelace/cards/hui-button-card.ts b/src/panels/lovelace/cards/hui-button-card.ts index 2d440a303688..3a37329b27dc 100644 --- a/src/panels/lovelace/cards/hui-button-card.ts +++ b/src/panels/lovelace/cards/hui-button-card.ts @@ -134,11 +134,7 @@ export class HuiButtonCard extends LitElement implements LovelaceCard { private getStateColor(stateObj: HassEntity, config: ButtonCardConfig) { const domain = stateObj ? computeStateDomain(stateObj) : undefined; - return ( - config && - (config.state_color || - (domain === "light" && config.state_color !== false)) - ); + return config && (config.state_color ?? domain === "light"); } public getCardSize(): number { diff --git a/src/panels/lovelace/cards/hui-entities-card.ts b/src/panels/lovelace/cards/hui-entities-card.ts index 3d5b46449eb2..4fb12c466175 100644 --- a/src/panels/lovelace/cards/hui-entities-card.ts +++ b/src/panels/lovelace/cards/hui-entities-card.ts @@ -297,9 +297,9 @@ class HuiEntitiesCard extends LitElement implements LovelaceCard { private renderEntity(entityConf: LovelaceRowConfig): TemplateResult { const element = createRowElement( (!("type" in entityConf) || entityConf.type === "conditional") && - this._config!.state_color + "state_color" in this._config! ? ({ - state_color: true, + state_color: this._config.state_color, ...(entityConf as EntityConfig), } as EntityConfig) : entityConf diff --git a/src/panels/lovelace/cards/hui-entity-card.ts b/src/panels/lovelace/cards/hui-entity-card.ts index fd1b63e13e3e..e6366cd28b6c 100644 --- a/src/panels/lovelace/cards/hui-entity-card.ts +++ b/src/panels/lovelace/cards/hui-entity-card.ts @@ -75,11 +75,7 @@ export class HuiEntityCard extends LitElement implements LovelaceCard { private getStateColor(stateObj: HassEntity, config: EntityCardConfig) { const domain = stateObj ? computeStateDomain(stateObj) : undefined; - return ( - config && - (config.state_color || - (domain === "light" && config.state_color !== false)) - ); + return config && (config.state_color ?? domain === "light"); } public setConfig(config: EntityCardConfig): void { diff --git a/src/panels/lovelace/cards/hui-glance-card.ts b/src/panels/lovelace/cards/hui-glance-card.ts index d48fb68cfe57..8217da750166 100644 --- a/src/panels/lovelace/cards/hui-glance-card.ts +++ b/src/panels/lovelace/cards/hui-glance-card.ts @@ -89,12 +89,12 @@ export class HuiGlanceCard extends LitElement implements LovelaceCard { state_color: true, ...config, }; - const entities = processConfigEntities( - config.entities - ).map((entityConf) => ({ - hold_action: { action: "more-info" } as MoreInfoActionConfig, - ...entityConf, - })); + const entities = processConfigEntities(config.entities).map( + (entityConf) => ({ + hold_action: { action: "more-info" } as MoreInfoActionConfig, + ...entityConf, + }) + ); for (const entity of entities) { if ( @@ -237,7 +237,7 @@ export class HuiGlanceCard extends LitElement implements LovelaceCard { `; } - private renderEntity(entityConf): TemplateResult { + private renderEntity(entityConf: GlanceConfigEntity): TemplateResult { const stateObj = this.hass!.states[entityConf.entity]; if (!stateObj) { @@ -294,8 +294,7 @@ export class HuiGlanceCard extends LitElement implements LovelaceCard { .stateObj=${stateObj} .overrideIcon=${entityConf.icon} .overrideImage=${entityConf.image} - .stateColor=${(entityConf.state_color === false || - entityConf.state_color) ?? + .stateColor=${entityConf.state_color ?? this._config!.state_color} > ` diff --git a/src/panels/lovelace/cards/types.ts b/src/panels/lovelace/cards/types.ts index 8a57d1b0d5e2..9c353c02b60b 100644 --- a/src/panels/lovelace/cards/types.ts +++ b/src/panels/lovelace/cards/types.ts @@ -4,8 +4,10 @@ import { LovelaceCardConfig } from "../../../data/lovelace/config/card"; import { Statistic, StatisticType } from "../../../data/recorder"; import { ForecastType } from "../../../data/weather"; import { FullCalendarView, TranslationDict } from "../../../types"; +import { LovelaceCardFeatureConfig } from "../card-features/types"; import { Condition, LegacyCondition } from "../common/validate-condition"; import { HuiImage } from "../components/hui-image"; +import { TimestampRenderingFormat } from "../components/types"; import { LovelaceElementConfig } from "../elements/types"; import { EntityConfig, @@ -13,7 +15,6 @@ import { LovelaceRowConfig, } from "../entity-rows/types"; import { LovelaceHeaderFooterConfig } from "../header-footer/types"; -import { LovelaceCardFeatureConfig } from "../card-features/types"; export type AlarmPanelCardConfigState = | "arm_away" @@ -252,6 +253,7 @@ export interface GlanceConfigEntity extends ConfigEntity { image?: string; show_state?: boolean; state_color?: boolean; + format: TimestampRenderingFormat; } export interface GlanceCardConfig extends LovelaceCardConfig { @@ -260,7 +262,7 @@ export interface GlanceCardConfig extends LovelaceCardConfig { show_icon?: boolean; title?: string; theme?: string; - entities: Array; + entities: (string | GlanceConfigEntity)[]; columns?: number; state_color?: boolean; } From dd8c1d359c50b47e28fdf43e7b1f66122c398183 Mon Sep 17 00:00:00 2001 From: karwosts <32912880+karwosts@users.noreply.github.com> Date: Tue, 27 Feb 2024 09:22:34 -0500 Subject: [PATCH 047/425] localize input_select form (#19829) --- src/panels/config/helpers/forms/ha-input_select-form.ts | 9 +++++++-- src/translations/en.json | 6 +++++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/panels/config/helpers/forms/ha-input_select-form.ts b/src/panels/config/helpers/forms/ha-input_select-form.ts index e5a16fb54af0..47ebdc6e32ec 100644 --- a/src/panels/config/helpers/forms/ha-input_select-form.ts +++ b/src/panels/config/helpers/forms/ha-input_select-form.ts @@ -177,8 +177,13 @@ class HaInputSelectForm extends LitElement { const index = (ev.target as any).index; if ( !(await showConfirmationDialog(this, { - title: "Delete this item?", - text: "Are you sure you want to delete this item?", + title: this.hass.localize( + "ui.dialogs.helper_settings.input_select.confirm_delete.delete" + ), + text: this.hass.localize( + "ui.dialogs.helper_settings.input_select.confirm_delete.prompt" + ), + destructive: true, })) ) { return; diff --git a/src/translations/en.json b/src/translations/en.json index 972c6753f50b..c5a3c72808dc 100644 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -1371,7 +1371,11 @@ "add_option": "[%key:ui::panel::config::automation::editor::actions::type::choose::add_option%]", "remove_option": "[%key:ui::panel::config::automation::editor::actions::type::choose::remove_option%]", "no_options": "There are no options yet.", - "add": "Add" + "add": "Add", + "confirm_delete": { + "delete": "[%key:ui::components::todo::item::confirm_delete::delete%]", + "prompt": "[%key:ui::components::todo::item::confirm_delete::prompt%]" + } }, "counter": { "minimum": "Minimum value", From fb3c94f4039bda8f235a50837321b657caa1d00f Mon Sep 17 00:00:00 2001 From: karwosts <32912880+karwosts@users.noreply.github.com> Date: Tue, 27 Feb 2024 09:24:42 -0500 Subject: [PATCH 048/425] Improve map/zone navigation (#19740) * Improve map/zone navigation * dont remove tabs --- src/panels/config/zone/ha-config-zone.ts | 6 +++++- src/panels/map/ha-panel-map.ts | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/panels/config/zone/ha-config-zone.ts b/src/panels/config/zone/ha-config-zone.ts index bf56ed7ce525..2455bf2b4818 100644 --- a/src/panels/config/zone/ha-config-zone.ts +++ b/src/panels/config/zone/ha-config-zone.ts @@ -58,6 +58,8 @@ export class HaConfigZone extends SubscribeMixin(LitElement) { @property({ attribute: false }) public route!: Route; + @state() private _searchParms = new URLSearchParams(window.location.search); + @state() private _storageItems?: Zone[]; @state() private _stateItems?: HassEntity[]; @@ -219,7 +221,9 @@ export class HaConfigZone extends SubscribeMixin(LitElement) { .hass=${this.hass} .narrow=${this.narrow} .route=${this.route} - back-path="/config" + .backPath=${this._searchParms.has("historyBack") + ? undefined + : "/config"} .tabs=${configSections.areas} > ${this.narrow diff --git a/src/panels/map/ha-panel-map.ts b/src/panels/map/ha-panel-map.ts index b7698ca18608..d6c1cbd1fbde 100644 --- a/src/panels/map/ha-panel-map.ts +++ b/src/panels/map/ha-panel-map.ts @@ -46,7 +46,7 @@ class HaPanelMap extends LitElement { } private _openZonesEditor() { - navigate("/config/zone"); + navigate("/config/zone?historyBack=1"); } public willUpdate(changedProps: PropertyValues) { From 29954e530e62ab3cc2788fb5ccf812d12d84899d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20S=C3=B8rensen?= Date: Tue, 27 Feb 2024 15:36:16 +0100 Subject: [PATCH 049/425] Hide the core backup integration if hassio is loaded (#19833) * Hide the core backup integration if hassio is loaded * Combine to single entry --- src/common/config/can_show_page.ts | 11 ++++++++++- src/layouts/hass-tabs-subpage.ts | 1 + src/panels/config/ha-panel-config.ts | 1 + 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/common/config/can_show_page.ts b/src/common/config/can_show_page.ts index 0e4fdd0ecd45..322839010f62 100644 --- a/src/common/config/can_show_page.ts +++ b/src/common/config/can_show_page.ts @@ -1,10 +1,12 @@ import { PageNavigation } from "../../layouts/hass-tabs-subpage"; import { HomeAssistant } from "../../types"; +import { ensureArray } from "../array/ensure-array"; import { isComponentLoaded } from "./is_component_loaded"; export const canShowPage = (hass: HomeAssistant, page: PageNavigation) => (isCore(page) || isLoadedIntegration(hass, page)) && - !hideAdvancedPage(hass, page); + !hideAdvancedPage(hass, page) && + isNotLoadedIntegration(hass, page); const isLoadedIntegration = (hass: HomeAssistant, page: PageNavigation) => page.component @@ -14,6 +16,13 @@ const isLoadedIntegration = (hass: HomeAssistant, page: PageNavigation) => isComponentLoaded(hass, integration) ) : true; + +const isNotLoadedIntegration = (hass: HomeAssistant, page: PageNavigation) => + !page.not_component || + !ensureArray(page.not_component).some((integration) => + isComponentLoaded(hass, integration) + ); + const isCore = (page: PageNavigation) => page.core; const isAdvancedPage = (page: PageNavigation) => page.advancedOnly; const userWantsAdvanced = (hass: HomeAssistant) => hass.userData?.showAdvanced; diff --git a/src/layouts/hass-tabs-subpage.ts b/src/layouts/hass-tabs-subpage.ts index 9de45b8a4a21..9d91dfb8589f 100644 --- a/src/layouts/hass-tabs-subpage.ts +++ b/src/layouts/hass-tabs-subpage.ts @@ -26,6 +26,7 @@ export interface PageNavigation { component?: string; components?: string[]; name?: string; + not_component?: string | string[]; core?: boolean; advancedOnly?: boolean; iconPath?: string; diff --git a/src/panels/config/ha-panel-config.ts b/src/panels/config/ha-panel-config.ts index e6aacf6fd5e6..0b56058a9383 100644 --- a/src/panels/config/ha-panel-config.ts +++ b/src/panels/config/ha-panel-config.ts @@ -309,6 +309,7 @@ export const configSections: { [name: string]: PageNavigation[] } = { iconPath: mdiBackupRestore, iconColor: "#0D47A1", component: "backup", + not_component: "hassio", }, { path: "/hassio/backups", From babb7235210107ea42af19162a1e1350f8bdfc44 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Tue, 27 Feb 2024 16:05:27 -0500 Subject: [PATCH 050/425] Fix script data (#19894) --- src/dialogs/more-info/controls/more-info-script.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dialogs/more-info/controls/more-info-script.ts b/src/dialogs/more-info/controls/more-info-script.ts index aed21e711e64..a2fc2b118685 100644 --- a/src/dialogs/more-info/controls/more-info-script.ts +++ b/src/dialogs/more-info/controls/more-info-script.ts @@ -125,7 +125,7 @@ class MoreInfoScript extends LitElement { this.hass.callService( "script", computeObjectId(this.stateObj!.entity_id), - this._scriptData + this._scriptData.data ); } From a479c6e7860dd1f933904773de23ecd9f2609884 Mon Sep 17 00:00:00 2001 From: karwosts <32912880+karwosts@users.noreply.github.com> Date: Tue, 27 Feb 2024 23:02:39 -0500 Subject: [PATCH 051/425] Download energy panel data to CSV (#19863) * Download energy panel data to CSV * table format changes * unique types for cost/compensation --- src/data/energy.ts | 2 +- src/panels/energy/ha-panel-energy.ts | 199 ++++++++++++++++++++++++++- src/translations/en.json | 1 + 3 files changed, 200 insertions(+), 2 deletions(-) diff --git a/src/data/energy.ts b/src/data/energy.ts index 32340c020940..a811199ceea7 100644 --- a/src/data/energy.ts +++ b/src/data/energy.ts @@ -781,7 +781,7 @@ export const getEnergyGasUnit = ( : "ft³"; }; -export const getEnergyWaterUnit = (hass: HomeAssistant): string | undefined => +export const getEnergyWaterUnit = (hass: HomeAssistant): string => hass.config.unit_system.length === "km" ? "L" : "gal"; export const energyStatisticHelpUrl = diff --git a/src/panels/energy/ha-panel-energy.ts b/src/panels/energy/ha-panel-energy.ts index a9462d0edb12..4dd6498ae452 100644 --- a/src/panels/energy/ha-panel-energy.ts +++ b/src/panels/energy/ha-panel-energy.ts @@ -7,7 +7,7 @@ import { html, nothing, } from "lit"; -import { mdiPencil } from "@mdi/js"; +import { mdiPencil, mdiDownload } from "@mdi/js"; import { customElement, property, state } from "lit/decorators"; import "../../components/ha-menu-button"; import "../../components/ha-list-item"; @@ -19,6 +19,18 @@ import "../lovelace/components/hui-energy-period-selector"; import { Lovelace } from "../lovelace/types"; import "../lovelace/views/hui-view"; import { navigate } from "../../common/navigate"; +import { + getEnergyDataCollection, + getEnergyGasUnit, + getEnergyWaterUnit, + GridSourceTypeEnergyPreference, + SolarSourceTypeEnergyPreference, + BatterySourceTypeEnergyPreference, + GasSourceTypeEnergyPreference, + WaterSourceTypeEnergyPreference, + DeviceConsumptionEnergyPreference, +} from "../../data/energy"; +import { fileDownload } from "../../util/file_download"; const ENERGY_LOVELACE_CONFIG: LovelaceConfig = { views: [ @@ -86,6 +98,15 @@ class PanelEnergy extends LitElement { ${this.hass!.localize("ui.panel.energy.configure")} + + + + ${this.hass!.localize("ui.panel.energy.download_data")} + ` : nothing} @@ -122,6 +143,182 @@ class PanelEnergy extends LitElement { navigate("/config/energy?historyBack=1"); } + private async _dumpCSV(ev) { + ev.stopPropagation(); + const energyData = getEnergyDataCollection(this.hass, { + key: "energy_dashboard", + }); + + if (!energyData.prefs || !energyData.state.stats) { + return; + } + + const gasUnit = + getEnergyGasUnit( + this.hass, + energyData.prefs, + energyData.state.statsMetadata + ) || ""; + const waterUnit = getEnergyWaterUnit(this.hass); + const electricUnit = "kWh"; + + const energy_sources = energyData.prefs.energy_sources; + const device_consumption = energyData.prefs.device_consumption; + const stats = energyData.state.stats; + + const timeSet = new Set(); + Object.values(stats).forEach((stat) => { + stat.forEach((datapoint) => { + timeSet.add(datapoint.start); + }); + }); + const times = Array.from(timeSet).sort(); + + const headers = + "entity_id,type,unit," + + times.map((t) => new Date(t).toISOString()).join(",") + + "\n"; + const csv: string[] = []; + csv[0] = headers; + + const processStat = function (stat: string, type: string, unit: string) { + let n = 0; + const row: string[] = []; + if (!stats[stat]) { + return; + } + row.push(stat); + row.push(type); + row.push(unit.normalize("NFKD")); + times.forEach((t) => { + if (stats[stat][n].start > t) { + row.push(""); + } else if (n < stats[stat].length && stats[stat][n].start === t) { + row.push((stats[stat][n].change ?? "").toString()); + n++; + } else { + row.push(""); + } + }); + csv.push(row.join(",") + "\n"); + }; + + const currency = this.hass.config.currency; + + const printCategory = function ( + type: string, + statIds: string[], + unit: string, + costType?: string + ) { + if (statIds.length) { + statIds.forEach((stat) => processStat(stat, type, unit)); + if (costType) { + statIds.forEach((stat) => { + const costStat = energyData.state.info.cost_sensors[stat]; + if (energyData.state.info.cost_sensors[stat]) { + processStat(costStat, costType, currency); + } + }); + } + } + }; + + const grid_consumptions: string[] = []; + const grid_productions: string[] = []; + energy_sources + .filter((s) => s.type === "grid") + .forEach((source) => { + source = source as GridSourceTypeEnergyPreference; + source.flow_from.forEach((flowFrom) => { + grid_consumptions.push(flowFrom.stat_energy_from); + }); + source.flow_to.forEach((flowTo) => { + grid_productions.push(flowTo.stat_energy_to); + }); + }); + + printCategory( + "grid_consumption", + grid_consumptions, + electricUnit, + "grid_consumption_cost" + ); + printCategory( + "grid_return", + grid_productions, + electricUnit, + "grid_return_compensation" + ); + + const battery_ins: string[] = []; + const battery_outs: string[] = []; + energy_sources + .filter((s) => s.type === "battery") + .forEach((source) => { + source = source as BatterySourceTypeEnergyPreference; + battery_ins.push(source.stat_energy_to); + battery_outs.push(source.stat_energy_from); + }); + + printCategory("battery_in", battery_ins, electricUnit); + printCategory("battery_out", battery_outs, electricUnit); + + const solar_productions: string[] = []; + energy_sources + .filter((s) => s.type === "solar") + .forEach((source) => { + source = source as SolarSourceTypeEnergyPreference; + solar_productions.push(source.stat_energy_from); + }); + + printCategory("solar_production", solar_productions, electricUnit); + + const gas_consumptions: string[] = []; + energy_sources + .filter((s) => s.type === "gas") + .forEach((source) => { + source = source as GasSourceTypeEnergyPreference; + gas_consumptions.push(source.stat_energy_from); + }); + + printCategory( + "gas_consumption", + gas_consumptions, + gasUnit, + "gas_consumption_cost" + ); + + const water_consumptions: string[] = []; + energy_sources + .filter((s) => s.type === "water") + .forEach((source) => { + source = source as WaterSourceTypeEnergyPreference; + water_consumptions.push(source.stat_energy_from); + }); + + printCategory( + "water_consumption", + water_consumptions, + waterUnit, + "water_consumption_cost" + ); + + const devices: string[] = []; + device_consumption.forEach((source) => { + source = source as DeviceConsumptionEnergyPreference; + devices.push(source.stat_consumption); + }); + + printCategory("device_consumption", devices, electricUnit); + + const blob = new Blob(csv, { + type: "text/csv", + }); + const url = window.URL.createObjectURL(blob); + fileDownload(url, "energy.csv"); + } + private _reloadView() { // Force strategy to be re-run by make a copy of the view const config = this._lovelace!.config; diff --git a/src/translations/en.json b/src/translations/en.json index c5a3c72808dc..1ad7fed83a65 100644 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -6538,6 +6538,7 @@ } }, "energy": { + "download_data": "[%key:ui::panel::history::download_data%]", "configure": "[%key:ui::dialogs::quick-bar::commands::navigation::energy%]", "compare": { "info": "You are comparing the period {start} with the period {end}" From 841b9c0917a7c7efed7a31a77a08a4728ff7118e Mon Sep 17 00:00:00 2001 From: Erik Montnemery Date: Wed, 28 Feb 2024 11:12:19 +0100 Subject: [PATCH 052/425] Add support for translation domain in data entry flows (#19900) --- src/data/data_entry_flow.ts | 6 ++++++ .../config-flow/show-dialog-config-flow.ts | 20 +++++++++---------- .../config-flow/show-dialog-options-flow.ts | 16 +++++++-------- 3 files changed, 24 insertions(+), 18 deletions(-) diff --git a/src/data/data_entry_flow.ts b/src/data/data_entry_flow.ts index 7a830e7d8846..d60e55beabf5 100644 --- a/src/data/data_entry_flow.ts +++ b/src/data/data_entry_flow.ts @@ -33,6 +33,7 @@ export interface DataEntryFlowStepForm { description_placeholders?: Record; last_step: boolean | null; preview?: string; + translation_domain?: string; } export interface DataEntryFlowStepExternal { @@ -42,6 +43,7 @@ export interface DataEntryFlowStepExternal { step_id: string; url: string; description_placeholders: Record; + translation_domain?: string; } export interface DataEntryFlowStepCreateEntry { @@ -53,6 +55,7 @@ export interface DataEntryFlowStepCreateEntry { result?: ConfigEntry; description: string; description_placeholders?: Record; + translation_domain?: string; } export interface DataEntryFlowStepAbort { @@ -61,6 +64,7 @@ export interface DataEntryFlowStepAbort { handler: string; reason: string; description_placeholders?: Record; + translation_domain?: string; } export interface DataEntryFlowStepProgress { @@ -70,6 +74,7 @@ export interface DataEntryFlowStepProgress { step_id: string; progress_action: string; description_placeholders?: Record; + translation_domain?: string; } export interface DataEntryFlowStepMenu { @@ -80,6 +85,7 @@ export interface DataEntryFlowStepMenu { /** If array, use value to lookup translations in strings.json */ menu_options: string[] | Record; description_placeholders?: Record; + translation_domain?: string; } export type DataEntryFlowStep = diff --git a/src/dialogs/config-flow/show-dialog-config-flow.ts b/src/dialogs/config-flow/show-dialog-config-flow.ts index 9ccc58184015..8b2b6b166760 100644 --- a/src/dialogs/config-flow/show-dialog-config-flow.ts +++ b/src/dialogs/config-flow/show-dialog-config-flow.ts @@ -44,7 +44,7 @@ export const showConfigFlowDialog = ( renderAbortDescription(hass, step) { const description = hass.localize( - `component.${step.handler}.config.abort.${step.reason}`, + `component.${step.translation_domain || step.handler}.config.abort.${step.reason}`, step.description_placeholders ); @@ -58,7 +58,7 @@ export const showConfigFlowDialog = ( renderShowFormStepHeader(hass, step) { return ( hass.localize( - `component.${step.handler}.config.step.${step.step_id}.title`, + `component.${step.translation_domain || step.handler}.config.step.${step.step_id}.title`, step.description_placeholders ) || hass.localize(`component.${step.handler}.title`) ); @@ -66,7 +66,7 @@ export const showConfigFlowDialog = ( renderShowFormStepDescription(hass, step) { const description = hass.localize( - `component.${step.handler}.config.step.${step.step_id}.description`, + `component.${step.translation_domain || step.handler}.config.step.${step.step_id}.description`, step.description_placeholders ); return description @@ -84,7 +84,7 @@ export const showConfigFlowDialog = ( renderShowFormStepFieldHelper(hass, step, field) { const description = hass.localize( - `component.${step.handler}.config.step.${step.step_id}.data_description.${field.name}`, + `component.${step.translation_domain || step.handler}.config.step.${step.step_id}.data_description.${field.name}`, step.description_placeholders ); return description @@ -95,7 +95,7 @@ export const showConfigFlowDialog = ( renderShowFormStepFieldError(hass, step, error) { return ( hass.localize( - `component.${step.handler}.config.error.${error}`, + `component.${step.translation_domain || step.translation_domain || step.handler}.config.error.${error}`, step.description_placeholders ) || error ); @@ -131,7 +131,7 @@ export const showConfigFlowDialog = ( renderExternalStepDescription(hass, step) { const description = hass.localize( - `component.${step.handler}.config.${step.step_id}.description`, + `component.${step.translation_domain || step.handler}.config.${step.step_id}.description`, step.description_placeholders ); @@ -155,7 +155,7 @@ export const showConfigFlowDialog = ( renderCreateEntryDescription(hass, step) { const description = hass.localize( - `component.${step.handler}.config.create_entry.${ + `component.${step.translation_domain || step.handler}.config.create_entry.${ step.description || "default" }`, step.description_placeholders @@ -190,7 +190,7 @@ export const showConfigFlowDialog = ( renderShowFormProgressDescription(hass, step) { const description = hass.localize( - `component.${step.handler}.config.progress.${step.progress_action}`, + `component.${step.translation_domain || step.handler}.config.progress.${step.progress_action}`, step.description_placeholders ); return description @@ -210,7 +210,7 @@ export const showConfigFlowDialog = ( renderMenuDescription(hass, step) { const description = hass.localize( - `component.${step.handler}.config.step.${step.step_id}.description`, + `component.${step.translation_domain || step.handler}.config.step.${step.step_id}.description`, step.description_placeholders ); return description @@ -222,7 +222,7 @@ export const showConfigFlowDialog = ( renderMenuOption(hass, step, option) { return hass.localize( - `component.${step.handler}.config.step.${step.step_id}.menu_options.${option}`, + `component.${step.translation_domain || step.handler}.config.step.${step.step_id}.menu_options.${option}`, step.description_placeholders ); }, diff --git a/src/dialogs/config-flow/show-dialog-options-flow.ts b/src/dialogs/config-flow/show-dialog-options-flow.ts index 05f3acc1b4f0..491df7e91faf 100644 --- a/src/dialogs/config-flow/show-dialog-options-flow.ts +++ b/src/dialogs/config-flow/show-dialog-options-flow.ts @@ -53,7 +53,7 @@ export const showOptionsFlowDialog = ( renderAbortDescription(hass, step) { const description = hass.localize( - `component.${configEntry.domain}.options.abort.${step.reason}`, + `component.${step.translation_domain || configEntry.domain}.options.abort.${step.reason}`, step.description_placeholders ); @@ -71,7 +71,7 @@ export const showOptionsFlowDialog = ( renderShowFormStepHeader(hass, step) { return ( hass.localize( - `component.${configEntry.domain}.options.step.${step.step_id}.title`, + `component.${step.translation_domain || configEntry.domain}.options.step.${step.step_id}.title`, step.description_placeholders ) || hass.localize(`ui.dialogs.options_flow.form.header`) ); @@ -79,7 +79,7 @@ export const showOptionsFlowDialog = ( renderShowFormStepDescription(hass, step) { const description = hass.localize( - `component.${configEntry.domain}.options.step.${step.step_id}.description`, + `component.${step.translation_domain || configEntry.domain}.options.step.${step.step_id}.description`, step.description_placeholders ); return description @@ -101,7 +101,7 @@ export const showOptionsFlowDialog = ( renderShowFormStepFieldHelper(hass, step, field) { const description = hass.localize( - `component.${configEntry.domain}.options.step.${step.step_id}.data_description.${field.name}`, + `component.${step.translation_domain || configEntry.domain}.options.step.${step.step_id}.data_description.${field.name}`, step.description_placeholders ); return description @@ -112,7 +112,7 @@ export const showOptionsFlowDialog = ( renderShowFormStepFieldError(hass, step, error) { return ( hass.localize( - `component.${configEntry.domain}.options.error.${error}`, + `component.${step.translation_domain || configEntry.domain}.options.error.${error}`, step.description_placeholders ) || error ); @@ -159,7 +159,7 @@ export const showOptionsFlowDialog = ( renderShowFormProgressDescription(hass, step) { const description = hass.localize( - `component.${configEntry.domain}.options.progress.${step.progress_action}`, + `component.${step.translation_domain || configEntry.domain}.options.progress.${step.progress_action}`, step.description_placeholders ); return description @@ -183,7 +183,7 @@ export const showOptionsFlowDialog = ( renderMenuDescription(hass, step) { const description = hass.localize( - `component.${configEntry.domain}.options.step.${step.step_id}.description`, + `component.${step.translation_domain || configEntry.domain}.options.step.${step.step_id}.description`, step.description_placeholders ); return description @@ -199,7 +199,7 @@ export const showOptionsFlowDialog = ( renderMenuOption(hass, step, option) { return hass.localize( - `component.${configEntry.domain}.options.step.${step.step_id}.menu_options.${option}`, + `component.${step.translation_domain || configEntry.domain}.options.step.${step.step_id}.menu_options.${option}`, step.description_placeholders ); }, From 3afc218adc66d0d43e59da91e87cda222e07a6f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20S=C3=B8rensen?= Date: Wed, 28 Feb 2024 11:25:41 +0100 Subject: [PATCH 053/425] Combine component/components PageNavigation keys (#19890) * Combine component/components PageNavigation keys * Update src/panels/config/ha-panel-config.ts --- src/common/config/can_show_page.ts | 11 ++++------- src/layouts/hass-tabs-subpage.ts | 15 +++------------ src/panels/config/ha-panel-config.ts | 6 +++--- 3 files changed, 10 insertions(+), 22 deletions(-) diff --git a/src/common/config/can_show_page.ts b/src/common/config/can_show_page.ts index 322839010f62..d73ebc5e2e38 100644 --- a/src/common/config/can_show_page.ts +++ b/src/common/config/can_show_page.ts @@ -9,13 +9,10 @@ export const canShowPage = (hass: HomeAssistant, page: PageNavigation) => isNotLoadedIntegration(hass, page); const isLoadedIntegration = (hass: HomeAssistant, page: PageNavigation) => - page.component - ? isComponentLoaded(hass, page.component) - : page.components - ? page.components.some((integration) => - isComponentLoaded(hass, integration) - ) - : true; + !page.component || + ensureArray(page.component).some((integration) => + isComponentLoaded(hass, integration) + ); const isNotLoadedIntegration = (hass: HomeAssistant, page: PageNavigation) => !page.not_component || diff --git a/src/layouts/hass-tabs-subpage.ts b/src/layouts/hass-tabs-subpage.ts index 9d91dfb8589f..3fe46f845674 100644 --- a/src/layouts/hass-tabs-subpage.ts +++ b/src/layouts/hass-tabs-subpage.ts @@ -10,7 +10,6 @@ import { import { customElement, eventOptions, property, state } from "lit/decorators"; import { classMap } from "lit/directives/class-map"; import memoizeOne from "memoize-one"; -import { isComponentLoaded } from "../common/config/is_component_loaded"; import { restoreScroll } from "../common/decorators/restore-scroll"; import { LocalizeFunc } from "../common/translations/localize"; import "../components/ha-icon-button-arrow-prev"; @@ -19,12 +18,12 @@ import "../components/ha-svg-icon"; import "../components/ha-tab"; import { HomeAssistant, Route } from "../types"; import { haStyleScrollbar } from "../resources/styles"; +import { canShowPage } from "../common/config/can_show_page"; export interface PageNavigation { path: string; translationKey?: string; - component?: string; - components?: string[]; + component?: string | string[]; name?: string; not_component?: string | string[]; core?: boolean; @@ -67,19 +66,12 @@ class HassTabsSubpage extends LitElement { ( tabs: PageNavigation[], activeTab: PageNavigation | undefined, - showAdvanced: boolean | undefined, _components, _language, _narrow, localizeFunc ) => { - const shownTabs = tabs.filter( - (page) => - (!page.component || - page.core || - isComponentLoaded(this.hass, page.component)) && - (!page.advancedOnly || showAdvanced) - ); + const shownTabs = tabs.filter((page) => canShowPage(this.hass, page)); if (shownTabs.length < 2) { if (shownTabs.length === 1) { @@ -128,7 +120,6 @@ class HassTabsSubpage extends LitElement { const tabs = this._getTabs( this.tabs, this._activeTab, - this.hass.userData?.showAdvanced, this.hass.config.components, this.hass.language, this.narrow, diff --git a/src/panels/config/ha-panel-config.ts b/src/panels/config/ha-panel-config.ts index 0b56058a9383..c0028557ec7e 100644 --- a/src/panels/config/ha-panel-config.ts +++ b/src/panels/config/ha-panel-config.ts @@ -74,7 +74,7 @@ export const configSections: { [name: string]: PageNavigation[] } = { translationKey: "areas", iconPath: mdiSofa, iconColor: "#E48629", - components: ["zone"], + component: "zone", }, { path: "/hassio", @@ -108,7 +108,7 @@ export const configSections: { [name: string]: PageNavigation[] } = { translationKey: "people", iconPath: mdiAccount, iconColor: "#5A87FA", - components: ["person", "users"], + component: ["person", "users"], }, { path: "#external-app-configuration", @@ -342,7 +342,7 @@ export const configSections: { [name: string]: PageNavigation[] } = { translationKey: "hardware", iconPath: mdiMemory, iconColor: "#301A8E", - components: ["hassio", "hardware"], + component: ["hassio", "hardware"], }, ], about: [ From 0892ed18e5f2b45878a835caf018f12a28916d57 Mon Sep 17 00:00:00 2001 From: Yosi Levy <37745463+yosilevy@users.noreply.github.com> Date: Wed, 28 Feb 2024 12:26:18 +0200 Subject: [PATCH 054/425] RTL fixes (#19834) * RTL fixes * Additional update * Fixed comments --- hassio/src/addon-view/info/hassio-addon-info.ts | 1 + hassio/src/dialogs/hardware/dialog-hassio-hardware.ts | 4 ++++ src/components/data-table/ha-data-table-icon.ts | 2 ++ src/components/ha-control-number-buttons.ts | 4 ++++ src/components/ha-menu-button.ts | 2 ++ src/components/ha-sidebar.ts | 6 ++++-- src/panels/config/hardware/dialog-hardware-available.ts | 4 ++++ 7 files changed, 21 insertions(+), 2 deletions(-) diff --git a/hassio/src/addon-view/info/hassio-addon-info.ts b/hassio/src/addon-view/info/hassio-addon-info.ts index 8b183fc51ddf..e90b447de6e6 100644 --- a/hassio/src/addon-view/info/hassio-addon-info.ts +++ b/hassio/src/addon-view/info/hassio-addon-info.ts @@ -1263,6 +1263,7 @@ class HassioAddonInfo extends LitElement { .card-actions { justify-content: space-between; display: flex; + direction: var(--direction); } .changelog { display: contents; diff --git a/hassio/src/dialogs/hardware/dialog-hassio-hardware.ts b/hassio/src/dialogs/hardware/dialog-hassio-hardware.ts index b4904b83ccfc..62298180aef8 100644 --- a/hassio/src/dialogs/hardware/dialog-hassio-hardware.ts +++ b/hassio/src/dialogs/hardware/dialog-hassio-hardware.ts @@ -154,12 +154,16 @@ class HassioHardwareDialog extends LitElement { ha-icon-button { position: absolute; right: 16px; + inset-inline-end: 16px; + inset-inline-start: initial; top: 10px; text-decoration: none; color: var(--primary-text-color); } h2 { margin: 18px 42px 0 18px; + margin-inline-start: 18px; + margin-inline-end: 42px; color: var(--primary-text-color); } diff --git a/src/components/data-table/ha-data-table-icon.ts b/src/components/data-table/ha-data-table-icon.ts index 5e7cada2d579..8724b41fbbc4 100644 --- a/src/components/data-table/ha-data-table-icon.ts +++ b/src/components/data-table/ha-data-table-icon.ts @@ -44,6 +44,8 @@ class HaDataTableIcon extends LitElement { div { position: absolute; right: 28px; + inset-inline-end: 28px; + inset-inline-start: initial; z-index: 1002; outline: none; font-size: 10px; diff --git a/src/components/ha-control-number-buttons.ts b/src/components/ha-control-number-buttons.ts index 36172f4e08e2..5ee5dc0d1ad0 100644 --- a/src/components/ha-control-number-buttons.ts +++ b/src/components/ha-control-number-buttons.ts @@ -273,9 +273,13 @@ export class HaControlNumberButton extends LitElement { } .button.minus { left: 0; + inset-inline-start: 0; + inset-inline-end: initial; } .button.plus { right: 0; + inset-inline-start: initial; + inset-inline-end: 0; } .unit { white-space: pre; diff --git a/src/components/ha-menu-button.ts b/src/components/ha-menu-button.ts index 63481ad1fd42..4c70956dd174 100644 --- a/src/components/ha-menu-button.ts +++ b/src/components/ha-menu-button.ts @@ -136,6 +136,8 @@ class HaMenuButton extends LitElement { height: 12px; top: 9px; right: 7px; + inset-inline-end: 7px; + inset-inline-start: initial; border-radius: 50%; border: 2px solid var(--app-header-background-color); } diff --git a/src/components/ha-sidebar.ts b/src/components/ha-sidebar.ts index d36a6a646db0..6110c8546818 100644 --- a/src/components/ha-sidebar.ts +++ b/src/components/ha-sidebar.ts @@ -1010,8 +1010,8 @@ class HaSidebar extends SubscribeMixin(LitElement) { } .profile paper-icon-item { padding-left: 4px; - margin-inline-start: 4px; - margin-inline-end: auto; + padding-inline-start: 4px; + padding-inline-end: auto; } .profile .item-text { margin-left: 8px; @@ -1040,6 +1040,8 @@ class HaSidebar extends SubscribeMixin(LitElement) { position: absolute; bottom: 14px; left: 26px; + inset-inline-start: 26px; + inset-inline-end: initial; font-size: 0.65em; } diff --git a/src/panels/config/hardware/dialog-hardware-available.ts b/src/panels/config/hardware/dialog-hardware-available.ts index 5cc858b1c897..3dfd60236733 100644 --- a/src/panels/config/hardware/dialog-hardware-available.ts +++ b/src/panels/config/hardware/dialog-hardware-available.ts @@ -171,6 +171,8 @@ class DialogHardwareAvailable extends LitElement implements HassDialog { ha-icon-button { position: absolute; right: 16px; + inset-inline-end: 16px; + inset-inline-start: initial; top: 10px; inset-inline-end: 16px; inset-inline-start: initial; @@ -179,6 +181,8 @@ class DialogHardwareAvailable extends LitElement implements HassDialog { } h2 { margin: 18px 42px 0 18px; + margin-inline-start: 18px; + margin-inline-end: 42px; color: var(--primary-text-color); } ha-expansion-panel { From f4c932ef9c2f5f2080522921f1f472077f26b9cd Mon Sep 17 00:00:00 2001 From: Paul Bottein Date: Wed, 28 Feb 2024 11:35:19 +0100 Subject: [PATCH 055/425] Automatically add section to empty section view and improve delete wording (#19892) * Automatically add section to empty section view and improve delete wording * Update delete dialog * Update delete dialog --- .../view-editor/hui-dialog-edit-view.ts | 84 ++++++++++--------- .../lovelace/views/hui-sections-view.ts | 31 ++----- src/translations/en.json | 19 +++-- 3 files changed, 64 insertions(+), 70 deletions(-) diff --git a/src/panels/lovelace/editor/view-editor/hui-dialog-edit-view.ts b/src/panels/lovelace/editor/view-editor/hui-dialog-edit-view.ts index 22583a359534..038680b049f4 100644 --- a/src/panels/lovelace/editor/view-editor/hui-dialog-edit-view.ts +++ b/src/panels/lovelace/editor/view-editor/hui-dialog-edit-view.ts @@ -4,16 +4,16 @@ import { mdiCheck, mdiClose, mdiDotsVertical } from "@mdi/js"; import "@polymer/paper-tabs/paper-tab"; import "@polymer/paper-tabs/paper-tabs"; import { - css, CSSResultGroup, - html, LitElement, - nothing, PropertyValues, + css, + html, + nothing, } from "lit"; import { customElement, property, query, state } from "lit/decorators"; import { classMap } from "lit/directives/class-map"; -import { fireEvent, HASSDomEvent } from "../../../../common/dom/fire_event"; +import { HASSDomEvent, fireEvent } from "../../../../common/dom/fire_event"; import { stopPropagation } from "../../../../common/dom/stop_propagation"; import { navigate } from "../../../../common/navigate"; import { deepEqual } from "../../../../common/util/deep-equal"; @@ -23,6 +23,11 @@ import "../../../../components/ha-dialog"; import "../../../../components/ha-dialog-header"; import "../../../../components/ha-yaml-editor"; import type { HaYamlEditor } from "../../../../components/ha-yaml-editor"; +import { LovelaceBadgeConfig } from "../../../../data/lovelace/config/badge"; +import { + LovelaceViewConfig, + isStrategyView, +} from "../../../../data/lovelace/config/view"; import { showAlertDialog, showConfirmationDialog, @@ -33,6 +38,7 @@ import "../../components/hui-entity-editor"; import { DEFAULT_VIEW_LAYOUT, PANEL_VIEW_LAYOUT, + SECTION_VIEW_LAYOUT, VIEWS_NO_BADGE_SUPPORT, } from "../../views/const"; import { addView, deleteView, replaceView } from "../config-util"; @@ -46,12 +52,6 @@ import { import "./hui-view-editor"; import "./hui-view-visibility-editor"; import { EditViewDialogParams } from "./show-edit-view-dialog"; -import { - LovelaceViewConfig, - isStrategyView, -} from "../../../../data/lovelace/config/view"; -import { LovelaceBadgeConfig } from "../../../../data/lovelace/config/badge"; -import { LovelaceCardConfig } from "../../../../data/lovelace/config/card"; @customElement("hui-dialog-edit-view") export class HuiDialogEditView extends LitElement { @@ -63,8 +63,6 @@ export class HuiDialogEditView extends LitElement { @state() private _badges?: LovelaceBadgeConfig[]; - @state() private _cards?: LovelaceCardConfig[]; - @state() private _saving = false; @state() private _curTab?: string; @@ -102,7 +100,6 @@ export class HuiDialogEditView extends LitElement { if (this._params.viewIndex === undefined) { this._config = {}; this._badges = []; - this._cards = []; this._dirty = false; return; } @@ -112,13 +109,11 @@ export class HuiDialogEditView extends LitElement { const { strategy, ...viewConfig } = view; this._config = viewConfig; this._badges = []; - this._cards = []; return; } - const { cards, badges, ...viewConfig } = view; + const { badges, ...viewConfig } = view; this._config = viewConfig; this._badges = badges ? processEditorEntities(badges) : []; - this._cards = cards; } public closeDialog(): void { @@ -181,7 +176,7 @@ export class HuiDialogEditView extends LitElement { )} ` - : ""} + : nothing}
    ${this._badges.map( (badgeConfig) => html` @@ -193,7 +188,7 @@ export class HuiDialogEditView extends LitElement { )}
    ` - : ""} + : nothing} ` - : ""} + : nothing} ${content} ${this._params.viewIndex !== undefined @@ -312,7 +307,7 @@ export class HuiDialogEditView extends LitElement { )} ` - : ""} + : nothing} ` - : ""} + : nothing} ${this.hass!.localize("ui.common.save")} @@ -361,24 +356,28 @@ export class HuiDialogEditView extends LitElement { } } - private _deleteConfirm(): void { - showConfirmationDialog(this, { - title: this.hass!.localize( - `ui.panel.lovelace.views.confirm_delete${ - this._cards?.length ? `_existing_cards` : "" - }` - ), + private async _deleteConfirm() { + const type = this._config?.sections?.length + ? "sections" + : this._config?.cards?.length + ? "cards" + : "only"; + + const named = this._config?.title ? "named" : "unnamed"; + + const confirm = await showConfirmationDialog(this, { + title: this.hass!.localize("ui.panel.lovelace.views.delete_title"), text: this.hass!.localize( - `ui.panel.lovelace.views.confirm_delete${ - this._cards?.length ? "_existing_cards" : "" - }_text`, - { - name: this._config?.title || "Unnamed view", - number: this._cards?.length || 0, - } + `ui.panel.lovelace.views.delete_${named}_view_${type}`, + { name: this._config?.title } ), - confirm: () => this._delete(), + confirmText: this.hass!.localize("ui.common.delete"), + destructive: true, }); + + if (!confirm) return; + + this._delete(); } private _handleTabSelected(ev: CustomEvent): void { @@ -402,9 +401,18 @@ export class HuiDialogEditView extends LitElement { const viewConf: LovelaceViewConfig = { ...this._config, badges: this._badges, - cards: this._cards, }; + if (viewConf.type === SECTION_VIEW_LAYOUT && !viewConf.sections?.length) { + viewConf.sections = [{ cards: [] }]; + } else if (!viewConf.cards?.length) { + viewConf.cards = []; + } + + if (!viewConf.badges?.length) { + delete viewConf.badges; + } + const lovelace = this._params.lovelace!; try { @@ -469,7 +477,7 @@ export class HuiDialogEditView extends LitElement { if (!ev.detail.isValid) { return; } - const { badges = [], ...config } = ev.detail.value; + const { badges, ...config } = ev.detail.value; this._config = config; this._badges = badges; this._dirty = true; diff --git a/src/panels/lovelace/views/hui-sections-view.ts b/src/panels/lovelace/views/hui-sections-view.ts index 6e80a6266f60..fcd430c8ea06 100644 --- a/src/panels/lovelace/views/hui-sections-view.ts +++ b/src/panels/lovelace/views/hui-sections-view.ts @@ -180,38 +180,21 @@ export class SectionsView extends LitElement implements LovelaceViewElement { path ) as LovelaceRawSectionConfig; - const title = section.title; + const title = section.title?.trim(); const cardCount = section.cards?.length; if (title || cardCount) { - const sectionName = title?.trim() - ? this.hass.localize( - "ui.panel.lovelace.editor.delete_section.named_section", - { name: title } - ) - : this.hass.localize( - "ui.panel.lovelace.editor.delete_section.unnamed_section" - ); - - const content = cardCount - ? this.hass.localize( - "ui.panel.lovelace.editor.delete_section.text_section_and_cards", - { - section: sectionName, - } - ) - : this.hass.localize( - "ui.panel.lovelace.editor.delete_section.text_section_only", - { - section: sectionName, - } - ); + const named = title ? "named" : "unnamed"; + const type = cardCount ? "cards" : "only"; const confirm = await showConfirmationDialog(this, { title: this.hass.localize( "ui.panel.lovelace.editor.delete_section.title" ), - text: content, + text: this.hass.localize( + `ui.panel.lovelace.editor.delete_section.text_${named}_section_${type}`, + { name: title } + ), confirmText: this.hass.localize("ui.common.delete"), destructive: true, }); diff --git a/src/translations/en.json b/src/translations/en.json index 1ad7fed83a65..8e9d1f97b511 100644 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -5026,10 +5026,13 @@ "saving_failed": "Saving dashboard configuration failed." }, "views": { - "confirm_delete": "Delete view?", - "confirm_delete_text": "Are you sure you want to delete your ''{name}'' view?", - "confirm_delete_existing_cards": "Deleting this view will also remove the cards", - "confirm_delete_existing_cards_text": "Are you sure you want to delete your ''{name}'' view? The view contains {number} cards that will be deleted. This action cannot be undone." + "delete_title": "Delete view", + "delete_named_view_only": "''{name}'' view will be deleted.", + "delete_unnamed_view_only": "This view will be deleted.", + "delete_named_view_cards": "''{name}'' view and all its cards will be deleted.", + "delete_unnamed_view_cards": "This view and all its cards will be deleted.", + "delete_named_view_sections": "''{name}'' view and all its sections will be deleted.", + "delete_unnamed_view_sections": "This view and all its sections will be deleted." }, "menu": { "configure_ui": "Edit dashboard", @@ -5162,10 +5165,10 @@ }, "delete_section": { "title": "Delete section", - "named_section": "\"{name}\" section", - "unnamed_section": "This section", - "text_section_only": "{section} will be deleted.", - "text_section_and_cards": "{section} and all its cards will be deleted." + "text_named_section_only": "''{name}'' section will be deleted.", + "text_unnamed_section_only": "This section will be deleted.", + "text_named_section_cards": "''{name}'' section and all its cards will be deleted.", + "text_unnamed_section_cards": "This section and all its cards will be deleted." }, "edit_section_title": { "title": "Edit name", From ccdd906e2f167afd8fce1fed7a472e96e853b7f7 Mon Sep 17 00:00:00 2001 From: karwosts <32912880+karwosts@users.noreply.github.com> Date: Wed, 28 Feb 2024 05:37:02 -0500 Subject: [PATCH 056/425] Restore alphabetical sorting to Areas (#19897) --- src/data/ws-area_registry.ts | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/data/ws-area_registry.ts b/src/data/ws-area_registry.ts index 43e3d1f13f35..550b9a5db803 100644 --- a/src/data/ws-area_registry.ts +++ b/src/data/ws-area_registry.ts @@ -1,12 +1,17 @@ import { Connection, createCollection } from "home-assistant-js-websocket"; import { Store } from "home-assistant-js-websocket/dist/store"; +import { stringCompare } from "../common/string/compare"; import { debounce } from "../common/util/debounce"; import { AreaRegistryEntry } from "./area_registry"; const fetchAreaRegistry = (conn: Connection) => - conn.sendMessagePromise({ - type: "config/area_registry/list", - }); + conn + .sendMessagePromise({ + type: "config/area_registry/list", + }) + .then((areas) => + areas.sort((ent1, ent2) => stringCompare(ent1.name, ent2.name)) + ); const subscribeAreaRegistryUpdates = ( conn: Connection, From 83190c21dbec3208021e85a03479409f7f86ec4e Mon Sep 17 00:00:00 2001 From: Marcel van der Veldt Date: Wed, 28 Feb 2024 11:42:07 +0100 Subject: [PATCH 057/425] Clear Matter ping result when closing the dialog (#19901) --- .../integration-panels/matter/dialog-matter-ping-node.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/panels/config/integrations/integration-panels/matter/dialog-matter-ping-node.ts b/src/panels/config/integrations/integration-panels/matter/dialog-matter-ping-node.ts index 77ec91ee245b..cbe8dc544f6d 100644 --- a/src/panels/config/integrations/integration-panels/matter/dialog-matter-ping-node.ts +++ b/src/panels/config/integrations/integration-panels/matter/dialog-matter-ping-node.ts @@ -137,6 +137,7 @@ class DialogMatterPingNode extends LitElement { public closeDialog(): void { this.device_id = undefined; this._status = undefined; + this._pingResult = undefined; fireEvent(this, "dialog-closed", { dialog: this.localName }); } From 401bbed67b8dfcd3d921119c8e41836e982f06fe Mon Sep 17 00:00:00 2001 From: Jim Date: Wed, 28 Feb 2024 10:42:19 +0000 Subject: [PATCH 058/425] Improve service filtering (#19811) * Improve service filtering Split filter term by space and match if each word is individually present * Prettier formatting * Fix un-necessary toLowerCase() call Co-authored-by: karwosts <32912880+karwosts@users.noreply.github.com> * Combine filter check conditions into the same loop * Prettier formatting --------- Co-authored-by: karwosts <32912880+karwosts@users.noreply.github.com> --- src/components/ha-service-picker.ts | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/components/ha-service-picker.ts b/src/components/ha-service-picker.ts index c370928521e1..c27c039a8e96 100644 --- a/src/components/ha-service-picker.ts +++ b/src/components/ha-service-picker.ts @@ -114,11 +114,14 @@ class HaServicePicker extends LitElement { if (!filter) { return processedServices; } - return processedServices.filter( - (service) => - service.service.toLowerCase().includes(filter) || - service.name?.toLowerCase().includes(filter) - ); + const split_filter = filter.split(" "); + return processedServices.filter((service) => { + const lower_service_name = service.name.toLowerCase(); + const lower_service = service.service.toLowerCase(); + return split_filter.every( + (f) => lower_service_name.includes(f) || lower_service.includes(f) + ); + }); } ); From 9ae234a02fcc9b311be1dabd30454f32c27e2e13 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Wed, 28 Feb 2024 05:46:27 -0500 Subject: [PATCH 059/425] Mark paste button list item as interactive (#19898) * Mark paste button list item as interactive * Update add-automation-element-dialog.ts --------- Co-authored-by: Bram Kragten --- src/panels/config/automation/add-automation-element-dialog.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/panels/config/automation/add-automation-element-dialog.ts b/src/panels/config/automation/add-automation-element-dialog.ts index 4145a3397b50..10249c8592f1 100644 --- a/src/panels/config/automation/add-automation-element-dialog.ts +++ b/src/panels/config/automation/add-automation-element-dialog.ts @@ -536,6 +536,8 @@ class DialogAddAutomationElement extends LitElement implements HassDialog { (!this._group || items.find((item) => item.key === this._params!.clipboardItem)) ? html`${this.hass.localize( // @ts-ignore `ui.panel.config.automation.editor.${this._params.type}s.type.${this._params.clipboardItem}.label` From 220da516063c0d4a0832a21b9b0542e7a4ebc0ff Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 28 Feb 2024 11:47:54 +0100 Subject: [PATCH 060/425] Update dependency @material/web to v1.3.0 (#19877) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 207dca4cb65a..d0d477ecdfbf 100644 --- a/package.json +++ b/package.json @@ -80,7 +80,7 @@ "@material/mwc-top-app-bar": "0.27.0", "@material/mwc-top-app-bar-fixed": "0.27.0", "@material/top-app-bar": "=14.0.0-canary.53b3cad2f.0", - "@material/web": "=1.2.0", + "@material/web": "=1.3.0", "@mdi/js": "7.4.47", "@mdi/svg": "7.4.47", "@polymer/paper-item": "3.0.1", diff --git a/yarn.lock b/yarn.lock index d7d6e089e5a5..d2bdb5a44f0c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3141,13 +3141,13 @@ __metadata: languageName: node linkType: hard -"@material/web@npm:=1.2.0": - version: 1.2.0 - resolution: "@material/web@npm:1.2.0" +"@material/web@npm:=1.3.0": + version: 1.3.0 + resolution: "@material/web@npm:1.3.0" dependencies: lit: "npm:^2.7.4 || ^3.0.0" tslib: "npm:^2.4.0" - checksum: 10/abf79ee6e247b21f046bf099accdb3439d43586f3be948b5f3fc09ab2b47a3a2b37fcaff01dde4205a9e40a3d22312cf314887f87fe930af755c4dc440a32529 + checksum: 10/7c3427747eccb69628807bed115dca96bb4a8e360e5cb97170a42ab7d469d17f0c925defa417a212ef3237c252f0b06dac9499b56c42945214f9bdeb7f7e5a0b languageName: node linkType: hard @@ -9584,7 +9584,7 @@ __metadata: "@material/mwc-top-app-bar": "npm:0.27.0" "@material/mwc-top-app-bar-fixed": "npm:0.27.0" "@material/top-app-bar": "npm:=14.0.0-canary.53b3cad2f.0" - "@material/web": "npm:=1.2.0" + "@material/web": "npm:=1.3.0" "@mdi/js": "npm:7.4.47" "@mdi/svg": "npm:7.4.47" "@octokit/auth-oauth-device": "npm:6.0.1" From 32c403d069567e2c47ca05885b9bcc854ddca4da Mon Sep 17 00:00:00 2001 From: Simon Lamon <32477463+silamon@users.noreply.github.com> Date: Wed, 28 Feb 2024 11:52:45 +0100 Subject: [PATCH 061/425] Replace more paper-items (#19707) Remove leftover paper items --- .../dialog-hassio-repositories.ts | 85 ++++++++++--------- .../config/devices/ha-config-device-page.ts | 37 +++----- .../integration-panels/zha/zha-group-page.ts | 33 ++++--- src/panels/mailbox/ha-panel-mailbox.ts | 37 ++++---- 4 files changed, 93 insertions(+), 99 deletions(-) diff --git a/hassio/src/dialogs/repositories/dialog-hassio-repositories.ts b/hassio/src/dialogs/repositories/dialog-hassio-repositories.ts index 74ce8d5a6a89..47f107a6c5a9 100644 --- a/hassio/src/dialogs/repositories/dialog-hassio-repositories.ts +++ b/hassio/src/dialogs/repositories/dialog-hassio-repositories.ts @@ -1,7 +1,5 @@ import "@material/mwc-button/mwc-button"; import { mdiDelete, mdiDeleteOff } from "@mdi/js"; -import "@polymer/paper-item/paper-item"; -import "@polymer/paper-item/paper-item-body"; import "@lrnwebcomponents/simple-tooltip/simple-tooltip"; import { css, CSSResultGroup, html, LitElement, nothing } from "lit"; import { customElement, property, query, state } from "lit/decorators"; @@ -27,6 +25,8 @@ import type { HomeAssistant } from "../../../../src/types"; import { HassioRepositoryDialogParams } from "./show-dialog-repositories"; import type { HaTextField } from "../../../../src/components/ha-textfield"; import "../../../../src/components/ha-textfield"; +import "../../../../src/components/ha-list-new"; +import "../../../../src/components/ha-list-item-new"; @customElement("dialog-hassio-repositories") class HassioRepositoriesDialog extends LitElement { @@ -106,44 +106,46 @@ class HassioRepositoriesDialog extends LitElement { ? html`${this._error}` : ""}
    - ${repositories.length - ? repositories.map( - (repo) => html` - - -
    ${repo.name}
    -
    ${repo.maintainer}
    -
    ${repo.url}
    -
    -
    - - - - ${this._dialogParams!.supervisor.localize( - usedRepositories.includes(repo.slug) - ? "dialog.repositories.used" - : "dialog.repositories.remove" - )} - -
    -
    - ` - ) - : html` No repositories `} + + ${repositories.length + ? repositories.map( + (repo) => html` + + ${repo.name} +
    +
    ${repo.maintainer}
    +
    ${repo.url}
    +
    +
    + + + + ${this._dialogParams!.supervisor.localize( + usedRepositories.includes(repo.slug) + ? "dialog.repositories.used" + : "dialog.repositories.remove" + )} + +
    +
    + ` + ) + : html` No repositories `} +
    - - - ${computeStateName(entityState)} - - - + ${computeStateName(entityState)} + + ${!entityState.attributes.id ? html` @@ -528,15 +527,14 @@ export class HaConfigDevicePage extends LitElement { : undefined )} > - - - ${computeStateName(entityState)} - - - + ${computeStateName(entityState)} + + ${!entityState.attributes.id ? html` @@ -623,12 +621,10 @@ export class HaConfigDevicePage extends LitElement { return entityState ? html` - - - ${computeStateName(entityState)} - - - + + ${computeStateName(entityState)} + + ` : ""; @@ -1518,11 +1514,6 @@ export class HaConfigDevicePage extends LitElement { margin-top: 0; } - paper-item { - cursor: pointer; - font-size: var(--paper-font-body1_-_font-size); - } - a { text-decoration: none; color: var(--primary-color); diff --git a/src/panels/config/integrations/integration-panels/zha/zha-group-page.ts b/src/panels/config/integrations/integration-panels/zha/zha-group-page.ts index f21f688e0748..0216d0a0df4b 100644 --- a/src/panels/config/integrations/integration-panels/zha/zha-group-page.ts +++ b/src/panels/config/integrations/integration-panels/zha/zha-group-page.ts @@ -1,6 +1,5 @@ import "@material/mwc-button"; import { mdiDelete } from "@mdi/js"; -import "@polymer/paper-item/paper-item"; import { CSSResultGroup, LitElement, @@ -32,6 +31,8 @@ import "../../../ha-config-section"; import { formatAsPaddedHex } from "./functions"; import "./zha-device-endpoint-data-table"; import type { ZHADeviceEndpointDataTable } from "./zha-device-endpoint-data-table"; +import "@material/mwc-list/mwc-list"; +import "../../../../../components/ha-list-item"; @customElement("zha-group-page") export class ZHAGroupPage extends LitElement { @@ -131,20 +132,24 @@ export class ZHAGroupPage extends LitElement { ${this.hass.localize("ui.panel.config.zha.groups.members")}
    - ${this.group.members.length - ? this.group.members.map( - (member) => - html` - ${member.device.user_given_name || - member.device.name} + ${this.group.members.length + ? this.group.members.map( + (member) => + html` - ` - ) - : html` This group has no members `} + ${member.device.user_given_name || + member.device.name} + ` + ) + : html` + This group has no members + `} + ${this.group.members.length ? html` diff --git a/src/panels/mailbox/ha-panel-mailbox.ts b/src/panels/mailbox/ha-panel-mailbox.ts index 643112c7bdfc..250af9a83ab0 100644 --- a/src/panels/mailbox/ha-panel-mailbox.ts +++ b/src/panels/mailbox/ha-panel-mailbox.ts @@ -12,8 +12,6 @@ import { formatDateTime } from "../../common/datetime/format_date_time"; import "../../components/ha-card"; import "../../components/ha-menu-button"; import "../../components/ha-tabs"; -import "@polymer/paper-item/paper-item"; -import "@polymer/paper-item/paper-item-body"; import "@polymer/paper-tabs/paper-tab"; import { HomeAssistant } from "../../types"; import { fireEvent } from "../../common/dom/fire_event"; @@ -82,25 +80,24 @@ class HaPanelMailbox extends LitElement { : nothing} ${this._messages?.map( (message) => - html` - -
    -
    ${message.caller}
    -
    - ${formatDuration(this.hass.locale, { - seconds: message.duration, - })} -
    -
    -
    - ${message.timestamp} - - ${message.message} -
    -
    -
    ` + + ${message.caller} + + ${formatDuration(this.hass.locale, { + seconds: message.duration, + })} + + + + ${message.timestamp} - + ${message.message} + + ` )}
    @@ -219,10 +216,6 @@ class HaPanelMailbox extends LitElement { overflow: hidden; } - paper-item { - cursor: pointer; - } - ha-tabs { margin-left: max(env(safe-area-inset-left), 24px); margin-right: max(env(safe-area-inset-right), 24px); From d5f8231f9798eaa61b261f1857c46e8ca5636b72 Mon Sep 17 00:00:00 2001 From: Cody C <50791984+codyc1515@users.noreply.github.com> Date: Wed, 28 Feb 2024 23:57:12 +1300 Subject: [PATCH 062/425] Update dashboard resources title to reflect translations (#19641) * Update dashboard resources title to reflect translations * Update dashboard resources title to reflect translations --- src/panels/config/lovelace/ha-config-lovelace.ts | 9 ++++++++- .../lovelace/resources/ha-config-lovelace-resources.ts | 4 ++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/panels/config/lovelace/ha-config-lovelace.ts b/src/panels/config/lovelace/ha-config-lovelace.ts index c494232bb865..eda9a8fd56e1 100644 --- a/src/panels/config/lovelace/ha-config-lovelace.ts +++ b/src/panels/config/lovelace/ha-config-lovelace.ts @@ -8,13 +8,20 @@ import { HomeAssistant } from "../../../types"; export const lovelaceTabs = [ { - component: "lovelace", path: "/config/lovelace/dashboards", translationKey: "ui.panel.config.lovelace.dashboards.caption", iconPath: mdiViewDashboard, }, ]; +export const lovelaceResourcesTabs = [ + { + path: "/config/lovelace/resources", + translationKey: "ui.panel.config.lovelace.resources.caption", + iconPath: mdiViewDashboard, + }, +]; + @customElement("ha-config-lovelace") class HaConfigLovelace extends HassRouterPage { @property({ attribute: false }) public hass!: HomeAssistant; diff --git a/src/panels/config/lovelace/resources/ha-config-lovelace-resources.ts b/src/panels/config/lovelace/resources/ha-config-lovelace-resources.ts index 9574f14fce0c..7713108edd87 100644 --- a/src/panels/config/lovelace/resources/ha-config-lovelace-resources.ts +++ b/src/panels/config/lovelace/resources/ha-config-lovelace-resources.ts @@ -34,7 +34,7 @@ import "../../../../layouts/hass-tabs-subpage-data-table"; import { haStyle } from "../../../../resources/styles"; import { HomeAssistant, Route } from "../../../../types"; import { loadLovelaceResources } from "../../../lovelace/common/load-resources"; -import { lovelaceTabs } from "../ha-config-lovelace"; +import { lovelaceResourcesTabs } from "../ha-config-lovelace"; import { showResourceDetailDialog } from "./show-dialog-lovelace-resource-detail"; @customElement("ha-config-lovelace-resources") @@ -117,7 +117,7 @@ export class HaConfigLovelaceRescources extends LitElement { .hass=${this.hass} .narrow=${this.narrow} .route=${this.route} - .tabs=${lovelaceTabs} + .tabs=${lovelaceResourcesTabs} .columns=${this._columns(this.hass.language)} .data=${this._resources} .noDataText=${this.hass.localize( From 4db743db00d66a4315f1b50384c83c17e79f5d83 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 28 Feb 2024 12:07:27 +0100 Subject: [PATCH 063/425] Update dependency webpack-dev-server to v5 (#19807) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 153 +++++++++++++++++++++++++++++++-------------------- 2 files changed, 93 insertions(+), 62 deletions(-) diff --git a/package.json b/package.json index d0d477ecdfbf..60688e33b789 100644 --- a/package.json +++ b/package.json @@ -242,7 +242,7 @@ "vinyl-source-stream": "2.0.0", "webpack": "5.90.3", "webpack-cli": "5.1.4", - "webpack-dev-server": "4.15.1", + "webpack-dev-server": "5.0.2", "webpack-manifest-plugin": "5.0.0", "webpack-stats-plugin": "1.1.3", "webpackbar": "6.0.1", diff --git a/yarn.lock b/yarn.lock index d2bdb5a44f0c..1a0ff9d448ee 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3968,7 +3968,7 @@ __metadata: languageName: node linkType: hard -"@types/bonjour@npm:^3.5.9": +"@types/bonjour@npm:^3.5.13": version: 3.5.13 resolution: "@types/bonjour@npm:3.5.13" dependencies: @@ -4010,7 +4010,7 @@ __metadata: languageName: node linkType: hard -"@types/connect-history-api-fallback@npm:^1.3.5": +"@types/connect-history-api-fallback@npm:^1.5.4": version: 1.5.4 resolution: "@types/connect-history-api-fallback@npm:1.5.4" dependencies: @@ -4094,7 +4094,7 @@ __metadata: languageName: node linkType: hard -"@types/express@npm:*, @types/express@npm:^4.17.13": +"@types/express@npm:*, @types/express@npm:^4.17.21": version: 4.17.21 resolution: "@types/express@npm:4.17.21" dependencies: @@ -4406,10 +4406,10 @@ __metadata: languageName: node linkType: hard -"@types/retry@npm:0.12.0": - version: 0.12.0 - resolution: "@types/retry@npm:0.12.0" - checksum: 10/bbd0b88f4b3eba7b7acfc55ed09c65ef6f2e1bcb4ec9b4dca82c66566934351534317d294a770a7cc6c0468d5573c5350abab6e37c65f8ef254443e1b028e44d +"@types/retry@npm:0.12.2": + version: 0.12.2 + resolution: "@types/retry@npm:0.12.2" + checksum: 10/e5675035717b39ce4f42f339657cae9637cf0c0051cf54314a6a2c44d38d91f6544be9ddc0280587789b6afd056be5d99dbe3e9f4df68c286c36321579b1bf4a languageName: node linkType: hard @@ -4439,7 +4439,7 @@ __metadata: languageName: node linkType: hard -"@types/serve-index@npm:^1.9.1": +"@types/serve-index@npm:^1.9.4": version: 1.9.4 resolution: "@types/serve-index@npm:1.9.4" dependencies: @@ -4448,7 +4448,7 @@ __metadata: languageName: node linkType: hard -"@types/serve-static@npm:*, @types/serve-static@npm:^1.13.10": +"@types/serve-static@npm:*, @types/serve-static@npm:^1.15.5": version: 1.15.5 resolution: "@types/serve-static@npm:1.15.5" dependencies: @@ -4459,7 +4459,7 @@ __metadata: languageName: node linkType: hard -"@types/sockjs@npm:^0.3.33": +"@types/sockjs@npm:^0.3.36": version: 0.3.36 resolution: "@types/sockjs@npm:0.3.36" dependencies: @@ -4515,7 +4515,7 @@ __metadata: languageName: node linkType: hard -"@types/ws@npm:^8.5.5": +"@types/ws@npm:^8.5.10": version: 8.5.10 resolution: "@types/ws@npm:8.5.10" dependencies: @@ -6136,7 +6136,7 @@ __metadata: languageName: node linkType: hard -"bonjour-service@npm:^1.0.11": +"bonjour-service@npm:^1.2.1": version: 1.2.1 resolution: "bonjour-service@npm:1.2.1" dependencies: @@ -6501,7 +6501,7 @@ __metadata: languageName: node linkType: hard -"chokidar@npm:^3.4.3, chokidar@npm:^3.5.3": +"chokidar@npm:^3.4.3, chokidar@npm:^3.6.0": version: 3.6.0 resolution: "chokidar@npm:3.6.0" dependencies: @@ -9116,7 +9116,7 @@ __metadata: languageName: node linkType: hard -"glob@npm:10.3.10, glob@npm:^10.2.2, glob@npm:^10.3.10": +"glob@npm:10.3.10, glob@npm:^10.2.2, glob@npm:^10.3.10, glob@npm:^10.3.7": version: 10.3.10 resolution: "glob@npm:10.3.10" dependencies: @@ -9727,7 +9727,7 @@ __metadata: vue2-daterange-picker: "npm:0.6.8" webpack: "npm:5.90.3" webpack-cli: "npm:5.1.4" - webpack-dev-server: "npm:4.15.1" + webpack-dev-server: "npm:5.0.2" webpack-manifest-plugin: "npm:5.0.0" webpack-stats-plugin: "npm:1.1.3" webpackbar: "npm:6.0.1" @@ -9778,7 +9778,7 @@ __metadata: languageName: node linkType: hard -"html-entities@npm:^2.3.2": +"html-entities@npm:^2.4.0": version: 2.4.0 resolution: "html-entities@npm:2.4.0" checksum: 10/646f2f19214bad751e060ceef4df98520654a1d0cd631b55d45504df2f0aaf8a14d8c0a5a4f92b353be298774d856157ac2d04a031d78889c9011892078ca157 @@ -10181,7 +10181,7 @@ __metadata: languageName: node linkType: hard -"ipaddr.js@npm:^2.0.1": +"ipaddr.js@npm:^2.1.0": version: 2.1.0 resolution: "ipaddr.js@npm:2.1.0" checksum: 10/42c16d95cf451399707c2c46e605b88db1ea2b1477b25774b5a7ee96852b0bb1efdc01adbff01fedbe702ff246e1aca5c5e915a6f5a1f1485233a5f7c2eb73c2 @@ -10477,6 +10477,13 @@ __metadata: languageName: node linkType: hard +"is-network-error@npm:^1.0.0": + version: 1.0.1 + resolution: "is-network-error@npm:1.0.1" + checksum: 10/165d61500c4186c62db5a3a693d6bfa14ca40fe9b471ef4cd4f27b20ef6760880faf5386dc01ca9867531631782941fedaa94521d09959edf71f046e393c7b91 + languageName: node + linkType: hard + "is-number-object@npm:^1.0.4": version: 1.0.7 resolution: "is-number-object@npm:1.0.7" @@ -11158,7 +11165,7 @@ __metadata: languageName: node linkType: hard -"launch-editor@npm:^2.6.0": +"launch-editor@npm:^2.6.1": version: 2.6.1 resolution: "launch-editor@npm:2.6.1" dependencies: @@ -11691,7 +11698,7 @@ __metadata: languageName: node linkType: hard -"memfs@npm:^3.4.3, memfs@npm:^3.5.0": +"memfs@npm:^3.5.0": version: 3.5.3 resolution: "memfs@npm:3.5.3" dependencies: @@ -11700,6 +11707,15 @@ __metadata: languageName: node linkType: hard +"memfs@npm:^4.6.0": + version: 4.7.6 + resolution: "memfs@npm:4.7.6" + dependencies: + tslib: "npm:^2.0.0" + checksum: 10/b2a4c95635aa7ed9162c647b60ebbe6f84c541dd91d99e56602f1e904503447aaf92c46918ddf0b84acfb8e52e9af90bd63a6c0cfb1cc8bfdf31379f2fba8e11 + languageName: node + linkType: hard + "memoize-one@npm:6.0.0": version: 6.0.0 resolution: "memoize-one@npm:6.0.0" @@ -12523,7 +12539,7 @@ __metadata: languageName: node linkType: hard -"open@npm:10.0.3": +"open@npm:10.0.3, open@npm:^10.0.3": version: 10.0.3 resolution: "open@npm:10.0.3" dependencies: @@ -12535,7 +12551,7 @@ __metadata: languageName: node linkType: hard -"open@npm:^8.0.2, open@npm:^8.0.9, open@npm:^8.4.0": +"open@npm:^8.0.2, open@npm:^8.4.0": version: 8.4.2 resolution: "open@npm:8.4.2" dependencies: @@ -12650,13 +12666,14 @@ __metadata: languageName: node linkType: hard -"p-retry@npm:^4.5.0": - version: 4.6.2 - resolution: "p-retry@npm:4.6.2" +"p-retry@npm:^6.2.0": + version: 6.2.0 + resolution: "p-retry@npm:6.2.0" dependencies: - "@types/retry": "npm:0.12.0" + "@types/retry": "npm:0.12.2" + is-network-error: "npm:^1.0.0" retry: "npm:^0.13.1" - checksum: 10/45c270bfddaffb4a895cea16cb760dcc72bdecb6cb45fef1971fa6ea2e91ddeafddefe01e444ac73e33b1b3d5d29fb0dd18a7effb294262437221ddc03ce0f2e + checksum: 10/1a5ac16828c96c03c354f78d643dfc7aa8f8b998e1b60e27533da2c75e5cabfb1c7f88ce312e813e09a80b056011fbb372d384132e9c92d27d052bd7c282a978 languageName: node linkType: hard @@ -13799,6 +13816,17 @@ __metadata: languageName: node linkType: hard +"rimraf@npm:^5.0.5": + version: 5.0.5 + resolution: "rimraf@npm:5.0.5" + dependencies: + glob: "npm:^10.3.7" + bin: + rimraf: dist/esm/bin.mjs + checksum: 10/a612c7184f96258b7d1328c486b12ca7b60aa30e04229a08bbfa7e964486deb1e9a1b52d917809311bdc39a808a4055c0f950c0280fba194ba0a09e6f0d404f6 + languageName: node + linkType: hard + "roboto-fontface@npm:0.10.0": version: 0.10.0 resolution: "roboto-fontface@npm:0.10.0" @@ -13967,7 +13995,7 @@ __metadata: languageName: node linkType: hard -"schema-utils@npm:^4.0.0": +"schema-utils@npm:^4.0.0, schema-utils@npm:^4.2.0": version: 4.2.0 resolution: "schema-utils@npm:4.2.0" dependencies: @@ -13986,7 +14014,7 @@ __metadata: languageName: node linkType: hard -"selfsigned@npm:^2.1.1": +"selfsigned@npm:^2.4.1": version: 2.4.1 resolution: "selfsigned@npm:2.4.1" dependencies: @@ -15299,7 +15327,7 @@ __metadata: languageName: node linkType: hard -"tslib@npm:^2.0.1, tslib@npm:^2.0.2, tslib@npm:^2.0.3, tslib@npm:^2.1.0, tslib@npm:^2.2.0, tslib@npm:^2.3.1, tslib@npm:^2.4.0": +"tslib@npm:^2.0.0, tslib@npm:^2.0.1, tslib@npm:^2.0.2, tslib@npm:^2.0.3, tslib@npm:^2.1.0, tslib@npm:^2.2.0, tslib@npm:^2.3.1, tslib@npm:^2.4.0": version: 2.6.2 resolution: "tslib@npm:2.6.2" checksum: 10/bd26c22d36736513980091a1e356378e8b662ded04204453d353a7f34a4c21ed0afc59b5f90719d4ba756e581a162ecbf93118dc9c6be5acf70aa309188166ca @@ -16137,57 +16165,60 @@ __metadata: languageName: node linkType: hard -"webpack-dev-middleware@npm:^5.3.1": - version: 5.3.3 - resolution: "webpack-dev-middleware@npm:5.3.3" +"webpack-dev-middleware@npm:^7.0.0": + version: 7.0.0 + resolution: "webpack-dev-middleware@npm:7.0.0" dependencies: colorette: "npm:^2.0.10" - memfs: "npm:^3.4.3" + memfs: "npm:^4.6.0" mime-types: "npm:^2.1.31" range-parser: "npm:^1.2.1" schema-utils: "npm:^4.0.0" peerDependencies: - webpack: ^4.0.0 || ^5.0.0 - checksum: 10/31a2f7a11e58a76bdcde1eb8da310b6643844d9b442f9916f48be5b46c103f23490c393c32a9af501ce68226fbb018b811f5a956635ed60a03f9481a4bcd6c76 + webpack: ^5.0.0 + peerDependenciesMeta: + webpack: + optional: true + checksum: 10/e94902c35458c2431cd3332088cf33afe9236333e911605e6045392be11f521140600312c698263acf2a6c52e2092b8e8b3ea4b0ed34568df6cb7a79913aa1d3 languageName: node linkType: hard -"webpack-dev-server@npm:4.15.1": - version: 4.15.1 - resolution: "webpack-dev-server@npm:4.15.1" - dependencies: - "@types/bonjour": "npm:^3.5.9" - "@types/connect-history-api-fallback": "npm:^1.3.5" - "@types/express": "npm:^4.17.13" - "@types/serve-index": "npm:^1.9.1" - "@types/serve-static": "npm:^1.13.10" - "@types/sockjs": "npm:^0.3.33" - "@types/ws": "npm:^8.5.5" +"webpack-dev-server@npm:5.0.2": + version: 5.0.2 + resolution: "webpack-dev-server@npm:5.0.2" + dependencies: + "@types/bonjour": "npm:^3.5.13" + "@types/connect-history-api-fallback": "npm:^1.5.4" + "@types/express": "npm:^4.17.21" + "@types/serve-index": "npm:^1.9.4" + "@types/serve-static": "npm:^1.15.5" + "@types/sockjs": "npm:^0.3.36" + "@types/ws": "npm:^8.5.10" ansi-html-community: "npm:^0.0.8" - bonjour-service: "npm:^1.0.11" - chokidar: "npm:^3.5.3" + bonjour-service: "npm:^1.2.1" + chokidar: "npm:^3.6.0" colorette: "npm:^2.0.10" compression: "npm:^1.7.4" connect-history-api-fallback: "npm:^2.0.0" default-gateway: "npm:^6.0.3" express: "npm:^4.17.3" graceful-fs: "npm:^4.2.6" - html-entities: "npm:^2.3.2" + html-entities: "npm:^2.4.0" http-proxy-middleware: "npm:^2.0.3" - ipaddr.js: "npm:^2.0.1" - launch-editor: "npm:^2.6.0" - open: "npm:^8.0.9" - p-retry: "npm:^4.5.0" - rimraf: "npm:^3.0.2" - schema-utils: "npm:^4.0.0" - selfsigned: "npm:^2.1.1" + ipaddr.js: "npm:^2.1.0" + launch-editor: "npm:^2.6.1" + open: "npm:^10.0.3" + p-retry: "npm:^6.2.0" + rimraf: "npm:^5.0.5" + schema-utils: "npm:^4.2.0" + selfsigned: "npm:^2.4.1" serve-index: "npm:^1.9.1" sockjs: "npm:^0.3.24" spdy: "npm:^4.0.2" - webpack-dev-middleware: "npm:^5.3.1" - ws: "npm:^8.13.0" + webpack-dev-middleware: "npm:^7.0.0" + ws: "npm:^8.16.0" peerDependencies: - webpack: ^4.37.0 || ^5.0.0 + webpack: ^5.0.0 peerDependenciesMeta: webpack: optional: true @@ -16195,7 +16226,7 @@ __metadata: optional: true bin: webpack-dev-server: bin/webpack-dev-server.js - checksum: 10/fd6dfb6c71eb94696b21930ea4c2f25e95ba85fac1bbc15aa5d03af0a90712eba057901fa9131ed3e901665c95b2379208279aca61e9c48e7cda276c3caa95dd + checksum: 10/f47205b56a562c72083ad979fceb499dc60ef35a75a72b6fbcbccd258b6b304ab3a977877dc6ce68aa5fb90cee8ab9387e22ceb8e374a019e3d4ce77ad0c9493 languageName: node linkType: hard @@ -16714,7 +16745,7 @@ __metadata: languageName: node linkType: hard -"ws@npm:^8.13.0": +"ws@npm:^8.16.0": version: 8.16.0 resolution: "ws@npm:8.16.0" peerDependencies: From 1d9fa1522cd6084688fb96dd81acdc8764f58664 Mon Sep 17 00:00:00 2001 From: Cody C <50791984+codyc1515@users.noreply.github.com> Date: Thu, 29 Feb 2024 00:07:38 +1300 Subject: [PATCH 064/425] Fix MFA module name not showing on step completion (#19581) * Fix MFA module name not showing on step completion Fixes #18918 * Update src/panels/profile/dialog-ha-mfa-module-setup-flow.ts --------- Co-authored-by: Bram Kragten --- src/panels/profile/dialog-ha-mfa-module-setup-flow.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/panels/profile/dialog-ha-mfa-module-setup-flow.ts b/src/panels/profile/dialog-ha-mfa-module-setup-flow.ts index 0ca1b026e675..c7bad0fa1411 100644 --- a/src/panels/profile/dialog-ha-mfa-module-setup-flow.ts +++ b/src/panels/profile/dialog-ha-mfa-module-setup-flow.ts @@ -97,7 +97,7 @@ class HaMfaModuleSetupFlow extends LitElement { ? html`

    ${this.hass.localize( "ui.panel.profile.mfa_setup.step_done", - { step: this._step.title } + { step: this._step.title || this._step.handler } )}

    ` : this._step.type === "form" From 3b89b72568c9a66a40e758ed43b4502052e52030 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20Dimja=C5=A1evi=C4=87?= Date: Wed, 28 Feb 2024 12:29:18 +0100 Subject: [PATCH 065/425] Automation editor: clarify multiple triggers logic (#19647) * Automation editor: clarify multiple triggers logic * Implement PR feedback * Update src/translations/en.json --------- Co-authored-by: Bram Kragten --- src/translations/en.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/translations/en.json b/src/translations/en.json index 8e9d1f97b511..99c3f234f6a6 100644 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -2507,7 +2507,7 @@ "triggers": { "name": "Triggers", "header": "When", - "description": "This list of triggers is what starts your automation. A trigger is a specific event happening in or around your home, for example: ''When the sun sets''.", + "description": "A trigger is a specific event happening in or around your home, for example: ''When the sun sets''. Any trigger listed here will start your automation.", "learn_more": "Learn more about triggers", "triggered": "Triggered", "add": "Add trigger", From 5b3074d9392839b436b676ec027868b982ec5d6e Mon Sep 17 00:00:00 2001 From: Marcel van der Veldt Date: Wed, 28 Feb 2024 12:33:21 +0100 Subject: [PATCH 066/425] Replace button to manually add a Thread border router with more info button (#19903) Replace button to manually add a border router with more info button --- .../thread/thread-config-panel.ts | 14 ++++++++++---- src/translations/en.json | 1 + 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/panels/config/integrations/integration-panels/thread/thread-config-panel.ts b/src/panels/config/integrations/integration-panels/thread/thread-config-panel.ts index e8e068ca2288..7a5375d8b207 100644 --- a/src/panels/config/integrations/integration-panels/thread/thread-config-panel.ts +++ b/src/panels/config/integrations/integration-panels/thread/thread-config-panel.ts @@ -54,6 +54,7 @@ import { haStyle } from "../../../../../resources/styles"; import { HomeAssistant } from "../../../../../types"; import { brandsUrl } from "../../../../../util/brands-url"; import { fileDownload } from "../../../../../util/file_download"; +import { documentationUrl } from "../../../../../util/documentation-url"; interface ThreadNetwork { name: string; @@ -123,11 +124,16 @@ export class ThreadConfigPanel extends SubscribeMixin(LitElement) { )} - ${this.hass.localize( - "ui.panel.config.thread.add_open_thread_border_router" - )} + ${this.hass.localize( + "ui.panel.config.thread.more_info" + )} +
    `} ${networks.networks.length diff --git a/src/translations/en.json b/src/translations/en.json index 99c3f234f6a6..499a495fdad1 100644 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -4127,6 +4127,7 @@ "other_networks": "Other networks", "my_network": "Preferred network", "no_preferred_network": "You don't have a preferred network yet.", + "more_info": "More Info", "add_open_thread_border_router": "Add an OpenThread border router", "reset_border_router": "Reset border router", "add_to_my_network": "Add to preferred network", From c945534640e0e01ca8085abfafe649ee490d5c41 Mon Sep 17 00:00:00 2001 From: Paul Bottein Date: Wed, 28 Feb 2024 12:35:32 +0100 Subject: [PATCH 067/425] Disable the ability to change the view type to sections and the other way around (#19902) * Disable the ability to change the view type to sections and the other way around * Update src/translations/en.json Co-authored-by: Bram Kragten * Update src/translations/en.json Co-authored-by: Bram Kragten * Update src/translations/en.json Co-authored-by: Bram Kragten --------- Co-authored-by: Bram Kragten --- src/components/ha-formfield.ts | 7 +++++- .../ha-selector/ha-selector-select.ts | 5 +++- .../editor/view-editor/hui-view-editor.ts | 25 ++++++++++++++++--- src/translations/en.json | 3 +++ 4 files changed, 34 insertions(+), 6 deletions(-) diff --git a/src/components/ha-formfield.ts b/src/components/ha-formfield.ts index 1c8cc5a019c4..46837ca65db3 100644 --- a/src/components/ha-formfield.ts +++ b/src/components/ha-formfield.ts @@ -1,11 +1,13 @@ import { FormfieldBase } from "@material/mwc-formfield/mwc-formfield-base"; import { styles } from "@material/mwc-formfield/mwc-formfield.css"; import { css } from "lit"; -import { customElement } from "lit/decorators"; +import { customElement, property } from "lit/decorators"; import { fireEvent } from "../common/dom/fire_event"; @customElement("ha-formfield") export class HaFormfield extends FormfieldBase { + @property({ type: Boolean, reflect: true }) public disabled = false; + protected _labelClick() { const input = this.input as HTMLInputElement | undefined; if (!input) return; @@ -44,6 +46,9 @@ export class HaFormfield extends FormfieldBase { padding-inline-start: 4px; padding-inline-end: 0; } + :host([disabled]) label { + color: var(--disabled-text-color); + } `, ]; } diff --git a/src/components/ha-selector/ha-selector-select.ts b/src/components/ha-selector/ha-selector-select.ts index 069dd157d424..91fb682d7efd 100644 --- a/src/components/ha-selector/ha-selector-select.ts +++ b/src/components/ha-selector/ha-selector-select.ts @@ -102,7 +102,10 @@ export class HaSelectSelector extends LitElement { ${this.label} ${options.map( (item: SelectOption) => html` - + + (localize: LocalizeFunc, currentType: string, isNew: boolean) => [ { name: "title", selector: { text: {} } }, { @@ -61,6 +64,11 @@ export class HuiViewEditor extends LitElement { label: localize( `ui.panel.lovelace.editor.edit_view.types.${type}` ), + disabled: + !isNew && + (currentType === SECTION_VIEW_LAYOUT + ? type !== SECTION_VIEW_LAYOUT + : type === SECTION_VIEW_LAYOUT), })), }, }, @@ -71,7 +79,7 @@ export class HuiViewEditor extends LitElement { boolean: {}, }, }, - ] as const + ] as const satisfies HaFormSchema[] ); set config(config: LovelaceViewConfig) { @@ -92,7 +100,7 @@ export class HuiViewEditor extends LitElement { return nothing; } - const schema = this._schema(this.hass.localize); + const schema = this._schema(this.hass.localize, this._type, this.isNew); const data = { ...this._config, @@ -156,6 +164,15 @@ export class HuiViewEditor extends LitElement { return this.hass.localize( "ui.panel.lovelace.editor.edit_view.subview_helper" ); + case "type": + if (this.isNew) return undefined; + return this._type === "sections" + ? this.hass.localize( + "ui.panel.lovelace.editor.edit_view.type_helper_others" + ) + : this.hass.localize( + "ui.panel.lovelace.editor.edit_view.type_helper_sections" + ); default: return undefined; } diff --git a/src/translations/en.json b/src/translations/en.json index 499a495fdad1..fbec99072edc 100644 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -5101,6 +5101,9 @@ "select_users": "Select which users should see this view in the navigation" }, "type": "View type", + "type_helper_sections": "You can not change your view to use the 'sections' view type, because migration is not supported yet. Start from scratch with a new view if you want to experiment with the 'sections' view.", + "type_helper_others": "You can not change your view to an other type because migration is not supported yet. Start from scratch with a new view if you want to use another view type.", + "types": { "masonry": "Masonry (default)", "sidebar": "Sidebar", From 763c672e36a57d233b40d04168dd1c98704a738e Mon Sep 17 00:00:00 2001 From: karwosts <32912880+karwosts@users.noreply.github.com> Date: Wed, 28 Feb 2024 06:54:44 -0500 Subject: [PATCH 068/425] Automated outlier detection for adjust sum dialog (#18723) --- .../dialog-statistics-adjust-sum.ts | 107 ++++++++++++++++++ src/translations/en.json | 1 + 2 files changed, 108 insertions(+) diff --git a/src/panels/developer-tools/statistics/dialog-statistics-adjust-sum.ts b/src/panels/developer-tools/statistics/dialog-statistics-adjust-sum.ts index 6ffa9790da95..b32666bde6de 100644 --- a/src/panels/developer-tools/statistics/dialog-statistics-adjust-sum.ts +++ b/src/panels/developer-tools/statistics/dialog-statistics-adjust-sum.ts @@ -34,6 +34,11 @@ import { HomeAssistant } from "../../../types"; import { showToast } from "../../../util/toast"; import type { DialogStatisticsAdjustSumParams } from "./show-dialog-statistics-adjust-sum"; +interface CombinedStat { + hour: StatisticValue | null; + fiveMin: StatisticValue[]; +} + @customElement("dialog-statistics-adjust-sum") export class DialogStatisticsFixUnsupportedUnitMetadata extends LitElement { @property({ attribute: false }) public hass!: HomeAssistant; @@ -196,6 +201,13 @@ export class DialogStatisticsFixUnsupportedUnitMetadata extends LitElement { @value-changed=${this._dateTimeSelectorChanged} >
    ${stats}
    + { + this._stats5min = undefined; + this._statsHour = undefined; + const statId = this._params!.statistic.statistic_id; + + // Get all the data + const start = new Date(0); + const end = new Date(); + + const statsHourData = await fetchStatistics( + this.hass, + start, + end, + [statId], + "hour" + ); + + const statsHour = statId in statsHourData ? statsHourData[statId] : []; + if (statsHour.length === 0) { + return; + } + + const stats5MinData = await fetchStatistics( + this.hass, + start, + end, + [statId], + "5minute" + ); + + const stats5Min = statId in stats5MinData ? stats5MinData[statId] : []; + // First datapoint of 5 minute data in the history is always junk since it counts the entire sum + // as the change, which we don't want here. + stats5Min.shift(); + + const combinedStatsData: CombinedStat[] = []; + statsHour.forEach((s) => { + combinedStatsData.push({ hour: s, fiveMin: [] }); + }); + + const lasthour: CombinedStat = { hour: null, fiveMin: [] }; + + let i = 0; + stats5Min.forEach((s) => { + let matched = false; + for (i; i < combinedStatsData.length; i++) { + const hour = combinedStatsData[i].hour; + if (hour && s.start >= hour.start && s.end <= hour.end) { + combinedStatsData[i].fiveMin.push(s); + matched = true; + break; + } + } + if (!matched) { + lasthour.fiveMin.push(s); + } + }); + + combinedStatsData.push(lasthour); + + let statsOutliers: StatisticValue[] = []; + let min = 0; + const numOutliers = 10; + + // Track the top 10 values. + const addOutlier = (s) => { + const val = Math.abs(s.change ?? 0); + if (statsOutliers.length < numOutliers || val > min) { + statsOutliers.push(s); + statsOutliers = statsOutliers.sort( + (a, b) => Math.abs(b.change ?? 0) - Math.abs(a.change ?? 0) + ); + statsOutliers = statsOutliers.slice(0, numOutliers); + min = statsOutliers[statsOutliers.length - 1].change ?? 0; + } + }; + + // If an hour has no five minute data, add the hour value + // Otherwise, add the 5 minute values and ignore the hour value + combinedStatsData.forEach((c) => { + if (c.fiveMin.length === 0 && c.hour) { + addOutlier(c.hour); + } else { + c.fiveMin.forEach((s) => { + addOutlier(s); + }); + } + }); + + // Outliers are a possible mix of hour/5minute data, but the distinction + // is not relevant here, as long as only one array is populated. + this._statsHour = statsOutliers; + this._stats5min = []; + } + private async _fixIssue(): Promise { const unit = getDisplayUnit( this.hass, diff --git a/src/translations/en.json b/src/translations/en.json index fbec99072edc..733d393c4cb1 100644 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -6355,6 +6355,7 @@ "end": "End", "new_value": "New value", "adjust": "Adjust", + "outliers": "Outliers", "sum_adjusted": "Statistic sum adjusted", "error_sum_adjusted": "Error adjusting sum: {message}" } From 291638a9ddb7629c9d0baeae9c877df936c492a7 Mon Sep 17 00:00:00 2001 From: karwosts <32912880+karwosts@users.noreply.github.com> Date: Wed, 28 Feb 2024 07:08:31 -0500 Subject: [PATCH 069/425] Deduplicate blueprint editor code (#19791) * Deduplicate blueprint editor code * prune unneeded imports --- .../automation/blueprint-automation-editor.ts | 266 +---------------- .../blueprint/blueprint-generic-editor.ts | 275 ++++++++++++++++++ .../config/script/blueprint-script-editor.ts | 265 +---------------- 3 files changed, 293 insertions(+), 513 deletions(-) create mode 100644 src/panels/config/blueprint/blueprint-generic-editor.ts diff --git a/src/panels/config/automation/blueprint-automation-editor.ts b/src/panels/config/automation/blueprint-automation-editor.ts index f57806f89613..2ff983d4c059 100644 --- a/src/panels/config/automation/blueprint-automation-editor.ts +++ b/src/panels/config/automation/blueprint-automation-editor.ts @@ -1,56 +1,23 @@ import "@material/mwc-button/mwc-button"; import { HassEntity } from "home-assistant-js-websocket"; -import { css, CSSResultGroup, html, LitElement } from "lit"; -import { customElement, property, state } from "lit/decorators"; -import { fireEvent } from "../../../common/dom/fire_event"; -import { nestedArrayMove } from "../../../common/util/array-move"; +import { html } from "lit"; +import { customElement, property } from "lit/decorators"; import "../../../components/ha-alert"; -import "../../../components/ha-blueprint-picker"; -import "../../../components/ha-card"; -import "../../../components/ha-circular-progress"; -import "../../../components/ha-markdown"; -import "../../../components/ha-selector/ha-selector"; -import "../../../components/ha-settings-row"; import { BlueprintAutomationConfig } from "../../../data/automation"; -import { - BlueprintOrError, - Blueprints, - fetchBlueprints, -} from "../../../data/blueprint"; -import { haStyle } from "../../../resources/styles"; -import { HomeAssistant } from "../../../types"; -import "../ha-config-section"; +import { fetchBlueprints } from "../../../data/blueprint"; +import { HaBlueprintGenericEditor } from "../blueprint/blueprint-generic-editor"; @customElement("blueprint-automation-editor") -export class HaBlueprintAutomationEditor extends LitElement { - @property({ attribute: false }) public hass!: HomeAssistant; - - @property({ type: Boolean }) public isWide = false; - - @property({ type: Boolean }) public disabled = false; - - @property({ type: Boolean, reflect: true }) public narrow = false; - +export class HaBlueprintAutomationEditor extends HaBlueprintGenericEditor { @property({ attribute: false }) public config!: BlueprintAutomationConfig; @property({ attribute: false }) public stateObj?: HassEntity; - @state() private _blueprints?: Blueprints; - - protected firstUpdated(changedProps) { - super.firstUpdated(changedProps); - this._getBlueprints(); - } - - private get _blueprint(): BlueprintOrError | undefined { - if (!this._blueprints) { - return undefined; - } - return this._blueprints[this.config.use_blueprint.path]; + protected get _config(): BlueprintAutomationConfig { + return this.config; } protected render() { - const blueprint = this._blueprint; return html` ${this.disabled ? html` @@ -77,167 +44,14 @@ export class HaBlueprintAutomationEditor extends LitElement { ${this.config.description ? html`

    ${this.config.description}

    ` : ""} - -
    - ${this._blueprints - ? Object.keys(this._blueprints).length - ? html` - - ` - : this.hass.localize( - "ui.panel.config.automation.editor.blueprint.no_blueprints" - ) - : html``} -
    - - ${this.config.use_blueprint.path - ? blueprint && "error" in blueprint - ? html`

    - There is an error in this Blueprint: ${blueprint.error} -

    ` - : html`${blueprint?.metadata.description - ? html`` - : ""} - ${blueprint?.metadata?.input && - Object.keys(blueprint.metadata.input).length - ? Object.entries(blueprint.metadata.input).map( - ([key, value]) => { - const selector = value?.selector ?? { text: undefined }; - const type = Object.keys(selector)[0]; - const enhancedSelector = [ - "action", - "condition", - "trigger", - ].includes(type) - ? { - [type]: { - ...selector[type], - path: [key], - }, - } - : selector; - - return html` - ${value?.name || key} - - ${html``} - `; - } - ) - : html`

    - ${this.hass.localize( - "ui.panel.config.automation.editor.blueprint.no_inputs" - )} -

    `}` - : ""} -
    + ${this.renderCard()} `; } - private async _getBlueprints() { + protected async _getBlueprints() { this._blueprints = await fetchBlueprints(this.hass, "automation"); } - private _blueprintChanged(ev) { - ev.stopPropagation(); - if (this.config.use_blueprint.path === ev.detail.value) { - return; - } - fireEvent(this, "value-changed", { - value: { - ...this.config, - use_blueprint: { - path: ev.detail.value, - }, - }, - }); - } - - private _inputChanged(ev) { - ev.stopPropagation(); - const target = ev.target as any; - const key = target.key; - const value = ev.detail ? ev.detail.value : target.value; - if ( - (this.config.use_blueprint.input && - this.config.use_blueprint.input[key] === value) || - (!this.config.use_blueprint.input && value === "") - ) { - return; - } - const input = { ...this.config.use_blueprint.input, [key]: value }; - - fireEvent(this, "value-changed", { - value: { - ...this.config, - use_blueprint: { - ...this.config.use_blueprint, - input, - }, - }, - }); - } - - private _itemMoved(ev) { - ev.stopPropagation(); - const { oldIndex, newIndex, oldPath, newPath } = ev.detail; - - const input = nestedArrayMove( - this.config.use_blueprint.input, - oldIndex, - newIndex, - oldPath, - newPath - ); - - fireEvent(this, "value-changed", { - value: { - ...this.config, - use_blueprint: { - ...this.config.use_blueprint, - input, - }, - }, - }); - } - private async _enable(): Promise { if (!this.hass || !this.stateObj) { return; @@ -246,69 +60,7 @@ export class HaBlueprintAutomationEditor extends LitElement { entity_id: this.stateObj.entity_id, }); } - - private _duplicate() { - fireEvent(this, "duplicate"); - } - - static get styles(): CSSResultGroup { - return [ - haStyle, - css` - :host { - display: block; - } - ha-card.blueprint { - margin: 0 auto; - } - .padding { - padding: 16px; - } - .link-button-row { - padding: 14px; - } - .blueprint-picker-container { - padding: 0 16px 16px; - } - ha-textfield, - ha-blueprint-picker { - display: block; - } - h3 { - margin: 16px; - } - .introduction { - margin-top: 0; - margin-bottom: 12px; - } - .introduction a { - color: var(--primary-color); - } - p { - margin-bottom: 0; - } - .description { - margin-bottom: 16px; - } - ha-settings-row { - --paper-time-input-justify-content: flex-end; - --settings-row-content-width: 100%; - --settings-row-prefix-display: contents; - border-top: 1px solid var(--divider-color); - } - ha-alert { - margin-bottom: 16px; - display: block; - } - ha-alert.re-order { - border-radius: var(--ha-card-border-radius, 12px); - overflow: hidden; - } - `, - ]; - } } - declare global { interface HTMLElementTagNameMap { "blueprint-automation-editor": HaBlueprintAutomationEditor; diff --git a/src/panels/config/blueprint/blueprint-generic-editor.ts b/src/panels/config/blueprint/blueprint-generic-editor.ts new file mode 100644 index 000000000000..188ef35e25f9 --- /dev/null +++ b/src/panels/config/blueprint/blueprint-generic-editor.ts @@ -0,0 +1,275 @@ +import "@material/mwc-button/mwc-button"; +import { css, CSSResultGroup, html, LitElement } from "lit"; +import { customElement, property, state } from "lit/decorators"; +import { fireEvent } from "../../../common/dom/fire_event"; +import { nestedArrayMove } from "../../../common/util/array-move"; +import "../../../components/ha-alert"; +import "../../../components/ha-blueprint-picker"; +import "../../../components/ha-card"; +import "../../../components/ha-circular-progress"; +import "../../../components/ha-markdown"; +import "../../../components/ha-selector/ha-selector"; +import "../../../components/ha-settings-row"; +import { BlueprintAutomationConfig } from "../../../data/automation"; +import { BlueprintOrError, Blueprints } from "../../../data/blueprint"; +import { BlueprintScriptConfig } from "../../../data/script"; +import { haStyle } from "../../../resources/styles"; +import { HomeAssistant } from "../../../types"; + +@customElement("blueprint-generic-editor") +export abstract class HaBlueprintGenericEditor extends LitElement { + @property({ attribute: false }) public hass!: HomeAssistant; + + @property({ type: Boolean }) public isWide = false; + + @property({ type: Boolean }) public disabled = false; + + @property({ type: Boolean, reflect: true }) public narrow = false; + + @state() protected _blueprints?: Blueprints; + + protected firstUpdated(changedProps) { + super.firstUpdated(changedProps); + this._getBlueprints(); + } + + protected get _blueprint(): BlueprintOrError | undefined { + if (!this._blueprints) { + return undefined; + } + return this._blueprints[this._config.use_blueprint.path]; + } + + protected abstract get _config(): + | BlueprintAutomationConfig + | BlueprintScriptConfig; + + protected renderCard() { + const blueprint = this._blueprint; + return html` + +
    + ${this._blueprints + ? Object.keys(this._blueprints).length + ? html` + + ` + : this.hass.localize( + "ui.panel.config.automation.editor.blueprint.no_blueprints" + ) + : html``} +
    + + ${this._config.use_blueprint.path + ? blueprint && "error" in blueprint + ? html`

    + There is an error in this Blueprint: ${blueprint.error} +

    ` + : html`${blueprint?.metadata.description + ? html`` + : ""} + ${blueprint?.metadata?.input && + Object.keys(blueprint.metadata.input).length + ? Object.entries(blueprint.metadata.input).map( + ([key, value]) => { + const selector = value?.selector ?? { text: undefined }; + const type = Object.keys(selector)[0]; + const enhancedSelector = [ + "action", + "condition", + "trigger", + ].includes(type) + ? { + [type]: { + ...selector[type], + path: [key], + }, + } + : selector; + + return html` + ${value?.name || key} + + ${html``} + `; + } + ) + : html`

    + ${this.hass.localize( + "ui.panel.config.automation.editor.blueprint.no_inputs" + )} +

    `}` + : ""} +
    + `; + } + + protected abstract _getBlueprints(); + + private _blueprintChanged(ev) { + ev.stopPropagation(); + if (this._config.use_blueprint.path === ev.detail.value) { + return; + } + fireEvent(this, "value-changed", { + value: { + ...this._config, + use_blueprint: { + path: ev.detail.value, + }, + }, + }); + } + + private _inputChanged(ev) { + ev.stopPropagation(); + const target = ev.target as any; + const key = target.key; + const value = ev.detail ? ev.detail.value : target.value; + if ( + (this._config.use_blueprint.input && + this._config.use_blueprint.input[key] === value) || + (!this._config.use_blueprint.input && value === "") + ) { + return; + } + const input = { ...this._config.use_blueprint.input, [key]: value }; + + fireEvent(this, "value-changed", { + value: { + ...this._config, + use_blueprint: { + ...this._config.use_blueprint, + input, + }, + }, + }); + } + + private _itemMoved(ev) { + ev.stopPropagation(); + const { oldIndex, newIndex, oldPath, newPath } = ev.detail; + + const input = nestedArrayMove( + this._config.use_blueprint.input, + oldIndex, + newIndex, + oldPath, + newPath + ); + + fireEvent(this, "value-changed", { + value: { + ...this._config, + use_blueprint: { + ...this._config.use_blueprint, + input, + }, + }, + }); + } + + protected _duplicate() { + fireEvent(this, "duplicate"); + } + + static get styles(): CSSResultGroup { + return [ + haStyle, + css` + :host { + display: block; + } + ha-card.blueprint { + margin: 0 auto; + } + .padding { + padding: 16px; + } + .link-button-row { + padding: 14px; + } + .blueprint-picker-container { + padding: 0 16px 16px; + } + ha-textfield, + ha-blueprint-picker { + display: block; + } + h3 { + margin: 16px; + } + .introduction { + margin-top: 0; + margin-bottom: 12px; + } + .introduction a { + color: var(--primary-color); + } + p { + margin-bottom: 0; + } + .description { + margin-bottom: 16px; + } + ha-settings-row { + --paper-time-input-justify-content: flex-end; + --settings-row-content-width: 100%; + --settings-row-prefix-display: contents; + border-top: 1px solid var(--divider-color); + } + ha-alert { + margin-bottom: 16px; + display: block; + } + ha-alert.re-order { + border-radius: var(--ha-card-border-radius, 12px); + overflow: hidden; + } + `, + ]; + } +} + +declare global { + interface HTMLElementTagNameMap { + "blueprint-generic-editor": HaBlueprintGenericEditor; + } +} diff --git a/src/panels/config/script/blueprint-script-editor.ts b/src/panels/config/script/blueprint-script-editor.ts index be455965f4cc..c233eae66245 100644 --- a/src/panels/config/script/blueprint-script-editor.ts +++ b/src/panels/config/script/blueprint-script-editor.ts @@ -1,52 +1,19 @@ -import { css, CSSResultGroup, html, LitElement } from "lit"; -import { customElement, property, state } from "lit/decorators"; -import { fireEvent } from "../../../common/dom/fire_event"; -import { nestedArrayMove } from "../../../common/util/array-move"; +import { html } from "lit"; +import { customElement, property } from "lit/decorators"; import "../../../components/ha-alert"; -import "../../../components/ha-blueprint-picker"; -import "../../../components/ha-card"; -import "../../../components/ha-circular-progress"; -import "../../../components/ha-markdown"; -import "../../../components/ha-selector/ha-selector"; -import "../../../components/ha-settings-row"; -import { - BlueprintOrError, - Blueprints, - fetchBlueprints, -} from "../../../data/blueprint"; import { BlueprintScriptConfig } from "../../../data/script"; -import { haStyle } from "../../../resources/styles"; -import { HomeAssistant } from "../../../types"; -import "../ha-config-section"; +import { fetchBlueprints } from "../../../data/blueprint"; +import { HaBlueprintGenericEditor } from "../blueprint/blueprint-generic-editor"; @customElement("blueprint-script-editor") -export class HaBlueprintScriptEditor extends LitElement { - @property({ attribute: false }) public hass!: HomeAssistant; - - @property({ type: Boolean }) public isWide = false; - - @property({ reflect: true, type: Boolean }) public narrow = false; - - @property({ type: Boolean }) public disabled = false; - +export class HaBlueprintScriptEditor extends HaBlueprintGenericEditor { @property({ attribute: false }) public config!: BlueprintScriptConfig; - @state() private _blueprints?: Blueprints; - - protected firstUpdated(changedProps) { - super.firstUpdated(changedProps); - this._getBlueprints(); - } - - private get _blueprint(): BlueprintOrError | undefined { - if (!this._blueprints) { - return undefined; - } - return this._blueprints[this.config.use_blueprint.path]; + protected get _config(): BlueprintScriptConfig { + return this.config; } protected render() { - const blueprint = this._blueprint; return html` ${this.disabled ? html` @@ -56,228 +23,14 @@ export class HaBlueprintScriptEditor extends LitElement {
    ` : ""} - -
    - ${this._blueprints - ? Object.keys(this._blueprints).length - ? html` - - ` - : this.hass.localize( - "ui.panel.config.automation.editor.blueprint.no_blueprints" - ) - : html``} -
    - ${this.config.use_blueprint.path - ? blueprint && "error" in blueprint - ? html`

    - There is an error in this Blueprint: ${blueprint.error} -

    ` - : html`${blueprint?.metadata.description - ? html`` - : ""} - ${blueprint?.metadata?.input && - Object.keys(blueprint.metadata.input).length - ? Object.entries(blueprint.metadata.input).map( - ([key, value]) => { - const selector = value?.selector ?? { text: undefined }; - const type = Object.keys(selector)[0]; - const enhancedSelector = [ - "action", - "condition", - "trigger", - ].includes(type) - ? { - [type]: { - ...selector[type], - path: [key], - }, - } - : selector; - - return html` - ${value?.name || key} - - ${html``} - `; - } - ) - : html`

    - ${this.hass.localize( - "ui.panel.config.automation.editor.blueprint.no_inputs" - )} -

    `}` - : ""} -
    + ${this.renderCard()} `; } - private async _getBlueprints() { + protected async _getBlueprints() { this._blueprints = await fetchBlueprints(this.hass, "script"); } - - private _blueprintChanged(ev) { - ev.stopPropagation(); - if (this.config.use_blueprint.path === ev.detail.value) { - return; - } - fireEvent(this, "value-changed", { - value: { - ...this.config, - use_blueprint: { - path: ev.detail.value, - }, - }, - }); - } - - private _inputChanged(ev) { - ev.stopPropagation(); - const target = ev.target as any; - const key = target.key; - const value = ev.detail ? ev.detail.value : target.value; - if ( - (this.config.use_blueprint.input && - this.config.use_blueprint.input[key] === value) || - (!this.config.use_blueprint.input && value === "") - ) { - return; - } - const input = { ...this.config.use_blueprint.input, [key]: value }; - - fireEvent(this, "value-changed", { - value: { - ...this.config, - use_blueprint: { - ...this.config.use_blueprint, - input, - }, - }, - }); - } - - private _itemMoved(ev) { - ev.stopPropagation(); - const { oldIndex, newIndex, oldPath, newPath } = ev.detail; - - const input = nestedArrayMove( - this.config.use_blueprint.input, - oldIndex, - newIndex, - oldPath, - newPath - ); - - fireEvent(this, "value-changed", { - value: { - ...this.config, - use_blueprint: { - ...this.config.use_blueprint, - input, - }, - }, - }); - } - - private _duplicate() { - fireEvent(this, "duplicate"); - } - - static get styles(): CSSResultGroup { - return [ - haStyle, - css` - :host { - display: block; - } - ha-card.blueprint { - margin: 0 auto; - } - .padding { - padding: 16px; - } - .link-button-row { - padding: 14px; - } - .blueprint-picker-container { - padding: 0 16px 16px; - } - ha-textfield, - ha-blueprint-picker { - display: block; - } - h3 { - margin: 16px; - } - .introduction { - margin-top: 0; - margin-bottom: 12px; - } - .introduction a { - color: var(--primary-color); - } - p { - margin-bottom: 0; - } - .description { - margin-bottom: 16px; - } - ha-settings-row { - --paper-time-input-justify-content: flex-end; - --settings-row-content-width: 100%; - --settings-row-prefix-display: contents; - border-top: 1px solid var(--divider-color); - } - ha-alert { - margin-bottom: 16px; - display: block; - } - ha-alert.re-order { - border-radius: var(--ha-card-border-radius, 12px); - overflow: hidden; - } - `, - ]; - } } - declare global { interface HTMLElementTagNameMap { "blueprint-script-editor": HaBlueprintScriptEditor; From 155098bc410c2edb6d5ae81247fb7794d1f312c0 Mon Sep 17 00:00:00 2001 From: Paul Bottein Date: Wed, 28 Feb 2024 13:30:10 +0100 Subject: [PATCH 070/425] Center section in section view (#19904) --- .../lovelace/views/hui-sections-view.ts | 44 +++++++++++++------ 1 file changed, 30 insertions(+), 14 deletions(-) diff --git a/src/panels/lovelace/views/hui-sections-view.ts b/src/panels/lovelace/views/hui-sections-view.ts index fcd430c8ea06..cbf5af8570ec 100644 --- a/src/panels/lovelace/views/hui-sections-view.ts +++ b/src/panels/lovelace/views/hui-sections-view.ts @@ -2,6 +2,7 @@ import { mdiArrowAll, mdiDelete, mdiPencil, mdiViewGridPlus } from "@mdi/js"; import { CSSResultGroup, LitElement, css, html, nothing } from "lit"; import { customElement, property, state } from "lit/decorators"; import { repeat } from "lit/directives/repeat"; +import { styleMap } from "lit/directives/style-map"; import "../../../components/ha-icon-button"; import "../../../components/ha-sortable"; import "../../../components/ha-svg-icon"; @@ -64,7 +65,14 @@ export class SectionsView extends LitElement implements LovelaceViewElement { draggable-selector=".section" .rollback=${false} > -
    +
    ${repeat( sectionsConfig, (sectionConfig) => this._getKey(sectionConfig), @@ -230,25 +238,33 @@ export class SectionsView extends LitElement implements LovelaceViewElement { } .container { - --column-count: 3; + --grid-gap: 20px; + --grid-max-width: 1400px; + --grid-cell-max-width: 500px; + --grid-cell-min-width: 320px; display: grid; - grid-template-columns: repeat(var(--column-count), minmax(0, 1fr)); - gap: 8px 20px; - max-width: 1400px; - padding: 20px; + grid-template-columns: repeat( + auto-fit, + minmax(var(--grid-cell-min-width), 1fr) + ); + justify-content: center; + gap: 8px var(--grid-gap); + padding: var(--grid-gap); + box-sizing: border-box; + max-width: min( + calc( + var(--cell-count) * (var(--grid-cell-max-width) + var(--grid-gap)) + + var(--grid-gap) + ), + var(--grid-max-width) + ); margin: 0 auto; } - @media (max-width: 1200px) { - .container { - --column-count: 2; - } - } - @media (max-width: 600px) { .container { - --column-count: 1; - padding: 8px; + grid-template-columns: 1fr; + --grid-gap: 8px; } } From ebdbab81d3bbd032b5b9f72d1954d273131e6888 Mon Sep 17 00:00:00 2001 From: Simon Lamon <32477463+silamon@users.noreply.github.com> Date: Wed, 28 Feb 2024 13:51:59 +0100 Subject: [PATCH 071/425] Mobile view calendar improvements (#19218) * Mobile view calendar improvements * Remove very narrow * Revert default choice --- src/panels/calendar/ha-full-calendar.ts | 12 +++++++++++- src/panels/lovelace/cards/hui-calendar-card.ts | 11 +++++------ 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/src/panels/calendar/ha-full-calendar.ts b/src/panels/calendar/ha-full-calendar.ts index e1b3b082964e..46ceac93c9ad 100644 --- a/src/panels/calendar/ha-full-calendar.ts +++ b/src/panels/calendar/ha-full-calendar.ts @@ -188,7 +188,7 @@ export class HAFullCalendar extends LitElement {
    -
    +
    * { + margin-bottom: 5px; + box-sizing: border-box; + } + .today { margin-right: 20px; margin-inline-end: 20px; diff --git a/src/panels/lovelace/cards/hui-calendar-card.ts b/src/panels/lovelace/cards/hui-calendar-card.ts index 047118828ad1..1a31a6d1cf64 100644 --- a/src/panels/lovelace/cards/hui-calendar-card.ts +++ b/src/panels/lovelace/cards/hui-calendar-card.ts @@ -69,8 +69,6 @@ export class HuiCalendarCard extends LitElement implements LovelaceCard { @state() private _narrow = false; - @state() private _veryNarrow = false; - @state() private _error?: string = undefined; private _startDate?: Date; @@ -121,9 +119,11 @@ export class HuiCalendarCard extends LitElement implements LovelaceCard { return nothing; } - const views: FullCalendarView[] = this._veryNarrow - ? ["listWeek"] - : ["dayGridMonth", "dayGridDay", "listWeek"]; + const views: FullCalendarView[] = [ + "dayGridMonth", + "dayGridDay", + "listWeek", + ]; return html` @@ -206,7 +206,6 @@ export class HuiCalendarCard extends LitElement implements LovelaceCard { return; } this._narrow = card.offsetWidth < 870; - this._veryNarrow = card.offsetWidth < 350; } private async _attachObserver(): Promise { From 4dc154201af972bae20d0b523909701e9a6b4886 Mon Sep 17 00:00:00 2001 From: karwosts <32912880+karwosts@users.noreply.github.com> Date: Wed, 28 Feb 2024 07:55:11 -0500 Subject: [PATCH 072/425] Support color names in energy themes (#19597) * Support color names in energy themes * fix yarn --- package.json | 2 + .../lovelace/cards/energy/common/color.ts | 64 +++++ .../cards/energy/hui-energy-gas-graph-card.ts | 47 ++-- .../energy/hui-energy-solar-graph-card.ts | 47 ++-- .../energy/hui-energy-sources-table-card.ts | 244 +++++++++--------- .../energy/hui-energy-usage-graph-card.ts | 119 +++------ .../energy/hui-energy-water-graph-card.ts | 47 ++-- yarn.lock | 9 + 8 files changed, 284 insertions(+), 295 deletions(-) create mode 100644 src/panels/lovelace/cards/energy/common/color.ts diff --git a/package.json b/package.json index 60688e33b789..25616cee3e0d 100644 --- a/package.json +++ b/package.json @@ -99,6 +99,7 @@ "@webcomponents/webcomponentsjs": "2.8.0", "app-datepicker": "5.1.1", "chart.js": "4.4.1", + "color-name": "~1.1.4", "comlink": "4.4.1", "core-js": "3.36.0", "cropperjs": "1.6.1", @@ -170,6 +171,7 @@ "@types/babel__plugin-transform-runtime": "7.9.5", "@types/chromecast-caf-receiver": "6.0.13", "@types/chromecast-caf-sender": "1.0.8", + "@types/color-name": "^1", "@types/glob": "8.1.0", "@types/html-minifier-terser": "7.0.2", "@types/js-yaml": "4.0.9", diff --git a/src/panels/lovelace/cards/energy/common/color.ts b/src/panels/lovelace/cards/energy/common/color.ts new file mode 100644 index 000000000000..f9f02f367480 --- /dev/null +++ b/src/panels/lovelace/cards/energy/common/color.ts @@ -0,0 +1,64 @@ +import colors from "color-name"; +import { + hex2rgb, + lab2rgb, + rgb2hex, + rgb2lab, +} from "../../../../../common/color/convert-color"; +import { labBrighten, labDarken } from "../../../../../common/color/lab"; + +export function getEnergyColor( + computedStyles: CSSStyleDeclaration, + darkMode: boolean, + background: boolean, + compare: boolean, + propertyName: string, + idx?: number +): string { + const themeIdxColor = computedStyles + .getPropertyValue(propertyName + "-" + idx) + .trim(); + + const themeColor = + themeIdxColor.length > 0 + ? themeIdxColor + : computedStyles.getPropertyValue(propertyName).trim(); + + let hexColor; + if (themeColor.startsWith("#")) { + hexColor = themeColor; + } else { + const rgbFromColorName = colors[themeColor]; + if (!rgbFromColorName) { + // We have a named color, and there's nothing in the table, + // so nothing further we can do with it. + // Compare/border/background color will all be the same. + return themeColor; + } + hexColor = rgb2hex(rgbFromColorName); + } + + if (themeIdxColor.length === 0 && idx) { + // Brighten or darken the color based on set position. + // Skip if theme already provides a color for this set. + + hexColor = rgb2hex( + lab2rgb( + darkMode + ? labBrighten(rgb2lab(hex2rgb(hexColor)), idx) + : labDarken(rgb2lab(hex2rgb(hexColor)), idx) + ) + ); + } + + if (compare) { + if (background) { + hexColor += "32"; + } else { + hexColor += "7F"; + } + } else if (background) { + hexColor += "7F"; + } + return hexColor; +} diff --git a/src/panels/lovelace/cards/energy/hui-energy-gas-graph-card.ts b/src/panels/lovelace/cards/energy/hui-energy-gas-graph-card.ts index e55383015b9b..baf3b2a7a776 100644 --- a/src/panels/lovelace/cards/energy/hui-energy-gas-graph-card.ts +++ b/src/panels/lovelace/cards/energy/hui-energy-gas-graph-card.ts @@ -17,13 +17,7 @@ import { import { customElement, property, state } from "lit/decorators"; import { classMap } from "lit/directives/class-map"; import memoizeOne from "memoize-one"; -import { - hex2rgb, - lab2rgb, - rgb2hex, - rgb2lab, -} from "../../../../common/color/convert-color"; -import { labBrighten, labDarken } from "../../../../common/color/lab"; +import { getEnergyColor } from "./common/color"; import { formatNumber } from "../../../../common/number/format_number"; import "../../../../components/chart/ha-chart-base"; import "../../../../components/ha-card"; @@ -204,16 +198,12 @@ export class HuiEnergyGasGraphCard const datasets: ChartDataset<"bar", ScatterDataPoint[]>[] = []; const computedStyles = getComputedStyle(this); - const gasColor = computedStyles - .getPropertyValue("--energy-gas-color") - .trim(); datasets.push( ...this._processDataSet( energyData.stats, energyData.statsMetadata, gasSources, - gasColor, computedStyles ) ); @@ -235,7 +225,6 @@ export class HuiEnergyGasGraphCard energyData.statsCompare, energyData.statsMetadata, gasSources, - gasColor, computedStyles, true ) @@ -257,28 +246,12 @@ export class HuiEnergyGasGraphCard statistics: Statistics, statisticsMetaData: Record, gasSources: GasSourceTypeEnergyPreference[], - gasColor: string, computedStyles: CSSStyleDeclaration, compare = false ) { const data: ChartDataset<"bar", ScatterDataPoint[]>[] = []; gasSources.forEach((source, idx) => { - let borderColor = computedStyles - .getPropertyValue("--energy-gas-color-" + idx) - .trim(); - if (borderColor.length === 0) { - const modifiedColor = - idx > 0 - ? this.hass.themes.darkMode - ? labBrighten(rgb2lab(hex2rgb(gasColor)), idx) - : labDarken(rgb2lab(hex2rgb(gasColor)), idx) - : undefined; - borderColor = modifiedColor - ? rgb2hex(lab2rgb(modifiedColor)) - : gasColor; - } - let prevStart: number | null = null; const gasConsumptionData: ScatterDataPoint[] = []; @@ -317,8 +290,22 @@ export class HuiEnergyGasGraphCard source.stat_energy_from, statisticsMetaData[source.stat_energy_from] ), - borderColor: compare ? borderColor + "7F" : borderColor, - backgroundColor: compare ? borderColor + "32" : borderColor + "7F", + borderColor: getEnergyColor( + computedStyles, + this.hass.themes.darkMode, + false, + compare, + "--energy-gas-color", + idx + ), + backgroundColor: getEnergyColor( + computedStyles, + this.hass.themes.darkMode, + true, + compare, + "--energy-gas-color", + idx + ), data: gasConsumptionData, order: 1, stack: "gas", diff --git a/src/panels/lovelace/cards/energy/hui-energy-solar-graph-card.ts b/src/panels/lovelace/cards/energy/hui-energy-solar-graph-card.ts index d5f3e767d0ed..40d91584dcbb 100644 --- a/src/panels/lovelace/cards/energy/hui-energy-solar-graph-card.ts +++ b/src/panels/lovelace/cards/energy/hui-energy-solar-graph-card.ts @@ -22,13 +22,7 @@ import { import { customElement, property, state } from "lit/decorators"; import { classMap } from "lit/directives/class-map"; import memoizeOne from "memoize-one"; -import { - hex2rgb, - lab2rgb, - rgb2hex, - rgb2lab, -} from "../../../../common/color/convert-color"; -import { labBrighten, labDarken } from "../../../../common/color/lab"; +import { getEnergyColor } from "./common/color"; import { formatNumber } from "../../../../common/number/format_number"; import "../../../../components/chart/ha-chart-base"; import "../../../../components/ha-card"; @@ -226,16 +220,12 @@ export class HuiEnergySolarGraphCard const datasets: ChartDataset<"bar" | "line">[] = []; const computedStyles = getComputedStyle(this); - const solarColor = computedStyles - .getPropertyValue("--energy-solar-color") - .trim(); datasets.push( ...this._processDataSet( energyData.stats, energyData.statsMetadata, solarSources, - solarColor, computedStyles ) ); @@ -257,7 +247,6 @@ export class HuiEnergySolarGraphCard energyData.statsCompare, energyData.statsMetadata, solarSources, - solarColor, computedStyles, true ) @@ -292,28 +281,12 @@ export class HuiEnergySolarGraphCard statistics: Statistics, statisticsMetaData: Record, solarSources: SolarSourceTypeEnergyPreference[], - solarColor: string, computedStyles: CSSStyleDeclaration, compare = false ) { const data: ChartDataset<"bar", ScatterDataPoint[]>[] = []; solarSources.forEach((source, idx) => { - let borderColor = computedStyles - .getPropertyValue("--energy-solar-color-" + idx) - .trim(); - if (borderColor.length === 0) { - const modifiedColor = - idx > 0 - ? this.hass.themes.darkMode - ? labBrighten(rgb2lab(hex2rgb(solarColor)), idx) - : labDarken(rgb2lab(hex2rgb(solarColor)), idx) - : undefined; - borderColor = modifiedColor - ? rgb2hex(lab2rgb(modifiedColor)) - : solarColor; - } - let prevStart: number | null = null; const solarProductionData: ScatterDataPoint[] = []; @@ -357,8 +330,22 @@ export class HuiEnergySolarGraphCard ), } ), - borderColor: compare ? borderColor + "7F" : borderColor, - backgroundColor: compare ? borderColor + "32" : borderColor + "7F", + borderColor: getEnergyColor( + computedStyles, + this.hass.themes.darkMode, + false, + compare, + "--energy-solar-color", + idx + ), + backgroundColor: getEnergyColor( + computedStyles, + this.hass.themes.darkMode, + true, + compare, + "--energy-solar-color", + idx + ), data: solarProductionData, order: 1, stack: "solar", diff --git a/src/panels/lovelace/cards/energy/hui-energy-sources-table-card.ts b/src/panels/lovelace/cards/energy/hui-energy-sources-table-card.ts index 2be70f203bee..4373c30bd10b 100644 --- a/src/panels/lovelace/cards/energy/hui-energy-sources-table-card.ts +++ b/src/panels/lovelace/cards/energy/hui-energy-sources-table-card.ts @@ -12,14 +12,8 @@ import { } from "lit"; import { customElement, property, state } from "lit/decorators"; import { styleMap } from "lit/directives/style-map"; -import { - hex2rgb, - lab2rgb, - rgb2hex, - rgb2lab, -} from "../../../../common/color/convert-color"; -import { labBrighten, labDarken } from "../../../../common/color/lab"; import { formatNumber } from "../../../../common/number/format_number"; +import { getEnergyColor } from "./common/color"; import "../../../../components/ha-card"; import { EnergyData, @@ -38,6 +32,16 @@ import { LovelaceCard } from "../../types"; import { EnergySourcesTableCardConfig } from "../types"; import { hasConfigChanged } from "../../common/has-changed"; +const colorPropertyMap = { + grid_return: "--energy-grid-return-color", + grid_consumption: "--energy-grid-consumption-color", + battery_in: "--energy-battery-in-color", + battery_out: "--energy-battery-out-color", + solar: "--energy-solar-color", + gas: "--energy-gas-color", + water: "--energy-water-color", +}; + @customElement("hui-energy-sources-table-card") export class HuiEnergySourcesTableCard extends SubscribeMixin(LitElement) @@ -77,27 +81,6 @@ export class HuiEnergySourcesTableCard ); } - private _getColor( - computedStyles: CSSStyleDeclaration, - propertyName: string, - baseColor: string, - idx: number - ): string { - let color = computedStyles - .getPropertyValue(propertyName + "-" + idx) - .trim(); - if (color.length === 0) { - const modifiedColor = - idx > 0 - ? this.hass.themes.darkMode - ? labBrighten(rgb2lab(hex2rgb(baseColor)), idx) - : labDarken(rgb2lab(hex2rgb(baseColor)), idx) - : undefined; - color = modifiedColor ? rgb2hex(lab2rgb(modifiedColor)) : baseColor; - } - return color; - } - protected render() { if (!this.hass || !this._config) { return nothing; @@ -133,38 +116,7 @@ export class HuiEnergySourcesTableCard const types = energySourcesByType(this._data.prefs); - const colorPropertyMap = { - grid_return: "--energy-grid-return-color", - grid_consumption: "--energy-grid-consumption-color", - battery_in: "--energy-battery-in-color", - battery_out: "--energy-battery-out-color", - solar: "--energy-solar-color", - gas: "--energy-gas-color", - water: "--energy-water-color", - }; - const computedStyles = getComputedStyle(this); - const solarColor = computedStyles - .getPropertyValue(colorPropertyMap.solar) - .trim(); - const batteryFromColor = computedStyles - .getPropertyValue(colorPropertyMap.battery_out) - .trim(); - const batteryToColor = computedStyles - .getPropertyValue(colorPropertyMap.battery_in) - .trim(); - const returnColor = computedStyles - .getPropertyValue(colorPropertyMap.grid_return) - .trim(); - const consumptionColor = computedStyles - .getPropertyValue(colorPropertyMap.grid_consumption) - .trim(); - const gasColor = computedStyles - .getPropertyValue(colorPropertyMap.gas) - .trim(); - const waterColor = computedStyles - .getPropertyValue(colorPropertyMap.water) - .trim(); const showCosts = types.grid?.[0].flow_from.some( @@ -273,20 +225,27 @@ export class HuiEnergySourcesTableCard 0; totalSolarCompare += compareEnergy; - const color = this._getColor( - computedStyles, - colorPropertyMap.solar, - solarColor, - idx - ); - return html`
    @@ -371,26 +330,27 @@ export class HuiEnergySourcesTableCard 0; totalBatteryCompare += energyFromCompare - energyToCompare; - const fromColor = this._getColor( - computedStyles, - colorPropertyMap.battery_out, - batteryFromColor, - idx - ); - const toColor = this._getColor( - computedStyles, - colorPropertyMap.battery_in, - batteryToColor, - idx - ); - return html`
    @@ -426,8 +386,22 @@ export class HuiEnergySourcesTableCard
    @@ -534,20 +508,27 @@ export class HuiEnergySourcesTableCard totalGridCostCompare += costCompare; } - const color = this._getColor( - computedStyles, - colorPropertyMap.grid_consumption, - consumptionColor, - idx - ); - return html`
    @@ -638,20 +619,27 @@ export class HuiEnergySourcesTableCard totalGridCostCompare += costCompare; } - const color = this._getColor( - computedStyles, - colorPropertyMap.grid_return, - returnColor, - idx - ); - return html`
    @@ -794,20 +782,27 @@ export class HuiEnergySourcesTableCard totalGasCostCompare += costCompare; } - const color = this._getColor( - computedStyles, - colorPropertyMap.gas, - gasColor, - idx - ); - return html`
    @@ -945,20 +940,27 @@ export class HuiEnergySourcesTableCard totalWaterCostCompare += costCompare; } - const color = this._getColor( - computedStyles, - colorPropertyMap.water, - waterColor, - idx - ); - return html`
    diff --git a/src/panels/lovelace/cards/energy/hui-energy-usage-graph-card.ts b/src/panels/lovelace/cards/energy/hui-energy-usage-graph-card.ts index 5b28a4195b5a..7b7c45db8090 100644 --- a/src/panels/lovelace/cards/energy/hui-energy-usage-graph-card.ts +++ b/src/panels/lovelace/cards/energy/hui-energy-usage-graph-card.ts @@ -17,13 +17,7 @@ import { import { customElement, property, state } from "lit/decorators"; import { classMap } from "lit/directives/class-map"; import memoizeOne from "memoize-one"; -import { - hex2rgb, - lab2rgb, - rgb2hex, - rgb2lab, -} from "../../../../common/color/convert-color"; -import { labBrighten, labDarken } from "../../../../common/color/lab"; +import { getEnergyColor } from "./common/color"; import { formatNumber } from "../../../../common/number/format_number"; import "../../../../components/chart/ha-chart-base"; import "../../../../components/ha-card"; @@ -41,10 +35,14 @@ import { EnergyUsageGraphCardConfig } from "../types"; import { hasConfigChanged } from "../../common/has-changed"; import { getCommonOptions } from "./common/energy-chart-options"; -interface ColorSet { - base: string; - overrides?: Record; -} +const colorPropertyMap = { + to_grid: "--energy-grid-return-color", + to_battery: "--energy-battery-in-color", + from_grid: "--energy-grid-consumption-color", + used_grid: "--energy-grid-consumption-color", + used_solar: "--energy-solar-color", + used_battery: "--energy-battery-out-color", +}; @customElement("hui-energy-usage-graph-card") export class HuiEnergyUsageGraphCard @@ -263,47 +261,9 @@ export class HuiEnergyUsageGraphCard const computedStyles = getComputedStyle(this); - const colorPropertyMap = { - to_grid: "--energy-grid-return-color", - to_battery: "--energy-battery-in-color", - from_grid: "--energy-grid-consumption-color", - used_grid: "--energy-grid-consumption-color", - used_solar: "--energy-solar-color", - used_battery: "--energy-battery-out-color", - }; - - const colors = { - to_grid: { - base: computedStyles.getPropertyValue(colorPropertyMap.to_grid).trim(), - }, - to_battery: { - base: computedStyles - .getPropertyValue(colorPropertyMap.to_battery) - .trim(), - }, - from_grid: { - base: computedStyles - .getPropertyValue(colorPropertyMap.from_grid) - .trim(), - }, - used_grid: { - base: computedStyles - .getPropertyValue(colorPropertyMap.used_grid) - .trim(), - }, - used_solar: { - base: computedStyles - .getPropertyValue(colorPropertyMap.used_solar) - .trim(), - }, - used_battery: { - base: computedStyles - .getPropertyValue(colorPropertyMap.used_battery) - .trim(), - }, - }; - - Object.entries(colorPropertyMap).forEach(([key, colorProp]) => { + const colorIndices: Record> = {}; + Object.keys(colorPropertyMap).forEach((key) => { + colorIndices[key] = {}; if ( key === "used_grid" || key === "used_solar" || @@ -311,15 +271,9 @@ export class HuiEnergyUsageGraphCard ) { return; } - colors[key].overrides = []; if (statIds[key]) { Object.values(statIds[key]).forEach((id, idx) => { - const override = computedStyles - .getPropertyValue(colorProp + "-" + idx) - .trim(); - if (override.length > 0) { - colors[key].overrides[id] = override; - } + colorIndices[key][id as string] = idx; }); } }); @@ -347,7 +301,8 @@ export class HuiEnergyUsageGraphCard energyData.stats, energyData.statsMetadata, statIds, - colors, + colorIndices, + computedStyles, labels, false ) @@ -370,7 +325,8 @@ export class HuiEnergyUsageGraphCard energyData.statsCompare, energyData.statsMetadata, statIds, - colors, + colorIndices, + computedStyles, labels, true ) @@ -392,14 +348,8 @@ export class HuiEnergyUsageGraphCard to_battery?: string[] | undefined; from_battery?: string[] | undefined; }, - colors: { - to_grid: ColorSet; - to_battery: ColorSet; - from_grid: ColorSet; - used_grid: ColorSet; - used_solar: ColorSet; - used_battery: ColorSet; - }, + colorIndices: Record>, + computedStyles: CSSStyleDeclaration, labels: { used_grid: string; used_solar: string; @@ -553,19 +503,6 @@ export class HuiEnergyUsageGraphCard Object.entries(combinedData).forEach(([type, sources]) => { Object.entries(sources).forEach(([statId, source], idx) => { - let borderColor = colors[type].overrides?.[statId]; - if (!borderColor) { - const modifiedColor = - idx > 0 - ? this.hass.themes.darkMode - ? labBrighten(rgb2lab(hex2rgb(colors[type].base)), idx) - : labDarken(rgb2lab(hex2rgb(colors[type].base)), idx) - : undefined; - borderColor = modifiedColor - ? rgb2hex(lab2rgb(modifiedColor)) - : colors[type].base; - } - const points: ScatterDataPoint[] = []; // Process chart data. for (const key of uniqueKeys) { @@ -600,8 +537,22 @@ export class HuiEnergyUsageGraphCard : type === "to_battery" ? Object.keys(combinedData).length : idx + 2, - borderColor: compare ? borderColor + "7F" : borderColor, - backgroundColor: compare ? borderColor + "32" : borderColor + "7F", + borderColor: getEnergyColor( + computedStyles, + this.hass.themes.darkMode, + false, + compare, + colorPropertyMap[type], + colorIndices[type]?.[statId] + ), + backgroundColor: getEnergyColor( + computedStyles, + this.hass.themes.darkMode, + true, + compare, + colorPropertyMap[type], + colorIndices[type]?.[statId] + ), stack: "stack", data: points, xAxisID: compare ? "xAxisCompare" : undefined, diff --git a/src/panels/lovelace/cards/energy/hui-energy-water-graph-card.ts b/src/panels/lovelace/cards/energy/hui-energy-water-graph-card.ts index e05d6fb66544..d5011fc9cb8f 100644 --- a/src/panels/lovelace/cards/energy/hui-energy-water-graph-card.ts +++ b/src/panels/lovelace/cards/energy/hui-energy-water-graph-card.ts @@ -17,13 +17,7 @@ import { import { customElement, property, state } from "lit/decorators"; import { classMap } from "lit/directives/class-map"; import memoizeOne from "memoize-one"; -import { - hex2rgb, - lab2rgb, - rgb2hex, - rgb2lab, -} from "../../../../common/color/convert-color"; -import { labBrighten, labDarken } from "../../../../common/color/lab"; +import { getEnergyColor } from "./common/color"; import { formatNumber } from "../../../../common/number/format_number"; import "../../../../components/chart/ha-chart-base"; import "../../../../components/ha-card"; @@ -202,16 +196,12 @@ export class HuiEnergyWaterGraphCard const datasets: ChartDataset<"bar", ScatterDataPoint[]>[] = []; const computedStyles = getComputedStyle(this); - const waterColor = computedStyles - .getPropertyValue("--energy-water-color") - .trim(); datasets.push( ...this._processDataSet( energyData.stats, energyData.statsMetadata, waterSources, - waterColor, computedStyles ) ); @@ -233,7 +223,6 @@ export class HuiEnergyWaterGraphCard energyData.statsCompare, energyData.statsMetadata, waterSources, - waterColor, computedStyles, true ) @@ -255,28 +244,12 @@ export class HuiEnergyWaterGraphCard statistics: Statistics, statisticsMetaData: Record, waterSources: WaterSourceTypeEnergyPreference[], - waterColor: string, computedStyles: CSSStyleDeclaration, compare = false ) { const data: ChartDataset<"bar", ScatterDataPoint[]>[] = []; waterSources.forEach((source, idx) => { - let borderColor = computedStyles - .getPropertyValue("--energy-water-color-" + idx) - .trim(); - if (borderColor.length === 0) { - const modifiedColor = - idx > 0 - ? this.hass.themes.darkMode - ? labBrighten(rgb2lab(hex2rgb(waterColor)), idx) - : labDarken(rgb2lab(hex2rgb(waterColor)), idx) - : undefined; - borderColor = modifiedColor - ? rgb2hex(lab2rgb(modifiedColor)) - : waterColor; - } - let prevStart: number | null = null; const waterConsumptionData: ScatterDataPoint[] = []; @@ -315,8 +288,22 @@ export class HuiEnergyWaterGraphCard source.stat_energy_from, statisticsMetaData[source.stat_energy_from] ), - borderColor: compare ? borderColor + "7F" : borderColor, - backgroundColor: compare ? borderColor + "32" : borderColor + "7F", + borderColor: getEnergyColor( + computedStyles, + this.hass.themes.darkMode, + false, + compare, + "--energy-water-color", + idx + ), + backgroundColor: getEnergyColor( + computedStyles, + this.hass.themes.darkMode, + true, + compare, + "--energy-water-color", + idx + ), data: waterConsumptionData, order: 1, stack: "water", diff --git a/yarn.lock b/yarn.lock index 1a0ff9d448ee..88c2e9af1d56 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4003,6 +4003,13 @@ __metadata: languageName: node linkType: hard +"@types/color-name@npm:^1": + version: 1.1.3 + resolution: "@types/color-name@npm:1.1.3" + checksum: 10/9060d16d0bce2cdf562d6da54e18c5f23e80308ccb58b725b9173a028818f27d8e01c8a5cd96952e76f11145a7388ed7d2f450fb4652f4760383834f2e698263 + languageName: node + linkType: hard + "@types/command-line-args@npm:^5.0.0": version: 5.2.3 resolution: "@types/command-line-args@npm:5.2.3" @@ -9605,6 +9612,7 @@ __metadata: "@types/babel__plugin-transform-runtime": "npm:7.9.5" "@types/chromecast-caf-receiver": "npm:6.0.13" "@types/chromecast-caf-sender": "npm:1.0.8" + "@types/color-name": "npm:^1" "@types/glob": "npm:8.1.0" "@types/html-minifier-terser": "npm:7.0.2" "@types/js-yaml": "npm:4.0.9" @@ -9635,6 +9643,7 @@ __metadata: babel-plugin-template-html-minifier: "npm:4.1.0" chai: "npm:5.1.0" chart.js: "npm:4.4.1" + color-name: "npm:~1.1.4" comlink: "npm:4.4.1" core-js: "npm:3.36.0" cropperjs: "npm:1.6.1" From 46394d0bf9b9efd9adcedbcd14dbe710fbd15a80 Mon Sep 17 00:00:00 2001 From: Charles Baynham Date: Wed, 28 Feb 2024 12:56:30 +0000 Subject: [PATCH 073/425] Always show "create new zone from current location" option (#19649) --- src/dialogs/more-info/controls/more-info-person.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/dialogs/more-info/controls/more-info-person.ts b/src/dialogs/more-info/controls/more-info-person.ts index bba6427c8f53..be00a04095be 100644 --- a/src/dialogs/more-info/controls/more-info-person.ts +++ b/src/dialogs/more-info/controls/more-info-person.ts @@ -34,7 +34,6 @@ class MoreInfoPerson extends LitElement { : ""} ${!__DEMO__ && this.hass.user?.is_admin && - this.stateObj.state === "not_home" && this.stateObj.attributes.latitude && this.stateObj.attributes.longitude ? html` From c47c6e358bba7eaeafc1d68352c6a9da37ca4e71 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 28 Feb 2024 13:05:53 +0000 Subject: [PATCH 074/425] Update dependency color-name to v2 (#19906) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 25616cee3e0d..d3957c62c635 100644 --- a/package.json +++ b/package.json @@ -99,7 +99,7 @@ "@webcomponents/webcomponentsjs": "2.8.0", "app-datepicker": "5.1.1", "chart.js": "4.4.1", - "color-name": "~1.1.4", + "color-name": "~2.0.0", "comlink": "4.4.1", "core-js": "3.36.0", "cropperjs": "1.6.1", diff --git a/yarn.lock b/yarn.lock index 88c2e9af1d56..975eb3a21ac3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6758,6 +6758,13 @@ __metadata: languageName: node linkType: hard +"color-name@npm:~2.0.0": + version: 2.0.0 + resolution: "color-name@npm:2.0.0" + checksum: 10/10a1addae41de2987d6b90dbd3cfade266c2e6f680ce21749911df4493b4fae07654862c6b5358bdd13e155461acb4eedaa5e0ba172bf13542cdcca10866cf2b + languageName: node + linkType: hard + "color-support@npm:^1.1.3": version: 1.1.3 resolution: "color-support@npm:1.1.3" @@ -9643,7 +9650,7 @@ __metadata: babel-plugin-template-html-minifier: "npm:4.1.0" chai: "npm:5.1.0" chart.js: "npm:4.4.1" - color-name: "npm:~1.1.4" + color-name: "npm:~2.0.0" comlink: "npm:4.4.1" core-js: "npm:3.36.0" cropperjs: "npm:1.6.1" From b982884933a848c988592b4689e6ff8b0353eda4 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 28 Feb 2024 08:26:26 -0500 Subject: [PATCH 075/425] Pin dependencies (#19905) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package.json | 4 ++-- yarn.lock | 20 ++++++++++---------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/package.json b/package.json index d3957c62c635..4109cdfb9d00 100644 --- a/package.json +++ b/package.json @@ -99,7 +99,7 @@ "@webcomponents/webcomponentsjs": "2.8.0", "app-datepicker": "5.1.1", "chart.js": "4.4.1", - "color-name": "~2.0.0", + "color-name": "2.0.0", "comlink": "4.4.1", "core-js": "3.36.0", "cropperjs": "1.6.1", @@ -171,7 +171,7 @@ "@types/babel__plugin-transform-runtime": "7.9.5", "@types/chromecast-caf-receiver": "6.0.13", "@types/chromecast-caf-sender": "1.0.8", - "@types/color-name": "^1", + "@types/color-name": "1.1.3", "@types/glob": "8.1.0", "@types/html-minifier-terser": "7.0.2", "@types/js-yaml": "4.0.9", diff --git a/yarn.lock b/yarn.lock index 975eb3a21ac3..874b6ffc716b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4003,7 +4003,7 @@ __metadata: languageName: node linkType: hard -"@types/color-name@npm:^1": +"@types/color-name@npm:1.1.3": version: 1.1.3 resolution: "@types/color-name@npm:1.1.3" checksum: 10/9060d16d0bce2cdf562d6da54e18c5f23e80308ccb58b725b9173a028818f27d8e01c8a5cd96952e76f11145a7388ed7d2f450fb4652f4760383834f2e698263 @@ -6751,6 +6751,13 @@ __metadata: languageName: node linkType: hard +"color-name@npm:2.0.0": + version: 2.0.0 + resolution: "color-name@npm:2.0.0" + checksum: 10/10a1addae41de2987d6b90dbd3cfade266c2e6f680ce21749911df4493b4fae07654862c6b5358bdd13e155461acb4eedaa5e0ba172bf13542cdcca10866cf2b + languageName: node + linkType: hard + "color-name@npm:~1.1.4": version: 1.1.4 resolution: "color-name@npm:1.1.4" @@ -6758,13 +6765,6 @@ __metadata: languageName: node linkType: hard -"color-name@npm:~2.0.0": - version: 2.0.0 - resolution: "color-name@npm:2.0.0" - checksum: 10/10a1addae41de2987d6b90dbd3cfade266c2e6f680ce21749911df4493b4fae07654862c6b5358bdd13e155461acb4eedaa5e0ba172bf13542cdcca10866cf2b - languageName: node - linkType: hard - "color-support@npm:^1.1.3": version: 1.1.3 resolution: "color-support@npm:1.1.3" @@ -9619,7 +9619,7 @@ __metadata: "@types/babel__plugin-transform-runtime": "npm:7.9.5" "@types/chromecast-caf-receiver": "npm:6.0.13" "@types/chromecast-caf-sender": "npm:1.0.8" - "@types/color-name": "npm:^1" + "@types/color-name": "npm:1.1.3" "@types/glob": "npm:8.1.0" "@types/html-minifier-terser": "npm:7.0.2" "@types/js-yaml": "npm:4.0.9" @@ -9650,7 +9650,7 @@ __metadata: babel-plugin-template-html-minifier: "npm:4.1.0" chai: "npm:5.1.0" chart.js: "npm:4.4.1" - color-name: "npm:~2.0.0" + color-name: "npm:2.0.0" comlink: "npm:4.4.1" core-js: "npm:3.36.0" cropperjs: "npm:1.6.1" From 94f74308d8242067a394b095b8168194b5bdd847 Mon Sep 17 00:00:00 2001 From: Paul Bottein Date: Wed, 28 Feb 2024 14:29:00 +0100 Subject: [PATCH 076/425] Escape special characters of automation ID in URL (#19790) * Escape special character of automation ID in URL * Use encodeURIComponent --- src/panels/config/areas/ha-config-area-page.ts | 2 +- src/panels/config/automation/ha-automation-editor.ts | 10 ++++++++-- src/panels/config/automation/ha-automation-picker.ts | 10 +++++++--- src/panels/config/automation/ha-automation-trace.ts | 8 ++++++-- src/panels/config/devices/ha-config-device-page.ts | 2 +- 5 files changed, 23 insertions(+), 9 deletions(-) diff --git a/src/panels/config/areas/ha-config-area-page.ts b/src/panels/config/areas/ha-config-area-page.ts index 18ce4dd5b915..64b05b126b13 100644 --- a/src/panels/config/areas/ha-config-area-page.ts +++ b/src/panels/config/areas/ha-config-area-page.ts @@ -568,7 +568,7 @@ class HaConfigAreaPage extends LitElement { diff --git a/src/panels/config/automation/ha-automation-editor.ts b/src/panels/config/automation/ha-automation-editor.ts index 04343c20ec16..11571368c4ff 100644 --- a/src/panels/config/automation/ha-automation-editor.ts +++ b/src/panels/config/automation/ha-automation-editor.ts @@ -172,7 +172,11 @@ export class HaAutomationEditor extends KeyboardShortcutMixin(LitElement) { ${stateObj && this._config && this.narrow - ? html` + ? html` ${this.hass.localize( "ui.panel.config.automation.editor.show_trace" @@ -563,7 +567,9 @@ export class HaAutomationEditor extends KeyboardShortcutMixin(LitElement) { if (this._config?.id) { const result = await this.confirmUnsavedChanged(); if (result) { - navigate(`/config/automation/trace/${this._config.id}`); + navigate( + `/config/automation/trace/${encodeURIComponent(this._config.id)}` + ); } } } diff --git a/src/panels/config/automation/ha-automation-picker.ts b/src/panels/config/automation/ha-automation-picker.ts index 3bb5802c7dd3..db23980b2dd3 100644 --- a/src/panels/config/automation/ha-automation-picker.ts +++ b/src/panels/config/automation/ha-automation-picker.ts @@ -435,7 +435,9 @@ class HaAutomationPicker extends LitElement { }); return; } - navigate(`/config/automation/trace/${automation.attributes.id}`); + navigate( + `/config/automation/trace/${encodeURIComponent(automation.attributes.id)}` + ); } private async _toggle(automation): Promise { @@ -530,9 +532,11 @@ class HaAutomationPicker extends LitElement { ); if (automation?.attributes.id) { - navigate(`/config/automation/edit/${automation.attributes.id}`); + navigate( + `/config/automation/edit/${encodeURIComponent(automation.attributes.id)}` + ); } else { - navigate(`/config/automation/show/${ev.detail.id}`); + navigate(`/config/automation/show/${encodeURIComponent(ev.detail.id)}`); } } diff --git a/src/panels/config/automation/ha-automation-trace.ts b/src/panels/config/automation/ha-automation-trace.ts index c752e562edc2..cd52275ed779 100644 --- a/src/panels/config/automation/ha-automation-trace.ts +++ b/src/panels/config/automation/ha-automation-trace.ts @@ -106,7 +106,9 @@ export class HaAutomationTrace extends LitElement { ? html` @@ -140,7 +142,9 @@ export class HaAutomationTrace extends LitElement { ? html` ${this.hass.localize( diff --git a/src/panels/config/devices/ha-config-device-page.ts b/src/panels/config/devices/ha-config-device-page.ts index 5179d3b2ca21..4ea0dd37d235 100644 --- a/src/panels/config/devices/ha-config-device-page.ts +++ b/src/panels/config/devices/ha-config-device-page.ts @@ -431,7 +431,7 @@ export class HaConfigDevicePage extends LitElement { From dd98ec771db384ffd0c2774607d91de9826e92ba Mon Sep 17 00:00:00 2001 From: karwosts <32912880+karwosts@users.noreply.github.com> Date: Wed, 28 Feb 2024 10:20:56 -0500 Subject: [PATCH 077/425] Infer a limited history chart from state object (#19176) * Infer a limited history chart from state object * bugfix * bugfix * minor fixes from feedback --- .../chart/state-history-chart-line.ts | 2 +- .../chart/state-history-chart-timeline.ts | 2 +- src/components/chart/state-history-charts.ts | 34 ++++++++++++++----- .../timeline-chart/timeline-controller.ts | 4 ++- .../chart/timeline-chart/timeline-scale.ts | 4 +-- src/data/history.ts | 28 ++++++++++++--- src/dialogs/more-info/ha-more-info-history.ts | 1 + src/panels/history/ha-panel-history.ts | 2 ++ .../lovelace/cards/hui-history-graph-card.ts | 1 + 9 files changed, 60 insertions(+), 18 deletions(-) diff --git a/src/components/chart/state-history-chart-line.ts b/src/components/chart/state-history-chart-line.ts index 5f6286ecef61..0923fb0702df 100644 --- a/src/components/chart/state-history-chart-line.ts +++ b/src/components/chart/state-history-chart-line.ts @@ -111,7 +111,7 @@ export class StateHistoryChartLine extends LitElement { config: this.hass.config, }, }, - suggestedMin: this.startTime, + min: this.startTime, suggestedMax: this.endTime, ticks: { maxRotation: 0, diff --git a/src/components/chart/state-history-chart-timeline.ts b/src/components/chart/state-history-chart-timeline.ts index 8bfb0fef8b7f..c70711ae64a0 100644 --- a/src/components/chart/state-history-chart-timeline.ts +++ b/src/components/chart/state-history-chart-timeline.ts @@ -114,7 +114,7 @@ export class StateHistoryChartTimeline extends LitElement { config: this.hass.config, }, }, - suggestedMin: this.startTime, + min: this.startTime, suggestedMax: this.endTime, ticks: { autoSkip: true, diff --git a/src/components/chart/state-history-charts.ts b/src/components/chart/state-history-charts.ts index 7f72aa5f2b3e..eb47c5b31a74 100644 --- a/src/components/chart/state-history-charts.ts +++ b/src/components/chart/state-history-charts.ts @@ -233,16 +233,32 @@ export class StateHistoryCharts extends LitElement { new Date().getTime() - 60 * 60 * this.hoursToShow * 1000 ); } else { - this._computedStartTime = new Date( - (this.historyData?.timeline ?? []).reduce( - (minTime, stateInfo) => - Math.min( - minTime, - new Date(stateInfo.data[0].last_changed).getTime() - ), - new Date().getTime() - ) + let minTimeAll = (this.historyData?.timeline ?? []).reduce( + (minTime, stateInfo) => + Math.min( + minTime, + new Date(stateInfo.data[0].last_changed).getTime() + ), + new Date().getTime() + ); + + minTimeAll = (this.historyData?.line ?? []).reduce( + (minTimeLine, line) => + Math.min( + minTimeLine, + line.data.reduce( + (minTimeData, data) => + Math.min( + minTimeData, + new Date(data.states[0].last_changed).getTime() + ), + minTimeLine + ) + ), + minTimeAll ); + + this._computedStartTime = new Date(minTimeAll); } } } diff --git a/src/components/chart/timeline-chart/timeline-controller.ts b/src/components/chart/timeline-chart/timeline-controller.ts index 5aeadc6e0049..b6b1d88af31c 100644 --- a/src/components/chart/timeline-chart/timeline-controller.ts +++ b/src/components/chart/timeline-chart/timeline-controller.ts @@ -205,7 +205,9 @@ export class TimelineController extends BarController { const y = vScale.getPixelForValue(this.index); - const xStart = iScale.getPixelForValue(data.start.getTime()); + const xStart = iScale.getPixelForValue( + Math.max(iScale.min, data.start.getTime()) + ); const xEnd = iScale.getPixelForValue(data.end.getTime()); const width = xEnd - xStart; diff --git a/src/components/chart/timeline-chart/timeline-scale.ts b/src/components/chart/timeline-chart/timeline-scale.ts index 8d5086dafc34..e987456f8e31 100644 --- a/src/components/chart/timeline-chart/timeline-scale.ts +++ b/src/components/chart/timeline-chart/timeline-scale.ts @@ -49,7 +49,7 @@ export class TimeLineScale extends TimeScale { max = isFinite(max) && !isNaN(max) ? max : +adapter.endOf(Date.now(), unit); // Make sure that max is strictly higher than min (required by the lookup table) - this.min = Math.min(min, max - 1); - this.max = Math.max(min + 1, max); + this.min = adapter.parse(options.min, this) ?? Math.min(min, max - 1); + this.max = adapter.parse(options.max, this) ?? Math.max(min + 1, max); } } diff --git a/src/data/history.ts b/src/data/history.ts index baece3da3789..e0fc8bd328cb 100644 --- a/src/data/history.ts +++ b/src/data/history.ts @@ -81,7 +81,7 @@ export interface EntityHistoryState { /** attributes */ a: { [key: string]: any }; /** last_changed; if set, also applies to lu */ - lc: number; + lc?: number; /** last_updated */ lu: number; } @@ -419,17 +419,37 @@ const BLANK_UNIT = " "; export const computeHistory = ( hass: HomeAssistant, stateHistory: HistoryStates, + entityIds: string[], localize: LocalizeFunc, sensorNumericalDeviceClasses: string[], splitDeviceClasses = false ): HistoryResult => { const lineChartDevices: { [unit: string]: HistoryStates } = {}; const timelineDevices: TimelineEntity[] = []; - if (!stateHistory) { + + const localStateHistory: HistoryStates = {}; + + // Create a limited history from stateObj if entity has no recorded history. + const allEntities = new Set([...entityIds, ...Object.keys(stateHistory)]); + allEntities.forEach((entity) => { + if (entity in stateHistory) { + localStateHistory[entity] = stateHistory[entity]; + } else if (hass.states[entity]) { + localStateHistory[entity] = [ + { + s: hass.states[entity].state, + a: hass.states[entity].attributes, + lu: new Date(hass.states[entity].last_updated).getTime() / 1000, + }, + ]; + } + }); + + if (!localStateHistory) { return { line: [], timeline: [] }; } - Object.keys(stateHistory).forEach((entityId) => { - const stateInfo = stateHistory[entityId]; + Object.keys(localStateHistory).forEach((entityId) => { + const stateInfo = localStateHistory[entityId]; if (stateInfo.length === 0) { return; } diff --git a/src/dialogs/more-info/ha-more-info-history.ts b/src/dialogs/more-info/ha-more-info-history.ts index 2adeb515c4ca..dc5c32f8a10b 100644 --- a/src/dialogs/more-info/ha-more-info-history.ts +++ b/src/dialogs/more-info/ha-more-info-history.ts @@ -228,6 +228,7 @@ export class MoreInfoHistory extends LitElement { this._stateHistory = computeHistory( this.hass!, combinedHistory, + [this.entityId], this.hass!.localize, sensorNumericDeviceClasses ); diff --git a/src/panels/history/ha-panel-history.ts b/src/panels/history/ha-panel-history.ts index dae3bae72565..49797dda56ee 100644 --- a/src/panels/history/ha-panel-history.ts +++ b/src/panels/history/ha-panel-history.ts @@ -433,6 +433,7 @@ class HaPanelHistory extends SubscribeMixin(LitElement) { this._statisticsHistory = computeHistory( this.hass, statsHistoryStates, + [], this.hass.localize, sensorNumericDeviceClasses, true @@ -472,6 +473,7 @@ class HaPanelHistory extends SubscribeMixin(LitElement) { this._stateHistory = computeHistory( this.hass, history, + entityIds, this.hass.localize, sensorNumericDeviceClasses, true diff --git a/src/panels/lovelace/cards/hui-history-graph-card.ts b/src/panels/lovelace/cards/hui-history-graph-card.ts index 1229ff71906d..d8af4508b7bc 100644 --- a/src/panels/lovelace/cards/hui-history-graph-card.ts +++ b/src/panels/lovelace/cards/hui-history-graph-card.ts @@ -120,6 +120,7 @@ export class HuiHistoryGraphCard extends LitElement implements LovelaceCard { this._stateHistory = computeHistory( this.hass!, combinedHistory, + this._entityIds, this.hass!.localize, sensorNumericDeviceClasses, this._config?.split_device_classes From 4fb596357de18c6fdc4fec96790ca033735f1f53 Mon Sep 17 00:00:00 2001 From: Bram Kragten Date: Wed, 28 Feb 2024 16:28:51 +0100 Subject: [PATCH 078/425] Add advanced options block to cloud remote connection (#19907) * Add advanced options block to cloud remote connection * Review --- .../config/cloud/account/cloud-remote-pref.ts | 74 +++++++++++++++---- src/translations/en.json | 7 +- 2 files changed, 65 insertions(+), 16 deletions(-) diff --git a/src/panels/config/cloud/account/cloud-remote-pref.ts b/src/panels/config/cloud/account/cloud-remote-pref.ts index e94e50b56b38..cd9d509f81ac 100644 --- a/src/panels/config/cloud/account/cloud-remote-pref.ts +++ b/src/panels/config/cloud/account/cloud-remote-pref.ts @@ -1,13 +1,16 @@ -import "@material/mwc-button"; import { mdiContentCopy, mdiHelpCircle } from "@mdi/js"; -import { css, CSSResultGroup, html, LitElement, nothing } from "lit"; +import { CSSResultGroup, LitElement, css, html, nothing } from "lit"; import { customElement, property } from "lit/decorators"; import { fireEvent } from "../../../../common/dom/fire_event"; import { copyToClipboard } from "../../../../common/util/copy-clipboard"; import "../../../../components/ha-alert"; +import "../../../../components/ha-button"; import "../../../../components/ha-card"; +import "../../../../components/ha-expansion-panel"; +import "../../../../components/ha-settings-row"; import "../../../../components/ha-switch"; // eslint-disable-next-line +import { formatDate } from "../../../../common/datetime/format_date"; import type { HaSwitch } from "../../../../components/ha-switch"; import { CloudStatusLoggedIn, @@ -125,22 +128,60 @@ export class CloudRemotePref extends LitElement { >. - - - -
    -
    - - ${this.hass.localize( - "ui.panel.config.cloud.account.remote.certificate_info" + + > + + ${this.hass.localize( + "ui.panel.config.cloud.account.remote.external_activation" + )} + ${this.hass.localize( + "ui.panel.config.cloud.account.remote.external_activation_secondary" + )} + + + + ${this.hass.localize( + "ui.panel.config.cloud.account.remote.certificate_info" + )} + ${this.cloudStatus!.remote_certificate + ? this.hass.localize( + "ui.panel.config.cloud.account.remote.certificate_expire", + { + date: formatDate( + new Date( + this.cloudStatus.remote_certificate.expire_date + ), + this.hass.locale, + this.hass.config + ), + } + ) + : nothing} + + ${this.hass.localize( + "ui.panel.config.cloud.account.remote.more_info" + )} + + +
    `; @@ -243,6 +284,9 @@ export class CloudRemotePref extends LitElement { ha-formfield { margin-top: 8px; } + ha-expansion-panel { + margin-top: 8px; + } `; } } diff --git a/src/translations/en.json b/src/translations/en.json index 733d393c4cb1..5c385a9e32ca 100644 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -3508,7 +3508,12 @@ "instance_will_be_available": "Your instance will be available at your", "link_learn_how_it_works": "Learn how it works", "nabu_casa_url": "Nabu Casa URL", - "certificate_info": "Certificate info" + "advanced_options": "Advanced options", + "external_activation": "Allow external activation of remote control", + "external_activation_secondary": "Allows you to turn on remote control from your Nabu Casa account page, even if you're outside your local network", + "certificate_info": "Certificate info", + "certificate_expire": "Will be renewed at {date}", + "more_info": "More info" }, "alexa": { "title": "Alexa", From 3ef1110109ddfbdf21d23677e6b099969f2b2e18 Mon Sep 17 00:00:00 2001 From: Bram Kragten Date: Wed, 28 Feb 2024 16:51:50 +0100 Subject: [PATCH 079/425] Bumped version to 20240228.0 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index f0eef3c0351b..15c83c13a419 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "home-assistant-frontend" -version = "20240207.1" +version = "20240228.0" license = {text = "Apache-2.0"} description = "The Home Assistant frontend" readme = "README.md" From 52870616993c9676476d7cbb1b2115cfaad370ec Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Wed, 28 Feb 2024 11:07:26 -0500 Subject: [PATCH 080/425] Update script more info (#19899) * Update script more info * Fixes * Update styling * remarks * Always show cancel button --------- Co-authored-by: Bram Kragten --- src/components/ha-control-button.ts | 4 +- .../components/ha-more-info-state-header.ts | 6 +- src/dialogs/more-info/const.ts | 3 +- .../more-info/controls/more-info-script.ts | 183 ++++++++++++------ src/translations/en.json | 8 +- 5 files changed, 138 insertions(+), 66 deletions(-) diff --git a/src/components/ha-control-button.ts b/src/components/ha-control-button.ts index 1eee1286e6bf..58ea4f4400b2 100644 --- a/src/components/ha-control-button.ts +++ b/src/components/ha-control-button.ts @@ -127,9 +127,11 @@ export class HaControlButton extends LitElement { opacity 180ms ease-in-out; opacity: var(--control-button-background-opacity); } - .button ::slotted(*) { + .button { transition: color 180ms ease-in-out; color: var(--control-button-icon-color); + } + .button ::slotted(*) { pointer-events: none; } .button:disabled { diff --git a/src/dialogs/more-info/components/ha-more-info-state-header.ts b/src/dialogs/more-info/components/ha-more-info-state-header.ts index 4697868390e0..9432eb46b15a 100644 --- a/src/dialogs/more-info/components/ha-more-info-state-header.ts +++ b/src/dialogs/more-info/components/ha-more-info-state-header.ts @@ -16,6 +16,8 @@ export class HaMoreInfoStateHeader extends LitElement { @property({ attribute: false }) public stateOverride?: string; + @property({ attribute: false }) public changedOverride?: number; + @state() private _absoluteTime = false; private _localizeState(): TemplateResult | string { @@ -50,13 +52,13 @@ export class HaMoreInfoStateHeader extends LitElement { ? html` ` : html` `} diff --git a/src/dialogs/more-info/const.ts b/src/dialogs/more-info/const.ts index b9fe72039a43..e5589107791c 100644 --- a/src/dialogs/more-info/const.ts +++ b/src/dialogs/more-info/const.ts @@ -5,7 +5,7 @@ import { computeGroupDomain, GroupEntity } from "../../data/group"; import { CONTINUOUS_DOMAINS } from "../../data/logbook"; import { HomeAssistant } from "../../types"; -export const DOMAINS_NO_INFO = ["camera", "configurator", "script"]; +export const DOMAINS_NO_INFO = ["camera", "configurator"]; /** * Entity domains that should be editable *if* they have an id present; * {@see shouldShowEditIcon}. @@ -26,6 +26,7 @@ export const DOMAINS_WITH_NEW_MORE_INFO = [ "light", "lock", "siren", + "script", "switch", "valve", "water_heater", diff --git a/src/dialogs/more-info/controls/more-info-script.ts b/src/dialogs/more-info/controls/more-info-script.ts index a2fc2b118685..c530f05cf553 100644 --- a/src/dialogs/more-info/controls/more-info-script.ts +++ b/src/dialogs/more-info/controls/more-info-script.ts @@ -1,3 +1,4 @@ +import { mdiPlay, mdiStop } from "@mdi/js"; import "@material/mwc-button"; import { HassEntity } from "home-assistant-js-websocket"; import { @@ -8,28 +9,54 @@ import { nothing, PropertyValues, } from "lit"; -import { customElement, property } from "lit/decorators"; +import { customElement, property, state } from "lit/decorators"; import "../../../components/ha-relative-time"; import "../../../components/ha-service-control"; +import "../../../components/ha-control-button"; +import "../../../components/ha-control-button-group"; import "../../../components/entity/state-info"; import { HomeAssistant } from "../../../types"; import { canRun, ScriptEntity } from "../../../data/script"; import { isUnavailableState } from "../../../data/entity"; import { computeObjectId } from "../../../common/entity/compute_object_id"; +import { listenMediaQuery } from "../../../common/dom/media_query"; +import "../components/ha-more-info-state-header"; @customElement("more-info-script") class MoreInfoScript extends LitElement { @property({ attribute: false }) public hass!: HomeAssistant; - @property({ attribute: false }) public stateObj?: HassEntity; + @property({ attribute: false }) public stateObj?: ScriptEntity; - private _scriptData: Record = {}; + @state() private _scriptData: Record = {}; + + @state() private narrow = false; + + private _unsubMediaQuery?: () => void; + + public connectedCallback(): void { + super.connectedCallback(); + this._unsubMediaQuery = listenMediaQuery( + "(max-width: 870px)", + (matches) => { + this.narrow = matches; + } + ); + } + + public disconnectedCallback(): void { + super.disconnectedCallback(); + if (this._unsubMediaQuery) { + this._unsubMediaQuery(); + this._unsubMediaQuery = undefined; + } + } protected render() { if (!this.hass || !this.stateObj) { return nothing; } - const stateObj = this.stateObj as ScriptEntity; + const stateObj = this.stateObj; const fields = this.hass.services.script[computeObjectId(this.stateObj.entity_id)] @@ -37,64 +64,74 @@ class MoreInfoScript extends LitElement { const hasFields = fields && Object.keys(fields).length > 0; + const current = stateObj.attributes.current || 0; + const isQueued = stateObj.attributes.mode === "queued"; + const isParallel = stateObj.attributes.mode === "parallel"; + const hasQueue = isQueued && current > 1; + return html` -
    - - ${stateObj.state === "on" - ? html` - ${stateObj.attributes.mode !== "single" && - (stateObj.attributes.current || 0) > 0 - ? this.hass.localize("ui.card.script.cancel_multiple", { - number: stateObj.attributes.current, - }) - : this.hass.localize("ui.card.script.cancel")} - ` - : nothing} - ${stateObj.state === "off" || stateObj.attributes.max - ? html` - ${this.hass!.localize("ui.card.script.run")} - ` - : nothing} + 0 + ? isParallel && current > 1 + ? this.hass.localize("ui.card.script.running_parallel", { + active: current, + }) + : this.hass.localize("ui.card.script.running_single") + : this.hass.localize("ui.card.script.idle")} + .changedOverride=${this.stateObj.attributes.last_triggered || 0} + > + +
    + ${hasQueue + ? html` + ${this.hass.localize("ui.card.script.running_queued", { + queued: current - 1, + })} + ` + : ""}
    ${hasFields ? html` - +
    +
    + ${this.hass.localize("ui.card.script.run_script")} +
    + +
    ` : nothing} -
    -
    -
    - ${this.hass.localize( - "ui.dialogs.more_info_control.script.last_triggered" - )}: -
    - ${this.stateObj.attributes.last_triggered - ? html` - - ` - : this.hass.localize("ui.components.relative_time.never")} -
    + + + + ${(isQueued || isParallel) && current > 1 + ? this.hass.localize("ui.card.script.cancel_all") + : this.hass.localize("ui.card.script.cancel")} + + + + ${this.hass!.localize("ui.card.script.run")} + + `; } @@ -139,17 +176,41 @@ class MoreInfoScript extends LitElement { this._scriptData = { ...this._scriptData, ...ev.detail.value }; } + private _canRun() { + if ( + canRun(this.stateObj!) || + // Restart can also always runs. Just cancels other run. + this.stateObj!.attributes.mode === "restart" + ) { + return true; + } + return false; + } + static get styles(): CSSResultGroup { return css` - .flex { - display: flex; - justify-content: space-between; + .queue { + visibility: hidden; + color: var(--secondary-text-color); + text-align: center; + margin-bottom: 16px; + height: 21px; + } + .queue.has-queue { + visibility: visible; + } + .fields { + padding: 16px; + border: 1px solid var(--divider-color); + border-radius: 8px; margin-bottom: 16px; } - hr { - border-color: var(--divider-color); - border-bottom: none; - margin: 16px 0; + .fields .title { + font-weight: bold; + } + ha-control-button ha-svg-icon { + z-index: -1; + margin-right: 4px; } ha-service-control { --service-control-padding: 0; diff --git a/src/translations/en.json b/src/translations/en.json index 5c385a9e32ca..24f63e86a3a2 100644 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -218,8 +218,14 @@ }, "script": { "run": "[%key:ui::card::service::run%]", + "running_single": "Running…", + "running_queued": "{queued} queued", + "running_parallel": "{active} Running…", "cancel": "Cancel", - "cancel_multiple": "Cancel {number}" + "cancel_multiple": "Cancel {number}", + "cancel_all": "Cancel all", + "idle": "Idle", + "run_script": "Run script" }, "service": { "run": "Run" From 9ef07484dd6243077e7e3c9e68f6d5101b8f48f8 Mon Sep 17 00:00:00 2001 From: Simon Lamon <32477463+silamon@users.noreply.github.com> Date: Wed, 28 Feb 2024 21:50:58 +0100 Subject: [PATCH 081/425] Replace paper-toast with mwc-snackbar (#19579) * toast * Fixes * Linting * Remove empty styles * PR feedback Co-authored-by: Bram Kragten --------- Co-authored-by: Bram Kragten --- package.json | 2 +- src/components/ha-toast.ts | 31 +- src/dialogs/restart/dialog-restart.ts | 4 +- src/managers/notification-manager.ts | 109 +- src/panels/config/script/ha-script-editor.ts | 2 +- src/panels/lovelace/ha-panel-lovelace.ts | 2 +- src/panels/lovelace/hui-editor.ts | 2 +- src/state/disconnect-toast-mixin.ts | 10 +- src/util/register-service-worker.ts | 2 +- yarn.lock | 1239 +++++++++--------- 10 files changed, 724 insertions(+), 679 deletions(-) diff --git a/package.json b/package.json index 4109cdfb9d00..86c3af3314b6 100644 --- a/package.json +++ b/package.json @@ -72,6 +72,7 @@ "@material/mwc-radio": "0.27.0", "@material/mwc-ripple": "0.27.0", "@material/mwc-select": "0.27.0", + "@material/mwc-snackbar": "0.27.0", "@material/mwc-switch": "0.27.0", "@material/mwc-tab": "0.27.0", "@material/mwc-tab-bar": "0.27.0", @@ -86,7 +87,6 @@ "@polymer/paper-item": "3.0.1", "@polymer/paper-listbox": "3.0.1", "@polymer/paper-tabs": "3.1.0", - "@polymer/paper-toast": "3.0.1", "@polymer/polymer": "3.5.1", "@thomasloven/round-slider": "0.6.0", "@vaadin/combo-box": "24.3.6", diff --git a/src/components/ha-toast.ts b/src/components/ha-toast.ts index 99d6e4f87291..64bdf36099cd 100644 --- a/src/components/ha-toast.ts +++ b/src/components/ha-toast.ts @@ -1,35 +1,8 @@ -import "@polymer/paper-toast/paper-toast"; -import type { PaperToastElement } from "@polymer/paper-toast/paper-toast"; import { customElement } from "lit/decorators"; -import type { Constructor } from "../types"; - -const PaperToast = customElements.get( - "paper-toast" -) as Constructor; +import { Snackbar } from "@material/mwc-snackbar/mwc-snackbar"; @customElement("ha-toast") -export class HaToast extends PaperToast { - private _resizeListener?: (obj: { matches: boolean }) => unknown; - - private _mediaq?: MediaQueryList; - - public connectedCallback() { - super.connectedCallback(); - - if (!this._resizeListener) { - this._resizeListener = (ev) => - this.classList.toggle("fit-bottom", ev.matches); - this._mediaq = window.matchMedia("(max-width: 599px"); - } - this._mediaq!.addListener(this._resizeListener); - this._resizeListener(this._mediaq!); - } - - public disconnectedCallback() { - super.disconnectedCallback(); - this._mediaq!.removeListener(this._resizeListener!); - } -} +export class HaToast extends Snackbar {} declare global { interface HTMLElementTagNameMap { diff --git a/src/dialogs/restart/dialog-restart.ts b/src/dialogs/restart/dialog-restart.ts index 97f16e80873d..9b953eed479e 100644 --- a/src/dialogs/restart/dialog-restart.ts +++ b/src/dialogs/restart/dialog-restart.ts @@ -341,7 +341,7 @@ class DialogRestart extends LitElement { showToast(this, { message: this.hass.localize("ui.dialogs.restart.reboot.rebooting"), - duration: 0, + duration: -1, }); try { @@ -380,7 +380,7 @@ class DialogRestart extends LitElement { showToast(this, { message: this.hass.localize("ui.dialogs.restart.shutdown.shutting_down"), - duration: 0, + duration: -1, }); try { diff --git a/src/managers/notification-manager.ts b/src/managers/notification-manager.ts index db71b05f32eb..a4636d2f7c9c 100644 --- a/src/managers/notification-manager.ts +++ b/src/managers/notification-manager.ts @@ -1,10 +1,11 @@ -import "@material/mwc-button"; -import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { html, LitElement, nothing } from "lit"; import { property, state, query } from "lit/decorators"; +import { mdiClose } from "@mdi/js"; import { computeRTL } from "../common/util/compute_rtl"; import "../components/ha-toast"; import type { HaToast } from "../components/ha-toast"; import type { HomeAssistant } from "../types"; +import "../components/ha-button"; export interface ShowToastParams { message: string; @@ -21,72 +22,78 @@ export interface ToastActionParams { class NotificationManager extends LitElement { @property({ attribute: false }) public hass!: HomeAssistant; - @state() private _action?: ToastActionParams; + @state() private _parameters?: ShowToastParams; - @state() private _noCancelOnOutsideClick = false; + @query("ha-toast") private _toast!: HaToast | undefined; - @query("ha-toast") private _toast!: HaToast; - - public async showDialog({ - message, - action, - duration, - dismissable, - }: ShowToastParams) { - let toast = this._toast; - // Can happen on initial load - if (!toast) { + public async showDialog(parameters: ShowToastParams) { + if (this._parameters) { + this._parameters = undefined; await this.updateComplete; - toast = this._toast; } - toast.setAttribute("dir", computeRTL(this.hass) ? "rtl" : "ltr"); - this._action = action || undefined; - this._noCancelOnOutsideClick = - dismissable === undefined ? false : !dismissable; - toast.hide(); - toast.show({ - text: message, - duration: duration === undefined ? 3000 : duration, - }); + + if (!parameters || parameters.duration === 0) { + return; + } + + this._parameters = parameters; + + if ( + this._parameters.duration === undefined || + (this._parameters.duration > 0 && this._parameters.duration <= 4000) + ) { + this._parameters.duration = 4000; + } + } + + public shouldUpdate(changedProperties) { + return !this._toast || changedProperties.has("_parameters"); + } + + private _toastClosed() { + this._parameters = undefined; } - protected render(): TemplateResult { + protected render() { + if (!this._parameters) { + return nothing; + } return html` - - ${this._action + + ${this._parameters?.action ? html` - + > ` - : ""} + : nothing} + ${this._parameters?.dismissable + ? html`` + : nothing} `; } private buttonClicked() { - this._toast.hide(); - if (this._action) { - this._action.action(); + this._toast?.close("action"); + if (this._parameters?.action) { + this._parameters?.action.action(); } } - - static get styles(): CSSResultGroup { - return css` - ha-toast { - display: flex; - align-items: center; - justify-content: space-between; - padding: 8px 12px; - } - mwc-button { - color: var(--primary-color); - font-weight: bold; - margin-left: 8px; - } - `; - } } customElements.define("notification-manager", NotificationManager); diff --git a/src/panels/config/script/ha-script-editor.ts b/src/panels/config/script/ha-script-editor.ts index f5a6edf6d5ba..d5d5bb29d2c0 100644 --- a/src/panels/config/script/ha-script-editor.ts +++ b/src/panels/config/script/ha-script-editor.ts @@ -811,7 +811,7 @@ export class HaScriptEditor extends KeyboardShortcutMixin(LitElement) { "ui.panel.config.script.editor.id_already_exists_save_error" ), dismissable: false, - duration: 0, + duration: -1, action: { action: () => {}, text: this.hass.localize("ui.dialogs.generic.ok"), diff --git a/src/panels/lovelace/ha-panel-lovelace.ts b/src/panels/lovelace/ha-panel-lovelace.ts index d1b04de251e9..0103b7e2d2f8 100644 --- a/src/panels/lovelace/ha-panel-lovelace.ts +++ b/src/panels/lovelace/ha-panel-lovelace.ts @@ -221,7 +221,7 @@ export class LovelacePanel extends LitElement { action: () => this._fetchConfig(false), text: this.hass!.localize("ui.common.refresh"), }, - duration: 0, + duration: -1, dismissable: false, }); } diff --git a/src/panels/lovelace/hui-editor.ts b/src/panels/lovelace/hui-editor.ts index cf5983d87504..1ea0d97f64da 100644 --- a/src/panels/lovelace/hui-editor.ts +++ b/src/panels/lovelace/hui-editor.ts @@ -132,7 +132,7 @@ class LovelaceFullConfigEditor extends LitElement { "ui.panel.lovelace.editor.raw_editor.reload" ), }, - duration: 0, + duration: -1, dismissable: false, }); } diff --git a/src/state/disconnect-toast-mixin.ts b/src/state/disconnect-toast-mixin.ts index 3e3ad168787b..08fdbe676c23 100644 --- a/src/state/disconnect-toast-mixin.ts +++ b/src/state/disconnect-toast-mixin.ts @@ -38,7 +38,7 @@ export default >(superClass: T) => message: this.hass!.localize("ui.notification_toast.starting") || "Home Assistant is starting, not everything will be available until it is finished.", - duration: 0, + duration: -1, dismissable: false, action: { text: @@ -97,7 +97,7 @@ export default >(superClass: T) => } showToast(this, { message: "", - duration: 1, + duration: 0, }); } @@ -108,7 +108,7 @@ export default >(superClass: T) => this._disconnectedTimeout = undefined; showToast(this, { message: this.hass!.localize("ui.notification_toast.connection_lost"), - duration: 0, + duration: -1, dismissable: false, }); }, 1000); @@ -124,7 +124,7 @@ export default >(superClass: T) => message: this.hass!.localize("ui.notification_toast.wrapping_up_startup") || `Wrapping up startup, not everything will be available until it is finished.`, - duration: 0, + duration: -1, dismissable: false, action: { text: @@ -148,7 +148,7 @@ export default >(superClass: T) => integration: domainToName(this.hass!.localize, integration), }) || `Starting ${integration}, not everything will be available until it is finished.`, - duration: 0, + duration: -1, dismissable: false, action: { text: diff --git a/src/util/register-service-worker.ts b/src/util/register-service-worker.ts index 1a029f97d059..72e3864f7e0c 100644 --- a/src/util/register-service-worker.ts +++ b/src/util/register-service-worker.ts @@ -48,7 +48,7 @@ export const registerServiceWorker = async ( action: () => installingWorker.postMessage({ type: "skipWaiting" }), text: "reload", }, - duration: 0, + duration: -1, dismissable: false, }); }); diff --git a/yarn.lock b/yarn.lock index 874b6ffc716b..0d07d730169b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -128,9 +128,9 @@ __metadata: languageName: node linkType: hard -"@babel/helper-create-class-features-plugin@npm:^7.22.15, @babel/helper-create-class-features-plugin@npm:^7.23.6, @babel/helper-create-class-features-plugin@npm:^7.23.9": - version: 7.23.10 - resolution: "@babel/helper-create-class-features-plugin@npm:7.23.10" +"@babel/helper-create-class-features-plugin@npm:^7.22.15, @babel/helper-create-class-features-plugin@npm:^7.23.9": + version: 7.23.9 + resolution: "@babel/helper-create-class-features-plugin@npm:7.23.9" dependencies: "@babel/helper-annotate-as-pure": "npm:^7.22.5" "@babel/helper-environment-visitor": "npm:^7.22.20" @@ -143,7 +143,7 @@ __metadata: semver: "npm:^6.3.1" peerDependencies: "@babel/core": ^7.0.0 - checksum: 10/8b9f02526eeb03ef1d2bc89e3554377ae966b33a74078ab1f88168dfa725dc206ea5ecf4cf417c3651d8a6b3c70204f6939a9aa0401be3d0d32ddbf6024ea3c7 + checksum: 10/91c8aa8888780bd90aa50f511917cb0953ccd61b2ea4abf61915c1d68d99bb14b472969a8ae5b391d7890759dfc22be79104297be07919c38351714a4ce2fe74 languageName: node linkType: hard @@ -1206,16 +1206,16 @@ __metadata: linkType: hard "@babel/plugin-transform-typescript@npm:^7.23.3": - version: 7.23.6 - resolution: "@babel/plugin-transform-typescript@npm:7.23.6" + version: 7.23.3 + resolution: "@babel/plugin-transform-typescript@npm:7.23.3" dependencies: "@babel/helper-annotate-as-pure": "npm:^7.22.5" - "@babel/helper-create-class-features-plugin": "npm:^7.23.6" + "@babel/helper-create-class-features-plugin": "npm:^7.22.15" "@babel/helper-plugin-utils": "npm:^7.22.5" "@babel/plugin-syntax-typescript": "npm:^7.23.3" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10/a816811129f3fcb0af1aeb52b84285be390ed8a0eedab17d31fa8e6847c4ca39b4b176d44831f20a8561b3f586974053570ad7bdfa51f89566276e6b191786d2 + checksum: 10/74dff264701131e615e577d4080d8a1de99cf4b11f4a9cdf8228091456241529fa1f3ebbcbc8399b906972258c2d21088e361c569c76a06353561abdc8922d00 languageName: node linkType: hard @@ -1574,9 +1574,9 @@ __metadata: linkType: hard "@eslint-community/regexpp@npm:^4.5.1, @eslint-community/regexpp@npm:^4.6.1": - version: 4.10.0 - resolution: "@eslint-community/regexpp@npm:4.10.0" - checksum: 10/8c36169c815fc5d726078e8c71a5b592957ee60d08c6470f9ce0187c8046af1a00afbda0a065cc40ff18d5d83f82aed9793c6818f7304a74a7488dc9f3ecbd42 + version: 4.8.1 + resolution: "@eslint-community/regexpp@npm:4.8.1" + checksum: 10/f8c99ca48d0027540cece1dfc1f99fb53fe5cd82bc3680036455e13bc7cdce8d174659f20ab7390ab072b1aa55ff47199d1f6a315bf326f13751c35b6d010886 languageName: node linkType: hard @@ -1999,9 +1999,9 @@ __metadata: linkType: hard "@jridgewell/resolve-uri@npm:^3.0.3, @jridgewell/resolve-uri@npm:^3.1.0": - version: 3.1.2 - resolution: "@jridgewell/resolve-uri@npm:3.1.2" - checksum: 10/97106439d750a409c22c8bff822d648f6a71f3aa9bc8e5129efdc36343cd3096ddc4eeb1c62d2fe48e9bdd4db37b05d4646a17114ecebd3bbcacfa2de51c3c1d + version: 3.1.1 + resolution: "@jridgewell/resolve-uri@npm:3.1.1" + checksum: 10/64d59df8ae1a4e74315eb1b61e012f1c7bc8aac47a3a1e683f6fe7008eab07bc512a742b7aa7c0405685d1421206de58c9c2e6adbfe23832f8bd69408ffc183e languageName: node linkType: hard @@ -2040,12 +2040,12 @@ __metadata: linkType: hard "@jridgewell/trace-mapping@npm:^0.3.17, @jridgewell/trace-mapping@npm:^0.3.20, @jridgewell/trace-mapping@npm:^0.3.9": - version: 0.3.22 - resolution: "@jridgewell/trace-mapping@npm:0.3.22" + version: 0.3.21 + resolution: "@jridgewell/trace-mapping@npm:0.3.21" dependencies: "@jridgewell/resolve-uri": "npm:^3.1.0" "@jridgewell/sourcemap-codec": "npm:^1.4.14" - checksum: 10/48d3e3db00dbecb211613649a1849876ba5544a3f41cf5e6b99ea1130272d6cf18591b5b67389bce20f1c871b4ede5900c3b6446a7aab6d0a3b2fe806a834db7 + checksum: 10/925dda0620887e5a24f11b5a3a106f4e8b1a66155b49be6ceee61432174df33a17c243d8a89b2cd79ccebd281d817878759236a2fc42c47325ae9f73dfbfb90d languageName: node linkType: hard @@ -2073,9 +2073,9 @@ __metadata: linkType: hard "@lezer/common@npm:^1.0.0, @lezer/common@npm:^1.1.0": - version: 1.2.1 - resolution: "@lezer/common@npm:1.2.1" - checksum: 10/b362ed2e97664e4b36b3dbff49b52d1bfc5accc0152b577fefd46e585d012ff685d1fd336d75d80066e01c0505b1135d4cf69be5e330b5bfec2e2650c437bcae + version: 1.1.0 + resolution: "@lezer/common@npm:1.1.0" + checksum: 10/cabe34758bb41c6c7e38aaabdc8a6f51469b1307ed9b5760dd1fc7777d77a012e3e3f37c970a91319c10cc5e4d355db5c0e5515cc9392b9d0b833a66a8cc4120 languageName: node linkType: hard @@ -2089,11 +2089,11 @@ __metadata: linkType: hard "@lezer/lr@npm:^1.0.0": - version: 1.4.0 - resolution: "@lezer/lr@npm:1.4.0" + version: 1.3.12 + resolution: "@lezer/lr@npm:1.3.12" dependencies: "@lezer/common": "npm:^1.0.0" - checksum: 10/7391d0d08e54cd9e4f4d46e6ee6aa81fbaf079b22ed9c13d01fc9928e0ffd16d0c2d21b2cedd55675ad6c687277db28349ea8db81c9c69222cd7e7c40edd026e + checksum: 10/87153ac1bdf3727e0b57de268fb9d3b1d777610aa32b1c7585c1c7eab5a7159aa97b4dec5b3b2b0d54dc9b4cdc4b51492c61e78a50ff92ee8951d2d9b5ec5409 languageName: node linkType: hard @@ -2126,9 +2126,9 @@ __metadata: linkType: hard "@lit-labs/ssr-dom-shim@npm:^1.0.0, @lit-labs/ssr-dom-shim@npm:^1.1.0": - version: 1.2.0 - resolution: "@lit-labs/ssr-dom-shim@npm:1.2.0" - checksum: 10/33679defe08538ac6fb612854e7d32b4ea1e787cceba2c3373d26fd56baa9833881887da7bade3930a176ba518dc00bb42ce95d82ddb6af6b05b8fbe1fc3169f + version: 1.1.1 + resolution: "@lit-labs/ssr-dom-shim@npm:1.1.1" + checksum: 10/f401a2bc7170ba8d0d81f2613905793bc661a377a62279b9d470123ec59696186270a8786d4cd40ebf726cd6a41d883fb5a56e6907cb4e737dae4c99f50dca81 languageName: node linkType: hard @@ -2748,6 +2748,18 @@ __metadata: languageName: node linkType: hard +"@material/mwc-snackbar@npm:0.27.0": + version: 0.27.0 + resolution: "@material/mwc-snackbar@npm:0.27.0" + dependencies: + "@material/mwc-base": "npm:^0.27.0" + "@material/snackbar": "npm:=14.0.0-canary.53b3cad2f.0" + lit: "npm:^2.0.0" + tslib: "npm:^2.0.1" + checksum: 10/bd1e4b9fa449dde5318693d9b5486ea7cb5181338fc14e8f4ccd071ee5a4a6c957c3398fdbe7f626100b0f7c6c1049c02f1a9a5ada4a647d1a9c4f25f724358f + languageName: node + linkType: hard + "@material/mwc-switch@npm:0.27.0": version: 0.27.0 resolution: "@material/mwc-switch@npm:0.27.0" @@ -2974,6 +2986,27 @@ __metadata: languageName: node linkType: hard +"@material/snackbar@npm:=14.0.0-canary.53b3cad2f.0": + version: 14.0.0-canary.53b3cad2f.0 + resolution: "@material/snackbar@npm:14.0.0-canary.53b3cad2f.0" + dependencies: + "@material/animation": "npm:14.0.0-canary.53b3cad2f.0" + "@material/base": "npm:14.0.0-canary.53b3cad2f.0" + "@material/button": "npm:14.0.0-canary.53b3cad2f.0" + "@material/dom": "npm:14.0.0-canary.53b3cad2f.0" + "@material/elevation": "npm:14.0.0-canary.53b3cad2f.0" + "@material/feature-targeting": "npm:14.0.0-canary.53b3cad2f.0" + "@material/icon-button": "npm:14.0.0-canary.53b3cad2f.0" + "@material/ripple": "npm:14.0.0-canary.53b3cad2f.0" + "@material/rtl": "npm:14.0.0-canary.53b3cad2f.0" + "@material/shape": "npm:14.0.0-canary.53b3cad2f.0" + "@material/theme": "npm:14.0.0-canary.53b3cad2f.0" + "@material/typography": "npm:14.0.0-canary.53b3cad2f.0" + tslib: "npm:^2.1.0" + checksum: 10/e538c46447f0c0d7c2fca020d5fc3bc3202df3402ad0de07b94580d84b17eb253415ced64a5842819d615efe8c86e7141321a6b38a965aac8eb8f2810a7058d0 + languageName: node + linkType: hard + "@material/switch@npm:=14.0.0-canary.53b3cad2f.0": version: 14.0.0-canary.53b3cad2f.0 resolution: "@material/switch@npm:14.0.0-canary.53b3cad2f.0" @@ -3192,19 +3225,6 @@ __metadata: languageName: node linkType: hard -"@npmcli/agent@npm:^2.0.0": - version: 2.2.1 - resolution: "@npmcli/agent@npm:2.2.1" - dependencies: - agent-base: "npm:^7.1.0" - http-proxy-agent: "npm:^7.0.0" - https-proxy-agent: "npm:^7.0.1" - lru-cache: "npm:^10.0.1" - socks-proxy-agent: "npm:^8.0.1" - checksum: 10/d4a48128f61e47f2f5c89315a5350e265dc619987e635bd62b52b29c7ed93536e724e721418c0ce352ceece86c13043c67aba1b70c3f5cc72fce6bb746706162 - languageName: node - linkType: hard - "@npmcli/fs@npm:^3.1.0": version: 3.1.0 resolution: "@npmcli/fs@npm:3.1.0" @@ -3234,8 +3254,8 @@ __metadata: linkType: hard "@octokit/core@npm:^5.0.0": - version: 5.1.0 - resolution: "@octokit/core@npm:5.1.0" + version: 5.0.1 + resolution: "@octokit/core@npm:5.0.1" dependencies: "@octokit/auth-token": "npm:^4.0.0" "@octokit/graphql": "npm:^7.0.0" @@ -3244,17 +3264,18 @@ __metadata: "@octokit/types": "npm:^12.0.0" before-after-hook: "npm:^2.2.0" universal-user-agent: "npm:^6.0.0" - checksum: 10/8062e86a3088f24a691b36d2c3e9f33e864cefcb5f544b0633650358bce280708b111551cbe855ecf6a5190d6fc4fec1220117c329a2c27525940dd97b868614 + checksum: 10/e0f6398e594ab1add6655178e4460f0ff38496299ae752a176504727fa3c655e559b2d362470a36077985d5990ae011d9d5118828f605ba183eaf80af2932804 languageName: node linkType: hard "@octokit/endpoint@npm:^9.0.0": - version: 9.0.4 - resolution: "@octokit/endpoint@npm:9.0.4" + version: 9.0.1 + resolution: "@octokit/endpoint@npm:9.0.1" dependencies: "@octokit/types": "npm:^12.0.0" + is-plain-object: "npm:^5.0.0" universal-user-agent: "npm:^6.0.0" - checksum: 10/7df35c96f2b5628fe5b3f44a72614be9b439779c06b4dd1bb72283b3cb2ea53e59e1f9a108798efe5404b6856f4380a4c5be12d93255d854f0683cd6e22f3a27 + checksum: 10/8d1e6540cab8686afd977d0a256528b748aba0910530c903c032676c701073f5b90786b8ba74b573f2dc5de41befdb59d3ddb83b1d22e5ab54fb32b3d0abb6c5 languageName: node linkType: hard @@ -3277,15 +3298,22 @@ __metadata: linkType: hard "@octokit/oauth-methods@npm:^4.0.0": - version: 4.0.1 - resolution: "@octokit/oauth-methods@npm:4.0.1" + version: 4.0.0 + resolution: "@octokit/oauth-methods@npm:4.0.0" dependencies: "@octokit/oauth-authorization-url": "npm:^6.0.2" "@octokit/request": "npm:^8.0.2" "@octokit/request-error": "npm:^5.0.0" - "@octokit/types": "npm:^12.0.0" + "@octokit/types": "npm:^11.0.0" btoa-lite: "npm:^1.0.0" - checksum: 10/a749cbe5e6d8799428e8c3db35f22fd9576c0a37e68c1e34bfbe2fdb56fd6ce76552352eed15308b8f243d61b54cc68c720fb3e338872d9bf3bf94b1ee8b1827 + checksum: 10/477ba87aeccc6d314abec4e5d57414885971b3bafd25d676f8dee42907590b11bf4890cbfece54706ddbde841a52ae406464119354b526245fa0daaf04e44b47 + languageName: node + linkType: hard + +"@octokit/openapi-types@npm:^18.0.0": + version: 18.1.1 + resolution: "@octokit/openapi-types@npm:18.1.1" + checksum: 10/bd2920a238f74c6ccc1e2ee916bd3e17adeeef3bbb1726f821b8722dceaeff5ea2786b3170cc25dd51775cb9179d3cdf448a3526e70b8a1fc21cdd8aa52e5d4c languageName: node linkType: hard @@ -3297,13 +3325,13 @@ __metadata: linkType: hard "@octokit/plugin-paginate-rest@npm:^9.0.0": - version: 9.1.5 - resolution: "@octokit/plugin-paginate-rest@npm:9.1.5" + version: 9.0.0 + resolution: "@octokit/plugin-paginate-rest@npm:9.0.0" dependencies: - "@octokit/types": "npm:^12.4.0" + "@octokit/types": "npm:^12.0.0" peerDependencies: "@octokit/core": ">=5" - checksum: 10/5f1793ebebc9e2feaf8574beb2308b6fe9d0fec69d3fc3c93ed7ce8083d34e7ae7452121bd88b27e9ba91da29d648f8ffbf19d6f02787f8273a8bb0e3fbc2b9f + checksum: 10/1fcf2358d260f91ac995ceec725584fadda3a17cd895459942c78aa69c43969d1bb79e80b1cce80870dc28d018f1eaa39aeb1d4f1076e90b8b65378675fa9e02 languageName: node linkType: hard @@ -3317,13 +3345,13 @@ __metadata: linkType: hard "@octokit/plugin-rest-endpoint-methods@npm:^10.0.0": - version: 10.3.0 - resolution: "@octokit/plugin-rest-endpoint-methods@npm:10.3.0" + version: 10.0.0 + resolution: "@octokit/plugin-rest-endpoint-methods@npm:10.0.0" dependencies: - "@octokit/types": "npm:^12.4.0" + "@octokit/types": "npm:^12.0.0" peerDependencies: "@octokit/core": ">=5" - checksum: 10/be202aca31a513e9e06eda680ae761d05a944a2900523c2041a8ac6bc43e7a5bab0f76bcba09ef96ed48e3b1fabe4104a174b2f839dfb7a2a6f3d632023b4c6a + checksum: 10/2984df2c818624d393ea4ebbb9fb79c2f44e34facdc213221a8f6c41320dff50cd5cabb17af361c2b2a497fdec48a673abaec667196a77845cdb2b2d3e8426b3 languageName: node linkType: hard @@ -3352,14 +3380,15 @@ __metadata: linkType: hard "@octokit/request@npm:^8.0.0, @octokit/request@npm:^8.0.1, @octokit/request@npm:^8.0.2": - version: 8.2.0 - resolution: "@octokit/request@npm:8.2.0" + version: 8.1.2 + resolution: "@octokit/request@npm:8.1.2" dependencies: "@octokit/endpoint": "npm:^9.0.0" "@octokit/request-error": "npm:^5.0.0" "@octokit/types": "npm:^12.0.0" + is-plain-object: "npm:^5.0.0" universal-user-agent: "npm:^6.0.0" - checksum: 10/553ba8b99ea6fe2d3b66b2be6df06f7fe62a0b81e441d334ef25388cf0fcdab4a888fcfe2c1fb1ada262c233bcf7169da3ad5e03f024060ea5723f7753b0de3e + checksum: 10/769710b8462642517455502f907d60727a5fc54de3afd4c1ee3eb615f7673d2296d95d57271c646b9f0d5977b5da481fcf3096eba09b4a2c01ffd26cc0ab15a9 languageName: node linkType: hard @@ -3375,7 +3404,16 @@ __metadata: languageName: node linkType: hard -"@octokit/types@npm:^12.0.0, @octokit/types@npm:^12.4.0": +"@octokit/types@npm:^11.0.0": + version: 11.1.0 + resolution: "@octokit/types@npm:11.1.0" + dependencies: + "@octokit/openapi-types": "npm:^18.0.0" + checksum: 10/ebd510c14c4b26df127b76b4ed6b4b9a97cd6ec7a047532060f8346bfb29a68414c7189ee2b98f5386bcd7fa1a8c29af8e8460e5a7373cf6bf38a11775c8e26d + languageName: node + linkType: hard + +"@octokit/types@npm:^12.0.0": version: 12.5.0 resolution: "@octokit/types@npm:12.5.0" dependencies: @@ -3420,15 +3458,6 @@ __metadata: languageName: node linkType: hard -"@polymer/iron-a11y-announcer@npm:^3.0.0-pre.26": - version: 3.2.0 - resolution: "@polymer/iron-a11y-announcer@npm:3.2.0" - dependencies: - "@polymer/polymer": "npm:^3.0.0" - checksum: 10/1e84851511066362e35aef43c45bf368c39c6f3a545c34cf75a7e491ab8026ffa832c73c09382293d5e100178419cce605e93ce8205a0f9bd3eea5430a579569 - languageName: node - linkType: hard - "@polymer/iron-a11y-keys-behavior@npm:^3.0.0-pre.26": version: 3.0.1 resolution: "@polymer/iron-a11y-keys-behavior@npm:3.0.1" @@ -3459,15 +3488,6 @@ __metadata: languageName: node linkType: hard -"@polymer/iron-fit-behavior@npm:^3.0.0-pre.26": - version: 3.1.0 - resolution: "@polymer/iron-fit-behavior@npm:3.1.0" - dependencies: - "@polymer/polymer": "npm:^3.0.0" - checksum: 10/4395377ef4fd9d5ac3c1a3bb2dc549a8ee93dd95c05847a402d1789090835b796ca0f75209242f956f6ae7e1f813e968be1036e3893649275cd7e3633cdcc211 - languageName: node - linkType: hard - "@polymer/iron-flex-layout@npm:^3.0.0-pre.26": version: 3.0.1 resolution: "@polymer/iron-flex-layout@npm:3.0.1" @@ -3528,18 +3548,6 @@ __metadata: languageName: node linkType: hard -"@polymer/iron-overlay-behavior@npm:^3.0.0-pre.27": - version: 3.0.3 - resolution: "@polymer/iron-overlay-behavior@npm:3.0.3" - dependencies: - "@polymer/iron-a11y-keys-behavior": "npm:^3.0.0-pre.26" - "@polymer/iron-fit-behavior": "npm:^3.0.0-pre.26" - "@polymer/iron-resizable-behavior": "npm:^3.0.0-pre.26" - "@polymer/polymer": "npm:^3.0.0" - checksum: 10/9e3896e86bd49fca2a4dd2610bcce71f97889fd5696ed381b6005da898e8cff1127abf1661d1412a4fb55e6462b92c45540369dea3164d25535c3d6fd54a1cc0 - languageName: node - linkType: hard - "@polymer/iron-resizable-behavior@npm:^3.0.0-pre.26": version: 3.0.1 resolution: "@polymer/iron-resizable-behavior@npm:3.0.1" @@ -3655,18 +3663,6 @@ __metadata: languageName: node linkType: hard -"@polymer/paper-toast@npm:3.0.1": - version: 3.0.1 - resolution: "@polymer/paper-toast@npm:3.0.1" - dependencies: - "@polymer/iron-a11y-announcer": "npm:^3.0.0-pre.26" - "@polymer/iron-fit-behavior": "npm:^3.0.0-pre.26" - "@polymer/iron-overlay-behavior": "npm:^3.0.0-pre.27" - "@polymer/polymer": "npm:^3.0.0" - checksum: 10/9dab18ff37f4d4c717c5b9e9a23ee041ffbde088f5f4c024ebd97992a527474f13196c3ad0aecf51b7d99f82b8151a9e8e46d8b29333bded6cb1883506b25446 - languageName: node - linkType: hard - "@polymer/polymer@npm:3.5.1": version: 3.5.1 resolution: "@polymer/polymer@npm:3.5.1" @@ -3878,11 +3874,20 @@ __metadata: linkType: hard "@sinonjs/commons@npm:^3.0.0": - version: 3.0.1 - resolution: "@sinonjs/commons@npm:3.0.1" + version: 3.0.0 + resolution: "@sinonjs/commons@npm:3.0.0" dependencies: type-detect: "npm:4.0.8" - checksum: 10/a0af217ba7044426c78df52c23cedede6daf377586f3ac58857c565769358ab1f44ebf95ba04bbe38814fba6e316ca6f02870a009328294fc2c555d0f85a7117 + checksum: 10/086720ae0bc370829322df32612205141cdd44e592a8a9ca97197571f8f970352ea39d3bda75b347c43789013ddab36b34b59e40380a49bdae1c2df3aa85fe4f + languageName: node + linkType: hard + +"@sinonjs/fake-timers@npm:^10.0.2": + version: 10.3.0 + resolution: "@sinonjs/fake-timers@npm:10.3.0" + dependencies: + "@sinonjs/commons": "npm:^3.0.0" + checksum: 10/78155c7bd866a85df85e22028e046b8d46cf3e840f72260954f5e3ed5bd97d66c595524305a6841ffb3f681a08f6e5cef572a2cce5442a8a232dc29fb409b83e languageName: node linkType: hard @@ -3906,7 +3911,7 @@ __metadata: languageName: node linkType: hard -"@sinonjs/text-encoding@npm:^0.7.2": +"@sinonjs/text-encoding@npm:^0.7.1": version: 0.7.2 resolution: "@sinonjs/text-encoding@npm:0.7.2" checksum: 10/ec713fb44888c852d84ca54f6abf9c14d036c11a5d5bfab7825b8b9d2b22127dbe53412c68f4dbb0c05ea5ed61c64679bd2845c177d81462db41e0d3d7eca499 @@ -3942,12 +3947,19 @@ __metadata: languageName: node linkType: hard +"@tootallnate/once@npm:2": + version: 2.0.0 + resolution: "@tootallnate/once@npm:2.0.0" + checksum: 10/ad87447820dd3f24825d2d947ebc03072b20a42bfc96cbafec16bff8bbda6c1a81fcb0be56d5b21968560c5359a0af4038a68ba150c3e1694fe4c109a063bed8 + languageName: node + linkType: hard + "@types/accepts@npm:*": - version: 1.3.7 - resolution: "@types/accepts@npm:1.3.7" + version: 1.3.5 + resolution: "@types/accepts@npm:1.3.5" dependencies: "@types/node": "npm:*" - checksum: 10/7678cf74976e16093aff6e6f9755826faf069ac1e30179276158ce46ea246348ff22ca6bdd46cef08428881337d9ceefbf00bab08a7731646eb9fc9449d6a1e7 + checksum: 10/3984edd631d9e308ef10286454a05e2388812a740d404abf93522a3bc3d10032ae6a60816e8cc4ae1bc96367db39e543d3ef862944cea53d1eea48be1f624fc2 languageName: node linkType: hard @@ -3959,12 +3971,12 @@ __metadata: linkType: hard "@types/body-parser@npm:*": - version: 1.19.5 - resolution: "@types/body-parser@npm:1.19.5" + version: 1.19.3 + resolution: "@types/body-parser@npm:1.19.3" dependencies: "@types/connect": "npm:*" "@types/node": "npm:*" - checksum: 10/1e251118c4b2f61029cc43b0dc028495f2d1957fe8ee49a707fb940f86a9bd2f9754230805598278fe99958b49e9b7e66eec8ef6a50ab5c1f6b93e1ba2aaba82 + checksum: 10/932fa71437c275023799123680ef26ffd90efd37f51a1abe405e6ae6e5b4ad9511b7a3a8f5a12877ed1444a02b6286c0a137a98e914b3c61932390c83643cc2c languageName: node linkType: hard @@ -3978,12 +3990,12 @@ __metadata: linkType: hard "@types/chrome@npm:*": - version: 0.0.260 - resolution: "@types/chrome@npm:0.0.260" + version: 0.0.246 + resolution: "@types/chrome@npm:0.0.246" dependencies: "@types/filesystem": "npm:*" "@types/har-format": "npm:*" - checksum: 10/4e7d6e5e3bd67bc481c6524aacce902568ba8f78b7da3fe1f2999f8f01863240847f1b05a358d38dbd2afdbe112dfd9ff84912a664c40595e9e4266eef3891cc + checksum: 10/e397c468817ed1e8f7b47f134a09c8437124d57241f2a47c0b121115dfe47ca9cc4a19997db16bea9b64433cc72c80efb57078ea4e979d02139f3e78082b58b0 languageName: node linkType: hard @@ -4011,9 +4023,9 @@ __metadata: linkType: hard "@types/command-line-args@npm:^5.0.0": - version: 5.2.3 - resolution: "@types/command-line-args@npm:5.2.3" - checksum: 10/3d90db5b4bbaabd049654a0d12fa378989ab0d76a0f98d4c606761b5a08ce76458df0f9bb175219e187b4cd57e285e6f836d23e86b2c3d997820854cc3ed9121 + version: 5.2.1 + resolution: "@types/command-line-args@npm:5.2.1" + checksum: 10/a5df8562a7a0eb7c4da218661360ff8369a63c0fd783310d1940f0ece55826d5173eeb3732bab48dbfb60b1614d61989a9d87c6cdbee04353c4df6f45387d417 languageName: node linkType: hard @@ -4028,50 +4040,50 @@ __metadata: linkType: hard "@types/connect@npm:*": - version: 3.4.38 - resolution: "@types/connect@npm:3.4.38" + version: 3.4.36 + resolution: "@types/connect@npm:3.4.36" dependencies: "@types/node": "npm:*" - checksum: 10/7eb1bc5342a9604facd57598a6c62621e244822442976c443efb84ff745246b10d06e8b309b6e80130026a396f19bf6793b7cecd7380169f369dac3bfc46fb99 + checksum: 10/4dee3d966fb527b98f0cbbdcf6977c9193fc3204ed539b7522fe5e64dfa45f9017bdda4ffb1f760062262fce7701a0ee1c2f6ce2e50af36c74d4e37052303172 languageName: node linkType: hard "@types/content-disposition@npm:*": - version: 0.5.8 - resolution: "@types/content-disposition@npm:0.5.8" - checksum: 10/eeea868fb510ae7a32aa2d7de680fba79d59001f3e758a334621e10bc0a6496d3a42bb79243a5e53b9c63cb524522853ccc144fe1ab160c4247d37cdb81146c4 + version: 0.5.6 + resolution: "@types/content-disposition@npm:0.5.6" + checksum: 10/da07798d52cc8fc46a8843d768b48d54c70f1a44c861dc2c73c4c25a1e08af859709629ab0e4d23d5198107b8926bb48c593df436ba68123d87191f5e25fe4bc languageName: node linkType: hard "@types/cookies@npm:*": - version: 0.9.0 - resolution: "@types/cookies@npm:0.9.0" + version: 0.7.8 + resolution: "@types/cookies@npm:0.7.8" dependencies: "@types/connect": "npm:*" "@types/express": "npm:*" "@types/keygrip": "npm:*" "@types/node": "npm:*" - checksum: 10/88d2106834fca85cf9dfef984e99bf4969e77d48538d8e8408a29679b4d1f675fe4725d35f2e38d252a336b76d14a2bc84bcb34edc72238a7a8261c0808c7c56 + checksum: 10/00005c8fbf5b6fb698f402ddcf927eb79f5ee361eb1f0ff7729a0016021a9ee77a880c6d4d12979ceb618c8d3ebcb939939544e22a7bbc4296f6c9b181344dd1 languageName: node linkType: hard "@types/eslint-scope@npm:^3.7.3": - version: 3.7.7 - resolution: "@types/eslint-scope@npm:3.7.7" + version: 3.7.5 + resolution: "@types/eslint-scope@npm:3.7.5" dependencies: "@types/eslint": "npm:*" "@types/estree": "npm:*" - checksum: 10/e2889a124aaab0b89af1bab5959847c5bec09809209255de0e63b9f54c629a94781daa04adb66bffcdd742f5e25a17614fb933965093c0eea64aacda4309380e + checksum: 10/e91ce335c3791c2cf6084caa0073f90d5b7ae3fcf27785ade8422b7d896159fa14a5a3f1efd31ef03e9ebc1ff04983288280dfe8c9a5579a958539f59df8cc9f languageName: node linkType: hard "@types/eslint@npm:*": - version: 8.56.2 - resolution: "@types/eslint@npm:8.56.2" + version: 8.44.3 + resolution: "@types/eslint@npm:8.44.3" dependencies: "@types/estree": "npm:*" "@types/json-schema": "npm:*" - checksum: 10/9e4805e770ea90a561e1f69e5edce28b8f66e92e290705100e853c7c252cf87bef654168d0d47fc60c0effbe4517dd7a8d2fa6d3f04c7f831367d568009fd368 + checksum: 10/53796ff6009512775490403647577946ff924dbef5339898e361e1b29527492e5738cbd67d94202d6ebd6d45e7ac5c5da1c95fe710f16476e2dda3316d1970f6 languageName: node linkType: hard @@ -4090,14 +4102,14 @@ __metadata: linkType: hard "@types/express-serve-static-core@npm:*, @types/express-serve-static-core@npm:^4.17.33": - version: 4.17.43 - resolution: "@types/express-serve-static-core@npm:4.17.43" + version: 4.17.37 + resolution: "@types/express-serve-static-core@npm:4.17.37" dependencies: "@types/node": "npm:*" "@types/qs": "npm:*" "@types/range-parser": "npm:*" "@types/send": "npm:*" - checksum: 10/9079e137470e0456bb8e77ae66df9505ee12591e94860bde574cfe52c5c60bbc5bf7dd44f5689c3cbb1baf0aa84442d9a21f53dcd921d18745727293cd5a5fd6 + checksum: 10/bb88921d147dd38bfcc286271378384fbbdde1fdd452b092518a8dd425057f0a6368b615320f300d7011a02ec5d925ab55da1c1b3997710dec3869a67506a611 languageName: node linkType: hard @@ -4114,25 +4126,25 @@ __metadata: linkType: hard "@types/filesystem@npm:*": - version: 0.0.35 - resolution: "@types/filesystem@npm:0.0.35" + version: 0.0.33 + resolution: "@types/filesystem@npm:0.0.33" dependencies: "@types/filewriter": "npm:*" - checksum: 10/d8eb6c2b28601c5eacf8b48464bc48f060c2a7194e2c8e493e943f3a8543e35da9c706987665356ed67b11587cc94819fd8262037bf56945c6a38569a0e260f1 + checksum: 10/77b35dccace2ed1e8dd1a2d83ce079ec55eaa85bbfd4f1d9850db7d36bd71d960b529ba3c0bc48aa5ce21f37f9102a9e327e6e9efe259e31b3eee9ca910571f2 languageName: node linkType: hard "@types/filewriter@npm:*": - version: 0.0.33 - resolution: "@types/filewriter@npm:0.0.33" - checksum: 10/495a4bb424c27eda967fe9ac3b8f7b781e6b3f9ce59403a991590cb1073022f9c5383d3c7d808ef6956b785550c36664c4fcd502dc0baf69e340bd481171e0ca + version: 0.0.30 + resolution: "@types/filewriter@npm:0.0.30" + checksum: 10/12ff11e79967a0efb3aa53425820334de876a8d144ca1a5a51f6e2608d6438cfa253fceb65fdbae3a6efc7c5df35b83fe8253b38becafc680f7b9aa804d4d284 languageName: node linkType: hard "@types/geojson@npm:*": - version: 7946.0.14 - resolution: "@types/geojson@npm:7946.0.14" - checksum: 10/ae511bee6488ae3bd5a3a3347aedb0371e997b14225b8983679284e22fa4ebd88627c6e3ff8b08bf4cc35068cb29310c89427311ffc9322c255615821a922e71 + version: 7946.0.11 + resolution: "@types/geojson@npm:7946.0.11" + checksum: 10/93fe7e9c5d16b0a836058ee4b87f8b022d53893d5a8e7ab52c8bf64d12039d076df99f3764c1c4da13abaa1001115fd899330edba4d8d8fa4a4feb162650b22c languageName: node linkType: hard @@ -4147,16 +4159,16 @@ __metadata: linkType: hard "@types/hammerjs@npm:^2.0.36": - version: 2.0.45 - resolution: "@types/hammerjs@npm:2.0.45" - checksum: 10/8d7f8791789853a9461f6445e625f18922a823a61042161dde5513f4a2c15ecd6361fa6f9b457ce13bfb6b518489b892fedb9e2cebb4420523cb45f1cbb4ee88 + version: 2.0.42 + resolution: "@types/hammerjs@npm:2.0.42" + checksum: 10/4de431d2fba9f879785bfe31b97bfa3d107890e140fc7035cab6f2d841b72b39c009f1a73485c97b8298ec067738c59ea3df2175ce8d97e7756f8cd44f56e3ef languageName: node linkType: hard "@types/har-format@npm:*": - version: 1.2.15 - resolution: "@types/har-format@npm:1.2.15" - checksum: 10/fcb397741076ed1095ef8dcccd408c9ef4e20fcfeef0d3fe700f837cc015fe72ee2a3c081cc9c03d73c115005b38ba7b1c563d27e050fa612d60bc2049f309ca + version: 1.2.13 + resolution: "@types/har-format@npm:1.2.13" + checksum: 10/37d48728d15e7cf7d68c31a8362476b780b03a8b8477dd400de208859b1ed2e0a4af8ea0605cfb1743a39319a93f683ae6e062f561f17838ef7a6d47b6d62fbc languageName: node linkType: hard @@ -4168,25 +4180,25 @@ __metadata: linkType: hard "@types/http-assert@npm:*": - version: 1.5.5 - resolution: "@types/http-assert@npm:1.5.5" - checksum: 10/cd6bb7fd42cc6e2a702cb55370b8b25231954ad74c04bcd185b943a74ded3d4c28099c30f77b26951df2426441baff41718816c60b5af80efe2b8888d900bf93 + version: 1.5.3 + resolution: "@types/http-assert@npm:1.5.3" + checksum: 10/9553e5a0b8bcfdac4b51d3fa3b89a91b5450171861a667a5b4c47204e0f4a1ca865d97396e6ceaf220e87b64d06b7a8bad7bfba15ef97acb41a87507c9940dbc languageName: node linkType: hard "@types/http-errors@npm:*": - version: 2.0.4 - resolution: "@types/http-errors@npm:2.0.4" - checksum: 10/1f3d7c3b32c7524811a45690881736b3ef741bf9849ae03d32ad1ab7062608454b150a4e7f1351f83d26a418b2d65af9bdc06198f1c079d75578282884c4e8e3 + version: 2.0.2 + resolution: "@types/http-errors@npm:2.0.2" + checksum: 10/d7f14045240ac4b563725130942b8e5c8080bfabc724c8ff3f166ea928ff7ae02c5194763bc8f6aaf21897e8a44049b0492493b9de3e058247e58fdfe0f86692 languageName: node linkType: hard "@types/http-proxy@npm:^1.17.8": - version: 1.17.14 - resolution: "@types/http-proxy@npm:1.17.14" + version: 1.17.12 + resolution: "@types/http-proxy@npm:1.17.12" dependencies: "@types/node": "npm:*" - checksum: 10/aa1a3e66cd43cbf06ea5901bf761d2031200a0ab42ba7e462a15c752e70f8669f21fb3be7c2f18fefcb83b95132dfa15740282e7421b856745598fbaea8e3a42 + checksum: 10/b7e28c8c9a266d026e93f769c59ffe00f599bddb04cfcd8d323d2fe69b8e0dd40f5433e5f42567a6f0ec8df05f4045436c40a9562060db5ad507d18a30243cb3 languageName: node linkType: hard @@ -4198,9 +4210,9 @@ __metadata: linkType: hard "@types/json-schema@npm:*, @types/json-schema@npm:^7.0.12, @types/json-schema@npm:^7.0.8, @types/json-schema@npm:^7.0.9": - version: 7.0.15 - resolution: "@types/json-schema@npm:7.0.15" - checksum: 10/1a3c3e06236e4c4aab89499c428d585527ce50c24fe8259e8b3926d3df4cfbbbcf306cfc73ddfb66cbafc973116efd15967020b0f738f63e09e64c7d260519e7 + version: 7.0.13 + resolution: "@types/json-schema@npm:7.0.13" + checksum: 10/24000f93d34b3848053b8eb36bbbcfb6b465f691d61186ddac9596b6f1fb105ae84a8be63c0c0f3b6d8f7eb6f891f6cdf3c34910aefc756a1971164c4262de1a languageName: node linkType: hard @@ -4212,24 +4224,24 @@ __metadata: linkType: hard "@types/keygrip@npm:*": - version: 1.0.6 - resolution: "@types/keygrip@npm:1.0.6" - checksum: 10/d157f60bf920492347791d2b26d530d5069ce05796549fbacd4c24d66ffbebbcb0ab67b21e7a1b80a593b9fd4b67dc4843dec04c12bbc2e0fddfb8577a826c41 + version: 1.0.3 + resolution: "@types/keygrip@npm:1.0.3" + checksum: 10/adee9a3efda3db9c64466af1c7c91a6d049420ee50589500cfd36e3e38d6abefdd858da88e6da63ed186e588127af3e862c1dc64fb0ad45c91870e6c35fe3be0 languageName: node linkType: hard "@types/koa-compose@npm:*": - version: 3.2.8 - resolution: "@types/koa-compose@npm:3.2.8" + version: 3.2.6 + resolution: "@types/koa-compose@npm:3.2.6" dependencies: "@types/koa": "npm:*" - checksum: 10/95c32bdee738ac7c10439bbf6342ca3b9f0aafd7e8118739eac7fb0fa703a23cfe4c88f63e13a69a16fbde702e0bcdc62b272aa734325fc8efa7e5625479752e + checksum: 10/1204c5bfa4c69448b692aba29c566ef6bedbdbe5842fa180450267a23d3606faa13ef209876fd0c989edb5bc381812a66610fcfeac196ce4e76364354756ba1f languageName: node linkType: hard "@types/koa@npm:*, @types/koa@npm:^2.11.6": - version: 2.14.0 - resolution: "@types/koa@npm:2.14.0" + version: 2.13.9 + resolution: "@types/koa@npm:2.13.9" dependencies: "@types/accepts": "npm:*" "@types/content-disposition": "npm:*" @@ -4239,7 +4251,7 @@ __metadata: "@types/keygrip": "npm:*" "@types/koa-compose": "npm:*" "@types/node": "npm:*" - checksum: 10/00bd0dd9f2366eabbd05a9af1c83e10679b4241e69b75927c7653826508c03e9b19b2c03499c5ff6496acbb192f5c0a860b4e95308462e945e2fb79636cbf3cf + checksum: 10/190f63491e9a006e19e931a8e37c56883c1045e41d7c9286c67ded1d514a8ad8fa68d1ec6588e96dff81b4a51a18c71dd7784e74ca38e58b232e3cac36ca6e54 languageName: node linkType: hard @@ -4262,18 +4274,18 @@ __metadata: linkType: hard "@types/lodash-es@npm:^4.17.4": - version: 4.17.12 - resolution: "@types/lodash-es@npm:4.17.12" + version: 4.17.9 + resolution: "@types/lodash-es@npm:4.17.9" dependencies: "@types/lodash": "npm:*" - checksum: 10/56b9a433348b11c31051c6fa9028540a033a08fb80b400c589d740446c19444d73b217cf1471d4036448ef686a83e8cf2a35d1fadcb3f2105f26701f94aebb07 + checksum: 10/5e3a8a74134e67c37f1b8eb4a2897c88038f1b1bd7f508feec9e5561b52787d7efcc30c18981e9c6edec2b894f127b60312a431d98b84e12e785bea9cb5d1d40 languageName: node linkType: hard "@types/lodash@npm:*": - version: 4.14.202 - resolution: "@types/lodash@npm:4.14.202" - checksum: 10/1bb9760a5b1dda120132c4b987330d67979c95dbc22612678682cd61b00302e190f4207228f3728580059cdab5582362262e3819aea59960c1017bd2b9fb26f6 + version: 4.14.199 + resolution: "@types/lodash@npm:4.14.199" + checksum: 10/340aabe9b023553d64e47f2af7f2010814c1178ce3a2b256e8dd54c444578d5e6e937d70c7117ee1fac5c0fc429b592ab9f6d69a966f0a1222ebcbbe6d516c4a languageName: node linkType: hard @@ -4285,16 +4297,16 @@ __metadata: linkType: hard "@types/mime@npm:*": - version: 3.0.4 - resolution: "@types/mime@npm:3.0.4" - checksum: 10/a6139c8e1f705ef2b064d072f6edc01f3c099023ad7c4fce2afc6c2bf0231888202adadbdb48643e8e20da0ce409481a49922e737eca52871b3dc08017455843 + version: 3.0.1 + resolution: "@types/mime@npm:3.0.1" + checksum: 10/4040fac73fd0cea2460e29b348c1a6173da747f3a87da0dbce80dd7a9355a3d0e51d6d9a401654f3e5550620e3718b5a899b2ec1debf18424e298a2c605346e7 languageName: node linkType: hard "@types/mime@npm:^1": - version: 1.3.5 - resolution: "@types/mime@npm:1.3.5" - checksum: 10/e29a5f9c4776f5229d84e525b7cd7dd960b51c30a0fb9a028c0821790b82fca9f672dab56561e2acd9e8eed51d431bde52eafdfef30f643586c4162f1aecfc78 + version: 1.3.2 + resolution: "@types/mime@npm:1.3.2" + checksum: 10/0493368244cced1a69cb791b485a260a422e6fcc857782e1178d1e6f219f1b161793e9f87f5fae1b219af0f50bee24fcbe733a18b4be8fdd07a38a8fb91146fd languageName: node linkType: hard @@ -4322,11 +4334,9 @@ __metadata: linkType: hard "@types/node@npm:*": - version: 20.11.19 - resolution: "@types/node@npm:20.11.19" - dependencies: - undici-types: "npm:~5.26.4" - checksum: 10/c7f4705d6c84aa21679ad180c33c13ca9567f650e66e14bcee77c7c43d14619c7cd3b4d7b2458947143030b7b1930180efa6d12d999b45366abff9fed7a17472 + version: 20.6.5 + resolution: "@types/node@npm:20.6.5" + checksum: 10/4a3af776dbaea9564f3dd89d799766fa1253184ed52783ee5c9a178b6f366f593c96faa1c588c78a62dfa21db8ff2ba504b7267bc3f4ba90ba6f68f297e8965e languageName: node linkType: hard @@ -4345,9 +4355,9 @@ __metadata: linkType: hard "@types/offscreencanvas@npm:^2019.6.4": - version: 2019.7.3 - resolution: "@types/offscreencanvas@npm:2019.7.3" - checksum: 10/53a394a65ae08eddff6e0a2a8db72abecc94f41fc8fee166e8900075d3c1ca32540ddf5b4836c37357d53a0253a03fea4d781b2db543e3f08bc1cdc2dc0fefb5 + version: 2019.7.1 + resolution: "@types/offscreencanvas@npm:2019.7.1" + checksum: 10/6835c06310ec6f39bdd10f66207c74e6dc522848bd4e4168e08590db4830b7a9c42f3151cb30dd75fda27acf6de80f44f45918d873caa67b74b71cf25477e309 languageName: node linkType: hard @@ -4368,9 +4378,9 @@ __metadata: linkType: hard "@types/prismjs@npm:^1.16.5": - version: 1.26.3 - resolution: "@types/prismjs@npm:1.26.3" - checksum: 10/4bd55230ffc0b2b16f4008be3a7f1d7c6b32dd3bed8006e64d24fb22c44fc7e300dac77b856f732803ccdc9a3472b2c0ee7776cad048843c47d608c41a89b6a6 + version: 1.26.1 + resolution: "@types/prismjs@npm:1.26.1" + checksum: 10/83086d4de54a1a333e2bef6ab9f34eb9cd9f2e8598150f9f965d9ecd8eeac0d7705b577035ef9786aeb3906b3295afb0d2a6a3e33bebe88217338515b23fdf0f languageName: node linkType: hard @@ -4384,16 +4394,16 @@ __metadata: linkType: hard "@types/qs@npm:*": - version: 6.9.11 - resolution: "@types/qs@npm:6.9.11" - checksum: 10/620ca1628bf3da65662c54ed6ebb120b18a3da477d0bfcc872b696685a9bb1893c3c92b53a1190a8f54d52eaddb6af8b2157755699ac83164604329935e8a7f2 + version: 6.9.8 + resolution: "@types/qs@npm:6.9.8" + checksum: 10/c28e07d00d07970e5134c6eed184a0189b8a4649e28fdf36d9117fe671c067a44820890de6bdecef18217647a95e9c6aebdaaae69f5fe4b0bec9345db885f77e languageName: node linkType: hard "@types/range-parser@npm:*": - version: 1.2.7 - resolution: "@types/range-parser@npm:1.2.7" - checksum: 10/95640233b689dfbd85b8c6ee268812a732cf36d5affead89e806fe30da9a430767af8ef2cd661024fd97e19d61f3dec75af2df5e80ec3bea000019ab7028629a + version: 1.2.4 + resolution: "@types/range-parser@npm:1.2.4" + checksum: 10/b7c0dfd5080a989d6c8bb0b6750fc0933d9acabeb476da6fe71d8bdf1ab65e37c136169d84148034802f48378ab94e3c37bb4ef7656b2bec2cb9c0f8d4146a95 languageName: node linkType: hard @@ -4421,19 +4431,19 @@ __metadata: linkType: hard "@types/semver@npm:^7.5.0": - version: 7.5.7 - resolution: "@types/semver@npm:7.5.7" - checksum: 10/535d88ec577fe59e38211881f79a1e2ba391e9e1516f8fff74e7196a5ba54315bace9c67a4616c334c830c89027d70a9f473a4ceb634526086a9da39180f2f9a + version: 7.5.2 + resolution: "@types/semver@npm:7.5.2" + checksum: 10/837398995ea22d4f16c834141c28169d30f2bcd5957c72d2ba42499d13806346026b58dbf1ee90152c234cabc1ebcdb5f40b076a68f0a20164f5b227308a0950 languageName: node linkType: hard "@types/send@npm:*": - version: 0.17.4 - resolution: "@types/send@npm:0.17.4" + version: 0.17.1 + resolution: "@types/send@npm:0.17.1" dependencies: "@types/mime": "npm:^1" "@types/node": "npm:*" - checksum: 10/28320a2aa1eb704f7d96a65272a07c0bf3ae7ed5509c2c96ea5e33238980f71deeed51d3631927a77d5250e4091b3e66bce53b42d770873282c6a20bb8b0280d + checksum: 10/6420837887858f7aa82f2c0272f73edb42385bd0978f43095e83590a405d86c8cc6d918c30b2d542f1d8bddc9f3d16c2e8fdfca936940de71b97c45f228d1896 languageName: node linkType: hard @@ -4493,9 +4503,9 @@ __metadata: linkType: hard "@types/trusted-types@npm:^2.0.2": - version: 2.0.7 - resolution: "@types/trusted-types@npm:2.0.7" - checksum: 10/8e4202766a65877efcf5d5a41b7dd458480b36195e580a3b1085ad21e948bc417d55d6f8af1fd2a7ad008015d4117d5fdfe432731157da3c68678487174e4ba3 + version: 2.0.4 + resolution: "@types/trusted-types@npm:2.0.4" + checksum: 10/5256c4576cd1c90d33ddd9cc9cbd4f202b39c98cbe8b7f74963298f9eb2159c285ea5c25a6181b4c594d8d75641765bff85d72c2d251ad076e6529ce0eeedd1c languageName: node linkType: hard @@ -4946,9 +4956,9 @@ __metadata: linkType: hard "@vscode/web-custom-data@npm:^0.4.2": - version: 0.4.9 - resolution: "@vscode/web-custom-data@npm:0.4.9" - checksum: 10/6ccc98c43b0ead4f320dab2e33df3570590d4d3e94edf54b722c3b376fc236abb5a6e9e7655942044cf7ebe4f305a58bc58c1d8d4b251b9434d1db1266797e2e + version: 0.4.8 + resolution: "@vscode/web-custom-data@npm:0.4.8" + checksum: 10/556106530e399321d1412d0074d1a4dcfc04c17fc334df8de4f10469a2ad6f83c7245caf92174817c5bf032ec5ffd894bc418889d76a2a7d163ad0e4c910adf0 languageName: node linkType: hard @@ -5286,10 +5296,10 @@ __metadata: languageName: node linkType: hard -"abbrev@npm:^2.0.0": - version: 2.0.0 - resolution: "abbrev@npm:2.0.0" - checksum: 10/ca0a54e35bea4ece0ecb68a47b312e1a9a6f772408d5bcb9051230aaa94b0460671c5b5c9cb3240eb5b7bc94c52476550eb221f65a0bbd0145bdc9f3113a6707 +"abbrev@npm:^1.0.0": + version: 1.1.1 + resolution: "abbrev@npm:1.1.1" + checksum: 10/2d882941183c66aa665118bafdab82b7a177e9add5eb2776c33e960a4f3c89cff88a1b38aba13a456de01d0dd9d66a8bea7c903268b21ea91dd1097e1e2e8243 languageName: node linkType: hard @@ -5322,20 +5332,29 @@ __metadata: linkType: hard "acorn@npm:^8.5.0, acorn@npm:^8.7.1, acorn@npm:^8.8.2, acorn@npm:^8.9.0": - version: 8.11.3 - resolution: "acorn@npm:8.11.3" + version: 8.10.0 + resolution: "acorn@npm:8.10.0" bin: acorn: bin/acorn - checksum: 10/b688e7e3c64d9bfb17b596e1b35e4da9d50553713b3b3630cf5690f2b023a84eac90c56851e6912b483fe60e8b4ea28b254c07e92f17ef83d72d78745a8352dd + checksum: 10/522310c20fdc3c271caed3caf0f06c51d61cb42267279566edd1d58e83dbc12eebdafaab666a0f0be1b7ad04af9c6bc2a6f478690a9e6391c3c8b165ada917dd languageName: node linkType: hard -"agent-base@npm:^7.0.2, agent-base@npm:^7.1.0": - version: 7.1.0 - resolution: "agent-base@npm:7.1.0" +"agent-base@npm:6, agent-base@npm:^6.0.2": + version: 6.0.2 + resolution: "agent-base@npm:6.0.2" dependencies: - debug: "npm:^4.3.4" - checksum: 10/f7828f991470a0cc22cb579c86a18cbae83d8a3cbed39992ab34fc7217c4d126017f1c74d0ab66be87f71455318a8ea3e757d6a37881b8d0f2a2c6aa55e5418f + debug: "npm:4" + checksum: 10/21fb903e0917e5cb16591b4d0ef6a028a54b83ac30cd1fca58dece3d4e0990512a8723f9f83130d88a41e2af8b1f7be1386fda3ea2d181bb1a62155e75e95e23 + languageName: node + linkType: hard + +"agentkeepalive@npm:^4.2.1": + version: 4.5.0 + resolution: "agentkeepalive@npm:4.5.0" + dependencies: + humanize-ms: "npm:^1.2.1" + checksum: 10/dd210ba2a2e2482028f027b1156789744aadbfd773a6c9dd8e4e8001930d5af82382abe19a69240307b1d8003222ce6b0542935038313434b900e351914fc15f languageName: node linkType: hard @@ -5595,6 +5614,13 @@ __metadata: languageName: node linkType: hard +"aproba@npm:^1.0.3 || ^2.0.0": + version: 2.0.0 + resolution: "aproba@npm:2.0.0" + checksum: 10/c2b9a631298e8d6f3797547e866db642f68493808f5b37cd61da778d5f6ada890d16f668285f7d60bd4fc3b03889bd590ffe62cf81b700e9bb353431238a0a7b + languageName: node + linkType: hard + "archy@npm:^1.0.0": version: 1.0.0 resolution: "archy@npm:1.0.0" @@ -5602,6 +5628,16 @@ __metadata: languageName: node linkType: hard +"are-we-there-yet@npm:^3.0.0": + version: 3.0.1 + resolution: "are-we-there-yet@npm:3.0.1" + dependencies: + delegates: "npm:^1.0.0" + readable-stream: "npm:^3.6.0" + checksum: 10/390731720e1bf9ed5d0efc635ea7df8cbc4c90308b0645a932f06e8495a0bf1ecc7987d3b97e805f62a17d6c4b634074b25200aa4d149be2a7b17250b9744bc4 + languageName: node + linkType: hard + "argparse@npm:^2.0.1": version: 2.0.1 resolution: "argparse@npm:2.0.1" @@ -5783,19 +5819,6 @@ __metadata: languageName: node linkType: hard -"array.prototype.filter@npm:^1.0.3": - version: 1.0.3 - resolution: "array.prototype.filter@npm:1.0.3" - dependencies: - call-bind: "npm:^1.0.2" - define-properties: "npm:^1.2.0" - es-abstract: "npm:^1.22.1" - es-array-method-boxes-properly: "npm:^1.0.0" - is-string: "npm:^1.0.7" - checksum: 10/3da2189afb00f95559cc73fc3c50f17a071a65bb705c0b2f2e2a2b2142781215b622442368c8b4387389b6ab251adf09ad347f9a8a4cf29d24404cc5ea1e295c - languageName: node - linkType: hard - "array.prototype.find@npm:^2.2.2": version: 2.2.2 resolution: "array.prototype.find@npm:2.2.2" @@ -5809,15 +5832,15 @@ __metadata: linkType: hard "array.prototype.findlastindex@npm:^1.2.3": - version: 1.2.4 - resolution: "array.prototype.findlastindex@npm:1.2.4" + version: 1.2.3 + resolution: "array.prototype.findlastindex@npm:1.2.3" dependencies: - call-bind: "npm:^1.0.5" - define-properties: "npm:^1.2.1" - es-abstract: "npm:^1.22.3" - es-errors: "npm:^1.3.0" - es-shim-unscopables: "npm:^1.0.2" - checksum: 10/12d7de8da619065b9d4c40550d11c13f2fbbc863c4270ef01d022f49ef16fbe9022441ee9d60b1e952853c661dd4b3e05c21e4348d4631c6d93ddf802a252296 + call-bind: "npm:^1.0.2" + define-properties: "npm:^1.2.0" + es-abstract: "npm:^1.22.1" + es-shim-unscopables: "npm:^1.0.0" + get-intrinsic: "npm:^1.2.1" + checksum: 10/063cbab8eeac3aa01f3e980eecb9a8c5d87723032b49f7f814ecc6d75c33c03c17e3f43a458127a62e16303cab412f95d6ad9dc7e0ae6d9dc27a9bb76c24df7a languageName: node linkType: hard @@ -5913,9 +5936,9 @@ __metadata: linkType: hard "async@npm:^3.2.3": - version: 3.2.5 - resolution: "async@npm:3.2.5" - checksum: 10/323c3615c3f0ab1ac25a6f953296bc0ac3213d5e0f1c0debdb12964e55963af288d570293c11e44f7967af58c06d2a88d0ea588c86ec0fbf62fa98037f604a0f + version: 3.2.4 + resolution: "async@npm:3.2.4" + checksum: 10/bebb5dc2258c45b83fa1d3be179ae0eb468e1646a62d443c8d60a45e84041b28fccebe1e2d1f234bfc3dcad44e73dcdbf4ba63d98327c9f6556e3dbd47c2ae8b languageName: node linkType: hard @@ -5935,7 +5958,7 @@ __metadata: languageName: node linkType: hard -"available-typed-arrays@npm:^1.0.6": +"available-typed-arrays@npm:^1.0.5, available-typed-arrays@npm:^1.0.6": version: 1.0.6 resolution: "available-typed-arrays@npm:1.0.6" checksum: 10/c1e2e3d3a694f21bf60e0a048d8275fa7358131a0b8e6b57714318d618b59522416db67fb9f56973af0ce596f4333ef1336ca12c37a41d5a72ef79885373a7fd @@ -5943,9 +5966,9 @@ __metadata: linkType: hard "axe-core@npm:^4.3.3": - version: 4.8.4 - resolution: "axe-core@npm:4.8.4" - checksum: 10/c8b3972b17afac33b9e151556fa500b9218086ca763866942de30e7f51ac50582902ad03ec16381796c95afaacfa8c33efb2d02ab4f09b6c09d6be58b95da978 + version: 4.8.2 + resolution: "axe-core@npm:4.8.2" + checksum: 10/3e8dbf264a57767713daa77fe04bbabd71a956b08b99c2eb0ec61b75852f21190653f557d2da623dea9e0a7555460deaac71d9f6a9125c0b52576f8581bfbe52 languageName: node linkType: hard @@ -6213,7 +6236,7 @@ __metadata: languageName: node linkType: hard -"browserslist@npm:^4.21.10, browserslist@npm:^4.22.2, browserslist@npm:^4.22.3": +"browserslist@npm:^4.21.10, browserslist@npm:^4.22.2": version: 4.23.0 resolution: "browserslist@npm:4.23.0" dependencies: @@ -6295,23 +6318,23 @@ __metadata: languageName: node linkType: hard -"cacache@npm:^18.0.0": - version: 18.0.2 - resolution: "cacache@npm:18.0.2" +"cacache@npm:^17.0.0": + version: 17.1.4 + resolution: "cacache@npm:17.1.4" dependencies: "@npmcli/fs": "npm:^3.1.0" fs-minipass: "npm:^3.0.0" glob: "npm:^10.2.2" - lru-cache: "npm:^10.0.1" + lru-cache: "npm:^7.7.1" minipass: "npm:^7.0.3" - minipass-collect: "npm:^2.0.1" + minipass-collect: "npm:^1.0.2" minipass-flush: "npm:^1.0.5" minipass-pipeline: "npm:^1.2.4" p-map: "npm:^4.0.0" ssri: "npm:^10.0.0" tar: "npm:^6.1.11" unique-filename: "npm:^3.0.0" - checksum: 10/5ca58464f785d4d64ac2019fcad95451c8c89bea25949f63acd8987fcc3493eaef1beccc0fa39e673506d879d3fc1ab420760f8a14f8ddf46ea2d121805a5e96 + checksum: 10/6e26c788bc6a18ff42f4d4f97db30d5c60a5dfac8e7c10a03b0307a92cf1b647570547cf3cd96463976c051eb9c7258629863f156e224c82018862c1a8ad0e70 languageName: node linkType: hard @@ -6342,7 +6365,7 @@ __metadata: languageName: node linkType: hard -"call-bind@npm:^1.0.2, call-bind@npm:^1.0.5, call-bind@npm:^1.0.6, call-bind@npm:^1.0.7": +"call-bind@npm:^1.0.0, call-bind@npm:^1.0.2, call-bind@npm:^1.0.5, call-bind@npm:^1.0.6, call-bind@npm:^1.0.7": version: 1.0.7 resolution: "call-bind@npm:1.0.7" dependencies: @@ -6862,9 +6885,9 @@ __metadata: linkType: hard "component-emitter@npm:^1.2.1": - version: 1.3.1 - resolution: "component-emitter@npm:1.3.1" - checksum: 10/94550aa462c7bd5a61c1bc480e28554aa306066930152d1b1844a0dd3845d4e5db7e261ddec62ae184913b3e59b55a2ad84093b9d3596a8f17c341514d6c483d + version: 1.3.0 + resolution: "component-emitter@npm:1.3.0" + checksum: 10/dfc1ec2e7aa2486346c068f8d764e3eefe2e1ca0b24f57506cd93b2ae3d67829a7ebd7cc16e2bf51368fac2f45f78fcff231718e40b1975647e4a86be65e1d05 languageName: node linkType: hard @@ -6932,6 +6955,13 @@ __metadata: languageName: node linkType: hard +"console-control-strings@npm:^1.1.0": + version: 1.1.0 + resolution: "console-control-strings@npm:1.1.0" + checksum: 10/27b5fa302bc8e9ae9e98c03c66d76ca289ad0c61ce2fe20ab288d288bee875d217512d2edb2363fc83165e88f1c405180cf3f5413a46e51b4fe1a004840c6cdb + languageName: node + linkType: hard + "content-disposition@npm:0.5.2": version: 0.5.2 resolution: "content-disposition@npm:0.5.2" @@ -6983,13 +7013,13 @@ __metadata: languageName: node linkType: hard -"cookies@npm:~0.9.0": - version: 0.9.1 - resolution: "cookies@npm:0.9.1" +"cookies@npm:~0.8.0": + version: 0.8.0 + resolution: "cookies@npm:0.8.0" dependencies: depd: "npm:~2.0.0" keygrip: "npm:~1.1.0" - checksum: 10/4816461a38d907b20f3fb7a2bc4741fe580e7a195f3e248ef7025cb3be56a07638a0f4e72553a5f535554ca30172c8a3245c63ac72c9737cec034e9a47773392 + checksum: 10/5da4d72ba81c2740511751ac8ea9506e10e2366b9ad3360333581e4667fd8d063d02c5be0bef16177de3e366b8128ed2b72921e2952c79cbca084d177e529bba languageName: node linkType: hard @@ -7011,11 +7041,11 @@ __metadata: linkType: hard "core-js-compat@npm:^3.31.0, core-js-compat@npm:^3.34.0": - version: 3.36.0 - resolution: "core-js-compat@npm:3.36.0" + version: 3.35.1 + resolution: "core-js-compat@npm:3.35.1" dependencies: - browserslist: "npm:^4.22.3" - checksum: 10/633c49a254fe48981057e33651e5a74a0a14f14731aa5afed5d2e61fbe3c5cbc116ffd4feaa158c683c40d6dc4fd2e6aa0ebe12c45d157cfa571309d08400c98 + browserslist: "npm:^4.22.2" + checksum: 10/9a153c66591e23703e182b258ec6bdaff0a7c578dc5f9ac152fdfef2d09e8ec277f192e28d4634a8b576c8e1a6d3b1ac76ff6b8776e72b71b334e609e177a05e languageName: node linkType: hard @@ -7073,9 +7103,9 @@ __metadata: linkType: hard "csstype@npm:^3.1.0": - version: 3.1.3 - resolution: "csstype@npm:3.1.3" - checksum: 10/f593cce41ff5ade23f44e77521e3a1bcc2c64107041e1bf6c3c32adc5187d0d60983292fda326154d20b01079e24931aa5b08e4467cc488b60bb1e7f6d478ade + version: 3.1.2 + resolution: "csstype@npm:3.1.2" + checksum: 10/1f39c541e9acd9562996d88bc9fb62d1cb234786ef11ed275567d4b2bd82e1ceacde25debc8de3d3b4871ae02c2933fa02614004c97190711caebad6347debc2 languageName: node linkType: hard @@ -7123,7 +7153,7 @@ __metadata: languageName: node linkType: hard -"debug@npm:4, debug@npm:4.3.4, debug@npm:^4.1.0, debug@npm:^4.1.1, debug@npm:^4.3.1, debug@npm:^4.3.2, debug@npm:^4.3.4": +"debug@npm:4, debug@npm:4.3.4, debug@npm:^4.1.0, debug@npm:^4.1.1, debug@npm:^4.3.1, debug@npm:^4.3.2, debug@npm:^4.3.3, debug@npm:^4.3.4": version: 4.3.4 resolution: "debug@npm:4.3.4" dependencies: @@ -7413,9 +7443,9 @@ __metadata: linkType: hard "diff@npm:^5.1.0": - version: 5.2.0 - resolution: "diff@npm:5.2.0" - checksum: 10/01b7b440f83a997350a988e9d2f558366c0f90f15be19f4aa7f1bb3109a4e153dfc3b9fbf78e14ea725717017407eeaa2271e3896374a0181e8f52445740846d + version: 5.1.0 + resolution: "diff@npm:5.1.0" + checksum: 10/f4557032a98b2967fe27b1a91dfcf8ebb6b9a24b1afe616b5c2312465100b861e9b8d4da374be535f2d6b967ce2f53826d7f6edc2a0d32b2ab55abc96acc2f9d languageName: node linkType: hard @@ -7640,11 +7670,11 @@ __metadata: linkType: hard "envinfo@npm:^7.7.3": - version: 7.11.1 - resolution: "envinfo@npm:7.11.1" + version: 7.10.0 + resolution: "envinfo@npm:7.10.0" bin: envinfo: dist/cli.js - checksum: 10/5a18ead05954ac1643350170fefce2436a9cb758dc402e36fe4616553ee46469f766fcb6df72379d1741a2e5b55918949b343ff6174502c31c524a5cf75f05cd + checksum: 10/d4db29c5a405081759c57c0e74ffa6adab09b7477ca105587252643394f13ab128ad4c8f755b15334b5f1901cef091acc76c71b695ce0f27853ebf147c882075 languageName: node linkType: hard @@ -7722,13 +7752,6 @@ __metadata: languageName: node linkType: hard -"es-array-method-boxes-properly@npm:^1.0.0": - version: 1.0.0 - resolution: "es-array-method-boxes-properly@npm:1.0.0" - checksum: 10/27a8a21acf20f3f51f69dce8e643f151e380bffe569e95dc933b9ded9fcd89a765ee21b5229c93f9206c93f87395c6b75f80be8ac8c08a7ceb8771e1822ff1fb - languageName: node - linkType: hard - "es-define-property@npm:^1.0.0": version: 1.0.0 resolution: "es-define-property@npm:1.0.0" @@ -7738,7 +7761,7 @@ __metadata: languageName: node linkType: hard -"es-errors@npm:^1.0.0, es-errors@npm:^1.2.1, es-errors@npm:^1.3.0": +"es-errors@npm:^1.2.1, es-errors@npm:^1.3.0": version: 1.3.0 resolution: "es-errors@npm:1.3.0" checksum: 10/96e65d640156f91b707517e8cdc454dd7d47c32833aa3e85d79f24f9eb7ea85f39b63e36216ef0114996581969b59fe609a94e30316b08f5f4df1d44134cf8d5 @@ -7746,9 +7769,9 @@ __metadata: linkType: hard "es-module-lexer@npm:^1.0.0, es-module-lexer@npm:^1.2.1": - version: 1.4.1 - resolution: "es-module-lexer@npm:1.4.1" - checksum: 10/cf453613468c417af6e189b03d9521804033fdd5a229a36fedec28d37ea929fccf6822d42abff1126eb01ba1d2aa2845a48d5d1772c0724f8204464d9d3855f6 + version: 1.3.1 + resolution: "es-module-lexer@npm:1.3.1" + checksum: 10/c6aa137c5f5865fe1d12b4edbe027ff618d3836684cda9e52ae4dec48bfc2599b25db4f1265a12228d4663e21fd0126addfb79f761d513f1a6708c37989137e3 languageName: node linkType: hard @@ -7763,7 +7786,7 @@ __metadata: languageName: node linkType: hard -"es-shim-unscopables@npm:^1.0.0, es-shim-unscopables@npm:^1.0.2": +"es-shim-unscopables@npm:^1.0.0": version: 1.0.2 resolution: "es-shim-unscopables@npm:1.0.2" dependencies: @@ -7829,9 +7852,9 @@ __metadata: linkType: hard "escalade@npm:^3.1.1": - version: 3.1.2 - resolution: "escalade@npm:3.1.2" - checksum: 10/a1e07fea2f15663c30e40b9193d658397846ffe28ce0a3e4da0d8e485fedfeca228ab846aee101a05015829adf39f9934ff45b2a3fca47bed37a29646bd05cd3 + version: 3.1.1 + resolution: "escalade@npm:3.1.1" + checksum: 10/afa618e73362576b63f6ca83c975456621095a1ed42ff068174e3f5cea48afc422814dda548c96e6ebb5333e7265140c7292abcc81bbd6ccb1757d50d3a4e182 languageName: node linkType: hard @@ -8457,15 +8480,15 @@ __metadata: linkType: hard "fast-glob@npm:^3.2.11, fast-glob@npm:^3.2.2, fast-glob@npm:^3.2.9, fast-glob@npm:^3.3.0": - version: 3.3.2 - resolution: "fast-glob@npm:3.3.2" + version: 3.3.1 + resolution: "fast-glob@npm:3.3.1" dependencies: "@nodelib/fs.stat": "npm:^2.0.2" "@nodelib/fs.walk": "npm:^1.2.3" glob-parent: "npm:^5.1.2" merge2: "npm:^1.3.0" micromatch: "npm:^4.0.4" - checksum: 10/222512e9315a0efca1276af9adb2127f02105d7288fa746145bf45e2716383fb79eb983c89601a72a399a56b7c18d38ce70457c5466218c5f13fad957cee16df + checksum: 10/51bcd15472879dfe51d4b01c5b70bbc7652724d39cdd082ba11276dbd7d84db0f6b33757e1938af8b2768a4bf485d9be0c89153beae24ee8331d6dcc7550379f languageName: node linkType: hard @@ -8507,11 +8530,11 @@ __metadata: linkType: hard "fastq@npm:^1.6.0": - version: 1.17.1 - resolution: "fastq@npm:1.17.1" + version: 1.15.0 + resolution: "fastq@npm:1.15.0" dependencies: reusify: "npm:^1.0.4" - checksum: 10/a443180068b527dd7b3a63dc7f2a47ceca2f3e97b9c00a1efe5538757e6cc4056a3526df94308075d7727561baf09ebaa5b67da8dcbddb913a021c5ae69d1f69 + checksum: 10/67c01b1c972e2d5b6fea197a1a39d5d582982aea69ff4c504badac71080d8396d4843b165a9686e907c233048f15a86bbccb0e7f83ba771f6fa24bcde059d0c3 languageName: node linkType: hard @@ -8716,13 +8739,13 @@ __metadata: linkType: hard "flat-cache@npm:^3.0.4": - version: 3.2.0 - resolution: "flat-cache@npm:3.2.0" + version: 3.1.0 + resolution: "flat-cache@npm:3.1.0" dependencies: - flatted: "npm:^3.2.9" + flatted: "npm:^3.2.7" keyv: "npm:^4.5.3" rimraf: "npm:^3.0.2" - checksum: 10/02381c6ece5e9fa5b826c9bbea481d7fd77645d96e4b0b1395238124d581d10e56f17f723d897b6d133970f7a57f0fab9148cbbb67237a0a0ffe794ba60c0c70 + checksum: 10/0367e6dbe0684e4b723d9aeb603d3dd225776638ed64fba6d089dc9b107aa03fb9248f1b9a128f32299a0067d6b8c7640219063b34f84c5318d06211e863a83a languageName: node linkType: hard @@ -8735,7 +8758,7 @@ __metadata: languageName: node linkType: hard -"flatted@npm:^3.2.9": +"flatted@npm:^3.2.7": version: 3.2.9 resolution: "flatted@npm:3.2.9" checksum: 10/dc2b89e46a2ebde487199de5a4fcb79e8c46f984043fea5c41dbf4661eb881fefac1c939b5bdcd8a09d7f960ec364f516970c7ec44e58ff451239c07fd3d419b @@ -8753,12 +8776,12 @@ __metadata: linkType: hard "follow-redirects@npm:^1.0.0": - version: 1.15.5 - resolution: "follow-redirects@npm:1.15.5" + version: 1.15.3 + resolution: "follow-redirects@npm:1.15.3" peerDependenciesMeta: debug: optional: true - checksum: 10/d467f13c1c6aa734599b8b369cd7a625b20081af358f6204ff515f6f4116eb440de9c4e0c49f10798eeb0df26c95dd05d5e0d9ddc5786ab1a8a8abefe92929b4 + checksum: 10/60d98693f4976892f8c654b16ef6d1803887a951898857ab0cdc009570b1c06314ad499505b7a040ac5b98144939f8597766e5e6a6859c0945d157b473aa6f5f languageName: node linkType: hard @@ -8872,9 +8895,9 @@ __metadata: linkType: hard "fs-monkey@npm:^1.0.4": - version: 1.0.5 - resolution: "fs-monkey@npm:1.0.5" - checksum: 10/7fcdf9267006800d61f1722cf9fa92ed8be8b3ed86614f6d43ab6f87a30f13bc784020465e20728ca4ea65ea7377bfcdbde52b54bf8c3cc2f43a6d62270ebf64 + version: 1.0.4 + resolution: "fs-monkey@npm:1.0.4" + checksum: 10/9944223c25e62e176cbb9b0f9e0ee1697a1676419529e948ec013b49156863411a09b45671b56267d3118c867d3a0d5c08225845160a6148861cc16fc1eec79e languageName: node linkType: hard @@ -8965,6 +8988,22 @@ __metadata: languageName: node linkType: hard +"gauge@npm:^4.0.3": + version: 4.0.4 + resolution: "gauge@npm:4.0.4" + dependencies: + aproba: "npm:^1.0.3 || ^2.0.0" + color-support: "npm:^1.1.3" + console-control-strings: "npm:^1.1.0" + has-unicode: "npm:^2.0.1" + signal-exit: "npm:^3.0.7" + string-width: "npm:^4.2.3" + strip-ansi: "npm:^6.0.1" + wide-align: "npm:^1.1.5" + checksum: 10/09535dd53b5ced6a34482b1fa9f3929efdeac02f9858569cde73cef3ed95050e0f3d095706c1689614059898924b7a74aa14042f51381a1ccc4ee5c29d2389c4 + languageName: node + linkType: hard + "gensync@npm:^1.0.0-beta.2": version: 1.0.0-beta.2 resolution: "gensync@npm:1.0.0-beta.2" @@ -9000,7 +9039,7 @@ __metadata: languageName: node linkType: hard -"get-intrinsic@npm:^1.1.3, get-intrinsic@npm:^1.2.1, get-intrinsic@npm:^1.2.2, get-intrinsic@npm:^1.2.3, get-intrinsic@npm:^1.2.4": +"get-intrinsic@npm:^1.0.2, get-intrinsic@npm:^1.1.3, get-intrinsic@npm:^1.2.1, get-intrinsic@npm:^1.2.2, get-intrinsic@npm:^1.2.3, get-intrinsic@npm:^1.2.4": version: 1.2.4 resolution: "get-intrinsic@npm:1.2.4" dependencies: @@ -9130,7 +9169,7 @@ __metadata: languageName: node linkType: hard -"glob@npm:10.3.10, glob@npm:^10.2.2, glob@npm:^10.3.10, glob@npm:^10.3.7": +"glob@npm:10.3.10, glob@npm:^10.2.2, glob@npm:^10.3.7": version: 10.3.10 resolution: "glob@npm:10.3.10" dependencies: @@ -9158,7 +9197,7 @@ __metadata: languageName: node linkType: hard -"glob@npm:^7.1.1, glob@npm:^7.1.3, glob@npm:^7.1.6": +"glob@npm:^7.1.1, glob@npm:^7.1.3, glob@npm:^7.1.4, glob@npm:^7.1.6": version: 7.2.3 resolution: "glob@npm:7.2.3" dependencies: @@ -9214,11 +9253,11 @@ __metadata: linkType: hard "globals@npm:^13.19.0": - version: 13.24.0 - resolution: "globals@npm:13.24.0" + version: 13.22.0 + resolution: "globals@npm:13.22.0" dependencies: type-fest: "npm:^0.20.2" - checksum: 10/62c5b1997d06674fc7191d3e01e324d3eda4d65ac9cc4e78329fa3b5c4fd42a0e1c8722822497a6964eee075255ce21ccf1eec2d83f92ef3f06653af4d0ee28e + checksum: 10/2f05c268a544b9e55a7f76f27248923116e50bcd046371fe6fa0920d9fce8432af8f92f47311986f48a1393f61f009c9345de9ed82b3a902d89245c73d0a4047 languageName: node linkType: hard @@ -9466,6 +9505,13 @@ __metadata: languageName: node linkType: hard +"has-unicode@npm:^2.0.1": + version: 2.0.1 + resolution: "has-unicode@npm:2.0.1" + checksum: 10/041b4293ad6bf391e21c5d85ed03f412506d6623786b801c4ab39e4e6ca54993f13201bceb544d92963f9e0024e6e7fbf0cb1d84c9d6b31cb9c79c8c990d13d8 + languageName: node + linkType: hard + "has-value@npm:^0.3.1": version: 0.3.1 resolution: "has-value@npm:0.3.1" @@ -9590,6 +9636,7 @@ __metadata: "@material/mwc-radio": "npm:0.27.0" "@material/mwc-ripple": "npm:0.27.0" "@material/mwc-select": "npm:0.27.0" + "@material/mwc-snackbar": "npm:0.27.0" "@material/mwc-switch": "npm:0.27.0" "@material/mwc-tab": "npm:0.27.0" "@material/mwc-tab-bar": "npm:0.27.0" @@ -9608,7 +9655,6 @@ __metadata: "@polymer/paper-item": "npm:3.0.1" "@polymer/paper-listbox": "npm:3.0.1" "@polymer/paper-tabs": "npm:3.1.0" - "@polymer/paper-toast": "npm:3.0.1" "@polymer/polymer": "npm:3.5.1" "@rollup/plugin-babel": "npm:6.0.4" "@rollup/plugin-commonjs": "npm:25.0.7" @@ -9904,13 +9950,14 @@ __metadata: languageName: node linkType: hard -"http-proxy-agent@npm:^7.0.0": - version: 7.0.2 - resolution: "http-proxy-agent@npm:7.0.2" +"http-proxy-agent@npm:^5.0.0": + version: 5.0.0 + resolution: "http-proxy-agent@npm:5.0.0" dependencies: - agent-base: "npm:^7.1.0" - debug: "npm:^4.3.4" - checksum: 10/d062acfa0cb82beeb558f1043c6ba770ea892b5fb7b28654dbc70ea2aeea55226dd34c02a294f6c1ca179a5aa483c4ea641846821b182edbd9cc5d89b54c6848 + "@tootallnate/once": "npm:2" + agent-base: "npm:6" + debug: "npm:4" + checksum: 10/5ee19423bc3e0fd5f23ce991b0755699ad2a46a440ce9cec99e8126bb98448ad3479d2c0ea54be5519db5b19a4ffaa69616bac01540db18506dd4dac3dc418f0 languageName: node linkType: hard @@ -9943,13 +9990,13 @@ __metadata: languageName: node linkType: hard -"https-proxy-agent@npm:^7.0.1": - version: 7.0.4 - resolution: "https-proxy-agent@npm:7.0.4" +"https-proxy-agent@npm:^5.0.0": + version: 5.0.1 + resolution: "https-proxy-agent@npm:5.0.1" dependencies: - agent-base: "npm:^7.0.2" + agent-base: "npm:6" debug: "npm:4" - checksum: 10/405fe582bba461bfe5c7e2f8d752b384036854488b828ae6df6a587c654299cbb2c50df38c4b6ab303502c3c5e029a793fbaac965d1e86ee0be03faceb554d63 + checksum: 10/f0dce7bdcac5e8eaa0be3c7368bb8836ed010fb5b6349ffb412b172a203efe8f807d9a6681319105ea1b6901e1972c7b5ea899672a7b9aad58309f766dcbe0df languageName: node linkType: hard @@ -9967,6 +10014,15 @@ __metadata: languageName: node linkType: hard +"humanize-ms@npm:^1.2.1": + version: 1.2.1 + resolution: "humanize-ms@npm:1.2.1" + dependencies: + ms: "npm:^2.0.0" + checksum: 10/9c7a74a2827f9294c009266c82031030eae811ca87b0da3dceb8d6071b9bde22c9f3daef0469c3c533cc67a97d8a167cd9fc0389350e5f415f61a79b171ded16 + languageName: node + linkType: hard + "husky@npm:9.0.11": version: 9.0.11 resolution: "husky@npm:9.0.11" @@ -10016,9 +10072,9 @@ __metadata: linkType: hard "ignore@npm:^5.2.0, ignore@npm:^5.2.4": - version: 5.3.1 - resolution: "ignore@npm:5.3.1" - checksum: 10/0a884c2fbc8c316f0b9f92beaf84464253b73230a4d4d286697be45fca081199191ca33e1c2e82d9e5f851f5e9a48a78e25a35c951e7eb41e59f150db3530065 + version: 5.2.4 + resolution: "ignore@npm:5.2.4" + checksum: 10/4f7caf5d2005da21a382d4bd1d2aa741a3bed51de185c8562dd7f899a81a620ac4fd0619b06f7029a38ae79e4e4c134399db3bd0192c703c3ef54bb82df3086c languageName: node linkType: hard @@ -10173,20 +10229,17 @@ __metadata: languageName: node linkType: hard -"ip-address@npm:^9.0.5": - version: 9.0.5 - resolution: "ip-address@npm:9.0.5" - dependencies: - jsbn: "npm:1.1.0" - sprintf-js: "npm:^1.1.3" - checksum: 10/1ed81e06721af012306329b31f532b5e24e00cb537be18ddc905a84f19fe8f83a09a1699862bf3a1ec4b9dea93c55a3fa5faf8b5ea380431469df540f38b092c +"ip@npm:^1.1.5": + version: 1.1.8 + resolution: "ip@npm:1.1.8" + checksum: 10/52975ebf84a090162d561fc6948fbc4c53775a8054c05371f09cfcb40e30a53aa225b4efb624f630cff5af2dd8124c82dd68e4df065dc1d1ca91d04e850e9cde languageName: node linkType: hard -"ip@npm:^1.1.5": - version: 1.1.9 - resolution: "ip@npm:1.1.9" - checksum: 10/29261559b806f64929ada21e6d7e3bf4e67f2b43a4cb67500fdb72cead2e655ce97451a2e325eca3f404081c634ff5c3a68472814744b7f2148ddffc0fdfe66c +"ip@npm:^2.0.0": + version: 2.0.0 + resolution: "ip@npm:2.0.0" + checksum: 10/1270b11e534a466fb4cf4426cbcc3a907c429389f7f4e4e3b288b42823562e88d6a509ceda8141a507de147ca506141f745005c0aa144569d94cf24a54eb52bc languageName: node linkType: hard @@ -10214,12 +10267,21 @@ __metadata: languageName: node linkType: hard -"is-accessor-descriptor@npm:^1.0.1": - version: 1.0.1 - resolution: "is-accessor-descriptor@npm:1.0.1" +"is-accessor-descriptor@npm:^0.1.6": + version: 0.1.6 + resolution: "is-accessor-descriptor@npm:0.1.6" dependencies: - hasown: "npm:^2.0.0" - checksum: 10/df0d1da1a320e57c594e6f9b52dab8a6bece6dc90e51689d05ac8e5247164aa3eb3e9c66b37027bebfc0ea5fcce6d9503dbc41dccd82f4b57add79a307735365 + kind-of: "npm:^3.0.2" + checksum: 10/3d629a086a9585bc16a83a8e8a3416f400023301855cafb7ccc9a1d63145b7480f0ad28877dcc2cce09492c4ec1c39ef4c071996f24ee6ac626be4217b8ffc8a + languageName: node + linkType: hard + +"is-accessor-descriptor@npm:^1.0.0": + version: 1.0.0 + resolution: "is-accessor-descriptor@npm:1.0.0" + dependencies: + kind-of: "npm:^6.0.0" + checksum: 10/8e475968e9b22f9849343c25854fa24492dbe8ba0dea1a818978f9f1b887339190b022c9300d08c47fe36f1b913d70ce8cbaca00369c55a56705fdb7caed37fe languageName: node linkType: hard @@ -10309,12 +10371,21 @@ __metadata: languageName: node linkType: hard -"is-data-descriptor@npm:^1.0.1": - version: 1.0.1 - resolution: "is-data-descriptor@npm:1.0.1" +"is-data-descriptor@npm:^0.1.4": + version: 0.1.4 + resolution: "is-data-descriptor@npm:0.1.4" dependencies: - hasown: "npm:^2.0.0" - checksum: 10/49b36e903b31623b0c5b416e182e366810ef97a3a19ab0e6cd501eb5599112680b7d9e768b07a84fb52aa2510a92b3eb51a3e18ce8d5f7978a49f4b50e6ec6dd + kind-of: "npm:^3.0.2" + checksum: 10/5c622e078ba933a78338ae398a3d1fc5c23332b395312daf4f74bab4afb10d061cea74821add726cb4db8b946ba36217ee71a24fe71dd5bca4632edb7f6aad87 + languageName: node + linkType: hard + +"is-data-descriptor@npm:^1.0.0": + version: 1.0.0 + resolution: "is-data-descriptor@npm:1.0.0" + dependencies: + kind-of: "npm:^6.0.0" + checksum: 10/b8b1f13a535800a9f35caba2743b2cfd1e76312c0f94248c333d3b724d6ac6e07f06011e8b00eb2442f27dfc8fb71faf3dd52ced6bee41bb836be3df5d7811ee languageName: node linkType: hard @@ -10328,22 +10399,24 @@ __metadata: linkType: hard "is-descriptor@npm:^0.1.0": - version: 0.1.7 - resolution: "is-descriptor@npm:0.1.7" + version: 0.1.6 + resolution: "is-descriptor@npm:0.1.6" dependencies: - is-accessor-descriptor: "npm:^1.0.1" - is-data-descriptor: "npm:^1.0.1" - checksum: 10/38783182c3d83f839a9fa3e87b4d6de11fa9639833ed98993ea51aea2296b2da155121956e148695a738228871d1057c5f963d0b1c857bb8a4a38d8dd9ceeb56 + is-accessor-descriptor: "npm:^0.1.6" + is-data-descriptor: "npm:^0.1.4" + kind-of: "npm:^5.0.0" + checksum: 10/b946ba842187c2784a5a0d67bd0e0271b14678f4fdce7d2295dfda9201f3408f55f56e11e5e66bfa4d2b9d45655b6105ad872ad7d37fb63f582587464fd414d7 languageName: node linkType: hard "is-descriptor@npm:^1.0.0, is-descriptor@npm:^1.0.2": - version: 1.0.3 - resolution: "is-descriptor@npm:1.0.3" + version: 1.0.2 + resolution: "is-descriptor@npm:1.0.2" dependencies: - is-accessor-descriptor: "npm:^1.0.1" - is-data-descriptor: "npm:^1.0.1" - checksum: 10/b940d04d93adaffb749b3ca7f7f6d73dd3c5582b674f372513ecb5511a8a3f3ff4a24f4c1161cb10e48fe4886f9e84c09fa71785def27905ca8df1197e563dc6 + is-accessor-descriptor: "npm:^1.0.0" + is-data-descriptor: "npm:^1.0.0" + kind-of: "npm:^6.0.2" + checksum: 10/e68059b333db331d5ea68cb367ce12fc6810853ced0e2221e6747143bbdf223dee73ebe8f331bafe04e34fdbe3da584b6af3335e82eabfaa33d5026efa33ca34 languageName: node linkType: hard @@ -10755,6 +10828,13 @@ __metadata: languageName: node linkType: hard +"isarray@npm:0.0.1": + version: 0.0.1 + resolution: "isarray@npm:0.0.1" + checksum: 10/49191f1425681df4a18c2f0f93db3adb85573bcdd6a4482539d98eac9e705d8961317b01175627e860516a2fc45f8f9302db26e5a380a97a520e272e2a40a8d4 + languageName: node + linkType: hard + "isarray@npm:1.0.0, isarray@npm:~1.0.0": version: 1.0.0 resolution: "isarray@npm:1.0.0" @@ -10770,9 +10850,9 @@ __metadata: linkType: hard "isbinaryfile@npm:^5.0.0": - version: 5.0.2 - resolution: "isbinaryfile@npm:5.0.2" - checksum: 10/515d7c963b35c2c443457d18c9152d1f655f3a0e2dceb548448e482145c1897e57a92fc024dece7de98c85c2909f5528e34e3d720c307887529cd689d7a7cd36 + version: 5.0.0 + resolution: "isbinaryfile@npm:5.0.0" + checksum: 10/511bb5ce54c903e9881ca46fe7fe06759b29d9d01d6929f3c46cb95a4bf369320d9de858943d5bf4ac446a442b53be095b325b1deebca0e67ccd9f466c53ef74 languageName: node linkType: hard @@ -10783,13 +10863,6 @@ __metadata: languageName: node linkType: hard -"isexe@npm:^3.1.1": - version: 3.1.1 - resolution: "isexe@npm:3.1.1" - checksum: 10/7fe1931ee4e88eb5aa524cd3ceb8c882537bc3a81b02e438b240e47012eef49c86904d0f0e593ea7c3a9996d18d0f1f3be8d3eaa92333977b0c3a9d353d5563e - languageName: node - linkType: hard - "isobject@npm:^2.0.0": version: 2.1.0 resolution: "isobject@npm:2.1.0" @@ -10887,13 +10960,6 @@ __metadata: languageName: node linkType: hard -"jsbn@npm:1.1.0": - version: 1.1.0 - resolution: "jsbn@npm:1.1.0" - checksum: 10/bebe7ae829bbd586ce8cbe83501dd8cb8c282c8902a8aeeed0a073a89dc37e8103b1244f3c6acd60278bcbfe12d93a3f83c9ac396868a3b3bbc3c5e5e3b648ef - languageName: node - linkType: hard - "jsesc@npm:^2.5.1": version: 2.5.2 resolution: "jsesc@npm:2.5.2" @@ -11013,10 +11079,10 @@ __metadata: languageName: node linkType: hard -"just-extend@npm:^6.2.0": - version: 6.2.0 - resolution: "just-extend@npm:6.2.0" - checksum: 10/1f487b074b9e5773befdd44dc5d1b446f01f24f7d4f1f255d51c0ef7f686e8eb5f95d983b792b9ca5c8b10cd7e60a924d64103725759eddbd7f18bcb22743f92 +"just-extend@npm:^4.0.2": + version: 4.2.1 + resolution: "just-extend@npm:4.2.1" + checksum: 10/375389c0847d56300873fa622fbc5c5e208933e372bbedb39c82f583299cdad4fe9c4773bc35fcd9c42cd85744f07474ca4163aa0f9125dd5be37bc09075eb49 languageName: node linkType: hard @@ -11030,11 +11096,11 @@ __metadata: linkType: hard "keyv@npm:^4.5.3": - version: 4.5.4 - resolution: "keyv@npm:4.5.4" + version: 4.5.3 + resolution: "keyv@npm:4.5.3" dependencies: json-buffer: "npm:3.0.1" - checksum: 10/167eb6ef64cc84b6fa0780ee50c9de456b422a1e18802209234f7c2cf7eae648c7741f32e50d7e24ccb22b24c13154070b01563d642755b156c357431a191e75 + checksum: 10/2c96e345ecee2c7bf8876b368190b0067308b8da080c1462486fbe71a5b863242c350f1507ddad8f373c5d886b302c42f491de4d3be725071c6743a2f1188ff2 languageName: node linkType: hard @@ -11063,14 +11129,14 @@ __metadata: languageName: node linkType: hard -"kind-of@npm:^5.0.2": +"kind-of@npm:^5.0.0, kind-of@npm:^5.0.2": version: 5.1.0 resolution: "kind-of@npm:5.1.0" checksum: 10/acf7cc73881f27629f700a80de77ff7fe4abc9430eac7ddb09117f75126e578ee8d7e44c4dacb6a9e802d5d881abf007ee6af3cfbe55f8b5cf0a7fdc49a02aa3 languageName: node linkType: hard -"kind-of@npm:^6.0.2": +"kind-of@npm:^6.0.0, kind-of@npm:^6.0.2": version: 6.0.3 resolution: "kind-of@npm:6.0.3" checksum: 10/5873d303fb36aad875b7538798867da2ae5c9e328d67194b0162a3659a627d22f742fc9c4ae95cd1704132a24b00cae5041fc00c0f6ef937dc17080dc4dbb962 @@ -11125,14 +11191,14 @@ __metadata: linkType: hard "koa@npm:^2.13.0": - version: 2.15.0 - resolution: "koa@npm:2.15.0" + version: 2.14.2 + resolution: "koa@npm:2.14.2" dependencies: accepts: "npm:^1.3.5" cache-content-type: "npm:^1.0.0" content-disposition: "npm:~0.5.2" content-type: "npm:^1.0.4" - cookies: "npm:~0.9.0" + cookies: "npm:~0.8.0" debug: "npm:^4.3.2" delegates: "npm:^1.0.0" depd: "npm:^2.0.0" @@ -11151,7 +11217,7 @@ __metadata: statuses: "npm:^1.5.0" type-is: "npm:^1.6.16" vary: "npm:^1.1.2" - checksum: 10/8063140a80f274f5075880cb4b19bdc7e7ce34a590fc4a7b6ae9c6876f93cfe099276769767419da5d74c1a74ead63437ecc90e9bc23edce9236656743d27350 + checksum: 10/be3592ad2ed61068aaf19f4957de07602c4141cb33e049727d2453010d90cb9f4756c87103c9b44e24cf31f061116f4479b0a4ce7638c96fd64652f559ad5b7b languageName: node linkType: hard @@ -11576,13 +11642,6 @@ __metadata: languageName: node linkType: hard -"lru-cache@npm:^10.0.1, lru-cache@npm:^9.1.1 || ^10.0.0": - version: 10.2.0 - resolution: "lru-cache@npm:10.2.0" - checksum: 10/502ec42c3309c0eae1ce41afca471f831c278566d45a5273a0c51102dee31e0e250a62fa9029c3370988df33a14188a38e682c16143b794de78668de3643e302 - languageName: node - linkType: hard - "lru-cache@npm:^5.1.1": version: 5.1.1 resolution: "lru-cache@npm:5.1.1" @@ -11601,6 +11660,20 @@ __metadata: languageName: node linkType: hard +"lru-cache@npm:^7.7.1": + version: 7.18.3 + resolution: "lru-cache@npm:7.18.3" + checksum: 10/6029ca5aba3aacb554e919d7ef804fffd4adfc4c83db00fac8248c7c78811fb6d4b6f70f7fd9d55032b3823446546a007edaa66ad1f2377ae833bd983fac5d98 + languageName: node + linkType: hard + +"lru-cache@npm:^9.1.1 || ^10.0.0": + version: 10.0.1 + resolution: "lru-cache@npm:10.0.1" + checksum: 10/5bb91a97a342a41fd049c3494b44d9e21a7d4843f9284d0a0b26f00bb0e436f1f627d0641c78f88be16b86b4231546c5ee4f284733fb530c7960f0bcd7579026 + languageName: node + linkType: hard + "luxon@npm:3.4.4": version: 3.4.4 resolution: "luxon@npm:3.4.4" @@ -11626,22 +11699,26 @@ __metadata: languageName: node linkType: hard -"make-fetch-happen@npm:^13.0.0": - version: 13.0.0 - resolution: "make-fetch-happen@npm:13.0.0" +"make-fetch-happen@npm:^11.0.3": + version: 11.1.1 + resolution: "make-fetch-happen@npm:11.1.1" dependencies: - "@npmcli/agent": "npm:^2.0.0" - cacache: "npm:^18.0.0" + agentkeepalive: "npm:^4.2.1" + cacache: "npm:^17.0.0" http-cache-semantics: "npm:^4.1.1" + http-proxy-agent: "npm:^5.0.0" + https-proxy-agent: "npm:^5.0.0" is-lambda: "npm:^1.0.1" - minipass: "npm:^7.0.2" + lru-cache: "npm:^7.7.1" + minipass: "npm:^5.0.0" minipass-fetch: "npm:^3.0.0" minipass-flush: "npm:^1.0.5" minipass-pipeline: "npm:^1.2.4" negotiator: "npm:^0.6.3" promise-retry: "npm:^2.0.1" + socks-proxy-agent: "npm:^7.0.0" ssri: "npm:^10.0.0" - checksum: 10/ded5a91a02b76381b06a4ec4d5c1d23ebbde15d402b3c3e4533b371dac7e2f7ca071ae71ae6dae72aa261182557b7b1b3fd3a705b39252dc17f74fa509d3e76f + checksum: 10/b4b442cfaaec81db159f752a5f2e3ee3d7aa682782868fa399200824ec6298502e01bdc456e443dc219bcd5546c8e4471644d54109c8599841dc961d17a805fa languageName: node linkType: hard @@ -11919,12 +11996,12 @@ __metadata: languageName: node linkType: hard -"minipass-collect@npm:^2.0.1": - version: 2.0.1 - resolution: "minipass-collect@npm:2.0.1" +"minipass-collect@npm:^1.0.2": + version: 1.0.2 + resolution: "minipass-collect@npm:1.0.2" dependencies: - minipass: "npm:^7.0.3" - checksum: 10/b251bceea62090f67a6cced7a446a36f4cd61ee2d5cea9aee7fff79ba8030e416327a1c5aa2908dc22629d06214b46d88fdab8c51ac76bacbf5703851b5ad342 + minipass: "npm:^3.0.0" + checksum: 10/14df761028f3e47293aee72888f2657695ec66bd7d09cae7ad558da30415fdc4752bbfee66287dcc6fd5e6a2fa3466d6c484dc1cbd986525d9393b9523d97f10 languageName: node linkType: hard @@ -11993,10 +12070,10 @@ __metadata: languageName: node linkType: hard -"minipass@npm:^5.0.0 || ^6.0.2 || ^7.0.0, minipass@npm:^7.0.2, minipass@npm:^7.0.3": - version: 7.0.4 - resolution: "minipass@npm:7.0.4" - checksum: 10/e864bd02ceb5e0707696d58f7ce3a0b89233f0d686ef0d447a66db705c0846a8dc6f34865cd85256c1472ff623665f616b90b8ff58058b2ad996c5de747d2d18 +"minipass@npm:^5.0.0 || ^6.0.2 || ^7.0.0, minipass@npm:^7.0.3": + version: 7.0.3 + resolution: "minipass@npm:7.0.3" + checksum: 10/04d72c8a437de54a024f3758ff17c0226efb532ef37dbdaca1ea6039c7b9b1704e612abbd2e3a0d2c825c64eb0a9ab266c843baa71d18ad1a279baecee28ed97 languageName: node linkType: hard @@ -12085,7 +12162,7 @@ __metadata: languageName: node linkType: hard -"ms@npm:2.1.3, ms@npm:^2.1.1": +"ms@npm:2.1.3, ms@npm:^2.0.0, ms@npm:^2.1.1": version: 2.1.3 resolution: "ms@npm:2.1.3" checksum: 10/aa92de608021b242401676e35cfa5aa42dd70cbdc082b916da7fb925c542173e36bce97ea3e804923fe92c0ad991434e4a38327e15a1b5b5f945d66df615ae6d @@ -12127,12 +12204,12 @@ __metadata: languageName: node linkType: hard -"nanoid@npm:^3.3.7": - version: 3.3.7 - resolution: "nanoid@npm:3.3.7" +"nanoid@npm:^3.3.6": + version: 3.3.6 + resolution: "nanoid@npm:3.3.6" bin: nanoid: bin/nanoid.cjs - checksum: 10/ac1eb60f615b272bccb0e2b9cd933720dad30bf9708424f691b8113826bb91aca7e9d14ef5d9415a6ba15c266b37817256f58d8ce980c82b0ba3185352565679 + checksum: 10/67235c39d1bc05851383dadde5cf77ae1c90c2a1d189e845c7f20f646f0488d875ad5f5226bbba072a88cebbb085a3f784a6673117daf785bdf614a852550362 languageName: node linkType: hard @@ -12184,15 +12261,15 @@ __metadata: linkType: hard "nise@npm:^5.1.5": - version: 5.1.9 - resolution: "nise@npm:5.1.9" + version: 5.1.5 + resolution: "nise@npm:5.1.5" dependencies: - "@sinonjs/commons": "npm:^3.0.0" - "@sinonjs/fake-timers": "npm:^11.2.2" - "@sinonjs/text-encoding": "npm:^0.7.2" - just-extend: "npm:^6.2.0" - path-to-regexp: "npm:^6.2.1" - checksum: 10/971caf7638d42a0e106eadd63f05adac1217f864b0a7e4519546aea82a0dbfac68586e7ff430704d54a01ff5dbf6cad58f5f67c067e21112a7deacd7789c2172 + "@sinonjs/commons": "npm:^2.0.0" + "@sinonjs/fake-timers": "npm:^10.0.2" + "@sinonjs/text-encoding": "npm:^0.7.1" + just-extend: "npm:^4.0.2" + path-to-regexp: "npm:^1.7.0" + checksum: 10/c6afe82b919a2c1985916d5bb3a738a7b2cfb017a6ab9479ec1ede62343051b40da88a1321517bb5d912c13e08b8d9ce9cdef9583edeb44d640af7273c35ebf2 languageName: node linkType: hard @@ -12214,22 +12291,23 @@ __metadata: linkType: hard "node-gyp@npm:latest": - version: 10.0.1 - resolution: "node-gyp@npm:10.0.1" + version: 9.4.0 + resolution: "node-gyp@npm:9.4.0" dependencies: env-paths: "npm:^2.2.0" exponential-backoff: "npm:^3.1.1" - glob: "npm:^10.3.10" + glob: "npm:^7.1.4" graceful-fs: "npm:^4.2.6" - make-fetch-happen: "npm:^13.0.0" - nopt: "npm:^7.0.0" - proc-log: "npm:^3.0.0" + make-fetch-happen: "npm:^11.0.3" + nopt: "npm:^6.0.0" + npmlog: "npm:^6.0.0" + rimraf: "npm:^3.0.2" semver: "npm:^7.3.5" tar: "npm:^6.1.2" - which: "npm:^4.0.0" + which: "npm:^2.0.2" bin: node-gyp: bin/node-gyp.js - checksum: 10/578cf0c821f258ce4b6ebce4461eca4c991a4df2dee163c0624f2fe09c7d6d37240be4942285a0048d307230248ee0b18382d6623b9a0136ce9533486deddfa8 + checksum: 10/458317127c63877365f227b18ef2362b013b7f8440b35ae722935e61b31e6b84ec0e3625ab07f90679e2f41a1d5a7df6c4049fdf8e7b3c81fcf22775147b47ac languageName: node linkType: hard @@ -12269,14 +12347,14 @@ __metadata: languageName: node linkType: hard -"nopt@npm:^7.0.0": - version: 7.2.0 - resolution: "nopt@npm:7.2.0" +"nopt@npm:^6.0.0": + version: 6.0.0 + resolution: "nopt@npm:6.0.0" dependencies: - abbrev: "npm:^2.0.0" + abbrev: "npm:^1.0.0" bin: nopt: bin/nopt.js - checksum: 10/1e7489f17cbda452c8acaf596a8defb4ae477d2a9953b76eb96f4ec3f62c6b421cd5174eaa742f88279871fde9586d8a1d38fb3f53fa0c405585453be31dff4c + checksum: 10/3c1128e07cd0241ae66d6e6a472170baa9f3e84dd4203950ba8df5bafac4efa2166ce917a57ef02b01ba7c40d18b2cc64b29b225fd3640791fe07b24f0b33a32 languageName: node linkType: hard @@ -12336,11 +12414,23 @@ __metadata: linkType: hard "npm-run-path@npm:^5.1.0": - version: 5.2.0 - resolution: "npm-run-path@npm:5.2.0" + version: 5.1.0 + resolution: "npm-run-path@npm:5.1.0" dependencies: path-key: "npm:^4.0.0" - checksum: 10/c5325e016014e715689c4014f7e0be16cc4cbf529f32a1723e511bc4689b5f823b704d2bca61ac152ce2bda65e0205dc8b3ba0ec0f5e4c3e162d302f6f5b9efb + checksum: 10/dc184eb5ec239d6a2b990b43236845332ef12f4e0beaa9701de724aa797fe40b6bbd0157fb7639d24d3ab13f5d5cf22d223a19c6300846b8126f335f788bee66 + languageName: node + linkType: hard + +"npmlog@npm:^6.0.0": + version: 6.0.2 + resolution: "npmlog@npm:6.0.2" + dependencies: + are-we-there-yet: "npm:^3.0.0" + console-control-strings: "npm:^1.1.0" + gauge: "npm:^4.0.3" + set-blocking: "npm:^2.0.0" + checksum: 10/82b123677e62deb9e7472e27b92386c09e6e254ee6c8bcd720b3011013e4168bc7088e984f4fbd53cb6e12f8b4690e23e4fa6132689313e0d0dc4feea45489bb languageName: node linkType: hard @@ -12369,7 +12459,7 @@ __metadata: languageName: node linkType: hard -"object-inspect@npm:^1.13.1": +"object-inspect@npm:^1.13.1, object-inspect@npm:^1.9.0": version: 1.13.1 resolution: "object-inspect@npm:1.13.1" checksum: 10/92f4989ed83422d56431bc39656d4c780348eb15d397ce352ade6b7fec08f973b53744bd41b94af021901e61acaf78fcc19e65bf464ecc0df958586a672700f0 @@ -12439,15 +12529,14 @@ __metadata: linkType: hard "object.groupby@npm:^1.0.1": - version: 1.0.2 - resolution: "object.groupby@npm:1.0.2" + version: 1.0.1 + resolution: "object.groupby@npm:1.0.1" dependencies: - array.prototype.filter: "npm:^1.0.3" - call-bind: "npm:^1.0.5" - define-properties: "npm:^1.2.1" - es-abstract: "npm:^1.22.3" - es-errors: "npm:^1.0.0" - checksum: 10/07c1bea1772c45f7967a63358a683ef7b0bd99cabe0563e6fee3e8acc061cc5984d2f01a46472ebf10b2cb439298c46776b2134550dce457fd7240baaaa4f592 + call-bind: "npm:^1.0.2" + define-properties: "npm:^1.2.0" + es-abstract: "npm:^1.22.1" + get-intrinsic: "npm:^1.2.1" + checksum: 10/b7123d91403f95d63978513b23a6079c30f503311f64035fafc863c291c787f287b58df3b21ef002ce1d0b820958c9009dd5a8ab696e0eca325639d345e41524 languageName: node linkType: hard @@ -12741,12 +12830,12 @@ __metadata: linkType: hard "parse-bmfont-xml@npm:^1.1.4": - version: 1.1.6 - resolution: "parse-bmfont-xml@npm:1.1.6" + version: 1.1.4 + resolution: "parse-bmfont-xml@npm:1.1.4" dependencies: xml-parse-from-string: "npm:^1.0.0" - xml2js: "npm:^0.5.0" - checksum: 10/71a202da289a124db7bb7bee1b2a01b8a38b5ba36f93d6a98cea6fc1d140c16c8bc7bcccff48864ec886da035944d337b04cf70723393c411991af952fc6086b + xml2js: "npm:^0.4.5" + checksum: 10/529d9c65da5e7840723d5382707d5a5177d25616e6ea434b4c474548e6229f1e64d0991bc9b38329762038e885c9097c562343007db78d9e9ca1e9b7157e6d7e languageName: node linkType: hard @@ -12959,10 +13048,12 @@ __metadata: languageName: node linkType: hard -"path-to-regexp@npm:^6.2.1": - version: 6.2.1 - resolution: "path-to-regexp@npm:6.2.1" - checksum: 10/1e266be712d1a08086ee77beab12a1804842ec635dfed44f9ee1ba960a0e01cec8063fb8c92561115cdc0ce73158cdc7766e353ffa039340b4a85b370084c4d4 +"path-to-regexp@npm:^1.7.0": + version: 1.8.0 + resolution: "path-to-regexp@npm:1.8.0" + dependencies: + isarray: "npm:0.0.1" + checksum: 10/45a01690f72919163cf89714e31a285937b14ad54c53734c826363fcf7beba9d9d0f2de802b4986b1264374562d6a3398a2e5289753a764e3a256494f1e52add languageName: node linkType: hard @@ -13147,13 +13238,13 @@ __metadata: linkType: hard "postcss@npm:^8.4.14": - version: 8.4.35 - resolution: "postcss@npm:8.4.35" + version: 8.4.31 + resolution: "postcss@npm:8.4.31" dependencies: - nanoid: "npm:^3.3.7" + nanoid: "npm:^3.3.6" picocolors: "npm:^1.0.0" source-map-js: "npm:^1.0.2" - checksum: 10/93a7ce50cd6188f5f486a9ca98950ad27c19dfed996c45c414fa242944497e4d084a8760d3537f078630226f2bd3c6ab84b813b488740f4432e7c7039cd73a20 + checksum: 10/1a6653e72105907377f9d4f2cd341d8d90e3fde823a5ddea1e2237aaa56933ea07853f0f2758c28892a1d70c53bbaca200eb8b80f8ed55f13093003dbec5afa0 languageName: node linkType: hard @@ -13210,13 +13301,6 @@ __metadata: languageName: node linkType: hard -"proc-log@npm:^3.0.0": - version: 3.0.0 - resolution: "proc-log@npm:3.0.0" - checksum: 10/02b64e1b3919e63df06f836b98d3af002b5cd92655cab18b5746e37374bfb73e03b84fe305454614b34c25b485cc687a9eebdccf0242cda8fda2475dd2c97e02 - languageName: node - linkType: hard - "process-nextick-args@npm:^2.0.0, process-nextick-args@npm:~2.0.0": version: 2.0.1 resolution: "process-nextick-args@npm:2.0.1" @@ -13494,9 +13578,9 @@ __metadata: linkType: hard "regenerator-runtime@npm:^0.14.0": - version: 0.14.1 - resolution: "regenerator-runtime@npm:0.14.1" - checksum: 10/5db3161abb311eef8c45bcf6565f4f378f785900ed3945acf740a9888c792f75b98ecb77f0775f3bf95502ff423529d23e94f41d80c8256e8fa05ed4b07cf471 + version: 0.14.0 + resolution: "regenerator-runtime@npm:0.14.0" + checksum: 10/6c19495baefcf5fbb18a281b56a97f0197b5f219f42e571e80877f095320afac0bdb31dab8f8186858e6126950068c3f17a1226437881e3e70446ea66751897c languageName: node linkType: hard @@ -13725,15 +13809,15 @@ __metadata: linkType: hard "resolve@npm:^1.1.6, resolve@npm:^1.1.7, resolve@npm:^1.10.0, resolve@npm:^1.14.2, resolve@npm:^1.19.0, resolve@npm:^1.20.0, resolve@npm:^1.22.1, resolve@npm:^1.22.4, resolve@npm:^1.4.0": - version: 1.22.8 - resolution: "resolve@npm:1.22.8" + version: 1.22.6 + resolution: "resolve@npm:1.22.6" dependencies: is-core-module: "npm:^2.13.0" path-parse: "npm:^1.0.7" supports-preserve-symlinks-flag: "npm:^1.0.0" bin: resolve: bin/resolve - checksum: 10/c473506ee01eb45cbcfefb68652ae5759e092e6b0fb64547feadf9736a6394f258fbc6f88e00c5ca36d5477fbb65388b272432a3600fa223062e54333c156753 + checksum: 10/b57acf016c94aded442f3c92dda4c4e9370ebe5b337ca2dbada3c022ce7c75cd20d5e31a855f884321c7379d6f2c7e640852024ae83f976e15367a1c4cf14de5 languageName: node linkType: hard @@ -13751,15 +13835,15 @@ __metadata: linkType: hard "resolve@patch:resolve@npm%3A^1.1.6#optional!builtin, resolve@patch:resolve@npm%3A^1.1.7#optional!builtin, resolve@patch:resolve@npm%3A^1.10.0#optional!builtin, resolve@patch:resolve@npm%3A^1.14.2#optional!builtin, resolve@patch:resolve@npm%3A^1.19.0#optional!builtin, resolve@patch:resolve@npm%3A^1.20.0#optional!builtin, resolve@patch:resolve@npm%3A^1.22.1#optional!builtin, resolve@patch:resolve@npm%3A^1.22.4#optional!builtin, resolve@patch:resolve@npm%3A^1.4.0#optional!builtin": - version: 1.22.8 - resolution: "resolve@patch:resolve@npm%3A1.22.8#optional!builtin::version=1.22.8&hash=c3c19d" + version: 1.22.6 + resolution: "resolve@patch:resolve@npm%3A1.22.6#optional!builtin::version=1.22.6&hash=c3c19d" dependencies: is-core-module: "npm:^2.13.0" path-parse: "npm:^1.0.7" supports-preserve-symlinks-flag: "npm:^1.0.0" bin: resolve: bin/resolve - checksum: 10/f345cd37f56a2c0275e3fe062517c650bb673815d885e7507566df589375d165bbbf4bdb6aa95600a9bc55f4744b81f452b5a63f95b9f10a72787dba3c90890a + checksum: 10/d63580488eaffef80d16930ed76ffc786d6f51ac02e5821a8fb54a9c7bef4d355472123abdd36fbc0c68704495e09581f0feba75dc4b0b946818f96ece5c3e2a languageName: node linkType: hard @@ -13815,9 +13899,9 @@ __metadata: linkType: hard "rfdc@npm:^1.3.0": - version: 1.3.1 - resolution: "rfdc@npm:1.3.1" - checksum: 10/44cc6a82e2fe1db13b7d3c54e9ffd0b40ef070cbde69ffbfbb38dab8cee46bd68ba686784b96365ff08d04798bc121c3465663a0c91f2c421c90546c4366f4a6 + version: 1.3.0 + resolution: "rfdc@npm:1.3.0" + checksum: 10/76dedd9700cdf132947fde7ce1a8838c9cbb7f3e8f9188af0aaf97194cce745f42094dd2cf547426934cc83252ee2c0e432b2e0222a4415ab0db32de82665c69 languageName: node linkType: hard @@ -13994,9 +14078,9 @@ __metadata: linkType: hard "sax@npm:>=0.6.0": - version: 1.3.0 - resolution: "sax@npm:1.3.0" - checksum: 10/bb571b31d30ecb0353c2ff5f87b117a03e5fb9eb4c1519141854c1a8fbee0a77ddbe8045f413259e711833aa03da210887df8527d19cdc55f299822dbf4b34de + version: 1.2.4 + resolution: "sax@npm:1.2.4" + checksum: 10/09b79ff6dc09689a24323352117c94593c69db348997b2af0edbd82fa08aba47d778055bf9616b57285bb73d25d790900c044bf631a8f10c8252412e3f3fe5dd languageName: node linkType: hard @@ -14068,13 +14152,13 @@ __metadata: linkType: hard "semver@npm:^7.3.4, semver@npm:^7.3.5, semver@npm:^7.5.4": - version: 7.6.0 - resolution: "semver@npm:7.6.0" + version: 7.5.4 + resolution: "semver@npm:7.5.4" dependencies: lru-cache: "npm:^6.0.0" bin: semver: bin/semver.js - checksum: 10/1b41018df2d8aca5a1db4729985e8e20428c650daea60fcd16e926e9383217d00f574fab92d79612771884a98d2ee2a1973f49d630829a8d54d6570defe62535 + checksum: 10/985dec0d372370229a262c737063860fabd4a1c730662c1ea3200a2f649117761a42184c96df62a0e885e76fbd5dace41087d6c1ac0351b13c0df5d6bcb1b5ac languageName: node linkType: hard @@ -14118,11 +14202,11 @@ __metadata: linkType: hard "serialize-javascript@npm:^6.0.1": - version: 6.0.2 - resolution: "serialize-javascript@npm:6.0.2" + version: 6.0.1 + resolution: "serialize-javascript@npm:6.0.1" dependencies: randombytes: "npm:^2.1.0" - checksum: 10/445a420a6fa2eaee4b70cbd884d538e259ab278200a2ededd73253ada17d5d48e91fb1f4cd224a236ab62ea7ba0a70c6af29fc93b4f3d3078bf7da1c031fde58 + checksum: 10/f756b1ff34b655b2183c64dd6683d28d4d9b9a80284b264cac9fd421c73890491eafd6c5c2bbe93f1f21bf78b572037c5a18d24b044c317ee1c9dc44d22db94c languageName: node linkType: hard @@ -14267,18 +14351,17 @@ __metadata: linkType: hard "side-channel@npm:^1.0.4": - version: 1.0.5 - resolution: "side-channel@npm:1.0.5" + version: 1.0.4 + resolution: "side-channel@npm:1.0.4" dependencies: - call-bind: "npm:^1.0.6" - es-errors: "npm:^1.3.0" - get-intrinsic: "npm:^1.2.4" - object-inspect: "npm:^1.13.1" - checksum: 10/27708b70b5d81bf18dc8cc23f38f1b6c9511691a64abc4aaf17956e67d132c855cf8b46f931e2fc5a6262b29371eb60da7755c1b9f4f862eccea8562b469f8f6 + call-bind: "npm:^1.0.0" + get-intrinsic: "npm:^1.0.2" + object-inspect: "npm:^1.9.0" + checksum: 10/c4998d9fc530b0e75a7fd791ad868fdc42846f072734f9080ff55cc8dc7d3899abcda24fd896aa6648c3ab7021b4bb478073eb4f44dfd55bce9714bc1a7c5d45 languageName: node linkType: hard -"signal-exit@npm:^3.0.2, signal-exit@npm:^3.0.3": +"signal-exit@npm:^3.0.2, signal-exit@npm:^3.0.3, signal-exit@npm:^3.0.7": version: 3.0.7 resolution: "signal-exit@npm:3.0.7" checksum: 10/a2f098f247adc367dffc27845853e9959b9e88b01cb301658cfe4194352d8d2bb32e18467c786a7fe15f1d44b233ea35633d076d5e737870b7139949d1ab6318 @@ -14394,24 +14477,24 @@ __metadata: languageName: node linkType: hard -"socks-proxy-agent@npm:^8.0.1": - version: 8.0.2 - resolution: "socks-proxy-agent@npm:8.0.2" +"socks-proxy-agent@npm:^7.0.0": + version: 7.0.0 + resolution: "socks-proxy-agent@npm:7.0.0" dependencies: - agent-base: "npm:^7.0.2" - debug: "npm:^4.3.4" - socks: "npm:^2.7.1" - checksum: 10/ea727734bd5b2567597aa0eda14149b3b9674bb44df5937bbb9815280c1586994de734d965e61f1dd45661183d7b41f115fb9e432d631287c9063864cfcc2ecc + agent-base: "npm:^6.0.2" + debug: "npm:^4.3.3" + socks: "npm:^2.6.2" + checksum: 10/26c75d9c62a9ed3fd494df60e65e88da442f78e0d4bc19bfd85ac37bd2c67470d6d4bba5202e804561cda6674db52864c9e2a2266775f879bc8d89c1445a5f4c languageName: node linkType: hard -"socks@npm:^2.7.1": - version: 2.8.0 - resolution: "socks@npm:2.8.0" +"socks@npm:^2.6.2": + version: 2.7.1 + resolution: "socks@npm:2.7.1" dependencies: - ip-address: "npm:^9.0.5" + ip: "npm:^2.0.0" smart-buffer: "npm:^4.2.0" - checksum: 10/ed0224ce2c7daaa7690cb87cf53d9703ffc4e983aca221f6f5b46767b232658df49494fd86acd0bf97ada6de05248ea8ea625c2343d48155d8463fc40d4a340f + checksum: 10/5074f7d6a13b3155fa655191df1c7e7a48ce3234b8ccf99afa2ccb56591c195e75e8bb78486f8e9ea8168e95a29573cbaad55b2b5e195160ae4d2ea6811ba833 languageName: node linkType: hard @@ -14535,9 +14618,9 @@ __metadata: linkType: hard "spdx-exceptions@npm:^2.1.0": - version: 2.5.0 - resolution: "spdx-exceptions@npm:2.5.0" - checksum: 10/bb127d6e2532de65b912f7c99fc66097cdea7d64c10d3ec9b5e96524dbbd7d20e01cba818a6ddb2ae75e62bb0c63d5e277a7e555a85cbc8ab40044984fa4ae15 + version: 2.3.0 + resolution: "spdx-exceptions@npm:2.3.0" + checksum: 10/cb69a26fa3b46305637123cd37c85f75610e8c477b6476fa7354eb67c08128d159f1d36715f19be6f9daf4b680337deb8c65acdcae7f2608ba51931540687ac0 languageName: node linkType: hard @@ -14552,9 +14635,9 @@ __metadata: linkType: hard "spdx-license-ids@npm:^3.0.0": - version: 3.0.17 - resolution: "spdx-license-ids@npm:3.0.17" - checksum: 10/8f6c6ae02ebb25b4ca658b8990d9e8a8f8d8a95e1d8b9fd84d87eed80a7dc8f8073d6a8d50b8a0295c0e8399e1f8814f5c00e2985e6bf3731540a16f7241cbf1 + version: 3.0.15 + resolution: "spdx-license-ids@npm:3.0.15" + checksum: 10/61b0faeae89c168d0e8a41125e5210a8f2b2ed36c0157fb413b337ebb2b3aa046f3c31ada92e5f3a38f97bb800886a3179bde45da2f69b7eec5fab3a5454bfe4 languageName: node linkType: hard @@ -14594,13 +14677,6 @@ __metadata: languageName: node linkType: hard -"sprintf-js@npm:^1.1.3": - version: 1.1.3 - resolution: "sprintf-js@npm:1.1.3" - checksum: 10/e7587128c423f7e43cc625fe2f87e6affdf5ca51c1cc468e910d8aaca46bb44a7fbcfa552f787b1d3987f7043aeb4527d1b99559e6621e01b42b3f45e5a24cbb - languageName: node - linkType: hard - "ssri@npm:^10.0.0": version: 10.0.5 resolution: "ssri@npm:10.0.5" @@ -14700,9 +14776,9 @@ __metadata: linkType: hard "stream-shift@npm:^1.0.0": - version: 1.0.3 - resolution: "stream-shift@npm:1.0.3" - checksum: 10/a24c0a3f66a8f9024bd1d579a533a53be283b4475d4e6b4b3211b964031447bdf6532dd1f3c2b0ad66752554391b7c62bd7ca4559193381f766534e723d50242 + version: 1.0.1 + resolution: "stream-shift@npm:1.0.1" + checksum: 10/59b82b44b29ec3699b5519a49b3cedcc6db58c72fb40c04e005525dfdcab1c75c4e0c180b923c380f204bed78211b9bad8faecc7b93dece4d004c3f6ec75737b languageName: node linkType: hard @@ -14722,7 +14798,7 @@ __metadata: languageName: node linkType: hard -"string-width-cjs@npm:string-width@^4.2.0, string-width@npm:^4.1.0, string-width@npm:^4.2.0, string-width@npm:^4.2.3": +"string-width-cjs@npm:string-width@^4.2.0, string-width@npm:^1.0.2 || 2 || 3 || 4, string-width@npm:^4.1.0, string-width@npm:^4.2.0, string-width@npm:^4.2.3": version: 4.2.3 resolution: "string-width@npm:4.2.3" dependencies: @@ -14756,13 +14832,13 @@ __metadata: linkType: hard "string-width@npm:^7.0.0": - version: 7.1.0 - resolution: "string-width@npm:7.1.0" + version: 7.0.0 + resolution: "string-width@npm:7.0.0" dependencies: emoji-regex: "npm:^10.3.0" get-east-asian-width: "npm:^1.0.0" strip-ansi: "npm:^7.1.0" - checksum: 10/a183573fe7209e0d294f661846d33f8caf72aa86d983e5b48a0ed45ab15bcccb02c6f0344b58b571988871105457137b8207855ea536827dbc4a376a0f31bf8f + checksum: 10/bc0de5700a2690895169fce447ec4ed44bc62de80312c2093d5606bfd48319bb88e48a99e97f269dff2bc9577448b91c26b3804c16e7d9b389699795e4655c3b languageName: node linkType: hard @@ -15091,8 +15167,8 @@ __metadata: linkType: hard "terser@npm:^5.0.0, terser@npm:^5.15.1, terser@npm:^5.26.0": - version: 5.27.1 - resolution: "terser@npm:5.27.1" + version: 5.27.0 + resolution: "terser@npm:5.27.0" dependencies: "@jridgewell/source-map": "npm:^0.3.3" acorn: "npm:^8.8.2" @@ -15100,7 +15176,7 @@ __metadata: source-map-support: "npm:~0.5.20" bin: terser: bin/terser - checksum: 10/4b5c8c65548071ae09dc1d9fd64616262876229897eaac9f95cf2e44908a1f4a25d7837c2a38caef1a523cf1cf67d254e74a846e9a854d289c0ad3664d581c3c + checksum: 10/9b2c5cb00747dea5994034ca064fb3cc7efc1be6b79a35247662d51ab43bdbe9cbf002bbf29170b5f3bd068c811d0212e22d94acd2cf0d8562687b96f1bffc9f languageName: node linkType: hard @@ -15306,11 +15382,11 @@ __metadata: linkType: hard "ts-api-utils@npm:^1.0.1": - version: 1.2.1 - resolution: "ts-api-utils@npm:1.2.1" + version: 1.0.3 + resolution: "ts-api-utils@npm:1.0.3" peerDependencies: typescript: ">=4.2.0" - checksum: 10/6d7f60fd01e3885bb334607f22b9cb1002e72da81dad2e672fef1b0d1a2f640b0f0ff5310369401488fac90c7a7f5d39c89fd18789af59c672c9b5aef4cade3e + checksum: 10/1350a5110eb1e534e9a6178f4081fb8a4fcc439749e19f4ad699baec9090fcb90fe532d5e191d91a062dc6e454a14a8d7eb2ad202f57135a30c4a44a3024f039 languageName: node linkType: hard @@ -15545,16 +15621,15 @@ __metadata: linkType: hard "typed-array-byte-offset@npm:^1.0.0": - version: 1.0.1 - resolution: "typed-array-byte-offset@npm:1.0.1" + version: 1.0.0 + resolution: "typed-array-byte-offset@npm:1.0.0" dependencies: - available-typed-arrays: "npm:^1.0.6" - call-bind: "npm:^1.0.7" + available-typed-arrays: "npm:^1.0.5" + call-bind: "npm:^1.0.2" for-each: "npm:^0.3.3" - gopd: "npm:^1.0.1" has-proto: "npm:^1.0.1" - is-typed-array: "npm:^1.1.13" - checksum: 10/b174c0bac20bcd8787d2f5ccd7bd8f5e5a128e060ffe0909ffe27d65e486de50a3552248a307a45e5c9c593fd8ec97f5acdf119c3e13806f11943b7a2ce555be + is-typed-array: "npm:^1.1.10" + checksum: 10/2d81747faae31ca79f6c597dc18e15ae3d5b7e97f7aaebce3b31f46feeb2a6c1d6c92b9a634d901c83731ffb7ec0b74d05c6ff56076f5ae39db0cd19b16a3f92 languageName: node linkType: hard @@ -15681,13 +15756,6 @@ __metadata: languageName: node linkType: hard -"undici-types@npm:~5.26.4": - version: 5.26.5 - resolution: "undici-types@npm:5.26.5" - checksum: 10/0097779d94bc0fd26f0418b3a05472410408877279141ded2bd449167be1aed7ea5b76f756562cb3586a07f251b90799bab22d9019ceba49c037c76445f7cddd - languageName: node - linkType: hard - "unfetch@npm:5.0.0": version: 5.0.0 resolution: "unfetch@npm:5.0.0" @@ -15776,16 +15844,16 @@ __metadata: linkType: hard "universal-user-agent@npm:^6.0.0": - version: 6.0.1 - resolution: "universal-user-agent@npm:6.0.1" - checksum: 10/fdc8e1ae48a05decfc7ded09b62071f571c7fe0bd793d700704c80cea316101d4eac15cc27ed2bb64f4ce166d2684777c3198b9ab16034f547abea0d3aa1c93c + version: 6.0.0 + resolution: "universal-user-agent@npm:6.0.0" + checksum: 10/5092bbc80dd0d583cef0b62c17df0043193b74f425112ea6c1f69bc5eda21eeec7a08d8c4f793a277eb2202ffe9b44bec852fa3faff971234cd209874d1b79ef languageName: node linkType: hard "universalify@npm:^2.0.0": - version: 2.0.1 - resolution: "universalify@npm:2.0.1" - checksum: 10/ecd8469fe0db28e7de9e5289d32bd1b6ba8f7183db34f3bfc4ca53c49891c2d6aa05f3fb3936a81285a905cc509fb641a0c3fc131ec786167eff41236ae32e60 + version: 2.0.0 + resolution: "universalify@npm:2.0.0" + checksum: 10/2406a4edf4a8830aa6813278bab1f953a8e40f2f63a37873ffa9a3bc8f9745d06cc8e88f3572cb899b7e509013f7f6fcc3e37e8a6d914167a5381d8440518c44 languageName: node linkType: hard @@ -16048,9 +16116,9 @@ __metadata: linkType: hard "vscode-languageserver-textdocument@npm:^1.0.1": - version: 1.0.11 - resolution: "vscode-languageserver-textdocument@npm:1.0.11" - checksum: 10/6096d2a85570e819e01ff406de7c88c48211e6874c6fc71df92193aa8b5aadf40591e44f033d634a95d04975d7aad29049d3eccab617ca41c189ae325aadb913 + version: 1.0.10 + resolution: "vscode-languageserver-textdocument@npm:1.0.10" + checksum: 10/4edf7d190fccf1f0b8c2e3fe0e7a783844df22cf5ed66ff1a30854131a012b748b59c3e478a65e9471fbd8b7da18c668e5f0251aed6c9543399cbc5e71afd84b languageName: node linkType: hard @@ -16259,13 +16327,12 @@ __metadata: linkType: hard "webpack-merge@npm:^5.7.3": - version: 5.10.0 - resolution: "webpack-merge@npm:5.10.0" + version: 5.9.0 + resolution: "webpack-merge@npm:5.9.0" dependencies: clone-deep: "npm:^4.0.1" - flat: "npm:^5.0.2" wildcard: "npm:^2.0.0" - checksum: 10/fa46ab200f17d06c7cb49fc37ad91f15769753953c9724adac1061fa305a2a223cb37c3ed25a5f501580c91f11a0800990fe3814c70a77bf1aa5b3fca45a2ac6 + checksum: 10/d23dd1f0bad0b9821bf58443d2d29097d65cd9353046c2d8a6d7b57877ec19cf64be57cc7ef2a371a15cf9264fe6eaf8dea4015dc87487e664ffab2a28329d56 languageName: node linkType: hard @@ -16445,7 +16512,7 @@ __metadata: languageName: node linkType: hard -"which@npm:^2.0.1": +"which@npm:^2.0.1, which@npm:^2.0.2": version: 2.0.2 resolution: "which@npm:2.0.2" dependencies: @@ -16456,17 +16523,6 @@ __metadata: languageName: node linkType: hard -"which@npm:^4.0.0": - version: 4.0.0 - resolution: "which@npm:4.0.0" - dependencies: - isexe: "npm:^3.1.1" - bin: - node-which: bin/which.js - checksum: 10/f17e84c042592c21e23c8195108cff18c64050b9efb8459589116999ea9da6dd1509e6a1bac3aeebefd137be00fabbb61b5c2bc0aa0f8526f32b58ee2f545651 - languageName: node - linkType: hard - "wicg-inert@npm:^3.0.0": version: 3.1.2 resolution: "wicg-inert@npm:3.1.2" @@ -16474,6 +16530,15 @@ __metadata: languageName: node linkType: hard +"wide-align@npm:^1.1.5": + version: 1.1.5 + resolution: "wide-align@npm:1.1.5" + dependencies: + string-width: "npm:^1.0.2 || 2 || 3 || 4" + checksum: 10/d5f8027b9a8255a493a94e4ec1b74a27bff6679d5ffe29316a3215e4712945c84ef73ca4045c7e20ae7d0c72f5f57f296e04a4928e773d4276a2f1222e4c2e99 + languageName: node + linkType: hard + "wildcard@npm:^2.0.0": version: 2.0.1 resolution: "wildcard@npm:2.0.1" @@ -16795,13 +16860,13 @@ __metadata: languageName: node linkType: hard -"xml2js@npm:^0.5.0": - version: 0.5.0 - resolution: "xml2js@npm:0.5.0" +"xml2js@npm:^0.4.5": + version: 0.4.23 + resolution: "xml2js@npm:0.4.23" dependencies: sax: "npm:>=0.6.0" xmlbuilder: "npm:~11.0.0" - checksum: 10/27c4d759214e99be5ec87ee5cb1290add427fa43df509d3b92d10152b3806fd2f7c9609697a18b158ccf2caa01e96af067cdba93196f69ca10c90e4f79a08896 + checksum: 10/52896ef39429f860f32471dd7bb2b89ef25b7e15528e3a4366de0bd5e55a251601565e7814763e70f9e75310c3afe649a42b8826442b74b41eff8a0ae333fccc languageName: node linkType: hard From 8f67ddf968eba518fb7d091bcc5cca6a37b0e98e Mon Sep 17 00:00:00 2001 From: Paul Bottein Date: Wed, 28 Feb 2024 21:51:21 +0100 Subject: [PATCH 082/425] Add allow changing type of empty views (#19912) --- src/panels/lovelace/editor/view-editor/hui-view-editor.ts | 8 ++++++-- src/translations/en.json | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/panels/lovelace/editor/view-editor/hui-view-editor.ts b/src/panels/lovelace/editor/view-editor/hui-view-editor.ts index d0c4f24d53eb..803cdea06364 100644 --- a/src/panels/lovelace/editor/view-editor/hui-view-editor.ts +++ b/src/panels/lovelace/editor/view-editor/hui-view-editor.ts @@ -95,12 +95,16 @@ export class HuiViewEditor extends LitElement { : this._config.type || DEFAULT_VIEW_LAYOUT; } + private get _isEmpty(): boolean { + return !this._config.sections?.length && !this._config.cards?.length; + } + protected render() { if (!this.hass) { return nothing; } - const schema = this._schema(this.hass.localize, this._type, this.isNew); + const schema = this._schema(this.hass.localize, this._type, this._isEmpty); const data = { ...this._config, @@ -165,7 +169,7 @@ export class HuiViewEditor extends LitElement { "ui.panel.lovelace.editor.edit_view.subview_helper" ); case "type": - if (this.isNew) return undefined; + if (this._isEmpty) return undefined; return this._type === "sections" ? this.hass.localize( "ui.panel.lovelace.editor.edit_view.type_helper_others" diff --git a/src/translations/en.json b/src/translations/en.json index 24f63e86a3a2..c8c1b42c79be 100644 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -5112,7 +5112,7 @@ "select_users": "Select which users should see this view in the navigation" }, "type": "View type", - "type_helper_sections": "You can not change your view to use the 'sections' view type, because migration is not supported yet. Start from scratch with a new view if you want to experiment with the 'sections' view.", + "type_helper_sections": "You can not change your view to use the 'sections' view type because migration is not supported yet. Start from scratch with a new view if you want to experiment with the 'sections' view.", "type_helper_others": "You can not change your view to an other type because migration is not supported yet. Start from scratch with a new view if you want to use another view type.", "types": { From a087b4c43eed90a80c317b3132397102ad26f839 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 29 Feb 2024 01:20:20 -0500 Subject: [PATCH 083/425] Bump ip from 1.1.8 to 1.1.9 (#19915) --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 0d07d730169b..a5842edea3b8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10230,9 +10230,9 @@ __metadata: linkType: hard "ip@npm:^1.1.5": - version: 1.1.8 - resolution: "ip@npm:1.1.8" - checksum: 10/52975ebf84a090162d561fc6948fbc4c53775a8054c05371f09cfcb40e30a53aa225b4efb624f630cff5af2dd8124c82dd68e4df065dc1d1ca91d04e850e9cde + version: 1.1.9 + resolution: "ip@npm:1.1.9" + checksum: 10/29261559b806f64929ada21e6d7e3bf4e67f2b43a4cb67500fdb72cead2e655ce97451a2e325eca3f404081c634ff5c3a68472814744b7f2148ddffc0fdfe66c languageName: node linkType: hard From bc445a1e27fa8f8f73a248ed0220e1f793d79e79 Mon Sep 17 00:00:00 2001 From: Simon Lamon <32477463+silamon@users.noreply.github.com> Date: Thu, 29 Feb 2024 13:51:18 +0100 Subject: [PATCH 084/425] Lokalize automation trace area (#19836) * Translate automation trace timeline area * Fix undefined changed_variables * change naming options in triggered_by * Split messages for stopped_by * remove stopped message --- gallery/src/data/traces/basic_trace.ts | 1 + gallery/src/data/traces/motion-light-trace.ts | 1 + .../src/pages/automation/trace-timeline.ts | 1 + gallery/src/pages/automation/trace.ts | 1 + src/components/trace/hat-trace-timeline.ts | 170 +++++++++++++----- src/translations/en.json | 23 +++ 6 files changed, 150 insertions(+), 47 deletions(-) diff --git a/gallery/src/data/traces/basic_trace.ts b/gallery/src/data/traces/basic_trace.ts index 8fbd720e127c..5113d6dd5f7b 100644 --- a/gallery/src/data/traces/basic_trace.ts +++ b/gallery/src/data/traces/basic_trace.ts @@ -17,6 +17,7 @@ export const basicTrace: DemoTrace = { { path: "trigger/0", timestamp: "2021-03-25T04:36:51.223693+00:00", + changed_variables: {}, }, ], "condition/0": [ diff --git a/gallery/src/data/traces/motion-light-trace.ts b/gallery/src/data/traces/motion-light-trace.ts index fa566e5556af..0963a463ee40 100644 --- a/gallery/src/data/traces/motion-light-trace.ts +++ b/gallery/src/data/traces/motion-light-trace.ts @@ -17,6 +17,7 @@ export const motionLightTrace: DemoTrace = { { path: "trigger/0", timestamp: "2021-03-25T04:36:51.223693+00:00", + changed_variables: {}, }, ], "action/0": [ diff --git a/gallery/src/pages/automation/trace-timeline.ts b/gallery/src/pages/automation/trace-timeline.ts index a9a0e1a9d5fd..4f5692b7da0f 100644 --- a/gallery/src/pages/automation/trace-timeline.ts +++ b/gallery/src/pages/automation/trace-timeline.ts @@ -55,6 +55,7 @@ export class DemoAutomationTraceTimeline extends LitElement { super.firstUpdated(changedProps); const hass = provideHass(this); hass.updateTranslations(null, "en"); + hass.updateTranslations("config", "en"); } static get styles() { diff --git a/gallery/src/pages/automation/trace.ts b/gallery/src/pages/automation/trace.ts index 009291551076..4d346095f81b 100644 --- a/gallery/src/pages/automation/trace.ts +++ b/gallery/src/pages/automation/trace.ts @@ -60,6 +60,7 @@ export class DemoAutomationTrace extends LitElement { super.firstUpdated(changedProps); const hass = provideHass(this); hass.updateTranslations(null, "en"); + hass.updateTranslations("config", "en"); } static get styles() { diff --git a/src/components/trace/hat-trace-timeline.ts b/src/components/trace/hat-trace-timeline.ts index 2396c6587950..78eb1ec8e1ce 100644 --- a/src/components/trace/hat-trace-timeline.ts +++ b/src/components/trace/hat-trace-timeline.ts @@ -153,7 +153,7 @@ class LogbookRenderer { const parts: TemplateResult[] = []; - let i; + let i: number; for ( i = 0; @@ -232,7 +232,7 @@ class ActionRenderer { const value = this._getItem(index); if (renderAllIterations) { - let i; + let i: number = 0; value.forEach((item) => { i = this._renderIteration(index, item, actionType); }); @@ -270,7 +270,12 @@ class ActionRenderer { } catch (err: any) { this._renderEntry( path, - `Unable to extract path ${path}. Download trace and report as bug` + this.hass.localize( + "ui.panel.config.automation.trace.messages.path_error", + { + path: path, + } + ) ); return index + 1; } @@ -324,20 +329,22 @@ class ActionRenderer { private _handleTrigger(index: number, triggerStep: TriggerTraceStep): number { this._renderEntry( triggerStep.path, - `${ - triggerStep.changed_variables.trigger.alias - ? `${triggerStep.changed_variables.trigger.alias} triggered` - : "Triggered" - } ${ - triggerStep.path === "trigger" - ? "manually" - : `by the ${this.trace.trigger}` - } at - ${formatDateTimeWithSeconds( - new Date(triggerStep.timestamp), - this.hass.locale, - this.hass.config - )}`, + this.hass.localize( + "ui.panel.config.automation.trace.messages.triggered_by", + { + triggeredBy: triggerStep.changed_variables.trigger?.alias + ? "alias" + : "other", + alias: triggerStep.changed_variables.trigger?.alias, + triggeredPath: triggerStep.path === "trigger" ? "manual" : "trigger", + trigger: this.trace.trigger, + time: formatDateTimeWithSeconds( + new Date(triggerStep.timestamp), + this.hass.locale, + this.hass.config + ), + } + ), mdiCircle ); return index + 1; @@ -367,12 +374,17 @@ class ActionRenderer { this.keys[index] ) as ChooseAction; const disabled = chooseConfig.enabled === false; - const name = chooseConfig.alias || "Choose"; + const name = + chooseConfig.alias || + this.hass.localize("ui.panel.config.automation.trace.messages.choose"); if (defaultExecuted) { this._renderEntry( choosePath, - `${name}: Default action executed`, + this.hass.localize( + "ui.panel.config.automation.trace.messages.default_action_executed", + { name: name } + ), undefined, disabled ); @@ -385,8 +397,17 @@ class ActionRenderer { `${this.keys[index]}/choose/${chooseTrace.result.choice}` ) as ChooseActionChoice | undefined; const choiceName = choiceConfig - ? `${choiceConfig.alias || `Option ${choiceNumeric}`} executed` - : `Error: ${chooseTrace.error}`; + ? `${ + choiceConfig.alias || + this.hass.localize( + "ui.panel.config.automation.trace.messages.option_executed", + { option: choiceNumeric } + ) + }` + : this.hass.localize( + "ui.panel.config.automation.trace.messages.error", + { error: chooseTrace.error } + ); this._renderEntry( choosePath, `${name}: ${choiceName}`, @@ -396,13 +417,16 @@ class ActionRenderer { } else { this._renderEntry( choosePath, - `${name}: No action taken`, + this.hass.localize( + "ui.panel.config.automation.trace.messages.no_action_executed", + { name: name } + ), undefined, disabled ); } - let i; + let i: number; // Skip over conditions for (i = index + 1; i < this.keys.length; i++) { @@ -479,26 +503,38 @@ class ActionRenderer { const ifTrace = this._getItem(index)[0] as IfActionTraceStep; const ifConfig = this._getDataFromPath(this.keys[index]) as IfAction; const disabled = ifConfig.enabled === false; - const name = ifConfig.alias || "If"; + const name = + ifConfig.alias || + this.hass.localize("ui.panel.config.automation.trace.messages.if"); if (ifTrace.result?.choice) { const choiceConfig = this._getDataFromPath( `${this.keys[index]}/${ifTrace.result.choice}/` ) as any; const choiceName = choiceConfig - ? `${choiceConfig.alias || `${ifTrace.result.choice} action executed`}` - : `Error: ${ifTrace.error}`; + ? choiceConfig.alias || + this.hass.localize( + "ui.panel.config.automation.trace.messages.action_executed", + { action: ifTrace.result.choice } + ) + : this.hass.localize( + "ui.panel.config.automation.trace.messages.error", + { error: ifTrace.error } + ); this._renderEntry(ifPath, `${name}: ${choiceName}`, undefined, disabled); } else { this._renderEntry( ifPath, - `${name}: No action taken`, + this.hass.localize( + "ui.panel.config.automation.trace.messages.no_action_executed", + { name: name } + ), undefined, disabled ); } - let i; + let i: number; // Skip over conditions for (i = index + 1; i < this.keys.length; i++) { @@ -534,7 +570,11 @@ class ActionRenderer { const disabled = parallelConfig.enabled === false; - const name = parallelConfig.alias || "Execute in parallel"; + const name = + parallelConfig.alias || + this.hass.localize( + "ui.panel.config.automation.trace.messages.execute_in_parallel" + ); this._renderEntry(parallelPath, name, undefined, disabled); @@ -564,7 +604,11 @@ class ActionRenderer { this.entries.push(html` ${description}${disabled - ? html` (disabled)` + ? html` + ${this.hass.localize( + "ui.panel.config.automation.trace.messages.disabled" + )}` : ""} `); @@ -636,13 +680,12 @@ export class HaAutomationTracer extends LitElement { this.hass.locale, this.hass.config ); - const renderRuntime = () => `(runtime: - ${( + const renderRuntime = () => + ( (new Date(this.trace!.timestamp.finish!).getTime() - new Date(this.trace!.timestamp.start).getTime()) / 1000 - ).toFixed(2)} - seconds)`; + ).toFixed(2); let entry: { description: TemplateResult | string; @@ -652,57 +695,90 @@ export class HaAutomationTracer extends LitElement { if (this.trace.state === "running") { entry = { - description: "Still running", + description: this.hass.localize( + "ui.panel.config.automation.trace.messages.still_running" + ), icon: mdiProgressClock, }; } else if (this.trace.state === "debugged") { entry = { - description: "Debugged", + description: this.hass.localize( + "ui.panel.config.automation.trace.messages.debugged" + ), icon: mdiProgressWrench, }; } else if (this.trace.script_execution === "finished") { entry = { - description: `Finished at ${renderFinishedAt()} ${renderRuntime()}`, + description: this.hass.localize( + "ui.panel.config.automation.trace.messages.finished", + { + time: renderFinishedAt(), + executiontime: renderRuntime(), + } + ), icon: mdiCircle, }; } else if (this.trace.script_execution === "aborted") { entry = { - description: `Aborted at ${renderFinishedAt()} ${renderRuntime()}`, + description: this.hass.localize( + "ui.panel.config.automation.trace.messages.aborted", + { + time: renderFinishedAt(), + executiontime: renderRuntime(), + } + ), icon: mdiAlertCircle, }; } else if (this.trace.script_execution === "cancelled") { entry = { - description: `Cancelled at ${renderFinishedAt()} ${renderRuntime()}`, + description: this.hass.localize( + "ui.panel.config.automation.trace.messages.cancelled", + { + time: renderFinishedAt(), + executiontime: renderRuntime(), + } + ), icon: mdiAlertCircle, }; } else { - let reason: string; + let message: + | "stopped_failed_conditions" + | "stopped_failed_single" + | "stopped_failed_max_runs" + | "stopped_error" + | "stopped_unknown_reason"; let isError = false; let extra: TemplateResult | undefined; switch (this.trace.script_execution) { case "failed_conditions": - reason = "a condition failed"; + message = "stopped_failed_conditions"; break; case "failed_single": - reason = "only a single execution is allowed"; + message = "stopped_failed_single"; break; case "failed_max_runs": - reason = "maximum number of parallel runs reached"; + message = "stopped_failed_max_runs"; break; case "error": - reason = "an error was encountered"; isError = true; + message = "stopped_error"; extra = html`

    ${this.trace.error!}`; break; default: - reason = `of unknown reason "${this.trace.script_execution}"`; isError = true; + message = "stopped_unknown_reason"; } entry = { - description: html`Stopped because ${reason} at ${renderFinishedAt()} - ${renderRuntime()}${extra || ""}`, + description: html`${this.hass.localize( + `ui.panel.config.automation.trace.messages.${message}`, + { + time: renderFinishedAt(), + executiontime: renderRuntime(), + } + )} + ${extra || ""}`, icon: mdiAlertCircle, className: isError ? "error" : undefined, }; diff --git a/src/translations/en.json b/src/translations/en.json index c8c1b42c79be..daa08848539b 100644 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -3195,6 +3195,29 @@ "no_logbook_entries": "No Logbook entries found for this step.", "no_variables_changed": "No variables changed", "unable_to_find_config": "Unable to find config" + }, + "messages": { + "no_action_executed": "{name}: No action executed", + "default_action_executed": "{name}: Default action executed", + "action_executed": "{action} action executed", + "option_executed": "Option {option} executed", + "error": "Error: {error}", + "execute_in_parallel": "Execute in parallel", + "if": "If", + "choose": "Choose", + "still_running": "Still running", + "debugged": "Debugged", + "finished": "Finished at {time} (runtime: {executiontime} seconds)", + "aborted": "Aborted at {time} (runtime: {executiontime} seconds)", + "cancelled": "Cancelled at {time} (runtime: {executiontime} seconds)", + "stopped_failed_conditions": "Stopped because a condition failed at {time} (runtime: {executiontime} seconds)", + "stopped_failed_single": "Stopped because only a single execution is allowed at {time} (runtime: {executiontime} seconds)", + "stopped_failed_max_runs": "Stopped because maximum number of parallel runs reached at {time} (runtime: {executiontime} seconds)", + "stopped_error": "Stopped because an error was encountered at {time} (runtime: {executiontime} seconds)", + "stopped_unknown_reason": "Stopped because of unknown reason {reason} at {time} (runtime: {executiontime} seconds)", + "disabled": "(disabled)", + "triggered_by": "{triggeredBy, select, \n alias {{alias} triggered}\n other {Triggered} \n} {triggeredPath, select, \n trigger {by the {trigger}}\n other {manually} \n} at {time}", + "path_error": "Unable to extract path {path}. Download trace and report as bug." } } }, From 6b9ca60c479e3ad2bd8571885c6953932f0c0158 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 29 Feb 2024 13:54:02 +0100 Subject: [PATCH 085/425] Update octokit monorepo to v7 (major) (#19914) Update octokit monorepo to v7 Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package.json | 4 +- yarn.lock | 116 +++++++++++++++++++++++++++++---------------------- 2 files changed, 67 insertions(+), 53 deletions(-) diff --git a/package.json b/package.json index 86c3af3314b6..3cf4f76eb961 100644 --- a/package.json +++ b/package.json @@ -159,8 +159,8 @@ "@bundle-stats/plugin-webpack-filter": "4.10.1", "@koa/cors": "5.0.0", "@lokalise/node-api": "12.1.0", - "@octokit/auth-oauth-device": "6.0.1", - "@octokit/plugin-retry": "6.0.1", + "@octokit/auth-oauth-device": "7.0.0", + "@octokit/plugin-retry": "7.0.1", "@octokit/rest": "20.0.2", "@open-wc/dev-server-hmr": "0.1.4", "@rollup/plugin-babel": "6.0.4", diff --git a/yarn.lock b/yarn.lock index a5842edea3b8..2eed90303000 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3234,15 +3234,15 @@ __metadata: languageName: node linkType: hard -"@octokit/auth-oauth-device@npm:6.0.1": - version: 6.0.1 - resolution: "@octokit/auth-oauth-device@npm:6.0.1" +"@octokit/auth-oauth-device@npm:7.0.0": + version: 7.0.0 + resolution: "@octokit/auth-oauth-device@npm:7.0.0" dependencies: - "@octokit/oauth-methods": "npm:^4.0.0" - "@octokit/request": "npm:^8.0.0" + "@octokit/oauth-methods": "npm:^5.0.0" + "@octokit/request": "npm:^9.0.0" "@octokit/types": "npm:^12.0.0" - universal-user-agent: "npm:^6.0.0" - checksum: 10/4b9507f2f6e00bbd711876d63f5df947bc0760c7ba5ceb037bbeec3e3dfa1e106adeb98e1939cdae2937a941b9e702c71fcd354059a2ed03130ba8afd6c0305f + universal-user-agent: "npm:^7.0.0" + checksum: 10/74124b097c6af43e23b84012257210e6c1cc08c97620b5861d45661d52b448bc5e8d3c78309c7a7e878627ceac12e125b7bfe20a11e1ed8754afb90410737f9e languageName: node linkType: hard @@ -3268,6 +3268,16 @@ __metadata: languageName: node linkType: hard +"@octokit/endpoint@npm:^10.0.0": + version: 10.0.0 + resolution: "@octokit/endpoint@npm:10.0.0" + dependencies: + "@octokit/types": "npm:^12.0.0" + universal-user-agent: "npm:^7.0.2" + checksum: 10/a73a3499206ffa47bc4060a296488886fb457e4526ea6c314d56a70b4c21c8c8cdc3b6db770cfd61d99789d9d4ea7ba73d31b40f5e7b99eea81f87491eabe914 + languageName: node + linkType: hard + "@octokit/endpoint@npm:^9.0.0": version: 9.0.1 resolution: "@octokit/endpoint@npm:9.0.1" @@ -3290,30 +3300,22 @@ __metadata: languageName: node linkType: hard -"@octokit/oauth-authorization-url@npm:^6.0.2": - version: 6.0.2 - resolution: "@octokit/oauth-authorization-url@npm:6.0.2" - checksum: 10/a51493cd7288e249d3adb737bb229528d8fcf1d795e3d51bfe20670389d28d77d94edc5dbaabb30e0053f0b083150bd92d24353f1dc81ec7d4d6f87b36435959 +"@octokit/oauth-authorization-url@npm:^7.0.0": + version: 7.0.1 + resolution: "@octokit/oauth-authorization-url@npm:7.0.1" + checksum: 10/028aa11cd976699eb8a26e26080be52f36757fa7f5213bc434f68a1fdf3886b41edc0c15a9008deade11672a11337650655cdfe3db20fcdcf27d23e7fc57bfe8 languageName: node linkType: hard -"@octokit/oauth-methods@npm:^4.0.0": - version: 4.0.0 - resolution: "@octokit/oauth-methods@npm:4.0.0" +"@octokit/oauth-methods@npm:^5.0.0": + version: 5.0.0 + resolution: "@octokit/oauth-methods@npm:5.0.0" dependencies: - "@octokit/oauth-authorization-url": "npm:^6.0.2" - "@octokit/request": "npm:^8.0.2" - "@octokit/request-error": "npm:^5.0.0" - "@octokit/types": "npm:^11.0.0" - btoa-lite: "npm:^1.0.0" - checksum: 10/477ba87aeccc6d314abec4e5d57414885971b3bafd25d676f8dee42907590b11bf4890cbfece54706ddbde841a52ae406464119354b526245fa0daaf04e44b47 - languageName: node - linkType: hard - -"@octokit/openapi-types@npm:^18.0.0": - version: 18.1.1 - resolution: "@octokit/openapi-types@npm:18.1.1" - checksum: 10/bd2920a238f74c6ccc1e2ee916bd3e17adeeef3bbb1726f821b8722dceaeff5ea2786b3170cc25dd51775cb9179d3cdf448a3526e70b8a1fc21cdd8aa52e5d4c + "@octokit/oauth-authorization-url": "npm:^7.0.0" + "@octokit/request": "npm:^9.0.0" + "@octokit/request-error": "npm:^6.0.0" + "@octokit/types": "npm:^12.0.0" + checksum: 10/79e3cce0dac041ef1a117c9f7ef34abbf0076f58e2f86f445a4151c19479fa772fa6c0c7b01fedd63dfedcb8164c81fcccd3e8a98c96a8775af0f1663c1f0e6c languageName: node linkType: hard @@ -3355,16 +3357,16 @@ __metadata: languageName: node linkType: hard -"@octokit/plugin-retry@npm:6.0.1": - version: 6.0.1 - resolution: "@octokit/plugin-retry@npm:6.0.1" +"@octokit/plugin-retry@npm:7.0.1": + version: 7.0.1 + resolution: "@octokit/plugin-retry@npm:7.0.1" dependencies: "@octokit/request-error": "npm:^5.0.0" "@octokit/types": "npm:^12.0.0" bottleneck: "npm:^2.15.3" peerDependencies: - "@octokit/core": ">=5" - checksum: 10/2f5cd8b2215caad967df39ae6d915898eaaa95413ceebe70c4ed237e8f6dce3f238ef215040056c51a8335a78cbcc9ca1c43d471c37316833c38bfab510165d3 + "@octokit/core": ">=6" + checksum: 10/38182a9b537d39692302e7595e286e05435556fefc74daa5125e1369fe8256a9dd8c2423f7138ee881f36d404caf53b43f6d4be0821bb7ed095cb99979b558a9 languageName: node linkType: hard @@ -3379,7 +3381,16 @@ __metadata: languageName: node linkType: hard -"@octokit/request@npm:^8.0.0, @octokit/request@npm:^8.0.1, @octokit/request@npm:^8.0.2": +"@octokit/request-error@npm:^6.0.0, @octokit/request-error@npm:^6.0.1": + version: 6.0.2 + resolution: "@octokit/request-error@npm:6.0.2" + dependencies: + "@octokit/types": "npm:^12.0.0" + checksum: 10/ad2567500dccd14b42af02531812b63104e33fabd84de577005eed5104ca90b91d02456548b523c4b53b15bc12fb9e82e574f8fba993b93e7542dc80412f93eb + languageName: node + linkType: hard + +"@octokit/request@npm:^8.0.1, @octokit/request@npm:^8.0.2": version: 8.1.2 resolution: "@octokit/request@npm:8.1.2" dependencies: @@ -3392,6 +3403,18 @@ __metadata: languageName: node linkType: hard +"@octokit/request@npm:^9.0.0": + version: 9.0.1 + resolution: "@octokit/request@npm:9.0.1" + dependencies: + "@octokit/endpoint": "npm:^10.0.0" + "@octokit/request-error": "npm:^6.0.1" + "@octokit/types": "npm:^12.0.0" + universal-user-agent: "npm:^7.0.2" + checksum: 10/428e27ca11ebf02ffc4a7705f0b73cb5f7323a0a1e3a96ebce6a6da1c66c22ffdf7f0af536c67288cda4360525c47fc938c3b31258376ca3739be7c32c7b98d3 + languageName: node + linkType: hard + "@octokit/rest@npm:20.0.2": version: 20.0.2 resolution: "@octokit/rest@npm:20.0.2" @@ -3404,15 +3427,6 @@ __metadata: languageName: node linkType: hard -"@octokit/types@npm:^11.0.0": - version: 11.1.0 - resolution: "@octokit/types@npm:11.1.0" - dependencies: - "@octokit/openapi-types": "npm:^18.0.0" - checksum: 10/ebd510c14c4b26df127b76b4ed6b4b9a97cd6ec7a047532060f8346bfb29a68414c7189ee2b98f5386bcd7fa1a8c29af8e8460e5a7373cf6bf38a11775c8e26d - languageName: node - linkType: hard - "@octokit/types@npm:^12.0.0": version: 12.5.0 resolution: "@octokit/types@npm:12.5.0" @@ -6250,13 +6264,6 @@ __metadata: languageName: node linkType: hard -"btoa-lite@npm:^1.0.0": - version: 1.0.0 - resolution: "btoa-lite@npm:1.0.0" - checksum: 10/c2d61993b801f8e35a96f20692a45459c753d9baa29d86d1343e714f8d6bbe7069f1a20a5ae868488f3fb137d5bd0c560f6fbbc90b5a71050919d2d2c97c0475 - languageName: node - linkType: hard - "buffer-equal@npm:0.0.1": version: 0.0.1 resolution: "buffer-equal@npm:0.0.1" @@ -9648,8 +9655,8 @@ __metadata: "@material/web": "npm:=1.3.0" "@mdi/js": "npm:7.4.47" "@mdi/svg": "npm:7.4.47" - "@octokit/auth-oauth-device": "npm:6.0.1" - "@octokit/plugin-retry": "npm:6.0.1" + "@octokit/auth-oauth-device": "npm:7.0.0" + "@octokit/plugin-retry": "npm:7.0.1" "@octokit/rest": "npm:20.0.2" "@open-wc/dev-server-hmr": "npm:0.1.4" "@polymer/paper-item": "npm:3.0.1" @@ -15850,6 +15857,13 @@ __metadata: languageName: node linkType: hard +"universal-user-agent@npm:^7.0.0, universal-user-agent@npm:^7.0.2": + version: 7.0.2 + resolution: "universal-user-agent@npm:7.0.2" + checksum: 10/3f02cb6de0bb9fbaf379566bd0320d8e46af6e4358a2e88fce7e70687ed7b48b37f479d728bb22f4204a518e363f3038ac4841c033af1ee2253f6428a6c67e53 + languageName: node + linkType: hard + "universalify@npm:^2.0.0": version: 2.0.0 resolution: "universalify@npm:2.0.0" From d5d45f100ebad0aee96d2c28c44d888b992db6cd Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 29 Feb 2024 13:54:22 +0100 Subject: [PATCH 086/425] Update dependency open to v10.0.4 (#19918) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 3cf4f76eb961..f5d847e5c0b9 100644 --- a/package.json +++ b/package.json @@ -224,7 +224,7 @@ "map-stream": "0.0.7", "mocha": "10.3.0", "object-hash": "3.0.0", - "open": "10.0.3", + "open": "10.0.4", "pinst": "3.0.0", "prettier": "3.2.5", "rollup": "2.79.1", diff --git a/yarn.lock b/yarn.lock index 2eed90303000..4ae74639f544 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9758,7 +9758,7 @@ __metadata: mocha: "npm:10.3.0" node-vibrant: "npm:3.2.1-alpha.1" object-hash: "npm:3.0.0" - open: "npm:10.0.3" + open: "npm:10.0.4" pinst: "npm:3.0.0" prettier: "npm:3.2.5" proxy-polyfill: "npm:0.3.2" @@ -12651,15 +12651,15 @@ __metadata: languageName: node linkType: hard -"open@npm:10.0.3, open@npm:^10.0.3": - version: 10.0.3 - resolution: "open@npm:10.0.3" +"open@npm:10.0.4, open@npm:^10.0.3": + version: 10.0.4 + resolution: "open@npm:10.0.4" dependencies: default-browser: "npm:^5.2.1" define-lazy-prop: "npm:^3.0.0" is-inside-container: "npm:^1.0.0" is-wsl: "npm:^3.1.0" - checksum: 10/4dc757ad1d3d63490822f991e9cbe3a7c05b7249fca2eaa571cb7d191e5cec88bc37e15d8ef4fd740d8989a288b661d8da253caa8d98e8c97430ddbbb0ae4ed1 + checksum: 10/6d3a1f1daa6a485f82fae3301319e32faa32f724f7cbc857fc27fcdd6272fdaab36142b785d12cccb472539dfc192e78e5ac6de4bc83aba60f8c1e27cc6fa884 languageName: node linkType: hard From b6e220a4c5b5261e527b25e06a73e88215ac3fe3 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 29 Feb 2024 13:54:55 +0100 Subject: [PATCH 087/425] Update vaadinWebComponents monorepo to v24.3.7 (#19919) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package.json | 4 +- yarn.lock | 170 +++++++++++++++++++++++++-------------------------- 2 files changed, 87 insertions(+), 87 deletions(-) diff --git a/package.json b/package.json index f5d847e5c0b9..6bc3ff4a0632 100644 --- a/package.json +++ b/package.json @@ -89,8 +89,8 @@ "@polymer/paper-tabs": "3.1.0", "@polymer/polymer": "3.5.1", "@thomasloven/round-slider": "0.6.0", - "@vaadin/combo-box": "24.3.6", - "@vaadin/vaadin-themable-mixin": "24.3.6", + "@vaadin/combo-box": "24.3.7", + "@vaadin/vaadin-themable-mixin": "24.3.7", "@vibrant/color": "3.2.1-alpha.1", "@vibrant/core": "3.2.1-alpha.1", "@vibrant/quantizer-mmcq": "3.2.1-alpha.1", diff --git a/yarn.lock b/yarn.lock index 4ae74639f544..375d5ac91e2a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4685,128 +4685,128 @@ __metadata: languageName: node linkType: hard -"@vaadin/a11y-base@npm:~24.3.6": - version: 24.3.6 - resolution: "@vaadin/a11y-base@npm:24.3.6" +"@vaadin/a11y-base@npm:~24.3.7": + version: 24.3.7 + resolution: "@vaadin/a11y-base@npm:24.3.7" dependencies: "@open-wc/dedupe-mixin": "npm:^1.3.0" "@polymer/polymer": "npm:^3.0.0" - "@vaadin/component-base": "npm:~24.3.6" + "@vaadin/component-base": "npm:~24.3.7" lit: "npm:^3.0.0" - checksum: 10/ba101554e829c569fe71cd05642e00437fc3bad7a4a106421843410459bb874eb6f484ca8ebb17f215577aa2e517dd64a84509d07dcd96bd0ab8eb0b62f30346 + checksum: 10/c970ad01cf018f07833cbd4b9949241eea5deb8190a83914daae38159fb85619d062750e90ddc61a0ec984671e888c2286cc4394a2bf2ee9aa1fd045ad8ad398 languageName: node linkType: hard -"@vaadin/combo-box@npm:24.3.6": - version: 24.3.6 - resolution: "@vaadin/combo-box@npm:24.3.6" +"@vaadin/combo-box@npm:24.3.7": + version: 24.3.7 + resolution: "@vaadin/combo-box@npm:24.3.7" dependencies: "@open-wc/dedupe-mixin": "npm:^1.3.0" "@polymer/polymer": "npm:^3.0.0" - "@vaadin/a11y-base": "npm:~24.3.6" - "@vaadin/component-base": "npm:~24.3.6" - "@vaadin/field-base": "npm:~24.3.6" - "@vaadin/input-container": "npm:~24.3.6" - "@vaadin/item": "npm:~24.3.6" - "@vaadin/lit-renderer": "npm:~24.3.6" - "@vaadin/overlay": "npm:~24.3.6" - "@vaadin/vaadin-lumo-styles": "npm:~24.3.6" - "@vaadin/vaadin-material-styles": "npm:~24.3.6" - "@vaadin/vaadin-themable-mixin": "npm:~24.3.6" - checksum: 10/f05cb153a666227163031726b353b81500265ed614c3705cd5e81e9a6ec0235a0e207109b17958e9c5164b2c4d79ca25583400d4286cb1114221a0046d7c3e05 + "@vaadin/a11y-base": "npm:~24.3.7" + "@vaadin/component-base": "npm:~24.3.7" + "@vaadin/field-base": "npm:~24.3.7" + "@vaadin/input-container": "npm:~24.3.7" + "@vaadin/item": "npm:~24.3.7" + "@vaadin/lit-renderer": "npm:~24.3.7" + "@vaadin/overlay": "npm:~24.3.7" + "@vaadin/vaadin-lumo-styles": "npm:~24.3.7" + "@vaadin/vaadin-material-styles": "npm:~24.3.7" + "@vaadin/vaadin-themable-mixin": "npm:~24.3.7" + checksum: 10/f6d55e280580322875878f7f1b0db49354872ff4ac762c28a78b74c837a5a9df3a6c8322f7d770a74d6c7bcb3e62f77ca64e1c199f89504d86a2f53996cfcf01 languageName: node linkType: hard -"@vaadin/component-base@npm:~24.3.6": - version: 24.3.6 - resolution: "@vaadin/component-base@npm:24.3.6" +"@vaadin/component-base@npm:~24.3.7": + version: 24.3.7 + resolution: "@vaadin/component-base@npm:24.3.7" dependencies: "@open-wc/dedupe-mixin": "npm:^1.3.0" "@polymer/polymer": "npm:^3.0.0" "@vaadin/vaadin-development-mode-detector": "npm:^2.0.0" "@vaadin/vaadin-usage-statistics": "npm:^2.1.0" lit: "npm:^3.0.0" - checksum: 10/2bf4571a35f1d07a8da1a77c59d280add5b25a67aaf4e54a731ee10424125a028b01c06c54aa861f4892a5ce69cc4b1c84a37a1058588d10cd05bb34514601b6 + checksum: 10/1039fbaeb521e01fcdf0bbaba4e67e772cf80605f488636be3cd74ecb71038c75de392c5e9e088a1982139c8996211643ab152d381da943b1395c4791f3425bc languageName: node linkType: hard -"@vaadin/field-base@npm:~24.3.6": - version: 24.3.6 - resolution: "@vaadin/field-base@npm:24.3.6" +"@vaadin/field-base@npm:~24.3.7": + version: 24.3.7 + resolution: "@vaadin/field-base@npm:24.3.7" dependencies: "@open-wc/dedupe-mixin": "npm:^1.3.0" "@polymer/polymer": "npm:^3.0.0" - "@vaadin/a11y-base": "npm:~24.3.6" - "@vaadin/component-base": "npm:~24.3.6" + "@vaadin/a11y-base": "npm:~24.3.7" + "@vaadin/component-base": "npm:~24.3.7" lit: "npm:^3.0.0" - checksum: 10/71f407f8ca1801d7453a49f8d130e66c5a9999c8ddbfd1569a6e5141c372670b71cb195587a2a562a3965d2ac28e5fc022dcef4a98c96568ae78ad759ddb9d7c + checksum: 10/e54296be251a65ca0f2de944d53dd335a2ba30eee4d6b28e8fa3fba286735fccae3997dee6fe65c8f08f0e5749b9e0ec12154aecd81160063da5d121aa8c12f8 languageName: node linkType: hard -"@vaadin/icon@npm:~24.3.6": - version: 24.3.6 - resolution: "@vaadin/icon@npm:24.3.6" +"@vaadin/icon@npm:~24.3.7": + version: 24.3.7 + resolution: "@vaadin/icon@npm:24.3.7" dependencies: "@open-wc/dedupe-mixin": "npm:^1.3.0" "@polymer/polymer": "npm:^3.0.0" - "@vaadin/component-base": "npm:~24.3.6" - "@vaadin/vaadin-lumo-styles": "npm:~24.3.6" - "@vaadin/vaadin-themable-mixin": "npm:~24.3.6" + "@vaadin/component-base": "npm:~24.3.7" + "@vaadin/vaadin-lumo-styles": "npm:~24.3.7" + "@vaadin/vaadin-themable-mixin": "npm:~24.3.7" lit: "npm:^3.0.0" - checksum: 10/cffe77e5b1f6feb44b1f839c462580d5162cc1782e1701c292323068584e2a7747794473e46c3aa22c8fe6f1410a98e3bbd5a220ae6805c6759fec511e14675f + checksum: 10/a52da094082bb0328abca7ae3f49bd23f34a9ac4a7110c5e11c6c36f79f7f70e3017fe9529a92e856e205734af4907e8d6af780301619ba65826cb2fc4add5ac languageName: node linkType: hard -"@vaadin/input-container@npm:~24.3.6": - version: 24.3.6 - resolution: "@vaadin/input-container@npm:24.3.6" +"@vaadin/input-container@npm:~24.3.7": + version: 24.3.7 + resolution: "@vaadin/input-container@npm:24.3.7" dependencies: "@polymer/polymer": "npm:^3.0.0" - "@vaadin/component-base": "npm:~24.3.6" - "@vaadin/vaadin-lumo-styles": "npm:~24.3.6" - "@vaadin/vaadin-material-styles": "npm:~24.3.6" - "@vaadin/vaadin-themable-mixin": "npm:~24.3.6" + "@vaadin/component-base": "npm:~24.3.7" + "@vaadin/vaadin-lumo-styles": "npm:~24.3.7" + "@vaadin/vaadin-material-styles": "npm:~24.3.7" + "@vaadin/vaadin-themable-mixin": "npm:~24.3.7" lit: "npm:^3.0.0" - checksum: 10/6fd86c09ba47ea2937896826f1646155d53d3e9d363031f2a6c81774f6224e8cff1038f400ebf75b9de3c0084c65952226e5309b4b5649b69a3e66ef8ad84e65 + checksum: 10/37c780a82bdf1fcf40d456fadb0e17624b5e41dfadebba5a878a77682ecdd1b5f01f8d1dfe68df1ce620eb0e9246e119778b4e068718dad211739e74cbff1bc1 languageName: node linkType: hard -"@vaadin/item@npm:~24.3.6": - version: 24.3.6 - resolution: "@vaadin/item@npm:24.3.6" +"@vaadin/item@npm:~24.3.7": + version: 24.3.7 + resolution: "@vaadin/item@npm:24.3.7" dependencies: "@open-wc/dedupe-mixin": "npm:^1.3.0" "@polymer/polymer": "npm:^3.0.0" - "@vaadin/a11y-base": "npm:~24.3.6" - "@vaadin/component-base": "npm:~24.3.6" - "@vaadin/vaadin-lumo-styles": "npm:~24.3.6" - "@vaadin/vaadin-material-styles": "npm:~24.3.6" - "@vaadin/vaadin-themable-mixin": "npm:~24.3.6" - checksum: 10/d38f8219c8e9ba6acb833444eca2894723e83c06ce7557d0796042969899323ca9c19331639f6c677b49be79cda705da7d0d4251cd8370003df39f448f668835 + "@vaadin/a11y-base": "npm:~24.3.7" + "@vaadin/component-base": "npm:~24.3.7" + "@vaadin/vaadin-lumo-styles": "npm:~24.3.7" + "@vaadin/vaadin-material-styles": "npm:~24.3.7" + "@vaadin/vaadin-themable-mixin": "npm:~24.3.7" + checksum: 10/2836c23856d84c0729a0fffad43740155368cd06c146b72cff6995c2990ba4eeceb5d2e9ce2e0a6375d1a244c80ae529b40207df57f82055dbbd94f50716ae02 languageName: node linkType: hard -"@vaadin/lit-renderer@npm:~24.3.6": - version: 24.3.6 - resolution: "@vaadin/lit-renderer@npm:24.3.6" +"@vaadin/lit-renderer@npm:~24.3.7": + version: 24.3.7 + resolution: "@vaadin/lit-renderer@npm:24.3.7" dependencies: lit: "npm:^3.0.0" - checksum: 10/5e2c93f9ccbe037a9d20338954dd4cd01511c3f481b0091623892f31194483661781650cbee52c64ebb8c3be99e1500cac90e460b82d781d6bf4c436ca1f2039 + checksum: 10/abdcf50339b9a8b678b45f806552581c028ed80b6e1e99c55c61a2d7a076b59f9e04da11e593eda74da480640d4998f662d275f427ff4c3afadf09a7ea63d49e languageName: node linkType: hard -"@vaadin/overlay@npm:~24.3.6": - version: 24.3.6 - resolution: "@vaadin/overlay@npm:24.3.6" +"@vaadin/overlay@npm:~24.3.7": + version: 24.3.7 + resolution: "@vaadin/overlay@npm:24.3.7" dependencies: "@open-wc/dedupe-mixin": "npm:^1.3.0" "@polymer/polymer": "npm:^3.0.0" - "@vaadin/a11y-base": "npm:~24.3.6" - "@vaadin/component-base": "npm:~24.3.6" - "@vaadin/vaadin-lumo-styles": "npm:~24.3.6" - "@vaadin/vaadin-material-styles": "npm:~24.3.6" - "@vaadin/vaadin-themable-mixin": "npm:~24.3.6" - checksum: 10/f2f8a8125a957999a8b184ab56516b29856f0ba3f6ab75f7e0bcde8a6d477d0342f2fd1dbc2ee0ac7b8bc6b320cf9c22227503cf9854a7000792da6644ce2078 + "@vaadin/a11y-base": "npm:~24.3.7" + "@vaadin/component-base": "npm:~24.3.7" + "@vaadin/vaadin-lumo-styles": "npm:~24.3.7" + "@vaadin/vaadin-material-styles": "npm:~24.3.7" + "@vaadin/vaadin-themable-mixin": "npm:~24.3.7" + checksum: 10/e759e32d184df4a864eba67c7d6cfde93292c7b7584b422ebc0680ca8cc0abfdaeb44075345793e5a258f91983b6b2e9160205da06cb3cf6d360daf7253f7490 languageName: node linkType: hard @@ -4817,36 +4817,36 @@ __metadata: languageName: node linkType: hard -"@vaadin/vaadin-lumo-styles@npm:~24.3.6": - version: 24.3.6 - resolution: "@vaadin/vaadin-lumo-styles@npm:24.3.6" +"@vaadin/vaadin-lumo-styles@npm:~24.3.7": + version: 24.3.7 + resolution: "@vaadin/vaadin-lumo-styles@npm:24.3.7" dependencies: "@polymer/polymer": "npm:^3.0.0" - "@vaadin/component-base": "npm:~24.3.6" - "@vaadin/icon": "npm:~24.3.6" - "@vaadin/vaadin-themable-mixin": "npm:~24.3.6" - checksum: 10/158bedb18919229dc743821bbac6510b50b825d901265b71512f980d478675f675491a129f65de955c74ca367a1d97d7fd5691283a255f507ed28522722a209e + "@vaadin/component-base": "npm:~24.3.7" + "@vaadin/icon": "npm:~24.3.7" + "@vaadin/vaadin-themable-mixin": "npm:~24.3.7" + checksum: 10/7c8de09347ec25826ace26a38f6dd133eaf59fdae85b45fe1c0dafe5957a890af7647511b117153414f4486817c1028e8f6b757bbcad2bc8d17100fcbc3f23a3 languageName: node linkType: hard -"@vaadin/vaadin-material-styles@npm:~24.3.6": - version: 24.3.6 - resolution: "@vaadin/vaadin-material-styles@npm:24.3.6" +"@vaadin/vaadin-material-styles@npm:~24.3.7": + version: 24.3.7 + resolution: "@vaadin/vaadin-material-styles@npm:24.3.7" dependencies: "@polymer/polymer": "npm:^3.0.0" - "@vaadin/component-base": "npm:~24.3.6" - "@vaadin/vaadin-themable-mixin": "npm:~24.3.6" - checksum: 10/76835be72e6d08727a38cdec11c54565c7319eb1010ee5404f78acc7b6d8e8f5c363f9c5e9c149507a42a7ee7b075e8e0aae78aeaa375f4db3b0a97ee0cabc15 + "@vaadin/component-base": "npm:~24.3.7" + "@vaadin/vaadin-themable-mixin": "npm:~24.3.7" + checksum: 10/48a248aa647ff3f63b2e651e72a76851ad5af453f9a5b030d70c589bb9851fa81c288a485f4bc647a18a5383162414f1c1b370a731f79189eb6c0ccb68709acd languageName: node linkType: hard -"@vaadin/vaadin-themable-mixin@npm:24.3.6, @vaadin/vaadin-themable-mixin@npm:~24.3.6": - version: 24.3.6 - resolution: "@vaadin/vaadin-themable-mixin@npm:24.3.6" +"@vaadin/vaadin-themable-mixin@npm:24.3.7, @vaadin/vaadin-themable-mixin@npm:~24.3.7": + version: 24.3.7 + resolution: "@vaadin/vaadin-themable-mixin@npm:24.3.7" dependencies: "@open-wc/dedupe-mixin": "npm:^1.3.0" lit: "npm:^3.0.0" - checksum: 10/93b2f78bf2ad8575caedb1a0f7742d6f7e3920c362d74da6addf2d00de152e9a6e588cfa0b47f1aea76322fd031ae65446d80c6015591c7e00e4124afe07ffbb + checksum: 10/ed240064bb70826d94bf116bfeed1d3b4372bfb7c9a74519d27fdac1dec50c66a8a8170a999fbd201142e38428e6e7a99337e522a1b71892b2de03ed09aa188d languageName: node linkType: hard @@ -9688,8 +9688,8 @@ __metadata: "@types/webspeechapi": "npm:0.0.29" "@typescript-eslint/eslint-plugin": "npm:7.0.2" "@typescript-eslint/parser": "npm:7.0.2" - "@vaadin/combo-box": "npm:24.3.6" - "@vaadin/vaadin-themable-mixin": "npm:24.3.6" + "@vaadin/combo-box": "npm:24.3.7" + "@vaadin/vaadin-themable-mixin": "npm:24.3.7" "@vibrant/color": "npm:3.2.1-alpha.1" "@vibrant/core": "npm:3.2.1-alpha.1" "@vibrant/quantizer-mmcq": "npm:3.2.1-alpha.1" From 2af340046469dc433b2419a6b3f98a7113ec41c2 Mon Sep 17 00:00:00 2001 From: Paul Bottein Date: Thu, 29 Feb 2024 15:12:19 +0100 Subject: [PATCH 088/425] Fix section editing after disconnect/reconnect (#19917) * Fix section editing after disconnect/reconnect * Update src/components/ha-sortable.ts Co-authored-by: Bram Kragten --------- Co-authored-by: Bram Kragten --- src/components/ha-sortable.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/components/ha-sortable.ts b/src/components/ha-sortable.ts index 1c83eef95091..fc885d71ead0 100644 --- a/src/components/ha-sortable.ts +++ b/src/components/ha-sortable.ts @@ -82,6 +82,9 @@ export class HaSortable extends LitElement { public connectedCallback() { super.connectedCallback(); this._shouldBeDestroy = false; + if (this.hasUpdated) { + this.requestUpdate(); + } } protected createRenderRoot() { From 962912c43ca77b0f12e35141bbe2fde6883a92fe Mon Sep 17 00:00:00 2001 From: Paul Bottein Date: Wed, 28 Feb 2024 21:51:21 +0100 Subject: [PATCH 089/425] Add allow changing type of empty views (#19912) --- src/panels/lovelace/editor/view-editor/hui-view-editor.ts | 8 ++++++-- src/translations/en.json | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/panels/lovelace/editor/view-editor/hui-view-editor.ts b/src/panels/lovelace/editor/view-editor/hui-view-editor.ts index d0c4f24d53eb..803cdea06364 100644 --- a/src/panels/lovelace/editor/view-editor/hui-view-editor.ts +++ b/src/panels/lovelace/editor/view-editor/hui-view-editor.ts @@ -95,12 +95,16 @@ export class HuiViewEditor extends LitElement { : this._config.type || DEFAULT_VIEW_LAYOUT; } + private get _isEmpty(): boolean { + return !this._config.sections?.length && !this._config.cards?.length; + } + protected render() { if (!this.hass) { return nothing; } - const schema = this._schema(this.hass.localize, this._type, this.isNew); + const schema = this._schema(this.hass.localize, this._type, this._isEmpty); const data = { ...this._config, @@ -165,7 +169,7 @@ export class HuiViewEditor extends LitElement { "ui.panel.lovelace.editor.edit_view.subview_helper" ); case "type": - if (this.isNew) return undefined; + if (this._isEmpty) return undefined; return this._type === "sections" ? this.hass.localize( "ui.panel.lovelace.editor.edit_view.type_helper_others" diff --git a/src/translations/en.json b/src/translations/en.json index 24f63e86a3a2..c8c1b42c79be 100644 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -5112,7 +5112,7 @@ "select_users": "Select which users should see this view in the navigation" }, "type": "View type", - "type_helper_sections": "You can not change your view to use the 'sections' view type, because migration is not supported yet. Start from scratch with a new view if you want to experiment with the 'sections' view.", + "type_helper_sections": "You can not change your view to use the 'sections' view type because migration is not supported yet. Start from scratch with a new view if you want to experiment with the 'sections' view.", "type_helper_others": "You can not change your view to an other type because migration is not supported yet. Start from scratch with a new view if you want to use another view type.", "types": { From a34332b48dec3fef7d58c58d2295f23a5885f21e Mon Sep 17 00:00:00 2001 From: Paul Bottein Date: Thu, 29 Feb 2024 15:12:19 +0100 Subject: [PATCH 090/425] Fix section editing after disconnect/reconnect (#19917) * Fix section editing after disconnect/reconnect * Update src/components/ha-sortable.ts Co-authored-by: Bram Kragten --------- Co-authored-by: Bram Kragten --- src/components/ha-sortable.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/components/ha-sortable.ts b/src/components/ha-sortable.ts index 1c83eef95091..fc885d71ead0 100644 --- a/src/components/ha-sortable.ts +++ b/src/components/ha-sortable.ts @@ -82,6 +82,9 @@ export class HaSortable extends LitElement { public connectedCallback() { super.connectedCallback(); this._shouldBeDestroy = false; + if (this.hasUpdated) { + this.requestUpdate(); + } } protected createRenderRoot() { From ca7e257e9561e9b69f23136da6b534bcb93700e2 Mon Sep 17 00:00:00 2001 From: Bram Kragten Date: Thu, 29 Feb 2024 16:44:43 +0100 Subject: [PATCH 091/425] Bumped version to 20240228.1 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 15c83c13a419..a725ab6ed395 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "home-assistant-frontend" -version = "20240228.0" +version = "20240228.1" license = {text = "Apache-2.0"} description = "The Home Assistant frontend" readme = "README.md" From 4f01348ffb5760f9bcf5abec5be19b194a56c9c1 Mon Sep 17 00:00:00 2001 From: Bram Kragten Date: Thu, 29 Feb 2024 19:09:02 +0100 Subject: [PATCH 092/425] Improve error display in automation/script traces (#19920) --- src/components/trace/ha-trace-path-details.ts | 21 +++++----- src/components/trace/hat-graph-node.ts | 40 +++++++++++++++---- src/components/trace/hat-script-graph.ts | 5 +++ .../config/automation/ha-automation-trace.ts | 2 +- 4 files changed, 49 insertions(+), 19 deletions(-) diff --git a/src/components/trace/ha-trace-path-details.ts b/src/components/trace/ha-trace-path-details.ts index cb71dd98a305..c895b19c2ea6 100644 --- a/src/components/trace/ha-trace-path-details.ts +++ b/src/components/trace/ha-trace-path-details.ts @@ -163,21 +163,22 @@ export class HaTracePathDetails extends LitElement { } )}
    + ${error + ? html`
    + ${this.hass!.localize( + "ui.panel.config.automation.trace.path.error", + { + error: error, + } + )} +
    ` + : nothing} ${result ? html`${this.hass!.localize( "ui.panel.config.automation.trace.path.result" )}
    ${dump(result)}
    ` - : error - ? html`
    - ${this.hass!.localize( - "ui.panel.config.automation.trace.path.error", - { - error: error, - } - )} -
    ` - : nothing} + : nothing} ${Object.keys(rest).length === 0 ? nothing : html`
    ${dump(rest)}
    `} diff --git a/src/components/trace/hat-graph-node.ts b/src/components/trace/hat-graph-node.ts index 4da3f7b7c3ce..b6452587be44 100644 --- a/src/components/trace/hat-graph-node.ts +++ b/src/components/trace/hat-graph-node.ts @@ -1,15 +1,16 @@ +import { mdiExclamationThick } from "@mdi/js"; import { - css, LitElement, PropertyValues, - html, TemplateResult, - svg, + css, + html, nothing, + svg, } from "lit"; import { customElement, property } from "lit/decorators"; -import { NODE_SIZE, SPACING } from "./hat-graph-const"; import { isSafari } from "../../util/is_safari"; +import { NODE_SIZE, SPACING } from "./hat-graph-const"; /** * @attribute active @@ -21,6 +22,8 @@ export class HatGraphNode extends LitElement { @property({ type: Boolean, reflect: true }) public disabled = false; + @property({ type: Boolean }) public error = false; + @property({ reflect: true, type: Boolean }) notEnabled = false; @property({ reflect: true, type: Boolean }) graphStart = false; @@ -65,16 +68,28 @@ export class HatGraphNode extends LitElement { `} + ${this.error + ? svg` + + + + + ` + : nothing} ${this.badge ? svg` ` : nothing} - + ${this.iconPath ? svg`` : svg``} @@ -143,13 +158,22 @@ export class HatGraphNode extends LitElement { fill: var(--background-clr); stroke: var(--circle-clr, var(--stroke-clr)); } + .error circle { + fill: var(--error-color); + stroke: none; + stroke-width: 0; + } + .error .exclamation { + fill: var(--text-primary-color); + } .number circle { fill: var(--track-clr); stroke: none; stroke-width: 0; } .number text { - font-size: smaller; + font-size: 10px; + fill: var(--text-primary-color); } path.icon { fill: var(--icon-clr); diff --git a/src/components/trace/hat-script-graph.ts b/src/components/trace/hat-script-graph.ts index 7bc0cbc0d91d..077888293aa4 100644 --- a/src/components/trace/hat-script-graph.ts +++ b/src/components/trace/hat-script-graph.ts @@ -93,6 +93,7 @@ export class HatScriptGraph extends LitElement { ?active=${this.selected === path} .iconPath=${mdiAsterisk} .notEnabled=${config.enabled === false} + .error=${this.trace.trace[path]?.some((tr) => tr.error)} tabindex=${track ? "0" : "-1"} > `; @@ -171,6 +172,7 @@ export class HatScriptGraph extends LitElement { ?track=${trace !== undefined} ?active=${this.selected === path} .notEnabled=${disabled || config.enabled === false} + .error=${this.trace.trace[path]?.some((tr) => tr.error)} slot="head" nofocus > @@ -424,6 +426,7 @@ export class HatScriptGraph extends LitElement { ?track=${path in this.trace.trace} ?active=${this.selected === path} .notEnabled=${disabled || node.enabled === false} + .error=${this.trace.trace[path]?.some((tr) => tr.error)} tabindex=${this.trace && path in this.trace.trace ? "0" : "-1"} > ${node.service @@ -451,6 +454,7 @@ export class HatScriptGraph extends LitElement { ?track=${path in this.trace.trace} ?active=${this.selected === path} .notEnabled=${disabled || node.enabled === false} + .error=${this.trace.trace[path]?.some((tr) => tr.error)} tabindex=${this.trace && path in this.trace.trace ? "0" : "-1"} > `; @@ -517,6 +521,7 @@ export class HatScriptGraph extends LitElement { @focus=${this.selectNode(node, path)} ?track=${path in this.trace.trace} ?active=${this.selected === path} + .error=${this.trace.trace[path]?.some((tr) => tr.error)} .notEnabled=${disabled || node.enabled === false} > `; diff --git a/src/panels/config/automation/ha-automation-trace.ts b/src/panels/config/automation/ha-automation-trace.ts index cd52275ed779..c345a723c322 100644 --- a/src/panels/config/automation/ha-automation-trace.ts +++ b/src/panels/config/automation/ha-automation-trace.ts @@ -93,7 +93,7 @@ export class HaAutomationTrace extends LitElement { let devButtons: TemplateResult | string = ""; if (__DEV__) { - devButtons = html`
    + devButtons = html`
    `; From 7d8cb5c8631e63d525322c80000552d93b8f0592 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 29 Feb 2024 18:32:16 -0500 Subject: [PATCH 093/425] Update typescript-eslint monorepo to v7.1.0 (#19922) --- package.json | 4 +- yarn.lock | 104 +++++++++++++++++++++++++-------------------------- 2 files changed, 54 insertions(+), 54 deletions(-) diff --git a/package.json b/package.json index 6bc3ff4a0632..8f3eb3a9cec6 100644 --- a/package.json +++ b/package.json @@ -185,8 +185,8 @@ "@types/tar": "6.1.11", "@types/ua-parser-js": "0.7.39", "@types/webspeechapi": "0.0.29", - "@typescript-eslint/eslint-plugin": "7.0.2", - "@typescript-eslint/parser": "7.0.2", + "@typescript-eslint/eslint-plugin": "7.1.0", + "@typescript-eslint/parser": "7.1.0", "@web/dev-server": "0.1.38", "@web/dev-server-rollup": "0.4.1", "babel-loader": "9.1.3", diff --git a/yarn.lock b/yarn.lock index 375d5ac91e2a..9893206ce2ba 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4555,15 +4555,15 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/eslint-plugin@npm:7.0.2": - version: 7.0.2 - resolution: "@typescript-eslint/eslint-plugin@npm:7.0.2" +"@typescript-eslint/eslint-plugin@npm:7.1.0": + version: 7.1.0 + resolution: "@typescript-eslint/eslint-plugin@npm:7.1.0" dependencies: "@eslint-community/regexpp": "npm:^4.5.1" - "@typescript-eslint/scope-manager": "npm:7.0.2" - "@typescript-eslint/type-utils": "npm:7.0.2" - "@typescript-eslint/utils": "npm:7.0.2" - "@typescript-eslint/visitor-keys": "npm:7.0.2" + "@typescript-eslint/scope-manager": "npm:7.1.0" + "@typescript-eslint/type-utils": "npm:7.1.0" + "@typescript-eslint/utils": "npm:7.1.0" + "@typescript-eslint/visitor-keys": "npm:7.1.0" debug: "npm:^4.3.4" graphemer: "npm:^1.4.0" ignore: "npm:^5.2.4" @@ -4576,44 +4576,44 @@ __metadata: peerDependenciesMeta: typescript: optional: true - checksum: 10/430b2f7ca36ee73dc75c1d677088709f3c9d5bbb4fffa3cfbe1b7d63979ee397f7a4a2a1386e05a04991500fa0ab0dd5272e8603a2b20f42e4bf590603500858 + checksum: 10/f0b6b6e6ae2afee1df8dd2fd0c56588f9bb600468be9f255e033709a53371c6434da687e75dcb673503ef4f0416226f4ca3c94c65272828106e39b56aac87334 languageName: node linkType: hard -"@typescript-eslint/parser@npm:7.0.2": - version: 7.0.2 - resolution: "@typescript-eslint/parser@npm:7.0.2" +"@typescript-eslint/parser@npm:7.1.0": + version: 7.1.0 + resolution: "@typescript-eslint/parser@npm:7.1.0" dependencies: - "@typescript-eslint/scope-manager": "npm:7.0.2" - "@typescript-eslint/types": "npm:7.0.2" - "@typescript-eslint/typescript-estree": "npm:7.0.2" - "@typescript-eslint/visitor-keys": "npm:7.0.2" + "@typescript-eslint/scope-manager": "npm:7.1.0" + "@typescript-eslint/types": "npm:7.1.0" + "@typescript-eslint/typescript-estree": "npm:7.1.0" + "@typescript-eslint/visitor-keys": "npm:7.1.0" debug: "npm:^4.3.4" peerDependencies: eslint: ^8.56.0 peerDependenciesMeta: typescript: optional: true - checksum: 10/18d6e1bda64013f7d66164164c57a10390f7979db55b265062ae9337e11e0921bffca10870e252cd0bd198f79ffa2e87a652e57110e5b1b4cc738453154c205c + checksum: 10/39238d37f5a5f7058371ee3882fb7cd8a4579883fc5f13fda645c151fcf8d15e4c0db3ea7ffa7915a55c82451b544e9340c0228b45b83085158cb97974112f19 languageName: node linkType: hard -"@typescript-eslint/scope-manager@npm:7.0.2": - version: 7.0.2 - resolution: "@typescript-eslint/scope-manager@npm:7.0.2" +"@typescript-eslint/scope-manager@npm:7.1.0": + version: 7.1.0 + resolution: "@typescript-eslint/scope-manager@npm:7.1.0" dependencies: - "@typescript-eslint/types": "npm:7.0.2" - "@typescript-eslint/visitor-keys": "npm:7.0.2" - checksum: 10/773ea6e61f741777e69a469641f3db0d3c2301c0102667825fb235ed5a65c95f6d6b31b19e734b9a215acc0c7c576c65497635b8d5928eeddb58653ceb13d2d5 + "@typescript-eslint/types": "npm:7.1.0" + "@typescript-eslint/visitor-keys": "npm:7.1.0" + checksum: 10/3fb18de864331739c1b04fe9e3bb5d926e2fdf0d1fea2871181f68d0fb52325cbc9a5b81da58b7fe7f22d6d58d62b21c83460907146bc2f54ef0720fb3f9037f languageName: node linkType: hard -"@typescript-eslint/type-utils@npm:7.0.2": - version: 7.0.2 - resolution: "@typescript-eslint/type-utils@npm:7.0.2" +"@typescript-eslint/type-utils@npm:7.1.0": + version: 7.1.0 + resolution: "@typescript-eslint/type-utils@npm:7.1.0" dependencies: - "@typescript-eslint/typescript-estree": "npm:7.0.2" - "@typescript-eslint/utils": "npm:7.0.2" + "@typescript-eslint/typescript-estree": "npm:7.1.0" + "@typescript-eslint/utils": "npm:7.1.0" debug: "npm:^4.3.4" ts-api-utils: "npm:^1.0.1" peerDependencies: @@ -4621,23 +4621,23 @@ __metadata: peerDependenciesMeta: typescript: optional: true - checksum: 10/63bf19c9f5bbcb0f3e127f509d85dc49be4e5e51781d78f58c96786089e7c909b25d35d0248a6a758e2f7d5b5223d2262c2d597ab71f226af6beb499ae950645 + checksum: 10/439e6fadab3df3c21adfd651af4e605e1020c86c8c2400b0127c2ee914646bc73945b4add31ca7201cafeead261ad2958362c339ebdfc0798064d56daeb60661 languageName: node linkType: hard -"@typescript-eslint/types@npm:7.0.2": - version: 7.0.2 - resolution: "@typescript-eslint/types@npm:7.0.2" - checksum: 10/2cba8a0355cc7357db142fa597d02cf39e1d1cb0ec87c80e91daaa2b87f2a794d2649def9d7b2aa435691c3810d2cbd4cdc21668b19b991863f0d54d4a22da82 +"@typescript-eslint/types@npm:7.1.0": + version: 7.1.0 + resolution: "@typescript-eslint/types@npm:7.1.0" + checksum: 10/34801a14ea1444a1707de5bd3211f0ea53afc82a3c6c4543092f123267389da607c498d1a7de554ac9f071e6ef488238728a5f279ff2abaa0cbdfaa733899b67 languageName: node linkType: hard -"@typescript-eslint/typescript-estree@npm:7.0.2": - version: 7.0.2 - resolution: "@typescript-eslint/typescript-estree@npm:7.0.2" +"@typescript-eslint/typescript-estree@npm:7.1.0": + version: 7.1.0 + resolution: "@typescript-eslint/typescript-estree@npm:7.1.0" dependencies: - "@typescript-eslint/types": "npm:7.0.2" - "@typescript-eslint/visitor-keys": "npm:7.0.2" + "@typescript-eslint/types": "npm:7.1.0" + "@typescript-eslint/visitor-keys": "npm:7.1.0" debug: "npm:^4.3.4" globby: "npm:^11.1.0" is-glob: "npm:^4.0.3" @@ -4647,34 +4647,34 @@ __metadata: peerDependenciesMeta: typescript: optional: true - checksum: 10/307080e29c22fc69f0ce7ab7101e1629e05f45a9e541c250e03d06b61336ab0ccb5f0a7354ee3da4e38d5cade4dd2fb7bb396cd7cbe74c2c4b3e29706a70abcc + checksum: 10/7dfc6fc70ff00875728ce5d85a3c5d6cb01435082b20ff9301ebe4d8e4a31a0c997282c762c636937bd66a40b4e0154e2ce98f85d888a6c46d433e9a24c46c4c languageName: node linkType: hard -"@typescript-eslint/utils@npm:7.0.2": - version: 7.0.2 - resolution: "@typescript-eslint/utils@npm:7.0.2" +"@typescript-eslint/utils@npm:7.1.0": + version: 7.1.0 + resolution: "@typescript-eslint/utils@npm:7.1.0" dependencies: "@eslint-community/eslint-utils": "npm:^4.4.0" "@types/json-schema": "npm:^7.0.12" "@types/semver": "npm:^7.5.0" - "@typescript-eslint/scope-manager": "npm:7.0.2" - "@typescript-eslint/types": "npm:7.0.2" - "@typescript-eslint/typescript-estree": "npm:7.0.2" + "@typescript-eslint/scope-manager": "npm:7.1.0" + "@typescript-eslint/types": "npm:7.1.0" + "@typescript-eslint/typescript-estree": "npm:7.1.0" semver: "npm:^7.5.4" peerDependencies: eslint: ^8.56.0 - checksum: 10/e68bac777419cd529371f7f29f534efaeca130c90ed9723bfc7aac451d61ca3fc4ebd310e2c015e29e8dc7be4734ae46258ca8755897d7f5e3bb502660d5372f + checksum: 10/26d64094d8b828ce6cfea660c95cdbd4d0193d338646fc773312093388bc781653fc1ca16977b3be5288579fe43f14c7108fc431da66dd95b6ed680ad44712a0 languageName: node linkType: hard -"@typescript-eslint/visitor-keys@npm:7.0.2": - version: 7.0.2 - resolution: "@typescript-eslint/visitor-keys@npm:7.0.2" +"@typescript-eslint/visitor-keys@npm:7.1.0": + version: 7.1.0 + resolution: "@typescript-eslint/visitor-keys@npm:7.1.0" dependencies: - "@typescript-eslint/types": "npm:7.0.2" + "@typescript-eslint/types": "npm:7.1.0" eslint-visitor-keys: "npm:^3.4.1" - checksum: 10/da6c1b0729af99216cde3a65d4e91584a81fc6c9dff7ba291089f01bf7262de375f58c4c4246e5fbc29f51258db7725d9c830f82ccbd1cda812fd13c51480cda + checksum: 10/c3e98ebf166fd1854adb0e9599dc108cdbbd95f6eb099d31deae2fd1d4df8fcd8dc9c24ad4f509b961ad900b474c246f6b4b228b5711cc504106c3e0f751a11c languageName: node linkType: hard @@ -9686,8 +9686,8 @@ __metadata: "@types/tar": "npm:6.1.11" "@types/ua-parser-js": "npm:0.7.39" "@types/webspeechapi": "npm:0.0.29" - "@typescript-eslint/eslint-plugin": "npm:7.0.2" - "@typescript-eslint/parser": "npm:7.0.2" + "@typescript-eslint/eslint-plugin": "npm:7.1.0" + "@typescript-eslint/parser": "npm:7.1.0" "@vaadin/combo-box": "npm:24.3.7" "@vaadin/vaadin-themable-mixin": "npm:24.3.7" "@vibrant/color": "npm:3.2.1-alpha.1" From ec0434c9b01041c8945e5d3efef74fe379e75ae5 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 1 Mar 2024 11:58:00 +0100 Subject: [PATCH 094/425] Update dependency hls.js to v1.5.7 (#19927) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 8f3eb3a9cec6..94ef362df5b6 100644 --- a/package.json +++ b/package.json @@ -110,7 +110,7 @@ "element-internals-polyfill": "1.3.10", "fuse.js": "7.0.0", "google-timezones-json": "1.2.0", - "hls.js": "1.5.6", + "hls.js": "1.5.7", "home-assistant-js-websocket": "9.1.0", "idb-keyval": "6.2.1", "intl-messageformat": "10.5.11", diff --git a/yarn.lock b/yarn.lock index 9893206ce2ba..2553804a27fb 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9576,10 +9576,10 @@ __metadata: languageName: node linkType: hard -"hls.js@npm:1.5.6": - version: 1.5.6 - resolution: "hls.js@npm:1.5.6" - checksum: 10/795c1d41b5ee682a48c21a78fa995ab8aa2b5badf84593eb12965b0fc58050ca5330df36a115946b8757dff558ba172f9210bb2896b12241416e069269e15d95 +"hls.js@npm:1.5.7": + version: 1.5.7 + resolution: "hls.js@npm:1.5.7" + checksum: 10/8d863a56f3674ccf11eaf214005c57e2df13c51e7a7064b2f239ff2aca8aaac11571b86769f007f29c4034bc92fad8dd889e28670d07d7000e8953c40dbfcff9 languageName: node linkType: hard @@ -9735,7 +9735,7 @@ __metadata: gulp-merge-json: "npm:2.1.2" gulp-rename: "npm:2.0.0" gulp-zopfli-green: "npm:6.0.1" - hls.js: "npm:1.5.6" + hls.js: "npm:1.5.7" home-assistant-js-websocket: "npm:9.1.0" html-minifier-terser: "npm:7.2.0" husky: "npm:9.0.11" From 5463a272555bda16ab985531d141e9b2e63be864 Mon Sep 17 00:00:00 2001 From: Paul Bottein Date: Fri, 1 Mar 2024 13:09:10 +0100 Subject: [PATCH 095/425] Add badges support to sections view (#19929) --- src/panels/lovelace/views/const.ts | 6 +----- src/panels/lovelace/views/hui-masonry-view.ts | 6 ------ src/panels/lovelace/views/hui-sections-view.ts | 13 ++++++++++++- 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/src/panels/lovelace/views/const.ts b/src/panels/lovelace/views/const.ts index 5633f05bbce4..fb68615fd81c 100644 --- a/src/panels/lovelace/views/const.ts +++ b/src/panels/lovelace/views/const.ts @@ -2,8 +2,4 @@ export const DEFAULT_VIEW_LAYOUT = "masonry"; export const PANEL_VIEW_LAYOUT = "panel"; export const SIDEBAR_VIEW_LAYOUT = "sidebar"; export const SECTION_VIEW_LAYOUT = "sections"; -export const VIEWS_NO_BADGE_SUPPORT = [ - PANEL_VIEW_LAYOUT, - SIDEBAR_VIEW_LAYOUT, - SECTION_VIEW_LAYOUT, -]; +export const VIEWS_NO_BADGE_SUPPORT = [PANEL_VIEW_LAYOUT, SIDEBAR_VIEW_LAYOUT]; diff --git a/src/panels/lovelace/views/hui-masonry-view.ts b/src/panels/lovelace/views/hui-masonry-view.ts index bcc87214e3c6..c8e3047c2d53 100644 --- a/src/panels/lovelace/views/hui-masonry-view.ts +++ b/src/panels/lovelace/views/hui-masonry-view.ts @@ -291,12 +291,6 @@ export class MasonryView extends LitElement implements LovelaceViewElement { padding-top: 4px; } - .badges { - margin: 8px 16px; - font-size: 85%; - text-align: center; - } - #columns { display: flex; flex-direction: row; diff --git a/src/panels/lovelace/views/hui-sections-view.ts b/src/panels/lovelace/views/hui-sections-view.ts index cbf5af8570ec..71c612808e86 100644 --- a/src/panels/lovelace/views/hui-sections-view.ts +++ b/src/panels/lovelace/views/hui-sections-view.ts @@ -20,7 +20,7 @@ import { updateLovelaceContainer, } from "../editor/lovelace-path"; import { HuiSection } from "../sections/hui-section"; -import type { Lovelace } from "../types"; +import type { Lovelace, LovelaceBadge } from "../types"; @customElement("hui-sections-view") export class SectionsView extends LitElement implements LovelaceViewElement { @@ -34,6 +34,8 @@ export class SectionsView extends LitElement implements LovelaceViewElement { @property({ attribute: false }) public sections: HuiSection[] = []; + @property({ attribute: false }) public badges: LovelaceBadge[] = []; + @state() private _config?: LovelaceViewConfig; public setConfig(config: LovelaceViewConfig): void { @@ -57,6 +59,9 @@ export class SectionsView extends LitElement implements LovelaceViewElement { const editMode = this.lovelace.editMode; return html` + ${this.badges.length > 0 + ? html`
    ${this.badges}
    ` + : ""} Date: Fri, 1 Mar 2024 13:09:21 +0100 Subject: [PATCH 096/425] Use max column count instead of max width for section grid (#19932) --- .../lovelace/views/hui-sections-view.ts | 30 ++++++++++--------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/src/panels/lovelace/views/hui-sections-view.ts b/src/panels/lovelace/views/hui-sections-view.ts index 71c612808e86..2e2320fa549b 100644 --- a/src/panels/lovelace/views/hui-sections-view.ts +++ b/src/panels/lovelace/views/hui-sections-view.ts @@ -73,8 +73,8 @@ export class SectionsView extends LitElement implements LovelaceViewElement {
    @@ -249,26 +249,28 @@ export class SectionsView extends LitElement implements LovelaceViewElement { } .container { + /* Inputs */ --grid-gap: 20px; - --grid-max-width: 1400px; - --grid-cell-max-width: 500px; - --grid-cell-min-width: 320px; + --grid-max-section-count: 4; + --grid-section-min-width: 320px; + + /* Calculated */ + --max-count: min(var(--section-count), var(--grid-max-section-count)); + --grid-max-width: calc( + (var(--max-count) + 1) * var(--grid-section-min-width) + + (var(--max-count) + 2) * var(--grid-gap) - 1px + ); + display: grid; grid-template-columns: repeat( auto-fit, - minmax(var(--grid-cell-min-width), 1fr) + minmax(var(--grid-section-min-width), 1fr) ); + grid-gap: 8px var(--grid-gap); justify-content: center; - gap: 8px var(--grid-gap); padding: var(--grid-gap); box-sizing: border-box; - max-width: min( - calc( - var(--cell-count) * (var(--grid-cell-max-width) + var(--grid-gap)) + - var(--grid-gap) - ), - var(--grid-max-width) - ); + max-width: var(--grid-max-width); margin: 0 auto; } From 3abdffda9cb06fb3757d6e03601b7f15c1c4b99c Mon Sep 17 00:00:00 2001 From: Paul Bottein Date: Fri, 1 Mar 2024 14:55:34 +0100 Subject: [PATCH 097/425] Transform helper to warning for edit view type --- .../view-editor/hui-dialog-edit-view.ts | 34 ++++++++++++++++++- .../editor/view-editor/hui-view-editor.ts | 22 ++---------- src/translations/en.json | 4 +-- 3 files changed, 37 insertions(+), 23 deletions(-) diff --git a/src/panels/lovelace/editor/view-editor/hui-dialog-edit-view.ts b/src/panels/lovelace/editor/view-editor/hui-dialog-edit-view.ts index 038680b049f4..a4ba863a12f9 100644 --- a/src/panels/lovelace/editor/view-editor/hui-dialog-edit-view.ts +++ b/src/panels/lovelace/editor/view-editor/hui-dialog-edit-view.ts @@ -57,6 +57,8 @@ import { EditViewDialogParams } from "./show-edit-view-dialog"; export class HuiDialogEditView extends LitElement { @property({ attribute: false }) public hass?: HomeAssistant; + @state() private _currentType?: string; + @state() private _params?: EditViewDialogParams; @state() private _config?: LovelaceViewConfig; @@ -111,6 +113,7 @@ export class HuiDialogEditView extends LitElement { this._badges = []; return; } + this._currentType = view.type; const { badges, ...viewConfig } = view; this._config = viewConfig; this._badges = badges ? processEditorEntities(badges) : []; @@ -211,6 +214,15 @@ export class HuiDialogEditView extends LitElement { } } + const isEmpty = + !this._config?.cards?.length && !this._config?.sections?.length; + + const isCompatibleViewType = + isEmpty || + (this._currentType === SECTION_VIEW_LAYOUT + ? this._config?.type === SECTION_VIEW_LAYOUT + : this._config?.type !== SECTION_VIEW_LAYOUT); + return html` ` : nothing} + ${!isCompatibleViewType + ? html` + + ${this._config?.type === SECTION_VIEW_LAYOUT + ? this.hass!.localize( + "ui.panel.lovelace.editor.edit_view.type_warning_sections" + ) + : this.hass!.localize( + "ui.panel.lovelace.editor.edit_view.type_warning_others" + )} + + ` + : nothing} ${this._saving @@ -554,6 +582,10 @@ export class HuiDialogEditView extends LitElement { margin: 12px 16px; flex-wrap: wrap; } + .incompatible { + display: block; + margin-top: 16px; + } @media all and (min-width: 600px) { ha-dialog { diff --git a/src/panels/lovelace/editor/view-editor/hui-view-editor.ts b/src/panels/lovelace/editor/view-editor/hui-view-editor.ts index 803cdea06364..b22dc61d6850 100644 --- a/src/panels/lovelace/editor/view-editor/hui-view-editor.ts +++ b/src/panels/lovelace/editor/view-editor/hui-view-editor.ts @@ -37,7 +37,7 @@ export class HuiViewEditor extends LitElement { private _suggestedPath = false; private _schema = memoizeOne( - (localize: LocalizeFunc, currentType: string, isNew: boolean) => + (localize: LocalizeFunc) => [ { name: "title", selector: { text: {} } }, { @@ -64,11 +64,6 @@ export class HuiViewEditor extends LitElement { label: localize( `ui.panel.lovelace.editor.edit_view.types.${type}` ), - disabled: - !isNew && - (currentType === SECTION_VIEW_LAYOUT - ? type !== SECTION_VIEW_LAYOUT - : type === SECTION_VIEW_LAYOUT), })), }, }, @@ -95,16 +90,12 @@ export class HuiViewEditor extends LitElement { : this._config.type || DEFAULT_VIEW_LAYOUT; } - private get _isEmpty(): boolean { - return !this._config.sections?.length && !this._config.cards?.length; - } - protected render() { if (!this.hass) { return nothing; } - const schema = this._schema(this.hass.localize, this._type, this._isEmpty); + const schema = this._schema(this.hass.localize); const data = { ...this._config, @@ -168,15 +159,6 @@ export class HuiViewEditor extends LitElement { return this.hass.localize( "ui.panel.lovelace.editor.edit_view.subview_helper" ); - case "type": - if (this._isEmpty) return undefined; - return this._type === "sections" - ? this.hass.localize( - "ui.panel.lovelace.editor.edit_view.type_helper_others" - ) - : this.hass.localize( - "ui.panel.lovelace.editor.edit_view.type_helper_sections" - ); default: return undefined; } diff --git a/src/translations/en.json b/src/translations/en.json index daa08848539b..ff714e014437 100644 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -5135,8 +5135,8 @@ "select_users": "Select which users should see this view in the navigation" }, "type": "View type", - "type_helper_sections": "You can not change your view to use the 'sections' view type because migration is not supported yet. Start from scratch with a new view if you want to experiment with the 'sections' view.", - "type_helper_others": "You can not change your view to an other type because migration is not supported yet. Start from scratch with a new view if you want to use another view type.", + "type_warning_sections": "You can not change your view to use the 'sections' view type because migration is not supported yet. Start from scratch with a new view if you want to experiment with the 'sections' view.", + "type_warning_others": "You can not change your view to an other type because migration is not supported yet. Start from scratch with a new view if you want to use another view type.", "types": { "masonry": "Masonry (default)", From c05824c6413982fbfd61d2bff40be1a73e70a685 Mon Sep 17 00:00:00 2001 From: Paul Bottein Date: Fri, 1 Mar 2024 14:57:08 +0100 Subject: [PATCH 098/425] Revert "Transform helper to warning for edit view type" This reverts commit 3abdffda9cb06fb3757d6e03601b7f15c1c4b99c. --- .../view-editor/hui-dialog-edit-view.ts | 34 +------------------ .../editor/view-editor/hui-view-editor.ts | 22 ++++++++++-- src/translations/en.json | 4 +-- 3 files changed, 23 insertions(+), 37 deletions(-) diff --git a/src/panels/lovelace/editor/view-editor/hui-dialog-edit-view.ts b/src/panels/lovelace/editor/view-editor/hui-dialog-edit-view.ts index a4ba863a12f9..038680b049f4 100644 --- a/src/panels/lovelace/editor/view-editor/hui-dialog-edit-view.ts +++ b/src/panels/lovelace/editor/view-editor/hui-dialog-edit-view.ts @@ -57,8 +57,6 @@ import { EditViewDialogParams } from "./show-edit-view-dialog"; export class HuiDialogEditView extends LitElement { @property({ attribute: false }) public hass?: HomeAssistant; - @state() private _currentType?: string; - @state() private _params?: EditViewDialogParams; @state() private _config?: LovelaceViewConfig; @@ -113,7 +111,6 @@ export class HuiDialogEditView extends LitElement { this._badges = []; return; } - this._currentType = view.type; const { badges, ...viewConfig } = view; this._config = viewConfig; this._badges = badges ? processEditorEntities(badges) : []; @@ -214,15 +211,6 @@ export class HuiDialogEditView extends LitElement { } } - const isEmpty = - !this._config?.cards?.length && !this._config?.sections?.length; - - const isCompatibleViewType = - isEmpty || - (this._currentType === SECTION_VIEW_LAYOUT - ? this._config?.type === SECTION_VIEW_LAYOUT - : this._config?.type !== SECTION_VIEW_LAYOUT); - return html` ` : nothing} - ${!isCompatibleViewType - ? html` - - ${this._config?.type === SECTION_VIEW_LAYOUT - ? this.hass!.localize( - "ui.panel.lovelace.editor.edit_view.type_warning_sections" - ) - : this.hass!.localize( - "ui.panel.lovelace.editor.edit_view.type_warning_others" - )} - - ` - : nothing} ${this._saving @@ -582,10 +554,6 @@ export class HuiDialogEditView extends LitElement { margin: 12px 16px; flex-wrap: wrap; } - .incompatible { - display: block; - margin-top: 16px; - } @media all and (min-width: 600px) { ha-dialog { diff --git a/src/panels/lovelace/editor/view-editor/hui-view-editor.ts b/src/panels/lovelace/editor/view-editor/hui-view-editor.ts index b22dc61d6850..803cdea06364 100644 --- a/src/panels/lovelace/editor/view-editor/hui-view-editor.ts +++ b/src/panels/lovelace/editor/view-editor/hui-view-editor.ts @@ -37,7 +37,7 @@ export class HuiViewEditor extends LitElement { private _suggestedPath = false; private _schema = memoizeOne( - (localize: LocalizeFunc) => + (localize: LocalizeFunc, currentType: string, isNew: boolean) => [ { name: "title", selector: { text: {} } }, { @@ -64,6 +64,11 @@ export class HuiViewEditor extends LitElement { label: localize( `ui.panel.lovelace.editor.edit_view.types.${type}` ), + disabled: + !isNew && + (currentType === SECTION_VIEW_LAYOUT + ? type !== SECTION_VIEW_LAYOUT + : type === SECTION_VIEW_LAYOUT), })), }, }, @@ -90,12 +95,16 @@ export class HuiViewEditor extends LitElement { : this._config.type || DEFAULT_VIEW_LAYOUT; } + private get _isEmpty(): boolean { + return !this._config.sections?.length && !this._config.cards?.length; + } + protected render() { if (!this.hass) { return nothing; } - const schema = this._schema(this.hass.localize); + const schema = this._schema(this.hass.localize, this._type, this._isEmpty); const data = { ...this._config, @@ -159,6 +168,15 @@ export class HuiViewEditor extends LitElement { return this.hass.localize( "ui.panel.lovelace.editor.edit_view.subview_helper" ); + case "type": + if (this._isEmpty) return undefined; + return this._type === "sections" + ? this.hass.localize( + "ui.panel.lovelace.editor.edit_view.type_helper_others" + ) + : this.hass.localize( + "ui.panel.lovelace.editor.edit_view.type_helper_sections" + ); default: return undefined; } diff --git a/src/translations/en.json b/src/translations/en.json index ff714e014437..daa08848539b 100644 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -5135,8 +5135,8 @@ "select_users": "Select which users should see this view in the navigation" }, "type": "View type", - "type_warning_sections": "You can not change your view to use the 'sections' view type because migration is not supported yet. Start from scratch with a new view if you want to experiment with the 'sections' view.", - "type_warning_others": "You can not change your view to an other type because migration is not supported yet. Start from scratch with a new view if you want to use another view type.", + "type_helper_sections": "You can not change your view to use the 'sections' view type because migration is not supported yet. Start from scratch with a new view if you want to experiment with the 'sections' view.", + "type_helper_others": "You can not change your view to an other type because migration is not supported yet. Start from scratch with a new view if you want to use another view type.", "types": { "masonry": "Masonry (default)", From 329a8c0c907b31b097d2d2d743791e4f9e9578c1 Mon Sep 17 00:00:00 2001 From: Paul Bottein Date: Fri, 1 Mar 2024 15:31:25 +0100 Subject: [PATCH 099/425] Transform helper to warning for edit view type (#19934) --- .../view-editor/hui-dialog-edit-view.ts | 34 ++++++++++++++++++- .../editor/view-editor/hui-view-editor.ts | 22 ++---------- src/translations/en.json | 4 +-- 3 files changed, 37 insertions(+), 23 deletions(-) diff --git a/src/panels/lovelace/editor/view-editor/hui-dialog-edit-view.ts b/src/panels/lovelace/editor/view-editor/hui-dialog-edit-view.ts index 038680b049f4..a4ba863a12f9 100644 --- a/src/panels/lovelace/editor/view-editor/hui-dialog-edit-view.ts +++ b/src/panels/lovelace/editor/view-editor/hui-dialog-edit-view.ts @@ -57,6 +57,8 @@ import { EditViewDialogParams } from "./show-edit-view-dialog"; export class HuiDialogEditView extends LitElement { @property({ attribute: false }) public hass?: HomeAssistant; + @state() private _currentType?: string; + @state() private _params?: EditViewDialogParams; @state() private _config?: LovelaceViewConfig; @@ -111,6 +113,7 @@ export class HuiDialogEditView extends LitElement { this._badges = []; return; } + this._currentType = view.type; const { badges, ...viewConfig } = view; this._config = viewConfig; this._badges = badges ? processEditorEntities(badges) : []; @@ -211,6 +214,15 @@ export class HuiDialogEditView extends LitElement { } } + const isEmpty = + !this._config?.cards?.length && !this._config?.sections?.length; + + const isCompatibleViewType = + isEmpty || + (this._currentType === SECTION_VIEW_LAYOUT + ? this._config?.type === SECTION_VIEW_LAYOUT + : this._config?.type !== SECTION_VIEW_LAYOUT); + return html` ` : nothing} + ${!isCompatibleViewType + ? html` + + ${this._config?.type === SECTION_VIEW_LAYOUT + ? this.hass!.localize( + "ui.panel.lovelace.editor.edit_view.type_warning_sections" + ) + : this.hass!.localize( + "ui.panel.lovelace.editor.edit_view.type_warning_others" + )} + + ` + : nothing} ${this._saving @@ -554,6 +582,10 @@ export class HuiDialogEditView extends LitElement { margin: 12px 16px; flex-wrap: wrap; } + .incompatible { + display: block; + margin-top: 16px; + } @media all and (min-width: 600px) { ha-dialog { diff --git a/src/panels/lovelace/editor/view-editor/hui-view-editor.ts b/src/panels/lovelace/editor/view-editor/hui-view-editor.ts index 803cdea06364..b22dc61d6850 100644 --- a/src/panels/lovelace/editor/view-editor/hui-view-editor.ts +++ b/src/panels/lovelace/editor/view-editor/hui-view-editor.ts @@ -37,7 +37,7 @@ export class HuiViewEditor extends LitElement { private _suggestedPath = false; private _schema = memoizeOne( - (localize: LocalizeFunc, currentType: string, isNew: boolean) => + (localize: LocalizeFunc) => [ { name: "title", selector: { text: {} } }, { @@ -64,11 +64,6 @@ export class HuiViewEditor extends LitElement { label: localize( `ui.panel.lovelace.editor.edit_view.types.${type}` ), - disabled: - !isNew && - (currentType === SECTION_VIEW_LAYOUT - ? type !== SECTION_VIEW_LAYOUT - : type === SECTION_VIEW_LAYOUT), })), }, }, @@ -95,16 +90,12 @@ export class HuiViewEditor extends LitElement { : this._config.type || DEFAULT_VIEW_LAYOUT; } - private get _isEmpty(): boolean { - return !this._config.sections?.length && !this._config.cards?.length; - } - protected render() { if (!this.hass) { return nothing; } - const schema = this._schema(this.hass.localize, this._type, this._isEmpty); + const schema = this._schema(this.hass.localize); const data = { ...this._config, @@ -168,15 +159,6 @@ export class HuiViewEditor extends LitElement { return this.hass.localize( "ui.panel.lovelace.editor.edit_view.subview_helper" ); - case "type": - if (this._isEmpty) return undefined; - return this._type === "sections" - ? this.hass.localize( - "ui.panel.lovelace.editor.edit_view.type_helper_others" - ) - : this.hass.localize( - "ui.panel.lovelace.editor.edit_view.type_helper_sections" - ); default: return undefined; } diff --git a/src/translations/en.json b/src/translations/en.json index daa08848539b..ff714e014437 100644 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -5135,8 +5135,8 @@ "select_users": "Select which users should see this view in the navigation" }, "type": "View type", - "type_helper_sections": "You can not change your view to use the 'sections' view type because migration is not supported yet. Start from scratch with a new view if you want to experiment with the 'sections' view.", - "type_helper_others": "You can not change your view to an other type because migration is not supported yet. Start from scratch with a new view if you want to use another view type.", + "type_warning_sections": "You can not change your view to use the 'sections' view type because migration is not supported yet. Start from scratch with a new view if you want to experiment with the 'sections' view.", + "type_warning_others": "You can not change your view to an other type because migration is not supported yet. Start from scratch with a new view if you want to use another view type.", "types": { "masonry": "Masonry (default)", From 3202ea55d23eb3efd5fae34888e88da825d7f54b Mon Sep 17 00:00:00 2001 From: Paul Bottein Date: Fri, 1 Mar 2024 15:41:56 +0100 Subject: [PATCH 100/425] Bumped version to 20240301.0 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 15c83c13a419..c15f5c2579cc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "home-assistant-frontend" -version = "20240228.0" +version = "20240301.0" license = {text = "Apache-2.0"} description = "The Home Assistant frontend" readme = "README.md" From 39bd07de73e52c92ef29ce02fddf17ee44d7ff0a Mon Sep 17 00:00:00 2001 From: Paul Bottein Date: Fri, 1 Mar 2024 15:59:01 +0100 Subject: [PATCH 101/425] Revert "Bumped version to 20240301.0" This reverts commit 3202ea55d23eb3efd5fae34888e88da825d7f54b. --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index c15f5c2579cc..15c83c13a419 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "home-assistant-frontend" -version = "20240301.0" +version = "20240228.0" license = {text = "Apache-2.0"} description = "The Home Assistant frontend" readme = "README.md" From 67d8765624efdb09c6e7a21103dd73a8bfc8be8f Mon Sep 17 00:00:00 2001 From: Paul Bottein Date: Fri, 1 Mar 2024 13:09:10 +0100 Subject: [PATCH 102/425] Add badges support to sections view (#19929) --- src/panels/lovelace/views/const.ts | 6 +----- src/panels/lovelace/views/hui-masonry-view.ts | 6 ------ src/panels/lovelace/views/hui-sections-view.ts | 13 ++++++++++++- 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/src/panels/lovelace/views/const.ts b/src/panels/lovelace/views/const.ts index 5633f05bbce4..fb68615fd81c 100644 --- a/src/panels/lovelace/views/const.ts +++ b/src/panels/lovelace/views/const.ts @@ -2,8 +2,4 @@ export const DEFAULT_VIEW_LAYOUT = "masonry"; export const PANEL_VIEW_LAYOUT = "panel"; export const SIDEBAR_VIEW_LAYOUT = "sidebar"; export const SECTION_VIEW_LAYOUT = "sections"; -export const VIEWS_NO_BADGE_SUPPORT = [ - PANEL_VIEW_LAYOUT, - SIDEBAR_VIEW_LAYOUT, - SECTION_VIEW_LAYOUT, -]; +export const VIEWS_NO_BADGE_SUPPORT = [PANEL_VIEW_LAYOUT, SIDEBAR_VIEW_LAYOUT]; diff --git a/src/panels/lovelace/views/hui-masonry-view.ts b/src/panels/lovelace/views/hui-masonry-view.ts index bcc87214e3c6..c8e3047c2d53 100644 --- a/src/panels/lovelace/views/hui-masonry-view.ts +++ b/src/panels/lovelace/views/hui-masonry-view.ts @@ -291,12 +291,6 @@ export class MasonryView extends LitElement implements LovelaceViewElement { padding-top: 4px; } - .badges { - margin: 8px 16px; - font-size: 85%; - text-align: center; - } - #columns { display: flex; flex-direction: row; diff --git a/src/panels/lovelace/views/hui-sections-view.ts b/src/panels/lovelace/views/hui-sections-view.ts index cbf5af8570ec..71c612808e86 100644 --- a/src/panels/lovelace/views/hui-sections-view.ts +++ b/src/panels/lovelace/views/hui-sections-view.ts @@ -20,7 +20,7 @@ import { updateLovelaceContainer, } from "../editor/lovelace-path"; import { HuiSection } from "../sections/hui-section"; -import type { Lovelace } from "../types"; +import type { Lovelace, LovelaceBadge } from "../types"; @customElement("hui-sections-view") export class SectionsView extends LitElement implements LovelaceViewElement { @@ -34,6 +34,8 @@ export class SectionsView extends LitElement implements LovelaceViewElement { @property({ attribute: false }) public sections: HuiSection[] = []; + @property({ attribute: false }) public badges: LovelaceBadge[] = []; + @state() private _config?: LovelaceViewConfig; public setConfig(config: LovelaceViewConfig): void { @@ -57,6 +59,9 @@ export class SectionsView extends LitElement implements LovelaceViewElement { const editMode = this.lovelace.editMode; return html` + ${this.badges.length > 0 + ? html`
    ${this.badges}
    ` + : ""} Date: Fri, 1 Mar 2024 13:09:21 +0100 Subject: [PATCH 103/425] Use max column count instead of max width for section grid (#19932) --- .../lovelace/views/hui-sections-view.ts | 30 ++++++++++--------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/src/panels/lovelace/views/hui-sections-view.ts b/src/panels/lovelace/views/hui-sections-view.ts index 71c612808e86..2e2320fa549b 100644 --- a/src/panels/lovelace/views/hui-sections-view.ts +++ b/src/panels/lovelace/views/hui-sections-view.ts @@ -73,8 +73,8 @@ export class SectionsView extends LitElement implements LovelaceViewElement {
    @@ -249,26 +249,28 @@ export class SectionsView extends LitElement implements LovelaceViewElement { } .container { + /* Inputs */ --grid-gap: 20px; - --grid-max-width: 1400px; - --grid-cell-max-width: 500px; - --grid-cell-min-width: 320px; + --grid-max-section-count: 4; + --grid-section-min-width: 320px; + + /* Calculated */ + --max-count: min(var(--section-count), var(--grid-max-section-count)); + --grid-max-width: calc( + (var(--max-count) + 1) * var(--grid-section-min-width) + + (var(--max-count) + 2) * var(--grid-gap) - 1px + ); + display: grid; grid-template-columns: repeat( auto-fit, - minmax(var(--grid-cell-min-width), 1fr) + minmax(var(--grid-section-min-width), 1fr) ); + grid-gap: 8px var(--grid-gap); justify-content: center; - gap: 8px var(--grid-gap); padding: var(--grid-gap); box-sizing: border-box; - max-width: min( - calc( - var(--cell-count) * (var(--grid-cell-max-width) + var(--grid-gap)) + - var(--grid-gap) - ), - var(--grid-max-width) - ); + max-width: var(--grid-max-width); margin: 0 auto; } From de8b0ba8c5e6b49a9d283cb16dce50bdbee3084d Mon Sep 17 00:00:00 2001 From: Paul Bottein Date: Fri, 1 Mar 2024 15:31:25 +0100 Subject: [PATCH 104/425] Transform helper to warning for edit view type (#19934) --- .../view-editor/hui-dialog-edit-view.ts | 34 ++++++++++++++++++- .../editor/view-editor/hui-view-editor.ts | 22 ++---------- src/translations/en.json | 4 +-- 3 files changed, 37 insertions(+), 23 deletions(-) diff --git a/src/panels/lovelace/editor/view-editor/hui-dialog-edit-view.ts b/src/panels/lovelace/editor/view-editor/hui-dialog-edit-view.ts index 038680b049f4..a4ba863a12f9 100644 --- a/src/panels/lovelace/editor/view-editor/hui-dialog-edit-view.ts +++ b/src/panels/lovelace/editor/view-editor/hui-dialog-edit-view.ts @@ -57,6 +57,8 @@ import { EditViewDialogParams } from "./show-edit-view-dialog"; export class HuiDialogEditView extends LitElement { @property({ attribute: false }) public hass?: HomeAssistant; + @state() private _currentType?: string; + @state() private _params?: EditViewDialogParams; @state() private _config?: LovelaceViewConfig; @@ -111,6 +113,7 @@ export class HuiDialogEditView extends LitElement { this._badges = []; return; } + this._currentType = view.type; const { badges, ...viewConfig } = view; this._config = viewConfig; this._badges = badges ? processEditorEntities(badges) : []; @@ -211,6 +214,15 @@ export class HuiDialogEditView extends LitElement { } } + const isEmpty = + !this._config?.cards?.length && !this._config?.sections?.length; + + const isCompatibleViewType = + isEmpty || + (this._currentType === SECTION_VIEW_LAYOUT + ? this._config?.type === SECTION_VIEW_LAYOUT + : this._config?.type !== SECTION_VIEW_LAYOUT); + return html` ` : nothing} + ${!isCompatibleViewType + ? html` + + ${this._config?.type === SECTION_VIEW_LAYOUT + ? this.hass!.localize( + "ui.panel.lovelace.editor.edit_view.type_warning_sections" + ) + : this.hass!.localize( + "ui.panel.lovelace.editor.edit_view.type_warning_others" + )} + + ` + : nothing} ${this._saving @@ -554,6 +582,10 @@ export class HuiDialogEditView extends LitElement { margin: 12px 16px; flex-wrap: wrap; } + .incompatible { + display: block; + margin-top: 16px; + } @media all and (min-width: 600px) { ha-dialog { diff --git a/src/panels/lovelace/editor/view-editor/hui-view-editor.ts b/src/panels/lovelace/editor/view-editor/hui-view-editor.ts index 803cdea06364..b22dc61d6850 100644 --- a/src/panels/lovelace/editor/view-editor/hui-view-editor.ts +++ b/src/panels/lovelace/editor/view-editor/hui-view-editor.ts @@ -37,7 +37,7 @@ export class HuiViewEditor extends LitElement { private _suggestedPath = false; private _schema = memoizeOne( - (localize: LocalizeFunc, currentType: string, isNew: boolean) => + (localize: LocalizeFunc) => [ { name: "title", selector: { text: {} } }, { @@ -64,11 +64,6 @@ export class HuiViewEditor extends LitElement { label: localize( `ui.panel.lovelace.editor.edit_view.types.${type}` ), - disabled: - !isNew && - (currentType === SECTION_VIEW_LAYOUT - ? type !== SECTION_VIEW_LAYOUT - : type === SECTION_VIEW_LAYOUT), })), }, }, @@ -95,16 +90,12 @@ export class HuiViewEditor extends LitElement { : this._config.type || DEFAULT_VIEW_LAYOUT; } - private get _isEmpty(): boolean { - return !this._config.sections?.length && !this._config.cards?.length; - } - protected render() { if (!this.hass) { return nothing; } - const schema = this._schema(this.hass.localize, this._type, this._isEmpty); + const schema = this._schema(this.hass.localize); const data = { ...this._config, @@ -168,15 +159,6 @@ export class HuiViewEditor extends LitElement { return this.hass.localize( "ui.panel.lovelace.editor.edit_view.subview_helper" ); - case "type": - if (this._isEmpty) return undefined; - return this._type === "sections" - ? this.hass.localize( - "ui.panel.lovelace.editor.edit_view.type_helper_others" - ) - : this.hass.localize( - "ui.panel.lovelace.editor.edit_view.type_helper_sections" - ); default: return undefined; } diff --git a/src/translations/en.json b/src/translations/en.json index c8c1b42c79be..9b52c4299b03 100644 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -5112,8 +5112,8 @@ "select_users": "Select which users should see this view in the navigation" }, "type": "View type", - "type_helper_sections": "You can not change your view to use the 'sections' view type because migration is not supported yet. Start from scratch with a new view if you want to experiment with the 'sections' view.", - "type_helper_others": "You can not change your view to an other type because migration is not supported yet. Start from scratch with a new view if you want to use another view type.", + "type_warning_sections": "You can not change your view to use the 'sections' view type because migration is not supported yet. Start from scratch with a new view if you want to experiment with the 'sections' view.", + "type_warning_others": "You can not change your view to an other type because migration is not supported yet. Start from scratch with a new view if you want to use another view type.", "types": { "masonry": "Masonry (default)", From 69dbcec678b02513af896b59c08a50c21ffaec9b Mon Sep 17 00:00:00 2001 From: Paul Bottein Date: Fri, 1 Mar 2024 16:15:03 +0100 Subject: [PATCH 105/425] Bumped version to 20240301.0 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index a725ab6ed395..c15f5c2579cc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "home-assistant-frontend" -version = "20240228.1" +version = "20240301.0" license = {text = "Apache-2.0"} description = "The Home Assistant frontend" readme = "README.md" From 3d8654253ae857a2a41497f7104170f0cf644daa Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 1 Mar 2024 21:31:44 -0500 Subject: [PATCH 106/425] Update octokit monorepo (#19941) --- package.json | 4 ++-- yarn.lock | 20 ++++++++++---------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/package.json b/package.json index 94ef362df5b6..6bd5c5a462d3 100644 --- a/package.json +++ b/package.json @@ -159,8 +159,8 @@ "@bundle-stats/plugin-webpack-filter": "4.10.1", "@koa/cors": "5.0.0", "@lokalise/node-api": "12.1.0", - "@octokit/auth-oauth-device": "7.0.0", - "@octokit/plugin-retry": "7.0.1", + "@octokit/auth-oauth-device": "7.0.1", + "@octokit/plugin-retry": "7.0.2", "@octokit/rest": "20.0.2", "@open-wc/dev-server-hmr": "0.1.4", "@rollup/plugin-babel": "6.0.4", diff --git a/yarn.lock b/yarn.lock index 2553804a27fb..744d9e1a4825 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3234,15 +3234,15 @@ __metadata: languageName: node linkType: hard -"@octokit/auth-oauth-device@npm:7.0.0": - version: 7.0.0 - resolution: "@octokit/auth-oauth-device@npm:7.0.0" +"@octokit/auth-oauth-device@npm:7.0.1": + version: 7.0.1 + resolution: "@octokit/auth-oauth-device@npm:7.0.1" dependencies: "@octokit/oauth-methods": "npm:^5.0.0" "@octokit/request": "npm:^9.0.0" "@octokit/types": "npm:^12.0.0" universal-user-agent: "npm:^7.0.0" - checksum: 10/74124b097c6af43e23b84012257210e6c1cc08c97620b5861d45661d52b448bc5e8d3c78309c7a7e878627ceac12e125b7bfe20a11e1ed8754afb90410737f9e + checksum: 10/410051ec666bc9792a9080f9c15c035adda113539db6bd9783e30046bae0297b92b8faab83e04e8ae5c0d9f7260fd516de733b6a4f3ac0cce80fa7462e2b322b languageName: node linkType: hard @@ -3357,16 +3357,16 @@ __metadata: languageName: node linkType: hard -"@octokit/plugin-retry@npm:7.0.1": - version: 7.0.1 - resolution: "@octokit/plugin-retry@npm:7.0.1" +"@octokit/plugin-retry@npm:7.0.2": + version: 7.0.2 + resolution: "@octokit/plugin-retry@npm:7.0.2" dependencies: "@octokit/request-error": "npm:^5.0.0" "@octokit/types": "npm:^12.0.0" bottleneck: "npm:^2.15.3" peerDependencies: "@octokit/core": ">=6" - checksum: 10/38182a9b537d39692302e7595e286e05435556fefc74daa5125e1369fe8256a9dd8c2423f7138ee881f36d404caf53b43f6d4be0821bb7ed095cb99979b558a9 + checksum: 10/dfb753fb3c51c02458d24be95599c69620f29a8304e6dc1b0a7ac024fed28ed96a001639f65e8ceb36557cbc57d968c60eba4288e281ad111eb15956c9c3c199 languageName: node linkType: hard @@ -9655,8 +9655,8 @@ __metadata: "@material/web": "npm:=1.3.0" "@mdi/js": "npm:7.4.47" "@mdi/svg": "npm:7.4.47" - "@octokit/auth-oauth-device": "npm:7.0.0" - "@octokit/plugin-retry": "npm:7.0.1" + "@octokit/auth-oauth-device": "npm:7.0.1" + "@octokit/plugin-retry": "npm:7.0.2" "@octokit/rest": "npm:20.0.2" "@open-wc/dev-server-hmr": "npm:0.1.4" "@polymer/paper-item": "npm:3.0.1" From 94e70f81edb58bb8ad270a20d31cf9880be677e3 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 2 Mar 2024 15:00:33 -0500 Subject: [PATCH 107/425] Update dependency chart.js to v4.4.2 (#19947) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 6bd5c5a462d3..763ba01d5bb3 100644 --- a/package.json +++ b/package.json @@ -98,7 +98,7 @@ "@webcomponents/scoped-custom-element-registry": "0.0.9", "@webcomponents/webcomponentsjs": "2.8.0", "app-datepicker": "5.1.1", - "chart.js": "4.4.1", + "chart.js": "4.4.2", "color-name": "2.0.0", "comlink": "4.4.1", "core-js": "3.36.0", diff --git a/yarn.lock b/yarn.lock index 744d9e1a4825..b5bf90604df8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6480,12 +6480,12 @@ __metadata: languageName: node linkType: hard -"chart.js@npm:4.4.1": - version: 4.4.1 - resolution: "chart.js@npm:4.4.1" +"chart.js@npm:4.4.2": + version: 4.4.2 + resolution: "chart.js@npm:4.4.2" dependencies: "@kurkle/color": "npm:^0.3.0" - checksum: 10/bb58247349ed04b6a38c4c4b45d953d87dab40ecd70dd796da302cbcebf866dfc1ecf7bd32d95ecb44b89dccf9a4cfc6ff84f74ba69b024be9b5bd19b2930fbc + checksum: 10/609444dfc9e847e4c891884309d6083464333e39a7266996fa15f622a44d0c5202c20c86b3bfb1d72b3769096f71c80e131860270c39ce1291cac52b9f45dc6d languageName: node linkType: hard @@ -9702,7 +9702,7 @@ __metadata: babel-loader: "npm:9.1.3" babel-plugin-template-html-minifier: "npm:4.1.0" chai: "npm:5.1.0" - chart.js: "npm:4.4.1" + chart.js: "npm:4.4.2" color-name: "npm:2.0.0" comlink: "npm:4.4.1" core-js: "npm:3.36.0" From a7867a9253227c7874f49f9cfd7ba1c408d184d0 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 2 Mar 2024 21:38:07 -0500 Subject: [PATCH 108/425] Update babel monorepo to v7.24.0 (#19945) --- package.json | 10 +-- yarn.lock | 168 +++++++++++++++++++++++++-------------------------- 2 files changed, 89 insertions(+), 89 deletions(-) diff --git a/package.json b/package.json index 763ba01d5bb3..ec80af06f23a 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "license": "Apache-2.0", "type": "module", "dependencies": { - "@babel/runtime": "7.23.9", + "@babel/runtime": "7.24.0", "@braintree/sanitize-url": "7.0.0", "@codemirror/autocomplete": "6.12.0", "@codemirror/commands": "6.3.3", @@ -150,11 +150,11 @@ "xss": "1.0.14" }, "devDependencies": { - "@babel/core": "7.23.9", + "@babel/core": "7.24.0", "@babel/helper-define-polyfill-provider": "0.5.0", - "@babel/plugin-proposal-decorators": "7.23.9", - "@babel/plugin-transform-runtime": "7.23.9", - "@babel/preset-env": "7.23.9", + "@babel/plugin-proposal-decorators": "7.24.0", + "@babel/plugin-transform-runtime": "7.24.0", + "@babel/preset-env": "7.24.0", "@babel/preset-typescript": "7.23.3", "@bundle-stats/plugin-webpack-filter": "4.10.1", "@koa/cors": "5.0.0", diff --git a/yarn.lock b/yarn.lock index b5bf90604df8..035aaf5d102f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -55,33 +55,33 @@ __metadata: languageName: node linkType: hard -"@babel/compat-data@npm:^7.22.6, @babel/compat-data@npm:^7.23.3, @babel/compat-data@npm:^7.23.5": +"@babel/compat-data@npm:^7.22.6, @babel/compat-data@npm:^7.23.5": version: 7.23.5 resolution: "@babel/compat-data@npm:7.23.5" checksum: 10/088f14f646ecbddd5ef89f120a60a1b3389a50a9705d44603dca77662707d0175a5e0e0da3943c3298f1907a4ab871468656fbbf74bb7842cd8b0686b2c19736 languageName: node linkType: hard -"@babel/core@npm:7.23.9, @babel/core@npm:^7.0.0, @babel/core@npm:^7.11.1, @babel/core@npm:^7.12.3": - version: 7.23.9 - resolution: "@babel/core@npm:7.23.9" +"@babel/core@npm:7.24.0, @babel/core@npm:^7.0.0, @babel/core@npm:^7.11.1, @babel/core@npm:^7.12.3": + version: 7.24.0 + resolution: "@babel/core@npm:7.24.0" dependencies: "@ampproject/remapping": "npm:^2.2.0" "@babel/code-frame": "npm:^7.23.5" "@babel/generator": "npm:^7.23.6" "@babel/helper-compilation-targets": "npm:^7.23.6" "@babel/helper-module-transforms": "npm:^7.23.3" - "@babel/helpers": "npm:^7.23.9" - "@babel/parser": "npm:^7.23.9" - "@babel/template": "npm:^7.23.9" - "@babel/traverse": "npm:^7.23.9" - "@babel/types": "npm:^7.23.9" + "@babel/helpers": "npm:^7.24.0" + "@babel/parser": "npm:^7.24.0" + "@babel/template": "npm:^7.24.0" + "@babel/traverse": "npm:^7.24.0" + "@babel/types": "npm:^7.24.0" convert-source-map: "npm:^2.0.0" debug: "npm:^4.1.0" gensync: "npm:^1.0.0-beta.2" json5: "npm:^2.2.3" semver: "npm:^6.3.1" - checksum: 10/268cdbb86bef1b8ea5b1300f2f325e56a1740a5051360cb228ffeaa0f80282b6674f3a2b4d6466adb0691183759b88d4c37b4a4f77232c84a49ed771c84cdc27 + checksum: 10/1e22215cc89e061e0cbfed72f265ad24d363f3e9b24b51e9c4cf3ccb9222260a29a1c1e62edb439cb7e2229a3fce924edd43300500416613236c13fc8d62a947 languageName: node linkType: hard @@ -128,9 +128,9 @@ __metadata: languageName: node linkType: hard -"@babel/helper-create-class-features-plugin@npm:^7.22.15, @babel/helper-create-class-features-plugin@npm:^7.23.9": - version: 7.23.9 - resolution: "@babel/helper-create-class-features-plugin@npm:7.23.9" +"@babel/helper-create-class-features-plugin@npm:^7.22.15, @babel/helper-create-class-features-plugin@npm:^7.24.0": + version: 7.24.0 + resolution: "@babel/helper-create-class-features-plugin@npm:7.24.0" dependencies: "@babel/helper-annotate-as-pure": "npm:^7.22.5" "@babel/helper-environment-visitor": "npm:^7.22.20" @@ -143,7 +143,7 @@ __metadata: semver: "npm:^6.3.1" peerDependencies: "@babel/core": ^7.0.0 - checksum: 10/91c8aa8888780bd90aa50f511917cb0953ccd61b2ea4abf61915c1d68d99bb14b472969a8ae5b391d7890759dfc22be79104297be07919c38351714a4ce2fe74 + checksum: 10/de74a2689ca35d7c11a9080e8f3cd68e36d2a3fc254d3d826d1eb45bc9a3354c093dd830b5dde067acc8ff7a50d9c1f9d826fb75b546d280c6e821059976ab79 languageName: node linkType: hard @@ -243,10 +243,10 @@ __metadata: languageName: node linkType: hard -"@babel/helper-plugin-utils@npm:^7.0.0, @babel/helper-plugin-utils@npm:^7.10.4, @babel/helper-plugin-utils@npm:^7.12.13, @babel/helper-plugin-utils@npm:^7.14.5, @babel/helper-plugin-utils@npm:^7.18.6, @babel/helper-plugin-utils@npm:^7.22.5, @babel/helper-plugin-utils@npm:^7.8.0, @babel/helper-plugin-utils@npm:^7.8.3": - version: 7.22.5 - resolution: "@babel/helper-plugin-utils@npm:7.22.5" - checksum: 10/ab220db218089a2aadd0582f5833fd17fa300245999f5f8784b10f5a75267c4e808592284a29438a0da365e702f05acb369f99e1c915c02f9f9210ec60eab8ea +"@babel/helper-plugin-utils@npm:^7.0.0, @babel/helper-plugin-utils@npm:^7.10.4, @babel/helper-plugin-utils@npm:^7.12.13, @babel/helper-plugin-utils@npm:^7.14.5, @babel/helper-plugin-utils@npm:^7.18.6, @babel/helper-plugin-utils@npm:^7.22.5, @babel/helper-plugin-utils@npm:^7.24.0, @babel/helper-plugin-utils@npm:^7.8.0, @babel/helper-plugin-utils@npm:^7.8.3": + version: 7.24.0 + resolution: "@babel/helper-plugin-utils@npm:7.24.0" + checksum: 10/dc8c7af321baf7653d93315beffee1790eb2c464b4f529273a24c8743a3f3095bf3f2d11828cb2c52d56282ef43a4bdc67a79c9ab8dd845e35d01871f3f28a0e languageName: node linkType: hard @@ -335,14 +335,14 @@ __metadata: languageName: node linkType: hard -"@babel/helpers@npm:^7.23.9": - version: 7.23.9 - resolution: "@babel/helpers@npm:7.23.9" +"@babel/helpers@npm:^7.24.0": + version: 7.24.0 + resolution: "@babel/helpers@npm:7.24.0" dependencies: - "@babel/template": "npm:^7.23.9" - "@babel/traverse": "npm:^7.23.9" - "@babel/types": "npm:^7.23.9" - checksum: 10/dd56daac8bbd7ed174bb00fd185926fd449e591d9a00edaceb7ac6edbdd7a8db57e2cb365b4fafda382201752789ced2f7ae010f667eab0f198a4571cda4d2c5 + "@babel/template": "npm:^7.24.0" + "@babel/traverse": "npm:^7.24.0" + "@babel/types": "npm:^7.24.0" + checksum: 10/cc82012161b30185c2698da359c7311cf019f0932f8fcb805e985fec9e0053c354f0534dc9961f3170eee579df6724eecd34b0f5ffaa155cdd456af59fbff86e languageName: node linkType: hard @@ -357,12 +357,12 @@ __metadata: languageName: node linkType: hard -"@babel/parser@npm:^7.23.5, @babel/parser@npm:^7.23.9": - version: 7.23.9 - resolution: "@babel/parser@npm:7.23.9" +"@babel/parser@npm:^7.23.5, @babel/parser@npm:^7.24.0": + version: 7.24.0 + resolution: "@babel/parser@npm:7.24.0" bin: parser: ./bin/babel-parser.js - checksum: 10/727a7a807100f6a26df859e2f009c4ddbd0d3363287b45daa50bd082ccd0d431d0c4d0e610a91f806e04a1918726cd0f5a0592c9b902a815337feed12e1cafd9 + checksum: 10/3e5ebb903a6f71629a9d0226743e37fe3d961e79911d2698b243637f66c4df7e3e0a42c07838bc0e7cc9fcd585d9be8f4134a145b9459ee4a459420fb0d1360b languageName: node linkType: hard @@ -402,16 +402,16 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-proposal-decorators@npm:7.23.9": - version: 7.23.9 - resolution: "@babel/plugin-proposal-decorators@npm:7.23.9" +"@babel/plugin-proposal-decorators@npm:7.24.0": + version: 7.24.0 + resolution: "@babel/plugin-proposal-decorators@npm:7.24.0" dependencies: - "@babel/helper-create-class-features-plugin": "npm:^7.23.9" - "@babel/helper-plugin-utils": "npm:^7.22.5" - "@babel/plugin-syntax-decorators": "npm:^7.23.3" + "@babel/helper-create-class-features-plugin": "npm:^7.24.0" + "@babel/helper-plugin-utils": "npm:^7.24.0" + "@babel/plugin-syntax-decorators": "npm:^7.24.0" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10/256a060d2346da10afdcc32d3c4939183bd8865367a64893c739174c4d247b586204dd0b7927d20e90f73714ac7d7a1a5f4740f827ef8e0277697bd626df59dc + checksum: 10/c35eab2e5c2c3f75253f599edc6d78eaa8525f97e68febac32ef1d68fba9dd51b8ff887ebee3f4713d120e14eb26b4a41c6fca7ec1656138a5d0767ab98e8642 languageName: node linkType: hard @@ -457,14 +457,14 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-syntax-decorators@npm:^7.23.3": - version: 7.23.3 - resolution: "@babel/plugin-syntax-decorators@npm:7.23.3" +"@babel/plugin-syntax-decorators@npm:^7.24.0": + version: 7.24.0 + resolution: "@babel/plugin-syntax-decorators@npm:7.24.0" dependencies: - "@babel/helper-plugin-utils": "npm:^7.22.5" + "@babel/helper-plugin-utils": "npm:^7.24.0" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10/5856e236f7ae15a58c839fd40df1aa4df31029048df01191b4870c34b1bff44c77fbee78ca5edd8eb3c81410005d8f9a36a9cf48094f2bb328592304a738648a + checksum: 10/2f09c5545715cea7b92848a3917cb1483b0a736b6451cca03adfe78f63263e647aefac686a8f44d8ee6ee4466704bea6cd80277dbceff5efc86b90e83b459a34 languageName: node linkType: hard @@ -1010,18 +1010,18 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-object-rest-spread@npm:^7.23.4": - version: 7.23.4 - resolution: "@babel/plugin-transform-object-rest-spread@npm:7.23.4" +"@babel/plugin-transform-object-rest-spread@npm:^7.24.0": + version: 7.24.0 + resolution: "@babel/plugin-transform-object-rest-spread@npm:7.24.0" dependencies: - "@babel/compat-data": "npm:^7.23.3" - "@babel/helper-compilation-targets": "npm:^7.22.15" - "@babel/helper-plugin-utils": "npm:^7.22.5" + "@babel/compat-data": "npm:^7.23.5" + "@babel/helper-compilation-targets": "npm:^7.23.6" + "@babel/helper-plugin-utils": "npm:^7.24.0" "@babel/plugin-syntax-object-rest-spread": "npm:^7.8.3" "@babel/plugin-transform-parameters": "npm:^7.23.3" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10/656f09c4ec629856e807d5b386559166ae417ff75943abce19656b2c6de5101dfd0aaf23f9074e854339370b4e09f57518d3202457046ee5b567ded531005479 + checksum: 10/1dfafd9461723769b29f724fcbdca974c4280f68a9e03c8ff412643ffe88930755f093f9cbf919cdb6d0d53751614892dd2882bccad286e14e9e995c5a8242ed languageName: node linkType: hard @@ -1133,19 +1133,19 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-runtime@npm:7.23.9": - version: 7.23.9 - resolution: "@babel/plugin-transform-runtime@npm:7.23.9" +"@babel/plugin-transform-runtime@npm:7.24.0": + version: 7.24.0 + resolution: "@babel/plugin-transform-runtime@npm:7.24.0" dependencies: "@babel/helper-module-imports": "npm:^7.22.15" - "@babel/helper-plugin-utils": "npm:^7.22.5" + "@babel/helper-plugin-utils": "npm:^7.24.0" babel-plugin-polyfill-corejs2: "npm:^0.4.8" babel-plugin-polyfill-corejs3: "npm:^0.9.0" babel-plugin-polyfill-regenerator: "npm:^0.5.5" semver: "npm:^6.3.1" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10/d942e5852f100d0de5021c4d1fda9e30c28b94aa846e09588476dd82c058fb6869a30be0cf915362bf23b5f3504aa150ca3c3b0299dbd0a86b3b1f5f744c2333 + checksum: 10/162c59982d1c6df45458c6a449f305d1b61b113bb2bbdad6bb19e41390749f118edb225f68bedf90ae1e8d32abefe7314480ad1ca770bc916cd15c46724a1458 languageName: node linkType: hard @@ -1266,13 +1266,13 @@ __metadata: languageName: node linkType: hard -"@babel/preset-env@npm:7.23.9, @babel/preset-env@npm:^7.0.0, @babel/preset-env@npm:^7.11.0": - version: 7.23.9 - resolution: "@babel/preset-env@npm:7.23.9" +"@babel/preset-env@npm:7.24.0, @babel/preset-env@npm:^7.0.0, @babel/preset-env@npm:^7.11.0": + version: 7.24.0 + resolution: "@babel/preset-env@npm:7.24.0" dependencies: "@babel/compat-data": "npm:^7.23.5" "@babel/helper-compilation-targets": "npm:^7.23.6" - "@babel/helper-plugin-utils": "npm:^7.22.5" + "@babel/helper-plugin-utils": "npm:^7.24.0" "@babel/helper-validator-option": "npm:^7.23.5" "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "npm:^7.23.3" "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "npm:^7.23.3" @@ -1325,7 +1325,7 @@ __metadata: "@babel/plugin-transform-new-target": "npm:^7.23.3" "@babel/plugin-transform-nullish-coalescing-operator": "npm:^7.23.4" "@babel/plugin-transform-numeric-separator": "npm:^7.23.4" - "@babel/plugin-transform-object-rest-spread": "npm:^7.23.4" + "@babel/plugin-transform-object-rest-spread": "npm:^7.24.0" "@babel/plugin-transform-object-super": "npm:^7.23.3" "@babel/plugin-transform-optional-catch-binding": "npm:^7.23.4" "@babel/plugin-transform-optional-chaining": "npm:^7.23.4" @@ -1352,7 +1352,7 @@ __metadata: semver: "npm:^6.3.1" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10/0214ac9434a2496eac7f56c0c91164421232ff2083a66e1ccab633ca91e262828e54a5cbdb9036e8fe53d53530b6597aa98c99de8ff07b5193ffd95f21dc9d2c + checksum: 10/88bca150a09e658124997178ee1ff375a9aceecfd70ec11c7ccc12e82f5be5f7ff2ddfefba5b10fb617891645f92949392b350509de9742d2aa138f42959e190 languageName: node linkType: hard @@ -1391,29 +1391,29 @@ __metadata: languageName: node linkType: hard -"@babel/runtime@npm:7.23.9, @babel/runtime@npm:^7.10.2, @babel/runtime@npm:^7.11.2, @babel/runtime@npm:^7.21.0, @babel/runtime@npm:^7.7.2, @babel/runtime@npm:^7.8.4": - version: 7.23.9 - resolution: "@babel/runtime@npm:7.23.9" +"@babel/runtime@npm:7.24.0, @babel/runtime@npm:^7.10.2, @babel/runtime@npm:^7.11.2, @babel/runtime@npm:^7.21.0, @babel/runtime@npm:^7.7.2, @babel/runtime@npm:^7.8.4": + version: 7.24.0 + resolution: "@babel/runtime@npm:7.24.0" dependencies: regenerator-runtime: "npm:^0.14.0" - checksum: 10/9a520fe1bf72249f7dd60ff726434251858de15cccfca7aa831bd19d0d3fb17702e116ead82724659b8da3844977e5e13de2bae01eb8a798f2823a669f122be6 + checksum: 10/8d32c7e116606ea322b89f9fde8ffae6be9503b549dc0d0abb38bd9dc26e87469b9fb7a66964cc089ee558fd0a97d304fb0a3cfec140694764fb0d71b6a6f5e4 languageName: node linkType: hard -"@babel/template@npm:^7.22.15, @babel/template@npm:^7.23.9": - version: 7.23.9 - resolution: "@babel/template@npm:7.23.9" +"@babel/template@npm:^7.22.15, @babel/template@npm:^7.24.0": + version: 7.24.0 + resolution: "@babel/template@npm:7.24.0" dependencies: "@babel/code-frame": "npm:^7.23.5" - "@babel/parser": "npm:^7.23.9" - "@babel/types": "npm:^7.23.9" - checksum: 10/1b011ba9354dc2e646561d54b6862e0df51760e6179faadd79be05825b0b6da04911e4e192df943f1766748da3037fd8493615b38707f7cadb0cf0c96601c170 + "@babel/parser": "npm:^7.24.0" + "@babel/types": "npm:^7.24.0" + checksum: 10/8c538338c7de8fac8ada691a5a812bdcbd60bd4a4eb5adae2cc9ee19773e8fb1a724312a00af9e1ce49056ffd3c3475e7287b5668cf6360bfb3f8ac827a06ffe languageName: node linkType: hard -"@babel/traverse@npm:^7.23.9": - version: 7.23.9 - resolution: "@babel/traverse@npm:7.23.9" +"@babel/traverse@npm:^7.24.0": + version: 7.24.0 + resolution: "@babel/traverse@npm:7.24.0" dependencies: "@babel/code-frame": "npm:^7.23.5" "@babel/generator": "npm:^7.23.6" @@ -1421,22 +1421,22 @@ __metadata: "@babel/helper-function-name": "npm:^7.23.0" "@babel/helper-hoist-variables": "npm:^7.22.5" "@babel/helper-split-export-declaration": "npm:^7.22.6" - "@babel/parser": "npm:^7.23.9" - "@babel/types": "npm:^7.23.9" + "@babel/parser": "npm:^7.24.0" + "@babel/types": "npm:^7.24.0" debug: "npm:^4.3.1" globals: "npm:^11.1.0" - checksum: 10/e2bb845f7f229feb7c338f7e150f5f1abc5395dcd3a6a47f63a25242ec3ec6b165f04a6df7d4849468547faee34eb3cf52487eb0bd867a7d3c42fec2a648266f + checksum: 10/5cc482248ebb79adcbcf021aab4e0e95bafe2a1736ee4b46abe6f88b59848ad73e15e219db8f06c9a33a14c64257e5b47e53876601e998a8c596accb1b7f4996 languageName: node linkType: hard -"@babel/types@npm:^7.22.15, @babel/types@npm:^7.22.19, @babel/types@npm:^7.22.5, @babel/types@npm:^7.23.0, @babel/types@npm:^7.23.6, @babel/types@npm:^7.23.9, @babel/types@npm:^7.4.4, @babel/types@npm:^7.8.3": - version: 7.23.9 - resolution: "@babel/types@npm:7.23.9" +"@babel/types@npm:^7.22.15, @babel/types@npm:^7.22.19, @babel/types@npm:^7.22.5, @babel/types@npm:^7.23.0, @babel/types@npm:^7.23.6, @babel/types@npm:^7.24.0, @babel/types@npm:^7.4.4, @babel/types@npm:^7.8.3": + version: 7.24.0 + resolution: "@babel/types@npm:7.24.0" dependencies: "@babel/helper-string-parser": "npm:^7.23.4" "@babel/helper-validator-identifier": "npm:^7.22.20" to-fast-properties: "npm:^2.0.0" - checksum: 10/bed9634e5fd0f9dc63c84cfa83316c4cb617192db9fedfea464fca743affe93736d7bf2ebf418ee8358751a9d388e303af87a0c050cb5d87d5870c1b0154f6cb + checksum: 10/a0b4875ce2e132f9daff0d5b27c7f4c4fcc97f2b084bdc5834e92c9d32592778489029e65d99d00c406da612d87b72d7a236c0afccaa1435c028d0c94c9b6da4 languageName: node linkType: hard @@ -9587,13 +9587,13 @@ __metadata: version: 0.0.0-use.local resolution: "home-assistant-frontend@workspace:." dependencies: - "@babel/core": "npm:7.23.9" + "@babel/core": "npm:7.24.0" "@babel/helper-define-polyfill-provider": "npm:0.5.0" - "@babel/plugin-proposal-decorators": "npm:7.23.9" - "@babel/plugin-transform-runtime": "npm:7.23.9" - "@babel/preset-env": "npm:7.23.9" + "@babel/plugin-proposal-decorators": "npm:7.24.0" + "@babel/plugin-transform-runtime": "npm:7.24.0" + "@babel/preset-env": "npm:7.24.0" "@babel/preset-typescript": "npm:7.23.3" - "@babel/runtime": "npm:7.23.9" + "@babel/runtime": "npm:7.24.0" "@braintree/sanitize-url": "npm:7.0.0" "@bundle-stats/plugin-webpack-filter": "npm:4.10.1" "@codemirror/autocomplete": "npm:6.12.0" From edbe6851f768296b2fba3f254a554cc0cadf638e Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 3 Mar 2024 12:42:30 -0500 Subject: [PATCH 109/425] Update dependency @types/chromecast-caf-sender to v1.0.9 (#19960) --- package.json | 2 +- yarn.lock | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index ec80af06f23a..8cb0f065f3ee 100644 --- a/package.json +++ b/package.json @@ -170,7 +170,7 @@ "@rollup/plugin-replace": "5.0.5", "@types/babel__plugin-transform-runtime": "7.9.5", "@types/chromecast-caf-receiver": "6.0.13", - "@types/chromecast-caf-sender": "1.0.8", + "@types/chromecast-caf-sender": "1.0.9", "@types/color-name": "1.1.3", "@types/glob": "8.1.0", "@types/html-minifier-terser": "7.0.2", diff --git a/yarn.lock b/yarn.lock index 035aaf5d102f..0fb7286dd757 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4020,12 +4020,12 @@ __metadata: languageName: node linkType: hard -"@types/chromecast-caf-sender@npm:1.0.8": - version: 1.0.8 - resolution: "@types/chromecast-caf-sender@npm:1.0.8" +"@types/chromecast-caf-sender@npm:1.0.9": + version: 1.0.9 + resolution: "@types/chromecast-caf-sender@npm:1.0.9" dependencies: "@types/chrome": "npm:*" - checksum: 10/68a2d7c7e4668756e7895c81c4edf59bfbd58be30196dd73bac411d56b2fa60c33eac0afdda9b6219ca2512fb7ef93d9cc86c18064465e22e6e3bd0907b09199 + checksum: 10/a3a3f1bb3da0f56901d5606cec7ab7c375d6d039d4e5e7e669c9630bb1beee10c7f1fc04512bc959b8a91047f4414df00287db351bf305a6d37b476bb3d6df98 languageName: node linkType: hard @@ -9671,7 +9671,7 @@ __metadata: "@thomasloven/round-slider": "npm:0.6.0" "@types/babel__plugin-transform-runtime": "npm:7.9.5" "@types/chromecast-caf-receiver": "npm:6.0.13" - "@types/chromecast-caf-sender": "npm:1.0.8" + "@types/chromecast-caf-sender": "npm:1.0.9" "@types/color-name": "npm:1.1.3" "@types/glob": "npm:8.1.0" "@types/html-minifier-terser": "npm:7.0.2" From 99c2dd976560e4e6123d9071d235c1d8ac2e8017 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 3 Mar 2024 12:43:34 -0500 Subject: [PATCH 110/425] Update dependency @bundle-stats/plugin-webpack-filter to v4.12.0 (#19957) --- package.json | 2 +- yarn.lock | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 8cb0f065f3ee..e6d21d5a8f3a 100644 --- a/package.json +++ b/package.json @@ -156,7 +156,7 @@ "@babel/plugin-transform-runtime": "7.24.0", "@babel/preset-env": "7.24.0", "@babel/preset-typescript": "7.23.3", - "@bundle-stats/plugin-webpack-filter": "4.10.1", + "@bundle-stats/plugin-webpack-filter": "4.12.0", "@koa/cors": "5.0.0", "@lokalise/node-api": "12.1.0", "@octokit/auth-oauth-device": "7.0.1", diff --git a/yarn.lock b/yarn.lock index 0fb7286dd757..4c5fdf097808 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1447,12 +1447,12 @@ __metadata: languageName: node linkType: hard -"@bundle-stats/plugin-webpack-filter@npm:4.10.1": - version: 4.10.1 - resolution: "@bundle-stats/plugin-webpack-filter@npm:4.10.1" +"@bundle-stats/plugin-webpack-filter@npm:4.12.0": + version: 4.12.0 + resolution: "@bundle-stats/plugin-webpack-filter@npm:4.12.0" peerDependencies: core-js: ^3.0.0 - checksum: 10/f389188a27a01b8c353bb8b90a3c9fe1eabf4c24ed9f28c52e4063204780490dfd73df109d55ac0b0331a82b61705c0f3dac68b04fe50fcbd0e4e2efff2eda89 + checksum: 10/d0deaad865d234db539db1d3942a82a3d8233179e6a44896d00c049f3f25d9873b0ec6ee9fc11b1a35ed6af7b0d7107e23c97813408d5323259b48d01faa8c73 languageName: node linkType: hard @@ -9595,7 +9595,7 @@ __metadata: "@babel/preset-typescript": "npm:7.23.3" "@babel/runtime": "npm:7.24.0" "@braintree/sanitize-url": "npm:7.0.0" - "@bundle-stats/plugin-webpack-filter": "npm:4.10.1" + "@bundle-stats/plugin-webpack-filter": "npm:4.12.0" "@codemirror/autocomplete": "npm:6.12.0" "@codemirror/commands": "npm:6.3.3" "@codemirror/language": "npm:6.10.1" From 05c1328ca763086cda6dc6831d360f3f0be26d73 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 3 Mar 2024 17:03:18 -0500 Subject: [PATCH 111/425] Update dependency gulp-merge-json to v2.2.1 (#19942) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 101 ++++++++++++++++++++++++++++++++++++++++++++++----- 2 files changed, 92 insertions(+), 11 deletions(-) diff --git a/package.json b/package.json index e6d21d5a8f3a..0739e2e7d380 100644 --- a/package.json +++ b/package.json @@ -210,7 +210,7 @@ "gulp": "4.0.2", "gulp-flatmap": "1.0.2", "gulp-json-transform": "0.5.0", - "gulp-merge-json": "2.1.2", + "gulp-merge-json": "2.2.1", "gulp-rename": "2.0.0", "gulp-zopfli-green": "6.0.1", "html-minifier-terser": "7.2.0", diff --git a/yarn.lock b/yarn.lock index 4c5fdf097808..3f23111d8572 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6077,6 +6077,13 @@ __metadata: languageName: node linkType: hard +"bare-events@npm:^2.2.0": + version: 2.2.1 + resolution: "bare-events@npm:2.2.1" + checksum: 10/a2c96a638e5a049960e42660320bcd9e3c5e83da2072e4c05080661219eae744931751be86c814590dcce5107c30cbb60dc2d15097b1b14e2f42db1cd9b80898 + languageName: node + linkType: hard + "base64-js@npm:^1.3.0, base64-js@npm:^1.3.1": version: 1.5.1 resolution: "base64-js@npm:1.5.1" @@ -8486,6 +8493,13 @@ __metadata: languageName: node linkType: hard +"fast-fifo@npm:^1.1.0": + version: 1.3.2 + resolution: "fast-fifo@npm:1.3.2" + checksum: 10/6bfcba3e4df5af7be3332703b69a7898a8ed7020837ec4395bb341bd96cc3a6d86c3f6071dd98da289618cf2234c70d84b2a6f09a33dd6f988b1ff60d8e54275 + languageName: node + linkType: hard + "fast-glob@npm:^3.2.11, fast-glob@npm:^3.2.2, fast-glob@npm:^3.2.9, fast-glob@npm:^3.3.0": version: 3.3.1 resolution: "fast-glob@npm:3.3.1" @@ -9394,16 +9408,17 @@ __metadata: languageName: node linkType: hard -"gulp-merge-json@npm:2.1.2": - version: 2.1.2 - resolution: "gulp-merge-json@npm:2.1.2" +"gulp-merge-json@npm:2.2.1": + version: 2.2.1 + resolution: "gulp-merge-json@npm:2.2.1" dependencies: - json5: "npm:^2.2.1" + json5: "npm:^2.2.3" + lodash.clonedeep: "npm:^4.5.0" lodash.mergewith: "npm:^4.6.1" - plugin-error: "npm:^1.0.1" + plugin-error: "npm:^2.0.1" through: "npm:^2.3.8" - vinyl: "npm:^2.2.1" - checksum: 10/21325538cf882306e13aa4079913eb17d22605b91361d400ea9b7c8917c3b2782020199b219dfbac582205d8104ea283a9c385e32c25125cd456f01e0b0c04e6 + vinyl: "npm:^3.0.0" + checksum: 10/fe87fd2101d0a35f2c5d488d546affaa6115d3be376fcf07b56029eed22ccfa8811206ac8bdf13ff79e5f518d0a65d886506204d2bdc3c0f871dc7cfa82c75eb languageName: node linkType: hard @@ -9732,7 +9747,7 @@ __metadata: gulp: "npm:4.0.2" gulp-flatmap: "npm:1.0.2" gulp-json-transform: "npm:0.5.0" - gulp-merge-json: "npm:2.1.2" + gulp-merge-json: "npm:2.2.1" gulp-rename: "npm:2.0.0" gulp-zopfli-green: "npm:6.0.1" hls.js: "npm:1.5.7" @@ -11038,7 +11053,7 @@ __metadata: languageName: node linkType: hard -"json5@npm:^2.2.0, json5@npm:^2.2.1, json5@npm:^2.2.3": +"json5@npm:^2.2.0, json5@npm:^2.2.3": version: 2.2.3 resolution: "json5@npm:2.2.3" bin: @@ -11540,6 +11555,13 @@ __metadata: languageName: node linkType: hard +"lodash.clonedeep@npm:^4.5.0": + version: 4.5.0 + resolution: "lodash.clonedeep@npm:4.5.0" + checksum: 10/957ed243f84ba6791d4992d5c222ffffca339a3b79dbe81d2eaf0c90504160b500641c5a0f56e27630030b18b8e971ea10b44f928a977d5ced3c8948841b555f + languageName: node + linkType: hard + "lodash.debounce@npm:^4.0.8": version: 4.0.8 resolution: "lodash.debounce@npm:4.0.8" @@ -13212,6 +13234,15 @@ __metadata: languageName: node linkType: hard +"plugin-error@npm:^2.0.1": + version: 2.0.1 + resolution: "plugin-error@npm:2.0.1" + dependencies: + ansi-colors: "npm:^1.0.1" + checksum: 10/9a4f91461cd24cce401112098969991d7aa6b4c94f78e0381234280c07da779570a8b21ab143292b534ec0117c09705a67e5d756c1c303d4706fdd7f861bf5bc + languageName: node + linkType: hard + "pngjs@npm:^3.0.0, pngjs@npm:^3.3.3": version: 3.4.0 resolution: "pngjs@npm:3.4.0" @@ -13432,6 +13463,13 @@ __metadata: languageName: node linkType: hard +"queue-tick@npm:^1.0.1": + version: 1.0.1 + resolution: "queue-tick@npm:1.0.1" + checksum: 10/f447926c513b64a857906f017a3b350f7d11277e3c8d2a21a42b7998fa1a613d7a829091e12d142bb668905c8f68d8103416c7197856efb0c72fa835b8e254b5 + languageName: node + linkType: hard + "randombytes@npm:^2.1.0": version: 2.1.0 resolution: "randombytes@npm:2.1.0" @@ -13703,6 +13741,13 @@ __metadata: languageName: node linkType: hard +"replace-ext@npm:^2.0.0": + version: 2.0.0 + resolution: "replace-ext@npm:2.0.0" + checksum: 10/ed640ac90d24cce4be977642847d138908d430049cc097633be33b072143515cc7d29699675a0c35f6dc3c3c73cb529ed352d59649cf15931740eb31ae083c1e + languageName: node + linkType: hard + "replace-homedir@npm:^1.0.0": version: 1.0.0 resolution: "replace-homedir@npm:1.0.0" @@ -14798,6 +14843,20 @@ __metadata: languageName: node linkType: hard +"streamx@npm:^2.12.5": + version: 2.16.1 + resolution: "streamx@npm:2.16.1" + dependencies: + bare-events: "npm:^2.2.0" + fast-fifo: "npm:^1.1.0" + queue-tick: "npm:^1.0.1" + dependenciesMeta: + bare-events: + optional: true + checksum: 10/f6d0899adf089385d9c58a630fc705dc6c3931b18181c32860e5013955a339a3b763a4df62168f37c7fc56b1f7bb2a38db989fa9df487995278cb5d46f248da6 + languageName: node + linkType: hard + "string-argv@npm:0.3.2": version: 0.3.2 resolution: "string-argv@npm:0.3.2" @@ -15119,6 +15178,15 @@ __metadata: languageName: node linkType: hard +"teex@npm:^1.0.1": + version: 1.0.1 + resolution: "teex@npm:1.0.1" + dependencies: + streamx: "npm:^2.12.5" + checksum: 10/36bf7ce8bb5eb428ad7b14b695ee7fb0a02f09c1a9d8181cc42531208543a920b299d711bf78dad4ff9bcf36ac437ae8e138053734746076e3e0e7d6d76eef64 + languageName: node + linkType: hard + "temp-dir@npm:^2.0.0": version: 2.0.0 resolution: "temp-dir@npm:2.0.0" @@ -16067,7 +16135,7 @@ __metadata: languageName: node linkType: hard -"vinyl@npm:^2.0.0, vinyl@npm:^2.1.0, vinyl@npm:^2.2.1": +"vinyl@npm:^2.0.0, vinyl@npm:^2.1.0": version: 2.2.1 resolution: "vinyl@npm:2.2.1" dependencies: @@ -16081,6 +16149,19 @@ __metadata: languageName: node linkType: hard +"vinyl@npm:^3.0.0": + version: 3.0.0 + resolution: "vinyl@npm:3.0.0" + dependencies: + clone: "npm:^2.1.2" + clone-stats: "npm:^1.0.0" + remove-trailing-separator: "npm:^1.1.0" + replace-ext: "npm:^2.0.0" + teex: "npm:^1.0.1" + checksum: 10/3371947a92c4b65c7adb944b22586480ffc723ec62347d09b64e593193cb523ce5f472d52549f0e0bbfa82db6c320cae46739461594b0602bba0419d0d7800fb + languageName: node + linkType: hard + "vis-data@npm:7.1.9": version: 7.1.9 resolution: "vis-data@npm:7.1.9" From 19d50b9c923cadbff1c1452697168dbce3c9a713 Mon Sep 17 00:00:00 2001 From: karwosts <32912880+karwosts@users.noreply.github.com> Date: Mon, 4 Mar 2024 09:02:32 -0500 Subject: [PATCH 112/425] Support max_devices for energy-devices-detail-graph (#19936) * Support max_devices for energy-devices-detail-graph * responsive ui editor --- .../hui-energy-devices-detail-graph-card.ts | 54 +++++++++++-------- 1 file changed, 33 insertions(+), 21 deletions(-) diff --git a/src/panels/lovelace/cards/energy/hui-energy-devices-detail-graph-card.ts b/src/panels/lovelace/cards/energy/hui-energy-devices-detail-graph-card.ts index 5bd0e8ce33b0..1d585f2d57e2 100644 --- a/src/panels/lovelace/cards/energy/hui-energy-devices-detail-graph-card.ts +++ b/src/panels/lovelace/cards/energy/hui-energy-devices-detail-graph-card.ts @@ -96,7 +96,10 @@ export class HuiEnergyDevicesDetailGraphCard } protected willUpdate(changedProps: PropertyValues) { - if (changedProps.has("_hiddenStats") && this._data) { + if ( + (changedProps.has("_hiddenStats") || changedProps.has("_config")) && + this._data + ) { this._processStatistics(); } } @@ -217,17 +220,17 @@ export class HuiEnergyDevicesDetailGraphCard const datasets: ChartDataset<"bar", ScatterDataPoint[]>[] = []; const datasetExtras: ChartDatasetExtra[] = []; - datasets.push( - ...this._processDataSet( + const { data: processedData, dataExtras: processedDataExtras } = + this._processDataSet( data, energyData.statsMetadata, energyData.prefs.device_consumption, sorted_devices - ) - ); + ); + + datasets.push(...processedData); - const items = datasets.length; - datasetExtras.push(...Array(items).fill({})); + datasetExtras.push(...processedDataExtras); if (compareData) { // Add empty dataset to align the bars @@ -247,18 +250,19 @@ export class HuiEnergyDevicesDetailGraphCard show_legend: false, }); - datasets.push( - ...this._processDataSet( - compareData, - energyData.statsMetadata, - energyData.prefs.device_consumption, - sorted_devices, - true - ) - ); - datasetExtras.push( - ...Array(items).fill({ show_legend: false }) + const { + data: processedCompareData, + dataExtras: processedCompareDataExtras, + } = this._processDataSet( + compareData, + energyData.statsMetadata, + energyData.prefs.device_consumption, + sorted_devices, + true ); + + datasets.push(...processedCompareData); + datasetExtras.push(...processedCompareDataExtras); } this._start = energyData.start; @@ -281,6 +285,7 @@ export class HuiEnergyDevicesDetailGraphCard compare = false ) { const data: ChartDataset<"bar", ScatterDataPoint[]>[] = []; + const dataExtras: ChartDatasetExtra[] = []; devices.forEach((source, idx) => { const color = getColorByIndex(idx); @@ -317,23 +322,30 @@ export class HuiEnergyDevicesDetailGraphCard } } + const order = sorted_devices.indexOf(source.stat_consumption); + const itemExceedsMax = !!( + this._config?.max_devices && order >= this._config.max_devices + ); + data.push({ label: getStatisticLabel( this.hass, source.stat_consumption, statisticsMetaData[source.stat_consumption] ), - hidden: this._hiddenStats.has(source.stat_consumption), + hidden: + this._hiddenStats.has(source.stat_consumption) || itemExceedsMax, borderColor: compare ? color + "7F" : color, backgroundColor: compare ? color + "32" : color + "7F", data: consumptionData, - order: 1 + sorted_devices.indexOf(source.stat_consumption), + order: 1 + order, stack: "devices", pointStyle: compare ? false : "circle", xAxisID: compare ? "xAxisCompare" : undefined, }); + dataExtras.push({ show_legend: !compare && !itemExceedsMax }); }); - return data; + return { data, dataExtras }; } static get styles(): CSSResultGroup { From 70146a08c1d6179d6af64162b805ae9750ede4dd Mon Sep 17 00:00:00 2001 From: Paul Bottein Date: Mon, 4 Mar 2024 15:04:20 +0100 Subject: [PATCH 113/425] Make migration warning alert sticky at the top for views (#19970) --- .../view-editor/hui-dialog-edit-view.ts | 45 ++++++++----------- 1 file changed, 19 insertions(+), 26 deletions(-) diff --git a/src/panels/lovelace/editor/view-editor/hui-dialog-edit-view.ts b/src/panels/lovelace/editor/view-editor/hui-dialog-edit-view.ts index a4ba863a12f9..4d67c4dbf67c 100644 --- a/src/panels/lovelace/editor/view-editor/hui-dialog-edit-view.ts +++ b/src/panels/lovelace/editor/view-editor/hui-dialog-edit-view.ts @@ -57,8 +57,6 @@ import { EditViewDialogParams } from "./show-edit-view-dialog"; export class HuiDialogEditView extends LitElement { @property({ attribute: false }) public hass?: HomeAssistant; - @state() private _currentType?: string; - @state() private _params?: EditViewDialogParams; @state() private _config?: LovelaceViewConfig; @@ -113,7 +111,6 @@ export class HuiDialogEditView extends LitElement { this._badges = []; return; } - this._currentType = view.type; const { badges, ...viewConfig } = view; this._config = viewConfig; this._badges = badges ? processEditorEntities(badges) : []; @@ -214,14 +211,12 @@ export class HuiDialogEditView extends LitElement { } } - const isEmpty = - !this._config?.cards?.length && !this._config?.sections?.length; - const isCompatibleViewType = - isEmpty || - (this._currentType === SECTION_VIEW_LAYOUT - ? this._config?.type === SECTION_VIEW_LAYOUT - : this._config?.type !== SECTION_VIEW_LAYOUT); + this._config?.type === SECTION_VIEW_LAYOUT + ? this._config?.type === SECTION_VIEW_LAYOUT && + !this._config?.cards?.length + : this._config?.type !== SECTION_VIEW_LAYOUT && + !this._config?.sections?.length; return html` + ${!isCompatibleViewType + ? html` + + ${this._config?.type === SECTION_VIEW_LAYOUT + ? this.hass!.localize( + "ui.panel.lovelace.editor.edit_view.type_warning_sections" + ) + : this.hass!.localize( + "ui.panel.lovelace.editor.edit_view.type_warning_others" + )} + + ` + : nothing} ${!this._yamlMode ? html` ` : nothing} - ${!isCompatibleViewType - ? html` - - ${this._config?.type === SECTION_VIEW_LAYOUT - ? this.hass!.localize( - "ui.panel.lovelace.editor.edit_view.type_warning_sections" - ) - : this.hass!.localize( - "ui.panel.lovelace.editor.edit_view.type_warning_others" - )} - - ` - : nothing} Date: Mon, 4 Mar 2024 15:04:45 +0100 Subject: [PATCH 114/425] Fix masonry badges not centered (#19972) --- src/panels/lovelace/views/hui-masonry-view.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/panels/lovelace/views/hui-masonry-view.ts b/src/panels/lovelace/views/hui-masonry-view.ts index c8e3047c2d53..bcc87214e3c6 100644 --- a/src/panels/lovelace/views/hui-masonry-view.ts +++ b/src/panels/lovelace/views/hui-masonry-view.ts @@ -291,6 +291,12 @@ export class MasonryView extends LitElement implements LovelaceViewElement { padding-top: 4px; } + .badges { + margin: 8px 16px; + font-size: 85%; + text-align: center; + } + #columns { display: flex; flex-direction: row; From 19a3810168ba015f650c005174c61b0b94170a9b Mon Sep 17 00:00:00 2001 From: Paul Bottein Date: Mon, 4 Mar 2024 15:22:04 +0100 Subject: [PATCH 115/425] Add sections dashboard to demo dashboard (#19976) --- demo/src/configs/demo-configs.ts | 1 + demo/src/configs/sections/entities.ts | 482 ++++++++++++++++++ demo/src/configs/sections/index.ts | 12 + demo/src/configs/sections/lovelace.ts | 280 ++++++++++ .../lovelace/sections/hui-grid-section.ts | 1 + 5 files changed, 776 insertions(+) create mode 100644 demo/src/configs/sections/entities.ts create mode 100644 demo/src/configs/sections/index.ts create mode 100644 demo/src/configs/sections/lovelace.ts diff --git a/demo/src/configs/demo-configs.ts b/demo/src/configs/demo-configs.ts index 07dca811f7eb..dacddf0944dc 100644 --- a/demo/src/configs/demo-configs.ts +++ b/demo/src/configs/demo-configs.ts @@ -4,6 +4,7 @@ import { energyEntities } from "../stubs/entities"; import { DemoConfig } from "./types"; export const demoConfigs: Array<() => Promise> = [ + () => import("./sections").then((mod) => mod.demoSections), () => import("./arsaboo").then((mod) => mod.demoArsaboo), () => import("./teachingbirds").then((mod) => mod.demoTeachingbirds), () => import("./kernehed").then((mod) => mod.demoKernehed), diff --git a/demo/src/configs/sections/entities.ts b/demo/src/configs/sections/entities.ts new file mode 100644 index 000000000000..ffb738950378 --- /dev/null +++ b/demo/src/configs/sections/entities.ts @@ -0,0 +1,482 @@ +import { convertEntities } from "../../../../src/fake_data/entity"; +import { DemoConfig } from "../types"; + +export const demoEntitiesSections: DemoConfig["entities"] = () => + convertEntities({ + "cover.living_room_garden_shutter": { + entity_id: "cover.living_room_garden_shutter", + state: "open", + attributes: { + current_position: 100, + device_class: "shutter", + friendly_name: "Living room garden shutter", + supported_features: 15, + }, + }, + "cover.living_room_graveyard_shutter": { + entity_id: "cover.living_room_graveyard_shutter", + state: "open", + attributes: { + current_position: 100, + device_class: "shutter", + friendly_name: "Living room graveyard shutter", + supported_features: 15, + }, + }, + "cover.living_room_left_shutter": { + entity_id: "cover.living_room_left_shutter", + state: "open", + attributes: { + current_position: 100, + device_class: "shutter", + friendly_name: "Living room left shutter", + supported_features: 15, + }, + }, + "cover.living_room_right_shutter": { + entity_id: "cover.living_room_right_shutter", + state: "open", + attributes: { + current_position: 100, + device_class: "shutter", + friendly_name: "Living room right shutter", + supported_features: 15, + }, + }, + "light.floor_lamp": { + entity_id: "light.floor_lamp", + state: "on", + attributes: { + min_color_temp_kelvin: 2000, + max_color_temp_kelvin: 6535, + min_mireds: 153, + max_mireds: 500, + supported_color_modes: ["color_temp", "xy"], + color_mode: "color_temp", + brightness: 178, + color_temp_kelvin: 2583, + color_temp: 387, + hs_color: [28.664, 69.597], + rgb_color: [255, 162, 77], + xy_color: [0.538, 0.389], + icon: "mdi:floor-lamp", + friendly_name: "Floor lamp", + supported_features: 44, + }, + }, + "light.living_room_spotlights": { + entity_id: "light.living_room_spotlights", + state: "on", + attributes: { + supported_color_modes: ["brightness"], + color_mode: "brightness", + brightness: 126, + icon: "mdi:ceiling-light-multiple", + friendly_name: "Living room spotlights", + supported_features: 32, + }, + }, + "light.bar_lamp": { + entity_id: "light.bar_lamp", + state: "on", + attributes: { + min_color_temp_kelvin: 2202, + max_color_temp_kelvin: 4504, + min_mireds: 222, + max_mireds: 454, + effect_list: ["None", "candle"], + supported_color_modes: ["color_temp"], + effect: null, + color_mode: null, + brightness: null, + color_temp_kelvin: null, + color_temp: null, + hs_color: null, + rgb_color: null, + xy_color: null, + mode: "normal", + dynamics: "none", + icon: "mdi:lightbulb-variant", + friendly_name: "Bar lamp", + supported_features: 44, + }, + }, + "sensor.living_room_temperature": { + entity_id: "sensor.living_room_temperature", + state: "22.8", + attributes: { + state_class: "measurement", + unit_of_measurement: "°C", + device_class: "temperature", + friendly_name: "Living room Temperature", + }, + }, + "media_player.living_room_nest_mini": { + entity_id: "media_player.living_room_nest_mini", + state: "off", + attributes: { + device_class: "speaker", + friendly_name: "Living room Nest Mini", + supported_features: 152461, + }, + }, + "cover.kitchen_shutter": { + entity_id: "cover.kitchen_shutter", + state: "open", + attributes: { + current_position: 100, + device_class: "shutter", + friendly_name: "Kitchen shutter ", + supported_features: 15, + }, + }, + "light.kitchen_spotlights": { + entity_id: "light.kitchen_spotlights", + state: "off", + attributes: { + supported_color_modes: ["brightness"], + color_mode: null, + brightness: null, + icon: "mdi:ceiling-light-multiple", + friendly_name: "Kitchen spotlights ", + supported_features: 32, + }, + }, + "light.worktop_spotlights": { + entity_id: "light.worktop_spotlights", + state: "off", + attributes: { + supported_color_modes: ["brightness"], + color_mode: null, + brightness: null, + icon: "mdi:ceiling-light-multiple", + friendly_name: "Worktop spotlights ", + supported_features: 32, + }, + }, + "binary_sensor.fridge_door": { + entity_id: "binary_sensor.fridge_door", + state: "off", + attributes: { + device_class: "door", + icon: "mdi:fridge", + friendly_name: "Fridge door", + }, + }, + "media_player.kitchen_nest_audio": { + entity_id: "media_player.kitchen_nest_audio", + state: "on", + attributes: { + device_class: "speaker", + friendly_name: "Kitchen Nest Audio", + supported_features: 152461, + }, + }, + "binary_sensor.tesla_wall_connector_vehicle_connected": { + entity_id: "binary_sensor.tesla_wall_connector_vehicle_connected", + state: "off", + attributes: { + device_class: "plug", + friendly_name: "Wall Connector Vehicle connected", + }, + }, + "sensor.tesla_wall_connector_session_energy": { + entity_id: "sensor.tesla_wall_connector_session_energy", + state: "16.3", + attributes: { + state_class: "total_increasing", + unit_of_measurement: "kWh", + device_class: "energy", + friendly_name: "Tesla Wall Connector Session energy", + }, + }, + "sensor.electric_meter_power": { + entity_id: "sensor.electric_meter_power", + state: "797.86", + attributes: { + state_class: "measurement", + unit_of_measurement: "W", + device_class: "power", + icon: "mdi:meter-electric", + friendly_name: "Electric meter Power", + }, + }, + "sensor.eletric_meter_voltage": { + entity_id: "sensor.eletric_meter_voltage", + state: "232.19", + attributes: { + state_class: "measurement", + unit_of_measurement: "V", + device_class: "voltage", + friendly_name: "Electric meter voltage", + }, + }, + "sensor.electricity_maps_grid_fossil_fuel_percentage": { + entity_id: "sensor.electricity_maps_grid_fossil_fuel_percentage", + state: "9.84", + attributes: { + state_class: "measurement", + country_code: "FR", + unit_of_measurement: "%", + attribution: "Data provided by Electricity Maps", + icon: "mdi:barrel", + friendly_name: "Electricity Maps Grid fossil fuel percentage", + }, + }, + "sensor.electricity_maps_co2_intensity": { + entity_id: "sensor.electricity_maps_co2_intensity", + state: "62.0", + attributes: { + state_class: "measurement", + country_code: "FR", + unit_of_measurement: "gCO2eq/kWh", + attribution: "Data provided by Electricity Maps", + friendly_name: "Electricity Maps CO2 intensity", + }, + }, + "sun.sun": { + entity_id: "sun.sun", + state: "above_horizon", + attributes: { + next_dawn: "2024-03-05T05:50:21.964405+00:00", + next_dusk: "2024-03-04T18:08:54.311334+00:00", + next_midnight: "2024-03-05T00:00:00+00:00", + next_noon: "2024-03-05T12:00:05+00:00", + next_rising: "2024-03-05T06:23:42.739159+00:00", + next_setting: "2024-03-04T17:35:26.271171+00:00", + elevation: 30.38, + azimuth: 204.42, + rising: false, + friendly_name: "Sun", + }, + }, + "sensor.moon_phase": { + entity_id: "sensor.moon_phase", + state: "waning_crescent", + attributes: { + options: [ + "new_moon", + "waxing_crescent", + "first_quarter", + "waxing_gibbous", + "full_moon", + "waning_gibbous", + "last_quarter", + "waning_crescent", + ], + device_class: "enum", + icon: "mdi:moon-waning-crescent", + friendly_name: "Moon Phase", + }, + }, + "climate.ground_floor": { + entity_id: "climate.ground_floor", + state: "heat", + attributes: { + hvac_modes: ["auto", "heat", "off"], + min_temp: 7, + max_temp: 35, + preset_modes: [ + "comfort", + "away", + "eco", + "frost_protection", + "external", + "home", + ], + current_temperature: 20.8, + temperature: 21, + preset_mode: "comfort", + icon: "mdi:home-floor-0", + friendly_name: "Ground floor Thermostat", + supported_features: 401, + }, + }, + "climate.first_floor": { + entity_id: "climate.first_floor", + state: "heat", + attributes: { + hvac_modes: ["auto", "heat", "off"], + min_temp: 7, + max_temp: 35, + preset_modes: [ + "comfort", + "away", + "eco", + "frost_protection", + "external", + "home", + ], + current_temperature: 21.7, + temperature: 21, + preset_mode: "comfort", + icon: "mdi:home-floor-1", + friendly_name: "First floor Thermostat", + supported_features: 401, + }, + }, + "cover.study_shutter": { + entity_id: "cover.study_shutter", + state: "open", + attributes: { + current_position: 100, + device_class: "shutter", + friendly_name: "Study shutter", + supported_features: 15, + }, + }, + "light.study_spotlights": { + entity_id: "light.study_spotlights", + state: "off", + attributes: { + supported_color_modes: ["brightness"], + color_mode: null, + brightness: null, + icon: "mdi:ceiling-light-multiple", + friendly_name: "Study spotlights", + supported_features: 32, + }, + }, + "media_player.study_nest_hub": { + entity_id: "media_player.study_nest_hub", + state: "off", + attributes: { + friendly_name: "Study Nest Hub", + supported_features: 152461, + }, + }, + "sensor.standing_desk_height": { + entity_id: "sensor.standing_desk_height", + state: "72", + attributes: { + unit_of_measurement: "cm", + icon: "mdi:tape-measure", + friendly_name: "Standing desk Height", + }, + }, + "light.outdoor_light": { + entity_id: "light.outdoor_light", + state: "on", + attributes: { + supported_color_modes: ["brightness"], + color_mode: null, + brightness: 255, + icon: "mdi:outdoor-lamp", + friendly_name: "Outdoor light", + supported_features: 32, + }, + }, + "light.flood_light": { + entity_id: "light.flood_light", + state: "off", + attributes: { + effect_list: ["None", "candle"], + supported_color_modes: ["brightness"], + effect: null, + color_mode: null, + brightness: null, + mode: "normal", + dynamics: "none", + icon: "mdi:light-flood-down", + friendly_name: "Flood light", + supported_features: 44, + }, + }, + "sensor.outdoor_motion_sensor_temperature": { + entity_id: "sensor.outdoor_motion_sensor_temperature", + state: "10.2", + attributes: { + state_class: "measurement", + unit_of_measurement: "°C", + device_class: "temperature", + friendly_name: "Outdoor motion sensor Temperature", + }, + }, + "binary_sensor.outdoor_motion_sensor_motion": { + entity_id: "binary_sensor.outdoor_motion_sensor_motion", + state: "off", + attributes: { + device_class: "motion", + friendly_name: "Outdoor motion sensor Motion", + }, + }, + "sensor.outdoor_motion_sensor_illuminance": { + entity_id: "sensor.outdoor_motion_sensor_illuminance", + state: "555", + attributes: { + state_class: "measurement", + light_level: 27444, + unit_of_measurement: "lx", + device_class: "illuminance", + friendly_name: "Outdoor motion sensor Illuminance", + }, + }, + "automation.home_assistant_auto_update": { + entity_id: "automation.home_assistant_auto_update", + state: "off", + attributes: { + id: "1700669321947", + last_triggered: "2024-02-29T18:02:05.343139+00:00", + mode: "queued", + current: 0, + max: 50, + icon: "mdi:auto-mode", + friendly_name: "Home Assistant Auto-update", + }, + }, + "update.home_assistant_operating_system_update": { + entity_id: "update.home_assistant_operating_system_update", + state: "off", + attributes: { + auto_update: false, + installed_version: "12.1", + in_progress: false, + latest_version: "12.1", + release_summary: null, + release_url: + "https://github.com/home-assistant/operating-system/commits/dev", + skipped_version: null, + title: "Home Assistant Operating System", + entity_picture: + "https://brands.home-assistant.io/homeassistant/icon.png", + friendly_name: "Home Assistant Operating System Update", + supported_features: 3, + }, + }, + "update.home_assistant_supervisor_update": { + entity_id: "update.home_assistant_supervisor_update", + state: "off", + attributes: { + auto_update: true, + installed_version: "2024.02.2", + in_progress: false, + latest_version: "2024.02.2", + release_summary: null, + release_url: + "https://github.com/home-assistant/supervisor/commits/main", + skipped_version: null, + title: "Home Assistant Supervisor", + entity_picture: "https://brands.home-assistant.io/hassio/icon.png", + friendly_name: "Home Assistant Supervisor Update", + supported_features: 1, + }, + }, + "update.home_assistant_core_update": { + entity_id: "update.home_assistant_supervisor_update", + state: "off", + attributes: { + auto_update: false, + installed_version: "2024.4.0", + in_progress: false, + latest_version: "2024.4.0", + release_summary: null, + release_url: "https://github.com/home-assistant/core/commits/dev", + skipped_version: null, + title: "Home Assistant Core", + entity_picture: + "https://brands.home-assistant.io/homeassistant/icon.png", + friendly_name: "Home Assistant Core Update", + supported_features: 11, + }, + }, + }); diff --git a/demo/src/configs/sections/index.ts b/demo/src/configs/sections/index.ts new file mode 100644 index 000000000000..39bc7419b80a --- /dev/null +++ b/demo/src/configs/sections/index.ts @@ -0,0 +1,12 @@ +import { DemoConfig } from "../types"; +import { demoEntitiesSections } from "./entities"; +import { demoLovelaceSections } from "./lovelace"; + +export const demoSections: DemoConfig = { + authorName: "Home Assistant", + authorUrl: "https://github.com/home-assistant/frontend/", + name: "Home Demo", + lovelace: demoLovelaceSections, + entities: demoEntitiesSections, + theme: () => ({}), +}; diff --git a/demo/src/configs/sections/lovelace.ts b/demo/src/configs/sections/lovelace.ts new file mode 100644 index 000000000000..197a434a2ae3 --- /dev/null +++ b/demo/src/configs/sections/lovelace.ts @@ -0,0 +1,280 @@ +import { DemoConfig } from "../types"; + +export const demoLovelaceSections: DemoConfig["lovelace"] = () => ({ + title: "Home Assistant Demo", + views: [ + { + type: "sections", + title: "Demo", + path: "home", + icon: "mdi:home-assistant", + sections: [ + { + title: "Welcome 👋", + cards: [{ type: "custom:ha-demo-card" }], + }, + { + cards: [ + { + type: "tile", + entity: "cover.living_room_garden_shutter", + name: "Garden", + }, + { + type: "tile", + entity: "cover.living_room_graveyard_shutter", + name: "Rear", + }, + { + type: "tile", + entity: "cover.living_room_left_shutter", + name: "Left", + }, + { + type: "tile", + entity: "cover.living_room_right_shutter", + name: "Right", + }, + { + type: "tile", + entity: "light.floor_lamp", + }, + { + type: "tile", + entity: "light.living_room_spotlights", + name: "Spotlights", + features: [ + { + type: "light-brightness", + }, + ], + }, + { + type: "tile", + entity: "light.bar_lamp", + }, + { + graph: "line", + type: "sensor", + entity: "sensor.living_room_temperature", + detail: 1, + name: "Temperature", + }, + { + type: "tile", + entity: "media_player.living_room_nest_mini", + name: "Nest Mini", + }, + ], + title: "🛋️ Living room ", + }, + { + type: "grid", + cards: [ + { + type: "tile", + entity: "cover.kitchen_shutter", + name: "Shutter", + }, + { + type: "tile", + entity: "light.kitchen_spotlights", + name: "Spotlights", + features: [ + { + type: "light-brightness", + }, + ], + }, + { + type: "tile", + entity: "light.worktop_spotlights", + name: "Worktop", + }, + { + type: "tile", + entity: "binary_sensor.fridge_door", + name: "Fridge", + }, + { + type: "tile", + entity: "media_player.kitchen_nest_audio", + name: "Nest Audio", + }, + ], + title: "👩‍🍳 Kitchen", + }, + { + type: "grid", + cards: [ + { + type: "tile", + entity: "binary_sensor.tesla_wall_connector_vehicle_connected", + name: "EV", + icon: "mdi:car", + }, + { + type: "tile", + entity: "sensor.tesla_wall_connector_session_energy", + name: "EV last charge", + color: "green", + }, + { + type: "tile", + entity: "sensor.electric_meter_power", + color: "deep-orange", + name: "Home power", + }, + { + type: "tile", + entity: "sensor.eletric_meter_voltage", + name: "Voltage", + color: "deep-orange", + }, + { + type: "tile", + entity: "sensor.electricity_maps_grid_fossil_fuel_percentage", + name: "Fossil fuel", + color: "brown", + }, + { + type: "tile", + entity: "sensor.electricity_maps_co2_intensity", + name: "CO2 Intensity", + color: "dark-grey", + }, + ], + title: "⚡️ Energy", + }, + { + type: "grid", + cards: [ + { + type: "tile", + entity: "sun.sun", + }, + { + type: "tile", + entity: "sensor.moon_phase", + color: "indigo", + name: "Moon", + }, + { + features: [ + { + type: "target-temperature", + }, + ], + type: "tile", + entity: "climate.ground_floor", + state_content: ["preset_mode", "current_temperature"], + }, + { + features: [ + { + type: "target-temperature", + }, + ], + type: "tile", + entity: "climate.first_floor", + state_content: ["preset_mode", "current_temperature"], + }, + ], + title: "🌤️ Climate", + }, + { + type: "grid", + cards: [ + { + type: "tile", + entity: "cover.study_shutter", + name: "Shutter", + }, + { + type: "tile", + entity: "light.study_spotlights", + name: "Spotlights", + }, + { + type: "tile", + entity: "media_player.study_nest_hub", + name: "Nest Hub", + }, + { + type: "tile", + entity: "sensor.standing_desk_height", + name: "Desk", + color: "brown", + icon: "mdi:desk", + }, + ], + title: "🧑‍💻 Study", + }, + { + type: "grid", + cards: [ + { + type: "tile", + entity: "light.outdoor_light", + name: "Door light", + }, + { + type: "tile", + entity: "light.flood_light", + }, + { + graph: "line", + type: "sensor", + entity: "sensor.outdoor_motion_sensor_temperature", + detail: 1, + name: "Temperature", + }, + { + type: "tile", + entity: "binary_sensor.outdoor_motion_sensor_motion", + name: "Motion", + color: "blue", + }, + { + type: "tile", + entity: "sensor.outdoor_motion_sensor_illuminance", + color: "amber", + name: "Illuminance", + }, + ], + title: "🌳 Outdoor", + }, + { + type: "grid", + cards: [ + { + type: "tile", + entity: "automation.home_assistant_auto_update", + name: "Auto-update", + color: "green", + }, + { + type: "tile", + entity: "update.home_assistant_operating_system_update", + name: "OS", + icon: "mdi:home-assistant", + }, + { + type: "tile", + entity: "update.home_assistant_supervisor_update", + icon: "mdi:home-assistant", + name: "Supervisor", + }, + { + type: "tile", + entity: "update.home_assistant_core_update", + name: "Core", + icon: "mdi:home-assistant", + }, + ], + title: "🎉 Updates", + }, + ], + }, + ], +}); diff --git a/src/panels/lovelace/sections/hui-grid-section.ts b/src/panels/lovelace/sections/hui-grid-section.ts index b63e9fac8f9d..72fc0b13df84 100644 --- a/src/panels/lovelace/sections/hui-grid-section.ts +++ b/src/panels/lovelace/sections/hui-grid-section.ts @@ -96,6 +96,7 @@ export class GridSection extends LitElement implements LovelaceSectionElement { (_cardConfig, idx) => { const card = this.cards![idx]; (card as any).editMode = editMode; + (card as any).lovelace = this.lovelace; const size = card && (card as any).getGridSize?.(); return html`
    Date: Mon, 4 Mar 2024 15:22:22 +0100 Subject: [PATCH 116/425] Expose dialog to custom card helpers (#19969) --- src/data/lock.ts | 4 ++-- src/dialogs/enter-code/show-enter-code-dialog.ts | 2 +- .../more-info/controls/more-info-alarm_control_panel.ts | 4 ++-- .../lovelace/card-features/hui-alarm-modes-card-feature.ts | 4 ++-- src/panels/lovelace/custom-card-helpers.ts | 6 ++++++ .../ha-state-control-alarm_control_panel-modes.ts | 4 ++-- 6 files changed, 15 insertions(+), 9 deletions(-) diff --git a/src/data/lock.ts b/src/data/lock.ts index 6630ef0989e3..7d155369f4fa 100644 --- a/src/data/lock.ts +++ b/src/data/lock.ts @@ -3,7 +3,7 @@ import { HassEntityBase, } from "home-assistant-js-websocket"; import { getExtendedEntityRegistryEntry } from "./entity_registry"; -import { showEnterCodeDialogDialog } from "../dialogs/enter-code/show-enter-code-dialog"; +import { showEnterCodeDialog } from "../dialogs/enter-code/show-enter-code-dialog"; import { HomeAssistant } from "../types"; export const FORMAT_TEXT = "text"; @@ -38,7 +38,7 @@ export const callProtectedLockService = async ( const defaultCode = lockRegistryEntry?.options?.lock?.default_code; if (stateObj!.attributes.code_format && !defaultCode) { - const response = await showEnterCodeDialogDialog(element, { + const response = await showEnterCodeDialog(element, { codeFormat: "text", codePattern: stateObj!.attributes.code_format, title: hass.localize(`ui.card.lock.${service}`), diff --git a/src/dialogs/enter-code/show-enter-code-dialog.ts b/src/dialogs/enter-code/show-enter-code-dialog.ts index 6356c203642d..84006ea06f21 100644 --- a/src/dialogs/enter-code/show-enter-code-dialog.ts +++ b/src/dialogs/enter-code/show-enter-code-dialog.ts @@ -10,7 +10,7 @@ export interface EnterCodeDialogParams { cancel?: () => void; } -export const showEnterCodeDialogDialog = ( +export const showEnterCodeDialog = ( element: HTMLElement, dialogParams: EnterCodeDialogParams ) => diff --git a/src/dialogs/more-info/controls/more-info-alarm_control_panel.ts b/src/dialogs/more-info/controls/more-info-alarm_control_panel.ts index bfc39a2ddc49..312c0f2c0d64 100644 --- a/src/dialogs/more-info/controls/more-info-alarm_control_panel.ts +++ b/src/dialogs/more-info/controls/more-info-alarm_control_panel.ts @@ -8,7 +8,7 @@ import "../../../components/ha-state-icon"; import { AlarmControlPanelEntity } from "../../../data/alarm_control_panel"; import "../../../state-control/alarm_control_panel/ha-state-control-alarm_control_panel-modes"; import type { HomeAssistant } from "../../../types"; -import { showEnterCodeDialogDialog } from "../../enter-code/show-enter-code-dialog"; +import { showEnterCodeDialog } from "../../enter-code/show-enter-code-dialog"; import "../components/ha-more-info-state-header"; import { moreInfoControlStyle } from "../components/more-info-control-style"; @@ -22,7 +22,7 @@ class MoreInfoAlarmControlPanel extends LitElement { let code: string | undefined; if (this.stateObj!.attributes.code_format) { - const response = await showEnterCodeDialogDialog(this, { + const response = await showEnterCodeDialog(this, { codeFormat: this.stateObj!.attributes.code_format, title: this.hass.localize("ui.card.alarm_control_panel.disarm"), submitText: this.hass.localize("ui.card.alarm_control_panel.disarm"), diff --git a/src/panels/lovelace/card-features/hui-alarm-modes-card-feature.ts b/src/panels/lovelace/card-features/hui-alarm-modes-card-feature.ts index b04318e46f60..818b1e66a4c8 100644 --- a/src/panels/lovelace/card-features/hui-alarm-modes-card-feature.ts +++ b/src/panels/lovelace/card-features/hui-alarm-modes-card-feature.ts @@ -21,7 +21,7 @@ import { UNAVAILABLE } from "../../../data/entity"; import { HomeAssistant } from "../../../types"; import { LovelaceCardFeature, LovelaceCardFeatureEditor } from "../types"; import { AlarmModesCardFeatureConfig } from "./types"; -import { showEnterCodeDialogDialog } from "../../../dialogs/enter-code/show-enter-code-dialog"; +import { showEnterCodeDialog } from "../../../dialogs/enter-code/show-enter-code-dialog"; export const supportsAlarmModesCardFeature = (stateObj: HassEntity) => { const domain = computeDomain(stateObj.entity_id); @@ -131,7 +131,7 @@ class HuiAlarmModeCardFeature ) { const disarm = mode === "disarmed"; - const response = await showEnterCodeDialogDialog(this, { + const response = await showEnterCodeDialog(this, { codeFormat: this.stateObj!.attributes.code_format, title: this.hass!.localize( `ui.card.alarm_control_panel.${disarm ? "disarm" : "arm"}` diff --git a/src/panels/lovelace/custom-card-helpers.ts b/src/panels/lovelace/custom-card-helpers.ts index 3c4508ca0b54..5cf34343aaae 100644 --- a/src/panels/lovelace/custom-card-helpers.ts +++ b/src/panels/lovelace/custom-card-helpers.ts @@ -1,3 +1,9 @@ +export { showEnterCodeDialog } from "../../dialogs/enter-code/show-enter-code-dialog"; +export { + showAlertDialog, + showConfirmationDialog, + showPromptDialog, +} from "../../dialogs/generic/show-dialog-box"; export { importMoreInfoControl } from "../../dialogs/more-info/state_more_info_control"; export { createBadgeElement } from "./create-element/create-badge-element"; export { createCardElement } from "./create-element/create-card-element"; diff --git a/src/state-control/alarm_control_panel/ha-state-control-alarm_control_panel-modes.ts b/src/state-control/alarm_control_panel/ha-state-control-alarm_control_panel-modes.ts index 1e9b53a2772a..647795f46a8c 100644 --- a/src/state-control/alarm_control_panel/ha-state-control-alarm_control_panel-modes.ts +++ b/src/state-control/alarm_control_panel/ha-state-control-alarm_control_panel-modes.ts @@ -13,7 +13,7 @@ import { AlarmMode, } from "../../data/alarm_control_panel"; import { UNAVAILABLE } from "../../data/entity"; -import { showEnterCodeDialogDialog } from "../../dialogs/enter-code/show-enter-code-dialog"; +import { showEnterCodeDialog } from "../../dialogs/enter-code/show-enter-code-dialog"; import { HomeAssistant } from "../../types"; @customElement("ha-state-control-alarm_control_panel-modes") @@ -56,7 +56,7 @@ export class HaStateControlAlarmControlPanelModes extends LitElement { ) { const disarm = mode === "disarmed"; - const response = await showEnterCodeDialogDialog(this, { + const response = await showEnterCodeDialog(this, { codeFormat: this.stateObj!.attributes.code_format, title: this.hass!.localize( `ui.card.alarm_control_panel.${disarm ? "disarm" : "arm"}` From 88ccbcd883544da4b8e7e1e2a81245829bae03b8 Mon Sep 17 00:00:00 2001 From: Paul Bottein Date: Mon, 4 Mar 2024 15:28:58 +0100 Subject: [PATCH 117/425] Fix badges not saved in view editor (#19971) --- .../view-editor/hui-dialog-edit-view.ts | 29 +++++++------------ 1 file changed, 11 insertions(+), 18 deletions(-) diff --git a/src/panels/lovelace/editor/view-editor/hui-dialog-edit-view.ts b/src/panels/lovelace/editor/view-editor/hui-dialog-edit-view.ts index 4d67c4dbf67c..498a7890dcf1 100644 --- a/src/panels/lovelace/editor/view-editor/hui-dialog-edit-view.ts +++ b/src/panels/lovelace/editor/view-editor/hui-dialog-edit-view.ts @@ -23,7 +23,6 @@ import "../../../../components/ha-dialog"; import "../../../../components/ha-dialog-header"; import "../../../../components/ha-yaml-editor"; import type { HaYamlEditor } from "../../../../components/ha-yaml-editor"; -import { LovelaceBadgeConfig } from "../../../../data/lovelace/config/badge"; import { LovelaceViewConfig, isStrategyView, @@ -61,8 +60,6 @@ export class HuiDialogEditView extends LitElement { @state() private _config?: LovelaceViewConfig; - @state() private _badges?: LovelaceBadgeConfig[]; - @state() private _saving = false; @state() private _curTab?: string; @@ -88,7 +85,6 @@ export class HuiDialogEditView extends LitElement { if (this._yamlMode && changedProperties.has("_yamlMode")) { const viewConfig = { ...this._config, - badges: this._badges, }; this._editor?.setValue(viewConfig); } @@ -99,7 +95,6 @@ export class HuiDialogEditView extends LitElement { if (this._params.viewIndex === undefined) { this._config = {}; - this._badges = []; this._dirty = false; return; } @@ -108,19 +103,15 @@ export class HuiDialogEditView extends LitElement { if (isStrategyView(view)) { const { strategy, ...viewConfig } = view; this._config = viewConfig; - this._badges = []; return; } - const { badges, ...viewConfig } = view; - this._config = viewConfig; - this._badges = badges ? processEditorEntities(badges) : []; + this._config = view; } public closeDialog(): void { this._curTabIndex = 0; this._params = undefined; this._config = {}; - this._badges = []; this._yamlMode = false; this._dirty = false; fireEvent(this, "dialog-closed", { dialog: this.localName }); @@ -166,7 +157,7 @@ export class HuiDialogEditView extends LitElement { break; case "tab-badges": content = html` - ${this._badges?.length + ${this._config?.badges?.length ? html` ${VIEWS_NO_BADGE_SUPPORT.includes(this._type) ? html` @@ -178,7 +169,7 @@ export class HuiDialogEditView extends LitElement { ` : nothing}
    - ${this._badges.map( + ${this._config.badges.map( (badgeConfig) => html` `; @@ -420,9 +411,9 @@ export class HuiDialogEditView extends LitElement { } this._saving = true; - const viewConf: LovelaceViewConfig = { + + const viewConf = { ...this._config, - badges: this._badges, }; if (viewConf.type === SECTION_VIEW_LAYOUT && !viewConf.sections?.length) { @@ -487,10 +478,13 @@ export class HuiDialogEditView extends LitElement { } private _badgesChanged(ev: EntitiesEditorEvent): void { - if (!this._badges || !this.hass || !ev.detail || !ev.detail.entities) { + if (!this.hass || !ev.detail || !ev.detail.entities) { return; } - this._badges = processEditorEntities(ev.detail.entities); + this._config = { + ...this._config, + badges: processEditorEntities(ev.detail.entities), + }; this._dirty = true; } @@ -501,7 +495,6 @@ export class HuiDialogEditView extends LitElement { } const { badges, ...config } = ev.detail.value; this._config = config; - this._badges = badges; this._dirty = true; } From b9a7a7c422b0a48c668b1636b515420759b38ba3 Mon Sep 17 00:00:00 2001 From: Paul Bottein Date: Mon, 4 Mar 2024 15:30:31 +0100 Subject: [PATCH 118/425] Don't suggest to pick another card for sections (#19977) --- .../card-editor/hui-dialog-suggest-card.ts | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/panels/lovelace/editor/card-editor/hui-dialog-suggest-card.ts b/src/panels/lovelace/editor/card-editor/hui-dialog-suggest-card.ts index 80e517d5ceae..89b2dac01ca9 100644 --- a/src/panels/lovelace/editor/card-editor/hui-dialog-suggest-card.ts +++ b/src/panels/lovelace/editor/card-editor/hui-dialog-suggest-card.ts @@ -131,11 +131,15 @@ export class HuiDialogSuggestCard extends LitElement { ${!this._params.yaml ? html` - ${this.hass!.localize( - "ui.panel.lovelace.editor.suggest_card.create_own" - )} + ${!(this._sectionConfig && this._viewSupportsSection) + ? html` + + ${this.hass!.localize( + "ui.panel.lovelace.editor.suggest_card.create_own" + )} + + ` + : nothing} ` - : ""} + : nothing} `; } From b99072d986133f7ddbc772047dfedd46ddc1e656 Mon Sep 17 00:00:00 2001 From: Paul Bottein Date: Mon, 4 Mar 2024 15:31:07 +0100 Subject: [PATCH 119/425] Use icon in area card if there is no image (#19933) --- src/panels/lovelace/cards/hui-area-card.ts | 43 +++++++++++++++++----- 1 file changed, 34 insertions(+), 9 deletions(-) diff --git a/src/panels/lovelace/cards/hui-area-card.ts b/src/panels/lovelace/cards/hui-area-card.ts index ecd9dda6b3fa..d11cab94756e 100644 --- a/src/panels/lovelace/cards/hui-area-card.ts +++ b/src/panels/lovelace/cards/hui-area-card.ts @@ -418,15 +418,24 @@ export class HuiAreaCard })} > ${area.picture || cameraEntityId - ? html`` - : ""} + ? html` + + ` + : area.icon + ? html` +
    + +
    + ` + : nothing}
    Date: Mon, 4 Mar 2024 16:33:31 +0100 Subject: [PATCH 124/425] Change wording from add section to create section (#19978) * Rename add section to create section * update function name --- src/panels/lovelace/views/hui-sections-view.ts | 14 +++++++------- src/translations/en.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/panels/lovelace/views/hui-sections-view.ts b/src/panels/lovelace/views/hui-sections-view.ts index 2e2320fa549b..54a50829ec89 100644 --- a/src/panels/lovelace/views/hui-sections-view.ts +++ b/src/panels/lovelace/views/hui-sections-view.ts @@ -119,13 +119,13 @@ export class SectionsView extends LitElement implements LovelaceViewElement { ${editMode ? html`