@oicl/openbridge-webcomponents 2.0.0-next.71 → 2.0.0-next.73

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.
@@ -65980,6 +65980,8 @@ let ObcMessageMenuItem = class extends i$4 {
65980
65980
  this.time = "";
65981
65981
  this.primaryActionLabel = "";
65982
65982
  this.secondaryActionLabel = "";
65983
+ this.enablePrimaryAction = true;
65984
+ this.enableSecondaryAction = true;
65983
65985
  this.hasPrimaryIcon = false;
65984
65986
  this.hasSecondaryIcon = false;
65985
65987
  this.hasTrailingIcon = false;
@@ -66096,6 +66098,7 @@ let ObcMessageMenuItem = class extends i$4 {
66096
66098
  variant="normal"
66097
66099
  .fullWidth=${this.isVertical}
66098
66100
  @click=${this.handleSecondaryActionClick}
66101
+ ?disabled=${!this.enableSecondaryAction}
66099
66102
  >
66100
66103
  ${this.secondaryActionLabel}
66101
66104
  </obc-button>` : A}
@@ -66103,6 +66106,7 @@ let ObcMessageMenuItem = class extends i$4 {
66103
66106
  variant="normal"
66104
66107
  .fullWidth=${this.isVertical}
66105
66108
  @click=${this.handlePrimaryActionClick}
66109
+ ?disabled=${!this.enablePrimaryAction}
66106
66110
  >
66107
66111
  ${this.hasActionLabelSlot ? b`<slot name="action-label"></slot>` : this.primaryActionLabel}
66108
66112
  </obc-button>` : A}
@@ -66145,6 +66149,12 @@ __decorateClass$vo([
66145
66149
  __decorateClass$vo([
66146
66150
  n$3({ type: String })
66147
66151
  ], ObcMessageMenuItem.prototype, "secondaryActionLabel", 2);
66152
+ __decorateClass$vo([
66153
+ n$3({ type: Boolean, attribute: false })
66154
+ ], ObcMessageMenuItem.prototype, "enablePrimaryAction", 2);
66155
+ __decorateClass$vo([
66156
+ n$3({ type: Boolean, attribute: false })
66157
+ ], ObcMessageMenuItem.prototype, "enableSecondaryAction", 2);
66148
66158
  __decorateClass$vo([
66149
66159
  n$3({ type: Boolean })
66150
66160
  ], ObcMessageMenuItem.prototype, "hasPrimaryIcon", 2);
@@ -72507,10 +72517,28 @@ let ObcAlertMenuItem = class extends i$4 {
72507
72517
  this.open = false;
72508
72518
  this.size = ObcMessageMenuItemSize.SingleLine;
72509
72519
  this.animateIntro = false;
72520
+ this.secondaryActionLabel = "";
72521
+ this.primaryActionState = "enabled";
72522
+ this.secondaryActionState = "none";
72510
72523
  }
72511
72524
  get primaryActionLabel() {
72525
+ if (this.primaryActionState === "none") {
72526
+ return "";
72527
+ }
72512
72528
  return this.status === "unacknowledged" ? "ACK" : "";
72513
72529
  }
72530
+ get secondaryActionLabelToShow() {
72531
+ if (this.secondaryActionState === "none") {
72532
+ return "";
72533
+ }
72534
+ return this.secondaryActionLabel;
72535
+ }
72536
+ get primaryActionDisabled() {
72537
+ return this.primaryActionState === "disabled";
72538
+ }
72539
+ get secondaryActionDisabled() {
72540
+ return this.secondaryActionState === "disabled";
72541
+ }
72514
72542
  get hasTrailingIcon() {
72515
72543
  return this.status !== "unacknowledged";
72516
72544
  }
@@ -72521,6 +72549,9 @@ let ObcAlertMenuItem = class extends i$4 {
72521
72549
  handleActionClick() {
72522
72550
  this.dispatchEvent(new CustomEvent("ack-click"));
72523
72551
  }
72552
+ handleSecondaryActionClick() {
72553
+ this.dispatchEvent(new CustomEvent("ack-secondary-click"));
72554
+ }
72524
72555
  render() {
72525
72556
  return b`
72526
72557
  <obc-message-menu-item
@@ -72529,6 +72560,9 @@ let ObcAlertMenuItem = class extends i$4 {
72529
72560
  .day=${this.day}
72530
72561
  .time=${this.time}
72531
72562
  .primaryActionLabel=${this.primaryActionLabel}
72563
+ .secondaryActionLabel=${this.secondaryActionLabelToShow}
72564
+ .enablePrimaryAction=${!this.primaryActionDisabled}
72565
+ .enableSecondaryAction=${!this.secondaryActionDisabled}
72532
72566
  .size=${this.size}
72533
72567
  .open=${this.open}
72534
72568
  .hasSecondaryIcon=${this.hasIcon}
@@ -72538,6 +72572,7 @@ let ObcAlertMenuItem = class extends i$4 {
72538
72572
  hasPrimaryIcon
72539
72573
  @message-click=${this.handleMessageClick}
72540
72574
  @primary-action-click=${this.handleActionClick}
72575
+ @secondary-action-click=${this.handleSecondaryActionClick}
72541
72576
  >
72542
72577
  <slot name="alert-icon" slot="primary-icon"></slot>
72543
72578
  <slot name="title" slot="title">${this.title}</slot>
@@ -72594,6 +72629,15 @@ __decorateClass$uX([
72594
72629
  __decorateClass$uX([
72595
72630
  n$3({ type: Boolean })
72596
72631
  ], ObcAlertMenuItem.prototype, "animateIntro", 2);
72632
+ __decorateClass$uX([
72633
+ n$3({ type: String })
72634
+ ], ObcAlertMenuItem.prototype, "secondaryActionLabel", 2);
72635
+ __decorateClass$uX([
72636
+ n$3({ type: String })
72637
+ ], ObcAlertMenuItem.prototype, "primaryActionState", 2);
72638
+ __decorateClass$uX([
72639
+ n$3({ type: String })
72640
+ ], ObcAlertMenuItem.prototype, "secondaryActionState", 2);
72597
72641
  ObcAlertMenuItem = __decorateClass$uX([
72598
72642
  customElement("obc-alert-menu-item")
72599
72643
  ], ObcAlertMenuItem);
@@ -206900,6 +206944,10 @@ const componentStyle$h = i$7`
206900
206944
  box-sizing: border-box;
206901
206945
  }
206902
206946
 
206947
+ :host {
206948
+ display: block;
206949
+ }
206950
+
206903
206951
  .wrapper {
206904
206952
  border-color: var(--integration-normal-enabled-border-color);
206905
206953
  background-color: var(--integration-normal-enabled-background-color);
@@ -206910,6 +206958,7 @@ const componentStyle$h = i$7`
206910
206958
  display: flex;
206911
206959
  flex-direction: column;
206912
206960
  align-items: center;
206961
+ height: 100%;
206913
206962
  background: var(--container-global-color);
206914
206963
  border-radius: var(
206915
206964
  --app-components-integration-system-dropdown-menu-border-radius
@@ -206936,6 +206985,10 @@ const componentStyle$h = i$7`
206936
206985
  border-radius: 12px;
206937
206986
  }
206938
206987
 
206988
+ .footer-container.hidden {
206989
+ display: none;
206990
+ }
206991
+
206939
206992
  .content-area {
206940
206993
  display: flex;
206941
206994
  flex-direction: column;
@@ -206945,6 +206998,10 @@ const componentStyle$h = i$7`
206945
206998
  border-radius: 8px;
206946
206999
  }
206947
207000
 
207001
+ .content-area.hidden {
207002
+ display: none;
207003
+ }
207004
+
206948
207005
  .footer-container slot[name="buttons"]::slotted(*) {
206949
207006
  display: flex;
206950
207007
  flex: 1 1 0px;
@@ -206959,7 +207016,8 @@ const componentStyle$h = i$7`
206959
207016
  gap: var(--app-components-integration-system-menu-action-spacing);
206960
207017
  }
206961
207018
 
206962
- .buttons-slot {
207019
+ .buttons-slot,
207020
+ .content-slot {
206963
207021
  display: contents;
206964
207022
  }
206965
207023
 
@@ -206973,12 +207031,13 @@ const componentStyle$h = i$7`
206973
207031
  border-radius: 8px;
206974
207032
  }
206975
207033
 
206976
- .content-container.hidealarmlist {
207034
+ .content-container.hidden {
206977
207035
  display: none;
206978
207036
  }
206979
207037
 
206980
207038
  .alertlist {
206981
207039
  width: 100%;
207040
+ height: 100%;
206982
207041
  }
206983
207042
 
206984
207043
  .leading-icon {
@@ -207002,29 +207061,43 @@ var __decorateClass$O = (decorators, target, key, kind) => {
207002
207061
  let ObcIntegrationVesselMenu = class extends i$4 {
207003
207062
  constructor() {
207004
207063
  super(...arguments);
207005
- this.hideAlarmList = false;
207064
+ this.hasActions = true;
207065
+ this.hasAlertList = true;
207066
+ this.hasContent = true;
207006
207067
  }
207007
207068
  render() {
207008
207069
  return b`
207009
- <div
207010
- class=${e$1({
207011
- wrapper: true
207070
+ <div class="wrapper">
207071
+ <div
207072
+ class=${e$1({
207073
+ "footer-container": true,
207074
+ hidden: !this.hasActions
207012
207075
  })}
207013
- >
207014
- <div class="footer-container">
207076
+ >
207015
207077
  <slot name="buttons" class="buttons-slot"></slot>
207016
207078
  </div>
207017
- <div class="content-area">
207018
- <slot name="content"></slot>
207079
+ <div
207080
+ class=${e$1({
207081
+ "content-area": true,
207082
+ hidden: !this.hasContent
207083
+ })}
207084
+ >
207085
+ <slot name="content" class="content-slot"></slot>
207019
207086
  </div>
207020
207087
  <div
207021
207088
  class=${e$1({
207022
207089
  "content-container": true,
207023
- hidealarmlist: this.hideAlarmList
207090
+ hidden: !this.hasAlertList
207024
207091
  })}
207025
207092
  >
207026
207093
  <obc-alert-list class="alertlist"
207027
207094
  ><slot name="alarms"></slot>
207095
+ <div slot="empty-icon">
207096
+ <obi-unacknowledged></obi-unacknowledged>
207097
+ </div>
207098
+ <div slot="empty-title">
207099
+ <span>No alerts</span>
207100
+ </div>
207028
207101
  </obc-alert-list>
207029
207102
  </div>
207030
207103
  </div>
@@ -207033,8 +207106,14 @@ let ObcIntegrationVesselMenu = class extends i$4 {
207033
207106
  };
207034
207107
  ObcIntegrationVesselMenu.styles = r$7(componentStyle$h);
207035
207108
  __decorateClass$O([
207036
- n$3({ type: Boolean })
207037
- ], ObcIntegrationVesselMenu.prototype, "hideAlarmList", 2);
207109
+ n$3({ type: Boolean, attribute: false })
207110
+ ], ObcIntegrationVesselMenu.prototype, "hasActions", 2);
207111
+ __decorateClass$O([
207112
+ n$3({ type: Boolean, attribute: false })
207113
+ ], ObcIntegrationVesselMenu.prototype, "hasAlertList", 2);
207114
+ __decorateClass$O([
207115
+ n$3({ type: Boolean, attribute: false })
207116
+ ], ObcIntegrationVesselMenu.prototype, "hasContent", 2);
207038
207117
  ObcIntegrationVesselMenu = __decorateClass$O([
207039
207118
  customElement("obc-integration-vessel-menu")
207040
207119
  ], ObcIntegrationVesselMenu);