extra-map-card 1.6.2 → 1.7.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.
@@ -20,7 +20,7 @@ export declare class EmcEntityEditor extends LitElement {
20
20
  entities?: MapEntityConfig[];
21
21
  entityFilter?: HaEntityPickerEntityFilterFunc;
22
22
  label?: string;
23
- protected render(): typeof nothing | import("lit-html").TemplateResult<1>;
23
+ protected render(): import("lit-html").TemplateResult<1> | typeof nothing;
24
24
  private _addEntity;
25
25
  private _itemMoved;
26
26
  private _removeItem;
@@ -1,22 +1,8 @@
1
- import { LocalizeFunc } from 'custom-card-helpers';
1
+ import { LocalizeFunc } from '@types';
2
2
  export declare const CARD_VERSION: string;
3
- export declare const STYLE_SCHEMA: {
4
- name: string;
5
- selector: {
6
- select: {
7
- options: string[];
8
- };
9
- };
10
- }[];
11
- export declare const DARK_AVAILABLE_STYLES: string[];
12
- export declare const STYLE_OPTIONS: {
13
- value: string;
14
- label: string;
15
- }[];
16
3
  export declare const DEFAULT_HOURS_TO_SHOW = 0;
17
4
  export declare const DEFAULT_ZOOM = 14;
18
5
  export declare const singleMapConfingSchema: import("memoize-one").MemoizedFn<(localize: LocalizeFunc) => readonly [{
19
- readonly name: "";
20
6
  readonly type: "expandable";
21
7
  readonly iconPath: string;
22
8
  readonly title: string;
@@ -24,13 +10,18 @@ export declare const singleMapConfingSchema: import("memoize-one").MemoizedFn<(l
24
10
  readonly name: "";
25
11
  readonly type: "grid";
26
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
+ } | {
27
20
  name: string;
28
21
  label: string;
29
22
  selector: {
30
23
  text: {};
31
24
  number?: undefined;
32
- select?: undefined;
33
- boolean?: undefined;
34
25
  };
35
26
  default?: undefined;
36
27
  } | {
@@ -43,10 +34,52 @@ export declare const singleMapConfingSchema: import("memoize-one").MemoizedFn<(l
43
34
  min: number;
44
35
  };
45
36
  text?: undefined;
46
- select?: undefined;
47
- boolean?: undefined;
48
37
  };
49
- } | {
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: ({
50
83
  name: string;
51
84
  label: string;
52
85
  default: string;
@@ -54,48 +87,34 @@ export declare const singleMapConfingSchema: import("memoize-one").MemoizedFn<(l
54
87
  select: {
55
88
  mode: string;
56
89
  options: {
57
- value: string;
90
+ value: "auto" | "light" | "dark";
58
91
  label: string;
59
92
  }[];
60
93
  };
61
- text?: undefined;
62
- number?: undefined;
63
- boolean?: undefined;
64
94
  };
95
+ type?: undefined;
96
+ schema?: undefined;
65
97
  } | {
66
- name: string;
67
- label: string;
68
- default: boolean;
69
- selector: {
70
- boolean: {};
71
- text?: undefined;
72
- number?: undefined;
73
- select?: undefined;
74
- };
75
- })[];
76
- }, {
77
- name: string;
78
- type: string;
79
- iconPath: string;
80
- title: string;
81
- schema: {
82
- name: string;
83
98
  type: string;
99
+ name: string;
84
100
  schema: {
85
- name: string;
101
+ name: "light" | "dark";
86
102
  label: string;
87
103
  selector: {
88
104
  select: {
89
105
  mode: string;
90
106
  options: {
91
- value: string;
92
- label: string;
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";
93
109
  }[];
94
110
  };
95
111
  };
96
112
  }[];
97
- }[];
98
- }];
113
+ label?: undefined;
114
+ default?: undefined;
115
+ selector?: undefined;
116
+ })[];
117
+ }[]];
99
118
  }]>;
100
119
  export declare const baseMapConfigSchema: import("memoize-one").MemoizedFn<() => readonly [{
101
120
  readonly name: "title";
@@ -115,8 +134,7 @@ export declare const baseMapConfigSchema: import("memoize-one").MemoizedFn<() =>
115
134
  };
116
135
  };
117
136
  }]>;
118
- export declare const mapConfigSchema: import("memoize-one").MemoizedFn<(localize: LocalizeFunc) => ({
119
- readonly name: "";
137
+ export declare const mapConfigSchema: import("memoize-one").MemoizedFn<(localize: LocalizeFunc, noTitle?: boolean) => ({
120
138
  readonly type: "expandable";
121
139
  readonly iconPath: string;
122
140
  readonly title: string;
@@ -124,13 +142,18 @@ export declare const mapConfigSchema: import("memoize-one").MemoizedFn<(localize
124
142
  readonly name: "";
125
143
  readonly type: "grid";
126
144
  readonly schema: readonly ({
145
+ name: "auto_fit" | "fit_zones" | "use_more_info";
146
+ label: string;
147
+ default: boolean;
148
+ selector: {
149
+ boolean: {};
150
+ };
151
+ } | {
127
152
  name: string;
128
153
  label: string;
129
154
  selector: {
130
155
  text: {};
131
156
  number?: undefined;
132
- select?: undefined;
133
- boolean?: undefined;
134
157
  };
135
158
  default?: undefined;
136
159
  } | {
@@ -143,10 +166,52 @@ export declare const mapConfigSchema: import("memoize-one").MemoizedFn<(localize
143
166
  min: number;
144
167
  };
145
168
  text?: undefined;
146
- select?: undefined;
147
- boolean?: undefined;
148
169
  };
149
- } | {
170
+ })[];
171
+ }, {
172
+ readonly title: "Custom Hours to Show";
173
+ readonly type: "expandable";
174
+ readonly icon: "mdi:history";
175
+ readonly flatten: true;
176
+ readonly schema: readonly [{
177
+ readonly name: "hours_to_show";
178
+ readonly label: "Hours to Show";
179
+ readonly default: 0;
180
+ readonly required: false;
181
+ readonly selector: {
182
+ readonly number: {
183
+ readonly mode: "box";
184
+ readonly min: 0;
185
+ };
186
+ };
187
+ }, {
188
+ readonly name: "history_period";
189
+ readonly label: "History Period";
190
+ readonly required: false;
191
+ readonly helper: "Time period to show, from now backwards (e.g., today = since midnight, yesterday = last 24 hours)";
192
+ readonly selector: {
193
+ readonly select: {
194
+ readonly mode: "dropdown";
195
+ readonly options: {
196
+ value: "today" | "yesterday";
197
+ label: string;
198
+ }[];
199
+ };
200
+ };
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
+ }];
210
+ }, ...{
211
+ title: string;
212
+ type: string;
213
+ icon: string;
214
+ schema: ({
150
215
  name: string;
151
216
  label: string;
152
217
  default: string;
@@ -154,48 +219,34 @@ export declare const mapConfigSchema: import("memoize-one").MemoizedFn<(localize
154
219
  select: {
155
220
  mode: string;
156
221
  options: {
157
- value: string;
222
+ value: "auto" | "light" | "dark";
158
223
  label: string;
159
224
  }[];
160
225
  };
161
- text?: undefined;
162
- number?: undefined;
163
- boolean?: undefined;
164
226
  };
227
+ type?: undefined;
228
+ schema?: undefined;
165
229
  } | {
166
- name: string;
167
- label: string;
168
- default: boolean;
169
- selector: {
170
- boolean: {};
171
- text?: undefined;
172
- number?: undefined;
173
- select?: undefined;
174
- };
175
- })[];
176
- }, {
177
- name: string;
178
- type: string;
179
- iconPath: string;
180
- title: string;
181
- schema: {
182
- name: string;
183
230
  type: string;
231
+ name: string;
184
232
  schema: {
185
- name: string;
233
+ name: "light" | "dark";
186
234
  label: string;
187
235
  selector: {
188
236
  select: {
189
237
  mode: string;
190
238
  options: {
191
- value: string;
192
- label: string;
239
+ 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";
240
+ 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";
193
241
  }[];
194
242
  };
195
243
  };
196
244
  }[];
197
- }[];
198
- }];
245
+ label?: undefined;
246
+ default?: undefined;
247
+ selector?: undefined;
248
+ })[];
249
+ }[]];
199
250
  } | {
200
251
  readonly name: "title";
201
252
  readonly label: "Title";