@oicl/openbridge-webcomponents 2.1.0-next.1 → 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.
Files changed (55) hide show
  1. package/README.md +1 -0
  2. package/bundle/openbridge-webcomponents.bundle.js +352 -244
  3. package/bundle/openbridge-webcomponents.bundle.js.map +1 -1
  4. package/custom-elements.json +944 -90
  5. package/dist/building-blocks/alert-list/alert-list-base.d.ts +60 -0
  6. package/dist/building-blocks/alert-list/alert-list-base.d.ts.map +1 -0
  7. package/dist/building-blocks/alert-list/alert-list-base.js +191 -0
  8. package/dist/building-blocks/alert-list/alert-list-base.js.map +1 -0
  9. package/dist/building-blocks/alert-list/alert-list.css.js.map +1 -1
  10. package/dist/building-blocks/alert-list/alert-list.d.ts +13 -26
  11. package/dist/building-blocks/alert-list/alert-list.d.ts.map +1 -1
  12. package/dist/building-blocks/alert-list/alert-list.js +7 -142
  13. package/dist/building-blocks/alert-list/alert-list.js.map +1 -1
  14. package/dist/components/alert-icon/alert-icon.d.ts.map +1 -1
  15. package/dist/components/alert-icon/alert-icon.js +6 -5
  16. package/dist/components/alert-icon/alert-icon.js.map +1 -1
  17. package/dist/components/alert-list-details/alert-list-details.css.js +4 -1
  18. package/dist/components/alert-list-details/alert-list-details.css.js.map +1 -1
  19. package/dist/components/alert-menu/alert-menu.css.js +3 -42
  20. package/dist/components/alert-menu/alert-menu.css.js.map +1 -1
  21. package/dist/components/alert-menu/alert-menu.d.ts +28 -6
  22. package/dist/components/alert-menu/alert-menu.d.ts.map +1 -1
  23. package/dist/components/alert-menu/alert-menu.js +81 -60
  24. package/dist/components/alert-menu/alert-menu.js.map +1 -1
  25. package/dist/components/alert-menu-item/alert-menu-item.d.ts +16 -6
  26. package/dist/components/alert-menu-item/alert-menu-item.d.ts.map +1 -1
  27. package/dist/components/alert-menu-item/alert-menu-item.js +11 -2
  28. package/dist/components/alert-menu-item/alert-menu-item.js.map +1 -1
  29. package/dist/components/number-input-field/number-input-field.css.js +8 -2
  30. package/dist/components/number-input-field/number-input-field.css.js.map +1 -1
  31. package/dist/components/number-input-field/number-input-field.d.ts +15 -1
  32. package/dist/components/number-input-field/number-input-field.d.ts.map +1 -1
  33. package/dist/components/number-input-field/number-input-field.js +38 -44
  34. package/dist/components/number-input-field/number-input-field.js.map +1 -1
  35. package/dist/components/textbox/textbox.css.js +3 -9
  36. package/dist/components/textbox/textbox.css.js.map +1 -1
  37. package/dist/components/textbox/textbox.d.ts +3 -0
  38. package/dist/components/textbox/textbox.d.ts.map +1 -1
  39. package/dist/components/textbox/textbox.js.map +1 -1
  40. package/dist/generated/locales/es-419.d.ts +1 -1
  41. package/dist/generated/locales/es-419.js +1 -1
  42. package/dist/generated/locales/es-419.js.map +1 -1
  43. package/dist/navigation-instruments/readout-list-item/readout-list-item.css.js +2 -1
  44. package/dist/navigation-instruments/readout-list-item/readout-list-item.css.js.map +1 -1
  45. package/dist/pages/alert-detail-page/alert-detail-page.js +1 -1
  46. package/dist/pages/alert-detail-page/alert-detail-page.js.map +1 -1
  47. package/dist/pages/alert-list-page-small/alert-list-page-small-base.d.ts +63 -0
  48. package/dist/pages/alert-list-page-small/alert-list-page-small-base.d.ts.map +1 -0
  49. package/dist/pages/alert-list-page-small/alert-list-page-small-base.js +126 -0
  50. package/dist/pages/alert-list-page-small/alert-list-page-small-base.js.map +1 -0
  51. package/dist/pages/alert-list-page-small/alert-list-page-small.d.ts +12 -15
  52. package/dist/pages/alert-list-page-small/alert-list-page-small.d.ts.map +1 -1
  53. package/dist/pages/alert-list-page-small/alert-list-page-small.js +41 -92
  54. package/dist/pages/alert-list-page-small/alert-list-page-small.js.map +1 -1
  55. 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 inner-wrapper is the box: its height (--height) is the full textbox
16363
- height, padding included. The content is sized to the cap height and
16364
- vertically centered, which leaves the padding as equal space above and
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
@@ -47007,7 +47001,8 @@ obc-readout-block {
47007
47001
  gap: var(--global-size-spacing-target-padding);
47008
47002
  flex: 1 1 auto;
47009
47003
  min-inline-size: 0;
47010
- overflow: clip;
47004
+ overflow-x: clip;
47005
+ overflow-y: visible; /* a label's descenders and diacritics paint past its cap-to-baseline box */
47011
47006
  /* a leading-src chip's 1px outline is drawn outside its box at the container edge */
47012
47007
  overflow-clip-margin: 1px;
47013
47008
  }
@@ -69331,19 +69326,52 @@ __decorate([r$3()], ObcScrollbar.prototype, "_thumbHeight", void 0);
69331
69326
  __decorate([r$3()], ObcScrollbar.prototype, "_showOverlayThumb", void 0);
69332
69327
  ObcScrollbar = __decorate([customElement("obc-scrollbar")], ObcScrollbar);
69333
69328
  //#endregion
69334
- //#region src/building-blocks/alert-list/alert-list.ts
69335
- var ObcAlertList = class ObcAlertList extends i$4 {
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 {
69336
69350
  constructor(..._args) {
69337
69351
  super(..._args);
69338
- this.filter = () => true;
69339
69352
  this.oldElementTop = /* @__PURE__ */ new Map();
69340
69353
  this.mutationObserver = null;
69341
69354
  this.intersectionObserver = null;
69342
69355
  this.hasRenderedPanel = false;
69343
69356
  this._empty = false;
69344
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
+ }
69345
69373
  firstUpdated() {
69346
- this.updateEmpty();
69374
+ this.applyFilter();
69347
69375
  this.setupMutationObserver();
69348
69376
  }
69349
69377
  connectedCallback() {
@@ -69356,6 +69384,7 @@ var ObcAlertList = class ObcAlertList extends i$4 {
69356
69384
  this.setupMutationObserver();
69357
69385
  }
69358
69386
  disconnectedCallback() {
69387
+ super.disconnectedCallback();
69359
69388
  if (this.mutationObserver) {
69360
69389
  this.mutationObserver.disconnect();
69361
69390
  this.mutationObserver = null;
@@ -69366,16 +69395,17 @@ var ObcAlertList = class ObcAlertList extends i$4 {
69366
69395
  }
69367
69396
  }
69368
69397
  willUpdate(_changedProperties) {
69369
- if (_changedProperties.has("filter")) {
69370
- this.updateEmpty();
69398
+ if (this.filterChanged(_changedProperties)) {
69399
+ this.applyFilter();
69371
69400
  this.updateOldElementTop();
69372
69401
  }
69373
69402
  }
69374
- updateEmpty() {
69403
+ /** Runs whenever the items or the filter change; a subclass extends it to act on each item. */
69404
+ applyFilter() {
69375
69405
  this._empty = this.getAlertItems().length === 0;
69376
69406
  }
69377
69407
  getAlertItems() {
69378
- return this.alertItems.filter(this.filter);
69408
+ return this.alertItems.filter((item) => this.matchesFilter(item));
69379
69409
  }
69380
69410
  updateOldElementTop() {
69381
69411
  const elements = this.getAlertItems();
@@ -69400,7 +69430,7 @@ var ObcAlertList = class ObcAlertList extends i$4 {
69400
69430
  this.alertItems.forEach((element) => {
69401
69431
  this.mutationObserver?.observe(element, {
69402
69432
  attributes: true,
69403
- attributeFilter: ["status", "shelved"]
69433
+ attributeFilter: this.observedItemAttributes
69404
69434
  });
69405
69435
  });
69406
69436
  }
@@ -69410,7 +69440,7 @@ var ObcAlertList = class ObcAlertList extends i$4 {
69410
69440
  }
69411
69441
  handleElementsChange() {
69412
69442
  this.mutationObserver?.takeRecords();
69413
- this.updateEmpty();
69443
+ this.applyFilter();
69414
69444
  if (!this.checkVisibility()) return;
69415
69445
  const elements = this.getAlertItems();
69416
69446
  const oldElementTop = new Map(this.oldElementTop);
@@ -69455,14 +69485,15 @@ var ObcAlertList = class ObcAlertList extends i$4 {
69455
69485
  });
69456
69486
  }
69457
69487
  render() {
69488
+ const fallback = this.emptyFallback;
69458
69489
  return b` <obc-scrollbar class="alert-list" id="scrollbar">
69459
69490
  <slot @slotchange=${this.handleSlotChange}></slot>
69460
69491
  ${this._empty ? b` <div class="empty-list">
69461
69492
  <div class="icon">
69462
- <slot name="empty-icon"></slot>
69493
+ <slot name="empty-icon">${fallback.icon}</slot>
69463
69494
  </div>
69464
69495
  <div class="empty-title">
69465
- <slot name="empty-title"></slot>
69496
+ <slot name="empty-title">${fallback.title}</slot>
69466
69497
  </div>
69467
69498
  <div class="empty-description">
69468
69499
  <slot name="empty-description"></slot>
@@ -69474,10 +69505,24 @@ var ObcAlertList = class ObcAlertList extends i$4 {
69474
69505
  this.styles = r$7(alert_list_default);
69475
69506
  }
69476
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
+ };
69477
69525
  __decorate([n$4({ attribute: false })], ObcAlertList.prototype, "filter", void 0);
69478
- __decorate([r$3()], ObcAlertList.prototype, "_empty", void 0);
69479
- __decorate([o$5({ flatten: true })], ObcAlertList.prototype, "alertItems", void 0);
69480
- __decorate([e$4("#scrollbar", true)], ObcAlertList.prototype, "scrollbar", void 0);
69481
69526
  ObcAlertList = __decorate([customElement("obc-alert-list")], ObcAlertList);
69482
69527
  //#endregion
69483
69528
  //#region src/building-blocks/bar-horizontal/bar-horizontal.ts
@@ -77149,10 +77194,11 @@ var ObcAlertIcon = class ObcAlertIcon extends i$4 {
77149
77194
  case "unacknowledged": return mapping["alarm-unack"];
77150
77195
  default: return null;
77151
77196
  }
77152
- else if (this.bamType === AlertType.Warning) {
77153
- if (this.active === false) return mapping["warning-rectified"];
77154
- else if (this.acknowledged) return mapping["warning-silenced"];
77155
- else return mapping["warning-unack"];
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;
77156
77202
  }
77157
77203
  return null;
77158
77204
  }
@@ -77186,7 +77232,7 @@ var ObcAlertIcon = class ObcAlertIcon extends i$4 {
77186
77232
  default: return A;
77187
77233
  }
77188
77234
  }
77189
- return A;
77235
+ return this.icon ? b`${this.icon.a}` : A;
77190
77236
  }
77191
77237
  render() {
77192
77238
  if (!this._effectiveType) return b`<div>No alarm</div>`;
@@ -80361,7 +80407,6 @@ obc-table::part(grid) {
80361
80407
  .empty-list .icon {
80362
80408
  height: 96px;
80363
80409
  width: 96px;
80364
- color: var(--on-flat-neutral-color);
80365
80410
  }
80366
80411
 
80367
80412
  .empty-list .empty-title {
@@ -80389,6 +80434,10 @@ obc-table::part(grid) {
80389
80434
  max-width: 344px;
80390
80435
  text-align: center;
80391
80436
  }
80437
+
80438
+ .empty-list .icon {
80439
+ color: var(--on-flat-neutral-color);
80440
+ }
80392
80441
  `;
80393
80442
  //#endregion
80394
80443
  //#region src/components/alert-list-details/alert-list-details.ts
@@ -80651,6 +80700,7 @@ var ObcAlertMenuItemStatus = /* @__PURE__ */ function(ObcAlertMenuItemStatus) {
80651
80700
  ObcAlertMenuItemStatus["NoAckAlarm"] = "no-ack-alarm";
80652
80701
  ObcAlertMenuItemStatus["NoAckWarning"] = "no-ack-warning";
80653
80702
  ObcAlertMenuItemStatus["Rectified"] = "rectified";
80703
+ ObcAlertMenuItemStatus["RectifiedUnacknowledged"] = "rectified-unacknowledged";
80654
80704
  return ObcAlertMenuItemStatus;
80655
80705
  }({});
80656
80706
  var ObcAlertMenuItem = class ObcAlertMenuItem extends i$4 {
@@ -80658,6 +80708,7 @@ var ObcAlertMenuItem = class ObcAlertMenuItem extends i$4 {
80658
80708
  super(..._args);
80659
80709
  this.hasIcon = false;
80660
80710
  this.shelved = false;
80711
+ this.blocked = false;
80661
80712
  this.title = "";
80662
80713
  this.description = "";
80663
80714
  this.day = "";
@@ -80670,9 +80721,12 @@ var ObcAlertMenuItem = class ObcAlertMenuItem extends i$4 {
80670
80721
  this.primaryActionState = "enabled";
80671
80722
  this.secondaryActionState = "none";
80672
80723
  }
80724
+ get canAck() {
80725
+ return this.status === "unacknowledged" || this.status === "rectified-unacknowledged";
80726
+ }
80673
80727
  get primaryActionLabel() {
80674
80728
  if (this.primaryActionState === "none") return "";
80675
- return this.status === "unacknowledged" ? "ACK" : "";
80729
+ return this.canAck ? "ACK" : "";
80676
80730
  }
80677
80731
  get secondaryActionLabelToShow() {
80678
80732
  if (this.secondaryActionState === "none") return "";
@@ -80685,7 +80739,7 @@ var ObcAlertMenuItem = class ObcAlertMenuItem extends i$4 {
80685
80739
  return this.secondaryActionState === "disabled";
80686
80740
  }
80687
80741
  get hasTrailingIcon() {
80688
- return this.status !== "unacknowledged";
80742
+ return !this.canAck;
80689
80743
  }
80690
80744
  handleMessageClick(event) {
80691
80745
  event.stopPropagation();
@@ -80745,6 +80799,10 @@ __decorate([n$4({
80745
80799
  type: Boolean,
80746
80800
  reflect: true
80747
80801
  })], ObcAlertMenuItem.prototype, "shelved", void 0);
80802
+ __decorate([n$4({
80803
+ type: Boolean,
80804
+ reflect: true
80805
+ })], ObcAlertMenuItem.prototype, "blocked", void 0);
80748
80806
  __decorate([n$4({ type: String })], ObcAlertMenuItem.prototype, "title", void 0);
80749
80807
  __decorate([n$4({ type: String })], ObcAlertMenuItem.prototype, "description", void 0);
80750
80808
  __decorate([n$4({ type: String })], ObcAlertMenuItem.prototype, "day", void 0);
@@ -80839,52 +80897,13 @@ var alert_menu_default = i$7`* {
80839
80897
  min-width: 120px;
80840
80898
  }
80841
80899
 
80842
- .empty-list {
80843
- display: flex;
80844
- flex-direction: column;
80845
- align-items: center;
80846
- justify-content: center;
80847
- height: 100%;
80848
- gap: var(--app-components-alert-menu-button-spacing);
80849
- }
80850
-
80851
- .empty-list .icon {
80852
- height: 96px;
80853
- width: 96px;
80854
- }
80855
-
80856
- .empty-list .empty-title {
80857
- color: var(--element-active-color);
80858
- font-family: var(--global-typography-font-family);
80859
- font-weight: var(--global-typography-ui-body-active-font-weight);
80860
- font-size: var(--global-typography-ui-body-active-font-size);
80861
- line-height: var(--global-typography-ui-body-active-line-height);
80862
- font-feature-settings:
80863
- "liga" off,
80864
- "clig" off,
80865
- "ss04" on;
80866
- }
80867
-
80868
- .empty-list .empty-description {
80869
- color: var(--element-neutral-color);
80870
- font-family: var(--global-typography-font-family);
80871
- font-weight: var(--global-typography-ui-body-font-weight);
80872
- font-size: var(--global-typography-ui-body-font-size);
80873
- line-height: var(--global-typography-ui-body-line-height);
80874
- font-feature-settings:
80875
- "liga" off,
80876
- "clig" off,
80877
- "ss04" on;
80878
- max-width: 344px;
80879
- text-align: center;
80880
- }
80881
-
80882
80900
  ::slotted(*) {
80883
80901
  display: block;
80884
80902
  will-change: transform;
80885
80903
  }
80886
80904
 
80887
- .alert-list.all ::slotted([shelved]) {
80905
+ .alert-list.all ::slotted([shelved]),
80906
+ .alert-list.all ::slotted([status="rectified-unacknowledged"]) {
80888
80907
  display: none;
80889
80908
  }
80890
80909
 
@@ -80892,7 +80911,7 @@ var alert_menu_default = i$7`* {
80892
80911
  display: none;
80893
80912
  }
80894
80913
 
80895
- .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]) {
80896
80915
  display: none;
80897
80916
  }
80898
80917
  `;
@@ -81310,6 +81329,7 @@ __decorate([n$4({ type: Boolean })], ObcTabbedCard.prototype, "hasTabIcons", voi
81310
81329
  ObcTabbedCard = __decorate([customElement("obc-tabbed-card")], ObcTabbedCard);
81311
81330
  //#endregion
81312
81331
  //#region src/components/alert-menu/alert-menu.ts
81332
+ var WAITING_FOR_ACK = [ObcAlertMenuItemStatus.Unacknowledged, ObcAlertMenuItemStatus.RectifiedUnacknowledged];
81313
81333
  var ObcAlertMenu = class ObcAlertMenu extends i$4 {
81314
81334
  constructor(..._args) {
81315
81335
  super(..._args);
@@ -81320,88 +81340,108 @@ var ObcAlertMenu = class ObcAlertMenu extends i$4 {
81320
81340
  this.canAckAll = false;
81321
81341
  this.showSilenceButton = true;
81322
81342
  this.showAlertListButton = true;
81323
- this._selectedTabIndex = 1;
81324
81343
  }
81325
81344
  handleAckAllVisibleClick() {
81326
81345
  const visibleElements = this.alertList.getVisibleElements();
81327
81346
  this.dispatchEvent(new CustomEvent("ack-all-visible-click", { detail: {
81328
81347
  visibleElements,
81329
- tabName: this.getSelectedTab().name
81348
+ tabName: this.selectedTab.name
81330
81349
  } }));
81331
81350
  }
81332
81351
  onTabChange(e) {
81333
- this._selectedTabIndex = e.detail.tab;
81352
+ this._selectedTabName = this.tabs[e.detail.tab]?.name;
81353
+ }
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;
81334
81361
  }
81335
- getSelectedTab() {
81336
- if (this._selectedTabIndex === 0) return {
81362
+ /** The tabs in display order; the menu opens on the second one. */
81363
+ get tabs() {
81364
+ const tabs = [{
81337
81365
  name: "unacked",
81366
+ title: msg("Unacked"),
81338
81367
  emptyTitle: msg("No unacknowledged alerts"),
81339
- emptyDescription: msg("Go to the 'Alert list' for more details or to manage existing alerts."),
81340
- emptyIcon: b`<obi-unacknowledged></obi-unacknowledged>`,
81341
- class: "unacked",
81342
- filter: (item) => {
81343
- return item.getAttribute("status") === ObcAlertMenuItemStatus.Unacknowledged && !item.hasAttribute("shelved");
81344
- }
81345
- };
81346
- else if (this._selectedTabIndex === 2) return {
81347
- name: "shelved",
81348
- emptyTitle: msg("No shelved alerts"),
81349
- emptyDescription: msg("Go to the 'Alert list' for more details or to manage existing alerts."),
81350
- emptyIcon: b`<obi-alerts-shelf></obi-alerts-shelf>`,
81351
- class: "shelved",
81352
- filter: (item) => {
81353
- return item.hasAttribute("shelved");
81354
- }
81355
- };
81356
- else return {
81368
+ emptyIcon: b`<obi-unacknowledged></obi-unacknowledged>`
81369
+ }, {
81357
81370
  name: "all",
81371
+ title: msg("Active"),
81358
81372
  emptyTitle: msg("No active alerts"),
81359
- emptyDescription: msg("Go to the 'Alert list' for more details or to manage existing alerts."),
81360
- emptyIcon: b`<obi-alerts></obi-alerts>`,
81361
- class: "all",
81362
- filter: (item) => {
81363
- return !item.hasAttribute("shelved");
81364
- }
81365
- };
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;
81366
81408
  }
81367
81409
  render() {
81368
- const t = this.getSelectedTab();
81410
+ const tabs = this.tabs;
81411
+ const selectedIndex = this.selectedTabIndex(tabs);
81412
+ const t = tabs[selectedIndex];
81369
81413
  return b`
81370
81414
  <obc-tabbed-card
81371
- .nTabs=${this.hasShelved ? 3 : 2}
81415
+ .nTabs=${tabs.length}
81372
81416
  class="wrapper"
81373
81417
  part="wrapper"
81374
- .selectedTab=${this._selectedTabIndex}
81418
+ .selectedTab=${selectedIndex}
81375
81419
  hasDefaultSlotOnly
81376
81420
  @tab-change=${this.onTabChange}
81377
81421
  >
81378
- <span slot="tab-title-0">${msg("Unacked")}</span>
81379
- <span slot="tab-title-1">${msg("Active")}</span>
81380
- ${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>`)}
81381
81423
  <div class="container">
81382
- <obc-alert-list class="alert-list ${t.class}" .filter=${t.filter}>
81383
- <slot></slot>
81384
- <slot name="empty-${t.name}-title" slot="empty-title"
81385
- >${t.emptyTitle}</slot
81386
- >
81387
- <slot name="empty-${t.name}-description" slot="empty-description"
81388
- >${t.emptyDescription}</slot
81389
- >
81390
- <slot name="empty-${t.name}-icon" slot="empty-icon"
81391
- >${t.emptyIcon}</slot
81392
- >
81393
- </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
+ >`)}
81394
81434
  <div class="action">
81395
- <obc-button
81396
- variant="raised"
81397
- .disabled=${!this.canAckAll}
81398
- fullWidth
81399
- class="btn"
81400
- data-testid="ack-all-visible-button"
81401
- @click=${this.handleAckAllVisibleClick}
81402
- >
81403
- ${msg("ACK visible")}
81404
- </obc-button>
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}
81405
81445
  ${this.showSilenceButton ? b`<obc-button
81406
81446
  variant="normal"
81407
81447
  fullWidth
@@ -81447,8 +81487,8 @@ __decorate([n$4({
81447
81487
  type: Boolean,
81448
81488
  attribute: false
81449
81489
  })], ObcAlertMenu.prototype, "showAlertListButton", void 0);
81450
- __decorate([r$3()], ObcAlertMenu.prototype, "_selectedTabIndex", void 0);
81451
- __decorate([e$4("obc-alert-list")], ObcAlertMenu.prototype, "alertList", void 0);
81490
+ __decorate([r$3()], ObcAlertMenu.prototype, "_selectedTabName", void 0);
81491
+ __decorate([e$4(".alert-list")], ObcAlertMenu.prototype, "alertList", void 0);
81452
81492
  ObcAlertMenu = __decorate([localized(), customElement("obc-alert-menu")], ObcAlertMenu);
81453
81493
  //#endregion
81454
81494
  //#region src/components/alert-subsystem-counter/alert-subsystem-counter.css?inline
@@ -98626,12 +98666,18 @@ var number_input_field_default = i$7`* {
98626
98666
  }
98627
98667
 
98628
98668
  .wrapper.align-center .value-input {
98629
- width: var(--obc-number-input-center-width, auto);
98630
- min-width: var(--obc-number-input-center-width, 40px);
98669
+ field-sizing: content; /* the unit hugs the value */
98670
+ width: auto;
98631
98671
  text-align: right;
98632
98672
  flex: 0 0 auto;
98633
98673
  }
98634
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
+
98635
98681
  .wrapper.align-right .label-container,
98636
98682
  .wrapper.align-right-unit-outside .label-container {
98637
98683
  justify-content: flex-end;
@@ -98738,9 +98784,6 @@ var ObcNumberInputFieldSize = /* @__PURE__ */ function(ObcNumberInputFieldSize)
98738
98784
  ObcNumberInputFieldSize["Large"] = "large";
98739
98785
  return ObcNumberInputFieldSize;
98740
98786
  }({});
98741
- var characterWidth = 9.15199279785156;
98742
- var symbolWidth = 4.287994384765653;
98743
- var baseFontSize = 16;
98744
98787
  var ObcNumberInputField = class ObcNumberInputField extends i$4 {
98745
98788
  constructor(..._args) {
98746
98789
  super(..._args);
@@ -98774,6 +98817,7 @@ var ObcNumberInputField = class ObcNumberInputField extends i$4 {
98774
98817
  this.previousValue = NaN;
98775
98818
  this.previousDisplayText = "";
98776
98819
  this.lastCommittedValue = NaN;
98820
+ this.focusFromValueClick = false;
98777
98821
  }
98778
98822
  get displayValue() {
98779
98823
  return this.displayText;
@@ -98797,7 +98841,6 @@ var ObcNumberInputField = class ObcNumberInputField extends i$4 {
98797
98841
  const parsed = parseNumberInput(raw);
98798
98842
  this.value = parsed;
98799
98843
  this.previousDisplayText = raw;
98800
- this.updateCenterAlignedInputWidth(raw);
98801
98844
  this.dispatchInput();
98802
98845
  }
98803
98846
  isProjectedValueAllowed(projected) {
@@ -98825,6 +98868,31 @@ var ObcNumberInputField = class ObcNumberInputField extends i$4 {
98825
98868
  onFocus() {
98826
98869
  this.hasFocus = true;
98827
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() {
98828
98896
  const source = this.displayOverride || this.displayText;
98829
98897
  this.displayText = removeGroupingFromDisplay(source, this.getFormatOptions());
98830
98898
  this.displayOverride = "";
@@ -98870,22 +98938,9 @@ var ObcNumberInputField = class ObcNumberInputField extends i$4 {
98870
98938
  if (!this.shouldUpdateValue && this.inputElement) return this.inputElement.value;
98871
98939
  return this.displayText;
98872
98940
  }
98873
- updateCenterAlignedInputWidth(value) {
98874
- if (this.textAlign !== "center") {
98875
- this.style.removeProperty("--obc-number-input-center-width");
98876
- return;
98877
- }
98878
- const fontSize = Number.parseFloat(getCssVariableValue(this, "--global-typography-instrument-value-regular-font-size"));
98879
- const characters = value.replaceAll(/[.,]/g, "");
98880
- const symbols = value.length - characters.length;
98881
- const calculatedWidth = characters.length * characterWidth + symbols * symbolWidth;
98882
- const measuredWidth = Math.ceil(calculatedWidth * fontSize / baseFontSize);
98883
- this.style.setProperty("--obc-number-input-center-width", `${measuredWidth}px`);
98884
- }
98885
98941
  firstUpdated() {
98886
98942
  if (!this.displayText && !this.displayOverride) this.displayText = this.formatValueForDisplay(this.value);
98887
98943
  this.lastCommittedValue = this.value;
98888
- this.updateCenterAlignedInputWidth(this.getEffectiveDisplay());
98889
98944
  }
98890
98945
  get isEmpty() {
98891
98946
  if (this.inputElement) return this.inputElement.value.trim().length === 0;
@@ -98907,7 +98962,6 @@ var ObcNumberInputField = class ObcNumberInputField extends i$4 {
98907
98962
  }
98908
98963
  updated() {
98909
98964
  if (this.rejectDuplicateUpdates && !valuesEqual(this.value, this.previousValue) && (this.previousDisplayText !== this.displayText || !this.hasFocus)) this.previousValue = this.value;
98910
- this.updateCenterAlignedInputWidth(this.getEffectiveDisplay());
98911
98965
  }
98912
98966
  renderFooterText(text, isError) {
98913
98967
  if (!text) return A;
@@ -98924,33 +98978,20 @@ var ObcNumberInputField = class ObcNumberInputField extends i$4 {
98924
98978
  ${text}
98925
98979
  </div>`;
98926
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
+ */
98927
98988
  onPointerDown(e) {
98928
- if (this.disabled) return;
98929
- if (this.readonly) return;
98930
- if (this.inputElement) {
98931
- e.stopPropagation();
98932
- e.preventDefault();
98933
- this.inputElement.focus();
98934
- const inputBox = this.inputElement.getBoundingClientRect();
98935
- let selectionStart;
98936
- if (e.clientX < inputBox.left) selectionStart = 0;
98937
- else if (e.clientX > inputBox.right) selectionStart = this.inputElement.value.length;
98938
- else {
98939
- const mouseX = e.clientX;
98940
- let inputX = inputBox.right;
98941
- const text = this.inputElement.value;
98942
- for (let i = text.length - 1; i >= 0; i--) {
98943
- const width = text[i].match(/[.,]/) ? symbolWidth : characterWidth;
98944
- if (mouseX > inputX - width / 2) {
98945
- selectionStart = i + 1;
98946
- break;
98947
- }
98948
- inputX -= width;
98949
- }
98950
- if (selectionStart === void 0) selectionStart = 0;
98951
- }
98952
- 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;
98953
98993
  }
98994
+ e.preventDefault();
98954
98995
  }
98955
98996
  render() {
98956
98997
  const hasHelperOrError = Boolean(this.helperText) || Boolean(this.error && this.errorText);
@@ -211276,7 +211317,7 @@ var ObcAlertDetailPage = class ObcAlertDetailPage extends i$4 {
211276
211317
  [`type-${this.type}`]: true,
211277
211318
  "status-acknowledged": isAcknowledged(this.alert) && isActive(this.alert),
211278
211319
  "status-unacknowledged": !isAcknowledged(this.alert) && isActive(this.alert),
211279
- "status-resolved": isActive(this.alert)
211320
+ "status-resolved": !isActive(this.alert)
211280
211321
  })}
211281
211322
  >
211282
211323
  <div class="header">
@@ -211391,75 +211432,85 @@ var alert_list_page_small_default = i$7`* {
211391
211432
  }
211392
211433
  `;
211393
211434
  //#endregion
211394
- //#region src/pages/alert-list-page-small/alert-list-page-small.ts
211395
- var ObcAlertListPageSmall = class ObcAlertListPageSmall extends i$4 {
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 {
211396
211459
  constructor(..._args) {
211397
211460
  super(..._args);
211398
211461
  this.hasShelved = false;
211399
- this.selectedMode = "all";
211400
- this.alerts = [];
211401
211462
  this.showTime = false;
211402
211463
  this.timeFormatter = (time) => time.toLocaleTimeString(void 0, { hour12: false });
211403
- this._mode = "all";
211404
211464
  }
211405
- willUpdate(changedProperties) {
211406
- if (changedProperties.has("selectedMode") && this._mode !== this.selectedMode) this._mode = this.selectedMode;
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 } }));
211407
211494
  }
211408
211495
  handleAckAllVisibleClick() {
211409
- const tabName = this.selectedMode;
211410
- const visibleElements = this.alertList.getVisibleAlerts();
211411
211496
  this.dispatchEvent(new CustomEvent("ack-all-visible-click", { detail: {
211412
- alerts: visibleElements,
211413
- mode: tabName
211497
+ alerts: this.visibleAlerts(),
211498
+ mode: this.mode
211414
211499
  } }));
211415
211500
  }
211416
211501
  onModeSelect(e) {
211417
- this._mode = e.detail.value;
211418
- }
211419
- get metadata() {
211420
- return getAlertListModeData(this.selectedMode);
211421
- }
211422
- onAckClick(e) {
211423
- this.dispatchEvent(new CustomEvent("ack-click", { detail: { alert: e.detail.alert } }));
211424
- }
211425
- onRowClick(e) {
211426
- this.dispatchEvent(new CustomEvent("row-click", { detail: { alert: e.detail.alert } }));
211502
+ this.selectMode(e.detail.value);
211427
211503
  }
211428
211504
  render() {
211429
- const lists = [{
211430
- name: "all",
211431
- title: msg("All")
211432
- }, {
211433
- name: "unacked",
211434
- title: msg("Unacked")
211435
- }];
211436
- if (this.hasShelved) lists.push({
211437
- name: "shelved",
211438
- title: msg("Shelved")
211439
- });
211440
- const metadata = this.metadata;
211441
- const canAckAll = this.alerts.some(canAckFilter(metadata.filter));
211442
211505
  return b`
211443
211506
  <div class="wrapper">
211444
- <obc-alert-list-details
211445
- class="alert-list"
211446
- .small=${true}
211447
- .alerts=${this.alerts}
211448
- .selectedMode=${this._mode}
211449
- .showTime=${this.showTime}
211450
- .timeFormatter=${this.timeFormatter}
211451
- @ack-click=${this.onAckClick}
211452
- @row-click=${this.onRowClick}
211453
- ></obc-alert-list-details>
211507
+ ${this.renderList()}
211454
211508
  <div class="action">
211455
211509
  <div class="btn-group">
211456
211510
  <obc-dropdown-button
211457
- .value=${this._mode}
211511
+ .value=${this.mode}
211458
211512
  @change=${this.onModeSelect}
211459
- .options=${lists.map((v) => ({
211460
- value: v.name,
211461
- label: v.title
211462
- }))}
211513
+ .options=${this.modes}
211463
211514
  >
211464
211515
  </obc-dropdown-button>
211465
211516
  </div>
@@ -211472,16 +211523,16 @@ var ObcAlertListPageSmall = class ObcAlertListPageSmall extends i$4 {
211472
211523
  >
211473
211524
  <obi-silence-iec></obi-silence-iec>
211474
211525
  </obc-icon-button>
211475
- <obc-button
211476
- .variant=${ButtonVariant.raised}
211477
- .disabled=${!canAckAll}
211478
- fullWidth
211479
- class="btn"
211480
- data-testid="ack-all-visible-button"
211481
- @click=${() => this.handleAckAllVisibleClick()}
211482
- >
211483
- ${msg("ACK visible")}
211484
- </obc-button>
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}
211485
211536
  </div>
211486
211537
  </div>
211487
211538
  </div>
@@ -211491,11 +211542,68 @@ var ObcAlertListPageSmall = class ObcAlertListPageSmall extends i$4 {
211491
211542
  this.styles = r$7(alert_list_page_small_default);
211492
211543
  }
211493
211544
  };
211494
- __decorate([n$4({ type: Boolean })], ObcAlertListPageSmall.prototype, "hasShelved", void 0);
211495
- __decorate([n$4({ type: String })], ObcAlertListPageSmall.prototype, "selectedMode", void 0);
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
+ };
211496
211605
  __decorate([n$4({ type: Array })], ObcAlertListPageSmall.prototype, "alerts", void 0);
211497
- __decorate([n$4({ type: Boolean })], ObcAlertListPageSmall.prototype, "showTime", void 0);
211498
- __decorate([n$4({ attribute: false })], ObcAlertListPageSmall.prototype, "timeFormatter", void 0);
211606
+ __decorate([n$4({ type: String })], ObcAlertListPageSmall.prototype, "selectedMode", void 0);
211499
211607
  __decorate([r$3()], ObcAlertListPageSmall.prototype, "_mode", void 0);
211500
211608
  __decorate([e$4("obc-alert-list-details")], ObcAlertListPageSmall.prototype, "alertList", void 0);
211501
211609
  ObcAlertListPageSmall = __decorate([customElement("obc-alert-list-page-small")], ObcAlertListPageSmall);