Use SWC for typescript, update to Lit 3, migrate decorators (#25150)

Co-authored-by: Wendelin <w@pe8.at>
This commit is contained in:
Bram Kragten
2025-04-24 14:10:35 +02:00
committed by GitHub
parent c40bf8f3cd
commit e156dd36f4
241 changed files with 1676 additions and 1388 deletions

View File

@@ -1,4 +1,3 @@
import "@material/mwc-list/mwc-list";
import { mdiFilterVariantRemove } from "@mdi/js";
import type { CSSResultGroup } from "lit";
import { css, html, LitElement, nothing } from "lit";
@@ -11,10 +10,11 @@ import type { IntegrationManifest } from "../data/integration";
import { fetchIntegrationManifests } from "../data/integration";
import { haStyleScrollbar } from "../resources/styles";
import type { HomeAssistant } from "../types";
import "./ha-domain-icon";
import "./search-input-outlined";
import "./ha-expansion-panel";
import "./ha-check-list-item";
import "./ha-domain-icon";
import "./ha-expansion-panel";
import "./ha-list";
import "./search-input-outlined";
@customElement("ha-filter-integrations")
export class HaFilterIntegrations extends LitElement {
@@ -57,7 +57,7 @@ export class HaFilterIntegrations extends LitElement {
@value-changed=${this._handleSearchChange}
>
</search-input-outlined>
<mwc-list
<ha-list
class="ha-scrollbar"
@click=${this._handleItemClick}
multi
@@ -82,7 +82,7 @@ export class HaFilterIntegrations extends LitElement {
${integration.name || integration.domain}
</ha-check-list-item>`
)}
</mwc-list> `
</ha-list> `
: nothing}
</ha-expansion-panel>
`;
@@ -92,7 +92,7 @@ export class HaFilterIntegrations extends LitElement {
if (changed.has("expanded") && this.expanded) {
setTimeout(() => {
if (!this.expanded) return;
this.renderRoot.querySelector("mwc-list")!.style.height =
this.renderRoot.querySelector("ha-list")!.style.height =
`${this.clientHeight - 49 - 32}px`; // 32px is the height of the search input
}, 300);
}