@oicl/openbridge-webcomponents 2.0.0 → 2.1.0-next.2
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/README.md +1 -0
- package/bundle/openbridge-webcomponents.bundle.js +416 -261
- package/bundle/openbridge-webcomponents.bundle.js.map +1 -1
- package/custom-elements.json +1443 -446
- package/dist/automation/automation-button/abstract-automation-button-storybook-helpers.d.ts +135 -136
- package/dist/automation/automation-button/abstract-automation-button-storybook-helpers.d.ts.map +1 -1
- package/dist/automation/automation-button/abstract-automation-button-storybook-helpers.js +2 -18
- package/dist/automation/automation-button/abstract-automation-button-storybook-helpers.js.map +1 -1
- package/dist/automation/automation-button/abstract-automation-button.d.ts +4 -4
- package/dist/automation/automation-button/abstract-automation-button.js +2 -2
- package/dist/automation/automation-button/abstract-automation-button.js.map +1 -1
- package/dist/automation/automation-button/automation-button.d.ts +4 -4
- package/dist/automation/automation-button/automation-button.js.map +1 -1
- package/dist/automation/automation-tank/automation-tank.d.ts +47 -3
- package/dist/automation/automation-tank/automation-tank.d.ts.map +1 -1
- package/dist/automation/automation-tank/automation-tank.js +4 -1
- package/dist/automation/automation-tank/automation-tank.js.map +1 -1
- package/dist/automation/heat-exchanger/heat-exchanger.d.ts +1 -1
- package/dist/automation/heat-exchanger/heat-exchanger.js.map +1 -1
- package/dist/automation/heat-pump/heat-pump.d.ts +1 -1
- package/dist/automation/heat-pump/heat-pump.js.map +1 -1
- package/dist/automation/hydraulic-separator/hydraulic-separator.d.ts +1 -1
- package/dist/automation/hydraulic-separator/hydraulic-separator.js.map +1 -1
- package/dist/automation/specialty-tank/abstract-specialty-tank.d.ts +14 -5
- package/dist/automation/specialty-tank/abstract-specialty-tank.d.ts.map +1 -1
- package/dist/automation/specialty-tank/abstract-specialty-tank.js +9 -3
- package/dist/automation/specialty-tank/abstract-specialty-tank.js.map +1 -1
- package/dist/automation/specialty-tank/specialty-tank-story-meta.d.ts.map +1 -1
- package/dist/automation/specialty-tank/specialty-tank-story-meta.js +5 -13
- package/dist/automation/specialty-tank/specialty-tank-story-meta.js.map +1 -1
- package/dist/automation/transmitter/transmitter.d.ts +77 -8
- package/dist/automation/transmitter/transmitter.d.ts.map +1 -1
- package/dist/automation/transmitter/transmitter.js +37 -10
- package/dist/automation/transmitter/transmitter.js.map +1 -1
- package/dist/building-blocks/alert-list/alert-list-base.d.ts +60 -0
- package/dist/building-blocks/alert-list/alert-list-base.d.ts.map +1 -0
- package/dist/building-blocks/alert-list/alert-list-base.js +191 -0
- package/dist/building-blocks/alert-list/alert-list-base.js.map +1 -0
- package/dist/building-blocks/alert-list/alert-list.css.js.map +1 -1
- package/dist/building-blocks/alert-list/alert-list.d.ts +13 -26
- package/dist/building-blocks/alert-list/alert-list.d.ts.map +1 -1
- package/dist/building-blocks/alert-list/alert-list.js +7 -142
- package/dist/building-blocks/alert-list/alert-list.js.map +1 -1
- package/dist/components/accordion-card/accordion-card.d.ts +31 -6
- package/dist/components/accordion-card/accordion-card.d.ts.map +1 -1
- package/dist/components/accordion-card/accordion-card.js +13 -1
- package/dist/components/accordion-card/accordion-card.js.map +1 -1
- package/dist/components/alert-frame/alert-frame-storybook-helpers.d.ts +33 -0
- package/dist/components/alert-frame/alert-frame-storybook-helpers.d.ts.map +1 -0
- package/dist/components/alert-frame/alert-frame-storybook-helpers.js +30 -0
- package/dist/components/alert-frame/alert-frame-storybook-helpers.js.map +1 -0
- package/dist/components/alert-icon/alert-icon.d.ts.map +1 -1
- package/dist/components/alert-icon/alert-icon.js +6 -5
- package/dist/components/alert-icon/alert-icon.js.map +1 -1
- package/dist/components/alert-list-details/alert-list-details.css.js +4 -1
- package/dist/components/alert-list-details/alert-list-details.css.js.map +1 -1
- package/dist/components/alert-menu/alert-menu.css.js +3 -42
- package/dist/components/alert-menu/alert-menu.css.js.map +1 -1
- package/dist/components/alert-menu/alert-menu.d.ts +28 -6
- package/dist/components/alert-menu/alert-menu.d.ts.map +1 -1
- package/dist/components/alert-menu/alert-menu.js +81 -60
- package/dist/components/alert-menu/alert-menu.js.map +1 -1
- package/dist/components/alert-menu-item/alert-menu-item.d.ts +16 -6
- package/dist/components/alert-menu-item/alert-menu-item.d.ts.map +1 -1
- package/dist/components/alert-menu-item/alert-menu-item.js +11 -2
- package/dist/components/alert-menu-item/alert-menu-item.js.map +1 -1
- package/dist/components/number-input-field/number-input-field.css.js +8 -2
- package/dist/components/number-input-field/number-input-field.css.js.map +1 -1
- package/dist/components/number-input-field/number-input-field.d.ts +15 -1
- package/dist/components/number-input-field/number-input-field.d.ts.map +1 -1
- package/dist/components/number-input-field/number-input-field.js +38 -44
- package/dist/components/number-input-field/number-input-field.js.map +1 -1
- package/dist/components/textbox/textbox.css.js +3 -9
- package/dist/components/textbox/textbox.css.js.map +1 -1
- package/dist/components/textbox/textbox.d.ts +3 -0
- package/dist/components/textbox/textbox.d.ts.map +1 -1
- package/dist/components/textbox/textbox.js.map +1 -1
- package/dist/generated/locales/es-419.d.ts +1 -1
- package/dist/generated/locales/es-419.js +1 -1
- package/dist/generated/locales/es-419.js.map +1 -1
- package/dist/navigation-instruments/readout/readout.d.ts.map +1 -1
- package/dist/navigation-instruments/readout/readout.js.map +1 -1
- package/dist/navigation-instruments/readout-list-item/readout-list-item.css.js +2 -1
- package/dist/navigation-instruments/readout-list-item/readout-list-item.css.js.map +1 -1
- package/dist/navigation-instruments/readout-list-item/readout-list-item.d.ts.map +1 -1
- package/dist/navigation-instruments/readout-list-item/readout-list-item.js.map +1 -1
- package/dist/pages/alert-detail-page/alert-detail-page.js +1 -1
- package/dist/pages/alert-detail-page/alert-detail-page.js.map +1 -1
- package/dist/pages/alert-list-page-small/alert-list-page-small-base.d.ts +63 -0
- package/dist/pages/alert-list-page-small/alert-list-page-small-base.d.ts.map +1 -0
- package/dist/pages/alert-list-page-small/alert-list-page-small-base.js +126 -0
- package/dist/pages/alert-list-page-small/alert-list-page-small-base.js.map +1 -0
- package/dist/pages/alert-list-page-small/alert-list-page-small.d.ts +12 -15
- package/dist/pages/alert-list-page-small/alert-list-page-small.d.ts.map +1 -1
- package/dist/pages/alert-list-page-small/alert-list-page-small.js +41 -92
- package/dist/pages/alert-list-page-small/alert-list-page-small.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,50 +1,8 @@
|
|
|
1
|
-
import { ObcAlertFrameStatus, ObcAlertFrameThickness, ObcAlertFrameType, ObcAlertFrameMode } from '../../components/alert-frame/alert-frame.js';
|
|
2
1
|
import { MotorizedVariant } from './abstract-automation-button-motorized.js';
|
|
3
2
|
import { AutomationButtonDirection, AutomationButtonLabelDirection, AutomationButtonOrientation, AutomationButtonPositioning } from './automation-button.js';
|
|
4
3
|
import { CircularProgressMode } from '../../building-blocks/circular-progress/circular-progress.js';
|
|
5
4
|
import { AutomationButtonBadgeAlert, AutomationButtonBadgeCommandLocked, AutomationButtonBadgeControl, AutomationButtonBadgeInterlock } from './abstract-automation-button.js';
|
|
6
5
|
export declare const argTypesAbstractAutomationButton: {
|
|
7
|
-
tag: {
|
|
8
|
-
control: {
|
|
9
|
-
type: string;
|
|
10
|
-
};
|
|
11
|
-
};
|
|
12
|
-
readoutPosition: {
|
|
13
|
-
options: string[];
|
|
14
|
-
control: {
|
|
15
|
-
type: string;
|
|
16
|
-
};
|
|
17
|
-
};
|
|
18
|
-
readoutSize: {
|
|
19
|
-
options: string[];
|
|
20
|
-
control: {
|
|
21
|
-
type: string;
|
|
22
|
-
};
|
|
23
|
-
};
|
|
24
|
-
alertFrameType: {
|
|
25
|
-
options: ObcAlertFrameType[];
|
|
26
|
-
control: {
|
|
27
|
-
type: string;
|
|
28
|
-
};
|
|
29
|
-
};
|
|
30
|
-
alertFrameMode: {
|
|
31
|
-
options: ObcAlertFrameMode[];
|
|
32
|
-
control: {
|
|
33
|
-
type: string;
|
|
34
|
-
};
|
|
35
|
-
};
|
|
36
|
-
alertFrameThickness: {
|
|
37
|
-
options: ObcAlertFrameThickness[];
|
|
38
|
-
control: {
|
|
39
|
-
type: string;
|
|
40
|
-
};
|
|
41
|
-
};
|
|
42
|
-
alertFrameStatus: {
|
|
43
|
-
options: ObcAlertFrameStatus[];
|
|
44
|
-
control: {
|
|
45
|
-
type: string;
|
|
46
|
-
};
|
|
47
|
-
};
|
|
48
6
|
positioning: {
|
|
49
7
|
options: AutomationButtonPositioning[];
|
|
50
8
|
control: {
|
|
@@ -95,51 +53,51 @@ export declare const argTypesAbstractAutomationButton: {
|
|
|
95
53
|
arg: string;
|
|
96
54
|
};
|
|
97
55
|
};
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
control: {
|
|
103
|
-
type: string;
|
|
56
|
+
alertFrameType: {
|
|
57
|
+
readonly options: import('../../components/alert-frame/alert-frame.js').ObcAlertFrameType[];
|
|
58
|
+
readonly control: {
|
|
59
|
+
readonly type: "radio";
|
|
104
60
|
};
|
|
105
61
|
};
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
62
|
+
alertFrameThickness: {
|
|
63
|
+
readonly options: import('../../components/alert-frame/alert-frame.js').ObcAlertFrameThickness[];
|
|
64
|
+
readonly control: {
|
|
65
|
+
readonly type: "radio";
|
|
109
66
|
};
|
|
110
67
|
};
|
|
111
|
-
|
|
112
|
-
options:
|
|
113
|
-
control: {
|
|
114
|
-
type:
|
|
68
|
+
alertFrameStatus: {
|
|
69
|
+
readonly options: import('../../types.js').AlertType[];
|
|
70
|
+
readonly control: {
|
|
71
|
+
readonly type: "radio";
|
|
115
72
|
};
|
|
116
73
|
};
|
|
117
|
-
|
|
118
|
-
options:
|
|
119
|
-
control: {
|
|
120
|
-
type:
|
|
74
|
+
alertFrameMode: {
|
|
75
|
+
readonly options: import('../../components/alert-frame/alert-frame.js').ObcAlertFrameMode[];
|
|
76
|
+
readonly control: {
|
|
77
|
+
readonly type: "radio";
|
|
121
78
|
};
|
|
122
79
|
};
|
|
123
|
-
|
|
124
|
-
options: ObcAlertFrameType[];
|
|
80
|
+
tag: {
|
|
125
81
|
control: {
|
|
126
82
|
type: string;
|
|
127
83
|
};
|
|
128
84
|
};
|
|
129
|
-
|
|
130
|
-
options:
|
|
85
|
+
readoutPosition: {
|
|
86
|
+
options: string[];
|
|
131
87
|
control: {
|
|
132
88
|
type: string;
|
|
133
89
|
};
|
|
134
90
|
};
|
|
135
|
-
|
|
136
|
-
options:
|
|
91
|
+
readoutSize: {
|
|
92
|
+
options: string[];
|
|
137
93
|
control: {
|
|
138
94
|
type: string;
|
|
139
95
|
};
|
|
140
96
|
};
|
|
141
|
-
|
|
142
|
-
|
|
97
|
+
};
|
|
98
|
+
export declare const argTypesAbstractAutomationButtonPassiveRound: {
|
|
99
|
+
variant: {
|
|
100
|
+
options: string[];
|
|
143
101
|
control: {
|
|
144
102
|
type: string;
|
|
145
103
|
};
|
|
@@ -194,24 +152,28 @@ export declare const argTypesAbstractAutomationButtonPassiveRound: {
|
|
|
194
152
|
arg: string;
|
|
195
153
|
};
|
|
196
154
|
};
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
disable: boolean;
|
|
155
|
+
alertFrameType: {
|
|
156
|
+
readonly options: import('../../components/alert-frame/alert-frame.js').ObcAlertFrameType[];
|
|
157
|
+
readonly control: {
|
|
158
|
+
readonly type: "radio";
|
|
202
159
|
};
|
|
203
|
-
control: boolean;
|
|
204
160
|
};
|
|
205
|
-
|
|
206
|
-
options:
|
|
207
|
-
control: {
|
|
208
|
-
type:
|
|
161
|
+
alertFrameThickness: {
|
|
162
|
+
readonly options: import('../../components/alert-frame/alert-frame.js').ObcAlertFrameThickness[];
|
|
163
|
+
readonly control: {
|
|
164
|
+
readonly type: "radio";
|
|
209
165
|
};
|
|
210
166
|
};
|
|
211
|
-
|
|
212
|
-
options:
|
|
213
|
-
control: {
|
|
214
|
-
type:
|
|
167
|
+
alertFrameStatus: {
|
|
168
|
+
readonly options: import('../../types.js').AlertType[];
|
|
169
|
+
readonly control: {
|
|
170
|
+
readonly type: "radio";
|
|
171
|
+
};
|
|
172
|
+
};
|
|
173
|
+
alertFrameMode: {
|
|
174
|
+
readonly options: import('../../components/alert-frame/alert-frame.js').ObcAlertFrameMode[];
|
|
175
|
+
readonly control: {
|
|
176
|
+
readonly type: "radio";
|
|
215
177
|
};
|
|
216
178
|
};
|
|
217
179
|
tag: {
|
|
@@ -231,26 +193,22 @@ export declare const argTypesAbstractAutomationButtonPassiveSquare: {
|
|
|
231
193
|
type: string;
|
|
232
194
|
};
|
|
233
195
|
};
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
};
|
|
240
|
-
alertFrameMode: {
|
|
241
|
-
options: ObcAlertFrameMode[];
|
|
242
|
-
control: {
|
|
243
|
-
type: string;
|
|
196
|
+
};
|
|
197
|
+
export declare const argTypesAbstractAutomationButtonPassiveSquare: {
|
|
198
|
+
on: {
|
|
199
|
+
table: {
|
|
200
|
+
disable: boolean;
|
|
244
201
|
};
|
|
202
|
+
control: boolean;
|
|
245
203
|
};
|
|
246
|
-
|
|
247
|
-
options:
|
|
204
|
+
variant: {
|
|
205
|
+
options: string[];
|
|
248
206
|
control: {
|
|
249
207
|
type: string;
|
|
250
208
|
};
|
|
251
209
|
};
|
|
252
|
-
|
|
253
|
-
options:
|
|
210
|
+
orientation: {
|
|
211
|
+
options: AutomationButtonOrientation[];
|
|
254
212
|
control: {
|
|
255
213
|
type: string;
|
|
256
214
|
};
|
|
@@ -305,93 +263,93 @@ export declare const argTypesAbstractAutomationButtonPassiveSquare: {
|
|
|
305
263
|
arg: string;
|
|
306
264
|
};
|
|
307
265
|
};
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
disable: boolean;
|
|
266
|
+
alertFrameType: {
|
|
267
|
+
readonly options: import('../../components/alert-frame/alert-frame.js').ObcAlertFrameType[];
|
|
268
|
+
readonly control: {
|
|
269
|
+
readonly type: "radio";
|
|
313
270
|
};
|
|
314
|
-
control: boolean;
|
|
315
271
|
};
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
max: number;
|
|
321
|
-
step: number;
|
|
272
|
+
alertFrameThickness: {
|
|
273
|
+
readonly options: import('../../components/alert-frame/alert-frame.js').ObcAlertFrameThickness[];
|
|
274
|
+
readonly control: {
|
|
275
|
+
readonly type: "radio";
|
|
322
276
|
};
|
|
323
|
-
description: string;
|
|
324
277
|
};
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
278
|
+
alertFrameStatus: {
|
|
279
|
+
readonly options: import('../../types.js').AlertType[];
|
|
280
|
+
readonly control: {
|
|
281
|
+
readonly type: "radio";
|
|
328
282
|
};
|
|
329
283
|
};
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
284
|
+
alertFrameMode: {
|
|
285
|
+
readonly options: import('../../components/alert-frame/alert-frame.js').ObcAlertFrameMode[];
|
|
286
|
+
readonly control: {
|
|
287
|
+
readonly type: "radio";
|
|
333
288
|
};
|
|
334
289
|
};
|
|
335
|
-
|
|
290
|
+
tag: {
|
|
336
291
|
control: {
|
|
337
292
|
type: string;
|
|
338
293
|
};
|
|
339
294
|
};
|
|
340
|
-
|
|
341
|
-
options:
|
|
295
|
+
readoutPosition: {
|
|
296
|
+
options: string[];
|
|
342
297
|
control: {
|
|
343
298
|
type: string;
|
|
344
299
|
};
|
|
345
300
|
};
|
|
346
|
-
|
|
347
|
-
options:
|
|
301
|
+
readoutSize: {
|
|
302
|
+
options: string[];
|
|
348
303
|
control: {
|
|
349
304
|
type: string;
|
|
350
305
|
};
|
|
351
306
|
};
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
307
|
+
};
|
|
308
|
+
export declare const argTypesAbstractAutomationButtonMotorized: {
|
|
309
|
+
on: {
|
|
310
|
+
table: {
|
|
311
|
+
disable: boolean;
|
|
356
312
|
};
|
|
313
|
+
control: boolean;
|
|
357
314
|
};
|
|
358
|
-
|
|
315
|
+
speedInPercent: {
|
|
359
316
|
control: {
|
|
360
317
|
type: string;
|
|
318
|
+
min: number;
|
|
319
|
+
max: number;
|
|
320
|
+
step: number;
|
|
361
321
|
};
|
|
322
|
+
description: string;
|
|
362
323
|
};
|
|
363
|
-
|
|
364
|
-
options: string[];
|
|
324
|
+
speed: {
|
|
365
325
|
control: {
|
|
366
326
|
type: string;
|
|
367
327
|
};
|
|
368
328
|
};
|
|
369
|
-
|
|
370
|
-
options: string[];
|
|
329
|
+
speedUnit: {
|
|
371
330
|
control: {
|
|
372
331
|
type: string;
|
|
373
332
|
};
|
|
374
333
|
};
|
|
375
|
-
|
|
376
|
-
options: ObcAlertFrameType[];
|
|
334
|
+
speedMaxDigits: {
|
|
377
335
|
control: {
|
|
378
336
|
type: string;
|
|
379
337
|
};
|
|
380
338
|
};
|
|
381
|
-
|
|
382
|
-
options:
|
|
339
|
+
labelDirection: {
|
|
340
|
+
options: AutomationButtonLabelDirection[];
|
|
383
341
|
control: {
|
|
384
342
|
type: string;
|
|
385
343
|
};
|
|
386
344
|
};
|
|
387
|
-
|
|
388
|
-
options:
|
|
345
|
+
direction: {
|
|
346
|
+
options: AutomationButtonDirection[];
|
|
389
347
|
control: {
|
|
390
348
|
type: string;
|
|
391
349
|
};
|
|
392
350
|
};
|
|
393
|
-
|
|
394
|
-
options:
|
|
351
|
+
variant: {
|
|
352
|
+
options: MotorizedVariant[];
|
|
395
353
|
control: {
|
|
396
354
|
type: string;
|
|
397
355
|
};
|
|
@@ -446,5 +404,46 @@ export declare const argTypesAbstractAutomationButtonMotorized: {
|
|
|
446
404
|
arg: string;
|
|
447
405
|
};
|
|
448
406
|
};
|
|
407
|
+
alertFrameType: {
|
|
408
|
+
readonly options: import('../../components/alert-frame/alert-frame.js').ObcAlertFrameType[];
|
|
409
|
+
readonly control: {
|
|
410
|
+
readonly type: "radio";
|
|
411
|
+
};
|
|
412
|
+
};
|
|
413
|
+
alertFrameThickness: {
|
|
414
|
+
readonly options: import('../../components/alert-frame/alert-frame.js').ObcAlertFrameThickness[];
|
|
415
|
+
readonly control: {
|
|
416
|
+
readonly type: "radio";
|
|
417
|
+
};
|
|
418
|
+
};
|
|
419
|
+
alertFrameStatus: {
|
|
420
|
+
readonly options: import('../../types.js').AlertType[];
|
|
421
|
+
readonly control: {
|
|
422
|
+
readonly type: "radio";
|
|
423
|
+
};
|
|
424
|
+
};
|
|
425
|
+
alertFrameMode: {
|
|
426
|
+
readonly options: import('../../components/alert-frame/alert-frame.js').ObcAlertFrameMode[];
|
|
427
|
+
readonly control: {
|
|
428
|
+
readonly type: "radio";
|
|
429
|
+
};
|
|
430
|
+
};
|
|
431
|
+
tag: {
|
|
432
|
+
control: {
|
|
433
|
+
type: string;
|
|
434
|
+
};
|
|
435
|
+
};
|
|
436
|
+
readoutPosition: {
|
|
437
|
+
options: string[];
|
|
438
|
+
control: {
|
|
439
|
+
type: string;
|
|
440
|
+
};
|
|
441
|
+
};
|
|
442
|
+
readoutSize: {
|
|
443
|
+
options: string[];
|
|
444
|
+
control: {
|
|
445
|
+
type: string;
|
|
446
|
+
};
|
|
447
|
+
};
|
|
449
448
|
};
|
|
450
449
|
//# sourceMappingURL=abstract-automation-button-storybook-helpers.d.ts.map
|
package/dist/automation/automation-button/abstract-automation-button-storybook-helpers.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"abstract-automation-button-storybook-helpers.d.ts","sourceRoot":"","sources":["../../../src/automation/automation-button/abstract-automation-button-storybook-helpers.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"abstract-automation-button-storybook-helpers.d.ts","sourceRoot":"","sources":["../../../src/automation/automation-button/abstract-automation-button-storybook-helpers.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,gBAAgB,EAAC,MAAM,2CAA2C,CAAC;AAC3E,OAAO,EACL,yBAAyB,EACzB,8BAA8B,EAC9B,2BAA2B,EAC3B,2BAA2B,EAC5B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAC,oBAAoB,EAAC,MAAM,8DAA8D,CAAC;AAClG,OAAO,EACL,0BAA0B,EAC1B,kCAAkC,EAClC,4BAA4B,EAC5B,8BAA8B,EAC/B,MAAM,iCAAiC,CAAC;AAEzC,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0C5C,CAAC;AAEF,eAAO,MAAM,4CAA4C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAMxD,CAAC;AAEF,eAAO,MAAM,6CAA6C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAWzD,CAAC;AAEF,eAAO,MAAM,yCAAyC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4BrD,CAAC"}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { AlertType } from "../../types.js";
|
|
2
|
-
import { ObcAlertFrameMode, ObcAlertFrameThickness, ObcAlertFrameType } from "../../components/alert-frame/alert-frame.js";
|
|
3
1
|
import { CircularProgressMode } from "../../building-blocks/circular-progress/circular-progress.js";
|
|
4
2
|
import { AutomationButtonDirection, AutomationButtonLabelDirection, AutomationButtonOrientation, AutomationButtonPositioning } from "./automation-button.js";
|
|
5
3
|
import { AutomationButtonBadgeAlert, AutomationButtonBadgeCommandLocked, AutomationButtonBadgeControl, AutomationButtonBadgeInterlock } from "./abstract-automation-button.js";
|
|
6
4
|
import { MotorizedVariant } from "./abstract-automation-button-motorized.js";
|
|
5
|
+
import { argTypesAlertFrame } from "../../components/alert-frame/alert-frame-storybook-helpers.js";
|
|
7
6
|
//#region src/automation/automation-button/abstract-automation-button-storybook-helpers.ts
|
|
8
7
|
var argTypesAbstractAutomationButton = {
|
|
9
8
|
tag: { control: { type: "text" } },
|
|
@@ -24,22 +23,7 @@ var argTypesAbstractAutomationButton = {
|
|
|
24
23
|
],
|
|
25
24
|
control: { type: "radio" }
|
|
26
25
|
},
|
|
27
|
-
|
|
28
|
-
options: Object.values(ObcAlertFrameType),
|
|
29
|
-
control: { type: "radio" }
|
|
30
|
-
},
|
|
31
|
-
alertFrameMode: {
|
|
32
|
-
options: Object.values(ObcAlertFrameMode),
|
|
33
|
-
control: { type: "radio" }
|
|
34
|
-
},
|
|
35
|
-
alertFrameThickness: {
|
|
36
|
-
options: Object.values(ObcAlertFrameThickness),
|
|
37
|
-
control: { type: "radio" }
|
|
38
|
-
},
|
|
39
|
-
alertFrameStatus: {
|
|
40
|
-
options: Object.values(AlertType),
|
|
41
|
-
control: { type: "radio" }
|
|
42
|
-
},
|
|
26
|
+
...argTypesAlertFrame,
|
|
43
27
|
positioning: {
|
|
44
28
|
options: Object.values(AutomationButtonPositioning),
|
|
45
29
|
control: { type: "select" }
|
package/dist/automation/automation-button/abstract-automation-button-storybook-helpers.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"abstract-automation-button-storybook-helpers.js","names":[],"sources":["../../../src/automation/automation-button/abstract-automation-button-storybook-helpers.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"abstract-automation-button-storybook-helpers.js","names":[],"sources":["../../../src/automation/automation-button/abstract-automation-button-storybook-helpers.ts"],"sourcesContent":["import {argTypesAlertFrame} from '../../components/alert-frame/alert-frame-storybook-helpers.js';\nimport {MotorizedVariant} from './abstract-automation-button-motorized.js';\nimport {\n AutomationButtonDirection,\n AutomationButtonLabelDirection,\n AutomationButtonOrientation,\n AutomationButtonPositioning,\n} from './automation-button.js';\nimport {CircularProgressMode} from '../../building-blocks/circular-progress/circular-progress.js';\nimport {\n AutomationButtonBadgeAlert,\n AutomationButtonBadgeCommandLocked,\n AutomationButtonBadgeControl,\n AutomationButtonBadgeInterlock,\n} from './abstract-automation-button.js';\n\nexport const argTypesAbstractAutomationButton = {\n tag: {\n control: {type: 'text'},\n },\n readoutPosition: {\n options: ['top', 'bottom', 'left', 'right'],\n control: {type: 'radio'},\n },\n readoutSize: {\n options: ['small', 'regular', 'enhanced'],\n control: {type: 'radio'},\n },\n ...argTypesAlertFrame,\n positioning: {\n options: Object.values(AutomationButtonPositioning),\n control: {type: 'select'},\n },\n badgeControl: {\n options: Object.values(AutomationButtonBadgeControl),\n control: {type: 'select'},\n },\n badgeCommandLocked: {\n options: Object.values(AutomationButtonBadgeCommandLocked),\n control: {type: 'select'},\n },\n badgeInterlock: {\n options: Object.values(AutomationButtonBadgeInterlock),\n control: {type: 'select'},\n },\n badgeAlert: {\n options: Object.values(AutomationButtonBadgeAlert),\n control: {type: 'select'},\n },\n progressMode: {\n options: Object.values(CircularProgressMode),\n control: {type: 'select'},\n if: {arg: 'progress'},\n },\n progressValue: {\n control: {type: 'range', min: 0, max: 100, step: 1},\n if: {arg: 'progress'},\n },\n};\n\nexport const argTypesAbstractAutomationButtonPassiveRound = {\n ...argTypesAbstractAutomationButton,\n variant: {\n options: ['regular', 'flat'],\n control: {type: 'radio'},\n },\n};\n\nexport const argTypesAbstractAutomationButtonPassiveSquare = {\n ...argTypesAbstractAutomationButton,\n on: {table: {disable: true}, control: false},\n variant: {\n options: ['square', 'flat'],\n control: {type: 'radio'},\n },\n orientation: {\n options: Object.values(AutomationButtonOrientation),\n control: {type: 'radio'},\n },\n};\n\nexport const argTypesAbstractAutomationButtonMotorized = {\n ...argTypesAbstractAutomationButton,\n on: {table: {disable: true}, control: false},\n speedInPercent: {\n control: {type: 'range', min: 0, max: 100, step: 1},\n description: 'Deprecated, use `speed` together with `speedUnit` instead.',\n },\n speed: {\n control: {type: 'number'},\n },\n speedUnit: {\n control: {type: 'text'},\n },\n speedMaxDigits: {\n control: {type: 'number'},\n },\n labelDirection: {\n options: Object.values(AutomationButtonLabelDirection),\n control: {type: 'radio'},\n },\n direction: {\n options: Object.values(AutomationButtonDirection),\n control: {type: 'radio'},\n },\n variant: {\n options: Object.values(MotorizedVariant),\n control: {type: 'radio'},\n },\n};\n"],"mappings":";;;;;;AAgBA,IAAa,mCAAmC;CAC9C,KAAK,EACH,SAAS,EAAC,MAAM,OAAM,EACxB;CACA,iBAAiB;EACf,SAAS;GAAC;GAAO;GAAU;GAAQ;EAAO;EAC1C,SAAS,EAAC,MAAM,QAAO;CACzB;CACA,aAAa;EACX,SAAS;GAAC;GAAS;GAAW;EAAU;EACxC,SAAS,EAAC,MAAM,QAAO;CACzB;CACA,GAAG;CACH,aAAa;EACX,SAAS,OAAO,OAAO,2BAA2B;EAClD,SAAS,EAAC,MAAM,SAAQ;CAC1B;CACA,cAAc;EACZ,SAAS,OAAO,OAAO,4BAA4B;EACnD,SAAS,EAAC,MAAM,SAAQ;CAC1B;CACA,oBAAoB;EAClB,SAAS,OAAO,OAAO,kCAAkC;EACzD,SAAS,EAAC,MAAM,SAAQ;CAC1B;CACA,gBAAgB;EACd,SAAS,OAAO,OAAO,8BAA8B;EACrD,SAAS,EAAC,MAAM,SAAQ;CAC1B;CACA,YAAY;EACV,SAAS,OAAO,OAAO,0BAA0B;EACjD,SAAS,EAAC,MAAM,SAAQ;CAC1B;CACA,cAAc;EACZ,SAAS,OAAO,OAAO,oBAAoB;EAC3C,SAAS,EAAC,MAAM,SAAQ;EACxB,IAAI,EAAC,KAAK,WAAU;CACtB;CACA,eAAe;EACb,SAAS;GAAC,MAAM;GAAS,KAAK;GAAG,KAAK;GAAK,MAAM;EAAC;EAClD,IAAI,EAAC,KAAK,WAAU;CACtB;AACF;AAEA,IAAa,+CAA+C;CAC1D,GAAG;CACH,SAAS;EACP,SAAS,CAAC,WAAW,MAAM;EAC3B,SAAS,EAAC,MAAM,QAAO;CACzB;AACF;AAEA,IAAa,gDAAgD;CAC3D,GAAG;CACH,IAAI;EAAC,OAAO,EAAC,SAAS,KAAI;EAAG,SAAS;CAAK;CAC3C,SAAS;EACP,SAAS,CAAC,UAAU,MAAM;EAC1B,SAAS,EAAC,MAAM,QAAO;CACzB;CACA,aAAa;EACX,SAAS,OAAO,OAAO,2BAA2B;EAClD,SAAS,EAAC,MAAM,QAAO;CACzB;AACF;AAEA,IAAa,4CAA4C;CACvD,GAAG;CACH,IAAI;EAAC,OAAO,EAAC,SAAS,KAAI;EAAG,SAAS;CAAK;CAC3C,gBAAgB;EACd,SAAS;GAAC,MAAM;GAAS,KAAK;GAAG,KAAK;GAAK,MAAM;EAAC;EAClD,aAAa;CACf;CACA,OAAO,EACL,SAAS,EAAC,MAAM,SAAQ,EAC1B;CACA,WAAW,EACT,SAAS,EAAC,MAAM,OAAM,EACxB;CACA,gBAAgB,EACd,SAAS,EAAC,MAAM,SAAQ,EAC1B;CACA,gBAAgB;EACd,SAAS,OAAO,OAAO,8BAA8B;EACrD,SAAS,EAAC,MAAM,QAAO;CACzB;CACA,WAAW;EACT,SAAS,OAAO,OAAO,yBAAyB;EAChD,SAAS,EAAC,MAAM,QAAO;CACzB;CACA,SAAS;EACP,SAAS,OAAO,OAAO,gBAAgB;EACvC,SAAS,EAAC,MAAM,QAAO;CACzB;AACF"}
|
|
@@ -60,8 +60,8 @@ export declare enum AutomationButtonBadgeCommandLocked {
|
|
|
60
60
|
* @availableWhen alertFrameThickness alert==true
|
|
61
61
|
* @availableWhen alertFrameStatus alert==true
|
|
62
62
|
* @availableWhen alertFrameMode alert==true
|
|
63
|
-
* @availableWhen showAlertCategoryIcon alert==true
|
|
64
|
-
* @availableWhen showAlertIcon alert==true
|
|
63
|
+
* @availableWhen showAlertCategoryIcon alert==true && alertFrameType in [SmallSideFlip, LargeSideFlip, BottomFlip, TopFlip]
|
|
64
|
+
* @availableWhen showAlertIcon alert==true && alertFrameType in [LargeSideFlip, BottomFlip, TopFlip]
|
|
65
65
|
* @property progress - Shows a progress indicator, used to indicate that an user action is in progress
|
|
66
66
|
* @availableWhen progressMode progress==true
|
|
67
67
|
* @availableWhen progressValue progress==true && progressMode in [determinate, progressiveIndeterminate]
|
|
@@ -88,9 +88,9 @@ export declare class ObcAbstractAutomationButton extends LitElement {
|
|
|
88
88
|
alertFrameStatus: AlertType;
|
|
89
89
|
/** Available when `alert==true`. */
|
|
90
90
|
alertFrameMode: ObcAlertFrameMode;
|
|
91
|
-
/** Available when `alert==true`. */
|
|
91
|
+
/** Available when `alert==true && alertFrameType in [SmallSideFlip, LargeSideFlip, BottomFlip, TopFlip]`. */
|
|
92
92
|
showAlertCategoryIcon: boolean;
|
|
93
|
-
/** Available when `alert==true`. */
|
|
93
|
+
/** Available when `alert==true && alertFrameType in [LargeSideFlip, BottomFlip, TopFlip]`. */
|
|
94
94
|
showAlertIcon: boolean;
|
|
95
95
|
/** Shows a progress indicator, used to indicate that an user action is in progress */
|
|
96
96
|
progress: boolean;
|
|
@@ -66,8 +66,8 @@ var AutomationButtonBadgeCommandLocked = /* @__PURE__ */ function(AutomationButt
|
|
|
66
66
|
* @availableWhen alertFrameThickness alert==true
|
|
67
67
|
* @availableWhen alertFrameStatus alert==true
|
|
68
68
|
* @availableWhen alertFrameMode alert==true
|
|
69
|
-
* @availableWhen showAlertCategoryIcon alert==true
|
|
70
|
-
* @availableWhen showAlertIcon alert==true
|
|
69
|
+
* @availableWhen showAlertCategoryIcon alert==true && alertFrameType in [SmallSideFlip, LargeSideFlip, BottomFlip, TopFlip]
|
|
70
|
+
* @availableWhen showAlertIcon alert==true && alertFrameType in [LargeSideFlip, BottomFlip, TopFlip]
|
|
71
71
|
* @property progress - Shows a progress indicator, used to indicate that an user action is in progress
|
|
72
72
|
* @availableWhen progressMode progress==true
|
|
73
73
|
* @availableWhen progressValue progress==true && progressMode in [determinate, progressiveIndeterminate]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"abstract-automation-button.js","names":[],"sources":["../../../src/automation/automation-button/abstract-automation-button.ts"],"sourcesContent":["import {LitElement, TemplateResult, html, nothing} from 'lit';\nimport {property, queryAssignedElements} from 'lit/decorators.js';\nimport '../automation-button/automation-button.js';\nimport {\n AutomationButtonDirection,\n AutomationButtonOrientation,\n AutomationButtonPositioning,\n AutomationButtonReadoutPosition,\n AutomationButtonState,\n AutomationButtonVariant,\n} from '../automation-button/automation-button.js';\nimport {\n AutomationButtonReadoutStack,\n AutomationButtonReadoutStackSize,\n} from '../../components/automation-button-readout-stack/automation-button-readout-stack.js';\nimport {\n ObcAlertFrameThickness,\n ObcAlertFrameType,\n ObcAlertFrameMode,\n} from '../../components/alert-frame/alert-frame.js';\nimport {AlertType} from '../../types.js';\nimport '../automation-badge/automation-badge.js';\nimport {ObcAutomationBadgeType} from '../automation-badge/automation-badge.js';\nimport {CircularProgressMode} from '../../building-blocks/circular-progress/circular-progress.js';\n\nexport enum AutomationButtonBadgeAlert {\n None = 'none',\n Silence = 'silence',\n Caution = 'caution',\n Warning = 'warning',\n Alarm = 'alarm',\n LevelCritical = 'level-critical',\n LevelHigh = 'level-high',\n LevelMedium = 'level-medium',\n LevelLow = 'level-low',\n LevelDiagnostic = 'level-diagnostic',\n}\n\nexport enum AutomationButtonBadgeInterlock {\n None = 'none',\n Interlock = 'interlock',\n InterlockInhibit = 'interlock-inhibit',\n}\n\nexport enum AutomationButtonBadgeControl {\n None = 'none',\n Local = 'local',\n LocalOnly = 'local-only',\n Manual = 'manual',\n ManualOnly = 'manual-only',\n Auto = 'auto',\n}\n\nexport enum AutomationButtonBadgeCommandLocked {\n None = 'none',\n CommandLocked = 'command-locked',\n}\n\n/**\n * Base class for the automation device buttons.\n *\n * Renders an `<obc-automation-button>` with the shared surface every device\n * button needs: the readout stack and its status row, the alert frame, the\n * circular progress indicator, and the four badge corners (control, alert,\n * interlock, command-locked) with their slots and enum-driven fallbacks.\n *\n * ## Usage Guidelines\n *\n * Not registered as a custom element. A subclass supplies the device\n * rendering through `icon`, `_on` and `_variant`, and may add rows to the\n * readout stack through `extraReadouts`. `ObcAbstractAutomationButtonSquared`\n * and `ObcAbstractAutomationButtonMotorized` extend it further;\n * `obc-analog-valve` and `obc-digital-valve` extend it directly.\n *\n * @availableWhen readoutPosition showReadoutStack==true\n * @availableWhen showStatus showReadoutStack==true\n * @availableWhen readoutSize showReadoutStack==true\n * @availableWhen tag showReadoutStack==true\n * @property activated - Enables the activated background color, used to indicate that the button is activated/selected.\n * @availableWhen alertFrameType alert==true\n * @availableWhen alertFrameThickness alert==true\n * @availableWhen alertFrameStatus alert==true\n * @availableWhen alertFrameMode alert==true\n * @availableWhen showAlertCategoryIcon alert==true\n * @availableWhen showAlertIcon alert==true\n * @property progress - Shows a progress indicator, used to indicate that an user action is in progress\n * @availableWhen progressMode progress==true\n * @availableWhen progressValue progress==true && progressMode in [determinate, progressiveIndeterminate]\n */\nexport class ObcAbstractAutomationButton extends LitElement {\n @property({type: Boolean, attribute: false}) showReadoutStack: boolean = true;\n @property({type: String}) readoutPosition: AutomationButtonReadoutPosition =\n AutomationButtonReadoutPosition.bottom;\n @property({type: Boolean, attribute: false}) showStatus: boolean = true;\n @property({type: String}) readoutSize: AutomationButtonReadoutStackSize =\n AutomationButtonReadoutStackSize.regular;\n @property({type: String}) tag: string | null = null;\n\n @property({type: String}) positioning: AutomationButtonPositioning =\n AutomationButtonPositioning.point;\n @property({type: Boolean}) activated: boolean = false;\n @property({type: Boolean}) alert: boolean = false;\n @property({type: String}) alertFrameType: ObcAlertFrameType =\n ObcAlertFrameType.SmallSideFlip;\n @property({type: String}) alertFrameThickness: ObcAlertFrameThickness =\n ObcAlertFrameThickness.Small;\n @property({type: String}) alertFrameStatus: AlertType = AlertType.Alarm;\n @property({type: String}) alertFrameMode: ObcAlertFrameMode =\n ObcAlertFrameMode.ackedActive;\n @property({type: Boolean, attribute: false}) showAlertCategoryIcon: boolean =\n true;\n @property({type: Boolean}) showAlertIcon: boolean = false;\n @property({type: Boolean}) progress: boolean = false;\n @property({type: String}) progressMode: CircularProgressMode =\n CircularProgressMode.indeterminate;\n @property({type: Number}) progressValue: number = 0;\n\n @property({type: String}) badgeControl: AutomationButtonBadgeControl =\n AutomationButtonBadgeControl.None;\n @property({type: String})\n badgeCommandLocked: AutomationButtonBadgeCommandLocked =\n AutomationButtonBadgeCommandLocked.None;\n @property({type: String}) badgeInterlock: AutomationButtonBadgeInterlock =\n AutomationButtonBadgeInterlock.None;\n @property({type: String}) badgeAlert: AutomationButtonBadgeAlert =\n AutomationButtonBadgeAlert.None;\n\n get icon(): TemplateResult {\n throw new Error('Method \"icon\" must be implemented in subclass');\n }\n\n get _on(): boolean {\n throw new Error('Method \"_on\" must be implemented in subclass');\n }\n\n get _variant(): AutomationButtonVariant {\n // @ts-expect-error - property should be defined in subclass\n return this.variant as AutomationButtonVariant;\n }\n\n get _orientation(): AutomationButtonOrientation {\n return AutomationButtonOrientation.horizontal;\n }\n\n get _direction(): AutomationButtonDirection {\n if ('direction' in this) {\n return this.direction as AutomationButtonDirection;\n }\n return AutomationButtonDirection.forward;\n }\n\n get extraReadouts(): AutomationButtonReadoutStack[] {\n return [];\n }\n\n @queryAssignedElements({slot: 'badge-top-right'})\n badgeTopRight!: HTMLElement[];\n @queryAssignedElements({slot: 'badge-top-left'})\n badgeTopLeft!: HTMLElement[];\n @queryAssignedElements({slot: 'badge-bottom-left'})\n badgeBottomLeft!: HTMLElement[];\n @queryAssignedElements({slot: 'badge-bottom-right'})\n badgeBottomRight!: HTMLElement[];\n\n private getBadgeSpacer(): boolean {\n if (!this.showReadoutStack) {\n return false;\n }\n\n const topLeft =\n this.badgeTopLeft.length > 0 || this.getBadgeControlType() !== null;\n const topRight =\n this.badgeTopRight.length > 0 || this.getBadgeAlertType() !== null;\n const bottomLeft =\n this.badgeBottomLeft.length > 0 || this.getBadgeInterlockType() !== null;\n const bottomRight =\n this.badgeBottomRight.length > 0 ||\n this.getBadgeCommandLockedType() !== null;\n if (this.readoutPosition === AutomationButtonReadoutPosition.top) {\n return topRight || topLeft;\n } else if (\n this.readoutPosition === AutomationButtonReadoutPosition.bottom\n ) {\n return bottomLeft || bottomRight;\n } else if (this.readoutPosition === AutomationButtonReadoutPosition.left) {\n return topLeft || bottomLeft;\n } else if (this.readoutPosition === AutomationButtonReadoutPosition.right) {\n return topRight || bottomRight;\n }\n return false;\n }\n\n private handleBadgeSlotChange() {\n this.requestUpdate();\n }\n\n private getBadgeAlertType(): ObcAutomationBadgeType | null {\n if (this.badgeAlert === AutomationButtonBadgeAlert.Silence) {\n return ObcAutomationBadgeType.AlertSilenced;\n } else if (this.badgeAlert === AutomationButtonBadgeAlert.Caution) {\n return ObcAutomationBadgeType.Caution;\n } else if (this.badgeAlert === AutomationButtonBadgeAlert.Warning) {\n return ObcAutomationBadgeType.Warning;\n } else if (this.badgeAlert === AutomationButtonBadgeAlert.Alarm) {\n return ObcAutomationBadgeType.Alarm;\n } else if (this.badgeAlert === AutomationButtonBadgeAlert.LevelCritical) {\n return ObcAutomationBadgeType.LevelCritical;\n } else if (this.badgeAlert === AutomationButtonBadgeAlert.LevelHigh) {\n return ObcAutomationBadgeType.LevelHigh;\n } else if (this.badgeAlert === AutomationButtonBadgeAlert.LevelMedium) {\n return ObcAutomationBadgeType.LevelMedium;\n } else if (this.badgeAlert === AutomationButtonBadgeAlert.LevelLow) {\n return ObcAutomationBadgeType.LevelLow;\n } else if (this.badgeAlert === AutomationButtonBadgeAlert.LevelDiagnostic) {\n return ObcAutomationBadgeType.LevelDiagnostic;\n }\n return null;\n }\n\n private getBadgeControlType(): ObcAutomationBadgeType | null {\n if (this.badgeControl === AutomationButtonBadgeControl.Local) {\n return ObcAutomationBadgeType.Local;\n } else if (this.badgeControl === AutomationButtonBadgeControl.LocalOnly) {\n return ObcAutomationBadgeType.LocalOnly;\n } else if (this.badgeControl === AutomationButtonBadgeControl.Manual) {\n return ObcAutomationBadgeType.Manual;\n } else if (this.badgeControl === AutomationButtonBadgeControl.ManualOnly) {\n return ObcAutomationBadgeType.ManualOnly;\n } else if (this.badgeControl === AutomationButtonBadgeControl.Auto) {\n return ObcAutomationBadgeType.Auto;\n }\n return null;\n }\n\n private getBadgeInterlockType(): ObcAutomationBadgeType | null {\n if (this.badgeInterlock === AutomationButtonBadgeInterlock.Interlock) {\n return ObcAutomationBadgeType.Interlock;\n } else if (\n this.badgeInterlock === AutomationButtonBadgeInterlock.InterlockInhibit\n ) {\n return ObcAutomationBadgeType.InterlockInhibit;\n }\n return null;\n }\n\n private getBadgeCommandLockedType(): ObcAutomationBadgeType | null {\n if (\n this.badgeCommandLocked ===\n AutomationButtonBadgeCommandLocked.CommandLocked\n ) {\n return ObcAutomationBadgeType.CommandLocked;\n }\n return null;\n }\n\n override render() {\n const readouts: AutomationButtonReadoutStack[] = [...this.extraReadouts];\n const badgeAlertType = this.getBadgeAlertType();\n const badgeControlType = this.getBadgeControlType();\n const badgeInterlockType = this.getBadgeInterlockType();\n const badgeCommandLockedType = this.getBadgeCommandLockedType();\n\n return html`<obc-automation-button\n .state=${\n this._on ? AutomationButtonState.open : AutomationButtonState.closed\n }\n .readouts=${readouts}\n .tag=${this.tag}\n .showReadoutStack=${this.showReadoutStack}\n .readoutPosition=${this.readoutPosition}\n .readoutSize=${this.readoutSize}\n ?alert=${this.alert}\n .alertFrameType=${this.alertFrameType}\n .alertFrameThickness=${this.alertFrameThickness}\n .alertFrameStatus=${this.alertFrameStatus}\n .alertFrameMode=${this.alertFrameMode}\n .showAlertCategoryIcon=${this.showAlertCategoryIcon}\n .showAlertIcon=${this.showAlertIcon}\n ?progress=${this.progress}\n .progressMode=${this.progressMode}\n .progressValue=${this.progressValue}\n .variant=${this._variant}\n .direction=${this._direction}\n .orientation=${this._orientation}\n .hasBadgeSpacer=${this.getBadgeSpacer()}\n .positioning=${this.positioning}\n ?activated=${this.activated}\n >\n ${this.icon}\n <slot\n name=\"badge-top-right\"\n slot=\"badge-top-right\"\n @slotchange=${this.handleBadgeSlotChange}\n >\n ${\n badgeAlertType\n ? html`<obc-automation-badge\n .type=${badgeAlertType}\n ></obc-automation-badge>`\n : nothing\n }\n </slot>\n <slot\n name=\"badge-top-left\"\n slot=\"badge-top-left\"\n @slotchange=${this.handleBadgeSlotChange}\n >\n ${\n badgeControlType\n ? html`<obc-automation-badge\n .type=${badgeControlType}\n ></obc-automation-badge>`\n : nothing\n }\n </slot>\n <slot\n name=\"badge-bottom-left\"\n slot=\"badge-bottom-left\"\n @slotchange=${this.handleBadgeSlotChange}\n >\n ${\n badgeInterlockType\n ? html`<obc-automation-badge\n .type=${badgeInterlockType}\n ></obc-automation-badge>`\n : nothing\n }\n </slot>\n <slot\n name=\"badge-bottom-right\"\n slot=\"badge-bottom-right\"\n @slotchange=${this.handleBadgeSlotChange}\n >\n ${\n badgeCommandLockedType\n ? html`<obc-automation-badge\n .type=${badgeCommandLockedType}\n ></obc-automation-badge>`\n : nothing\n }\n </slot>\n </obc-automation-button>`;\n }\n}\n"],"mappings":";;;;;;;;;;AAyBA,IAAY,6BAAL,yBAAA,4BAAA;CACL,2BAAA,UAAA;CACA,2BAAA,aAAA;CACA,2BAAA,aAAA;CACA,2BAAA,aAAA;CACA,2BAAA,WAAA;CACA,2BAAA,mBAAA;CACA,2BAAA,eAAA;CACA,2BAAA,iBAAA;CACA,2BAAA,cAAA;CACA,2BAAA,qBAAA;;AACF,EAAA,CAAA,CAAA;AAEA,IAAY,iCAAL,yBAAA,gCAAA;CACL,+BAAA,UAAA;CACA,+BAAA,eAAA;CACA,+BAAA,sBAAA;;AACF,EAAA,CAAA,CAAA;AAEA,IAAY,+BAAL,yBAAA,8BAAA;CACL,6BAAA,UAAA;CACA,6BAAA,WAAA;CACA,6BAAA,eAAA;CACA,6BAAA,YAAA;CACA,6BAAA,gBAAA;CACA,6BAAA,UAAA;;AACF,EAAA,CAAA,CAAA;AAEA,IAAY,qCAAL,yBAAA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,KAAA,CAAA;AAEvB,WAAA,CAAA,SAAS,EAAC,MAAM,OAAM,CAAC,CAAA,GAAA,4BAAA,WAAA,gBAAA,KAAA,CAAA;AAEvB,WAAA,CAAA,SAAS,EAAC,MAAM,OAAM,CAAC,CAAA,GAAA,4BAAA,WAAA,sBAAA,KAAA,CAAA;AAGvB,WAAA,CAAA,SAAS,EAAC,MAAM,OAAM,CAAC,CAAA,GAAA,4BAAA,WAAA,kBAAA,KAAA,CAAA;AAEvB,WAAA,CAAA,SAAS,EAAC,MAAM,OAAM,CAAC,CAAA,GAAA,4BAAA,WAAA,cAAA,KAAA,CAAA;AA+BvB,WAAA,CAAA,sBAAsB,EAAC,MAAM,kBAAiB,CAAC,CAAA,GAAA,4BAAA,WAAA,iBAAA,KAAA,CAAA;AAE/C,WAAA,CAAA,sBAAsB,EAAC,MAAM,iBAAgB,CAAC,CAAA,GAAA,4BAAA,WAAA,gBAAA,KAAA,CAAA;AAE9C,WAAA,CAAA,sBAAsB,EAAC,MAAM,oBAAmB,CAAC,CAAA,GAAA,4BAAA,WAAA,mBAAA,KAAA,CAAA;AAEjD,WAAA,CAAA,sBAAsB,EAAC,MAAM,qBAAoB,CAAC,CAAA,GAAA,4BAAA,WAAA,oBAAA,KAAA,CAAA"}
|
|
1
|
+
{"version":3,"file":"abstract-automation-button.js","names":[],"sources":["../../../src/automation/automation-button/abstract-automation-button.ts"],"sourcesContent":["import {LitElement, TemplateResult, html, nothing} from 'lit';\nimport {property, queryAssignedElements} from 'lit/decorators.js';\nimport '../automation-button/automation-button.js';\nimport {\n AutomationButtonDirection,\n AutomationButtonOrientation,\n AutomationButtonPositioning,\n AutomationButtonReadoutPosition,\n AutomationButtonState,\n AutomationButtonVariant,\n} from '../automation-button/automation-button.js';\nimport {\n AutomationButtonReadoutStack,\n AutomationButtonReadoutStackSize,\n} from '../../components/automation-button-readout-stack/automation-button-readout-stack.js';\nimport {\n ObcAlertFrameThickness,\n ObcAlertFrameType,\n ObcAlertFrameMode,\n} from '../../components/alert-frame/alert-frame.js';\nimport {AlertType} from '../../types.js';\nimport '../automation-badge/automation-badge.js';\nimport {ObcAutomationBadgeType} from '../automation-badge/automation-badge.js';\nimport {CircularProgressMode} from '../../building-blocks/circular-progress/circular-progress.js';\n\nexport enum AutomationButtonBadgeAlert {\n None = 'none',\n Silence = 'silence',\n Caution = 'caution',\n Warning = 'warning',\n Alarm = 'alarm',\n LevelCritical = 'level-critical',\n LevelHigh = 'level-high',\n LevelMedium = 'level-medium',\n LevelLow = 'level-low',\n LevelDiagnostic = 'level-diagnostic',\n}\n\nexport enum AutomationButtonBadgeInterlock {\n None = 'none',\n Interlock = 'interlock',\n InterlockInhibit = 'interlock-inhibit',\n}\n\nexport enum AutomationButtonBadgeControl {\n None = 'none',\n Local = 'local',\n LocalOnly = 'local-only',\n Manual = 'manual',\n ManualOnly = 'manual-only',\n Auto = 'auto',\n}\n\nexport enum AutomationButtonBadgeCommandLocked {\n None = 'none',\n CommandLocked = 'command-locked',\n}\n\n/**\n * Base class for the automation device buttons.\n *\n * Renders an `<obc-automation-button>` with the shared surface every device\n * button needs: the readout stack and its status row, the alert frame, the\n * circular progress indicator, and the four badge corners (control, alert,\n * interlock, command-locked) with their slots and enum-driven fallbacks.\n *\n * ## Usage Guidelines\n *\n * Not registered as a custom element. A subclass supplies the device\n * rendering through `icon`, `_on` and `_variant`, and may add rows to the\n * readout stack through `extraReadouts`. `ObcAbstractAutomationButtonSquared`\n * and `ObcAbstractAutomationButtonMotorized` extend it further;\n * `obc-analog-valve` and `obc-digital-valve` extend it directly.\n *\n * @availableWhen readoutPosition showReadoutStack==true\n * @availableWhen showStatus showReadoutStack==true\n * @availableWhen readoutSize showReadoutStack==true\n * @availableWhen tag showReadoutStack==true\n * @property activated - Enables the activated background color, used to indicate that the button is activated/selected.\n * @availableWhen alertFrameType alert==true\n * @availableWhen alertFrameThickness alert==true\n * @availableWhen alertFrameStatus alert==true\n * @availableWhen alertFrameMode alert==true\n * @availableWhen showAlertCategoryIcon alert==true && alertFrameType in [SmallSideFlip, LargeSideFlip, BottomFlip, TopFlip]\n * @availableWhen showAlertIcon alert==true && alertFrameType in [LargeSideFlip, BottomFlip, TopFlip]\n * @property progress - Shows a progress indicator, used to indicate that an user action is in progress\n * @availableWhen progressMode progress==true\n * @availableWhen progressValue progress==true && progressMode in [determinate, progressiveIndeterminate]\n */\nexport class ObcAbstractAutomationButton extends LitElement {\n @property({type: Boolean, attribute: false}) showReadoutStack: boolean = true;\n @property({type: String}) readoutPosition: AutomationButtonReadoutPosition =\n AutomationButtonReadoutPosition.bottom;\n @property({type: Boolean, attribute: false}) showStatus: boolean = true;\n @property({type: String}) readoutSize: AutomationButtonReadoutStackSize =\n AutomationButtonReadoutStackSize.regular;\n @property({type: String}) tag: string | null = null;\n\n @property({type: String}) positioning: AutomationButtonPositioning =\n AutomationButtonPositioning.point;\n @property({type: Boolean}) activated: boolean = false;\n @property({type: Boolean}) alert: boolean = false;\n @property({type: String}) alertFrameType: ObcAlertFrameType =\n ObcAlertFrameType.SmallSideFlip;\n @property({type: String}) alertFrameThickness: ObcAlertFrameThickness =\n ObcAlertFrameThickness.Small;\n @property({type: String}) alertFrameStatus: AlertType = AlertType.Alarm;\n @property({type: String}) alertFrameMode: ObcAlertFrameMode =\n ObcAlertFrameMode.ackedActive;\n @property({type: Boolean, attribute: false}) showAlertCategoryIcon: boolean =\n true;\n @property({type: Boolean}) showAlertIcon: boolean = false;\n @property({type: Boolean}) progress: boolean = false;\n @property({type: String}) progressMode: CircularProgressMode =\n CircularProgressMode.indeterminate;\n @property({type: Number}) progressValue: number = 0;\n\n @property({type: String}) badgeControl: AutomationButtonBadgeControl =\n AutomationButtonBadgeControl.None;\n @property({type: String})\n badgeCommandLocked: AutomationButtonBadgeCommandLocked =\n AutomationButtonBadgeCommandLocked.None;\n @property({type: String}) badgeInterlock: AutomationButtonBadgeInterlock =\n AutomationButtonBadgeInterlock.None;\n @property({type: String}) badgeAlert: AutomationButtonBadgeAlert =\n AutomationButtonBadgeAlert.None;\n\n get icon(): TemplateResult {\n throw new Error('Method \"icon\" must be implemented in subclass');\n }\n\n get _on(): boolean {\n throw new Error('Method \"_on\" must be implemented in subclass');\n }\n\n get _variant(): AutomationButtonVariant {\n // @ts-expect-error - property should be defined in subclass\n return this.variant as AutomationButtonVariant;\n }\n\n get _orientation(): AutomationButtonOrientation {\n return AutomationButtonOrientation.horizontal;\n }\n\n get _direction(): AutomationButtonDirection {\n if ('direction' in this) {\n return this.direction as AutomationButtonDirection;\n }\n return AutomationButtonDirection.forward;\n }\n\n get extraReadouts(): AutomationButtonReadoutStack[] {\n return [];\n }\n\n @queryAssignedElements({slot: 'badge-top-right'})\n badgeTopRight!: HTMLElement[];\n @queryAssignedElements({slot: 'badge-top-left'})\n badgeTopLeft!: HTMLElement[];\n @queryAssignedElements({slot: 'badge-bottom-left'})\n badgeBottomLeft!: HTMLElement[];\n @queryAssignedElements({slot: 'badge-bottom-right'})\n badgeBottomRight!: HTMLElement[];\n\n private getBadgeSpacer(): boolean {\n if (!this.showReadoutStack) {\n return false;\n }\n\n const topLeft =\n this.badgeTopLeft.length > 0 || this.getBadgeControlType() !== null;\n const topRight =\n this.badgeTopRight.length > 0 || this.getBadgeAlertType() !== null;\n const bottomLeft =\n this.badgeBottomLeft.length > 0 || this.getBadgeInterlockType() !== null;\n const bottomRight =\n this.badgeBottomRight.length > 0 ||\n this.getBadgeCommandLockedType() !== null;\n if (this.readoutPosition === AutomationButtonReadoutPosition.top) {\n return topRight || topLeft;\n } else if (\n this.readoutPosition === AutomationButtonReadoutPosition.bottom\n ) {\n return bottomLeft || bottomRight;\n } else if (this.readoutPosition === AutomationButtonReadoutPosition.left) {\n return topLeft || bottomLeft;\n } else if (this.readoutPosition === AutomationButtonReadoutPosition.right) {\n return topRight || bottomRight;\n }\n return false;\n }\n\n private handleBadgeSlotChange() {\n this.requestUpdate();\n }\n\n private getBadgeAlertType(): ObcAutomationBadgeType | null {\n if (this.badgeAlert === AutomationButtonBadgeAlert.Silence) {\n return ObcAutomationBadgeType.AlertSilenced;\n } else if (this.badgeAlert === AutomationButtonBadgeAlert.Caution) {\n return ObcAutomationBadgeType.Caution;\n } else if (this.badgeAlert === AutomationButtonBadgeAlert.Warning) {\n return ObcAutomationBadgeType.Warning;\n } else if (this.badgeAlert === AutomationButtonBadgeAlert.Alarm) {\n return ObcAutomationBadgeType.Alarm;\n } else if (this.badgeAlert === AutomationButtonBadgeAlert.LevelCritical) {\n return ObcAutomationBadgeType.LevelCritical;\n } else if (this.badgeAlert === AutomationButtonBadgeAlert.LevelHigh) {\n return ObcAutomationBadgeType.LevelHigh;\n } else if (this.badgeAlert === AutomationButtonBadgeAlert.LevelMedium) {\n return ObcAutomationBadgeType.LevelMedium;\n } else if (this.badgeAlert === AutomationButtonBadgeAlert.LevelLow) {\n return ObcAutomationBadgeType.LevelLow;\n } else if (this.badgeAlert === AutomationButtonBadgeAlert.LevelDiagnostic) {\n return ObcAutomationBadgeType.LevelDiagnostic;\n }\n return null;\n }\n\n private getBadgeControlType(): ObcAutomationBadgeType | null {\n if (this.badgeControl === AutomationButtonBadgeControl.Local) {\n return ObcAutomationBadgeType.Local;\n } else if (this.badgeControl === AutomationButtonBadgeControl.LocalOnly) {\n return ObcAutomationBadgeType.LocalOnly;\n } else if (this.badgeControl === AutomationButtonBadgeControl.Manual) {\n return ObcAutomationBadgeType.Manual;\n } else if (this.badgeControl === AutomationButtonBadgeControl.ManualOnly) {\n return ObcAutomationBadgeType.ManualOnly;\n } else if (this.badgeControl === AutomationButtonBadgeControl.Auto) {\n return ObcAutomationBadgeType.Auto;\n }\n return null;\n }\n\n private getBadgeInterlockType(): ObcAutomationBadgeType | null {\n if (this.badgeInterlock === AutomationButtonBadgeInterlock.Interlock) {\n return ObcAutomationBadgeType.Interlock;\n } else if (\n this.badgeInterlock === AutomationButtonBadgeInterlock.InterlockInhibit\n ) {\n return ObcAutomationBadgeType.InterlockInhibit;\n }\n return null;\n }\n\n private getBadgeCommandLockedType(): ObcAutomationBadgeType | null {\n if (\n this.badgeCommandLocked ===\n AutomationButtonBadgeCommandLocked.CommandLocked\n ) {\n return ObcAutomationBadgeType.CommandLocked;\n }\n return null;\n }\n\n override render() {\n const readouts: AutomationButtonReadoutStack[] = [...this.extraReadouts];\n const badgeAlertType = this.getBadgeAlertType();\n const badgeControlType = this.getBadgeControlType();\n const badgeInterlockType = this.getBadgeInterlockType();\n const badgeCommandLockedType = this.getBadgeCommandLockedType();\n\n return html`<obc-automation-button\n .state=${\n this._on ? AutomationButtonState.open : AutomationButtonState.closed\n }\n .readouts=${readouts}\n .tag=${this.tag}\n .showReadoutStack=${this.showReadoutStack}\n .readoutPosition=${this.readoutPosition}\n .readoutSize=${this.readoutSize}\n ?alert=${this.alert}\n .alertFrameType=${this.alertFrameType}\n .alertFrameThickness=${this.alertFrameThickness}\n .alertFrameStatus=${this.alertFrameStatus}\n .alertFrameMode=${this.alertFrameMode}\n .showAlertCategoryIcon=${this.showAlertCategoryIcon}\n .showAlertIcon=${this.showAlertIcon}\n ?progress=${this.progress}\n .progressMode=${this.progressMode}\n .progressValue=${this.progressValue}\n .variant=${this._variant}\n .direction=${this._direction}\n .orientation=${this._orientation}\n .hasBadgeSpacer=${this.getBadgeSpacer()}\n .positioning=${this.positioning}\n ?activated=${this.activated}\n >\n ${this.icon}\n <slot\n name=\"badge-top-right\"\n slot=\"badge-top-right\"\n @slotchange=${this.handleBadgeSlotChange}\n >\n ${\n badgeAlertType\n ? html`<obc-automation-badge\n .type=${badgeAlertType}\n ></obc-automation-badge>`\n : nothing\n }\n </slot>\n <slot\n name=\"badge-top-left\"\n slot=\"badge-top-left\"\n @slotchange=${this.handleBadgeSlotChange}\n >\n ${\n badgeControlType\n ? html`<obc-automation-badge\n .type=${badgeControlType}\n ></obc-automation-badge>`\n : nothing\n }\n </slot>\n <slot\n name=\"badge-bottom-left\"\n slot=\"badge-bottom-left\"\n @slotchange=${this.handleBadgeSlotChange}\n >\n ${\n badgeInterlockType\n ? html`<obc-automation-badge\n .type=${badgeInterlockType}\n ></obc-automation-badge>`\n : nothing\n }\n </slot>\n <slot\n name=\"badge-bottom-right\"\n slot=\"badge-bottom-right\"\n @slotchange=${this.handleBadgeSlotChange}\n >\n ${\n badgeCommandLockedType\n ? html`<obc-automation-badge\n .type=${badgeCommandLockedType}\n ></obc-automation-badge>`\n : nothing\n }\n </slot>\n </obc-automation-button>`;\n }\n}\n"],"mappings":";;;;;;;;;;AAyBA,IAAY,6BAAL,yBAAA,4BAAA;CACL,2BAAA,UAAA;CACA,2BAAA,aAAA;CACA,2BAAA,aAAA;CACA,2BAAA,aAAA;CACA,2BAAA,WAAA;CACA,2BAAA,mBAAA;CACA,2BAAA,eAAA;CACA,2BAAA,iBAAA;CACA,2BAAA,cAAA;CACA,2BAAA,qBAAA;;AACF,EAAA,CAAA,CAAA;AAEA,IAAY,iCAAL,yBAAA,gCAAA;CACL,+BAAA,UAAA;CACA,+BAAA,eAAA;CACA,+BAAA,sBAAA;;AACF,EAAA,CAAA,CAAA;AAEA,IAAY,+BAAL,yBAAA,8BAAA;CACL,6BAAA,UAAA;CACA,6BAAA,WAAA;CACA,6BAAA,eAAA;CACA,6BAAA,YAAA;CACA,6BAAA,gBAAA;CACA,6BAAA,UAAA;;AACF,EAAA,CAAA,CAAA;AAEA,IAAY,qCAAL,yBAAA,oCAAA;CACL,mCAAA,UAAA;CACA,mCAAA,mBAAA;;AACF,EAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiCA,IAAa,8BAAb,cAAiD,WAAW;;;EACe,KAAA,mBAAA;EAEvE,KAAA,kBAAA,gCAAgC;EACiC,KAAA,aAAA;EAEjE,KAAA,cAAA,iCAAiC;EACY,KAAA,MAAA;EAG7C,KAAA,cAAA,4BAA4B;EACkB,KAAA,YAAA;EACJ,KAAA,QAAA;EAE1C,KAAA,iBAAA,kBAAkB;EAElB,KAAA,sBAAA,uBAAuB;EAC+B,KAAA,mBAAA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vB,WAAA,CAAA,sBAAsB,EAAC,MAAM,kBAAiB,CAAC,CAAA,GAAA,4BAAA,WAAA,iBAAA,KAAA,CAAA;AAE/C,WAAA,CAAA,sBAAsB,EAAC,MAAM,iBAAgB,CAAC,CAAA,GAAA,4BAAA,WAAA,gBAAA,KAAA,CAAA;AAE9C,WAAA,CAAA,sBAAsB,EAAC,MAAM,oBAAmB,CAAC,CAAA,GAAA,4BAAA,WAAA,mBAAA,KAAA,CAAA;AAEjD,WAAA,CAAA,sBAAsB,EAAC,MAAM,qBAAoB,CAAC,CAAA,GAAA,4BAAA,WAAA,oBAAA,KAAA,CAAA"}
|
|
@@ -84,8 +84,8 @@ export declare enum AutomationButtonPositioning {
|
|
|
84
84
|
* @availableWhen alertFrameThickness alert==true
|
|
85
85
|
* @availableWhen alertFrameStatus alert==true
|
|
86
86
|
* @availableWhen alertFrameMode alert==true
|
|
87
|
-
* @availableWhen showAlertCategoryIcon alert==true && alertFrameType in [LargeSideFlip, BottomFlip, TopFlip]
|
|
88
|
-
* @availableWhen showAlertIcon alert==true
|
|
87
|
+
* @availableWhen showAlertCategoryIcon alert==true && alertFrameType in [SmallSideFlip, LargeSideFlip, BottomFlip, TopFlip]
|
|
88
|
+
* @availableWhen showAlertIcon alert==true && alertFrameType in [LargeSideFlip, BottomFlip, TopFlip]
|
|
89
89
|
* @availableWhen progressMode progress==true
|
|
90
90
|
* @availableWhen progressValue progress==true && progressMode in [determinate, progressive-indeterminate]
|
|
91
91
|
* @availableWhen direction variant in [double, forward, flatForward]
|
|
@@ -126,9 +126,9 @@ export declare class ObcAutomationButton extends LitElement {
|
|
|
126
126
|
alertFrameStatus: AlertType;
|
|
127
127
|
/** Available when `alert==true`. */
|
|
128
128
|
alertFrameMode: ObcAlertFrameMode;
|
|
129
|
-
/** Available when `alert==true && alertFrameType in [LargeSideFlip, BottomFlip, TopFlip]`. */
|
|
129
|
+
/** Available when `alert==true && alertFrameType in [SmallSideFlip, LargeSideFlip, BottomFlip, TopFlip]`. */
|
|
130
130
|
showAlertCategoryIcon: boolean;
|
|
131
|
-
/** Available when `alert==true`. */
|
|
131
|
+
/** Available when `alert==true && alertFrameType in [LargeSideFlip, BottomFlip, TopFlip]`. */
|
|
132
132
|
showAlertIcon: boolean;
|
|
133
133
|
progress: boolean;
|
|
134
134
|
/** Available when `progress==true`. */
|