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

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);