From bc92c0b05216b47d5abf9d8a1c1fc63d1b2bd19b Mon Sep 17 00:00:00 2001 From: Bram Kragten Date: Tue, 18 May 2021 16:37:53 +0200 Subject: [PATCH] Upgrade to Lit 2 (#9199) --- build-scripts/webpack.js | 6 +- cast/src/launcher/layout/hc-cast.ts | 14 +- cast/src/launcher/layout/hc-connect.ts | 11 +- cast/src/launcher/layout/hc-layout.ts | 11 +- cast/src/receiver/layout/hc-demo.ts | 9 +- cast/src/receiver/layout/hc-launch-screen.ts | 11 +- cast/src/receiver/layout/hc-lovelace.ts | 11 +- cast/src/receiver/layout/hc-main.ts | 3 +- demo/src/custom-cards/card-modder.js | 2 +- demo/src/custom-cards/card-tools.js | 2 +- demo/src/custom-cards/cast-demo-row.ts | 11 +- demo/src/custom-cards/ha-demo-card.ts | 13 +- .../demos/demo-automation-describe-action.ts | 10 +- .../demo-automation-describe-condition.ts | 9 +- .../demos/demo-automation-describe-trigger.ts | 9 +- .../demos/demo-automation-trace-timeline.ts | 10 +- gallery/src/demos/demo-automation-trace.ts | 11 +- .../src/demos/demo-hui-alarm-panel-card.ts | 10 +- .../src/demos/demo-hui-conditional-card.ts | 10 +- gallery/src/demos/demo-hui-entities-card.ts | 10 +- .../src/demos/demo-hui-entity-button-card.ts | 10 +- .../src/demos/demo-hui-entity-filter-card.ts | 10 +- gallery/src/demos/demo-hui-gauge-card.ts | 10 +- gallery/src/demos/demo-hui-glance-card.ts | 10 +- .../src/demos/demo-hui-grid-and-stack-card.ts | 10 +- gallery/src/demos/demo-hui-iframe-card.ts | 3 +- gallery/src/demos/demo-hui-light-card.ts | 10 +- gallery/src/demos/demo-hui-map-card.ts | 10 +- gallery/src/demos/demo-hui-markdown-card.ts | 10 +- .../src/demos/demo-hui-media-control-card.ts | 10 +- .../src/demos/demo-hui-media-player-rows.ts | 10 +- .../demos/demo-hui-picture-elements-card.ts | 10 +- .../src/demos/demo-hui-picture-entity-card.ts | 10 +- .../src/demos/demo-hui-picture-glance-card.ts | 10 +- gallery/src/demos/demo-hui-plant-card.ts | 10 +- .../src/demos/demo-hui-shopping-list-card.ts | 10 +- gallery/src/demos/demo-hui-thermostat-card.ts | 10 +- gallery/src/demos/demo-integration-card.ts | 13 +- gallery/src/demos/demo-more-info-light.ts | 11 +- gallery/src/demos/demo-util-long-press.ts | 3 +- .../addon-store/hassio-addon-repository.ts | 10 +- hassio/src/addon-store/hassio-addon-store.ts | 8 +- .../addon-view/config/hassio-addon-audio.ts | 6 +- .../config/hassio-addon-config-tab.ts | 11 +- .../addon-view/config/hassio-addon-config.ts | 7 +- .../addon-view/config/hassio-addon-network.ts | 6 +- .../hassio-addon-documentation-tab.ts | 12 +- .../src/addon-view/hassio-addon-dashboard.ts | 12 +- hassio/src/addon-view/hassio-addon-router.ts | 2 +- .../addon-view/info/hassio-addon-info-tab.ts | 11 +- .../src/addon-view/info/hassio-addon-info.ts | 14 +- .../addon-view/log/hassio-addon-log-tab.ts | 11 +- .../src/addon-view/log/hassio-addon-logs.ts | 12 +- hassio/src/components/hassio-ansi-to-html.ts | 11 +- hassio/src/components/hassio-card-content.ts | 11 +- .../src/components/hassio-upload-snapshot.ts | 9 +- hassio/src/components/supervisor-metric.ts | 13 +- hassio/src/dashboard/hassio-addons.ts | 11 +- hassio/src/dashboard/hassio-dashboard.ts | 11 +- hassio/src/dashboard/hassio-update.ts | 11 +- .../markdown/dialog-hassio-markdown.ts | 12 +- .../dialogs/network/dialog-hassio-network.ts | 14 +- .../registries/dialog-hassio-registries.ts | 12 +- .../dialog-hassio-repositories.ts | 13 +- .../snapshot/dialog-hassio-create-snapshot.ts | 14 +- .../snapshot/dialog-hassio-snapshot-upload.ts | 12 +- .../snapshot/dialog-hassio-snapshot.ts | 12 +- hassio/src/dialogs/suggestAddonRestart.ts | 2 +- .../update/dialog-supervisor-update.ts | 11 +- hassio/src/hassio-main.ts | 3 +- hassio/src/hassio-my-redirect.ts | 10 +- hassio/src/hassio-panel-router.ts | 2 +- hassio/src/hassio-panel.ts | 11 +- hassio/src/hassio-router.ts | 2 +- .../src/ingress-view/hassio-ingress-view.ts | 6 +- hassio/src/resources/hassio-style.ts | 2 +- hassio/src/snapshots/hassio-snapshots.ts | 6 +- hassio/src/supervisor-base-element.ts | 3 +- hassio/src/system/hassio-core-info.ts | 12 +- hassio/src/system/hassio-host-info.ts | 11 +- hassio/src/system/hassio-supervisor-info.ts | 12 +- hassio/src/system/hassio-supervisor-log.ts | 12 +- hassio/src/system/hassio-system.ts | 11 +- package.json | 41 +- src/auth/ha-auth-flow.ts | 5 +- src/auth/ha-authorize.ts | 11 +- src/auth/ha-pick-auth-provider.ts | 3 +- src/common/decorators/local-storage.ts | 2 +- src/common/decorators/restore-scroll.ts | 2 +- src/common/dom/dynamic-element-directive.ts | 5 +- src/common/image/extract_color.ts | 2 +- src/common/search/search-input.ts | 12 +- src/common/style/icon_color_css.ts | 2 +- src/components/buttons/ha-call-api-button.ts | 10 +- src/components/buttons/ha-progress-button.ts | 12 +- src/components/data-table/ha-data-table.ts | 28 +- src/components/date-range-picker.ts | 1 - .../device/ha-area-devices-picker.ts | 6 +- .../device/ha-device-action-picker.ts | 2 +- .../device/ha-device-automation-picker.ts | 11 +- .../device/ha-device-condition-picker.ts | 2 +- src/components/device/ha-device-picker.ts | 9 +- .../device/ha-device-trigger-picker.ts | 2 +- src/components/device/ha-devices-picker.ts | 9 +- src/components/entity/ha-battery-icon.ts | 3 +- src/components/entity/ha-entities-picker.ts | 9 +- .../entity/ha-entity-attribute-picker.ts | 6 +- src/components/entity/ha-entity-picker.ts | 6 +- src/components/entity/ha-entity-toggle.ts | 7 +- src/components/entity/ha-state-label-badge.ts | 8 +- src/components/entity/state-badge.ts | 9 +- src/components/entity/state-info.ts | 11 +- src/components/ha-addon-picker.ts | 11 +- src/components/ha-analytics-learn-more.ts | 2 +- src/components/ha-analytics.ts | 11 +- src/components/ha-area-picker.ts | 7 +- src/components/ha-attributes.ts | 15 +- src/components/ha-bar.ts | 11 +- src/components/ha-blueprint-picker.ts | 11 +- src/components/ha-button-menu.ts | 12 +- .../ha-button-related-filter-menu.ts | 26 +- src/components/ha-button-toggle-group.ts | 13 +- src/components/ha-camera-stream.ts | 8 +- src/components/ha-card.ts | 11 +- src/components/ha-checkbox.ts | 10 +- src/components/ha-chip-set.ts | 5 +- src/components/ha-chip.ts | 10 +- src/components/ha-circular-progress.ts | 2 +- src/components/ha-climate-state.ts | 11 +- src/components/ha-code-editor.ts | 11 +- src/components/ha-color-picker.js | 2 +- src/components/ha-combo-box.ts | 13 +- src/components/ha-cover-controls.ts | 8 +- src/components/ha-cover-tilt-controls.ts | 8 +- src/components/ha-date-input.ts | 18 +- src/components/ha-date-range-picker.ts | 5 +- src/components/ha-dialog.ts | 16 +- src/components/ha-expansion-panel.ts | 14 +- src/components/ha-fab.ts | 10 +- src/components/ha-file-upload.ts | 15 +- src/components/ha-form/ha-form-boolean.ts | 12 +- src/components/ha-form/ha-form-constant.ts | 5 +- src/components/ha-form/ha-form-float.ts | 10 +- src/components/ha-form/ha-form-integer.ts | 12 +- .../ha-form/ha-form-multi_select.ts | 13 +- .../ha-form-positive_time_period_dict.ts | 10 +- src/components/ha-form/ha-form-select.ts | 12 +- src/components/ha-form/ha-form-string.ts | 15 +- src/components/ha-form/ha-form.ts | 10 +- src/components/ha-formfield.ts | 18 +- src/components/ha-gauge.ts | 15 +- src/components/ha-header-bar.ts | 3 +- src/components/ha-help-tooltip.ts | 10 +- src/components/ha-hls-player.ts | 7 +- src/components/ha-icon-button-arrow-next.ts | 10 +- src/components/ha-icon-button-arrow-prev.ts | 10 +- src/components/ha-icon-button-next.ts | 10 +- src/components/ha-icon-button-prev.ts | 10 +- src/components/ha-icon-button.ts | 11 +- src/components/ha-icon-input.ts | 10 +- src/components/ha-icon.ts | 6 +- src/components/ha-label-badge.ts | 6 +- src/components/ha-markdown-element.ts | 3 +- src/components/ha-markdown.ts | 11 +- src/components/ha-menu-button.ts | 12 +- src/components/ha-picture-upload.ts | 10 +- src/components/ha-radio.ts | 11 +- src/components/ha-related-items.ts | 6 +- src/components/ha-relative-time.ts | 8 +- .../ha-selector/ha-selector-action.ts | 10 +- .../ha-selector/ha-selector-addon.ts | 3 +- .../ha-selector/ha-selector-area.ts | 3 +- .../ha-selector/ha-selector-boolean.ts | 10 +- .../ha-selector/ha-selector-device.ts | 3 +- .../ha-selector/ha-selector-entity.ts | 3 +- .../ha-selector/ha-selector-number.ts | 12 +- .../ha-selector/ha-selector-object.ts | 3 +- .../ha-selector/ha-selector-select.ts | 12 +- .../ha-selector/ha-selector-target.ts | 11 +- .../ha-selector/ha-selector-text.ts | 9 +- .../ha-selector/ha-selector-time.ts | 3 +- src/components/ha-selector/ha-selector.ts | 9 +- src/components/ha-service-control.ts | 13 +- src/components/ha-service-picker.ts | 3 +- src/components/ha-settings-row.ts | 11 +- src/components/ha-sidebar.ts | 19 +- src/components/ha-svg-icon.ts | 11 +- src/components/ha-switch.ts | 18 +- src/components/ha-tab.ts | 12 +- src/components/ha-tabs.ts | 2 +- src/components/ha-target-picker.ts | 15 +- src/components/ha-time-input.ts | 10 +- src/components/ha-yaml-editor.ts | 10 +- src/components/map/ha-location-editor.ts | 5 +- src/components/map/ha-locations-editor.ts | 5 +- src/components/map/ha-map.ts | 5 +- .../dialog-media-player-browse.ts | 12 +- .../media-player/ha-media-player-browse.ts | 20 +- src/components/state-history-charts.ts | 13 +- src/components/trace/ha-timeline.ts | 11 +- src/components/trace/hat-graph-node.ts | 4 +- src/components/trace/hat-graph-spacer.ts | 4 +- src/components/trace/hat-graph.ts | 12 +- src/components/trace/hat-logbook-note.ts | 3 +- src/components/trace/hat-script-graph.ts | 32 +- src/components/trace/hat-trace-timeline.ts | 47 +- src/components/user/ha-person-badge.ts | 15 +- src/components/user/ha-user-badge.ts | 16 +- src/components/user/ha-user-picker.ts | 10 +- src/components/user/ha-users-picker.ts | 13 +- src/data/automation_i18n.ts | 2 +- src/data/script_i18n.ts | 10 +- src/data/trace.ts | 2 +- src/data/weather.ts | 4 +- .../dialog-config-entry-system-options.ts | 12 +- .../config-flow/dialog-data-entry-flow.ts | 7 +- .../config-flow/show-dialog-config-flow.ts | 2 +- .../show-dialog-data-entry-flow.ts | 2 +- .../config-flow/show-dialog-options-flow.ts | 2 +- src/dialogs/config-flow/step-flow-abort.ts | 10 +- .../config-flow/step-flow-create-entry.ts | 11 +- src/dialogs/config-flow/step-flow-external.ts | 11 +- src/dialogs/config-flow/step-flow-form.ts | 5 +- src/dialogs/config-flow/step-flow-loading.ts | 11 +- .../config-flow/step-flow-pick-flow.ts | 13 +- .../config-flow/step-flow-pick-handler.ts | 16 +- src/dialogs/config-flow/step-flow-progress.ts | 11 +- src/dialogs/config-flow/styles.ts | 2 +- .../domain-toggler/dialog-domain-toggler.ts | 11 +- src/dialogs/generic/dialog-box.ts | 14 +- src/dialogs/generic/show-dialog-box.ts | 2 +- .../image-cropper-dialog.ts | 9 +- .../controls/more-info-automation.ts | 11 +- .../more-info/controls/more-info-camera.ts | 7 +- .../more-info/controls/more-info-climate.ts | 6 +- .../more-info/controls/more-info-counter.ts | 11 +- .../more-info/controls/more-info-default.ts | 9 +- .../more-info/controls/more-info-fan.js | 2 +- .../more-info/controls/more-info-group.ts | 8 +- .../controls/more-info-humidifier.ts | 6 +- .../more-info/controls/more-info-light.ts | 8 +- .../controls/more-info-media_player.ts | 12 +- .../more-info/controls/more-info-person.ts | 11 +- .../more-info/controls/more-info-remote.ts | 11 +- .../more-info/controls/more-info-script.ts | 11 +- .../more-info/controls/more-info-sun.ts | 11 +- .../more-info/controls/more-info-timer.ts | 11 +- .../more-info/controls/more-info-vacuum.ts | 11 +- .../more-info/controls/more-info-weather.ts | 8 +- src/dialogs/more-info/ha-more-info-dialog.ts | 14 +- src/dialogs/more-info/ha-more-info-history.ts | 11 +- src/dialogs/more-info/ha-more-info-logbook.ts | 16 +- src/dialogs/more-info/more-info-content.ts | 3 +- .../configurator-notification-item.ts | 9 +- .../notification-item-template.ts | 10 +- .../notifications/notification-item.ts | 10 +- .../persistent-notification-item.ts | 11 +- src/dialogs/quick-bar/ha-quick-bar.ts | 23 +- .../ha-voice-command-dialog.ts | 9 +- src/entrypoints/custom-panel.ts | 11 +- src/entrypoints/service_worker.ts | 4 +- src/fake_data/provide_hass.ts | 2 +- src/layouts/ha-init-page.ts | 3 +- src/layouts/hass-error-screen.ts | 15 +- src/layouts/hass-loading-screen.ts | 11 +- src/layouts/hass-router-page.ts | 3 +- src/layouts/hass-subpage.ts | 12 +- src/layouts/hass-tabs-subpage-data-table.ts | 14 +- src/layouts/hass-tabs-subpage.ts | 9 +- src/layouts/home-assistant-main.ts | 6 +- src/layouts/home-assistant.ts | 7 +- src/layouts/partial-panel-resolver.ts | 3 +- src/layouts/supervisor-error-screen.ts | 13 +- src/managers/notification-manager.ts | 12 +- src/mixins/keyboard-shortcut-mixin.ts | 2 +- src/mixins/lit-localize-lite-mixin.ts | 5 +- src/mixins/provide-hass-lit-mixin.ts | 2 +- src/mixins/subscribe-mixin.ts | 3 +- src/onboarding/action-badge.ts | 11 +- src/onboarding/ha-onboarding.ts | 14 +- src/onboarding/integration-badge.ts | 11 +- src/onboarding/onboarding-analytics.ts | 12 +- src/onboarding/onboarding-core-config.ts | 12 +- src/onboarding/onboarding-create-user.ts | 6 +- src/onboarding/onboarding-integrations.ts | 6 +- src/onboarding/onboarding-loading.ts | 10 +- src/onboarding/onboarding-restore-snapshot.ts | 11 +- src/panels/calendar/ha-full-calendar.ts | 5 +- src/panels/calendar/ha-panel-calendar.ts | 8 +- .../areas/dialog-area-registry-detail.ts | 11 +- .../config/areas/ha-config-area-page.ts | 14 +- .../config/areas/ha-config-areas-dashboard.ts | 11 +- src/panels/config/areas/ha-config-areas.ts | 3 +- .../action/ha-automation-action-row.ts | 15 +- .../automation/action/ha-automation-action.ts | 10 +- .../types/ha-automation-action-choose.ts | 10 +- .../types/ha-automation-action-condition.ts | 3 +- .../types/ha-automation-action-delay.ts | 9 +- .../types/ha-automation-action-device_id.ts | 3 +- .../types/ha-automation-action-event.ts | 10 +- .../types/ha-automation-action-repeat.ts | 9 +- .../types/ha-automation-action-scene.ts | 3 +- .../types/ha-automation-action-service.ts | 18 +- .../ha-automation-action-wait_for_trigger.ts | 4 +- .../ha-automation-action-wait_template.ts | 4 +- .../automation/blueprint-automation-editor.ts | 11 +- .../ha-automation-condition-editor.ts | 9 +- .../condition/ha-automation-condition-row.ts | 13 +- .../condition/ha-automation-condition.ts | 11 +- .../types/ha-automation-condition-and.ts | 2 +- .../types/ha-automation-condition-device.ts | 3 +- .../types/ha-automation-condition-logical.ts | 3 +- .../types/ha-automation-condition-not.ts | 2 +- .../ha-automation-condition-numeric_state.ts | 3 +- .../types/ha-automation-condition-or.ts | 2 +- .../types/ha-automation-condition-state.ts | 3 +- .../types/ha-automation-condition-sun.ts | 3 +- .../types/ha-automation-condition-template.ts | 3 +- .../types/ha-automation-condition-time.ts | 11 +- .../types/ha-automation-condition-zone.ts | 3 +- .../automation/dialog-new-automation.ts | 12 +- .../config/automation/ha-automation-editor.ts | 8 +- .../config/automation/ha-automation-picker.ts | 15 +- .../config/automation/ha-config-automation.ts | 5 +- .../automation/manual-automation-editor.ts | 10 +- .../automation/thingtalk/dialog-thingtalk.ts | 13 +- .../thingtalk/ha-thingtalk-placeholders.ts | 6 +- .../ha-automation-trace-blueprint-config.ts | 13 +- .../trace/ha-automation-trace-config.ts | 15 +- .../trace/ha-automation-trace-logbook.ts | 15 +- .../trace/ha-automation-trace-path-details.ts | 28 +- .../trace/ha-automation-trace-timeline.ts | 19 +- .../automation/trace/ha-automation-trace.ts | 52 +- src/panels/config/automation/trace/styles.ts | 2 +- .../trigger/ha-automation-trigger-row.ts | 11 +- .../trigger/ha-automation-trigger.ts | 10 +- .../types/ha-automation-trigger-device.ts | 3 +- .../types/ha-automation-trigger-event.ts | 4 +- .../ha-automation-trigger-geo_location.ts | 3 +- .../ha-automation-trigger-homeassistant.ts | 3 +- .../types/ha-automation-trigger-mqtt.ts | 3 +- .../ha-automation-trigger-numeric_state.ts | 3 +- .../types/ha-automation-trigger-state.ts | 3 +- .../types/ha-automation-trigger-sun.ts | 3 +- .../types/ha-automation-trigger-tag.ts | 10 +- .../types/ha-automation-trigger-template.ts | 3 +- .../types/ha-automation-trigger-time.ts | 3 +- .../ha-automation-trigger-time_pattern.ts | 3 +- .../types/ha-automation-trigger-webhook.ts | 3 +- .../types/ha-automation-trigger-zone.ts | 3 +- .../blueprint/dialog-import-blueprint.ts | 16 +- .../config/blueprint/ha-blueprint-overview.ts | 5 +- .../config/blueprint/ha-config-blueprint.ts | 3 +- .../config/cloud/account/cloud-alexa-pref.ts | 11 +- .../config/cloud/account/cloud-google-pref.ts | 10 +- .../config/cloud/account/cloud-remote-pref.ts | 11 +- .../config/cloud/account/cloud-tts-pref.ts | 24 +- .../config/cloud/account/cloud-webhooks.ts | 14 +- .../cloud/account/dialog-cloud-tts-try.ts | 41 +- src/panels/config/cloud/alexa/cloud-alexa.ts | 14 +- .../dialog-cloud-certificate.ts | 10 +- .../dialog-manage-cloudhook.ts | 3 +- .../cloud-google-assistant.ts | 14 +- src/panels/config/cloud/ha-config-cloud.ts | 2 +- src/panels/config/core/ha-config-analytics.ts | 6 +- src/panels/config/core/ha-config-core-form.ts | 12 +- src/panels/config/core/ha-config-name-form.ts | 11 +- src/panels/config/core/ha-config-url-form.ts | 12 +- .../config/customize/ha-config-customize.ts | 10 +- .../config/dashboard/ha-config-dashboard.ts | 11 +- .../config/dashboard/ha-config-navigation.ts | 11 +- .../device-detail/ha-device-actions-card.ts | 2 +- .../ha-device-automation-card.ts | 10 +- .../ha-device-automation-dialog.ts | 13 +- .../ha-device-conditions-card.ts | 2 +- .../device-detail/ha-device-entities-card.ts | 5 +- .../device-detail/ha-device-info-card.ts | 11 +- .../device-detail/ha-device-triggers-card.ts | 2 +- .../mqtt/dialog-mqtt-device-debug-info.ts | 11 +- .../mqtt/ha-device-actions-mqtt.ts | 11 +- .../mqtt/mqtt-discovery-payload.ts | 14 +- .../mqtt/mqtt-messages.ts | 14 +- .../ozw/ha-device-actions-ozw.ts | 5 +- .../ozw/ha-device-info-ozw.ts | 6 +- .../tasmota/ha-device-actions-tasmota.ts | 11 +- .../zha/ha-device-actions-zha.ts | 8 +- .../zha/ha-device-info-zha.ts | 6 +- .../zwave_js/ha-device-actions-zwave_js.ts | 6 +- .../zwave_js/ha-device-info-zwave_js.ts | 11 +- .../dialog-device-registry-detail.ts | 12 +- .../config/devices/ha-config-device-page.ts | 14 +- .../devices/ha-config-devices-dashboard.ts | 12 +- .../config/devices/ha-config-devices.ts | 3 +- .../config/entities/dialog-entity-editor.ts | 21 +- .../settings/entity-settings-helper-tab.ts | 7 +- .../entities/entity-registry-basic-editor.ts | 12 +- .../entities/entity-registry-settings.ts | 6 +- .../config/entities/ha-config-entities.ts | 17 +- src/panels/config/ha-config-section.ts | 5 +- src/panels/config/ha-entity-config.ts | 6 +- src/panels/config/ha-panel-config.ts | 3 +- .../config/helpers/dialog-helper-detail.ts | 15 +- .../config/helpers/forms/ha-counter-form.ts | 12 +- .../helpers/forms/ha-input_boolean-form.ts | 12 +- .../helpers/forms/ha-input_datetime-form.ts | 12 +- .../helpers/forms/ha-input_number-form.ts | 12 +- .../helpers/forms/ha-input_select-form.ts | 13 +- .../helpers/forms/ha-input_text-form.ts | 12 +- .../config/helpers/forms/ha-timer-form.ts | 12 +- .../config/helpers/ha-config-helpers.ts | 11 +- src/panels/config/info/ha-config-info.ts | 10 +- src/panels/config/info/integrations-card.ts | 12 +- src/panels/config/info/system-health-card.ts | 13 +- .../integrations/ha-config-flow-card.ts | 12 +- .../integrations/ha-config-integrations.ts | 36 +- .../ha-ignored-config-entry-card.ts | 10 +- .../ha-integration-action-card.ts | 10 +- .../integrations/ha-integration-card.ts | 27 +- .../integrations/ha-integration-header.ts | 14 +- .../mqtt/mqtt-config-panel.ts | 12 +- .../mqtt/mqtt-subscribe-card.ts | 12 +- .../ozw/dialog-ozw-refresh-node.ts | 6 +- .../ozw/ozw-config-dashboard.ts | 12 +- .../ozw/ozw-config-router.ts | 2 +- .../ozw/ozw-network-dashboard.ts | 14 +- .../ozw/ozw-network-nodes.ts | 11 +- .../ozw/ozw-network-router.ts | 2 +- .../integration-panels/ozw/ozw-node-config.ts | 12 +- .../ozw/ozw-node-dashboard.ts | 12 +- .../integration-panels/ozw/ozw-node-router.ts | 2 +- .../zha/dialog-zha-cluster.ts | 6 +- .../zha/dialog-zha-device-children.ts | 11 +- .../zha/dialog-zha-device-zigbee-info.ts | 11 +- .../zha/dialog-zha-reconfigure-device.ts | 26 +- .../zha/zha-add-devices-page.ts | 6 +- .../zha/zha-add-group-page.ts | 13 +- .../zha/zha-cluster-attributes.ts | 5 +- .../zha/zha-cluster-commands.ts | 5 +- .../zha/zha-clusters-data-table.ts | 10 +- .../integration-panels/zha/zha-clusters.ts | 5 +- .../zha/zha-config-dashboard-router.ts | 2 +- .../zha/zha-config-dashboard.ts | 5 +- .../zha/zha-device-binding.ts | 6 +- .../integration-panels/zha/zha-device-card.ts | 12 +- .../zha/zha-device-endpoint-data-table.ts | 12 +- .../zha/zha-device-pairing-status-card.ts | 14 +- .../zha/zha-group-binding.ts | 7 +- .../integration-panels/zha/zha-group-page.ts | 13 +- .../zha/zha-groups-dashboard.ts | 5 +- .../zha/zha-network-visualization-page.ts | 13 +- .../zwave/zwave-config-router.ts | 4 +- .../zwave/zwave-migration.ts | 54 +- .../integration-panels/zwave/zwave-network.ts | 12 +- .../zwave/zwave-node-config.ts | 6 +- .../integration-panels/zwave/zwave-values.ts | 12 +- .../zwave_js/dialog-zwave_js-add-node.ts | 12 +- .../dialog-zwave_js-reinterview-node.ts | 20 +- .../zwave_js/dialog-zwave_js-remove-node.ts | 16 +- .../zwave_js/zwave_js-config-dashboard.ts | 16 +- .../zwave_js/zwave_js-config-router.ts | 2 +- .../zwave_js/zwave_js-logs.ts | 20 +- .../zwave_js/zwave_js-node-config.ts | 46 +- .../config/logs/dialog-system-log-detail.ts | 11 +- src/panels/config/logs/error-log-card.ts | 11 +- src/panels/config/logs/ha-config-logs.ts | 12 +- src/panels/config/logs/system-log-card.ts | 12 +- .../dialog-lovelace-dashboard-detail.ts | 12 +- .../ha-config-lovelace-dashboards.ts | 11 +- .../config/lovelace/ha-config-lovelace.ts | 2 +- .../dialog-lovelace-resource-detail.ts | 12 +- .../resources/ha-config-lovelace-resources.ts | 11 +- .../config/person/dialog-person-detail.ts | 11 +- src/panels/config/person/ha-config-person.ts | 11 +- src/panels/config/scene/ha-config-scene.ts | 3 +- src/panels/config/scene/ha-scene-dashboard.ts | 16 +- src/panels/config/scene/ha-scene-editor.ts | 8 +- src/panels/config/script/ha-config-script.ts | 3 +- src/panels/config/script/ha-script-editor.ts | 8 +- src/panels/config/script/ha-script-picker.ts | 12 +- .../ha-config-server-control.ts | 12 +- src/panels/config/tags/dialog-tag-detail.ts | 12 +- src/panels/config/tags/ha-config-tags.ts | 10 +- src/panels/config/tags/tag-image.ts | 10 +- src/panels/config/users/dialog-add-user.ts | 6 +- src/panels/config/users/dialog-user-detail.ts | 12 +- src/panels/config/users/ha-config-users.ts | 9 +- src/panels/config/zone/dialog-zone-detail.ts | 11 +- src/panels/config/zone/ha-config-zone.ts | 11 +- src/panels/custom/ha-panel-custom.ts | 3 +- .../developer-tools/developer-tools-router.ts | 2 +- .../event/event-subscribe-card.ts | 12 +- .../ha-panel-developer-tools.ts | 11 +- .../service/developer-tools-service.ts | 11 +- .../state/developer-tools-state.js | 4 +- .../template/developer-tools-template.ts | 13 +- src/panels/history/ha-panel-history.ts | 4 +- src/panels/logbook/ha-logbook.ts | 20 +- src/panels/logbook/ha-panel-logbook.ts | 15 +- .../badges/hui-entity-filter-badge.ts | 3 +- src/panels/lovelace/badges/hui-error-badge.ts | 11 +- .../lovelace/badges/hui-state-label-badge.ts | 13 +- .../lovelace/cards/hui-alarm-panel-card.ts | 9 +- src/panels/lovelace/cards/hui-button-card.ts | 18 +- .../lovelace/cards/hui-calendar-card.ts | 7 +- .../lovelace/cards/hui-conditional-card.ts | 2 +- .../lovelace/cards/hui-empty-state-card.ts | 11 +- .../lovelace/cards/hui-entities-card.ts | 15 +- .../lovelace/cards/hui-entity-button-card.ts | 2 +- src/panels/lovelace/cards/hui-entity-card.ts | 6 +- .../lovelace/cards/hui-entity-filter-card.ts | 3 +- src/panels/lovelace/cards/hui-error-card.ts | 11 +- src/panels/lovelace/cards/hui-gauge-card.ts | 8 +- src/panels/lovelace/cards/hui-glance-card.ts | 10 +- src/panels/lovelace/cards/hui-grid-card.ts | 4 +- .../lovelace/cards/hui-history-graph-card.ts | 8 +- .../cards/hui-horizontal-stack-card.ts | 2 +- .../lovelace/cards/hui-humidifier-card.ts | 6 +- src/panels/lovelace/cards/hui-iframe-card.ts | 13 +- src/panels/lovelace/cards/hui-light-card.ts | 10 +- src/panels/lovelace/cards/hui-logbook-card.ts | 8 +- src/panels/lovelace/cards/hui-map-card.ts | 7 +- .../lovelace/cards/hui-markdown-card.ts | 8 +- .../lovelace/cards/hui-media-control-card.ts | 11 +- src/panels/lovelace/cards/hui-picture-card.ts | 9 +- .../cards/hui-picture-elements-card.ts | 6 +- .../lovelace/cards/hui-picture-entity-card.ts | 10 +- .../lovelace/cards/hui-picture-glance-card.ts | 10 +- .../lovelace/cards/hui-plant-status-card.ts | 6 +- .../lovelace/cards/hui-safe-mode-card.ts | 11 +- src/panels/lovelace/cards/hui-sensor-card.ts | 2 +- .../lovelace/cards/hui-shopping-list-card.ts | 13 +- src/panels/lovelace/cards/hui-stack-card.ts | 5 +- .../lovelace/cards/hui-starting-card.ts | 5 +- .../lovelace/cards/hui-thermostat-card.ts | 9 +- .../lovelace/cards/hui-vertical-stack-card.ts | 2 +- .../cards/hui-weather-forecast-card.ts | 21 +- .../directives/action-handler-directive.ts | 5 +- src/panels/lovelace/common/has-changed.ts | 2 +- .../lovelace/components/hui-action-editor.ts | 15 +- .../lovelace/components/hui-buttons-base.ts | 40 +- .../lovelace/components/hui-card-options.ts | 6 +- .../components/hui-conditional-base.ts | 8 +- .../components/hui-entities-toggle.ts | 6 +- .../lovelace/components/hui-entity-editor.ts | 8 +- .../components/hui-generic-entity-row.ts | 8 +- .../lovelace/components/hui-graph-base.ts | 6 +- src/panels/lovelace/components/hui-image.ts | 11 +- .../components/hui-input-list-editor.ts | 11 +- src/panels/lovelace/components/hui-marquee.ts | 5 +- .../components/hui-theme-select-editor.ts | 11 +- .../components/hui-timestamp-display.ts | 11 +- .../lovelace/components/hui-views-list.ts | 11 +- .../components/hui-warning-element.ts | 11 +- src/panels/lovelace/components/hui-warning.ts | 10 +- .../card-editor/hui-card-element-editor.ts | 2 +- .../editor/card-editor/hui-card-picker.ts | 12 +- .../editor/card-editor/hui-card-preview.ts | 3 +- .../card-editor/hui-dialog-create-card.ts | 16 +- .../card-editor/hui-dialog-delete-card.ts | 13 +- .../card-editor/hui-dialog-edit-card.ts | 7 +- .../card-editor/hui-dialog-suggest-card.ts | 13 +- .../card-editor/hui-entity-picker-table.ts | 11 +- .../config-elements/config-elements-style.ts | 2 +- .../hui-alarm-panel-card-editor.ts | 12 +- .../config-elements/hui-button-card-editor.ts | 11 +- .../hui-calendar-card-editor.ts | 11 +- .../hui-conditional-card-editor.ts | 13 +- .../hui-entities-card-editor.ts | 12 +- .../config-elements/hui-entity-card-editor.ts | 11 +- .../config-elements/hui-gauge-card-editor.ts | 12 +- .../hui-generic-entity-row-editor.ts | 11 +- .../config-elements/hui-glance-card-editor.ts | 11 +- .../hui-graph-footer-editor.ts | 11 +- .../config-elements/hui-grid-card-editor.ts | 3 +- .../hui-history-graph-card-editor.ts | 13 +- .../hui-humidifier-card-editor.ts | 11 +- .../config-elements/hui-iframe-card-editor.ts | 11 +- .../config-elements/hui-light-card-editor.ts | 11 +- .../hui-logbook-card-editor.ts | 11 +- .../config-elements/hui-map-card-editor.ts | 12 +- .../hui-markdown-card-editor.ts | 11 +- .../hui-media-control-card-editor.ts | 10 +- .../hui-picture-card-editor.ts | 11 +- .../hui-picture-entity-card-editor.ts | 11 +- .../hui-picture-glance-card-editor.ts | 11 +- .../hui-plant-status-card-editor.ts | 11 +- .../config-elements/hui-sensor-card-editor.ts | 11 +- .../hui-shopping-list-editor.ts | 12 +- .../config-elements/hui-stack-card-editor.ts | 13 +- .../hui-thermostat-card-editor.ts | 11 +- .../hui-weather-forecast-card-editor.ts | 11 +- .../hui-row-element-editor.ts | 2 +- .../hui-dialog-create-headerfooter.ts | 12 +- .../hui-header-footer-editor.ts | 11 +- .../hui-header-footer-element-editor.ts | 2 +- .../lovelace/editor/hui-dialog-save-config.ts | 12 +- .../lovelace/editor/hui-element-editor.ts | 8 +- .../editor/hui-entities-card-row-editor.ts | 8 +- .../lovelace/editor/hui-sub-element-editor.ts | 13 +- .../hui-dialog-edit-lovelace.ts | 14 +- .../lovelace-editor/hui-lovelace-editor.ts | 10 +- .../select-view/hui-dialog-select-view.ts | 13 +- .../unused-entities/hui-unused-entities.ts | 8 +- .../view-editor/hui-dialog-edit-view.ts | 12 +- .../editor/view-editor/hui-view-editor.ts | 12 +- .../view-editor/hui-view-visibility-editor.ts | 6 +- .../lovelace/elements/hui-icon-element.ts | 13 +- .../lovelace/elements/hui-image-element.ts | 14 +- .../elements/hui-service-button-element.ts | 11 +- .../elements/hui-state-badge-element.ts | 13 +- .../elements/hui-state-icon-element.ts | 8 +- .../elements/hui-state-label-element.ts | 8 +- .../entity-rows/hui-climate-entity-row.ts | 6 +- .../entity-rows/hui-cover-entity-row.ts | 6 +- .../entity-rows/hui-group-entity-row.ts | 11 +- .../entity-rows/hui-humidifier-entity-row.ts | 10 +- .../hui-input-datetime-entity-row.ts | 12 +- .../hui-input-number-entity-row.ts | 6 +- .../hui-input-select-entity-row.ts | 10 +- .../entity-rows/hui-input-text-entity-row.ts | 6 +- .../entity-rows/hui-lock-entity-row.ts | 6 +- .../hui-media-player-entity-row.ts | 6 +- .../entity-rows/hui-number-entity-row.ts | 10 +- .../entity-rows/hui-scene-entity-row.ts | 6 +- .../entity-rows/hui-script-entity-row.ts | 6 +- .../entity-rows/hui-sensor-entity-row.ts | 6 +- .../entity-rows/hui-text-entity-row.ts | 8 +- .../entity-rows/hui-timer-entity-row.ts | 11 +- .../entity-rows/hui-toggle-entity-row.ts | 11 +- .../entity-rows/hui-weather-entity-row.ts | 10 +- src/panels/lovelace/entity-rows/types.ts | 2 +- src/panels/lovelace/ha-panel-lovelace.ts | 3 +- .../hui-buttons-header-footer.ts | 10 +- .../header-footer/hui-graph-header-footer.ts | 6 +- .../hui-picture-header-footer.ts | 9 +- src/panels/lovelace/hui-editor.ts | 8 +- src/panels/lovelace/hui-root.ts | 8 +- .../special-rows/hui-attribute-row.ts | 6 +- .../lovelace/special-rows/hui-button-row.ts | 11 +- .../lovelace/special-rows/hui-buttons-row.ts | 10 +- .../special-rows/hui-call-service-row.ts | 2 +- .../lovelace/special-rows/hui-cast-row.ts | 8 +- .../special-rows/hui-conditional-row.ts | 2 +- .../lovelace/special-rows/hui-divider-row.ts | 17 +- .../lovelace/special-rows/hui-section-row.ts | 11 +- .../lovelace/special-rows/hui-text-row.ts | 11 +- .../lovelace/special-rows/hui-weblink-row.ts | 13 +- .../strategies/original-states-strategy.ts | 2 +- src/panels/lovelace/views/hui-masonry-view.ts | 7 +- src/panels/lovelace/views/hui-panel-view.ts | 7 +- src/panels/lovelace/views/hui-view.ts | 9 +- .../media-browser/ha-panel-media-browser.ts | 11 +- .../hui-dialog-select-media-player.ts | 11 +- .../hui-dialog-web-browser-play-media.ts | 11 +- src/panels/my/ha-panel-my.ts | 9 +- .../dialog-ha-mfa-module-setup-flow.ts | 13 +- src/panels/profile/ha-advanced-mode-row.ts | 11 +- src/panels/profile/ha-change-password-card.ts | 6 +- src/panels/profile/ha-enable-shortcuts-row.ts | 9 +- src/panels/profile/ha-force-narrow-row.ts | 9 +- .../ha-long-lived-access-tokens-card.ts | 11 +- src/panels/profile/ha-mfa-modules-card.ts | 11 +- src/panels/profile/ha-panel-profile.ts | 11 +- src/panels/profile/ha-pick-dashboard-row.ts | 11 +- .../profile/ha-pick-number-format-row.ts | 15 +- src/panels/profile/ha-pick-theme-row.ts | 9 +- src/panels/profile/ha-refresh-tokens-card.ts | 11 +- src/panels/profile/ha-set-suspend-row.ts | 9 +- src/panels/profile/ha-set-vibrate-row.ts | 9 +- .../shopping-list/ha-panel-shopping-list.ts | 6 +- src/resources/codemirror.ts | 24 +- src/resources/compatibility.ts | 1 + src/resources/custom-card-support.ts | 2 +- src/resources/ha-sortable-style.ts | 2 +- src/resources/styles.ts | 2 +- src/state-summary/state-card-display.ts | 13 +- src/state-summary/state-card-input_select.ts | 5 +- src/state-summary/state-card-script.ts | 9 +- src/state/connection-mixin.ts | 2 +- src/state/dialog-manager-mixin.ts | 2 +- src/state/disconnect-toast-mixin.ts | 10 +- src/state/haptic-mixin.ts | 2 +- src/state/hass-base-mixin.ts | 7 +- src/state/more-info-mixin.ts | 2 +- src/state/quick-bar-mixin.ts | 2 +- src/state/translations-mixin.ts | 2 +- src/state/url-sync-mixin.ts | 2 +- src/styles/polymer-ha-style-dialog.ts | 2 +- src/styles/polymer-ha-style.ts | 2 +- src/types.ts | 2 +- yarn.lock | 959 +++++++++--------- 691 files changed, 2328 insertions(+), 5179 deletions(-) diff --git a/build-scripts/webpack.js b/build-scripts/webpack.js index b7b11cc34..88534d44b 100644 --- a/build-scripts/webpack.js +++ b/build-scripts/webpack.js @@ -117,7 +117,7 @@ const createWebpackConfig = ({ new webpack.NormalModuleReplacementPlugin( new RegExp( require.resolve( - "lit-virtualizer/lib/uni-virtualizer/lib/polyfillLoaders/EventTarget.js" + "@lit-labs/virtualizer/lib/uni-virtualizer/lib/polyfillLoaders/EventTarget.js" ) ), path.resolve(paths.polymer_dir, "src/resources/EventTarget-ponyfill.js") @@ -126,6 +126,10 @@ const createWebpackConfig = ({ ].filter(Boolean), resolve: { extensions: [".ts", ".js", ".json"], + alias: { + "lit/decorators$": "lit/decorators.js", + "lit/directive$": "lit/directive.js", + }, }, output: { filename: ({ chunk }) => { diff --git a/cast/src/launcher/layout/hc-cast.ts b/cast/src/launcher/layout/hc-cast.ts index fdb2b6443..1f349f637 100644 --- a/cast/src/launcher/layout/hc-cast.ts +++ b/cast/src/launcher/layout/hc-cast.ts @@ -1,16 +1,9 @@ +import "@material/mwc-button/mwc-button"; import "@polymer/paper-item/paper-icon-item"; import "@polymer/paper-listbox/paper-listbox"; import { Auth, Connection } from "home-assistant-js-websocket"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - state, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { CastManager } from "../../../../src/cast/cast_manager"; import { castSendShowLovelaceView, @@ -32,7 +25,6 @@ import { import "../../../../src/layouts/hass-loading-screen"; import { generateDefaultViewConfig } from "../../../../src/panels/lovelace/common/generate-lovelace-config"; import "./hc-layout"; -import "@material/mwc-button/mwc-button"; @customElement("hc-cast") class HcCast extends LitElement { diff --git a/cast/src/launcher/layout/hc-connect.ts b/cast/src/launcher/layout/hc-connect.ts index c546e5bef..dd87cbef6 100644 --- a/cast/src/launcher/layout/hc-connect.ts +++ b/cast/src/launcher/layout/hc-connect.ts @@ -11,15 +11,8 @@ import { getAuth, getAuthOptions, } from "home-assistant-js-websocket"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - TemplateResult, - state, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, state } from "lit/decorators"; import { CastManager, getCastManager } from "../../../../src/cast/cast_manager"; import { castSendShowDemo } from "../../../../src/cast/receiver_messages"; import { diff --git a/cast/src/launcher/layout/hc-layout.ts b/cast/src/launcher/layout/hc-layout.ts index a505d926a..0d0e8cdb0 100644 --- a/cast/src/launcher/layout/hc-layout.ts +++ b/cast/src/launcher/layout/hc-layout.ts @@ -4,15 +4,8 @@ import { getUser, HassUser, } from "home-assistant-js-websocket"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import "../../../../src/components/ha-card"; @customElement("hc-layout") diff --git a/cast/src/receiver/layout/hc-demo.ts b/cast/src/receiver/layout/hc-demo.ts index 192981215..763d6baa5 100644 --- a/cast/src/receiver/layout/hc-demo.ts +++ b/cast/src/receiver/layout/hc-demo.ts @@ -1,10 +1,5 @@ -import { - customElement, - html, - state, - property, - TemplateResult, -} from "lit-element"; +import { html, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { mockHistory } from "../../../../demo/src/stubs/history"; import { LovelaceConfig } from "../../../../src/data/lovelace"; import { diff --git a/cast/src/receiver/layout/hc-launch-screen.ts b/cast/src/receiver/layout/hc-launch-screen.ts index 53fe4476c..a4d6aa5e4 100644 --- a/cast/src/receiver/layout/hc-launch-screen.ts +++ b/cast/src/receiver/layout/hc-launch-screen.ts @@ -1,12 +1,5 @@ -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import { HomeAssistant } from "../../../../src/types"; @customElement("hc-launch-screen") diff --git a/cast/src/receiver/layout/hc-lovelace.ts b/cast/src/receiver/layout/hc-lovelace.ts index 3115b474c..1b13e1897 100644 --- a/cast/src/receiver/layout/hc-lovelace.ts +++ b/cast/src/receiver/layout/hc-lovelace.ts @@ -1,12 +1,5 @@ -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import { LovelaceConfig } from "../../../../src/data/lovelace"; import { Lovelace } from "../../../../src/panels/lovelace/types"; import "../../../../src/panels/lovelace/views/hui-view"; diff --git a/cast/src/receiver/layout/hc-main.ts b/cast/src/receiver/layout/hc-main.ts index 567d4de8b..bc4a9320e 100644 --- a/cast/src/receiver/layout/hc-main.ts +++ b/cast/src/receiver/layout/hc-main.ts @@ -3,7 +3,8 @@ import { getAuth, UnsubscribeFunc, } from "home-assistant-js-websocket"; -import { customElement, html, state, TemplateResult } from "lit-element"; +import { html, TemplateResult } from "lit"; +import { customElement, state } from "lit/decorators"; import { CAST_NS } from "../../../../src/cast/const"; import { ConnectMessage, diff --git a/demo/src/custom-cards/card-modder.js b/demo/src/custom-cards/card-modder.js index c915a9566..6ada98248 100644 --- a/demo/src/custom-cards/card-modder.js +++ b/demo/src/custom-cards/card-modder.js @@ -1,5 +1,5 @@ /* eslint-disable */ -import { LitElement } from "lit-element"; +import { LitElement } from "lit"; import "./card-tools"; class CardModder extends LitElement { diff --git a/demo/src/custom-cards/card-tools.js b/demo/src/custom-cards/card-tools.js index 39cf7598f..27b37cabe 100644 --- a/demo/src/custom-cards/card-tools.js +++ b/demo/src/custom-cards/card-tools.js @@ -1,5 +1,5 @@ /* eslint-disable */ -import { html, LitElement } from "lit-element"; +import { html, LitElement } from "lit"; if (!window.cardTools) { const version = 0.2; diff --git a/demo/src/custom-cards/cast-demo-row.ts b/demo/src/custom-cards/cast-demo-row.ts index 01f804a8a..8fbecb4eb 100644 --- a/demo/src/custom-cards/cast-demo-row.ts +++ b/demo/src/custom-cards/cast-demo-row.ts @@ -1,12 +1,5 @@ -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, state } from "lit/decorators"; import { CastManager } from "../../../src/cast/cast_manager"; import { castSendShowDemo } from "../../../src/cast/receiver_messages"; import "../../../src/components/ha-icon"; diff --git a/demo/src/custom-cards/ha-demo-card.ts b/demo/src/custom-cards/ha-demo-card.ts index 0bb27206c..fcd48a90a 100644 --- a/demo/src/custom-cards/ha-demo-card.ts +++ b/demo/src/custom-cards/ha-demo-card.ts @@ -1,14 +1,7 @@ import "@material/mwc-button"; -import { - css, - CSSResultGroup, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; -import { until } from "lit-html/directives/until"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { property, state } from "lit/decorators"; +import { until } from "lit/directives/until"; import "../../../src/components/ha-card"; import "../../../src/components/ha-circular-progress"; import { LovelaceCardConfig } from "../../../src/data/lovelace"; diff --git a/gallery/src/demos/demo-automation-describe-action.ts b/gallery/src/demos/demo-automation-describe-action.ts index 642bcfb58..fa0f26b54 100644 --- a/gallery/src/demos/demo-automation-describe-action.ts +++ b/gallery/src/demos/demo-automation-describe-action.ts @@ -1,12 +1,6 @@ import { safeDump } from "js-yaml"; -import { - customElement, - html, - css, - LitElement, - TemplateResult, - property, -} from "lit-element"; +import { html, css, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import "../../../src/components/ha-card"; import { describeAction } from "../../../src/data/script_i18n"; import { provideHass } from "../../../src/fake_data/provide_hass"; diff --git a/gallery/src/demos/demo-automation-describe-condition.ts b/gallery/src/demos/demo-automation-describe-condition.ts index ef57b9a1e..2faffde2c 100644 --- a/gallery/src/demos/demo-automation-describe-condition.ts +++ b/gallery/src/demos/demo-automation-describe-condition.ts @@ -1,11 +1,6 @@ import { safeDump } from "js-yaml"; -import { - customElement, - html, - css, - LitElement, - TemplateResult, -} from "lit-element"; +import { html, css, LitElement, TemplateResult } from "lit"; +import { customElement } from "lit/decorators"; import "../../../src/components/ha-card"; import { describeCondition } from "../../../src/data/automation_i18n"; diff --git a/gallery/src/demos/demo-automation-describe-trigger.ts b/gallery/src/demos/demo-automation-describe-trigger.ts index f870db44d..c4b306632 100644 --- a/gallery/src/demos/demo-automation-describe-trigger.ts +++ b/gallery/src/demos/demo-automation-describe-trigger.ts @@ -1,11 +1,6 @@ import { safeDump } from "js-yaml"; -import { - customElement, - html, - css, - LitElement, - TemplateResult, -} from "lit-element"; +import { html, css, LitElement, TemplateResult } from "lit"; +import { customElement } from "lit/decorators"; import "../../../src/components/ha-card"; import { describeTrigger } from "../../../src/data/automation_i18n"; diff --git a/gallery/src/demos/demo-automation-trace-timeline.ts b/gallery/src/demos/demo-automation-trace-timeline.ts index 740c58902..50461fca6 100644 --- a/gallery/src/demos/demo-automation-trace-timeline.ts +++ b/gallery/src/demos/demo-automation-trace-timeline.ts @@ -1,11 +1,5 @@ -import { - customElement, - html, - css, - LitElement, - TemplateResult, - property, -} from "lit-element"; +import { html, css, LitElement, TemplateResult } 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"; diff --git a/gallery/src/demos/demo-automation-trace.ts b/gallery/src/demos/demo-automation-trace.ts index e6c0fe624..7b96d81c0 100644 --- a/gallery/src/demos/demo-automation-trace.ts +++ b/gallery/src/demos/demo-automation-trace.ts @@ -1,12 +1,4 @@ -import { - customElement, - html, - css, - LitElement, - TemplateResult, - state, - property, -} from "lit-element"; +import { html, css, LitElement, TemplateResult } from "lit"; import "../../../src/components/ha-card"; import "../../../src/components/trace/hat-script-graph"; import "../../../src/components/trace/hat-trace-timeline"; @@ -15,6 +7,7 @@ import { HomeAssistant } from "../../../src/types"; import { DemoTrace } from "../data/traces/types"; import { basicTrace } from "../data/traces/basic_trace"; import { motionLightTrace } from "../data/traces/motion-light-trace"; +import { customElement, property, state } from "lit/decorators"; const traces: DemoTrace[] = [basicTrace, motionLightTrace]; diff --git a/gallery/src/demos/demo-hui-alarm-panel-card.ts b/gallery/src/demos/demo-hui-alarm-panel-card.ts index 0042b3187..be9a5a22e 100644 --- a/gallery/src/demos/demo-hui-alarm-panel-card.ts +++ b/gallery/src/demos/demo-hui-alarm-panel-card.ts @@ -1,11 +1,5 @@ -import { - customElement, - html, - LitElement, - PropertyValues, - query, - TemplateResult, -} from "lit-element"; +import { html, LitElement, PropertyValues, TemplateResult } from "lit"; +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"; diff --git a/gallery/src/demos/demo-hui-conditional-card.ts b/gallery/src/demos/demo-hui-conditional-card.ts index 9d91c76f8..5977ee3c0 100644 --- a/gallery/src/demos/demo-hui-conditional-card.ts +++ b/gallery/src/demos/demo-hui-conditional-card.ts @@ -1,11 +1,5 @@ -import { - customElement, - html, - LitElement, - PropertyValues, - query, - TemplateResult, -} from "lit-element"; +import { html, LitElement, PropertyValues, TemplateResult } from "lit"; +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"; diff --git a/gallery/src/demos/demo-hui-entities-card.ts b/gallery/src/demos/demo-hui-entities-card.ts index 8f030ec6c..c6ed878c0 100644 --- a/gallery/src/demos/demo-hui-entities-card.ts +++ b/gallery/src/demos/demo-hui-entities-card.ts @@ -1,11 +1,5 @@ -import { - customElement, - html, - LitElement, - PropertyValues, - query, - TemplateResult, -} from "lit-element"; +import { html, LitElement, PropertyValues, TemplateResult } from "lit"; +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"; diff --git a/gallery/src/demos/demo-hui-entity-button-card.ts b/gallery/src/demos/demo-hui-entity-button-card.ts index 56d7018e3..320eb8f8c 100644 --- a/gallery/src/demos/demo-hui-entity-button-card.ts +++ b/gallery/src/demos/demo-hui-entity-button-card.ts @@ -1,11 +1,5 @@ -import { - customElement, - html, - LitElement, - PropertyValues, - query, - TemplateResult, -} from "lit-element"; +import { html, LitElement, PropertyValues, TemplateResult } from "lit"; +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"; diff --git a/gallery/src/demos/demo-hui-entity-filter-card.ts b/gallery/src/demos/demo-hui-entity-filter-card.ts index 309e43f7d..3a0162ae7 100644 --- a/gallery/src/demos/demo-hui-entity-filter-card.ts +++ b/gallery/src/demos/demo-hui-entity-filter-card.ts @@ -1,11 +1,5 @@ -import { - customElement, - html, - LitElement, - PropertyValues, - query, - TemplateResult, -} from "lit-element"; +import { html, LitElement, PropertyValues, TemplateResult } from "lit"; +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"; diff --git a/gallery/src/demos/demo-hui-gauge-card.ts b/gallery/src/demos/demo-hui-gauge-card.ts index 659955354..fdcf07188 100644 --- a/gallery/src/demos/demo-hui-gauge-card.ts +++ b/gallery/src/demos/demo-hui-gauge-card.ts @@ -1,11 +1,5 @@ -import { - customElement, - html, - LitElement, - PropertyValues, - query, - TemplateResult, -} from "lit-element"; +import { html, LitElement, PropertyValues, TemplateResult } from "lit"; +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"; diff --git a/gallery/src/demos/demo-hui-glance-card.ts b/gallery/src/demos/demo-hui-glance-card.ts index 9f407307e..c078ba5f6 100644 --- a/gallery/src/demos/demo-hui-glance-card.ts +++ b/gallery/src/demos/demo-hui-glance-card.ts @@ -1,11 +1,5 @@ -import { - customElement, - html, - LitElement, - PropertyValues, - query, - TemplateResult, -} from "lit-element"; +import { html, LitElement, PropertyValues, TemplateResult } from "lit"; +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"; diff --git a/gallery/src/demos/demo-hui-grid-and-stack-card.ts b/gallery/src/demos/demo-hui-grid-and-stack-card.ts index 4891d6626..6b743b243 100644 --- a/gallery/src/demos/demo-hui-grid-and-stack-card.ts +++ b/gallery/src/demos/demo-hui-grid-and-stack-card.ts @@ -1,11 +1,5 @@ -import { - customElement, - html, - LitElement, - PropertyValues, - query, - TemplateResult, -} from "lit-element"; +import { html, LitElement, PropertyValues, TemplateResult } from "lit"; +import { customElement, query } from "lit/decorators"; import { mockHistory } from "../../../demo/src/stubs/history"; import { getEntity } from "../../../src/fake_data/entity"; import { provideHass } from "../../../src/fake_data/provide_hass"; diff --git a/gallery/src/demos/demo-hui-iframe-card.ts b/gallery/src/demos/demo-hui-iframe-card.ts index f4497e942..811d858e4 100644 --- a/gallery/src/demos/demo-hui-iframe-card.ts +++ b/gallery/src/demos/demo-hui-iframe-card.ts @@ -1,4 +1,5 @@ -import { customElement, html, LitElement, TemplateResult } from "lit-element"; +import { html, LitElement, TemplateResult } from "lit"; +import { customElement } from "lit/decorators"; import "../components/demo-cards"; const CONFIGS = [ diff --git a/gallery/src/demos/demo-hui-light-card.ts b/gallery/src/demos/demo-hui-light-card.ts index 26c419f9e..8cae0ff9d 100644 --- a/gallery/src/demos/demo-hui-light-card.ts +++ b/gallery/src/demos/demo-hui-light-card.ts @@ -1,11 +1,5 @@ -import { - customElement, - html, - LitElement, - PropertyValues, - query, - TemplateResult, -} from "lit-element"; +import { html, LitElement, PropertyValues, TemplateResult } from "lit"; +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"; diff --git a/gallery/src/demos/demo-hui-map-card.ts b/gallery/src/demos/demo-hui-map-card.ts index ccb47deab..68912a6e7 100644 --- a/gallery/src/demos/demo-hui-map-card.ts +++ b/gallery/src/demos/demo-hui-map-card.ts @@ -1,11 +1,5 @@ -import { - customElement, - html, - LitElement, - PropertyValues, - query, - TemplateResult, -} from "lit-element"; +import { html, LitElement, PropertyValues, TemplateResult } from "lit"; +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"; diff --git a/gallery/src/demos/demo-hui-markdown-card.ts b/gallery/src/demos/demo-hui-markdown-card.ts index 94f63f404..6e34a04c6 100644 --- a/gallery/src/demos/demo-hui-markdown-card.ts +++ b/gallery/src/demos/demo-hui-markdown-card.ts @@ -1,11 +1,5 @@ -import { - customElement, - html, - LitElement, - PropertyValues, - query, - TemplateResult, -} from "lit-element"; +import { html, LitElement, PropertyValues, TemplateResult } from "lit"; +import { customElement, query } from "lit/decorators"; import { mockTemplate } from "../../../demo/src/stubs/template"; import { provideHass } from "../../../src/fake_data/provide_hass"; import "../components/demo-cards"; diff --git a/gallery/src/demos/demo-hui-media-control-card.ts b/gallery/src/demos/demo-hui-media-control-card.ts index 3b032c409..0b963f36e 100644 --- a/gallery/src/demos/demo-hui-media-control-card.ts +++ b/gallery/src/demos/demo-hui-media-control-card.ts @@ -1,11 +1,5 @@ -import { - customElement, - html, - LitElement, - PropertyValues, - query, - TemplateResult, -} from "lit-element"; +import { html, LitElement, PropertyValues, TemplateResult } from "lit"; +import { customElement, query } from "lit/decorators"; import { provideHass } from "../../../src/fake_data/provide_hass"; import "../components/demo-cards"; import { createMediaPlayerEntities } from "../data/media_players"; diff --git a/gallery/src/demos/demo-hui-media-player-rows.ts b/gallery/src/demos/demo-hui-media-player-rows.ts index 500bfca69..988d232e4 100644 --- a/gallery/src/demos/demo-hui-media-player-rows.ts +++ b/gallery/src/demos/demo-hui-media-player-rows.ts @@ -1,11 +1,5 @@ -import { - customElement, - html, - LitElement, - PropertyValues, - query, - TemplateResult, -} from "lit-element"; +import { html, LitElement, PropertyValues, TemplateResult } from "lit"; +import { customElement, query } from "lit/decorators"; import { provideHass } from "../../../src/fake_data/provide_hass"; import "../components/demo-cards"; import { createMediaPlayerEntities } from "../data/media_players"; diff --git a/gallery/src/demos/demo-hui-picture-elements-card.ts b/gallery/src/demos/demo-hui-picture-elements-card.ts index 5ab818911..c3fcc7d61 100644 --- a/gallery/src/demos/demo-hui-picture-elements-card.ts +++ b/gallery/src/demos/demo-hui-picture-elements-card.ts @@ -1,11 +1,5 @@ -import { - customElement, - html, - LitElement, - PropertyValues, - query, - TemplateResult, -} from "lit-element"; +import { html, LitElement, PropertyValues, TemplateResult } from "lit"; +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"; diff --git a/gallery/src/demos/demo-hui-picture-entity-card.ts b/gallery/src/demos/demo-hui-picture-entity-card.ts index 3a1b64f76..6b8d8418e 100644 --- a/gallery/src/demos/demo-hui-picture-entity-card.ts +++ b/gallery/src/demos/demo-hui-picture-entity-card.ts @@ -1,11 +1,5 @@ -import { - customElement, - html, - LitElement, - PropertyValues, - query, - TemplateResult, -} from "lit-element"; +import { html, LitElement, PropertyValues, TemplateResult } from "lit"; +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"; diff --git a/gallery/src/demos/demo-hui-picture-glance-card.ts b/gallery/src/demos/demo-hui-picture-glance-card.ts index f6790efc3..b82c2a2fa 100644 --- a/gallery/src/demos/demo-hui-picture-glance-card.ts +++ b/gallery/src/demos/demo-hui-picture-glance-card.ts @@ -1,11 +1,5 @@ -import { - customElement, - html, - LitElement, - PropertyValues, - query, - TemplateResult, -} from "lit-element"; +import { html, LitElement, PropertyValues, TemplateResult } from "lit"; +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"; diff --git a/gallery/src/demos/demo-hui-plant-card.ts b/gallery/src/demos/demo-hui-plant-card.ts index 9e8aff318..683d0c6a3 100644 --- a/gallery/src/demos/demo-hui-plant-card.ts +++ b/gallery/src/demos/demo-hui-plant-card.ts @@ -1,11 +1,5 @@ -import { - customElement, - html, - LitElement, - PropertyValues, - query, - TemplateResult, -} from "lit-element"; +import { html, LitElement, PropertyValues, TemplateResult } from "lit"; +import { customElement, query } from "lit/decorators"; import { provideHass } from "../../../src/fake_data/provide_hass"; import "../components/demo-cards"; import { createPlantEntities } from "../data/plants"; diff --git a/gallery/src/demos/demo-hui-shopping-list-card.ts b/gallery/src/demos/demo-hui-shopping-list-card.ts index 61f9aa906..034c150ab 100644 --- a/gallery/src/demos/demo-hui-shopping-list-card.ts +++ b/gallery/src/demos/demo-hui-shopping-list-card.ts @@ -1,11 +1,5 @@ -import { - customElement, - html, - LitElement, - PropertyValues, - query, - TemplateResult, -} from "lit-element"; +import { html, LitElement, PropertyValues, TemplateResult } from "lit"; +import { customElement, query } from "lit/decorators"; import { provideHass } from "../../../src/fake_data/provide_hass"; import "../components/demo-cards"; diff --git a/gallery/src/demos/demo-hui-thermostat-card.ts b/gallery/src/demos/demo-hui-thermostat-card.ts index e6cdaae78..86216da56 100644 --- a/gallery/src/demos/demo-hui-thermostat-card.ts +++ b/gallery/src/demos/demo-hui-thermostat-card.ts @@ -1,11 +1,5 @@ -import { - customElement, - html, - LitElement, - PropertyValues, - query, - TemplateResult, -} from "lit-element"; +import { html, LitElement, PropertyValues, TemplateResult } from "lit"; +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"; diff --git a/gallery/src/demos/demo-integration-card.ts b/gallery/src/demos/demo-integration-card.ts index 8cb51ddd2..1e23303bc 100644 --- a/gallery/src/demos/demo-integration-card.ts +++ b/gallery/src/demos/demo-integration-card.ts @@ -1,12 +1,4 @@ -import { - customElement, - html, - css, - state, - LitElement, - TemplateResult, - property, -} from "lit-element"; +import { html, css, LitElement, TemplateResult } from "lit"; import "../../../src/components/ha-formfield"; import "../../../src/components/ha-switch"; @@ -23,7 +15,8 @@ import type { } from "../../../src/panels/config/integrations/ha-config-integrations"; import { DeviceRegistryEntry } from "../../../src/data/device_registry"; import { EntityRegistryEntry } from "../../../src/data/entity_registry"; -import { classMap } from "lit-html/directives/class-map"; +import { classMap } from "lit/directives/class-map"; +import { customElement, property, state } from "lit/decorators"; const createConfigEntry = ( title: string, diff --git a/gallery/src/demos/demo-more-info-light.ts b/gallery/src/demos/demo-more-info-light.ts index 399873aa9..a3107a5df 100644 --- a/gallery/src/demos/demo-more-info-light.ts +++ b/gallery/src/demos/demo-more-info-light.ts @@ -1,12 +1,5 @@ -import { - customElement, - html, - LitElement, - property, - PropertyValues, - query, - TemplateResult, -} from "lit-element"; +import { html, LitElement, PropertyValues, TemplateResult } from "lit"; +import { customElement, property, query } from "lit/decorators"; import "../../../src/components/ha-card"; import { LightColorModes, diff --git a/gallery/src/demos/demo-util-long-press.ts b/gallery/src/demos/demo-util-long-press.ts index 9fa774918..f4fddb45a 100644 --- a/gallery/src/demos/demo-util-long-press.ts +++ b/gallery/src/demos/demo-util-long-press.ts @@ -1,5 +1,6 @@ import "@material/mwc-button"; -import { customElement, html, LitElement, TemplateResult } from "lit-element"; +import { html, LitElement, TemplateResult } from "lit"; +import { customElement } from "lit/decorators"; import "../../../src/components/ha-card"; import { ActionHandlerEvent } from "../../../src/data/lovelace"; import { actionHandler } from "../../../src/panels/lovelace/common/directives/action-handler-directive"; diff --git a/hassio/src/addon-store/hassio-addon-repository.ts b/hassio/src/addon-store/hassio-addon-repository.ts index 4462d0385..6c510374e 100644 --- a/hassio/src/addon-store/hassio-addon-repository.ts +++ b/hassio/src/addon-store/hassio-addon-repository.ts @@ -1,12 +1,6 @@ import { mdiArrowUpBoldCircle, mdiPuzzle } from "@mdi/js"; -import { - css, - CSSResultGroup, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { property } from "lit/decorators"; import memoizeOne from "memoize-one"; import { atLeastVersion } from "../../../src/common/config/version"; import { navigate } from "../../../src/common/navigate"; diff --git a/hassio/src/addon-store/hassio-addon-store.ts b/hassio/src/addon-store/hassio-addon-store.ts index 21e67c7d2..13e55215b 100644 --- a/hassio/src/addon-store/hassio-addon-store.ts +++ b/hassio/src/addon-store/hassio-addon-store.ts @@ -5,12 +5,12 @@ import { mdiDotsVertical } from "@mdi/js"; import { css, CSSResultGroup, - state, + html, LitElement, - property, PropertyValues, -} from "lit-element"; -import { html, TemplateResult } from "lit-html"; + TemplateResult, +} from "lit"; +import { property, state } from "lit/decorators"; import memoizeOne from "memoize-one"; import { atLeastVersion } from "../../../src/common/config/version"; import { fireEvent } from "../../../src/common/dom/fire_event"; diff --git a/hassio/src/addon-view/config/hassio-addon-audio.ts b/hassio/src/addon-view/config/hassio-addon-audio.ts index a3e412141..ad6238c42 100644 --- a/hassio/src/addon-view/config/hassio-addon-audio.ts +++ b/hassio/src/addon-view/config/hassio-addon-audio.ts @@ -5,14 +5,12 @@ import "@polymer/paper-listbox/paper-listbox"; import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, property, state } from "lit/decorators"; import "web-animations-js/web-animations-next-lite.min"; import "../../../../src/components/buttons/ha-progress-button"; import "../../../../src/components/ha-card"; diff --git a/hassio/src/addon-view/config/hassio-addon-config-tab.ts b/hassio/src/addon-view/config/hassio-addon-config-tab.ts index ab57e72d6..3b3e1961e 100644 --- a/hassio/src/addon-view/config/hassio-addon-config-tab.ts +++ b/hassio/src/addon-view/config/hassio-addon-config-tab.ts @@ -1,12 +1,5 @@ -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import "../../../../src/components/ha-circular-progress"; import { HassioAddonDetails } from "../../../../src/data/hassio/addon"; import { Supervisor } from "../../../../src/data/supervisor/supervisor"; diff --git a/hassio/src/addon-view/config/hassio-addon-config.ts b/hassio/src/addon-view/config/hassio-addon-config.ts index 936c5d765..52c3d7393 100644 --- a/hassio/src/addon-view/config/hassio-addon-config.ts +++ b/hassio/src/addon-view/config/hassio-addon-config.ts @@ -6,15 +6,12 @@ import "@polymer/iron-autogrow-textarea/iron-autogrow-textarea"; import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, - query, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, property, state, query } from "lit/decorators"; import memoizeOne from "memoize-one"; import { fireEvent } from "../../../../src/common/dom/fire_event"; import "../../../../src/components/buttons/ha-progress-button"; diff --git a/hassio/src/addon-view/config/hassio-addon-network.ts b/hassio/src/addon-view/config/hassio-addon-network.ts index 6a96a8874..9eb8541bd 100644 --- a/hassio/src/addon-view/config/hassio-addon-network.ts +++ b/hassio/src/addon-view/config/hassio-addon-network.ts @@ -2,14 +2,12 @@ import { PaperInputElement } from "@polymer/paper-input/paper-input"; import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, property, state } from "lit/decorators"; import { fireEvent } from "../../../../src/common/dom/fire_event"; import "../../../../src/components/buttons/ha-progress-button"; import "../../../../src/components/ha-card"; diff --git a/hassio/src/addon-view/documentation/hassio-addon-documentation-tab.ts b/hassio/src/addon-view/documentation/hassio-addon-documentation-tab.ts index 3ae8b6542..179598f09 100644 --- a/hassio/src/addon-view/documentation/hassio-addon-documentation-tab.ts +++ b/hassio/src/addon-view/documentation/hassio-addon-documentation-tab.ts @@ -1,14 +1,5 @@ import "../../../../src/components/ha-card"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; import "../../../../src/components/ha-circular-progress"; import "../../../../src/components/ha-markdown"; import { @@ -21,6 +12,7 @@ import { haStyle } from "../../../../src/resources/styles"; import { HomeAssistant } from "../../../../src/types"; import { hassioStyle } from "../../resources/hassio-style"; import { Supervisor } from "../../../../src/data/supervisor/supervisor"; +import { customElement, property, state } from "lit/decorators"; @customElement("hassio-addon-documentation-tab") class HassioAddonDocumentationDashboard extends LitElement { diff --git a/hassio/src/addon-view/hassio-addon-dashboard.ts b/hassio/src/addon-view/hassio-addon-dashboard.ts index 52f5859f1..8b7fd81e8 100644 --- a/hassio/src/addon-view/hassio-addon-dashboard.ts +++ b/hassio/src/addon-view/hassio-addon-dashboard.ts @@ -4,16 +4,8 @@ import { mdiInformationVariant, mdiMathLog, } from "@mdi/js"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import memoizeOne from "memoize-one"; import { fireEvent } from "../../../src/common/dom/fire_event"; import { navigate } from "../../../src/common/navigate"; diff --git a/hassio/src/addon-view/hassio-addon-router.ts b/hassio/src/addon-view/hassio-addon-router.ts index e2d540527..fe0bad9c0 100644 --- a/hassio/src/addon-view/hassio-addon-router.ts +++ b/hassio/src/addon-view/hassio-addon-router.ts @@ -1,4 +1,4 @@ -import { customElement, property } from "lit-element"; +import { customElement, property } from "lit/decorators"; import { HassioAddonDetails } from "../../../src/data/hassio/addon"; import { Supervisor } from "../../../src/data/supervisor/supervisor"; import { diff --git a/hassio/src/addon-view/info/hassio-addon-info-tab.ts b/hassio/src/addon-view/info/hassio-addon-info-tab.ts index a46becbd7..6b31e546b 100644 --- a/hassio/src/addon-view/info/hassio-addon-info-tab.ts +++ b/hassio/src/addon-view/info/hassio-addon-info-tab.ts @@ -1,12 +1,5 @@ -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import "../../../../src/components/ha-circular-progress"; import { HassioAddonDetails } from "../../../../src/data/hassio/addon"; import { Supervisor } from "../../../../src/data/supervisor/supervisor"; diff --git a/hassio/src/addon-view/info/hassio-addon-info.ts b/hassio/src/addon-view/info/hassio-addon-info.ts index 3873353bb..6c1291b63 100644 --- a/hassio/src/addon-view/info/hassio-addon-info.ts +++ b/hassio/src/addon-view/info/hassio-addon-info.ts @@ -14,17 +14,9 @@ import { mdiPound, mdiShield, } from "@mdi/js"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; import memoizeOne from "memoize-one"; import { atLeastVersion } from "../../../../src/common/config/version"; import { fireEvent } from "../../../../src/common/dom/fire_event"; diff --git a/hassio/src/addon-view/log/hassio-addon-log-tab.ts b/hassio/src/addon-view/log/hassio-addon-log-tab.ts index d9d4cff07..3690d75c6 100644 --- a/hassio/src/addon-view/log/hassio-addon-log-tab.ts +++ b/hassio/src/addon-view/log/hassio-addon-log-tab.ts @@ -1,12 +1,5 @@ -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import "../../../../src/components/ha-circular-progress"; import { HassioAddonDetails } from "../../../../src/data/hassio/addon"; import { Supervisor } from "../../../../src/data/supervisor/supervisor"; diff --git a/hassio/src/addon-view/log/hassio-addon-logs.ts b/hassio/src/addon-view/log/hassio-addon-logs.ts index 3d2034f1a..a8ed8f352 100644 --- a/hassio/src/addon-view/log/hassio-addon-logs.ts +++ b/hassio/src/addon-view/log/hassio-addon-logs.ts @@ -1,14 +1,6 @@ import "@material/mwc-button"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import "../../../../src/components/ha-card"; import { fetchHassioAddonLogs, diff --git a/hassio/src/components/hassio-ansi-to-html.ts b/hassio/src/components/hassio-ansi-to-html.ts index e31b4dba0..416be0738 100644 --- a/hassio/src/components/hassio-ansi-to-html.ts +++ b/hassio/src/components/hassio-ansi-to-html.ts @@ -1,12 +1,5 @@ -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; interface State { bold: boolean; diff --git a/hassio/src/components/hassio-card-content.ts b/hassio/src/components/hassio-card-content.ts index 383388bde..d4b950800 100644 --- a/hassio/src/components/hassio-card-content.ts +++ b/hassio/src/components/hassio-card-content.ts @@ -1,13 +1,6 @@ import { mdiHelpCircle } from "@mdi/js"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import "../../../src/components/ha-relative-time"; import "../../../src/components/ha-svg-icon"; import { HomeAssistant } from "../../../src/types"; diff --git a/hassio/src/components/hassio-upload-snapshot.ts b/hassio/src/components/hassio-upload-snapshot.ts index 5f16b62f8..5347e9a79 100644 --- a/hassio/src/components/hassio-upload-snapshot.ts +++ b/hassio/src/components/hassio-upload-snapshot.ts @@ -2,13 +2,8 @@ import "@material/mwc-icon-button/mwc-icon-button"; import { mdiFolderUpload } from "@mdi/js"; import "@polymer/iron-input/iron-input"; import "@polymer/paper-input/paper-input-container"; -import { - customElement, - html, - state, - LitElement, - TemplateResult, -} from "lit-element"; +import { html, LitElement, TemplateResult } from "lit"; +import { customElement, state } from "lit/decorators"; import { fireEvent } from "../../../src/common/dom/fire_event"; import "../../../src/components/ha-circular-progress"; import "../../../src/components/ha-file-upload"; diff --git a/hassio/src/components/supervisor-metric.ts b/hassio/src/components/supervisor-metric.ts index 3030c9cf6..e6dc77251 100644 --- a/hassio/src/components/supervisor-metric.ts +++ b/hassio/src/components/supervisor-metric.ts @@ -1,13 +1,6 @@ -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; import "../../../src/components/ha-bar"; import "../../../src/components/ha-settings-row"; import { roundWithOneDecimal } from "../../../src/util/calculate"; diff --git a/hassio/src/dashboard/hassio-addons.ts b/hassio/src/dashboard/hassio-addons.ts index aa5393313..eb7928117 100644 --- a/hassio/src/dashboard/hassio-addons.ts +++ b/hassio/src/dashboard/hassio-addons.ts @@ -1,13 +1,6 @@ import { mdiArrowUpBoldCircle, mdiPuzzle } from "@mdi/js"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import { atLeastVersion } from "../../../src/common/config/version"; import { navigate } from "../../../src/common/navigate"; import { compare } from "../../../src/common/string/compare"; diff --git a/hassio/src/dashboard/hassio-dashboard.ts b/hassio/src/dashboard/hassio-dashboard.ts index 9c2791064..6b98c759c 100644 --- a/hassio/src/dashboard/hassio-dashboard.ts +++ b/hassio/src/dashboard/hassio-dashboard.ts @@ -1,12 +1,5 @@ -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import { Supervisor } from "../../../src/data/supervisor/supervisor"; import "../../../src/layouts/hass-tabs-subpage"; import { haStyle } from "../../../src/resources/styles"; diff --git a/hassio/src/dashboard/hassio-update.ts b/hassio/src/dashboard/hassio-update.ts index 9a4f7487a..21836b1c1 100644 --- a/hassio/src/dashboard/hassio-update.ts +++ b/hassio/src/dashboard/hassio-update.ts @@ -1,14 +1,7 @@ import "@material/mwc-button"; import { mdiHomeAssistant } from "@mdi/js"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import memoizeOne from "memoize-one"; import { atLeastVersion } from "../../../src/common/config/version"; import { fireEvent } from "../../../src/common/dom/fire_event"; diff --git a/hassio/src/dialogs/markdown/dialog-hassio-markdown.ts b/hassio/src/dialogs/markdown/dialog-hassio-markdown.ts index 1f6db1677..b1b2f0622 100644 --- a/hassio/src/dialogs/markdown/dialog-hassio-markdown.ts +++ b/hassio/src/dialogs/markdown/dialog-hassio-markdown.ts @@ -1,13 +1,5 @@ -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { createCloseHeading } from "../../../../src/components/ha-dialog"; import "../../../../src/components/ha-markdown"; import { haStyleDialog } from "../../../../src/resources/styles"; diff --git a/hassio/src/dialogs/network/dialog-hassio-network.ts b/hassio/src/dialogs/network/dialog-hassio-network.ts index 91d08c8d5..36adbabf4 100644 --- a/hassio/src/dialogs/network/dialog-hassio-network.ts +++ b/hassio/src/dialogs/network/dialog-hassio-network.ts @@ -6,17 +6,9 @@ import "@material/mwc-tab"; import "@material/mwc-tab-bar"; import { mdiClose } from "@mdi/js"; import { PaperInputElement } from "@polymer/paper-input/paper-input"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; -import { cache } from "lit-html/directives/cache"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; +import { cache } from "lit/directives/cache"; import { fireEvent } from "../../../../src/common/dom/fire_event"; import "../../../../src/components/ha-circular-progress"; import "../../../../src/components/ha-dialog"; diff --git a/hassio/src/dialogs/registries/dialog-hassio-registries.ts b/hassio/src/dialogs/registries/dialog-hassio-registries.ts index 7f02cb769..80b7e3299 100644 --- a/hassio/src/dialogs/registries/dialog-hassio-registries.ts +++ b/hassio/src/dialogs/registries/dialog-hassio-registries.ts @@ -3,16 +3,8 @@ import "@material/mwc-icon-button/mwc-icon-button"; import "@material/mwc-list/mwc-list-item"; import { mdiDelete } from "@mdi/js"; import { PaperInputElement } from "@polymer/paper-input/paper-input"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import "../../../../src/components/ha-circular-progress"; import { createCloseHeading } from "../../../../src/components/ha-dialog"; import "../../../../src/components/ha-svg-icon"; diff --git a/hassio/src/dialogs/repositories/dialog-hassio-repositories.ts b/hassio/src/dialogs/repositories/dialog-hassio-repositories.ts index d776b83d2..424b881e3 100644 --- a/hassio/src/dialogs/repositories/dialog-hassio-repositories.ts +++ b/hassio/src/dialogs/repositories/dialog-hassio-repositories.ts @@ -5,17 +5,8 @@ import "@polymer/paper-input/paper-input"; import type { PaperInputElement } from "@polymer/paper-input/paper-input"; import "@polymer/paper-item/paper-item"; import "@polymer/paper-item/paper-item-body"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - query, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, query, state } from "lit/decorators"; import memoizeOne from "memoize-one"; import { fireEvent } from "../../../../src/common/dom/fire_event"; import "../../../../src/components/ha-circular-progress"; diff --git a/hassio/src/dialogs/snapshot/dialog-hassio-create-snapshot.ts b/hassio/src/dialogs/snapshot/dialog-hassio-create-snapshot.ts index b97354f9a..4afbf0aca 100755 --- a/hassio/src/dialogs/snapshot/dialog-hassio-create-snapshot.ts +++ b/hassio/src/dialogs/snapshot/dialog-hassio-create-snapshot.ts @@ -1,16 +1,8 @@ import "@material/mwc-button"; import "@polymer/paper-input/paper-input"; import type { PaperInputElement } from "@polymer/paper-input/paper-input"; -import { - css, - CSSResult, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { formatDate } from "../../../../src/common/datetime/format_date"; import { fireEvent } from "../../../../src/common/dom/fire_event"; import { compare } from "../../../../src/common/string/compare"; @@ -334,7 +326,7 @@ class HassioCreateSnapshotDialog extends LitElement { button.progress = false; } - static get styles(): CSSResult[] { + static get styles(): CSSResultGroup { return [ haStyle, haStyleDialog, diff --git a/hassio/src/dialogs/snapshot/dialog-hassio-snapshot-upload.ts b/hassio/src/dialogs/snapshot/dialog-hassio-snapshot-upload.ts index b87b4c703..d2ffb1f03 100644 --- a/hassio/src/dialogs/snapshot/dialog-hassio-snapshot-upload.ts +++ b/hassio/src/dialogs/snapshot/dialog-hassio-snapshot-upload.ts @@ -1,14 +1,6 @@ import { mdiClose } from "@mdi/js"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { fireEvent } from "../../../../src/common/dom/fire_event"; import "../../../../src/components/ha-header-bar"; import { HassDialog } from "../../../../src/dialogs/make-dialog-manager"; diff --git a/hassio/src/dialogs/snapshot/dialog-hassio-snapshot.ts b/hassio/src/dialogs/snapshot/dialog-hassio-snapshot.ts index ebe2e9f77..2fa53b66b 100755 --- a/hassio/src/dialogs/snapshot/dialog-hassio-snapshot.ts +++ b/hassio/src/dialogs/snapshot/dialog-hassio-snapshot.ts @@ -3,16 +3,8 @@ import { mdiClose, mdiDelete, mdiDownload, mdiHistory } from "@mdi/js"; import "@polymer/paper-checkbox/paper-checkbox"; import type { PaperCheckboxElement } from "@polymer/paper-checkbox/paper-checkbox"; import "@polymer/paper-input/paper-input"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { formatDateTime } from "../../../../src/common/datetime/format_date_time"; import { fireEvent } from "../../../../src/common/dom/fire_event"; import "../../../../src/components/ha-header-bar"; diff --git a/hassio/src/dialogs/suggestAddonRestart.ts b/hassio/src/dialogs/suggestAddonRestart.ts index 12b8d383d..d3bb5b165 100644 --- a/hassio/src/dialogs/suggestAddonRestart.ts +++ b/hassio/src/dialogs/suggestAddonRestart.ts @@ -1,4 +1,4 @@ -import type { LitElement } from "lit-element"; +import type { LitElement } from "lit"; import { HassioAddonDetails, restartHassioAddon, diff --git a/hassio/src/dialogs/update/dialog-supervisor-update.ts b/hassio/src/dialogs/update/dialog-supervisor-update.ts index e8cb3fb67..e017c9d2f 100644 --- a/hassio/src/dialogs/update/dialog-supervisor-update.ts +++ b/hassio/src/dialogs/update/dialog-supervisor-update.ts @@ -1,13 +1,6 @@ import "@material/mwc-button/mwc-button"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, state } from "lit/decorators"; import { fireEvent } from "../../../../src/common/dom/fire_event"; import "../../../../src/components/ha-circular-progress"; import "../../../../src/components/ha-dialog"; diff --git a/hassio/src/hassio-main.ts b/hassio/src/hassio-main.ts index 102513139..c91a02434 100644 --- a/hassio/src/hassio-main.ts +++ b/hassio/src/hassio-main.ts @@ -1,4 +1,5 @@ -import { customElement, html, property, PropertyValues } from "lit-element"; +import { html, PropertyValues } from "lit"; +import { customElement, property } from "lit/decorators"; import { atLeastVersion } from "../../src/common/config/version"; import { applyThemesOnElement } from "../../src/common/dom/apply_themes_on_element"; import { fireEvent } from "../../src/common/dom/fire_event"; diff --git a/hassio/src/hassio-my-redirect.ts b/hassio/src/hassio-my-redirect.ts index 76fed4cd6..f24ab95a5 100644 --- a/hassio/src/hassio-my-redirect.ts +++ b/hassio/src/hassio-my-redirect.ts @@ -1,11 +1,4 @@ -import { - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { html, LitElement, TemplateResult } from "lit"; import { sanitizeUrl } from "@braintree/sanitize-url"; import { createSearchParam, @@ -20,6 +13,7 @@ import { import { navigate } from "../../src/common/navigate"; import { HomeAssistant, Route } from "../../src/types"; import { Supervisor } from "../../src/data/supervisor/supervisor"; +import { customElement, property, state } from "lit/decorators"; const REDIRECTS: Redirects = { supervisor: { diff --git a/hassio/src/hassio-panel-router.ts b/hassio/src/hassio-panel-router.ts index 7207d70c7..28d9f2451 100644 --- a/hassio/src/hassio-panel-router.ts +++ b/hassio/src/hassio-panel-router.ts @@ -1,4 +1,4 @@ -import { customElement, property } from "lit-element"; +import { customElement, property } from "lit/decorators"; import { Supervisor } from "../../src/data/supervisor/supervisor"; import { HassRouterPage, diff --git a/hassio/src/hassio-panel.ts b/hassio/src/hassio-panel.ts index a52de0a6e..6c6dc54c7 100644 --- a/hassio/src/hassio-panel.ts +++ b/hassio/src/hassio-panel.ts @@ -1,12 +1,5 @@ -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import { Supervisor, supervisorCollection, diff --git a/hassio/src/hassio-router.ts b/hassio/src/hassio-router.ts index 2662bfa35..082688399 100644 --- a/hassio/src/hassio-router.ts +++ b/hassio/src/hassio-router.ts @@ -1,4 +1,4 @@ -import { customElement, property } from "lit-element"; +import { customElement, property } from "lit/decorators"; import { HassioPanelInfo } from "../../src/data/hassio/supervisor"; import { Supervisor } from "../../src/data/supervisor/supervisor"; import { diff --git a/hassio/src/ingress-view/hassio-ingress-view.ts b/hassio/src/ingress-view/hassio-ingress-view.ts index 54942ca95..04ef8d250 100644 --- a/hassio/src/ingress-view/hassio-ingress-view.ts +++ b/hassio/src/ingress-view/hassio-ingress-view.ts @@ -2,14 +2,12 @@ import { mdiMenu } from "@mdi/js"; import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, property, state } from "lit/decorators"; import { fireEvent } from "../../../src/common/dom/fire_event"; import { navigate } from "../../../src/common/navigate"; import { extractSearchParam } from "../../../src/common/url/search-params"; diff --git a/hassio/src/resources/hassio-style.ts b/hassio/src/resources/hassio-style.ts index 99329ee08..5d52f618d 100644 --- a/hassio/src/resources/hassio-style.ts +++ b/hassio/src/resources/hassio-style.ts @@ -1,4 +1,4 @@ -import { css } from "lit-element"; +import { css } from "lit"; export const hassioStyle = css` .content { diff --git a/hassio/src/snapshots/hassio-snapshots.ts b/hassio/src/snapshots/hassio-snapshots.ts index b6bb3486f..a13f37c9d 100644 --- a/hassio/src/snapshots/hassio-snapshots.ts +++ b/hassio/src/snapshots/hassio-snapshots.ts @@ -4,14 +4,12 @@ import "@material/mwc-list/mwc-list-item"; import { mdiDotsVertical, mdiPlus } from "@mdi/js"; import { CSSResultGroup, - customElement, html, LitElement, - property, PropertyValues, - state, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, property, state } from "lit/decorators"; import memoizeOne from "memoize-one"; import { atLeastVersion } from "../../../src/common/config/version"; import relativeTime from "../../../src/common/datetime/relative_time"; diff --git a/hassio/src/supervisor-base-element.ts b/hassio/src/supervisor-base-element.ts index a763d16d2..9811f3626 100644 --- a/hassio/src/supervisor-base-element.ts +++ b/hassio/src/supervisor-base-element.ts @@ -1,5 +1,6 @@ import { Collection, UnsubscribeFunc } from "home-assistant-js-websocket"; -import { state, LitElement, property, PropertyValues } from "lit-element"; +import { LitElement, PropertyValues } from "lit"; +import { property, state } from "lit/decorators"; import { atLeastVersion } from "../../src/common/config/version"; import { computeLocalize } from "../../src/common/translations/localize"; import { fetchHassioAddonsInfo } from "../../src/data/hassio/addon"; diff --git a/hassio/src/system/hassio-core-info.ts b/hassio/src/system/hassio-core-info.ts index 4ee474ff0..e335a1df7 100644 --- a/hassio/src/system/hassio-core-info.ts +++ b/hassio/src/system/hassio-core-info.ts @@ -1,15 +1,7 @@ import "@material/mwc-button"; import "@material/mwc-list/mwc-list-item"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { fireEvent } from "../../../src/common/dom/fire_event"; import "../../../src/components/buttons/ha-progress-button"; import "../../../src/components/ha-button-menu"; diff --git a/hassio/src/system/hassio-host-info.ts b/hassio/src/system/hassio-host-info.ts index be5b6910e..2806b46ad 100644 --- a/hassio/src/system/hassio-host-info.ts +++ b/hassio/src/system/hassio-host-info.ts @@ -3,15 +3,8 @@ import { ActionDetail } from "@material/mwc-list/mwc-list-foundation"; import "@material/mwc-list/mwc-list-item"; import { mdiDotsVertical } from "@mdi/js"; import { safeDump } from "js-yaml"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import memoizeOne from "memoize-one"; import { atLeastVersion } from "../../../src/common/config/version"; import { fireEvent } from "../../../src/common/dom/fire_event"; diff --git a/hassio/src/system/hassio-supervisor-info.ts b/hassio/src/system/hassio-supervisor-info.ts index dfe04b3a9..62baf5809 100644 --- a/hassio/src/system/hassio-supervisor-info.ts +++ b/hassio/src/system/hassio-supervisor-info.ts @@ -1,13 +1,5 @@ -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { atLeastVersion } from "../../../src/common/config/version"; import { fireEvent } from "../../../src/common/dom/fire_event"; import "../../../src/components/buttons/ha-progress-button"; diff --git a/hassio/src/system/hassio-supervisor-log.ts b/hassio/src/system/hassio-supervisor-log.ts index 8a78153fe..ac0f3e8cd 100644 --- a/hassio/src/system/hassio-supervisor-log.ts +++ b/hassio/src/system/hassio-supervisor-log.ts @@ -2,16 +2,8 @@ import "@material/mwc-button"; import "@polymer/paper-dropdown-menu/paper-dropdown-menu"; import "@polymer/paper-item/paper-item"; import "@polymer/paper-listbox/paper-listbox"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import "../../../src/components/buttons/ha-progress-button"; import "../../../src/components/ha-card"; import { extractApiErrorMessage } from "../../../src/data/hassio/common"; diff --git a/hassio/src/system/hassio-system.ts b/hassio/src/system/hassio-system.ts index e7b1d74b0..22704fcc4 100644 --- a/hassio/src/system/hassio-system.ts +++ b/hassio/src/system/hassio-system.ts @@ -1,12 +1,5 @@ -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import { Supervisor } from "../../../src/data/supervisor/supervisor"; import "../../../src/layouts/hass-tabs-subpage"; import { haStyle } from "../../../src/resources/styles"; diff --git a/package.json b/package.json index ecbb9f2e2..a3d3345a3 100644 --- a/package.json +++ b/package.json @@ -42,22 +42,23 @@ "@fullcalendar/daygrid": "5.1.0", "@fullcalendar/interaction": "5.1.0", "@fullcalendar/list": "5.1.0", - "@material/chips": "=9.0.0-canary.1c156d69d.0", - "@material/mwc-button": "^0.20.0", - "@material/mwc-checkbox": "^0.20.0", - "@material/mwc-circular-progress": "^0.20.0", - "@material/mwc-dialog": "^0.20.0", - "@material/mwc-fab": "^0.20.0", - "@material/mwc-formfield": "^0.20.0", - "@material/mwc-icon-button": "^0.20.0", - "@material/mwc-list": "^0.20.0", - "@material/mwc-menu": "^0.20.0", - "@material/mwc-radio": "^0.20.0", - "@material/mwc-ripple": "^0.20.0", - "@material/mwc-switch": "^0.20.0", - "@material/mwc-tab": "^0.20.0", - "@material/mwc-tab-bar": "^0.20.0", - "@material/top-app-bar": "=9.0.0-canary.1c156d69d.0", + "@lit-labs/virtualizer": "^0.6.0", + "@material/chips": "=12.0.0-canary.1a8d06483.0", + "@material/mwc-button": "canary", + "@material/mwc-checkbox": "canary", + "@material/mwc-circular-progress": "canary", + "@material/mwc-dialog": "canary", + "@material/mwc-fab": "canary", + "@material/mwc-formfield": "canary", + "@material/mwc-icon-button": "canary", + "@material/mwc-list": "canary", + "@material/mwc-menu": "canary", + "@material/mwc-radio": "canary", + "@material/mwc-ripple": "canary", + "@material/mwc-switch": "canary", + "@material/mwc-tab": "canary", + "@material/mwc-tab-bar": "canary", + "@material/top-app-bar": "=12.0.0-canary.1a8d06483.0", "@mdi/js": "5.9.55", "@mdi/svg": "5.9.55", "@polymer/app-layout": "^3.0.2", @@ -115,9 +116,7 @@ "js-yaml": "^3.13.1", "leaflet": "^1.7.1", "leaflet-draw": "^1.0.4", - "lit-element": "2.5.1", - "lit-html": "1.4.1", - "lit-virtualizer": "^0.4.2", + "lit": "^2.0.0-rc.2", "marked": "2.0.0", "mdn-polyfills": "^5.16.0", "memoize-one": "^5.0.2", @@ -241,8 +240,8 @@ "resolutions": { "@webcomponents/webcomponentsjs": "^2.2.10", "@polymer/polymer": "3.1.0", - "lit-html": "1.4.1", - "lit-element": "2.5.1" + "lit-html": "2.0.0-rc.3", + "lit-element": "3.0.0-rc.2" }, "main": "src/home-assistant.js", "husky": { diff --git a/src/auth/ha-auth-flow.ts b/src/auth/ha-auth-flow.ts index 0602edab1..85dcf053e 100644 --- a/src/auth/ha-auth-flow.ts +++ b/src/auth/ha-auth-flow.ts @@ -3,12 +3,11 @@ import { css, CSSResultGroup, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; +} from "lit"; +import { property, state } from "lit/decorators"; import "../components/ha-form/ha-form"; import "../components/ha-markdown"; import { AuthProvider } from "../data/auth"; diff --git a/src/auth/ha-authorize.ts b/src/auth/ha-authorize.ts index 02d1f80ce..9d5143110 100644 --- a/src/auth/ha-authorize.ts +++ b/src/auth/ha-authorize.ts @@ -1,12 +1,5 @@ -import { - css, - CSSResultGroup, - html, - state, - LitElement, - property, - PropertyValues, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, PropertyValues } from "lit"; +import { property, state } from "lit/decorators"; import punycode from "punycode"; import { applyThemesOnElement } from "../common/dom/apply_themes_on_element"; import { extractSearchParamsObject } from "../common/url/search-params"; diff --git a/src/auth/ha-pick-auth-provider.ts b/src/auth/ha-pick-auth-provider.ts index 63e213e6d..e471cb690 100644 --- a/src/auth/ha-pick-auth-provider.ts +++ b/src/auth/ha-pick-auth-provider.ts @@ -1,6 +1,7 @@ import "@polymer/paper-item/paper-item"; import "@polymer/paper-item/paper-item-body"; -import { html, LitElement, property } from "lit-element"; +import { html, LitElement } from "lit"; +import { property } from "lit/decorators"; import { fireEvent } from "../common/dom/fire_event"; import "../components/ha-icon-next"; import { AuthProvider } from "../data/auth"; diff --git a/src/common/decorators/local-storage.ts b/src/common/decorators/local-storage.ts index 229970503..8456c5be4 100644 --- a/src/common/decorators/local-storage.ts +++ b/src/common/decorators/local-storage.ts @@ -1,5 +1,5 @@ import { UnsubscribeFunc } from "home-assistant-js-websocket"; -import { PropertyDeclaration, ReactiveElement } from "lit-element"; +import { PropertyDeclaration, ReactiveElement } from "lit"; import type { ClassElement } from "../../types"; type Callback = (oldValue: any, newValue: any) => void; diff --git a/src/common/decorators/restore-scroll.ts b/src/common/decorators/restore-scroll.ts index 059c83966..e7353e729 100644 --- a/src/common/decorators/restore-scroll.ts +++ b/src/common/decorators/restore-scroll.ts @@ -1,4 +1,4 @@ -import type { LitElement } from "lit-element"; +import type { LitElement } from "lit"; import type { ClassElement } from "../../types"; export const restoreScroll = (selector: string): any => ( diff --git a/src/common/dom/dynamic-element-directive.ts b/src/common/dom/dynamic-element-directive.ts index cad1f4513..a1ffb33ff 100644 --- a/src/common/dom/dynamic-element-directive.ts +++ b/src/common/dom/dynamic-element-directive.ts @@ -1,4 +1,4 @@ -import { noChange } from "lit-html"; +import { noChange } from "lit"; import { ChildPart, Directive, @@ -6,8 +6,7 @@ import { DirectiveParameters, PartInfo, PartType, - // eslint-disable-next-line import/extensions -} from "lit-html/directive.js"; +} from "lit/directive"; export const dynamicElement = directive( class extends Directive { diff --git a/src/common/image/extract_color.ts b/src/common/image/extract_color.ts index d63ed963d..f37652ce7 100644 --- a/src/common/image/extract_color.ts +++ b/src/common/image/extract_color.ts @@ -1,7 +1,7 @@ // We import the minified bundle because the unminified bundle // has some quirks that break wds. See #7784 for unminified version. -import Vibrant from "node-vibrant/dist/vibrant"; import type { Swatch, Vec3 } from "@vibrant/color"; +import Vibrant from "node-vibrant/dist/vibrant"; import { getRGBContrastRatio } from "../color/rgb"; const CONTRAST_RATIO = 4.5; diff --git a/src/common/search/search-input.ts b/src/common/search/search-input.ts index d6a76951d..bde0c9ab5 100644 --- a/src/common/search/search-input.ts +++ b/src/common/search/search-input.ts @@ -1,15 +1,9 @@ import "@material/mwc-icon-button/mwc-icon-button"; import { mdiClose, mdiMagnify } from "@mdi/js"; import "@polymer/paper-input/paper-input"; -import { - css, - CSSResultGroup, - customElement, - LitElement, - property, -} from "lit-element"; -import { html, TemplateResult } from "lit-html"; -import { classMap } from "lit-html/directives/class-map"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; import "../../components/ha-svg-icon"; import { fireEvent } from "../dom/fire_event"; diff --git a/src/common/style/icon_color_css.ts b/src/common/style/icon_color_css.ts index 4672d0ca9..fbc663653 100644 --- a/src/common/style/icon_color_css.ts +++ b/src/common/style/icon_color_css.ts @@ -1,4 +1,4 @@ -import { css } from "lit-element"; +import { css } from "lit"; export const iconColorCSS = css` ha-icon[data-domain="alert"][data-state="on"], diff --git a/src/components/buttons/ha-call-api-button.ts b/src/components/buttons/ha-call-api-button.ts index b7cec1d73..6bf9e92d4 100644 --- a/src/components/buttons/ha-call-api-button.ts +++ b/src/components/buttons/ha-call-api-button.ts @@ -1,11 +1,5 @@ -import { - css, - CSSResultGroup, - html, - LitElement, - property, - query, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement } from "lit"; +import { property, query } from "lit/decorators"; import { fireEvent } from "../../common/dom/fire_event"; import { HomeAssistant } from "../../types"; import "./ha-progress-button"; diff --git a/src/components/buttons/ha-progress-button.ts b/src/components/buttons/ha-progress-button.ts index 68c39559e..259ee7531 100644 --- a/src/components/buttons/ha-progress-button.ts +++ b/src/components/buttons/ha-progress-button.ts @@ -1,15 +1,7 @@ import "@material/mwc-button"; import type { Button } from "@material/mwc-button"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - query, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, query } from "lit/decorators"; import "../ha-circular-progress"; @customElement("ha-progress-button") diff --git a/src/components/data-table/ha-data-table.ts b/src/components/data-table/ha-data-table.ts index 6a495afa9..688001265 100644 --- a/src/components/data-table/ha-data-table.ts +++ b/src/components/data-table/ha-data-table.ts @@ -1,21 +1,23 @@ +import { Layout1d, scroll } from "@lit-labs/virtualizer"; import deepClone from "deep-clone-simple"; import { css, CSSResultGroup, - customElement, - eventOptions, html, - state, LitElement, - property, PropertyValues, - query, TemplateResult, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; -import { ifDefined } from "lit-html/directives/if-defined"; -import { styleMap } from "lit-html/directives/style-map"; -import { scroll } from "lit-virtualizer"; +} from "lit"; +import { + customElement, + property, + state, + query, + eventOptions, +} 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 memoizeOne from "memoize-one"; import { restoreScroll } from "../../common/decorators/restore-scroll"; import { fireEvent } from "../../common/dom/fire_event"; @@ -167,6 +169,10 @@ export class HaDataTable extends LitElement { } } + protected firstUpdated() { + this.updateComplete.then(() => this._calcTableHeight()); + } + protected updated(properties: PropertyValues) { super.updated(properties); @@ -333,6 +339,8 @@ export class HaDataTable extends LitElement { > ${scroll({ items: this._items, + layout: Layout1d, + // @ts-expect-error renderItem: (row: DataTableRowData, index) => { if (row.append) { return html` diff --git a/src/components/date-range-picker.ts b/src/components/date-range-picker.ts index ecb8468d3..7dd624464 100644 --- a/src/components/date-range-picker.ts +++ b/src/components/date-range-picker.ts @@ -1,6 +1,5 @@ // @ts-nocheck import wrap from "@vue/web-component-wrapper"; -import { customElement } from "lit-element"; import Vue from "vue"; import DateRangePicker from "vue2-daterange-picker"; import dateRangePickerStyles from "vue2-daterange-picker/dist/vue2-daterange-picker.css"; diff --git a/src/components/device/ha-area-devices-picker.ts b/src/components/device/ha-area-devices-picker.ts index 677db126a..2f70b6ffc 100644 --- a/src/components/device/ha-area-devices-picker.ts +++ b/src/components/device/ha-area-devices-picker.ts @@ -10,14 +10,12 @@ import { UnsubscribeFunc } from "home-assistant-js-websocket"; import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, property, state } from "lit/decorators"; import memoizeOne from "memoize-one"; import { fireEvent } from "../../common/dom/fire_event"; import { computeDomain } from "../../common/entity/compute_domain"; diff --git a/src/components/device/ha-device-action-picker.ts b/src/components/device/ha-device-action-picker.ts index e8e50f5b4..ce053d45c 100644 --- a/src/components/device/ha-device-action-picker.ts +++ b/src/components/device/ha-device-action-picker.ts @@ -1,4 +1,4 @@ -import { customElement } from "lit-element"; +import { customElement } from "lit/decorators"; import { DeviceAction, fetchDeviceActions, diff --git a/src/components/device/ha-device-automation-picker.ts b/src/components/device/ha-device-automation-picker.ts index 2743e77d8..e4cc705dc 100644 --- a/src/components/device/ha-device-automation-picker.ts +++ b/src/components/device/ha-device-automation-picker.ts @@ -2,15 +2,8 @@ import "@polymer/paper-input/paper-input"; import "@polymer/paper-item/paper-item"; import "@polymer/paper-item/paper-item-body"; import "@polymer/paper-listbox/paper-listbox"; -import { - css, - CSSResultGroup, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { property, state } from "lit/decorators"; import { fireEvent } from "../../common/dom/fire_event"; import { DeviceAutomation, diff --git a/src/components/device/ha-device-condition-picker.ts b/src/components/device/ha-device-condition-picker.ts index 3ab706e73..977a4ee05 100644 --- a/src/components/device/ha-device-condition-picker.ts +++ b/src/components/device/ha-device-condition-picker.ts @@ -1,4 +1,4 @@ -import { customElement } from "lit-element"; +import { customElement } from "lit/decorators"; import { DeviceCondition, fetchDeviceConditions, diff --git a/src/components/device/ha-device-picker.ts b/src/components/device/ha-device-picker.ts index 3e70ef85e..cc2052dac 100644 --- a/src/components/device/ha-device-picker.ts +++ b/src/components/device/ha-device-picker.ts @@ -4,15 +4,12 @@ import { UnsubscribeFunc } from "home-assistant-js-websocket"; import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, - query, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, property, state, query } from "lit/decorators"; import memoizeOne from "memoize-one"; import { fireEvent } from "../../common/dom/fire_event"; import { computeDomain } from "../../common/entity/compute_domain"; @@ -34,8 +31,8 @@ import { import { SubscribeMixin } from "../../mixins/subscribe-mixin"; import { PolymerChangedEvent } from "../../polymer-types"; import { HomeAssistant } from "../../types"; -import type { HaComboBox } from "../ha-combo-box"; import "../ha-combo-box"; +import type { HaComboBox } from "../ha-combo-box"; interface Device { name: string; diff --git a/src/components/device/ha-device-trigger-picker.ts b/src/components/device/ha-device-trigger-picker.ts index d1ff66d37..142955b24 100644 --- a/src/components/device/ha-device-trigger-picker.ts +++ b/src/components/device/ha-device-trigger-picker.ts @@ -1,4 +1,4 @@ -import { customElement } from "lit-element"; +import { customElement } from "lit/decorators"; import { DeviceTrigger, fetchDeviceTriggers, diff --git a/src/components/device/ha-devices-picker.ts b/src/components/device/ha-devices-picker.ts index 9106521d1..1b437da78 100644 --- a/src/components/device/ha-devices-picker.ts +++ b/src/components/device/ha-devices-picker.ts @@ -1,10 +1,5 @@ -import { - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import { fireEvent } from "../../common/dom/fire_event"; import { PolymerChangedEvent } from "../../polymer-types"; import { HomeAssistant } from "../../types"; diff --git a/src/components/entity/ha-battery-icon.ts b/src/components/entity/ha-battery-icon.ts index 45f4f7d55..40233ec4a 100644 --- a/src/components/entity/ha-battery-icon.ts +++ b/src/components/entity/ha-battery-icon.ts @@ -1,4 +1,5 @@ -import { customElement, html, LitElement, property } from "lit-element"; +import { html, LitElement } from "lit"; +import { customElement, property } from "lit/decorators"; import { batteryIcon } from "../../common/entity/battery_icon"; import "../ha-icon"; diff --git a/src/components/entity/ha-entities-picker.ts b/src/components/entity/ha-entities-picker.ts index 0ac66ed8f..3f754e464 100644 --- a/src/components/entity/ha-entities-picker.ts +++ b/src/components/entity/ha-entities-picker.ts @@ -1,11 +1,6 @@ import type { HassEntity } from "home-assistant-js-websocket"; -import { - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import { fireEvent } from "../../common/dom/fire_event"; import { isValidEntityId } from "../../common/entity/valid_entity_id"; import type { PolymerChangedEvent } from "../../polymer-types"; diff --git a/src/components/entity/ha-entity-attribute-picker.ts b/src/components/entity/ha-entity-attribute-picker.ts index 10ffef76d..729c94db7 100644 --- a/src/components/entity/ha-entity-attribute-picker.ts +++ b/src/components/entity/ha-entity-attribute-picker.ts @@ -7,14 +7,12 @@ import { HassEntity } from "home-assistant-js-websocket"; import { css, CSSResultGroup, - customElement, html, LitElement, - property, PropertyValues, - query, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, property, query } from "lit/decorators"; import { fireEvent } from "../../common/dom/fire_event"; import { PolymerChangedEvent } from "../../polymer-types"; import { HomeAssistant } from "../../types"; diff --git a/src/components/entity/ha-entity-picker.ts b/src/components/entity/ha-entity-picker.ts index e2307a529..c5981a01e 100644 --- a/src/components/entity/ha-entity-picker.ts +++ b/src/components/entity/ha-entity-picker.ts @@ -8,14 +8,12 @@ import { HassEntity } from "home-assistant-js-websocket"; import { css, CSSResultGroup, - customElement, html, LitElement, - property, PropertyValues, - query, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, property, query } from "lit/decorators"; import memoizeOne from "memoize-one"; import { fireEvent } from "../../common/dom/fire_event"; import { computeDomain } from "../../common/entity/compute_domain"; diff --git a/src/components/entity/ha-entity-toggle.ts b/src/components/entity/ha-entity-toggle.ts index 19c08a57a..0318741f0 100644 --- a/src/components/entity/ha-entity-toggle.ts +++ b/src/components/entity/ha-entity-toggle.ts @@ -3,21 +3,20 @@ import { css, CSSResultGroup, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; +} from "lit"; +import { property, state } from "lit/decorators"; import { STATES_OFF } from "../../common/const"; import { computeStateDomain } from "../../common/entity/compute_state_domain"; import { computeStateName } from "../../common/entity/compute_state_name"; import { UNAVAILABLE, UNAVAILABLE_STATES } from "../../data/entity"; import { forwardHaptic } from "../../data/haptics"; import { HomeAssistant } from "../../types"; +import "../ha-formfield"; import "../ha-icon-button"; import "../ha-switch"; -import "../ha-formfield"; const isOn = (stateObj?: HassEntity) => stateObj !== undefined && diff --git a/src/components/entity/ha-state-label-badge.ts b/src/components/entity/ha-state-label-badge.ts index e2ce11c13..7bed0b300 100644 --- a/src/components/entity/ha-state-label-badge.ts +++ b/src/components/entity/ha-state-label-badge.ts @@ -2,15 +2,13 @@ import { HassEntity } from "home-assistant-js-websocket"; import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; +} from "lit"; +import { customElement, property, state } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; import secondsToDuration from "../../common/datetime/seconds_to_duration"; import { computeStateDisplay } from "../../common/entity/compute_state_display"; import { computeStateDomain } from "../../common/entity/compute_state_domain"; diff --git a/src/components/entity/state-badge.ts b/src/components/entity/state-badge.ts index 76604f87b..16043f79d 100644 --- a/src/components/entity/state-badge.ts +++ b/src/components/entity/state-badge.ts @@ -3,14 +3,13 @@ import { css, CSSResultGroup, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; -import { ifDefined } from "lit-html/directives/if-defined"; -import { styleMap } from "lit-html/directives/style-map"; +} from "lit"; +import { property, state } from "lit/decorators"; +import { ifDefined } from "lit/directives/if-defined"; +import { styleMap } from "lit/directives/style-map"; import { computeActiveState } from "../../common/entity/compute_active_state"; import { computeStateDomain } from "../../common/entity/compute_state_domain"; import { stateIcon } from "../../common/entity/state_icon"; diff --git a/src/components/entity/state-info.ts b/src/components/entity/state-info.ts index 8e56ee10f..a4dbd8b87 100644 --- a/src/components/entity/state-info.ts +++ b/src/components/entity/state-info.ts @@ -1,14 +1,7 @@ import "@polymer/paper-tooltip/paper-tooltip"; import type { HassEntity } from "home-assistant-js-websocket"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import { computeStateName } from "../../common/entity/compute_state_name"; import { computeRTL } from "../../common/util/compute_rtl"; import type { HomeAssistant } from "../../types"; diff --git a/src/components/ha-addon-picker.ts b/src/components/ha-addon-picker.ts index 05d5f30bb..421b29775 100644 --- a/src/components/ha-addon-picker.ts +++ b/src/components/ha-addon-picker.ts @@ -1,12 +1,5 @@ -import { - customElement, - html, - state, - LitElement, - property, - query, - TemplateResult, -} from "lit-element"; +import { html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state, query } from "lit/decorators"; import { isComponentLoaded } from "../common/config/is_component_loaded"; import { fireEvent } from "../common/dom/fire_event"; import { compare } from "../common/string/compare"; diff --git a/src/components/ha-analytics-learn-more.ts b/src/components/ha-analytics-learn-more.ts index 75acdab0b..e806b2e45 100644 --- a/src/components/ha-analytics-learn-more.ts +++ b/src/components/ha-analytics-learn-more.ts @@ -1,4 +1,4 @@ -import { html } from "lit-element"; +import { html } from "lit"; import { HomeAssistant } from "../types"; import { documentationUrl } from "../util/documentation-url"; diff --git a/src/components/ha-analytics.ts b/src/components/ha-analytics.ts index f35734258..d81cbf379 100644 --- a/src/components/ha-analytics.ts +++ b/src/components/ha-analytics.ts @@ -1,13 +1,6 @@ import "@polymer/paper-tooltip/paper-tooltip"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import { fireEvent } from "../common/dom/fire_event"; import { Analytics, AnalyticsPreferences } from "../data/analytics"; import { haStyle } from "../resources/styles"; diff --git a/src/components/ha-area-picker.ts b/src/components/ha-area-picker.ts index fc48bac83..1781bcc04 100644 --- a/src/components/ha-area-picker.ts +++ b/src/components/ha-area-picker.ts @@ -9,15 +9,12 @@ import { UnsubscribeFunc } from "home-assistant-js-websocket"; import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, - query, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, property, state, query } from "lit/decorators"; import memoizeOne from "memoize-one"; import { fireEvent } from "../common/dom/fire_event"; import { computeDomain } from "../common/entity/compute_domain"; diff --git a/src/components/ha-attributes.ts b/src/components/ha-attributes.ts index 24af62f6a..79de3b3a6 100644 --- a/src/components/ha-attributes.ts +++ b/src/components/ha-attributes.ts @@ -1,18 +1,11 @@ import { HassEntity } from "home-assistant-js-websocket"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; -import { until } from "lit-html/directives/until"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; +import { until } from "lit/directives/until"; +import { haStyle } from "../resources/styles"; import hassAttributeUtil, { formatAttributeName, } from "../util/hass-attributes-util"; -import { haStyle } from "../resources/styles"; let jsYamlPromise: Promise; diff --git a/src/components/ha-bar.ts b/src/components/ha-bar.ts index 0c58dd596..d53abb15c 100644 --- a/src/components/ha-bar.ts +++ b/src/components/ha-bar.ts @@ -1,12 +1,5 @@ -import { - css, - CSSResultGroup, - customElement, - LitElement, - property, - svg, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, LitElement, svg, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import { getValueInPercentage, normalize, diff --git a/src/components/ha-blueprint-picker.ts b/src/components/ha-blueprint-picker.ts index 276298c6c..2f3a302c3 100644 --- a/src/components/ha-blueprint-picker.ts +++ b/src/components/ha-blueprint-picker.ts @@ -1,15 +1,8 @@ import "@polymer/paper-dropdown-menu/paper-dropdown-menu-light"; import "@polymer/paper-item/paper-item"; import "@polymer/paper-listbox/paper-listbox"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import memoizeOne from "memoize-one"; import { fireEvent } from "../common/dom/fire_event"; import { compare } from "../common/string/compare"; diff --git a/src/components/ha-button-menu.ts b/src/components/ha-button-menu.ts index 27c75b9ac..52e27af49 100644 --- a/src/components/ha-button-menu.ts +++ b/src/components/ha-button-menu.ts @@ -1,15 +1,7 @@ import "@material/mwc-menu"; import type { Corner, Menu } from "@material/mwc-menu"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - query, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, query } from "lit/decorators"; @customElement("ha-button-menu") export class HaButtonMenu extends LitElement { @property() public corner: Corner = "TOP_START"; diff --git a/src/components/ha-button-related-filter-menu.ts b/src/components/ha-button-related-filter-menu.ts index 1a2eba920..02db7f1e2 100644 --- a/src/components/ha-button-related-filter-menu.ts +++ b/src/components/ha-button-related-filter-menu.ts @@ -1,26 +1,18 @@ import "@material/mwc-icon-button"; import type { Corner } from "@material/mwc-menu"; -import { mdiFilterVariant } from "@mdi/js"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; import "@material/mwc-menu/mwc-menu-surface"; +import { mdiFilterVariant } from "@mdi/js"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { fireEvent } from "../common/dom/fire_event"; -import { findRelated, RelatedResult } from "../data/search"; -import type { HomeAssistant } from "../types"; -import "./ha-svg-icon"; -import "./ha-area-picker"; -import "./device/ha-device-picker"; -import "./entity/ha-entity-picker"; import { computeStateName } from "../common/entity/compute_state_name"; import { computeDeviceName } from "../data/device_registry"; +import { findRelated, RelatedResult } from "../data/search"; +import type { HomeAssistant } from "../types"; +import "./device/ha-device-picker"; +import "./entity/ha-entity-picker"; +import "./ha-area-picker"; +import "./ha-svg-icon"; declare global { // for fire event diff --git a/src/components/ha-button-toggle-group.ts b/src/components/ha-button-toggle-group.ts index f6aa48c31..374be8734 100644 --- a/src/components/ha-button-toggle-group.ts +++ b/src/components/ha-button-toggle-group.ts @@ -1,15 +1,8 @@ import "@material/mwc-button/mwc-button"; import "@material/mwc-icon-button/mwc-icon-button"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; -import { styleMap } from "lit-html/directives/style-map"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; +import { styleMap } from "lit/directives/style-map"; import { fireEvent } from "../common/dom/fire_event"; import type { ToggleButton } from "../types"; import "./ha-svg-icon"; diff --git a/src/components/ha-camera-stream.ts b/src/components/ha-camera-stream.ts index acd0c90ff..9d91e81ff 100644 --- a/src/components/ha-camera-stream.ts +++ b/src/components/ha-camera-stream.ts @@ -1,18 +1,16 @@ import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, property, state } from "lit/decorators"; +import { isComponentLoaded } from "../common/config/is_component_loaded"; import { fireEvent } from "../common/dom/fire_event"; import { computeStateName } from "../common/entity/compute_state_name"; import { supportsFeature } from "../common/entity/supports-feature"; -import { isComponentLoaded } from "../common/config/is_component_loaded"; import { CameraEntity, CAMERA_SUPPORT_STREAM, diff --git a/src/components/ha-card.ts b/src/components/ha-card.ts index 7ec2045fe..a5a6702b5 100644 --- a/src/components/ha-card.ts +++ b/src/components/ha-card.ts @@ -1,12 +1,5 @@ -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; @customElement("ha-card") export class HaCard extends LitElement { diff --git a/src/components/ha-checkbox.ts b/src/components/ha-checkbox.ts index 713d62d1d..b3f5a1a2f 100644 --- a/src/components/ha-checkbox.ts +++ b/src/components/ha-checkbox.ts @@ -1,12 +1,8 @@ -import "@material/mwc-checkbox"; -import type { Checkbox } from "@material/mwc-checkbox"; -import { customElement } from "lit-element"; -import type { Constructor } from "../types"; - -const MwcCheckbox = customElements.get("mwc-checkbox") as Constructor; +import { Checkbox } from "@material/mwc-checkbox"; +import { customElement } from "lit/decorators"; @customElement("ha-checkbox") -export class HaCheckbox extends MwcCheckbox { +export class HaCheckbox extends Checkbox { public firstUpdated() { super.firstUpdated(); this.style.setProperty("--mdc-theme-secondary", "var(--primary-color)"); diff --git a/src/components/ha-chip-set.ts b/src/components/ha-chip-set.ts index 0d6fed061..2b2bb6a9e 100644 --- a/src/components/ha-chip-set.ts +++ b/src/components/ha-chip-set.ts @@ -3,13 +3,12 @@ import chipStyles from "@material/chips/dist/mdc.chips.min.css"; import { css, CSSResultGroup, - customElement, html, LitElement, - property, TemplateResult, unsafeCSS, -} from "lit-element"; +} from "lit"; +import { customElement, property } from "lit/decorators"; import { fireEvent } from "../common/dom/fire_event"; import "./ha-chip"; diff --git a/src/components/ha-chip.ts b/src/components/ha-chip.ts index 3e317bc0b..0c8dce7ed 100644 --- a/src/components/ha-chip.ts +++ b/src/components/ha-chip.ts @@ -1,17 +1,15 @@ // @ts-ignore import chipStyles from "@material/chips/dist/mdc.chips.min.css"; -import { ripple } from "@material/mwc-ripple/ripple-directive"; -import "./ha-icon"; import { css, CSSResultGroup, - customElement, html, LitElement, - property, TemplateResult, unsafeCSS, -} from "lit-element"; +} from "lit"; +import { customElement, property } from "lit/decorators"; +import "./ha-icon"; declare global { // for fire event @@ -34,7 +32,7 @@ export class HaChip extends LitElement { ` : null} -
+
diff --git a/src/components/ha-circular-progress.ts b/src/components/ha-circular-progress.ts index 7b69afa6b..0e9e2db18 100644 --- a/src/components/ha-circular-progress.ts +++ b/src/components/ha-circular-progress.ts @@ -1,5 +1,5 @@ import { CircularProgress } from "@material/mwc-circular-progress"; -import { customElement, property } from "lit-element"; +import { customElement, property } from "lit/decorators"; @customElement("ha-circular-progress") // @ts-ignore diff --git a/src/components/ha-climate-state.ts b/src/components/ha-climate-state.ts index bc330ff3b..e9a14f653 100644 --- a/src/components/ha-climate-state.ts +++ b/src/components/ha-climate-state.ts @@ -1,13 +1,6 @@ import { HassEntity } from "home-assistant-js-websocket"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import { formatNumber } from "../common/string/format_number"; import { CLIMATE_PRESET_NONE } from "../data/climate"; import type { HomeAssistant } from "../types"; diff --git a/src/components/ha-code-editor.ts b/src/components/ha-code-editor.ts index 678eef730..1aae3d649 100644 --- a/src/components/ha-code-editor.ts +++ b/src/components/ha-code-editor.ts @@ -1,13 +1,6 @@ import type { EditorView, KeyBinding, ViewUpdate } from "@codemirror/view"; -import { - customElement, - state, - property, - PropertyValues, - ReactiveElement, - css, - CSSResultGroup, -} from "lit-element"; +import { css, CSSResultGroup, PropertyValues, ReactiveElement } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { fireEvent } from "../common/dom/fire_event"; import { loadCodeMirror } from "../resources/codemirror.ondemand"; diff --git a/src/components/ha-color-picker.js b/src/components/ha-color-picker.js index e692ef307..f94018ab7 100644 --- a/src/components/ha-color-picker.js +++ b/src/components/ha-color-picker.js @@ -1,8 +1,8 @@ import { html } from "@polymer/polymer/lib/utils/html-tag"; /* eslint-plugin-disable lit */ import { PolymerElement } from "@polymer/polymer/polymer-element"; -import { EventsMixin } from "../mixins/events-mixin"; import { hs2rgb, rgb2hs } from "../common/color/convert-color"; +import { EventsMixin } from "../mixins/events-mixin"; /** * Color-picker custom element * diff --git a/src/components/ha-combo-box.ts b/src/components/ha-combo-box.ts index be0911240..eb122e1c7 100644 --- a/src/components/ha-combo-box.ts +++ b/src/components/ha-combo-box.ts @@ -5,17 +5,8 @@ import "@polymer/paper-item/paper-item"; import "@polymer/paper-item/paper-item-body"; import "@polymer/paper-listbox/paper-listbox"; import "@vaadin/vaadin-combo-box/theme/material/vaadin-combo-box-light"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - query, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state, query } from "lit/decorators"; import { fireEvent } from "../common/dom/fire_event"; import { PolymerChangedEvent } from "../polymer-types"; import { HomeAssistant } from "../types"; diff --git a/src/components/ha-cover-controls.ts b/src/components/ha-cover-controls.ts index bbe03b6af..446d9e76e 100644 --- a/src/components/ha-cover-controls.ts +++ b/src/components/ha-cover-controls.ts @@ -2,15 +2,13 @@ import type { HassEntity } from "home-assistant-js-websocket"; import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; +} from "lit"; +import { customElement, property, state } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; import { computeCloseIcon, computeOpenIcon } from "../common/entity/cover_icon"; import { UNAVAILABLE } from "../data/entity"; import type { HomeAssistant } from "../types"; diff --git a/src/components/ha-cover-tilt-controls.ts b/src/components/ha-cover-tilt-controls.ts index 9ae7e1eb8..6bc444cec 100644 --- a/src/components/ha-cover-tilt-controls.ts +++ b/src/components/ha-cover-tilt-controls.ts @@ -2,15 +2,13 @@ import { HassEntity } from "home-assistant-js-websocket"; import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; +} from "lit"; +import { customElement, property, state } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; import { UNAVAILABLE } from "../data/entity"; import { HomeAssistant } from "../types"; import CoverEntity from "../util/cover-model"; diff --git a/src/components/ha-date-input.ts b/src/components/ha-date-input.ts index a7ec48146..d2289c464 100644 --- a/src/components/ha-date-input.ts +++ b/src/components/ha-date-input.ts @@ -1,17 +1,9 @@ -import "@vaadin/vaadin-date-picker/theme/material/vaadin-date-picker-light"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - PropertyValues, - query, -} from "lit-element"; -import "@polymer/paper-input/paper-input"; -import { fireEvent } from "../common/dom/fire_event"; import { mdiCalendar } from "@mdi/js"; +import "@polymer/paper-input/paper-input"; +import "@vaadin/vaadin-date-picker/theme/material/vaadin-date-picker-light"; +import { css, CSSResultGroup, html, LitElement, PropertyValues } from "lit"; +import { customElement, property, query } from "lit/decorators"; +import { fireEvent } from "../common/dom/fire_event"; import "./ha-svg-icon"; const i18n = { diff --git a/src/components/ha-date-range-picker.ts b/src/components/ha-date-range-picker.ts index 0b67c7e50..15d8df0d7 100644 --- a/src/components/ha-date-range-picker.ts +++ b/src/components/ha-date-range-picker.ts @@ -7,13 +7,12 @@ import "@polymer/paper-input/paper-input"; import { css, CSSResultGroup, - customElement, html, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, property } from "lit/decorators"; import { formatDateTime } from "../common/datetime/format_date_time"; import { computeRTLDirection } from "../common/util/compute_rtl"; import { HomeAssistant } from "../types"; diff --git a/src/components/ha-dialog.ts b/src/components/ha-dialog.ts index a38faff95..b776bdf6c 100644 --- a/src/components/ha-dialog.ts +++ b/src/components/ha-dialog.ts @@ -1,14 +1,11 @@ -import "@material/mwc-dialog"; -import type { Dialog } from "@material/mwc-dialog"; -import { style } from "@material/mwc-dialog/mwc-dialog-css"; +import { Dialog } from "@material/mwc-dialog"; import { mdiClose } from "@mdi/js"; -import { css, CSSResultGroup, customElement, html } from "lit-element"; +import { css, CSSResultGroup, html } from "lit"; +import { customElement } from "lit/decorators"; import { computeRTLDirection } from "../common/util/compute_rtl"; -import type { Constructor, HomeAssistant } from "../types"; +import type { HomeAssistant } from "../types"; import "./ha-icon-button"; -const MwcDialog = customElements.get("mwc-dialog") as Constructor; - export const createCloseHeading = (hass: HomeAssistant, title: string) => html` ${title} html` `; @customElement("ha-dialog") -export class HaDialog extends MwcDialog { +// @ts-expect-error +export class HaDialog extends Dialog { public scrollToPos(x: number, y: number) { this.contentElement.scrollTo(x, y); } @@ -33,7 +31,7 @@ export class HaDialog extends MwcDialog { protected static get styles(): CSSResultGroup { return [ - style, + Dialog.styles, css` .mdc-dialog { --mdc-dialog-scroll-divider-color: var(--divider-color); diff --git a/src/components/ha-expansion-panel.ts b/src/components/ha-expansion-panel.ts index 0676b6a17..9bed7d4fc 100644 --- a/src/components/ha-expansion-panel.ts +++ b/src/components/ha-expansion-panel.ts @@ -1,15 +1,7 @@ import { mdiChevronDown } from "@mdi/js"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - query, - TemplateResult, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, query } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; import { fireEvent } from "../common/dom/fire_event"; import "./ha-svg-icon"; diff --git a/src/components/ha-fab.ts b/src/components/ha-fab.ts index 9725630b6..c2f58b8f0 100644 --- a/src/components/ha-fab.ts +++ b/src/components/ha-fab.ts @@ -1,12 +1,8 @@ -import "@material/mwc-fab"; -import type { Fab } from "@material/mwc-fab"; -import { customElement } from "lit-element"; -import { Constructor } from "../types"; - -const MwcFab = customElements.get("mwc-fab") as Constructor; +import { Fab } from "@material/mwc-fab"; +import { customElement } from "lit/decorators"; @customElement("ha-fab") -export class HaFab extends MwcFab { +export class HaFab extends Fab { protected firstUpdated(changedProperties) { super.firstUpdated(changedProperties); this.style.setProperty("--mdc-theme-secondary", "var(--primary-color)"); diff --git a/src/components/ha-file-upload.ts b/src/components/ha-file-upload.ts index d3324d63c..2eec7319c 100644 --- a/src/components/ha-file-upload.ts +++ b/src/components/ha-file-upload.ts @@ -2,18 +2,9 @@ import "@material/mwc-icon-button/mwc-icon-button"; import { mdiClose } from "@mdi/js"; import "@polymer/iron-input/iron-input"; import "@polymer/paper-input/paper-input-container"; -import { - css, - customElement, - html, - state, - LitElement, - property, - PropertyValues, - query, - TemplateResult, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; +import { css, html, LitElement, PropertyValues, TemplateResult } from "lit"; +import { customElement, property, state, query } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; import { fireEvent } from "../common/dom/fire_event"; import "./ha-circular-progress"; import "./ha-svg-icon"; diff --git a/src/components/ha-form/ha-form-boolean.ts b/src/components/ha-form/ha-form-boolean.ts index 2eac24c33..2bf264a49 100644 --- a/src/components/ha-form/ha-form-boolean.ts +++ b/src/components/ha-form/ha-form-boolean.ts @@ -1,15 +1,7 @@ import "@polymer/paper-checkbox/paper-checkbox"; import type { PaperCheckboxElement } from "@polymer/paper-checkbox/paper-checkbox"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - query, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, query } from "lit/decorators"; import { fireEvent } from "../../common/dom/fire_event"; import type { HaFormBooleanData, diff --git a/src/components/ha-form/ha-form-constant.ts b/src/components/ha-form/ha-form-constant.ts index e86019163..d05e9ac5f 100644 --- a/src/components/ha-form/ha-form-constant.ts +++ b/src/components/ha-form/ha-form-constant.ts @@ -1,13 +1,12 @@ import { css, CSSResultGroup, - customElement, html, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, property } from "lit/decorators"; import { fireEvent } from "../../common/dom/fire_event"; import { HaFormConstantSchema, HaFormElement } from "./ha-form"; diff --git a/src/components/ha-form/ha-form-float.ts b/src/components/ha-form/ha-form-float.ts index 9720f0ffd..edf3c1357 100644 --- a/src/components/ha-form/ha-form-float.ts +++ b/src/components/ha-form/ha-form-float.ts @@ -1,13 +1,7 @@ import "@polymer/paper-input/paper-input"; import type { PaperInputElement } from "@polymer/paper-input/paper-input"; -import { - customElement, - html, - LitElement, - property, - query, - TemplateResult, -} from "lit-element"; +import { html, LitElement, TemplateResult } from "lit"; +import { customElement, property, query } from "lit/decorators"; import { fireEvent } from "../../common/dom/fire_event"; import { HaFormElement, HaFormFloatData, HaFormFloatSchema } from "./ha-form"; diff --git a/src/components/ha-form/ha-form-integer.ts b/src/components/ha-form/ha-form-integer.ts index cb8fa55d4..6f0ec4cfa 100644 --- a/src/components/ha-form/ha-form-integer.ts +++ b/src/components/ha-form/ha-form-integer.ts @@ -2,16 +2,8 @@ import "@polymer/paper-input/paper-input"; import type { PaperInputElement } from "@polymer/paper-input/paper-input"; import "@polymer/paper-slider/paper-slider"; import type { PaperSliderElement } from "@polymer/paper-slider/paper-slider"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - query, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, query } from "lit/decorators"; import { fireEvent } from "../../common/dom/fire_event"; import { HaCheckbox } from "../ha-checkbox"; import "../ha-slider"; diff --git a/src/components/ha-form/ha-form-multi_select.ts b/src/components/ha-form/ha-form-multi_select.ts index c9424e4ec..93ad92bd6 100644 --- a/src/components/ha-form/ha-form-multi_select.ts +++ b/src/components/ha-form/ha-form-multi_select.ts @@ -4,17 +4,8 @@ import "@polymer/paper-item/paper-icon-item"; import "@polymer/paper-listbox/paper-listbox"; import "@polymer/paper-menu-button/paper-menu-button"; import "@polymer/paper-ripple/paper-ripple"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - query, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state, query } from "lit/decorators"; import { fireEvent } from "../../common/dom/fire_event"; import "../ha-icon"; import { diff --git a/src/components/ha-form/ha-form-positive_time_period_dict.ts b/src/components/ha-form/ha-form-positive_time_period_dict.ts index 453eaf2a6..04ec57598 100644 --- a/src/components/ha-form/ha-form-positive_time_period_dict.ts +++ b/src/components/ha-form/ha-form-positive_time_period_dict.ts @@ -1,11 +1,5 @@ -import { - customElement, - html, - LitElement, - property, - query, - TemplateResult, -} from "lit-element"; +import { html, LitElement, TemplateResult } from "lit"; +import { customElement, property, query } from "lit/decorators"; import "../ha-time-input"; import { HaFormElement, HaFormTimeData, HaFormTimeSchema } from "./ha-form"; diff --git a/src/components/ha-form/ha-form-select.ts b/src/components/ha-form/ha-form-select.ts index 05ee34672..5cf9dc013 100644 --- a/src/components/ha-form/ha-form-select.ts +++ b/src/components/ha-form/ha-form-select.ts @@ -1,15 +1,7 @@ import "@polymer/paper-item/paper-item"; import "@polymer/paper-listbox/paper-listbox"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - query, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, query } from "lit/decorators"; import { fireEvent } from "../../common/dom/fire_event"; import "../ha-paper-dropdown-menu"; import { HaFormElement, HaFormSelectData, HaFormSelectSchema } from "./ha-form"; diff --git a/src/components/ha-form/ha-form-string.ts b/src/components/ha-form/ha-form-string.ts index d78d79326..82e4520bf 100644 --- a/src/components/ha-form/ha-form-string.ts +++ b/src/components/ha-form/ha-form-string.ts @@ -1,17 +1,9 @@ +import "@material/mwc-icon-button/mwc-icon-button"; import { mdiEye, mdiEyeOff } from "@mdi/js"; import "@polymer/paper-input/paper-input"; import type { PaperInputElement } from "@polymer/paper-input/paper-input"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - query, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state, query } from "lit/decorators"; import { fireEvent } from "../../common/dom/fire_event"; import "../ha-svg-icon"; import type { @@ -19,7 +11,6 @@ import type { HaFormStringData, HaFormStringSchema, } from "./ha-form"; -import "@material/mwc-icon-button/mwc-icon-button"; @customElement("ha-form-string") export class HaFormString extends LitElement implements HaFormElement { diff --git a/src/components/ha-form/ha-form.ts b/src/components/ha-form/ha-form.ts index 4b7f3ef7d..1a4c02e31 100644 --- a/src/components/ha-form/ha-form.ts +++ b/src/components/ha-form/ha-form.ts @@ -1,11 +1,5 @@ -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement } from "lit"; +import { customElement, property } from "lit/decorators"; import { dynamicElement } from "../../common/dom/dynamic-element-directive"; import { fireEvent } from "../../common/dom/fire_event"; import { HaTimeData } from "../ha-time-input"; diff --git a/src/components/ha-formfield.ts b/src/components/ha-formfield.ts index 9b31ed66f..e7c9232f1 100644 --- a/src/components/ha-formfield.ts +++ b/src/components/ha-formfield.ts @@ -1,18 +1,12 @@ -import "@material/mwc-formfield"; -import type { Formfield } from "@material/mwc-formfield"; -import { style } from "@material/mwc-formfield/mwc-formfield-css"; -import { css, CSSResultGroup, customElement } from "lit-element"; -import { Constructor } from "../types"; - -const MwcFormfield = customElements.get( - "mwc-formfield" -) as Constructor; - +import { Formfield } from "@material/mwc-formfield"; +import { css, CSSResultGroup } from "lit"; +import { customElement } from "lit/decorators"; @customElement("ha-formfield") -export class HaFormfield extends MwcFormfield { +// @ts-expect-error +export class HaFormfield extends Formfield { protected static get styles(): CSSResultGroup { return [ - style, + Formfield.styles, css` :host(:not([alignEnd])) ::slotted(ha-switch) { margin-right: 10px; diff --git a/src/components/ha-gauge.ts b/src/components/ha-gauge.ts index 11db5a890..19fb9a457 100644 --- a/src/components/ha-gauge.ts +++ b/src/components/ha-gauge.ts @@ -1,14 +1,7 @@ -import { - css, - customElement, - state, - LitElement, - property, - PropertyValues, - svg, -} from "lit-element"; -import { ifDefined } from "lit-html/directives/if-defined"; -import { styleMap } from "lit-html/directives/style-map"; +import { css, LitElement, PropertyValues, svg } from "lit"; +import { customElement, property, state } from "lit/decorators"; +import { ifDefined } from "lit/directives/if-defined"; +import { styleMap } from "lit/directives/style-map"; import { formatNumber } from "../common/string/format_number"; import { afterNextRender } from "../common/util/render-status"; import { FrontendTranslationData } from "../data/translation"; diff --git a/src/components/ha-header-bar.ts b/src/components/ha-header-bar.ts index 0677e9667..68111455a 100644 --- a/src/components/ha-header-bar.ts +++ b/src/components/ha-header-bar.ts @@ -1,6 +1,7 @@ // @ts-ignore import topAppBarStyles from "@material/top-app-bar/dist/mdc.top-app-bar.min.css"; -import { css, customElement, html, LitElement, unsafeCSS } from "lit-element"; +import { css, html, LitElement, unsafeCSS } from "lit"; +import { customElement } from "lit/decorators"; @customElement("ha-header-bar") export class HaHeaderBar extends LitElement { diff --git a/src/components/ha-help-tooltip.ts b/src/components/ha-help-tooltip.ts index 73e60e579..1194f77b9 100644 --- a/src/components/ha-help-tooltip.ts +++ b/src/components/ha-help-tooltip.ts @@ -1,13 +1,7 @@ import { mdiHelpCircle } from "@mdi/js"; import "@polymer/paper-tooltip/paper-tooltip"; -import { - css, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import "./ha-svg-icon"; @customElement("ha-help-tooltip") diff --git a/src/components/ha-hls-player.ts b/src/components/ha-hls-player.ts index ee9d20001..857e2c187 100644 --- a/src/components/ha-hls-player.ts +++ b/src/components/ha-hls-player.ts @@ -2,15 +2,12 @@ import type HlsType from "hls.js"; import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, - query, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, property, query, state } from "lit/decorators"; import { fireEvent } from "../common/dom/fire_event"; import { nextRender } from "../common/util/render-status"; import { getExternalConfig } from "../external_app/external_config"; diff --git a/src/components/ha-icon-button-arrow-next.ts b/src/components/ha-icon-button-arrow-next.ts index d6076d7ff..a0c58a48e 100644 --- a/src/components/ha-icon-button-arrow-next.ts +++ b/src/components/ha-icon-button-arrow-next.ts @@ -1,13 +1,7 @@ import "@material/mwc-icon-button/mwc-icon-button"; import { mdiArrowLeft, mdiArrowRight } from "@mdi/js"; -import { - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { HomeAssistant } from "../types"; import "./ha-svg-icon"; diff --git a/src/components/ha-icon-button-arrow-prev.ts b/src/components/ha-icon-button-arrow-prev.ts index 50ef9120e..dc192b88f 100644 --- a/src/components/ha-icon-button-arrow-prev.ts +++ b/src/components/ha-icon-button-arrow-prev.ts @@ -1,13 +1,7 @@ import "@material/mwc-icon-button/mwc-icon-button"; import { mdiArrowLeft, mdiArrowRight } from "@mdi/js"; -import { - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { HomeAssistant } from "../types"; import "./ha-svg-icon"; diff --git a/src/components/ha-icon-button-next.ts b/src/components/ha-icon-button-next.ts index 8b4df6eb5..8f3a039ca 100644 --- a/src/components/ha-icon-button-next.ts +++ b/src/components/ha-icon-button-next.ts @@ -1,13 +1,7 @@ import "@material/mwc-icon-button"; import { mdiChevronLeft, mdiChevronRight } from "@mdi/js"; -import { - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { HomeAssistant } from "../types"; import "./ha-svg-icon"; diff --git a/src/components/ha-icon-button-prev.ts b/src/components/ha-icon-button-prev.ts index 3a962bc23..9bad87613 100644 --- a/src/components/ha-icon-button-prev.ts +++ b/src/components/ha-icon-button-prev.ts @@ -1,13 +1,7 @@ import "@material/mwc-icon-button/mwc-icon-button"; import { mdiChevronLeft, mdiChevronRight } from "@mdi/js"; -import { - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { HomeAssistant } from "../types"; import "./ha-svg-icon"; diff --git a/src/components/ha-icon-button.ts b/src/components/ha-icon-button.ts index 3e57d5a9b..1195a8517 100644 --- a/src/components/ha-icon-button.ts +++ b/src/components/ha-icon-button.ts @@ -1,13 +1,6 @@ import "@material/mwc-icon-button"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import "./ha-icon"; @customElement("ha-icon-button") diff --git a/src/components/ha-icon-input.ts b/src/components/ha-icon-input.ts index 11f310c91..fb62e3add 100644 --- a/src/components/ha-icon-input.ts +++ b/src/components/ha-icon-input.ts @@ -1,12 +1,6 @@ import "@polymer/paper-input/paper-input"; -import { - css, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import { fireEvent } from "../common/dom/fire_event"; import "./ha-icon"; diff --git a/src/components/ha-icon.ts b/src/components/ha-icon.ts index ba1a4a74d..3d43596f1 100644 --- a/src/components/ha-icon.ts +++ b/src/components/ha-icon.ts @@ -2,14 +2,12 @@ import "@polymer/iron-icon/iron-icon"; import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, property, state } from "lit/decorators"; import { fireEvent } from "../common/dom/fire_event"; import { debounce } from "../common/util/debounce"; import { CustomIcon, customIconsets } from "../data/custom_iconsets"; diff --git a/src/components/ha-label-badge.ts b/src/components/ha-label-badge.ts index 66aa2dc0b..67569aeec 100644 --- a/src/components/ha-label-badge.ts +++ b/src/components/ha-label-badge.ts @@ -3,11 +3,11 @@ import { CSSResultGroup, html, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; +} from "lit"; +import { property } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; import "./ha-icon"; class HaLabelBadge extends LitElement { diff --git a/src/components/ha-markdown-element.ts b/src/components/ha-markdown-element.ts index 840fc9739..e0df4e40b 100644 --- a/src/components/ha-markdown-element.ts +++ b/src/components/ha-markdown-element.ts @@ -1,4 +1,5 @@ -import { customElement, property, ReactiveElement } from "lit-element"; +import { ReactiveElement } from "lit"; +import { customElement, property } from "lit/decorators"; import { fireEvent } from "../common/dom/fire_event"; import { renderMarkdown } from "../resources/render-markdown"; diff --git a/src/components/ha-markdown.ts b/src/components/ha-markdown.ts index b47e96e70..0f192bac3 100644 --- a/src/components/ha-markdown.ts +++ b/src/components/ha-markdown.ts @@ -1,12 +1,5 @@ -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import "./ha-markdown-element"; @customElement("ha-markdown") diff --git a/src/components/ha-menu-button.ts b/src/components/ha-menu-button.ts index 067bf9332..2249b6fa2 100644 --- a/src/components/ha-menu-button.ts +++ b/src/components/ha-menu-button.ts @@ -1,16 +1,8 @@ import "@material/mwc-icon-button"; import { mdiMenu } from "@mdi/js"; import { UnsubscribeFunc } from "home-assistant-js-websocket"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { fireEvent } from "../common/dom/fire_event"; import { computeDomain } from "../common/entity/compute_domain"; import { subscribeNotifications } from "../data/persistent_notification"; diff --git a/src/components/ha-picture-upload.ts b/src/components/ha-picture-upload.ts index f63eaedf4..5111b0764 100644 --- a/src/components/ha-picture-upload.ts +++ b/src/components/ha-picture-upload.ts @@ -2,14 +2,8 @@ import "@material/mwc-icon-button/mwc-icon-button"; import { mdiImagePlus } from "@mdi/js"; import "@polymer/iron-input/iron-input"; import "@polymer/paper-input/paper-input-container"; -import { - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { fireEvent } from "../common/dom/fire_event"; import { createImage, generateImageThumbnailUrl } from "../data/image"; import { showAlertDialog } from "../dialogs/generic/show-dialog-box"; diff --git a/src/components/ha-radio.ts b/src/components/ha-radio.ts index 8796750a7..f1269e5a9 100644 --- a/src/components/ha-radio.ts +++ b/src/components/ha-radio.ts @@ -1,12 +1,7 @@ -import "@material/mwc-radio"; -import type { Radio } from "@material/mwc-radio"; -import { customElement } from "lit-element"; -import type { Constructor } from "../types"; - -const MwcRadio = customElements.get("mwc-radio") as Constructor; - +import { Radio } from "@material/mwc-radio"; +import { customElement } from "lit/decorators"; @customElement("ha-radio") -export class HaRadio extends MwcRadio { +export class HaRadio extends Radio { public firstUpdated() { super.firstUpdated(); this.style.setProperty("--mdc-theme-secondary", "var(--primary-color)"); diff --git a/src/components/ha-related-items.ts b/src/components/ha-related-items.ts index 9bee1152b..4da2605b8 100644 --- a/src/components/ha-related-items.ts +++ b/src/components/ha-related-items.ts @@ -2,14 +2,12 @@ import { HassEntity, UnsubscribeFunc } from "home-assistant-js-websocket"; import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, property, state } from "lit/decorators"; import { fireEvent } from "../common/dom/fire_event"; import { AreaRegistryEntry, diff --git a/src/components/ha-relative-time.ts b/src/components/ha-relative-time.ts index 83ad795ac..36da1ab19 100644 --- a/src/components/ha-relative-time.ts +++ b/src/components/ha-relative-time.ts @@ -1,9 +1,5 @@ -import { - customElement, - property, - PropertyValues, - ReactiveElement, -} from "lit-element"; +import { PropertyValues, ReactiveElement } from "lit"; +import { customElement, property } from "lit/decorators"; import relativeTime from "../common/datetime/relative_time"; import type { HomeAssistant } from "../types"; diff --git a/src/components/ha-selector/ha-selector-action.ts b/src/components/ha-selector/ha-selector-action.ts index 321e5f4f0..5a6fd5f6c 100644 --- a/src/components/ha-selector/ha-selector-action.ts +++ b/src/components/ha-selector/ha-selector-action.ts @@ -1,11 +1,5 @@ -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement } from "lit"; +import { customElement, property } from "lit/decorators"; import { Action } from "../../data/script"; import { ActionSelector } from "../../data/selector"; import "../../panels/config/automation/action/ha-automation-action"; diff --git a/src/components/ha-selector/ha-selector-addon.ts b/src/components/ha-selector/ha-selector-addon.ts index 923fb4c29..30214933f 100644 --- a/src/components/ha-selector/ha-selector-addon.ts +++ b/src/components/ha-selector/ha-selector-addon.ts @@ -1,4 +1,5 @@ -import { customElement, html, LitElement, property } from "lit-element"; +import { html, LitElement } from "lit"; +import { customElement, property } from "lit/decorators"; import { AddonSelector } from "../../data/selector"; import { HomeAssistant } from "../../types"; import "../ha-addon-picker"; diff --git a/src/components/ha-selector/ha-selector-area.ts b/src/components/ha-selector/ha-selector-area.ts index 5fb562157..5d619bf0e 100644 --- a/src/components/ha-selector/ha-selector-area.ts +++ b/src/components/ha-selector/ha-selector-area.ts @@ -1,4 +1,5 @@ -import { customElement, html, state, LitElement, property } from "lit-element"; +import { html, LitElement } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { ConfigEntry, getConfigEntries } from "../../data/config_entries"; import { DeviceRegistryEntry } from "../../data/device_registry"; import { EntityRegistryEntry } from "../../data/entity_registry"; diff --git a/src/components/ha-selector/ha-selector-boolean.ts b/src/components/ha-selector/ha-selector-boolean.ts index 7299316b7..154ecc4c9 100644 --- a/src/components/ha-selector/ha-selector-boolean.ts +++ b/src/components/ha-selector/ha-selector-boolean.ts @@ -1,11 +1,5 @@ -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement } from "lit"; +import { customElement, property } from "lit/decorators"; import { fireEvent } from "../../common/dom/fire_event"; import { HomeAssistant } from "../../types"; import "../ha-formfield"; diff --git a/src/components/ha-selector/ha-selector-device.ts b/src/components/ha-selector/ha-selector-device.ts index b528beb78..bdf945899 100644 --- a/src/components/ha-selector/ha-selector-device.ts +++ b/src/components/ha-selector/ha-selector-device.ts @@ -1,4 +1,5 @@ -import { customElement, html, state, LitElement, property } from "lit-element"; +import { html, LitElement } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { ConfigEntry, getConfigEntries } from "../../data/config_entries"; import { DeviceRegistryEntry } from "../../data/device_registry"; import { DeviceSelector } from "../../data/selector"; diff --git a/src/components/ha-selector/ha-selector-entity.ts b/src/components/ha-selector/ha-selector-entity.ts index 884905f7b..a2cb042c7 100644 --- a/src/components/ha-selector/ha-selector-entity.ts +++ b/src/components/ha-selector/ha-selector-entity.ts @@ -1,5 +1,6 @@ import { HassEntity, UnsubscribeFunc } from "home-assistant-js-websocket"; -import { customElement, html, state, LitElement, property } from "lit-element"; +import { html, LitElement } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { computeStateDomain } from "../../common/entity/compute_state_domain"; import { subscribeEntityRegistry } from "../../data/entity_registry"; import { EntitySelector } from "../../data/selector"; diff --git a/src/components/ha-selector/ha-selector-number.ts b/src/components/ha-selector/ha-selector-number.ts index 8f64b386b..244f97e2c 100644 --- a/src/components/ha-selector/ha-selector-number.ts +++ b/src/components/ha-selector/ha-selector-number.ts @@ -1,13 +1,7 @@ import "@polymer/paper-input/paper-input"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; +import { css, CSSResultGroup, html, LitElement } from "lit"; +import { customElement, property } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; import { fireEvent } from "../../common/dom/fire_event"; import { NumberSelector } from "../../data/selector"; import { HomeAssistant } from "../../types"; diff --git a/src/components/ha-selector/ha-selector-object.ts b/src/components/ha-selector/ha-selector-object.ts index 208bbaa6d..e003f2825 100644 --- a/src/components/ha-selector/ha-selector-object.ts +++ b/src/components/ha-selector/ha-selector-object.ts @@ -1,4 +1,5 @@ -import { customElement, html, LitElement, property } from "lit-element"; +import { html, LitElement } from "lit"; +import { customElement, property } from "lit/decorators"; import { fireEvent } from "../../common/dom/fire_event"; import { HomeAssistant } from "../../types"; import "../ha-yaml-editor"; diff --git a/src/components/ha-selector/ha-selector-select.ts b/src/components/ha-selector/ha-selector-select.ts index ae19d099d..450a6d7e6 100644 --- a/src/components/ha-selector/ha-selector-select.ts +++ b/src/components/ha-selector/ha-selector-select.ts @@ -1,14 +1,8 @@ -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement } from "lit"; +import { customElement, property } from "lit/decorators"; import { fireEvent } from "../../common/dom/fire_event"; -import { HomeAssistant } from "../../types"; import { SelectSelector } from "../../data/selector"; +import { HomeAssistant } from "../../types"; import "../ha-paper-dropdown-menu"; @customElement("ha-selector-select") diff --git a/src/components/ha-selector/ha-selector-target.ts b/src/components/ha-selector/ha-selector-target.ts index 814b69275..6299f60bf 100644 --- a/src/components/ha-selector/ha-selector-target.ts +++ b/src/components/ha-selector/ha-selector-target.ts @@ -8,15 +8,8 @@ import { HassServiceTarget, UnsubscribeFunc, } from "home-assistant-js-websocket"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { ConfigEntry, getConfigEntries } from "../../data/config_entries"; import { DeviceRegistryEntry } from "../../data/device_registry"; import { diff --git a/src/components/ha-selector/ha-selector-text.ts b/src/components/ha-selector/ha-selector-text.ts index 9d2fbbd24..25cddf58d 100644 --- a/src/components/ha-selector/ha-selector-text.ts +++ b/src/components/ha-selector/ha-selector-text.ts @@ -1,9 +1,10 @@ -import { customElement, html, LitElement, property } from "lit-element"; -import { fireEvent } from "../../common/dom/fire_event"; -import { HomeAssistant } from "../../types"; -import "@polymer/paper-input/paper-textarea"; import "@polymer/paper-input/paper-input"; +import "@polymer/paper-input/paper-textarea"; +import { html, LitElement } from "lit"; +import { customElement, property } from "lit/decorators"; +import { fireEvent } from "../../common/dom/fire_event"; import { StringSelector } from "../../data/selector"; +import { HomeAssistant } from "../../types"; @customElement("ha-selector-text") export class HaTextSelector extends LitElement { diff --git a/src/components/ha-selector/ha-selector-time.ts b/src/components/ha-selector/ha-selector-time.ts index 8fb0d530c..48b57def2 100644 --- a/src/components/ha-selector/ha-selector-time.ts +++ b/src/components/ha-selector/ha-selector-time.ts @@ -1,4 +1,5 @@ -import { customElement, html, LitElement, property } from "lit-element"; +import { html, LitElement } from "lit"; +import { customElement, property } from "lit/decorators"; import memoizeOne from "memoize-one"; import { fireEvent } from "../../common/dom/fire_event"; import { TimeSelector } from "../../data/selector"; diff --git a/src/components/ha-selector/ha-selector.ts b/src/components/ha-selector/ha-selector.ts index 9982e3383..d426ec0b4 100644 --- a/src/components/ha-selector/ha-selector.ts +++ b/src/components/ha-selector/ha-selector.ts @@ -1,4 +1,5 @@ -import { customElement, html, LitElement, property } from "lit-element"; +import { html, LitElement } from "lit"; +import { customElement, property } from "lit/decorators"; import { dynamicElement } from "../../common/dom/dynamic-element-directive"; import { Selector } from "../../data/selector"; import { HomeAssistant } from "../../types"; @@ -9,11 +10,11 @@ import "./ha-selector-boolean"; import "./ha-selector-device"; import "./ha-selector-entity"; import "./ha-selector-number"; -import "./ha-selector-target"; -import "./ha-selector-time"; import "./ha-selector-object"; -import "./ha-selector-text"; import "./ha-selector-select"; +import "./ha-selector-target"; +import "./ha-selector-text"; +import "./ha-selector-time"; @customElement("ha-selector") export class HaSelector extends LitElement { diff --git a/src/components/ha-service-control.ts b/src/components/ha-service-control.ts index 359183544..a93b7aba2 100644 --- a/src/components/ha-service-control.ts +++ b/src/components/ha-service-control.ts @@ -4,17 +4,8 @@ import { HassServices, HassServiceTarget, } from "home-assistant-js-websocket"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - PropertyValues, - query, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, PropertyValues } from "lit"; +import { customElement, property, state, query } from "lit/decorators"; import memoizeOne from "memoize-one"; import { fireEvent } from "../common/dom/fire_event"; import { computeDomain } from "../common/entity/compute_domain"; diff --git a/src/components/ha-service-picker.ts b/src/components/ha-service-picker.ts index 1f7d8449d..2bc92b97c 100644 --- a/src/components/ha-service-picker.ts +++ b/src/components/ha-service-picker.ts @@ -1,4 +1,5 @@ -import { html, state, LitElement, property } from "lit-element"; +import { html, LitElement } from "lit"; +import { property, state } from "lit/decorators"; import memoizeOne from "memoize-one"; import { fireEvent } from "../common/dom/fire_event"; import { LocalizeFunc } from "../common/translations/localize"; diff --git a/src/components/ha-settings-row.ts b/src/components/ha-settings-row.ts index aa6f9d570..a28738b26 100644 --- a/src/components/ha-settings-row.ts +++ b/src/components/ha-settings-row.ts @@ -1,13 +1,6 @@ import "@polymer/paper-item/paper-item-body"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; @customElement("ha-settings-row") export class HaSettingsRow extends LitElement { diff --git a/src/components/ha-sidebar.ts b/src/components/ha-sidebar.ts index a3fe63f50..9cd8a320b 100644 --- a/src/components/ha-sidebar.ts +++ b/src/components/ha-sidebar.ts @@ -15,18 +15,15 @@ import "@polymer/paper-item/paper-item"; import "@polymer/paper-listbox/paper-listbox"; import { css, - CSSResultGroup, - customElement, - eventOptions, - html, - state, - LitElement, - property, - PropertyValues, CSSResult, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; -import { guard } from "lit-html/directives/guard"; + CSSResultGroup, + html, + LitElement, + PropertyValues, +} from "lit"; +import { customElement, eventOptions, property, state } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; +import { guard } from "lit/directives/guard"; import memoizeOne from "memoize-one"; import { LocalStorage } from "../common/decorators/local-storage"; import { fireEvent } from "../common/dom/fire_event"; diff --git a/src/components/ha-svg-icon.ts b/src/components/ha-svg-icon.ts index b803d3bc6..b8f6a3b5c 100644 --- a/src/components/ha-svg-icon.ts +++ b/src/components/ha-svg-icon.ts @@ -1,12 +1,5 @@ -import { - css, - CSSResultGroup, - customElement, - LitElement, - property, - svg, - SVGTemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, LitElement, svg, SVGTemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; @customElement("ha-svg-icon") export class HaSvgIcon extends LitElement { diff --git a/src/components/ha-switch.ts b/src/components/ha-switch.ts index 77ce4b30d..2ab710619 100644 --- a/src/components/ha-switch.ts +++ b/src/components/ha-switch.ts @@ -1,14 +1,10 @@ -import "@material/mwc-switch"; -import type { Switch } from "@material/mwc-switch"; -import { style } from "@material/mwc-switch/mwc-switch-css"; -import { css, CSSResultGroup, customElement, property } from "lit-element"; +import { Switch } from "@material/mwc-switch"; +import { css, CSSResultGroup } from "lit"; +import { customElement, property } from "lit/decorators"; import { forwardHaptic } from "../data/haptics"; -import { Constructor } from "../types"; - -const MwcSwitch = customElements.get("mwc-switch") as Constructor; - @customElement("ha-switch") -export class HaSwitch extends MwcSwitch { +// @ts-expect-error +export class HaSwitch extends Switch { // Generate a haptic vibration. // Only set to true if the new value of the switch is applied right away when toggling. // Do not add haptic when a user is required to press save. @@ -27,9 +23,9 @@ export class HaSwitch extends MwcSwitch { }); } - protected static get styles(): CSSResultGroup { + static get styles(): CSSResultGroup { return [ - style, + Switch.styles, css` .mdc-switch.mdc-switch--checked .mdc-switch__thumb { background-color: var(--switch-checked-button-color); diff --git a/src/components/ha-tab.ts b/src/components/ha-tab.ts index 1306c7cb4..ac0d81d92 100644 --- a/src/components/ha-tab.ts +++ b/src/components/ha-tab.ts @@ -1,19 +1,15 @@ import type { Ripple } from "@material/mwc-ripple"; import "@material/mwc-ripple/mwc-ripple"; import { RippleHandlers } from "@material/mwc-ripple/ripple-handlers"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; import { - css, - CSSResultGroup, customElement, eventOptions, - html, - state, - LitElement, property, queryAsync, - TemplateResult, -} from "lit-element"; -import { ifDefined } from "lit-html/directives/if-defined"; + state, +} from "lit/decorators"; +import { ifDefined } from "lit/directives/if-defined"; import "./ha-icon"; import "./ha-svg-icon"; diff --git a/src/components/ha-tabs.ts b/src/components/ha-tabs.ts index 491d36462..035663190 100644 --- a/src/components/ha-tabs.ts +++ b/src/components/ha-tabs.ts @@ -2,7 +2,7 @@ import type { PaperIconButtonElement } from "@polymer/paper-icon-button/paper-ic import type { PaperTabElement } from "@polymer/paper-tabs/paper-tab"; import "@polymer/paper-tabs/paper-tabs"; import type { PaperTabsElement } from "@polymer/paper-tabs/paper-tabs"; -import { customElement } from "lit-element"; +import { customElement } from "lit/decorators"; import { Constructor } from "../types"; const PaperTabs = customElements.get( diff --git a/src/components/ha-target-picker.ts b/src/components/ha-target-picker.ts index b2ceeb39f..3e2e40260 100644 --- a/src/components/ha-target-picker.ts +++ b/src/components/ha-target-picker.ts @@ -14,18 +14,9 @@ import { HassServiceTarget, UnsubscribeFunc, } from "home-assistant-js-websocket"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - query, - unsafeCSS, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; +import { css, CSSResultGroup, html, LitElement, unsafeCSS } from "lit"; +import { customElement, property, state, query } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; import { fireEvent } from "../common/dom/fire_event"; import { ensureArray } from "../common/ensure-array"; import { computeDomain } from "../common/entity/compute_domain"; diff --git a/src/components/ha-time-input.ts b/src/components/ha-time-input.ts index e72e1a09d..382ea4d56 100644 --- a/src/components/ha-time-input.ts +++ b/src/components/ha-time-input.ts @@ -1,11 +1,5 @@ -import { - customElement, - html, - LitElement, - property, - query, - TemplateResult, -} from "lit-element"; +import { html, LitElement, TemplateResult } from "lit"; +import { customElement, property, query } from "lit/decorators"; import { fireEvent } from "../common/dom/fire_event"; import "./paper-time-input"; diff --git a/src/components/ha-yaml-editor.ts b/src/components/ha-yaml-editor.ts index f0eabb168..07a1ac0a0 100644 --- a/src/components/ha-yaml-editor.ts +++ b/src/components/ha-yaml-editor.ts @@ -1,12 +1,6 @@ import { safeDump, safeLoad } from "js-yaml"; -import { - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { fireEvent } from "../common/dom/fire_event"; import "./ha-code-editor"; diff --git a/src/components/map/ha-location-editor.ts b/src/components/map/ha-location-editor.ts index 8a7954cba..b731aaead 100644 --- a/src/components/map/ha-location-editor.ts +++ b/src/components/map/ha-location-editor.ts @@ -11,13 +11,12 @@ import { import { css, CSSResultGroup, - customElement, html, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, property } from "lit/decorators"; import { fireEvent } from "../../common/dom/fire_event"; import { LeafletModuleType, diff --git a/src/components/map/ha-locations-editor.ts b/src/components/map/ha-locations-editor.ts index 2dda00967..b0b800890 100644 --- a/src/components/map/ha-locations-editor.ts +++ b/src/components/map/ha-locations-editor.ts @@ -11,13 +11,12 @@ import { import { css, CSSResultGroup, - customElement, html, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, property } from "lit/decorators"; import { fireEvent } from "../../common/dom/fire_event"; import { LeafletModuleType, diff --git a/src/components/map/ha-map.ts b/src/components/map/ha-map.ts index 3e4df08b3..fd29d2a26 100644 --- a/src/components/map/ha-map.ts +++ b/src/components/map/ha-map.ts @@ -2,13 +2,12 @@ import { Circle, Layer, Map, Marker, TileLayer } from "leaflet"; import { css, CSSResultGroup, - customElement, html, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, property } from "lit/decorators"; import { LeafletModuleType, replaceTileLayer, diff --git a/src/components/media-player/dialog-media-player-browse.ts b/src/components/media-player/dialog-media-player-browse.ts index ba885213f..6e5a54d97 100644 --- a/src/components/media-player/dialog-media-player-browse.ts +++ b/src/components/media-player/dialog-media-player-browse.ts @@ -1,13 +1,5 @@ -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { fireEvent, HASSDomEvent } from "../../common/dom/fire_event"; import type { MediaPickedEvent, diff --git a/src/components/media-player/ha-media-player-browse.ts b/src/components/media-player/ha-media-player-browse.ts index 1c7e09352..db5b8af6b 100644 --- a/src/components/media-player/ha-media-player-browse.ts +++ b/src/components/media-player/ha-media-player-browse.ts @@ -8,19 +8,21 @@ import "@polymer/paper-tooltip/paper-tooltip"; import { css, CSSResultGroup, - customElement, - eventOptions, html, - state, LitElement, - property, PropertyValues, - query, TemplateResult, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; -import { ifDefined } from "lit-html/directives/if-defined"; -import { styleMap } from "lit-html/directives/style-map"; +} from "lit"; +import { + customElement, + property, + state, + query, + eventOptions, +} 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 { fireEvent } from "../../common/dom/fire_event"; import { computeRTLDirection } from "../../common/util/compute_rtl"; import { debounce } from "../../common/util/debounce"; diff --git a/src/components/state-history-charts.ts b/src/components/state-history-charts.ts index 20abd72ae..9be40220d 100644 --- a/src/components/state-history-charts.ts +++ b/src/components/state-history-charts.ts @@ -1,19 +1,18 @@ -import "./ha-circular-progress"; import { css, CSSResultGroup, - customElement, html, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, property } from "lit/decorators"; +import { isComponentLoaded } from "../common/config/is_component_loaded"; +import { HistoryResult } from "../data/history"; +import type { HomeAssistant } from "../types"; +import "./ha-circular-progress"; import "./state-history-chart-line"; import "./state-history-chart-timeline"; -import { isComponentLoaded } from "../common/config/is_component_loaded"; -import type { HomeAssistant } from "../types"; -import { HistoryResult } from "../data/history"; @customElement("state-history-charts") class StateHistoryCharts extends LitElement { diff --git a/src/components/trace/ha-timeline.ts b/src/components/trace/ha-timeline.ts index 4ce8b7b49..3ca99b56d 100644 --- a/src/components/trace/ha-timeline.ts +++ b/src/components/trace/ha-timeline.ts @@ -1,13 +1,6 @@ import { mdiCircleOutline } from "@mdi/js"; -import { - LitElement, - customElement, - html, - css, - property, - TemplateResult, - state, -} from "lit-element"; +import { css, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { buttonLinkStyle } from "../../resources/styles"; import "../ha-svg-icon"; diff --git a/src/components/trace/hat-graph-node.ts b/src/components/trace/hat-graph-node.ts index ae0b59aa8..5b0ba7ca6 100644 --- a/src/components/trace/hat-graph-node.ts +++ b/src/components/trace/hat-graph-node.ts @@ -1,5 +1,5 @@ -import { css, customElement, LitElement, property, svg } from "lit-element"; - +import { css, LitElement, svg } from "lit"; +import { customElement, property } from "lit/decorators"; import { NODE_SIZE, SPACING } from "./hat-graph"; @customElement("hat-graph-node") diff --git a/src/components/trace/hat-graph-spacer.ts b/src/components/trace/hat-graph-spacer.ts index 22c6770a1..e30c05bd5 100644 --- a/src/components/trace/hat-graph-spacer.ts +++ b/src/components/trace/hat-graph-spacer.ts @@ -1,5 +1,5 @@ -import { css, customElement, LitElement, property, svg } from "lit-element"; - +import { css, LitElement, svg } from "lit"; +import { customElement, property } from "lit/decorators"; import { NODE_SIZE, SPACING } from "./hat-graph"; @customElement("hat-graph-spacer") diff --git a/src/components/trace/hat-graph.ts b/src/components/trace/hat-graph.ts index c7e06ae66..93ecdf015 100644 --- a/src/components/trace/hat-graph.ts +++ b/src/components/trace/hat-graph.ts @@ -1,12 +1,6 @@ -import { - css, - customElement, - html, - LitElement, - property, - svg, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; +import { css, html, LitElement, svg } from "lit"; +import { customElement, property } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; export const BRANCH_HEIGHT = 20; export const SPACING = 10; diff --git a/src/components/trace/hat-logbook-note.ts b/src/components/trace/hat-logbook-note.ts index 5d5b1f9df..8df890bbf 100644 --- a/src/components/trace/hat-logbook-note.ts +++ b/src/components/trace/hat-logbook-note.ts @@ -1,4 +1,5 @@ -import { LitElement, css, html, customElement } from "lit-element"; +import { css, html, LitElement } from "lit"; +import { customElement } from "lit/decorators"; @customElement("hat-logbook-note") class HatLogbookNote extends LitElement { diff --git a/src/components/trace/hat-script-graph.ts b/src/components/trace/hat-script-graph.ts index 7b0755ee4..aff37a103 100644 --- a/src/components/trace/hat-script-graph.ts +++ b/src/components/trace/hat-script-graph.ts @@ -1,19 +1,4 @@ -import { - html, - LitElement, - property, - customElement, - PropertyValues, - css, -} from "lit-element"; import "@material/mwc-icon-button/mwc-icon-button"; -import { fireEvent } from "../../common/dom/fire_event"; -import "../ha-svg-icon"; -import { - AutomationTraceExtended, - ChooseActionTraceStep, - ConditionTraceStep, -} from "../../data/trace"; import { mdiAbTesting, mdiArrowUp, @@ -32,9 +17,11 @@ import { mdiTimerOutline, mdiTrafficLight, } from "@mdi/js"; -import "./hat-graph-node"; -import { classMap } from "lit-html/directives/class-map"; -import { NODE_SIZE, SPACING, NodeInfo } from "./hat-graph"; +import { css, html, LitElement, PropertyValues } from "lit"; +import { customElement, property } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; +import { fireEvent } from "../../common/dom/fire_event"; +import { ensureArray } from "../../common/ensure-array"; import { Condition, Trigger } from "../../data/automation"; import { Action, @@ -48,7 +35,14 @@ import { WaitAction, WaitForTriggerAction, } from "../../data/script"; -import { ensureArray } from "../../common/ensure-array"; +import { + AutomationTraceExtended, + ChooseActionTraceStep, + ConditionTraceStep, +} from "../../data/trace"; +import "../ha-svg-icon"; +import { NodeInfo, NODE_SIZE, SPACING } from "./hat-graph"; +import "./hat-graph-node"; import "./hat-graph-spacer"; declare global { diff --git a/src/components/trace/hat-trace-timeline.ts b/src/components/trace/hat-trace-timeline.ts index 67c4eb1f0..c56332f30 100644 --- a/src/components/trace/hat-trace-timeline.ts +++ b/src/components/trace/hat-trace-timeline.ts @@ -1,24 +1,3 @@ -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - PropertyValues, - TemplateResult, -} from "lit-element"; -import { formatDateTimeWithSeconds } from "../../common/datetime/format_date_time"; -import { - AutomationTraceExtended, - ChooseActionTraceStep, - getDataFromPath, - TriggerTraceStep, - isTriggerPath, -} from "../../data/trace"; -import { HomeAssistant } from "../../types"; -import "./ha-timeline"; -import type { HaTimeline } from "./ha-timeline"; import { mdiAlertCircle, mdiCircle, @@ -27,16 +6,36 @@ import { mdiProgressWrench, mdiRecordCircleOutline, } from "@mdi/js"; +import { + css, + CSSResultGroup, + html, + LitElement, + PropertyValues, + TemplateResult, +} from "lit"; +import { customElement, property } from "lit/decorators"; +import { ifDefined } from "lit/directives/if-defined"; +import { formatDateTimeWithSeconds } from "../../common/datetime/format_date_time"; +import relativeTime from "../../common/datetime/relative_time"; +import { fireEvent } from "../../common/dom/fire_event"; import { LogbookEntry } from "../../data/logbook"; import { ChooseAction, ChooseActionChoice, getActionType, } from "../../data/script"; -import relativeTime from "../../common/datetime/relative_time"; -import { fireEvent } from "../../common/dom/fire_event"; import { describeAction } from "../../data/script_i18n"; -import { ifDefined } from "lit-html/directives/if-defined"; +import { + AutomationTraceExtended, + ChooseActionTraceStep, + getDataFromPath, + isTriggerPath, + TriggerTraceStep, +} from "../../data/trace"; +import { HomeAssistant } from "../../types"; +import "./ha-timeline"; +import type { HaTimeline } from "./ha-timeline"; const LOGBOOK_ENTRIES_BEFORE_FOLD = 2; diff --git a/src/components/user/ha-person-badge.ts b/src/components/user/ha-person-badge.ts index 07cdd916a..9074ea7c9 100644 --- a/src/components/user/ha-person-badge.ts +++ b/src/components/user/ha-person-badge.ts @@ -1,14 +1,7 @@ -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; -import { styleMap } from "lit-html/directives/style-map"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; +import { styleMap } from "lit/directives/style-map"; import { Person } from "../../data/person"; import { computeInitials } from "./ha-user-badge"; diff --git a/src/components/user/ha-user-badge.ts b/src/components/user/ha-user-badge.ts index 3e5411d8d..86a7b9ea8 100644 --- a/src/components/user/ha-user-badge.ts +++ b/src/components/user/ha-user-badge.ts @@ -1,15 +1,7 @@ -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; -import { styleMap } from "lit-html/directives/style-map"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; +import { styleMap } from "lit/directives/style-map"; import { computeStateDomain } from "../../common/entity/compute_state_domain"; import { User } from "../../data/user"; import { CurrentUser, HomeAssistant } from "../../types"; diff --git a/src/components/user/ha-user-picker.ts b/src/components/user/ha-user-picker.ts index 9a028ad7c..89e779d3c 100644 --- a/src/components/user/ha-user-picker.ts +++ b/src/components/user/ha-user-picker.ts @@ -3,14 +3,8 @@ import "@polymer/paper-input/paper-input"; import "@polymer/paper-item/paper-icon-item"; import "@polymer/paper-item/paper-item-body"; import "@polymer/paper-listbox/paper-listbox"; -import { - css, - CSSResultGroup, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { property } from "lit/decorators"; import memoizeOne from "memoize-one"; import { fireEvent } from "../../common/dom/fire_event"; import { compare } from "../../common/string/compare"; diff --git a/src/components/user/ha-users-picker.ts b/src/components/user/ha-users-picker.ts index 886307f5f..d0420b82d 100644 --- a/src/components/user/ha-users-picker.ts +++ b/src/components/user/ha-users-picker.ts @@ -1,14 +1,7 @@ import { mdiClose } from "@mdi/js"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; -import { guard } from "lit-html/directives/guard"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; +import { guard } from "lit/directives/guard"; import memoizeOne from "memoize-one"; import { fireEvent } from "../../common/dom/fire_event"; import { fetchUsers, User } from "../../data/user"; diff --git a/src/data/automation_i18n.ts b/src/data/automation_i18n.ts index 8dc274655..c819ee340 100644 --- a/src/data/automation_i18n.ts +++ b/src/data/automation_i18n.ts @@ -1,4 +1,4 @@ -import { Trigger, Condition } from "./automation"; +import { Condition, Trigger } from "./automation"; export const describeTrigger = (trigger: Trigger) => `${trigger.platform} trigger`; diff --git a/src/data/script_i18n.ts b/src/data/script_i18n.ts index 3b20e1286..338cb7c23 100644 --- a/src/data/script_i18n.ts +++ b/src/data/script_i18n.ts @@ -7,13 +7,13 @@ import { Condition } from "./automation"; import { describeCondition, describeTrigger } from "./automation_i18n"; import { ActionType, - getActionType, - DelayAction, - SceneAction, - WaitForTriggerAction, ActionTypes, - VariablesAction, + DelayAction, EventAction, + getActionType, + SceneAction, + VariablesAction, + WaitForTriggerAction, } from "./script"; export const describeAction = ( diff --git a/src/data/trace.ts b/src/data/trace.ts index cf5f18e6c..a8d294454 100644 --- a/src/data/trace.ts +++ b/src/data/trace.ts @@ -1,5 +1,5 @@ import { strStartsWith } from "../common/string/starts-with"; -import { HomeAssistant, Context } from "../types"; +import { Context, HomeAssistant } from "../types"; import { BlueprintAutomationConfig, ManualAutomationConfig, diff --git a/src/data/weather.ts b/src/data/weather.ts index e15844c9f..3c27c1341 100644 --- a/src/data/weather.ts +++ b/src/data/weather.ts @@ -9,8 +9,8 @@ import { HassEntityAttributeBase, HassEntityBase, } from "home-assistant-js-websocket"; -import { css, html, svg, SVGTemplateResult, TemplateResult } from "lit-element"; -import { styleMap } from "lit-html/directives/style-map"; +import { css, html, svg, SVGTemplateResult, TemplateResult } from "lit"; +import { styleMap } from "lit/directives/style-map"; import { formatNumber } from "../common/string/format_number"; import "../components/ha-icon"; import "../components/ha-svg-icon"; diff --git a/src/dialogs/config-entry-system-options/dialog-config-entry-system-options.ts b/src/dialogs/config-entry-system-options/dialog-config-entry-system-options.ts index 442be2938..bd1f6bbcd 100644 --- a/src/dialogs/config-entry-system-options/dialog-config-entry-system-options.ts +++ b/src/dialogs/config-entry-system-options/dialog-config-entry-system-options.ts @@ -1,14 +1,6 @@ import "@material/mwc-button/mwc-button"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { fireEvent } from "../../common/dom/fire_event"; import { computeRTLDirection } from "../../common/util/compute_rtl"; import "../../components/ha-circular-progress"; diff --git a/src/dialogs/config-flow/dialog-data-entry-flow.ts b/src/dialogs/config-flow/dialog-data-entry-flow.ts index 86529c24d..abe31c81b 100644 --- a/src/dialogs/config-flow/dialog-data-entry-flow.ts +++ b/src/dialogs/config-flow/dialog-data-entry-flow.ts @@ -4,13 +4,12 @@ import type { UnsubscribeFunc } from "home-assistant-js-websocket"; import { css, CSSResultGroup, - customElement, html, - state, LitElement, PropertyValues, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, state } from "lit/decorators"; import { fireEvent } from "../../common/dom/fire_event"; import { computeRTL } from "../../common/util/compute_rtl"; import "../../components/ha-circular-progress"; @@ -41,9 +40,9 @@ import "./step-flow-create-entry"; import "./step-flow-external"; import "./step-flow-form"; import "./step-flow-loading"; +import "./step-flow-pick-flow"; import "./step-flow-pick-handler"; import "./step-flow-progress"; -import "./step-flow-pick-flow"; let instance = 0; diff --git a/src/dialogs/config-flow/show-dialog-config-flow.ts b/src/dialogs/config-flow/show-dialog-config-flow.ts index 207429fcf..fc49d0bf1 100644 --- a/src/dialogs/config-flow/show-dialog-config-flow.ts +++ b/src/dialogs/config-flow/show-dialog-config-flow.ts @@ -1,4 +1,4 @@ -import { html } from "lit-element"; +import { html } from "lit"; import { caseInsensitiveCompare } from "../../common/string/compare"; import { createConfigFlow, diff --git a/src/dialogs/config-flow/show-dialog-data-entry-flow.ts b/src/dialogs/config-flow/show-dialog-data-entry-flow.ts index 23c396137..1f48db7e7 100644 --- a/src/dialogs/config-flow/show-dialog-data-entry-flow.ts +++ b/src/dialogs/config-flow/show-dialog-data-entry-flow.ts @@ -1,4 +1,4 @@ -import { TemplateResult } from "lit-html"; +import { TemplateResult } from "lit"; import { fireEvent } from "../../common/dom/fire_event"; import { HaFormSchema } from "../../components/ha-form/ha-form"; import { diff --git a/src/dialogs/config-flow/show-dialog-options-flow.ts b/src/dialogs/config-flow/show-dialog-options-flow.ts index e2346c660..c13827292 100644 --- a/src/dialogs/config-flow/show-dialog-options-flow.ts +++ b/src/dialogs/config-flow/show-dialog-options-flow.ts @@ -1,4 +1,4 @@ -import { html } from "lit-element"; +import { html } from "lit"; import { ConfigEntry } from "../../data/config_entries"; import { createOptionsFlow, diff --git a/src/dialogs/config-flow/step-flow-abort.ts b/src/dialogs/config-flow/step-flow-abort.ts index 041e681e1..b581717f8 100644 --- a/src/dialogs/config-flow/step-flow-abort.ts +++ b/src/dialogs/config-flow/step-flow-abort.ts @@ -1,12 +1,6 @@ import "@material/mwc-button"; -import { - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import { fireEvent } from "../../common/dom/fire_event"; import { DataEntryFlowStepAbort } from "../../data/data_entry_flow"; import { HomeAssistant } from "../../types"; diff --git a/src/dialogs/config-flow/step-flow-create-entry.ts b/src/dialogs/config-flow/step-flow-create-entry.ts index 8ee662ba6..2d08078c8 100644 --- a/src/dialogs/config-flow/step-flow-create-entry.ts +++ b/src/dialogs/config-flow/step-flow-create-entry.ts @@ -2,15 +2,8 @@ import "@material/mwc-button"; import "@polymer/paper-dropdown-menu/paper-dropdown-menu-light"; import "@polymer/paper-item/paper-item"; import "@polymer/paper-listbox/paper-listbox"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import { fireEvent } from "../../common/dom/fire_event"; import "../../components/ha-area-picker"; import { DataEntryFlowStepCreateEntry } from "../../data/data_entry_flow"; diff --git a/src/dialogs/config-flow/step-flow-external.ts b/src/dialogs/config-flow/step-flow-external.ts index 28261e643..419d9bcde 100644 --- a/src/dialogs/config-flow/step-flow-external.ts +++ b/src/dialogs/config-flow/step-flow-external.ts @@ -1,13 +1,6 @@ import "@material/mwc-button"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import { DataEntryFlowStepExternal } from "../../data/data_entry_flow"; import { HomeAssistant } from "../../types"; import { FlowConfig } from "./show-dialog-data-entry-flow"; diff --git a/src/dialogs/config-flow/step-flow-form.ts b/src/dialogs/config-flow/step-flow-form.ts index f168cc68e..403eccb3c 100644 --- a/src/dialogs/config-flow/step-flow-form.ts +++ b/src/dialogs/config-flow/step-flow-form.ts @@ -3,13 +3,12 @@ import "@polymer/paper-tooltip/paper-tooltip"; import { css, CSSResultGroup, - customElement, html, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, property } from "lit/decorators"; import { fireEvent } from "../../common/dom/fire_event"; import "../../components/ha-circular-progress"; import "../../components/ha-form/ha-form"; diff --git a/src/dialogs/config-flow/step-flow-loading.ts b/src/dialogs/config-flow/step-flow-loading.ts index c8df08ae3..bc10d71c7 100644 --- a/src/dialogs/config-flow/step-flow-loading.ts +++ b/src/dialogs/config-flow/step-flow-loading.ts @@ -1,12 +1,5 @@ -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import "../../components/ha-circular-progress"; @customElement("step-flow-loading") diff --git a/src/dialogs/config-flow/step-flow-pick-flow.ts b/src/dialogs/config-flow/step-flow-pick-flow.ts index 94f4ae203..0e407fad8 100644 --- a/src/dialogs/config-flow/step-flow-pick-flow.ts +++ b/src/dialogs/config-flow/step-flow-pick-flow.ts @@ -1,15 +1,8 @@ -import "@polymer/paper-item/paper-icon-item"; import "@polymer/paper-item"; +import "@polymer/paper-item/paper-icon-item"; import "@polymer/paper-item/paper-item-body"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import { fireEvent } from "../../common/dom/fire_event"; import "../../components/ha-icon-next"; import { localizeConfigFlowTitle } from "../../data/config_flow"; diff --git a/src/dialogs/config-flow/step-flow-pick-handler.ts b/src/dialogs/config-flow/step-flow-pick-handler.ts index 4ab3e2eed..421478857 100644 --- a/src/dialogs/config-flow/step-flow-pick-handler.ts +++ b/src/dialogs/config-flow/step-flow-pick-handler.ts @@ -1,18 +1,10 @@ import "@polymer/paper-item/paper-icon-item"; import "@polymer/paper-item/paper-item-body"; import Fuse from "fuse.js"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; -import { styleMap } from "lit-html/directives/style-map"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; +import { styleMap } from "lit/directives/style-map"; import memoizeOne from "memoize-one"; import { fireEvent } from "../../common/dom/fire_event"; import "../../common/search/search-input"; diff --git a/src/dialogs/config-flow/step-flow-progress.ts b/src/dialogs/config-flow/step-flow-progress.ts index 347a178d9..3235ec55c 100644 --- a/src/dialogs/config-flow/step-flow-progress.ts +++ b/src/dialogs/config-flow/step-flow-progress.ts @@ -1,13 +1,6 @@ import "@material/mwc-button"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import "../../components/ha-circular-progress"; import { DataEntryFlowStepProgress } from "../../data/data_entry_flow"; import { HomeAssistant } from "../../types"; diff --git a/src/dialogs/config-flow/styles.ts b/src/dialogs/config-flow/styles.ts index b6e2b8d83..008fed7c1 100644 --- a/src/dialogs/config-flow/styles.ts +++ b/src/dialogs/config-flow/styles.ts @@ -1,4 +1,4 @@ -import { css } from "lit-element"; +import { css } from "lit"; export const configFlowContentStyles = css` h2 { diff --git a/src/dialogs/domain-toggler/dialog-domain-toggler.ts b/src/dialogs/domain-toggler/dialog-domain-toggler.ts index e07d2d9b4..82307abfe 100644 --- a/src/dialogs/domain-toggler/dialog-domain-toggler.ts +++ b/src/dialogs/domain-toggler/dialog-domain-toggler.ts @@ -1,13 +1,6 @@ import "@material/mwc-button/mwc-button"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, state } from "lit/decorators"; import { fireEvent } from "../../common/dom/fire_event"; import { createCloseHeading } from "../../components/ha-dialog"; import "../../components/ha-formfield"; diff --git a/src/dialogs/generic/dialog-box.ts b/src/dialogs/generic/dialog-box.ts index 5ccd33d19..e7e4bee7b 100644 --- a/src/dialogs/generic/dialog-box.ts +++ b/src/dialogs/generic/dialog-box.ts @@ -1,16 +1,8 @@ import "@material/mwc-button/mwc-button"; import "@polymer/paper-input/paper-input"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; import { fireEvent } from "../../common/dom/fire_event"; import "../../components/ha-dialog"; import "../../components/ha-switch"; diff --git a/src/dialogs/generic/show-dialog-box.ts b/src/dialogs/generic/show-dialog-box.ts index bd3210c5f..1350c91d1 100644 --- a/src/dialogs/generic/show-dialog-box.ts +++ b/src/dialogs/generic/show-dialog-box.ts @@ -1,4 +1,4 @@ -import { TemplateResult } from "lit-html"; +import { TemplateResult } from "lit"; import { fireEvent } from "../../common/dom/fire_event"; interface BaseDialogBoxParams { diff --git a/src/dialogs/image-cropper-dialog/image-cropper-dialog.ts b/src/dialogs/image-cropper-dialog/image-cropper-dialog.ts index 2571ae29f..f8709344e 100644 --- a/src/dialogs/image-cropper-dialog/image-cropper-dialog.ts +++ b/src/dialogs/image-cropper-dialog/image-cropper-dialog.ts @@ -5,17 +5,14 @@ import cropperCss from "cropperjs/dist/cropper.css"; import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, - query, TemplateResult, unsafeCSS, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; +} from "lit"; +import { customElement, property, state, query } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; import "../../components/ha-dialog"; import { haStyleDialog } from "../../resources/styles"; import type { HomeAssistant } from "../../types"; diff --git a/src/dialogs/more-info/controls/more-info-automation.ts b/src/dialogs/more-info/controls/more-info-automation.ts index cdd9fe772..0584b977e 100644 --- a/src/dialogs/more-info/controls/more-info-automation.ts +++ b/src/dialogs/more-info/controls/more-info-automation.ts @@ -1,14 +1,7 @@ import "@material/mwc-button"; import { HassEntity } from "home-assistant-js-websocket"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import "../../../components/ha-relative-time"; import { triggerAutomationActions } from "../../../data/automation"; import { UNAVAILABLE_STATES } from "../../../data/entity"; diff --git a/src/dialogs/more-info/controls/more-info-camera.ts b/src/dialogs/more-info/controls/more-info-camera.ts index 1dfcd4157..bc571b4bc 100644 --- a/src/dialogs/more-info/controls/more-info-camera.ts +++ b/src/dialogs/more-info/controls/more-info-camera.ts @@ -4,14 +4,13 @@ import { css, CSSResultGroup, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; -import { supportsFeature } from "../../../common/entity/supports-feature"; +} from "lit"; +import { property, state } from "lit/decorators"; import { isComponentLoaded } from "../../../common/config/is_component_loaded"; +import { supportsFeature } from "../../../common/entity/supports-feature"; import "../../../components/ha-camera-stream"; import { CameraEntity, diff --git a/src/dialogs/more-info/controls/more-info-climate.ts b/src/dialogs/more-info/controls/more-info-climate.ts index bd80dfc22..7d2193469 100644 --- a/src/dialogs/more-info/controls/more-info-climate.ts +++ b/src/dialogs/more-info/controls/more-info-climate.ts @@ -6,11 +6,11 @@ import { CSSResultGroup, html, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; +} from "lit"; +import { property } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; import { fireEvent } from "../../../common/dom/fire_event"; import { supportsFeature } from "../../../common/entity/supports-feature"; import { computeRTLDirection } from "../../../common/util/compute_rtl"; diff --git a/src/dialogs/more-info/controls/more-info-counter.ts b/src/dialogs/more-info/controls/more-info-counter.ts index fcdff2f78..3e08b0e52 100644 --- a/src/dialogs/more-info/controls/more-info-counter.ts +++ b/src/dialogs/more-info/controls/more-info-counter.ts @@ -1,14 +1,7 @@ import "@material/mwc-button"; import { HassEntity } from "home-assistant-js-websocket"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import { UNAVAILABLE_STATES } from "../../../data/entity"; import { HomeAssistant } from "../../../types"; diff --git a/src/dialogs/more-info/controls/more-info-default.ts b/src/dialogs/more-info/controls/more-info-default.ts index 443b39ed4..b30cc74a7 100644 --- a/src/dialogs/more-info/controls/more-info-default.ts +++ b/src/dialogs/more-info/controls/more-info-default.ts @@ -1,11 +1,6 @@ import { HassEntity } from "home-assistant-js-websocket"; -import { - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import "../../../components/ha-attributes"; import { HomeAssistant } from "../../../types"; diff --git a/src/dialogs/more-info/controls/more-info-fan.js b/src/dialogs/more-info/controls/more-info-fan.js index 93bbe5939..f7eb73e01 100644 --- a/src/dialogs/more-info/controls/more-info-fan.js +++ b/src/dialogs/more-info/controls/more-info-fan.js @@ -11,9 +11,9 @@ import "../../../components/ha-icon-button"; import "../../../components/ha-labeled-slider"; import "../../../components/ha-paper-dropdown-menu"; import "../../../components/ha-switch"; +import { SUPPORT_SET_SPEED } from "../../../data/fan"; import { EventsMixin } from "../../../mixins/events-mixin"; import LocalizeMixin from "../../../mixins/localize-mixin"; -import { SUPPORT_SET_SPEED } from "../../../data/fan"; /* * @appliesMixin EventsMixin diff --git a/src/dialogs/more-info/controls/more-info-group.ts b/src/dialogs/more-info/controls/more-info-group.ts index 597cf1d5a..c8b2e7bdb 100644 --- a/src/dialogs/more-info/controls/more-info-group.ts +++ b/src/dialogs/more-info/controls/more-info-group.ts @@ -2,12 +2,12 @@ import { HassEntity } from "home-assistant-js-websocket"; import { css, CSSResultGroup, - state, + html, LitElement, - property, PropertyValues, -} from "lit-element"; -import { html, TemplateResult } from "lit-html"; + TemplateResult, +} from "lit"; +import { property, state } from "lit/decorators"; import { dynamicElement } from "../../../common/dom/dynamic-element-directive"; import { computeStateDomain } from "../../../common/entity/compute_state_domain"; import { GroupEntity } from "../../../data/group"; diff --git a/src/dialogs/more-info/controls/more-info-humidifier.ts b/src/dialogs/more-info/controls/more-info-humidifier.ts index 7a118a252..43da799a1 100644 --- a/src/dialogs/more-info/controls/more-info-humidifier.ts +++ b/src/dialogs/more-info/controls/more-info-humidifier.ts @@ -6,11 +6,11 @@ import { CSSResultGroup, html, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; +} from "lit"; +import { property } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; import { fireEvent } from "../../../common/dom/fire_event"; import { supportsFeature } from "../../../common/entity/supports-feature"; import { computeRTLDirection } from "../../../common/util/compute_rtl"; diff --git a/src/dialogs/more-info/controls/more-info-light.ts b/src/dialogs/more-info/controls/more-info-light.ts index 1dffd398a..f4d963a41 100644 --- a/src/dialogs/more-info/controls/more-info-light.ts +++ b/src/dialogs/more-info/controls/more-info-light.ts @@ -3,16 +3,15 @@ import "@polymer/paper-listbox/paper-listbox"; import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, property, state } from "lit/decorators"; import { supportsFeature } from "../../../common/entity/supports-feature"; import "../../../components/ha-attributes"; +import "../../../components/ha-button-toggle-group"; import "../../../components/ha-color-picker"; import "../../../components/ha-icon-button"; import "../../../components/ha-labeled-slider"; @@ -28,7 +27,6 @@ import { SUPPORT_EFFECT, } from "../../../data/light"; import type { HomeAssistant } from "../../../types"; -import "../../../components/ha-button-toggle-group"; const toggleButtons = [ { label: "Color", value: "color" }, diff --git a/src/dialogs/more-info/controls/more-info-media_player.ts b/src/dialogs/more-info/controls/more-info-media_player.ts index c617a8f76..89bb143d3 100644 --- a/src/dialogs/more-info/controls/more-info-media_player.ts +++ b/src/dialogs/more-info/controls/more-info-media_player.ts @@ -4,16 +4,8 @@ import { mdiPlayBoxMultiple } from "@mdi/js"; import "@polymer/paper-input/paper-input"; import "@polymer/paper-item/paper-item"; import "@polymer/paper-listbox/paper-listbox"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - query, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, query } from "lit/decorators"; import { isComponentLoaded } from "../../../common/config/is_component_loaded"; import { supportsFeature } from "../../../common/entity/supports-feature"; import { computeRTLDirection } from "../../../common/util/compute_rtl"; diff --git a/src/dialogs/more-info/controls/more-info-person.ts b/src/dialogs/more-info/controls/more-info-person.ts index 57e8e3847..f1b610d26 100644 --- a/src/dialogs/more-info/controls/more-info-person.ts +++ b/src/dialogs/more-info/controls/more-info-person.ts @@ -1,14 +1,7 @@ import "@material/mwc-button"; import { HassEntity } from "home-assistant-js-websocket"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import memoizeOne from "memoize-one"; import { fireEvent } from "../../../common/dom/fire_event"; import "../../../components/ha-attributes"; diff --git a/src/dialogs/more-info/controls/more-info-remote.ts b/src/dialogs/more-info/controls/more-info-remote.ts index e144094c8..c8e9c8b77 100644 --- a/src/dialogs/more-info/controls/more-info-remote.ts +++ b/src/dialogs/more-info/controls/more-info-remote.ts @@ -1,14 +1,7 @@ import "@polymer/paper-item/paper-item"; import "@polymer/paper-listbox/paper-listbox"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import { supportsFeature } from "../../../common/entity/supports-feature"; import "../../../components/ha-attributes"; import "../../../components/ha-paper-dropdown-menu"; diff --git a/src/dialogs/more-info/controls/more-info-script.ts b/src/dialogs/more-info/controls/more-info-script.ts index 61005dda6..39ce62214 100644 --- a/src/dialogs/more-info/controls/more-info-script.ts +++ b/src/dialogs/more-info/controls/more-info-script.ts @@ -1,13 +1,6 @@ import { HassEntity } from "home-assistant-js-websocket"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import "../../../components/ha-relative-time"; import { HomeAssistant } from "../../../types"; diff --git a/src/dialogs/more-info/controls/more-info-sun.ts b/src/dialogs/more-info/controls/more-info-sun.ts index 9f8b49d71..9de886b61 100644 --- a/src/dialogs/more-info/controls/more-info-sun.ts +++ b/src/dialogs/more-info/controls/more-info-sun.ts @@ -1,13 +1,6 @@ import { HassEntity } from "home-assistant-js-websocket"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import { formatTime } from "../../../common/datetime/format_time"; import { formatNumber } from "../../../common/string/format_number"; import "../../../components/ha-relative-time"; diff --git a/src/dialogs/more-info/controls/more-info-timer.ts b/src/dialogs/more-info/controls/more-info-timer.ts index a9b07bfb8..92d06002b 100644 --- a/src/dialogs/more-info/controls/more-info-timer.ts +++ b/src/dialogs/more-info/controls/more-info-timer.ts @@ -1,13 +1,6 @@ import "@material/mwc-button"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import "../../../components/ha-attributes"; import { TimerEntity } from "../../../data/timer"; import { HomeAssistant } from "../../../types"; diff --git a/src/dialogs/more-info/controls/more-info-vacuum.ts b/src/dialogs/more-info/controls/more-info-vacuum.ts index 99716e91a..ca6a5fb73 100644 --- a/src/dialogs/more-info/controls/more-info-vacuum.ts +++ b/src/dialogs/more-info/controls/more-info-vacuum.ts @@ -1,14 +1,7 @@ import "@polymer/paper-item/paper-item"; import "@polymer/paper-listbox/paper-listbox"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import { supportsFeature } from "../../../common/entity/supports-feature"; import "../../../components/ha-attributes"; import "../../../components/ha-icon"; diff --git a/src/dialogs/more-info/controls/more-info-weather.ts b/src/dialogs/more-info/controls/more-info-weather.ts index dc4a52998..3b69a35a7 100644 --- a/src/dialogs/more-info/controls/more-info-weather.ts +++ b/src/dialogs/more-info/controls/more-info-weather.ts @@ -23,12 +23,12 @@ import { HassEntity } from "home-assistant-js-websocket"; import { css, CSSResultGroup, - customElement, + html, LitElement, - property, PropertyValues, -} from "lit-element"; -import { html, TemplateResult } from "lit-html"; + TemplateResult, +} from "lit"; +import { customElement, property } from "lit/decorators"; import { formatDateWeekday } from "../../../common/datetime/format_date"; import { formatTimeWeekday } from "../../../common/datetime/format_time"; import { formatNumber } from "../../../common/string/format_number"; diff --git a/src/dialogs/more-info/ha-more-info-dialog.ts b/src/dialogs/more-info/ha-more-info-dialog.ts index 493c04f24..ff89f71c8 100644 --- a/src/dialogs/more-info/ha-more-info-dialog.ts +++ b/src/dialogs/more-info/ha-more-info-dialog.ts @@ -3,15 +3,9 @@ import "@material/mwc-icon-button"; import "@material/mwc-tab"; import "@material/mwc-tab-bar"; import { mdiClose, mdiCog, mdiPencil } from "@mdi/js"; -import { - css, - customElement, - html, - state, - LitElement, - property, -} from "lit-element"; -import { cache } from "lit-html/directives/cache"; +import { css, html, LitElement } from "lit"; +import { customElement, property, state } from "lit/decorators"; +import { cache } from "lit/directives/cache"; import { isComponentLoaded } from "../../common/config/is_component_loaded"; import { DOMAINS_MORE_INFO_NO_HISTORY, @@ -31,11 +25,11 @@ import { haStyleDialog } from "../../resources/styles"; import "../../state-summary/state-card-content"; import { HomeAssistant } from "../../types"; import { showConfirmationDialog } from "../generic/show-dialog-box"; +import { replaceDialog } from "../make-dialog-manager"; import "./controls/more-info-default"; import "./ha-more-info-history"; import "./ha-more-info-logbook"; import "./more-info-content"; -import { replaceDialog } from "../make-dialog-manager"; const DOMAINS_NO_INFO = ["camera", "configurator"]; /** diff --git a/src/dialogs/more-info/ha-more-info-history.ts b/src/dialogs/more-info/ha-more-info-history.ts index 2374ccd7e..6dcb3144d 100644 --- a/src/dialogs/more-info/ha-more-info-history.ts +++ b/src/dialogs/more-info/ha-more-info-history.ts @@ -1,12 +1,5 @@ -import { - customElement, - html, - state, - LitElement, - property, - PropertyValues, - TemplateResult, -} from "lit-element"; +import { html, LitElement, PropertyValues, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { isComponentLoaded } from "../../common/config/is_component_loaded"; import { throttle } from "../../common/util/throttle"; import "../../components/state-history-charts"; diff --git a/src/dialogs/more-info/ha-more-info-logbook.ts b/src/dialogs/more-info/ha-more-info-logbook.ts index 2af0eb69f..16f6097d8 100644 --- a/src/dialogs/more-info/ha-more-info-logbook.ts +++ b/src/dialogs/more-info/ha-more-info-logbook.ts @@ -1,24 +1,16 @@ -import { - css, - customElement, - html, - state, - LitElement, - property, - PropertyValues, - TemplateResult, -} from "lit-element"; +import { css, html, LitElement, PropertyValues, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { isComponentLoaded } from "../../common/config/is_component_loaded"; -import { closeDialog } from "../make-dialog-manager"; import { computeStateDomain } from "../../common/entity/compute_state_domain"; import { throttle } from "../../common/util/throttle"; import "../../components/ha-circular-progress"; import "../../components/state-history-charts"; -import { TraceContexts, loadTraceContexts } from "../../data/trace"; import { getLogbookData, LogbookEntry } from "../../data/logbook"; +import { loadTraceContexts, TraceContexts } from "../../data/trace"; import "../../panels/logbook/ha-logbook"; import { haStyle, haStyleScrollbar } from "../../resources/styles"; import { HomeAssistant } from "../../types"; +import { closeDialog } from "../make-dialog-manager"; @customElement("ha-more-info-logbook") export class MoreInfoLogbook extends LitElement { diff --git a/src/dialogs/more-info/more-info-content.ts b/src/dialogs/more-info/more-info-content.ts index 0c5ddab96..218520643 100644 --- a/src/dialogs/more-info/more-info-content.ts +++ b/src/dialogs/more-info/more-info-content.ts @@ -1,5 +1,6 @@ import { HassEntity } from "home-assistant-js-websocket"; -import { property, PropertyValues, ReactiveElement } from "lit-element"; +import { PropertyValues, ReactiveElement } from "lit"; +import { property } from "lit/decorators"; import dynamicContentUpdater from "../../common/dom/dynamic_content_updater"; import { importMoreInfoControl } from "../../panels/lovelace/custom-card-helpers"; import { HomeAssistant } from "../../types"; diff --git a/src/dialogs/notifications/configurator-notification-item.ts b/src/dialogs/notifications/configurator-notification-item.ts index eb998f76b..0ea19c065 100644 --- a/src/dialogs/notifications/configurator-notification-item.ts +++ b/src/dialogs/notifications/configurator-notification-item.ts @@ -1,11 +1,6 @@ import "@material/mwc-button"; -import { - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import { fireEvent } from "../../common/dom/fire_event"; import { computeStateDisplay } from "../../common/entity/compute_state_display"; import { domainToName } from "../../data/integration"; diff --git a/src/dialogs/notifications/notification-item-template.ts b/src/dialogs/notifications/notification-item-template.ts index 28fb98678..8f6528550 100644 --- a/src/dialogs/notifications/notification-item-template.ts +++ b/src/dialogs/notifications/notification-item-template.ts @@ -1,11 +1,5 @@ -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement } from "lit/decorators"; import "../../components/ha-card"; @customElement("notification-item-template") diff --git a/src/dialogs/notifications/notification-item.ts b/src/dialogs/notifications/notification-item.ts index 41207b1db..dfe95fdc7 100644 --- a/src/dialogs/notifications/notification-item.ts +++ b/src/dialogs/notifications/notification-item.ts @@ -1,12 +1,6 @@ import { HassEntity } from "home-assistant-js-websocket"; -import { - customElement, - html, - LitElement, - property, - PropertyValues, - TemplateResult, -} from "lit-element"; +import { html, LitElement, PropertyValues, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import { PersistentNotification } from "../../data/persistent_notification"; import { HomeAssistant } from "../../types"; import "./configurator-notification-item"; diff --git a/src/dialogs/notifications/persistent-notification-item.ts b/src/dialogs/notifications/persistent-notification-item.ts index cb66b0fad..c7a38d264 100644 --- a/src/dialogs/notifications/persistent-notification-item.ts +++ b/src/dialogs/notifications/persistent-notification-item.ts @@ -1,14 +1,7 @@ import "@material/mwc-button"; import "@polymer/paper-tooltip/paper-tooltip"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import { formatDateTime } from "../../common/datetime/format_date_time"; import "../../components/ha-markdown"; import "../../components/ha-relative-time"; diff --git a/src/dialogs/quick-bar/ha-quick-bar.ts b/src/dialogs/quick-bar/ha-quick-bar.ts index b398a9759..ea8c9e2e9 100644 --- a/src/dialogs/quick-bar/ha-quick-bar.ts +++ b/src/dialogs/quick-bar/ha-quick-bar.ts @@ -1,3 +1,4 @@ +import { Layout1d, scroll } from "@lit-labs/virtualizer"; import "@material/mwc-list/mwc-list"; import type { List } from "@material/mwc-list/mwc-list"; import { SingleSelectedEvent } from "@material/mwc-list/mwc-list-foundation"; @@ -11,18 +12,10 @@ import { mdiReload, mdiServerNetwork, } from "@mdi/js"; -import { - css, - customElement, - html, - state, - LitElement, - property, - query, -} from "lit-element"; -import { ifDefined } from "lit-html/directives/if-defined"; -import { styleMap } from "lit-html/directives/style-map"; -import { scroll } from "lit-virtualizer"; +import { css, html, LitElement } from "lit"; +import { customElement, property, query, state } from "lit/decorators"; +import { ifDefined } from "lit/directives/if-defined"; +import { styleMap } from "lit/directives/style-map"; import memoizeOne from "memoize-one"; import { canShowPage } from "../../common/config/can_show_page"; import { componentsWithService } from "../../common/config/components_with_service"; @@ -38,6 +31,7 @@ import { ScorableTextItem, } from "../../common/string/filter/sequence-matching"; import { debounce } from "../../common/util/debounce"; +import "../../components/ha-chip"; import "../../components/ha-circular-progress"; import "../../components/ha-dialog"; import "../../components/ha-header-bar"; @@ -52,7 +46,6 @@ import { showConfirmationDialog, } from "../generic/show-dialog-box"; import { QuickBarParams } from "./show-dialog-quick-bar"; -import "../../components/ha-chip"; interface QuickBarItem extends ScorableTextItem { primaryText: string; @@ -194,7 +187,9 @@ export class QuickBar extends LitElement { > ${scroll({ items, - renderItem: (item: QuickBarItem, index?: number) => + layout: Layout1d, + // @ts-expect-error + renderItem: (item: QuickBarItem, index) => this._renderItem(item, index), })} `} 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 62e9ae5c9..f4cf783ad 100644 --- a/src/dialogs/voice-command-dialog/ha-voice-command-dialog.ts +++ b/src/dialogs/voice-command-dialog/ha-voice-command-dialog.ts @@ -5,16 +5,13 @@ import type { PaperInputElement } from "@polymer/paper-input/paper-input"; import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, - query, TemplateResult, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; +} from "lit"; +import { customElement, property, state, query } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; import { fireEvent } from "../../common/dom/fire_event"; import { SpeechRecognition } from "../../common/dom/speech-recognition"; import { uid } from "../../common/util/uid"; diff --git a/src/entrypoints/custom-panel.ts b/src/entrypoints/custom-panel.ts index 28b068fad..856946d33 100644 --- a/src/entrypoints/custom-panel.ts +++ b/src/entrypoints/custom-panel.ts @@ -1,18 +1,19 @@ // Compat needs to be first import import "../resources/compatibility"; +import "../resources/safari-14-attachshadow-patch"; + import { PolymerElement } from "@polymer/polymer"; +import { CSSResult } from "lit"; import { fireEvent } from "../common/dom/fire_event"; +import { isNavigationClick } from "../common/dom/is-navigation-click"; import { loadJS } from "../common/dom/load_resource"; import { webComponentsSupported } from "../common/feature-detect/support-web-components"; +import { navigate } from "../common/navigate"; import { CustomPanelInfo } from "../data/panel_custom"; -import "../resources/safari-14-attachshadow-patch"; +import { baseEntrypointStyles } from "../resources/styles"; import { createCustomPanelElement } from "../util/custom-panel/create-custom-panel-element"; import { loadCustomPanel } from "../util/custom-panel/load-custom-panel"; import { setCustomPanelProperties } from "../util/custom-panel/set-custom-panel-properties"; -import { baseEntrypointStyles } from "../resources/styles"; -import { CSSResult } from "lit-element"; -import { isNavigationClick } from "../common/dom/is-navigation-click"; -import { navigate } from "../common/navigate"; declare global { interface Window { diff --git a/src/entrypoints/service_worker.ts b/src/entrypoints/service_worker.ts index 0748a15e1..e3f141fa5 100644 --- a/src/entrypoints/service_worker.ts +++ b/src/entrypoints/service_worker.ts @@ -2,7 +2,9 @@ // eslint-disable-next-line spaced-comment /// /* eslint-env serviceworker */ +import { CacheableResponsePlugin } from "workbox-cacheable-response"; import { cacheNames, RouteHandler } from "workbox-core"; +import { ExpirationPlugin } from "workbox-expiration"; import { cleanupOutdatedCaches, precacheAndRoute } from "workbox-precaching"; import { registerRoute, setCatchHandler } from "workbox-routing"; import { @@ -10,8 +12,6 @@ import { NetworkOnly, StaleWhileRevalidate, } from "workbox-strategies"; -import { CacheableResponsePlugin } from "workbox-cacheable-response"; -import { ExpirationPlugin } from "workbox-expiration"; const noFallBackRegEx = new RegExp( "/(api|static|auth|frontend_latest|frontend_es5|local)/.*" diff --git a/src/fake_data/provide_hass.ts b/src/fake_data/provide_hass.ts index e74cb6915..6249f441f 100644 --- a/src/fake_data/provide_hass.ts +++ b/src/fake_data/provide_hass.ts @@ -8,7 +8,7 @@ import { DEFAULT_PANEL } from "../data/panel"; import { NumberFormat } from "../data/translation"; import { translationMetadata } from "../resources/translations-metadata"; import { HomeAssistant } from "../types"; -import { getTranslation, getLocalLanguage } from "../util/hass-translation"; +import { getLocalLanguage, getTranslation } from "../util/hass-translation"; import { demoConfig } from "./demo_config"; import { demoPanels } from "./demo_panels"; import { demoServices } from "./demo_services"; diff --git a/src/layouts/ha-init-page.ts b/src/layouts/ha-init-page.ts index 0d657ec30..0a4e730fd 100644 --- a/src/layouts/ha-init-page.ts +++ b/src/layouts/ha-init-page.ts @@ -1,5 +1,6 @@ import "@material/mwc-button"; -import { css, CSSResultGroup, html, LitElement, property } from "lit-element"; +import { css, CSSResultGroup, html, LitElement } from "lit"; +import { property } from "lit/decorators"; import "../components/ha-circular-progress"; import { removeInitSkeleton } from "../util/init-skeleton"; diff --git a/src/layouts/hass-error-screen.ts b/src/layouts/hass-error-screen.ts index e80a37e0e..de0b3f1fc 100644 --- a/src/layouts/hass-error-screen.ts +++ b/src/layouts/hass-error-screen.ts @@ -1,16 +1,9 @@ import "@material/mwc-button"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; -import { HomeAssistant } from "../types"; -import "../components/ha-menu-button"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import "../components/ha-icon-button-arrow-prev"; +import "../components/ha-menu-button"; +import { HomeAssistant } from "../types"; @customElement("hass-error-screen") class HassErrorScreen extends LitElement { diff --git a/src/layouts/hass-loading-screen.ts b/src/layouts/hass-loading-screen.ts index d2f08eb69..529659ba0 100644 --- a/src/layouts/hass-loading-screen.ts +++ b/src/layouts/hass-loading-screen.ts @@ -1,13 +1,6 @@ import "@polymer/app-layout/app-toolbar/app-toolbar"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import "../components/ha-circular-progress"; import "../components/ha-icon-button-arrow-prev"; import "../components/ha-menu-button"; diff --git a/src/layouts/hass-router-page.ts b/src/layouts/hass-router-page.ts index 4c8876603..17ed986ee 100644 --- a/src/layouts/hass-router-page.ts +++ b/src/layouts/hass-router-page.ts @@ -1,4 +1,5 @@ -import { property, PropertyValues, ReactiveElement } from "lit-element"; +import { PropertyValues, ReactiveElement } from "lit"; +import { property } from "lit/decorators"; import memoizeOne from "memoize-one"; import { navigate } from "../common/navigate"; import { Route } from "../types"; diff --git a/src/layouts/hass-subpage.ts b/src/layouts/hass-subpage.ts index 1b100c389..58c4c376a 100644 --- a/src/layouts/hass-subpage.ts +++ b/src/layouts/hass-subpage.ts @@ -1,13 +1,5 @@ -import { - css, - CSSResultGroup, - customElement, - eventOptions, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, eventOptions, property } from "lit/decorators"; import { restoreScroll } from "../common/decorators/restore-scroll"; import "../components/ha-icon-button-arrow-prev"; import "../components/ha-menu-button"; diff --git a/src/layouts/hass-tabs-subpage-data-table.ts b/src/layouts/hass-tabs-subpage-data-table.ts index de56e096c..5ecfa2b72 100644 --- a/src/layouts/hass-tabs-subpage-data-table.ts +++ b/src/layouts/hass-tabs-subpage-data-table.ts @@ -1,18 +1,10 @@ import "@material/mwc-button/mwc-button"; import { mdiFilterVariant } from "@mdi/js"; import "@polymer/paper-tooltip/paper-tooltip"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - query, - TemplateResult, -} from "lit-element"; -import { LocalizeFunc } from "../common/translations/localize"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, query } from "lit/decorators"; import { fireEvent } from "../common/dom/fire_event"; +import { LocalizeFunc } from "../common/translations/localize"; import { computeRTLDirection } from "../common/util/compute_rtl"; import "../components/data-table/ha-data-table"; import type { diff --git a/src/layouts/hass-tabs-subpage.ts b/src/layouts/hass-tabs-subpage.ts index 9b77850e4..e7b787a0a 100644 --- a/src/layouts/hass-tabs-subpage.ts +++ b/src/layouts/hass-tabs-subpage.ts @@ -2,16 +2,13 @@ import "@material/mwc-ripple"; import { css, CSSResultGroup, - customElement, - eventOptions, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; +} from "lit"; +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"; diff --git a/src/layouts/home-assistant-main.ts b/src/layouts/home-assistant-main.ts index 78e0630db..add8b5c4c 100644 --- a/src/layouts/home-assistant-main.ts +++ b/src/layouts/home-assistant-main.ts @@ -5,14 +5,12 @@ import type { AppDrawerElement } from "@polymer/app-layout/app-drawer/app-drawer import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, property, state } from "lit/decorators"; import { fireEvent, HASSDomEvent } from "../common/dom/fire_event"; import { listenMediaQuery } from "../common/dom/media_query"; import { toggleAttribute } from "../common/dom/toggle_attribute"; diff --git a/src/layouts/home-assistant.ts b/src/layouts/home-assistant.ts index bbe799862..1499e9a88 100644 --- a/src/layouts/home-assistant.ts +++ b/src/layouts/home-assistant.ts @@ -1,5 +1,6 @@ -import { customElement, html, state, PropertyValues } from "lit-element"; import { isNavigationClick } from "../common/dom/is-navigation-click"; +import { html, PropertyValues } from "lit"; +import { customElement, state } from "lit/decorators"; import { navigate } from "../common/navigate"; import { getStorageDefaultPanelUrlPath } from "../data/panel"; import "../resources/custom-card-support"; @@ -45,7 +46,7 @@ export class HomeAssistantAppEl extends QuickBarMixin(HassElement) { protected firstUpdated(changedProps) { super.firstUpdated(changedProps); - this._initialize(); + this._initializeHass(); setTimeout(() => registerServiceWorker(this), 1000); /* polyfill for paper-dropdown */ import("web-animations-js/web-animations-next-lite.min"); @@ -145,7 +146,7 @@ export class HomeAssistantAppEl extends QuickBarMixin(HassElement) { } } - protected async _initialize() { + protected async _initializeHass() { try { let result; diff --git a/src/layouts/partial-panel-resolver.ts b/src/layouts/partial-panel-resolver.ts index cbc3cdfef..454db3336 100644 --- a/src/layouts/partial-panel-resolver.ts +++ b/src/layouts/partial-panel-resolver.ts @@ -4,7 +4,8 @@ import { STATE_RUNNING, STATE_STARTING, } from "home-assistant-js-websocket"; -import { customElement, property, PropertyValues } from "lit-element"; +import { PropertyValues } from "lit"; +import { customElement, property } from "lit/decorators"; import { deepActiveElement } from "../common/dom/deep-active-element"; import { deepEqual } from "../common/util/deep-equal"; import { getDefaultPanel } from "../data/panel"; diff --git a/src/layouts/supervisor-error-screen.ts b/src/layouts/supervisor-error-screen.ts index 7d35f95e7..34ab82fdf 100644 --- a/src/layouts/supervisor-error-screen.ts +++ b/src/layouts/supervisor-error-screen.ts @@ -1,20 +1,19 @@ -import "../components/ha-card"; import "@material/mwc-button"; import { css, CSSResultGroup, - customElement, html, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; -import { HomeAssistant } from "../types"; +} from "lit"; +import { customElement, property } from "lit/decorators"; +import { atLeastVersion } from "../common/config/version"; +import { applyThemesOnElement } from "../common/dom/apply_themes_on_element"; +import "../components/ha-card"; import "../resources/ha-style"; import { haStyle } from "../resources/styles"; -import { applyThemesOnElement } from "../common/dom/apply_themes_on_element"; -import { atLeastVersion } from "../common/config/version"; +import { HomeAssistant } from "../types"; import "./hass-subpage"; @customElement("supervisor-error-screen") diff --git a/src/managers/notification-manager.ts b/src/managers/notification-manager.ts index 8c3de2c80..7eb9b410c 100644 --- a/src/managers/notification-manager.ts +++ b/src/managers/notification-manager.ts @@ -1,14 +1,6 @@ import "@material/mwc-button"; -import { - css, - CSSResultGroup, - html, - state, - LitElement, - property, - query, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { property, state, query } from "lit/decorators"; import { computeRTL } from "../common/util/compute_rtl"; import "../components/ha-toast"; import type { HaToast } from "../components/ha-toast"; diff --git a/src/mixins/keyboard-shortcut-mixin.ts b/src/mixins/keyboard-shortcut-mixin.ts index 359f386dc..c319135b9 100644 --- a/src/mixins/keyboard-shortcut-mixin.ts +++ b/src/mixins/keyboard-shortcut-mixin.ts @@ -1,4 +1,4 @@ -import { LitElement } from "lit-element"; +import { LitElement } from "lit"; import { Constructor } from "../types"; export const KeyboardShortcutMixin = >( diff --git a/src/mixins/lit-localize-lite-mixin.ts b/src/mixins/lit-localize-lite-mixin.ts index cc723a36a..c9751e183 100644 --- a/src/mixins/lit-localize-lite-mixin.ts +++ b/src/mixins/lit-localize-lite-mixin.ts @@ -1,7 +1,8 @@ -import { LitElement, property, PropertyValues } from "lit-element"; +import { LitElement, PropertyValues } from "lit"; +import { property } from "lit/decorators"; import { computeLocalize, LocalizeFunc } from "../common/translations/localize"; import { Constructor, Resources } from "../types"; -import { getTranslation, getLocalLanguage } from "../util/hass-translation"; +import { getLocalLanguage, getTranslation } from "../util/hass-translation"; const empty = () => ""; diff --git a/src/mixins/provide-hass-lit-mixin.ts b/src/mixins/provide-hass-lit-mixin.ts index 8ebe9ebc1..361d4e281 100644 --- a/src/mixins/provide-hass-lit-mixin.ts +++ b/src/mixins/provide-hass-lit-mixin.ts @@ -1,4 +1,4 @@ -import { PropertyValues, ReactiveElement } from "lit-element"; +import { PropertyValues, ReactiveElement } from "lit"; import { Constructor, HomeAssistant } from "../types"; export interface ProvideHassElement { diff --git a/src/mixins/subscribe-mixin.ts b/src/mixins/subscribe-mixin.ts index e10473778..701d52417 100644 --- a/src/mixins/subscribe-mixin.ts +++ b/src/mixins/subscribe-mixin.ts @@ -1,5 +1,6 @@ import { UnsubscribeFunc } from "home-assistant-js-websocket"; -import { property, PropertyValues, ReactiveElement } from "lit-element"; +import { PropertyValues, ReactiveElement } from "lit"; +import { property } from "lit/decorators"; import { Constructor, HomeAssistant } from "../types"; export interface HassSubscribeElement { diff --git a/src/onboarding/action-badge.ts b/src/onboarding/action-badge.ts index c9f516084..e97c9c5bd 100644 --- a/src/onboarding/action-badge.ts +++ b/src/onboarding/action-badge.ts @@ -1,12 +1,5 @@ -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import "../components/ha-icon"; @customElement("action-badge") diff --git a/src/onboarding/ha-onboarding.ts b/src/onboarding/ha-onboarding.ts index ea13d7c61..2a7c66bd9 100644 --- a/src/onboarding/ha-onboarding.ts +++ b/src/onboarding/ha-onboarding.ts @@ -5,14 +5,9 @@ import { getAuth, subscribeConfig, } from "home-assistant-js-websocket"; -import { - customElement, - html, - state, - property, - PropertyValues, - TemplateResult, -} from "lit-element"; +import { html, PropertyValues, TemplateResult } 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 { extractSearchParamsObject } from "../common/url/search-params"; import { subscribeOne } from "../common/util/subscribe-one"; @@ -29,10 +24,9 @@ import { litLocalizeLiteMixin } from "../mixins/lit-localize-lite-mixin"; import { HassElement } from "../state/hass-element"; import { HomeAssistant } from "../types"; import { registerServiceWorker } from "../util/register-service-worker"; +import "./onboarding-analytics"; import "./onboarding-create-user"; import "./onboarding-loading"; -import "./onboarding-analytics"; -import { applyThemesOnElement } from "../common/dom/apply_themes_on_element"; type OnboardingEvent = | { diff --git a/src/onboarding/integration-badge.ts b/src/onboarding/integration-badge.ts index b03acb8b0..7958ca708 100644 --- a/src/onboarding/integration-badge.ts +++ b/src/onboarding/integration-badge.ts @@ -1,12 +1,5 @@ -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import "../components/ha-icon"; import { brandsUrl } from "../util/brands-url"; diff --git a/src/onboarding/onboarding-analytics.ts b/src/onboarding/onboarding-analytics.ts index b22173a73..60783b95f 100644 --- a/src/onboarding/onboarding-analytics.ts +++ b/src/onboarding/onboarding-analytics.ts @@ -1,14 +1,6 @@ import "@material/mwc-button/mwc-button"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { fireEvent } from "../common/dom/fire_event"; import { LocalizeFunc } from "../common/translations/localize"; import "../components/ha-analytics"; diff --git a/src/onboarding/onboarding-core-config.ts b/src/onboarding/onboarding-core-config.ts index 7a3380229..f1bc58a83 100644 --- a/src/onboarding/onboarding-core-config.ts +++ b/src/onboarding/onboarding-core-config.ts @@ -3,16 +3,8 @@ import "@polymer/paper-input/paper-input"; import type { PaperInputElement } from "@polymer/paper-input/paper-input"; import "@polymer/paper-radio-button/paper-radio-button"; import "@polymer/paper-radio-group/paper-radio-group"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { fireEvent } from "../common/dom/fire_event"; import type { LocalizeFunc } from "../common/translations/localize"; import "../components/map/ha-location-editor"; diff --git a/src/onboarding/onboarding-create-user.ts b/src/onboarding/onboarding-create-user.ts index 64250f91c..c0c23aafd 100644 --- a/src/onboarding/onboarding-create-user.ts +++ b/src/onboarding/onboarding-create-user.ts @@ -4,14 +4,12 @@ import { genClientId } from "home-assistant-js-websocket"; import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, property, state } from "lit/decorators"; import { fireEvent } from "../common/dom/fire_event"; import { LocalizeFunc } from "../common/translations/localize"; import { onboardUserStep } from "../data/onboarding"; diff --git a/src/onboarding/onboarding-integrations.ts b/src/onboarding/onboarding-integrations.ts index eee62415b..9426c88ad 100644 --- a/src/onboarding/onboarding-integrations.ts +++ b/src/onboarding/onboarding-integrations.ts @@ -2,14 +2,12 @@ import "@material/mwc-button/mwc-button"; import { css, CSSResultGroup, - customElement, html, LitElement, - property, - state, PropertyValues, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, property, state } from "lit/decorators"; import { fireEvent } from "../common/dom/fire_event"; import { compare } from "../common/string/compare"; import { LocalizeFunc } from "../common/translations/localize"; diff --git a/src/onboarding/onboarding-loading.ts b/src/onboarding/onboarding-loading.ts index 29005246d..e9182332e 100644 --- a/src/onboarding/onboarding-loading.ts +++ b/src/onboarding/onboarding-loading.ts @@ -1,11 +1,5 @@ -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement } from "lit/decorators"; @customElement("onboarding-loading") class OnboardingLoading extends LitElement { diff --git a/src/onboarding/onboarding-restore-snapshot.ts b/src/onboarding/onboarding-restore-snapshot.ts index 835a31aff..9d133d3b8 100644 --- a/src/onboarding/onboarding-restore-snapshot.ts +++ b/src/onboarding/onboarding-restore-snapshot.ts @@ -1,13 +1,6 @@ import "@material/mwc-button/mwc-button"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import "../../hassio/src/components/hassio-ansi-to-html"; import { showHassioSnapshotDialog } from "../../hassio/src/dialogs/snapshot/show-dialog-hassio-snapshot"; import { showSnapshotUploadDialog } from "../../hassio/src/dialogs/snapshot/show-dialog-snapshot-upload"; diff --git a/src/panels/calendar/ha-full-calendar.ts b/src/panels/calendar/ha-full-calendar.ts index 71e5ebbb0..8fa4cf46c 100644 --- a/src/panels/calendar/ha-full-calendar.ts +++ b/src/panels/calendar/ha-full-calendar.ts @@ -16,13 +16,12 @@ import { css, CSSResultGroup, html, - state, LitElement, - property, PropertyValues, TemplateResult, unsafeCSS, -} from "lit-element"; +} from "lit"; +import { property, state } from "lit/decorators"; import memoize from "memoize-one"; import { fireEvent } from "../../common/dom/fire_event"; import "../../components/ha-button-toggle-group"; diff --git a/src/panels/calendar/ha-panel-calendar.ts b/src/panels/calendar/ha-panel-calendar.ts index 1f73721ef..1bbe4b68e 100644 --- a/src/panels/calendar/ha-panel-calendar.ts +++ b/src/panels/calendar/ha-panel-calendar.ts @@ -5,15 +5,13 @@ import "@polymer/app-layout/app-toolbar/app-toolbar"; import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; -import { styleMap } from "lit-html/directives/style-map"; +} from "lit"; +import { customElement, property, state } from "lit/decorators"; +import { styleMap } from "lit/directives/style-map"; import { LocalStorage } from "../../common/decorators/local-storage"; import { HASSDomEvent } from "../../common/dom/fire_event"; import "../../components/ha-card"; diff --git a/src/panels/config/areas/dialog-area-registry-detail.ts b/src/panels/config/areas/dialog-area-registry-detail.ts index dcb29ffdf..9d192b91e 100644 --- a/src/panels/config/areas/dialog-area-registry-detail.ts +++ b/src/panels/config/areas/dialog-area-registry-detail.ts @@ -1,15 +1,8 @@ import "@material/mwc-button"; import "@polymer/paper-dialog-scrollable/paper-dialog-scrollable"; import "@polymer/paper-input/paper-input"; -import { - css, - CSSResultGroup, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { property, state } from "lit/decorators"; import { fireEvent } from "../../../common/dom/fire_event"; import { navigate } from "../../../common/navigate"; import "../../../components/ha-dialog"; diff --git a/src/panels/config/areas/ha-config-area-page.ts b/src/panels/config/areas/ha-config-area-page.ts index 29d526981..6b3e35a78 100644 --- a/src/panels/config/areas/ha-config-area-page.ts +++ b/src/panels/config/areas/ha-config-area-page.ts @@ -1,15 +1,7 @@ import "@material/mwc-button"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; -import { ifDefined } from "lit-html/directives/if-defined"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; +import { ifDefined } from "lit/directives/if-defined"; import memoizeOne from "memoize-one"; import { isComponentLoaded } from "../../../common/config/is_component_loaded"; import { computeStateName } from "../../../common/entity/compute_state_name"; diff --git a/src/panels/config/areas/ha-config-areas-dashboard.ts b/src/panels/config/areas/ha-config-areas-dashboard.ts index cee1c49c5..e0888c063 100644 --- a/src/panels/config/areas/ha-config-areas-dashboard.ts +++ b/src/panels/config/areas/ha-config-areas-dashboard.ts @@ -1,15 +1,8 @@ import { mdiPlus } from "@mdi/js"; import "@polymer/paper-item/paper-item"; import "@polymer/paper-item/paper-item-body"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import memoizeOne from "memoize-one"; import { HASSDomEvent } from "../../../common/dom/fire_event"; import { navigate } from "../../../common/navigate"; diff --git a/src/panels/config/areas/ha-config-areas.ts b/src/panels/config/areas/ha-config-areas.ts index 725bf14cd..dd9378e32 100644 --- a/src/panels/config/areas/ha-config-areas.ts +++ b/src/panels/config/areas/ha-config-areas.ts @@ -1,5 +1,6 @@ import { UnsubscribeFunc } from "home-assistant-js-websocket"; -import { customElement, state, property, PropertyValues } from "lit-element"; +import { PropertyValues } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { compare } from "../../../common/string/compare"; import { AreaRegistryEntry, diff --git a/src/panels/config/automation/action/ha-automation-action-row.ts b/src/panels/config/automation/action/ha-automation-action-row.ts index 5dfc358a5..96719a003 100644 --- a/src/panels/config/automation/action/ha-automation-action-row.ts +++ b/src/panels/config/automation/action/ha-automation-action-row.ts @@ -6,19 +6,11 @@ import "@polymer/paper-dropdown-menu/paper-dropdown-menu-light"; import "@polymer/paper-item/paper-item"; import "@polymer/paper-listbox/paper-listbox"; import type { PaperListboxElement } from "@polymer/paper-listbox/paper-listbox"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - PropertyValues, - query, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, PropertyValues } from "lit"; +import { customElement, property, state, query } from "lit/decorators"; import { dynamicElement } from "../../../../common/dom/dynamic-element-directive"; import { fireEvent } from "../../../../common/dom/fire_event"; +import { handleStructError } from "../../../../common/structs/handle-errors"; import "../../../../components/ha-button-menu"; import "../../../../components/ha-card"; import "../../../../components/ha-svg-icon"; @@ -27,7 +19,6 @@ import type { Action } from "../../../../data/script"; import { showConfirmationDialog } from "../../../../dialogs/generic/show-dialog-box"; import { haStyle } from "../../../../resources/styles"; import type { HomeAssistant } from "../../../../types"; -import { handleStructError } from "../../../../common/structs/handle-errors"; import "./types/ha-automation-action-choose"; import "./types/ha-automation-action-condition"; import "./types/ha-automation-action-delay"; diff --git a/src/panels/config/automation/action/ha-automation-action.ts b/src/panels/config/automation/action/ha-automation-action.ts index 9d2c26678..dfdf25b21 100644 --- a/src/panels/config/automation/action/ha-automation-action.ts +++ b/src/panels/config/automation/action/ha-automation-action.ts @@ -1,12 +1,6 @@ import "@material/mwc-button"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement } from "lit"; +import { customElement, property } from "lit/decorators"; import { fireEvent } from "../../../../common/dom/fire_event"; import "../../../../components/ha-card"; import { Action } from "../../../../data/script"; diff --git a/src/panels/config/automation/action/types/ha-automation-action-choose.ts b/src/panels/config/automation/action/types/ha-automation-action-choose.ts index 2cc117665..584d217b9 100644 --- a/src/panels/config/automation/action/types/ha-automation-action-choose.ts +++ b/src/panels/config/automation/action/types/ha-automation-action-choose.ts @@ -1,14 +1,8 @@ import { mdiDelete } from "@mdi/js"; import "@polymer/paper-input/paper-input"; import "@polymer/paper-listbox/paper-listbox"; -import { - css, - CSSResultGroup, - customElement, - LitElement, - property, -} from "lit-element"; -import { html } from "lit-html"; +import { css, CSSResultGroup, html, LitElement } from "lit"; +import { customElement, property } from "lit/decorators"; import { fireEvent } from "../../../../../common/dom/fire_event"; import { ensureArray } from "../../../../../common/ensure-array"; import { Condition } from "../../../../../data/automation"; diff --git a/src/panels/config/automation/action/types/ha-automation-action-condition.ts b/src/panels/config/automation/action/types/ha-automation-action-condition.ts index 03eb23483..6509d71c6 100644 --- a/src/panels/config/automation/action/types/ha-automation-action-condition.ts +++ b/src/panels/config/automation/action/types/ha-automation-action-condition.ts @@ -1,4 +1,5 @@ -import { customElement, html, LitElement, property } from "lit-element"; +import { html, LitElement } from "lit"; +import { customElement, property } from "lit/decorators"; import { fireEvent } from "../../../../../common/dom/fire_event"; import { Condition } from "../../../../../data/automation"; import { HomeAssistant } from "../../../../../types"; diff --git a/src/panels/config/automation/action/types/ha-automation-action-delay.ts b/src/panels/config/automation/action/types/ha-automation-action-delay.ts index b805a68b2..ab9a3ed8a 100644 --- a/src/panels/config/automation/action/types/ha-automation-action-delay.ts +++ b/src/panels/config/automation/action/types/ha-automation-action-delay.ts @@ -1,11 +1,6 @@ import "@polymer/paper-input/paper-input"; -import { - customElement, - html, - LitElement, - property, - PropertyValues, -} from "lit-element"; +import { html, LitElement, PropertyValues } from "lit"; +import { customElement, property } from "lit/decorators"; import { fireEvent } from "../../../../../common/dom/fire_event"; import { hasTemplate } from "../../../../../common/string/has-template"; import "../../../../../components/entity/ha-entity-picker"; diff --git a/src/panels/config/automation/action/types/ha-automation-action-device_id.ts b/src/panels/config/automation/action/types/ha-automation-action-device_id.ts index 535be0f25..1a4565f87 100644 --- a/src/panels/config/automation/action/types/ha-automation-action-device_id.ts +++ b/src/panels/config/automation/action/types/ha-automation-action-device_id.ts @@ -1,4 +1,5 @@ -import { customElement, html, state, LitElement, property } from "lit-element"; +import { html, LitElement } from "lit"; +import { customElement, property, state } from "lit/decorators"; import memoizeOne from "memoize-one"; import { fireEvent } from "../../../../../common/dom/fire_event"; import "../../../../../components/device/ha-device-action-picker"; diff --git a/src/panels/config/automation/action/types/ha-automation-action-event.ts b/src/panels/config/automation/action/types/ha-automation-action-event.ts index 81fc2c10d..92b64fe63 100644 --- a/src/panels/config/automation/action/types/ha-automation-action-event.ts +++ b/src/panels/config/automation/action/types/ha-automation-action-event.ts @@ -1,12 +1,6 @@ import "@polymer/paper-input/paper-input"; -import { - customElement, - LitElement, - property, - PropertyValues, - query, -} from "lit-element"; -import { html } from "lit-html"; +import { html, LitElement, PropertyValues } from "lit"; +import { customElement, property, query } from "lit/decorators"; import { fireEvent } from "../../../../../common/dom/fire_event"; import "../../../../../components/entity/ha-entity-picker"; import "../../../../../components/ha-service-picker"; diff --git a/src/panels/config/automation/action/types/ha-automation-action-repeat.ts b/src/panels/config/automation/action/types/ha-automation-action-repeat.ts index 538fb9476..07249aeaf 100644 --- a/src/panels/config/automation/action/types/ha-automation-action-repeat.ts +++ b/src/panels/config/automation/action/types/ha-automation-action-repeat.ts @@ -1,13 +1,8 @@ import "@polymer/paper-input/paper-input"; import type { PaperListboxElement } from "@polymer/paper-listbox"; import "@polymer/paper-listbox/paper-listbox"; -import { - CSSResultGroup, - customElement, - LitElement, - property, -} from "lit-element"; -import { html } from "lit-html"; +import { CSSResultGroup, html, LitElement } from "lit"; +import { customElement, property } from "lit/decorators"; import { fireEvent } from "../../../../../common/dom/fire_event"; import { Action, diff --git a/src/panels/config/automation/action/types/ha-automation-action-scene.ts b/src/panels/config/automation/action/types/ha-automation-action-scene.ts index 9b0610b18..6af3f06c4 100644 --- a/src/panels/config/automation/action/types/ha-automation-action-scene.ts +++ b/src/panels/config/automation/action/types/ha-automation-action-scene.ts @@ -1,4 +1,5 @@ -import { customElement, html, LitElement, property } from "lit-element"; +import { html, LitElement } from "lit"; +import { customElement, property } from "lit/decorators"; import { fireEvent } from "../../../../../common/dom/fire_event"; import "../../../../../components/entity/ha-entity-picker"; import { SceneAction } from "../../../../../data/script"; diff --git a/src/panels/config/automation/action/types/ha-automation-action-service.ts b/src/panels/config/automation/action/types/ha-automation-action-service.ts index 7743800b3..eafbc88b6 100644 --- a/src/panels/config/automation/action/types/ha-automation-action-service.ts +++ b/src/panels/config/automation/action/types/ha-automation-action-service.ts @@ -1,22 +1,14 @@ import "@polymer/paper-input/paper-input"; -import { - css, - CSSResultGroup, - customElement, - state, - LitElement, - property, - PropertyValues, -} from "lit-element"; -import { html } from "lit-html"; +import { css, CSSResultGroup, html, LitElement, PropertyValues } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { any, assert, object, optional, string } from "superstruct"; import { fireEvent } from "../../../../../common/dom/fire_event"; +import { hasTemplate } from "../../../../../common/string/has-template"; +import { entityIdOrAll } from "../../../../../common/structs/is-entity-id"; +import "../../../../../components/ha-service-control"; import { ServiceAction } from "../../../../../data/script"; import type { HomeAssistant } from "../../../../../types"; -import { entityIdOrAll } from "../../../../../common/structs/is-entity-id"; import { ActionElement } from "../ha-automation-action-row"; -import "../../../../../components/ha-service-control"; -import { hasTemplate } from "../../../../../common/string/has-template"; const actionStruct = object({ service: optional(string()), diff --git a/src/panels/config/automation/action/types/ha-automation-action-wait_for_trigger.ts b/src/panels/config/automation/action/types/ha-automation-action-wait_for_trigger.ts index 0d28d05c7..223eb40d9 100644 --- a/src/panels/config/automation/action/types/ha-automation-action-wait_for_trigger.ts +++ b/src/panels/config/automation/action/types/ha-automation-action-wait_for_trigger.ts @@ -1,7 +1,7 @@ import "@polymer/paper-input/paper-input"; import "@polymer/paper-input/paper-textarea"; -import { customElement, LitElement, property } from "lit-element"; -import { html } from "lit-html"; +import { html, LitElement } from "lit"; +import { customElement, property } from "lit/decorators"; import { fireEvent } from "../../../../../common/dom/fire_event"; import "../../../../../components/ha-formfield"; import { WaitForTriggerAction } from "../../../../../data/script"; diff --git a/src/panels/config/automation/action/types/ha-automation-action-wait_template.ts b/src/panels/config/automation/action/types/ha-automation-action-wait_template.ts index ed6326a38..62e7a5bbb 100644 --- a/src/panels/config/automation/action/types/ha-automation-action-wait_template.ts +++ b/src/panels/config/automation/action/types/ha-automation-action-wait_template.ts @@ -1,7 +1,7 @@ import "@polymer/paper-input/paper-input"; import "@polymer/paper-input/paper-textarea"; -import { customElement, LitElement, property } from "lit-element"; -import { html } from "lit-html"; +import { html, LitElement } from "lit"; +import { customElement, property } from "lit/decorators"; import { fireEvent } from "../../../../../common/dom/fire_event"; import { WaitAction } from "../../../../../data/script"; import { HomeAssistant } from "../../../../../types"; diff --git a/src/panels/config/automation/blueprint-automation-editor.ts b/src/panels/config/automation/blueprint-automation-editor.ts index 14358dec9..a7ccc8c07 100644 --- a/src/panels/config/automation/blueprint-automation-editor.ts +++ b/src/panels/config/automation/blueprint-automation-editor.ts @@ -2,15 +2,8 @@ import "@material/mwc-button/mwc-button"; import "@polymer/paper-dropdown-menu/paper-dropdown-menu-light"; import "@polymer/paper-input/paper-textarea"; import { HassEntity } from "home-assistant-js-websocket"; -import { - css, - CSSResultGroup, - customElement, - state, - LitElement, - property, -} from "lit-element"; -import { html } from "lit-html"; +import { css, CSSResultGroup, html, LitElement } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { fireEvent } from "../../../common/dom/fire_event"; import "../../../components/entity/ha-entity-toggle"; import "../../../components/ha-blueprint-picker"; diff --git a/src/panels/config/automation/condition/ha-automation-condition-editor.ts b/src/panels/config/automation/condition/ha-automation-condition-editor.ts index 59c2ac55d..014e40c55 100644 --- a/src/panels/config/automation/condition/ha-automation-condition-editor.ts +++ b/src/panels/config/automation/condition/ha-automation-condition-editor.ts @@ -2,13 +2,8 @@ import "@polymer/paper-dropdown-menu/paper-dropdown-menu-light"; import "@polymer/paper-item/paper-item"; import "@polymer/paper-listbox/paper-listbox"; import type { PaperListboxElement } from "@polymer/paper-listbox/paper-listbox"; -import { - CSSResultGroup, - customElement, - html, - LitElement, - property, -} from "lit-element"; +import { CSSResultGroup, html, LitElement } from "lit"; +import { customElement, property } from "lit/decorators"; import { dynamicElement } from "../../../../common/dom/dynamic-element-directive"; import { fireEvent } from "../../../../common/dom/fire_event"; import "../../../../components/ha-card"; diff --git a/src/panels/config/automation/condition/ha-automation-condition-row.ts b/src/panels/config/automation/condition/ha-automation-condition-row.ts index d1dbed74f..801505535 100644 --- a/src/panels/config/automation/condition/ha-automation-condition-row.ts +++ b/src/panels/config/automation/condition/ha-automation-condition-row.ts @@ -2,24 +2,17 @@ import { ActionDetail } from "@material/mwc-list/mwc-list-foundation"; import "@material/mwc-list/mwc-list-item"; import { mdiDotsVertical } from "@mdi/js"; import "@polymer/paper-item/paper-item"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { fireEvent } from "../../../../common/dom/fire_event"; import "../../../../components/ha-button-menu"; import "../../../../components/ha-card"; import "../../../../components/ha-icon-button"; import { Condition } from "../../../../data/automation"; import { showConfirmationDialog } from "../../../../dialogs/generic/show-dialog-box"; +import { haStyle } from "../../../../resources/styles"; import { HomeAssistant } from "../../../../types"; import "./ha-automation-condition-editor"; -import { haStyle } from "../../../../resources/styles"; export interface ConditionElement extends LitElement { condition: Condition; diff --git a/src/panels/config/automation/condition/ha-automation-condition.ts b/src/panels/config/automation/condition/ha-automation-condition.ts index 1105e7be1..513ca4c36 100644 --- a/src/panels/config/automation/condition/ha-automation-condition.ts +++ b/src/panels/config/automation/condition/ha-automation-condition.ts @@ -1,13 +1,6 @@ import "@material/mwc-button"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - PropertyValues, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, PropertyValues } from "lit"; +import { customElement, property } from "lit/decorators"; import { fireEvent } from "../../../../common/dom/fire_event"; import "../../../../components/ha-card"; import { Condition } from "../../../../data/automation"; diff --git a/src/panels/config/automation/condition/types/ha-automation-condition-and.ts b/src/panels/config/automation/condition/types/ha-automation-condition-and.ts index 92148e5ff..482d593d9 100644 --- a/src/panels/config/automation/condition/types/ha-automation-condition-and.ts +++ b/src/panels/config/automation/condition/types/ha-automation-condition-and.ts @@ -1,4 +1,4 @@ -import { customElement } from "lit-element"; +import { customElement } from "lit/decorators"; import { HaLogicalCondition } from "./ha-automation-condition-logical"; @customElement("ha-automation-condition-and") diff --git a/src/panels/config/automation/condition/types/ha-automation-condition-device.ts b/src/panels/config/automation/condition/types/ha-automation-condition-device.ts index 2ba0ba91f..74277a468 100644 --- a/src/panels/config/automation/condition/types/ha-automation-condition-device.ts +++ b/src/panels/config/automation/condition/types/ha-automation-condition-device.ts @@ -1,4 +1,5 @@ -import { customElement, html, state, LitElement, property } from "lit-element"; +import { html, LitElement } from "lit"; +import { customElement, property, state } from "lit/decorators"; import memoizeOne from "memoize-one"; import { fireEvent } from "../../../../../common/dom/fire_event"; import "../../../../../components/device/ha-device-condition-picker"; diff --git a/src/panels/config/automation/condition/types/ha-automation-condition-logical.ts b/src/panels/config/automation/condition/types/ha-automation-condition-logical.ts index 6d6fc40f7..47fbba8de 100644 --- a/src/panels/config/automation/condition/types/ha-automation-condition-logical.ts +++ b/src/panels/config/automation/condition/types/ha-automation-condition-logical.ts @@ -1,4 +1,5 @@ -import { customElement, html, LitElement, property } from "lit-element"; +import { html, LitElement } from "lit"; +import { customElement, property } from "lit/decorators"; import { fireEvent } from "../../../../../common/dom/fire_event"; import { LogicalCondition } from "../../../../../data/automation"; import { HomeAssistant } from "../../../../../types"; diff --git a/src/panels/config/automation/condition/types/ha-automation-condition-not.ts b/src/panels/config/automation/condition/types/ha-automation-condition-not.ts index 586346765..82f8a9504 100644 --- a/src/panels/config/automation/condition/types/ha-automation-condition-not.ts +++ b/src/panels/config/automation/condition/types/ha-automation-condition-not.ts @@ -1,4 +1,4 @@ -import { customElement } from "lit-element"; +import { customElement } from "lit/decorators"; import { HaLogicalCondition } from "./ha-automation-condition-logical"; @customElement("ha-automation-condition-not") diff --git a/src/panels/config/automation/condition/types/ha-automation-condition-numeric_state.ts b/src/panels/config/automation/condition/types/ha-automation-condition-numeric_state.ts index 71259efe5..d953eb7c7 100644 --- a/src/panels/config/automation/condition/types/ha-automation-condition-numeric_state.ts +++ b/src/panels/config/automation/condition/types/ha-automation-condition-numeric_state.ts @@ -1,6 +1,7 @@ import "@polymer/paper-input/paper-input"; import "@polymer/paper-input/paper-textarea"; -import { customElement, html, LitElement, property } from "lit-element"; +import { html, LitElement } from "lit"; +import { customElement, property } from "lit/decorators"; import "../../../../../components/entity/ha-entity-picker"; import { NumericStateCondition } from "../../../../../data/automation"; import { HomeAssistant } from "../../../../../types"; diff --git a/src/panels/config/automation/condition/types/ha-automation-condition-or.ts b/src/panels/config/automation/condition/types/ha-automation-condition-or.ts index 38152f3bb..ca770ee81 100644 --- a/src/panels/config/automation/condition/types/ha-automation-condition-or.ts +++ b/src/panels/config/automation/condition/types/ha-automation-condition-or.ts @@ -1,4 +1,4 @@ -import { customElement } from "lit-element"; +import { customElement } from "lit/decorators"; import { HaLogicalCondition } from "./ha-automation-condition-logical"; @customElement("ha-automation-condition-or") diff --git a/src/panels/config/automation/condition/types/ha-automation-condition-state.ts b/src/panels/config/automation/condition/types/ha-automation-condition-state.ts index d0f18b1ab..1b841f0af 100644 --- a/src/panels/config/automation/condition/types/ha-automation-condition-state.ts +++ b/src/panels/config/automation/condition/types/ha-automation-condition-state.ts @@ -1,5 +1,6 @@ import "@polymer/paper-input/paper-input"; -import { customElement, html, LitElement, property } from "lit-element"; +import { html, LitElement } from "lit"; +import { customElement, property } from "lit/decorators"; import "../../../../../components/entity/ha-entity-attribute-picker"; import "../../../../../components/entity/ha-entity-picker"; import { ForDict, StateCondition } from "../../../../../data/automation"; diff --git a/src/panels/config/automation/condition/types/ha-automation-condition-sun.ts b/src/panels/config/automation/condition/types/ha-automation-condition-sun.ts index becb62bf8..bda939953 100644 --- a/src/panels/config/automation/condition/types/ha-automation-condition-sun.ts +++ b/src/panels/config/automation/condition/types/ha-automation-condition-sun.ts @@ -2,7 +2,8 @@ import "@polymer/paper-input/paper-input"; import "@polymer/paper-radio-button/paper-radio-button"; import "@polymer/paper-radio-group/paper-radio-group"; import type { PaperRadioGroupElement } from "@polymer/paper-radio-group/paper-radio-group"; -import { customElement, html, LitElement, property } from "lit-element"; +import { html, LitElement } from "lit"; +import { customElement, property } from "lit/decorators"; import { fireEvent } from "../../../../../common/dom/fire_event"; import type { SunCondition } from "../../../../../data/automation"; import type { HomeAssistant } from "../../../../../types"; diff --git a/src/panels/config/automation/condition/types/ha-automation-condition-template.ts b/src/panels/config/automation/condition/types/ha-automation-condition-template.ts index 6f8fe2329..d83eea64e 100644 --- a/src/panels/config/automation/condition/types/ha-automation-condition-template.ts +++ b/src/panels/config/automation/condition/types/ha-automation-condition-template.ts @@ -1,5 +1,6 @@ import "@polymer/paper-input/paper-textarea"; -import { customElement, html, LitElement, property } from "lit-element"; +import { html, LitElement } from "lit"; +import { customElement, property } from "lit/decorators"; import { TemplateCondition } from "../../../../../data/automation"; import { HomeAssistant } from "../../../../../types"; import { handleChangeEvent } from "../ha-automation-condition-row"; diff --git a/src/panels/config/automation/condition/types/ha-automation-condition-time.ts b/src/panels/config/automation/condition/types/ha-automation-condition-time.ts index fbbf6baa8..5b0e56b35 100644 --- a/src/panels/config/automation/condition/types/ha-automation-condition-time.ts +++ b/src/panels/config/automation/condition/types/ha-automation-condition-time.ts @@ -1,14 +1,7 @@ import { Radio } from "@material/mwc-radio"; import "@polymer/paper-input/paper-input"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { fireEvent } from "../../../../../common/dom/fire_event"; import { computeRTLDirection } from "../../../../../common/util/compute_rtl"; import "../../../../../components/ha-formfield"; diff --git a/src/panels/config/automation/condition/types/ha-automation-condition-zone.ts b/src/panels/config/automation/condition/types/ha-automation-condition-zone.ts index e84bd7766..7511b1ff0 100644 --- a/src/panels/config/automation/condition/types/ha-automation-condition-zone.ts +++ b/src/panels/config/automation/condition/types/ha-automation-condition-zone.ts @@ -1,5 +1,6 @@ import "@polymer/paper-radio-button/paper-radio-button"; -import { customElement, html, LitElement, property } from "lit-element"; +import { html, LitElement } from "lit"; +import { customElement, property } from "lit/decorators"; import { fireEvent } from "../../../../../common/dom/fire_event"; import { computeStateDomain } from "../../../../../common/entity/compute_state_domain"; import { hasLocation } from "../../../../../common/entity/has_location"; diff --git a/src/panels/config/automation/dialog-new-automation.ts b/src/panels/config/automation/dialog-new-automation.ts index bf854c2bc..3ab6c12b2 100644 --- a/src/panels/config/automation/dialog-new-automation.ts +++ b/src/panels/config/automation/dialog-new-automation.ts @@ -1,14 +1,6 @@ import "@material/mwc-button"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { isComponentLoaded } from "../../../common/config/is_component_loaded"; import { fireEvent } from "../../../common/dom/fire_event"; import { nextRender } from "../../../common/util/render-status"; diff --git a/src/panels/config/automation/ha-automation-editor.ts b/src/panels/config/automation/ha-automation-editor.ts index b0780ea23..3df134e59 100644 --- a/src/panels/config/automation/ha-automation-editor.ts +++ b/src/panels/config/automation/ha-automation-editor.ts @@ -15,14 +15,12 @@ import { css, CSSResultGroup, html, - state, LitElement, - property, PropertyValues, - query, TemplateResult, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; +} from "lit"; +import { property, state, query } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; import { navigate } from "../../../common/navigate"; import { copyToClipboard } from "../../../common/util/copy-clipboard"; import "../../../components/ha-button-menu"; diff --git a/src/panels/config/automation/ha-automation-picker.ts b/src/panels/config/automation/ha-automation-picker.ts index 760069e16..c7526a58d 100644 --- a/src/panels/config/automation/ha-automation-picker.ts +++ b/src/panels/config/automation/ha-automation-picker.ts @@ -8,16 +8,9 @@ import { mdiPlus, } from "@mdi/js"; import "@polymer/paper-tooltip/paper-tooltip"; -import { - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; -import { ifDefined } from "lit-html/directives/if-defined"; +import { CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; +import { ifDefined } from "lit/directives/if-defined"; import memoizeOne from "memoize-one"; import { isComponentLoaded } from "../../../common/config/is_component_loaded"; import { formatDateTime } from "../../../common/datetime/format_date_time"; @@ -26,9 +19,9 @@ import { computeStateName } from "../../../common/entity/compute_state_name"; import { navigate } from "../../../common/navigate"; import { DataTableColumnContainer } from "../../../components/data-table/ha-data-table"; import "../../../components/entity/ha-entity-toggle"; +import "../../../components/ha-button-related-filter-menu"; import "../../../components/ha-fab"; import "../../../components/ha-svg-icon"; -import "../../../components/ha-button-related-filter-menu"; import { AutomationEntity, triggerAutomationActions, diff --git a/src/panels/config/automation/ha-config-automation.ts b/src/panels/config/automation/ha-config-automation.ts index d9db28fac..8a61fabf5 100644 --- a/src/panels/config/automation/ha-config-automation.ts +++ b/src/panels/config/automation/ha-config-automation.ts @@ -1,5 +1,6 @@ import { HassEntities } from "home-assistant-js-websocket"; -import { customElement, property, PropertyValues } from "lit-element"; +import { PropertyValues } from "lit"; +import { customElement, property } from "lit/decorators"; import memoizeOne from "memoize-one"; import { computeStateDomain } from "../../../common/entity/compute_state_domain"; import { debounce } from "../../../common/util/debounce"; @@ -9,8 +10,8 @@ import { RouterOptions, } from "../../../layouts/hass-router-page"; import { HomeAssistant } from "../../../types"; -import "./ha-automation-picker"; import "./ha-automation-editor"; +import "./ha-automation-picker"; const equal = (a: AutomationEntity[], b: AutomationEntity[]): boolean => { if (a.length !== b.length) { diff --git a/src/panels/config/automation/manual-automation-editor.ts b/src/panels/config/automation/manual-automation-editor.ts index 492621e87..9dfdf01ec 100644 --- a/src/panels/config/automation/manual-automation-editor.ts +++ b/src/panels/config/automation/manual-automation-editor.ts @@ -3,14 +3,8 @@ import "@polymer/paper-dropdown-menu/paper-dropdown-menu-light"; import "@polymer/paper-input/paper-textarea"; import { PaperListboxElement } from "@polymer/paper-listbox"; import { HassEntity } from "home-assistant-js-websocket"; -import { - css, - CSSResultGroup, - customElement, - LitElement, - property, -} from "lit-element"; -import { html } from "lit-html"; +import { css, CSSResultGroup, html, LitElement } from "lit"; +import { customElement, property } from "lit/decorators"; import { fireEvent } from "../../../common/dom/fire_event"; import "../../../components/entity/ha-entity-toggle"; import "../../../components/ha-card"; diff --git a/src/panels/config/automation/thingtalk/dialog-thingtalk.ts b/src/panels/config/automation/thingtalk/dialog-thingtalk.ts index 04d43a0b7..467e293e6 100644 --- a/src/panels/config/automation/thingtalk/dialog-thingtalk.ts +++ b/src/panels/config/automation/thingtalk/dialog-thingtalk.ts @@ -2,17 +2,8 @@ import "@material/mwc-button"; import "@polymer/paper-dialog-scrollable/paper-dialog-scrollable"; import "@polymer/paper-input/paper-input"; import type { PaperInputElement } from "@polymer/paper-input/paper-input"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - query, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state, query } from "lit/decorators"; import { fireEvent } from "../../../../common/dom/fire_event"; import "../../../../components/dialog/ha-paper-dialog"; import "../../../../components/ha-circular-progress"; diff --git a/src/panels/config/automation/thingtalk/ha-thingtalk-placeholders.ts b/src/panels/config/automation/thingtalk/ha-thingtalk-placeholders.ts index 3a42951f9..af00652e8 100644 --- a/src/panels/config/automation/thingtalk/ha-thingtalk-placeholders.ts +++ b/src/panels/config/automation/thingtalk/ha-thingtalk-placeholders.ts @@ -2,14 +2,12 @@ import { HassEntity } from "home-assistant-js-websocket"; import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, property, state } from "lit/decorators"; import { fireEvent } from "../../../../common/dom/fire_event"; import { computeDomain } from "../../../../common/entity/compute_domain"; import { applyPatch, getPath } from "../../../../common/util/patch"; diff --git a/src/panels/config/automation/trace/ha-automation-trace-blueprint-config.ts b/src/panels/config/automation/trace/ha-automation-trace-blueprint-config.ts index 4f9d02403..ca04091e7 100644 --- a/src/panels/config/automation/trace/ha-automation-trace-blueprint-config.ts +++ b/src/panels/config/automation/trace/ha-automation-trace-blueprint-config.ts @@ -1,15 +1,10 @@ import { safeDump } from "js-yaml"; -import { - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; -import "../../../../components/ha-icon-button"; +import { html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import "../../../../components/ha-code-editor"; -import { HomeAssistant } from "../../../../types"; +import "../../../../components/ha-icon-button"; import { AutomationTraceExtended } from "../../../../data/trace"; +import { HomeAssistant } from "../../../../types"; @customElement("ha-automation-trace-blueprint-config") export class HaAutomationTraceBlueprintConfig extends LitElement { diff --git a/src/panels/config/automation/trace/ha-automation-trace-config.ts b/src/panels/config/automation/trace/ha-automation-trace-config.ts index 73a49f664..3928656f8 100644 --- a/src/panels/config/automation/trace/ha-automation-trace-config.ts +++ b/src/panels/config/automation/trace/ha-automation-trace-config.ts @@ -1,16 +1,9 @@ import { safeDump } from "js-yaml"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; -import { AutomationTraceExtended } from "../../../../data/trace"; -import "../../../../components/ha-icon-button"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import "../../../../components/ha-code-editor"; +import "../../../../components/ha-icon-button"; +import { AutomationTraceExtended } from "../../../../data/trace"; import { HomeAssistant } from "../../../../types"; @customElement("ha-automation-trace-config") diff --git a/src/panels/config/automation/trace/ha-automation-trace-logbook.ts b/src/panels/config/automation/trace/ha-automation-trace-logbook.ts index 54c78e201..675d35566 100644 --- a/src/panels/config/automation/trace/ha-automation-trace-logbook.ts +++ b/src/panels/config/automation/trace/ha-automation-trace-logbook.ts @@ -1,15 +1,8 @@ -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; -import type { HomeAssistant } from "../../../../types"; -import type { LogbookEntry } from "../../../../data/logbook"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import "../../../../components/trace/hat-logbook-note"; +import type { LogbookEntry } from "../../../../data/logbook"; +import type { HomeAssistant } from "../../../../types"; import "../../../logbook/ha-logbook"; @customElement("ha-automation-trace-logbook") diff --git a/src/panels/config/automation/trace/ha-automation-trace-path-details.ts b/src/panels/config/automation/trace/ha-automation-trace-path-details.ts index 4afaa2abc..1dab6866b 100644 --- a/src/panels/config/automation/trace/ha-automation-trace-path-details.ts +++ b/src/panels/config/automation/trace/ha-automation-trace-path-details.ts @@ -1,30 +1,22 @@ import { safeDump } from "js-yaml"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; +import { formatDateTimeWithSeconds } from "../../../../common/datetime/format_date_time"; +import "../../../../components/ha-code-editor"; +import "../../../../components/ha-icon-button"; +import type { NodeInfo } from "../../../../components/trace/hat-graph"; +import "../../../../components/trace/hat-logbook-note"; +import { LogbookEntry } from "../../../../data/logbook"; import { ActionTraceStep, AutomationTraceExtended, ChooseActionTraceStep, getDataFromPath, } from "../../../../data/trace"; -import "../../../../components/ha-icon-button"; -import "../../../../components/ha-code-editor"; -import type { NodeInfo } from "../../../../components/trace/hat-graph"; -import "../../../../components/trace/hat-logbook-note"; import { HomeAssistant } from "../../../../types"; -import { formatDateTimeWithSeconds } from "../../../../common/datetime/format_date_time"; -import { LogbookEntry } from "../../../../data/logbook"; -import { traceTabStyles } from "./styles"; import "../../../logbook/ha-logbook"; +import { traceTabStyles } from "./styles"; @customElement("ha-automation-trace-path-details") export class HaAutomationTracePathDetails extends LitElement { diff --git a/src/panels/config/automation/trace/ha-automation-trace-timeline.ts b/src/panels/config/automation/trace/ha-automation-trace-timeline.ts index e9861f6e7..d379dc693 100644 --- a/src/panels/config/automation/trace/ha-automation-trace-timeline.ts +++ b/src/panels/config/automation/trace/ha-automation-trace-timeline.ts @@ -1,18 +1,11 @@ -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; -import type { AutomationTraceExtended } from "../../../../data/trace"; -import type { HomeAssistant } from "../../../../types"; -import type { LogbookEntry } from "../../../../data/logbook"; -import "../../../../components/trace/hat-trace-timeline"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import type { NodeInfo } from "../../../../components/trace/hat-graph"; import "../../../../components/trace/hat-logbook-note"; +import "../../../../components/trace/hat-trace-timeline"; +import type { LogbookEntry } from "../../../../data/logbook"; +import type { AutomationTraceExtended } from "../../../../data/trace"; +import type { HomeAssistant } from "../../../../types"; @customElement("ha-automation-trace-timeline") export class HaAutomationTraceTimeline extends LitElement { diff --git a/src/panels/config/automation/trace/ha-automation-trace.ts b/src/panels/config/automation/trace/ha-automation-trace.ts index 2f0afc5fe..fefffacb8 100644 --- a/src/panels/config/automation/trace/ha-automation-trace.ts +++ b/src/panels/config/automation/trace/ha-automation-trace.ts @@ -1,47 +1,39 @@ import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; + mdiDownload, + mdiPencil, + mdiRayEndArrow, + mdiRayStartArrow, + mdiRefresh, +} from "@mdi/js"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; +import { repeat } from "lit/directives/repeat"; +import { isComponentLoaded } from "../../../../common/config/is_component_loaded"; +import { formatDateTimeWithSeconds } from "../../../../common/datetime/format_date_time"; +import type { NodeInfo } from "../../../../components/trace/hat-graph"; +import "../../../../components/trace/hat-script-graph"; import { AutomationEntity } from "../../../../data/automation"; +import { + getLogbookDataForContext, + LogbookEntry, +} from "../../../../data/logbook"; import { AutomationTrace, AutomationTraceExtended, loadTrace, loadTraces, } from "../../../../data/trace"; -import "../../../../components/trace/hat-script-graph"; -import type { NodeInfo } from "../../../../components/trace/hat-graph"; +import { showAlertDialog } from "../../../../dialogs/generic/show-dialog-box"; import { haStyle } from "../../../../resources/styles"; import { HomeAssistant, Route } from "../../../../types"; import { configSections } from "../../ha-panel-config"; -import { - getLogbookDataForContext, - LogbookEntry, -} from "../../../../data/logbook"; -import { formatDateTimeWithSeconds } from "../../../../common/datetime/format_date_time"; -import { repeat } from "lit-html/directives/repeat"; -import { showAlertDialog } from "../../../../dialogs/generic/show-dialog-box"; -import "./ha-automation-trace-path-details"; -import "./ha-automation-trace-timeline"; +import "./ha-automation-trace-blueprint-config"; import "./ha-automation-trace-config"; import "./ha-automation-trace-logbook"; -import { classMap } from "lit-html/directives/class-map"; +import "./ha-automation-trace-path-details"; +import "./ha-automation-trace-timeline"; import { traceTabStyles } from "./styles"; -import { - mdiRayEndArrow, - mdiRayStartArrow, - mdiPencil, - mdiRefresh, - mdiDownload, -} from "@mdi/js"; -import "./ha-automation-trace-blueprint-config"; -import { isComponentLoaded } from "../../../../common/config/is_component_loaded"; @customElement("ha-automation-trace") export class HaAutomationTrace extends LitElement { diff --git a/src/panels/config/automation/trace/styles.ts b/src/panels/config/automation/trace/styles.ts index 4f236499c..40878d304 100644 --- a/src/panels/config/automation/trace/styles.ts +++ b/src/panels/config/automation/trace/styles.ts @@ -1,4 +1,4 @@ -import { css } from "lit-element"; +import { css } from "lit"; export const traceTabStyles = css` .tabs { diff --git a/src/panels/config/automation/trigger/ha-automation-trigger-row.ts b/src/panels/config/automation/trigger/ha-automation-trigger-row.ts index ff84744b9..07b8b7373 100644 --- a/src/panels/config/automation/trigger/ha-automation-trigger-row.ts +++ b/src/panels/config/automation/trigger/ha-automation-trigger-row.ts @@ -5,15 +5,8 @@ import "@polymer/paper-dropdown-menu/paper-dropdown-menu-light"; import "@polymer/paper-item/paper-item"; import "@polymer/paper-listbox/paper-listbox"; import type { PaperListboxElement } from "@polymer/paper-listbox/paper-listbox"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { dynamicElement } from "../../../../common/dom/dynamic-element-directive"; import { fireEvent } from "../../../../common/dom/fire_event"; import "../../../../components/ha-button-menu"; diff --git a/src/panels/config/automation/trigger/ha-automation-trigger.ts b/src/panels/config/automation/trigger/ha-automation-trigger.ts index e60df5d8a..612780c9d 100644 --- a/src/panels/config/automation/trigger/ha-automation-trigger.ts +++ b/src/panels/config/automation/trigger/ha-automation-trigger.ts @@ -1,12 +1,6 @@ import "@material/mwc-button"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement } from "lit"; +import { customElement, property } from "lit/decorators"; import { fireEvent } from "../../../../common/dom/fire_event"; import "../../../../components/ha-card"; import { Trigger } from "../../../../data/automation"; diff --git a/src/panels/config/automation/trigger/types/ha-automation-trigger-device.ts b/src/panels/config/automation/trigger/types/ha-automation-trigger-device.ts index e7145e58e..51a579c2c 100644 --- a/src/panels/config/automation/trigger/types/ha-automation-trigger-device.ts +++ b/src/panels/config/automation/trigger/types/ha-automation-trigger-device.ts @@ -1,4 +1,5 @@ -import { customElement, html, state, LitElement, property } from "lit-element"; +import { html, LitElement } from "lit"; +import { customElement, property, state } from "lit/decorators"; import memoizeOne from "memoize-one"; import { fireEvent } from "../../../../../common/dom/fire_event"; import "../../../../../components/device/ha-device-picker"; diff --git a/src/panels/config/automation/trigger/types/ha-automation-trigger-event.ts b/src/panels/config/automation/trigger/types/ha-automation-trigger-event.ts index 9d53e8ea0..de1170214 100644 --- a/src/panels/config/automation/trigger/types/ha-automation-trigger-event.ts +++ b/src/panels/config/automation/trigger/types/ha-automation-trigger-event.ts @@ -1,6 +1,6 @@ import "@polymer/paper-input/paper-input"; -import { customElement, LitElement, property } from "lit-element"; -import { html } from "lit-html"; +import { html, LitElement } from "lit"; +import { customElement, property } from "lit/decorators"; import { fireEvent } from "../../../../../common/dom/fire_event"; import "../../../../../components/ha-yaml-editor"; import "../../../../../components/user/ha-users-picker"; diff --git a/src/panels/config/automation/trigger/types/ha-automation-trigger-geo_location.ts b/src/panels/config/automation/trigger/types/ha-automation-trigger-geo_location.ts index b65fac6d9..55e08598d 100644 --- a/src/panels/config/automation/trigger/types/ha-automation-trigger-geo_location.ts +++ b/src/panels/config/automation/trigger/types/ha-automation-trigger-geo_location.ts @@ -1,7 +1,8 @@ import "@polymer/paper-radio-button/paper-radio-button"; import "@polymer/paper-radio-group/paper-radio-group"; import type { PaperRadioGroupElement } from "@polymer/paper-radio-group/paper-radio-group"; -import { customElement, html, LitElement, property } from "lit-element"; +import { html, LitElement } from "lit"; +import { customElement, property } from "lit/decorators"; import { fireEvent } from "../../../../../common/dom/fire_event"; import "../../../../../components/entity/ha-entity-picker"; import type { GeoLocationTrigger } from "../../../../../data/automation"; diff --git a/src/panels/config/automation/trigger/types/ha-automation-trigger-homeassistant.ts b/src/panels/config/automation/trigger/types/ha-automation-trigger-homeassistant.ts index f811e20f0..1d45e6c5f 100644 --- a/src/panels/config/automation/trigger/types/ha-automation-trigger-homeassistant.ts +++ b/src/panels/config/automation/trigger/types/ha-automation-trigger-homeassistant.ts @@ -1,7 +1,8 @@ import "@polymer/paper-radio-button/paper-radio-button"; import "@polymer/paper-radio-group/paper-radio-group"; import type { PaperRadioGroupElement } from "@polymer/paper-radio-group/paper-radio-group"; -import { customElement, html, LitElement, property } from "lit-element"; +import { html, LitElement } from "lit"; +import { customElement, property } from "lit/decorators"; import { fireEvent } from "../../../../../common/dom/fire_event"; import type { HassTrigger } from "../../../../../data/automation"; import type { HomeAssistant } from "../../../../../types"; diff --git a/src/panels/config/automation/trigger/types/ha-automation-trigger-mqtt.ts b/src/panels/config/automation/trigger/types/ha-automation-trigger-mqtt.ts index 0450f37ff..e3e997771 100644 --- a/src/panels/config/automation/trigger/types/ha-automation-trigger-mqtt.ts +++ b/src/panels/config/automation/trigger/types/ha-automation-trigger-mqtt.ts @@ -1,5 +1,6 @@ import "@polymer/paper-input/paper-input"; -import { customElement, html, LitElement, property } from "lit-element"; +import { html, LitElement } from "lit"; +import { customElement, property } from "lit/decorators"; import { MqttTrigger } from "../../../../../data/automation"; import { HomeAssistant } from "../../../../../types"; import { diff --git a/src/panels/config/automation/trigger/types/ha-automation-trigger-numeric_state.ts b/src/panels/config/automation/trigger/types/ha-automation-trigger-numeric_state.ts index 0c54205b2..cf7cf6411 100644 --- a/src/panels/config/automation/trigger/types/ha-automation-trigger-numeric_state.ts +++ b/src/panels/config/automation/trigger/types/ha-automation-trigger-numeric_state.ts @@ -1,6 +1,7 @@ import "@polymer/paper-input/paper-input"; import "@polymer/paper-input/paper-textarea"; -import { customElement, html, LitElement, property } from "lit-element"; +import { html, LitElement } from "lit"; +import { customElement, property } from "lit/decorators"; import "../../../../../components/entity/ha-entity-picker"; import { ForDict, NumericStateTrigger } from "../../../../../data/automation"; import { HomeAssistant } from "../../../../../types"; diff --git a/src/panels/config/automation/trigger/types/ha-automation-trigger-state.ts b/src/panels/config/automation/trigger/types/ha-automation-trigger-state.ts index c12890431..1ad3b1855 100644 --- a/src/panels/config/automation/trigger/types/ha-automation-trigger-state.ts +++ b/src/panels/config/automation/trigger/types/ha-automation-trigger-state.ts @@ -1,5 +1,6 @@ import "@polymer/paper-input/paper-input"; -import { customElement, html, LitElement, property } from "lit-element"; +import { html, LitElement } from "lit"; +import { customElement, property } from "lit/decorators"; import "../../../../../components/entity/ha-entity-attribute-picker"; import "../../../../../components/entity/ha-entity-picker"; import { ForDict, StateTrigger } from "../../../../../data/automation"; diff --git a/src/panels/config/automation/trigger/types/ha-automation-trigger-sun.ts b/src/panels/config/automation/trigger/types/ha-automation-trigger-sun.ts index 3c2bb9cf6..d940a3e1c 100644 --- a/src/panels/config/automation/trigger/types/ha-automation-trigger-sun.ts +++ b/src/panels/config/automation/trigger/types/ha-automation-trigger-sun.ts @@ -2,7 +2,8 @@ import "@polymer/paper-input/paper-input"; import "@polymer/paper-radio-button/paper-radio-button"; import "@polymer/paper-radio-group/paper-radio-group"; import type { PaperRadioGroupElement } from "@polymer/paper-radio-group/paper-radio-group"; -import { customElement, html, LitElement, property } from "lit-element"; +import { html, LitElement } from "lit"; +import { customElement, property } from "lit/decorators"; import { fireEvent } from "../../../../../common/dom/fire_event"; import type { SunTrigger } from "../../../../../data/automation"; import type { HomeAssistant } from "../../../../../types"; diff --git a/src/panels/config/automation/trigger/types/ha-automation-trigger-tag.ts b/src/panels/config/automation/trigger/types/ha-automation-trigger-tag.ts index 7851562ec..5accba1a2 100644 --- a/src/panels/config/automation/trigger/types/ha-automation-trigger-tag.ts +++ b/src/panels/config/automation/trigger/types/ha-automation-trigger-tag.ts @@ -1,12 +1,6 @@ import "@polymer/paper-input/paper-input"; -import { - customElement, - html, - state, - LitElement, - property, - PropertyValues, -} from "lit-element"; +import { html, LitElement, PropertyValues } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { fireEvent } from "../../../../../common/dom/fire_event"; import { TagTrigger } from "../../../../../data/automation"; import { fetchTags, Tag } from "../../../../../data/tag"; diff --git a/src/panels/config/automation/trigger/types/ha-automation-trigger-template.ts b/src/panels/config/automation/trigger/types/ha-automation-trigger-template.ts index 5e9483e0c..2a40c2fc9 100644 --- a/src/panels/config/automation/trigger/types/ha-automation-trigger-template.ts +++ b/src/panels/config/automation/trigger/types/ha-automation-trigger-template.ts @@ -1,5 +1,6 @@ import "@polymer/paper-input/paper-textarea"; -import { customElement, html, LitElement, property } from "lit-element"; +import { html, LitElement } from "lit"; +import { customElement, property } from "lit/decorators"; import { TemplateTrigger } from "../../../../../data/automation"; import { HomeAssistant } from "../../../../../types"; import { handleChangeEvent } from "../ha-automation-trigger-row"; diff --git a/src/panels/config/automation/trigger/types/ha-automation-trigger-time.ts b/src/panels/config/automation/trigger/types/ha-automation-trigger-time.ts index 821ca2ce9..ddb040490 100644 --- a/src/panels/config/automation/trigger/types/ha-automation-trigger-time.ts +++ b/src/panels/config/automation/trigger/types/ha-automation-trigger-time.ts @@ -1,5 +1,6 @@ import "@polymer/paper-input/paper-input"; -import { customElement, html, state, LitElement, property } from "lit-element"; +import { html, LitElement } from "lit"; +import { customElement, property, state } from "lit/decorators"; import "../../../../../components/entity/ha-entity-picker"; import "../../../../../components/ha-formfield"; import "../../../../../components/ha-radio"; diff --git a/src/panels/config/automation/trigger/types/ha-automation-trigger-time_pattern.ts b/src/panels/config/automation/trigger/types/ha-automation-trigger-time_pattern.ts index 1f0f081ad..b1b0a74f4 100644 --- a/src/panels/config/automation/trigger/types/ha-automation-trigger-time_pattern.ts +++ b/src/panels/config/automation/trigger/types/ha-automation-trigger-time_pattern.ts @@ -1,5 +1,6 @@ import "@polymer/paper-input/paper-input"; -import { customElement, html, LitElement, property } from "lit-element"; +import { html, LitElement } from "lit"; +import { customElement, property } from "lit/decorators"; import { TimePatternTrigger } from "../../../../../data/automation"; import { HomeAssistant } from "../../../../../types"; import { diff --git a/src/panels/config/automation/trigger/types/ha-automation-trigger-webhook.ts b/src/panels/config/automation/trigger/types/ha-automation-trigger-webhook.ts index 3eb56a805..4d90ec021 100644 --- a/src/panels/config/automation/trigger/types/ha-automation-trigger-webhook.ts +++ b/src/panels/config/automation/trigger/types/ha-automation-trigger-webhook.ts @@ -1,5 +1,6 @@ import "@polymer/paper-input/paper-input"; -import { customElement, html, LitElement, property } from "lit-element"; +import { html, LitElement } from "lit"; +import { customElement, property } from "lit/decorators"; import { WebhookTrigger } from "../../../../../data/automation"; import { HomeAssistant } from "../../../../../types"; import { handleChangeEvent } from "../ha-automation-trigger-row"; diff --git a/src/panels/config/automation/trigger/types/ha-automation-trigger-zone.ts b/src/panels/config/automation/trigger/types/ha-automation-trigger-zone.ts index 4d93d61f6..a8b4ba457 100644 --- a/src/panels/config/automation/trigger/types/ha-automation-trigger-zone.ts +++ b/src/panels/config/automation/trigger/types/ha-automation-trigger-zone.ts @@ -1,7 +1,8 @@ import "@polymer/paper-radio-button/paper-radio-button"; import "@polymer/paper-radio-group/paper-radio-group"; import type { PaperRadioGroupElement } from "@polymer/paper-radio-group/paper-radio-group"; -import { customElement, html, LitElement, property } from "lit-element"; +import { html, LitElement } from "lit"; +import { customElement, property } from "lit/decorators"; import { fireEvent } from "../../../../../common/dom/fire_event"; import { computeStateDomain } from "../../../../../common/entity/compute_state_domain"; import { hasLocation } from "../../../../../common/entity/has_location"; diff --git a/src/panels/config/blueprint/dialog-import-blueprint.ts b/src/panels/config/blueprint/dialog-import-blueprint.ts index 5a46f4203..db171c644 100644 --- a/src/panels/config/blueprint/dialog-import-blueprint.ts +++ b/src/panels/config/blueprint/dialog-import-blueprint.ts @@ -1,21 +1,14 @@ -import "../../../components/ha-markdown"; import "@material/mwc-button"; import "@polymer/paper-dialog-scrollable/paper-dialog-scrollable"; import "@polymer/paper-input/paper-input"; import type { PaperInputElement } from "@polymer/paper-input/paper-input"; -import { - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - query, - TemplateResult, -} from "lit-element"; +import { CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state, query } from "lit/decorators"; import { fireEvent } from "../../../common/dom/fire_event"; import "../../../components/ha-circular-progress"; +import { createCloseHeading } from "../../../components/ha-dialog"; import "../../../components/ha-expansion-panel"; +import "../../../components/ha-markdown"; import { BlueprintImportResult, importBlueprint, @@ -23,7 +16,6 @@ import { } from "../../../data/blueprint"; import { haStyleDialog } from "../../../resources/styles"; import type { HomeAssistant } from "../../../types"; -import { createCloseHeading } from "../../../components/ha-dialog"; @customElement("ha-dialog-import-blueprint") class DialogImportBlueprint extends LitElement { diff --git a/src/panels/config/blueprint/ha-blueprint-overview.ts b/src/panels/config/blueprint/ha-blueprint-overview.ts index 299ee0d35..9f0618dc6 100644 --- a/src/panels/config/blueprint/ha-blueprint-overview.ts +++ b/src/panels/config/blueprint/ha-blueprint-overview.ts @@ -9,13 +9,12 @@ import { import "@polymer/paper-tooltip/paper-tooltip"; import { CSSResultGroup, - customElement, html, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, property } from "lit/decorators"; import memoizeOne from "memoize-one"; import { fireEvent } from "../../../common/dom/fire_event"; import { navigate } from "../../../common/navigate"; diff --git a/src/panels/config/blueprint/ha-config-blueprint.ts b/src/panels/config/blueprint/ha-config-blueprint.ts index efe7e8264..3ea73842d 100644 --- a/src/panels/config/blueprint/ha-config-blueprint.ts +++ b/src/panels/config/blueprint/ha-config-blueprint.ts @@ -1,4 +1,5 @@ -import { customElement, property, PropertyValues } from "lit-element"; +import { PropertyValues } from "lit"; +import { customElement, property } from "lit/decorators"; import { Blueprints, fetchBlueprints } from "../../../data/blueprint"; import { HassRouterPage, diff --git a/src/panels/config/cloud/account/cloud-alexa-pref.ts b/src/panels/config/cloud/account/cloud-alexa-pref.ts index 4d66bb738..9b98f7d56 100644 --- a/src/panels/config/cloud/account/cloud-alexa-pref.ts +++ b/src/panels/config/cloud/account/cloud-alexa-pref.ts @@ -1,13 +1,6 @@ import "@material/mwc-button"; -import { - css, - CSSResultGroup, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { property, state } from "lit/decorators"; import { fireEvent } from "../../../../common/dom/fire_event"; import "../../../../components/ha-card"; import "../../../../components/ha-switch"; diff --git a/src/panels/config/cloud/account/cloud-google-pref.ts b/src/panels/config/cloud/account/cloud-google-pref.ts index 8bb77a041..b572e7a67 100644 --- a/src/panels/config/cloud/account/cloud-google-pref.ts +++ b/src/panels/config/cloud/account/cloud-google-pref.ts @@ -1,14 +1,8 @@ import "@material/mwc-button"; import "@polymer/paper-input/paper-input"; import type { PaperInputElement } from "@polymer/paper-input/paper-input"; -import { - css, - CSSResultGroup, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { property } from "lit/decorators"; import { fireEvent } from "../../../../common/dom/fire_event"; import "../../../../components/buttons/ha-call-api-button"; import "../../../../components/ha-card"; diff --git a/src/panels/config/cloud/account/cloud-remote-pref.ts b/src/panels/config/cloud/account/cloud-remote-pref.ts index 5449e7d9f..a2973d250 100644 --- a/src/panels/config/cloud/account/cloud-remote-pref.ts +++ b/src/panels/config/cloud/account/cloud-remote-pref.ts @@ -1,14 +1,7 @@ import "@material/mwc-button"; import "@polymer/paper-item/paper-item-body"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import { fireEvent } from "../../../../common/dom/fire_event"; import "../../../../components/ha-card"; import "../../../../components/ha-switch"; diff --git a/src/panels/config/cloud/account/cloud-tts-pref.ts b/src/panels/config/cloud/account/cloud-tts-pref.ts index 04811cfe1..1b57e7b11 100644 --- a/src/panels/config/cloud/account/cloud-tts-pref.ts +++ b/src/panels/config/cloud/account/cloud-tts-pref.ts @@ -1,32 +1,24 @@ +import "@material/mwc-button"; import "@polymer/paper-dropdown-menu/paper-dropdown-menu-light"; import "@polymer/paper-item/paper-item"; import "@polymer/paper-listbox/paper-listbox"; -import "@material/mwc-button"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; +import memoizeOne from "memoize-one"; +import { fireEvent } from "../../../../common/dom/fire_event"; +import { caseInsensitiveCompare } from "../../../../common/string/compare"; import "../../../../components/ha-card"; -import "../../../../components/ha-switch"; import "../../../../components/ha-svg-icon"; +import "../../../../components/ha-switch"; import { CloudStatusLoggedIn, CloudTTSInfo, getCloudTTSInfo, updateCloudPref, } from "../../../../data/cloud"; -import type { HomeAssistant } from "../../../../types"; import { showAlertDialog } from "../../../../dialogs/generic/show-dialog-box"; import { translationMetadata } from "../../../../resources/translations-metadata"; -import { caseInsensitiveCompare } from "../../../../common/string/compare"; -import memoizeOne from "memoize-one"; -import { fireEvent } from "../../../../common/dom/fire_event"; +import type { HomeAssistant } from "../../../../types"; import { showTryTtsDialog } from "./show-dialog-cloud-tts-try"; @customElement("cloud-tts-pref") diff --git a/src/panels/config/cloud/account/cloud-webhooks.ts b/src/panels/config/cloud/account/cloud-webhooks.ts index 6ea5063ad..309e78b65 100644 --- a/src/panels/config/cloud/account/cloud-webhooks.ts +++ b/src/panels/config/cloud/account/cloud-webhooks.ts @@ -1,20 +1,12 @@ import "@polymer/paper-item/paper-item"; import "@polymer/paper-item/paper-item-body"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - PropertyValues, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, PropertyValues } from "lit"; +import { customElement, property, state } from "lit/decorators"; +import { isComponentLoaded } from "../../../../common/config/is_component_loaded"; import "../../../../components/ha-card"; import "../../../../components/ha-circular-progress"; import "../../../../components/ha-settings-row"; import "../../../../components/ha-switch"; -import { isComponentLoaded } from "../../../../common/config/is_component_loaded"; import { CloudStatusLoggedIn, CloudWebhook, diff --git a/src/panels/config/cloud/account/dialog-cloud-tts-try.ts b/src/panels/config/cloud/account/dialog-cloud-tts-try.ts index 4fbc53501..9da9b5ca1 100644 --- a/src/panels/config/cloud/account/dialog-cloud-tts-try.ts +++ b/src/panels/config/cloud/account/dialog-cloud-tts-try.ts @@ -1,34 +1,25 @@ import "@material/mwc-button"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - query, - TemplateResult, -} from "lit-element"; -import { HomeAssistant } from "../../../../types"; -import { TryTtsDialogParams } from "./show-dialog-cloud-tts-try"; -import { haStyleDialog } from "../../../../resources/styles"; -import { fireEvent } from "../../../../common/dom/fire_event"; -import { convertTextToSpeech } from "../../../../data/tts"; -import { showAlertDialog } from "../../../../dialogs/generic/show-dialog-box"; +import { mdiPlayCircleOutline } from "@mdi/js"; import "@polymer/paper-input/paper-textarea"; -import "../../../../components/ha-paper-dropdown-menu"; -import { computeStateDomain } from "../../../../common/entity/compute_state_domain"; -import { computeStateName } from "../../../../common/entity/compute_state_name"; +import type { PaperTextareaElement } from "@polymer/paper-input/paper-textarea"; import "@polymer/paper-item/paper-item"; import "@polymer/paper-listbox/paper-listbox"; -import { supportsFeature } from "../../../../common/entity/supports-feature"; -import { SUPPORT_PLAY_MEDIA } from "../../../../data/media-player"; -import { createCloseHeading } from "../../../../components/ha-dialog"; -import { mdiPlayCircleOutline } from "@mdi/js"; import type { PaperListboxElement } from "@polymer/paper-listbox/paper-listbox"; -import type { PaperTextareaElement } from "@polymer/paper-input/paper-textarea"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state, query } from "lit/decorators"; import { LocalStorage } from "../../../../common/decorators/local-storage"; +import { fireEvent } from "../../../../common/dom/fire_event"; +import { computeStateDomain } from "../../../../common/entity/compute_state_domain"; +import { computeStateName } from "../../../../common/entity/compute_state_name"; +import { supportsFeature } from "../../../../common/entity/supports-feature"; +import { createCloseHeading } from "../../../../components/ha-dialog"; +import "../../../../components/ha-paper-dropdown-menu"; +import { SUPPORT_PLAY_MEDIA } from "../../../../data/media-player"; +import { convertTextToSpeech } from "../../../../data/tts"; +import { showAlertDialog } from "../../../../dialogs/generic/show-dialog-box"; +import { haStyleDialog } from "../../../../resources/styles"; +import { HomeAssistant } from "../../../../types"; +import { TryTtsDialogParams } from "./show-dialog-cloud-tts-try"; @customElement("dialog-cloud-try-tts") export class DialogTryTts extends LitElement { diff --git a/src/panels/config/cloud/alexa/cloud-alexa.ts b/src/panels/config/cloud/alexa/cloud-alexa.ts index ab88d5d59..f3cdda697 100644 --- a/src/panels/config/cloud/alexa/cloud-alexa.ts +++ b/src/panels/config/cloud/alexa/cloud-alexa.ts @@ -6,17 +6,9 @@ import { mdiCloseBox, mdiCloseBoxMultiple, } from "@mdi/js"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; import memoizeOne from "memoize-one"; import { fireEvent } from "../../../../common/dom/fire_event"; import { computeDomain } from "../../../../common/entity/compute_domain"; diff --git a/src/panels/config/cloud/dialog-cloud-certificate/dialog-cloud-certificate.ts b/src/panels/config/cloud/dialog-cloud-certificate/dialog-cloud-certificate.ts index 64ccfb71e..8351c20cc 100644 --- a/src/panels/config/cloud/dialog-cloud-certificate/dialog-cloud-certificate.ts +++ b/src/panels/config/cloud/dialog-cloud-certificate/dialog-cloud-certificate.ts @@ -1,12 +1,6 @@ import "@material/mwc-button"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement } from "lit"; +import { customElement, property } from "lit/decorators"; import { formatDateTime } from "../../../../common/datetime/format_date_time"; import "../../../../components/dialog/ha-paper-dialog"; import type { HaPaperDialog } from "../../../../components/dialog/ha-paper-dialog"; diff --git a/src/panels/config/cloud/dialog-manage-cloudhook/dialog-manage-cloudhook.ts b/src/panels/config/cloud/dialog-manage-cloudhook/dialog-manage-cloudhook.ts index 8325ec4bd..2fea1ef01 100644 --- a/src/panels/config/cloud/dialog-manage-cloudhook/dialog-manage-cloudhook.ts +++ b/src/panels/config/cloud/dialog-manage-cloudhook/dialog-manage-cloudhook.ts @@ -2,7 +2,8 @@ import "@material/mwc-button"; import "@polymer/paper-dialog-scrollable/paper-dialog-scrollable"; import "@polymer/paper-input/paper-input"; import type { PaperInputElement } from "@polymer/paper-input/paper-input"; -import { css, CSSResultGroup, html, state, LitElement } from "lit-element"; +import { css, CSSResultGroup, html, LitElement } from "lit"; +import { state } from "lit/decorators"; import "../../../../components/dialog/ha-paper-dialog"; import type { HaPaperDialog } from "../../../../components/dialog/ha-paper-dialog"; import { showConfirmationDialog } from "../../../../dialogs/generic/show-dialog-box"; diff --git a/src/panels/config/cloud/google-assistant/cloud-google-assistant.ts b/src/panels/config/cloud/google-assistant/cloud-google-assistant.ts index 179bd9568..29068eeb7 100644 --- a/src/panels/config/cloud/google-assistant/cloud-google-assistant.ts +++ b/src/panels/config/cloud/google-assistant/cloud-google-assistant.ts @@ -6,17 +6,9 @@ import { mdiCloseBox, mdiCloseBoxMultiple, } from "@mdi/js"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; import memoizeOne from "memoize-one"; import { fireEvent } from "../../../../common/dom/fire_event"; import { computeDomain } from "../../../../common/entity/compute_domain"; diff --git a/src/panels/config/cloud/ha-config-cloud.ts b/src/panels/config/cloud/ha-config-cloud.ts index 7fbe569f8..62db01a43 100644 --- a/src/panels/config/cloud/ha-config-cloud.ts +++ b/src/panels/config/cloud/ha-config-cloud.ts @@ -1,5 +1,5 @@ import { PolymerElement } from "@polymer/polymer"; -import { customElement, state, property } from "lit-element"; +import { customElement, property, state } from "lit/decorators"; import { navigate } from "../../../common/navigate"; import { CloudStatus } from "../../../data/cloud"; import { diff --git a/src/panels/config/core/ha-config-analytics.ts b/src/panels/config/core/ha-config-analytics.ts index b533c4c40..1050e7f8c 100644 --- a/src/panels/config/core/ha-config-analytics.ts +++ b/src/panels/config/core/ha-config-analytics.ts @@ -2,14 +2,12 @@ import "@material/mwc-button/mwc-button"; import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, property, state } from "lit/decorators"; import { isComponentLoaded } from "../../../common/config/is_component_loaded"; import "../../../components/ha-analytics"; import { analyticsLearnMore } from "../../../components/ha-analytics-learn-more"; diff --git a/src/panels/config/core/ha-config-core-form.ts b/src/panels/config/core/ha-config-core-form.ts index 848d89bbd..322c2697c 100644 --- a/src/panels/config/core/ha-config-core-form.ts +++ b/src/panels/config/core/ha-config-core-form.ts @@ -3,16 +3,8 @@ import "@polymer/paper-input/paper-input"; import type { PaperInputElement } from "@polymer/paper-input/paper-input"; import "@polymer/paper-radio-button/paper-radio-button"; import "@polymer/paper-radio-group/paper-radio-group"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import memoizeOne from "memoize-one"; import { UNIT_C } from "../../../common/const"; import "../../../components/ha-card"; diff --git a/src/panels/config/core/ha-config-name-form.ts b/src/panels/config/core/ha-config-name-form.ts index bbb9f1603..f99e073cb 100644 --- a/src/panels/config/core/ha-config-name-form.ts +++ b/src/panels/config/core/ha-config-name-form.ts @@ -3,15 +3,8 @@ import "@polymer/paper-input/paper-input"; import type { PaperInputElement } from "@polymer/paper-input/paper-input"; import "@polymer/paper-radio-button/paper-radio-button"; import "@polymer/paper-radio-group/paper-radio-group"; -import { - css, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import "../../../components/ha-card"; import { ConfigUpdateValues, saveCoreConfig } from "../../../data/core"; import type { PolymerChangedEvent } from "../../../polymer-types"; diff --git a/src/panels/config/core/ha-config-url-form.ts b/src/panels/config/core/ha-config-url-form.ts index 9a26b8323..6c7e9f046 100644 --- a/src/panels/config/core/ha-config-url-form.ts +++ b/src/panels/config/core/ha-config-url-form.ts @@ -1,16 +1,8 @@ import "@material/mwc-button/mwc-button"; import "@polymer/paper-input/paper-input"; import type { PaperInputElement } from "@polymer/paper-input/paper-input"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import "../../../components/ha-card"; import { saveCoreConfig } from "../../../data/core"; import type { PolymerChangedEvent } from "../../../polymer-types"; diff --git a/src/panels/config/customize/ha-config-customize.ts b/src/panels/config/customize/ha-config-customize.ts index a79d35683..d6109546f 100644 --- a/src/panels/config/customize/ha-config-customize.ts +++ b/src/panels/config/customize/ha-config-customize.ts @@ -1,11 +1,5 @@ -import { - css, - CSSResultGroup, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { property } from "lit/decorators"; import "../../../components/ha-card"; import "../../../layouts/hass-loading-screen"; import "../../../layouts/hass-tabs-subpage"; diff --git a/src/panels/config/dashboard/ha-config-dashboard.ts b/src/panels/config/dashboard/ha-config-dashboard.ts index f4844895e..f81527cce 100644 --- a/src/panels/config/dashboard/ha-config-dashboard.ts +++ b/src/panels/config/dashboard/ha-config-dashboard.ts @@ -1,15 +1,8 @@ import { mdiCloudLock } from "@mdi/js"; import "@polymer/app-layout/app-header/app-header"; import "@polymer/app-layout/app-toolbar/app-toolbar"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import { isComponentLoaded } from "../../../common/config/is_component_loaded"; import "../../../components/ha-card"; import "../../../components/ha-icon-next"; diff --git a/src/panels/config/dashboard/ha-config-navigation.ts b/src/panels/config/dashboard/ha-config-navigation.ts index 935cc544f..ee08290b0 100644 --- a/src/panels/config/dashboard/ha-config-navigation.ts +++ b/src/panels/config/dashboard/ha-config-navigation.ts @@ -1,14 +1,7 @@ import "@polymer/paper-item/paper-icon-item"; import "@polymer/paper-item/paper-item-body"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import { canShowPage } from "../../../common/config/can_show_page"; import "../../../components/ha-card"; import "../../../components/ha-icon-next"; diff --git a/src/panels/config/devices/device-detail/ha-device-actions-card.ts b/src/panels/config/devices/device-detail/ha-device-actions-card.ts index a5d5e4507..bec915a9e 100644 --- a/src/panels/config/devices/device-detail/ha-device-actions-card.ts +++ b/src/panels/config/devices/device-detail/ha-device-actions-card.ts @@ -1,4 +1,4 @@ -import { customElement } from "lit-element"; +import { customElement } from "lit/decorators"; import "../../../../components/ha-card"; import { DeviceAction, diff --git a/src/panels/config/devices/device-detail/ha-device-automation-card.ts b/src/panels/config/devices/device-detail/ha-device-automation-card.ts index ed4a1caa1..b77958e82 100644 --- a/src/panels/config/devices/device-detail/ha-device-automation-card.ts +++ b/src/panels/config/devices/device-detail/ha-device-automation-card.ts @@ -1,11 +1,5 @@ -import { - css, - CSSResultGroup, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { property } from "lit/decorators"; import "../../../../components/ha-card"; import "../../../../components/ha-chip-set"; import { showAutomationEditor } from "../../../../data/automation"; diff --git a/src/panels/config/devices/device-detail/ha-device-automation-dialog.ts b/src/panels/config/devices/device-detail/ha-device-automation-dialog.ts index 876289e04..eb18201a2 100644 --- a/src/panels/config/devices/device-detail/ha-device-automation-dialog.ts +++ b/src/panels/config/devices/device-detail/ha-device-automation-dialog.ts @@ -1,12 +1,6 @@ -import { - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import "@material/mwc-button/mwc-button"; +import { CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { fireEvent } from "../../../../common/dom/fire_event"; import "../../../../components/ha-dialog"; import { @@ -23,7 +17,6 @@ import "./ha-device-actions-card"; import "./ha-device-conditions-card"; import "./ha-device-triggers-card"; import { DeviceAutomationDialogParams } from "./show-dialog-device-automation"; -import "@material/mwc-button/mwc-button"; @customElement("dialog-device-automation") export class DialogDeviceAutomation extends LitElement { diff --git a/src/panels/config/devices/device-detail/ha-device-conditions-card.ts b/src/panels/config/devices/device-detail/ha-device-conditions-card.ts index 54f126667..ffa084bf6 100644 --- a/src/panels/config/devices/device-detail/ha-device-conditions-card.ts +++ b/src/panels/config/devices/device-detail/ha-device-conditions-card.ts @@ -1,4 +1,4 @@ -import { customElement } from "lit-element"; +import { customElement } from "lit/decorators"; import "../../../../components/ha-card"; import { DeviceCondition, 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 7a779b606..5bb169256 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 @@ -4,13 +4,12 @@ import "@polymer/paper-item/paper-item-body"; import { css, CSSResultGroup, - customElement, html, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, property } from "lit/decorators"; import { computeDomain } from "../../../../common/entity/compute_domain"; import { domainIcon } from "../../../../common/entity/domain_icon"; import "../../../../components/entity/state-badge"; diff --git a/src/panels/config/devices/device-detail/ha-device-info-card.ts b/src/panels/config/devices/device-detail/ha-device-info-card.ts index bddb19aec..f442246d0 100644 --- a/src/panels/config/devices/device-detail/ha-device-info-card.ts +++ b/src/panels/config/devices/device-detail/ha-device-info-card.ts @@ -1,12 +1,5 @@ -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import { AreaRegistryEntry } from "../../../../data/area_registry"; import { computeDeviceName, diff --git a/src/panels/config/devices/device-detail/ha-device-triggers-card.ts b/src/panels/config/devices/device-detail/ha-device-triggers-card.ts index ec14f55d3..bdf15ee03 100644 --- a/src/panels/config/devices/device-detail/ha-device-triggers-card.ts +++ b/src/panels/config/devices/device-detail/ha-device-triggers-card.ts @@ -1,4 +1,4 @@ -import { customElement } from "lit-element"; +import { customElement } from "lit/decorators"; import { DeviceTrigger, localizeDeviceAutomationTrigger, diff --git a/src/panels/config/devices/device-detail/integration-elements/mqtt/dialog-mqtt-device-debug-info.ts b/src/panels/config/devices/device-detail/integration-elements/mqtt/dialog-mqtt-device-debug-info.ts index 3f0a740f9..f97427a06 100644 --- a/src/panels/config/devices/device-detail/integration-elements/mqtt/dialog-mqtt-device-debug-info.ts +++ b/src/panels/config/devices/device-detail/integration-elements/mqtt/dialog-mqtt-device-debug-info.ts @@ -1,13 +1,6 @@ import "@material/mwc-button/mwc-button"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, state } from "lit/decorators"; import { computeStateName } from "../../../../../../common/entity/compute_state_name"; import { computeRTLDirection } from "../../../../../../common/util/compute_rtl"; import "../../../../../../components/ha-dialog"; diff --git a/src/panels/config/devices/device-detail/integration-elements/mqtt/ha-device-actions-mqtt.ts b/src/panels/config/devices/device-detail/integration-elements/mqtt/ha-device-actions-mqtt.ts index 54ab5b940..4be041345 100644 --- a/src/panels/config/devices/device-detail/integration-elements/mqtt/ha-device-actions-mqtt.ts +++ b/src/panels/config/devices/device-detail/integration-elements/mqtt/ha-device-actions-mqtt.ts @@ -1,12 +1,5 @@ -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import { DeviceRegistryEntry } from "../../../../../../data/device_registry"; import { removeMQTTDeviceEntry } from "../../../../../../data/mqtt"; import { showConfirmationDialog } from "../../../../../../dialogs/generic/show-dialog-box"; diff --git a/src/panels/config/devices/device-detail/integration-elements/mqtt/mqtt-discovery-payload.ts b/src/panels/config/devices/device-detail/integration-elements/mqtt/mqtt-discovery-payload.ts index afea8620f..cc80ae4b6 100644 --- a/src/panels/config/devices/device-detail/integration-elements/mqtt/mqtt-discovery-payload.ts +++ b/src/panels/config/devices/device-detail/integration-elements/mqtt/mqtt-discovery-payload.ts @@ -1,15 +1,7 @@ import { safeDump } from "js-yaml"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; @customElement("mqtt-discovery-payload") class MQTTDiscoveryPayload extends LitElement { diff --git a/src/panels/config/devices/device-detail/integration-elements/mqtt/mqtt-messages.ts b/src/panels/config/devices/device-detail/integration-elements/mqtt/mqtt-messages.ts index 9bd2ec167..734b4ae08 100644 --- a/src/panels/config/devices/device-detail/integration-elements/mqtt/mqtt-messages.ts +++ b/src/panels/config/devices/device-detail/integration-elements/mqtt/mqtt-messages.ts @@ -1,15 +1,7 @@ import { safeDump } from "js-yaml"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; import { formatTimeWithSeconds } from "../../../../../../common/datetime/format_time"; import { MQTTMessage } from "../../../../../../data/mqtt"; import { HomeAssistant } from "../../../../../../types"; diff --git a/src/panels/config/devices/device-detail/integration-elements/ozw/ha-device-actions-ozw.ts b/src/panels/config/devices/device-detail/integration-elements/ozw/ha-device-actions-ozw.ts index 9fe72d2ff..d932d2edc 100644 --- a/src/panels/config/devices/device-detail/integration-elements/ozw/ha-device-actions-ozw.ts +++ b/src/panels/config/devices/device-detail/integration-elements/ozw/ha-device-actions-ozw.ts @@ -2,13 +2,12 @@ import "@material/mwc-button/mwc-button"; import { css, CSSResultGroup, - customElement, html, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, property } from "lit/decorators"; import { navigate } from "../../../../../../common/navigate"; import { DeviceRegistryEntry } from "../../../../../../data/device_registry"; import { diff --git a/src/panels/config/devices/device-detail/integration-elements/ozw/ha-device-info-ozw.ts b/src/panels/config/devices/device-detail/integration-elements/ozw/ha-device-info-ozw.ts index 3fab405b9..bfb4d7bba 100644 --- a/src/panels/config/devices/device-detail/integration-elements/ozw/ha-device-info-ozw.ts +++ b/src/panels/config/devices/device-detail/integration-elements/ozw/ha-device-info-ozw.ts @@ -1,14 +1,12 @@ import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, property, state } from "lit/decorators"; import { DeviceRegistryEntry } from "../../../../../../data/device_registry"; import { fetchOZWNodeStatus, diff --git a/src/panels/config/devices/device-detail/integration-elements/tasmota/ha-device-actions-tasmota.ts b/src/panels/config/devices/device-detail/integration-elements/tasmota/ha-device-actions-tasmota.ts index 6b4009dd0..33bc22a3a 100644 --- a/src/panels/config/devices/device-detail/integration-elements/tasmota/ha-device-actions-tasmota.ts +++ b/src/panels/config/devices/device-detail/integration-elements/tasmota/ha-device-actions-tasmota.ts @@ -1,12 +1,5 @@ -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import { DeviceRegistryEntry } from "../../../../../../data/device_registry"; import { removeTasmotaDeviceEntry } from "../../../../../../data/tasmota"; import { showConfirmationDialog } from "../../../../../../dialogs/generic/show-dialog-box"; diff --git a/src/panels/config/devices/device-detail/integration-elements/zha/ha-device-actions-zha.ts b/src/panels/config/devices/device-detail/integration-elements/zha/ha-device-actions-zha.ts index 723b0f442..cffd1ca1e 100644 --- a/src/panels/config/devices/device-detail/integration-elements/zha/ha-device-actions-zha.ts +++ b/src/panels/config/devices/device-detail/integration-elements/zha/ha-device-actions-zha.ts @@ -1,14 +1,12 @@ import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, property, state } from "lit/decorators"; import { navigate } from "../../../../../../common/navigate"; import { DeviceRegistryEntry } from "../../../../../../data/device_registry"; import { fetchZHADevice, ZHADevice } from "../../../../../../data/zha"; @@ -16,9 +14,9 @@ import { showConfirmationDialog } from "../../../../../../dialogs/generic/show-d import { haStyle } from "../../../../../../resources/styles"; import { HomeAssistant } from "../../../../../../types"; import { showZHAClusterDialog } from "../../../../integrations/integration-panels/zha/show-dialog-zha-cluster"; +import { showZHADeviceChildrenDialog } from "../../../../integrations/integration-panels/zha/show-dialog-zha-device-children"; import { showZHADeviceZigbeeInfoDialog } from "../../../../integrations/integration-panels/zha/show-dialog-zha-device-zigbee-info"; import { showZHAReconfigureDeviceDialog } from "../../../../integrations/integration-panels/zha/show-dialog-zha-reconfigure-device"; -import { showZHADeviceChildrenDialog } from "../../../../integrations/integration-panels/zha/show-dialog-zha-device-children"; @customElement("ha-device-actions-zha") export class HaDeviceActionsZha extends LitElement { diff --git a/src/panels/config/devices/device-detail/integration-elements/zha/ha-device-info-zha.ts b/src/panels/config/devices/device-detail/integration-elements/zha/ha-device-info-zha.ts index 6aa0188b2..28a3e3e0e 100644 --- a/src/panels/config/devices/device-detail/integration-elements/zha/ha-device-info-zha.ts +++ b/src/panels/config/devices/device-detail/integration-elements/zha/ha-device-info-zha.ts @@ -1,14 +1,12 @@ import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, property, state } from "lit/decorators"; import { DeviceRegistryEntry } from "../../../../../../data/device_registry"; import { fetchZHADevice, ZHADevice } from "../../../../../../data/zha"; import { haStyle } from "../../../../../../resources/styles"; diff --git a/src/panels/config/devices/device-detail/integration-elements/zwave_js/ha-device-actions-zwave_js.ts b/src/panels/config/devices/device-detail/integration-elements/zwave_js/ha-device-actions-zwave_js.ts index 6620ac62a..e258e6683 100644 --- a/src/panels/config/devices/device-detail/integration-elements/zwave_js/ha-device-actions-zwave_js.ts +++ b/src/panels/config/devices/device-detail/integration-elements/zwave_js/ha-device-actions-zwave_js.ts @@ -2,14 +2,12 @@ import "@material/mwc-button/mwc-button"; import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, property, state } from "lit/decorators"; import { DeviceRegistryEntry } from "../../../../../../data/device_registry"; import { getIdentifiersFromDevice, diff --git a/src/panels/config/devices/device-detail/integration-elements/zwave_js/ha-device-info-zwave_js.ts b/src/panels/config/devices/device-detail/integration-elements/zwave_js/ha-device-info-zwave_js.ts index c37856a5c..f8558fc5f 100644 --- a/src/panels/config/devices/device-detail/integration-elements/zwave_js/ha-device-info-zwave_js.ts +++ b/src/panels/config/devices/device-detail/integration-elements/zwave_js/ha-device-info-zwave_js.ts @@ -1,23 +1,20 @@ import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, property, state } from "lit/decorators"; import { DeviceRegistryEntry } from "../../../../../../data/device_registry"; import { - getIdentifiersFromDevice, fetchNodeStatus, + getIdentifiersFromDevice, + nodeStatus, ZWaveJSNode, ZWaveJSNodeIdentifiers, - nodeStatus, } from "../../../../../../data/zwave_js"; - import { haStyle } from "../../../../../../resources/styles"; import { HomeAssistant } from "../../../../../../types"; diff --git a/src/panels/config/devices/device-registry-detail/dialog-device-registry-detail.ts b/src/panels/config/devices/device-registry-detail/dialog-device-registry-detail.ts index a6536d8c5..5a36906c7 100644 --- a/src/panels/config/devices/device-registry-detail/dialog-device-registry-detail.ts +++ b/src/panels/config/devices/device-registry-detail/dialog-device-registry-detail.ts @@ -3,16 +3,8 @@ import "@polymer/paper-dropdown-menu/paper-dropdown-menu"; import "@polymer/paper-input/paper-input"; import "@polymer/paper-item/paper-item"; import "@polymer/paper-listbox/paper-listbox"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { fireEvent } from "../../../../common/dom/fire_event"; import "../../../../components/ha-area-picker"; import "../../../../components/ha-dialog"; diff --git a/src/panels/config/devices/ha-config-device-page.ts b/src/panels/config/devices/ha-config-device-page.ts index 4162a1a73..8211702ea 100644 --- a/src/panels/config/devices/ha-config-device-page.ts +++ b/src/panels/config/devices/ha-config-device-page.ts @@ -1,15 +1,7 @@ import "@polymer/paper-tooltip/paper-tooltip"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; -import { ifDefined } from "lit-html/directives/if-defined"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; +import { ifDefined } from "lit/directives/if-defined"; import memoizeOne from "memoize-one"; import { isComponentLoaded } from "../../../common/config/is_component_loaded"; import { computeStateDomain } from "../../../common/entity/compute_state_domain"; diff --git a/src/panels/config/devices/ha-config-devices-dashboard.ts b/src/panels/config/devices/ha-config-devices-dashboard.ts index b6b2d2ff0..683d62f77 100644 --- a/src/panels/config/devices/ha-config-devices-dashboard.ts +++ b/src/panels/config/devices/ha-config-devices-dashboard.ts @@ -2,16 +2,8 @@ import "@material/mwc-list/mwc-list-item"; import type { RequestSelectedDetail } from "@material/mwc-list/mwc-list-item"; import { mdiCancel, mdiFilterVariant, mdiPlus } from "@mdi/js"; import "@polymer/paper-tooltip/paper-tooltip"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import memoizeOne from "memoize-one"; import { HASSDomEvent } from "../../../common/dom/fire_event"; import { computeStateDomain } from "../../../common/entity/compute_state_domain"; diff --git a/src/panels/config/devices/ha-config-devices.ts b/src/panels/config/devices/ha-config-devices.ts index 9252c1842..fe5625565 100644 --- a/src/panels/config/devices/ha-config-devices.ts +++ b/src/panels/config/devices/ha-config-devices.ts @@ -1,5 +1,6 @@ import { UnsubscribeFunc } from "home-assistant-js-websocket"; -import { customElement, state, property, PropertyValues } from "lit-element"; +import { PropertyValues } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { AreaRegistryEntry, subscribeAreaRegistry, diff --git a/src/panels/config/entities/dialog-entity-editor.ts b/src/panels/config/entities/dialog-entity-editor.ts index 45f505807..a9f02c913 100644 --- a/src/panels/config/entities/dialog-entity-editor.ts +++ b/src/panels/config/entities/dialog-entity-editor.ts @@ -3,17 +3,9 @@ import "@material/mwc-tab"; import "@material/mwc-tab-bar"; import { mdiClose, mdiTune } from "@mdi/js"; import { HassEntity } from "home-assistant-js-websocket"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; -import { cache } from "lit-html/directives/cache"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; +import { cache } from "lit/directives/cache"; import { dynamicElement } from "../../../common/dom/dynamic-element-directive"; import { fireEvent } from "../../../common/dom/fire_event"; import { computeStateName } from "../../../common/entity/compute_state_name"; @@ -26,13 +18,13 @@ import { ExtEntityRegistryEntry, getExtendedEntityRegistryEntry, } from "../../../data/entity_registry"; +import { replaceDialog } from "../../../dialogs/make-dialog-manager"; import { haStyleDialog } from "../../../resources/styles"; import type { HomeAssistant } from "../../../types"; import { documentationUrl } from "../../../util/documentation-url"; import { PLATFORMS_WITH_SETTINGS_TAB } from "./const"; import "./entity-registry-settings"; import type { EntityRegistryDetailDialogParams } from "./show-dialog-entity-editor"; -import { replaceDialog } from "../../../dialogs/make-dialog-manager"; interface Tabs { [key: string]: Tab; @@ -59,15 +51,12 @@ export class DialogEntityEditor extends LitElement { private _curTabIndex = 0; - public async showDialog( - params: EntityRegistryDetailDialogParams - ): Promise { + public showDialog(params: EntityRegistryDetailDialogParams): void { this._params = params; this._entry = undefined; this._settingsElementTag = undefined; this._extraTabs = {}; this._getEntityReg(); - await this.updateComplete; } public closeDialog(): void { diff --git a/src/panels/config/entities/editor-tabs/settings/entity-settings-helper-tab.ts b/src/panels/config/entities/editor-tabs/settings/entity-settings-helper-tab.ts index d47479811..8d48ffd2e 100644 --- a/src/panels/config/entities/editor-tabs/settings/entity-settings-helper-tab.ts +++ b/src/panels/config/entities/editor-tabs/settings/entity-settings-helper-tab.ts @@ -1,15 +1,12 @@ import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, - query, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, property, state, query } from "lit/decorators"; import { isComponentLoaded } from "../../../../../common/config/is_component_loaded"; import { dynamicElement } from "../../../../../common/dom/dynamic-element-directive"; import { fireEvent } from "../../../../../common/dom/fire_event"; diff --git a/src/panels/config/entities/entity-registry-basic-editor.ts b/src/panels/config/entities/entity-registry-basic-editor.ts index 027e9334d..af79a115a 100644 --- a/src/panels/config/entities/entity-registry-basic-editor.ts +++ b/src/panels/config/entities/entity-registry-basic-editor.ts @@ -1,15 +1,7 @@ import "@polymer/paper-input/paper-input"; import { UnsubscribeFunc } from "home-assistant-js-websocket"; -import { - css, - customElement, - html, - state, - LitElement, - property, - PropertyValues, - TemplateResult, -} from "lit-element"; +import { css, html, LitElement, PropertyValues, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { computeDomain } from "../../../common/entity/compute_domain"; import "../../../components/ha-area-picker"; import "../../../components/ha-switch"; diff --git a/src/panels/config/entities/entity-registry-settings.ts b/src/panels/config/entities/entity-registry-settings.ts index 4c83b7b79..36bc24b84 100644 --- a/src/panels/config/entities/entity-registry-settings.ts +++ b/src/panels/config/entities/entity-registry-settings.ts @@ -4,14 +4,12 @@ import { HassEntity, UnsubscribeFunc } from "home-assistant-js-websocket"; import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, property, state } from "lit/decorators"; import { fireEvent } from "../../../common/dom/fire_event"; import { computeDomain } from "../../../common/entity/compute_domain"; import { domainIcon } from "../../../common/entity/domain_icon"; diff --git a/src/panels/config/entities/ha-config-entities.ts b/src/panels/config/entities/ha-config-entities.ts index 5f6993e13..59f9a4f54 100644 --- a/src/panels/config/entities/ha-config-entities.ts +++ b/src/panels/config/entities/ha-config-entities.ts @@ -13,19 +13,10 @@ import "@polymer/paper-item/paper-icon-item"; import "@polymer/paper-listbox/paper-listbox"; import "@polymer/paper-tooltip/paper-tooltip"; import { UnsubscribeFunc } from "home-assistant-js-websocket"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - query, - TemplateResult, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; -import { styleMap } from "lit-html/directives/style-map"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state, query } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; +import { styleMap } from "lit/directives/style-map"; import memoize from "memoize-one"; import type { HASSDomEvent } from "../../../common/dom/fire_event"; import { computeDomain } from "../../../common/entity/compute_domain"; diff --git a/src/panels/config/ha-config-section.ts b/src/panels/config/ha-config-section.ts index f98ef2701..01211a9b7 100644 --- a/src/panels/config/ha-config-section.ts +++ b/src/panels/config/ha-config-section.ts @@ -1,5 +1,6 @@ -import { css, customElement, html, LitElement, property } from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; +import { css, html, LitElement } from "lit"; +import { customElement, property } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; @customElement("ha-config-section") export class HaConfigSection extends LitElement { diff --git a/src/panels/config/ha-entity-config.ts b/src/panels/config/ha-entity-config.ts index 838523efc..87a3fa068 100644 --- a/src/panels/config/ha-entity-config.ts +++ b/src/panels/config/ha-entity-config.ts @@ -2,14 +2,12 @@ import "@material/mwc-button"; import { css, CSSResultGroup, - customElement, html, LitElement, - property, PropertyValues, - query, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, property, query } from "lit/decorators"; import "../../components/buttons/ha-progress-button"; import "../../components/entity/ha-entity-picker"; import "../../components/ha-card"; diff --git a/src/panels/config/ha-panel-config.ts b/src/panels/config/ha-panel-config.ts index 34583a8ad..e31711cf9 100644 --- a/src/panels/config/ha-panel-config.ts +++ b/src/panels/config/ha-panel-config.ts @@ -22,7 +22,8 @@ import { import "@polymer/paper-item/paper-item"; import "@polymer/paper-item/paper-item-body"; import { PolymerElement } from "@polymer/polymer"; -import { customElement, state, property, PropertyValues } from "lit-element"; +import { PropertyValues } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { isComponentLoaded } from "../../common/config/is_component_loaded"; import { listenMediaQuery } from "../../common/dom/media_query"; import { CloudStatus, fetchCloudStatus } from "../../data/cloud"; diff --git a/src/panels/config/helpers/dialog-helper-detail.ts b/src/panels/config/helpers/dialog-helper-detail.ts index 16e85a43f..459b5524f 100644 --- a/src/panels/config/helpers/dialog-helper-detail.ts +++ b/src/panels/config/helpers/dialog-helper-detail.ts @@ -1,18 +1,9 @@ import "@material/mwc-button/mwc-button"; import "@polymer/paper-item/paper-icon-item"; import "@polymer/paper-tooltip/paper-tooltip"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - query, - TemplateResult, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state, query } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; import { isComponentLoaded } from "../../../common/config/is_component_loaded"; import { dynamicElement } from "../../../common/dom/dynamic-element-directive"; import { domainIcon } from "../../../common/entity/domain_icon"; diff --git a/src/panels/config/helpers/forms/ha-counter-form.ts b/src/panels/config/helpers/forms/ha-counter-form.ts index 460bd0b9d..607fa64af 100644 --- a/src/panels/config/helpers/forms/ha-counter-form.ts +++ b/src/panels/config/helpers/forms/ha-counter-form.ts @@ -1,14 +1,6 @@ import "@polymer/paper-input/paper-input"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { fireEvent } from "../../../../common/dom/fire_event"; import "../../../../components/ha-icon-input"; import "../../../../components/ha-switch"; diff --git a/src/panels/config/helpers/forms/ha-input_boolean-form.ts b/src/panels/config/helpers/forms/ha-input_boolean-form.ts index 18ca1f474..419819d4f 100644 --- a/src/panels/config/helpers/forms/ha-input_boolean-form.ts +++ b/src/panels/config/helpers/forms/ha-input_boolean-form.ts @@ -1,14 +1,6 @@ import "@polymer/paper-input/paper-input"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { fireEvent } from "../../../../common/dom/fire_event"; import "../../../../components/ha-icon-input"; import { InputBoolean } from "../../../../data/input_boolean"; diff --git a/src/panels/config/helpers/forms/ha-input_datetime-form.ts b/src/panels/config/helpers/forms/ha-input_datetime-form.ts index 03eb3f08c..362fe30c9 100644 --- a/src/panels/config/helpers/forms/ha-input_datetime-form.ts +++ b/src/panels/config/helpers/forms/ha-input_datetime-form.ts @@ -1,16 +1,8 @@ import "@polymer/paper-input/paper-input"; import "@polymer/paper-radio-button/paper-radio-button"; import "@polymer/paper-radio-group/paper-radio-group"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { fireEvent } from "../../../../common/dom/fire_event"; import "../../../../components/ha-icon-input"; import { InputDateTime } from "../../../../data/input_datetime"; diff --git a/src/panels/config/helpers/forms/ha-input_number-form.ts b/src/panels/config/helpers/forms/ha-input_number-form.ts index c049b5790..ec3288eba 100644 --- a/src/panels/config/helpers/forms/ha-input_number-form.ts +++ b/src/panels/config/helpers/forms/ha-input_number-form.ts @@ -1,16 +1,8 @@ import "@polymer/paper-input/paper-input"; import "@polymer/paper-radio-button/paper-radio-button"; import "@polymer/paper-radio-group/paper-radio-group"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { fireEvent } from "../../../../common/dom/fire_event"; import "../../../../components/ha-icon-input"; import { InputNumber } from "../../../../data/input_number"; 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 1aba9c2d2..fbb15f7f6 100644 --- a/src/panels/config/helpers/forms/ha-input_select-form.ts +++ b/src/panels/config/helpers/forms/ha-input_select-form.ts @@ -3,17 +3,8 @@ import "@polymer/paper-input/paper-input"; import type { PaperInputElement } from "@polymer/paper-input/paper-input"; import "@polymer/paper-item/paper-item"; import "@polymer/paper-item/paper-item-body"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - query, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state, query } from "lit/decorators"; import { fireEvent } from "../../../../common/dom/fire_event"; import "../../../../components/ha-icon-button"; import "../../../../components/ha-icon-input"; diff --git a/src/panels/config/helpers/forms/ha-input_text-form.ts b/src/panels/config/helpers/forms/ha-input_text-form.ts index a63d8580e..4de30e62d 100644 --- a/src/panels/config/helpers/forms/ha-input_text-form.ts +++ b/src/panels/config/helpers/forms/ha-input_text-form.ts @@ -1,16 +1,8 @@ import "@polymer/paper-input/paper-input"; import "@polymer/paper-radio-button/paper-radio-button"; import "@polymer/paper-radio-group/paper-radio-group"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { fireEvent } from "../../../../common/dom/fire_event"; import "../../../../components/ha-icon-input"; import { InputText } from "../../../../data/input_text"; diff --git a/src/panels/config/helpers/forms/ha-timer-form.ts b/src/panels/config/helpers/forms/ha-timer-form.ts index e8a83ad32..2842226ce 100644 --- a/src/panels/config/helpers/forms/ha-timer-form.ts +++ b/src/panels/config/helpers/forms/ha-timer-form.ts @@ -1,13 +1,5 @@ -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { fireEvent } from "../../../../common/dom/fire_event"; import "../../../../components/ha-icon-input"; import { DurationDict, Timer } from "../../../../data/timer"; diff --git a/src/panels/config/helpers/ha-config-helpers.ts b/src/panels/config/helpers/ha-config-helpers.ts index 41535926b..40371e860 100644 --- a/src/panels/config/helpers/ha-config-helpers.ts +++ b/src/panels/config/helpers/ha-config-helpers.ts @@ -5,15 +5,8 @@ import "@polymer/paper-item/paper-icon-item"; import "@polymer/paper-listbox/paper-listbox"; import "@polymer/paper-tooltip/paper-tooltip"; import { HassEntity } from "home-assistant-js-websocket"; -import { - customElement, - html, - state, - LitElement, - property, - PropertyValues, - TemplateResult, -} from "lit-element"; +import { html, LitElement, PropertyValues, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import memoize from "memoize-one"; import { computeStateDomain } from "../../../common/entity/compute_state_domain"; import { domainIcon } from "../../../common/entity/domain_icon"; diff --git a/src/panels/config/info/ha-config-info.ts b/src/panels/config/info/ha-config-info.ts index 7d2911ca4..d849eaead 100644 --- a/src/panels/config/info/ha-config-info.ts +++ b/src/panels/config/info/ha-config-info.ts @@ -1,11 +1,5 @@ -import { - css, - CSSResultGroup, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { property } from "lit/decorators"; import "../../../layouts/hass-tabs-subpage"; import { haStyle } from "../../../resources/styles"; import { HomeAssistant, Route } from "../../../types"; diff --git a/src/panels/config/info/integrations-card.ts b/src/panels/config/info/integrations-card.ts index eb0c87614..2c31c9a35 100644 --- a/src/panels/config/info/integrations-card.ts +++ b/src/panels/config/info/integrations-card.ts @@ -1,13 +1,5 @@ -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import memoizeOne from "memoize-one"; import "../../../components/ha-card"; import { diff --git a/src/panels/config/info/system-health-card.ts b/src/panels/config/info/system-health-card.ts index 85728fec7..28c139609 100644 --- a/src/panels/config/info/system-health-card.ts +++ b/src/panels/config/info/system-health-card.ts @@ -4,18 +4,11 @@ import { ActionDetail } from "@material/mwc-list/mwc-list-foundation"; import "@material/mwc-list/mwc-list-item"; import { mdiContentCopy } from "@mdi/js"; import "@polymer/paper-tooltip/paper-tooltip"; -import { - css, - CSSResultGroup, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { property, state } from "lit/decorators"; +import { isComponentLoaded } from "../../../common/config/is_component_loaded"; import { formatDateTime } from "../../../common/datetime/format_date_time"; import { copyToClipboard } from "../../../common/util/copy-clipboard"; -import { isComponentLoaded } from "../../../common/config/is_component_loaded"; import "../../../components/ha-button-menu"; import "../../../components/ha-card"; import "../../../components/ha-circular-progress"; diff --git a/src/panels/config/integrations/ha-config-flow-card.ts b/src/panels/config/integrations/ha-config-flow-card.ts index fd6769b22..369b4dca7 100644 --- a/src/panels/config/integrations/ha-config-flow-card.ts +++ b/src/panels/config/integrations/ha-config-flow-card.ts @@ -1,12 +1,6 @@ -import { - customElement, - LitElement, - property, - css, - html, - TemplateResult, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; +import { css, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; import { fireEvent } from "../../../common/dom/fire_event"; import { ATTENTION_SOURCES, diff --git a/src/panels/config/integrations/ha-config-integrations.ts b/src/panels/config/integrations/ha-config-integrations.ts index e2cdcc618..3446189e0 100644 --- a/src/panels/config/integrations/ha-config-integrations.ts +++ b/src/panels/config/integrations/ha-config-integrations.ts @@ -7,20 +7,25 @@ import type { UnsubscribeFunc } from "home-assistant-js-websocket"; import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; -import { ifDefined } from "lit-html/directives/if-defined"; +} from "lit"; +import { customElement, property, state } from "lit/decorators"; +import { ifDefined } from "lit/directives/if-defined"; import memoizeOne from "memoize-one"; +import type { HASSDomEvent } from "../../../common/dom/fire_event"; import { navigate } from "../../../common/navigate"; +import "../../../common/search/search-input"; import { caseInsensitiveCompare } from "../../../common/string/compare"; +import type { LocalizeFunc } from "../../../common/translations/localize"; import { extractSearchParam } from "../../../common/url/search-params"; import { nextRender } from "../../../common/util/render-status"; +import "../../../components/ha-button-menu"; +import "../../../components/ha-checkbox"; +import "../../../components/ha-fab"; +import "../../../components/ha-svg-icon"; import { ConfigEntry, getConfigEntries } from "../../../data/config_entries"; import { getConfigFlowInProgressCollection, @@ -44,25 +49,16 @@ import { } from "../../../data/integration"; import { showConfigFlowDialog } from "../../../dialogs/config-flow/show-dialog-config-flow"; import { showConfirmationDialog } from "../../../dialogs/generic/show-dialog-box"; -import { SubscribeMixin } from "../../../mixins/subscribe-mixin"; -import { haStyle } from "../../../resources/styles"; -import { configSections } from "../ha-panel-config"; - -import type { HomeAssistant, Route } from "../../../types"; -import type { HASSDomEvent } from "../../../common/dom/fire_event"; -import type { LocalizeFunc } from "../../../common/translations/localize"; -import type { HaIntegrationCard } from "./ha-integration-card"; - -import "../../../common/search/search-input"; -import "../../../components/ha-button-menu"; -import "../../../components/ha-fab"; -import "../../../components/ha-checkbox"; -import "../../../components/ha-svg-icon"; import "../../../layouts/hass-loading-screen"; import "../../../layouts/hass-tabs-subpage"; -import "./ha-integration-card"; +import { SubscribeMixin } from "../../../mixins/subscribe-mixin"; +import { haStyle } from "../../../resources/styles"; +import type { HomeAssistant, Route } from "../../../types"; +import { configSections } from "../ha-panel-config"; import "./ha-config-flow-card"; import "./ha-ignored-config-entry-card"; +import "./ha-integration-card"; +import type { HaIntegrationCard } from "./ha-integration-card"; export interface ConfigEntryUpdatedEvent { entry: ConfigEntry; diff --git a/src/panels/config/integrations/ha-ignored-config-entry-card.ts b/src/panels/config/integrations/ha-ignored-config-entry-card.ts index cbd6c476b..34c7c32dc 100644 --- a/src/panels/config/integrations/ha-ignored-config-entry-card.ts +++ b/src/panels/config/integrations/ha-ignored-config-entry-card.ts @@ -1,11 +1,5 @@ -import { - customElement, - LitElement, - property, - css, - html, - TemplateResult, -} from "lit-element"; +import { css, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import { fireEvent } from "../../../common/dom/fire_event"; import { deleteConfigEntry } from "../../../data/config_entries"; import type { IntegrationManifest } from "../../../data/integration"; diff --git a/src/panels/config/integrations/ha-integration-action-card.ts b/src/panels/config/integrations/ha-integration-action-card.ts index 247006768..8f2445100 100644 --- a/src/panels/config/integrations/ha-integration-action-card.ts +++ b/src/panels/config/integrations/ha-integration-action-card.ts @@ -1,11 +1,5 @@ -import { - TemplateResult, - html, - customElement, - LitElement, - property, - css, -} from "lit-element"; +import { css, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import type { IntegrationManifest } from "../../../data/integration"; import type { HomeAssistant } from "../../../types"; import "./ha-integration-header"; diff --git a/src/panels/config/integrations/ha-integration-card.ts b/src/panels/config/integrations/ha-integration-card.ts index 615e35986..cbd7de5aa 100644 --- a/src/panels/config/integrations/ha-integration-card.ts +++ b/src/panels/config/integrations/ha-integration-card.ts @@ -1,26 +1,19 @@ -import type { RequestSelectedDetail } from "@material/mwc-list/mwc-list-item"; -import "@material/mwc-list/mwc-list-item"; -import "@polymer/paper-listbox"; import "@material/mwc-button"; -import "@polymer/paper-item"; -import "@polymer/paper-tooltip/paper-tooltip"; +import "@material/mwc-list/mwc-list-item"; +import type { RequestSelectedDetail } from "@material/mwc-list/mwc-list-item"; import { mdiAlertCircle, mdiDotsVertical, mdiOpenInNew } from "@mdi/js"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; +import "@polymer/paper-item"; +import "@polymer/paper-listbox"; +import "@polymer/paper-tooltip/paper-tooltip"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; import { fireEvent } from "../../../common/dom/fire_event"; import { shouldHandleRequestSelectedEvent } from "../../../common/mwc/handle-request-selected-event"; -import "../../../components/ha-icon-next"; import "../../../components/ha-button-menu"; -import "../../../components/ha-svg-icon"; import "../../../components/ha-card"; +import "../../../components/ha-icon-next"; +import "../../../components/ha-svg-icon"; import { ConfigEntry, deleteConfigEntry, diff --git a/src/panels/config/integrations/ha-integration-header.ts b/src/panels/config/integrations/ha-integration-header.ts index 29cf8d354..cd189da48 100644 --- a/src/panels/config/integrations/ha-integration-header.ts +++ b/src/panels/config/integrations/ha-integration-header.ts @@ -1,14 +1,8 @@ -import "../../../components/ha-svg-icon"; -import { mdiPackageVariant, mdiCloud } from "@mdi/js"; +import { mdiCloud, mdiPackageVariant } from "@mdi/js"; import "@polymer/paper-tooltip/paper-tooltip"; -import { - css, - html, - customElement, - property, - LitElement, - TemplateResult, -} from "lit-element"; +import { css, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; +import "../../../components/ha-svg-icon"; import { domainToName, IntegrationManifest } from "../../../data/integration"; import { HomeAssistant } from "../../../types"; import { brandsUrl } from "../../../util/brands-url"; diff --git a/src/panels/config/integrations/integration-panels/mqtt/mqtt-config-panel.ts b/src/panels/config/integrations/integration-panels/mqtt/mqtt-config-panel.ts index 827e6aef6..2edd27c8d 100644 --- a/src/panels/config/integrations/integration-panels/mqtt/mqtt-config-panel.ts +++ b/src/panels/config/integrations/integration-panels/mqtt/mqtt-config-panel.ts @@ -1,15 +1,7 @@ import "@material/mwc-button"; import "@polymer/paper-input/paper-input"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import "../../../../../components/ha-card"; import "../../../../../components/ha-code-editor"; import { getConfigEntries } from "../../../../../data/config_entries"; diff --git a/src/panels/config/integrations/integration-panels/mqtt/mqtt-subscribe-card.ts b/src/panels/config/integrations/integration-panels/mqtt/mqtt-subscribe-card.ts index 22b3ab4a5..c3fd96ce4 100644 --- a/src/panels/config/integrations/integration-panels/mqtt/mqtt-subscribe-card.ts +++ b/src/panels/config/integrations/integration-panels/mqtt/mqtt-subscribe-card.ts @@ -1,15 +1,7 @@ import "@material/mwc-button"; import "@polymer/paper-input/paper-input"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { formatTime } from "../../../../../common/datetime/format_time"; import "../../../../../components/ha-card"; import { MQTTMessage, subscribeMQTTTopic } from "../../../../../data/mqtt"; diff --git a/src/panels/config/integrations/integration-panels/ozw/dialog-ozw-refresh-node.ts b/src/panels/config/integrations/integration-panels/ozw/dialog-ozw-refresh-node.ts index 1f8faf19b..8a0dd3417 100644 --- a/src/panels/config/integrations/integration-panels/ozw/dialog-ozw-refresh-node.ts +++ b/src/panels/config/integrations/integration-panels/ozw/dialog-ozw-refresh-node.ts @@ -1,14 +1,12 @@ import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, property, state } from "lit/decorators"; import "../../../../../components/ha-circular-progress"; import "../../../../../components/ha-code-editor"; import { createCloseHeading } from "../../../../../components/ha-dialog"; diff --git a/src/panels/config/integrations/integration-panels/ozw/ozw-config-dashboard.ts b/src/panels/config/integrations/integration-panels/ozw/ozw-config-dashboard.ts index 8856c3a24..5d4f673ef 100644 --- a/src/panels/config/integrations/integration-panels/ozw/ozw-config-dashboard.ts +++ b/src/panels/config/integrations/integration-panels/ozw/ozw-config-dashboard.ts @@ -2,16 +2,8 @@ import "@material/mwc-button/mwc-button"; import { mdiCheckCircle, mdiCircle, mdiCloseCircle, mdiZWave } from "@mdi/js"; import "@polymer/paper-item/paper-icon-item"; import "@polymer/paper-item/paper-item-body"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { navigate } from "../../../../../common/navigate"; import "../../../../../components/ha-card"; import "../../../../../components/ha-icon-next"; diff --git a/src/panels/config/integrations/integration-panels/ozw/ozw-config-router.ts b/src/panels/config/integrations/integration-panels/ozw/ozw-config-router.ts index ba31c90f0..ad2d2e38f 100644 --- a/src/panels/config/integrations/integration-panels/ozw/ozw-config-router.ts +++ b/src/panels/config/integrations/integration-panels/ozw/ozw-config-router.ts @@ -1,4 +1,4 @@ -import { customElement, property } from "lit-element"; +import { customElement, property } from "lit/decorators"; import memoizeOne from "memoize-one"; import { HassRouterPage, diff --git a/src/panels/config/integrations/integration-panels/ozw/ozw-network-dashboard.ts b/src/panels/config/integrations/integration-panels/ozw/ozw-network-dashboard.ts index 10f5e38d9..aa56687d6 100644 --- a/src/panels/config/integrations/integration-panels/ozw/ozw-network-dashboard.ts +++ b/src/panels/config/integrations/integration-panels/ozw/ozw-network-dashboard.ts @@ -1,16 +1,8 @@ import "@material/mwc-button/mwc-button"; import { mdiCheckCircle, mdiCircle, mdiCloseCircle } from "@mdi/js"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; import { navigate } from "../../../../../common/navigate"; import "../../../../../components/buttons/ha-call-service-button"; import "../../../../../components/ha-card"; diff --git a/src/panels/config/integrations/integration-panels/ozw/ozw-network-nodes.ts b/src/panels/config/integrations/integration-panels/ozw/ozw-network-nodes.ts index da9f5175a..9de8234c6 100644 --- a/src/panels/config/integrations/integration-panels/ozw/ozw-network-nodes.ts +++ b/src/panels/config/integrations/integration-panels/ozw/ozw-network-nodes.ts @@ -1,14 +1,7 @@ import "@material/mwc-button/mwc-button"; import { mdiAlert, mdiCheck } from "@mdi/js"; -import { - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import memoizeOne from "memoize-one"; import { HASSDomEvent } from "../../../../../common/dom/fire_event"; import { navigate } from "../../../../../common/navigate"; diff --git a/src/panels/config/integrations/integration-panels/ozw/ozw-network-router.ts b/src/panels/config/integrations/integration-panels/ozw/ozw-network-router.ts index e16133ba0..0294ff9b0 100644 --- a/src/panels/config/integrations/integration-panels/ozw/ozw-network-router.ts +++ b/src/panels/config/integrations/integration-panels/ozw/ozw-network-router.ts @@ -1,5 +1,5 @@ import { mdiNetwork, mdiServerNetwork } from "@mdi/js"; -import { customElement, property } from "lit-element"; +import { customElement, property } from "lit/decorators"; import { HassRouterPage, RouterOptions, diff --git a/src/panels/config/integrations/integration-panels/ozw/ozw-node-config.ts b/src/panels/config/integrations/integration-panels/ozw/ozw-node-config.ts index ec55e6156..4eeda2d48 100644 --- a/src/panels/config/integrations/integration-panels/ozw/ozw-node-config.ts +++ b/src/panels/config/integrations/integration-panels/ozw/ozw-node-config.ts @@ -1,14 +1,6 @@ import "@material/mwc-button/mwc-button"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { navigate } from "../../../../../common/navigate"; import "../../../../../components/buttons/ha-call-service-button"; import "../../../../../components/ha-card"; diff --git a/src/panels/config/integrations/integration-panels/ozw/ozw-node-dashboard.ts b/src/panels/config/integrations/integration-panels/ozw/ozw-node-dashboard.ts index b8a6bcf5b..af7d2089e 100644 --- a/src/panels/config/integrations/integration-panels/ozw/ozw-node-dashboard.ts +++ b/src/panels/config/integrations/integration-panels/ozw/ozw-node-dashboard.ts @@ -1,14 +1,6 @@ import "@material/mwc-button/mwc-button"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { navigate } from "../../../../../common/navigate"; import "../../../../../components/buttons/ha-call-service-button"; import "../../../../../components/ha-card"; diff --git a/src/panels/config/integrations/integration-panels/ozw/ozw-node-router.ts b/src/panels/config/integrations/integration-panels/ozw/ozw-node-router.ts index 45a922f8b..5168e2113 100644 --- a/src/panels/config/integrations/integration-panels/ozw/ozw-node-router.ts +++ b/src/panels/config/integrations/integration-panels/ozw/ozw-node-router.ts @@ -1,5 +1,5 @@ import { mdiNetwork, mdiWrench } from "@mdi/js"; -import { customElement, property } from "lit-element"; +import { customElement, property } from "lit/decorators"; import { navigate } from "../../../../../common/navigate"; import { HassRouterPage, diff --git a/src/panels/config/integrations/integration-panels/zha/dialog-zha-cluster.ts b/src/panels/config/integrations/integration-panels/zha/dialog-zha-cluster.ts index 8af541370..1565588e5 100644 --- a/src/panels/config/integrations/integration-panels/zha/dialog-zha-cluster.ts +++ b/src/panels/config/integrations/integration-panels/zha/dialog-zha-cluster.ts @@ -1,13 +1,11 @@ import { CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, property, state } from "lit/decorators"; import { HASSDomEvent } from "../../../../../common/dom/fire_event"; import "../../../../../components/ha-code-editor"; import { createCloseHeading } from "../../../../../components/ha-dialog"; diff --git a/src/panels/config/integrations/integration-panels/zha/dialog-zha-device-children.ts b/src/panels/config/integrations/integration-panels/zha/dialog-zha-device-children.ts index b8330b582..f726df423 100644 --- a/src/panels/config/integrations/integration-panels/zha/dialog-zha-device-children.ts +++ b/src/panels/config/integrations/integration-panels/zha/dialog-zha-device-children.ts @@ -1,12 +1,4 @@ -import { - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { CSSResultGroup, html, LitElement, TemplateResult } from "lit"; import memoizeOne from "memoize-one"; import { computeRTLDirection } from "../../../../../common/util/compute_rtl"; import "../../../../../components/ha-code-editor"; @@ -22,6 +14,7 @@ import type { import "../../../../../components/ha-circular-progress"; import { fetchDevices, ZHADevice } from "../../../../../data/zha"; import { fireEvent } from "../../../../../common/dom/fire_event"; +import { customElement, property, state } from "lit/decorators"; export interface DeviceRowData extends DataTableRowData { id: string; diff --git a/src/panels/config/integrations/integration-panels/zha/dialog-zha-device-zigbee-info.ts b/src/panels/config/integrations/integration-panels/zha/dialog-zha-device-zigbee-info.ts index 17bb63f3f..cd24720b6 100644 --- a/src/panels/config/integrations/integration-panels/zha/dialog-zha-device-zigbee-info.ts +++ b/src/panels/config/integrations/integration-panels/zha/dialog-zha-device-zigbee-info.ts @@ -1,12 +1,5 @@ -import { - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import "../../../../../components/ha-code-editor"; import { createCloseHeading } from "../../../../../components/ha-dialog"; import { haStyleDialog } from "../../../../../resources/styles"; diff --git a/src/panels/config/integrations/integration-panels/zha/dialog-zha-reconfigure-device.ts b/src/panels/config/integrations/integration-panels/zha/dialog-zha-reconfigure-device.ts index 1e82acbb8..bf3ce73ea 100644 --- a/src/panels/config/integrations/integration-panels/zha/dialog-zha-reconfigure-device.ts +++ b/src/panels/config/integrations/integration-panels/zha/dialog-zha-reconfigure-device.ts @@ -1,19 +1,11 @@ -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; -import { mdiCheckCircle, mdiCloseCircle } from "@mdi/js"; import "@material/mwc-button/mwc-button"; -import { haStyleDialog } from "../../../../../resources/styles"; -import { HomeAssistant } from "../../../../../types"; -import { ZHAReconfigureDeviceDialogParams } from "./show-dialog-zha-reconfigure-device"; +import { mdiCheckCircle, mdiCloseCircle } from "@mdi/js"; +import { UnsubscribeFunc } from "home-assistant-js-websocket"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } 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 "../../../../../components/ha-svg-icon"; import { AttributeConfigurationStatus, @@ -26,9 +18,9 @@ import { ZHA_CHANNEL_MSG_BIND, ZHA_CHANNEL_MSG_CFG_RPT, } from "../../../../../data/zha"; -import { fireEvent } from "../../../../../common/dom/fire_event"; -import { UnsubscribeFunc } from "home-assistant-js-websocket"; -import { createCloseHeading } from "../../../../../components/ha-dialog"; +import { haStyleDialog } from "../../../../../resources/styles"; +import { HomeAssistant } from "../../../../../types"; +import { ZHAReconfigureDeviceDialogParams } from "./show-dialog-zha-reconfigure-device"; @customElement("dialog-zha-reconfigure-device") class DialogZHAReconfigureDevice extends LitElement { 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 c68bba976..654cd3b4b 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 @@ -4,14 +4,12 @@ import "@polymer/paper-input/paper-textarea"; import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, property, state } from "lit/decorators"; import "../../../../../components/ha-circular-progress"; import "../../../../../components/ha-icon-button"; import "../../../../../components/ha-service-description"; diff --git a/src/panels/config/integrations/integration-panels/zha/zha-add-group-page.ts b/src/panels/config/integrations/integration-panels/zha/zha-add-group-page.ts index 840d2ebea..b628231d8 100644 --- a/src/panels/config/integrations/integration-panels/zha/zha-add-group-page.ts +++ b/src/panels/config/integrations/integration-panels/zha/zha-add-group-page.ts @@ -1,17 +1,8 @@ import "@material/mwc-button"; import "@polymer/paper-input/paper-input"; import type { PaperInputElement } from "@polymer/paper-input/paper-input"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - PropertyValues, - query, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, PropertyValues } from "lit"; +import { customElement, property, state, query } from "lit/decorators"; import type { HASSDomEvent } from "../../../../../common/dom/fire_event"; import { navigate } from "../../../../../common/navigate"; import type { SelectionChangedEvent } from "../../../../../components/data-table/ha-data-table"; diff --git a/src/panels/config/integrations/integration-panels/zha/zha-cluster-attributes.ts b/src/panels/config/integrations/integration-panels/zha/zha-cluster-attributes.ts index 69e3c2f12..0d7a81525 100644 --- a/src/panels/config/integrations/integration-panels/zha/zha-cluster-attributes.ts +++ b/src/panels/config/integrations/integration-panels/zha/zha-cluster-attributes.ts @@ -7,12 +7,11 @@ import { css, CSSResultGroup, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; +} from "lit"; +import { property, state } from "lit/decorators"; import "../../../../../components/buttons/ha-call-service-button"; import "../../../../../components/ha-card"; import "../../../../../components/ha-icon-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 bae849aff..5ffcf6163 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 @@ -6,12 +6,11 @@ import { css, CSSResultGroup, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; +} from "lit"; +import { property, state } from "lit/decorators"; import "../../../../../components/buttons/ha-call-service-button"; import "../../../../../components/ha-card"; import "../../../../../components/ha-icon-button"; diff --git a/src/panels/config/integrations/integration-panels/zha/zha-clusters-data-table.ts b/src/panels/config/integrations/integration-panels/zha/zha-clusters-data-table.ts index cfaa1a171..e29bcbe10 100644 --- a/src/panels/config/integrations/integration-panels/zha/zha-clusters-data-table.ts +++ b/src/panels/config/integrations/integration-panels/zha/zha-clusters-data-table.ts @@ -1,11 +1,5 @@ -import { - customElement, - html, - LitElement, - property, - query, - TemplateResult, -} from "lit-element"; +import { html, LitElement, TemplateResult } from "lit"; +import { customElement, property, query } from "lit/decorators"; import memoizeOne from "memoize-one"; import { computeRTLDirection } from "../../../../../common/util/compute_rtl"; import "../../../../../components/data-table/ha-data-table"; diff --git a/src/panels/config/integrations/integration-panels/zha/zha-clusters.ts b/src/panels/config/integrations/integration-panels/zha/zha-clusters.ts index 46b4c6cae..4559fafe9 100644 --- a/src/panels/config/integrations/integration-panels/zha/zha-clusters.ts +++ b/src/panels/config/integrations/integration-panels/zha/zha-clusters.ts @@ -5,12 +5,11 @@ import { css, CSSResultGroup, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; +} from "lit"; +import { property, state } from "lit/decorators"; import { fireEvent } from "../../../../../common/dom/fire_event"; import "../../../../../components/buttons/ha-call-service-button"; import "../../../../../components/ha-card"; diff --git a/src/panels/config/integrations/integration-panels/zha/zha-config-dashboard-router.ts b/src/panels/config/integrations/integration-panels/zha/zha-config-dashboard-router.ts index 4fcef9343..87ed32425 100644 --- a/src/panels/config/integrations/integration-panels/zha/zha-config-dashboard-router.ts +++ b/src/panels/config/integrations/integration-panels/zha/zha-config-dashboard-router.ts @@ -1,4 +1,4 @@ -import { customElement, property } from "lit-element"; +import { customElement, property } from "lit/decorators"; import { navigate } from "../../../../../common/navigate"; import { HassRouterPage, diff --git a/src/panels/config/integrations/integration-panels/zha/zha-config-dashboard.ts b/src/panels/config/integrations/integration-panels/zha/zha-config-dashboard.ts index d8241f67a..0b1014d78 100644 --- a/src/panels/config/integrations/integration-panels/zha/zha-config-dashboard.ts +++ b/src/panels/config/integrations/integration-panels/zha/zha-config-dashboard.ts @@ -5,13 +5,11 @@ import "@polymer/paper-item/paper-item-body"; import { css, CSSResultGroup, - customElement, html, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; +} from "lit"; import { computeRTL } from "../../../../../common/util/compute_rtl"; import "../../../../../components/ha-card"; import "../../../../../components/ha-fab"; @@ -27,6 +25,7 @@ import { updateZHAConfiguration, ZHAConfiguration, } from "../../../../../data/zha"; +import { customElement, property } from "lit/decorators"; export const zhaTabs: PageNavigation[] = [ { diff --git a/src/panels/config/integrations/integration-panels/zha/zha-device-binding.ts b/src/panels/config/integrations/integration-panels/zha/zha-device-binding.ts index 5cbd2a947..36c71f853 100644 --- a/src/panels/config/integrations/integration-panels/zha/zha-device-binding.ts +++ b/src/panels/config/integrations/integration-panels/zha/zha-device-binding.ts @@ -5,14 +5,12 @@ import "@polymer/paper-listbox/paper-listbox"; import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, property, state } from "lit/decorators"; import "../../../../../components/buttons/ha-call-service-button"; import "../../../../../components/ha-card"; import "../../../../../components/ha-icon-button"; diff --git a/src/panels/config/integrations/integration-panels/zha/zha-device-card.ts b/src/panels/config/integrations/integration-panels/zha/zha-device-card.ts index eeae2aa24..f1dbb1a25 100644 --- a/src/panels/config/integrations/integration-panels/zha/zha-device-card.ts +++ b/src/panels/config/integrations/integration-panels/zha/zha-device-card.ts @@ -1,16 +1,7 @@ import "@polymer/paper-input/paper-input"; import "@polymer/paper-listbox/paper-listbox"; import { UnsubscribeFunc } from "home-assistant-js-websocket"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - state, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; import { fireEvent } from "../../../../../common/dom/fire_event"; import { computeStateName } from "../../../../../common/entity/compute_state_name"; import "../../../../../components/buttons/ha-call-service-button"; @@ -34,6 +25,7 @@ import { EntityRegistryStateEntry } from "../../../devices/ha-config-device-page import { compare } from "../../../../../common/string/compare"; import { getIeeeTail } from "./functions"; import { slugify } from "../../../../../common/string/slugify"; +import { customElement, property, state } from "lit/decorators"; @customElement("zha-device-card") class ZHADeviceCard extends SubscribeMixin(LitElement) { diff --git a/src/panels/config/integrations/integration-panels/zha/zha-device-endpoint-data-table.ts b/src/panels/config/integrations/integration-panels/zha/zha-device-endpoint-data-table.ts index d0d79c8dd..3a3ce48f0 100644 --- a/src/panels/config/integrations/integration-panels/zha/zha-device-endpoint-data-table.ts +++ b/src/panels/config/integrations/integration-panels/zha/zha-device-endpoint-data-table.ts @@ -1,13 +1,5 @@ -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - query, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, query } from "lit/decorators"; import memoizeOne from "memoize-one"; import { computeRTLDirection } from "../../../../../common/util/compute_rtl"; import "../../../../../components/data-table/ha-data-table"; diff --git a/src/panels/config/integrations/integration-panels/zha/zha-device-pairing-status-card.ts b/src/panels/config/integrations/integration-panels/zha/zha-device-pairing-status-card.ts index 4721363bc..0fc745cf8 100644 --- a/src/panels/config/integrations/integration-panels/zha/zha-device-pairing-status-card.ts +++ b/src/panels/config/integrations/integration-panels/zha/zha-device-pairing-status-card.ts @@ -1,16 +1,8 @@ import "@polymer/paper-input/paper-input"; import "@polymer/paper-listbox/paper-listbox"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; import "../../../../../components/buttons/ha-call-service-button"; import "../../../../../components/entity/state-badge"; import "../../../../../components/ha-area-picker"; diff --git a/src/panels/config/integrations/integration-panels/zha/zha-group-binding.ts b/src/panels/config/integrations/integration-panels/zha/zha-group-binding.ts index 571d5c710..201c139c6 100644 --- a/src/panels/config/integrations/integration-panels/zha/zha-group-binding.ts +++ b/src/panels/config/integrations/integration-panels/zha/zha-group-binding.ts @@ -5,15 +5,12 @@ import "@polymer/paper-listbox/paper-listbox"; import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, - query, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, property, state, query } from "lit/decorators"; import type { HASSDomEvent } from "../../../../../common/dom/fire_event"; import "../../../../../components/buttons/ha-call-service-button"; import { SelectionChangedEvent } from "../../../../../components/data-table/ha-data-table"; 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 2a52714a0..d26a92f27 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,15 +1,6 @@ import "@material/mwc-button"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - PropertyValues, - query, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, PropertyValues } from "lit"; +import { customElement, property, state, query } from "lit/decorators"; import { HASSDomEvent } from "../../../../../common/dom/fire_event"; import { navigate } from "../../../../../common/navigate"; import { SelectionChangedEvent } from "../../../../../components/data-table/ha-data-table"; diff --git a/src/panels/config/integrations/integration-panels/zha/zha-groups-dashboard.ts b/src/panels/config/integrations/integration-panels/zha/zha-groups-dashboard.ts index b11428b9f..3eff559dc 100644 --- a/src/panels/config/integrations/integration-panels/zha/zha-groups-dashboard.ts +++ b/src/panels/config/integrations/integration-panels/zha/zha-groups-dashboard.ts @@ -3,13 +3,12 @@ import { mdiPlus } from "@mdi/js"; import { css, CSSResultGroup, - customElement, html, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, property } from "lit/decorators"; import memoizeOne from "memoize-one"; import { HASSDomEvent } from "../../../../../common/dom/fire_event"; import { navigate } from "../../../../../common/navigate"; diff --git a/src/panels/config/integrations/integration-panels/zha/zha-network-visualization-page.ts b/src/panels/config/integrations/integration-panels/zha/zha-network-visualization-page.ts index ac195ca76..bd9d3cee8 100644 --- a/src/panels/config/integrations/integration-panels/zha/zha-network-visualization-page.ts +++ b/src/panels/config/integrations/integration-panels/zha/zha-network-visualization-page.ts @@ -1,14 +1,4 @@ -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - PropertyValues, - query, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, PropertyValues } from "lit"; import "@material/mwc-button"; import { navigate } from "../../../../../common/navigate"; @@ -30,6 +20,7 @@ import { DeviceRegistryEntry } from "../../../../../data/device_registry"; import "../../../../../components/ha-checkbox"; import type { HaCheckbox } from "../../../../../components/ha-checkbox"; import { zhaTabs } from "./zha-config-dashboard"; +import { customElement, property, query, state } from "lit/decorators"; @customElement("zha-network-visualization-page") export class ZHANetworkVisualizationPage extends LitElement { diff --git a/src/panels/config/integrations/integration-panels/zwave/zwave-config-router.ts b/src/panels/config/integrations/integration-panels/zwave/zwave-config-router.ts index 70d5a07b0..e5c53c9b5 100644 --- a/src/panels/config/integrations/integration-panels/zwave/zwave-config-router.ts +++ b/src/panels/config/integrations/integration-panels/zwave/zwave-config-router.ts @@ -1,10 +1,10 @@ -import { customElement, property } from "lit-element"; +import { customElement, property } from "lit/decorators"; +import { navigate } from "../../../../../common/navigate"; import { HassRouterPage, RouterOptions, } from "../../../../../layouts/hass-router-page"; import { HomeAssistant } from "../../../../../types"; -import { navigate } from "../../../../../common/navigate"; @customElement("zwave-config-router") class ZWaveConfigRouter extends HassRouterPage { diff --git a/src/panels/config/integrations/integration-panels/zwave/zwave-migration.ts b/src/panels/config/integrations/integration-panels/zwave/zwave-migration.ts index 114c146bd..fa05774fc 100644 --- a/src/panels/config/integrations/integration-panels/zwave/zwave-migration.ts +++ b/src/panels/config/integrations/integration-panels/zwave/zwave-migration.ts @@ -1,45 +1,37 @@ +import "@material/mwc-button/mwc-button"; import "@polymer/app-layout/app-header/app-header"; import "@polymer/app-layout/app-toolbar/app-toolbar"; -import "@material/mwc-button/mwc-button"; -import "../../../../../components/ha-icon-button"; -import "../../../../../components/ha-circular-progress"; import { UnsubscribeFunc } from "home-assistant-js-websocket"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - state, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; +import { isComponentLoaded } from "../../../../../common/config/is_component_loaded"; +import { computeStateName } from "../../../../../common/entity/compute_state_name"; +import { navigate } from "../../../../../common/navigate"; import "../../../../../components/buttons/ha-call-api-button"; import "../../../../../components/buttons/ha-call-service-button"; import "../../../../../components/ha-card"; +import "../../../../../components/ha-circular-progress"; import "../../../../../components/ha-icon"; -import { - fetchNetworkStatus, - ZWaveNetworkStatus, - ZWAVE_NETWORK_STATE_STOPPED, - fetchMigrationConfig, - ZWaveMigrationConfig, - startOzwConfigFlow, -} from "../../../../../data/zwave"; -import { haStyle } from "../../../../../resources/styles"; -import type { HomeAssistant, Route } from "../../../../../types"; -import "../../../ha-config-section"; -import "../../../../../layouts/hass-subpage"; -import { showConfigFlowDialog } from "../../../../../dialogs/config-flow/show-dialog-config-flow"; -import { migrateZwave, OZWMigrationData } from "../../../../../data/ozw"; -import { navigate } from "../../../../../common/navigate"; -import { showAlertDialog } from "../../../../../dialogs/generic/show-dialog-box"; -import { computeStateName } from "../../../../../common/entity/compute_state_name"; +import "../../../../../components/ha-icon-button"; import { computeDeviceName, subscribeDeviceRegistry, } from "../../../../../data/device_registry"; -import { isComponentLoaded } from "../../../../../common/config/is_component_loaded"; +import { migrateZwave, OZWMigrationData } from "../../../../../data/ozw"; +import { + fetchMigrationConfig, + fetchNetworkStatus, + startOzwConfigFlow, + ZWaveMigrationConfig, + ZWaveNetworkStatus, + ZWAVE_NETWORK_STATE_STOPPED, +} from "../../../../../data/zwave"; +import { showConfigFlowDialog } from "../../../../../dialogs/config-flow/show-dialog-config-flow"; +import { showAlertDialog } from "../../../../../dialogs/generic/show-dialog-box"; +import "../../../../../layouts/hass-subpage"; +import { haStyle } from "../../../../../resources/styles"; +import type { HomeAssistant, Route } from "../../../../../types"; +import "../../../ha-config-section"; @customElement("zwave-migration") export class ZwaveMigration extends LitElement { diff --git a/src/panels/config/integrations/integration-panels/zwave/zwave-network.ts b/src/panels/config/integrations/integration-panels/zwave/zwave-network.ts index e162edacc..12d0284cc 100644 --- a/src/panels/config/integrations/integration-panels/zwave/zwave-network.ts +++ b/src/panels/config/integrations/integration-panels/zwave/zwave-network.ts @@ -1,14 +1,6 @@ import { UnsubscribeFunc } from "home-assistant-js-websocket"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import "../../../../../components/buttons/ha-call-api-button"; import "../../../../../components/buttons/ha-call-service-button"; import "../../../../../components/ha-card"; diff --git a/src/panels/config/integrations/integration-panels/zwave/zwave-node-config.ts b/src/panels/config/integrations/integration-panels/zwave/zwave-node-config.ts index 4bc1542a5..3a846334b 100644 --- a/src/panels/config/integrations/integration-panels/zwave/zwave-node-config.ts +++ b/src/panels/config/integrations/integration-panels/zwave/zwave-node-config.ts @@ -5,14 +5,12 @@ import "@polymer/paper-listbox/paper-listbox"; import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, property, state } from "lit/decorators"; import "../../../../../components/buttons/ha-call-service-button"; import "../../../../../components/ha-card"; import { diff --git a/src/panels/config/integrations/integration-panels/zwave/zwave-values.ts b/src/panels/config/integrations/integration-panels/zwave/zwave-values.ts index 719a57a49..1e6750c6a 100644 --- a/src/panels/config/integrations/integration-panels/zwave/zwave-values.ts +++ b/src/panels/config/integrations/integration-panels/zwave/zwave-values.ts @@ -1,16 +1,8 @@ import "@polymer/paper-dropdown-menu/paper-dropdown-menu"; import "@polymer/paper-item/paper-item"; import "@polymer/paper-listbox/paper-listbox"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import "../../../../../components/buttons/ha-call-service-button"; import "../../../../../components/ha-card"; import { ZWaveValue } from "../../../../../data/zwave"; diff --git a/src/panels/config/integrations/integration-panels/zwave_js/dialog-zwave_js-add-node.ts b/src/panels/config/integrations/integration-panels/zwave_js/dialog-zwave_js-add-node.ts index 0de86314b..9e2f4e887 100644 --- a/src/panels/config/integrations/integration-panels/zwave_js/dialog-zwave_js-add-node.ts +++ b/src/panels/config/integrations/integration-panels/zwave_js/dialog-zwave_js-add-node.ts @@ -2,22 +2,14 @@ import "@material/mwc-button/mwc-button"; import { mdiCheckCircle, mdiCloseCircle } from "@mdi/js"; import "../../../../../components/ha-switch"; import "../../../../../components/ha-formfield"; -import { - CSSResultGroup, - customElement, - html, - LitElement, - property, - state, - TemplateResult, - css, -} from "lit-element"; +import { CSSResultGroup, html, LitElement, TemplateResult, css } from "lit"; import "../../../../../components/ha-circular-progress"; import { createCloseHeading } from "../../../../../components/ha-dialog"; import { haStyleDialog } from "../../../../../resources/styles"; import { HomeAssistant } from "../../../../../types"; import { ZWaveJSAddNodeDialogParams } from "./show-dialog-zwave_js-add-node"; import { fireEvent } from "../../../../../common/dom/fire_event"; +import { customElement, property, state } from "lit/decorators"; export interface ZWaveJSAddNodeDevice { id: string; diff --git a/src/panels/config/integrations/integration-panels/zwave_js/dialog-zwave_js-reinterview-node.ts b/src/panels/config/integrations/integration-panels/zwave_js/dialog-zwave_js-reinterview-node.ts index f15acf884..c3bfd9043 100644 --- a/src/panels/config/integrations/integration-panels/zwave_js/dialog-zwave_js-reinterview-node.ts +++ b/src/panels/config/integrations/integration-panels/zwave_js/dialog-zwave_js-reinterview-node.ts @@ -1,23 +1,15 @@ import "@material/mwc-button/mwc-button"; import { mdiCheckCircle, mdiCloseCircle } from "@mdi/js"; -import { - CSSResult, - customElement, - html, - LitElement, - property, - state, - TemplateResult, - css, -} from "lit-element"; +import { UnsubscribeFunc } from "home-assistant-js-websocket"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } 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 { reinterviewNode } from "../../../../../data/zwave_js"; import { haStyleDialog } from "../../../../../resources/styles"; import { HomeAssistant } from "../../../../../types"; import { ZWaveJSReinterviewNodeDialogParams } from "./show-dialog-zwave_js-reinterview-node"; -import { fireEvent } from "../../../../../common/dom/fire_event"; -import { UnsubscribeFunc } from "home-assistant-js-websocket"; -import { reinterviewNode } from "../../../../../data/zwave_js"; @customElement("dialog-zwave_js-reinterview-node") class DialogZWaveJSReinterviewNode extends LitElement { @@ -212,7 +204,7 @@ class DialogZWaveJSReinterviewNode extends LitElement { fireEvent(this, "dialog-closed", { dialog: this.localName }); } - static get styles(): CSSResult[] { + static get styles(): CSSResultGroup { return [ haStyleDialog, css` diff --git a/src/panels/config/integrations/integration-panels/zwave_js/dialog-zwave_js-remove-node.ts b/src/panels/config/integrations/integration-panels/zwave_js/dialog-zwave_js-remove-node.ts index 5c575d41e..a6f701894 100644 --- a/src/panels/config/integrations/integration-panels/zwave_js/dialog-zwave_js-remove-node.ts +++ b/src/panels/config/integrations/integration-panels/zwave_js/dialog-zwave_js-remove-node.ts @@ -1,21 +1,13 @@ import "@material/mwc-button/mwc-button"; -import { - CSSResultGroup, - customElement, - html, - LitElement, - property, - state, - TemplateResult, - css, -} from "lit-element"; +import { mdiCheckCircle, mdiCloseCircle } from "@mdi/js"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } 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 { haStyleDialog } from "../../../../../resources/styles"; import { HomeAssistant } from "../../../../../types"; import { ZWaveJSRemoveNodeDialogParams } from "./show-dialog-zwave_js-remove-node"; -import { mdiCheckCircle, mdiCloseCircle } from "@mdi/js"; -import { fireEvent } from "../../../../../common/dom/fire_event"; export interface ZWaveJSRemovedNode { node_id: number; diff --git a/src/panels/config/integrations/integration-panels/zwave_js/zwave_js-config-dashboard.ts b/src/panels/config/integrations/integration-panels/zwave_js/zwave_js-config-dashboard.ts index 5e082e90e..6a9580cb7 100644 --- a/src/panels/config/integrations/integration-panels/zwave_js/zwave_js-config-dashboard.ts +++ b/src/panels/config/integrations/integration-panels/zwave_js/zwave_js-config-dashboard.ts @@ -1,20 +1,12 @@ import "@material/mwc-button/mwc-button"; import "@material/mwc-icon-button/mwc-icon-button"; import { mdiCheckCircle, mdiCircle, mdiRefresh } from "@mdi/js"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; import "../../../../../components/ha-card"; -import "../../../../../components/ha-svg-icon"; import "../../../../../components/ha-icon-next"; +import "../../../../../components/ha-svg-icon"; import { getSignedPath } from "../../../../../data/auth"; import { fetchDataCollectionStatus, diff --git a/src/panels/config/integrations/integration-panels/zwave_js/zwave_js-config-router.ts b/src/panels/config/integrations/integration-panels/zwave_js/zwave_js-config-router.ts index 2973f17c3..b20a1b066 100644 --- a/src/panels/config/integrations/integration-panels/zwave_js/zwave_js-config-router.ts +++ b/src/panels/config/integrations/integration-panels/zwave_js/zwave_js-config-router.ts @@ -1,4 +1,3 @@ -import { customElement, property } from "lit-element"; import { HassRouterPage, RouterOptions, @@ -8,6 +7,7 @@ import { navigate } from "../../../../../common/navigate"; import { PageNavigation } from "../../../../../layouts/hass-tabs-subpage"; import { mdiServerNetwork, mdiMathLog } from "@mdi/js"; +import { customElement, property } from "lit/decorators"; export const configTabs: PageNavigation[] = [ { diff --git a/src/panels/config/integrations/integration-panels/zwave_js/zwave_js-logs.ts b/src/panels/config/integrations/integration-panels/zwave_js/zwave_js-logs.ts index d8efb4ed0..90e0d44ed 100644 --- a/src/panels/config/integrations/integration-panels/zwave_js/zwave_js-logs.ts +++ b/src/panels/config/integrations/integration-panels/zwave_js/zwave_js-logs.ts @@ -1,27 +1,19 @@ -import { UnsubscribeFunc } from "home-assistant-js-websocket"; -import { - css, - html, - property, - customElement, - LitElement, - CSSResultArray, - state, - query, -} from "lit-element"; -import "@polymer/paper-listbox/paper-listbox"; import "@polymer/paper-dropdown-menu/paper-dropdown-menu"; +import "@polymer/paper-listbox/paper-listbox"; +import { UnsubscribeFunc } from "home-assistant-js-websocket"; +import { css, CSSResultArray, html, LitElement } from "lit"; +import { customElement, property, state, query } from "lit/decorators"; import { fetchZWaveJSLogConfig, setZWaveJSLogLevel, subscribeZWaveJSLogs, ZWaveJSLogConfig, } from "../../../../../data/zwave_js"; +import "../../../../../layouts/hass-tabs-subpage"; import { SubscribeMixin } from "../../../../../mixins/subscribe-mixin"; +import { haStyle } from "../../../../../resources/styles"; import { HomeAssistant, Route } from "../../../../../types"; import { configTabs } from "./zwave_js-config-router"; -import "../../../../../layouts/hass-tabs-subpage"; -import { haStyle } from "../../../../../resources/styles"; @customElement("zwave_js-logs") class ZWaveJSLogs extends SubscribeMixin(LitElement) { diff --git a/src/panels/config/integrations/integration-panels/zwave_js/zwave_js-node-config.ts b/src/panels/config/integrations/integration-panels/zwave_js/zwave_js-node-config.ts index 47a81f57e..b58c12ec5 100644 --- a/src/panels/config/integrations/integration-panels/zwave_js/zwave_js-node-config.ts +++ b/src/panels/config/integrations/integration-panels/zwave_js/zwave_js-node-config.ts @@ -1,31 +1,37 @@ -import { - mdiCheckCircle, - mdiCircle, - mdiProgressClock, - mdiCloseCircle, -} from "@mdi/js"; -import "../../../../../components/ha-settings-row"; -import "@polymer/paper-item/paper-item"; -import "@polymer/paper-listbox/paper-listbox"; -import "@polymer/paper-dropdown-menu/paper-dropdown-menu"; import "@material/mwc-button/mwc-button"; import "@material/mwc-icon-button/mwc-icon-button"; +import { + mdiCheckCircle, + mdiCircle, + mdiCloseCircle, + mdiProgressClock, +} from "@mdi/js"; +import "@polymer/paper-dropdown-menu/paper-dropdown-menu"; +import "@polymer/paper-item/paper-item"; +import "@polymer/paper-listbox/paper-listbox"; +import { UnsubscribeFunc } from "home-assistant-js-websocket"; import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, property, state } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; +import memoizeOne from "memoize-one"; import { debounce } from "../../../../../common/util/debounce"; import "../../../../../components/ha-card"; -import "../../../../../components/ha-svg-icon"; import "../../../../../components/ha-icon-next"; +import "../../../../../components/ha-settings-row"; +import "../../../../../components/ha-svg-icon"; import "../../../../../components/ha-switch"; +import { + computeDeviceName, + DeviceRegistryEntry, + subscribeDeviceRegistry, +} from "../../../../../data/device_registry"; import { fetchNodeConfigParameters, setNodeConfigParameter, @@ -33,19 +39,11 @@ import { ZWaveJSSetConfigParamResult, } from "../../../../../data/zwave_js"; import "../../../../../layouts/hass-tabs-subpage"; +import { SubscribeMixin } from "../../../../../mixins/subscribe-mixin"; import { haStyle } from "../../../../../resources/styles"; import type { HomeAssistant, Route } from "../../../../../types"; import "../../../ha-config-section"; import { configTabs } from "./zwave_js-config-router"; -import { - DeviceRegistryEntry, - computeDeviceName, - subscribeDeviceRegistry, -} from "../../../../../data/device_registry"; -import { SubscribeMixin } from "../../../../../mixins/subscribe-mixin"; -import { UnsubscribeFunc } from "home-assistant-js-websocket"; -import memoizeOne from "memoize-one"; -import { classMap } from "lit-html/directives/class-map"; const icons = { accepted: mdiCheckCircle, diff --git a/src/panels/config/logs/dialog-system-log-detail.ts b/src/panels/config/logs/dialog-system-log-detail.ts index 2eed2d922..51e2483d7 100644 --- a/src/panels/config/logs/dialog-system-log-detail.ts +++ b/src/panels/config/logs/dialog-system-log-detail.ts @@ -1,15 +1,8 @@ import "@material/mwc-icon-button/mwc-icon-button"; import { mdiClose, mdiContentCopy, mdiPackageVariant } from "@mdi/js"; import "@polymer/paper-tooltip/paper-tooltip"; -import { - css, - CSSResultGroup, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { property, state } from "lit/decorators"; import { fireEvent } from "../../../common/dom/fire_event"; import { copyToClipboard } from "../../../common/util/copy-clipboard"; import "../../../components/ha-dialog"; diff --git a/src/panels/config/logs/error-log-card.ts b/src/panels/config/logs/error-log-card.ts index 1f10e7a5a..b096fb93a 100644 --- a/src/panels/config/logs/error-log-card.ts +++ b/src/panels/config/logs/error-log-card.ts @@ -1,13 +1,6 @@ import "@material/mwc-button"; -import { - css, - CSSResultGroup, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { property, state } from "lit/decorators"; import "../../../components/ha-icon-button"; import { fetchErrorLog } from "../../../data/error_log"; import { HomeAssistant } from "../../../types"; diff --git a/src/panels/config/logs/ha-config-logs.ts b/src/panels/config/logs/ha-config-logs.ts index a2166e3ba..13ef1137d 100644 --- a/src/panels/config/logs/ha-config-logs.ts +++ b/src/panels/config/logs/ha-config-logs.ts @@ -1,13 +1,5 @@ -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - query, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, query } from "lit/decorators"; import "../../../layouts/hass-tabs-subpage"; import { haStyle } from "../../../resources/styles"; import { HomeAssistant, Route } from "../../../types"; diff --git a/src/panels/config/logs/system-log-card.ts b/src/panels/config/logs/system-log-card.ts index 61d03b3da..bc59a0745 100644 --- a/src/panels/config/logs/system-log-card.ts +++ b/src/panels/config/logs/system-log-card.ts @@ -1,15 +1,7 @@ import "@polymer/paper-item/paper-item"; import "@polymer/paper-item/paper-item-body"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import "../../../components/buttons/ha-call-service-button"; import "../../../components/buttons/ha-progress-button"; import "../../../components/ha-card"; diff --git a/src/panels/config/lovelace/dashboards/dialog-lovelace-dashboard-detail.ts b/src/panels/config/lovelace/dashboards/dialog-lovelace-dashboard-detail.ts index 5748d93f7..423afb32a 100644 --- a/src/panels/config/lovelace/dashboards/dialog-lovelace-dashboard-detail.ts +++ b/src/panels/config/lovelace/dashboards/dialog-lovelace-dashboard-detail.ts @@ -1,14 +1,6 @@ import "@material/mwc-button/mwc-button"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { slugify } from "../../../../common/string/slugify"; import { computeRTLDirection } from "../../../../common/util/compute_rtl"; import { createCloseHeading } from "../../../../components/ha-dialog"; diff --git a/src/panels/config/lovelace/dashboards/ha-config-lovelace-dashboards.ts b/src/panels/config/lovelace/dashboards/ha-config-lovelace-dashboards.ts index 2eef3839f..ebe0b30de 100644 --- a/src/panels/config/lovelace/dashboards/ha-config-lovelace-dashboards.ts +++ b/src/panels/config/lovelace/dashboards/ha-config-lovelace-dashboards.ts @@ -1,14 +1,7 @@ import { mdiPlus } from "@mdi/js"; import "@polymer/paper-tooltip/paper-tooltip"; -import { - customElement, - html, - state, - LitElement, - property, - PropertyValues, - TemplateResult, -} from "lit-element"; +import { html, LitElement, PropertyValues, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import memoize from "memoize-one"; import { navigate } from "../../../../common/navigate"; import { compare } from "../../../../common/string/compare"; diff --git a/src/panels/config/lovelace/ha-config-lovelace.ts b/src/panels/config/lovelace/ha-config-lovelace.ts index 1f12645d3..2c09c8156 100644 --- a/src/panels/config/lovelace/ha-config-lovelace.ts +++ b/src/panels/config/lovelace/ha-config-lovelace.ts @@ -1,4 +1,4 @@ -import { customElement, property } from "lit-element"; +import { customElement, property } from "lit/decorators"; import { HassRouterPage, RouterOptions, diff --git a/src/panels/config/lovelace/resources/dialog-lovelace-resource-detail.ts b/src/panels/config/lovelace/resources/dialog-lovelace-resource-detail.ts index 48836d8a4..66b45c239 100644 --- a/src/panels/config/lovelace/resources/dialog-lovelace-resource-detail.ts +++ b/src/panels/config/lovelace/resources/dialog-lovelace-resource-detail.ts @@ -2,16 +2,8 @@ import "@material/mwc-button/mwc-button"; import "@polymer/paper-input/paper-input"; import "@polymer/paper-item/paper-item"; import "@polymer/paper-listbox/paper-listbox"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { createCloseHeading } from "../../../../components/ha-dialog"; import "../../../../components/ha-paper-dropdown-menu"; import { 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 8366b5205..3497bd1a7 100644 --- a/src/panels/config/lovelace/resources/ha-config-lovelace-resources.ts +++ b/src/panels/config/lovelace/resources/ha-config-lovelace-resources.ts @@ -3,15 +3,8 @@ import "@polymer/paper-checkbox/paper-checkbox"; import "@polymer/paper-dropdown-menu/paper-dropdown-menu"; import "@polymer/paper-item/paper-icon-item"; import "@polymer/paper-listbox/paper-listbox"; -import { - customElement, - html, - state, - LitElement, - property, - PropertyValues, - TemplateResult, -} from "lit-element"; +import { html, LitElement, PropertyValues, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import memoize from "memoize-one"; import { compare } from "../../../../common/string/compare"; import { diff --git a/src/panels/config/person/dialog-person-detail.ts b/src/panels/config/person/dialog-person-detail.ts index d9fb7f3dc..88dce3ce2 100644 --- a/src/panels/config/person/dialog-person-detail.ts +++ b/src/panels/config/person/dialog-person-detail.ts @@ -1,14 +1,7 @@ import "@material/mwc-button"; import "@polymer/paper-input/paper-input"; -import { - css, - CSSResultGroup, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { property, state } from "lit/decorators"; import memoizeOne from "memoize-one"; import { computeRTLDirection } from "../../../common/util/compute_rtl"; import "../../../components/entity/ha-entities-picker"; diff --git a/src/panels/config/person/ha-config-person.ts b/src/panels/config/person/ha-config-person.ts index 345232042..e67bb715f 100644 --- a/src/panels/config/person/ha-config-person.ts +++ b/src/panels/config/person/ha-config-person.ts @@ -1,15 +1,8 @@ import { mdiPlus } from "@mdi/js"; import "@polymer/paper-item/paper-icon-item"; import "@polymer/paper-item/paper-item-body"; -import { - css, - CSSResultGroup, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { property, state } from "lit/decorators"; import { compare } from "../../../common/string/compare"; import "../../../components/ha-card"; import "../../../components/ha-fab"; diff --git a/src/panels/config/scene/ha-config-scene.ts b/src/panels/config/scene/ha-config-scene.ts index 275a00200..ae0742e75 100644 --- a/src/panels/config/scene/ha-config-scene.ts +++ b/src/panels/config/scene/ha-config-scene.ts @@ -1,5 +1,6 @@ import { HassEntities } from "home-assistant-js-websocket"; -import { customElement, property, PropertyValues } from "lit-element"; +import { PropertyValues } from "lit"; +import { customElement, property } from "lit/decorators"; import memoizeOne from "memoize-one"; import { computeStateDomain } from "../../../common/entity/compute_state_domain"; import { debounce } from "../../../common/util/debounce"; diff --git a/src/panels/config/scene/ha-scene-dashboard.ts b/src/panels/config/scene/ha-scene-dashboard.ts index 846f20948..d88723198 100644 --- a/src/panels/config/scene/ha-scene-dashboard.ts +++ b/src/panels/config/scene/ha-scene-dashboard.ts @@ -8,26 +8,18 @@ import { mdiPlus, } from "@mdi/js"; import "@polymer/paper-tooltip/paper-tooltip"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; -import { ifDefined } from "lit-html/directives/if-defined"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; +import { ifDefined } from "lit/directives/if-defined"; import memoizeOne from "memoize-one"; import { fireEvent } from "../../../common/dom/fire_event"; import { computeStateName } from "../../../common/entity/compute_state_name"; import { stateIcon } from "../../../common/entity/state_icon"; import { DataTableColumnContainer } from "../../../components/data-table/ha-data-table"; +import "../../../components/ha-button-related-filter-menu"; import "../../../components/ha-fab"; import "../../../components/ha-icon"; import "../../../components/ha-svg-icon"; -import "../../../components/ha-button-related-filter-menu"; import { forwardHaptic } from "../../../data/haptics"; import { activateScene, SceneEntity } from "../../../data/scene"; import { showAlertDialog } from "../../../dialogs/generic/show-dialog-box"; diff --git a/src/panels/config/scene/ha-scene-editor.ts b/src/panels/config/scene/ha-scene-editor.ts index 953535dbc..9fcfffd70 100644 --- a/src/panels/config/scene/ha-scene-editor.ts +++ b/src/panels/config/scene/ha-scene-editor.ts @@ -13,15 +13,13 @@ import { HassEvent } from "home-assistant-js-websocket"; import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; +} from "lit"; +import { customElement, property, state } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; import memoizeOne from "memoize-one"; import { fireEvent } from "../../../common/dom/fire_event"; import { computeDomain } from "../../../common/entity/compute_domain"; diff --git a/src/panels/config/script/ha-config-script.ts b/src/panels/config/script/ha-config-script.ts index 6efe063b5..f1c11a2b8 100644 --- a/src/panels/config/script/ha-config-script.ts +++ b/src/panels/config/script/ha-config-script.ts @@ -1,5 +1,6 @@ import { HassEntities } from "home-assistant-js-websocket"; -import { customElement, property, PropertyValues } from "lit-element"; +import { PropertyValues } from "lit"; +import { customElement, property } from "lit/decorators"; import memoizeOne from "memoize-one"; import { computeStateDomain } from "../../../common/entity/compute_state_domain"; import { debounce } from "../../../common/util/debounce"; diff --git a/src/panels/config/script/ha-script-editor.ts b/src/panels/config/script/ha-script-editor.ts index fc1721705..4d0cec0df 100644 --- a/src/panels/config/script/ha-script-editor.ts +++ b/src/panels/config/script/ha-script-editor.ts @@ -15,14 +15,12 @@ import { css, CSSResultGroup, html, - state, LitElement, - property, PropertyValues, - query, TemplateResult, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; +} from "lit"; +import { property, state, query } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; import { computeObjectId } from "../../../common/entity/compute_object_id"; import { navigate } from "../../../common/navigate"; import { slugify } from "../../../common/string/slugify"; diff --git a/src/panels/config/script/ha-script-picker.ts b/src/panels/config/script/ha-script-picker.ts index aa2e52781..c52efb19d 100644 --- a/src/panels/config/script/ha-script-picker.ts +++ b/src/panels/config/script/ha-script-picker.ts @@ -7,16 +7,8 @@ import { mdiPlus, } from "@mdi/js"; import { HassEntity } from "home-assistant-js-websocket"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import memoizeOne from "memoize-one"; import { formatDateTime } from "../../../common/datetime/format_date_time"; import { fireEvent } from "../../../common/dom/fire_event"; diff --git a/src/panels/config/server_control/ha-config-server-control.ts b/src/panels/config/server_control/ha-config-server-control.ts index 8eb165aa7..3a5c7ae56 100644 --- a/src/panels/config/server_control/ha-config-server-control.ts +++ b/src/panels/config/server_control/ha-config-server-control.ts @@ -2,16 +2,8 @@ import "@material/mwc-button"; import "@polymer/app-layout/app-header/app-header"; import "@polymer/app-layout/app-toolbar/app-toolbar"; import "@polymer/paper-input/paper-input"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { componentsWithService } from "../../../common/config/components_with_service"; import "../../../components/buttons/ha-call-service-button"; import "../../../components/ha-card"; diff --git a/src/panels/config/tags/dialog-tag-detail.ts b/src/panels/config/tags/dialog-tag-detail.ts index 0f7f55111..9d7f32233 100644 --- a/src/panels/config/tags/dialog-tag-detail.ts +++ b/src/panels/config/tags/dialog-tag-detail.ts @@ -1,15 +1,7 @@ import "@material/mwc-button"; import "@polymer/paper-input/paper-input"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { fireEvent } from "../../../common/dom/fire_event"; import { createCloseHeading } from "../../../components/ha-dialog"; import "../../../components/ha-formfield"; diff --git a/src/panels/config/tags/ha-config-tags.ts b/src/panels/config/tags/ha-config-tags.ts index 9c138eabe..b8745a611 100644 --- a/src/panels/config/tags/ha-config-tags.ts +++ b/src/panels/config/tags/ha-config-tags.ts @@ -6,14 +6,8 @@ import { mdiPlus, mdiRobot, } from "@mdi/js"; -import { - customElement, - html, - state, - LitElement, - property, - PropertyValues, -} from "lit-element"; +import { html, LitElement, PropertyValues } from "lit"; +import { customElement, property, state } from "lit/decorators"; import memoizeOne from "memoize-one"; import { DataTableColumnContainer } from "../../../components/data-table/ha-data-table"; import "../../../components/ha-card"; diff --git a/src/panels/config/tags/tag-image.ts b/src/panels/config/tags/tag-image.ts index eae822f0b..ce5a5826c 100644 --- a/src/panels/config/tags/tag-image.ts +++ b/src/panels/config/tags/tag-image.ts @@ -1,12 +1,6 @@ import { mdiNfcVariant } from "@mdi/js"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement } from "lit"; +import { customElement, property } from "lit/decorators"; import "../../../components/ha-svg-icon"; import { TagRowData } from "./ha-config-tags"; diff --git a/src/panels/config/users/dialog-add-user.ts b/src/panels/config/users/dialog-add-user.ts index 850157a63..64f9d4723 100644 --- a/src/panels/config/users/dialog-add-user.ts +++ b/src/panels/config/users/dialog-add-user.ts @@ -3,14 +3,12 @@ import "@polymer/paper-input/paper-input"; import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, property, state } from "lit/decorators"; import { computeRTLDirection } from "../../../common/util/compute_rtl"; import "../../../components/ha-circular-progress"; import "../../../components/ha-dialog"; diff --git a/src/panels/config/users/dialog-user-detail.ts b/src/panels/config/users/dialog-user-detail.ts index 864aaef4c..f7f47b015 100644 --- a/src/panels/config/users/dialog-user-detail.ts +++ b/src/panels/config/users/dialog-user-detail.ts @@ -1,16 +1,8 @@ import "@material/mwc-button"; import "@polymer/paper-input/paper-input"; import "@polymer/paper-tooltip/paper-tooltip"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { computeRTLDirection } from "../../../common/util/compute_rtl"; import { createCloseHeading } from "../../../components/ha-dialog"; import "../../../components/ha-formfield"; diff --git a/src/panels/config/users/ha-config-users.ts b/src/panels/config/users/ha-config-users.ts index 74dde61fc..13807febd 100644 --- a/src/panels/config/users/ha-config-users.ts +++ b/src/panels/config/users/ha-config-users.ts @@ -1,11 +1,6 @@ import { mdiPlus } from "@mdi/js"; -import { - customElement, - LitElement, - property, - PropertyValues, -} from "lit-element"; -import { html } from "lit-html"; +import { html, LitElement, PropertyValues } from "lit"; +import { customElement, property } from "lit/decorators"; import memoizeOne from "memoize-one"; import { HASSDomEvent } from "../../../common/dom/fire_event"; import { diff --git a/src/panels/config/zone/dialog-zone-detail.ts b/src/panels/config/zone/dialog-zone-detail.ts index 380d6ed76..ac4cedc32 100644 --- a/src/panels/config/zone/dialog-zone-detail.ts +++ b/src/panels/config/zone/dialog-zone-detail.ts @@ -1,14 +1,7 @@ import "@material/mwc-button"; import "@polymer/paper-input/paper-input"; -import { - css, - CSSResultGroup, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { property, state } from "lit/decorators"; import memoizeOne from "memoize-one"; import { fireEvent } from "../../../common/dom/fire_event"; import { addDistanceToCoord } from "../../../common/location/add_distance_to_coord"; diff --git a/src/panels/config/zone/ha-config-zone.ts b/src/panels/config/zone/ha-config-zone.ts index 328ff2707..3d4082b58 100644 --- a/src/panels/config/zone/ha-config-zone.ts +++ b/src/panels/config/zone/ha-config-zone.ts @@ -1,4 +1,3 @@ -import "../../../components/ha-fab"; import "@material/mwc-icon-button"; import { mdiPencil, mdiPencilOff, mdiPlus } from "@mdi/js"; import "@polymer/paper-item/paper-icon-item"; @@ -9,21 +8,19 @@ import { HassEntity, UnsubscribeFunc } from "home-assistant-js-websocket"; import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, - query, TemplateResult, -} from "lit-element"; -import { ifDefined } from "lit-html/directives/if-defined"; +} from "lit"; +import { customElement, property, state, query } from "lit/decorators"; +import { ifDefined } from "lit/directives/if-defined"; import memoizeOne from "memoize-one"; import { computeStateDomain } from "../../../common/entity/compute_state_domain"; import { navigate } from "../../../common/navigate"; import { compare } from "../../../common/string/compare"; import "../../../components/ha-card"; +import "../../../components/ha-fab"; import "../../../components/ha-svg-icon"; import "../../../components/map/ha-locations-editor"; import type { diff --git a/src/panels/custom/ha-panel-custom.ts b/src/panels/custom/ha-panel-custom.ts index 0956624db..02eb6f7f5 100644 --- a/src/panels/custom/ha-panel-custom.ts +++ b/src/panels/custom/ha-panel-custom.ts @@ -1,4 +1,5 @@ -import { property, PropertyValues, ReactiveElement } from "lit-element"; +import { PropertyValues, ReactiveElement } from "lit"; +import { property } from "lit/decorators"; import { navigate } from "../../common/navigate"; import { CustomPanelInfo } from "../../data/panel_custom"; import { HomeAssistant, Route } from "../../types"; diff --git a/src/panels/developer-tools/developer-tools-router.ts b/src/panels/developer-tools/developer-tools-router.ts index 903948a16..efc0c01dd 100644 --- a/src/panels/developer-tools/developer-tools-router.ts +++ b/src/panels/developer-tools/developer-tools-router.ts @@ -1,5 +1,5 @@ import { PolymerElement } from "@polymer/polymer"; -import { customElement, property } from "lit-element"; +import { customElement, property } from "lit/decorators"; import { HassRouterPage, RouterOptions } from "../../layouts/hass-router-page"; import { HomeAssistant } from "../../types"; diff --git a/src/panels/developer-tools/event/event-subscribe-card.ts b/src/panels/developer-tools/event/event-subscribe-card.ts index 3bdc41acb..cfa8a67be 100644 --- a/src/panels/developer-tools/event/event-subscribe-card.ts +++ b/src/panels/developer-tools/event/event-subscribe-card.ts @@ -1,16 +1,8 @@ import "@material/mwc-button"; import "@polymer/paper-input/paper-input"; import { HassEvent } from "home-assistant-js-websocket"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { formatTime } from "../../../common/datetime/format_time"; import "../../../components/ha-card"; import { PolymerChangedEvent } from "../../../polymer-types"; diff --git a/src/panels/developer-tools/ha-panel-developer-tools.ts b/src/panels/developer-tools/ha-panel-developer-tools.ts index 5ff7069cd..f8504f64c 100644 --- a/src/panels/developer-tools/ha-panel-developer-tools.ts +++ b/src/panels/developer-tools/ha-panel-developer-tools.ts @@ -1,15 +1,8 @@ import "@polymer/app-layout/app-header/app-header"; import "@polymer/app-layout/app-toolbar/app-toolbar"; import "@polymer/paper-tabs/paper-tab"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import { navigate } from "../../common/navigate"; import "../../components/ha-icon-button"; import "../../components/ha-menu-button"; diff --git a/src/panels/developer-tools/service/developer-tools-service.ts b/src/panels/developer-tools/service/developer-tools-service.ts index 882dfab82..0cb879496 100644 --- a/src/panels/developer-tools/service/developer-tools-service.ts +++ b/src/panels/developer-tools/service/developer-tools-service.ts @@ -1,15 +1,8 @@ import { mdiHelpCircle } from "@mdi/js"; import { ERR_CONNECTION_LOST } from "home-assistant-js-websocket"; import { safeLoad } from "js-yaml"; -import { - css, - CSSResultGroup, - html, - state, - LitElement, - property, - query, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement } from "lit"; +import { property, query, state } from "lit/decorators"; import memoizeOne from "memoize-one"; import { LocalStorage } from "../../../common/decorators/local-storage"; import { computeDomain } from "../../../common/entity/compute_domain"; diff --git a/src/panels/developer-tools/state/developer-tools-state.js b/src/panels/developer-tools/state/developer-tools-state.js index 7bedfd8a4..5d7cd84cc 100644 --- a/src/panels/developer-tools/state/developer-tools-state.js +++ b/src/panels/developer-tools/state/developer-tools-state.js @@ -1,7 +1,7 @@ import "@material/mwc-button"; import { - mdiInformationOutline, mdiClipboardTextMultipleOutline, + mdiInformationOutline, } from "@mdi/js"; import "@polymer/paper-checkbox/paper-checkbox"; import "@polymer/paper-input/paper-input"; @@ -11,6 +11,7 @@ import { PolymerElement } from "@polymer/polymer/polymer-element"; import { safeDump, safeLoad } from "js-yaml"; import { formatDateTimeWithSeconds } from "../../../common/datetime/format_date_time"; import { computeRTL } from "../../../common/util/compute_rtl"; +import { copyToClipboard } from "../../../common/util/copy-clipboard"; import "../../../components/entity/ha-entity-picker"; import "../../../components/ha-code-editor"; import "../../../components/ha-svg-icon"; @@ -18,7 +19,6 @@ import { showAlertDialog } from "../../../dialogs/generic/show-dialog-box"; import { EventsMixin } from "../../../mixins/events-mixin"; import LocalizeMixin from "../../../mixins/localize-mixin"; import "../../../styles/polymer-ha-style"; -import { copyToClipboard } from "../../../common/util/copy-clipboard"; const ERROR_SENTINEL = {}; /* diff --git a/src/panels/developer-tools/template/developer-tools-template.ts b/src/panels/developer-tools/template/developer-tools-template.ts index 9014942a1..670ae744b 100644 --- a/src/panels/developer-tools/template/developer-tools-template.ts +++ b/src/panels/developer-tools/template/developer-tools-template.ts @@ -1,15 +1,8 @@ import "@material/mwc-button/mwc-button"; import { UnsubscribeFunc } from "home-assistant-js-websocket"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - property, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; +import { css, CSSResultGroup, html, LitElement } from "lit"; +import { customElement, property, state } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; import { debounce } from "../../../common/util/debounce"; import "../../../components/ha-circular-progress"; import "../../../components/ha-code-editor"; diff --git a/src/panels/history/ha-panel-history.ts b/src/panels/history/ha-panel-history.ts index 59b89758c..31737c887 100644 --- a/src/panels/history/ha-panel-history.ts +++ b/src/panels/history/ha-panel-history.ts @@ -1,7 +1,7 @@ import "@polymer/app-layout/app-header/app-header"; import "@polymer/app-layout/app-toolbar/app-toolbar"; -import { css, state, LitElement, property, PropertyValues } from "lit-element"; -import { html } from "lit-html"; +import { css, html, LitElement, PropertyValues } from "lit"; +import { property, state } from "lit/decorators"; import { computeRTL } from "../../common/util/compute_rtl"; import "../../components/entity/ha-entity-picker"; import "../../components/ha-circular-progress"; diff --git a/src/panels/logbook/ha-logbook.ts b/src/panels/logbook/ha-logbook.ts index f87af09c2..e748085b0 100644 --- a/src/panels/logbook/ha-logbook.ts +++ b/src/panels/logbook/ha-logbook.ts @@ -1,16 +1,14 @@ +import { Layout1d, scroll } from "@lit-labs/virtualizer"; import { css, CSSResultGroup, - customElement, - eventOptions, html, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; -import { scroll } from "lit-virtualizer"; +} from "lit"; +import { customElement, eventOptions, property } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; import { DOMAINS_WITH_DYNAMIC_PICTURE } from "../../common/const"; import { formatDate } from "../../common/datetime/format_date"; import { formatTimeWithSeconds } from "../../common/datetime/format_time"; @@ -22,8 +20,8 @@ import { computeRTL, emitRTLDirection } from "../../common/util/compute_rtl"; import "../../components/entity/state-badge"; import "../../components/ha-circular-progress"; import "../../components/ha-relative-time"; -import { TraceContexts } from "../../data/trace"; import { LogbookEntry } from "../../data/logbook"; +import { TraceContexts } from "../../data/trace"; import { haStyle, haStyleScrollbar } from "../../resources/styles"; import { HomeAssistant } from "../../types"; @@ -101,7 +99,9 @@ class HaLogbook extends LitElement { ${this.virtualize ? scroll({ items: this.entries, - renderItem: (item: LogbookEntry, index?: number) => + layout: Layout1d, + // @ts-expect-error + renderItem: (item: LogbookEntry, index) => this._renderLogbookItem(item, index), }) : this.entries.map((item, index) => @@ -349,7 +349,7 @@ class HaLogbook extends LitElement { color: var(--primary-color); } - .uni-virtualizer-host { + :host([virtualize]) .container { display: block; position: relative; contain: strict; @@ -357,7 +357,7 @@ class HaLogbook extends LitElement { overflow: auto; } - .uni-virtualizer-host > * { + .container > * { box-sizing: border-box; } diff --git a/src/panels/logbook/ha-panel-logbook.ts b/src/panels/logbook/ha-panel-logbook.ts index b08497a2a..9c93f077e 100644 --- a/src/panels/logbook/ha-panel-logbook.ts +++ b/src/panels/logbook/ha-panel-logbook.ts @@ -1,15 +1,9 @@ import { mdiRefresh } from "@mdi/js"; import "@polymer/app-layout/app-header/app-header"; import "@polymer/app-layout/app-toolbar/app-toolbar"; -import { - css, - customElement, - html, - state, - LitElement, - property, - PropertyValues, -} from "lit-element"; +import { css, html, LitElement, PropertyValues } from "lit"; +import { customElement, property, state } from "lit/decorators"; +import { isComponentLoaded } from "../../common/config/is_component_loaded"; import { computeRTL } from "../../common/util/compute_rtl"; import "../../components/entity/ha-entity-picker"; import "../../components/ha-circular-progress"; @@ -17,19 +11,18 @@ import "../../components/ha-date-range-picker"; import type { DateRangePickerRanges } from "../../components/ha-date-range-picker"; import "../../components/ha-icon-button"; import "../../components/ha-menu-button"; -import { TraceContexts, loadTraceContexts } from "../../data/trace"; import { clearLogbookCache, getLogbookData, LogbookEntry, } from "../../data/logbook"; import { fetchPersons } from "../../data/person"; +import { loadTraceContexts, TraceContexts } from "../../data/trace"; import { fetchUsers } from "../../data/user"; import "../../layouts/ha-app-layout"; import { haStyle } from "../../resources/styles"; import { HomeAssistant } from "../../types"; import "./ha-logbook"; -import { isComponentLoaded } from "../../common/config/is_component_loaded"; @customElement("ha-panel-logbook") export class HaPanelLogbook extends LitElement { diff --git a/src/panels/lovelace/badges/hui-entity-filter-badge.ts b/src/panels/lovelace/badges/hui-entity-filter-badge.ts index b89135e7e..a45799695 100644 --- a/src/panels/lovelace/badges/hui-entity-filter-badge.ts +++ b/src/panels/lovelace/badges/hui-entity-filter-badge.ts @@ -1,4 +1,5 @@ -import { state, property, PropertyValues, ReactiveElement } from "lit-element"; +import { PropertyValues, ReactiveElement } from "lit"; +import { property, state } from "lit/decorators"; import { HomeAssistant } from "../../../types"; import { evaluateFilter } from "../common/evaluate-filter"; import { processConfigEntities } from "../common/process-config-entities"; diff --git a/src/panels/lovelace/badges/hui-error-badge.ts b/src/panels/lovelace/badges/hui-error-badge.ts index e80abd837..f15a5b049 100644 --- a/src/panels/lovelace/badges/hui-error-badge.ts +++ b/src/panels/lovelace/badges/hui-error-badge.ts @@ -1,12 +1,5 @@ -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, state } from "lit/decorators"; import "../../../components/ha-label-badge"; import { HomeAssistant } from "../../../types"; import { LovelaceBadge } from "../types"; diff --git a/src/panels/lovelace/badges/hui-state-label-badge.ts b/src/panels/lovelace/badges/hui-state-label-badge.ts index d94354c3a..9ccceba1e 100644 --- a/src/panels/lovelace/badges/hui-state-label-badge.ts +++ b/src/panels/lovelace/badges/hui-state-label-badge.ts @@ -1,13 +1,6 @@ -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; -import { ifDefined } from "lit-html/directives/if-defined"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; +import { ifDefined } from "lit/directives/if-defined"; import "../../../components/entity/ha-state-label-badge"; import { ActionHandlerEvent } from "../../../data/lovelace"; import { HomeAssistant } from "../../../types"; diff --git a/src/panels/lovelace/cards/hui-alarm-panel-card.ts b/src/panels/lovelace/cards/hui-alarm-panel-card.ts index 8d20bf51a..8b29c7f8a 100644 --- a/src/panels/lovelace/cards/hui-alarm-panel-card.ts +++ b/src/panels/lovelace/cards/hui-alarm-panel-card.ts @@ -3,16 +3,13 @@ import type { PaperInputElement } from "@polymer/paper-input/paper-input"; import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, - query, TemplateResult, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; +} from "lit"; +import { customElement, property, state, query } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; import { applyThemesOnElement } from "../../../common/dom/apply_themes_on_element"; import { fireEvent } from "../../../common/dom/fire_event"; import "../../../components/ha-card"; diff --git a/src/panels/lovelace/cards/hui-button-card.ts b/src/panels/lovelace/cards/hui-button-card.ts index 4f6af2784..931147d26 100644 --- a/src/panels/lovelace/cards/hui-button-card.ts +++ b/src/panels/lovelace/cards/hui-button-card.ts @@ -5,18 +5,20 @@ import { HassEntity } from "home-assistant-js-websocket"; import { css, CSSResultGroup, + html, + LitElement, + PropertyValues, + TemplateResult, +} from "lit"; +import { customElement, eventOptions, - html, - state, - LitElement, property, - PropertyValues, queryAsync, - TemplateResult, -} from "lit-element"; -import { ifDefined } from "lit-html/directives/if-defined"; -import { styleMap } from "lit-html/directives/style-map"; + state, +} from "lit/decorators"; +import { ifDefined } from "lit/directives/if-defined"; +import { styleMap } from "lit/directives/style-map"; import { DOMAINS_TOGGLE } from "../../../common/const"; import { applyThemesOnElement } from "../../../common/dom/apply_themes_on_element"; import { computeActiveState } from "../../../common/entity/compute_active_state"; diff --git a/src/panels/lovelace/cards/hui-calendar-card.ts b/src/panels/lovelace/cards/hui-calendar-card.ts index 48e31d5f8..13b5bcc8b 100644 --- a/src/panels/lovelace/cards/hui-calendar-card.ts +++ b/src/panels/lovelace/cards/hui-calendar-card.ts @@ -1,15 +1,12 @@ import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, - query, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, property, state, query } from "lit/decorators"; import { HA_COLOR_PALETTE } from "../../../common/const"; import { applyThemesOnElement } from "../../../common/dom/apply_themes_on_element"; import { HASSDomEvent } from "../../../common/dom/fire_event"; diff --git a/src/panels/lovelace/cards/hui-conditional-card.ts b/src/panels/lovelace/cards/hui-conditional-card.ts index d89e60927..6b0ba014e 100644 --- a/src/panels/lovelace/cards/hui-conditional-card.ts +++ b/src/panels/lovelace/cards/hui-conditional-card.ts @@ -1,4 +1,4 @@ -import { customElement } from "lit-element"; +import { customElement } from "lit/decorators"; import { LovelaceCardConfig } from "../../../data/lovelace"; import { computeCardSize } from "../common/compute-card-size"; import { HuiConditionalBase } from "../components/hui-conditional-base"; diff --git a/src/panels/lovelace/cards/hui-empty-state-card.ts b/src/panels/lovelace/cards/hui-empty-state-card.ts index b56c23201..333cad59a 100644 --- a/src/panels/lovelace/cards/hui-empty-state-card.ts +++ b/src/panels/lovelace/cards/hui-empty-state-card.ts @@ -1,13 +1,6 @@ import "@material/mwc-button/mwc-button"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import "../../../components/ha-card"; import { HomeAssistant } from "../../../types"; import { LovelaceCard } from "../types"; diff --git a/src/panels/lovelace/cards/hui-entities-card.ts b/src/panels/lovelace/cards/hui-entities-card.ts index 92d05914d..a74f934be 100644 --- a/src/panels/lovelace/cards/hui-entities-card.ts +++ b/src/panels/lovelace/cards/hui-entities-card.ts @@ -1,13 +1,12 @@ import { css, CSSResultGroup, - customElement, html, - state, LitElement, PropertyValues, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, state } from "lit/decorators"; import { DOMAINS_TOGGLE } from "../../../common/const"; import { applyThemesOnElement } from "../../../common/dom/apply_themes_on_element"; import { computeDomain } from "../../../common/entity/compute_domain"; @@ -69,18 +68,18 @@ class HuiEntitiesCard extends LitElement implements LovelaceCard { set hass(hass: HomeAssistant) { this._hass = hass; - this.shadowRoot!.querySelectorAll("#states > div > *").forEach( - (element: unknown) => { + this.shadowRoot + ?.querySelectorAll("#states > div > *") + .forEach((element: unknown) => { (element as LovelaceRow).hass = hass; - } - ); + }); if (this._headerElement) { this._headerElement.hass = hass; } if (this._footerElement) { this._footerElement.hass = hass; } - const entitiesToggle = this.shadowRoot!.querySelector( + const entitiesToggle = this.shadowRoot?.querySelector( "hui-entities-toggle" ); if (entitiesToggle) { diff --git a/src/panels/lovelace/cards/hui-entity-button-card.ts b/src/panels/lovelace/cards/hui-entity-button-card.ts index 0cb0b7eb4..e6b79249b 100644 --- a/src/panels/lovelace/cards/hui-entity-button-card.ts +++ b/src/panels/lovelace/cards/hui-entity-button-card.ts @@ -1,4 +1,4 @@ -import { customElement } from "lit-element"; +import { customElement } from "lit/decorators"; import { HuiButtonCard } from "./hui-button-card"; @customElement("hui-entity-button-card") diff --git a/src/panels/lovelace/cards/hui-entity-card.ts b/src/panels/lovelace/cards/hui-entity-card.ts index 7bb047998..fa7d14d97 100644 --- a/src/panels/lovelace/cards/hui-entity-card.ts +++ b/src/panels/lovelace/cards/hui-entity-card.ts @@ -1,14 +1,12 @@ import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, property, state } from "lit/decorators"; import { applyThemesOnElement } from "../../../common/dom/apply_themes_on_element"; import { fireEvent } from "../../../common/dom/fire_event"; import { computeStateDisplay } from "../../../common/entity/compute_state_display"; diff --git a/src/panels/lovelace/cards/hui-entity-filter-card.ts b/src/panels/lovelace/cards/hui-entity-filter-card.ts index 517b08a13..ed1db8623 100644 --- a/src/panels/lovelace/cards/hui-entity-filter-card.ts +++ b/src/panels/lovelace/cards/hui-entity-filter-card.ts @@ -1,4 +1,5 @@ -import { state, property, PropertyValues, ReactiveElement } from "lit-element"; +import { PropertyValues, ReactiveElement } from "lit"; +import { property, state } from "lit/decorators"; import { LovelaceCardConfig } from "../../../data/lovelace"; import { HomeAssistant } from "../../../types"; import { computeCardSize } from "../common/compute-card-size"; diff --git a/src/panels/lovelace/cards/hui-error-card.ts b/src/panels/lovelace/cards/hui-error-card.ts index 14f1ceaba..747b70016 100644 --- a/src/panels/lovelace/cards/hui-error-card.ts +++ b/src/panels/lovelace/cards/hui-error-card.ts @@ -1,13 +1,6 @@ import { safeDump } from "js-yaml"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, state } from "lit/decorators"; import { HomeAssistant } from "../../../types"; import { LovelaceCard } from "../types"; import { ErrorCardConfig } from "./types"; diff --git a/src/panels/lovelace/cards/hui-gauge-card.ts b/src/panels/lovelace/cards/hui-gauge-card.ts index 9560e015c..f87a9081e 100644 --- a/src/panels/lovelace/cards/hui-gauge-card.ts +++ b/src/panels/lovelace/cards/hui-gauge-card.ts @@ -2,15 +2,13 @@ import { HassEntity } from "home-assistant-js-websocket/dist/types"; import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; -import { styleMap } from "lit-html/directives/style-map"; +} from "lit"; +import { customElement, property, state } from "lit/decorators"; +import { styleMap } from "lit/directives/style-map"; import { applyThemesOnElement } from "../../../common/dom/apply_themes_on_element"; import { fireEvent } from "../../../common/dom/fire_event"; import { computeStateName } from "../../../common/entity/compute_state_name"; diff --git a/src/panels/lovelace/cards/hui-glance-card.ts b/src/panels/lovelace/cards/hui-glance-card.ts index 88ed26415..87265c6d8 100644 --- a/src/panels/lovelace/cards/hui-glance-card.ts +++ b/src/panels/lovelace/cards/hui-glance-card.ts @@ -1,16 +1,14 @@ import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; -import { ifDefined } from "lit-html/directives/if-defined"; +} from "lit"; +import { customElement, property, state } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; +import { ifDefined } from "lit/directives/if-defined"; import relativeTime from "../../../common/datetime/relative_time"; import { applyThemesOnElement } from "../../../common/dom/apply_themes_on_element"; import { computeDomain } from "../../../common/entity/compute_domain"; diff --git a/src/panels/lovelace/cards/hui-grid-card.ts b/src/panels/lovelace/cards/hui-grid-card.ts index b2033890f..504d8e1a0 100644 --- a/src/panels/lovelace/cards/hui-grid-card.ts +++ b/src/panels/lovelace/cards/hui-grid-card.ts @@ -1,8 +1,8 @@ -import { css, CSSResultGroup } from "lit-element"; +import { css, CSSResultGroup } from "lit"; import { computeCardSize } from "../common/compute-card-size"; +import { LovelaceCardEditor } from "../types"; import { HuiStackCard } from "./hui-stack-card"; import { GridCardConfig } from "./types"; -import { LovelaceCardEditor } from "../types"; const DEFAULT_COLUMNS = 3; const SQUARE_ROW_HEIGHTS_BY_COLUMNS = { diff --git a/src/panels/lovelace/cards/hui-history-graph-card.ts b/src/panels/lovelace/cards/hui-history-graph-card.ts index 69b230718..b17a1ad1e 100644 --- a/src/panels/lovelace/cards/hui-history-graph-card.ts +++ b/src/panels/lovelace/cards/hui-history-graph-card.ts @@ -1,15 +1,13 @@ import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; +} from "lit"; +import { customElement, property, state } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; import { throttle } from "../../../common/util/throttle"; import "../../../components/ha-card"; import "../../../components/state-history-charts"; diff --git a/src/panels/lovelace/cards/hui-horizontal-stack-card.ts b/src/panels/lovelace/cards/hui-horizontal-stack-card.ts index 6f3b18bb8..349f5867b 100644 --- a/src/panels/lovelace/cards/hui-horizontal-stack-card.ts +++ b/src/panels/lovelace/cards/hui-horizontal-stack-card.ts @@ -1,4 +1,4 @@ -import { css, CSSResultGroup } from "lit-element"; +import { css, CSSResultGroup } from "lit"; import { computeCardSize } from "../common/compute-card-size"; import { HuiStackCard } from "./hui-stack-card"; diff --git a/src/panels/lovelace/cards/hui-humidifier-card.ts b/src/panels/lovelace/cards/hui-humidifier-card.ts index c6c5651f0..8d514aea5 100644 --- a/src/panels/lovelace/cards/hui-humidifier-card.ts +++ b/src/panels/lovelace/cards/hui-humidifier-card.ts @@ -3,15 +3,13 @@ import { HassEntity } from "home-assistant-js-websocket"; import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, svg, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, property, state } from "lit/decorators"; import { applyThemesOnElement } from "../../../common/dom/apply_themes_on_element"; import { fireEvent } from "../../../common/dom/fire_event"; import { computeStateName } from "../../../common/entity/compute_state_name"; diff --git a/src/panels/lovelace/cards/hui-iframe-card.ts b/src/panels/lovelace/cards/hui-iframe-card.ts index fe97a1528..6ac89599a 100644 --- a/src/panels/lovelace/cards/hui-iframe-card.ts +++ b/src/panels/lovelace/cards/hui-iframe-card.ts @@ -1,13 +1,6 @@ -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; -import { styleMap } from "lit-html/directives/style-map"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; +import { styleMap } from "lit/directives/style-map"; import parseAspectRatio from "../../../common/util/parse-aspect-ratio"; import "../../../components/ha-card"; import { LovelaceCard, LovelaceCardEditor } from "../types"; diff --git a/src/panels/lovelace/cards/hui-light-card.ts b/src/panels/lovelace/cards/hui-light-card.ts index 9f75785bc..0cdca4670 100644 --- a/src/panels/lovelace/cards/hui-light-card.ts +++ b/src/panels/lovelace/cards/hui-light-card.ts @@ -3,16 +3,14 @@ import "@thomasloven/round-slider"; import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; -import { styleMap } from "lit-html/directives/style-map"; +} from "lit"; +import { customElement, property, state } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; +import { styleMap } from "lit/directives/style-map"; import { applyThemesOnElement } from "../../../common/dom/apply_themes_on_element"; import { fireEvent } from "../../../common/dom/fire_event"; import { computeStateDisplay } from "../../../common/entity/compute_state_display"; diff --git a/src/panels/lovelace/cards/hui-logbook-card.ts b/src/panels/lovelace/cards/hui-logbook-card.ts index 077d30bd0..f837b2b69 100644 --- a/src/panels/lovelace/cards/hui-logbook-card.ts +++ b/src/panels/lovelace/cards/hui-logbook-card.ts @@ -1,15 +1,13 @@ import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; +} from "lit"; +import { customElement, property, state } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; import { isComponentLoaded } from "../../../common/config/is_component_loaded"; import { applyThemesOnElement } from "../../../common/dom/apply_themes_on_element"; import { computeStateDomain } from "../../../common/entity/compute_state_domain"; diff --git a/src/panels/lovelace/cards/hui-map-card.ts b/src/panels/lovelace/cards/hui-map-card.ts index 8f94a5c32..493ee4682 100644 --- a/src/panels/lovelace/cards/hui-map-card.ts +++ b/src/panels/lovelace/cards/hui-map-card.ts @@ -12,14 +12,13 @@ import { import { css, CSSResultGroup, - customElement, html, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; +} from "lit"; +import { customElement, property } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; import { LeafletModuleType, replaceTileLayer, diff --git a/src/panels/lovelace/cards/hui-markdown-card.ts b/src/panels/lovelace/cards/hui-markdown-card.ts index 36b81354c..242990aa5 100644 --- a/src/panels/lovelace/cards/hui-markdown-card.ts +++ b/src/panels/lovelace/cards/hui-markdown-card.ts @@ -2,15 +2,13 @@ import { UnsubscribeFunc } from "home-assistant-js-websocket"; import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; +} from "lit"; +import { customElement, property, state } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; import { applyThemesOnElement } from "../../../common/dom/apply_themes_on_element"; import "../../../components/ha-card"; import "../../../components/ha-markdown"; diff --git a/src/panels/lovelace/cards/hui-media-control-card.ts b/src/panels/lovelace/cards/hui-media-control-card.ts index ad34cdf56..571de9628 100644 --- a/src/panels/lovelace/cards/hui-media-control-card.ts +++ b/src/panels/lovelace/cards/hui-media-control-card.ts @@ -5,17 +5,14 @@ import type { PaperProgressElement } from "@polymer/paper-progress/paper-progres import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, - query, TemplateResult, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; -import { styleMap } from "lit-html/directives/style-map"; +} from "lit"; +import { customElement, property, state, query } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; +import { styleMap } from "lit/directives/style-map"; import { applyThemesOnElement } from "../../../common/dom/apply_themes_on_element"; import { fireEvent } from "../../../common/dom/fire_event"; import { computeStateName } from "../../../common/entity/compute_state_name"; diff --git a/src/panels/lovelace/cards/hui-picture-card.ts b/src/panels/lovelace/cards/hui-picture-card.ts index 7c7bab7aa..4983cf736 100644 --- a/src/panels/lovelace/cards/hui-picture-card.ts +++ b/src/panels/lovelace/cards/hui-picture-card.ts @@ -1,15 +1,14 @@ import { css, CSSResultGroup, - customElement, html, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; -import { ifDefined } from "lit-html/directives/if-defined"; +} from "lit"; +import { customElement, property } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; +import { ifDefined } from "lit/directives/if-defined"; import { applyThemesOnElement } from "../../../common/dom/apply_themes_on_element"; import "../../../components/ha-card"; import { ActionHandlerEvent } from "../../../data/lovelace"; diff --git a/src/panels/lovelace/cards/hui-picture-elements-card.ts b/src/panels/lovelace/cards/hui-picture-elements-card.ts index 3b3cb165d..192569b3a 100644 --- a/src/panels/lovelace/cards/hui-picture-elements-card.ts +++ b/src/panels/lovelace/cards/hui-picture-elements-card.ts @@ -1,14 +1,12 @@ import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, property, state } from "lit/decorators"; import { applyThemesOnElement } from "../../../common/dom/apply_themes_on_element"; import "../../../components/ha-card"; import { HomeAssistant } from "../../../types"; diff --git a/src/panels/lovelace/cards/hui-picture-entity-card.ts b/src/panels/lovelace/cards/hui-picture-entity-card.ts index 92a87b8b6..2e079a46a 100644 --- a/src/panels/lovelace/cards/hui-picture-entity-card.ts +++ b/src/panels/lovelace/cards/hui-picture-entity-card.ts @@ -1,16 +1,14 @@ import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; -import { ifDefined } from "lit-html/directives/if-defined"; +} from "lit"; +import { customElement, property, state } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; +import { ifDefined } from "lit/directives/if-defined"; import { applyThemesOnElement } from "../../../common/dom/apply_themes_on_element"; import { computeDomain } from "../../../common/entity/compute_domain"; import { computeStateDisplay } from "../../../common/entity/compute_state_display"; diff --git a/src/panels/lovelace/cards/hui-picture-glance-card.ts b/src/panels/lovelace/cards/hui-picture-glance-card.ts index d07fc5eeb..e5c7281ed 100644 --- a/src/panels/lovelace/cards/hui-picture-glance-card.ts +++ b/src/panels/lovelace/cards/hui-picture-glance-card.ts @@ -1,16 +1,14 @@ import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; -import { ifDefined } from "lit-html/directives/if-defined"; +} from "lit"; +import { customElement, property, state } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; +import { ifDefined } from "lit/directives/if-defined"; import { DOMAINS_TOGGLE } from "../../../common/const"; import { applyThemesOnElement } from "../../../common/dom/apply_themes_on_element"; import { computeDomain } from "../../../common/entity/compute_domain"; diff --git a/src/panels/lovelace/cards/hui-plant-status-card.ts b/src/panels/lovelace/cards/hui-plant-status-card.ts index 7c4bd05bd..173ee823c 100644 --- a/src/panels/lovelace/cards/hui-plant-status-card.ts +++ b/src/panels/lovelace/cards/hui-plant-status-card.ts @@ -2,14 +2,12 @@ import { HassEntity } from "home-assistant-js-websocket"; import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, property, state } from "lit/decorators"; import { applyThemesOnElement } from "../../../common/dom/apply_themes_on_element"; import { fireEvent } from "../../../common/dom/fire_event"; import { computeStateName } from "../../../common/entity/compute_state_name"; diff --git a/src/panels/lovelace/cards/hui-safe-mode-card.ts b/src/panels/lovelace/cards/hui-safe-mode-card.ts index fc0b083a0..d9269fce0 100644 --- a/src/panels/lovelace/cards/hui-safe-mode-card.ts +++ b/src/panels/lovelace/cards/hui-safe-mode-card.ts @@ -1,13 +1,6 @@ import "@material/mwc-button"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import "../../../components/ha-card"; import { HomeAssistant } from "../../../types"; import "../../config/logs/error-log-card"; diff --git a/src/panels/lovelace/cards/hui-sensor-card.ts b/src/panels/lovelace/cards/hui-sensor-card.ts index b0dfaed69..b7a44a421 100644 --- a/src/panels/lovelace/cards/hui-sensor-card.ts +++ b/src/panels/lovelace/cards/hui-sensor-card.ts @@ -1,6 +1,6 @@ import { HassEntity } from "home-assistant-js-websocket/dist/types"; import { computeDomain } from "../../../common/entity/compute_domain"; -import { customElement } from "lit-element"; +import { customElement } from "lit/decorators"; import { HomeAssistant } from "../../../types"; import { findEntities } from "../common/find-entities"; import { GraphHeaderFooterConfig } from "../header-footer/types"; diff --git a/src/panels/lovelace/cards/hui-shopping-list-card.ts b/src/panels/lovelace/cards/hui-shopping-list-card.ts index 9edd46344..c247a9607 100644 --- a/src/panels/lovelace/cards/hui-shopping-list-card.ts +++ b/src/panels/lovelace/cards/hui-shopping-list-card.ts @@ -5,18 +5,15 @@ import { UnsubscribeFunc } from "home-assistant-js-websocket"; import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, - query, TemplateResult, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; -import { guard } from "lit-html/directives/guard"; -import { repeat } from "lit-html/directives/repeat"; +} from "lit"; +import { customElement, property, state, query } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; +import { guard } from "lit/directives/guard"; +import { repeat } from "lit/directives/repeat"; import { applyThemesOnElement } from "../../../common/dom/apply_themes_on_element"; import "../../../components/ha-card"; import "../../../components/ha-icon"; diff --git a/src/panels/lovelace/cards/hui-stack-card.ts b/src/panels/lovelace/cards/hui-stack-card.ts index 47bbc7933..615581ef6 100644 --- a/src/panels/lovelace/cards/hui-stack-card.ts +++ b/src/panels/lovelace/cards/hui-stack-card.ts @@ -2,12 +2,11 @@ import { css, CSSResultGroup, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; +} from "lit"; +import { property, state } from "lit/decorators"; import { LovelaceCardConfig } from "../../../data/lovelace"; import { HomeAssistant } from "../../../types"; import { createCardElement } from "../create-element/create-card-element"; diff --git a/src/panels/lovelace/cards/hui-starting-card.ts b/src/panels/lovelace/cards/hui-starting-card.ts index ad08ee674..09bdd2407 100644 --- a/src/panels/lovelace/cards/hui-starting-card.ts +++ b/src/panels/lovelace/cards/hui-starting-card.ts @@ -3,13 +3,12 @@ import { STATE_NOT_RUNNING } from "home-assistant-js-websocket"; import { css, CSSResultGroup, - customElement, html, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, property } from "lit/decorators"; import { fireEvent } from "../../../common/dom/fire_event"; import "../../../components/ha-card"; import "../../../components/ha-circular-progress"; diff --git a/src/panels/lovelace/cards/hui-thermostat-card.ts b/src/panels/lovelace/cards/hui-thermostat-card.ts index 30abc4626..d9d09fb32 100644 --- a/src/panels/lovelace/cards/hui-thermostat-card.ts +++ b/src/panels/lovelace/cards/hui-thermostat-card.ts @@ -4,17 +4,14 @@ import { HassEntity } from "home-assistant-js-websocket"; import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, - query, svg, TemplateResult, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; +} from "lit"; +import { customElement, property, state, query } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; import { UNIT_F } from "../../../common/const"; import { applyThemesOnElement } from "../../../common/dom/apply_themes_on_element"; import { fireEvent } from "../../../common/dom/fire_event"; diff --git a/src/panels/lovelace/cards/hui-vertical-stack-card.ts b/src/panels/lovelace/cards/hui-vertical-stack-card.ts index dbd9ea53a..e4915feea 100644 --- a/src/panels/lovelace/cards/hui-vertical-stack-card.ts +++ b/src/panels/lovelace/cards/hui-vertical-stack-card.ts @@ -1,4 +1,4 @@ -import { css, CSSResultGroup } from "lit-element"; +import { css, CSSResultGroup } from "lit"; import { computeCardSize } from "../common/compute-card-size"; import { HuiStackCard } from "./hui-stack-card"; diff --git a/src/panels/lovelace/cards/hui-weather-forecast-card.ts b/src/panels/lovelace/cards/hui-weather-forecast-card.ts index 5a1d7865f..6a0bc765a 100644 --- a/src/panels/lovelace/cards/hui-weather-forecast-card.ts +++ b/src/panels/lovelace/cards/hui-weather-forecast-card.ts @@ -1,20 +1,13 @@ import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; -import { ifDefined } from "lit-html/directives/if-defined"; - -import type { HomeAssistant } from "../../../types"; -import type { LovelaceCard, LovelaceCardEditor } from "../types"; -import type { WeatherForecastCardConfig } from "./types"; - +} from "lit"; +import { customElement, property, state } from "lit/decorators"; +import { ifDefined } from "lit/directives/if-defined"; import { formatTime } from "../../../common/datetime/format_time"; import { applyThemesOnElement } from "../../../common/dom/apply_themes_on_element"; import { computeStateDisplay } from "../../../common/entity/compute_state_display"; @@ -23,6 +16,8 @@ import { stateIcon } from "../../../common/entity/state_icon"; import { isValidEntityId } from "../../../common/entity/valid_entity_id"; import { formatNumber } from "../../../common/string/format_number"; import { debounce } from "../../../common/util/debounce"; +import "../../../components/ha-card"; +import "../../../components/ha-icon"; import { UNAVAILABLE } from "../../../data/entity"; import { ActionHandlerEvent } from "../../../data/lovelace"; import { @@ -34,6 +29,7 @@ import { WeatherEntity, weatherSVGStyles, } from "../../../data/weather"; +import type { HomeAssistant } from "../../../types"; import { actionHandler } from "../common/directives/action-handler-directive"; import { findEntities } from "../common/find-entities"; import { handleAction } from "../common/handle-action"; @@ -41,9 +37,8 @@ import { hasAction } from "../common/has-action"; import { hasConfigOrEntityChanged } from "../common/has-changed"; import { installResizeObserver } from "../common/install-resize-observer"; import { createEntityNotFoundWarning } from "../components/hui-warning"; - -import "../../../components/ha-card"; -import "../../../components/ha-icon"; +import type { LovelaceCard, LovelaceCardEditor } from "../types"; +import type { WeatherForecastCardConfig } from "./types"; const DAY_IN_MILLISECONDS = 86400000; diff --git a/src/panels/lovelace/common/directives/action-handler-directive.ts b/src/panels/lovelace/common/directives/action-handler-directive.ts index 234471d17..dac0cfd6a 100644 --- a/src/panels/lovelace/common/directives/action-handler-directive.ts +++ b/src/panels/lovelace/common/directives/action-handler-directive.ts @@ -1,14 +1,13 @@ /* eslint-disable max-classes-per-file */ import "@material/mwc-ripple"; import type { Ripple } from "@material/mwc-ripple"; -import { noChange } from "lit-html"; +import { noChange } from "lit"; import { AttributePart, directive, Directive, DirectiveParameters, - // eslint-disable-next-line import/extensions -} from "lit-html/directive.js"; +} from "lit/directive"; import { fireEvent } from "../../../../common/dom/fire_event"; import { deepEqual } from "../../../../common/util/deep-equal"; import { diff --git a/src/panels/lovelace/common/has-changed.ts b/src/panels/lovelace/common/has-changed.ts index f054ece6b..1675f49e2 100644 --- a/src/panels/lovelace/common/has-changed.ts +++ b/src/panels/lovelace/common/has-changed.ts @@ -1,4 +1,4 @@ -import { PropertyValues } from "lit-element"; +import { PropertyValues } from "lit"; import { HomeAssistant } from "../../../types"; import { processConfigEntities } from "./process-config-entities"; diff --git a/src/panels/lovelace/components/hui-action-editor.ts b/src/panels/lovelace/components/hui-action-editor.ts index 60e5af1cd..3bc6853ed 100644 --- a/src/panels/lovelace/components/hui-action-editor.ts +++ b/src/panels/lovelace/components/hui-action-editor.ts @@ -4,17 +4,12 @@ import "@polymer/paper-input/paper-textarea"; import "@polymer/paper-item/paper-item"; import "@polymer/paper-listbox/paper-listbox"; import type { PaperListboxElement } from "@polymer/paper-listbox/paper-listbox"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; +import memoizeOne from "memoize-one"; import { fireEvent } from "../../../common/dom/fire_event"; import "../../../components/ha-help-tooltip"; +import "../../../components/ha-service-control"; import { ActionConfig, CallServiceActionConfig, @@ -24,8 +19,6 @@ import { import { ServiceAction } from "../../../data/script"; import { HomeAssistant } from "../../../types"; import { EditorTarget } from "../editor/types"; -import "../../../components/ha-service-control"; -import memoizeOne from "memoize-one"; @customElement("hui-action-editor") export class HuiActionEditor extends LitElement { diff --git a/src/panels/lovelace/components/hui-buttons-base.ts b/src/panels/lovelace/components/hui-buttons-base.ts index dce093d04..4c7692ade 100644 --- a/src/panels/lovelace/components/hui-buttons-base.ts +++ b/src/panels/lovelace/components/hui-buttons-base.ts @@ -1,16 +1,7 @@ -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - queryAll, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, state, property } from "lit/decorators"; import { computeStateName } from "../../../common/entity/compute_state_name"; import "../../../components/entity/state-badge"; -import type { StateBadge } from "../../../components/entity/state-badge"; import type { ActionHandlerEvent } from "../../../data/lovelace"; import type { HomeAssistant } from "../../../types"; import type { EntitiesCardEntityConfig } from "../cards/types"; @@ -21,27 +12,14 @@ import { hasAction } from "../common/has-action"; @customElement("hui-buttons-base") export class HuiButtonsBase extends LitElement { + @state() public hass!: HomeAssistant; + @property() public configEntities?: EntitiesCardEntityConfig[]; - @queryAll("state-badge") protected _badges!: StateBadge[]; - - private _hass?: HomeAssistant; - - set hass(hass: HomeAssistant) { - this._hass = hass; - const entitiesShowingIcons = this.configEntities?.filter( - (entity) => entity.show_icon !== false - ); - this._badges.forEach((badge, index: number) => { - badge.hass = hass; - badge.stateObj = hass.states[entitiesShowingIcons![index].entity]; - }); - } - - protected render(): TemplateResult | void { + protected render(): TemplateResult { return html` ${(this.configEntities || []).map((entityConf) => { - const stateObj = this._hass!.states[entityConf.entity]; + const stateObj = this.hass.states[entityConf.entity]; return html`
; + style?: Record; } export interface SectionConfig { type: "section"; diff --git a/src/panels/lovelace/ha-panel-lovelace.ts b/src/panels/lovelace/ha-panel-lovelace.ts index 9b5e0b676..c6e2fe810 100644 --- a/src/panels/lovelace/ha-panel-lovelace.ts +++ b/src/panels/lovelace/ha-panel-lovelace.ts @@ -1,6 +1,7 @@ import "@material/mwc-button"; import deepFreeze from "deep-freeze"; -import { html, state, LitElement, property, TemplateResult } from "lit-element"; +import { html, LitElement, TemplateResult } from "lit"; +import { property, state } from "lit/decorators"; import { constructUrlCurrentPath } from "../../common/url/construct-url"; import { addSearchParam, diff --git a/src/panels/lovelace/header-footer/hui-buttons-header-footer.ts b/src/panels/lovelace/header-footer/hui-buttons-header-footer.ts index 14ca1a81d..7d47c8645 100644 --- a/src/panels/lovelace/header-footer/hui-buttons-header-footer.ts +++ b/src/panels/lovelace/header-footer/hui-buttons-header-footer.ts @@ -1,11 +1,5 @@ -import { - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { HomeAssistant } from "../../../types"; import { processConfigEntities } from "../common/process-config-entities"; import "../components/hui-buttons-base"; diff --git a/src/panels/lovelace/header-footer/hui-graph-header-footer.ts b/src/panels/lovelace/header-footer/hui-graph-header-footer.ts index 918ead0d8..c95646ef6 100644 --- a/src/panels/lovelace/header-footer/hui-graph-header-footer.ts +++ b/src/panels/lovelace/header-footer/hui-graph-header-footer.ts @@ -2,14 +2,12 @@ import { HassEntity } from "home-assistant-js-websocket"; import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, property, state } from "lit/decorators"; import "../../../components/ha-circular-progress"; import { fetchRecent } from "../../../data/history"; import { computeDomain } from "../../../common/entity/compute_domain"; diff --git a/src/panels/lovelace/header-footer/hui-picture-header-footer.ts b/src/panels/lovelace/header-footer/hui-picture-header-footer.ts index 19d01504e..3dcfd3b0f 100644 --- a/src/panels/lovelace/header-footer/hui-picture-header-footer.ts +++ b/src/panels/lovelace/header-footer/hui-picture-header-footer.ts @@ -1,15 +1,14 @@ import { css, CSSResultGroup, - customElement, html, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; -import { ifDefined } from "lit-html/directives/if-defined"; +} from "lit"; +import { customElement, property } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; +import { ifDefined } from "lit/directives/if-defined"; import "../../../components/ha-card"; import { ActionHandlerEvent } from "../../../data/lovelace"; import { HomeAssistant } from "../../../types"; diff --git a/src/panels/lovelace/hui-editor.ts b/src/panels/lovelace/hui-editor.ts index 1b62dc23e..7b86d68e4 100644 --- a/src/panels/lovelace/hui-editor.ts +++ b/src/panels/lovelace/hui-editor.ts @@ -6,15 +6,13 @@ import { safeDump, safeLoad } from "js-yaml"; import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; +} from "lit"; +import { customElement, property, state } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; import { array, assert, object, optional, string, type } from "superstruct"; import { computeRTL } from "../../common/util/compute_rtl"; import { deepEqual } from "../../common/util/deep-equal"; diff --git a/src/panels/lovelace/hui-root.ts b/src/panels/lovelace/hui-root.ts index 5afeadc87..915c34432 100644 --- a/src/panels/lovelace/hui-root.ts +++ b/src/panels/lovelace/hui-root.ts @@ -26,14 +26,12 @@ import { css, CSSResultGroup, html, - state, LitElement, - property, PropertyValues, - query, TemplateResult, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; +} from "lit"; +import { property, state, query } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; import memoizeOne from "memoize-one"; import { isComponentLoaded } from "../../common/config/is_component_loaded"; import { fireEvent } from "../../common/dom/fire_event"; diff --git a/src/panels/lovelace/special-rows/hui-attribute-row.ts b/src/panels/lovelace/special-rows/hui-attribute-row.ts index 2f3a317b5..49a5eb311 100644 --- a/src/panels/lovelace/special-rows/hui-attribute-row.ts +++ b/src/panels/lovelace/special-rows/hui-attribute-row.ts @@ -1,14 +1,12 @@ import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, property, state } from "lit/decorators"; import checkValidDate from "../../../common/datetime/check_valid_date"; import { formatNumber } from "../../../common/string/format_number"; import { HomeAssistant } from "../../../types"; diff --git a/src/panels/lovelace/special-rows/hui-button-row.ts b/src/panels/lovelace/special-rows/hui-button-row.ts index a32c41772..c67887bee 100644 --- a/src/panels/lovelace/special-rows/hui-button-row.ts +++ b/src/panels/lovelace/special-rows/hui-button-row.ts @@ -1,13 +1,6 @@ import "@material/mwc-button"; -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, state } from "lit/decorators"; import { DOMAINS_TOGGLE } from "../../../common/const"; import { computeDomain } from "../../../common/entity/compute_domain"; import { computeStateName } from "../../../common/entity/compute_state_name"; diff --git a/src/panels/lovelace/special-rows/hui-buttons-row.ts b/src/panels/lovelace/special-rows/hui-buttons-row.ts index 23ea52aa5..6dade3a36 100644 --- a/src/panels/lovelace/special-rows/hui-buttons-row.ts +++ b/src/panels/lovelace/special-rows/hui-buttons-row.ts @@ -1,11 +1,5 @@ -import { - customElement, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { DOMAINS_TOGGLE } from "../../../common/const"; import { computeDomain } from "../../../common/entity/compute_domain"; import { HomeAssistant } from "../../../types"; diff --git a/src/panels/lovelace/special-rows/hui-call-service-row.ts b/src/panels/lovelace/special-rows/hui-call-service-row.ts index 1bfed88f0..5f461d518 100644 --- a/src/panels/lovelace/special-rows/hui-call-service-row.ts +++ b/src/panels/lovelace/special-rows/hui-call-service-row.ts @@ -1,4 +1,4 @@ -import { customElement } from "lit-element"; +import { customElement } from "lit/decorators"; import { CallServiceConfig } from "../entity-rows/types"; import { HuiButtonRow } from "./hui-button-row"; diff --git a/src/panels/lovelace/special-rows/hui-cast-row.ts b/src/panels/lovelace/special-rows/hui-cast-row.ts index 702165817..e60e8e74a 100644 --- a/src/panels/lovelace/special-rows/hui-cast-row.ts +++ b/src/panels/lovelace/special-rows/hui-cast-row.ts @@ -2,15 +2,13 @@ import "@material/mwc-button/mwc-button"; import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; +} from "lit"; +import { customElement, property, state } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; import { CastManager } from "../../../cast/cast_manager"; import { castSendShowLovelaceView, diff --git a/src/panels/lovelace/special-rows/hui-conditional-row.ts b/src/panels/lovelace/special-rows/hui-conditional-row.ts index 65b04afdb..9251a72bd 100644 --- a/src/panels/lovelace/special-rows/hui-conditional-row.ts +++ b/src/panels/lovelace/special-rows/hui-conditional-row.ts @@ -1,4 +1,4 @@ -import { customElement } from "lit-element"; +import { customElement } from "lit/decorators"; import { HuiConditionalBase } from "../components/hui-conditional-base"; import { createRowElement } from "../create-element/create-row-element"; import { ConditionalRowConfig, LovelaceRow } from "../entity-rows/types"; diff --git a/src/panels/lovelace/special-rows/hui-divider-row.ts b/src/panels/lovelace/special-rows/hui-divider-row.ts index 3763f2125..7f7bc8f1b 100644 --- a/src/panels/lovelace/special-rows/hui-divider-row.ts +++ b/src/panels/lovelace/special-rows/hui-divider-row.ts @@ -1,13 +1,6 @@ -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - TemplateResult, -} from "lit-element"; -import { styleMap } from "lit-html/directives/style-map"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, state } from "lit/decorators"; +import { styleMap } from "lit/directives/style-map"; import { HomeAssistant } from "../../../types"; import { DividerConfig, LovelaceRow } from "../entity-rows/types"; @@ -30,7 +23,9 @@ class HuiDividerRow extends LitElement implements LovelaceRow { return html``; } - return html`
`; + return html`
`; } static get styles(): CSSResultGroup { diff --git a/src/panels/lovelace/special-rows/hui-section-row.ts b/src/panels/lovelace/special-rows/hui-section-row.ts index 045256a6a..619d7a070 100644 --- a/src/panels/lovelace/special-rows/hui-section-row.ts +++ b/src/panels/lovelace/special-rows/hui-section-row.ts @@ -1,12 +1,5 @@ -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, state } from "lit/decorators"; import "../../../components/ha-icon"; import { HomeAssistant } from "../../../types"; import { LovelaceRow, SectionConfig } from "../entity-rows/types"; diff --git a/src/panels/lovelace/special-rows/hui-text-row.ts b/src/panels/lovelace/special-rows/hui-text-row.ts index 1e43ab303..a88c68a73 100644 --- a/src/panels/lovelace/special-rows/hui-text-row.ts +++ b/src/panels/lovelace/special-rows/hui-text-row.ts @@ -1,12 +1,5 @@ -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, state } from "lit/decorators"; import "../../../components/ha-icon"; import { LovelaceRow, TextConfig } from "../entity-rows/types"; diff --git a/src/panels/lovelace/special-rows/hui-weblink-row.ts b/src/panels/lovelace/special-rows/hui-weblink-row.ts index d475d8c4e..9fe2a9aee 100644 --- a/src/panels/lovelace/special-rows/hui-weblink-row.ts +++ b/src/panels/lovelace/special-rows/hui-weblink-row.ts @@ -1,13 +1,6 @@ -import { - css, - CSSResultGroup, - customElement, - html, - state, - LitElement, - TemplateResult, -} from "lit-element"; -import { ifDefined } from "lit-html/directives/if-defined"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, state } from "lit/decorators"; +import { ifDefined } from "lit/directives/if-defined"; import "../../../components/ha-icon"; import { HomeAssistant } from "../../../types"; import { LovelaceRow, WeblinkConfig } from "../entity-rows/types"; diff --git a/src/panels/lovelace/strategies/original-states-strategy.ts b/src/panels/lovelace/strategies/original-states-strategy.ts index 8ecdd922d..0aaef9fcf 100644 --- a/src/panels/lovelace/strategies/original-states-strategy.ts +++ b/src/panels/lovelace/strategies/original-states-strategy.ts @@ -5,8 +5,8 @@ import { subscribeDeviceRegistry } from "../../../data/device_registry"; import { subscribeEntityRegistry } from "../../../data/entity_registry"; import { generateDefaultViewConfig } from "../common/generate-lovelace-config"; import { - LovelaceViewStrategy, LovelaceDashboardStrategy, + LovelaceViewStrategy, } from "./get-strategy"; let subscribedRegistries = false; diff --git a/src/panels/lovelace/views/hui-masonry-view.ts b/src/panels/lovelace/views/hui-masonry-view.ts index b99f4d9b1..8b260c9aa 100644 --- a/src/panels/lovelace/views/hui-masonry-view.ts +++ b/src/panels/lovelace/views/hui-masonry-view.ts @@ -3,13 +3,12 @@ import { css, CSSResultGroup, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; +} from "lit"; +import { property, state } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; import { fireEvent } from "../../../common/dom/fire_event"; import { computeRTL } from "../../../common/util/compute_rtl"; import { nextRender } from "../../../common/util/render-status"; diff --git a/src/panels/lovelace/views/hui-panel-view.ts b/src/panels/lovelace/views/hui-panel-view.ts index 450e54c35..1c7d53137 100644 --- a/src/panels/lovelace/views/hui-panel-view.ts +++ b/src/panels/lovelace/views/hui-panel-view.ts @@ -3,13 +3,12 @@ import { css, CSSResultGroup, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; +} from "lit"; +import { property, state } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; import { computeRTL } from "../../../common/util/compute_rtl"; import type { LovelaceViewConfig, diff --git a/src/panels/lovelace/views/hui-view.ts b/src/panels/lovelace/views/hui-view.ts index ca8163168..5f815f25a 100644 --- a/src/panels/lovelace/views/hui-view.ts +++ b/src/panels/lovelace/views/hui-view.ts @@ -1,10 +1,5 @@ -import { - customElement, - state, - property, - PropertyValues, - ReactiveElement, -} from "lit-element"; +import { PropertyValues, ReactiveElement } from "lit"; +import { customElement, property, state } from "lit/decorators"; import { applyThemesOnElement } from "../../../common/dom/apply_themes_on_element"; import "../../../components/entity/ha-state-label-badge"; import "../../../components/ha-svg-icon"; diff --git a/src/panels/media-browser/ha-panel-media-browser.ts b/src/panels/media-browser/ha-panel-media-browser.ts index 10d51ee00..ebf1bfe90 100644 --- a/src/panels/media-browser/ha-panel-media-browser.ts +++ b/src/panels/media-browser/ha-panel-media-browser.ts @@ -1,15 +1,8 @@ import "@material/mwc-icon-button"; import "@polymer/app-layout/app-header/app-header"; import "@polymer/app-layout/app-toolbar/app-toolbar"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import { LocalStorage } from "../../common/decorators/local-storage"; import { HASSDomEvent } from "../../common/dom/fire_event"; import { computeStateDomain } from "../../common/entity/compute_state_domain"; diff --git a/src/panels/media-browser/hui-dialog-select-media-player.ts b/src/panels/media-browser/hui-dialog-select-media-player.ts index 5d587206d..42c094c28 100644 --- a/src/panels/media-browser/hui-dialog-select-media-player.ts +++ b/src/panels/media-browser/hui-dialog-select-media-player.ts @@ -2,15 +2,8 @@ import "@material/mwc-list/mwc-list"; import "@material/mwc-list/mwc-list-item"; import "@polymer/paper-item/paper-item"; import "@polymer/paper-listbox/paper-listbox"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import { fireEvent } from "../../common/dom/fire_event"; import { computeStateName } from "../../common/entity/compute_state_name"; import { compare } from "../../common/string/compare"; diff --git a/src/panels/media-browser/hui-dialog-web-browser-play-media.ts b/src/panels/media-browser/hui-dialog-web-browser-play-media.ts index df945275a..18af9e77d 100644 --- a/src/panels/media-browser/hui-dialog-web-browser-play-media.ts +++ b/src/panels/media-browser/hui-dialog-web-browser-play-media.ts @@ -1,12 +1,5 @@ -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import { fireEvent } from "../../common/dom/fire_event"; import { createCloseHeading } from "../../components/ha-dialog"; import "../../components/ha-hls-player"; diff --git a/src/panels/my/ha-panel-my.ts b/src/panels/my/ha-panel-my.ts index f64c58fd7..f052a10d4 100644 --- a/src/panels/my/ha-panel-my.ts +++ b/src/panels/my/ha-panel-my.ts @@ -1,14 +1,15 @@ -import { customElement, html, state, LitElement, property } from "lit-element"; import { sanitizeUrl } from "@braintree/sanitize-url"; +import { html, LitElement } from "lit"; +import { customElement, property, state } from "lit/decorators"; +import { isComponentLoaded } from "../../common/config/is_component_loaded"; import { navigate } from "../../common/navigate"; -import { HomeAssistant, Route } from "../../types"; import { createSearchParam, extractSearchParamsObject, } from "../../common/url/search-params"; -import "../../layouts/hass-error-screen"; -import { isComponentLoaded } from "../../common/config/is_component_loaded"; import { domainToName } from "../../data/integration"; +import "../../layouts/hass-error-screen"; +import { HomeAssistant, Route } from "../../types"; import { documentationUrl } from "../../util/documentation-url"; const REDIRECTS: Redirects = { 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 cde705949..1dac65496 100644 --- a/src/panels/profile/dialog-ha-mfa-module-setup-flow.ts +++ b/src/panels/profile/dialog-ha-mfa-module-setup-flow.ts @@ -1,14 +1,8 @@ import "@material/mwc-button"; -import { - css, - CSSResultGroup, - customElement, - state, - LitElement, - property, -} from "lit-element"; -import { html, TemplateResult } from "lit-html"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import "../../components/ha-circular-progress"; +import "../../components/ha-dialog"; import "../../components/ha-form/ha-form"; import "../../components/ha-markdown"; import { @@ -17,7 +11,6 @@ import { } from "../../data/data_entry_flow"; import { haStyleDialog } from "../../resources/styles"; import { HomeAssistant } from "../../types"; -import "../../components/ha-dialog"; let instance = 0; diff --git a/src/panels/profile/ha-advanced-mode-row.ts b/src/panels/profile/ha-advanced-mode-row.ts index 67fabfa08..ce0c9ec50 100644 --- a/src/panels/profile/ha-advanced-mode-row.ts +++ b/src/panels/profile/ha-advanced-mode-row.ts @@ -1,12 +1,5 @@ -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import "../../components/ha-card"; import "../../components/ha-settings-row"; import "../../components/ha-switch"; diff --git a/src/panels/profile/ha-change-password-card.ts b/src/panels/profile/ha-change-password-card.ts index 775b59f1b..6b06b7036 100644 --- a/src/panels/profile/ha-change-password-card.ts +++ b/src/panels/profile/ha-change-password-card.ts @@ -4,14 +4,12 @@ import "@polymer/paper-input/paper-input"; import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, property, state } from "lit/decorators"; import "../../components/ha-card"; import "../../components/ha-circular-progress"; import { haStyle } from "../../resources/styles"; diff --git a/src/panels/profile/ha-enable-shortcuts-row.ts b/src/panels/profile/ha-enable-shortcuts-row.ts index cdec57a03..429c439c6 100644 --- a/src/panels/profile/ha-enable-shortcuts-row.ts +++ b/src/panels/profile/ha-enable-shortcuts-row.ts @@ -1,10 +1,5 @@ -import { - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import { fireEvent } from "../../common/dom/fire_event"; import "../../components/ha-settings-row"; import "../../components/ha-switch"; diff --git a/src/panels/profile/ha-force-narrow-row.ts b/src/panels/profile/ha-force-narrow-row.ts index 49d70ef57..771f49c7d 100644 --- a/src/panels/profile/ha-force-narrow-row.ts +++ b/src/panels/profile/ha-force-narrow-row.ts @@ -1,10 +1,5 @@ -import { - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import { fireEvent } from "../../common/dom/fire_event"; import "../../components/ha-settings-row"; import "../../components/ha-switch"; diff --git a/src/panels/profile/ha-long-lived-access-tokens-card.ts b/src/panels/profile/ha-long-lived-access-tokens-card.ts index 2468c8472..789a79b20 100644 --- a/src/panels/profile/ha-long-lived-access-tokens-card.ts +++ b/src/panels/profile/ha-long-lived-access-tokens-card.ts @@ -1,15 +1,8 @@ import "@material/mwc-button/mwc-button"; import "@material/mwc-icon-button/mwc-icon-button"; import { mdiDelete } from "@mdi/js"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import memoizeOne from "memoize-one"; import relativeTime from "../../common/datetime/relative_time"; import { fireEvent } from "../../common/dom/fire_event"; diff --git a/src/panels/profile/ha-mfa-modules-card.ts b/src/panels/profile/ha-mfa-modules-card.ts index 5ccef7f05..620f1f5ed 100644 --- a/src/panels/profile/ha-mfa-modules-card.ts +++ b/src/panels/profile/ha-mfa-modules-card.ts @@ -1,15 +1,8 @@ import "@material/mwc-button"; import "@polymer/paper-item/paper-item"; import "@polymer/paper-item/paper-item-body"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import { fireEvent } from "../../common/dom/fire_event"; import "../../components/ha-card"; import { showConfirmationDialog } from "../../dialogs/generic/show-dialog-box"; diff --git a/src/panels/profile/ha-panel-profile.ts b/src/panels/profile/ha-panel-profile.ts index 7890a7bbc..7484c4ba3 100644 --- a/src/panels/profile/ha-panel-profile.ts +++ b/src/panels/profile/ha-panel-profile.ts @@ -4,15 +4,8 @@ import "@polymer/app-layout/app-toolbar/app-toolbar"; import "@polymer/paper-item/paper-item"; import "@polymer/paper-item/paper-item-body"; import { UnsubscribeFunc } from "home-assistant-js-websocket"; -import { - css, - CSSResultGroup, - html, - state, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { property, state } from "lit/decorators"; import { fireEvent } from "../../common/dom/fire_event"; import "../../components/ha-card"; import "../../components/ha-menu-button"; diff --git a/src/panels/profile/ha-pick-dashboard-row.ts b/src/panels/profile/ha-pick-dashboard-row.ts index da2c83622..482ce1969 100644 --- a/src/panels/profile/ha-pick-dashboard-row.ts +++ b/src/panels/profile/ha-pick-dashboard-row.ts @@ -1,14 +1,7 @@ import "@polymer/paper-item/paper-item"; import "@polymer/paper-listbox/paper-listbox"; -import { - customElement, - html, - state, - LitElement, - property, - PropertyValues, - TemplateResult, -} from "lit-element"; +import { html, LitElement, PropertyValues, TemplateResult } from "lit"; +import { customElement, property, state } from "lit/decorators"; import "../../components/ha-paper-dropdown-menu"; import "../../components/ha-settings-row"; import { fetchDashboards, LovelaceDashboard } from "../../data/lovelace"; diff --git a/src/panels/profile/ha-pick-number-format-row.ts b/src/panels/profile/ha-pick-number-format-row.ts index 07dd73823..fa6b0f8e6 100644 --- a/src/panels/profile/ha-pick-number-format-row.ts +++ b/src/panels/profile/ha-pick-number-format-row.ts @@ -1,19 +1,14 @@ import "@polymer/paper-item/paper-item"; import "@polymer/paper-listbox/paper-listbox"; -import { - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; +import { fireEvent } from "../../common/dom/fire_event"; +import { formatNumber } from "../../common/string/format_number"; import "../../components/ha-card"; import "../../components/ha-paper-dropdown-menu"; -import { HomeAssistant } from "../../types"; import "../../components/ha-settings-row"; -import { formatNumber } from "../../common/string/format_number"; import { NumberFormat } from "../../data/translation"; -import { fireEvent } from "../../common/dom/fire_event"; +import { HomeAssistant } from "../../types"; @customElement("ha-pick-number-format-row") class NumberFormatRow extends LitElement { diff --git a/src/panels/profile/ha-pick-theme-row.ts b/src/panels/profile/ha-pick-theme-row.ts index 9ba8ee47d..57dde1cf9 100644 --- a/src/panels/profile/ha-pick-theme-row.ts +++ b/src/panels/profile/ha-pick-theme-row.ts @@ -5,13 +5,12 @@ import "@polymer/paper-listbox/paper-listbox"; import { css, CSSResultGroup, - customElement, - state, + html, LitElement, - property, PropertyValues, -} from "lit-element"; -import { html, TemplateResult } from "lit-html"; + TemplateResult, +} from "lit"; +import { customElement, property, state } from "lit/decorators"; import { fireEvent } from "../../common/dom/fire_event"; import "../../components/ha-formfield"; import "../../components/ha-paper-dropdown-menu"; diff --git a/src/panels/profile/ha-refresh-tokens-card.ts b/src/panels/profile/ha-refresh-tokens-card.ts index 738bb5760..7c75b3f15 100644 --- a/src/panels/profile/ha-refresh-tokens-card.ts +++ b/src/panels/profile/ha-refresh-tokens-card.ts @@ -1,15 +1,8 @@ import "@material/mwc-icon-button/mwc-icon-button"; import { mdiDelete } from "@mdi/js"; import "@polymer/paper-tooltip/paper-tooltip"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import memoizeOne from "memoize-one"; import relativeTime from "../../common/datetime/relative_time"; import { fireEvent } from "../../common/dom/fire_event"; diff --git a/src/panels/profile/ha-set-suspend-row.ts b/src/panels/profile/ha-set-suspend-row.ts index 987459029..47a4d7f43 100644 --- a/src/panels/profile/ha-set-suspend-row.ts +++ b/src/panels/profile/ha-set-suspend-row.ts @@ -1,10 +1,5 @@ -import { - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import { fireEvent, HASSDomEvent } from "../../common/dom/fire_event"; import "../../components/ha-settings-row"; import "../../components/ha-switch"; diff --git a/src/panels/profile/ha-set-vibrate-row.ts b/src/panels/profile/ha-set-vibrate-row.ts index d0e7701df..184b9b096 100644 --- a/src/panels/profile/ha-set-vibrate-row.ts +++ b/src/panels/profile/ha-set-vibrate-row.ts @@ -1,10 +1,5 @@ -import { - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; +import { html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; import { fireEvent } from "../../common/dom/fire_event"; import "../../components/ha-settings-row"; import "../../components/ha-switch"; diff --git a/src/panels/shopping-list/ha-panel-shopping-list.ts b/src/panels/shopping-list/ha-panel-shopping-list.ts index 99779d0cb..f46d52dcd 100644 --- a/src/panels/shopping-list/ha-panel-shopping-list.ts +++ b/src/panels/shopping-list/ha-panel-shopping-list.ts @@ -4,14 +4,12 @@ import "@polymer/app-layout/app-toolbar/app-toolbar"; import { css, CSSResultGroup, - customElement, html, - state, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, property, state } from "lit/decorators"; import memoizeOne from "memoize-one"; import { isComponentLoaded } from "../../common/config/is_component_loaded"; import "../../components/ha-menu-button"; diff --git a/src/resources/codemirror.ts b/src/resources/codemirror.ts index 0c52dd544..b487cc5a3 100644 --- a/src/resources/codemirror.ts +++ b/src/resources/codemirror.ts @@ -1,24 +1,24 @@ +import { indentLess, indentMore } from "@codemirror/commands"; import { HighlightStyle, tags } from "@codemirror/highlight"; -import { EditorView, KeyBinding } from "@codemirror/view"; -import { StreamLanguage } from "@codemirror/stream-parser"; import { jinja2 } from "@codemirror/legacy-modes/mode/jinja2"; import { yaml } from "@codemirror/legacy-modes/mode/yaml"; -import { indentLess, indentMore } from "@codemirror/commands"; import { Compartment } from "@codemirror/state"; +import { StreamLanguage } from "@codemirror/stream-parser"; +import { EditorView, KeyBinding } from "@codemirror/view"; -export { - keymap, - highlightActiveLine, - drawSelection, - EditorView, -} from "@codemirror/view"; -export { EditorState, Prec } from "@codemirror/state"; export { defaultKeymap } from "@codemirror/commands"; export { lineNumbers } from "@codemirror/gutter"; -export { searchKeymap, highlightSelectionMatches } from "@codemirror/search"; +export { HighlightStyle, tags } from "@codemirror/highlight"; export { history, historyKeymap } from "@codemirror/history"; export { rectangularSelection } from "@codemirror/rectangular-selection"; -export { HighlightStyle, tags } from "@codemirror/highlight"; +export { highlightSelectionMatches, searchKeymap } from "@codemirror/search"; +export { EditorState, Prec } from "@codemirror/state"; +export { + drawSelection, + EditorView, + highlightActiveLine, + keymap, +} from "@codemirror/view"; export const langs = { jinja2: StreamLanguage.define(jinja2), diff --git a/src/resources/compatibility.ts b/src/resources/compatibility.ts index 8cec91966..85726354b 100644 --- a/src/resources/compatibility.ts +++ b/src/resources/compatibility.ts @@ -1,5 +1,6 @@ // For localize import "@formatjs/intl-getcanonicallocales/polyfill"; +import "@lit/polyfill-support"; import "core-js"; // To use comlink under ES5 import "proxy-polyfill"; diff --git a/src/resources/custom-card-support.ts b/src/resources/custom-card-support.ts index 2e33e5355..dbf420cd7 100644 --- a/src/resources/custom-card-support.ts +++ b/src/resources/custom-card-support.ts @@ -1,4 +1,4 @@ -import { css, html, LitElement } from "lit-element"; +import { css, html, LitElement } from "lit"; (LitElement.prototype as any).html = html; (LitElement.prototype as any).css = css; diff --git a/src/resources/ha-sortable-style.ts b/src/resources/ha-sortable-style.ts index 5979f986e..8c7a5ded7 100644 --- a/src/resources/ha-sortable-style.ts +++ b/src/resources/ha-sortable-style.ts @@ -1,4 +1,4 @@ -import { css } from "lit-element"; +import { css } from "lit"; export const sortableStyles = css` #sortable a:nth-of-type(2n) paper-icon-item { diff --git a/src/resources/styles.ts b/src/resources/styles.ts index 6be57cf1f..54e298f1c 100644 --- a/src/resources/styles.ts +++ b/src/resources/styles.ts @@ -1,4 +1,4 @@ -import { css } from "lit-element"; +import { css } from "lit"; export const darkStyles = { "primary-background-color": "#111111", diff --git a/src/state-summary/state-card-display.ts b/src/state-summary/state-card-display.ts index aec040baf..4e434fbf8 100755 --- a/src/state-summary/state-card-display.ts +++ b/src/state-summary/state-card-display.ts @@ -1,15 +1,8 @@ import "@polymer/iron-flex-layout/iron-flex-layout-classes"; import type { HassEntity } from "home-assistant-js-websocket"; -import { - css, - CSSResultGroup, - customElement, - html, - LitElement, - property, - TemplateResult, -} from "lit-element"; -import { classMap } from "lit-html/directives/class-map"; +import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; +import { customElement, property } from "lit/decorators"; +import { classMap } from "lit/directives/class-map"; import { computeDomain } from "../common/entity/compute_domain"; import { computeStateDisplay } from "../common/entity/compute_state_display"; import { computeRTL } from "../common/util/compute_rtl"; diff --git a/src/state-summary/state-card-input_select.ts b/src/state-summary/state-card-input_select.ts index 1c45e41b5..854b9c128 100644 --- a/src/state-summary/state-card-input_select.ts +++ b/src/state-summary/state-card-input_select.ts @@ -5,13 +5,12 @@ import "@polymer/paper-listbox/paper-listbox"; import { css, CSSResultGroup, - customElement, html, LitElement, - property, PropertyValues, TemplateResult, -} from "lit-element"; +} from "lit"; +import { customElement, property } from "lit/decorators"; import { stopPropagation } from "../common/dom/stop_propagation"; import { computeStateName } from "../common/entity/compute_state_name"; import "../components/entity/state-badge"; diff --git a/src/state-summary/state-card-script.ts b/src/state-summary/state-card-script.ts index 579036e07..52eed9f29 100644 --- a/src/state-summary/state-card-script.ts +++ b/src/state-summary/state-card-script.ts @@ -1,12 +1,7 @@ import "@material/mwc-button"; import { HassEntity } from "home-assistant-js-websocket"; -import { - customElement, - LitElement, - property, - CSSResultGroup, -} from "lit-element"; -import { html } from "lit-html"; +import { CSSResultGroup, html, LitElement } from "lit"; +import { customElement, property } from "lit/decorators"; import "../components/entity/ha-entity-toggle"; import "../components/entity/state-info"; import { UNAVAILABLE_STATES } from "../data/entity"; diff --git a/src/state/connection-mixin.ts b/src/state/connection-mixin.ts index cda1c797e..86ea83621 100644 --- a/src/state/connection-mixin.ts +++ b/src/state/connection-mixin.ts @@ -2,8 +2,8 @@ import { Auth, callService, Connection, - ERR_INVALID_AUTH, ERR_CONNECTION_LOST, + ERR_INVALID_AUTH, HassConfig, subscribeConfig, subscribeEntities, diff --git a/src/state/dialog-manager-mixin.ts b/src/state/dialog-manager-mixin.ts index acb0c7c5e..0575afa49 100644 --- a/src/state/dialog-manager-mixin.ts +++ b/src/state/dialog-manager-mixin.ts @@ -1,4 +1,4 @@ -import { PropertyValues } from "lit-element"; +import { PropertyValues } from "lit"; import { HASSDomEvent } from "../common/dom/fire_event"; import { makeDialogManager, showDialog } from "../dialogs/make-dialog-manager"; import { Constructor } from "../types"; diff --git a/src/state/disconnect-toast-mixin.ts b/src/state/disconnect-toast-mixin.ts index 98e36dea7..9b60b20e3 100644 --- a/src/state/disconnect-toast-mixin.ts +++ b/src/state/disconnect-toast-mixin.ts @@ -4,14 +4,14 @@ import { STATE_STARTING, UnsubscribeFunc, } from "home-assistant-js-websocket"; +import { + BootstrapIntegrationsTimings, + subscribeBootstrapIntegrations, +} from "../data/bootstrap_integrations"; +import { domainToName } from "../data/integration"; import { Constructor } from "../types"; import { showToast } from "../util/toast"; import { HassBaseEl } from "./hass-base-mixin"; -import { domainToName } from "../data/integration"; -import { - subscribeBootstrapIntegrations, - BootstrapIntegrationsTimings, -} from "../data/bootstrap_integrations"; export default >(superClass: T) => class extends superClass { diff --git a/src/state/haptic-mixin.ts b/src/state/haptic-mixin.ts index 6a4483c3b..a4a46ceb3 100644 --- a/src/state/haptic-mixin.ts +++ b/src/state/haptic-mixin.ts @@ -1,4 +1,4 @@ -import { PropertyValues } from "lit-element"; +import { PropertyValues } from "lit"; import { HASSDomEvent } from "../common/dom/fire_event"; import { HapticType } from "../data/haptics"; import { Constructor, HomeAssistant } from "../types"; diff --git a/src/state/hass-base-mixin.ts b/src/state/hass-base-mixin.ts index 1d9b09d4e..27a19e986 100644 --- a/src/state/hass-base-mixin.ts +++ b/src/state/hass-base-mixin.ts @@ -1,7 +1,12 @@ import { Auth, Connection } from "home-assistant-js-websocket"; -import { LitElement, property } from "lit-element"; +import { LitElement } from "lit"; +import { property } from "lit/decorators"; import { HomeAssistant } from "../types"; +// Temporary disable warnings so the dev console is not flooded, we should fix these and then re-enable the warning +if (__DEV__) { + LitElement.disableWarning?.("change-in-update"); +} export class HassBaseEl extends LitElement { @property({ attribute: false }) public hass?: HomeAssistant; diff --git a/src/state/more-info-mixin.ts b/src/state/more-info-mixin.ts index dd0cf17c0..620b8b027 100644 --- a/src/state/more-info-mixin.ts +++ b/src/state/more-info-mixin.ts @@ -1,4 +1,4 @@ -import type { PropertyValues } from "lit-element"; +import type { PropertyValues } from "lit"; import type { HASSDomEvent } from "../common/dom/fire_event"; import { showDialog } from "../dialogs/make-dialog-manager"; import type { MoreInfoDialogParams } from "../dialogs/more-info/ha-more-info-dialog"; diff --git a/src/state/quick-bar-mixin.ts b/src/state/quick-bar-mixin.ts index 7431a1e9f..445a9e3ee 100644 --- a/src/state/quick-bar-mixin.ts +++ b/src/state/quick-bar-mixin.ts @@ -1,4 +1,4 @@ -import type { PropertyValues } from "lit-element"; +import type { PropertyValues } from "lit"; import tinykeys from "tinykeys"; import { QuickBarParams, diff --git a/src/state/translations-mixin.ts b/src/state/translations-mixin.ts index 6c5bf6430..f22d4149c 100644 --- a/src/state/translations-mixin.ts +++ b/src/state/translations-mixin.ts @@ -13,8 +13,8 @@ import { translationMetadata } from "../resources/translations-metadata"; import { Constructor, HomeAssistant } from "../types"; import { storeState } from "../util/ha-pref-storage"; import { - getTranslation, getLocalLanguage, + getTranslation, getUserLocale, } from "../util/hass-translation"; import { HassBaseEl } from "./hass-base-mixin"; diff --git a/src/state/url-sync-mixin.ts b/src/state/url-sync-mixin.ts index b6ae356ac..7597004b5 100644 --- a/src/state/url-sync-mixin.ts +++ b/src/state/url-sync-mixin.ts @@ -1,5 +1,5 @@ /* eslint-disable no-console */ -import { ReactiveElement } from "lit-element"; +import { ReactiveElement } from "lit"; import { HASSDomEvent } from "../common/dom/fire_event"; import { closeDialog, diff --git a/src/styles/polymer-ha-style-dialog.ts b/src/styles/polymer-ha-style-dialog.ts index 22e239b47..68193fc45 100644 --- a/src/styles/polymer-ha-style-dialog.ts +++ b/src/styles/polymer-ha-style-dialog.ts @@ -1,5 +1,5 @@ import "@polymer/polymer/lib/elements/dom-module"; -import { CSSResult } from "lit-element"; +import { CSSResult } from "lit"; import { haStyleDialog } from "../resources/styles"; const documentContainer = document.createElement("template"); diff --git a/src/styles/polymer-ha-style.ts b/src/styles/polymer-ha-style.ts index ea6c98d82..e3afebd8f 100644 --- a/src/styles/polymer-ha-style.ts +++ b/src/styles/polymer-ha-style.ts @@ -1,5 +1,5 @@ import "@polymer/polymer/lib/elements/dom-module"; -import { CSSResult } from "lit-element"; +import { CSSResult } from "lit"; import { haStyle } from "../resources/styles"; const documentContainer = document.createElement("template"); diff --git a/src/types.ts b/src/types.ts index 7c6d699ce..102cdd31c 100644 --- a/src/types.ts +++ b/src/types.ts @@ -3,8 +3,8 @@ import { Connection, HassConfig, HassEntities, - HassServiceTarget, HassServices, + HassServiceTarget, MessageBase, } from "home-assistant-js-websocket"; import { LocalizeFunc } from "./common/translations/localize"; diff --git a/yarn.lock b/yarn.lock index 9dfc4c156..870d8430e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1347,551 +1347,592 @@ dependencies: vary "^1.1.2" -"@material/animation@9.0.0-canary.1c156d69d.0": - version "9.0.0-canary.1c156d69d.0" - resolved "https://registry.yarnpkg.com/@material/animation/-/animation-9.0.0-canary.1c156d69d.0.tgz#53acc1253d1286f6d4cfaf3a778229cbd19ab000" - integrity sha512-m3eUpFRwxcP1tEWJlIH5q77YGSYEe5ITRw5OtyDvxU7ZzF0xKJbBeauQEdCmyig9UvK+J7jUUnCgkT/t/ldLtw== +"@lit-labs/virtualizer@^0.6.0": + version "0.6.0" + resolved "https://registry.yarnpkg.com/@lit-labs/virtualizer/-/virtualizer-0.6.0.tgz#7b556652d4484f2f28d1d7d9ce6aa0fa882e73bc" + integrity sha512-nuwePG9b0TRXmkeL2WQpMxukw9CwlHi33n+s9xW7wfOIl7xcRE6Q+7ygeA/nScFypm1RhumI+SbZVLVTADY2Zg== dependencies: - tslib "^1.9.3" + event-target-shim "^5.0.1" + lit "^2.0.0-rc.1" + tslib "^1.10.0" -"@material/base@9.0.0-canary.1c156d69d.0", "@material/base@=9.0.0-canary.1c156d69d.0": - version "9.0.0-canary.1c156d69d.0" - resolved "https://registry.yarnpkg.com/@material/base/-/base-9.0.0-canary.1c156d69d.0.tgz#84f365077dfae12a31a32bfc7f9ba673fe56b2db" - integrity sha512-r98qY6EsPx6BlzT0Pj+H+BTI7r76GEX/zZPgajxZjbPAJSeeK+uCh69Dmhf63meLKaFkKgvLwH5udKJLMqqjpQ== +"@lit/reactive-element@^1.0.0-rc.2": + version "1.0.0-rc.2" + resolved "https://registry.yarnpkg.com/@lit/reactive-element/-/reactive-element-1.0.0-rc.2.tgz#f24dba16ea571a08dca70f1783bd2ca5ec8de3ee" + integrity sha512-cujeIl5Ei8FC7UHf4/4Q3bRJOtdTe1vpJV/JEBYCggedmQ+2P8A2oz7eE+Vxi6OJ4nc0X+KZxXnBoH4QrEbmEQ== + +"@material/animation@12.0.0-canary.1a8d06483.0": + version "12.0.0-canary.1a8d06483.0" + resolved "https://registry.yarnpkg.com/@material/animation/-/animation-12.0.0-canary.1a8d06483.0.tgz#a3d5a6ebf8965c0e3a52da1c3bf86ff2677f9c31" + integrity sha512-aUiyCKXnXjq6WWOnc5Jh7jWe5hwnG8uKDScq0BKvNOANmGA5ZJnD4F52fmY1bdZmzbGpmPPu9p6WulaLtYfjIQ== dependencies: - tslib "^1.9.3" + tslib "^2.1.0" -"@material/button@9.0.0-canary.1c156d69d.0": - version "9.0.0-canary.1c156d69d.0" - resolved "https://registry.yarnpkg.com/@material/button/-/button-9.0.0-canary.1c156d69d.0.tgz#b35540ed085006d65562ed56fe2b5540d6712712" - integrity sha512-ZjBDrGy2kKPmlIYaL99/C1D0t+MCIkP3Pcj9Y1RxxYdayvP+o8evkBUz5IRtg5NpW4o1X89x8RfF/JmLJZrdYw== +"@material/base@12.0.0-canary.1a8d06483.0", "@material/base@=12.0.0-canary.1a8d06483.0": + version "12.0.0-canary.1a8d06483.0" + resolved "https://registry.yarnpkg.com/@material/base/-/base-12.0.0-canary.1a8d06483.0.tgz#7644e4638301b6dd8f70160a5dfdf3339b2d0e4c" + integrity sha512-mqAV6ZlVyLstS6XcaOUBtY36SnHk8x+HPqJsc/EWkowfQfmjbVnjgjQ3Ld5jAS5BdC1kETmqSKxm0hHxlZd5UQ== dependencies: - "@material/density" "9.0.0-canary.1c156d69d.0" - "@material/elevation" "9.0.0-canary.1c156d69d.0" - "@material/feature-targeting" "9.0.0-canary.1c156d69d.0" - "@material/ripple" "9.0.0-canary.1c156d69d.0" - "@material/rtl" "9.0.0-canary.1c156d69d.0" - "@material/shape" "9.0.0-canary.1c156d69d.0" - "@material/theme" "9.0.0-canary.1c156d69d.0" - "@material/touch-target" "9.0.0-canary.1c156d69d.0" - "@material/typography" "9.0.0-canary.1c156d69d.0" + tslib "^2.1.0" -"@material/checkbox@9.0.0-canary.1c156d69d.0": - version "9.0.0-canary.1c156d69d.0" - resolved "https://registry.yarnpkg.com/@material/checkbox/-/checkbox-9.0.0-canary.1c156d69d.0.tgz#7534284e59af51217e3653ce8d7105dbd001d55f" - integrity sha512-7Fyjh3avQg+EZx6wVIB3K4b/9rs7rYTZIXVYM4iAVJo/LDtdBrdmLy6sRmk90gnO7+V5eTvSBJy7R+dU3l/xNQ== +"@material/button@12.0.0-canary.1a8d06483.0": + version "12.0.0-canary.1a8d06483.0" + resolved "https://registry.yarnpkg.com/@material/button/-/button-12.0.0-canary.1a8d06483.0.tgz#8dd20ae410c8f3064511c5ffd2efbd433539ec73" + integrity sha512-AxPbx9PCYX1Lbez1gsS1P6Ucbmc3UgEHgbNB8kxrksK1Y+vRD1nFXqxGQ67bNCY1c9gTKuMVM84b8OTccRZg2w== dependencies: - "@material/animation" "9.0.0-canary.1c156d69d.0" - "@material/base" "9.0.0-canary.1c156d69d.0" - "@material/density" "9.0.0-canary.1c156d69d.0" - "@material/dom" "9.0.0-canary.1c156d69d.0" - "@material/feature-targeting" "9.0.0-canary.1c156d69d.0" - "@material/ripple" "9.0.0-canary.1c156d69d.0" - "@material/theme" "9.0.0-canary.1c156d69d.0" - "@material/touch-target" "9.0.0-canary.1c156d69d.0" - tslib "^1.9.3" + "@material/density" "12.0.0-canary.1a8d06483.0" + "@material/dom" "12.0.0-canary.1a8d06483.0" + "@material/elevation" "12.0.0-canary.1a8d06483.0" + "@material/feature-targeting" "12.0.0-canary.1a8d06483.0" + "@material/ripple" "12.0.0-canary.1a8d06483.0" + "@material/rtl" "12.0.0-canary.1a8d06483.0" + "@material/shape" "12.0.0-canary.1a8d06483.0" + "@material/theme" "12.0.0-canary.1a8d06483.0" + "@material/touch-target" "12.0.0-canary.1a8d06483.0" + "@material/typography" "12.0.0-canary.1a8d06483.0" + tslib "^2.1.0" -"@material/chips@=9.0.0-canary.1c156d69d.0": - version "9.0.0-canary.1c156d69d.0" - resolved "https://registry.yarnpkg.com/@material/chips/-/chips-9.0.0-canary.1c156d69d.0.tgz#8f6819c42743a8f4dd9be5155556f0c9eb2d30f7" - integrity sha512-DuWDauRhrlj/nMI/NNUqVD+SUnVsuuZNSvf9t9AX3H08Uo3ZUHhNfdc7Ust0B+jHCaHsjLjlREyYagp8JxJuXQ== +"@material/checkbox@12.0.0-canary.1a8d06483.0": + version "12.0.0-canary.1a8d06483.0" + resolved "https://registry.yarnpkg.com/@material/checkbox/-/checkbox-12.0.0-canary.1a8d06483.0.tgz#3b5fbaa01743387fcbd135f2bd322324c0613bd7" + integrity sha512-j6N1dsVIKqNuXliUuDM/06hdqVOF90Kc6W93nERM0gp5FP0Wx66IuOS6RZV4+RiITTy1AtmTR5HmKIYSq4uPhg== dependencies: - "@material/animation" "9.0.0-canary.1c156d69d.0" - "@material/base" "9.0.0-canary.1c156d69d.0" - "@material/checkbox" "9.0.0-canary.1c156d69d.0" - "@material/density" "9.0.0-canary.1c156d69d.0" - "@material/dom" "9.0.0-canary.1c156d69d.0" - "@material/elevation" "9.0.0-canary.1c156d69d.0" - "@material/feature-targeting" "9.0.0-canary.1c156d69d.0" - "@material/ripple" "9.0.0-canary.1c156d69d.0" - "@material/rtl" "9.0.0-canary.1c156d69d.0" - "@material/shape" "9.0.0-canary.1c156d69d.0" - "@material/theme" "9.0.0-canary.1c156d69d.0" - "@material/touch-target" "9.0.0-canary.1c156d69d.0" - "@material/typography" "9.0.0-canary.1c156d69d.0" - tslib "^1.9.3" + "@material/animation" "12.0.0-canary.1a8d06483.0" + "@material/base" "12.0.0-canary.1a8d06483.0" + "@material/density" "12.0.0-canary.1a8d06483.0" + "@material/dom" "12.0.0-canary.1a8d06483.0" + "@material/feature-targeting" "12.0.0-canary.1a8d06483.0" + "@material/ripple" "12.0.0-canary.1a8d06483.0" + "@material/theme" "12.0.0-canary.1a8d06483.0" + "@material/touch-target" "12.0.0-canary.1a8d06483.0" + tslib "^2.1.0" -"@material/circular-progress@=9.0.0-canary.1c156d69d.0": - version "9.0.0-canary.1c156d69d.0" - resolved "https://registry.yarnpkg.com/@material/circular-progress/-/circular-progress-9.0.0-canary.1c156d69d.0.tgz#df6a6b13cbe65e6e90e81ce0149d472a3de2463c" - integrity sha512-DCYOF9ssHb+psiKA98GZFztYFr48dvEhvS8w0Lu/hx+7G4qlG6KJzFZv1mBuiF0pdJCT1tjEDjOcj6t3nU9SRA== +"@material/chips@=12.0.0-canary.1a8d06483.0": + version "12.0.0-canary.1a8d06483.0" + resolved "https://registry.yarnpkg.com/@material/chips/-/chips-12.0.0-canary.1a8d06483.0.tgz#0827604c15a6ef0d49ab7765b9e0c0a1679c160b" + integrity sha512-STRAaLD5OFKOYehb97wWurNMuj9nDyt/kdFjOqeBZk2b7fXYaG7bV1hMydR+LO0W6znOhubX2Zt6inNZvI56XQ== dependencies: - "@material/animation" "9.0.0-canary.1c156d69d.0" - "@material/base" "9.0.0-canary.1c156d69d.0" - "@material/feature-targeting" "9.0.0-canary.1c156d69d.0" - "@material/progress-indicator" "9.0.0-canary.1c156d69d.0" - "@material/theme" "9.0.0-canary.1c156d69d.0" - tslib "^1.9.3" + "@material/animation" "12.0.0-canary.1a8d06483.0" + "@material/base" "12.0.0-canary.1a8d06483.0" + "@material/checkbox" "12.0.0-canary.1a8d06483.0" + "@material/density" "12.0.0-canary.1a8d06483.0" + "@material/dom" "12.0.0-canary.1a8d06483.0" + "@material/elevation" "12.0.0-canary.1a8d06483.0" + "@material/feature-targeting" "12.0.0-canary.1a8d06483.0" + "@material/ripple" "12.0.0-canary.1a8d06483.0" + "@material/rtl" "12.0.0-canary.1a8d06483.0" + "@material/shape" "12.0.0-canary.1a8d06483.0" + "@material/theme" "12.0.0-canary.1a8d06483.0" + "@material/touch-target" "12.0.0-canary.1a8d06483.0" + "@material/typography" "12.0.0-canary.1a8d06483.0" + tslib "^2.1.0" -"@material/density@9.0.0-canary.1c156d69d.0": - version "9.0.0-canary.1c156d69d.0" - resolved "https://registry.yarnpkg.com/@material/density/-/density-9.0.0-canary.1c156d69d.0.tgz#ca2a2a5f4ea31520d717a41a6343c104acee3005" - integrity sha512-Y87bUpTsXNDOi1q5NVRBxIyTUAFda1PP1Z9HOvgpV19n7/F6YLrttLGcOFSRFfx9btUKf4EddctBzwzBrF71TQ== - -"@material/dialog@=9.0.0-canary.1c156d69d.0": - version "9.0.0-canary.1c156d69d.0" - resolved "https://registry.yarnpkg.com/@material/dialog/-/dialog-9.0.0-canary.1c156d69d.0.tgz#15a0c38d322679f3fcf372eabd21a9c70061f788" - integrity sha512-JadtYwhCPrvZce/0j+kUuSq5+QaXAbZ1yx2FPT01K6/mzEgM0eDuU7ta7IlGGoJXFzmQI8jy7WsTSuW+IBNC8A== +"@material/circular-progress@=12.0.0-canary.1a8d06483.0": + version "12.0.0-canary.1a8d06483.0" + resolved "https://registry.yarnpkg.com/@material/circular-progress/-/circular-progress-12.0.0-canary.1a8d06483.0.tgz#ff87ecf784cc6ac316c6fb560a34e7cafef32d3a" + integrity sha512-+mfVC9zK5BRbEOIn0qzXF7yZiTBLf7jiXJb6ufyyBJR9RDu5RAzvbj2Dj2GDfq46Y+eM7cO3aHjJ77i4eJ6haQ== dependencies: - "@material/animation" "9.0.0-canary.1c156d69d.0" - "@material/base" "9.0.0-canary.1c156d69d.0" - "@material/button" "9.0.0-canary.1c156d69d.0" - "@material/dom" "9.0.0-canary.1c156d69d.0" - "@material/elevation" "9.0.0-canary.1c156d69d.0" - "@material/feature-targeting" "9.0.0-canary.1c156d69d.0" - "@material/ripple" "9.0.0-canary.1c156d69d.0" - "@material/rtl" "9.0.0-canary.1c156d69d.0" - "@material/shape" "9.0.0-canary.1c156d69d.0" - "@material/theme" "9.0.0-canary.1c156d69d.0" - "@material/touch-target" "9.0.0-canary.1c156d69d.0" - "@material/typography" "9.0.0-canary.1c156d69d.0" - tslib "^1.9.3" + "@material/animation" "12.0.0-canary.1a8d06483.0" + "@material/base" "12.0.0-canary.1a8d06483.0" + "@material/feature-targeting" "12.0.0-canary.1a8d06483.0" + "@material/progress-indicator" "12.0.0-canary.1a8d06483.0" + "@material/theme" "12.0.0-canary.1a8d06483.0" + tslib "^2.1.0" -"@material/dom@9.0.0-canary.1c156d69d.0", "@material/dom@=9.0.0-canary.1c156d69d.0": - version "9.0.0-canary.1c156d69d.0" - resolved "https://registry.yarnpkg.com/@material/dom/-/dom-9.0.0-canary.1c156d69d.0.tgz#ffba86848f77cdce5ac2cfe494a97cb82af5c714" - integrity sha512-AwiQDzquolB7rqy8k4+QMVQ8Njb6k0CT+otJ/UNJbj0qNVXZB4njVaWRWrWCt70hYp1rG0cRNkZ01ZJDqABUFw== +"@material/density@12.0.0-canary.1a8d06483.0": + version "12.0.0-canary.1a8d06483.0" + resolved "https://registry.yarnpkg.com/@material/density/-/density-12.0.0-canary.1a8d06483.0.tgz#0f6ccaa15b8efcab1c5eef51ab9cc2c304ff2f9c" + integrity sha512-Tq5MX//GECdL2EnqRFJkIVPJjHD7u6XUCPhH5n50GKo3fZAwU+dksZoncqZPdG/4vxZ4aqTTQT9VXmk0QDEo5Q== dependencies: - "@material/feature-targeting" "9.0.0-canary.1c156d69d.0" - tslib "^1.9.3" + tslib "^2.1.0" -"@material/elevation@9.0.0-canary.1c156d69d.0": - version "9.0.0-canary.1c156d69d.0" - resolved "https://registry.yarnpkg.com/@material/elevation/-/elevation-9.0.0-canary.1c156d69d.0.tgz#0027434eef691dde7e16e672e1349ee1e9ed7a2b" - integrity sha512-ojX0+nRNkfJssFA/EXhwglDwW48xll1OPCVy8jJrRfvIasRHiIJBeRdnlU5BL4qxDJHaEoOfEMmVQP/Aj504Qw== +"@material/dialog@=12.0.0-canary.1a8d06483.0": + version "12.0.0-canary.1a8d06483.0" + resolved "https://registry.yarnpkg.com/@material/dialog/-/dialog-12.0.0-canary.1a8d06483.0.tgz#ef0fdcaf8909b015971c92181c294caa443cffc6" + integrity sha512-TXUjnOhHeVBsNsavSQDVG9bfNj/wzqfn2WpIljDgyKRQd1JPh75AgnZleiOFeVvvOKsNcV3bB+ESwaqgV9Nd1w== dependencies: - "@material/animation" "9.0.0-canary.1c156d69d.0" - "@material/base" "9.0.0-canary.1c156d69d.0" - "@material/feature-targeting" "9.0.0-canary.1c156d69d.0" - "@material/theme" "9.0.0-canary.1c156d69d.0" + "@material/animation" "12.0.0-canary.1a8d06483.0" + "@material/base" "12.0.0-canary.1a8d06483.0" + "@material/button" "12.0.0-canary.1a8d06483.0" + "@material/dom" "12.0.0-canary.1a8d06483.0" + "@material/elevation" "12.0.0-canary.1a8d06483.0" + "@material/feature-targeting" "12.0.0-canary.1a8d06483.0" + "@material/icon-button" "12.0.0-canary.1a8d06483.0" + "@material/ripple" "12.0.0-canary.1a8d06483.0" + "@material/rtl" "12.0.0-canary.1a8d06483.0" + "@material/shape" "12.0.0-canary.1a8d06483.0" + "@material/theme" "12.0.0-canary.1a8d06483.0" + "@material/touch-target" "12.0.0-canary.1a8d06483.0" + "@material/typography" "12.0.0-canary.1a8d06483.0" + tslib "^2.1.0" -"@material/feature-targeting@9.0.0-canary.1c156d69d.0": - version "9.0.0-canary.1c156d69d.0" - resolved "https://registry.yarnpkg.com/@material/feature-targeting/-/feature-targeting-9.0.0-canary.1c156d69d.0.tgz#feaf37af156811a088958e653e6c08e66f567d2a" - integrity sha512-HWd0+GMnkVB3anmUc9+MeWCNoogAbb4U7ihzwq7lzLCQyC+i/kunppkUVV7DhL3ZVl1O6zIw1eAT+dgQpN8x4Q== - -"@material/form-field@=9.0.0-canary.1c156d69d.0": - version "9.0.0-canary.1c156d69d.0" - resolved "https://registry.yarnpkg.com/@material/form-field/-/form-field-9.0.0-canary.1c156d69d.0.tgz#2f44c9704c8a4aef54376819573f835983686e89" - integrity sha512-v1KWGRj4Qf9SESLswtlrdm/B6TmNkQsh5CZSM2xL2ZXe/k/KNgbLgM4ofHJApwW3QWYVBfA8nT/MlIvJJivd9w== +"@material/dom@12.0.0-canary.1a8d06483.0", "@material/dom@=12.0.0-canary.1a8d06483.0": + version "12.0.0-canary.1a8d06483.0" + resolved "https://registry.yarnpkg.com/@material/dom/-/dom-12.0.0-canary.1a8d06483.0.tgz#6ce068b0bcc20d605256d6316b9ed36e6130f729" + integrity sha512-x1+6b2vwCcJbjLddsGefhZNzdvDoyFmrbjSxljnzk+qdeRrM6gXioLfBjxJKT8/olge+XnZukNH8JfiRCVSCGA== dependencies: - "@material/base" "9.0.0-canary.1c156d69d.0" - "@material/feature-targeting" "9.0.0-canary.1c156d69d.0" - "@material/ripple" "9.0.0-canary.1c156d69d.0" - "@material/rtl" "9.0.0-canary.1c156d69d.0" - "@material/theme" "9.0.0-canary.1c156d69d.0" - "@material/typography" "9.0.0-canary.1c156d69d.0" - tslib "^1.9.3" + "@material/feature-targeting" "12.0.0-canary.1a8d06483.0" + tslib "^2.1.0" -"@material/list@9.0.0-canary.1c156d69d.0", "@material/list@=9.0.0-canary.1c156d69d.0": - version "9.0.0-canary.1c156d69d.0" - resolved "https://registry.yarnpkg.com/@material/list/-/list-9.0.0-canary.1c156d69d.0.tgz#d4a7b1354e4d00a843de19f3dbde188ca2e1e429" - integrity sha512-cn9zTm38RgriNudHnQAlEyLJOIfE11rTYl5mnBMkLaGz1gRLH+QVN8Q8FBpMwagS0cU0CkMTwrADJaUlmJeuVQ== +"@material/elevation@12.0.0-canary.1a8d06483.0": + version "12.0.0-canary.1a8d06483.0" + resolved "https://registry.yarnpkg.com/@material/elevation/-/elevation-12.0.0-canary.1a8d06483.0.tgz#f6e24d5573b16160f3f694a1d80ca945e5ee707a" + integrity sha512-0MaBjiEwZsFnVfDVUqdVl3eVRGlJcBJK/Qm495ITwMg4Z8pCM6S+p8km8PidGvSTy0RAUpR/51x1CI2sgl7Fqw== dependencies: - "@material/base" "9.0.0-canary.1c156d69d.0" - "@material/density" "9.0.0-canary.1c156d69d.0" - "@material/dom" "9.0.0-canary.1c156d69d.0" - "@material/feature-targeting" "9.0.0-canary.1c156d69d.0" - "@material/ripple" "9.0.0-canary.1c156d69d.0" - "@material/rtl" "9.0.0-canary.1c156d69d.0" - "@material/shape" "9.0.0-canary.1c156d69d.0" - "@material/theme" "9.0.0-canary.1c156d69d.0" - "@material/typography" "9.0.0-canary.1c156d69d.0" - tslib "^1.9.3" + "@material/animation" "12.0.0-canary.1a8d06483.0" + "@material/base" "12.0.0-canary.1a8d06483.0" + "@material/feature-targeting" "12.0.0-canary.1a8d06483.0" + "@material/theme" "12.0.0-canary.1a8d06483.0" + tslib "^2.1.0" -"@material/menu-surface@9.0.0-canary.1c156d69d.0", "@material/menu-surface@=9.0.0-canary.1c156d69d.0": - version "9.0.0-canary.1c156d69d.0" - resolved "https://registry.yarnpkg.com/@material/menu-surface/-/menu-surface-9.0.0-canary.1c156d69d.0.tgz#6200a17a4895d99f604f96d87b65243ae3b98d5e" - integrity sha512-/ePz8oZm+XLsGypnXJ1ATK4Vtei4KgHh9MFJHhOvmAbd6gPX6I8LnWlUA3cQ2/AX0bDeLNM7mXUkJ1d2flHdNQ== +"@material/feature-targeting@12.0.0-canary.1a8d06483.0": + version "12.0.0-canary.1a8d06483.0" + resolved "https://registry.yarnpkg.com/@material/feature-targeting/-/feature-targeting-12.0.0-canary.1a8d06483.0.tgz#b5191c4c813a87207ffeebca6edb9c50fc71f5b3" + integrity sha512-CXlHPZ+ArtVpFitBMtvpphGHWesL2n3NuE14e6vBW12N+3kj58BYCUZHLF3/tB1qJlezYEvEs/W2/YpOx8qMMA== dependencies: - "@material/animation" "9.0.0-canary.1c156d69d.0" - "@material/base" "9.0.0-canary.1c156d69d.0" - "@material/elevation" "9.0.0-canary.1c156d69d.0" - "@material/feature-targeting" "9.0.0-canary.1c156d69d.0" - "@material/rtl" "9.0.0-canary.1c156d69d.0" - "@material/shape" "9.0.0-canary.1c156d69d.0" - "@material/theme" "9.0.0-canary.1c156d69d.0" - tslib "^1.9.3" + tslib "^2.1.0" -"@material/menu@=9.0.0-canary.1c156d69d.0": - version "9.0.0-canary.1c156d69d.0" - resolved "https://registry.yarnpkg.com/@material/menu/-/menu-9.0.0-canary.1c156d69d.0.tgz#641c020acaa1a92a254f8366e6a5762137483757" - integrity sha512-opUKKT40E3aDY9wMUIKQtUoxB2gD6Ry633vb2sOHHkf7YA7Ad/F8HnByhLqeq7tB2Gg1N0PKfSGOk/OMjJ1l9w== +"@material/form-field@=12.0.0-canary.1a8d06483.0": + version "12.0.0-canary.1a8d06483.0" + resolved "https://registry.yarnpkg.com/@material/form-field/-/form-field-12.0.0-canary.1a8d06483.0.tgz#393d41ae0a3dbe1780c28c7a2af3791317e189fe" + integrity sha512-5OUWpLKAeBK17wsdCN3vAxefXsshuLqXbocvf+FzUwyMWzStRhXyjjR1PxuBLuBBof6JvabLGpQgpuaYFju2EQ== dependencies: - "@material/base" "9.0.0-canary.1c156d69d.0" - "@material/dom" "9.0.0-canary.1c156d69d.0" - "@material/elevation" "9.0.0-canary.1c156d69d.0" - "@material/feature-targeting" "9.0.0-canary.1c156d69d.0" - "@material/list" "9.0.0-canary.1c156d69d.0" - "@material/menu-surface" "9.0.0-canary.1c156d69d.0" - "@material/ripple" "9.0.0-canary.1c156d69d.0" - "@material/rtl" "9.0.0-canary.1c156d69d.0" - "@material/theme" "9.0.0-canary.1c156d69d.0" - tslib "^1.9.3" + "@material/base" "12.0.0-canary.1a8d06483.0" + "@material/feature-targeting" "12.0.0-canary.1a8d06483.0" + "@material/ripple" "12.0.0-canary.1a8d06483.0" + "@material/rtl" "12.0.0-canary.1a8d06483.0" + "@material/theme" "12.0.0-canary.1a8d06483.0" + "@material/typography" "12.0.0-canary.1a8d06483.0" + tslib "^2.1.0" -"@material/mwc-base@^0.20.0": - version "0.20.0" - resolved "https://registry.yarnpkg.com/@material/mwc-base/-/mwc-base-0.20.0.tgz#9753d357ea3fb9010985487a4d582bf273de1aaf" - integrity sha512-q35jN1TGBts3LzKk2RVtgBpLDfBfRrx2hJ4GEVAeJsEGiO5CZrCD0bPlZSRTammzQBbDAh7szvhMiWo0TkRaWw== +"@material/icon-button@12.0.0-canary.1a8d06483.0": + version "12.0.0-canary.1a8d06483.0" + resolved "https://registry.yarnpkg.com/@material/icon-button/-/icon-button-12.0.0-canary.1a8d06483.0.tgz#bf15f01c994e906bdafb8656c1629b3d71e1c393" + integrity sha512-m7WHl4cZHf/oCoQ+Uwu8rzd/Ni712GN6PXN670SQ/1dOSeoK+1H8/J09bWG/OccsYbBAopGRdWBRcgvf4rkC3Q== dependencies: - "@material/base" "=9.0.0-canary.1c156d69d.0" - "@material/dom" "=9.0.0-canary.1c156d69d.0" - lit-element "^2.3.0" + "@material/base" "12.0.0-canary.1a8d06483.0" + "@material/density" "12.0.0-canary.1a8d06483.0" + "@material/feature-targeting" "12.0.0-canary.1a8d06483.0" + "@material/ripple" "12.0.0-canary.1a8d06483.0" + "@material/rtl" "12.0.0-canary.1a8d06483.0" + "@material/theme" "12.0.0-canary.1a8d06483.0" + tslib "^2.1.0" + +"@material/list@12.0.0-canary.1a8d06483.0", "@material/list@=12.0.0-canary.1a8d06483.0": + version "12.0.0-canary.1a8d06483.0" + resolved "https://registry.yarnpkg.com/@material/list/-/list-12.0.0-canary.1a8d06483.0.tgz#6ba66e3e0f23dd0b3146090e3ba58a69f835d917" + integrity sha512-gt76+G2+kKpmtuY5lImZESZts65eGPmYkjDQsE7x/GsX/eEd9F5k3VqeDQwsp2HyywMoAi6CD9EHN3Hw+ays+g== + dependencies: + "@material/base" "12.0.0-canary.1a8d06483.0" + "@material/density" "12.0.0-canary.1a8d06483.0" + "@material/dom" "12.0.0-canary.1a8d06483.0" + "@material/feature-targeting" "12.0.0-canary.1a8d06483.0" + "@material/ripple" "12.0.0-canary.1a8d06483.0" + "@material/rtl" "12.0.0-canary.1a8d06483.0" + "@material/shape" "12.0.0-canary.1a8d06483.0" + "@material/theme" "12.0.0-canary.1a8d06483.0" + "@material/typography" "12.0.0-canary.1a8d06483.0" + tslib "^2.1.0" + +"@material/menu-surface@12.0.0-canary.1a8d06483.0", "@material/menu-surface@=12.0.0-canary.1a8d06483.0": + version "12.0.0-canary.1a8d06483.0" + resolved "https://registry.yarnpkg.com/@material/menu-surface/-/menu-surface-12.0.0-canary.1a8d06483.0.tgz#fd940d4f1007ceff5b829c1f2fbdf21f8c88de43" + integrity sha512-vWCkbuNRjNE8FfK8wdFUW61PnURCtEnpceMd+XiAKorUJaqaPSG2uU9Uu6Y823dVEotxmhZaW25oFIPGobM4Cw== + dependencies: + "@material/animation" "12.0.0-canary.1a8d06483.0" + "@material/base" "12.0.0-canary.1a8d06483.0" + "@material/elevation" "12.0.0-canary.1a8d06483.0" + "@material/feature-targeting" "12.0.0-canary.1a8d06483.0" + "@material/rtl" "12.0.0-canary.1a8d06483.0" + "@material/shape" "12.0.0-canary.1a8d06483.0" + "@material/theme" "12.0.0-canary.1a8d06483.0" + tslib "^2.1.0" + +"@material/menu@=12.0.0-canary.1a8d06483.0": + version "12.0.0-canary.1a8d06483.0" + resolved "https://registry.yarnpkg.com/@material/menu/-/menu-12.0.0-canary.1a8d06483.0.tgz#81f6050fa95c138a6454b84d5ff7a5c38d1fe4c3" + integrity sha512-DhUNwiEtPyhvVTW6zpcWsupiLKq/Qi+RDJJP+B79ZY40/p3BoWjDymULOtYGndDYduR5lJ6ScJ5MMT666nelQQ== + dependencies: + "@material/base" "12.0.0-canary.1a8d06483.0" + "@material/dom" "12.0.0-canary.1a8d06483.0" + "@material/elevation" "12.0.0-canary.1a8d06483.0" + "@material/feature-targeting" "12.0.0-canary.1a8d06483.0" + "@material/list" "12.0.0-canary.1a8d06483.0" + "@material/menu-surface" "12.0.0-canary.1a8d06483.0" + "@material/ripple" "12.0.0-canary.1a8d06483.0" + "@material/rtl" "12.0.0-canary.1a8d06483.0" + "@material/theme" "12.0.0-canary.1a8d06483.0" + tslib "^2.1.0" + +"@material/mwc-base@0.22.0-canary.cc04657a.0": + version "0.22.0-canary.cc04657a.0" + resolved "https://registry.yarnpkg.com/@material/mwc-base/-/mwc-base-0.22.0-canary.cc04657a.0.tgz#9d619b66f0f0b91976215249866ea5a880371a33" + integrity sha512-O3BrWp7cfsRgBKIcWt+WRlnG7x4dRP5v+zhiRPdxZV3EHtHfQTO3yiXnhkW+F3BHN4UMOHYeshXHg0CbJ3O6jA== + dependencies: + "@material/base" "=12.0.0-canary.1a8d06483.0" + "@material/dom" "=12.0.0-canary.1a8d06483.0" + lit-element "^2.5.0" tslib "^2.0.1" -"@material/mwc-button@^0.20.0": - version "0.20.0" - resolved "https://registry.yarnpkg.com/@material/mwc-button/-/mwc-button-0.20.0.tgz#2942edb504f4cee4d8f55b667b8538f27084b772" - integrity sha512-kqQpeuLfaqfH4PZbENT9rwx1sgeFPLHuKy5M31ZeKG1deRTxw11FDGeMxSkePfm1QFfY6DNTsIAG5qC56tUNlw== +"@material/mwc-button@0.22.0-canary.cc04657a.0", "@material/mwc-button@canary": + version "0.22.0-canary.cc04657a.0" + resolved "https://registry.yarnpkg.com/@material/mwc-button/-/mwc-button-0.22.0-canary.cc04657a.0.tgz#9640668b340197325ecc493ddc861bc215c117a3" + integrity sha512-xM6VorfSUgYDFFHYr5GfzHFbqcgz0j3TE6xR6dXkJQTqQPFameOYFBKn7TKu2j5674+OY4QHeyhw8/fYaWeP0A== dependencies: - "@material/mwc-icon" "^0.20.0" - "@material/mwc-ripple" "^0.20.0" - lit-element "^2.3.0" - lit-html "^1.1.2" + "@material/mwc-icon" "0.22.0-canary.cc04657a.0" + "@material/mwc-ripple" "0.22.0-canary.cc04657a.0" + lit-element "^2.5.0" + lit-html "^1.4.0" tslib "^2.0.1" -"@material/mwc-checkbox@^0.20.0": - version "0.20.0" - resolved "https://registry.yarnpkg.com/@material/mwc-checkbox/-/mwc-checkbox-0.20.0.tgz#fff9d41cd8a72b39a3c883d1b01230e1a3e462fd" - integrity sha512-e7qRFpoTZPeBTU05M/FvGnAalY9fJXtzTIfFXWevpm5xm21zr+5lw4QqJOzN8l8Sj8CwciTZ86GMfKGViBbyuw== +"@material/mwc-checkbox@0.22.0-canary.cc04657a.0", "@material/mwc-checkbox@canary": + version "0.22.0-canary.cc04657a.0" + resolved "https://registry.yarnpkg.com/@material/mwc-checkbox/-/mwc-checkbox-0.22.0-canary.cc04657a.0.tgz#ebfd10c06120de3fbdcf05751757ca621ce9035c" + integrity sha512-m/BSKMecOmZ8xG2g7P0bHZ5mlMBNkXxcmw68FOv3qZZufEkLMEic07zxbHNePcmDhjildwMWzTLfWHgCdTQ0hQ== dependencies: - "@material/mwc-base" "^0.20.0" - "@material/mwc-ripple" "^0.20.0" - lit-element "^2.3.0" - lit-html "^1.1.2" + "@material/mwc-base" "0.22.0-canary.cc04657a.0" + "@material/mwc-ripple" "0.22.0-canary.cc04657a.0" + lit-element "^2.5.0" + lit-html "^1.4.0" tslib "^2.0.1" -"@material/mwc-circular-progress@^0.20.0": - version "0.20.0" - resolved "https://registry.yarnpkg.com/@material/mwc-circular-progress/-/mwc-circular-progress-0.20.0.tgz#db27d4862be4afa3b68f4d9bd06533171869ce37" - integrity sha512-6GyI97rZOGajjFB9L8R+44myv3YMo3zEHrlco5j1WnMPIPNHUcYww8EJgtkcl1E/q04Xpwvt6fFPv9X4vmLBnQ== +"@material/mwc-circular-progress@canary": + version "0.22.0-canary.cc04657a.0" + resolved "https://registry.yarnpkg.com/@material/mwc-circular-progress/-/mwc-circular-progress-0.22.0-canary.cc04657a.0.tgz#d5873e347979b2279f66826cca167ed3ac147f96" + integrity sha512-hBD2EZhiolkD3m7xaSK7ml+qomX+FCg78RbV1BArrEnLk21ui46NsmtvBBJ1UiZUGs1FvRUcVNyMjSRTByxeDA== dependencies: - "@material/circular-progress" "=9.0.0-canary.1c156d69d.0" - "@material/mwc-base" "^0.20.0" - "@material/theme" "=9.0.0-canary.1c156d69d.0" - lit-element "^2.3.0" - lit-html "^1.1.2" + "@material/circular-progress" "=12.0.0-canary.1a8d06483.0" + "@material/mwc-base" "0.22.0-canary.cc04657a.0" + "@material/theme" "=12.0.0-canary.1a8d06483.0" + lit-element "^2.5.0" + lit-html "^1.4.0" tslib "^2.0.1" -"@material/mwc-dialog@^0.20.0": - version "0.20.0" - resolved "https://registry.yarnpkg.com/@material/mwc-dialog/-/mwc-dialog-0.20.0.tgz#3169f71a049c61cfd53d16b761b8313645bdba01" - integrity sha512-7VG8M0p2xaqs+gFDQLNQiVSKJNe+j8jemYX94wxRMZaMRryX09uPrOkn1CGUAuAy0fivxVLhlFG6KINbGR/Avg== +"@material/mwc-dialog@canary": + version "0.22.0-canary.cc04657a.0" + resolved "https://registry.yarnpkg.com/@material/mwc-dialog/-/mwc-dialog-0.22.0-canary.cc04657a.0.tgz#d817a733149893cb4c0d1d1ea563e7c65d360af1" + integrity sha512-qcMVcrJxEzgswiP34WPPtR484d2G7YfViVxVUrmAupsIlKqCLn7jYf6OlE/NmX0d65XIdo+WQEt1Qprui6wQiA== dependencies: - "@material/dialog" "=9.0.0-canary.1c156d69d.0" - "@material/dom" "=9.0.0-canary.1c156d69d.0" - "@material/mwc-base" "^0.20.0" - "@material/mwc-button" "^0.20.0" + "@material/dialog" "=12.0.0-canary.1a8d06483.0" + "@material/dom" "=12.0.0-canary.1a8d06483.0" + "@material/mwc-base" "0.22.0-canary.cc04657a.0" + "@material/mwc-button" "0.22.0-canary.cc04657a.0" blocking-elements "^0.1.0" - lit-element "^2.3.0" - lit-html "^1.1.2" + lit-element "^2.5.0" + lit-html "^1.4.0" tslib "^2.0.1" wicg-inert "^3.0.0" -"@material/mwc-fab@^0.20.0": - version "0.20.0" - resolved "https://registry.yarnpkg.com/@material/mwc-fab/-/mwc-fab-0.20.0.tgz#bcd77bd9a6e06855b174944f0267e2b5512fab45" - integrity sha512-lxPlber5SxRAzH063IFTQhUj7YRuoi5juvYsSWHDLZUqj7wBTV+m6wX9a14wltcCumMNL80k2lXs9FLUOnZz9Q== +"@material/mwc-fab@canary": + version "0.22.0-canary.cc04657a.0" + resolved "https://registry.yarnpkg.com/@material/mwc-fab/-/mwc-fab-0.22.0-canary.cc04657a.0.tgz#a3307c19a5c432c20da1029451a4dc97a219aa46" + integrity sha512-VR1xGp+VaIcysklG6jXP2rky3iTTbI06AvWa3KYevlpwm/sfnY5N4onUpeckAzIVvKUKM9JO/Yx+snJCUCAY5w== dependencies: - "@material/mwc-ripple" "^0.20.0" - lit-element "^2.3.0" - lit-html "^1.1.2" + "@material/mwc-ripple" "0.22.0-canary.cc04657a.0" + lit-element "^2.5.0" + lit-html "^1.4.0" tslib "^2.0.1" -"@material/mwc-formfield@^0.20.0": - version "0.20.0" - resolved "https://registry.yarnpkg.com/@material/mwc-formfield/-/mwc-formfield-0.20.0.tgz#dd3e25778aad624a0d13f5b8a33c95bf1aa3883f" - integrity sha512-Rrk2ah5gNHD4O/yYWdwHvH3kGddaZXbdiZPCTpYDlTHG63CMUsAENJy8Fu8ZCC23nxbWfBeejtbB/Da+0VZWig== +"@material/mwc-formfield@canary": + version "0.22.0-canary.cc04657a.0" + resolved "https://registry.yarnpkg.com/@material/mwc-formfield/-/mwc-formfield-0.22.0-canary.cc04657a.0.tgz#3e5803793e19c047ac0ec71061069c1f4b593dd0" + integrity sha512-eVajWwlwSC0ySDYU3btu41agtDQlotuaa6LYR0ZamNa1CMcu8QFq3ZyLaQqqS66/FsJJ4W+72+MpkUnAthj55A== dependencies: - "@material/form-field" "=9.0.0-canary.1c156d69d.0" - "@material/mwc-base" "^0.20.0" - lit-element "^2.3.0" - lit-html "^1.1.2" + "@material/form-field" "=12.0.0-canary.1a8d06483.0" + "@material/mwc-base" "0.22.0-canary.cc04657a.0" + lit-element "^2.5.0" + lit-html "^1.4.0" tslib "^2.0.1" -"@material/mwc-icon-button@^0.20.0": - version "0.20.0" - resolved "https://registry.yarnpkg.com/@material/mwc-icon-button/-/mwc-icon-button-0.20.0.tgz#1a2d22f5d351b6a61f0dd41cb516a6fe21b6bcc5" - integrity sha512-Bwm399++ZAo4HKmvLwRqSQ8Prhq6fxKwBcNFcqRIYMwwOf/iuuq4/hSX8+Wm8XtdX+mxSQfS7GePqn8XOTTKvw== +"@material/mwc-icon-button@canary": + version "0.22.0-canary.cc04657a.0" + resolved "https://registry.yarnpkg.com/@material/mwc-icon-button/-/mwc-icon-button-0.22.0-canary.cc04657a.0.tgz#79171babfbfde7fd98e2d9fbe66af40fdeeadf80" + integrity sha512-GzWXtjTterfWKAjs+qRyPP0RIWHt34FJkMoMjD0YuoVzbKeTFURwo9QBduVUU36ERe73sssnxtBk+5pQ7GWGjA== dependencies: - "@material/mwc-ripple" "^0.20.0" - lit-element "^2.3.0" + "@material/mwc-ripple" "0.22.0-canary.cc04657a.0" + lit-element "^2.5.0" tslib "^2.0.1" -"@material/mwc-icon@^0.20.0": - version "0.20.0" - resolved "https://registry.yarnpkg.com/@material/mwc-icon/-/mwc-icon-0.20.0.tgz#c2c42bca9145d4a75f63b4ce1567270b41986b47" - integrity sha512-YCtzWbJVSZGcvWKVHwIhwfGMLEqAmRSVGcXTCAH/rOzGU7RkOxQkfNDkLAuTRAX9a7HYQStIJ39ENVcysElljg== +"@material/mwc-icon@0.22.0-canary.cc04657a.0": + version "0.22.0-canary.cc04657a.0" + resolved "https://registry.yarnpkg.com/@material/mwc-icon/-/mwc-icon-0.22.0-canary.cc04657a.0.tgz#d2a9a597a7e1cb894cf85af44298aa44507649e2" + integrity sha512-ArXclZOwcf4UfI2OSQjFNjzp59uRFLD6KDYJuGqrvPneeh4ekS6GVwOrJkI1CVe2ddv9MKWeTdXR6WY2TYk+Uw== dependencies: - lit-element "^2.3.0" + lit-element "^2.5.0" tslib "^2.0.1" -"@material/mwc-list@^0.20.0": - version "0.20.0" - resolved "https://registry.yarnpkg.com/@material/mwc-list/-/mwc-list-0.20.0.tgz#44b0bcd3653b46c7493614741fc7a11cee8abca4" - integrity sha512-RLHn4k6oH2jsSorALbQJ3Ak0BwTyaTeKpXgjI65dHuMRhQaQUaMapJzfh5ghKPhjg1R5D+2r5wktjciFoZ9KVw== +"@material/mwc-list@0.22.0-canary.cc04657a.0", "@material/mwc-list@canary": + version "0.22.0-canary.cc04657a.0" + resolved "https://registry.yarnpkg.com/@material/mwc-list/-/mwc-list-0.22.0-canary.cc04657a.0.tgz#490ac8b1aebf57f937122bd9e55bc406c4ef793f" + integrity sha512-yA0b38mTEh75+W3LxeSJe97/Yu9bZAXX9783v8lhbwlAbp/IZPcLr0FkSfUt4BM4TIuEU9Sb6E8L8YpCqM6NSA== dependencies: - "@material/base" "=9.0.0-canary.1c156d69d.0" - "@material/dom" "=9.0.0-canary.1c156d69d.0" - "@material/list" "=9.0.0-canary.1c156d69d.0" - "@material/mwc-base" "^0.20.0" - "@material/mwc-checkbox" "^0.20.0" - "@material/mwc-radio" "^0.20.0" - "@material/mwc-ripple" "^0.20.0" - lit-element "^2.3.0" - lit-html "^1.1.2" + "@material/base" "=12.0.0-canary.1a8d06483.0" + "@material/dom" "=12.0.0-canary.1a8d06483.0" + "@material/list" "=12.0.0-canary.1a8d06483.0" + "@material/mwc-base" "0.22.0-canary.cc04657a.0" + "@material/mwc-checkbox" "0.22.0-canary.cc04657a.0" + "@material/mwc-radio" "0.22.0-canary.cc04657a.0" + "@material/mwc-ripple" "0.22.0-canary.cc04657a.0" + lit-element "^2.5.0" + lit-html "^1.4.0" tslib "^2.0.1" -"@material/mwc-menu@^0.20.0": - version "0.20.0" - resolved "https://registry.yarnpkg.com/@material/mwc-menu/-/mwc-menu-0.20.0.tgz#672d6a4b40975b8101029be3b526aa014a252957" - integrity sha512-slSY3LORaP8MniXoNvvulvptQ3Ohjit13xiFWVWRr63H3YxnNdBqWW6BICASNJWNV/5y8UM1CE2Xw99UEnG9JQ== +"@material/mwc-menu@canary": + version "0.22.0-canary.cc04657a.0" + resolved "https://registry.yarnpkg.com/@material/mwc-menu/-/mwc-menu-0.22.0-canary.cc04657a.0.tgz#61aa5d70af6509958aff9b583c5d86a048d23af2" + integrity sha512-unXilkODM05Q4Dhmw54OItlRO1A+k8STuWnDSpM7nti1r5uh25BfJ64qs70OBMn4FM9fZGbOAvX1GfW5o/nYrA== dependencies: - "@material/menu" "=9.0.0-canary.1c156d69d.0" - "@material/menu-surface" "=9.0.0-canary.1c156d69d.0" - "@material/mwc-base" "^0.20.0" - "@material/mwc-list" "^0.20.0" - "@material/shape" "=9.0.0-canary.1c156d69d.0" - "@material/theme" "=9.0.0-canary.1c156d69d.0" - lit-element "^2.3.0" - lit-html "^1.1.2" + "@material/menu" "=12.0.0-canary.1a8d06483.0" + "@material/menu-surface" "=12.0.0-canary.1a8d06483.0" + "@material/mwc-base" "0.22.0-canary.cc04657a.0" + "@material/mwc-list" "0.22.0-canary.cc04657a.0" + "@material/shape" "=12.0.0-canary.1a8d06483.0" + "@material/theme" "=12.0.0-canary.1a8d06483.0" + lit-element "^2.5.0" + lit-html "^1.4.0" tslib "^2.0.1" -"@material/mwc-radio@^0.20.0": - version "0.20.0" - resolved "https://registry.yarnpkg.com/@material/mwc-radio/-/mwc-radio-0.20.0.tgz#bf282fe5bd3f0f8e6c3eeb0b781eea6bc06f1743" - integrity sha512-aVsok8EZJQFHn5VW9iP4gxO1wY5XeNnANdP82GhHZfIcxp1AQDORuUSy6Qoj2YBmCFCnG4BGAac1zs4OXRPRqA== +"@material/mwc-radio@0.22.0-canary.cc04657a.0", "@material/mwc-radio@canary": + version "0.22.0-canary.cc04657a.0" + resolved "https://registry.yarnpkg.com/@material/mwc-radio/-/mwc-radio-0.22.0-canary.cc04657a.0.tgz#3cf7ea09b4c6bfb8cb654c39c1fadd288235ca91" + integrity sha512-NDCBflXsqbL8vZKce1BPlDJgjcC/XD+ZlmtSY2liZgvZ6fPUGxtii/YGQRrrmZvIKDc+JJG0rhzZOty5XHQy+A== dependencies: - "@material/mwc-base" "^0.20.0" - "@material/mwc-ripple" "^0.20.0" - "@material/radio" "=9.0.0-canary.1c156d69d.0" - lit-element "^2.3.0" + "@material/mwc-base" "0.22.0-canary.cc04657a.0" + "@material/mwc-ripple" "0.22.0-canary.cc04657a.0" + "@material/radio" "=12.0.0-canary.1a8d06483.0" + lit-element "^2.5.0" tslib "^2.0.1" -"@material/mwc-ripple@^0.20.0": - version "0.20.0" - resolved "https://registry.yarnpkg.com/@material/mwc-ripple/-/mwc-ripple-0.20.0.tgz#ac83eda314b712c2fba293d2732f550dd1c6023b" - integrity sha512-4rlIu+Kk//NsW/u3CnU1kz3dsvwEozax0Zf2CUp+ao0ozclHfQ2+sTZVY0Mr8+GJLn7Oz51gT5OHoarZuWWljA== +"@material/mwc-ripple@0.22.0-canary.cc04657a.0", "@material/mwc-ripple@canary": + version "0.22.0-canary.cc04657a.0" + resolved "https://registry.yarnpkg.com/@material/mwc-ripple/-/mwc-ripple-0.22.0-canary.cc04657a.0.tgz#bd22e2babe11aeffe7a611eadf7d354597c18eae" + integrity sha512-mjXSH7OA7iBe6e6ssenInTav9gTGx0lK0hrJfi92ku3YYoSgw8ULK8TiL/7YmGGH7UN67Emv4fdGPhwfiMfYbg== dependencies: - "@material/dom" "=9.0.0-canary.1c156d69d.0" - "@material/mwc-base" "^0.20.0" - "@material/ripple" "=9.0.0-canary.1c156d69d.0" - lit-element "^2.3.0" - lit-html "^1.1.2" + "@material/dom" "=12.0.0-canary.1a8d06483.0" + "@material/mwc-base" "0.22.0-canary.cc04657a.0" + "@material/ripple" "=12.0.0-canary.1a8d06483.0" + lit-element "^2.5.0" + lit-html "^1.4.0" tslib "^2.0.1" -"@material/mwc-switch@^0.20.0": - version "0.20.0" - resolved "https://registry.yarnpkg.com/@material/mwc-switch/-/mwc-switch-0.20.0.tgz#e4b3c3f512e7c2c497f07828795aa543320e81f9" - integrity sha512-1++EESLaVGdRQTpm0t5Z5Il/3IZTSaMzBYb/21AVM2SkNqWG5/2ycd+cj4BhfViIBjPXi0Ajcz4nhxHE/6SRjw== +"@material/mwc-switch@canary": + version "0.22.0-canary.cc04657a.0" + resolved "https://registry.yarnpkg.com/@material/mwc-switch/-/mwc-switch-0.22.0-canary.cc04657a.0.tgz#44ccbb37946ec2884692b6fff8ef3beab854d07a" + integrity sha512-dP4dqqIYULckm7UDynVS5E62nZt28Ae622AGneiHtRc1ob9IVtGRkpTVNoz5QyKvrLyF4XKAsKoOwAm6x66nkg== dependencies: - "@material/mwc-base" "^0.20.0" - "@material/mwc-ripple" "^0.20.0" - "@material/switch" "=9.0.0-canary.1c156d69d.0" - lit-element "^2.3.0" + "@material/mwc-base" "0.22.0-canary.cc04657a.0" + "@material/mwc-ripple" "0.22.0-canary.cc04657a.0" + "@material/switch" "=12.0.0-canary.1a8d06483.0" + lit-element "^2.5.0" tslib "^2.0.1" -"@material/mwc-tab-bar@^0.20.0": - version "0.20.0" - resolved "https://registry.yarnpkg.com/@material/mwc-tab-bar/-/mwc-tab-bar-0.20.0.tgz#02cecdc1bdf20feeb85085c8138d0f6d933411b2" - integrity sha512-7iGFzVsS33m5uZXxeXMK1ag3u1drRbBcfkXbP8mp0rpIrhZNpCAOZkTpyXtZGx7WAijaCXPdKOo3MkHutqn6Rg== +"@material/mwc-tab-bar@canary": + version "0.22.0-canary.cc04657a.0" + resolved "https://registry.yarnpkg.com/@material/mwc-tab-bar/-/mwc-tab-bar-0.22.0-canary.cc04657a.0.tgz#5590d3a3e820b4a7a4dc134d44790735cd375884" + integrity sha512-p0T+65FmD2EdMN4L0MStjd1jXSLjq5/w0wQ08WiO2Q7EWgh2iuABxwLLzhL4hMLWKzDXqmzy1rKI2QyiTRIW8A== dependencies: - "@material/mwc-base" "^0.20.0" - "@material/mwc-tab" "^0.20.0" - "@material/mwc-tab-scroller" "^0.20.0" - "@material/tab" "=9.0.0-canary.1c156d69d.0" - "@material/tab-bar" "=9.0.0-canary.1c156d69d.0" - lit-element "^2.3.0" + "@material/mwc-base" "0.22.0-canary.cc04657a.0" + "@material/mwc-tab" "0.22.0-canary.cc04657a.0" + "@material/mwc-tab-scroller" "0.22.0-canary.cc04657a.0" + "@material/tab" "=12.0.0-canary.1a8d06483.0" + "@material/tab-bar" "=12.0.0-canary.1a8d06483.0" + lit-element "^2.5.0" tslib "^2.0.1" -"@material/mwc-tab-indicator@^0.20.0": - version "0.20.0" - resolved "https://registry.yarnpkg.com/@material/mwc-tab-indicator/-/mwc-tab-indicator-0.20.0.tgz#a25e981517d46689aae5214798cbc083780569e3" - integrity sha512-Y98B1MKeBX2zHwQ4yqpQKULvrm2GaLmw6yUqxiwUoE8CJQv/8wOTJHjtvYXgazYs/VZ2bOD1NoOhtntZwMpn/w== +"@material/mwc-tab-indicator@0.22.0-canary.cc04657a.0": + version "0.22.0-canary.cc04657a.0" + resolved "https://registry.yarnpkg.com/@material/mwc-tab-indicator/-/mwc-tab-indicator-0.22.0-canary.cc04657a.0.tgz#9a3228248f27ba71f6007a4b9a109c3302cd2017" + integrity sha512-HEFb1H9CsxGhWM57Z6MJaAaMLgKdorl8Dvjfj/hDRPaqiQAncKU2SSzRPqGSgnwqIqPQZVZrHte8+0vpnQgv5w== dependencies: - "@material/mwc-base" "^0.20.0" - "@material/tab-indicator" "=9.0.0-canary.1c156d69d.0" - lit-element "^2.3.0" - lit-html "^1.1.2" + "@material/mwc-base" "0.22.0-canary.cc04657a.0" + "@material/tab-indicator" "=12.0.0-canary.1a8d06483.0" + lit-element "^2.5.0" + lit-html "^1.4.0" tslib "^2.0.1" -"@material/mwc-tab-scroller@^0.20.0": - version "0.20.0" - resolved "https://registry.yarnpkg.com/@material/mwc-tab-scroller/-/mwc-tab-scroller-0.20.0.tgz#5f4ed139a322eef1047a03c3f79aa5df78f7b04e" - integrity sha512-Q6Gh+xdiTuXtOBJEUz6YBEHakDAdrsiqGJV1x90Oj5PtbSvkEU8dc/QiJBFsCesxK3vssWKLGqeo1GvQSJW0LQ== +"@material/mwc-tab-scroller@0.22.0-canary.cc04657a.0": + version "0.22.0-canary.cc04657a.0" + resolved "https://registry.yarnpkg.com/@material/mwc-tab-scroller/-/mwc-tab-scroller-0.22.0-canary.cc04657a.0.tgz#2b2d80ef5d66872888259341f9bd76ca341b9725" + integrity sha512-LOBQdbr+7Ooi4cDGIq9SwmL/ynQ08Xrvp7F81uWvHLMKi5lOz30Jp6nBlBO/+cE3GkLXGfRhwRJTBBEaoQhy1g== dependencies: - "@material/dom" "=9.0.0-canary.1c156d69d.0" - "@material/mwc-base" "^0.20.0" - "@material/tab-scroller" "=9.0.0-canary.1c156d69d.0" - lit-element "^2.3.0" + "@material/dom" "=12.0.0-canary.1a8d06483.0" + "@material/mwc-base" "0.22.0-canary.cc04657a.0" + "@material/tab-scroller" "=12.0.0-canary.1a8d06483.0" + lit-element "^2.5.0" tslib "^2.0.1" -"@material/mwc-tab@^0.20.0": - version "0.20.0" - resolved "https://registry.yarnpkg.com/@material/mwc-tab/-/mwc-tab-0.20.0.tgz#a3445601dab27880e568dc5706738a6517082838" - integrity sha512-zGHnns1Gj91sucs9GLyN9kSqstWmaKpqeQCAcu98B7D6rI4dZKYgudrwnUUZiu1xqrsWhZy2rSbe8tu075ENVQ== +"@material/mwc-tab@0.22.0-canary.cc04657a.0", "@material/mwc-tab@canary": + version "0.22.0-canary.cc04657a.0" + resolved "https://registry.yarnpkg.com/@material/mwc-tab/-/mwc-tab-0.22.0-canary.cc04657a.0.tgz#8d4491f55758f5ac4cbabc18c3f4f0de26fd687b" + integrity sha512-G3i5bCIqoz1yivFNdNcQMvbGX4B2X99Ayt+VbOpr0Mo3xGDqxZ1FXIEK6bLBcfLPO92kgaWlSyzMFkVS4Z/xxw== dependencies: - "@material/mwc-base" "^0.20.0" - "@material/mwc-ripple" "^0.20.0" - "@material/mwc-tab-indicator" "^0.20.0" - "@material/tab" "=9.0.0-canary.1c156d69d.0" - lit-element "^2.3.0" - lit-html "^1.1.2" + "@material/mwc-base" "0.22.0-canary.cc04657a.0" + "@material/mwc-ripple" "0.22.0-canary.cc04657a.0" + "@material/mwc-tab-indicator" "0.22.0-canary.cc04657a.0" + "@material/tab" "=12.0.0-canary.1a8d06483.0" + lit-element "^2.5.0" + lit-html "^1.4.0" tslib "^2.0.1" -"@material/progress-indicator@9.0.0-canary.1c156d69d.0": - version "9.0.0-canary.1c156d69d.0" - resolved "https://registry.yarnpkg.com/@material/progress-indicator/-/progress-indicator-9.0.0-canary.1c156d69d.0.tgz#2a43d2c1442909874c5990b7ae893aced071a83d" - integrity sha512-56lYRqnUcI4L9a/LgfmzDTCKxxW1oOFqIVn3pMCP8hVGslhXY+yGl24qIp13MDW6FBgzx5rf66zB1rQltcSp/g== +"@material/progress-indicator@12.0.0-canary.1a8d06483.0": + version "12.0.0-canary.1a8d06483.0" + resolved "https://registry.yarnpkg.com/@material/progress-indicator/-/progress-indicator-12.0.0-canary.1a8d06483.0.tgz#336bde0bfb38c40a1b3f3472fc15be2ee6a35afa" + integrity sha512-/X9x7lEh5iTBsc6JHwzx/jgVoHoAxZVq5Fh5zf0Y0QwOUSu6rxUVCQCRz1ylcsRvmKO5BnJpzeHkRGKZDKImMg== dependencies: - tslib "^1.9.3" + tslib "^2.1.0" -"@material/radio@=9.0.0-canary.1c156d69d.0": - version "9.0.0-canary.1c156d69d.0" - resolved "https://registry.yarnpkg.com/@material/radio/-/radio-9.0.0-canary.1c156d69d.0.tgz#f0db2c1da9106a7a3888ed382da31b16fe78d1fc" - integrity sha512-i2pDFRhvk8bWp8BBJ0dyuGCqP17FlKSHzGqYQNI80dRPVYyLiexqIRfn0KGcW/sJtVC/P4GlyhE98g4mNYA/iQ== +"@material/radio@=12.0.0-canary.1a8d06483.0": + version "12.0.0-canary.1a8d06483.0" + resolved "https://registry.yarnpkg.com/@material/radio/-/radio-12.0.0-canary.1a8d06483.0.tgz#9b2aab58db5ce6f95db385139ffff2295c70d37e" + integrity sha512-j7Af+eoO7HMlnSlnRf7D4LEBVc4s2HPcRxFNrZ87POPRYaKlFGa+1TTqn0E9m6dRMB3AA0FCfJk7dLZKE6wlJA== dependencies: - "@material/animation" "9.0.0-canary.1c156d69d.0" - "@material/base" "9.0.0-canary.1c156d69d.0" - "@material/density" "9.0.0-canary.1c156d69d.0" - "@material/dom" "9.0.0-canary.1c156d69d.0" - "@material/feature-targeting" "9.0.0-canary.1c156d69d.0" - "@material/ripple" "9.0.0-canary.1c156d69d.0" - "@material/theme" "9.0.0-canary.1c156d69d.0" - "@material/touch-target" "9.0.0-canary.1c156d69d.0" - tslib "^1.9.3" + "@material/animation" "12.0.0-canary.1a8d06483.0" + "@material/base" "12.0.0-canary.1a8d06483.0" + "@material/density" "12.0.0-canary.1a8d06483.0" + "@material/dom" "12.0.0-canary.1a8d06483.0" + "@material/feature-targeting" "12.0.0-canary.1a8d06483.0" + "@material/ripple" "12.0.0-canary.1a8d06483.0" + "@material/theme" "12.0.0-canary.1a8d06483.0" + "@material/touch-target" "12.0.0-canary.1a8d06483.0" + tslib "^2.1.0" -"@material/ripple@9.0.0-canary.1c156d69d.0", "@material/ripple@=9.0.0-canary.1c156d69d.0": - version "9.0.0-canary.1c156d69d.0" - resolved "https://registry.yarnpkg.com/@material/ripple/-/ripple-9.0.0-canary.1c156d69d.0.tgz#1cbfec1c94640140f6c1c0f43a3582a82dbc7671" - integrity sha512-F1e/LQmYHQFORM/C3hchmANnRwJCXlc7Cp7W+VGpvJdtdzYlTd8DKKcShuOozxUQOjutbNf+Ql8gpZIdYRQaoQ== +"@material/ripple@12.0.0-canary.1a8d06483.0", "@material/ripple@=12.0.0-canary.1a8d06483.0": + version "12.0.0-canary.1a8d06483.0" + resolved "https://registry.yarnpkg.com/@material/ripple/-/ripple-12.0.0-canary.1a8d06483.0.tgz#8d7f62f46b83e2533948f2b527266770dbd5f8ae" + integrity sha512-U2uIdgIGDfKueucPnxSmiGwiWYcrE97fOsykagxxiTH037VsSlfLB4gldIKB4vUftYgOlYY1j/2Zz4PWr1MfUg== dependencies: - "@material/animation" "9.0.0-canary.1c156d69d.0" - "@material/base" "9.0.0-canary.1c156d69d.0" - "@material/dom" "9.0.0-canary.1c156d69d.0" - "@material/feature-targeting" "9.0.0-canary.1c156d69d.0" - "@material/theme" "9.0.0-canary.1c156d69d.0" - tslib "^1.9.3" + "@material/animation" "12.0.0-canary.1a8d06483.0" + "@material/base" "12.0.0-canary.1a8d06483.0" + "@material/dom" "12.0.0-canary.1a8d06483.0" + "@material/feature-targeting" "12.0.0-canary.1a8d06483.0" + "@material/theme" "12.0.0-canary.1a8d06483.0" + tslib "^2.1.0" -"@material/rtl@9.0.0-canary.1c156d69d.0": - version "9.0.0-canary.1c156d69d.0" - resolved "https://registry.yarnpkg.com/@material/rtl/-/rtl-9.0.0-canary.1c156d69d.0.tgz#0ff1f89f95ea4c67f030e56ce3ffdbfefcea225b" - integrity sha512-ICx0trLFna0M1Ina/1Nat9aSiB64o7VMs8wyCcidX//n7qFDOb0AtU9h2IB+lvX/UmPZVsDAoaL8iVm6RAqygg== +"@material/rtl@12.0.0-canary.1a8d06483.0": + version "12.0.0-canary.1a8d06483.0" + resolved "https://registry.yarnpkg.com/@material/rtl/-/rtl-12.0.0-canary.1a8d06483.0.tgz#7c0a615ed2c4169b2f7bfa873b13e54ed80a1880" + integrity sha512-7GxyzdTs2aCc/fcN+J+EhlVVlFZHhVnCnYi9lQGY8ohaIB1OxMLIVCp399Gqu89/wLZC0xukwWCsiv5fhPOecA== dependencies: - "@material/theme" "9.0.0-canary.1c156d69d.0" + "@material/theme" "12.0.0-canary.1a8d06483.0" + tslib "^2.1.0" -"@material/shape@9.0.0-canary.1c156d69d.0", "@material/shape@=9.0.0-canary.1c156d69d.0": - version "9.0.0-canary.1c156d69d.0" - resolved "https://registry.yarnpkg.com/@material/shape/-/shape-9.0.0-canary.1c156d69d.0.tgz#6d42d7004ed09b4493abf3f732bb855d3c3996ed" - integrity sha512-3NPm+LNFfY4xsiwy/jo+kY3WIFDwlVyJhq+eimjZ9vpG7STBPyzi1LpiPKvsrk0rmvsy3M0c1alM8E+BQ5+UAg== +"@material/shape@12.0.0-canary.1a8d06483.0", "@material/shape@=12.0.0-canary.1a8d06483.0": + version "12.0.0-canary.1a8d06483.0" + resolved "https://registry.yarnpkg.com/@material/shape/-/shape-12.0.0-canary.1a8d06483.0.tgz#9b055b9ec771e5f315b0637606b81718e1f13d34" + integrity sha512-VT/DHUHOkaiZznZmKrjIuo0Rq7PyGaAzZyeN3bdJAHz3UXAYQdBUYUxu/PPwKzoIHHKKdfP7XuGpDEysGiNkDw== dependencies: - "@material/feature-targeting" "9.0.0-canary.1c156d69d.0" - "@material/rtl" "9.0.0-canary.1c156d69d.0" - "@material/theme" "9.0.0-canary.1c156d69d.0" + "@material/feature-targeting" "12.0.0-canary.1a8d06483.0" + "@material/rtl" "12.0.0-canary.1a8d06483.0" + "@material/theme" "12.0.0-canary.1a8d06483.0" + tslib "^2.1.0" -"@material/switch@=9.0.0-canary.1c156d69d.0": - version "9.0.0-canary.1c156d69d.0" - resolved "https://registry.yarnpkg.com/@material/switch/-/switch-9.0.0-canary.1c156d69d.0.tgz#e76b4ec213a7fc449a82534289f016ae60002465" - integrity sha512-jGMtsI+IdPORkiEKG56XdiN8/8G9JcIdDKExov3BwGn/d6fO+IXQnMbV6XY9aRq/+eI0eI2XXT+ggiyk1Jy0AQ== +"@material/switch@=12.0.0-canary.1a8d06483.0": + version "12.0.0-canary.1a8d06483.0" + resolved "https://registry.yarnpkg.com/@material/switch/-/switch-12.0.0-canary.1a8d06483.0.tgz#6ebd6ff0f5b4e4373da496b225eaacf423b983a6" + integrity sha512-pYCKMdu8L6zNePrAESkDUyCAjFMXrtk9WmkigzRkku9E0NEvm4ippajmpAX5zKUAS9OhllsZfVIP0TfyEYNGTA== dependencies: - "@material/animation" "9.0.0-canary.1c156d69d.0" - "@material/base" "9.0.0-canary.1c156d69d.0" - "@material/density" "9.0.0-canary.1c156d69d.0" - "@material/dom" "9.0.0-canary.1c156d69d.0" - "@material/elevation" "9.0.0-canary.1c156d69d.0" - "@material/feature-targeting" "9.0.0-canary.1c156d69d.0" - "@material/ripple" "9.0.0-canary.1c156d69d.0" - "@material/rtl" "9.0.0-canary.1c156d69d.0" - "@material/theme" "9.0.0-canary.1c156d69d.0" - tslib "^1.9.3" + "@material/animation" "12.0.0-canary.1a8d06483.0" + "@material/base" "12.0.0-canary.1a8d06483.0" + "@material/density" "12.0.0-canary.1a8d06483.0" + "@material/dom" "12.0.0-canary.1a8d06483.0" + "@material/elevation" "12.0.0-canary.1a8d06483.0" + "@material/feature-targeting" "12.0.0-canary.1a8d06483.0" + "@material/ripple" "12.0.0-canary.1a8d06483.0" + "@material/rtl" "12.0.0-canary.1a8d06483.0" + "@material/shape" "12.0.0-canary.1a8d06483.0" + "@material/theme" "12.0.0-canary.1a8d06483.0" + tslib "^2.1.0" -"@material/tab-bar@=9.0.0-canary.1c156d69d.0": - version "9.0.0-canary.1c156d69d.0" - resolved "https://registry.yarnpkg.com/@material/tab-bar/-/tab-bar-9.0.0-canary.1c156d69d.0.tgz#d3dc2ea7317410c4fb054b32d88dbbbdf9c34bb3" - integrity sha512-wtpMK37gxkpbpdTpQh3IlHXx/maUyiYiwRjioIeh3GFQ42ZXW/N/9Ou2HK+qpiGVZDREYyT9TS2U5DiZTmM7tA== +"@material/tab-bar@=12.0.0-canary.1a8d06483.0": + version "12.0.0-canary.1a8d06483.0" + resolved "https://registry.yarnpkg.com/@material/tab-bar/-/tab-bar-12.0.0-canary.1a8d06483.0.tgz#fb7e3089feaa22de95b8f6c4e34bb6c9e336400d" + integrity sha512-cWhOfT12glndFH+B4V2XeYtBvFvXWmrRjH+lxdeZ+sC12qC6JjryF9wAq7wbciq4m83KaoMwaG1A+ixL6RbcQg== dependencies: - "@material/animation" "9.0.0-canary.1c156d69d.0" - "@material/base" "9.0.0-canary.1c156d69d.0" - "@material/density" "9.0.0-canary.1c156d69d.0" - "@material/feature-targeting" "9.0.0-canary.1c156d69d.0" - "@material/tab" "9.0.0-canary.1c156d69d.0" - "@material/tab-scroller" "9.0.0-canary.1c156d69d.0" - tslib "^1.9.3" + "@material/animation" "12.0.0-canary.1a8d06483.0" + "@material/base" "12.0.0-canary.1a8d06483.0" + "@material/density" "12.0.0-canary.1a8d06483.0" + "@material/feature-targeting" "12.0.0-canary.1a8d06483.0" + "@material/tab" "12.0.0-canary.1a8d06483.0" + "@material/tab-scroller" "12.0.0-canary.1a8d06483.0" + tslib "^2.1.0" -"@material/tab-indicator@9.0.0-canary.1c156d69d.0", "@material/tab-indicator@=9.0.0-canary.1c156d69d.0": - version "9.0.0-canary.1c156d69d.0" - resolved "https://registry.yarnpkg.com/@material/tab-indicator/-/tab-indicator-9.0.0-canary.1c156d69d.0.tgz#428b53a25cf09de65e1f602f3784b6202844ad48" - integrity sha512-PglSDSuQY6irrTNpEK/n/MDkZh6nH+iw0H31vt2A7QrG+BPwXrVJeRi6b8y2lvEnoQFp5WK8VavhFDNhcibEtw== +"@material/tab-indicator@12.0.0-canary.1a8d06483.0", "@material/tab-indicator@=12.0.0-canary.1a8d06483.0": + version "12.0.0-canary.1a8d06483.0" + resolved "https://registry.yarnpkg.com/@material/tab-indicator/-/tab-indicator-12.0.0-canary.1a8d06483.0.tgz#7765bf234f040b58a9022174c5f857657b1f4b9d" + integrity sha512-tGNP7DnPOiQ8R8Zc6E5DmRZONvhOZOyCo1vzt6uIA9noeFW0gDnNUyw1T7znA8FDJsNKu1R9HTcqym7WurcZFQ== dependencies: - "@material/animation" "9.0.0-canary.1c156d69d.0" - "@material/base" "9.0.0-canary.1c156d69d.0" - "@material/feature-targeting" "9.0.0-canary.1c156d69d.0" - "@material/theme" "9.0.0-canary.1c156d69d.0" - tslib "^1.9.3" + "@material/animation" "12.0.0-canary.1a8d06483.0" + "@material/base" "12.0.0-canary.1a8d06483.0" + "@material/feature-targeting" "12.0.0-canary.1a8d06483.0" + "@material/theme" "12.0.0-canary.1a8d06483.0" + tslib "^2.1.0" -"@material/tab-scroller@9.0.0-canary.1c156d69d.0", "@material/tab-scroller@=9.0.0-canary.1c156d69d.0": - version "9.0.0-canary.1c156d69d.0" - resolved "https://registry.yarnpkg.com/@material/tab-scroller/-/tab-scroller-9.0.0-canary.1c156d69d.0.tgz#f65267f3af811af3e7b1a7716a4b4a3cd64571ae" - integrity sha512-27h/vQv3+qh3YXPSTw/nakkWxgzDXMv3+ZBw+/XAwxu1siRb6EFBzsfLkQGpjVLm2DCPH3Dz4Xq8DOUkAyvd1A== +"@material/tab-scroller@12.0.0-canary.1a8d06483.0", "@material/tab-scroller@=12.0.0-canary.1a8d06483.0": + version "12.0.0-canary.1a8d06483.0" + resolved "https://registry.yarnpkg.com/@material/tab-scroller/-/tab-scroller-12.0.0-canary.1a8d06483.0.tgz#8fc58334342624b23a6094f9376312141742a750" + integrity sha512-tfvtGqFKe8vnd/6a41mxwR7Nl7b8QbcrJPDUmSVBDnZEg2VZ0+svs+w3OdECwen2ivnEvVIfFdESAzG4D8eI6g== dependencies: - "@material/animation" "9.0.0-canary.1c156d69d.0" - "@material/base" "9.0.0-canary.1c156d69d.0" - "@material/dom" "9.0.0-canary.1c156d69d.0" - "@material/feature-targeting" "9.0.0-canary.1c156d69d.0" - "@material/tab" "9.0.0-canary.1c156d69d.0" - tslib "^1.9.3" + "@material/animation" "12.0.0-canary.1a8d06483.0" + "@material/base" "12.0.0-canary.1a8d06483.0" + "@material/dom" "12.0.0-canary.1a8d06483.0" + "@material/feature-targeting" "12.0.0-canary.1a8d06483.0" + "@material/tab" "12.0.0-canary.1a8d06483.0" + tslib "^2.1.0" -"@material/tab@9.0.0-canary.1c156d69d.0", "@material/tab@=9.0.0-canary.1c156d69d.0": - version "9.0.0-canary.1c156d69d.0" - resolved "https://registry.yarnpkg.com/@material/tab/-/tab-9.0.0-canary.1c156d69d.0.tgz#eef68160458a4d55b28e96f14b0077a6dd69e88d" - integrity sha512-gS93t8Yl+djgWA8bFU80amzj2auGg/H3muVIJ1Mncak0CUtX3u6dYyvdKbeecRT9F1Wr4J3L8E0/aQatBOGa1w== +"@material/tab@12.0.0-canary.1a8d06483.0", "@material/tab@=12.0.0-canary.1a8d06483.0": + version "12.0.0-canary.1a8d06483.0" + resolved "https://registry.yarnpkg.com/@material/tab/-/tab-12.0.0-canary.1a8d06483.0.tgz#c901edf4fa9d1c0dd6f26a9c326af9fe13759534" + integrity sha512-HR6+Q4Gi9/Wz/A1D6CAIR+6fRDXDvp3JOTsjRBoXonsGKHQmuB+jI3DaTEQ7gDsWa2k4OAC5/wBn+omEDFMQNQ== dependencies: - "@material/base" "9.0.0-canary.1c156d69d.0" - "@material/feature-targeting" "9.0.0-canary.1c156d69d.0" - "@material/ripple" "9.0.0-canary.1c156d69d.0" - "@material/rtl" "9.0.0-canary.1c156d69d.0" - "@material/tab-indicator" "9.0.0-canary.1c156d69d.0" - "@material/theme" "9.0.0-canary.1c156d69d.0" - "@material/typography" "9.0.0-canary.1c156d69d.0" - tslib "^1.9.3" + "@material/base" "12.0.0-canary.1a8d06483.0" + "@material/feature-targeting" "12.0.0-canary.1a8d06483.0" + "@material/ripple" "12.0.0-canary.1a8d06483.0" + "@material/rtl" "12.0.0-canary.1a8d06483.0" + "@material/tab-indicator" "12.0.0-canary.1a8d06483.0" + "@material/theme" "12.0.0-canary.1a8d06483.0" + "@material/typography" "12.0.0-canary.1a8d06483.0" + tslib "^2.1.0" -"@material/theme@9.0.0-canary.1c156d69d.0", "@material/theme@=9.0.0-canary.1c156d69d.0": - version "9.0.0-canary.1c156d69d.0" - resolved "https://registry.yarnpkg.com/@material/theme/-/theme-9.0.0-canary.1c156d69d.0.tgz#2d733dea8f762cc8e35969915dfb3b7359147d1e" - integrity sha512-r1610TPwUplt4FHMk7cR06Oz1jU/G31wBIh4Frs/YIB0ZonVlI5cZdIkG0IFtNt9ZYWoDwfP/1nQBxdqrDPPhg== +"@material/theme@12.0.0-canary.1a8d06483.0", "@material/theme@=12.0.0-canary.1a8d06483.0": + version "12.0.0-canary.1a8d06483.0" + resolved "https://registry.yarnpkg.com/@material/theme/-/theme-12.0.0-canary.1a8d06483.0.tgz#0cb281b26a1147ef0322d21ce750f4a0f792d880" + integrity sha512-Llc8UnCcE3UbCrJyNLTVXradY9zoddJgH1cB3bzx/j7gIeoJnqXqZB43Zg+ZMXVzoOyGTbYrqpi5Kl1VzOxJSQ== dependencies: - "@material/feature-targeting" "9.0.0-canary.1c156d69d.0" + "@material/feature-targeting" "12.0.0-canary.1a8d06483.0" + tslib "^2.1.0" -"@material/top-app-bar@=9.0.0-canary.1c156d69d.0": - version "9.0.0-canary.1c156d69d.0" - resolved "https://registry.yarnpkg.com/@material/top-app-bar/-/top-app-bar-9.0.0-canary.1c156d69d.0.tgz#6b5c76a9cfd2abae35f45b74eb17c917db74d70d" - integrity sha512-VJLGCF+1vsLY/YFPVgcFCIEG/EjuY7eg7ulBwhwbERIl3pyyY3NAvISGzaeUBKg6JOcw0YqcPKcRnv+Js3KchQ== +"@material/top-app-bar@=12.0.0-canary.1a8d06483.0": + version "12.0.0-canary.1a8d06483.0" + resolved "https://registry.yarnpkg.com/@material/top-app-bar/-/top-app-bar-12.0.0-canary.1a8d06483.0.tgz#7164e244ee41b804660847f1387230b158cd46e1" + integrity sha512-+vDujMPtrCSKMs+6q3TxnpG0sAm/snAL14zrReTLTVwr0QEPh5V/gJ51vRZ/Fubr0ssDxc+g3Jw6MtGkN9hrng== dependencies: - "@material/animation" "9.0.0-canary.1c156d69d.0" - "@material/base" "9.0.0-canary.1c156d69d.0" - "@material/elevation" "9.0.0-canary.1c156d69d.0" - "@material/ripple" "9.0.0-canary.1c156d69d.0" - "@material/rtl" "9.0.0-canary.1c156d69d.0" - "@material/shape" "9.0.0-canary.1c156d69d.0" - "@material/theme" "9.0.0-canary.1c156d69d.0" - "@material/typography" "9.0.0-canary.1c156d69d.0" - tslib "^1.9.3" + "@material/animation" "12.0.0-canary.1a8d06483.0" + "@material/base" "12.0.0-canary.1a8d06483.0" + "@material/elevation" "12.0.0-canary.1a8d06483.0" + "@material/ripple" "12.0.0-canary.1a8d06483.0" + "@material/rtl" "12.0.0-canary.1a8d06483.0" + "@material/shape" "12.0.0-canary.1a8d06483.0" + "@material/theme" "12.0.0-canary.1a8d06483.0" + "@material/typography" "12.0.0-canary.1a8d06483.0" + tslib "^2.1.0" -"@material/touch-target@9.0.0-canary.1c156d69d.0": - version "9.0.0-canary.1c156d69d.0" - resolved "https://registry.yarnpkg.com/@material/touch-target/-/touch-target-9.0.0-canary.1c156d69d.0.tgz#e2839c73f6df724804c376624af776f32be2c81a" - integrity sha512-AFymS9cb152a2hEwTc80dVKA0ccNCyMAQNpvB6fEopPMLjO4Hrsu4fIHVyZF5xnz3k/iG59Y6vreHQdHKFGyUw== +"@material/touch-target@12.0.0-canary.1a8d06483.0": + version "12.0.0-canary.1a8d06483.0" + resolved "https://registry.yarnpkg.com/@material/touch-target/-/touch-target-12.0.0-canary.1a8d06483.0.tgz#18ae321c2c6a14bc3bf7c7966f2413a942ef28cb" + integrity sha512-JiEIJVzTEwKxh87/noFXsOmF2uWUPinJc0Hhf/BIZrxQk0Gi0MJWwZ5p4gcfv3Z8sC+DjZXd7BImdDhBV2oZJw== dependencies: - "@material/base" "9.0.0-canary.1c156d69d.0" - "@material/feature-targeting" "9.0.0-canary.1c156d69d.0" + "@material/base" "12.0.0-canary.1a8d06483.0" + "@material/feature-targeting" "12.0.0-canary.1a8d06483.0" + tslib "^2.1.0" -"@material/typography@9.0.0-canary.1c156d69d.0": - version "9.0.0-canary.1c156d69d.0" - resolved "https://registry.yarnpkg.com/@material/typography/-/typography-9.0.0-canary.1c156d69d.0.tgz#340328147eaa86efacfad601b6dbdff7ac0388ac" - integrity sha512-+JgMe2fIP+lVh4l5qXfjH9/JWd+LnfDEiVr2clWHgAc3pc2LQm6VVgUbNkrX3yeWql0x7I/inGfQovza8BeYAw== +"@material/typography@12.0.0-canary.1a8d06483.0": + version "12.0.0-canary.1a8d06483.0" + resolved "https://registry.yarnpkg.com/@material/typography/-/typography-12.0.0-canary.1a8d06483.0.tgz#df337ca915f505ba6607fb239387b5358a933625" + integrity sha512-RGxiA4FEvdO3PQ8xmSaKGvOHmm7WNCjl9rizHembV6tS2rc3CvMiHpQgIyHMGv7WXBcu7Aa9V48S2vXJa0fkmg== dependencies: - "@material/feature-targeting" "9.0.0-canary.1c156d69d.0" - "@material/theme" "9.0.0-canary.1c156d69d.0" + "@material/feature-targeting" "12.0.0-canary.1a8d06483.0" + "@material/theme" "12.0.0-canary.1a8d06483.0" + tslib "^2.1.0" "@mdi/js@5.9.55": version "5.9.55" @@ -2880,6 +2921,11 @@ resolved "https://registry.yarnpkg.com/@types/sortablejs/-/sortablejs-1.10.6.tgz#98725ae08f1dfe28b8da0fdf302c417f5ff043c0" integrity sha512-QRz8Z+uw2Y4Gwrtxw8hD782zzuxxugdcq8X/FkPsXUa1kfslhGzy13+4HugO9FXNo+jlWVcE6DYmmegniIQ30A== +"@types/trusted-types@^1.0.1": + version "1.0.6" + resolved "https://registry.yarnpkg.com/@types/trusted-types/-/trusted-types-1.0.6.tgz#569b8a08121d3203398290d602d84d73c8dcf5da" + integrity sha512-230RC8sFeHoT6sSUlRO6a8cAnclO06eeiq1QDfiv2FGCLWFvvERWgwIQD4FWqD9A69BN7Lzee4OXwoMVnnsWDw== + "@types/webspeechapi@^0.0.29": version "0.0.29" resolved "https://registry.yarnpkg.com/@types/webspeechapi/-/webspeechapi-0.0.29.tgz#8f3c6b31b779df7a9bbac7f89acfce0c3bcb1972" @@ -8660,28 +8706,29 @@ lit-analyzer@1.2.1, lit-analyzer@^1.2.1: vscode-html-languageservice "3.1.0" web-component-analyzer "~1.1.1" -lit-element@2.5.1, lit-element@^2.0.0, lit-element@^2.2.1, lit-element@^2.3.0: - version "2.5.1" - resolved "https://registry.yarnpkg.com/lit-element/-/lit-element-2.5.1.tgz#3fa74b121a6cd22902409ae3859b7847d01aa6b6" - integrity sha512-ogu7PiJTA33bEK0xGu1dmaX5vhcRjBXCFexPja0e7P7jqLhTpNKYRPmE+GmiCaRVAbiQKGkUgkh/i6+bh++dPQ== +lit-element@3.0.0-rc.2, lit-element@^2.2.1, lit-element@^2.5.0, lit-element@^3.0.0-rc.2: + version "3.0.0-rc.2" + resolved "https://registry.yarnpkg.com/lit-element/-/lit-element-3.0.0-rc.2.tgz#883d0b6fd7b846226d360699d1b713da5fc7e1b7" + integrity sha512-2Z7DabJ3b5K+p5073vFjMODoaWqy5PIaI4y6ADKm+fCGc8OnX9fU9dMoUEBZjFpd/bEFR9PBp050tUtBnT9XTQ== dependencies: - lit-html "^1.1.1" + "@lit/reactive-element" "^1.0.0-rc.2" + lit-html "^2.0.0-rc.3" -lit-html@1.4.1, lit-html@^1.0.0, lit-html@^1.1.1, lit-html@^1.1.2: - version "1.4.1" - resolved "https://registry.yarnpkg.com/lit-html/-/lit-html-1.4.1.tgz#0c6f3ee4ad4eb610a49831787f0478ad8e9ae5e0" - integrity sha512-B9btcSgPYb1q4oSOb/PrOT6Z/H+r6xuNzfH4lFli/AWhYwdtrgQkQWBbIc6mdnf6E2IL3gDXdkkqNktpU0OZQA== - -lit-virtualizer@^0.4.2: - version "0.4.2" - resolved "https://registry.yarnpkg.com/lit-virtualizer/-/lit-virtualizer-0.4.2.tgz#8c66e26c0e50cd8e3fc7f2dfeab932967b40050a" - integrity sha512-aytx/Qym8h7eIh3u17oT2FfgmhOixnk4IuJAOMIbA6E8szkbpnKUDSLDWlN9ihQyCb0eijV213P+4mlekOWKxA== +lit-html@2.0.0-rc.3, lit-html@^1.4.0, lit-html@^2.0.0-rc.3: + version "2.0.0-rc.3" + resolved "https://registry.yarnpkg.com/lit-html/-/lit-html-2.0.0-rc.3.tgz#1c216e548630e18d3093d97f4e29563abce659af" + integrity sha512-Y6P8LlAyQuqvzq6l/Nc4z5/P5M/rVLYKQIRxcNwSuGajK0g4kbcBFQqZmgvqKG+ak+dHZjfm2HUw9TF5N/pkCw== dependencies: - event-target-shim "^5.0.1" - lit-element "^2.0.0" - lit-html "^1.0.0" - resize-observer-polyfill "^1.5.1" - tslib "^1.10.0" + "@types/trusted-types" "^1.0.1" + +lit@^2.0.0-rc.1, lit@^2.0.0-rc.2: + version "2.0.0-rc.2" + resolved "https://registry.yarnpkg.com/lit/-/lit-2.0.0-rc.2.tgz#724a2d621aa098001d73bf7106f3a72b7b5948ef" + integrity sha512-BOCuoJR04WaTV8UqTKk09cNcQA10Aq2LCcBOiHuF7TzWH5RNDsbCBP5QM9sLBSotGTXbDug/gFO08jq6TbyEtw== + dependencies: + "@lit/reactive-element" "^1.0.0-rc.2" + lit-element "^3.0.0-rc.2" + lit-html "^2.0.0-rc.3" load-bmfont@^1.3.1: version "1.4.0" @@ -12503,7 +12550,7 @@ tsconfig-paths@^3.9.0: minimist "^1.2.0" strip-bom "^3.0.0" -tslib@^1.10.0, tslib@^1.8.1, tslib@^1.9.0, tslib@^1.9.3: +tslib@^1.10.0, tslib@^1.8.1, tslib@^1.9.0: version "1.10.0" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.10.0.tgz#c3c19f95973fb0a62973fb09d90d961ee43e5c8a" integrity sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ==