extra-map-card 1.2.14 → 1.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/emc-entity-editor.d.ts +35 -0
- package/dist/components/emc-sub-entity-editor.d.ts +27 -0
- package/dist/extra-map-card-bundle.js +184 -20
- package/dist/extra-map-editor.d.ts +11 -2
- package/dist/index.d.ts +2 -0
- package/dist/index.js +184 -20
- package/dist/types/config.d.ts +9 -0
- package/package.json +3 -2
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { HomeAssistant, MapEntityConfig } from '@types';
|
|
2
|
+
import { HassEntity } from 'home-assistant-js-websocket';
|
|
3
|
+
import { LitElement, nothing } from 'lit';
|
|
4
|
+
declare global {
|
|
5
|
+
interface HASSDomEvents {
|
|
6
|
+
'entities-changed': {
|
|
7
|
+
entities: MapEntityConfig[];
|
|
8
|
+
};
|
|
9
|
+
'edit-detail-entity': {
|
|
10
|
+
subEntityConfig: {
|
|
11
|
+
index: number;
|
|
12
|
+
elementConfig: MapEntityConfig;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
export type HaEntityPickerEntityFilterFunc = (entity: HassEntity) => boolean;
|
|
18
|
+
export declare class EmcEntityEditor extends LitElement {
|
|
19
|
+
hass?: HomeAssistant;
|
|
20
|
+
entities?: MapEntityConfig[];
|
|
21
|
+
entityFilter?: HaEntityPickerEntityFilterFunc;
|
|
22
|
+
label?: string;
|
|
23
|
+
protected render(): typeof nothing | import("lit-html").TemplateResult<1>;
|
|
24
|
+
private _addEntity;
|
|
25
|
+
private _itemMoved;
|
|
26
|
+
private _removeItem;
|
|
27
|
+
private _valueChanged;
|
|
28
|
+
private _editItem;
|
|
29
|
+
static styles: import("lit").CSSResult;
|
|
30
|
+
}
|
|
31
|
+
declare global {
|
|
32
|
+
interface HTMLElementTagNameMap {
|
|
33
|
+
'emc-entity-editor': EmcEntityEditor;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { HomeAssistant, SubEntityEditorConfig } from '@types';
|
|
2
|
+
import { LitElement } from 'lit';
|
|
3
|
+
import type { TemplateResult } from 'lit';
|
|
4
|
+
declare global {
|
|
5
|
+
interface HASSDomEvents {
|
|
6
|
+
'go-back': undefined;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
export declare class EmcSubEntityEditor extends LitElement {
|
|
10
|
+
hass?: HomeAssistant;
|
|
11
|
+
config: SubEntityEditorConfig;
|
|
12
|
+
private _rgbColor;
|
|
13
|
+
protected firstUpdated(): void;
|
|
14
|
+
protected render(): TemplateResult;
|
|
15
|
+
private _renderContent;
|
|
16
|
+
private _goBack;
|
|
17
|
+
private _computeLabel;
|
|
18
|
+
private _colorToRgb;
|
|
19
|
+
private _colorChanged;
|
|
20
|
+
private _valueChanged;
|
|
21
|
+
static styles: import("lit").CSSResult;
|
|
22
|
+
}
|
|
23
|
+
declare global {
|
|
24
|
+
interface HTMLElementTagNameMap {
|
|
25
|
+
'emc-sub-entity-editor': EmcSubEntityEditor;
|
|
26
|
+
}
|
|
27
|
+
}
|