extra-map-card 1.7.1 → 1.7.3-beta.0

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.
@@ -14,8 +14,8 @@ declare global {
14
14
  };
15
15
  }
16
16
  }
17
- export type HaEntityPickerEntityFilterFunc = (entity: HassEntity) => boolean;
18
- export declare class EmcEntityEditor extends LitElement {
17
+ type HaEntityPickerEntityFilterFunc = (entity: HassEntity) => boolean;
18
+ declare class EmcEntityEditor extends LitElement {
19
19
  hass?: HomeAssistant;
20
20
  entities?: MapEntityConfig[];
21
21
  entityFilter?: HaEntityPickerEntityFilterFunc;
@@ -33,3 +33,4 @@ declare global {
33
33
  'emc-entity-editor': EmcEntityEditor;
34
34
  }
35
35
  }
36
+ export {};
@@ -0,0 +1,23 @@
1
+ import { HomeAssistant } from '@types';
2
+ import { LitElement } from 'lit';
3
+ declare class EmcHistoryRangeButtons extends LitElement {
4
+ hass: HomeAssistant;
5
+ hoursToShow: number | null;
6
+ connectedCallback(): void;
7
+ disconnectedCallback(): void;
8
+ protected firstUpdated(): Promise<void>;
9
+ protected render(): import("lit-html").TemplateResult<1>;
10
+ private _onHoursToShowChanged;
11
+ static get styles(): import("lit").CSSResult[];
12
+ }
13
+ declare global {
14
+ interface HASSDomEvents {
15
+ 'hours-to-show-changed': {
16
+ value: number | null;
17
+ };
18
+ }
19
+ interface HTMLElementTagNameMap {
20
+ 'emc-history-range-buttons': EmcHistoryRangeButtons;
21
+ }
22
+ }
23
+ export {};
@@ -1,6 +1,7 @@
1
1
  import { HomeAssistant, HaMapEntity, HaMapPaths, ThemeMode } from '@types';
2
2
  import { LitElement, PropertyValues, CSSResultGroup } from 'lit';
3
3
  import '../components/emc-entity-marker';
4
+ import '../components/emc-history-range-buttons';
4
5
  export declare class EmcMap extends LitElement {
5
6
  hass: HomeAssistant;
6
7
  entities?: string[] | HaMapEntity[];
@@ -12,6 +13,8 @@ export declare class EmcMap extends LitElement {
12
13
  private apiKey;
13
14
  private useMoreInfo;
14
15
  private customStyles;
16
+ private hoursToShow;
17
+ historySelector: boolean;
15
18
  _darkStyle: boolean;
16
19
  private _map?;
17
20
  private _mapItems;
@@ -19,7 +22,6 @@ export declare class EmcMap extends LitElement {
19
22
  private _zoneItems;
20
23
  private _mapFocusZones;
21
24
  private _mapPaths;
22
- private _mapHelper;
23
25
  private _fitBounds;
24
26
  private _clusters?;
25
27
  private _circleLoaded;
@@ -6,7 +6,7 @@ declare global {
6
6
  'go-back': undefined;
7
7
  }
8
8
  }
9
- export declare class EmcSubEntityEditor extends LitElement {
9
+ declare class EmcSubEntityEditor extends LitElement {
10
10
  hass?: HomeAssistant;
11
11
  config: SubEntityEditorConfig;
12
12
  private _rgbColor;
@@ -25,3 +25,4 @@ declare global {
25
25
  'emc-sub-entity-editor': EmcSubEntityEditor;
26
26
  }
27
27
  }
28
+ export {};
@@ -2,3 +2,4 @@ export * from './emc-entity-editor';
2
2
  export * from './emc-sub-entity-editor';
3
3
  export * from './emc-map';
4
4
  export * from './emc-entity-marker';
5
+ export * from './emc-history-range-buttons';
@@ -2,138 +2,6 @@ import { LocalizeFunc } from '@types';
2
2
  export declare const CARD_VERSION: string;
3
3
  export declare const DEFAULT_HOURS_TO_SHOW = 0;
4
4
  export declare const DEFAULT_ZOOM = 14;
5
- export declare const singleMapConfingSchema: import("memoize-one").MemoizedFn<(localize: LocalizeFunc) => readonly [{
6
- readonly type: "expandable";
7
- readonly iconPath: string;
8
- readonly title: string;
9
- readonly schema: readonly [{
10
- readonly name: "";
11
- readonly type: "grid";
12
- readonly schema: readonly ({
13
- name: "auto_fit" | "fit_zones" | "use_more_info";
14
- label: string;
15
- default: boolean;
16
- selector: {
17
- boolean: {};
18
- };
19
- } | {
20
- name: string;
21
- label: string;
22
- selector: {
23
- text: {};
24
- number?: undefined;
25
- };
26
- default?: undefined;
27
- } | {
28
- name: string;
29
- label: string;
30
- default: number;
31
- selector: {
32
- number: {
33
- mode: string;
34
- min: number;
35
- };
36
- text?: undefined;
37
- };
38
- })[];
39
- }, {
40
- readonly title: "Custom Hours to Show";
41
- readonly type: "expandable";
42
- readonly icon: "mdi:history";
43
- readonly flatten: true;
44
- readonly schema: readonly [{
45
- readonly name: "hours_to_show";
46
- readonly label: "Hours to Show";
47
- readonly default: 0;
48
- readonly required: false;
49
- readonly selector: {
50
- readonly number: {
51
- readonly mode: "box";
52
- readonly min: 0;
53
- };
54
- };
55
- }, {
56
- readonly name: "history_period";
57
- readonly label: "History Period";
58
- readonly required: false;
59
- readonly helper: "Time period to show, from now backwards (e.g., today = since midnight, yesterday = last 24 hours)";
60
- readonly selector: {
61
- readonly select: {
62
- readonly mode: "dropdown";
63
- readonly options: {
64
- value: "today" | "yesterday";
65
- label: string;
66
- }[];
67
- };
68
- };
69
- }, {
70
- readonly name: "hours_to_show_template";
71
- readonly label: "Hours to Show Template";
72
- readonly required: false;
73
- readonly helper: "Jinja2 template that defines the number of hours to show";
74
- readonly selector: {
75
- readonly template: {};
76
- };
77
- }];
78
- }, ...{
79
- title: string;
80
- type: string;
81
- icon: string;
82
- schema: ({
83
- name: string;
84
- label: string;
85
- default: string;
86
- selector: {
87
- select: {
88
- mode: string;
89
- options: {
90
- value: "auto" | "light" | "dark";
91
- label: string;
92
- }[];
93
- };
94
- };
95
- type?: undefined;
96
- schema?: undefined;
97
- } | {
98
- type: string;
99
- name: string;
100
- schema: {
101
- name: "light" | "dark";
102
- label: string;
103
- selector: {
104
- select: {
105
- mode: string;
106
- options: {
107
- value: "BACKDROP" | "BACKDROP.DARK" | "BACKDROP.LIGHT" | "BASIC" | "BASIC.DARK" | "BASIC.LIGHT" | "BRIGHT" | "BRIGHT.DARK" | "BRIGHT.LIGHT" | "BRIGHT.PASTEL" | "DATAVIZ" | "DATAVIZ.DARK" | "DATAVIZ.LIGHT" | "HYBRID" | "OPENSTREETMAP" | "OUTDOOR" | "SATELLITE" | "STREETS" | "STREETS.DARK" | "STREETS.LIGHT" | "STREETS.PASTEL" | "TONER" | "TONER.BACKGROUND" | "TONER.LINES" | "TONER.LITE" | "TOPO" | "TOPO.PASTEL" | "TOPO.SHINY" | "TOPO.TOPOGRAPHIQUE" | "VOYAGER" | "VOYAGER.DARK" | "VOYAGER.LIGHT" | "VOYAGER.VINTAGE" | "WINTER";
108
- label: "BACKDROP" | "BACKDROP.DARK" | "BACKDROP.LIGHT" | "BASIC" | "BASIC.DARK" | "BASIC.LIGHT" | "BRIGHT" | "BRIGHT.DARK" | "BRIGHT.LIGHT" | "BRIGHT.PASTEL" | "DATAVIZ" | "DATAVIZ.DARK" | "DATAVIZ.LIGHT" | "HYBRID" | "OPENSTREETMAP" | "OUTDOOR" | "SATELLITE" | "STREETS" | "STREETS.DARK" | "STREETS.LIGHT" | "STREETS.PASTEL" | "TONER" | "TONER.BACKGROUND" | "TONER.LINES" | "TONER.LITE" | "TOPO" | "TOPO.PASTEL" | "TOPO.SHINY" | "TOPO.TOPOGRAPHIQUE" | "VOYAGER" | "VOYAGER.DARK" | "VOYAGER.LIGHT" | "VOYAGER.VINTAGE" | "WINTER";
109
- }[];
110
- };
111
- };
112
- }[];
113
- label?: undefined;
114
- default?: undefined;
115
- selector?: undefined;
116
- })[];
117
- }[]];
118
- }]>;
119
- export declare const baseMapConfigSchema: import("memoize-one").MemoizedFn<() => readonly [{
120
- readonly name: "title";
121
- readonly label: "Title";
122
- readonly selector: {
123
- readonly text: {
124
- readonly type: "text";
125
- };
126
- };
127
- }, {
128
- readonly name: "api_key";
129
- readonly label: "MapTiler API Key (required)";
130
- readonly required: true;
131
- readonly selector: {
132
- readonly text: {
133
- readonly type: "text";
134
- };
135
- };
136
- }]>;
137
5
  export declare const mapConfigSchema: import("memoize-one").MemoizedFn<(localize: LocalizeFunc, noTitle?: boolean) => ({
138
6
  readonly type: "expandable";
139
7
  readonly iconPath: string;
@@ -142,7 +10,7 @@ export declare const mapConfigSchema: import("memoize-one").MemoizedFn<(localize
142
10
  readonly name: "";
143
11
  readonly type: "grid";
144
12
  readonly schema: readonly ({
145
- name: "auto_fit" | "fit_zones" | "use_more_info";
13
+ name: "auto_fit" | "fit_zones" | "use_more_info" | "show_history_control";
146
14
  label: string;
147
15
  default: boolean;
148
16
  selector: {
@@ -198,14 +66,6 @@ export declare const mapConfigSchema: import("memoize-one").MemoizedFn<(localize
198
66
  }[];
199
67
  };
200
68
  };
201
- }, {
202
- readonly name: "hours_to_show_template";
203
- readonly label: "Hours to Show Template";
204
- readonly required: false;
205
- readonly helper: "Jinja2 template that defines the number of hours to show";
206
- readonly selector: {
207
- readonly template: {};
208
- };
209
69
  }];
210
70
  }, ...{
211
71
  title: string;