@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
|
@@ -16359,21 +16359,15 @@ var textbox_default = i$7`* {
|
|
|
16359
16359
|
letter-spacing: var(--global-typography-generic-l-letter-spacing);
|
|
16360
16360
|
}
|
|
16361
16361
|
|
|
16362
|
-
/* The
|
|
16363
|
-
|
|
16364
|
-
|
|
16365
|
-
below. In engines that support text-box-trim the content box collapses to
|
|
16366
|
-
the cap height exactly; in Firefox (no text-box-trim) the content keeps its
|
|
16367
|
-
natural line box, so align-items:center + overflow:hidden crops it to the
|
|
16368
|
-
same height instead. No padding here – the centering provides it.
|
|
16369
|
-
(A small top padding could be added later to nudge the text up in Firefox.) */
|
|
16362
|
+
/* The box, never clipped: descenders and diacritics paint past its edges. The
|
|
16363
|
+
centred content leaves equal padding above and below; without text-box-trim
|
|
16364
|
+
the host's zero line-height keeps it centred to within about a pixel. */
|
|
16370
16365
|
.inner-wrapper {
|
|
16371
16366
|
box-sizing: border-box;
|
|
16372
16367
|
display: flex;
|
|
16373
16368
|
align-items: center;
|
|
16374
16369
|
justify-content: var(--alignment-justify, flex-end);
|
|
16375
16370
|
height: var(--height);
|
|
16376
|
-
overflow: hidden;
|
|
16377
16371
|
/* Opt-in: animate a \`size\` change (height + font-size below). Defaults to 0s
|
|
16378
16372
|
(instant, current behavior) so existing usages and snapshots are unchanged;
|
|
16379
16373
|
a consumer sets \`--obc-textbox-size-transition\` (e.g. 300ms) to animate the
|
|
@@ -19512,8 +19506,8 @@ var AutomationButtonBadgeCommandLocked = /* @__PURE__ */ function(AutomationButt
|
|
|
19512
19506
|
* @availableWhen alertFrameThickness alert==true
|
|
19513
19507
|
* @availableWhen alertFrameStatus alert==true
|
|
19514
19508
|
* @availableWhen alertFrameMode alert==true
|
|
19515
|
-
* @availableWhen showAlertCategoryIcon alert==true
|
|
19516
|
-
* @availableWhen showAlertIcon alert==true
|
|
19509
|
+
* @availableWhen showAlertCategoryIcon alert==true && alertFrameType in [SmallSideFlip, LargeSideFlip, BottomFlip, TopFlip]
|
|
19510
|
+
* @availableWhen showAlertIcon alert==true && alertFrameType in [LargeSideFlip, BottomFlip, TopFlip]
|
|
19517
19511
|
* @property progress - Shows a progress indicator, used to indicate that an user action is in progress
|
|
19518
19512
|
* @availableWhen progressMode progress==true
|
|
19519
19513
|
* @availableWhen progressValue progress==true && progressMode in [determinate, progressiveIndeterminate]
|
|
@@ -19917,10 +19911,6 @@ var argTypesAbstractAutomationButton = {
|
|
|
19917
19911
|
options: Object.values(ObcAlertFrameType),
|
|
19918
19912
|
control: { type: "radio" }
|
|
19919
19913
|
},
|
|
19920
|
-
alertFrameMode: {
|
|
19921
|
-
options: Object.values(ObcAlertFrameMode),
|
|
19922
|
-
control: { type: "radio" }
|
|
19923
|
-
},
|
|
19924
19914
|
alertFrameThickness: {
|
|
19925
19915
|
options: Object.values(ObcAlertFrameThickness),
|
|
19926
19916
|
control: { type: "radio" }
|
|
@@ -19929,6 +19919,10 @@ var argTypesAbstractAutomationButton = {
|
|
|
19929
19919
|
options: Object.values(AlertType),
|
|
19930
19920
|
control: { type: "radio" }
|
|
19931
19921
|
},
|
|
19922
|
+
alertFrameMode: {
|
|
19923
|
+
options: Object.values(ObcAlertFrameMode),
|
|
19924
|
+
control: { type: "radio" }
|
|
19925
|
+
},
|
|
19932
19926
|
positioning: {
|
|
19933
19927
|
options: Object.values(AutomationButtonPositioning),
|
|
19934
19928
|
control: { type: "select" }
|
|
@@ -38314,6 +38308,7 @@ var ObcAutomationTank = class ObcAutomationTank extends SetpointMixin(i$4) {
|
|
|
38314
38308
|
this.alertFrameType = ObcAlertFrameType.SmallSideFlip;
|
|
38315
38309
|
this.alertFrameThickness = ObcAlertFrameThickness.Small;
|
|
38316
38310
|
this.alertFrameStatus = AlertType.Alarm;
|
|
38311
|
+
this.alertFrameMode = ObcAlertFrameMode.ackedActive;
|
|
38317
38312
|
this.showAlertCategoryIcon = true;
|
|
38318
38313
|
this.showAlertIcon = false;
|
|
38319
38314
|
this.showTrendSymbol = true;
|
|
@@ -38669,6 +38664,7 @@ var ObcAutomationTank = class ObcAutomationTank extends SetpointMixin(i$4) {
|
|
|
38669
38664
|
.type=${this.alertFrameType}
|
|
38670
38665
|
.thickness=${this.alertFrameThickness}
|
|
38671
38666
|
.status=${this.alertFrameStatus}
|
|
38667
|
+
.mode=${this.alertFrameMode}
|
|
38672
38668
|
.showAlertCategoryIcon=${this.showAlertCategoryIcon}
|
|
38673
38669
|
.showIcon=${this.showAlertIcon}
|
|
38674
38670
|
>
|
|
@@ -38870,6 +38866,7 @@ __decorate([n$4({ type: Boolean })], ObcAutomationTank.prototype, "alert", void
|
|
|
38870
38866
|
__decorate([n$4({ type: String })], ObcAutomationTank.prototype, "alertFrameType", void 0);
|
|
38871
38867
|
__decorate([n$4({ type: String })], ObcAutomationTank.prototype, "alertFrameThickness", void 0);
|
|
38872
38868
|
__decorate([n$4({ type: String })], ObcAutomationTank.prototype, "alertFrameStatus", void 0);
|
|
38869
|
+
__decorate([n$4({ type: String })], ObcAutomationTank.prototype, "alertFrameMode", void 0);
|
|
38873
38870
|
__decorate([n$4({
|
|
38874
38871
|
type: Boolean,
|
|
38875
38872
|
attribute: false
|
|
@@ -47004,7 +47001,8 @@ obc-readout-block {
|
|
|
47004
47001
|
gap: var(--global-size-spacing-target-padding);
|
|
47005
47002
|
flex: 1 1 auto;
|
|
47006
47003
|
min-inline-size: 0;
|
|
47007
|
-
overflow: clip;
|
|
47004
|
+
overflow-x: clip;
|
|
47005
|
+
overflow-y: visible; /* a label's descenders and diacritics paint past its cap-to-baseline box */
|
|
47008
47006
|
/* a leading-src chip's 1px outline is drawn outside its box at the container edge */
|
|
47009
47007
|
overflow-clip-margin: 1px;
|
|
47010
47008
|
}
|
|
@@ -55831,10 +55829,13 @@ var SpecialtyTankFrame = /* @__PURE__ */ function(SpecialtyTankFrame) {
|
|
|
55831
55829
|
* @availableWhen alertFrameThickness alert==true
|
|
55832
55830
|
* @property alertFrameStatus - Alert status the frame is coloured for.
|
|
55833
55831
|
* @availableWhen alertFrameStatus alert==true
|
|
55832
|
+
* @property alertFrameMode - Acknowledgement state of the alert: `acked-active` (default) is steady,
|
|
55833
|
+
* `unacked-active` flashes, `unacked-rectified` flashes a dashed frame.
|
|
55834
|
+
* @availableWhen alertFrameMode alert==true
|
|
55834
55835
|
* @property showAlertCategoryIcon - Shows the alert category icon inside the frame.
|
|
55835
|
-
* @availableWhen showAlertCategoryIcon alert==true
|
|
55836
|
+
* @availableWhen showAlertCategoryIcon alert==true && alertFrameType in [SmallSideFlip, LargeSideFlip, BottomFlip, TopFlip]
|
|
55836
55837
|
* @property showAlertIcon - Shows the slotted alert icon inside the frame.
|
|
55837
|
-
* @availableWhen showAlertIcon alert==true
|
|
55838
|
+
* @availableWhen showAlertIcon alert==true && alertFrameType in [LargeSideFlip, BottomFlip, TopFlip]
|
|
55838
55839
|
*/
|
|
55839
55840
|
var ObcAbstractSpecialtyTank = class extends i$4 {
|
|
55840
55841
|
constructor(..._args) {
|
|
@@ -55854,6 +55855,7 @@ var ObcAbstractSpecialtyTank = class extends i$4 {
|
|
|
55854
55855
|
this.alertFrameType = ObcAlertFrameType.SmallSideFlip;
|
|
55855
55856
|
this.alertFrameThickness = ObcAlertFrameThickness.Small;
|
|
55856
55857
|
this.alertFrameStatus = AlertType.Alarm;
|
|
55858
|
+
this.alertFrameMode = ObcAlertFrameMode.ackedActive;
|
|
55857
55859
|
this.showAlertCategoryIcon = true;
|
|
55858
55860
|
this.showAlertIcon = false;
|
|
55859
55861
|
this._hasBadges = false;
|
|
@@ -56013,6 +56015,7 @@ var ObcAbstractSpecialtyTank = class extends i$4 {
|
|
|
56013
56015
|
.type=${this.alertFrameType}
|
|
56014
56016
|
.thickness=${this.alertFrameThickness}
|
|
56015
56017
|
.status=${this.alertFrameStatus}
|
|
56018
|
+
.mode=${this.alertFrameMode}
|
|
56016
56019
|
.showAlertCategoryIcon=${this.showAlertCategoryIcon}
|
|
56017
56020
|
.showIcon=${this.showAlertIcon}
|
|
56018
56021
|
>
|
|
@@ -56086,6 +56089,7 @@ __decorate([n$4({ type: Boolean })], ObcAbstractSpecialtyTank.prototype, "alert"
|
|
|
56086
56089
|
__decorate([n$4({ type: String })], ObcAbstractSpecialtyTank.prototype, "alertFrameType", void 0);
|
|
56087
56090
|
__decorate([n$4({ type: String })], ObcAbstractSpecialtyTank.prototype, "alertFrameThickness", void 0);
|
|
56088
56091
|
__decorate([n$4({ type: String })], ObcAbstractSpecialtyTank.prototype, "alertFrameStatus", void 0);
|
|
56092
|
+
__decorate([n$4({ type: String })], ObcAbstractSpecialtyTank.prototype, "alertFrameMode", void 0);
|
|
56089
56093
|
__decorate([n$4({
|
|
56090
56094
|
type: Boolean,
|
|
56091
56095
|
attribute: false
|
|
@@ -66993,6 +66997,12 @@ var ObcTransmitter = class ObcTransmitter extends i$4 {
|
|
|
66993
66997
|
this.hasIcon = false;
|
|
66994
66998
|
this.hasAdvice = false;
|
|
66995
66999
|
this.hasAlert = false;
|
|
67000
|
+
this.alertFrameStatus = AlertType.Alarm;
|
|
67001
|
+
this.alertFrameType = ObcAlertFrameType.Regular;
|
|
67002
|
+
this.alertFrameThickness = ObcAlertFrameThickness.Small;
|
|
67003
|
+
this.alertFrameMode = ObcAlertFrameMode.ackedActive;
|
|
67004
|
+
this.showAlertCategoryIcon = true;
|
|
67005
|
+
this.showAlertIcon = false;
|
|
66996
67006
|
this.hasSetPoint = false;
|
|
66997
67007
|
this.tag = "";
|
|
66998
67008
|
this.idTag = "";
|
|
@@ -67049,18 +67059,29 @@ var ObcTransmitter = class ObcTransmitter extends i$4 {
|
|
|
67049
67059
|
<div class="body">${this.renderButton()} ${this.renderGraph()}</div>
|
|
67050
67060
|
${this.renderLabel()}
|
|
67051
67061
|
</div>
|
|
67062
|
+
`;
|
|
67063
|
+
}
|
|
67064
|
+
renderAlertFrame(content) {
|
|
67065
|
+
return b`
|
|
67066
|
+
<obc-alert-frame
|
|
67067
|
+
class="alert-frame"
|
|
67068
|
+
.type=${this.alertFrameType}
|
|
67069
|
+
.thickness=${this.alertFrameThickness}
|
|
67070
|
+
.status=${this.alertFrameStatus}
|
|
67071
|
+
.mode=${this.alertFrameMode}
|
|
67072
|
+
.showAlertCategoryIcon=${this.showAlertCategoryIcon}
|
|
67073
|
+
.showIcon=${this.showAlertIcon}
|
|
67074
|
+
.wrapContent=${true}
|
|
67075
|
+
>
|
|
67076
|
+
${content}
|
|
67077
|
+
<span slot="icon"><slot name="alert-icon"></slot></span>
|
|
67078
|
+
<span slot="label"><slot name="alert-label"></slot></span>
|
|
67079
|
+
<span slot="timer"><slot name="alert-timer"></slot></span>
|
|
67080
|
+
</obc-alert-frame>
|
|
67052
67081
|
`;
|
|
67053
67082
|
}
|
|
67054
67083
|
render() {
|
|
67055
|
-
const content = this.hasAlert ?
|
|
67056
|
-
<obc-alert-frame
|
|
67057
|
-
class="alert-frame"
|
|
67058
|
-
.type=${ObcAlertFrameType.Regular}
|
|
67059
|
-
.wrapContent=${true}
|
|
67060
|
-
>
|
|
67061
|
-
${this.renderContent()}
|
|
67062
|
-
</obc-alert-frame>
|
|
67063
|
-
` : this.renderContent();
|
|
67084
|
+
const content = this.hasAlert ? this.renderAlertFrame(this.renderContent()) : this.renderContent();
|
|
67064
67085
|
return b`
|
|
67065
67086
|
<div
|
|
67066
67087
|
class=${e$2({
|
|
@@ -67093,6 +67114,15 @@ __decorate([n$4({ type: String })], ObcTransmitter.prototype, "size", void 0);
|
|
|
67093
67114
|
__decorate([n$4({ type: Boolean })], ObcTransmitter.prototype, "hasIcon", void 0);
|
|
67094
67115
|
__decorate([n$4({ type: Boolean })], ObcTransmitter.prototype, "hasAdvice", void 0);
|
|
67095
67116
|
__decorate([n$4({ type: Boolean })], ObcTransmitter.prototype, "hasAlert", void 0);
|
|
67117
|
+
__decorate([n$4({ type: String })], ObcTransmitter.prototype, "alertFrameStatus", void 0);
|
|
67118
|
+
__decorate([n$4({ type: String })], ObcTransmitter.prototype, "alertFrameType", void 0);
|
|
67119
|
+
__decorate([n$4({ type: String })], ObcTransmitter.prototype, "alertFrameThickness", void 0);
|
|
67120
|
+
__decorate([n$4({ type: String })], ObcTransmitter.prototype, "alertFrameMode", void 0);
|
|
67121
|
+
__decorate([n$4({
|
|
67122
|
+
type: Boolean,
|
|
67123
|
+
attribute: false
|
|
67124
|
+
})], ObcTransmitter.prototype, "showAlertCategoryIcon", void 0);
|
|
67125
|
+
__decorate([n$4({ type: Boolean })], ObcTransmitter.prototype, "showAlertIcon", void 0);
|
|
67096
67126
|
__decorate([n$4({ type: Number })], ObcTransmitter.prototype, "adviceValue", void 0);
|
|
67097
67127
|
__decorate([n$4({ type: Boolean })], ObcTransmitter.prototype, "hasSetPoint", void 0);
|
|
67098
67128
|
__decorate([n$4({ type: Number })], ObcTransmitter.prototype, "setpointValue", void 0);
|
|
@@ -69296,19 +69326,52 @@ __decorate([r$3()], ObcScrollbar.prototype, "_thumbHeight", void 0);
|
|
|
69296
69326
|
__decorate([r$3()], ObcScrollbar.prototype, "_showOverlayThumb", void 0);
|
|
69297
69327
|
ObcScrollbar = __decorate([customElement("obc-scrollbar")], ObcScrollbar);
|
|
69298
69328
|
//#endregion
|
|
69299
|
-
//#region src/building-blocks/alert-list/alert-list.ts
|
|
69300
|
-
|
|
69329
|
+
//#region src/building-blocks/alert-list/alert-list-base.ts
|
|
69330
|
+
/**
|
|
69331
|
+
* `ObcAlertListBase` – Scrolling list of slotted alert items that animates items
|
|
69332
|
+
* into place and shows an empty state when no item passes its filter.
|
|
69333
|
+
*
|
|
69334
|
+
* Not registered as an element: the subclasses decide which items pass.
|
|
69335
|
+
* `obc-alert-list` runs a predicate the consumer sets.
|
|
69336
|
+
*
|
|
69337
|
+
* ### Features
|
|
69338
|
+
* - **Filter:** `matchesFilter()` decides which items count; the list re-reads
|
|
69339
|
+
* it when items are added or removed, when an item attribute named by
|
|
69340
|
+
* `observedItemAttributes` changes, and when `filterChanged()` reports a
|
|
69341
|
+
* change of the subclass's filter inputs.
|
|
69342
|
+
* - **Motion:** items that move slide to their new place; new items play
|
|
69343
|
+
* their intro animation once the list has been seen.
|
|
69344
|
+
* - **Empty state:** icon, title and description slots, with fallback content
|
|
69345
|
+
* from `emptyFallback`.
|
|
69346
|
+
* - **Visible items:** `getVisibleElements()` returns the items that pass the
|
|
69347
|
+
* filter and sit inside the scroll viewport.
|
|
69348
|
+
*/
|
|
69349
|
+
var ObcAlertListBase = class extends i$4 {
|
|
69301
69350
|
constructor(..._args) {
|
|
69302
69351
|
super(..._args);
|
|
69303
|
-
this.filter = () => true;
|
|
69304
69352
|
this.oldElementTop = /* @__PURE__ */ new Map();
|
|
69305
69353
|
this.mutationObserver = null;
|
|
69306
69354
|
this.intersectionObserver = null;
|
|
69307
69355
|
this.hasRenderedPanel = false;
|
|
69308
69356
|
this._empty = false;
|
|
69309
69357
|
}
|
|
69358
|
+
/** Whether the list counts an item as one it shows. */
|
|
69359
|
+
matchesFilter(_item) {
|
|
69360
|
+
return true;
|
|
69361
|
+
}
|
|
69362
|
+
/** Whether this update changed what `matchesFilter` decides. */
|
|
69363
|
+
filterChanged(_changed) {
|
|
69364
|
+
return false;
|
|
69365
|
+
}
|
|
69366
|
+
/** Item attributes whose changes can change what `matchesFilter` decides. */
|
|
69367
|
+
get observedItemAttributes() {
|
|
69368
|
+
return ["status", "shelved"];
|
|
69369
|
+
}
|
|
69370
|
+
get emptyFallback() {
|
|
69371
|
+
return {};
|
|
69372
|
+
}
|
|
69310
69373
|
firstUpdated() {
|
|
69311
|
-
this.
|
|
69374
|
+
this.applyFilter();
|
|
69312
69375
|
this.setupMutationObserver();
|
|
69313
69376
|
}
|
|
69314
69377
|
connectedCallback() {
|
|
@@ -69321,6 +69384,7 @@ var ObcAlertList = class ObcAlertList extends i$4 {
|
|
|
69321
69384
|
this.setupMutationObserver();
|
|
69322
69385
|
}
|
|
69323
69386
|
disconnectedCallback() {
|
|
69387
|
+
super.disconnectedCallback();
|
|
69324
69388
|
if (this.mutationObserver) {
|
|
69325
69389
|
this.mutationObserver.disconnect();
|
|
69326
69390
|
this.mutationObserver = null;
|
|
@@ -69331,16 +69395,17 @@ var ObcAlertList = class ObcAlertList extends i$4 {
|
|
|
69331
69395
|
}
|
|
69332
69396
|
}
|
|
69333
69397
|
willUpdate(_changedProperties) {
|
|
69334
|
-
if (
|
|
69335
|
-
this.
|
|
69398
|
+
if (this.filterChanged(_changedProperties)) {
|
|
69399
|
+
this.applyFilter();
|
|
69336
69400
|
this.updateOldElementTop();
|
|
69337
69401
|
}
|
|
69338
69402
|
}
|
|
69339
|
-
|
|
69403
|
+
/** Runs whenever the items or the filter change; a subclass extends it to act on each item. */
|
|
69404
|
+
applyFilter() {
|
|
69340
69405
|
this._empty = this.getAlertItems().length === 0;
|
|
69341
69406
|
}
|
|
69342
69407
|
getAlertItems() {
|
|
69343
|
-
return this.alertItems.filter(this.
|
|
69408
|
+
return this.alertItems.filter((item) => this.matchesFilter(item));
|
|
69344
69409
|
}
|
|
69345
69410
|
updateOldElementTop() {
|
|
69346
69411
|
const elements = this.getAlertItems();
|
|
@@ -69365,7 +69430,7 @@ var ObcAlertList = class ObcAlertList extends i$4 {
|
|
|
69365
69430
|
this.alertItems.forEach((element) => {
|
|
69366
69431
|
this.mutationObserver?.observe(element, {
|
|
69367
69432
|
attributes: true,
|
|
69368
|
-
attributeFilter:
|
|
69433
|
+
attributeFilter: this.observedItemAttributes
|
|
69369
69434
|
});
|
|
69370
69435
|
});
|
|
69371
69436
|
}
|
|
@@ -69375,7 +69440,7 @@ var ObcAlertList = class ObcAlertList extends i$4 {
|
|
|
69375
69440
|
}
|
|
69376
69441
|
handleElementsChange() {
|
|
69377
69442
|
this.mutationObserver?.takeRecords();
|
|
69378
|
-
this.
|
|
69443
|
+
this.applyFilter();
|
|
69379
69444
|
if (!this.checkVisibility()) return;
|
|
69380
69445
|
const elements = this.getAlertItems();
|
|
69381
69446
|
const oldElementTop = new Map(this.oldElementTop);
|
|
@@ -69420,14 +69485,15 @@ var ObcAlertList = class ObcAlertList extends i$4 {
|
|
|
69420
69485
|
});
|
|
69421
69486
|
}
|
|
69422
69487
|
render() {
|
|
69488
|
+
const fallback = this.emptyFallback;
|
|
69423
69489
|
return b` <obc-scrollbar class="alert-list" id="scrollbar">
|
|
69424
69490
|
<slot @slotchange=${this.handleSlotChange}></slot>
|
|
69425
69491
|
${this._empty ? b` <div class="empty-list">
|
|
69426
69492
|
<div class="icon">
|
|
69427
|
-
<slot name="empty-icon"
|
|
69493
|
+
<slot name="empty-icon">${fallback.icon}</slot>
|
|
69428
69494
|
</div>
|
|
69429
69495
|
<div class="empty-title">
|
|
69430
|
-
<slot name="empty-title"
|
|
69496
|
+
<slot name="empty-title">${fallback.title}</slot>
|
|
69431
69497
|
</div>
|
|
69432
69498
|
<div class="empty-description">
|
|
69433
69499
|
<slot name="empty-description"></slot>
|
|
@@ -69439,10 +69505,24 @@ var ObcAlertList = class ObcAlertList extends i$4 {
|
|
|
69439
69505
|
this.styles = r$7(alert_list_default);
|
|
69440
69506
|
}
|
|
69441
69507
|
};
|
|
69508
|
+
__decorate([r$3()], ObcAlertListBase.prototype, "_empty", void 0);
|
|
69509
|
+
__decorate([o$5({ flatten: true })], ObcAlertListBase.prototype, "alertItems", void 0);
|
|
69510
|
+
__decorate([e$4("#scrollbar", true)], ObcAlertListBase.prototype, "scrollbar", void 0);
|
|
69511
|
+
//#endregion
|
|
69512
|
+
//#region src/building-blocks/alert-list/alert-list.ts
|
|
69513
|
+
var ObcAlertList = class ObcAlertList extends ObcAlertListBase {
|
|
69514
|
+
constructor(..._args) {
|
|
69515
|
+
super(..._args);
|
|
69516
|
+
this.filter = () => true;
|
|
69517
|
+
}
|
|
69518
|
+
matchesFilter(item) {
|
|
69519
|
+
return this.filter(item);
|
|
69520
|
+
}
|
|
69521
|
+
filterChanged(changed) {
|
|
69522
|
+
return changed.has("filter");
|
|
69523
|
+
}
|
|
69524
|
+
};
|
|
69442
69525
|
__decorate([n$4({ attribute: false })], ObcAlertList.prototype, "filter", void 0);
|
|
69443
|
-
__decorate([r$3()], ObcAlertList.prototype, "_empty", void 0);
|
|
69444
|
-
__decorate([o$5({ flatten: true })], ObcAlertList.prototype, "alertItems", void 0);
|
|
69445
|
-
__decorate([e$4("#scrollbar", true)], ObcAlertList.prototype, "scrollbar", void 0);
|
|
69446
69526
|
ObcAlertList = __decorate([customElement("obc-alert-list")], ObcAlertList);
|
|
69447
69527
|
//#endregion
|
|
69448
69528
|
//#region src/building-blocks/bar-horizontal/bar-horizontal.ts
|
|
@@ -71070,6 +71150,9 @@ var ObcAccordionCard = class ObcAccordionCard extends i$4 {
|
|
|
71070
71150
|
this.alertFrameType = ObcAlertFrameType.Regular;
|
|
71071
71151
|
this.alertFrameThickness = ObcAlertFrameThickness.Small;
|
|
71072
71152
|
this.alertFrameStatus = AlertType.Alarm;
|
|
71153
|
+
this.alertFrameMode = ObcAlertFrameMode.ackedActive;
|
|
71154
|
+
this.showAlertCategoryIcon = true;
|
|
71155
|
+
this.showAlertIcon = false;
|
|
71073
71156
|
}
|
|
71074
71157
|
get shouldShowDescription() {
|
|
71075
71158
|
return this.size === "large" && this.hasDescription && this.description.trim() !== "";
|
|
@@ -71185,6 +71268,9 @@ var ObcAccordionCard = class ObcAccordionCard extends i$4 {
|
|
|
71185
71268
|
.type=${this.alertFrameType}
|
|
71186
71269
|
.thickness=${this.alertFrameThickness}
|
|
71187
71270
|
.status=${this.alertFrameStatus}
|
|
71271
|
+
.mode=${this.alertFrameMode}
|
|
71272
|
+
.showAlertCategoryIcon=${this.showAlertCategoryIcon}
|
|
71273
|
+
.showIcon=${this.showAlertIcon}
|
|
71188
71274
|
>
|
|
71189
71275
|
<slot name="alert-icon" slot="icon"></slot>
|
|
71190
71276
|
<slot name="alert-label" slot="label"></slot>
|
|
@@ -71212,6 +71298,12 @@ __decorate([n$4({ type: String })], ObcAccordionCard.prototype, "size", void 0);
|
|
|
71212
71298
|
__decorate([n$4({ type: String })], ObcAccordionCard.prototype, "alertFrameType", void 0);
|
|
71213
71299
|
__decorate([n$4({ type: String })], ObcAccordionCard.prototype, "alertFrameThickness", void 0);
|
|
71214
71300
|
__decorate([n$4({ type: String })], ObcAccordionCard.prototype, "alertFrameStatus", void 0);
|
|
71301
|
+
__decorate([n$4({ type: String })], ObcAccordionCard.prototype, "alertFrameMode", void 0);
|
|
71302
|
+
__decorate([n$4({
|
|
71303
|
+
type: Boolean,
|
|
71304
|
+
attribute: false
|
|
71305
|
+
})], ObcAccordionCard.prototype, "showAlertCategoryIcon", void 0);
|
|
71306
|
+
__decorate([n$4({ type: Boolean })], ObcAccordionCard.prototype, "showAlertIcon", void 0);
|
|
71215
71307
|
ObcAccordionCard = __decorate([customElement("obc-accordion-card")], ObcAccordionCard);
|
|
71216
71308
|
//#endregion
|
|
71217
71309
|
//#region src/components/accordion-item/accordion-item.css?inline
|
|
@@ -77102,10 +77194,11 @@ var ObcAlertIcon = class ObcAlertIcon extends i$4 {
|
|
|
77102
77194
|
case "unacknowledged": return mapping["alarm-unack"];
|
|
77103
77195
|
default: return null;
|
|
77104
77196
|
}
|
|
77105
|
-
else if (this.bamType === AlertType.Warning) {
|
|
77106
|
-
|
|
77107
|
-
|
|
77108
|
-
|
|
77197
|
+
else if (this.bamType === AlertType.Warning) switch (this._effectiveState) {
|
|
77198
|
+
case "rectified": return mapping["warning-rectified"];
|
|
77199
|
+
case "silenced": return mapping["warning-silenced"];
|
|
77200
|
+
case "unacknowledged": return mapping["warning-unack"];
|
|
77201
|
+
default: return null;
|
|
77109
77202
|
}
|
|
77110
77203
|
return null;
|
|
77111
77204
|
}
|
|
@@ -77139,7 +77232,7 @@ var ObcAlertIcon = class ObcAlertIcon extends i$4 {
|
|
|
77139
77232
|
default: return A;
|
|
77140
77233
|
}
|
|
77141
77234
|
}
|
|
77142
|
-
return A;
|
|
77235
|
+
return this.icon ? b`${this.icon.a}` : A;
|
|
77143
77236
|
}
|
|
77144
77237
|
render() {
|
|
77145
77238
|
if (!this._effectiveType) return b`<div>No alarm</div>`;
|
|
@@ -80314,7 +80407,6 @@ obc-table::part(grid) {
|
|
|
80314
80407
|
.empty-list .icon {
|
|
80315
80408
|
height: 96px;
|
|
80316
80409
|
width: 96px;
|
|
80317
|
-
color: var(--on-flat-neutral-color);
|
|
80318
80410
|
}
|
|
80319
80411
|
|
|
80320
80412
|
.empty-list .empty-title {
|
|
@@ -80342,6 +80434,10 @@ obc-table::part(grid) {
|
|
|
80342
80434
|
max-width: 344px;
|
|
80343
80435
|
text-align: center;
|
|
80344
80436
|
}
|
|
80437
|
+
|
|
80438
|
+
.empty-list .icon {
|
|
80439
|
+
color: var(--on-flat-neutral-color);
|
|
80440
|
+
}
|
|
80345
80441
|
`;
|
|
80346
80442
|
//#endregion
|
|
80347
80443
|
//#region src/components/alert-list-details/alert-list-details.ts
|
|
@@ -80604,6 +80700,7 @@ var ObcAlertMenuItemStatus = /* @__PURE__ */ function(ObcAlertMenuItemStatus) {
|
|
|
80604
80700
|
ObcAlertMenuItemStatus["NoAckAlarm"] = "no-ack-alarm";
|
|
80605
80701
|
ObcAlertMenuItemStatus["NoAckWarning"] = "no-ack-warning";
|
|
80606
80702
|
ObcAlertMenuItemStatus["Rectified"] = "rectified";
|
|
80703
|
+
ObcAlertMenuItemStatus["RectifiedUnacknowledged"] = "rectified-unacknowledged";
|
|
80607
80704
|
return ObcAlertMenuItemStatus;
|
|
80608
80705
|
}({});
|
|
80609
80706
|
var ObcAlertMenuItem = class ObcAlertMenuItem extends i$4 {
|
|
@@ -80611,6 +80708,7 @@ var ObcAlertMenuItem = class ObcAlertMenuItem extends i$4 {
|
|
|
80611
80708
|
super(..._args);
|
|
80612
80709
|
this.hasIcon = false;
|
|
80613
80710
|
this.shelved = false;
|
|
80711
|
+
this.blocked = false;
|
|
80614
80712
|
this.title = "";
|
|
80615
80713
|
this.description = "";
|
|
80616
80714
|
this.day = "";
|
|
@@ -80623,9 +80721,12 @@ var ObcAlertMenuItem = class ObcAlertMenuItem extends i$4 {
|
|
|
80623
80721
|
this.primaryActionState = "enabled";
|
|
80624
80722
|
this.secondaryActionState = "none";
|
|
80625
80723
|
}
|
|
80724
|
+
get canAck() {
|
|
80725
|
+
return this.status === "unacknowledged" || this.status === "rectified-unacknowledged";
|
|
80726
|
+
}
|
|
80626
80727
|
get primaryActionLabel() {
|
|
80627
80728
|
if (this.primaryActionState === "none") return "";
|
|
80628
|
-
return this.
|
|
80729
|
+
return this.canAck ? "ACK" : "";
|
|
80629
80730
|
}
|
|
80630
80731
|
get secondaryActionLabelToShow() {
|
|
80631
80732
|
if (this.secondaryActionState === "none") return "";
|
|
@@ -80638,7 +80739,7 @@ var ObcAlertMenuItem = class ObcAlertMenuItem extends i$4 {
|
|
|
80638
80739
|
return this.secondaryActionState === "disabled";
|
|
80639
80740
|
}
|
|
80640
80741
|
get hasTrailingIcon() {
|
|
80641
|
-
return this.
|
|
80742
|
+
return !this.canAck;
|
|
80642
80743
|
}
|
|
80643
80744
|
handleMessageClick(event) {
|
|
80644
80745
|
event.stopPropagation();
|
|
@@ -80698,6 +80799,10 @@ __decorate([n$4({
|
|
|
80698
80799
|
type: Boolean,
|
|
80699
80800
|
reflect: true
|
|
80700
80801
|
})], ObcAlertMenuItem.prototype, "shelved", void 0);
|
|
80802
|
+
__decorate([n$4({
|
|
80803
|
+
type: Boolean,
|
|
80804
|
+
reflect: true
|
|
80805
|
+
})], ObcAlertMenuItem.prototype, "blocked", void 0);
|
|
80701
80806
|
__decorate([n$4({ type: String })], ObcAlertMenuItem.prototype, "title", void 0);
|
|
80702
80807
|
__decorate([n$4({ type: String })], ObcAlertMenuItem.prototype, "description", void 0);
|
|
80703
80808
|
__decorate([n$4({ type: String })], ObcAlertMenuItem.prototype, "day", void 0);
|
|
@@ -80792,52 +80897,13 @@ var alert_menu_default = i$7`* {
|
|
|
80792
80897
|
min-width: 120px;
|
|
80793
80898
|
}
|
|
80794
80899
|
|
|
80795
|
-
.empty-list {
|
|
80796
|
-
display: flex;
|
|
80797
|
-
flex-direction: column;
|
|
80798
|
-
align-items: center;
|
|
80799
|
-
justify-content: center;
|
|
80800
|
-
height: 100%;
|
|
80801
|
-
gap: var(--app-components-alert-menu-button-spacing);
|
|
80802
|
-
}
|
|
80803
|
-
|
|
80804
|
-
.empty-list .icon {
|
|
80805
|
-
height: 96px;
|
|
80806
|
-
width: 96px;
|
|
80807
|
-
}
|
|
80808
|
-
|
|
80809
|
-
.empty-list .empty-title {
|
|
80810
|
-
color: var(--element-active-color);
|
|
80811
|
-
font-family: var(--global-typography-font-family);
|
|
80812
|
-
font-weight: var(--global-typography-ui-body-active-font-weight);
|
|
80813
|
-
font-size: var(--global-typography-ui-body-active-font-size);
|
|
80814
|
-
line-height: var(--global-typography-ui-body-active-line-height);
|
|
80815
|
-
font-feature-settings:
|
|
80816
|
-
"liga" off,
|
|
80817
|
-
"clig" off,
|
|
80818
|
-
"ss04" on;
|
|
80819
|
-
}
|
|
80820
|
-
|
|
80821
|
-
.empty-list .empty-description {
|
|
80822
|
-
color: var(--element-neutral-color);
|
|
80823
|
-
font-family: var(--global-typography-font-family);
|
|
80824
|
-
font-weight: var(--global-typography-ui-body-font-weight);
|
|
80825
|
-
font-size: var(--global-typography-ui-body-font-size);
|
|
80826
|
-
line-height: var(--global-typography-ui-body-line-height);
|
|
80827
|
-
font-feature-settings:
|
|
80828
|
-
"liga" off,
|
|
80829
|
-
"clig" off,
|
|
80830
|
-
"ss04" on;
|
|
80831
|
-
max-width: 344px;
|
|
80832
|
-
text-align: center;
|
|
80833
|
-
}
|
|
80834
|
-
|
|
80835
80900
|
::slotted(*) {
|
|
80836
80901
|
display: block;
|
|
80837
80902
|
will-change: transform;
|
|
80838
80903
|
}
|
|
80839
80904
|
|
|
80840
|
-
.alert-list.all ::slotted([shelved])
|
|
80905
|
+
.alert-list.all ::slotted([shelved]),
|
|
80906
|
+
.alert-list.all ::slotted([status="rectified-unacknowledged"]) {
|
|
80841
80907
|
display: none;
|
|
80842
80908
|
}
|
|
80843
80909
|
|
|
@@ -80845,7 +80911,7 @@ var alert_menu_default = i$7`* {
|
|
|
80845
80911
|
display: none;
|
|
80846
80912
|
}
|
|
80847
80913
|
|
|
80848
|
-
.alert-list.unacked ::slotted(:not([status="unacknowledged"])),.alert-list.unacked ::slotted([shelved]) {
|
|
80914
|
+
.alert-list.unacked ::slotted(:not([status="unacknowledged"]):not([status="rectified-unacknowledged"])),.alert-list.unacked ::slotted([shelved]) {
|
|
80849
80915
|
display: none;
|
|
80850
80916
|
}
|
|
80851
80917
|
`;
|
|
@@ -81263,6 +81329,7 @@ __decorate([n$4({ type: Boolean })], ObcTabbedCard.prototype, "hasTabIcons", voi
|
|
|
81263
81329
|
ObcTabbedCard = __decorate([customElement("obc-tabbed-card")], ObcTabbedCard);
|
|
81264
81330
|
//#endregion
|
|
81265
81331
|
//#region src/components/alert-menu/alert-menu.ts
|
|
81332
|
+
var WAITING_FOR_ACK = [ObcAlertMenuItemStatus.Unacknowledged, ObcAlertMenuItemStatus.RectifiedUnacknowledged];
|
|
81266
81333
|
var ObcAlertMenu = class ObcAlertMenu extends i$4 {
|
|
81267
81334
|
constructor(..._args) {
|
|
81268
81335
|
super(..._args);
|
|
@@ -81273,88 +81340,108 @@ var ObcAlertMenu = class ObcAlertMenu extends i$4 {
|
|
|
81273
81340
|
this.canAckAll = false;
|
|
81274
81341
|
this.showSilenceButton = true;
|
|
81275
81342
|
this.showAlertListButton = true;
|
|
81276
|
-
this._selectedTabIndex = 1;
|
|
81277
81343
|
}
|
|
81278
81344
|
handleAckAllVisibleClick() {
|
|
81279
81345
|
const visibleElements = this.alertList.getVisibleElements();
|
|
81280
81346
|
this.dispatchEvent(new CustomEvent("ack-all-visible-click", { detail: {
|
|
81281
81347
|
visibleElements,
|
|
81282
|
-
tabName: this.
|
|
81348
|
+
tabName: this.selectedTab.name
|
|
81283
81349
|
} }));
|
|
81284
81350
|
}
|
|
81285
81351
|
onTabChange(e) {
|
|
81286
|
-
this.
|
|
81352
|
+
this._selectedTabName = this.tabs[e.detail.tab]?.name;
|
|
81287
81353
|
}
|
|
81288
|
-
|
|
81289
|
-
|
|
81354
|
+
willUpdate(changedProperties) {
|
|
81355
|
+
super.willUpdate(changedProperties);
|
|
81356
|
+
if (!this.tabs.some((tab) => tab.name === this._selectedTabName)) this._selectedTabName = void 0;
|
|
81357
|
+
}
|
|
81358
|
+
/** Whether the menu offers "ACK visible" at all; `canAckAll` enables it. */
|
|
81359
|
+
get offersAckAll() {
|
|
81360
|
+
return true;
|
|
81361
|
+
}
|
|
81362
|
+
/** The tabs in display order; the menu opens on the second one. */
|
|
81363
|
+
get tabs() {
|
|
81364
|
+
const tabs = [{
|
|
81290
81365
|
name: "unacked",
|
|
81366
|
+
title: msg("Unacked"),
|
|
81291
81367
|
emptyTitle: msg("No unacknowledged alerts"),
|
|
81292
|
-
|
|
81293
|
-
|
|
81294
|
-
class: "unacked",
|
|
81295
|
-
filter: (item) => {
|
|
81296
|
-
return item.getAttribute("status") === ObcAlertMenuItemStatus.Unacknowledged && !item.hasAttribute("shelved");
|
|
81297
|
-
}
|
|
81298
|
-
};
|
|
81299
|
-
else if (this._selectedTabIndex === 2) return {
|
|
81300
|
-
name: "shelved",
|
|
81301
|
-
emptyTitle: msg("No shelved alerts"),
|
|
81302
|
-
emptyDescription: msg("Go to the 'Alert list' for more details or to manage existing alerts."),
|
|
81303
|
-
emptyIcon: b`<obi-alerts-shelf></obi-alerts-shelf>`,
|
|
81304
|
-
class: "shelved",
|
|
81305
|
-
filter: (item) => {
|
|
81306
|
-
return item.hasAttribute("shelved");
|
|
81307
|
-
}
|
|
81308
|
-
};
|
|
81309
|
-
else return {
|
|
81368
|
+
emptyIcon: b`<obi-unacknowledged></obi-unacknowledged>`
|
|
81369
|
+
}, {
|
|
81310
81370
|
name: "all",
|
|
81371
|
+
title: msg("Active"),
|
|
81311
81372
|
emptyTitle: msg("No active alerts"),
|
|
81312
|
-
|
|
81313
|
-
|
|
81314
|
-
|
|
81315
|
-
|
|
81316
|
-
|
|
81317
|
-
|
|
81318
|
-
|
|
81373
|
+
emptyIcon: b`<obi-alerts></obi-alerts>`
|
|
81374
|
+
}];
|
|
81375
|
+
if (this.hasShelved) tabs.push({
|
|
81376
|
+
name: "shelved",
|
|
81377
|
+
title: msg("Shelved"),
|
|
81378
|
+
emptyTitle: msg("No shelved alerts"),
|
|
81379
|
+
emptyIcon: b`<obi-alerts-shelf></obi-alerts-shelf>`
|
|
81380
|
+
});
|
|
81381
|
+
return tabs;
|
|
81382
|
+
}
|
|
81383
|
+
/** Where the selected tab sits in `tabs`: the one the user picked, else the second. */
|
|
81384
|
+
selectedTabIndex(tabs) {
|
|
81385
|
+
const index = tabs.findIndex((tab) => tab.name === this._selectedTabName);
|
|
81386
|
+
return index === -1 ? 1 : index;
|
|
81387
|
+
}
|
|
81388
|
+
get selectedTab() {
|
|
81389
|
+
const tabs = this.tabs;
|
|
81390
|
+
return tabs[this.selectedTabIndex(tabs)];
|
|
81391
|
+
}
|
|
81392
|
+
/**
|
|
81393
|
+
* The list that shows the selected tab's items. The CSS hides the items the
|
|
81394
|
+
* tab leaves out; the filter tells the list which ones those are.
|
|
81395
|
+
*/
|
|
81396
|
+
renderList(tab, content) {
|
|
81397
|
+
return b`<obc-alert-list
|
|
81398
|
+
class="alert-list ${tab.name}"
|
|
81399
|
+
.filter=${(item) => this.tabFilter(tab.name, item)}
|
|
81400
|
+
>${content}</obc-alert-list
|
|
81401
|
+
>`;
|
|
81402
|
+
}
|
|
81403
|
+
tabFilter(name, item) {
|
|
81404
|
+
const status = item.getAttribute("status") ?? "";
|
|
81405
|
+
if (name === "unacked") return WAITING_FOR_ACK.includes(status) && !item.hasAttribute("shelved");
|
|
81406
|
+
if (name === "shelved") return item.hasAttribute("shelved");
|
|
81407
|
+
return !item.hasAttribute("shelved") && status !== ObcAlertMenuItemStatus.RectifiedUnacknowledged;
|
|
81319
81408
|
}
|
|
81320
81409
|
render() {
|
|
81321
|
-
const
|
|
81410
|
+
const tabs = this.tabs;
|
|
81411
|
+
const selectedIndex = this.selectedTabIndex(tabs);
|
|
81412
|
+
const t = tabs[selectedIndex];
|
|
81322
81413
|
return b`
|
|
81323
81414
|
<obc-tabbed-card
|
|
81324
|
-
.nTabs=${
|
|
81415
|
+
.nTabs=${tabs.length}
|
|
81325
81416
|
class="wrapper"
|
|
81326
81417
|
part="wrapper"
|
|
81327
|
-
.selectedTab=${
|
|
81418
|
+
.selectedTab=${selectedIndex}
|
|
81328
81419
|
hasDefaultSlotOnly
|
|
81329
81420
|
@tab-change=${this.onTabChange}
|
|
81330
81421
|
>
|
|
81331
|
-
|
|
81332
|
-
<span slot="tab-title-1">${msg("Active")}</span>
|
|
81333
|
-
${this.hasShelved ? b`<span slot="tab-title-2">${msg("Shelved")}</span>` : A}
|
|
81422
|
+
${tabs.map((tab, index) => b`<span slot="tab-title-${index}">${tab.title}</span>`)}
|
|
81334
81423
|
<div class="container">
|
|
81335
|
-
|
|
81336
|
-
|
|
81337
|
-
|
|
81338
|
-
|
|
81339
|
-
|
|
81340
|
-
|
|
81341
|
-
|
|
81342
|
-
|
|
81343
|
-
|
|
81344
|
-
|
|
81345
|
-
>
|
|
81346
|
-
</obc-alert-list>
|
|
81424
|
+
${this.renderList(t, b`<slot></slot>
|
|
81425
|
+
<slot name="empty-${t.name}-title" slot="empty-title"
|
|
81426
|
+
>${t.emptyTitle}</slot
|
|
81427
|
+
>
|
|
81428
|
+
<slot name="empty-${t.name}-description" slot="empty-description"
|
|
81429
|
+
>${msg("Go to the 'Alert list' for more details or to manage existing alerts.")}</slot
|
|
81430
|
+
>
|
|
81431
|
+
<slot name="empty-${t.name}-icon" slot="empty-icon"
|
|
81432
|
+
>${t.emptyIcon}</slot
|
|
81433
|
+
>`)}
|
|
81347
81434
|
<div class="action">
|
|
81348
|
-
|
|
81349
|
-
|
|
81350
|
-
|
|
81351
|
-
|
|
81352
|
-
|
|
81353
|
-
|
|
81354
|
-
|
|
81355
|
-
|
|
81356
|
-
|
|
81357
|
-
|
|
81435
|
+
${this.offersAckAll ? b`<obc-button
|
|
81436
|
+
variant="raised"
|
|
81437
|
+
.disabled=${!this.canAckAll}
|
|
81438
|
+
fullWidth
|
|
81439
|
+
class="btn"
|
|
81440
|
+
data-testid="ack-all-visible-button"
|
|
81441
|
+
@click=${this.handleAckAllVisibleClick}
|
|
81442
|
+
>
|
|
81443
|
+
${msg("ACK visible")}
|
|
81444
|
+
</obc-button>` : A}
|
|
81358
81445
|
${this.showSilenceButton ? b`<obc-button
|
|
81359
81446
|
variant="normal"
|
|
81360
81447
|
fullWidth
|
|
@@ -81400,8 +81487,8 @@ __decorate([n$4({
|
|
|
81400
81487
|
type: Boolean,
|
|
81401
81488
|
attribute: false
|
|
81402
81489
|
})], ObcAlertMenu.prototype, "showAlertListButton", void 0);
|
|
81403
|
-
__decorate([r$3()], ObcAlertMenu.prototype, "
|
|
81404
|
-
__decorate([e$4("
|
|
81490
|
+
__decorate([r$3()], ObcAlertMenu.prototype, "_selectedTabName", void 0);
|
|
81491
|
+
__decorate([e$4(".alert-list")], ObcAlertMenu.prototype, "alertList", void 0);
|
|
81405
81492
|
ObcAlertMenu = __decorate([localized(), customElement("obc-alert-menu")], ObcAlertMenu);
|
|
81406
81493
|
//#endregion
|
|
81407
81494
|
//#region src/components/alert-subsystem-counter/alert-subsystem-counter.css?inline
|
|
@@ -98579,12 +98666,18 @@ var number_input_field_default = i$7`* {
|
|
|
98579
98666
|
}
|
|
98580
98667
|
|
|
98581
98668
|
.wrapper.align-center .value-input {
|
|
98582
|
-
|
|
98583
|
-
|
|
98669
|
+
field-sizing: content; /* the unit hugs the value */
|
|
98670
|
+
width: auto;
|
|
98584
98671
|
text-align: right;
|
|
98585
98672
|
flex: 0 0 auto;
|
|
98586
98673
|
}
|
|
98587
98674
|
|
|
98675
|
+
@supports not (field-sizing: content) {
|
|
98676
|
+
.wrapper.align-center .value-input {
|
|
98677
|
+
flex: 1 1 auto; /* the 20-character default width would push the value out of a narrow field */
|
|
98678
|
+
}
|
|
98679
|
+
}
|
|
98680
|
+
|
|
98588
98681
|
.wrapper.align-right .label-container,
|
|
98589
98682
|
.wrapper.align-right-unit-outside .label-container {
|
|
98590
98683
|
justify-content: flex-end;
|
|
@@ -98691,9 +98784,6 @@ var ObcNumberInputFieldSize = /* @__PURE__ */ function(ObcNumberInputFieldSize)
|
|
|
98691
98784
|
ObcNumberInputFieldSize["Large"] = "large";
|
|
98692
98785
|
return ObcNumberInputFieldSize;
|
|
98693
98786
|
}({});
|
|
98694
|
-
var characterWidth = 9.15199279785156;
|
|
98695
|
-
var symbolWidth = 4.287994384765653;
|
|
98696
|
-
var baseFontSize = 16;
|
|
98697
98787
|
var ObcNumberInputField = class ObcNumberInputField extends i$4 {
|
|
98698
98788
|
constructor(..._args) {
|
|
98699
98789
|
super(..._args);
|
|
@@ -98727,6 +98817,7 @@ var ObcNumberInputField = class ObcNumberInputField extends i$4 {
|
|
|
98727
98817
|
this.previousValue = NaN;
|
|
98728
98818
|
this.previousDisplayText = "";
|
|
98729
98819
|
this.lastCommittedValue = NaN;
|
|
98820
|
+
this.focusFromValueClick = false;
|
|
98730
98821
|
}
|
|
98731
98822
|
get displayValue() {
|
|
98732
98823
|
return this.displayText;
|
|
@@ -98750,7 +98841,6 @@ var ObcNumberInputField = class ObcNumberInputField extends i$4 {
|
|
|
98750
98841
|
const parsed = parseNumberInput(raw);
|
|
98751
98842
|
this.value = parsed;
|
|
98752
98843
|
this.previousDisplayText = raw;
|
|
98753
|
-
this.updateCenterAlignedInputWidth(raw);
|
|
98754
98844
|
this.dispatchInput();
|
|
98755
98845
|
}
|
|
98756
98846
|
isProjectedValueAllowed(projected) {
|
|
@@ -98778,6 +98868,31 @@ var ObcNumberInputField = class ObcNumberInputField extends i$4 {
|
|
|
98778
98868
|
onFocus() {
|
|
98779
98869
|
this.hasFocus = true;
|
|
98780
98870
|
if (this.readonly) return;
|
|
98871
|
+
if (this.focusFromValueClick) {
|
|
98872
|
+
this.focusFromValueClick = false;
|
|
98873
|
+
requestAnimationFrame(() => void this.ungroupKeepingSelection());
|
|
98874
|
+
return;
|
|
98875
|
+
}
|
|
98876
|
+
this.ungroupDisplay();
|
|
98877
|
+
}
|
|
98878
|
+
/**
|
|
98879
|
+
* Ungroups a value the user clicked into, once the browser has placed the
|
|
98880
|
+
* caret, and moves the caret with its digits. Ungrouping before that shifts
|
|
98881
|
+
* the text under the pointer and the caret lands beside the clicked digit.
|
|
98882
|
+
*/
|
|
98883
|
+
async ungroupKeepingSelection() {
|
|
98884
|
+
const input = this.inputElement;
|
|
98885
|
+
if (!input || !this.hasFocus) return;
|
|
98886
|
+
const grouped = input.value;
|
|
98887
|
+
const offsetWithoutGrouping = (offset) => removeGroupingFromDisplay(grouped.slice(0, offset ?? grouped.length), this.getFormatOptions()).length;
|
|
98888
|
+
const start = offsetWithoutGrouping(input.selectionStart);
|
|
98889
|
+
const end = offsetWithoutGrouping(input.selectionEnd);
|
|
98890
|
+
const direction = input.selectionDirection ?? void 0;
|
|
98891
|
+
this.ungroupDisplay();
|
|
98892
|
+
await this.updateComplete;
|
|
98893
|
+
input.setSelectionRange(start, end, direction);
|
|
98894
|
+
}
|
|
98895
|
+
ungroupDisplay() {
|
|
98781
98896
|
const source = this.displayOverride || this.displayText;
|
|
98782
98897
|
this.displayText = removeGroupingFromDisplay(source, this.getFormatOptions());
|
|
98783
98898
|
this.displayOverride = "";
|
|
@@ -98823,22 +98938,9 @@ var ObcNumberInputField = class ObcNumberInputField extends i$4 {
|
|
|
98823
98938
|
if (!this.shouldUpdateValue && this.inputElement) return this.inputElement.value;
|
|
98824
98939
|
return this.displayText;
|
|
98825
98940
|
}
|
|
98826
|
-
updateCenterAlignedInputWidth(value) {
|
|
98827
|
-
if (this.textAlign !== "center") {
|
|
98828
|
-
this.style.removeProperty("--obc-number-input-center-width");
|
|
98829
|
-
return;
|
|
98830
|
-
}
|
|
98831
|
-
const fontSize = Number.parseFloat(getCssVariableValue(this, "--global-typography-instrument-value-regular-font-size"));
|
|
98832
|
-
const characters = value.replaceAll(/[.,]/g, "");
|
|
98833
|
-
const symbols = value.length - characters.length;
|
|
98834
|
-
const calculatedWidth = characters.length * characterWidth + symbols * symbolWidth;
|
|
98835
|
-
const measuredWidth = Math.ceil(calculatedWidth * fontSize / baseFontSize);
|
|
98836
|
-
this.style.setProperty("--obc-number-input-center-width", `${measuredWidth}px`);
|
|
98837
|
-
}
|
|
98838
98941
|
firstUpdated() {
|
|
98839
98942
|
if (!this.displayText && !this.displayOverride) this.displayText = this.formatValueForDisplay(this.value);
|
|
98840
98943
|
this.lastCommittedValue = this.value;
|
|
98841
|
-
this.updateCenterAlignedInputWidth(this.getEffectiveDisplay());
|
|
98842
98944
|
}
|
|
98843
98945
|
get isEmpty() {
|
|
98844
98946
|
if (this.inputElement) return this.inputElement.value.trim().length === 0;
|
|
@@ -98860,7 +98962,6 @@ var ObcNumberInputField = class ObcNumberInputField extends i$4 {
|
|
|
98860
98962
|
}
|
|
98861
98963
|
updated() {
|
|
98862
98964
|
if (this.rejectDuplicateUpdates && !valuesEqual(this.value, this.previousValue) && (this.previousDisplayText !== this.displayText || !this.hasFocus)) this.previousValue = this.value;
|
|
98863
|
-
this.updateCenterAlignedInputWidth(this.getEffectiveDisplay());
|
|
98864
98965
|
}
|
|
98865
98966
|
renderFooterText(text, isError) {
|
|
98866
98967
|
if (!text) return A;
|
|
@@ -98877,33 +98978,20 @@ var ObcNumberInputField = class ObcNumberInputField extends i$4 {
|
|
|
98877
98978
|
${text}
|
|
98878
98979
|
</div>`;
|
|
98879
98980
|
}
|
|
98981
|
+
/**
|
|
98982
|
+
* Keeps focus where it is while the chrome around the value is clicked.
|
|
98983
|
+
* The wrapper is a `<label>`, so the click itself focuses the input; without
|
|
98984
|
+
* this the pointerdown would blur it first and commit an unfinished edit.
|
|
98985
|
+
* A click on the value itself is the browser's; it is only noted, so the
|
|
98986
|
+
* focus it causes ungroups the value without moving the caret.
|
|
98987
|
+
*/
|
|
98880
98988
|
onPointerDown(e) {
|
|
98881
|
-
if (this.disabled) return;
|
|
98882
|
-
if (this.
|
|
98883
|
-
|
|
98884
|
-
|
|
98885
|
-
e.preventDefault();
|
|
98886
|
-
this.inputElement.focus();
|
|
98887
|
-
const inputBox = this.inputElement.getBoundingClientRect();
|
|
98888
|
-
let selectionStart;
|
|
98889
|
-
if (e.clientX < inputBox.left) selectionStart = 0;
|
|
98890
|
-
else if (e.clientX > inputBox.right) selectionStart = this.inputElement.value.length;
|
|
98891
|
-
else {
|
|
98892
|
-
const mouseX = e.clientX;
|
|
98893
|
-
let inputX = inputBox.right;
|
|
98894
|
-
const text = this.inputElement.value;
|
|
98895
|
-
for (let i = text.length - 1; i >= 0; i--) {
|
|
98896
|
-
const width = text[i].match(/[.,]/) ? symbolWidth : characterWidth;
|
|
98897
|
-
if (mouseX > inputX - width / 2) {
|
|
98898
|
-
selectionStart = i + 1;
|
|
98899
|
-
break;
|
|
98900
|
-
}
|
|
98901
|
-
inputX -= width;
|
|
98902
|
-
}
|
|
98903
|
-
if (selectionStart === void 0) selectionStart = 0;
|
|
98904
|
-
}
|
|
98905
|
-
this.inputElement.setSelectionRange(selectionStart, selectionStart);
|
|
98989
|
+
if (this.disabled || this.readonly) return;
|
|
98990
|
+
if (e.target === this.inputElement) {
|
|
98991
|
+
this.focusFromValueClick = !this.hasFocus;
|
|
98992
|
+
return;
|
|
98906
98993
|
}
|
|
98994
|
+
e.preventDefault();
|
|
98907
98995
|
}
|
|
98908
98996
|
render() {
|
|
98909
98997
|
const hasHelperOrError = Boolean(this.helperText) || Boolean(this.error && this.errorText);
|
|
@@ -211229,7 +211317,7 @@ var ObcAlertDetailPage = class ObcAlertDetailPage extends i$4 {
|
|
|
211229
211317
|
[`type-${this.type}`]: true,
|
|
211230
211318
|
"status-acknowledged": isAcknowledged(this.alert) && isActive(this.alert),
|
|
211231
211319
|
"status-unacknowledged": !isAcknowledged(this.alert) && isActive(this.alert),
|
|
211232
|
-
"status-resolved": isActive(this.alert)
|
|
211320
|
+
"status-resolved": !isActive(this.alert)
|
|
211233
211321
|
})}
|
|
211234
211322
|
>
|
|
211235
211323
|
<div class="header">
|
|
@@ -211344,75 +211432,85 @@ var alert_list_page_small_default = i$7`* {
|
|
|
211344
211432
|
}
|
|
211345
211433
|
`;
|
|
211346
211434
|
//#endregion
|
|
211347
|
-
//#region src/pages/alert-list-page-small/alert-list-page-small.ts
|
|
211348
|
-
|
|
211435
|
+
//#region src/pages/alert-list-page-small/alert-list-page-small-base.ts
|
|
211436
|
+
/**
|
|
211437
|
+
* `ObcAlertListPageSmallBase` – Compact alert list page: a list of alerts over a
|
|
211438
|
+
* bar with a mode dropdown, a silence button and "ACK visible".
|
|
211439
|
+
*
|
|
211440
|
+
* Not registered as an element: the subclasses supply the list and the
|
|
211441
|
+
* modes. `obc-alert-list-page-small` renders `obc-alert-list-details`.
|
|
211442
|
+
*
|
|
211443
|
+
* ### Features
|
|
211444
|
+
* - **Modes:** the dropdown offers `modes` and shows `mode`; picking one calls
|
|
211445
|
+
* `selectMode()`.
|
|
211446
|
+
* - **ACK visible:** enabled while `canAckAll` holds; a click reports the
|
|
211447
|
+
* alerts `visibleAlerts()` returns, and the mode, in `ack-all-visible-click`.
|
|
211448
|
+
* - **Silence:** the icon button fires `silence-click`.
|
|
211449
|
+
*
|
|
211450
|
+
* The base holds no alerts: each page declares `alerts` in the alert type it
|
|
211451
|
+
* lists.
|
|
211452
|
+
*
|
|
211453
|
+
* @property hasShelved - Whether the dropdown offers the shelved alerts.
|
|
211454
|
+
* @property showTime - Whether the list shows when each alert was raised.
|
|
211455
|
+
* @property timeFormatter - Formats the time the list shows.
|
|
211456
|
+
* @availableWhen timeFormatter showTime==true
|
|
211457
|
+
*/
|
|
211458
|
+
var ObcAlertListPageSmallBase = class extends i$4 {
|
|
211349
211459
|
constructor(..._args) {
|
|
211350
211460
|
super(..._args);
|
|
211351
211461
|
this.hasShelved = false;
|
|
211352
|
-
this.selectedMode = "all";
|
|
211353
|
-
this.alerts = [];
|
|
211354
211462
|
this.showTime = false;
|
|
211355
211463
|
this.timeFormatter = (time) => time.toLocaleTimeString(void 0, { hour12: false });
|
|
211356
|
-
this._mode = "all";
|
|
211357
211464
|
}
|
|
211358
|
-
|
|
211359
|
-
|
|
211465
|
+
/** The dropdown's options, in order. */
|
|
211466
|
+
get modes() {
|
|
211467
|
+
return [];
|
|
211468
|
+
}
|
|
211469
|
+
/** The mode the list filters by and the dropdown shows. */
|
|
211470
|
+
get mode() {
|
|
211471
|
+
return "";
|
|
211472
|
+
}
|
|
211473
|
+
selectMode(_mode) {}
|
|
211474
|
+
/** Whether an alert the list shows in `mode` can still be acknowledged. */
|
|
211475
|
+
get canAckAll() {
|
|
211476
|
+
return false;
|
|
211477
|
+
}
|
|
211478
|
+
/** Whether the page offers "ACK visible" at all; `canAckAll` enables it. */
|
|
211479
|
+
get offersAckAll() {
|
|
211480
|
+
return true;
|
|
211481
|
+
}
|
|
211482
|
+
/** The alerts in view, which "ACK visible" reports. */
|
|
211483
|
+
visibleAlerts() {
|
|
211484
|
+
return [];
|
|
211485
|
+
}
|
|
211486
|
+
renderList() {
|
|
211487
|
+
return A;
|
|
211488
|
+
}
|
|
211489
|
+
dispatchAckClick(alert) {
|
|
211490
|
+
this.dispatchEvent(new CustomEvent("ack-click", { detail: { alert } }));
|
|
211491
|
+
}
|
|
211492
|
+
dispatchRowClick(alert) {
|
|
211493
|
+
this.dispatchEvent(new CustomEvent("row-click", { detail: { alert } }));
|
|
211360
211494
|
}
|
|
211361
211495
|
handleAckAllVisibleClick() {
|
|
211362
|
-
const tabName = this.selectedMode;
|
|
211363
|
-
const visibleElements = this.alertList.getVisibleAlerts();
|
|
211364
211496
|
this.dispatchEvent(new CustomEvent("ack-all-visible-click", { detail: {
|
|
211365
|
-
alerts:
|
|
211366
|
-
mode:
|
|
211497
|
+
alerts: this.visibleAlerts(),
|
|
211498
|
+
mode: this.mode
|
|
211367
211499
|
} }));
|
|
211368
211500
|
}
|
|
211369
211501
|
onModeSelect(e) {
|
|
211370
|
-
this.
|
|
211371
|
-
}
|
|
211372
|
-
get metadata() {
|
|
211373
|
-
return getAlertListModeData(this.selectedMode);
|
|
211374
|
-
}
|
|
211375
|
-
onAckClick(e) {
|
|
211376
|
-
this.dispatchEvent(new CustomEvent("ack-click", { detail: { alert: e.detail.alert } }));
|
|
211377
|
-
}
|
|
211378
|
-
onRowClick(e) {
|
|
211379
|
-
this.dispatchEvent(new CustomEvent("row-click", { detail: { alert: e.detail.alert } }));
|
|
211502
|
+
this.selectMode(e.detail.value);
|
|
211380
211503
|
}
|
|
211381
211504
|
render() {
|
|
211382
|
-
const lists = [{
|
|
211383
|
-
name: "all",
|
|
211384
|
-
title: msg("All")
|
|
211385
|
-
}, {
|
|
211386
|
-
name: "unacked",
|
|
211387
|
-
title: msg("Unacked")
|
|
211388
|
-
}];
|
|
211389
|
-
if (this.hasShelved) lists.push({
|
|
211390
|
-
name: "shelved",
|
|
211391
|
-
title: msg("Shelved")
|
|
211392
|
-
});
|
|
211393
|
-
const metadata = this.metadata;
|
|
211394
|
-
const canAckAll = this.alerts.some(canAckFilter(metadata.filter));
|
|
211395
211505
|
return b`
|
|
211396
211506
|
<div class="wrapper">
|
|
211397
|
-
|
|
211398
|
-
class="alert-list"
|
|
211399
|
-
.small=${true}
|
|
211400
|
-
.alerts=${this.alerts}
|
|
211401
|
-
.selectedMode=${this._mode}
|
|
211402
|
-
.showTime=${this.showTime}
|
|
211403
|
-
.timeFormatter=${this.timeFormatter}
|
|
211404
|
-
@ack-click=${this.onAckClick}
|
|
211405
|
-
@row-click=${this.onRowClick}
|
|
211406
|
-
></obc-alert-list-details>
|
|
211507
|
+
${this.renderList()}
|
|
211407
211508
|
<div class="action">
|
|
211408
211509
|
<div class="btn-group">
|
|
211409
211510
|
<obc-dropdown-button
|
|
211410
|
-
.value=${this.
|
|
211511
|
+
.value=${this.mode}
|
|
211411
211512
|
@change=${this.onModeSelect}
|
|
211412
|
-
.options=${
|
|
211413
|
-
value: v.name,
|
|
211414
|
-
label: v.title
|
|
211415
|
-
}))}
|
|
211513
|
+
.options=${this.modes}
|
|
211416
211514
|
>
|
|
211417
211515
|
</obc-dropdown-button>
|
|
211418
211516
|
</div>
|
|
@@ -211425,16 +211523,16 @@ var ObcAlertListPageSmall = class ObcAlertListPageSmall extends i$4 {
|
|
|
211425
211523
|
>
|
|
211426
211524
|
<obi-silence-iec></obi-silence-iec>
|
|
211427
211525
|
</obc-icon-button>
|
|
211428
|
-
|
|
211429
|
-
|
|
211430
|
-
|
|
211431
|
-
|
|
211432
|
-
|
|
211433
|
-
|
|
211434
|
-
|
|
211435
|
-
|
|
211436
|
-
|
|
211437
|
-
|
|
211526
|
+
${this.offersAckAll ? b`<obc-button
|
|
211527
|
+
.variant=${ButtonVariant.raised}
|
|
211528
|
+
.disabled=${!this.canAckAll}
|
|
211529
|
+
fullWidth
|
|
211530
|
+
class="btn"
|
|
211531
|
+
data-testid="ack-all-visible-button"
|
|
211532
|
+
@click=${() => this.handleAckAllVisibleClick()}
|
|
211533
|
+
>
|
|
211534
|
+
${msg("ACK visible")}
|
|
211535
|
+
</obc-button>` : A}
|
|
211438
211536
|
</div>
|
|
211439
211537
|
</div>
|
|
211440
211538
|
</div>
|
|
@@ -211444,11 +211542,68 @@ var ObcAlertListPageSmall = class ObcAlertListPageSmall extends i$4 {
|
|
|
211444
211542
|
this.styles = r$7(alert_list_page_small_default);
|
|
211445
211543
|
}
|
|
211446
211544
|
};
|
|
211447
|
-
__decorate([n$4({ type: Boolean })],
|
|
211448
|
-
__decorate([n$4({ type:
|
|
211545
|
+
__decorate([n$4({ type: Boolean })], ObcAlertListPageSmallBase.prototype, "hasShelved", void 0);
|
|
211546
|
+
__decorate([n$4({ type: Boolean })], ObcAlertListPageSmallBase.prototype, "showTime", void 0);
|
|
211547
|
+
__decorate([n$4({ attribute: false })], ObcAlertListPageSmallBase.prototype, "timeFormatter", void 0);
|
|
211548
|
+
//#endregion
|
|
211549
|
+
//#region src/pages/alert-list-page-small/alert-list-page-small.ts
|
|
211550
|
+
var ObcAlertListPageSmall = class ObcAlertListPageSmall extends ObcAlertListPageSmallBase {
|
|
211551
|
+
constructor(..._args) {
|
|
211552
|
+
super(..._args);
|
|
211553
|
+
this.alerts = [];
|
|
211554
|
+
this.selectedMode = "all";
|
|
211555
|
+
this._mode = "all";
|
|
211556
|
+
}
|
|
211557
|
+
willUpdate(changedProperties) {
|
|
211558
|
+
if (changedProperties.has("selectedMode") && this._mode !== this.selectedMode) this._mode = this.selectedMode;
|
|
211559
|
+
}
|
|
211560
|
+
get modes() {
|
|
211561
|
+
const modes = [{
|
|
211562
|
+
value: "all",
|
|
211563
|
+
label: msg("All")
|
|
211564
|
+
}, {
|
|
211565
|
+
value: "unacked",
|
|
211566
|
+
label: msg("Unacked")
|
|
211567
|
+
}];
|
|
211568
|
+
if (this.hasShelved) modes.push({
|
|
211569
|
+
value: "shelved",
|
|
211570
|
+
label: msg("Shelved")
|
|
211571
|
+
});
|
|
211572
|
+
return modes;
|
|
211573
|
+
}
|
|
211574
|
+
get mode() {
|
|
211575
|
+
return this._mode;
|
|
211576
|
+
}
|
|
211577
|
+
selectMode(mode) {
|
|
211578
|
+
this._mode = mode;
|
|
211579
|
+
}
|
|
211580
|
+
get canAckAll() {
|
|
211581
|
+
return this.alerts.some(canAckFilter(getAlertListModeData(this._mode).filter));
|
|
211582
|
+
}
|
|
211583
|
+
visibleAlerts() {
|
|
211584
|
+
return this.alertList.getVisibleAlerts();
|
|
211585
|
+
}
|
|
211586
|
+
onAckClick(e) {
|
|
211587
|
+
this.dispatchAckClick(e.detail.alert);
|
|
211588
|
+
}
|
|
211589
|
+
onRowClick(e) {
|
|
211590
|
+
this.dispatchRowClick(e.detail.alert);
|
|
211591
|
+
}
|
|
211592
|
+
renderList() {
|
|
211593
|
+
return b`<obc-alert-list-details
|
|
211594
|
+
class="alert-list"
|
|
211595
|
+
.small=${true}
|
|
211596
|
+
.alerts=${this.alerts}
|
|
211597
|
+
.selectedMode=${this._mode}
|
|
211598
|
+
.showTime=${this.showTime}
|
|
211599
|
+
.timeFormatter=${this.timeFormatter}
|
|
211600
|
+
@ack-click=${this.onAckClick}
|
|
211601
|
+
@row-click=${this.onRowClick}
|
|
211602
|
+
></obc-alert-list-details>`;
|
|
211603
|
+
}
|
|
211604
|
+
};
|
|
211449
211605
|
__decorate([n$4({ type: Array })], ObcAlertListPageSmall.prototype, "alerts", void 0);
|
|
211450
|
-
__decorate([n$4({ type:
|
|
211451
|
-
__decorate([n$4({ attribute: false })], ObcAlertListPageSmall.prototype, "timeFormatter", void 0);
|
|
211606
|
+
__decorate([n$4({ type: String })], ObcAlertListPageSmall.prototype, "selectedMode", void 0);
|
|
211452
211607
|
__decorate([r$3()], ObcAlertListPageSmall.prototype, "_mode", void 0);
|
|
211453
211608
|
__decorate([e$4("obc-alert-list-details")], ObcAlertListPageSmall.prototype, "alertList", void 0);
|
|
211454
211609
|
ObcAlertListPageSmall = __decorate([customElement("obc-alert-list-page-small")], ObcAlertListPageSmall);
|