@oicl/openbridge-webcomponents-full-bundle 2.0.0-next.63 → 2.0.0-next.65
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/bundle/openbridge-webcomponents.bundle.js +392 -381
- package/bundle/openbridge-webcomponents.bundle.js.map +1 -1
- package/custom-elements.json +57 -199
- package/dist/alert-severity.d.ts.map +1 -1
- package/dist/alert-severity.js +37 -35
- package/dist/alert-severity.js.map +1 -1
- package/dist/ar/building-blocks/poi-header/poi-header.css.js +15 -15
- package/dist/ar/building-blocks/poi-header/poi-header.d.ts +6 -6
- package/dist/ar/building-blocks/poi-header/poi-header.d.ts.map +1 -1
- package/dist/ar/building-blocks/poi-header/poi-header.js +5 -5
- package/dist/ar/building-blocks/poi-header/poi-header.js.map +1 -1
- package/dist/ar/poi-button/poi-button.css.js +31 -30
- package/dist/ar/poi-button/poi-button.css.js.map +1 -1
- package/dist/ar/poi-button/poi-button.d.ts +6 -6
- package/dist/ar/poi-button/poi-button.d.ts.map +1 -1
- package/dist/ar/poi-button/poi-button.js +15 -15
- package/dist/ar/poi-button/poi-button.js.map +1 -1
- package/dist/ar/types.d.ts +5 -5
- package/dist/ar/types.d.ts.map +1 -1
- package/dist/ar/types.js +5 -5
- package/dist/ar/types.js.map +1 -1
- package/dist/automation/automation-badge/automation-badge.d.ts +7 -7
- package/dist/automation/automation-badge/automation-badge.d.ts.map +1 -1
- package/dist/automation/automation-badge/automation-badge.js +29 -29
- package/dist/automation/automation-badge/automation-badge.js.map +1 -1
- package/dist/automation/automation-button/abstract-automation-button.d.ts +5 -5
- package/dist/automation/automation-button/abstract-automation-button.d.ts.map +1 -1
- package/dist/automation/automation-button/abstract-automation-button.js +15 -15
- package/dist/automation/automation-button/abstract-automation-button.js.map +1 -1
- package/dist/automation/automation-tank/automation-tank.js +10 -10
- package/dist/automation/automation-tank/automation-tank.js.map +1 -1
- package/dist/components/accordion-card/accordion-card.css.js +5 -5
- package/dist/components/alert-button/alert-button.css.js +128 -128
- package/dist/components/alert-frame/alert-frame.css.js +6 -6
- package/dist/components/alert-frame/alert-frame.d.ts +4 -4
- package/dist/components/alert-frame/alert-frame.js.map +1 -1
- package/dist/components/alert-icon/alert-icon.js +4 -4
- package/dist/components/alert-icon/alert-icon.js.map +1 -1
- package/dist/components/badge/badge.css.js +10 -10
- package/dist/components/badge/badge.d.ts +13 -13
- package/dist/components/badge/badge.d.ts.map +1 -1
- package/dist/components/badge/badge.js +10 -10
- package/dist/components/badge/badge.js.map +1 -1
- package/dist/components/navigation-item/navigation-item.d.ts +7 -7
- package/dist/components/navigation-item/navigation-item.d.ts.map +1 -1
- package/dist/components/navigation-item/navigation-item.js +3 -15
- package/dist/components/navigation-item/navigation-item.js.map +1 -1
- package/dist/components/navigation-item-group/navigation-item-group.d.ts +8 -7
- package/dist/components/navigation-item-group/navigation-item-group.d.ts.map +1 -1
- package/dist/components/navigation-item-group/navigation-item-group.js +3 -15
- package/dist/components/navigation-item-group/navigation-item-group.js.map +1 -1
- package/dist/components/navigation-menu/navigation-menu.d.ts +2 -2
- package/dist/components/navigation-menu/navigation-menu.js.map +1 -1
- package/dist/components/tree-navigation-group/tree-navigation-group.d.ts +10 -10
- package/dist/components/tree-navigation-group/tree-navigation-group.d.ts.map +1 -1
- package/dist/components/tree-navigation-group/tree-navigation-group.js +3 -15
- package/dist/components/tree-navigation-group/tree-navigation-group.js.map +1 -1
- package/dist/components/tree-navigation-item/tree-navigation-item.css.js +13 -0
- package/dist/components/tree-navigation-item/tree-navigation-item.css.js.map +1 -1
- package/dist/components/tree-navigation-item/tree-navigation-item.d.ts +59 -8
- package/dist/components/tree-navigation-item/tree-navigation-item.d.ts.map +1 -1
- package/dist/components/tree-navigation-item/tree-navigation-item.js +46 -17
- package/dist/components/tree-navigation-item/tree-navigation-item.js.map +1 -1
- package/dist/manual-icon/icon-alerts-critical-twotone.d.ts +1 -1
- package/dist/manual-icon/icon-alerts-critical-twotone.js.map +1 -1
- package/dist/manual-icon/icon-alerts-diagnostic-twotone.d.ts +1 -1
- package/dist/manual-icon/icon-alerts-diagnostic-twotone.js.map +1 -1
- package/dist/types.d.ts +5 -5
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +11 -11
- package/dist/types.js.map +1 -1
- package/package.json +1 -1
- package/src/alert-severity.ts +43 -41
- package/src/ar/building-blocks/poi-header/poi-header.css +15 -15
- package/src/ar/building-blocks/poi-header/poi-header.ts +6 -6
- package/src/ar/poi-button/poi-button.css +31 -30
- package/src/ar/poi-button/poi-button.ts +16 -16
- package/src/ar/types.ts +5 -5
- package/src/automation/automation-badge/automation-badge.ts +22 -22
- package/src/automation/automation-button/abstract-automation-button.ts +15 -15
- package/src/automation/automation-tank/automation-tank.stories.ts +6 -6
- package/src/automation/automation-tank/automation-tank.ts +10 -10
- package/src/components/accordion-card/accordion-card.css +5 -5
- package/src/components/alert-button/alert-button.css +14 -14
- package/src/components/alert-button/alert-button.stories.ts +10 -10
- package/src/components/alert-frame/alert-frame.css +6 -6
- package/src/components/alert-frame/alert-frame.stories.ts +10 -10
- package/src/components/alert-frame/alert-frame.ts +4 -4
- package/src/components/alert-icon/alert-icon.stories.ts +10 -10
- package/src/components/alert-icon/alert-icon.ts +4 -4
- package/src/components/alert-list-details/alert-list-details.stories.ts +11 -11
- package/src/components/badge/badge.css +10 -10
- package/src/components/badge/badge.stories.ts +10 -10
- package/src/components/badge/badge.ts +18 -18
- package/src/components/navigation-item/navigation-item.ts +8 -12
- package/src/components/navigation-item-group/navigation-item-group.ts +9 -12
- package/src/components/navigation-menu/navigation-menu.stories.ts +34 -6
- package/src/components/navigation-menu/navigation-menu.ts +2 -2
- package/src/components/tree-navigation/tree-navigation.stories.ts +154 -9
- package/src/components/tree-navigation-group/tree-navigation-group.ts +11 -15
- package/src/components/tree-navigation-item/tree-navigation-item.css +12 -0
- package/src/components/tree-navigation-item/tree-navigation-item.stories.ts +38 -15
- package/src/components/tree-navigation-item/tree-navigation-item.ts +98 -17
- package/src/manual-icon/icon-alerts-critical-twotone.ts +1 -1
- package/src/manual-icon/icon-alerts-diagnostic-twotone.ts +1 -1
- package/src/navigation-instruments/readout/readout.stories.ts +2 -2
- package/src/navigation-instruments/readout-list-item/readout-list-item.stories.ts +4 -4
- package/src/types.ts +10 -10
package/src/alert-severity.ts
CHANGED
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
* Centralizes the per-`AlertType` decisions shared across alert-rendering
|
|
6
6
|
* components (badges, twotone icons, frames, lists) so that severity behavior
|
|
7
7
|
* stays consistent everywhere. Supports both the legacy severities
|
|
8
|
-
* (`alarm`, `warning`, `caution`) and the
|
|
9
|
-
* (`
|
|
10
|
-
* collapsing the
|
|
8
|
+
* (`alarm`, `warning`, `caution`) and the level severities
|
|
9
|
+
* (`level-critical`, `level-high`, `level-medium`, `level-low`, `level-diagnostic`),
|
|
10
|
+
* collapsing the level set onto the legacy visual/blink treatments where they
|
|
11
11
|
* share styling.
|
|
12
12
|
*
|
|
13
13
|
* Features:
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
* severity.
|
|
19
19
|
* - Blinking: `supportsBlinking` reports whether a severity blinks,
|
|
20
20
|
* `getAlertBlinkMode` resolves its blink mode, and
|
|
21
|
-
* `getBamAlertTypeForBlinking` maps
|
|
21
|
+
* `getBamAlertTypeForBlinking` maps level severities onto the legacy type used
|
|
22
22
|
* by the bridge alert management (BAM) blink machinery.
|
|
23
23
|
* - Acknowledgement & filtering: `requiresAcknowledgement` reports whether a
|
|
24
24
|
* severity needs an ACK action, `excludedFromUnackedFilter` reports whether
|
|
@@ -36,8 +36,8 @@
|
|
|
36
36
|
* } from './alert-severity.js';
|
|
37
37
|
* import {AlertType} from './types.js';
|
|
38
38
|
*
|
|
39
|
-
* const tokens = getAlertColorTokens(AlertType.
|
|
40
|
-
* const needsAck = requiresAcknowledgement(AlertType.
|
|
39
|
+
* const tokens = getAlertColorTokens(AlertType.LevelHigh);
|
|
40
|
+
* const needsAck = requiresAcknowledgement(AlertType.LevelLow); // true
|
|
41
41
|
* alerts.sort(
|
|
42
42
|
* (a, b) =>
|
|
43
43
|
* ALERT_SEVERITY_PRIORITY.indexOf(a.type) -
|
|
@@ -67,10 +67,10 @@ export function requiresAcknowledgement(type: AlertType): boolean {
|
|
|
67
67
|
return [
|
|
68
68
|
AlertType.Alarm,
|
|
69
69
|
AlertType.Warning,
|
|
70
|
-
AlertType.
|
|
71
|
-
AlertType.
|
|
72
|
-
AlertType.
|
|
73
|
-
AlertType.
|
|
70
|
+
AlertType.LevelCritical,
|
|
71
|
+
AlertType.LevelHigh,
|
|
72
|
+
AlertType.LevelMedium,
|
|
73
|
+
AlertType.LevelLow,
|
|
74
74
|
].includes(type);
|
|
75
75
|
}
|
|
76
76
|
|
|
@@ -78,10 +78,10 @@ export function supportsBlinking(type: AlertType): boolean {
|
|
|
78
78
|
return [
|
|
79
79
|
AlertType.Alarm,
|
|
80
80
|
AlertType.Warning,
|
|
81
|
-
AlertType.
|
|
82
|
-
AlertType.
|
|
83
|
-
AlertType.
|
|
84
|
-
AlertType.
|
|
81
|
+
AlertType.LevelCritical,
|
|
82
|
+
AlertType.LevelHigh,
|
|
83
|
+
AlertType.LevelMedium,
|
|
84
|
+
AlertType.LevelLow,
|
|
85
85
|
].includes(type);
|
|
86
86
|
}
|
|
87
87
|
|
|
@@ -91,34 +91,34 @@ export function getAlertSeverityCssClass(type: AlertType): string {
|
|
|
91
91
|
|
|
92
92
|
export function getAlertColorTokens(type: AlertType): AlertColorTokens {
|
|
93
93
|
switch (type) {
|
|
94
|
-
case AlertType.
|
|
94
|
+
case AlertType.LevelCritical:
|
|
95
95
|
return {
|
|
96
96
|
bg: 'var(--critical-enabled-background-color)',
|
|
97
97
|
border: 'var(--critical-enabled-border-color)',
|
|
98
98
|
onActive: 'var(--on-critical-active-color)',
|
|
99
99
|
};
|
|
100
100
|
case AlertType.Warning:
|
|
101
|
-
case AlertType.
|
|
101
|
+
case AlertType.LevelMedium:
|
|
102
102
|
return {
|
|
103
103
|
bg: 'var(--alert-warning-color)',
|
|
104
104
|
border: 'var(--alert-warning-outline-color)',
|
|
105
105
|
onActive: 'var(--on-warning-active-color)',
|
|
106
106
|
};
|
|
107
107
|
case AlertType.Caution:
|
|
108
|
-
case AlertType.
|
|
108
|
+
case AlertType.LevelLow:
|
|
109
109
|
return {
|
|
110
110
|
bg: 'var(--alert-caution-color)',
|
|
111
111
|
border: 'var(--alert-caution-outline-color)',
|
|
112
112
|
onActive: 'var(--on-caution-active-color)',
|
|
113
113
|
};
|
|
114
|
-
case AlertType.
|
|
114
|
+
case AlertType.LevelDiagnostic:
|
|
115
115
|
return {
|
|
116
116
|
bg: 'var(--notification-enabled-background-color)',
|
|
117
117
|
border: 'var(--notification-enabled-border-color)',
|
|
118
118
|
onActive: 'var(--on-notification-active-color)',
|
|
119
119
|
};
|
|
120
120
|
case AlertType.Alarm:
|
|
121
|
-
case AlertType.
|
|
121
|
+
case AlertType.LevelHigh:
|
|
122
122
|
default:
|
|
123
123
|
return {
|
|
124
124
|
bg: 'var(--alert-alarm-color)',
|
|
@@ -130,18 +130,18 @@ export function getAlertColorTokens(type: AlertType): AlertColorTokens {
|
|
|
130
130
|
|
|
131
131
|
export function getAlertBadgeComponent(type: AlertType): AlertBadgeComponent {
|
|
132
132
|
switch (type) {
|
|
133
|
-
case AlertType.
|
|
133
|
+
case AlertType.LevelCritical:
|
|
134
134
|
return AlertBadgeComponent.Critical;
|
|
135
135
|
case AlertType.Warning:
|
|
136
|
-
case AlertType.
|
|
136
|
+
case AlertType.LevelMedium:
|
|
137
137
|
return AlertBadgeComponent.Warning;
|
|
138
138
|
case AlertType.Caution:
|
|
139
|
-
case AlertType.
|
|
139
|
+
case AlertType.LevelLow:
|
|
140
140
|
return AlertBadgeComponent.Caution;
|
|
141
|
-
case AlertType.
|
|
141
|
+
case AlertType.LevelDiagnostic:
|
|
142
142
|
return AlertBadgeComponent.Diagnostic;
|
|
143
143
|
case AlertType.Alarm:
|
|
144
|
-
case AlertType.
|
|
144
|
+
case AlertType.LevelHigh:
|
|
145
145
|
default:
|
|
146
146
|
return AlertBadgeComponent.Alarm;
|
|
147
147
|
}
|
|
@@ -159,18 +159,18 @@ export function getAlertTwotoneComponent(
|
|
|
159
159
|
type: AlertType
|
|
160
160
|
): AlertTwotoneComponent {
|
|
161
161
|
switch (type) {
|
|
162
|
-
case AlertType.
|
|
162
|
+
case AlertType.LevelCritical:
|
|
163
163
|
return AlertTwotoneComponent.Critical;
|
|
164
|
-
case AlertType.
|
|
164
|
+
case AlertType.LevelDiagnostic:
|
|
165
165
|
return AlertTwotoneComponent.Diagnostic;
|
|
166
166
|
case AlertType.Warning:
|
|
167
|
-
case AlertType.
|
|
167
|
+
case AlertType.LevelMedium:
|
|
168
168
|
return AlertTwotoneComponent.Warning;
|
|
169
169
|
case AlertType.Caution:
|
|
170
|
-
case AlertType.
|
|
170
|
+
case AlertType.LevelLow:
|
|
171
171
|
return AlertTwotoneComponent.Caution;
|
|
172
172
|
case AlertType.Alarm:
|
|
173
|
-
case AlertType.
|
|
173
|
+
case AlertType.LevelHigh:
|
|
174
174
|
default:
|
|
175
175
|
return AlertTwotoneComponent.Alarm;
|
|
176
176
|
}
|
|
@@ -185,16 +185,16 @@ export enum AlertBlinkMode {
|
|
|
185
185
|
|
|
186
186
|
export function getAlertBlinkMode(type: AlertType): AlertBlinkMode {
|
|
187
187
|
switch (type) {
|
|
188
|
-
case AlertType.
|
|
188
|
+
case AlertType.LevelCritical:
|
|
189
189
|
return AlertBlinkMode.Critical;
|
|
190
190
|
case AlertType.Warning:
|
|
191
|
-
case AlertType.
|
|
191
|
+
case AlertType.LevelMedium:
|
|
192
192
|
return AlertBlinkMode.Warning;
|
|
193
193
|
case AlertType.Caution:
|
|
194
|
-
case AlertType.
|
|
194
|
+
case AlertType.LevelLow:
|
|
195
195
|
return AlertBlinkMode.Low;
|
|
196
196
|
case AlertType.Alarm:
|
|
197
|
-
case AlertType.
|
|
197
|
+
case AlertType.LevelHigh:
|
|
198
198
|
default:
|
|
199
199
|
return AlertBlinkMode.Alarm;
|
|
200
200
|
}
|
|
@@ -202,12 +202,12 @@ export function getAlertBlinkMode(type: AlertType): AlertBlinkMode {
|
|
|
202
202
|
|
|
203
203
|
export function getBamAlertTypeForBlinking(type: AlertType): AlertType {
|
|
204
204
|
switch (type) {
|
|
205
|
-
case AlertType.
|
|
206
|
-
case AlertType.
|
|
205
|
+
case AlertType.LevelCritical:
|
|
206
|
+
case AlertType.LevelHigh:
|
|
207
207
|
return AlertType.Alarm;
|
|
208
|
-
case AlertType.
|
|
208
|
+
case AlertType.LevelMedium:
|
|
209
209
|
return AlertType.Warning;
|
|
210
|
-
case AlertType.
|
|
210
|
+
case AlertType.LevelLow:
|
|
211
211
|
return AlertType.Caution;
|
|
212
212
|
default:
|
|
213
213
|
return type;
|
|
@@ -215,11 +215,13 @@ export function getBamAlertTypeForBlinking(type: AlertType): AlertType {
|
|
|
215
215
|
}
|
|
216
216
|
|
|
217
217
|
export function excludedFromUnackedFilter(type: AlertType): boolean {
|
|
218
|
-
return [AlertType.Caution, AlertType.
|
|
218
|
+
return [AlertType.Caution, AlertType.LevelDiagnostic].includes(type);
|
|
219
219
|
}
|
|
220
220
|
|
|
221
221
|
export function usesAlarmNoAckIcon(type: AlertType): boolean {
|
|
222
|
-
return [
|
|
223
|
-
|
|
224
|
-
|
|
222
|
+
return [
|
|
223
|
+
AlertType.Alarm,
|
|
224
|
+
AlertType.LevelCritical,
|
|
225
|
+
AlertType.LevelHigh,
|
|
226
|
+
].includes(type);
|
|
225
227
|
}
|
|
@@ -32,29 +32,29 @@
|
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
.wrapper.type-id.state-caution,
|
|
35
|
-
.wrapper.type-id.state-
|
|
35
|
+
.wrapper.type-id.state-level-low {
|
|
36
36
|
background: var(--alert-caution-color);
|
|
37
37
|
border: 1px solid var(--alert-caution-outline-color);
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
.wrapper.type-id.state-warning,
|
|
41
|
-
.wrapper.type-id.state-
|
|
41
|
+
.wrapper.type-id.state-level-medium {
|
|
42
42
|
background: var(--alert-warning-color);
|
|
43
43
|
border: 1px solid var(--alert-warning-outline-color);
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
.wrapper.type-id.state-alarm,
|
|
47
|
-
.wrapper.type-id.state-
|
|
47
|
+
.wrapper.type-id.state-level-high {
|
|
48
48
|
background: var(--alert-alarm-color);
|
|
49
49
|
border: 1px solid var(--alert-alarm-outline-color);
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
-
.wrapper.type-id.state-
|
|
52
|
+
.wrapper.type-id.state-level-critical {
|
|
53
53
|
background: var(--critical-enabled-background-color);
|
|
54
54
|
border: 1px solid var(--critical-enabled-border-color);
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
-
.wrapper.type-id.state-
|
|
57
|
+
.wrapper.type-id.state-level-diagnostic {
|
|
58
58
|
background: var(--notification-enabled-background-color);
|
|
59
59
|
border: 1px solid var(--notification-enabled-border-color);
|
|
60
60
|
}
|
|
@@ -64,11 +64,11 @@
|
|
|
64
64
|
.state-caution,
|
|
65
65
|
.state-warning,
|
|
66
66
|
.state-alarm,
|
|
67
|
-
.state-
|
|
68
|
-
.state-
|
|
69
|
-
.state-
|
|
70
|
-
.state-
|
|
71
|
-
.state-
|
|
67
|
+
.state-level-critical,
|
|
68
|
+
.state-level-high,
|
|
69
|
+
.state-level-medium,
|
|
70
|
+
.state-level-low,
|
|
71
|
+
.state-level-diagnostic
|
|
72
72
|
) {
|
|
73
73
|
background: var(--overlay-container-background-color);
|
|
74
74
|
border: 1px solid var(--overlay-border-outline-color);
|
|
@@ -123,29 +123,29 @@
|
|
|
123
123
|
}
|
|
124
124
|
|
|
125
125
|
.wrapper.type-data.state-caution .id-pill,
|
|
126
|
-
.wrapper.type-data.state-
|
|
126
|
+
.wrapper.type-data.state-level-low .id-pill {
|
|
127
127
|
background: var(--alert-caution-color);
|
|
128
128
|
border: 1px solid var(--alert-caution-outline-color);
|
|
129
129
|
}
|
|
130
130
|
|
|
131
131
|
.wrapper.type-data.state-warning .id-pill,
|
|
132
|
-
.wrapper.type-data.state-
|
|
132
|
+
.wrapper.type-data.state-level-medium .id-pill {
|
|
133
133
|
background: var(--alert-warning-color);
|
|
134
134
|
border: 1px solid var(--alert-warning-outline-color);
|
|
135
135
|
}
|
|
136
136
|
|
|
137
137
|
.wrapper.type-data.state-alarm .id-pill,
|
|
138
|
-
.wrapper.type-data.state-
|
|
138
|
+
.wrapper.type-data.state-level-high .id-pill {
|
|
139
139
|
background: var(--alert-alarm-color);
|
|
140
140
|
border: 1px solid var(--alert-alarm-outline-color);
|
|
141
141
|
}
|
|
142
142
|
|
|
143
|
-
.wrapper.type-data.state-
|
|
143
|
+
.wrapper.type-data.state-level-critical .id-pill {
|
|
144
144
|
background: var(--critical-enabled-background-color);
|
|
145
145
|
border: 1px solid var(--critical-enabled-border-color);
|
|
146
146
|
}
|
|
147
147
|
|
|
148
|
-
.wrapper.type-data.state-
|
|
148
|
+
.wrapper.type-data.state-level-diagnostic .id-pill {
|
|
149
149
|
background: var(--notification-enabled-background-color);
|
|
150
150
|
border: 1px solid var(--notification-enabled-border-color);
|
|
151
151
|
}
|
|
@@ -14,11 +14,11 @@ export enum ObcPoiHeaderState {
|
|
|
14
14
|
Caution = 'caution',
|
|
15
15
|
Warning = 'warning',
|
|
16
16
|
Alarm = 'alarm',
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
17
|
+
LevelCritical = 'level-critical',
|
|
18
|
+
LevelHigh = 'level-high',
|
|
19
|
+
LevelMedium = 'level-medium',
|
|
20
|
+
LevelLow = 'level-low',
|
|
21
|
+
LevelDiagnostic = 'level-diagnostic',
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
export enum ObcPoiHeaderType {
|
|
@@ -37,7 +37,7 @@ export enum ObcPoiHeaderType {
|
|
|
37
37
|
* - `type` (default `id`):
|
|
38
38
|
* - `id`: shows identifier content only.
|
|
39
39
|
* - `data`: shows identifier plus secondary label.
|
|
40
|
-
* - `state` (default `enabled`): `enabled`, `selected`, `caution`, `warning`, `alarm`, `
|
|
40
|
+
* - `state` (default `enabled`): `enabled`, `selected`, `caution`, `warning`, `alarm`, `level-critical`, `level-high`, `level-medium`, `level-low`, `level-diagnostic`.
|
|
41
41
|
* - `content` (default `"1"`): primary identifier text.
|
|
42
42
|
* - `label` (default `"Data"`): secondary text used by `type="data"`.
|
|
43
43
|
* - `hasIndicator` (default `false`): appends indicator area.
|
|
@@ -120,7 +120,7 @@
|
|
|
120
120
|
}
|
|
121
121
|
|
|
122
122
|
&.alert-alarm,
|
|
123
|
-
&.alert-
|
|
123
|
+
&.alert-level-high {
|
|
124
124
|
.alert-ring {
|
|
125
125
|
background: var(--alert-alarm-color);
|
|
126
126
|
border-color: var(--alert-alarm-outline-color);
|
|
@@ -128,7 +128,7 @@
|
|
|
128
128
|
}
|
|
129
129
|
}
|
|
130
130
|
|
|
131
|
-
&.alert-
|
|
131
|
+
&.alert-level-critical {
|
|
132
132
|
.alert-ring {
|
|
133
133
|
background: var(--critical-enabled-background-color);
|
|
134
134
|
border-color: var(--critical-enabled-border-color);
|
|
@@ -137,7 +137,7 @@
|
|
|
137
137
|
}
|
|
138
138
|
|
|
139
139
|
&.alert-warning,
|
|
140
|
-
&.alert-
|
|
140
|
+
&.alert-level-medium {
|
|
141
141
|
.alert-ring {
|
|
142
142
|
background: var(--alert-warning-color);
|
|
143
143
|
border-color: var(--alert-warning-outline-color);
|
|
@@ -146,7 +146,7 @@
|
|
|
146
146
|
}
|
|
147
147
|
|
|
148
148
|
&.alert-caution,
|
|
149
|
-
&.alert-
|
|
149
|
+
&.alert-level-low {
|
|
150
150
|
.alert-ring {
|
|
151
151
|
background: var(--alert-caution-color);
|
|
152
152
|
border-color: var(--alert-caution-outline-color);
|
|
@@ -154,7 +154,7 @@
|
|
|
154
154
|
}
|
|
155
155
|
}
|
|
156
156
|
|
|
157
|
-
&.alert-
|
|
157
|
+
&.alert-level-diagnostic {
|
|
158
158
|
.alert-ring {
|
|
159
159
|
background: var(--notification-enabled-background-color);
|
|
160
160
|
border-color: var(--notification-enabled-border-color);
|
|
@@ -265,25 +265,25 @@
|
|
|
265
265
|
/* Overlap alert color styles */
|
|
266
266
|
.wrapper.value-overlapped {
|
|
267
267
|
&.alert-alarm,
|
|
268
|
-
&.alert-
|
|
268
|
+
&.alert-level-high {
|
|
269
269
|
--overlay-container-background-color: var(--alert-alarm-color, #e30019);
|
|
270
270
|
--overlay-border-outline-color: var(--alert-alarm-outline-color);
|
|
271
271
|
}
|
|
272
272
|
|
|
273
273
|
&.alert-alarm .poi-object,
|
|
274
|
-
&.alert-
|
|
274
|
+
&.alert-level-high .poi-object {
|
|
275
275
|
--overlay-container-background-color: var(--alert-alarm-color, #e30019);
|
|
276
276
|
--overlay-border-outline-color: var(--alert-alarm-outline-color);
|
|
277
277
|
}
|
|
278
278
|
|
|
279
|
-
&.alert-
|
|
279
|
+
&.alert-level-critical {
|
|
280
280
|
--overlay-container-background-color: var(
|
|
281
281
|
--critical-enabled-background-color
|
|
282
282
|
);
|
|
283
283
|
--overlay-border-outline-color: var(--critical-enabled-border-color);
|
|
284
284
|
}
|
|
285
285
|
|
|
286
|
-
&.alert-
|
|
286
|
+
&.alert-level-critical .poi-object {
|
|
287
287
|
--overlay-container-background-color: var(
|
|
288
288
|
--critical-enabled-background-color
|
|
289
289
|
);
|
|
@@ -291,37 +291,37 @@
|
|
|
291
291
|
}
|
|
292
292
|
|
|
293
293
|
&.alert-warning,
|
|
294
|
-
&.alert-
|
|
294
|
+
&.alert-level-medium {
|
|
295
295
|
--overlay-container-background-color: var(--alert-warning-color, #fe9413);
|
|
296
296
|
--overlay-border-outline-color: var(--alert-warning-outline-color);
|
|
297
297
|
}
|
|
298
298
|
|
|
299
299
|
&.alert-warning .poi-object,
|
|
300
|
-
&.alert-
|
|
300
|
+
&.alert-level-medium .poi-object {
|
|
301
301
|
--overlay-container-background-color: var(--alert-warning-color, #fe9413);
|
|
302
302
|
--overlay-border-outline-color: var(--alert-warning-outline-color);
|
|
303
303
|
}
|
|
304
304
|
|
|
305
305
|
&.alert-caution,
|
|
306
|
-
&.alert-
|
|
306
|
+
&.alert-level-low {
|
|
307
307
|
--overlay-container-background-color: var(--alert-caution-color, #ffdb42);
|
|
308
308
|
--overlay-border-outline-color: var(--alert-caution-outline-color);
|
|
309
309
|
}
|
|
310
310
|
|
|
311
311
|
&.alert-caution .poi-object,
|
|
312
|
-
&.alert-
|
|
312
|
+
&.alert-level-low .poi-object {
|
|
313
313
|
--overlay-container-background-color: var(--alert-caution-color, #ffdb42);
|
|
314
314
|
--overlay-border-outline-color: var(--alert-caution-outline-color);
|
|
315
315
|
}
|
|
316
316
|
|
|
317
|
-
&.alert-
|
|
317
|
+
&.alert-level-diagnostic {
|
|
318
318
|
--overlay-container-background-color: var(
|
|
319
319
|
--notification-enabled-background-color
|
|
320
320
|
);
|
|
321
321
|
--overlay-border-outline-color: var(--notification-enabled-border-color);
|
|
322
322
|
}
|
|
323
323
|
|
|
324
|
-
&.alert-
|
|
324
|
+
&.alert-level-diagnostic .poi-object {
|
|
325
325
|
--overlay-container-background-color: var(
|
|
326
326
|
--notification-enabled-background-color
|
|
327
327
|
);
|
|
@@ -330,30 +330,31 @@
|
|
|
330
330
|
}
|
|
331
331
|
|
|
332
332
|
.wrapper.value-overlapped.alert-caution .poi-object::part(background-frame),
|
|
333
|
-
.wrapper.value-overlapped.alert-
|
|
333
|
+
.wrapper.value-overlapped.alert-level-low .poi-object::part(background-frame) {
|
|
334
334
|
background-color: var(--alert-caution-color, #ffdb42);
|
|
335
335
|
border-color: var(--alert-caution-outline-color);
|
|
336
336
|
}
|
|
337
337
|
|
|
338
338
|
.wrapper.value-overlapped.alert-warning .poi-object::part(background-frame),
|
|
339
|
-
.wrapper.value-overlapped.alert-
|
|
339
|
+
.wrapper.value-overlapped.alert-level-medium
|
|
340
|
+
.poi-object::part(background-frame) {
|
|
340
341
|
background-color: var(--alert-warning-color, #fe9413);
|
|
341
342
|
border-color: var(--alert-warning-outline-color);
|
|
342
343
|
}
|
|
343
344
|
|
|
344
345
|
.wrapper.value-overlapped.alert-alarm .poi-object::part(background-frame),
|
|
345
|
-
.wrapper.value-overlapped.alert-
|
|
346
|
+
.wrapper.value-overlapped.alert-level-high .poi-object::part(background-frame) {
|
|
346
347
|
background-color: var(--alert-alarm-color, #e30019);
|
|
347
348
|
border-color: var(--alert-alarm-outline-color);
|
|
348
349
|
}
|
|
349
350
|
|
|
350
|
-
.wrapper.value-overlapped.alert-
|
|
351
|
+
.wrapper.value-overlapped.alert-level-critical
|
|
351
352
|
.poi-object::part(background-frame) {
|
|
352
353
|
background-color: var(--critical-enabled-background-color);
|
|
353
354
|
border-color: var(--critical-enabled-border-color);
|
|
354
355
|
}
|
|
355
356
|
|
|
356
|
-
.wrapper.value-overlapped.alert-
|
|
357
|
+
.wrapper.value-overlapped.alert-level-diagnostic
|
|
357
358
|
.poi-object::part(background-frame) {
|
|
358
359
|
background-color: var(--notification-enabled-background-color);
|
|
359
360
|
border-color: var(--notification-enabled-border-color);
|
|
@@ -386,29 +387,29 @@
|
|
|
386
387
|
}
|
|
387
388
|
|
|
388
389
|
.alert-caution &,
|
|
389
|
-
.alert-
|
|
390
|
+
.alert-level-low & {
|
|
390
391
|
border-color: var(--alert-caution-outline-color);
|
|
391
392
|
outline-color: var(--alert-caution-color);
|
|
392
393
|
}
|
|
393
394
|
|
|
394
395
|
.alert-warning &,
|
|
395
|
-
.alert-
|
|
396
|
+
.alert-level-medium & {
|
|
396
397
|
border-color: var(--alert-warning-outline-color);
|
|
397
398
|
outline-color: var(--alert-warning-color);
|
|
398
399
|
}
|
|
399
400
|
|
|
400
401
|
.alert-alarm &,
|
|
401
|
-
.alert-
|
|
402
|
+
.alert-level-high & {
|
|
402
403
|
border-color: var(--alert-alarm-outline-color);
|
|
403
404
|
outline-color: var(--alert-alarm-color);
|
|
404
405
|
}
|
|
405
406
|
|
|
406
|
-
.alert-
|
|
407
|
+
.alert-level-critical & {
|
|
407
408
|
border-color: var(--critical-enabled-border-color);
|
|
408
409
|
outline-color: var(--critical-enabled-background-color);
|
|
409
410
|
}
|
|
410
411
|
|
|
411
|
-
.alert-
|
|
412
|
+
.alert-level-diagnostic & {
|
|
412
413
|
border-color: var(--notification-enabled-border-color);
|
|
413
414
|
outline-color: var(--notification-enabled-background-color);
|
|
414
415
|
}
|
|
@@ -487,29 +488,29 @@
|
|
|
487
488
|
}
|
|
488
489
|
|
|
489
490
|
.wrapper.value-overlapped.has-data.alert-caution,
|
|
490
|
-
.wrapper.value-overlapped.has-data.alert-
|
|
491
|
+
.wrapper.value-overlapped.has-data.alert-level-low {
|
|
491
492
|
background: var(--alert-caution-color, #ffdb42);
|
|
492
493
|
border-color: var(--alert-caution-outline-color);
|
|
493
494
|
}
|
|
494
495
|
|
|
495
496
|
.wrapper.value-overlapped.has-data.alert-warning,
|
|
496
|
-
.wrapper.value-overlapped.has-data.alert-
|
|
497
|
+
.wrapper.value-overlapped.has-data.alert-level-medium {
|
|
497
498
|
background: var(--alert-warning-color, #fe9413);
|
|
498
499
|
border-color: var(--alert-warning-outline-color);
|
|
499
500
|
}
|
|
500
501
|
|
|
501
502
|
.wrapper.value-overlapped.has-data.alert-alarm,
|
|
502
|
-
.wrapper.value-overlapped.has-data.alert-
|
|
503
|
+
.wrapper.value-overlapped.has-data.alert-level-high {
|
|
503
504
|
background: var(--alert-alarm-color, #e30019);
|
|
504
505
|
border-color: var(--alert-alarm-outline-color);
|
|
505
506
|
}
|
|
506
507
|
|
|
507
|
-
.wrapper.value-overlapped.has-data.alert-
|
|
508
|
+
.wrapper.value-overlapped.has-data.alert-level-critical {
|
|
508
509
|
background: var(--critical-enabled-background-color);
|
|
509
510
|
border-color: var(--critical-enabled-border-color);
|
|
510
511
|
}
|
|
511
512
|
|
|
512
|
-
.wrapper.value-overlapped.has-data.alert-
|
|
513
|
+
.wrapper.value-overlapped.has-data.alert-level-diagnostic {
|
|
513
514
|
background: var(--notification-enabled-background-color);
|
|
514
515
|
border-color: var(--notification-enabled-border-color);
|
|
515
516
|
}
|
|
@@ -34,11 +34,11 @@ export enum ObcPoiButtonState {
|
|
|
34
34
|
Caution = 'caution',
|
|
35
35
|
Warning = 'warning',
|
|
36
36
|
Alarm = 'alarm',
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
37
|
+
LevelCritical = 'level-critical',
|
|
38
|
+
LevelHigh = 'level-high',
|
|
39
|
+
LevelMedium = 'level-medium',
|
|
40
|
+
LevelLow = 'level-low',
|
|
41
|
+
LevelDiagnostic = 'level-diagnostic',
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
export enum PoiButtonVisualState {
|
|
@@ -95,7 +95,7 @@ export interface ObcPoiButtonDataItem {
|
|
|
95
95
|
* - `layout` (default `anchored`): `anchored` or `inline`.
|
|
96
96
|
* - `value` (default `unchecked`): `unchecked`, `checked`, `activated`, `overlapped`.
|
|
97
97
|
* - `overlapOpaque` (default `false`): controls overlapped opacity mode (`false` = translucent, `true` = opaque).
|
|
98
|
-
* - `state` (default `enabled`): `enabled`, `caution`, `warning`, `alarm`, `
|
|
98
|
+
* - `state` (default `enabled`): `enabled`, `caution`, `warning`, `alarm`, `level-critical`, `level-high`, `level-medium`, `level-low`, `level-diagnostic`.
|
|
99
99
|
* - `selected` (default `false`): shows selection frame in anchored layout.
|
|
100
100
|
* - `relativeDirection` (default `0`): rotates default-slot icon content in degrees.
|
|
101
101
|
* - `data` (default `[]`): when non-empty, renders value/label/unit rows.
|
|
@@ -212,16 +212,16 @@ export class ObcPoiButton extends LitElement {
|
|
|
212
212
|
return ObcPoiHeaderState.Warning;
|
|
213
213
|
case ObcPoiButtonState.Alarm:
|
|
214
214
|
return ObcPoiHeaderState.Alarm;
|
|
215
|
-
case ObcPoiButtonState.
|
|
216
|
-
return ObcPoiHeaderState.
|
|
217
|
-
case ObcPoiButtonState.
|
|
218
|
-
return ObcPoiHeaderState.
|
|
219
|
-
case ObcPoiButtonState.
|
|
220
|
-
return ObcPoiHeaderState.
|
|
221
|
-
case ObcPoiButtonState.
|
|
222
|
-
return ObcPoiHeaderState.
|
|
223
|
-
case ObcPoiButtonState.
|
|
224
|
-
return ObcPoiHeaderState.
|
|
215
|
+
case ObcPoiButtonState.LevelCritical:
|
|
216
|
+
return ObcPoiHeaderState.LevelCritical;
|
|
217
|
+
case ObcPoiButtonState.LevelHigh:
|
|
218
|
+
return ObcPoiHeaderState.LevelHigh;
|
|
219
|
+
case ObcPoiButtonState.LevelMedium:
|
|
220
|
+
return ObcPoiHeaderState.LevelMedium;
|
|
221
|
+
case ObcPoiButtonState.LevelLow:
|
|
222
|
+
return ObcPoiHeaderState.LevelLow;
|
|
223
|
+
case ObcPoiButtonState.LevelDiagnostic:
|
|
224
|
+
return ObcPoiHeaderState.LevelDiagnostic;
|
|
225
225
|
case ObcPoiButtonState.Enabled:
|
|
226
226
|
default:
|
|
227
227
|
return ObcPoiHeaderState.Selected;
|
package/src/ar/types.ts
CHANGED
|
@@ -3,9 +3,9 @@ export enum ObcArAlertType {
|
|
|
3
3
|
Caution = 'caution',
|
|
4
4
|
Warning = 'warning',
|
|
5
5
|
Alarm = 'alarm',
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
LevelCritical = 'level-critical',
|
|
7
|
+
LevelHigh = 'level-high',
|
|
8
|
+
LevelMedium = 'level-medium',
|
|
9
|
+
LevelLow = 'level-low',
|
|
10
|
+
LevelDiagnostic = 'level-diagnostic',
|
|
11
11
|
}
|