@oicl/openbridge-webcomponents-full-bundle 2.2.0-next.15 → 2.2.0-next.17
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 +320 -64
- package/bundle/openbridge-webcomponents.bundle.js.map +1 -1
- package/custom-elements.json +1752 -15
- package/dist/automation/analog-threeway-valve/analog-threeway-valve.d.ts +4 -4
- package/dist/automation/analog-threeway-valve/analog-threeway-valve.js.map +1 -1
- package/dist/automation/automation-badge/automation-badge.css_inline.js +6 -0
- package/dist/automation/automation-badge/automation-badge.d.ts +61 -1
- package/dist/automation/automation-badge/automation-badge.d.ts.map +1 -1
- package/dist/automation/automation-badge/automation-badge.js +83 -1
- package/dist/automation/automation-badge/automation-badge.js.map +1 -1
- package/dist/automation/automation-button/abstract-automation-button-storybook-helpers.d.ts +20 -0
- 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 +1 -0
- package/dist/automation/automation-button/abstract-automation-button-storybook-helpers.js.map +1 -1
- package/dist/automation/automation-button/abstract-automation-button.d.ts +16 -4
- package/dist/automation/automation-button/abstract-automation-button.d.ts.map +1 -1
- package/dist/automation/automation-button/abstract-automation-button.js +46 -20
- package/dist/automation/automation-button/abstract-automation-button.js.map +1 -1
- package/dist/automation/automation-button/badge-layout.d.ts +34 -0
- package/dist/automation/automation-button/badge-layout.d.ts.map +1 -0
- package/dist/automation/automation-button/badge-layout.js +64 -0
- package/dist/automation/automation-button/badge-layout.js.map +1 -0
- package/dist/automation/automation-tank/automation-tank.d.ts.map +1 -1
- package/dist/automation/automation-tank/automation-tank.js +7 -2
- package/dist/automation/automation-tank/automation-tank.js.map +1 -1
- package/dist/automation/digital-threeway-valve/digital-threeway-valve.d.ts +4 -4
- package/dist/automation/digital-threeway-valve/digital-threeway-valve.js.map +1 -1
- package/dist/automation/electricity-battery/electricity-battery.d.ts +4 -4
- package/dist/automation/electricity-battery/electricity-battery.js.map +1 -1
- package/dist/automation/specialty-tank/abstract-specialty-tank.d.ts.map +1 -1
- package/dist/automation/specialty-tank/abstract-specialty-tank.js +7 -2
- package/dist/automation/specialty-tank/abstract-specialty-tank.js.map +1 -1
- package/dist/internal/global-setting.d.ts +55 -0
- package/dist/internal/global-setting.d.ts.map +1 -0
- package/dist/internal/global-setting.js +86 -0
- package/dist/internal/global-setting.js.map +1 -0
- package/package.json +3 -2
- package/script/check-typography-ramp.ts +144 -0
- package/script/typography/ramp.ts +237 -0
- package/script/typography-ramp.test.ts +267 -0
- package/src/automation/analog-threeway-valve/analog-threeway-valve.ts +4 -4
- package/src/automation/analog-valve/analog-valve.stories.ts +8 -0
- package/src/automation/automation-badge/automation-badge.css +6 -0
- package/src/automation/automation-badge/automation-badge.stories.ts +47 -3
- package/src/automation/automation-badge/automation-badge.ts +124 -1
- package/src/automation/automation-button/abstract-automation-button-storybook-helpers.ts +3 -0
- package/src/automation/automation-button/abstract-automation-button.ts +70 -23
- package/src/automation/automation-button/badge-layout.spec.ts +138 -0
- package/src/automation/automation-button/badge-layout.ts +120 -0
- package/src/automation/automation-tank/automation-tank.ts +11 -6
- package/src/automation/digital-threeway-valve/digital-threeway-valve.ts +4 -4
- package/src/automation/electricity-battery/electricity-battery.ts +4 -4
- package/src/automation/pump/pump.stories.ts +59 -0
- package/src/automation/specialty-tank/abstract-specialty-tank.ts +11 -6
- package/src/internal/global-setting.spec.ts +119 -0
- package/src/internal/global-setting.ts +105 -0
|
@@ -19363,6 +19363,12 @@ var automation_badge_default = i$7`* {
|
|
|
19363
19363
|
height: 100%;
|
|
19364
19364
|
}
|
|
19365
19365
|
|
|
19366
|
+
.wrapper .letter {
|
|
19367
|
+
font-family: var(--global-typography-font-family);
|
|
19368
|
+
/* the design outlines the letters at the bold weight */
|
|
19369
|
+
font-weight: var(--font-weight-bold);
|
|
19370
|
+
}
|
|
19371
|
+
|
|
19366
19372
|
.wrapper.flat .badge {
|
|
19367
19373
|
width: var(--automation-components-badge-new-icon-size-flat);
|
|
19368
19374
|
height: var(--automation-components-badge-new-icon-size-flat);
|
|
@@ -19438,6 +19444,45 @@ var ObiAlertOffFilled = class ObiAlertOffFilled extends i$4 {
|
|
|
19438
19444
|
};
|
|
19439
19445
|
__decorate([n$4({ type: Boolean })], ObiAlertOffFilled.prototype, "useCssColor", void 0);
|
|
19440
19446
|
ObiAlertOffFilled = __decorate([customElement("obi-alert-off-filled")], ObiAlertOffFilled);
|
|
19447
|
+
// src/icons/icon-alerts-shelf.ts
|
|
19448
|
+
var ObiAlertsShelf = class ObiAlertsShelf extends i$4 {
|
|
19449
|
+
constructor(..._args) {
|
|
19450
|
+
super(..._args);
|
|
19451
|
+
this.useCssColor = false;
|
|
19452
|
+
this.icon = w`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
19453
|
+
<path d="M18 23C16.6167 23 15.4375 22.5125 14.4625 21.5375C13.4875 20.5625 13 19.3833 13 18C13 16.6167 13.4875 15.4375 14.4625 14.4625C15.4375 13.4875 16.6167 13 18 13C19.3833 13 20.5625 13.4875 21.5375 14.4625C22.5125 15.4375 23 16.6167 23 18C23 19.3833 22.5125 20.5625 21.5375 21.5375C20.5625 22.5125 19.3833 23 18 23ZM20.35 19.65L19.65 20.35L17.5 18.2V15H18.5V17.8L20.35 19.65Z" fill-rule="evenodd" clip-rule="evenodd" fill="currentColor"/>
|
|
19454
|
+
<path d="M4 17V19H11.5764C11.5261 18.674 11.5 18.3401 11.5 18C11.5 17.6599 11.5261 17.326 11.5764 17H8V10C8 8.9 8.39167 7.95833 9.175 7.175C9.95833 6.39167 10.9 6 12 6C13.1 6 14.0417 6.39167 14.825 7.175C15.6083 7.95833 16 8.9 16 10V11.8135C16.6301 11.61 17.3022 11.5 18 11.5V10C18 8.61667 17.5833 7.3875 16.75 6.3125C15.9167 5.2375 14.8333 4.53333 13.5 4.2V3.5C13.5 3.08333 13.3542 2.72917 13.0625 2.4375C12.7708 2.14583 12.4167 2 12 2C11.5833 2 11.2292 2.14583 10.9375 2.4375C10.6458 2.72917 10.5 3.08333 10.5 3.5V4.2C9.16667 4.53333 8.08333 5.2375 7.25 6.3125C6.41667 7.3875 6 8.61667 6 10V17H4Z" fill="currentColor"/>
|
|
19455
|
+
<path d="M11.8135 20C12.0307 20.6723 12.3545 21.2968 12.7649 21.8534C12.5297 21.9511 12.2747 22 12 22C11.45 22 10.9792 21.8042 10.5875 21.4125C10.1958 21.0208 10 20.55 10 20H11.8135Z" fill="currentColor"/>
|
|
19456
|
+
</svg>
|
|
19457
|
+
`;
|
|
19458
|
+
this.iconCss = w`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
19459
|
+
<path d="M18 23C16.6167 23 15.4375 22.5125 14.4625 21.5375C13.4875 20.5625 13 19.3833 13 18C13 16.6167 13.4875 15.4375 14.4625 14.4625C15.4375 13.4875 16.6167 13 18 13C19.3833 13 20.5625 13.4875 21.5375 14.4625C22.5125 15.4375 23 16.6167 23 18C23 19.3833 22.5125 20.5625 21.5375 21.5375C20.5625 22.5125 19.3833 23 18 23ZM20.35 19.65L19.65 20.35L17.5 18.2V15H18.5V17.8L20.35 19.65Z" fill-rule="evenodd" clip-rule="evenodd" style="fill: var(--element-active-color)"/>
|
|
19460
|
+
<path d="M4 17V19H11.5764C11.5261 18.674 11.5 18.3401 11.5 18C11.5 17.6599 11.5261 17.326 11.5764 17H8V10C8 8.9 8.39167 7.95833 9.175 7.175C9.95833 6.39167 10.9 6 12 6C13.1 6 14.0417 6.39167 14.825 7.175C15.6083 7.95833 16 8.9 16 10V11.8135C16.6301 11.61 17.3022 11.5 18 11.5V10C18 8.61667 17.5833 7.3875 16.75 6.3125C15.9167 5.2375 14.8333 4.53333 13.5 4.2V3.5C13.5 3.08333 13.3542 2.72917 13.0625 2.4375C12.7708 2.14583 12.4167 2 12 2C11.5833 2 11.2292 2.14583 10.9375 2.4375C10.6458 2.72917 10.5 3.08333 10.5 3.5V4.2C9.16667 4.53333 8.08333 5.2375 7.25 6.3125C6.41667 7.3875 6 8.61667 6 10V17H4Z" style="fill: var(--element-active-color)"/>
|
|
19461
|
+
<path d="M11.8135 20C12.0307 20.6723 12.3545 21.2968 12.7649 21.8534C12.5297 21.9511 12.2747 22 12 22C11.45 22 10.9792 21.8042 10.5875 21.4125C10.1958 21.0208 10 20.55 10 20H11.8135Z" style="fill: var(--element-active-color)"/>
|
|
19462
|
+
</svg>
|
|
19463
|
+
`;
|
|
19464
|
+
}
|
|
19465
|
+
render() {
|
|
19466
|
+
return b`
|
|
19467
|
+
<div class="wrapper">${this.useCssColor ? this.iconCss : this.icon}</div>
|
|
19468
|
+
`;
|
|
19469
|
+
}
|
|
19470
|
+
static {
|
|
19471
|
+
this.styles = i$7`
|
|
19472
|
+
.wrapper {
|
|
19473
|
+
height: 100%;
|
|
19474
|
+
width: 100%;
|
|
19475
|
+
line-height: 0;
|
|
19476
|
+
}
|
|
19477
|
+
.wrapper > * {
|
|
19478
|
+
height: 100%;
|
|
19479
|
+
width: 100%;
|
|
19480
|
+
}
|
|
19481
|
+
`;
|
|
19482
|
+
}
|
|
19483
|
+
};
|
|
19484
|
+
__decorate([n$4({ type: Boolean })], ObiAlertsShelf.prototype, "useCssColor", void 0);
|
|
19485
|
+
ObiAlertsShelf = __decorate([customElement("obi-alerts-shelf")], ObiAlertsShelf);
|
|
19441
19486
|
// src/icons/icon-auto.ts
|
|
19442
19487
|
var ObiAuto = class ObiAuto extends i$4 {
|
|
19443
19488
|
constructor(..._args) {
|
|
@@ -19698,6 +19743,8 @@ var ObcAutomationBadgeType = /* @__PURE__ */ function(ObcAutomationBadgeType) {
|
|
|
19698
19743
|
ObcAutomationBadgeType["Interlock"] = "interlock";
|
|
19699
19744
|
ObcAutomationBadgeType["InterlockInhibit"] = "interlock-inhibit";
|
|
19700
19745
|
ObcAutomationBadgeType["AlertSilenced"] = "alert-silenced";
|
|
19746
|
+
ObcAutomationBadgeType["AlertShelved"] = "alert-shelved";
|
|
19747
|
+
ObcAutomationBadgeType["Simulation"] = "simulation";
|
|
19701
19748
|
ObcAutomationBadgeType["Caution"] = "caution";
|
|
19702
19749
|
ObcAutomationBadgeType["Warning"] = "warning";
|
|
19703
19750
|
ObcAutomationBadgeType["Alarm"] = "alarm";
|
|
@@ -19706,6 +19753,32 @@ var ObcAutomationBadgeType = /* @__PURE__ */ function(ObcAutomationBadgeType) {
|
|
|
19706
19753
|
ObcAutomationBadgeType["LevelMedium"] = "level-medium";
|
|
19707
19754
|
ObcAutomationBadgeType["LevelLow"] = "level-low";
|
|
19708
19755
|
ObcAutomationBadgeType["LevelDiagnostic"] = "level-diagnostic";
|
|
19756
|
+
ObcAutomationBadgeType["LetterA"] = "letter-a";
|
|
19757
|
+
ObcAutomationBadgeType["LetterB"] = "letter-b";
|
|
19758
|
+
ObcAutomationBadgeType["LetterC"] = "letter-c";
|
|
19759
|
+
ObcAutomationBadgeType["LetterD"] = "letter-d";
|
|
19760
|
+
ObcAutomationBadgeType["LetterE"] = "letter-e";
|
|
19761
|
+
ObcAutomationBadgeType["LetterF"] = "letter-f";
|
|
19762
|
+
ObcAutomationBadgeType["LetterG"] = "letter-g";
|
|
19763
|
+
ObcAutomationBadgeType["LetterH"] = "letter-h";
|
|
19764
|
+
ObcAutomationBadgeType["LetterI"] = "letter-i";
|
|
19765
|
+
ObcAutomationBadgeType["LetterJ"] = "letter-j";
|
|
19766
|
+
ObcAutomationBadgeType["LetterK"] = "letter-k";
|
|
19767
|
+
ObcAutomationBadgeType["LetterL"] = "letter-l";
|
|
19768
|
+
ObcAutomationBadgeType["LetterM"] = "letter-m";
|
|
19769
|
+
ObcAutomationBadgeType["LetterN"] = "letter-n";
|
|
19770
|
+
ObcAutomationBadgeType["LetterO"] = "letter-o";
|
|
19771
|
+
ObcAutomationBadgeType["LetterP"] = "letter-p";
|
|
19772
|
+
ObcAutomationBadgeType["LetterQ"] = "letter-q";
|
|
19773
|
+
ObcAutomationBadgeType["LetterR"] = "letter-r";
|
|
19774
|
+
ObcAutomationBadgeType["LetterS"] = "letter-s";
|
|
19775
|
+
ObcAutomationBadgeType["LetterT"] = "letter-t";
|
|
19776
|
+
ObcAutomationBadgeType["LetterU"] = "letter-u";
|
|
19777
|
+
ObcAutomationBadgeType["LetterV"] = "letter-v";
|
|
19778
|
+
ObcAutomationBadgeType["LetterW"] = "letter-w";
|
|
19779
|
+
ObcAutomationBadgeType["LetterX"] = "letter-x";
|
|
19780
|
+
ObcAutomationBadgeType["LetterY"] = "letter-y";
|
|
19781
|
+
ObcAutomationBadgeType["LetterZ"] = "letter-z";
|
|
19709
19782
|
return ObcAutomationBadgeType;
|
|
19710
19783
|
}({});
|
|
19711
19784
|
var ALERT_BADGE_TYPES = [
|
|
@@ -19718,6 +19791,18 @@ var ALERT_BADGE_TYPES = [
|
|
|
19718
19791
|
"level-low",
|
|
19719
19792
|
"level-diagnostic"
|
|
19720
19793
|
];
|
|
19794
|
+
/**
|
|
19795
|
+
* Letter badge geometry in the 16-unit badge box.
|
|
19796
|
+
*
|
|
19797
|
+
* The design outlines a 15.33 px capital on a 13.33 baseline, so the glyph
|
|
19798
|
+
* fills the box the way the icon badges do (Figma 1188:55068).
|
|
19799
|
+
*/
|
|
19800
|
+
var LETTER_FONT_SIZE = 15.33;
|
|
19801
|
+
var LETTER_BASELINE = 13.33;
|
|
19802
|
+
/** The capital a `letter-<x>` type draws, `undefined` for every other type. */
|
|
19803
|
+
function badgeLetter(type) {
|
|
19804
|
+
return type?.match(/^letter-([a-z])$/)?.[1].toUpperCase();
|
|
19805
|
+
}
|
|
19721
19806
|
var ObcAutomationBadge = class ObcAutomationBadge extends i$4 {
|
|
19722
19807
|
constructor(..._args) {
|
|
19723
19808
|
super(..._args);
|
|
@@ -19789,10 +19874,48 @@ var ObcAutomationBadge = class ObcAutomationBadge extends i$4 {
|
|
|
19789
19874
|
d="M7 1.33301H9V7.53301L13.2147 5.13301L14.2147 6.86634L10 9.33301L14.2147 11.7997L13.2147 13.533L9 11.133V15.667H7V11.133L2.78534 13.533L1.78534 11.7997L6 9.33301L1.78534 6.86634L2.78534 5.13301L7 7.53301V1.33301Z"
|
|
19790
19875
|
fill="var(--notification-enabled-background-color)"
|
|
19791
19876
|
/>
|
|
19877
|
+
</svg>`;
|
|
19878
|
+
}
|
|
19879
|
+
/** The cube of the simulated badge, as the design draws it (Figma 1188:54997). */
|
|
19880
|
+
renderSimulationIcon(className) {
|
|
19881
|
+
return b`<svg
|
|
19882
|
+
class=${className}
|
|
19883
|
+
viewBox="0 0 16 16"
|
|
19884
|
+
fill="currentColor"
|
|
19885
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
19886
|
+
>
|
|
19887
|
+
<path
|
|
19888
|
+
d="M7.33333 14.4833V8.38333L2 5.3V10.65C2 10.8944 2.05833 11.1167 2.175 11.3167C2.29167 11.5167 2.45555 11.6778 2.66667 11.8L7.33333 14.4833ZM8.66667 14.4833L13.3333 11.8C13.5444 11.6778 13.7083 11.5167 13.825 11.3167C13.9417 11.1167 14 10.8944 14 10.65V5.3L8.66667 8.38333V14.4833Z"
|
|
19889
|
+
/>
|
|
19890
|
+
<path
|
|
19891
|
+
d="M13.2833 4.16667L8.66667 1.51667C8.45556 1.39444 8.23333 1.33333 8 1.33333C7.76667 1.33333 7.54444 1.39444 7.33333 1.51667L2.7 4.18333L8 7.23333L13.2833 4.16667Z"
|
|
19892
|
+
/>
|
|
19893
|
+
</svg>`;
|
|
19894
|
+
}
|
|
19895
|
+
/** A letter badge: one capital of the body font, hidden from assistive technology because the badge draws it twice. */
|
|
19896
|
+
renderLetterIcon(letter, className) {
|
|
19897
|
+
return b`<svg
|
|
19898
|
+
class=${className}
|
|
19899
|
+
viewBox="0 0 16 16"
|
|
19900
|
+
fill="currentColor"
|
|
19901
|
+
aria-hidden="true"
|
|
19902
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
19903
|
+
>
|
|
19904
|
+
<text
|
|
19905
|
+
class="letter"
|
|
19906
|
+
x="8"
|
|
19907
|
+
y=${LETTER_BASELINE}
|
|
19908
|
+
font-size=${LETTER_FONT_SIZE}
|
|
19909
|
+
text-anchor="middle"
|
|
19910
|
+
>
|
|
19911
|
+
${letter}
|
|
19912
|
+
</text>
|
|
19792
19913
|
</svg>`;
|
|
19793
19914
|
}
|
|
19794
19915
|
getIcon() {
|
|
19795
|
-
|
|
19916
|
+
const letter = badgeLetter(this.type);
|
|
19917
|
+
if (letter) return b`${this.renderLetterIcon(letter, "icon siluette")}${this.renderLetterIcon(letter, "icon")}`;
|
|
19918
|
+
else if (this.type === "auto") return b`<obi-auto class="icon siluette"></obi-auto
|
|
19796
19919
|
><obi-auto class="icon"></obi-auto>`;
|
|
19797
19920
|
else if (this.type === "manual") return b`<obi-manual class="icon siluette"></obi-manual
|
|
19798
19921
|
><obi-manual class="icon"></obi-manual>`;
|
|
@@ -19814,6 +19937,9 @@ var ObcAutomationBadge = class ObcAutomationBadge extends i$4 {
|
|
|
19814
19937
|
class="icon siluette"
|
|
19815
19938
|
></obi-alert-off-filled
|
|
19816
19939
|
><obi-alert-off-filled class="icon"></obi-alert-off-filled>`;
|
|
19940
|
+
else if (this.type === "alert-shelved") return b`<obi-alerts-shelf class="icon siluette"></obi-alerts-shelf
|
|
19941
|
+
><obi-alerts-shelf class="icon"></obi-alerts-shelf>`;
|
|
19942
|
+
else if (this.type === "simulation") return b`${this.renderSimulationIcon("icon siluette")}${this.renderSimulationIcon("icon")}`;
|
|
19817
19943
|
else if (this.type === "level-critical") return this.renderLevelCriticalIcon(this.effectiveMode === "flat");
|
|
19818
19944
|
else if (this.type === "level-diagnostic") return this.renderLevelDiagnosticIcon();
|
|
19819
19945
|
else if (this.isAlertType("caution", "level-low") && this.effectiveMode === "flat") return b`<svg
|
|
@@ -20039,10 +20165,144 @@ var ObcAutomationBadge = class ObcAutomationBadge extends i$4 {
|
|
|
20039
20165
|
__decorate([n$4({ type: String })], ObcAutomationBadge.prototype, "mode", void 0);
|
|
20040
20166
|
__decorate([n$4({ type: String })], ObcAutomationBadge.prototype, "type", void 0);
|
|
20041
20167
|
ObcAutomationBadge = __decorate([customElement("obc-automation-badge")], ObcAutomationBadge);
|
|
20168
|
+
// src/internal/global-setting.ts
|
|
20169
|
+
/**
|
|
20170
|
+
* One app-wide setting the components render from.
|
|
20171
|
+
*
|
|
20172
|
+
* The application sets it once through a module setter such as
|
|
20173
|
+
* `setAutomationBadgeLayout()` or `setAlertStandard()`. Every connected host
|
|
20174
|
+
* that holds a controller for it re-renders on each change; a host detached
|
|
20175
|
+
* while the value changed catches up on its next connect, and one reattached
|
|
20176
|
+
* unchanged renders nothing extra. Setting the same value again is a no-op.
|
|
20177
|
+
*
|
|
20178
|
+
* It is a plain subscriber set rather than a signal: the value rarely changes
|
|
20179
|
+
* and derives nothing, and the library stays off a pre-standard polyfill. A
|
|
20180
|
+
* setter built on it can move to a signal later without changing its signature.
|
|
20181
|
+
*
|
|
20182
|
+
* ```ts
|
|
20183
|
+
* const alertStandard = new GlobalSetting<AlertStandard | undefined>(undefined);
|
|
20184
|
+
* export const setAlertStandard = (s?: AlertStandard) => alertStandard.set(s);
|
|
20185
|
+
*
|
|
20186
|
+
* class ObcAlertIcon extends LitElement {
|
|
20187
|
+
* private readonly standard = alertStandard.controller(this);
|
|
20188
|
+
* render() { return draw(this.standard.value); }
|
|
20189
|
+
* }
|
|
20190
|
+
* ```
|
|
20191
|
+
*/
|
|
20192
|
+
var GlobalSetting = class {
|
|
20193
|
+
constructor(value) {
|
|
20194
|
+
this.value = value;
|
|
20195
|
+
this.currentVersion = 0;
|
|
20196
|
+
this.hosts = /* @__PURE__ */ new Set();
|
|
20197
|
+
}
|
|
20198
|
+
get() {
|
|
20199
|
+
return this.value;
|
|
20200
|
+
}
|
|
20201
|
+
/** Stores the value and re-renders every connected host. */
|
|
20202
|
+
set(value) {
|
|
20203
|
+
if (Object.is(value, this.value)) return;
|
|
20204
|
+
this.value = value;
|
|
20205
|
+
this.currentVersion++;
|
|
20206
|
+
for (const host of this.hosts) host.requestUpdate();
|
|
20207
|
+
}
|
|
20208
|
+
/** Re-renders `host` whenever the value changes; create it once, in the host's constructor. */
|
|
20209
|
+
controller(host) {
|
|
20210
|
+
return new GlobalSettingController(host, this);
|
|
20211
|
+
}
|
|
20212
|
+
/** Counts the changes, so a controller can tell whether its host rendered the current value. */
|
|
20213
|
+
get version() {
|
|
20214
|
+
return this.currentVersion;
|
|
20215
|
+
}
|
|
20216
|
+
attach(host) {
|
|
20217
|
+
this.hosts.add(host);
|
|
20218
|
+
}
|
|
20219
|
+
detach(host) {
|
|
20220
|
+
this.hosts.delete(host);
|
|
20221
|
+
}
|
|
20222
|
+
};
|
|
20223
|
+
/** Keeps one host rendered with the current value of a `GlobalSetting`. */
|
|
20224
|
+
var GlobalSettingController = class {
|
|
20225
|
+
constructor(host, setting) {
|
|
20226
|
+
this.host = host;
|
|
20227
|
+
this.setting = setting;
|
|
20228
|
+
this.renderedVersion = setting.version;
|
|
20229
|
+
this.renderingVersion = setting.version;
|
|
20230
|
+
host.addController(this);
|
|
20231
|
+
}
|
|
20232
|
+
get value() {
|
|
20233
|
+
return this.setting.get();
|
|
20234
|
+
}
|
|
20235
|
+
/** A value set while the host was detached never reached it. */
|
|
20236
|
+
hostConnected() {
|
|
20237
|
+
this.setting.attach(this.host);
|
|
20238
|
+
if (this.renderedVersion !== this.setting.version) this.host.requestUpdate();
|
|
20239
|
+
}
|
|
20240
|
+
hostDisconnected() {
|
|
20241
|
+
this.setting.detach(this.host);
|
|
20242
|
+
}
|
|
20243
|
+
/** The version a render starts from; a change while it runs detached must not count as rendered. */
|
|
20244
|
+
hostUpdate() {
|
|
20245
|
+
this.renderingVersion = this.setting.version;
|
|
20246
|
+
}
|
|
20247
|
+
hostUpdated() {
|
|
20248
|
+
this.renderedVersion = this.renderingVersion;
|
|
20249
|
+
}
|
|
20250
|
+
};
|
|
20251
|
+
// src/automation/automation-button/badge-layout.ts
|
|
20252
|
+
var AutomationButtonBadgeKind = /* @__PURE__ */ function(AutomationButtonBadgeKind) {
|
|
20253
|
+
AutomationButtonBadgeKind["Control"] = "control";
|
|
20254
|
+
AutomationButtonBadgeKind["Alert"] = "alert";
|
|
20255
|
+
AutomationButtonBadgeKind["Interlock"] = "interlock";
|
|
20256
|
+
AutomationButtonBadgeKind["CommandLocked"] = "command-locked";
|
|
20257
|
+
return AutomationButtonBadgeKind;
|
|
20258
|
+
}({});
|
|
20259
|
+
var corners = [
|
|
20260
|
+
"topLeft",
|
|
20261
|
+
"topRight",
|
|
20262
|
+
"bottomLeft",
|
|
20263
|
+
"bottomRight"
|
|
20264
|
+
];
|
|
20265
|
+
var defaultAutomationButtonBadgeLayout = Object.freeze({
|
|
20266
|
+
topLeft: "control",
|
|
20267
|
+
topRight: "alert",
|
|
20268
|
+
bottomLeft: "interlock",
|
|
20269
|
+
bottomRight: "command-locked"
|
|
20270
|
+
});
|
|
20271
|
+
/**
|
|
20272
|
+
* The `base` layout with the corners `override` names put on top of it.
|
|
20273
|
+
* A kind `override` names twice stays in the first corner, in reading order.
|
|
20274
|
+
*/
|
|
20275
|
+
function resolveBadgeLayout(base, override) {
|
|
20276
|
+
const result = { ...base };
|
|
20277
|
+
if (!override) return result;
|
|
20278
|
+
const placed = /* @__PURE__ */ new Set();
|
|
20279
|
+
for (const corner of corners) {
|
|
20280
|
+
const kind = override[corner];
|
|
20281
|
+
if (kind === void 0) continue;
|
|
20282
|
+
result[corner] = kind !== null && placed.has(kind) ? null : kind;
|
|
20283
|
+
if (kind !== null) placed.add(kind);
|
|
20284
|
+
}
|
|
20285
|
+
for (const corner of corners) {
|
|
20286
|
+
const kind = result[corner];
|
|
20287
|
+
if (override[corner] === void 0 && kind !== null && placed.has(kind)) result[corner] = null;
|
|
20288
|
+
}
|
|
20289
|
+
return result;
|
|
20290
|
+
}
|
|
20291
|
+
var globalLayout = new GlobalSetting({ ...defaultAutomationButtonBadgeLayout });
|
|
20292
|
+
/** Re-renders its host when the global badge layout changes, and puts the host's own corners on top of it. */
|
|
20293
|
+
var BadgeLayoutController = class extends GlobalSettingController {
|
|
20294
|
+
constructor(host) {
|
|
20295
|
+
super(host, globalLayout);
|
|
20296
|
+
}
|
|
20297
|
+
resolve(local) {
|
|
20298
|
+
return resolveBadgeLayout(this.value, local);
|
|
20299
|
+
}
|
|
20300
|
+
};
|
|
20042
20301
|
// src/automation/automation-button/abstract-automation-button.ts
|
|
20043
20302
|
var AutomationButtonBadgeAlert = /* @__PURE__ */ function(AutomationButtonBadgeAlert) {
|
|
20044
20303
|
AutomationButtonBadgeAlert["None"] = "none";
|
|
20045
20304
|
AutomationButtonBadgeAlert["Silence"] = "silence";
|
|
20305
|
+
AutomationButtonBadgeAlert["Shelved"] = "shelved";
|
|
20046
20306
|
AutomationButtonBadgeAlert["Caution"] = "caution";
|
|
20047
20307
|
AutomationButtonBadgeAlert["Warning"] = "warning";
|
|
20048
20308
|
AutomationButtonBadgeAlert["Alarm"] = "alarm";
|
|
@@ -20057,6 +20317,7 @@ var AutomationButtonBadgeInterlock = /* @__PURE__ */ function(AutomationButtonBa
|
|
|
20057
20317
|
AutomationButtonBadgeInterlock["None"] = "none";
|
|
20058
20318
|
AutomationButtonBadgeInterlock["Interlock"] = "interlock";
|
|
20059
20319
|
AutomationButtonBadgeInterlock["InterlockInhibit"] = "interlock-inhibit";
|
|
20320
|
+
AutomationButtonBadgeInterlock["Simulation"] = "simulation";
|
|
20060
20321
|
return AutomationButtonBadgeInterlock;
|
|
20061
20322
|
}({});
|
|
20062
20323
|
var AutomationButtonBadgeControl = /* @__PURE__ */ function(AutomationButtonBadgeControl) {
|
|
@@ -20071,6 +20332,7 @@ var AutomationButtonBadgeControl = /* @__PURE__ */ function(AutomationButtonBadg
|
|
|
20071
20332
|
var AutomationButtonBadgeCommandLocked = /* @__PURE__ */ function(AutomationButtonBadgeCommandLocked) {
|
|
20072
20333
|
AutomationButtonBadgeCommandLocked["None"] = "none";
|
|
20073
20334
|
AutomationButtonBadgeCommandLocked["CommandLocked"] = "command-locked";
|
|
20335
|
+
AutomationButtonBadgeCommandLocked["Simulation"] = "simulation";
|
|
20074
20336
|
return AutomationButtonBadgeCommandLocked;
|
|
20075
20337
|
}({});
|
|
20076
20338
|
/**
|
|
@@ -20078,8 +20340,11 @@ var AutomationButtonBadgeCommandLocked = /* @__PURE__ */ function(AutomationButt
|
|
|
20078
20340
|
*
|
|
20079
20341
|
* Renders an `<obc-automation-button>` with the shared surface every device
|
|
20080
20342
|
* button needs: the readout stack and its status row, the alert frame, the
|
|
20081
|
-
* circular progress indicator, and the four badge corners
|
|
20082
|
-
*
|
|
20343
|
+
* circular progress indicator, and the four badge corners with their slots and
|
|
20344
|
+
* enum-driven fallbacks. Which badge goes in which corner follows the badge
|
|
20345
|
+
* layout (`badge-layout.ts`): control top-left, alert top-right, interlock
|
|
20346
|
+
* bottom-left and command-locked bottom-right unless the app or `badgeLayout`
|
|
20347
|
+
* moves them.
|
|
20083
20348
|
*
|
|
20084
20349
|
* ## Usage Guidelines
|
|
20085
20350
|
*
|
|
@@ -20101,6 +20366,7 @@ var AutomationButtonBadgeCommandLocked = /* @__PURE__ */ function(AutomationButt
|
|
|
20101
20366
|
* @availableWhen alertFrameMode alert==true
|
|
20102
20367
|
* @availableWhen showAlertCategoryIcon alert==true && alertFrameType in [SmallSideFlip, LargeSideFlip, BottomFlip, TopFlip]
|
|
20103
20368
|
* @availableWhen showAlertIcon alert==true && alertFrameType in [LargeSideFlip, BottomFlip, TopFlip]
|
|
20369
|
+
* @property badgeLayout - Which badge kind each corner shows, on top of the app-wide layout set with `setAutomationBadgeLayout()`. A corner left out keeps the app-wide badge, `null` leaves it empty, and a badge moved here leaves the corner it came from.
|
|
20104
20370
|
* @property progress - Shows a progress indicator, used to indicate that an user action is in progress
|
|
20105
20371
|
* @availableWhen progressMode progress==true
|
|
20106
20372
|
* @availableWhen progressValue progress==true && progressMode in [determinate, progressiveIndeterminate]
|
|
@@ -20131,6 +20397,8 @@ var ObcAbstractAutomationButton = class extends i$4 {
|
|
|
20131
20397
|
this.badgeCommandLocked = "none";
|
|
20132
20398
|
this.badgeInterlock = "none";
|
|
20133
20399
|
this.badgeAlert = "none";
|
|
20400
|
+
this.badgeLayout = void 0;
|
|
20401
|
+
this._badgeLayout = new BadgeLayoutController(this);
|
|
20134
20402
|
}
|
|
20135
20403
|
get icon() {
|
|
20136
20404
|
throw new Error("Method \"icon\" must be implemented in subclass");
|
|
@@ -20181,12 +20449,12 @@ var ObcAbstractAutomationButton = class extends i$4 {
|
|
|
20181
20449
|
get _isVertical() {
|
|
20182
20450
|
return this._orientation !== AutomationButtonOrientation.horizontal || "vertical" in this && Boolean(this.vertical);
|
|
20183
20451
|
}
|
|
20184
|
-
getBadgeSpacer() {
|
|
20452
|
+
getBadgeSpacer(badges) {
|
|
20185
20453
|
if (!this.showReadoutStack) return false;
|
|
20186
|
-
const topLeft = this.badgeTopLeft.length > 0 ||
|
|
20187
|
-
const topRight = this.badgeTopRight.length > 0 ||
|
|
20188
|
-
const bottomLeft = this.badgeBottomLeft.length > 0 ||
|
|
20189
|
-
const bottomRight = this.badgeBottomRight.length > 0 ||
|
|
20454
|
+
const topLeft = this.badgeTopLeft.length > 0 || badges.topLeft !== null;
|
|
20455
|
+
const topRight = this.badgeTopRight.length > 0 || badges.topRight !== null;
|
|
20456
|
+
const bottomLeft = this.badgeBottomLeft.length > 0 || badges.bottomLeft !== null;
|
|
20457
|
+
const bottomRight = this.badgeBottomRight.length > 0 || badges.bottomRight !== null;
|
|
20190
20458
|
if (this._readoutPosition === AutomationButtonReadoutPosition.top) return topRight || topLeft;
|
|
20191
20459
|
else if (this._readoutPosition === AutomationButtonReadoutPosition.bottom) return bottomLeft || bottomRight;
|
|
20192
20460
|
else if (this._readoutPosition === AutomationButtonReadoutPosition.left) return topLeft || bottomLeft;
|
|
@@ -20196,8 +20464,18 @@ var ObcAbstractAutomationButton = class extends i$4 {
|
|
|
20196
20464
|
handleBadgeSlotChange() {
|
|
20197
20465
|
this.requestUpdate();
|
|
20198
20466
|
}
|
|
20467
|
+
getBadgeType(kind) {
|
|
20468
|
+
switch (kind) {
|
|
20469
|
+
case AutomationButtonBadgeKind.Control: return this.getBadgeControlType();
|
|
20470
|
+
case AutomationButtonBadgeKind.Alert: return this.getBadgeAlertType();
|
|
20471
|
+
case AutomationButtonBadgeKind.Interlock: return this.getBadgeInterlockType();
|
|
20472
|
+
case AutomationButtonBadgeKind.CommandLocked: return this.getBadgeCommandLockedType();
|
|
20473
|
+
default: return null;
|
|
20474
|
+
}
|
|
20475
|
+
}
|
|
20199
20476
|
getBadgeAlertType() {
|
|
20200
20477
|
if (this.badgeAlert === "silence") return ObcAutomationBadgeType.AlertSilenced;
|
|
20478
|
+
else if (this.badgeAlert === "shelved") return ObcAutomationBadgeType.AlertShelved;
|
|
20201
20479
|
else if (this.badgeAlert === "caution") return ObcAutomationBadgeType.Caution;
|
|
20202
20480
|
else if (this.badgeAlert === "warning") return ObcAutomationBadgeType.Warning;
|
|
20203
20481
|
else if (this.badgeAlert === "alarm") return ObcAutomationBadgeType.Alarm;
|
|
@@ -20219,18 +20497,23 @@ var ObcAbstractAutomationButton = class extends i$4 {
|
|
|
20219
20497
|
getBadgeInterlockType() {
|
|
20220
20498
|
if (this.badgeInterlock === "interlock") return ObcAutomationBadgeType.Interlock;
|
|
20221
20499
|
else if (this.badgeInterlock === "interlock-inhibit") return ObcAutomationBadgeType.InterlockInhibit;
|
|
20500
|
+
else if (this.badgeInterlock === "simulation") return ObcAutomationBadgeType.Simulation;
|
|
20222
20501
|
return null;
|
|
20223
20502
|
}
|
|
20224
20503
|
getBadgeCommandLockedType() {
|
|
20225
20504
|
if (this.badgeCommandLocked === "command-locked") return ObcAutomationBadgeType.CommandLocked;
|
|
20505
|
+
else if (this.badgeCommandLocked === "simulation") return ObcAutomationBadgeType.Simulation;
|
|
20226
20506
|
return null;
|
|
20227
20507
|
}
|
|
20228
20508
|
render() {
|
|
20229
20509
|
const readouts = [...this.extraReadouts];
|
|
20230
|
-
const
|
|
20231
|
-
const
|
|
20232
|
-
|
|
20233
|
-
|
|
20510
|
+
const layout = this._badgeLayout.resolve(this.badgeLayout);
|
|
20511
|
+
const badges = {
|
|
20512
|
+
topLeft: this.getBadgeType(layout.topLeft),
|
|
20513
|
+
topRight: this.getBadgeType(layout.topRight),
|
|
20514
|
+
bottomLeft: this.getBadgeType(layout.bottomLeft),
|
|
20515
|
+
bottomRight: this.getBadgeType(layout.bottomRight)
|
|
20516
|
+
};
|
|
20234
20517
|
return b`<obc-automation-button
|
|
20235
20518
|
.state=${this._on ? AutomationButtonState.open : AutomationButtonState.closed}
|
|
20236
20519
|
.readouts=${readouts}
|
|
@@ -20252,7 +20535,7 @@ var ObcAbstractAutomationButton = class extends i$4 {
|
|
|
20252
20535
|
.variant=${this._variant}
|
|
20253
20536
|
.direction=${this._direction}
|
|
20254
20537
|
.orientation=${this._orientation}
|
|
20255
|
-
.hasBadgeSpacer=${this.getBadgeSpacer()}
|
|
20538
|
+
.hasBadgeSpacer=${this.getBadgeSpacer(badges)}
|
|
20256
20539
|
.handlePosition=${this._handlePosition}
|
|
20257
20540
|
.static=${this.static}
|
|
20258
20541
|
.handleSize=${this._handleSize}
|
|
@@ -20266,8 +20549,8 @@ var ObcAbstractAutomationButton = class extends i$4 {
|
|
|
20266
20549
|
slot="badge-top-right"
|
|
20267
20550
|
@slotchange=${this.handleBadgeSlotChange}
|
|
20268
20551
|
>
|
|
20269
|
-
${
|
|
20270
|
-
.type=${
|
|
20552
|
+
${badges.topRight ? b`<obc-automation-badge
|
|
20553
|
+
.type=${badges.topRight}
|
|
20271
20554
|
></obc-automation-badge>` : A}
|
|
20272
20555
|
</slot>
|
|
20273
20556
|
<slot
|
|
@@ -20275,8 +20558,8 @@ var ObcAbstractAutomationButton = class extends i$4 {
|
|
|
20275
20558
|
slot="badge-top-left"
|
|
20276
20559
|
@slotchange=${this.handleBadgeSlotChange}
|
|
20277
20560
|
>
|
|
20278
|
-
${
|
|
20279
|
-
.type=${
|
|
20561
|
+
${badges.topLeft ? b`<obc-automation-badge
|
|
20562
|
+
.type=${badges.topLeft}
|
|
20280
20563
|
></obc-automation-badge>` : A}
|
|
20281
20564
|
</slot>
|
|
20282
20565
|
<slot
|
|
@@ -20284,8 +20567,8 @@ var ObcAbstractAutomationButton = class extends i$4 {
|
|
|
20284
20567
|
slot="badge-bottom-left"
|
|
20285
20568
|
@slotchange=${this.handleBadgeSlotChange}
|
|
20286
20569
|
>
|
|
20287
|
-
${
|
|
20288
|
-
.type=${
|
|
20570
|
+
${badges.bottomLeft ? b`<obc-automation-badge
|
|
20571
|
+
.type=${badges.bottomLeft}
|
|
20289
20572
|
></obc-automation-badge>` : A}
|
|
20290
20573
|
</slot>
|
|
20291
20574
|
<slot
|
|
@@ -20293,8 +20576,8 @@ var ObcAbstractAutomationButton = class extends i$4 {
|
|
|
20293
20576
|
slot="badge-bottom-right"
|
|
20294
20577
|
@slotchange=${this.handleBadgeSlotChange}
|
|
20295
20578
|
>
|
|
20296
|
-
${
|
|
20297
|
-
.type=${
|
|
20579
|
+
${badges.bottomRight ? b`<obc-automation-badge
|
|
20580
|
+
.type=${badges.bottomRight}
|
|
20298
20581
|
></obc-automation-badge>` : A}
|
|
20299
20582
|
</slot>
|
|
20300
20583
|
${this._handle !== false ? this._handle : A}
|
|
@@ -20336,6 +20619,7 @@ __decorate([n$4({ type: String })], ObcAbstractAutomationButton.prototype, "badg
|
|
|
20336
20619
|
__decorate([n$4({ type: String })], ObcAbstractAutomationButton.prototype, "badgeCommandLocked", void 0);
|
|
20337
20620
|
__decorate([n$4({ type: String })], ObcAbstractAutomationButton.prototype, "badgeInterlock", void 0);
|
|
20338
20621
|
__decorate([n$4({ type: String })], ObcAbstractAutomationButton.prototype, "badgeAlert", void 0);
|
|
20622
|
+
__decorate([n$4({ attribute: false })], ObcAbstractAutomationButton.prototype, "badgeLayout", void 0);
|
|
20339
20623
|
__decorate([o$7({ slot: "badge-top-right" })], ObcAbstractAutomationButton.prototype, "badgeTopRight", void 0);
|
|
20340
20624
|
__decorate([o$7({ slot: "badge-top-left" })], ObcAbstractAutomationButton.prototype, "badgeTopLeft", void 0);
|
|
20341
20625
|
__decorate([o$7({ slot: "badge-bottom-left" })], ObcAbstractAutomationButton.prototype, "badgeBottomLeft", void 0);
|
|
@@ -20784,6 +21068,7 @@ var argTypesAbstractAutomationButton = {
|
|
|
20784
21068
|
options: Object.values(AutomationButtonBadgeAlert),
|
|
20785
21069
|
control: { type: "select" }
|
|
20786
21070
|
},
|
|
21071
|
+
badgeLayout: { control: { type: "object" } },
|
|
20787
21072
|
progressMode: {
|
|
20788
21073
|
options: Object.values(CircularProgressMode),
|
|
20789
21074
|
control: { type: "select" },
|
|
@@ -40020,6 +40305,7 @@ var ObcAutomationTank = class ObcAutomationTank extends AdviceMixin(SetpointMixi
|
|
|
40020
40305
|
_badgeAlertType() {
|
|
40021
40306
|
switch (this.badgeAlert) {
|
|
40022
40307
|
case AutomationButtonBadgeAlert.Silence: return ObcAutomationBadgeType.AlertSilenced;
|
|
40308
|
+
case AutomationButtonBadgeAlert.Shelved: return ObcAutomationBadgeType.AlertShelved;
|
|
40023
40309
|
case AutomationButtonBadgeAlert.Caution: return ObcAutomationBadgeType.Caution;
|
|
40024
40310
|
case AutomationButtonBadgeAlert.Warning: return ObcAutomationBadgeType.Warning;
|
|
40025
40311
|
case AutomationButtonBadgeAlert.Alarm: return ObcAutomationBadgeType.Alarm;
|
|
@@ -40045,12 +40331,16 @@ var ObcAutomationTank = class ObcAutomationTank extends AdviceMixin(SetpointMixi
|
|
|
40045
40331
|
switch (this.badgeInterlock) {
|
|
40046
40332
|
case AutomationButtonBadgeInterlock.Interlock: return ObcAutomationBadgeType.Interlock;
|
|
40047
40333
|
case AutomationButtonBadgeInterlock.InterlockInhibit: return ObcAutomationBadgeType.InterlockInhibit;
|
|
40334
|
+
case AutomationButtonBadgeInterlock.Simulation: return ObcAutomationBadgeType.Simulation;
|
|
40048
40335
|
default: return null;
|
|
40049
40336
|
}
|
|
40050
40337
|
}
|
|
40051
40338
|
_badgeCommandLockedType() {
|
|
40052
|
-
|
|
40053
|
-
|
|
40339
|
+
switch (this.badgeCommandLocked) {
|
|
40340
|
+
case AutomationButtonBadgeCommandLocked.CommandLocked: return ObcAutomationBadgeType.CommandLocked;
|
|
40341
|
+
case AutomationButtonBadgeCommandLocked.Simulation: return ObcAutomationBadgeType.Simulation;
|
|
40342
|
+
default: return null;
|
|
40343
|
+
}
|
|
40054
40344
|
}
|
|
40055
40345
|
get _usesGaugeTrend() {
|
|
40056
40346
|
return this.chartMode === "graph" || this.chartMode === "graph-and-bar";
|
|
@@ -59454,6 +59744,7 @@ var ObcAbstractSpecialtyTank = class extends i$4 {
|
|
|
59454
59744
|
_badgeAlertType() {
|
|
59455
59745
|
switch (this.badgeAlert) {
|
|
59456
59746
|
case AutomationButtonBadgeAlert.Silence: return ObcAutomationBadgeType.AlertSilenced;
|
|
59747
|
+
case AutomationButtonBadgeAlert.Shelved: return ObcAutomationBadgeType.AlertShelved;
|
|
59457
59748
|
case AutomationButtonBadgeAlert.Caution: return ObcAutomationBadgeType.Caution;
|
|
59458
59749
|
case AutomationButtonBadgeAlert.Warning: return ObcAutomationBadgeType.Warning;
|
|
59459
59750
|
case AutomationButtonBadgeAlert.Alarm: return ObcAutomationBadgeType.Alarm;
|
|
@@ -59469,12 +59760,16 @@ var ObcAbstractSpecialtyTank = class extends i$4 {
|
|
|
59469
59760
|
switch (this.badgeInterlock) {
|
|
59470
59761
|
case AutomationButtonBadgeInterlock.Interlock: return ObcAutomationBadgeType.Interlock;
|
|
59471
59762
|
case AutomationButtonBadgeInterlock.InterlockInhibit: return ObcAutomationBadgeType.InterlockInhibit;
|
|
59763
|
+
case AutomationButtonBadgeInterlock.Simulation: return ObcAutomationBadgeType.Simulation;
|
|
59472
59764
|
default: return null;
|
|
59473
59765
|
}
|
|
59474
59766
|
}
|
|
59475
59767
|
_badgeCommandLockedType() {
|
|
59476
|
-
|
|
59477
|
-
|
|
59768
|
+
switch (this.badgeCommandLocked) {
|
|
59769
|
+
case AutomationButtonBadgeCommandLocked.CommandLocked: return ObcAutomationBadgeType.CommandLocked;
|
|
59770
|
+
case AutomationButtonBadgeCommandLocked.Simulation: return ObcAutomationBadgeType.Simulation;
|
|
59771
|
+
default: return null;
|
|
59772
|
+
}
|
|
59478
59773
|
}
|
|
59479
59774
|
_slotHasContent(e) {
|
|
59480
59775
|
return e.target.assignedNodes({ flatten: true }).some((n) => n.nodeType === Node.ELEMENT_NODE || n.nodeType === Node.TEXT_NODE && !!n.textContent?.trim());
|
|
@@ -76864,45 +77159,6 @@ var message_menu_item_default = i$7`* {
|
|
|
76864
77159
|
will-change: clip-path, transform;
|
|
76865
77160
|
}
|
|
76866
77161
|
`;
|
|
76867
|
-
// src/icons/icon-alerts-shelf.ts
|
|
76868
|
-
var ObiAlertsShelf = class ObiAlertsShelf extends i$4 {
|
|
76869
|
-
constructor(..._args) {
|
|
76870
|
-
super(..._args);
|
|
76871
|
-
this.useCssColor = false;
|
|
76872
|
-
this.icon = w`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
76873
|
-
<path d="M18 23C16.6167 23 15.4375 22.5125 14.4625 21.5375C13.4875 20.5625 13 19.3833 13 18C13 16.6167 13.4875 15.4375 14.4625 14.4625C15.4375 13.4875 16.6167 13 18 13C19.3833 13 20.5625 13.4875 21.5375 14.4625C22.5125 15.4375 23 16.6167 23 18C23 19.3833 22.5125 20.5625 21.5375 21.5375C20.5625 22.5125 19.3833 23 18 23ZM20.35 19.65L19.65 20.35L17.5 18.2V15H18.5V17.8L20.35 19.65Z" fill-rule="evenodd" clip-rule="evenodd" fill="currentColor"/>
|
|
76874
|
-
<path d="M4 17V19H11.5764C11.5261 18.674 11.5 18.3401 11.5 18C11.5 17.6599 11.5261 17.326 11.5764 17H8V10C8 8.9 8.39167 7.95833 9.175 7.175C9.95833 6.39167 10.9 6 12 6C13.1 6 14.0417 6.39167 14.825 7.175C15.6083 7.95833 16 8.9 16 10V11.8135C16.6301 11.61 17.3022 11.5 18 11.5V10C18 8.61667 17.5833 7.3875 16.75 6.3125C15.9167 5.2375 14.8333 4.53333 13.5 4.2V3.5C13.5 3.08333 13.3542 2.72917 13.0625 2.4375C12.7708 2.14583 12.4167 2 12 2C11.5833 2 11.2292 2.14583 10.9375 2.4375C10.6458 2.72917 10.5 3.08333 10.5 3.5V4.2C9.16667 4.53333 8.08333 5.2375 7.25 6.3125C6.41667 7.3875 6 8.61667 6 10V17H4Z" fill="currentColor"/>
|
|
76875
|
-
<path d="M11.8135 20C12.0307 20.6723 12.3545 21.2968 12.7649 21.8534C12.5297 21.9511 12.2747 22 12 22C11.45 22 10.9792 21.8042 10.5875 21.4125C10.1958 21.0208 10 20.55 10 20H11.8135Z" fill="currentColor"/>
|
|
76876
|
-
</svg>
|
|
76877
|
-
`;
|
|
76878
|
-
this.iconCss = w`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
76879
|
-
<path d="M18 23C16.6167 23 15.4375 22.5125 14.4625 21.5375C13.4875 20.5625 13 19.3833 13 18C13 16.6167 13.4875 15.4375 14.4625 14.4625C15.4375 13.4875 16.6167 13 18 13C19.3833 13 20.5625 13.4875 21.5375 14.4625C22.5125 15.4375 23 16.6167 23 18C23 19.3833 22.5125 20.5625 21.5375 21.5375C20.5625 22.5125 19.3833 23 18 23ZM20.35 19.65L19.65 20.35L17.5 18.2V15H18.5V17.8L20.35 19.65Z" fill-rule="evenodd" clip-rule="evenodd" style="fill: var(--element-active-color)"/>
|
|
76880
|
-
<path d="M4 17V19H11.5764C11.5261 18.674 11.5 18.3401 11.5 18C11.5 17.6599 11.5261 17.326 11.5764 17H8V10C8 8.9 8.39167 7.95833 9.175 7.175C9.95833 6.39167 10.9 6 12 6C13.1 6 14.0417 6.39167 14.825 7.175C15.6083 7.95833 16 8.9 16 10V11.8135C16.6301 11.61 17.3022 11.5 18 11.5V10C18 8.61667 17.5833 7.3875 16.75 6.3125C15.9167 5.2375 14.8333 4.53333 13.5 4.2V3.5C13.5 3.08333 13.3542 2.72917 13.0625 2.4375C12.7708 2.14583 12.4167 2 12 2C11.5833 2 11.2292 2.14583 10.9375 2.4375C10.6458 2.72917 10.5 3.08333 10.5 3.5V4.2C9.16667 4.53333 8.08333 5.2375 7.25 6.3125C6.41667 7.3875 6 8.61667 6 10V17H4Z" style="fill: var(--element-active-color)"/>
|
|
76881
|
-
<path d="M11.8135 20C12.0307 20.6723 12.3545 21.2968 12.7649 21.8534C12.5297 21.9511 12.2747 22 12 22C11.45 22 10.9792 21.8042 10.5875 21.4125C10.1958 21.0208 10 20.55 10 20H11.8135Z" style="fill: var(--element-active-color)"/>
|
|
76882
|
-
</svg>
|
|
76883
|
-
`;
|
|
76884
|
-
}
|
|
76885
|
-
render() {
|
|
76886
|
-
return b`
|
|
76887
|
-
<div class="wrapper">${this.useCssColor ? this.iconCss : this.icon}</div>
|
|
76888
|
-
`;
|
|
76889
|
-
}
|
|
76890
|
-
static {
|
|
76891
|
-
this.styles = i$7`
|
|
76892
|
-
.wrapper {
|
|
76893
|
-
height: 100%;
|
|
76894
|
-
width: 100%;
|
|
76895
|
-
line-height: 0;
|
|
76896
|
-
}
|
|
76897
|
-
.wrapper > * {
|
|
76898
|
-
height: 100%;
|
|
76899
|
-
width: 100%;
|
|
76900
|
-
}
|
|
76901
|
-
`;
|
|
76902
|
-
}
|
|
76903
|
-
};
|
|
76904
|
-
__decorate([n$4({ type: Boolean })], ObiAlertsShelf.prototype, "useCssColor", void 0);
|
|
76905
|
-
ObiAlertsShelf = __decorate([customElement("obi-alerts-shelf")], ObiAlertsShelf);
|
|
76906
77162
|
// src/components/message-menu-item/message-menu-item.ts
|
|
76907
77163
|
var ObcMessageMenuItemSize = /* @__PURE__ */ function(ObcMessageMenuItemSize) {
|
|
76908
77164
|
ObcMessageMenuItemSize["SingleLine"] = "single-line";
|