@oicl/openbridge-webcomponents 2.0.0-next.64 → 2.0.0-next.65
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle/openbridge-webcomponents.bundle.js +66 -58
- package/bundle/openbridge-webcomponents.bundle.js.map +1 -1
- package/custom-elements.json +45 -187
- package/dist/components/navigation-item/navigation-item.d.ts +7 -7
- package/dist/components/navigation-item/navigation-item.d.ts.map +1 -1
- package/dist/components/navigation-item/navigation-item.js +3 -15
- package/dist/components/navigation-item/navigation-item.js.map +1 -1
- package/dist/components/navigation-item-group/navigation-item-group.d.ts +8 -7
- package/dist/components/navigation-item-group/navigation-item-group.d.ts.map +1 -1
- package/dist/components/navigation-item-group/navigation-item-group.js +3 -15
- package/dist/components/navigation-item-group/navigation-item-group.js.map +1 -1
- package/dist/components/navigation-menu/navigation-menu.d.ts +2 -2
- package/dist/components/navigation-menu/navigation-menu.js.map +1 -1
- package/dist/components/tree-navigation-group/tree-navigation-group.d.ts +10 -10
- package/dist/components/tree-navigation-group/tree-navigation-group.d.ts.map +1 -1
- package/dist/components/tree-navigation-group/tree-navigation-group.js +3 -15
- package/dist/components/tree-navigation-group/tree-navigation-group.js.map +1 -1
- package/dist/components/tree-navigation-item/tree-navigation-item.css.js +13 -0
- package/dist/components/tree-navigation-item/tree-navigation-item.css.js.map +1 -1
- package/dist/components/tree-navigation-item/tree-navigation-item.d.ts +59 -8
- package/dist/components/tree-navigation-item/tree-navigation-item.d.ts.map +1 -1
- package/dist/components/tree-navigation-item/tree-navigation-item.js +46 -17
- package/dist/components/tree-navigation-item/tree-navigation-item.js.map +1 -1
- package/package.json +1 -1
|
@@ -58056,6 +58056,19 @@ const componentStyle$14 = i$7`
|
|
|
58056
58056
|
min-width: 0;
|
|
58057
58057
|
}
|
|
58058
58058
|
|
|
58059
|
+
/*
|
|
58060
|
+
* Trailing badge area. A row can carry more than one alert badge (e.g. a
|
|
58061
|
+
* critical count beside a warning count); they sit in a flex row spaced by the
|
|
58062
|
+
* shared alert-counter spacing token.
|
|
58063
|
+
*/
|
|
58064
|
+
|
|
58065
|
+
.alert-badges {
|
|
58066
|
+
flex-shrink: 0;
|
|
58067
|
+
display: flex;
|
|
58068
|
+
align-items: center;
|
|
58069
|
+
gap: var(--app-components-alert-counter-item-badge-spacing);
|
|
58070
|
+
}
|
|
58071
|
+
|
|
58059
58072
|
.alert-badge {
|
|
58060
58073
|
flex-shrink: 0;
|
|
58061
58074
|
}
|
|
@@ -58720,14 +58733,44 @@ let ObcTreeNavigationItem = class extends i$4 {
|
|
|
58720
58733
|
this.focusable = true;
|
|
58721
58734
|
this.hasLeadingIcon = true;
|
|
58722
58735
|
this.terminalType = "regular";
|
|
58723
|
-
this.hasAlertBadge = false;
|
|
58724
|
-
this.alertCount = 0;
|
|
58725
|
-
this.alertType = BadgeType.alarm;
|
|
58726
58736
|
}
|
|
58727
58737
|
/** Focuses the row's interactive wrapper (the host itself is not focusable). */
|
|
58728
58738
|
focus(options) {
|
|
58729
58739
|
this.wrapperElement?.focus(options);
|
|
58730
58740
|
}
|
|
58741
|
+
/**
|
|
58742
|
+
* The badge(s) to render from `alerts`, as `{type, count}` pairs already in
|
|
58743
|
+
* severity order, ranked by `ALERT_SEVERITY_PRIORITY`.
|
|
58744
|
+
*
|
|
58745
|
+
* - No `alerts`, or every count 0 → no badges.
|
|
58746
|
+
* - `aggregate` → a single pair: the summed count typed as the highest
|
|
58747
|
+
* category that has any alerts.
|
|
58748
|
+
* - Otherwise → one pair per count greater than 0.
|
|
58749
|
+
*/
|
|
58750
|
+
get alertBadges() {
|
|
58751
|
+
const alerts = this.alerts;
|
|
58752
|
+
if (!alerts) return [];
|
|
58753
|
+
const countByType = {
|
|
58754
|
+
[AlertType.LevelCritical]: alerts.countLevelCritical ?? 0,
|
|
58755
|
+
[AlertType.Alarm]: alerts.countAlarm ?? 0,
|
|
58756
|
+
[AlertType.LevelHigh]: alerts.countLevelHigh ?? 0,
|
|
58757
|
+
[AlertType.Warning]: alerts.countWarning ?? 0,
|
|
58758
|
+
[AlertType.LevelMedium]: alerts.countLevelMedium ?? 0,
|
|
58759
|
+
[AlertType.Caution]: alerts.countCaution ?? 0,
|
|
58760
|
+
[AlertType.LevelLow]: alerts.countLevelLow ?? 0,
|
|
58761
|
+
[AlertType.LevelDiagnostic]: alerts.countLevelDiagnostic ?? 0
|
|
58762
|
+
};
|
|
58763
|
+
const ranked = ALERT_SEVERITY_PRIORITY.filter(
|
|
58764
|
+
(type) => type in countByType
|
|
58765
|
+
).map((type) => ({ type, count: countByType[type] ?? 0 }));
|
|
58766
|
+
if (alerts.aggregate) {
|
|
58767
|
+
const total = ranked.reduce((sum, b2) => sum + b2.count, 0);
|
|
58768
|
+
const highest = ranked.find((b2) => b2.count > 0);
|
|
58769
|
+
if (!highest) return [];
|
|
58770
|
+
return [{ type: highest.type, count: total }];
|
|
58771
|
+
}
|
|
58772
|
+
return ranked.filter((b2) => b2.count > 0);
|
|
58773
|
+
}
|
|
58731
58774
|
/** A root-level row has no ancestor columns, so it draws no connector lines. */
|
|
58732
58775
|
get isRoot() {
|
|
58733
58776
|
return this.branches.length === 0;
|
|
@@ -58821,11 +58864,15 @@ let ObcTreeNavigationItem = class extends i$4 {
|
|
|
58821
58864
|
</div>` : A}
|
|
58822
58865
|
<span part="label" class="label">${this.label}</span>
|
|
58823
58866
|
</div>
|
|
58824
|
-
${this.
|
|
58825
|
-
|
|
58826
|
-
|
|
58827
|
-
|
|
58828
|
-
|
|
58867
|
+
${this.alertBadges.length > 0 ? b`<div class="alert-badges">
|
|
58868
|
+
${this.alertBadges.map(
|
|
58869
|
+
(badge) => b`<obc-badge
|
|
58870
|
+
class="alert-badge"
|
|
58871
|
+
.type=${badge.type}
|
|
58872
|
+
.number=${badge.count}
|
|
58873
|
+
></obc-badge>`
|
|
58874
|
+
)}
|
|
58875
|
+
</div>` : A}
|
|
58829
58876
|
</div>
|
|
58830
58877
|
</div>
|
|
58831
58878
|
`;
|
|
@@ -58860,14 +58907,8 @@ __decorateClass$vI([
|
|
|
58860
58907
|
n$3({ type: String })
|
|
58861
58908
|
], ObcTreeNavigationItem.prototype, "terminalType", 2);
|
|
58862
58909
|
__decorateClass$vI([
|
|
58863
|
-
n$3({ type:
|
|
58864
|
-
], ObcTreeNavigationItem.prototype, "
|
|
58865
|
-
__decorateClass$vI([
|
|
58866
|
-
n$3({ type: Number })
|
|
58867
|
-
], ObcTreeNavigationItem.prototype, "alertCount", 2);
|
|
58868
|
-
__decorateClass$vI([
|
|
58869
|
-
n$3({ type: String })
|
|
58870
|
-
], ObcTreeNavigationItem.prototype, "alertType", 2);
|
|
58910
|
+
n$3({ type: Object })
|
|
58911
|
+
], ObcTreeNavigationItem.prototype, "alerts", 2);
|
|
58871
58912
|
__decorateClass$vI([
|
|
58872
58913
|
n$3({ type: String })
|
|
58873
58914
|
], ObcTreeNavigationItem.prototype, "href", 2);
|
|
@@ -59391,9 +59432,6 @@ let ObcNavigationItem = class extends i$4 {
|
|
|
59391
59432
|
this.treeMode = false;
|
|
59392
59433
|
this.treeBranches = [];
|
|
59393
59434
|
this.terminalType = TreeTerminalType.regular;
|
|
59394
|
-
this.hasAlertBadge = false;
|
|
59395
|
-
this.alertCount = 0;
|
|
59396
|
-
this.alertType = BadgeType.alarm;
|
|
59397
59435
|
}
|
|
59398
59436
|
/**
|
|
59399
59437
|
* Fired when the navigation item is clicked (either as a link or button).
|
|
@@ -59440,9 +59478,7 @@ let ObcNavigationItem = class extends i$4 {
|
|
|
59440
59478
|
.hasLeadingIcon=${this.hasIcon}
|
|
59441
59479
|
.href=${this.href}
|
|
59442
59480
|
.terminalType=${this.terminalType}
|
|
59443
|
-
|
|
59444
|
-
.alertCount=${this.alertCount}
|
|
59445
|
-
.alertType=${this.alertType}
|
|
59481
|
+
.alerts=${this.alerts}
|
|
59446
59482
|
@click=${this.onClick}
|
|
59447
59483
|
>
|
|
59448
59484
|
${this.hasIcon ? b`<slot name="icon" slot="icon"></slot>` : A}
|
|
@@ -59530,14 +59566,8 @@ __decorateClass$vG([
|
|
|
59530
59566
|
n$3({ type: String })
|
|
59531
59567
|
], ObcNavigationItem.prototype, "terminalType", 2);
|
|
59532
59568
|
__decorateClass$vG([
|
|
59533
|
-
n$3({ type:
|
|
59534
|
-
], ObcNavigationItem.prototype, "
|
|
59535
|
-
__decorateClass$vG([
|
|
59536
|
-
n$3({ type: Number })
|
|
59537
|
-
], ObcNavigationItem.prototype, "alertCount", 2);
|
|
59538
|
-
__decorateClass$vG([
|
|
59539
|
-
n$3({ type: String })
|
|
59540
|
-
], ObcNavigationItem.prototype, "alertType", 2);
|
|
59569
|
+
n$3({ type: Object })
|
|
59570
|
+
], ObcNavigationItem.prototype, "alerts", 2);
|
|
59541
59571
|
__decorateClass$vG([
|
|
59542
59572
|
e$3("a")
|
|
59543
59573
|
], ObcNavigationItem.prototype, "anchorElement", 2);
|
|
@@ -59687,9 +59717,6 @@ let ObcNavigationItemGroup = class extends i$4 {
|
|
|
59687
59717
|
this.treeMode = false;
|
|
59688
59718
|
this.treeBranches = [];
|
|
59689
59719
|
this.terminalType = TreeTerminalType.regular;
|
|
59690
|
-
this.hasAlertBadge = false;
|
|
59691
|
-
this.alertCount = 0;
|
|
59692
|
-
this.alertType = BadgeType.alarm;
|
|
59693
59720
|
this.defaultOpen = false;
|
|
59694
59721
|
this.openContainer = false;
|
|
59695
59722
|
}
|
|
@@ -59738,9 +59765,7 @@ let ObcNavigationItemGroup = class extends i$4 {
|
|
|
59738
59765
|
?checked=${this.checked}
|
|
59739
59766
|
.hasLeadingIcon=${this.hasIcon}
|
|
59740
59767
|
.terminalType=${this.terminalType}
|
|
59741
|
-
|
|
59742
|
-
.alertCount=${this.alertCount}
|
|
59743
|
-
.alertType=${this.alertType}
|
|
59768
|
+
.alerts=${this.expanded ? void 0 : this.alerts}
|
|
59744
59769
|
@expand-toggle=${this.onClickGroup}
|
|
59745
59770
|
>
|
|
59746
59771
|
${this.hasIcon ? b`<slot name="icon" slot="icon"></slot>` : A}
|
|
@@ -59816,14 +59841,8 @@ __decorateClass$vF([
|
|
|
59816
59841
|
n$3({ type: String })
|
|
59817
59842
|
], ObcNavigationItemGroup.prototype, "terminalType", 2);
|
|
59818
59843
|
__decorateClass$vF([
|
|
59819
|
-
n$3({ type:
|
|
59820
|
-
], ObcNavigationItemGroup.prototype, "
|
|
59821
|
-
__decorateClass$vF([
|
|
59822
|
-
n$3({ type: Number })
|
|
59823
|
-
], ObcNavigationItemGroup.prototype, "alertCount", 2);
|
|
59824
|
-
__decorateClass$vF([
|
|
59825
|
-
n$3({ type: String })
|
|
59826
|
-
], ObcNavigationItemGroup.prototype, "alertType", 2);
|
|
59844
|
+
n$3({ type: Object })
|
|
59845
|
+
], ObcNavigationItemGroup.prototype, "alerts", 2);
|
|
59827
59846
|
__decorateClass$vF([
|
|
59828
59847
|
n$3({ type: Boolean })
|
|
59829
59848
|
], ObcNavigationItemGroup.prototype, "defaultOpen", 2);
|
|
@@ -108628,9 +108647,6 @@ let ObcTreeNavigationGroup = class extends i$4 {
|
|
|
108628
108647
|
this.disabled = false;
|
|
108629
108648
|
this.hasIcon = true;
|
|
108630
108649
|
this.terminalType = TreeTerminalType.regular;
|
|
108631
|
-
this.hasAlertBadge = false;
|
|
108632
|
-
this.alertCount = 0;
|
|
108633
|
-
this.alertType = BadgeType.alarm;
|
|
108634
108650
|
}
|
|
108635
108651
|
onHeaderToggle(event) {
|
|
108636
108652
|
this.expanded = event.detail;
|
|
@@ -108660,9 +108676,7 @@ let ObcTreeNavigationGroup = class extends i$4 {
|
|
|
108660
108676
|
?disabled=${this.disabled}
|
|
108661
108677
|
.hasLeadingIcon=${this.hasIcon}
|
|
108662
108678
|
.terminalType=${this.terminalType}
|
|
108663
|
-
|
|
108664
|
-
.alertCount=${this.alertCount}
|
|
108665
|
-
.alertType=${this.alertType}
|
|
108679
|
+
.alerts=${this.expanded ? void 0 : this.alerts}
|
|
108666
108680
|
.href=${this.href}
|
|
108667
108681
|
@expand-toggle=${this.onHeaderToggle}
|
|
108668
108682
|
>
|
|
@@ -108697,14 +108711,8 @@ __decorateClass$sK([
|
|
|
108697
108711
|
n$3({ type: String })
|
|
108698
108712
|
], ObcTreeNavigationGroup.prototype, "terminalType", 2);
|
|
108699
108713
|
__decorateClass$sK([
|
|
108700
|
-
n$3({ type:
|
|
108701
|
-
], ObcTreeNavigationGroup.prototype, "
|
|
108702
|
-
__decorateClass$sK([
|
|
108703
|
-
n$3({ type: Number })
|
|
108704
|
-
], ObcTreeNavigationGroup.prototype, "alertCount", 2);
|
|
108705
|
-
__decorateClass$sK([
|
|
108706
|
-
n$3({ type: String })
|
|
108707
|
-
], ObcTreeNavigationGroup.prototype, "alertType", 2);
|
|
108714
|
+
n$3({ type: Object })
|
|
108715
|
+
], ObcTreeNavigationGroup.prototype, "alerts", 2);
|
|
108708
108716
|
__decorateClass$sK([
|
|
108709
108717
|
n$3({ type: String })
|
|
108710
108718
|
], ObcTreeNavigationGroup.prototype, "href", 2);
|