@oicl/openbridge-webcomponents-full-bundle 2.2.0-next.18 → 2.2.0-next.19
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 +141 -145
- package/bundle/openbridge-webcomponents.bundle.js.map +1 -1
- package/custom-elements.json +593 -2034
- 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 +5 -5
- package/dist/automation/automation-button/abstract-automation-button.d.ts.map +1 -1
- package/dist/automation/automation-button/abstract-automation-button.js +21 -47
- package/dist/automation/automation-button/abstract-automation-button.js.map +1 -1
- package/dist/automation/automation-button/badge-layout.d.ts +5 -7
- package/dist/automation/automation-button/badge-layout.d.ts.map +1 -1
- package/dist/automation/automation-button/badge-layout.js +32 -14
- package/dist/automation/automation-button/badge-layout.js.map +1 -1
- package/dist/automation/automation-button/badge-settings-controller.d.ts +11 -0
- package/dist/automation/automation-button/badge-settings-controller.d.ts.map +1 -0
- package/dist/automation/automation-button/badge-settings-controller.js +13 -0
- package/dist/automation/automation-button/badge-settings-controller.js.map +1 -0
- package/dist/automation/automation-button/badge-symbols.d.ts +37 -0
- package/dist/automation/automation-button/badge-symbols.d.ts.map +1 -0
- package/dist/automation/automation-button/badge-symbols.js +84 -0
- package/dist/automation/automation-button/badge-symbols.js.map +1 -0
- package/dist/automation/automation-tank/automation-tank.d.ts +5 -4
- package/dist/automation/automation-tank/automation-tank.d.ts.map +1 -1
- package/dist/automation/automation-tank/automation-tank.js +13 -47
- package/dist/automation/automation-tank/automation-tank.js.map +1 -1
- package/dist/automation/specialty-tank/abstract-specialty-tank.d.ts +5 -4
- package/dist/automation/specialty-tank/abstract-specialty-tank.d.ts.map +1 -1
- package/dist/automation/specialty-tank/abstract-specialty-tank.js +14 -47
- package/dist/automation/specialty-tank/abstract-specialty-tank.js.map +1 -1
- package/dist/automation/specialty-tank/specialty-tank-story-meta.d.ts +6 -1
- package/dist/automation/specialty-tank/specialty-tank-story-meta.d.ts.map +1 -1
- package/dist/automation/specialty-tank/specialty-tank-story-meta.js +10 -0
- package/dist/automation/specialty-tank/specialty-tank-story-meta.js.map +1 -1
- package/package.json +1 -1
- package/src/automation/automation-button/abstract-automation-button-storybook-helpers.ts +3 -0
- package/src/automation/automation-button/abstract-automation-button.ts +39 -81
- package/src/automation/automation-button/badge-layout.ts +13 -21
- package/src/automation/automation-button/badge-settings-controller.ts +33 -0
- package/src/automation/automation-button/badge-symbols.spec.ts +203 -0
- package/src/automation/automation-button/badge-symbols.ts +178 -0
- package/src/automation/automation-tank/automation-tank.stories.ts +15 -0
- package/src/automation/automation-tank/automation-tank.ts +36 -73
- package/src/automation/heat-exchanger/heat-exchanger.stories.ts +2 -0
- package/src/automation/heat-pump/heat-pump.stories.ts +2 -0
- package/src/automation/hydraulic-separator/hydraulic-separator.stories.ts +2 -0
- package/src/automation/pump/pump.stories.ts +44 -0
- package/src/automation/specialty-tank/abstract-specialty-tank.ts +36 -73
- package/src/automation/specialty-tank/specialty-tank-story-meta.ts +19 -1
|
@@ -20249,6 +20249,28 @@ var GlobalSettingController = class {
|
|
|
20249
20249
|
}
|
|
20250
20250
|
};
|
|
20251
20251
|
// src/automation/automation-button/badge-layout.ts
|
|
20252
|
+
/**
|
|
20253
|
+
* Badge layout of the automation buttons.
|
|
20254
|
+
*
|
|
20255
|
+
* Says which badge kind each corner of an automation button shows. The app
|
|
20256
|
+
* sets one layout for every button with `setAutomationBadgeLayout()`; a
|
|
20257
|
+
* button's own `badgeLayout` property changes single corners on top of it.
|
|
20258
|
+
*
|
|
20259
|
+
* Merge rules, for both the global and the local layout:
|
|
20260
|
+
* - a corner left out keeps the layout underneath it,
|
|
20261
|
+
* - `null` leaves the corner empty,
|
|
20262
|
+
* - a kind moved to a new corner leaves the corner it came from, so it is
|
|
20263
|
+
* never shown twice.
|
|
20264
|
+
*
|
|
20265
|
+
* ```ts
|
|
20266
|
+
* setAutomationBadgeLayout({
|
|
20267
|
+
* topLeft: AutomationButtonBadgeKind.Alert,
|
|
20268
|
+
* topRight: AutomationButtonBadgeKind.Control,
|
|
20269
|
+
* });
|
|
20270
|
+
* ```
|
|
20271
|
+
*
|
|
20272
|
+
* @module
|
|
20273
|
+
*/
|
|
20252
20274
|
var AutomationButtonBadgeKind = /* @__PURE__ */ function(AutomationButtonBadgeKind) {
|
|
20253
20275
|
AutomationButtonBadgeKind["Control"] = "control";
|
|
20254
20276
|
AutomationButtonBadgeKind["Alert"] = "alert";
|
|
@@ -20288,14 +20310,86 @@ function resolveBadgeLayout(base, override) {
|
|
|
20288
20310
|
}
|
|
20289
20311
|
return result;
|
|
20290
20312
|
}
|
|
20291
|
-
|
|
20292
|
-
|
|
20293
|
-
|
|
20294
|
-
|
|
20295
|
-
|
|
20313
|
+
/** The app-wide layout; a device re-renders on a change through `BadgeSettingsController`. */
|
|
20314
|
+
var badgeLayoutSetting = new GlobalSetting({ ...defaultAutomationButtonBadgeLayout });
|
|
20315
|
+
/** The app-wide layout with a device's own corners on top. */
|
|
20316
|
+
function currentBadgeLayout(local) {
|
|
20317
|
+
return resolveBadgeLayout(badgeLayoutSetting.get(), local);
|
|
20318
|
+
}
|
|
20319
|
+
// src/automation/automation-button/badge-symbols.ts
|
|
20320
|
+
var groups = [
|
|
20321
|
+
"control",
|
|
20322
|
+
"alert",
|
|
20323
|
+
"interlock",
|
|
20324
|
+
"commandLocked"
|
|
20325
|
+
];
|
|
20326
|
+
var T = ObcAutomationBadgeType;
|
|
20327
|
+
var symbols = {
|
|
20328
|
+
control: {
|
|
20329
|
+
local: T.Local,
|
|
20330
|
+
"local-only": T.LocalOnly,
|
|
20331
|
+
manual: T.Manual,
|
|
20332
|
+
"manual-only": T.ManualOnly,
|
|
20333
|
+
auto: T.Auto
|
|
20334
|
+
},
|
|
20335
|
+
alert: {
|
|
20336
|
+
silence: T.AlertSilenced,
|
|
20337
|
+
shelved: T.AlertShelved,
|
|
20338
|
+
caution: T.Caution,
|
|
20339
|
+
warning: T.Warning,
|
|
20340
|
+
alarm: T.Alarm,
|
|
20341
|
+
"level-critical": T.LevelCritical,
|
|
20342
|
+
"level-high": T.LevelHigh,
|
|
20343
|
+
"level-medium": T.LevelMedium,
|
|
20344
|
+
"level-low": T.LevelLow,
|
|
20345
|
+
"level-diagnostic": T.LevelDiagnostic
|
|
20346
|
+
},
|
|
20347
|
+
interlock: {
|
|
20348
|
+
interlock: T.Interlock,
|
|
20349
|
+
"interlock-inhibit": T.InterlockInhibit,
|
|
20350
|
+
simulation: T.Simulation
|
|
20351
|
+
},
|
|
20352
|
+
commandLocked: {
|
|
20353
|
+
"command-locked": T.CommandLocked,
|
|
20354
|
+
simulation: T.Simulation
|
|
20296
20355
|
}
|
|
20297
|
-
|
|
20298
|
-
|
|
20356
|
+
};
|
|
20357
|
+
/**
|
|
20358
|
+
* The badge type a badge property value draws: the letter `override` names
|
|
20359
|
+
* for it, else its symbol. `null` for `none`.
|
|
20360
|
+
*/
|
|
20361
|
+
function automationBadgeType(group, value, override) {
|
|
20362
|
+
const table = symbols[group];
|
|
20363
|
+
if (!Object.prototype.hasOwnProperty.call(table, value)) return null;
|
|
20364
|
+
const symbol = table[value];
|
|
20365
|
+
const letter = (override?.[group])?.[value];
|
|
20366
|
+
return letter ? `letter-${letter.toLowerCase()}` : symbol;
|
|
20367
|
+
}
|
|
20368
|
+
/** `base` with the letters `override` names put on top of it. */
|
|
20369
|
+
function mergeBadgeSymbolOverride(base, override) {
|
|
20370
|
+
const result = { ...base };
|
|
20371
|
+
if (!override) return result;
|
|
20372
|
+
for (const group of groups) {
|
|
20373
|
+
const letters = override[group];
|
|
20374
|
+
if (!letters) continue;
|
|
20375
|
+
const merged = { ...base?.[group] };
|
|
20376
|
+
for (const [value, letter] of Object.entries(letters)) if (letter !== void 0) merged[value] = letter;
|
|
20377
|
+
Object.assign(result, { [group]: merged });
|
|
20378
|
+
}
|
|
20379
|
+
return result;
|
|
20380
|
+
}
|
|
20381
|
+
/** The app-wide letters; a device re-renders on a change through `BadgeSettingsController`. */
|
|
20382
|
+
var badgeSymbolOverrideSetting = new GlobalSetting({});
|
|
20383
|
+
/** The app-wide letters with a device's own letters on top. */
|
|
20384
|
+
function currentBadgeSymbolOverride(local) {
|
|
20385
|
+
return mergeBadgeSymbolOverride(badgeSymbolOverrideSetting.get(), local);
|
|
20386
|
+
}
|
|
20387
|
+
// src/automation/automation-button/badge-settings-controller.ts
|
|
20388
|
+
/** Re-renders its host when an app-wide badge setting changes. */
|
|
20389
|
+
var BadgeSettingsController = class {
|
|
20390
|
+
constructor(host) {
|
|
20391
|
+
this.layout = badgeLayoutSetting.controller(host);
|
|
20392
|
+
this.symbols = badgeSymbolOverrideSetting.controller(host);
|
|
20299
20393
|
}
|
|
20300
20394
|
};
|
|
20301
20395
|
// src/automation/automation-button/abstract-automation-button.ts
|
|
@@ -20367,13 +20461,14 @@ var AutomationButtonBadgeCommandLocked = /* @__PURE__ */ function(AutomationButt
|
|
|
20367
20461
|
* @availableWhen showAlertCategoryIcon alert==true && alertFrameType in [SmallSideFlip, LargeSideFlip, BottomFlip, TopFlip]
|
|
20368
20462
|
* @availableWhen showAlertIcon alert==true && alertFrameType in [LargeSideFlip, BottomFlip, TopFlip]
|
|
20369
20463
|
* @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.
|
|
20464
|
+
* @property badgeSymbolOverride - Letters that replace badge symbols on this device, per badge property and value, on top of the app-wide ones set with `setAutomationBadgeSymbolOverride()`; for example `{commandLocked: {simulation: 's'}}`. `null` brings the symbol back.
|
|
20370
20465
|
* @property progress - Shows a progress indicator, used to indicate that an user action is in progress
|
|
20371
20466
|
* @availableWhen progressMode progress==true
|
|
20372
20467
|
* @availableWhen progressValue progress==true && progressMode in [determinate, progressiveIndeterminate]
|
|
20373
20468
|
*/
|
|
20374
20469
|
var ObcAbstractAutomationButton = class extends i$4 {
|
|
20375
|
-
constructor(
|
|
20376
|
-
super(
|
|
20470
|
+
constructor() {
|
|
20471
|
+
super();
|
|
20377
20472
|
this.showReadoutStack = true;
|
|
20378
20473
|
this.static = false;
|
|
20379
20474
|
this.readoutPosition = void 0;
|
|
@@ -20398,7 +20493,8 @@ var ObcAbstractAutomationButton = class extends i$4 {
|
|
|
20398
20493
|
this.badgeInterlock = "none";
|
|
20399
20494
|
this.badgeAlert = "none";
|
|
20400
20495
|
this.badgeLayout = void 0;
|
|
20401
|
-
this.
|
|
20496
|
+
this.badgeSymbolOverride = void 0;
|
|
20497
|
+
new BadgeSettingsController(this);
|
|
20402
20498
|
}
|
|
20403
20499
|
get icon() {
|
|
20404
20500
|
throw new Error("Method \"icon\" must be implemented in subclass");
|
|
@@ -20464,55 +20560,24 @@ var ObcAbstractAutomationButton = class extends i$4 {
|
|
|
20464
20560
|
handleBadgeSlotChange() {
|
|
20465
20561
|
this.requestUpdate();
|
|
20466
20562
|
}
|
|
20467
|
-
getBadgeType(kind) {
|
|
20563
|
+
getBadgeType(kind, symbolOverride) {
|
|
20468
20564
|
switch (kind) {
|
|
20469
|
-
case AutomationButtonBadgeKind.Control: return this.
|
|
20470
|
-
case AutomationButtonBadgeKind.Alert: return this.
|
|
20471
|
-
case AutomationButtonBadgeKind.Interlock: return this.
|
|
20472
|
-
case AutomationButtonBadgeKind.CommandLocked: return this.
|
|
20565
|
+
case AutomationButtonBadgeKind.Control: return automationBadgeType("control", this.badgeControl, symbolOverride);
|
|
20566
|
+
case AutomationButtonBadgeKind.Alert: return automationBadgeType("alert", this.badgeAlert, symbolOverride);
|
|
20567
|
+
case AutomationButtonBadgeKind.Interlock: return automationBadgeType("interlock", this.badgeInterlock, symbolOverride);
|
|
20568
|
+
case AutomationButtonBadgeKind.CommandLocked: return automationBadgeType("commandLocked", this.badgeCommandLocked, symbolOverride);
|
|
20473
20569
|
default: return null;
|
|
20474
20570
|
}
|
|
20475
20571
|
}
|
|
20476
|
-
getBadgeAlertType() {
|
|
20477
|
-
if (this.badgeAlert === "silence") return ObcAutomationBadgeType.AlertSilenced;
|
|
20478
|
-
else if (this.badgeAlert === "shelved") return ObcAutomationBadgeType.AlertShelved;
|
|
20479
|
-
else if (this.badgeAlert === "caution") return ObcAutomationBadgeType.Caution;
|
|
20480
|
-
else if (this.badgeAlert === "warning") return ObcAutomationBadgeType.Warning;
|
|
20481
|
-
else if (this.badgeAlert === "alarm") return ObcAutomationBadgeType.Alarm;
|
|
20482
|
-
else if (this.badgeAlert === "level-critical") return ObcAutomationBadgeType.LevelCritical;
|
|
20483
|
-
else if (this.badgeAlert === "level-high") return ObcAutomationBadgeType.LevelHigh;
|
|
20484
|
-
else if (this.badgeAlert === "level-medium") return ObcAutomationBadgeType.LevelMedium;
|
|
20485
|
-
else if (this.badgeAlert === "level-low") return ObcAutomationBadgeType.LevelLow;
|
|
20486
|
-
else if (this.badgeAlert === "level-diagnostic") return ObcAutomationBadgeType.LevelDiagnostic;
|
|
20487
|
-
return null;
|
|
20488
|
-
}
|
|
20489
|
-
getBadgeControlType() {
|
|
20490
|
-
if (this.badgeControl === "local") return ObcAutomationBadgeType.Local;
|
|
20491
|
-
else if (this.badgeControl === "local-only") return ObcAutomationBadgeType.LocalOnly;
|
|
20492
|
-
else if (this.badgeControl === "manual") return ObcAutomationBadgeType.Manual;
|
|
20493
|
-
else if (this.badgeControl === "manual-only") return ObcAutomationBadgeType.ManualOnly;
|
|
20494
|
-
else if (this.badgeControl === "auto") return ObcAutomationBadgeType.Auto;
|
|
20495
|
-
return null;
|
|
20496
|
-
}
|
|
20497
|
-
getBadgeInterlockType() {
|
|
20498
|
-
if (this.badgeInterlock === "interlock") return ObcAutomationBadgeType.Interlock;
|
|
20499
|
-
else if (this.badgeInterlock === "interlock-inhibit") return ObcAutomationBadgeType.InterlockInhibit;
|
|
20500
|
-
else if (this.badgeInterlock === "simulation") return ObcAutomationBadgeType.Simulation;
|
|
20501
|
-
return null;
|
|
20502
|
-
}
|
|
20503
|
-
getBadgeCommandLockedType() {
|
|
20504
|
-
if (this.badgeCommandLocked === "command-locked") return ObcAutomationBadgeType.CommandLocked;
|
|
20505
|
-
else if (this.badgeCommandLocked === "simulation") return ObcAutomationBadgeType.Simulation;
|
|
20506
|
-
return null;
|
|
20507
|
-
}
|
|
20508
20572
|
render() {
|
|
20509
20573
|
const readouts = [...this.extraReadouts];
|
|
20510
|
-
const layout =
|
|
20574
|
+
const layout = currentBadgeLayout(this.badgeLayout);
|
|
20575
|
+
const symbolOverride = currentBadgeSymbolOverride(this.badgeSymbolOverride);
|
|
20511
20576
|
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)
|
|
20577
|
+
topLeft: this.getBadgeType(layout.topLeft, symbolOverride),
|
|
20578
|
+
topRight: this.getBadgeType(layout.topRight, symbolOverride),
|
|
20579
|
+
bottomLeft: this.getBadgeType(layout.bottomLeft, symbolOverride),
|
|
20580
|
+
bottomRight: this.getBadgeType(layout.bottomRight, symbolOverride)
|
|
20516
20581
|
};
|
|
20517
20582
|
return b`<obc-automation-button
|
|
20518
20583
|
.state=${this._on ? AutomationButtonState.open : AutomationButtonState.closed}
|
|
@@ -20620,6 +20685,7 @@ __decorate([n$4({ type: String })], ObcAbstractAutomationButton.prototype, "badg
|
|
|
20620
20685
|
__decorate([n$4({ type: String })], ObcAbstractAutomationButton.prototype, "badgeInterlock", void 0);
|
|
20621
20686
|
__decorate([n$4({ type: String })], ObcAbstractAutomationButton.prototype, "badgeAlert", void 0);
|
|
20622
20687
|
__decorate([n$4({ attribute: false })], ObcAbstractAutomationButton.prototype, "badgeLayout", void 0);
|
|
20688
|
+
__decorate([n$4({ attribute: false })], ObcAbstractAutomationButton.prototype, "badgeSymbolOverride", void 0);
|
|
20623
20689
|
__decorate([o$7({ slot: "badge-top-right" })], ObcAbstractAutomationButton.prototype, "badgeTopRight", void 0);
|
|
20624
20690
|
__decorate([o$7({ slot: "badge-top-left" })], ObcAbstractAutomationButton.prototype, "badgeTopLeft", void 0);
|
|
20625
20691
|
__decorate([o$7({ slot: "badge-bottom-left" })], ObcAbstractAutomationButton.prototype, "badgeBottomLeft", void 0);
|
|
@@ -21069,6 +21135,7 @@ var argTypesAbstractAutomationButton = {
|
|
|
21069
21135
|
control: { type: "select" }
|
|
21070
21136
|
},
|
|
21071
21137
|
badgeLayout: { control: { type: "object" } },
|
|
21138
|
+
badgeSymbolOverride: { control: { type: "object" } },
|
|
21072
21139
|
progressMode: {
|
|
21073
21140
|
options: Object.values(CircularProgressMode),
|
|
21074
21141
|
control: { type: "select" },
|
|
@@ -40300,8 +40367,8 @@ var TankPositioning = /* @__PURE__ */ function(TankPositioning) {
|
|
|
40300
40367
|
}({});
|
|
40301
40368
|
// src/automation/automation-tank/automation-tank.ts
|
|
40302
40369
|
var ObcAutomationTank = class ObcAutomationTank extends AdviceMixin(SetpointMixin(i$4)) {
|
|
40303
|
-
constructor(
|
|
40304
|
-
super(
|
|
40370
|
+
constructor() {
|
|
40371
|
+
super();
|
|
40305
40372
|
this.medium = LineMedium.water;
|
|
40306
40373
|
this.value = 0;
|
|
40307
40374
|
this.max = 100;
|
|
@@ -40332,55 +40399,17 @@ var ObcAutomationTank = class ObcAutomationTank extends AdviceMixin(SetpointMixi
|
|
|
40332
40399
|
this.badgeAlert = AutomationButtonBadgeAlert.None;
|
|
40333
40400
|
this.badgeInterlock = AutomationButtonBadgeInterlock.None;
|
|
40334
40401
|
this.badgeCommandLocked = AutomationButtonBadgeCommandLocked.None;
|
|
40402
|
+
this.badgeSymbolOverride = void 0;
|
|
40335
40403
|
this._cellWidth = 0;
|
|
40336
40404
|
this._cellHeight = 0;
|
|
40337
40405
|
this._hasBadges = false;
|
|
40338
40406
|
this._hasTagSlot = false;
|
|
40339
40407
|
this._hasRichSlot = false;
|
|
40408
|
+
new BadgeSettingsController(this);
|
|
40340
40409
|
}
|
|
40341
40410
|
get isCompact() {
|
|
40342
40411
|
return this.compact || this.static;
|
|
40343
40412
|
}
|
|
40344
|
-
_badgeAlertType() {
|
|
40345
|
-
switch (this.badgeAlert) {
|
|
40346
|
-
case AutomationButtonBadgeAlert.Silence: return ObcAutomationBadgeType.AlertSilenced;
|
|
40347
|
-
case AutomationButtonBadgeAlert.Shelved: return ObcAutomationBadgeType.AlertShelved;
|
|
40348
|
-
case AutomationButtonBadgeAlert.Caution: return ObcAutomationBadgeType.Caution;
|
|
40349
|
-
case AutomationButtonBadgeAlert.Warning: return ObcAutomationBadgeType.Warning;
|
|
40350
|
-
case AutomationButtonBadgeAlert.Alarm: return ObcAutomationBadgeType.Alarm;
|
|
40351
|
-
case AutomationButtonBadgeAlert.LevelCritical: return ObcAutomationBadgeType.LevelCritical;
|
|
40352
|
-
case AutomationButtonBadgeAlert.LevelHigh: return ObcAutomationBadgeType.LevelHigh;
|
|
40353
|
-
case AutomationButtonBadgeAlert.LevelMedium: return ObcAutomationBadgeType.LevelMedium;
|
|
40354
|
-
case AutomationButtonBadgeAlert.LevelLow: return ObcAutomationBadgeType.LevelLow;
|
|
40355
|
-
case AutomationButtonBadgeAlert.LevelDiagnostic: return ObcAutomationBadgeType.LevelDiagnostic;
|
|
40356
|
-
default: return null;
|
|
40357
|
-
}
|
|
40358
|
-
}
|
|
40359
|
-
_badgeControlType() {
|
|
40360
|
-
switch (this.badgeControl) {
|
|
40361
|
-
case AutomationButtonBadgeControl.Local: return ObcAutomationBadgeType.Local;
|
|
40362
|
-
case AutomationButtonBadgeControl.LocalOnly: return ObcAutomationBadgeType.LocalOnly;
|
|
40363
|
-
case AutomationButtonBadgeControl.Manual: return ObcAutomationBadgeType.Manual;
|
|
40364
|
-
case AutomationButtonBadgeControl.ManualOnly: return ObcAutomationBadgeType.ManualOnly;
|
|
40365
|
-
case AutomationButtonBadgeControl.Auto: return ObcAutomationBadgeType.Auto;
|
|
40366
|
-
default: return null;
|
|
40367
|
-
}
|
|
40368
|
-
}
|
|
40369
|
-
_badgeInterlockType() {
|
|
40370
|
-
switch (this.badgeInterlock) {
|
|
40371
|
-
case AutomationButtonBadgeInterlock.Interlock: return ObcAutomationBadgeType.Interlock;
|
|
40372
|
-
case AutomationButtonBadgeInterlock.InterlockInhibit: return ObcAutomationBadgeType.InterlockInhibit;
|
|
40373
|
-
case AutomationButtonBadgeInterlock.Simulation: return ObcAutomationBadgeType.Simulation;
|
|
40374
|
-
default: return null;
|
|
40375
|
-
}
|
|
40376
|
-
}
|
|
40377
|
-
_badgeCommandLockedType() {
|
|
40378
|
-
switch (this.badgeCommandLocked) {
|
|
40379
|
-
case AutomationButtonBadgeCommandLocked.CommandLocked: return ObcAutomationBadgeType.CommandLocked;
|
|
40380
|
-
case AutomationButtonBadgeCommandLocked.Simulation: return ObcAutomationBadgeType.Simulation;
|
|
40381
|
-
default: return null;
|
|
40382
|
-
}
|
|
40383
|
-
}
|
|
40384
40413
|
get _usesGaugeTrend() {
|
|
40385
40414
|
return this.chartMode === "graph" || this.chartMode === "graph-and-bar";
|
|
40386
40415
|
}
|
|
@@ -40588,10 +40617,11 @@ var ObcAutomationTank = class ObcAutomationTank extends AdviceMixin(SetpointMixi
|
|
|
40588
40617
|
const safeMax = this.max > 0 ? this.max : 1;
|
|
40589
40618
|
const percent = clamp$1(this.value / safeMax * 100, 0, 100);
|
|
40590
40619
|
const isCompact = this.isCompact;
|
|
40591
|
-
const
|
|
40592
|
-
const
|
|
40593
|
-
const
|
|
40594
|
-
const
|
|
40620
|
+
const symbolOverride = currentBadgeSymbolOverride(this.badgeSymbolOverride);
|
|
40621
|
+
const controlBadge = automationBadgeType("control", this.badgeControl, symbolOverride);
|
|
40622
|
+
const alertBadge = automationBadgeType("alert", this.badgeAlert, symbolOverride);
|
|
40623
|
+
const interlockBadge = automationBadgeType("interlock", this.badgeInterlock, symbolOverride);
|
|
40624
|
+
const commandLockedBadge = automationBadgeType("commandLocked", this.badgeCommandLocked, symbolOverride);
|
|
40595
40625
|
const hasEnumBadges = controlBadge !== null || alertBadge !== null || interlockBadge !== null || commandLockedBadge !== null;
|
|
40596
40626
|
const badgesHidden = isCompact && !this._hasBadges && !hasEnumBadges;
|
|
40597
40627
|
const tagHidden = isCompact && !this._hasTagSlot && !this.tag;
|
|
@@ -40920,6 +40950,7 @@ __decorate([n$4({ type: String })], ObcAutomationTank.prototype, "badgeControl",
|
|
|
40920
40950
|
__decorate([n$4({ type: String })], ObcAutomationTank.prototype, "badgeAlert", void 0);
|
|
40921
40951
|
__decorate([n$4({ type: String })], ObcAutomationTank.prototype, "badgeInterlock", void 0);
|
|
40922
40952
|
__decorate([n$4({ type: String })], ObcAutomationTank.prototype, "badgeCommandLocked", void 0);
|
|
40953
|
+
__decorate([n$4({ attribute: false })], ObcAutomationTank.prototype, "badgeSymbolOverride", void 0);
|
|
40923
40954
|
__decorate([r$3()], ObcAutomationTank.prototype, "_cellWidth", void 0);
|
|
40924
40955
|
__decorate([r$3()], ObcAutomationTank.prototype, "_cellHeight", void 0);
|
|
40925
40956
|
__decorate([r$3()], ObcAutomationTank.prototype, "_hasBadges", void 0);
|
|
@@ -59718,6 +59749,7 @@ var SpecialtyTankFrame = /* @__PURE__ */ function(SpecialtyTankFrame) {
|
|
|
59718
59749
|
* @property badgeAlert - Alert badge, second in the badge row.
|
|
59719
59750
|
* @property badgeInterlock - Interlock badge, third in the badge row.
|
|
59720
59751
|
* @property badgeCommandLocked - Command-locked badge, last in the badge row.
|
|
59752
|
+
* @property badgeSymbolOverride - Letters that replace badge symbols on this device, per badge property and value, on top of the app-wide ones set with `setAutomationBadgeSymbolOverride()`; for example `{commandLocked: {simulation: 's'}}`. `null` brings the symbol back.
|
|
59721
59753
|
* @property alert - Show an alert-frame overlay around the halo, mirroring `obc-automation-tank`.
|
|
59722
59754
|
* @property alertFrameType - Shape of the alert frame.
|
|
59723
59755
|
* @availableWhen alertFrameType alert==true
|
|
@@ -59734,8 +59766,8 @@ var SpecialtyTankFrame = /* @__PURE__ */ function(SpecialtyTankFrame) {
|
|
|
59734
59766
|
* @availableWhen showAlertIcon alert==true && alertFrameType in [LargeSideFlip, BottomFlip, TopFlip]
|
|
59735
59767
|
*/
|
|
59736
59768
|
var ObcAbstractSpecialtyTank = class extends i$4 {
|
|
59737
|
-
constructor(
|
|
59738
|
-
super(
|
|
59769
|
+
constructor() {
|
|
59770
|
+
super();
|
|
59739
59771
|
this.medium = "regular";
|
|
59740
59772
|
this.static = false;
|
|
59741
59773
|
this.showIcon = true;
|
|
@@ -59747,6 +59779,7 @@ var ObcAbstractSpecialtyTank = class extends i$4 {
|
|
|
59747
59779
|
this.badgeAlert = AutomationButtonBadgeAlert.None;
|
|
59748
59780
|
this.badgeInterlock = AutomationButtonBadgeInterlock.None;
|
|
59749
59781
|
this.badgeCommandLocked = AutomationButtonBadgeCommandLocked.None;
|
|
59782
|
+
this.badgeSymbolOverride = void 0;
|
|
59750
59783
|
this.alert = false;
|
|
59751
59784
|
this.alertFrameType = ObcAlertFrameType.SmallSideFlip;
|
|
59752
59785
|
this.alertFrameThickness = ObcAlertFrameThickness.Small;
|
|
@@ -59756,6 +59789,7 @@ var ObcAbstractSpecialtyTank = class extends i$4 {
|
|
|
59756
59789
|
this.showAlertIcon = false;
|
|
59757
59790
|
this._hasBadges = false;
|
|
59758
59791
|
this._hasTagSlot = false;
|
|
59792
|
+
new BadgeSettingsController(this);
|
|
59759
59793
|
}
|
|
59760
59794
|
get equipmentIcon() {
|
|
59761
59795
|
throw new Error("\"equipmentIcon\" must be implemented in the subclass");
|
|
@@ -59770,46 +59804,6 @@ var ObcAbstractSpecialtyTank = class extends i$4 {
|
|
|
59770
59804
|
get splitMode() {
|
|
59771
59805
|
throw new Error("\"splitMode\" must be implemented in the subclass");
|
|
59772
59806
|
}
|
|
59773
|
-
_badgeControlType() {
|
|
59774
|
-
switch (this.badgeControl) {
|
|
59775
|
-
case AutomationButtonBadgeControl.Local: return ObcAutomationBadgeType.Local;
|
|
59776
|
-
case AutomationButtonBadgeControl.LocalOnly: return ObcAutomationBadgeType.LocalOnly;
|
|
59777
|
-
case AutomationButtonBadgeControl.Manual: return ObcAutomationBadgeType.Manual;
|
|
59778
|
-
case AutomationButtonBadgeControl.ManualOnly: return ObcAutomationBadgeType.ManualOnly;
|
|
59779
|
-
case AutomationButtonBadgeControl.Auto: return ObcAutomationBadgeType.Auto;
|
|
59780
|
-
default: return null;
|
|
59781
|
-
}
|
|
59782
|
-
}
|
|
59783
|
-
_badgeAlertType() {
|
|
59784
|
-
switch (this.badgeAlert) {
|
|
59785
|
-
case AutomationButtonBadgeAlert.Silence: return ObcAutomationBadgeType.AlertSilenced;
|
|
59786
|
-
case AutomationButtonBadgeAlert.Shelved: return ObcAutomationBadgeType.AlertShelved;
|
|
59787
|
-
case AutomationButtonBadgeAlert.Caution: return ObcAutomationBadgeType.Caution;
|
|
59788
|
-
case AutomationButtonBadgeAlert.Warning: return ObcAutomationBadgeType.Warning;
|
|
59789
|
-
case AutomationButtonBadgeAlert.Alarm: return ObcAutomationBadgeType.Alarm;
|
|
59790
|
-
case AutomationButtonBadgeAlert.LevelCritical: return ObcAutomationBadgeType.LevelCritical;
|
|
59791
|
-
case AutomationButtonBadgeAlert.LevelHigh: return ObcAutomationBadgeType.LevelHigh;
|
|
59792
|
-
case AutomationButtonBadgeAlert.LevelMedium: return ObcAutomationBadgeType.LevelMedium;
|
|
59793
|
-
case AutomationButtonBadgeAlert.LevelLow: return ObcAutomationBadgeType.LevelLow;
|
|
59794
|
-
case AutomationButtonBadgeAlert.LevelDiagnostic: return ObcAutomationBadgeType.LevelDiagnostic;
|
|
59795
|
-
default: return null;
|
|
59796
|
-
}
|
|
59797
|
-
}
|
|
59798
|
-
_badgeInterlockType() {
|
|
59799
|
-
switch (this.badgeInterlock) {
|
|
59800
|
-
case AutomationButtonBadgeInterlock.Interlock: return ObcAutomationBadgeType.Interlock;
|
|
59801
|
-
case AutomationButtonBadgeInterlock.InterlockInhibit: return ObcAutomationBadgeType.InterlockInhibit;
|
|
59802
|
-
case AutomationButtonBadgeInterlock.Simulation: return ObcAutomationBadgeType.Simulation;
|
|
59803
|
-
default: return null;
|
|
59804
|
-
}
|
|
59805
|
-
}
|
|
59806
|
-
_badgeCommandLockedType() {
|
|
59807
|
-
switch (this.badgeCommandLocked) {
|
|
59808
|
-
case AutomationButtonBadgeCommandLocked.CommandLocked: return ObcAutomationBadgeType.CommandLocked;
|
|
59809
|
-
case AutomationButtonBadgeCommandLocked.Simulation: return ObcAutomationBadgeType.Simulation;
|
|
59810
|
-
default: return null;
|
|
59811
|
-
}
|
|
59812
|
-
}
|
|
59813
59807
|
_slotHasContent(e) {
|
|
59814
59808
|
return e.target.assignedNodes({ flatten: true }).some((n) => n.nodeType === Node.ELEMENT_NODE || n.nodeType === Node.TEXT_NODE && !!n.textContent?.trim());
|
|
59815
59809
|
}
|
|
@@ -59860,10 +59854,11 @@ var ObcAbstractSpecialtyTank = class extends i$4 {
|
|
|
59860
59854
|
`;
|
|
59861
59855
|
}
|
|
59862
59856
|
render() {
|
|
59863
|
-
const
|
|
59864
|
-
const
|
|
59865
|
-
const
|
|
59866
|
-
const
|
|
59857
|
+
const symbolOverride = currentBadgeSymbolOverride(this.badgeSymbolOverride);
|
|
59858
|
+
const controlBadge = automationBadgeType("control", this.badgeControl, symbolOverride);
|
|
59859
|
+
const alertBadge = automationBadgeType("alert", this.badgeAlert, symbolOverride);
|
|
59860
|
+
const interlockBadge = automationBadgeType("interlock", this.badgeInterlock, symbolOverride);
|
|
59861
|
+
const commandLockedBadge = automationBadgeType("commandLocked", this.badgeCommandLocked, symbolOverride);
|
|
59867
59862
|
const hasEnumBadges = controlBadge !== null || alertBadge !== null || interlockBadge !== null || commandLockedBadge !== null;
|
|
59868
59863
|
const badgesHidden = !this._hasBadges && !hasEnumBadges;
|
|
59869
59864
|
const tagHidden = !this._hasTagSlot && !this.tag;
|
|
@@ -59986,6 +59981,7 @@ __decorate([n$4({ type: String })], ObcAbstractSpecialtyTank.prototype, "badgeCo
|
|
|
59986
59981
|
__decorate([n$4({ type: String })], ObcAbstractSpecialtyTank.prototype, "badgeAlert", void 0);
|
|
59987
59982
|
__decorate([n$4({ type: String })], ObcAbstractSpecialtyTank.prototype, "badgeInterlock", void 0);
|
|
59988
59983
|
__decorate([n$4({ type: String })], ObcAbstractSpecialtyTank.prototype, "badgeCommandLocked", void 0);
|
|
59984
|
+
__decorate([n$4({ attribute: false })], ObcAbstractSpecialtyTank.prototype, "badgeSymbolOverride", void 0);
|
|
59989
59985
|
__decorate([n$4({ type: Boolean })], ObcAbstractSpecialtyTank.prototype, "alert", void 0);
|
|
59990
59986
|
__decorate([n$4({ type: String })], ObcAbstractSpecialtyTank.prototype, "alertFrameType", void 0);
|
|
59991
59987
|
__decorate([n$4({ type: String })], ObcAbstractSpecialtyTank.prototype, "alertFrameThickness", void 0);
|
|
@@ -66178,7 +66174,7 @@ ObiShip = __decorate([customElement("obi-ship")], ObiShip);
|
|
|
66178
66174
|
"ship",
|
|
66179
66175
|
"close-google"
|
|
66180
66176
|
].sort();
|
|
66181
|
-
SpecialtyTankMedium.graphic, SpecialtyTankMedium.medium, SpecialtyTankMedium.medium, SpecialtyTankMedium.medium, AutomationButtonBadgeControl.Auto, AutomationButtonBadgeAlert.Silence, AutomationButtonBadgeInterlock.Interlock, AutomationButtonBadgeCommandLocked.CommandLocked, SpecialtyTankMedium.medium;
|
|
66177
|
+
SpecialtyTankMedium.graphic, SpecialtyTankMedium.medium, SpecialtyTankMedium.medium, SpecialtyTankMedium.medium, AutomationButtonBadgeControl.Auto, AutomationButtonBadgeAlert.Silence, AutomationButtonBadgeInterlock.Interlock, AutomationButtonBadgeCommandLocked.CommandLocked, SpecialtyTankMedium.medium, AutomationButtonBadgeControl.Auto, AutomationButtonBadgeAlert.Silence, AutomationButtonBadgeInterlock.Simulation, AutomationButtonBadgeCommandLocked.Simulation, SpecialtyTankMedium.medium;
|
|
66182
66178
|
// src/icons/icon-switch-horizontal-on.ts
|
|
66183
66179
|
var ObiSwitchHorizontalOn = class ObiSwitchHorizontalOn extends i$4 {
|
|
66184
66180
|
constructor(..._args) {
|