@oicl/openbridge-webcomponents-full-bundle 2.2.0-next.14 → 2.2.0-next.16
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 +366 -354
- package/bundle/openbridge-webcomponents.bundle.js.map +1 -1
- package/custom-elements.json +39 -1
- package/dist/ar/chart-object-vessel-button/chart-object-vessel-button.css_inline.js +4 -8
- package/dist/ar/poi-button/poi-button.css_inline.js +6 -12
- 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.d.ts +5 -2
- package/dist/automation/automation-button/abstract-automation-button.d.ts.map +1 -1
- package/dist/automation/automation-button/abstract-automation-button.js +6 -0
- package/dist/automation/automation-button/abstract-automation-button.js.map +1 -1
- package/dist/automation/automation-readout/automation-readout.css_inline.js +4 -10
- package/dist/automation/automation-tank/automation-tank.css_inline.js +26 -42
- 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/bus/bus.css_inline.js +3 -6
- 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/automation/specialty-tank/specialty-tank.css_inline.js +2 -4
- package/dist/automation/transmitter/transmitter.css_inline.js +5 -9
- package/dist/automation/transmitter-button/transmitter-button.css_inline.js +2 -4
- package/dist/automation/transmitter-stack/transmitter-stack.css_inline.js +6 -10
- package/dist/charthelpers/chart-legend.css_inline.js +1 -1
- package/dist/charthelpers/constants.d.ts +10 -10
- package/dist/charthelpers/constants.d.ts.map +1 -1
- package/dist/charthelpers/constants.js +10 -10
- package/dist/charthelpers/constants.js.map +1 -1
- package/dist/components/audio-recording-item/audio-recording-item.css_inline.js +2 -4
- package/dist/components/automation-button-readout-stack/automation-button-readout-stack.css_inline.js +26 -39
- package/dist/components/brilliance-menu/brilliance-menu.css_inline.js +10 -8
- package/dist/components/command-menu/command-menu.css_inline.js +8 -4
- package/dist/components/number-input-field/number-input-field.css_inline.js +5 -9
- package/dist/components/progress-bar/progress-bar.css_inline.js +10 -20
- package/dist/components/sequence-card/sequence-card.css_inline.js +21 -26
- package/dist/components/sequence-item/sequence-item.css_inline.js +8 -16
- package/dist/components/sequence-modal/sequence-modal.css_inline.js +5 -4
- package/dist/components/sequence-step/sequence-step.css_inline.js +6 -12
- package/dist/components/system-menu/system-menu.css_inline.js +10 -8
- package/dist/components/text-input-field/text-input-field.css_inline.js +2 -4
- package/dist/integration-systems/integration-fleet-button/integration-fleet-button.css_inline.js +8 -9
- package/dist/navigation-instruments/compass-indicator/compass-indicator.js +3 -3
- package/dist/navigation-instruments/compass-indicator/compass-indicator.js.map +1 -1
- package/dist/navigation-instruments/instrument-field/instrument-field.css_inline.js +26 -28
- 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/ar/chart-object-vessel-button/chart-object-vessel-button.css +2 -2
- package/src/ar/poi-button/poi-button.css +3 -3
- 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.ts +13 -0
- package/src/automation/automation-readout/automation-readout.css +2 -2
- package/src/automation/automation-tank/automation-tank.css +10 -10
- package/src/automation/automation-tank/automation-tank.ts +11 -6
- package/src/automation/bus/bus.css +2 -1
- package/src/automation/specialty-tank/abstract-specialty-tank.ts +11 -6
- package/src/automation/specialty-tank/specialty-tank.css +1 -1
- package/src/automation/transmitter-button/transmitter-button.css +1 -1
- package/src/automation/transmitter-stack/transmitter-stack.css +1 -1
- package/src/charthelpers/chart-legend.css +1 -1
- package/src/charthelpers/constants.ts +11 -10
- package/src/components/audio-recording-item/audio-recording-item.css +1 -1
- package/src/components/automation-button-readout-stack/automation-button-readout-stack.css +8 -8
- package/src/components/brilliance-menu/brilliance-menu.css +2 -2
- package/src/components/command-menu/command-menu.css +1 -1
- package/src/components/number-input-field/number-input-field.css +2 -2
- package/src/components/progress-bar/progress-bar.css +5 -5
- package/src/components/sequence-card/sequence-card.css +13 -11
- package/src/components/sequence-item/sequence-item.css +4 -4
- package/src/components/sequence-modal/sequence-modal.css +1 -1
- package/src/components/sequence-step/sequence-step.css +3 -3
- package/src/components/system-menu/system-menu.css +2 -2
- package/src/integration-systems/integration-fleet-button/integration-fleet-button.css +2 -2
- package/src/mixins/base-input-field.css +1 -1
- package/src/mixins/transmitter.css +5 -1
- package/src/navigation-instruments/compass-indicator/compass-indicator.ts +3 -3
- package/src/navigation-instruments/instrument-field/instrument-field.css +7 -7
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"abstract-automation-button.js","names":["_decorate"],"sources":["../../../src/automation/automation-button/abstract-automation-button.ts"],"sourcesContent":["import {\n ObcValveHandle,\n ValveHandleState,\n valveHandleIcon,\n} from './valve-handle.js';\nimport {\n HTMLTemplateResult,\n LitElement,\n TemplateResult,\n html,\n nothing,\n} from 'lit';\nimport {property, queryAssignedElements} from 'lit/decorators.js';\nimport '../automation-button/automation-button.js';\nimport {\n AutomationButtonDirection,\n AutomationButtonHandlePosition,\n AutomationButtonHandleSize,\n AutomationButtonOrientation,\n AutomationButtonPositioning,\n AutomationButtonReadoutPosition,\n AutomationButtonSelfActuationLine,\n AutomationButtonState,\n AutomationButtonVariant,\n} from '../automation-button/automation-button.js';\nimport {\n AutomationButtonReadoutStack,\n AutomationButtonReadoutStackSize,\n} from '../../components/automation-button-readout-stack/automation-button-readout-stack.js';\nimport {\n ObcAlertFrameThickness,\n ObcAlertFrameType,\n ObcAlertFrameMode,\n} from '../../components/alert-frame/alert-frame.js';\nimport {AlertType} from '../../types.js';\nimport '../automation-badge/automation-badge.js';\nimport {ObcAutomationBadgeType} from '../automation-badge/automation-badge.js';\nimport {CircularProgressMode} from '../../building-blocks/circular-progress/circular-progress.js';\n\nexport enum AutomationButtonBadgeAlert {\n None = 'none',\n Silence = 'silence',\n Caution = 'caution',\n Warning = 'warning',\n Alarm = 'alarm',\n LevelCritical = 'level-critical',\n LevelHigh = 'level-high',\n LevelMedium = 'level-medium',\n LevelLow = 'level-low',\n LevelDiagnostic = 'level-diagnostic',\n}\n\nexport enum AutomationButtonBadgeInterlock {\n None = 'none',\n Interlock = 'interlock',\n InterlockInhibit = 'interlock-inhibit',\n}\n\nexport enum AutomationButtonBadgeControl {\n None = 'none',\n Local = 'local',\n LocalOnly = 'local-only',\n Manual = 'manual',\n ManualOnly = 'manual-only',\n Auto = 'auto',\n}\n\nexport enum AutomationButtonBadgeCommandLocked {\n None = 'none',\n CommandLocked = 'command-locked',\n}\n\n/**\n * Base class for the automation device buttons.\n *\n * Renders an `<obc-automation-button>` with the shared surface every device\n * button needs: the readout stack and its status row, the alert frame, the\n * circular progress indicator, and the four badge corners (control, alert,\n * interlock, command-locked) with their slots and enum-driven fallbacks.\n *\n * ## Usage Guidelines\n *\n * Not registered as a custom element. A subclass supplies the device\n * rendering through `icon`, `_on` and `_variant`, and may add rows to the\n * readout stack through `extraReadouts`. `ObcAbstractAutomationButtonSquared`\n * and `ObcAbstractAutomationButtonMotorized` extend it further;\n * `obc-analog-valve` and `obc-digital-valve` extend it directly.\n *\n * @property static - Draws the device as present with its state unknown: a grey button, and the static icon where the device has one.\n * @availableWhen readoutPosition showReadoutStack==true\n * @availableWhen showStatus showReadoutStack==true\n * @availableWhen readoutSize showReadoutStack==true\n * @availableWhen tag showReadoutStack==true\n * @property activated - Enables the activated background color, used to indicate that the button is activated/selected.\n * @availableWhen alertFrameType alert==true\n * @availableWhen alertFrameThickness alert==true\n * @availableWhen alertFrameStatus alert==true\n * @availableWhen alertFrameMode alert==true\n * @availableWhen showAlertCategoryIcon alert==true && alertFrameType in [SmallSideFlip, LargeSideFlip, BottomFlip, TopFlip]\n * @availableWhen showAlertIcon alert==true && alertFrameType in [LargeSideFlip, BottomFlip, TopFlip]\n * @property progress - Shows a progress indicator, used to indicate that an user action is in progress\n * @availableWhen progressMode progress==true\n * @availableWhen progressValue progress==true && progressMode in [determinate, progressiveIndeterminate]\n */\nexport class ObcAbstractAutomationButton extends LitElement {\n @property({type: Boolean, attribute: false}) showReadoutStack: boolean = true;\n @property({type: Boolean}) static: boolean = false;\n @property({type: String}) readoutPosition:\n AutomationButtonReadoutPosition | undefined = undefined;\n @property({type: Boolean, attribute: false}) showStatus: boolean = true;\n @property({type: Boolean, attribute: false}) showStatusIcon: boolean = false;\n @property({type: String}) readoutSize: AutomationButtonReadoutStackSize =\n AutomationButtonReadoutStackSize.regular;\n @property({type: String}) tag: string | null = null;\n\n @property({type: String}) positioning: AutomationButtonPositioning =\n AutomationButtonPositioning.point;\n @property({type: Boolean}) activated: boolean = false;\n @property({type: Boolean}) alert: boolean = false;\n @property({type: String}) alertFrameType: ObcAlertFrameType =\n ObcAlertFrameType.SmallSideFlip;\n @property({type: String}) alertFrameThickness: ObcAlertFrameThickness =\n ObcAlertFrameThickness.Small;\n @property({type: String}) alertFrameStatus: AlertType = AlertType.Alarm;\n @property({type: String}) alertFrameMode: ObcAlertFrameMode =\n ObcAlertFrameMode.ackedActive;\n @property({type: Boolean, attribute: false}) showAlertCategoryIcon: boolean =\n true;\n @property({type: Boolean}) showAlertIcon: boolean = false;\n @property({type: Boolean}) progress: boolean = false;\n @property({type: String}) progressMode: CircularProgressMode =\n CircularProgressMode.indeterminate;\n @property({type: Number}) progressValue: number = 0;\n\n @property({type: String}) badgeControl: AutomationButtonBadgeControl =\n AutomationButtonBadgeControl.None;\n @property({type: String})\n badgeCommandLocked: AutomationButtonBadgeCommandLocked =\n AutomationButtonBadgeCommandLocked.None;\n @property({type: String}) badgeInterlock: AutomationButtonBadgeInterlock =\n AutomationButtonBadgeInterlock.None;\n @property({type: String}) badgeAlert: AutomationButtonBadgeAlert =\n AutomationButtonBadgeAlert.None;\n\n get icon(): TemplateResult {\n throw new Error('Method \"icon\" must be implemented in subclass');\n }\n\n get _on(): boolean {\n throw new Error('Method \"_on\" must be implemented in subclass');\n }\n\n get _variant(): AutomationButtonVariant {\n // @ts-expect-error - property should be defined in subclass\n return this.variant as AutomationButtonVariant;\n }\n\n get _orientation(): AutomationButtonOrientation {\n return AutomationButtonOrientation.horizontal;\n }\n\n get _direction(): AutomationButtonDirection {\n if ('direction' in this) {\n return this.direction as AutomationButtonDirection;\n }\n return AutomationButtonDirection.forward;\n }\n\n get extraReadouts(): AutomationButtonReadoutStack[] {\n return [];\n }\n\n /** Name of a device that can render with no text of its own. */\n get _accessibleName(): string | null {\n return null;\n }\n\n get _handlePosition(): AutomationButtonHandlePosition {\n return AutomationButtonHandlePosition.none;\n }\n\n get _handleSize(): AutomationButtonHandleSize {\n return AutomationButtonHandleSize.regular;\n }\n\n get _handle(): HTMLTemplateResult | false {\n return false;\n }\n\n /** The given handle on this device's side, in the colours of its state. */\n protected renderValveHandle(\n handle: ObcValveHandle\n ): HTMLTemplateResult | false {\n let state = this._on ? ValveHandleState.on : ValveHandleState.off;\n if (this.static) {\n state = ValveHandleState.static;\n }\n return valveHandleIcon(\n handle,\n this._handlePosition,\n state,\n this._handleSize\n );\n }\n\n get _selfActuationLine(): AutomationButtonSelfActuationLine {\n return AutomationButtonSelfActuationLine.none;\n }\n\n @queryAssignedElements({slot: 'badge-top-right'})\n badgeTopRight!: HTMLElement[];\n @queryAssignedElements({slot: 'badge-top-left'})\n badgeTopLeft!: HTMLElement[];\n @queryAssignedElements({slot: 'badge-bottom-left'})\n badgeBottomLeft!: HTMLElement[];\n @queryAssignedElements({slot: 'badge-bottom-right'})\n badgeBottomRight!: HTMLElement[];\n\n protected get _readoutPosition(): AutomationButtonReadoutPosition {\n if (this.readoutPosition) {\n return this.readoutPosition;\n }\n return this._isVertical\n ? AutomationButtonReadoutPosition.left\n : AutomationButtonReadoutPosition.bottom;\n }\n\n /** True when the device sits on a vertical pipe, which puts the default readout on the left. */\n protected get _isVertical(): boolean {\n return (\n this._orientation !== AutomationButtonOrientation.horizontal ||\n ('vertical' in this && Boolean(this.vertical))\n );\n }\n\n private getBadgeSpacer(): boolean {\n if (!this.showReadoutStack) {\n return false;\n }\n\n const topLeft =\n this.badgeTopLeft.length > 0 || this.getBadgeControlType() !== null;\n const topRight =\n this.badgeTopRight.length > 0 || this.getBadgeAlertType() !== null;\n const bottomLeft =\n this.badgeBottomLeft.length > 0 || this.getBadgeInterlockType() !== null;\n const bottomRight =\n this.badgeBottomRight.length > 0 ||\n this.getBadgeCommandLockedType() !== null;\n if (this._readoutPosition === AutomationButtonReadoutPosition.top) {\n return topRight || topLeft;\n } else if (\n this._readoutPosition === AutomationButtonReadoutPosition.bottom\n ) {\n return bottomLeft || bottomRight;\n } else if (this._readoutPosition === AutomationButtonReadoutPosition.left) {\n return topLeft || bottomLeft;\n } else if (\n this._readoutPosition === AutomationButtonReadoutPosition.right\n ) {\n return topRight || bottomRight;\n }\n return false;\n }\n\n private handleBadgeSlotChange() {\n this.requestUpdate();\n }\n\n private getBadgeAlertType(): ObcAutomationBadgeType | null {\n if (this.badgeAlert === AutomationButtonBadgeAlert.Silence) {\n return ObcAutomationBadgeType.AlertSilenced;\n } else if (this.badgeAlert === AutomationButtonBadgeAlert.Caution) {\n return ObcAutomationBadgeType.Caution;\n } else if (this.badgeAlert === AutomationButtonBadgeAlert.Warning) {\n return ObcAutomationBadgeType.Warning;\n } else if (this.badgeAlert === AutomationButtonBadgeAlert.Alarm) {\n return ObcAutomationBadgeType.Alarm;\n } else if (this.badgeAlert === AutomationButtonBadgeAlert.LevelCritical) {\n return ObcAutomationBadgeType.LevelCritical;\n } else if (this.badgeAlert === AutomationButtonBadgeAlert.LevelHigh) {\n return ObcAutomationBadgeType.LevelHigh;\n } else if (this.badgeAlert === AutomationButtonBadgeAlert.LevelMedium) {\n return ObcAutomationBadgeType.LevelMedium;\n } else if (this.badgeAlert === AutomationButtonBadgeAlert.LevelLow) {\n return ObcAutomationBadgeType.LevelLow;\n } else if (this.badgeAlert === AutomationButtonBadgeAlert.LevelDiagnostic) {\n return ObcAutomationBadgeType.LevelDiagnostic;\n }\n return null;\n }\n\n private getBadgeControlType(): ObcAutomationBadgeType | null {\n if (this.badgeControl === AutomationButtonBadgeControl.Local) {\n return ObcAutomationBadgeType.Local;\n } else if (this.badgeControl === AutomationButtonBadgeControl.LocalOnly) {\n return ObcAutomationBadgeType.LocalOnly;\n } else if (this.badgeControl === AutomationButtonBadgeControl.Manual) {\n return ObcAutomationBadgeType.Manual;\n } else if (this.badgeControl === AutomationButtonBadgeControl.ManualOnly) {\n return ObcAutomationBadgeType.ManualOnly;\n } else if (this.badgeControl === AutomationButtonBadgeControl.Auto) {\n return ObcAutomationBadgeType.Auto;\n }\n return null;\n }\n\n private getBadgeInterlockType(): ObcAutomationBadgeType | null {\n if (this.badgeInterlock === AutomationButtonBadgeInterlock.Interlock) {\n return ObcAutomationBadgeType.Interlock;\n } else if (\n this.badgeInterlock === AutomationButtonBadgeInterlock.InterlockInhibit\n ) {\n return ObcAutomationBadgeType.InterlockInhibit;\n }\n return null;\n }\n\n private getBadgeCommandLockedType(): ObcAutomationBadgeType | null {\n if (\n this.badgeCommandLocked ===\n AutomationButtonBadgeCommandLocked.CommandLocked\n ) {\n return ObcAutomationBadgeType.CommandLocked;\n }\n return null;\n }\n\n override render() {\n const readouts: AutomationButtonReadoutStack[] = [...this.extraReadouts];\n const badgeAlertType = this.getBadgeAlertType();\n const badgeControlType = this.getBadgeControlType();\n const badgeInterlockType = this.getBadgeInterlockType();\n const badgeCommandLockedType = this.getBadgeCommandLockedType();\n\n return html`<obc-automation-button\n .state=${\n this._on ? AutomationButtonState.open : AutomationButtonState.closed\n }\n .readouts=${readouts}\n .tag=${this.tag}\n .accessibleName=${this._accessibleName}\n .showReadoutStack=${this.showReadoutStack}\n .readoutPosition=${this._readoutPosition}\n .readoutSize=${this.readoutSize}\n ?alert=${this.alert}\n .alertFrameType=${this.alertFrameType}\n .alertFrameThickness=${this.alertFrameThickness}\n .alertFrameStatus=${this.alertFrameStatus}\n .alertFrameMode=${this.alertFrameMode}\n .showAlertCategoryIcon=${this.showAlertCategoryIcon}\n .showAlertIcon=${this.showAlertIcon}\n ?progress=${this.progress}\n .progressMode=${this.progressMode}\n .progressValue=${this.progressValue}\n .variant=${this._variant}\n .direction=${this._direction}\n .orientation=${this._orientation}\n .hasBadgeSpacer=${this.getBadgeSpacer()}\n .handlePosition=${this._handlePosition}\n .static=${this.static}\n .handleSize=${this._handleSize}\n .positioning=${this.positioning}\n .selfActuationLine=${this._selfActuationLine}\n ?activated=${this.activated}\n >\n ${this.icon}\n <slot\n name=\"badge-top-right\"\n slot=\"badge-top-right\"\n @slotchange=${this.handleBadgeSlotChange}\n >\n ${\n badgeAlertType\n ? html`<obc-automation-badge\n .type=${badgeAlertType}\n ></obc-automation-badge>`\n : nothing\n }\n </slot>\n <slot\n name=\"badge-top-left\"\n slot=\"badge-top-left\"\n @slotchange=${this.handleBadgeSlotChange}\n >\n ${\n badgeControlType\n ? html`<obc-automation-badge\n .type=${badgeControlType}\n ></obc-automation-badge>`\n : nothing\n }\n </slot>\n <slot\n name=\"badge-bottom-left\"\n slot=\"badge-bottom-left\"\n @slotchange=${this.handleBadgeSlotChange}\n >\n ${\n badgeInterlockType\n ? html`<obc-automation-badge\n .type=${badgeInterlockType}\n ></obc-automation-badge>`\n : nothing\n }\n </slot>\n <slot\n name=\"badge-bottom-right\"\n slot=\"badge-bottom-right\"\n @slotchange=${this.handleBadgeSlotChange}\n >\n ${\n badgeCommandLockedType\n ? html`<obc-automation-badge\n .type=${badgeCommandLockedType}\n ></obc-automation-badge>`\n : nothing\n }\n </slot>\n ${this._handle !== false ? this._handle : nothing}\n </obc-automation-button>`;\n }\n}\n"],"mappings":";;;;;;;;;;;AAuCA,IAAY,6BAAL,yBAAA,4BAAA;CACL,2BAAA,UAAA;CACA,2BAAA,aAAA;CACA,2BAAA,aAAA;CACA,2BAAA,aAAA;CACA,2BAAA,WAAA;CACA,2BAAA,mBAAA;CACA,2BAAA,eAAA;CACA,2BAAA,iBAAA;CACA,2BAAA,cAAA;CACA,2BAAA,qBAAA;;AACF,EAAA,CAAA,CAAA;AAEA,IAAY,iCAAL,yBAAA,gCAAA;CACL,+BAAA,UAAA;CACA,+BAAA,eAAA;CACA,+BAAA,sBAAA;;AACF,EAAA,CAAA,CAAA;AAEA,IAAY,+BAAL,yBAAA,8BAAA;CACL,6BAAA,UAAA;CACA,6BAAA,WAAA;CACA,6BAAA,eAAA;CACA,6BAAA,YAAA;CACA,6BAAA,gBAAA;CACA,6BAAA,UAAA;;AACF,EAAA,CAAA,CAAA;AAEA,IAAY,qCAAL,yBAAA,oCAAA;CACL,mCAAA,UAAA;CACA,mCAAA,mBAAA;;AACF,EAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCA,IAAa,8BAAb,cAAiD,WAAW;;;EACe,KAAA,mBAAA;EAC5B,KAAA,SAAA;EAEG,KAAA,kBAAA,KAAA;EACmB,KAAA,aAAA;EACI,KAAA,iBAAA;EAErE,KAAA,cAAA,iCAAiC;EACY,KAAA,MAAA;EAG7C,KAAA,cAAA,4BAA4B;EACkB,KAAA,YAAA;EACJ,KAAA,QAAA;EAE1C,KAAA,iBAAA,kBAAkB;EAElB,KAAA,sBAAA,uBAAuB;EAC+B,KAAA,mBAAA,UAAU;EAEhE,KAAA,iBAAA,kBAAkB;EAElB,KAAA,wBAAA;EACkD,KAAA,gBAAA;EACL,KAAA,WAAA;EAE7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,GAAA,4BAAA,WAAA,oBAAA,KAAA,CAAA"}
|
|
1
|
+
{"version":3,"file":"abstract-automation-button.js","names":["_decorate"],"sources":["../../../src/automation/automation-button/abstract-automation-button.ts"],"sourcesContent":["import {\n ObcValveHandle,\n ValveHandleState,\n valveHandleIcon,\n} from './valve-handle.js';\nimport {\n HTMLTemplateResult,\n LitElement,\n TemplateResult,\n html,\n nothing,\n} from 'lit';\nimport {property, queryAssignedElements} from 'lit/decorators.js';\nimport '../automation-button/automation-button.js';\nimport {\n AutomationButtonDirection,\n AutomationButtonHandlePosition,\n AutomationButtonHandleSize,\n AutomationButtonOrientation,\n AutomationButtonPositioning,\n AutomationButtonReadoutPosition,\n AutomationButtonSelfActuationLine,\n AutomationButtonState,\n AutomationButtonVariant,\n} from '../automation-button/automation-button.js';\nimport {\n AutomationButtonReadoutStack,\n AutomationButtonReadoutStackSize,\n} from '../../components/automation-button-readout-stack/automation-button-readout-stack.js';\nimport {\n ObcAlertFrameThickness,\n ObcAlertFrameType,\n ObcAlertFrameMode,\n} from '../../components/alert-frame/alert-frame.js';\nimport {AlertType} from '../../types.js';\nimport '../automation-badge/automation-badge.js';\nimport {ObcAutomationBadgeType} from '../automation-badge/automation-badge.js';\nimport {CircularProgressMode} from '../../building-blocks/circular-progress/circular-progress.js';\n\nexport enum AutomationButtonBadgeAlert {\n None = 'none',\n Silence = 'silence',\n Shelved = 'shelved',\n Caution = 'caution',\n Warning = 'warning',\n Alarm = 'alarm',\n LevelCritical = 'level-critical',\n LevelHigh = 'level-high',\n LevelMedium = 'level-medium',\n LevelLow = 'level-low',\n LevelDiagnostic = 'level-diagnostic',\n}\n\nexport enum AutomationButtonBadgeInterlock {\n None = 'none',\n Interlock = 'interlock',\n InterlockInhibit = 'interlock-inhibit',\n Simulation = 'simulation',\n}\n\nexport enum AutomationButtonBadgeControl {\n None = 'none',\n Local = 'local',\n LocalOnly = 'local-only',\n Manual = 'manual',\n ManualOnly = 'manual-only',\n Auto = 'auto',\n}\n\nexport enum AutomationButtonBadgeCommandLocked {\n None = 'none',\n CommandLocked = 'command-locked',\n Simulation = 'simulation',\n}\n\n/**\n * Base class for the automation device buttons.\n *\n * Renders an `<obc-automation-button>` with the shared surface every device\n * button needs: the readout stack and its status row, the alert frame, the\n * circular progress indicator, and the four badge corners (control, alert,\n * interlock, command-locked) with their slots and enum-driven fallbacks.\n *\n * ## Usage Guidelines\n *\n * Not registered as a custom element. A subclass supplies the device\n * rendering through `icon`, `_on` and `_variant`, and may add rows to the\n * readout stack through `extraReadouts`. `ObcAbstractAutomationButtonSquared`\n * and `ObcAbstractAutomationButtonMotorized` extend it further;\n * `obc-analog-valve` and `obc-digital-valve` extend it directly.\n *\n * @property static - Draws the device as present with its state unknown: a grey button, and the static icon where the device has one.\n * @availableWhen readoutPosition showReadoutStack==true\n * @availableWhen showStatus showReadoutStack==true\n * @availableWhen readoutSize showReadoutStack==true\n * @availableWhen tag showReadoutStack==true\n * @property activated - Enables the activated background color, used to indicate that the button is activated/selected.\n * @availableWhen alertFrameType alert==true\n * @availableWhen alertFrameThickness alert==true\n * @availableWhen alertFrameStatus alert==true\n * @availableWhen alertFrameMode alert==true\n * @availableWhen showAlertCategoryIcon alert==true && alertFrameType in [SmallSideFlip, LargeSideFlip, BottomFlip, TopFlip]\n * @availableWhen showAlertIcon alert==true && alertFrameType in [LargeSideFlip, BottomFlip, TopFlip]\n * @property progress - Shows a progress indicator, used to indicate that an user action is in progress\n * @availableWhen progressMode progress==true\n * @availableWhen progressValue progress==true && progressMode in [determinate, progressiveIndeterminate]\n */\nexport class ObcAbstractAutomationButton extends LitElement {\n @property({type: Boolean, attribute: false}) showReadoutStack: boolean = true;\n @property({type: Boolean}) static: boolean = false;\n @property({type: String}) readoutPosition:\n AutomationButtonReadoutPosition | undefined = undefined;\n @property({type: Boolean, attribute: false}) showStatus: boolean = true;\n @property({type: Boolean, attribute: false}) showStatusIcon: boolean = false;\n @property({type: String}) readoutSize: AutomationButtonReadoutStackSize =\n AutomationButtonReadoutStackSize.regular;\n @property({type: String}) tag: string | null = null;\n\n @property({type: String}) positioning: AutomationButtonPositioning =\n AutomationButtonPositioning.point;\n @property({type: Boolean}) activated: boolean = false;\n @property({type: Boolean}) alert: boolean = false;\n @property({type: String}) alertFrameType: ObcAlertFrameType =\n ObcAlertFrameType.SmallSideFlip;\n @property({type: String}) alertFrameThickness: ObcAlertFrameThickness =\n ObcAlertFrameThickness.Small;\n @property({type: String}) alertFrameStatus: AlertType = AlertType.Alarm;\n @property({type: String}) alertFrameMode: ObcAlertFrameMode =\n ObcAlertFrameMode.ackedActive;\n @property({type: Boolean, attribute: false}) showAlertCategoryIcon: boolean =\n true;\n @property({type: Boolean}) showAlertIcon: boolean = false;\n @property({type: Boolean}) progress: boolean = false;\n @property({type: String}) progressMode: CircularProgressMode =\n CircularProgressMode.indeterminate;\n @property({type: Number}) progressValue: number = 0;\n\n @property({type: String}) badgeControl: AutomationButtonBadgeControl =\n AutomationButtonBadgeControl.None;\n @property({type: String})\n badgeCommandLocked: AutomationButtonBadgeCommandLocked =\n AutomationButtonBadgeCommandLocked.None;\n @property({type: String}) badgeInterlock: AutomationButtonBadgeInterlock =\n AutomationButtonBadgeInterlock.None;\n @property({type: String}) badgeAlert: AutomationButtonBadgeAlert =\n AutomationButtonBadgeAlert.None;\n\n get icon(): TemplateResult {\n throw new Error('Method \"icon\" must be implemented in subclass');\n }\n\n get _on(): boolean {\n throw new Error('Method \"_on\" must be implemented in subclass');\n }\n\n get _variant(): AutomationButtonVariant {\n // @ts-expect-error - property should be defined in subclass\n return this.variant as AutomationButtonVariant;\n }\n\n get _orientation(): AutomationButtonOrientation {\n return AutomationButtonOrientation.horizontal;\n }\n\n get _direction(): AutomationButtonDirection {\n if ('direction' in this) {\n return this.direction as AutomationButtonDirection;\n }\n return AutomationButtonDirection.forward;\n }\n\n get extraReadouts(): AutomationButtonReadoutStack[] {\n return [];\n }\n\n /** Name of a device that can render with no text of its own. */\n get _accessibleName(): string | null {\n return null;\n }\n\n get _handlePosition(): AutomationButtonHandlePosition {\n return AutomationButtonHandlePosition.none;\n }\n\n get _handleSize(): AutomationButtonHandleSize {\n return AutomationButtonHandleSize.regular;\n }\n\n get _handle(): HTMLTemplateResult | false {\n return false;\n }\n\n /** The given handle on this device's side, in the colours of its state. */\n protected renderValveHandle(\n handle: ObcValveHandle\n ): HTMLTemplateResult | false {\n let state = this._on ? ValveHandleState.on : ValveHandleState.off;\n if (this.static) {\n state = ValveHandleState.static;\n }\n return valveHandleIcon(\n handle,\n this._handlePosition,\n state,\n this._handleSize\n );\n }\n\n get _selfActuationLine(): AutomationButtonSelfActuationLine {\n return AutomationButtonSelfActuationLine.none;\n }\n\n @queryAssignedElements({slot: 'badge-top-right'})\n badgeTopRight!: HTMLElement[];\n @queryAssignedElements({slot: 'badge-top-left'})\n badgeTopLeft!: HTMLElement[];\n @queryAssignedElements({slot: 'badge-bottom-left'})\n badgeBottomLeft!: HTMLElement[];\n @queryAssignedElements({slot: 'badge-bottom-right'})\n badgeBottomRight!: HTMLElement[];\n\n protected get _readoutPosition(): AutomationButtonReadoutPosition {\n if (this.readoutPosition) {\n return this.readoutPosition;\n }\n return this._isVertical\n ? AutomationButtonReadoutPosition.left\n : AutomationButtonReadoutPosition.bottom;\n }\n\n /** True when the device sits on a vertical pipe, which puts the default readout on the left. */\n protected get _isVertical(): boolean {\n return (\n this._orientation !== AutomationButtonOrientation.horizontal ||\n ('vertical' in this && Boolean(this.vertical))\n );\n }\n\n private getBadgeSpacer(): boolean {\n if (!this.showReadoutStack) {\n return false;\n }\n\n const topLeft =\n this.badgeTopLeft.length > 0 || this.getBadgeControlType() !== null;\n const topRight =\n this.badgeTopRight.length > 0 || this.getBadgeAlertType() !== null;\n const bottomLeft =\n this.badgeBottomLeft.length > 0 || this.getBadgeInterlockType() !== null;\n const bottomRight =\n this.badgeBottomRight.length > 0 ||\n this.getBadgeCommandLockedType() !== null;\n if (this._readoutPosition === AutomationButtonReadoutPosition.top) {\n return topRight || topLeft;\n } else if (\n this._readoutPosition === AutomationButtonReadoutPosition.bottom\n ) {\n return bottomLeft || bottomRight;\n } else if (this._readoutPosition === AutomationButtonReadoutPosition.left) {\n return topLeft || bottomLeft;\n } else if (\n this._readoutPosition === AutomationButtonReadoutPosition.right\n ) {\n return topRight || bottomRight;\n }\n return false;\n }\n\n private handleBadgeSlotChange() {\n this.requestUpdate();\n }\n\n private getBadgeAlertType(): ObcAutomationBadgeType | null {\n if (this.badgeAlert === AutomationButtonBadgeAlert.Silence) {\n return ObcAutomationBadgeType.AlertSilenced;\n } else if (this.badgeAlert === AutomationButtonBadgeAlert.Shelved) {\n return ObcAutomationBadgeType.AlertShelved;\n } else if (this.badgeAlert === AutomationButtonBadgeAlert.Caution) {\n return ObcAutomationBadgeType.Caution;\n } else if (this.badgeAlert === AutomationButtonBadgeAlert.Warning) {\n return ObcAutomationBadgeType.Warning;\n } else if (this.badgeAlert === AutomationButtonBadgeAlert.Alarm) {\n return ObcAutomationBadgeType.Alarm;\n } else if (this.badgeAlert === AutomationButtonBadgeAlert.LevelCritical) {\n return ObcAutomationBadgeType.LevelCritical;\n } else if (this.badgeAlert === AutomationButtonBadgeAlert.LevelHigh) {\n return ObcAutomationBadgeType.LevelHigh;\n } else if (this.badgeAlert === AutomationButtonBadgeAlert.LevelMedium) {\n return ObcAutomationBadgeType.LevelMedium;\n } else if (this.badgeAlert === AutomationButtonBadgeAlert.LevelLow) {\n return ObcAutomationBadgeType.LevelLow;\n } else if (this.badgeAlert === AutomationButtonBadgeAlert.LevelDiagnostic) {\n return ObcAutomationBadgeType.LevelDiagnostic;\n }\n return null;\n }\n\n private getBadgeControlType(): ObcAutomationBadgeType | null {\n if (this.badgeControl === AutomationButtonBadgeControl.Local) {\n return ObcAutomationBadgeType.Local;\n } else if (this.badgeControl === AutomationButtonBadgeControl.LocalOnly) {\n return ObcAutomationBadgeType.LocalOnly;\n } else if (this.badgeControl === AutomationButtonBadgeControl.Manual) {\n return ObcAutomationBadgeType.Manual;\n } else if (this.badgeControl === AutomationButtonBadgeControl.ManualOnly) {\n return ObcAutomationBadgeType.ManualOnly;\n } else if (this.badgeControl === AutomationButtonBadgeControl.Auto) {\n return ObcAutomationBadgeType.Auto;\n }\n return null;\n }\n\n private getBadgeInterlockType(): ObcAutomationBadgeType | null {\n if (this.badgeInterlock === AutomationButtonBadgeInterlock.Interlock) {\n return ObcAutomationBadgeType.Interlock;\n } else if (\n this.badgeInterlock === AutomationButtonBadgeInterlock.InterlockInhibit\n ) {\n return ObcAutomationBadgeType.InterlockInhibit;\n } else if (\n this.badgeInterlock === AutomationButtonBadgeInterlock.Simulation\n ) {\n return ObcAutomationBadgeType.Simulation;\n }\n return null;\n }\n\n private getBadgeCommandLockedType(): ObcAutomationBadgeType | null {\n if (\n this.badgeCommandLocked ===\n AutomationButtonBadgeCommandLocked.CommandLocked\n ) {\n return ObcAutomationBadgeType.CommandLocked;\n } else if (\n this.badgeCommandLocked === AutomationButtonBadgeCommandLocked.Simulation\n ) {\n return ObcAutomationBadgeType.Simulation;\n }\n return null;\n }\n\n override render() {\n const readouts: AutomationButtonReadoutStack[] = [...this.extraReadouts];\n const badgeAlertType = this.getBadgeAlertType();\n const badgeControlType = this.getBadgeControlType();\n const badgeInterlockType = this.getBadgeInterlockType();\n const badgeCommandLockedType = this.getBadgeCommandLockedType();\n\n return html`<obc-automation-button\n .state=${\n this._on ? AutomationButtonState.open : AutomationButtonState.closed\n }\n .readouts=${readouts}\n .tag=${this.tag}\n .accessibleName=${this._accessibleName}\n .showReadoutStack=${this.showReadoutStack}\n .readoutPosition=${this._readoutPosition}\n .readoutSize=${this.readoutSize}\n ?alert=${this.alert}\n .alertFrameType=${this.alertFrameType}\n .alertFrameThickness=${this.alertFrameThickness}\n .alertFrameStatus=${this.alertFrameStatus}\n .alertFrameMode=${this.alertFrameMode}\n .showAlertCategoryIcon=${this.showAlertCategoryIcon}\n .showAlertIcon=${this.showAlertIcon}\n ?progress=${this.progress}\n .progressMode=${this.progressMode}\n .progressValue=${this.progressValue}\n .variant=${this._variant}\n .direction=${this._direction}\n .orientation=${this._orientation}\n .hasBadgeSpacer=${this.getBadgeSpacer()}\n .handlePosition=${this._handlePosition}\n .static=${this.static}\n .handleSize=${this._handleSize}\n .positioning=${this.positioning}\n .selfActuationLine=${this._selfActuationLine}\n ?activated=${this.activated}\n >\n ${this.icon}\n <slot\n name=\"badge-top-right\"\n slot=\"badge-top-right\"\n @slotchange=${this.handleBadgeSlotChange}\n >\n ${\n badgeAlertType\n ? html`<obc-automation-badge\n .type=${badgeAlertType}\n ></obc-automation-badge>`\n : nothing\n }\n </slot>\n <slot\n name=\"badge-top-left\"\n slot=\"badge-top-left\"\n @slotchange=${this.handleBadgeSlotChange}\n >\n ${\n badgeControlType\n ? html`<obc-automation-badge\n .type=${badgeControlType}\n ></obc-automation-badge>`\n : nothing\n }\n </slot>\n <slot\n name=\"badge-bottom-left\"\n slot=\"badge-bottom-left\"\n @slotchange=${this.handleBadgeSlotChange}\n >\n ${\n badgeInterlockType\n ? html`<obc-automation-badge\n .type=${badgeInterlockType}\n ></obc-automation-badge>`\n : nothing\n }\n </slot>\n <slot\n name=\"badge-bottom-right\"\n slot=\"badge-bottom-right\"\n @slotchange=${this.handleBadgeSlotChange}\n >\n ${\n badgeCommandLockedType\n ? html`<obc-automation-badge\n .type=${badgeCommandLockedType}\n ></obc-automation-badge>`\n : nothing\n }\n </slot>\n ${this._handle !== false ? this._handle : nothing}\n </obc-automation-button>`;\n }\n}\n"],"mappings":";;;;;;;;;;;AAuCA,IAAY,6BAAL,yBAAA,4BAAA;CACL,2BAAA,UAAA;CACA,2BAAA,aAAA;CACA,2BAAA,aAAA;CACA,2BAAA,aAAA;CACA,2BAAA,aAAA;CACA,2BAAA,WAAA;CACA,2BAAA,mBAAA;CACA,2BAAA,eAAA;CACA,2BAAA,iBAAA;CACA,2BAAA,cAAA;CACA,2BAAA,qBAAA;;AACF,EAAA,CAAA,CAAA;AAEA,IAAY,iCAAL,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,CAAC,CAAA,GAAA,4BAAA,WAAA,YAAA,KAAA,CAAA;AACxBA,WAAA,CAAA,SAAS,EAAC,MAAM,OAAM,CAAC,CAAA,GAAA,4BAAA,WAAA,gBAAA,KAAA,CAAA;AAEvBA,WAAA,CAAA,SAAS,EAAC,MAAM,OAAM,CAAC,CAAA,GAAA,4BAAA,WAAA,iBAAA,KAAA,CAAA;AAEvBA,WAAA,CAAA,SAAS,EAAC,MAAM,OAAM,CAAC,CAAA,GAAA,4BAAA,WAAA,gBAAA,KAAA,CAAA;AAEvBA,WAAA,CAAA,SAAS,EAAC,MAAM,OAAM,CAAC,CAAA,GAAA,4BAAA,WAAA,sBAAA,KAAA,CAAA;AAGvBA,WAAA,CAAA,SAAS,EAAC,MAAM,OAAM,CAAC,CAAA,GAAA,4BAAA,WAAA,kBAAA,KAAA,CAAA;AAEvBA,WAAA,CAAA,SAAS,EAAC,MAAM,OAAM,CAAC,CAAA,GAAA,4BAAA,WAAA,cAAA,KAAA,CAAA;AAoEvBA,WAAA,CAAA,sBAAsB,EAAC,MAAM,kBAAiB,CAAC,CAAA,GAAA,4BAAA,WAAA,iBAAA,KAAA,CAAA;AAE/CA,WAAA,CAAA,sBAAsB,EAAC,MAAM,iBAAgB,CAAC,CAAA,GAAA,4BAAA,WAAA,gBAAA,KAAA,CAAA;AAE9CA,WAAA,CAAA,sBAAsB,EAAC,MAAM,oBAAmB,CAAC,CAAA,GAAA,4BAAA,WAAA,mBAAA,KAAA,CAAA;AAEjDA,WAAA,CAAA,sBAAsB,EAAC,MAAM,qBAAoB,CAAC,CAAA,GAAA,4BAAA,WAAA,oBAAA,KAAA,CAAA"}
|
|
@@ -149,13 +149,9 @@ var automation_readout_default = css`* {
|
|
|
149
149
|
|
|
150
150
|
font-family: var(--global-typography-font-family);
|
|
151
151
|
|
|
152
|
-
font-
|
|
152
|
+
font-size: var(--global-typography-instrument-value-regular-font-size);
|
|
153
153
|
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
line-height: var(--global-typography-general-s-line-height);
|
|
157
|
-
|
|
158
|
-
letter-spacing: var(--global-typography-general-s-letter-spacing);
|
|
154
|
+
line-height: var(--global-typography-instrument-value-regular-line-height);
|
|
159
155
|
|
|
160
156
|
font-feature-settings:
|
|
161
157
|
"liga" off,
|
|
@@ -170,10 +166,8 @@ var automation_readout_default = css`* {
|
|
|
170
166
|
|
|
171
167
|
:is(.wrapper .visible-wrapper) .unit {
|
|
172
168
|
font-family: var(--global-typography-font-family);
|
|
173
|
-
font-
|
|
174
|
-
|
|
175
|
-
line-height: var(--global-typography-general-xs-line-height);
|
|
176
|
-
letter-spacing: var(--global-typography-general-xs-letter-spacing);
|
|
169
|
+
font-size: var(--global-typography-instrument-unit-font-size);
|
|
170
|
+
line-height: var(--global-typography-instrument-unit-line-height);
|
|
177
171
|
font-feature-settings:
|
|
178
172
|
"liga" off,
|
|
179
173
|
"clig" off,
|
|
@@ -497,10 +497,8 @@ var automation_tank_default = css`* {
|
|
|
497
497
|
display: block;
|
|
498
498
|
pointer-events: auto;
|
|
499
499
|
font-family: var(--global-typography-font-family);
|
|
500
|
-
font-
|
|
501
|
-
|
|
502
|
-
line-height: var(--global-typography-general-xs-line-height);
|
|
503
|
-
letter-spacing: var(--global-typography-general-xs-letter-spacing);
|
|
500
|
+
font-size: var(--global-typography-instrument-label-font-size);
|
|
501
|
+
line-height: var(--global-typography-instrument-label-line-height);
|
|
504
502
|
font-feature-settings:
|
|
505
503
|
"liga" off,
|
|
506
504
|
"clig" off,
|
|
@@ -529,10 +527,8 @@ var automation_tank_default = css`* {
|
|
|
529
527
|
}
|
|
530
528
|
.readout-compact .percent {
|
|
531
529
|
font-family: var(--global-typography-font-family);
|
|
532
|
-
font-
|
|
533
|
-
|
|
534
|
-
line-height: var(--global-typography-general-s-line-height);
|
|
535
|
-
letter-spacing: var(--global-typography-general-s-letter-spacing);
|
|
530
|
+
font-size: var(--global-typography-instrument-value-regular-font-size);
|
|
531
|
+
line-height: var(--global-typography-instrument-value-regular-line-height);
|
|
536
532
|
font-feature-settings:
|
|
537
533
|
"liga" off,
|
|
538
534
|
"clig" off,
|
|
@@ -540,10 +536,8 @@ var automation_tank_default = css`* {
|
|
|
540
536
|
}
|
|
541
537
|
.readout-compact .percent-symbol {
|
|
542
538
|
font-family: var(--global-typography-font-family);
|
|
543
|
-
font-
|
|
544
|
-
|
|
545
|
-
line-height: var(--global-typography-general-xs-line-height);
|
|
546
|
-
letter-spacing: var(--global-typography-general-xs-letter-spacing);
|
|
539
|
+
font-size: var(--global-typography-instrument-unit-font-size);
|
|
540
|
+
line-height: var(--global-typography-instrument-unit-line-height);
|
|
547
541
|
font-feature-settings:
|
|
548
542
|
"liga" off,
|
|
549
543
|
"clig" off,
|
|
@@ -559,10 +553,8 @@ var automation_tank_default = css`* {
|
|
|
559
553
|
}
|
|
560
554
|
.readout-static slot[name="max-value"] {
|
|
561
555
|
font-family: var(--global-typography-font-family);
|
|
562
|
-
font-
|
|
563
|
-
|
|
564
|
-
line-height: var(--global-typography-general-xs-line-height);
|
|
565
|
-
letter-spacing: var(--global-typography-general-xs-letter-spacing);
|
|
556
|
+
font-size: var(--global-typography-instrument-value-small-font-size);
|
|
557
|
+
line-height: var(--global-typography-instrument-value-small-line-height);
|
|
566
558
|
font-feature-settings:
|
|
567
559
|
"liga" off,
|
|
568
560
|
"clig" off,
|
|
@@ -570,10 +562,8 @@ var automation_tank_default = css`* {
|
|
|
570
562
|
}
|
|
571
563
|
.readout-static slot[name="unit"] {
|
|
572
564
|
font-family: var(--global-typography-font-family);
|
|
573
|
-
font-
|
|
574
|
-
|
|
575
|
-
line-height: var(--global-typography-general-xs-line-height);
|
|
576
|
-
letter-spacing: var(--global-typography-general-xs-letter-spacing);
|
|
565
|
+
font-size: var(--global-typography-instrument-unit-font-size);
|
|
566
|
+
line-height: var(--global-typography-instrument-unit-line-height);
|
|
577
567
|
font-feature-settings:
|
|
578
568
|
"liga" off,
|
|
579
569
|
"clig" off,
|
|
@@ -589,10 +579,11 @@ var automation_tank_default = css`* {
|
|
|
589
579
|
|
|
590
580
|
.header .percent {
|
|
591
581
|
font-family: var(--global-typography-font-family);
|
|
592
|
-
font-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
582
|
+
font-size: var(--global-typography-instrument-value-large-font-size);
|
|
583
|
+
line-height: var(--global-typography-instrument-value-large-line-height);
|
|
584
|
+
letter-spacing: var(
|
|
585
|
+
--global-typography-instrument-value-large-letter-spacing
|
|
586
|
+
);
|
|
596
587
|
font-feature-settings:
|
|
597
588
|
"liga" off,
|
|
598
589
|
"clig" off,
|
|
@@ -607,10 +598,8 @@ var automation_tank_default = css`* {
|
|
|
607
598
|
|
|
608
599
|
.header .percent-symbol {
|
|
609
600
|
font-family: var(--global-typography-font-family);
|
|
610
|
-
font-
|
|
611
|
-
|
|
612
|
-
line-height: var(--global-typography-general-xs-line-height);
|
|
613
|
-
letter-spacing: var(--global-typography-general-xs-letter-spacing);
|
|
601
|
+
font-size: var(--global-typography-instrument-unit-font-size);
|
|
602
|
+
line-height: var(--global-typography-instrument-unit-line-height);
|
|
614
603
|
font-feature-settings:
|
|
615
604
|
"liga" off,
|
|
616
605
|
"clig" off,
|
|
@@ -633,13 +622,9 @@ var automation_tank_default = css`* {
|
|
|
633
622
|
|
|
634
623
|
font-family: var(--global-typography-font-family);
|
|
635
624
|
|
|
636
|
-
font-
|
|
625
|
+
font-size: var(--global-typography-instrument-unit-font-size);
|
|
637
626
|
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
line-height: var(--global-typography-general-xs-line-height);
|
|
641
|
-
|
|
642
|
-
letter-spacing: var(--global-typography-general-xs-letter-spacing);
|
|
627
|
+
line-height: var(--global-typography-instrument-unit-line-height);
|
|
643
628
|
|
|
644
629
|
font-feature-settings:
|
|
645
630
|
"liga" off,
|
|
@@ -649,10 +634,11 @@ var automation_tank_default = css`* {
|
|
|
649
634
|
|
|
650
635
|
.value .current-value {
|
|
651
636
|
font-family: var(--global-typography-font-family);
|
|
652
|
-
font-weight: var(
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
637
|
+
font-weight: var(
|
|
638
|
+
--global-typography-instrument-value-regular-font-weight-active
|
|
639
|
+
);
|
|
640
|
+
font-size: var(--global-typography-instrument-value-regular-font-size);
|
|
641
|
+
line-height: var(--global-typography-instrument-value-regular-line-height);
|
|
656
642
|
font-feature-settings:
|
|
657
643
|
"liga" off,
|
|
658
644
|
"clig" off,
|
|
@@ -670,10 +656,8 @@ var automation_tank_default = css`* {
|
|
|
670
656
|
|
|
671
657
|
.value .max-value {
|
|
672
658
|
font-family: var(--global-typography-font-family);
|
|
673
|
-
font-
|
|
674
|
-
|
|
675
|
-
line-height: var(--global-typography-general-s-line-height);
|
|
676
|
-
letter-spacing: var(--global-typography-general-s-letter-spacing);
|
|
659
|
+
font-size: var(--global-typography-instrument-value-regular-font-size);
|
|
660
|
+
line-height: var(--global-typography-instrument-value-regular-line-height);
|
|
677
661
|
font-feature-settings:
|
|
678
662
|
"liga" off,
|
|
679
663
|
"clig" off,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"automation-tank.d.ts","sourceRoot":"","sources":["../../../src/automation/automation-tank/automation-tank.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,UAAU,EAEV,OAAO,EAGP,cAAc,EACf,MAAM,KAAK,CAAC;AAGb,OAAO,EAAC,UAAU,EAAC,MAAM,aAAa,CAAC;AACvC,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EACL,0BAA0B,EAC1B,kCAAkC,EAClC,4BAA4B,EAC5B,8BAA8B,EAC/B,MAAM,oDAAoD,CAAC;AAE5D,OAAO,8CAA8C,CAAC;AACtD,OAAO,uCAAuC,CAAC;AAC/C,OAAO,gDAAgD,CAAC;AACxD,OAAO,yCAAyC,CAAC;AACjD,OAAO,wCAAwC,CAAC;AAChD,OAAO,yBAAyB,CAAC;AACjC,OAAO,0BAA0B,CAAC;AAClC,OAAO,oCA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|
case AutomationButtonBadgeAlert.Silence: return ObcAutomationBadgeType.AlertSilenced;
|
|
104
|
+
case AutomationButtonBadgeAlert.Shelved: return ObcAutomationBadgeType.AlertShelved;
|
|
104
105
|
case AutomationButtonBadgeAlert.Caution: return ObcAutomationBadgeType.Caution;
|
|
105
106
|
case AutomationButtonBadgeAlert.Warning: return ObcAutomationBadgeType.Warning;
|
|
106
107
|
case AutomationButtonBadgeAlert.Alarm: return ObcAutomationBadgeType.Alarm;
|
|
@@ -126,12 +127,16 @@ var ObcAutomationTank = class ObcAutomationTank extends AdviceMixin(SetpointMixi
|
|
|
126
127
|
switch (this.badgeInterlock) {
|
|
127
128
|
case AutomationButtonBadgeInterlock.Interlock: return ObcAutomationBadgeType.Interlock;
|
|
128
129
|
case AutomationButtonBadgeInterlock.InterlockInhibit: return ObcAutomationBadgeType.InterlockInhibit;
|
|
130
|
+
case AutomationButtonBadgeInterlock.Simulation: return ObcAutomationBadgeType.Simulation;
|
|
129
131
|
default: return null;
|
|
130
132
|
}
|
|
131
133
|
}
|
|
132
134
|
_badgeCommandLockedType() {
|
|
133
|
-
|
|
134
|
-
|
|
135
|
+
switch (this.badgeCommandLocked) {
|
|
136
|
+
case AutomationButtonBadgeCommandLocked.CommandLocked: return ObcAutomationBadgeType.CommandLocked;
|
|
137
|
+
case AutomationButtonBadgeCommandLocked.Simulation: return ObcAutomationBadgeType.Simulation;
|
|
138
|
+
default: return null;
|
|
139
|
+
}
|
|
135
140
|
}
|
|
136
141
|
get _usesGaugeTrend() {
|
|
137
142
|
return this.chartMode === "graph" || this.chartMode === "graph-and-bar";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"automation-tank.js","names":["compentStyle","_decorate"],"sources":["../../../src/automation/automation-tank/automation-tank.ts"],"sourcesContent":["import {\n HTMLTemplateResult,\n LitElement,\n html,\n nothing,\n svg,\n unsafeCSS,\n PropertyValues,\n} from 'lit';\nimport {property, state} from 'lit/decorators.js';\nimport compentStyle from './automation-tank.css?inline';\nimport {LineMedium} from '../index.js';\nimport '../automation-badge/automation-badge.js';\nimport {ObcAutomationBadgeType} from '../automation-badge/automation-badge.js';\nimport {\n AutomationButtonBadgeAlert,\n AutomationButtonBadgeCommandLocked,\n AutomationButtonBadgeControl,\n AutomationButtonBadgeInterlock,\n} from '../automation-button/abstract-automation-button.js';\n\nimport '../../icons/icon-chevron-double-up-google.js';\nimport '../../icons/icon-chevron-up-google.js';\nimport '../../icons/icon-chevron-double-down-google.js';\nimport '../../icons/icon-chevron-down-google.js';\nimport '../../icons/icon-arrow-right-google.js';\nimport '../../icons/icon-off.js';\nimport '../../icons/icon-tank.js';\nimport '../../icons/icon-energy-battery.js';\nimport '../../navigation-instruments/gauge-trend/gauge-trend.js';\nimport '../../building-blocks/bar-vertical/bar-vertical.js';\nimport '../../components/alert-frame/alert-frame.js';\nimport {Priority} from '../../navigation-instruments/types.js';\nimport {\n ObcAlertFrameMode,\n ObcAlertFrameThickness,\n ObcAlertFrameType,\n} from '../../components/alert-frame/alert-frame.js';\nimport {AlertType} from '../../types.js';\nimport type {ChartLineDataItem} from '../../building-blocks/chart-line/chart-line-base.js';\nimport {AdviceMixin, syncAdviceAlias} from '../../svghelpers/advice-mixin.js';\nimport type {AdviceInput} from '../../svghelpers/advice.js';\nimport {\n AdvicePosition,\n ExternalScaleSide,\n FillMode,\n ScaleType,\n computeOutsideBarThickness,\n} from '../../building-blocks/external-scale/external-scale.js';\nimport {classMap} from 'lit/directives/class-map.js';\nimport {customElement} from '../../decorator.js';\nimport {SetpointMixin} from '../../svghelpers/setpoint-mixin.js';\nimport {TankPositioning} from './tank-positioning.js';\nimport {clamp} from '../../svghelpers/math.js';\n\nexport enum TankTrend {\n fastRising = 'fast-rising',\n rising = 'rising',\n stable = 'stable',\n falling = 'falling',\n fastFalling = 'fast-falling',\n closed = 'closed',\n}\n\nexport enum TankType {\n generic = 'generic',\n atmospheric = 'atmospheric',\n pressurized = 'pressurized',\n battery = 'battery',\n}\n\nexport enum TankOrientation {\n vertical = 'vertical',\n horizontal = 'horizontal',\n}\n\nexport {TankPositioning};\n\nexport enum TankChartMode {\n /** Static fill bar driven by `value` / `max` (default, backward compatible). */\n bar = 'bar',\n /** Embedded `obc-gauge-trend` line/area chart, no side bar. */\n graph = 'graph',\n /** Embedded `obc-gauge-trend` line/area chart with a side bar. */\n graphAndBar = 'graph-and-bar',\n}\n\n/**\n *\n *\n * Setpoint properties are inherited from {@link SetpointMixin}\n * (`setpoint`, `newSetpoint`, `touching`, `atSetpoint`, `autoAtSetpoint`,\n * `autoAtSetpointDeadband`, `setpointAtZeroDeadband`, `setpointOverride`,\n * `animateSetpoint`) and are forwarded to the embedded chart: the SVG bar in\n * `bar` mode, or `obc-gauge-trend` in the graph modes (where the marker\n * renders on the side bar, i.e. `graph-and-bar`). Values share the tank's\n * `value` / `max` scale.\n *\n * @property positioning - Host positioning model — see `TankPositioning` for details. Defaults to\n * `button` (host fills parent container, 100% × 100%, falling back to the\n * design aspect ratio on any axis the parent leaves indefinite, no anchor\n * offset). Set to `point` for the legacy P&ID canvas mode (fixed default\n * dimensions + top-center anchor offset).\n * @property activated - Enables the activated background color, used to indicate that the tank is\n * activated/selected. Requires an interactive tank — the `noClick` mixin\n * variant used when `clickable` is `false` only paints the enabled state, so\n * a non-clickable tank ignores this (matching `obc-elevated-card`).\n * @availableWhen activated clickable==true\n * @property chartData - Time-series data points for the embedded gauge-trend (graph modes only).\n * @property priority - Priority hint forwarded to child charts (regular | enhanced).\n * @property advice - Advice overlays. Forwarded to the embedded `obc-gauge-trend` in\n * `graph` / `graph-and-bar` modes, or rendered as pills over the static\n * bar in `bar` mode.\n * @property hasAdvice - Show advice overlays (works in all `chartMode` variants).\n * @property alert - Show an `<obc-alert-frame>` overlay around the bordered tank area (the\n * `.halo` wrapper). Mirrors the API of `obc-automation-button`: same seven\n * properties, same three slots (`alert-icon`, `alert-label`, `alert-timer`).\n * The ring overlays `.halo` only, so the tag and readout that sit outside\n * the halo in compact / static layouts remain unaffected.\n * @property alertFrameType - Shape of the alert frame.\n * @availableWhen alertFrameType alert==true\n * @property alertFrameThickness - Thickness of the alert frame.\n * @availableWhen alertFrameThickness alert==true\n * @property alertFrameStatus - Alert status the frame is coloured for.\n * @availableWhen alertFrameStatus alert==true\n * @property alertFrameMode - Acknowledgement state of the alert: `acked-active` (default) is steady,\n * `unacked-active` flashes, `unacked-rectified` flashes a dashed frame.\n * @availableWhen alertFrameMode alert==true\n * @property showAlertCategoryIcon - Shows the alert category icon inside the frame.\n * @availableWhen showAlertCategoryIcon alert==true && alertFrameType in [SmallSideFlip, LargeSideFlip, BottomFlip, TopFlip]\n * @property showAlertIcon - Shows the slotted alert icon inside the frame.\n * @availableWhen showAlertIcon alert==true && alertFrameType in [LargeSideFlip, BottomFlip, TopFlip]\n * @property showTrendSymbol - Show the trend chevron / off icon next to the percent readout. Default\n * `true` preserves existing behavior. Set to `false` to hide the trend\n * indicator in both compact and non-compact readouts — useful when the\n * trend is not meaningful for a given tank, or when the consumer wants\n * to keep the readout compact. Has no effect in `static` mode, which\n * renders the tank's capacity (`max` + `unit`) instead of a percent and\n * intentionally omits the trend indicator (a static tank represents\n * \"device present, current state unknown\"). `attribute: false` per the\n * repo's positive-default-true boolean convention.\n * @property percentFractionDigits - Number of fraction digits used to format the percent readout in the\n * non-compact (regular) layout. Defaults to `0` (integer percent). The\n * compact layout always renders integer percent to keep its fixed-width\n * footprint stable. The static layout renders capacity (`max` + `unit`)\n * rather than percent, so this property has no effect there — pass a\n * pre-formatted value through the `max-value` slot if fractional\n * precision is needed (see the `WithFractionDigits` story).\n * @property static - Display-only variant for a device whose current state is unknown: the\n * chart cell is hidden, the bordered area is filled with\n * `--container-section-color` and the readout is centred inside it. Always\n * compact-sized, so it overrides `compact`, and it renders as a\n * `<div role=\"img\">` — outside the tab order and not announced as a control.\n * @property clickable - Whether the tank is interactive. `true` renders the root as a `<button>`\n * with the flat-mixin interaction surface; `false` renders a `<div>` that\n * keeps the resting appearance (the mixin's `noClick` variant) but loses\n * hover, pressed and focus-visible and leaves the tab order. Everything\n * else — chart, badges, readout, tag and the alert frame — still renders,\n * so use it for a display-only tank that shows live data. No effect on a\n * `static` tank, which is already non-interactive.\n * @property chartMode - Chart cell rendering mode: `bar` (default) is a static fill bar driven by\n * `value` and `max`, `graph` embeds an `obc-gauge-trend` line/area chart,\n * and `graphAndBar` embeds one with an integrated side bar.\n * @property hasGraphIcon - Overlays a decorative icon centred on the chart cell — the energy-battery\n * icon for a battery tank, the generic tank icon otherwise. Works in every\n * `chartMode` and both orientations; the icon sits in a fixed CSS layer\n * above the bar or graph and is silhouetted so it stays legible on any\n * fill, and its size follows the ambient `obc-component-size-*` class.\n * @property badgeControl - Control badge rendered in the `badges` cell. A non-`None` value renders an\n * `<obc-automation-badge>` as fallback content for the `badges` slot, so any\n * slotted content wins. The cell orders the four badges control, alert,\n * interlock, commandLocked, left to right.\n * @slot badges - Custom badges to be displayed in the badge area.\n * @slot tag - Text or element for the tank's tag/label.\n * @slot readout - Replaces the entire readout content block.\n * @slot max-value - Content for the capacity value.\n * @slot unit - Content for the unit of measurement.\n * @slot current-value - Content for the current level value.\n * @slot rich - Detail rows below the main readout, shown in the regular\n * (non-compact, non-static) layout. Slot an `<obc-readout-list>` of\n * `<obc-readout-list-item>` rows — it owns the row typography and cross-row\n * column alignment; the tank renders a divider above it automatically when\n * the slot is filled.\n * @slot alert-icon - Custom icon for the alert frame.\n * @slot alert-label - Label for the alert frame.\n * @slot alert-timer - Timer for the alert frame.\n * @fires click - Fired when the tank is clicked. When `clickable` is `false` the tank renders a plain `<div>`, and in `static` mode a `<div role=\"img\">`, instead of a `<button>` — in both cases it is not focusable or keyboard-activatable; pointer clicks still reach the host.\n * @beta\n */\n@customElement('obc-automation-tank')\nexport class ObcAutomationTank extends AdviceMixin(SetpointMixin(LitElement)) {\n @property({type: String}) medium: LineMedium = LineMedium.water;\n @property({type: Number}) value: number = 0;\n @property({type: Number}) max: number = 100;\n @property({type: String}) trend: TankTrend = TankTrend.stable;\n @property({type: String, reflect: true}) type: TankType = TankType.generic;\n @property({type: String, reflect: true}) orientation: TankOrientation =\n TankOrientation.vertical;\n @property({type: Boolean, reflect: true}) compact: boolean = false;\n @property({type: String, reflect: true}) positioning: TankPositioning =\n TankPositioning.button;\n @property({type: Boolean, reflect: true}) static: boolean = false;\n @property({type: Boolean, attribute: false}) clickable: boolean = true;\n @property({type: Boolean}) activated: boolean = false;\n @property({type: String}) tag: string = '';\n\n @property({type: String, reflect: true, attribute: 'chart-mode'})\n chartMode: TankChartMode = TankChartMode.bar;\n\n @property({type: Array, attribute: false})\n chartData: ChartLineDataItem[] = [];\n\n @property({type: String}) priority: Priority = Priority.regular;\n\n /** @deprecated Alias of `advices`. Ranges in tank units. */\n @property({type: Array, attribute: false}) advice?: AdviceInput[];\n\n @property({type: Boolean}) hasAdvice = false;\n\n @property({type: Boolean, attribute: false}) hasGraphIcon = false;\n\n @property({type: Boolean}) alert: boolean = false;\n @property({type: String}) alertFrameType: ObcAlertFrameType =\n ObcAlertFrameType.SmallSideFlip;\n @property({type: String}) alertFrameThickness: ObcAlertFrameThickness =\n ObcAlertFrameThickness.Small;\n @property({type: String}) alertFrameStatus: AlertType = AlertType.Alarm;\n @property({type: String}) alertFrameMode: ObcAlertFrameMode =\n ObcAlertFrameMode.ackedActive;\n @property({type: Boolean, attribute: false}) showAlertCategoryIcon: boolean =\n true;\n @property({type: Boolean}) showAlertIcon: boolean = false;\n\n @property({type: Boolean, attribute: false}) showTrendSymbol: boolean = true;\n\n @property({type: Number}) percentFractionDigits: number = 0;\n\n @property({type: String}) badgeControl: AutomationButtonBadgeControl =\n AutomationButtonBadgeControl.None;\n @property({type: String}) badgeAlert: AutomationButtonBadgeAlert =\n AutomationButtonBadgeAlert.None;\n @property({type: String}) badgeInterlock: AutomationButtonBadgeInterlock =\n AutomationButtonBadgeInterlock.None;\n @property({type: String})\n badgeCommandLocked: AutomationButtonBadgeCommandLocked =\n AutomationButtonBadgeCommandLocked.None;\n\n @state() private _cellWidth = 0;\n @state() private _cellHeight = 0;\n /**\n * Tracks whether the `badges` and `tag` slots have assigned content. Used\n * in compact/static mode to collapse empty cells to 0px so the tank-frame\n * can absorb the freed space (per spec: \"if there are no badges it would\n * grow upward; if there are no readout or tags it would grow downward\").\n * Non-compact (regular) layout keeps its grid-based reserved rows.\n */\n @state() private _hasBadges = false;\n @state() private _hasTagSlot = false;\n /**\n * Tracks whether the `rich` slot has assigned content, so the regular\n * (non-compact) layout only draws the rich divider when a consumer has\n * slotted detail rows (canonically an `<obc-readout-list>`). Mirrors\n * `_hasBadges` / `_hasTagSlot`.\n */\n @state() private _hasRichSlot = false;\n private _chartResizeObserver?: ResizeObserver;\n private _observedCell?: Element;\n\n private get isCompact(): boolean {\n return this.compact || this.static;\n }\n\n private _badgeAlertType(): ObcAutomationBadgeType | null {\n switch (this.badgeAlert) {\n case AutomationButtonBadgeAlert.Silence:\n return ObcAutomationBadgeType.AlertSilenced;\n case AutomationButtonBadgeAlert.Caution:\n return ObcAutomationBadgeType.Caution;\n case AutomationButtonBadgeAlert.Warning:\n return ObcAutomationBadgeType.Warning;\n case AutomationButtonBadgeAlert.Alarm:\n return ObcAutomationBadgeType.Alarm;\n case AutomationButtonBadgeAlert.LevelCritical:\n return ObcAutomationBadgeType.LevelCritical;\n case AutomationButtonBadgeAlert.LevelHigh:\n return ObcAutomationBadgeType.LevelHigh;\n case AutomationButtonBadgeAlert.LevelMedium:\n return ObcAutomationBadgeType.LevelMedium;\n case AutomationButtonBadgeAlert.LevelLow:\n return ObcAutomationBadgeType.LevelLow;\n case AutomationButtonBadgeAlert.LevelDiagnostic:\n return ObcAutomationBadgeType.LevelDiagnostic;\n default:\n return null;\n }\n }\n\n private _badgeControlType(): ObcAutomationBadgeType | null {\n switch (this.badgeControl) {\n case AutomationButtonBadgeControl.Local:\n return ObcAutomationBadgeType.Local;\n case AutomationButtonBadgeControl.LocalOnly:\n return ObcAutomationBadgeType.LocalOnly;\n case AutomationButtonBadgeControl.Manual:\n return ObcAutomationBadgeType.Manual;\n case AutomationButtonBadgeControl.ManualOnly:\n return ObcAutomationBadgeType.ManualOnly;\n case AutomationButtonBadgeControl.Auto:\n return ObcAutomationBadgeType.Auto;\n default:\n return null;\n }\n }\n\n private _badgeInterlockType(): ObcAutomationBadgeType | null {\n switch (this.badgeInterlock) {\n case AutomationButtonBadgeInterlock.Interlock:\n return ObcAutomationBadgeType.Interlock;\n case AutomationButtonBadgeInterlock.InterlockInhibit:\n return ObcAutomationBadgeType.InterlockInhibit;\n default:\n return null;\n }\n }\n\n private _badgeCommandLockedType(): ObcAutomationBadgeType | null {\n if (\n this.badgeCommandLocked ===\n AutomationButtonBadgeCommandLocked.CommandLocked\n ) {\n return ObcAutomationBadgeType.CommandLocked;\n }\n return null;\n }\n\n private get _usesGaugeTrend(): boolean {\n return (\n this.chartMode === TankChartMode.graph ||\n this.chartMode === TankChartMode.graphAndBar\n );\n }\n\n private _onBadgesSlotChange(e: Event): void {\n const slot = e.target as HTMLSlotElement;\n this._hasBadges = slot\n .assignedNodes({flatten: true})\n .some(\n (n) =>\n n.nodeType === Node.ELEMENT_NODE ||\n (n.nodeType === Node.TEXT_NODE && !!n.textContent?.trim())\n );\n }\n\n private _onTagSlotChange(e: Event): void {\n const slot = e.target as HTMLSlotElement;\n this._hasTagSlot = slot\n .assignedNodes({flatten: true})\n .some(\n (n) =>\n n.nodeType === Node.ELEMENT_NODE ||\n (n.nodeType === Node.TEXT_NODE && !!n.textContent?.trim())\n );\n }\n\n private _onRichSlotChange(e: Event): void {\n const slot = e.target as HTMLSlotElement;\n this._hasRichSlot = slot\n .assignedNodes({flatten: true})\n .some(\n (n) =>\n n.nodeType === Node.ELEMENT_NODE ||\n (n.nodeType === Node.TEXT_NODE && !!n.textContent?.trim())\n );\n }\n\n override disconnectedCallback(): void {\n super.disconnectedCallback();\n this._chartResizeObserver?.disconnect();\n this._chartResizeObserver = undefined;\n this._observedCell = undefined;\n }\n\n protected override updated(\n changed: Map<string | number | symbol, unknown>\n ): void {\n super.updated(changed);\n // The chart cell element is recreated when `chartMode` moves between bar\n // and graph, and appears or disappears with `static` and `compact`, so the\n // observer is re-attached to the current `.bar-container`. `priority`\n // needs no forwarding — children take it through template bindings.\n this._syncChartResizeObserver();\n }\n\n private _syncChartResizeObserver(): void {\n // Observe the bar-container in BOTH bar mode and graph modes — the bar\n // mode now renders an SVG `obc-bar-vertical` / `-horizontal` that needs\n // measured pixel dimensions for its viewBox and barThickness.\n const cell = this.renderRoot.querySelector('.bar-container');\n if (!cell) {\n if (this._chartResizeObserver) {\n this._chartResizeObserver.disconnect();\n this._observedCell = undefined;\n }\n return;\n }\n if (cell === this._observedCell) return;\n\n if (!this._chartResizeObserver) {\n this._chartResizeObserver = new ResizeObserver((entries) => {\n const entry = entries[0];\n if (!entry) return;\n const w = Math.round(entry.contentRect.width);\n const h = Math.round(entry.contentRect.height);\n if (w !== this._cellWidth) this._cellWidth = w;\n if (h !== this._cellHeight) this._cellHeight = h;\n });\n } else {\n this._chartResizeObserver.disconnect();\n }\n this._chartResizeObserver.observe(cell);\n this._observedCell = cell;\n }\n\n trendIcon(): HTMLTemplateResult | typeof nothing {\n if (this.trend === TankTrend.fastRising) {\n return html`<obi-chevron-double-up-google\n class=\"trend-icon\"\n ></obi-chevron-double-up-google>`;\n } else if (this.trend === TankTrend.rising) {\n return html`<obi-chevron-up-google\n class=\"trend-icon\"\n ></obi-chevron-up-google>`;\n } else if (this.trend === TankTrend.fastFalling) {\n return html`<obi-chevron-double-down-google\n class=\"trend-icon\"\n ></obi-chevron-double-down-google>`;\n } else if (this.trend === TankTrend.falling) {\n return html`<obi-chevron-down-google\n class=\"trend-icon\"\n ></obi-chevron-down-google>`;\n } else if (this.trend === TankTrend.closed) {\n return html`<obi-off class=\"trend-icon\"></obi-off>`;\n } else {\n return html`<obi-arrow-right-google\n class=\"trend-icon\"\n ></obi-arrow-right-google>`;\n }\n }\n\n /**\n * Atmospheric cap, 3-piece (corner-start / stretchable middle arc / corner-end).\n * Each piece draws its own fill (closed) and stroke (open) so adjacent pieces\n * abut without a visible vertical seam line. Coordinates are derived from the\n * Figma 248x14 path; corners stay 12px wide while the middle arc stretches.\n * Position (start vs end) and orientation flipping are handled in CSS.\n *\n * Horizontal orientation reuses the same path data but rotates each piece\n * via an inner `<g transform=\"translate(0 H) rotate(-90)\">`, mapping the\n * source coord (x, y) to (y, H - x). The viewBox is swapped accordingly:\n * corner: 12x14 -> 14x12 (H=12)\n * middle: 224x14 -> 14x224 (H=224)\n * Cap-end (right side in horizontal) is mirrored via CSS scaleX(-1).\n */\n private renderAtmosphericCap(side: 'start' | 'end'): HTMLTemplateResult {\n const isHorizontal = this.orientation === TankOrientation.horizontal;\n\n // Curve Y-values are scaled proportionally from the 18/12-tall Figma\n // reference, so the corners stay continuous at both thicknesses\n // (automation-components.md § Tank rendering).\n let cornerStartFill: string;\n let cornerStartStroke: string;\n let midFill: string;\n let midStroke: string;\n let cornerEndFill: string;\n let cornerEndStroke: string;\n let cornerW: number;\n let capH: number;\n let midW: number;\n\n if (this.isCompact) {\n cornerW = 7;\n capH = 10;\n midW = 149;\n cornerStartFill =\n 'M 6.374 4.8214 C 6.138 4.8429, 6.005 4.8543, 5.83 4.8771 C 2.937 5.2557, 0.669 7.0957, 0.51 9.1936 C 0.5 9.3214, 0.5 9.4357, 0.5 9.6429 L 0.5 10 L 6.374 10 Z';\n cornerStartStroke =\n 'M 6.374 4.8214 C 6.138 4.8429, 6.005 4.8543, 5.83 4.8771 C 2.937 5.2557, 0.669 7.0957, 0.51 9.1936 C 0.5 9.3214, 0.5 9.4357, 0.5 9.6429 L 0.5 10';\n midFill =\n 'M 0 4.8214 C 10.97 3.8214, 37.83 1.7857, 74.626 1.7857 C 111.42 1.7857, 138.28 3.8214, 149.252 4.8214 L 149.252 10 L 0 10 Z';\n midStroke =\n 'M 0 4.8214 C 10.97 3.8214, 37.83 1.7857, 74.626 1.7857 C 111.42 1.7857, 138.28 3.8214, 149.252 4.8214';\n cornerEndFill =\n 'M 0 4.8214 C 0.236 4.8429, 0.369 4.8543, 0.544 4.8771 C 3.437 5.2557, 5.705 7.0957, 5.864 9.1936 C 5.874 9.3214, 5.874 9.4357, 5.874 9.6429 L 5.874 10 L 0 10 Z';\n cornerEndStroke =\n 'M 0 4.8214 C 0.236 4.8429, 0.369 4.8543, 0.544 4.8771 C 3.437 5.2557, 5.705 7.0957, 5.864 9.1936 C 5.874 9.3214, 5.874 9.4357, 5.874 9.6429 L 5.874 10';\n } else {\n cornerW = 12;\n capH = 14;\n midW = 224;\n cornerStartFill =\n 'M 12 6.5837 C 6.346 6.7737, 5.176 6.8744, 4.168 7.2537 C 2.6445 7.8272, 1.418 8.8983, 0.8613 10.1415 C 0.493 10.9641, 0.5 11.9099, 0.5 13.6111 L 0.5 14 L 12 14 Z';\n // Curve and outer edge only: the seam with `.middle` is a 1px CSS\n // `border-top` so it pixel-snaps like the pressurized cap's border,\n // where an SVG stroke renders thinner and blurrier.\n cornerStartStroke =\n 'M 12 6.5837 C 6.346 6.7737, 5.176 6.8744, 4.168 7.2537 C 2.6445 7.8272, 1.418 8.8983, 0.8613 10.1415 C 0.493 10.9641, 0.5 11.9099, 0.5 13.6111 L 0.5 14';\n midFill =\n 'M 0 6.5837 C 16 5.1124, 56 1.9444, 112 1.9444 C 168 1.9444, 208 5.1124, 224 6.5837 L 224 14 L 0 14 Z';\n midStroke =\n 'M 0 6.5837 C 16 5.1124, 56 1.9444, 112 1.9444 C 168 1.9444, 208 5.1124, 224 6.5837';\n cornerEndFill =\n 'M 0 6.5837 C 5.654 6.7737, 6.824 6.8744, 7.832 7.2537 C 9.3555 7.8272, 10.582 8.8983, 11.1387 10.1415 C 11.507 10.9641, 11.5 11.9099, 11.5 13.6111 L 11.5 14 L 0 14 Z';\n cornerEndStroke =\n 'M 0 6.5837 C 5.654 6.7737, 6.824 6.8744, 7.832 7.2537 C 9.3555 7.8272, 10.582 8.8983, 11.1387 10.1415 C 11.507 10.9641, 11.5 11.9099, 11.5 13.6111 L 11.5 14';\n }\n\n if (isHorizontal) {\n // Rotate vertical paths -90deg into a `capH`-wide column. Source coord\n // (x, y) maps to (y, cornerW - x) for corners and (y, midW - x) for mid.\n return html`\n <div class=\"cap cap-atmospheric cap-${side}\">\n <svg\n class=\"cap-corner cap-corner-start\"\n viewBox=\"0 0 ${capH} ${cornerW}\"\n preserveAspectRatio=\"xMidYMax meet\"\n aria-hidden=\"true\"\n >\n ${svg`\n <g transform=\"translate(0 ${cornerW}) rotate(-90)\">\n <path class=\"cap-fill\" d=\"${cornerStartFill}\" />\n <path class=\"cap-stroke\" fill=\"none\" d=\"${cornerStartStroke}\" />\n </g>\n `}\n </svg>\n <svg\n class=\"cap-mid\"\n viewBox=\"0 0 ${capH} ${midW}\"\n preserveAspectRatio=\"none\"\n aria-hidden=\"true\"\n >\n ${svg`\n <g transform=\"translate(0 ${midW}) rotate(-90)\">\n <path class=\"cap-fill\" d=\"${midFill}\" />\n <path class=\"cap-stroke\" fill=\"none\" vector-effect=\"non-scaling-stroke\" d=\"${midStroke}\" />\n </g>\n `}\n </svg>\n <svg\n class=\"cap-corner cap-corner-end\"\n viewBox=\"0 0 ${capH} ${cornerW}\"\n preserveAspectRatio=\"xMidYMin meet\"\n aria-hidden=\"true\"\n >\n ${svg`\n <g transform=\"translate(0 ${cornerW}) rotate(-90)\">\n <path class=\"cap-fill\" d=\"${cornerEndFill}\" />\n <path class=\"cap-stroke\" fill=\"none\" d=\"${cornerEndStroke}\" />\n </g>\n `}\n </svg>\n </div>\n `;\n }\n\n return html`\n <div class=\"cap cap-atmospheric cap-${side}\">\n <svg\n class=\"cap-corner cap-corner-start\"\n viewBox=\"0 0 ${cornerW} ${capH}\"\n preserveAspectRatio=\"xMaxYMid meet\"\n aria-hidden=\"true\"\n >\n ${svg`\n <path class=\"cap-fill\" d=\"${cornerStartFill}\" />\n <path class=\"cap-stroke\" fill=\"none\" d=\"${cornerStartStroke}\" />\n `}\n </svg>\n <svg\n class=\"cap-mid\"\n viewBox=\"0 0 ${midW} ${capH}\"\n preserveAspectRatio=\"none\"\n aria-hidden=\"true\"\n >\n ${svg`\n <path class=\"cap-fill\" d=\"${midFill}\" />\n <path class=\"cap-stroke\" fill=\"none\" vector-effect=\"non-scaling-stroke\" d=\"${midStroke}\" />\n `}\n </svg>\n <svg\n class=\"cap-corner cap-corner-end\"\n viewBox=\"0 0 ${cornerW} ${capH}\"\n preserveAspectRatio=\"xMinYMid meet\"\n aria-hidden=\"true\"\n >\n ${svg`\n <path class=\"cap-fill\" d=\"${cornerEndFill}\" />\n <path class=\"cap-stroke\" fill=\"none\" d=\"${cornerEndStroke}\" />\n `}\n </svg>\n </div>\n `;\n }\n\n private renderCap(side: 'start' | 'end'): HTMLTemplateResult | null {\n if (this.type === TankType.generic) return null;\n if (this.type === TankType.battery && side === 'end') return null;\n if (this.type === TankType.atmospheric) {\n return this.renderAtmosphericCap(side);\n }\n if (this.type === TankType.pressurized) {\n return html`<div class=\"cap cap-pressurized cap-${side}\"></div>`;\n }\n // battery, start only\n return html`<div class=\"cap cap-battery cap-${side}\"></div>`;\n }\n\n override willUpdate(changed: PropertyValues) {\n super.willUpdate(changed);\n syncAdviceAlias(this, this.advice);\n }\n\n override render() {\n const safeMax = this.max > 0 ? this.max : 1;\n const percent = clamp((this.value / safeMax) * 100, 0, 100);\n const isCompact = this.isCompact;\n\n // Compact and static collapse their empty cells so the tank frame absorbs\n // the space; non-compact cells sit in the inner `.grid` and always reserve\n // their min-content rows (automation-components.md § Tank rendering).\n const controlBadge = this._badgeControlType();\n const alertBadge = this._badgeAlertType();\n const interlockBadge = this._badgeInterlockType();\n const commandLockedBadge = this._badgeCommandLockedType();\n const hasEnumBadges =\n controlBadge !== null ||\n alertBadge !== null ||\n interlockBadge !== null ||\n commandLockedBadge !== null;\n\n const badgesHidden = isCompact && !this._hasBadges && !hasEnumBadges;\n const tagHidden = isCompact && !this._hasTagSlot && !this.tag;\n\n const badgesCell = html`\n <div class=\"badges\" ?hidden=${badgesHidden}>\n <slot name=\"badges\" @slotchange=${this._onBadgesSlotChange}>\n ${\n controlBadge\n ? html`<obc-automation-badge\n .type=${controlBadge}\n ></obc-automation-badge>`\n : nothing\n }\n ${\n alertBadge\n ? html`<obc-automation-badge\n .type=${alertBadge}\n ></obc-automation-badge>`\n : nothing\n }\n ${\n interlockBadge\n ? html`<obc-automation-badge\n .type=${interlockBadge}\n ></obc-automation-badge>`\n : nothing\n }\n ${\n commandLockedBadge\n ? html`<obc-automation-badge\n .type=${commandLockedBadge}\n ></obc-automation-badge>`\n : nothing\n }\n </slot>\n </div>\n `;\n const tagCell = html`\n <div class=\"tag\" ?hidden=${tagHidden}>\n <slot name=\"tag\" @slotchange=${this._onTagSlotChange}>${this.tag}</slot>\n </div>\n `;\n // Static shows capacity rather than a percent: the state is unknown, so a\n // reading would be a claim the tank cannot make, and the trend icon goes\n // for the same reason (automation-components.md § Tank rendering).\n const readoutCell = this.static\n ? html`\n <div class=\"readout readout-compact readout-static\">\n <slot name=\"readout\">\n <slot name=\"max-value\">${this.max.toFixed(0)}</slot>\n <slot name=\"unit\">m<sup>3</sup></slot>\n </slot>\n </div>\n `\n : isCompact\n ? html`\n <div class=\"readout readout-compact\">\n <slot name=\"readout\">\n ${this.showTrendSymbol ? this.trendIcon() : null}\n <span class=\"percent\"\n >${percent.toFixed(0)}<span class=\"percent-symbol\"\n >%</span\n ></span\n >\n </slot>\n </div>\n `\n : html`\n <div class=\"readout\">\n <slot name=\"readout\">\n <div class=\"header\">\n ${this.showTrendSymbol ? this.trendIcon() : null}\n <div class=\"percent\">\n ${percent.toFixed(this.percentFractionDigits)}<span\n class=\"percent-symbol\"\n >%</span\n >\n </div>\n </div>\n <div class=\"value\">\n <div class=\"current\">\n <slot name=\"current-value\" class=\"current-value\"\n >${this.value.toFixed(0)}</slot\n ><span class=\"divider\">/</span>\n </div>\n <div class=\"max\">\n <slot class=\"max-value\" name=\"max-value\"\n >${this.max.toFixed(0)}</slot\n >\n <slot class=\"unit\" name=\"unit\">m<sup>3</sup></slot>\n </div>\n </div>\n <div class=\"rich-divider\" ?hidden=${!this._hasRichSlot}></div>\n <slot name=\"rich\" @slotchange=${this._onRichSlotChange}></slot>\n </slot>\n </div>\n `;\n // Two stacked icons form the silhouette `obc-automation-button` uses: the\n // back layer paints the inherited SVG `stroke` halo, the front layer the\n // fill through `color` (automation-components.md § Tank rendering).\n const graphIconClasses = classMap({\n 'graph-icon': true,\n 'priority-enhanced': this.priority === Priority.enhanced,\n });\n const graphIconOverlay =\n this.type === TankType.battery\n ? html`\n <div class=${graphIconClasses} aria-hidden=\"true\">\n <obi-energy-battery\n class=\"graph-icon-stroke\"\n ></obi-energy-battery>\n <obi-energy-battery class=\"graph-icon-fill\"></obi-energy-battery>\n </div>\n `\n : html`\n <div class=${graphIconClasses} aria-hidden=\"true\">\n <obi-tank class=\"graph-icon-stroke\"></obi-tank>\n <obi-tank class=\"graph-icon-fill\"></obi-tank>\n </div>\n `;\n // Alert-frame overlay. Mirrors the `obc-automation-button` pattern\n // exactly so consumer API is identical. Placed inside `.halo` so the\n // ring hugs only the bordered tank area; `belowHalo` (tag / readout) is\n // unaffected. `.halo` is `position: relative` (see CSS) to anchor the\n // absolutely-positioned alert-frame.\n const alertFrameOverlay = this.alert\n ? html`<obc-alert-frame\n class=\"alert-frame\"\n .type=${this.alertFrameType}\n .thickness=${this.alertFrameThickness}\n .status=${this.alertFrameStatus}\n .mode=${this.alertFrameMode}\n .showAlertCategoryIcon=${this.showAlertCategoryIcon}\n .showIcon=${this.showAlertIcon}\n >\n <span slot=\"icon\"><slot name=\"alert-icon\"></slot></span>\n <span slot=\"label\"><slot name=\"alert-label\"></slot></span>\n <span slot=\"timer\"><slot name=\"alert-timer\"></slot></span>\n </obc-alert-frame>`\n : null;\n let chartCell: HTMLTemplateResult;\n if (this._usesGaugeTrend) {\n // gauge-trend reads these as an aspect-ratio reference and derives its\n // own height from its wrapper. Rendering waits for both measurements —\n // a zero divides in that maths on first paint.\n const hasSize = this._cellWidth > 0 && this._cellHeight > 0;\n chartCell = html`\n <div class=\"bar-container chart-cell\">\n ${\n hasSize\n ? html`<obc-gauge-trend\n .data=${this.chartData}\n .minValue=${0}\n .maxValue=${safeMax}\n .value=${this.value}\n .hasBar=${this.chartMode === TankChartMode.graphAndBar}\n .hasScale=${false}\n .hasLabelPadding=${false}\n .chartFill=${true}\n .hasAdvice=${this.hasAdvice}\n .advices=${this.advices}\n .adviceTrigger=${this.adviceTrigger}\n .adviceEmphasis=${this.adviceEmphasis}\n .width=${this._cellWidth}\n .height=${this._cellHeight}\n .setpoint=${this.setpoint}\n .newSetpoint=${this.newSetpoint}\n .touching=${this.touching}\n .atSetpoint=${this.atSetpoint}\n .autoAtSetpoint=${this.autoAtSetpoint}\n .autoAtSetpointDeadband=${this.autoAtSetpointDeadband}\n .setpointAtZeroDeadband=${this.setpointAtZeroDeadband}\n .setpointOverride=${this.setpointOverride}\n .animateSetpoint=${this.animateSetpoint}\n style=\"width: 100%; height: 100%;\"\n .priority=${this.priority}\n ></obc-gauge-trend>`\n : null\n }\n ${this.hasGraphIcon ? graphIconOverlay : null}\n </div>\n `;\n } else {\n // The shared SVG bar, the renderer gauge-trend uses for its side bar, so\n // advice overlays behave the same in all three chart modes; its fill\n // follows the instrument palette, not the tank's `medium` colour.\n // TODO(#1284): carry the medium colour through, and fold this branch\n // into gauge-trend once it offers a bar-only layout at this size.\n const hasSize = this._cellWidth > 0 && this._cellHeight > 0;\n // The inner bar is always portrait and mirrors gauge-trend's\n // `fixedAspectRatio` sizing, so fixed-pixel SVG primitives keep one\n // on-screen size; `barThickness` and the cross-axis size are therefore\n // in viewBox units (automation-components.md § Tank rendering).\n const SCALE_REFERENCE_SIZE = 384;\n // The bar's viewBox cross-axis includes an outside-bar band for advice\n // pills, icons and/or the setpoint marker (see computeExternalScaleLayout).\n // Subtract the same band the bar will reserve so total viewBox width\n // still equals viewBoxCross and the meet-scale fills the cell exactly.\n const hasSetpointMarker =\n this.setpoint !== undefined ||\n this.newSetpoint !== undefined ||\n this.departingNewSetpoint !== undefined;\n const outsideBarReserveVb = computeOutsideBarThickness({\n hasBar: true,\n hasScale: false,\n labels: false,\n labelThickness: 0,\n tickThickness: 0,\n scaleType: ScaleType.regular,\n hasAdvice: this.hasAdvice,\n hasAdviceIcon:\n this.hasAdvice && !!this.advices?.some((a) => a.showIcon),\n advicePosition: AdvicePosition.inner,\n hasSetpoint: hasSetpointMarker,\n });\n const safeCellHeight = Math.max(1, this._cellHeight);\n const viewBoxCross =\n (this._cellWidth * SCALE_REFERENCE_SIZE) / safeCellHeight;\n const barThickness = Math.max(0, viewBoxCross - outsideBarReserveVb);\n // `tint` is locked in for tank bar mode: it draws a fill from 0 to\n // value plus a small marker at the value position, which mirrors the\n // legacy CSS bar's \"fill + top border at value\" visual idiom.\n const barWrapper = html`<obc-bar-vertical\n .minValue=${0}\n .maxValue=${safeMax}\n .value=${this.value}\n .height=${this._cellHeight}\n .fixedAspectRatio=${true}\n .scaleReferenceSize=${SCALE_REFERENCE_SIZE}\n .paddingTop=${0}\n .paddingBottom=${0}\n .side=${ExternalScaleSide.right}\n .hasBar=${true}\n .hasScale=${false}\n .showLabels=${false}\n .barThickness=${barThickness}\n .fillMode=${FillMode.tint}\n .instrumentMode=${true}\n .borderRadius=${2}\n .advices=${this.hasAdvice ? this.advices : []}\n .adviceTrigger=${this.adviceTrigger}\n .adviceEmphasis=${this.adviceEmphasis}\n .advicePosition=${AdvicePosition.inner}\n .setpoint=${this.setpoint}\n .newSetpoint=${this.newSetpoint}\n .touching=${this.touching}\n .atSetpoint=${this.atSetpoint}\n .autoAtSetpoint=${this.autoAtSetpoint}\n .autoAtSetpointDeadband=${this.autoAtSetpointDeadband}\n .setpointAtZeroDeadband=${this.setpointAtZeroDeadband}\n .setpointOverride=${this.setpointOverride}\n .animateSetpoint=${this.animateSetpoint}\n style=\"width: 100%; height: 100%;\"\n .priority=${this.priority}\n ></obc-bar-vertical>`;\n chartCell = html`\n <div class=\"bar-container bar-cell\">\n ${hasSize ? barWrapper : null}\n ${this.hasGraphIcon ? graphIconOverlay : null}\n </div>\n `;\n }\n\n const frameClasses = classMap({\n 'tank-frame': true,\n [`type-${this.type}`]: true,\n [`orientation-${this.orientation}`]: true,\n [this.medium]: true,\n compact: isCompact,\n static: this.static,\n });\n\n let middleContents: HTMLTemplateResult;\n if (this.static) {\n middleContents = html`<div class=\"static-readout\">${readoutCell}</div>`;\n } else if (this.compact) {\n middleContents = chartCell;\n } else {\n middleContents = html`<div class=\"grid\">\n ${tagCell}${badgesCell}${readoutCell}${chartCell}\n </div>`;\n }\n\n const tankFrame = html`\n <div class=${frameClasses}>\n ${this.renderCap('start')}\n <div class=\"middle\">${middleContents}</div>\n ${this.renderCap('end')}\n </div>\n `;\n\n // One interactive element: the flat mixin paints `.halo` through\n // `visibleWrapperClass` so the surround hugs the bordered area only, and\n // the alert-frame overlay is its last child so the ring covers every cell\n // (automation-components.md § Tank rendering).\n let haloContents: HTMLTemplateResult;\n if (this.static) {\n haloContents = html`${badgesCell}${tankFrame}${tagCell}`;\n } else if (this.compact) {\n haloContents = html`${badgesCell}${tankFrame}${readoutCell}${tagCell}`;\n } else {\n haloContents = tankFrame;\n }\n const halo = html`\n <div class=\"halo\">${haloContents}${alertFrameOverlay}</div>\n `;\n\n // Both classes sit on `.root` so the mixin paints `.halo`: `activated`\n // like its hover and pressed states, `clickable` choosing between the\n // six-state variant and the resting-only `noClick` one\n // (automation-components.md § Tank rendering).\n const isClickable = this.clickable && !this.static;\n const rootClasses = classMap({\n root: true,\n activated: this.activated,\n clickable: isClickable,\n });\n\n // The live region stays on all three root shapes, so an `alert` label is\n // announced whatever the interactivity (automation-components.md § Tank\n // rendering).\n // TODO(a11y): the rest of the automation family lacks the live region;\n // consolidate when alert support moves into a shared mixin.\n if (this.static) {\n return html`<div\n class=${rootClasses}\n role=\"img\"\n aria-label=${this.tag || 'Tank'}\n aria-live=\"polite\"\n aria-atomic=\"true\"\n >\n ${halo}\n </div>`;\n }\n if (!isClickable) {\n return html`<div\n class=${rootClasses}\n aria-live=\"polite\"\n aria-atomic=\"true\"\n >\n ${halo}\n </div>`;\n }\n return html`<button\n class=${rootClasses}\n type=\"button\"\n aria-label=${this.tag || 'Tank'}\n aria-live=\"polite\"\n aria-atomic=\"true\"\n >\n ${halo}\n </button>`;\n }\n\n static override styles = unsafeCSS(compentStyle);\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'obc-automation-tank': ObcAutomationTank;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuDA,IAAY,YAAL,yBAAA,WAAA;CACL,UAAA,gBAAA;CACA,UAAA,YAAA;CACA,UAAA,YAAA;CACA,UAAA,aAAA;CACA,UAAA,iBAAA;CACA,UAAA,YAAA;;AACF,EAAA,CAAA,CAAA;AAEA,IAAY,WAAL,yBAAA,UAAA;CACL,SAAA,aAAA;CACA,SAAA,iBAAA;CACA,SAAA,iBAAA;CACA,SAAA,aAAA;;AACF,EAAA,CAAA,CAAA;AAEA,IAAY,kBAAL,yBAAA,iBAAA;CACL,gBAAA,cAAA;CACA,gBAAA,gBAAA;;AACF,EAAA,CAAA,CAAA;AAIA,IAAY,gBAAL,yBAAA,eAAA;;CAEL,cAAA,SAAA;;CAEA,cAAA,WAAA;;CAEA,cAAA,iBAAA;;AACF,EAAA,CAAA,CAAA;AAyGO,IAAM,oBAAN,MAAM,0BAA0B,YAAY,cAAc,UAAU,CAAC,CAAC,CAAC;;;EAC7B,KAAA,SAAA,WAAW;EAChB,KAAA,QAAA;EACF,KAAA,MAAA;;;;EAKqB,KAAA,UAAA;EAE3D,KAAA,cAAA,gBAAgB;EAC0C,KAAA,SAAA;EACM,KAAA,YAAA;EAClB,KAAA,YAAA;EACR,KAAA,MAAA;;EAMP,KAAA,YAAA,CAAC;EAEa,KAAA,WAAA,SAAS;EAKjB,KAAA,YAAA;EAEqB,KAAA,eAAA;EAE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,CAAA,GAAA,kBAAA,WAAA,gBAAA,KAAA,CAAA;AA3ER,oBAAAA,WAAA,CAAA,cAAc,qBAAqB,CAAA,GAAA,iBAAA"}
|
|
1
|
+
{"version":3,"file":"automation-tank.js","names":["compentStyle","_decorate"],"sources":["../../../src/automation/automation-tank/automation-tank.ts"],"sourcesContent":["import {\n HTMLTemplateResult,\n LitElement,\n html,\n nothing,\n svg,\n unsafeCSS,\n PropertyValues,\n} from 'lit';\nimport {property, state} from 'lit/decorators.js';\nimport compentStyle from './automation-tank.css?inline';\nimport {LineMedium} from '../index.js';\nimport '../automation-badge/automation-badge.js';\nimport {ObcAutomationBadgeType} from '../automation-badge/automation-badge.js';\nimport {\n AutomationButtonBadgeAlert,\n AutomationButtonBadgeCommandLocked,\n AutomationButtonBadgeControl,\n AutomationButtonBadgeInterlock,\n} from '../automation-button/abstract-automation-button.js';\n\nimport '../../icons/icon-chevron-double-up-google.js';\nimport '../../icons/icon-chevron-up-google.js';\nimport '../../icons/icon-chevron-double-down-google.js';\nimport '../../icons/icon-chevron-down-google.js';\nimport '../../icons/icon-arrow-right-google.js';\nimport '../../icons/icon-off.js';\nimport '../../icons/icon-tank.js';\nimport '../../icons/icon-energy-battery.js';\nimport '../../navigation-instruments/gauge-trend/gauge-trend.js';\nimport '../../building-blocks/bar-vertical/bar-vertical.js';\nimport '../../components/alert-frame/alert-frame.js';\nimport {Priority} from '../../navigation-instruments/types.js';\nimport {\n ObcAlertFrameMode,\n ObcAlertFrameThickness,\n ObcAlertFrameType,\n} from '../../components/alert-frame/alert-frame.js';\nimport {AlertType} from '../../types.js';\nimport type {ChartLineDataItem} from '../../building-blocks/chart-line/chart-line-base.js';\nimport {AdviceMixin, syncAdviceAlias} from '../../svghelpers/advice-mixin.js';\nimport type {AdviceInput} from '../../svghelpers/advice.js';\nimport {\n AdvicePosition,\n ExternalScaleSide,\n FillMode,\n ScaleType,\n computeOutsideBarThickness,\n} from '../../building-blocks/external-scale/external-scale.js';\nimport {classMap} from 'lit/directives/class-map.js';\nimport {customElement} from '../../decorator.js';\nimport {SetpointMixin} from '../../svghelpers/setpoint-mixin.js';\nimport {TankPositioning} from './tank-positioning.js';\nimport {clamp} from '../../svghelpers/math.js';\n\nexport enum TankTrend {\n fastRising = 'fast-rising',\n rising = 'rising',\n stable = 'stable',\n falling = 'falling',\n fastFalling = 'fast-falling',\n closed = 'closed',\n}\n\nexport enum TankType {\n generic = 'generic',\n atmospheric = 'atmospheric',\n pressurized = 'pressurized',\n battery = 'battery',\n}\n\nexport enum TankOrientation {\n vertical = 'vertical',\n horizontal = 'horizontal',\n}\n\nexport {TankPositioning};\n\nexport enum TankChartMode {\n /** Static fill bar driven by `value` / `max` (default, backward compatible). */\n bar = 'bar',\n /** Embedded `obc-gauge-trend` line/area chart, no side bar. */\n graph = 'graph',\n /** Embedded `obc-gauge-trend` line/area chart with a side bar. */\n graphAndBar = 'graph-and-bar',\n}\n\n/**\n *\n *\n * Setpoint properties are inherited from {@link SetpointMixin}\n * (`setpoint`, `newSetpoint`, `touching`, `atSetpoint`, `autoAtSetpoint`,\n * `autoAtSetpointDeadband`, `setpointAtZeroDeadband`, `setpointOverride`,\n * `animateSetpoint`) and are forwarded to the embedded chart: the SVG bar in\n * `bar` mode, or `obc-gauge-trend` in the graph modes (where the marker\n * renders on the side bar, i.e. `graph-and-bar`). Values share the tank's\n * `value` / `max` scale.\n *\n * @property positioning - Host positioning model — see `TankPositioning` for details. Defaults to\n * `button` (host fills parent container, 100% × 100%, falling back to the\n * design aspect ratio on any axis the parent leaves indefinite, no anchor\n * offset). Set to `point` for the legacy P&ID canvas mode (fixed default\n * dimensions + top-center anchor offset).\n * @property activated - Enables the activated background color, used to indicate that the tank is\n * activated/selected. Requires an interactive tank — the `noClick` mixin\n * variant used when `clickable` is `false` only paints the enabled state, so\n * a non-clickable tank ignores this (matching `obc-elevated-card`).\n * @availableWhen activated clickable==true\n * @property chartData - Time-series data points for the embedded gauge-trend (graph modes only).\n * @property priority - Priority hint forwarded to child charts (regular | enhanced).\n * @property advice - Advice overlays. Forwarded to the embedded `obc-gauge-trend` in\n * `graph` / `graph-and-bar` modes, or rendered as pills over the static\n * bar in `bar` mode.\n * @property hasAdvice - Show advice overlays (works in all `chartMode` variants).\n * @property alert - Show an `<obc-alert-frame>` overlay around the bordered tank area (the\n * `.halo` wrapper). Mirrors the API of `obc-automation-button`: same seven\n * properties, same three slots (`alert-icon`, `alert-label`, `alert-timer`).\n * The ring overlays `.halo` only, so the tag and readout that sit outside\n * the halo in compact / static layouts remain unaffected.\n * @property alertFrameType - Shape of the alert frame.\n * @availableWhen alertFrameType alert==true\n * @property alertFrameThickness - Thickness of the alert frame.\n * @availableWhen alertFrameThickness alert==true\n * @property alertFrameStatus - Alert status the frame is coloured for.\n * @availableWhen alertFrameStatus alert==true\n * @property alertFrameMode - Acknowledgement state of the alert: `acked-active` (default) is steady,\n * `unacked-active` flashes, `unacked-rectified` flashes a dashed frame.\n * @availableWhen alertFrameMode alert==true\n * @property showAlertCategoryIcon - Shows the alert category icon inside the frame.\n * @availableWhen showAlertCategoryIcon alert==true && alertFrameType in [SmallSideFlip, LargeSideFlip, BottomFlip, TopFlip]\n * @property showAlertIcon - Shows the slotted alert icon inside the frame.\n * @availableWhen showAlertIcon alert==true && alertFrameType in [LargeSideFlip, BottomFlip, TopFlip]\n * @property showTrendSymbol - Show the trend chevron / off icon next to the percent readout. Default\n * `true` preserves existing behavior. Set to `false` to hide the trend\n * indicator in both compact and non-compact readouts — useful when the\n * trend is not meaningful for a given tank, or when the consumer wants\n * to keep the readout compact. Has no effect in `static` mode, which\n * renders the tank's capacity (`max` + `unit`) instead of a percent and\n * intentionally omits the trend indicator (a static tank represents\n * \"device present, current state unknown\"). `attribute: false` per the\n * repo's positive-default-true boolean convention.\n * @property percentFractionDigits - Number of fraction digits used to format the percent readout in the\n * non-compact (regular) layout. Defaults to `0` (integer percent). The\n * compact layout always renders integer percent to keep its fixed-width\n * footprint stable. The static layout renders capacity (`max` + `unit`)\n * rather than percent, so this property has no effect there — pass a\n * pre-formatted value through the `max-value` slot if fractional\n * precision is needed (see the `WithFractionDigits` story).\n * @property static - Display-only variant for a device whose current state is unknown: the\n * chart cell is hidden, the bordered area is filled with\n * `--container-section-color` and the readout is centred inside it. Always\n * compact-sized, so it overrides `compact`, and it renders as a\n * `<div role=\"img\">` — outside the tab order and not announced as a control.\n * @property clickable - Whether the tank is interactive. `true` renders the root as a `<button>`\n * with the flat-mixin interaction surface; `false` renders a `<div>` that\n * keeps the resting appearance (the mixin's `noClick` variant) but loses\n * hover, pressed and focus-visible and leaves the tab order. Everything\n * else — chart, badges, readout, tag and the alert frame — still renders,\n * so use it for a display-only tank that shows live data. No effect on a\n * `static` tank, which is already non-interactive.\n * @property chartMode - Chart cell rendering mode: `bar` (default) is a static fill bar driven by\n * `value` and `max`, `graph` embeds an `obc-gauge-trend` line/area chart,\n * and `graphAndBar` embeds one with an integrated side bar.\n * @property hasGraphIcon - Overlays a decorative icon centred on the chart cell — the energy-battery\n * icon for a battery tank, the generic tank icon otherwise. Works in every\n * `chartMode` and both orientations; the icon sits in a fixed CSS layer\n * above the bar or graph and is silhouetted so it stays legible on any\n * fill, and its size follows the ambient `obc-component-size-*` class.\n * @property badgeControl - Control badge rendered in the `badges` cell. A non-`None` value renders an\n * `<obc-automation-badge>` as fallback content for the `badges` slot, so any\n * slotted content wins. The cell orders the four badges control, alert,\n * interlock, commandLocked, left to right.\n * @slot badges - Custom badges to be displayed in the badge area.\n * @slot tag - Text or element for the tank's tag/label.\n * @slot readout - Replaces the entire readout content block.\n * @slot max-value - Content for the capacity value.\n * @slot unit - Content for the unit of measurement.\n * @slot current-value - Content for the current level value.\n * @slot rich - Detail rows below the main readout, shown in the regular\n * (non-compact, non-static) layout. Slot an `<obc-readout-list>` of\n * `<obc-readout-list-item>` rows — it owns the row typography and cross-row\n * column alignment; the tank renders a divider above it automatically when\n * the slot is filled.\n * @slot alert-icon - Custom icon for the alert frame.\n * @slot alert-label - Label for the alert frame.\n * @slot alert-timer - Timer for the alert frame.\n * @fires click - Fired when the tank is clicked. When `clickable` is `false` the tank renders a plain `<div>`, and in `static` mode a `<div role=\"img\">`, instead of a `<button>` — in both cases it is not focusable or keyboard-activatable; pointer clicks still reach the host.\n * @beta\n */\n@customElement('obc-automation-tank')\nexport class ObcAutomationTank extends AdviceMixin(SetpointMixin(LitElement)) {\n @property({type: String}) medium: LineMedium = LineMedium.water;\n @property({type: Number}) value: number = 0;\n @property({type: Number}) max: number = 100;\n @property({type: String}) trend: TankTrend = TankTrend.stable;\n @property({type: String, reflect: true}) type: TankType = TankType.generic;\n @property({type: String, reflect: true}) orientation: TankOrientation =\n TankOrientation.vertical;\n @property({type: Boolean, reflect: true}) compact: boolean = false;\n @property({type: String, reflect: true}) positioning: TankPositioning =\n TankPositioning.button;\n @property({type: Boolean, reflect: true}) static: boolean = false;\n @property({type: Boolean, attribute: false}) clickable: boolean = true;\n @property({type: Boolean}) activated: boolean = false;\n @property({type: String}) tag: string = '';\n\n @property({type: String, reflect: true, attribute: 'chart-mode'})\n chartMode: TankChartMode = TankChartMode.bar;\n\n @property({type: Array, attribute: false})\n chartData: ChartLineDataItem[] = [];\n\n @property({type: String}) priority: Priority = Priority.regular;\n\n /** @deprecated Alias of `advices`. Ranges in tank units. */\n @property({type: Array, attribute: false}) advice?: AdviceInput[];\n\n @property({type: Boolean}) hasAdvice = false;\n\n @property({type: Boolean, attribute: false}) hasGraphIcon = false;\n\n @property({type: Boolean}) alert: boolean = false;\n @property({type: String}) alertFrameType: ObcAlertFrameType =\n ObcAlertFrameType.SmallSideFlip;\n @property({type: String}) alertFrameThickness: ObcAlertFrameThickness =\n ObcAlertFrameThickness.Small;\n @property({type: String}) alertFrameStatus: AlertType = AlertType.Alarm;\n @property({type: String}) alertFrameMode: ObcAlertFrameMode =\n ObcAlertFrameMode.ackedActive;\n @property({type: Boolean, attribute: false}) showAlertCategoryIcon: boolean =\n true;\n @property({type: Boolean}) showAlertIcon: boolean = false;\n\n @property({type: Boolean, attribute: false}) showTrendSymbol: boolean = true;\n\n @property({type: Number}) percentFractionDigits: number = 0;\n\n @property({type: String}) badgeControl: AutomationButtonBadgeControl =\n AutomationButtonBadgeControl.None;\n @property({type: String}) badgeAlert: AutomationButtonBadgeAlert =\n AutomationButtonBadgeAlert.None;\n @property({type: String}) badgeInterlock: AutomationButtonBadgeInterlock =\n AutomationButtonBadgeInterlock.None;\n @property({type: String})\n badgeCommandLocked: AutomationButtonBadgeCommandLocked =\n AutomationButtonBadgeCommandLocked.None;\n\n @state() private _cellWidth = 0;\n @state() private _cellHeight = 0;\n /**\n * Tracks whether the `badges` and `tag` slots have assigned content. Used\n * in compact/static mode to collapse empty cells to 0px so the tank-frame\n * can absorb the freed space (per spec: \"if there are no badges it would\n * grow upward; if there are no readout or tags it would grow downward\").\n * Non-compact (regular) layout keeps its grid-based reserved rows.\n */\n @state() private _hasBadges = false;\n @state() private _hasTagSlot = false;\n /**\n * Tracks whether the `rich` slot has assigned content, so the regular\n * (non-compact) layout only draws the rich divider when a consumer has\n * slotted detail rows (canonically an `<obc-readout-list>`). Mirrors\n * `_hasBadges` / `_hasTagSlot`.\n */\n @state() private _hasRichSlot = false;\n private _chartResizeObserver?: ResizeObserver;\n private _observedCell?: Element;\n\n private get isCompact(): boolean {\n return this.compact || this.static;\n }\n\n private _badgeAlertType(): ObcAutomationBadgeType | null {\n switch (this.badgeAlert) {\n case AutomationButtonBadgeAlert.Silence:\n return ObcAutomationBadgeType.AlertSilenced;\n case AutomationButtonBadgeAlert.Shelved:\n return ObcAutomationBadgeType.AlertShelved;\n case AutomationButtonBadgeAlert.Caution:\n return ObcAutomationBadgeType.Caution;\n case AutomationButtonBadgeAlert.Warning:\n return ObcAutomationBadgeType.Warning;\n case AutomationButtonBadgeAlert.Alarm:\n return ObcAutomationBadgeType.Alarm;\n case AutomationButtonBadgeAlert.LevelCritical:\n return ObcAutomationBadgeType.LevelCritical;\n case AutomationButtonBadgeAlert.LevelHigh:\n return ObcAutomationBadgeType.LevelHigh;\n case AutomationButtonBadgeAlert.LevelMedium:\n return ObcAutomationBadgeType.LevelMedium;\n case AutomationButtonBadgeAlert.LevelLow:\n return ObcAutomationBadgeType.LevelLow;\n case AutomationButtonBadgeAlert.LevelDiagnostic:\n return ObcAutomationBadgeType.LevelDiagnostic;\n default:\n return null;\n }\n }\n\n private _badgeControlType(): ObcAutomationBadgeType | null {\n switch (this.badgeControl) {\n case AutomationButtonBadgeControl.Local:\n return ObcAutomationBadgeType.Local;\n case AutomationButtonBadgeControl.LocalOnly:\n return ObcAutomationBadgeType.LocalOnly;\n case AutomationButtonBadgeControl.Manual:\n return ObcAutomationBadgeType.Manual;\n case AutomationButtonBadgeControl.ManualOnly:\n return ObcAutomationBadgeType.ManualOnly;\n case AutomationButtonBadgeControl.Auto:\n return ObcAutomationBadgeType.Auto;\n default:\n return null;\n }\n }\n\n private _badgeInterlockType(): ObcAutomationBadgeType | null {\n switch (this.badgeInterlock) {\n case AutomationButtonBadgeInterlock.Interlock:\n return ObcAutomationBadgeType.Interlock;\n case AutomationButtonBadgeInterlock.InterlockInhibit:\n return ObcAutomationBadgeType.InterlockInhibit;\n case AutomationButtonBadgeInterlock.Simulation:\n return ObcAutomationBadgeType.Simulation;\n default:\n return null;\n }\n }\n\n private _badgeCommandLockedType(): ObcAutomationBadgeType | null {\n switch (this.badgeCommandLocked) {\n case AutomationButtonBadgeCommandLocked.CommandLocked:\n return ObcAutomationBadgeType.CommandLocked;\n case AutomationButtonBadgeCommandLocked.Simulation:\n return ObcAutomationBadgeType.Simulation;\n default:\n return null;\n }\n }\n\n private get _usesGaugeTrend(): boolean {\n return (\n this.chartMode === TankChartMode.graph ||\n this.chartMode === TankChartMode.graphAndBar\n );\n }\n\n private _onBadgesSlotChange(e: Event): void {\n const slot = e.target as HTMLSlotElement;\n this._hasBadges = slot\n .assignedNodes({flatten: true})\n .some(\n (n) =>\n n.nodeType === Node.ELEMENT_NODE ||\n (n.nodeType === Node.TEXT_NODE && !!n.textContent?.trim())\n );\n }\n\n private _onTagSlotChange(e: Event): void {\n const slot = e.target as HTMLSlotElement;\n this._hasTagSlot = slot\n .assignedNodes({flatten: true})\n .some(\n (n) =>\n n.nodeType === Node.ELEMENT_NODE ||\n (n.nodeType === Node.TEXT_NODE && !!n.textContent?.trim())\n );\n }\n\n private _onRichSlotChange(e: Event): void {\n const slot = e.target as HTMLSlotElement;\n this._hasRichSlot = slot\n .assignedNodes({flatten: true})\n .some(\n (n) =>\n n.nodeType === Node.ELEMENT_NODE ||\n (n.nodeType === Node.TEXT_NODE && !!n.textContent?.trim())\n );\n }\n\n override disconnectedCallback(): void {\n super.disconnectedCallback();\n this._chartResizeObserver?.disconnect();\n this._chartResizeObserver = undefined;\n this._observedCell = undefined;\n }\n\n protected override updated(\n changed: Map<string | number | symbol, unknown>\n ): void {\n super.updated(changed);\n // The chart cell element is recreated when `chartMode` moves between bar\n // and graph, and appears or disappears with `static` and `compact`, so the\n // observer is re-attached to the current `.bar-container`. `priority`\n // needs no forwarding — children take it through template bindings.\n this._syncChartResizeObserver();\n }\n\n private _syncChartResizeObserver(): void {\n // Observe the bar-container in BOTH bar mode and graph modes — the bar\n // mode now renders an SVG `obc-bar-vertical` / `-horizontal` that needs\n // measured pixel dimensions for its viewBox and barThickness.\n const cell = this.renderRoot.querySelector('.bar-container');\n if (!cell) {\n if (this._chartResizeObserver) {\n this._chartResizeObserver.disconnect();\n this._observedCell = undefined;\n }\n return;\n }\n if (cell === this._observedCell) return;\n\n if (!this._chartResizeObserver) {\n this._chartResizeObserver = new ResizeObserver((entries) => {\n const entry = entries[0];\n if (!entry) return;\n const w = Math.round(entry.contentRect.width);\n const h = Math.round(entry.contentRect.height);\n if (w !== this._cellWidth) this._cellWidth = w;\n if (h !== this._cellHeight) this._cellHeight = h;\n });\n } else {\n this._chartResizeObserver.disconnect();\n }\n this._chartResizeObserver.observe(cell);\n this._observedCell = cell;\n }\n\n trendIcon(): HTMLTemplateResult | typeof nothing {\n if (this.trend === TankTrend.fastRising) {\n return html`<obi-chevron-double-up-google\n class=\"trend-icon\"\n ></obi-chevron-double-up-google>`;\n } else if (this.trend === TankTrend.rising) {\n return html`<obi-chevron-up-google\n class=\"trend-icon\"\n ></obi-chevron-up-google>`;\n } else if (this.trend === TankTrend.fastFalling) {\n return html`<obi-chevron-double-down-google\n class=\"trend-icon\"\n ></obi-chevron-double-down-google>`;\n } else if (this.trend === TankTrend.falling) {\n return html`<obi-chevron-down-google\n class=\"trend-icon\"\n ></obi-chevron-down-google>`;\n } else if (this.trend === TankTrend.closed) {\n return html`<obi-off class=\"trend-icon\"></obi-off>`;\n } else {\n return html`<obi-arrow-right-google\n class=\"trend-icon\"\n ></obi-arrow-right-google>`;\n }\n }\n\n /**\n * Atmospheric cap, 3-piece (corner-start / stretchable middle arc / corner-end).\n * Each piece draws its own fill (closed) and stroke (open) so adjacent pieces\n * abut without a visible vertical seam line. Coordinates are derived from the\n * Figma 248x14 path; corners stay 12px wide while the middle arc stretches.\n * Position (start vs end) and orientation flipping are handled in CSS.\n *\n * Horizontal orientation reuses the same path data but rotates each piece\n * via an inner `<g transform=\"translate(0 H) rotate(-90)\">`, mapping the\n * source coord (x, y) to (y, H - x). The viewBox is swapped accordingly:\n * corner: 12x14 -> 14x12 (H=12)\n * middle: 224x14 -> 14x224 (H=224)\n * Cap-end (right side in horizontal) is mirrored via CSS scaleX(-1).\n */\n private renderAtmosphericCap(side: 'start' | 'end'): HTMLTemplateResult {\n const isHorizontal = this.orientation === TankOrientation.horizontal;\n\n // Curve Y-values are scaled proportionally from the 18/12-tall Figma\n // reference, so the corners stay continuous at both thicknesses\n // (automation-components.md § Tank rendering).\n let cornerStartFill: string;\n let cornerStartStroke: string;\n let midFill: string;\n let midStroke: string;\n let cornerEndFill: string;\n let cornerEndStroke: string;\n let cornerW: number;\n let capH: number;\n let midW: number;\n\n if (this.isCompact) {\n cornerW = 7;\n capH = 10;\n midW = 149;\n cornerStartFill =\n 'M 6.374 4.8214 C 6.138 4.8429, 6.005 4.8543, 5.83 4.8771 C 2.937 5.2557, 0.669 7.0957, 0.51 9.1936 C 0.5 9.3214, 0.5 9.4357, 0.5 9.6429 L 0.5 10 L 6.374 10 Z';\n cornerStartStroke =\n 'M 6.374 4.8214 C 6.138 4.8429, 6.005 4.8543, 5.83 4.8771 C 2.937 5.2557, 0.669 7.0957, 0.51 9.1936 C 0.5 9.3214, 0.5 9.4357, 0.5 9.6429 L 0.5 10';\n midFill =\n 'M 0 4.8214 C 10.97 3.8214, 37.83 1.7857, 74.626 1.7857 C 111.42 1.7857, 138.28 3.8214, 149.252 4.8214 L 149.252 10 L 0 10 Z';\n midStroke =\n 'M 0 4.8214 C 10.97 3.8214, 37.83 1.7857, 74.626 1.7857 C 111.42 1.7857, 138.28 3.8214, 149.252 4.8214';\n cornerEndFill =\n 'M 0 4.8214 C 0.236 4.8429, 0.369 4.8543, 0.544 4.8771 C 3.437 5.2557, 5.705 7.0957, 5.864 9.1936 C 5.874 9.3214, 5.874 9.4357, 5.874 9.6429 L 5.874 10 L 0 10 Z';\n cornerEndStroke =\n 'M 0 4.8214 C 0.236 4.8429, 0.369 4.8543, 0.544 4.8771 C 3.437 5.2557, 5.705 7.0957, 5.864 9.1936 C 5.874 9.3214, 5.874 9.4357, 5.874 9.6429 L 5.874 10';\n } else {\n cornerW = 12;\n capH = 14;\n midW = 224;\n cornerStartFill =\n 'M 12 6.5837 C 6.346 6.7737, 5.176 6.8744, 4.168 7.2537 C 2.6445 7.8272, 1.418 8.8983, 0.8613 10.1415 C 0.493 10.9641, 0.5 11.9099, 0.5 13.6111 L 0.5 14 L 12 14 Z';\n // Curve and outer edge only: the seam with `.middle` is a 1px CSS\n // `border-top` so it pixel-snaps like the pressurized cap's border,\n // where an SVG stroke renders thinner and blurrier.\n cornerStartStroke =\n 'M 12 6.5837 C 6.346 6.7737, 5.176 6.8744, 4.168 7.2537 C 2.6445 7.8272, 1.418 8.8983, 0.8613 10.1415 C 0.493 10.9641, 0.5 11.9099, 0.5 13.6111 L 0.5 14';\n midFill =\n 'M 0 6.5837 C 16 5.1124, 56 1.9444, 112 1.9444 C 168 1.9444, 208 5.1124, 224 6.5837 L 224 14 L 0 14 Z';\n midStroke =\n 'M 0 6.5837 C 16 5.1124, 56 1.9444, 112 1.9444 C 168 1.9444, 208 5.1124, 224 6.5837';\n cornerEndFill =\n 'M 0 6.5837 C 5.654 6.7737, 6.824 6.8744, 7.832 7.2537 C 9.3555 7.8272, 10.582 8.8983, 11.1387 10.1415 C 11.507 10.9641, 11.5 11.9099, 11.5 13.6111 L 11.5 14 L 0 14 Z';\n cornerEndStroke =\n 'M 0 6.5837 C 5.654 6.7737, 6.824 6.8744, 7.832 7.2537 C 9.3555 7.8272, 10.582 8.8983, 11.1387 10.1415 C 11.507 10.9641, 11.5 11.9099, 11.5 13.6111 L 11.5 14';\n }\n\n if (isHorizontal) {\n // Rotate vertical paths -90deg into a `capH`-wide column. Source coord\n // (x, y) maps to (y, cornerW - x) for corners and (y, midW - x) for mid.\n return html`\n <div class=\"cap cap-atmospheric cap-${side}\">\n <svg\n class=\"cap-corner cap-corner-start\"\n viewBox=\"0 0 ${capH} ${cornerW}\"\n preserveAspectRatio=\"xMidYMax meet\"\n aria-hidden=\"true\"\n >\n ${svg`\n <g transform=\"translate(0 ${cornerW}) rotate(-90)\">\n <path class=\"cap-fill\" d=\"${cornerStartFill}\" />\n <path class=\"cap-stroke\" fill=\"none\" d=\"${cornerStartStroke}\" />\n </g>\n `}\n </svg>\n <svg\n class=\"cap-mid\"\n viewBox=\"0 0 ${capH} ${midW}\"\n preserveAspectRatio=\"none\"\n aria-hidden=\"true\"\n >\n ${svg`\n <g transform=\"translate(0 ${midW}) rotate(-90)\">\n <path class=\"cap-fill\" d=\"${midFill}\" />\n <path class=\"cap-stroke\" fill=\"none\" vector-effect=\"non-scaling-stroke\" d=\"${midStroke}\" />\n </g>\n `}\n </svg>\n <svg\n class=\"cap-corner cap-corner-end\"\n viewBox=\"0 0 ${capH} ${cornerW}\"\n preserveAspectRatio=\"xMidYMin meet\"\n aria-hidden=\"true\"\n >\n ${svg`\n <g transform=\"translate(0 ${cornerW}) rotate(-90)\">\n <path class=\"cap-fill\" d=\"${cornerEndFill}\" />\n <path class=\"cap-stroke\" fill=\"none\" d=\"${cornerEndStroke}\" />\n </g>\n `}\n </svg>\n </div>\n `;\n }\n\n return html`\n <div class=\"cap cap-atmospheric cap-${side}\">\n <svg\n class=\"cap-corner cap-corner-start\"\n viewBox=\"0 0 ${cornerW} ${capH}\"\n preserveAspectRatio=\"xMaxYMid meet\"\n aria-hidden=\"true\"\n >\n ${svg`\n <path class=\"cap-fill\" d=\"${cornerStartFill}\" />\n <path class=\"cap-stroke\" fill=\"none\" d=\"${cornerStartStroke}\" />\n `}\n </svg>\n <svg\n class=\"cap-mid\"\n viewBox=\"0 0 ${midW} ${capH}\"\n preserveAspectRatio=\"none\"\n aria-hidden=\"true\"\n >\n ${svg`\n <path class=\"cap-fill\" d=\"${midFill}\" />\n <path class=\"cap-stroke\" fill=\"none\" vector-effect=\"non-scaling-stroke\" d=\"${midStroke}\" />\n `}\n </svg>\n <svg\n class=\"cap-corner cap-corner-end\"\n viewBox=\"0 0 ${cornerW} ${capH}\"\n preserveAspectRatio=\"xMinYMid meet\"\n aria-hidden=\"true\"\n >\n ${svg`\n <path class=\"cap-fill\" d=\"${cornerEndFill}\" />\n <path class=\"cap-stroke\" fill=\"none\" d=\"${cornerEndStroke}\" />\n `}\n </svg>\n </div>\n `;\n }\n\n private renderCap(side: 'start' | 'end'): HTMLTemplateResult | null {\n if (this.type === TankType.generic) return null;\n if (this.type === TankType.battery && side === 'end') return null;\n if (this.type === TankType.atmospheric) {\n return this.renderAtmosphericCap(side);\n }\n if (this.type === TankType.pressurized) {\n return html`<div class=\"cap cap-pressurized cap-${side}\"></div>`;\n }\n // battery, start only\n return html`<div class=\"cap cap-battery cap-${side}\"></div>`;\n }\n\n override willUpdate(changed: PropertyValues) {\n super.willUpdate(changed);\n syncAdviceAlias(this, this.advice);\n }\n\n override render() {\n const safeMax = this.max > 0 ? this.max : 1;\n const percent = clamp((this.value / safeMax) * 100, 0, 100);\n const isCompact = this.isCompact;\n\n // Compact and static collapse their empty cells so the tank frame absorbs\n // the space; non-compact cells sit in the inner `.grid` and always reserve\n // their min-content rows (automation-components.md § Tank rendering).\n const controlBadge = this._badgeControlType();\n const alertBadge = this._badgeAlertType();\n const interlockBadge = this._badgeInterlockType();\n const commandLockedBadge = this._badgeCommandLockedType();\n const hasEnumBadges =\n controlBadge !== null ||\n alertBadge !== null ||\n interlockBadge !== null ||\n commandLockedBadge !== null;\n\n const badgesHidden = isCompact && !this._hasBadges && !hasEnumBadges;\n const tagHidden = isCompact && !this._hasTagSlot && !this.tag;\n\n const badgesCell = html`\n <div class=\"badges\" ?hidden=${badgesHidden}>\n <slot name=\"badges\" @slotchange=${this._onBadgesSlotChange}>\n ${\n controlBadge\n ? html`<obc-automation-badge\n .type=${controlBadge}\n ></obc-automation-badge>`\n : nothing\n }\n ${\n alertBadge\n ? html`<obc-automation-badge\n .type=${alertBadge}\n ></obc-automation-badge>`\n : nothing\n }\n ${\n interlockBadge\n ? html`<obc-automation-badge\n .type=${interlockBadge}\n ></obc-automation-badge>`\n : nothing\n }\n ${\n commandLockedBadge\n ? html`<obc-automation-badge\n .type=${commandLockedBadge}\n ></obc-automation-badge>`\n : nothing\n }\n </slot>\n </div>\n `;\n const tagCell = html`\n <div class=\"tag\" ?hidden=${tagHidden}>\n <slot name=\"tag\" @slotchange=${this._onTagSlotChange}>${this.tag}</slot>\n </div>\n `;\n // Static shows capacity rather than a percent: the state is unknown, so a\n // reading would be a claim the tank cannot make, and the trend icon goes\n // for the same reason (automation-components.md § Tank rendering).\n const readoutCell = this.static\n ? html`\n <div class=\"readout readout-compact readout-static\">\n <slot name=\"readout\">\n <slot name=\"max-value\">${this.max.toFixed(0)}</slot>\n <slot name=\"unit\">m<sup>3</sup></slot>\n </slot>\n </div>\n `\n : isCompact\n ? html`\n <div class=\"readout readout-compact\">\n <slot name=\"readout\">\n ${this.showTrendSymbol ? this.trendIcon() : null}\n <span class=\"percent\"\n >${percent.toFixed(0)}<span class=\"percent-symbol\"\n >%</span\n ></span\n >\n </slot>\n </div>\n `\n : html`\n <div class=\"readout\">\n <slot name=\"readout\">\n <div class=\"header\">\n ${this.showTrendSymbol ? this.trendIcon() : null}\n <div class=\"percent\">\n ${percent.toFixed(this.percentFractionDigits)}<span\n class=\"percent-symbol\"\n >%</span\n >\n </div>\n </div>\n <div class=\"value\">\n <div class=\"current\">\n <slot name=\"current-value\" class=\"current-value\"\n >${this.value.toFixed(0)}</slot\n ><span class=\"divider\">/</span>\n </div>\n <div class=\"max\">\n <slot class=\"max-value\" name=\"max-value\"\n >${this.max.toFixed(0)}</slot\n >\n <slot class=\"unit\" name=\"unit\">m<sup>3</sup></slot>\n </div>\n </div>\n <div class=\"rich-divider\" ?hidden=${!this._hasRichSlot}></div>\n <slot name=\"rich\" @slotchange=${this._onRichSlotChange}></slot>\n </slot>\n </div>\n `;\n // Two stacked icons form the silhouette `obc-automation-button` uses: the\n // back layer paints the inherited SVG `stroke` halo, the front layer the\n // fill through `color` (automation-components.md § Tank rendering).\n const graphIconClasses = classMap({\n 'graph-icon': true,\n 'priority-enhanced': this.priority === Priority.enhanced,\n });\n const graphIconOverlay =\n this.type === TankType.battery\n ? html`\n <div class=${graphIconClasses} aria-hidden=\"true\">\n <obi-energy-battery\n class=\"graph-icon-stroke\"\n ></obi-energy-battery>\n <obi-energy-battery class=\"graph-icon-fill\"></obi-energy-battery>\n </div>\n `\n : html`\n <div class=${graphIconClasses} aria-hidden=\"true\">\n <obi-tank class=\"graph-icon-stroke\"></obi-tank>\n <obi-tank class=\"graph-icon-fill\"></obi-tank>\n </div>\n `;\n // Alert-frame overlay. Mirrors the `obc-automation-button` pattern\n // exactly so consumer API is identical. Placed inside `.halo` so the\n // ring hugs only the bordered tank area; `belowHalo` (tag / readout) is\n // unaffected. `.halo` is `position: relative` (see CSS) to anchor the\n // absolutely-positioned alert-frame.\n const alertFrameOverlay = this.alert\n ? html`<obc-alert-frame\n class=\"alert-frame\"\n .type=${this.alertFrameType}\n .thickness=${this.alertFrameThickness}\n .status=${this.alertFrameStatus}\n .mode=${this.alertFrameMode}\n .showAlertCategoryIcon=${this.showAlertCategoryIcon}\n .showIcon=${this.showAlertIcon}\n >\n <span slot=\"icon\"><slot name=\"alert-icon\"></slot></span>\n <span slot=\"label\"><slot name=\"alert-label\"></slot></span>\n <span slot=\"timer\"><slot name=\"alert-timer\"></slot></span>\n </obc-alert-frame>`\n : null;\n let chartCell: HTMLTemplateResult;\n if (this._usesGaugeTrend) {\n // gauge-trend reads these as an aspect-ratio reference and derives its\n // own height from its wrapper. Rendering waits for both measurements —\n // a zero divides in that maths on first paint.\n const hasSize = this._cellWidth > 0 && this._cellHeight > 0;\n chartCell = html`\n <div class=\"bar-container chart-cell\">\n ${\n hasSize\n ? html`<obc-gauge-trend\n .data=${this.chartData}\n .minValue=${0}\n .maxValue=${safeMax}\n .value=${this.value}\n .hasBar=${this.chartMode === TankChartMode.graphAndBar}\n .hasScale=${false}\n .hasLabelPadding=${false}\n .chartFill=${true}\n .hasAdvice=${this.hasAdvice}\n .advices=${this.advices}\n .adviceTrigger=${this.adviceTrigger}\n .adviceEmphasis=${this.adviceEmphasis}\n .width=${this._cellWidth}\n .height=${this._cellHeight}\n .setpoint=${this.setpoint}\n .newSetpoint=${this.newSetpoint}\n .touching=${this.touching}\n .atSetpoint=${this.atSetpoint}\n .autoAtSetpoint=${this.autoAtSetpoint}\n .autoAtSetpointDeadband=${this.autoAtSetpointDeadband}\n .setpointAtZeroDeadband=${this.setpointAtZeroDeadband}\n .setpointOverride=${this.setpointOverride}\n .animateSetpoint=${this.animateSetpoint}\n style=\"width: 100%; height: 100%;\"\n .priority=${this.priority}\n ></obc-gauge-trend>`\n : null\n }\n ${this.hasGraphIcon ? graphIconOverlay : null}\n </div>\n `;\n } else {\n // The shared SVG bar, the renderer gauge-trend uses for its side bar, so\n // advice overlays behave the same in all three chart modes; its fill\n // follows the instrument palette, not the tank's `medium` colour.\n // TODO(#1284): carry the medium colour through, and fold this branch\n // into gauge-trend once it offers a bar-only layout at this size.\n const hasSize = this._cellWidth > 0 && this._cellHeight > 0;\n // The inner bar is always portrait and mirrors gauge-trend's\n // `fixedAspectRatio` sizing, so fixed-pixel SVG primitives keep one\n // on-screen size; `barThickness` and the cross-axis size are therefore\n // in viewBox units (automation-components.md § Tank rendering).\n const SCALE_REFERENCE_SIZE = 384;\n // The bar's viewBox cross-axis includes an outside-bar band for advice\n // pills, icons and/or the setpoint marker (see computeExternalScaleLayout).\n // Subtract the same band the bar will reserve so total viewBox width\n // still equals viewBoxCross and the meet-scale fills the cell exactly.\n const hasSetpointMarker =\n this.setpoint !== undefined ||\n this.newSetpoint !== undefined ||\n this.departingNewSetpoint !== undefined;\n const outsideBarReserveVb = computeOutsideBarThickness({\n hasBar: true,\n hasScale: false,\n labels: false,\n labelThickness: 0,\n tickThickness: 0,\n scaleType: ScaleType.regular,\n hasAdvice: this.hasAdvice,\n hasAdviceIcon:\n this.hasAdvice && !!this.advices?.some((a) => a.showIcon),\n advicePosition: AdvicePosition.inner,\n hasSetpoint: hasSetpointMarker,\n });\n const safeCellHeight = Math.max(1, this._cellHeight);\n const viewBoxCross =\n (this._cellWidth * SCALE_REFERENCE_SIZE) / safeCellHeight;\n const barThickness = Math.max(0, viewBoxCross - outsideBarReserveVb);\n // `tint` is locked in for tank bar mode: it draws a fill from 0 to\n // value plus a small marker at the value position, which mirrors the\n // legacy CSS bar's \"fill + top border at value\" visual idiom.\n const barWrapper = html`<obc-bar-vertical\n .minValue=${0}\n .maxValue=${safeMax}\n .value=${this.value}\n .height=${this._cellHeight}\n .fixedAspectRatio=${true}\n .scaleReferenceSize=${SCALE_REFERENCE_SIZE}\n .paddingTop=${0}\n .paddingBottom=${0}\n .side=${ExternalScaleSide.right}\n .hasBar=${true}\n .hasScale=${false}\n .showLabels=${false}\n .barThickness=${barThickness}\n .fillMode=${FillMode.tint}\n .instrumentMode=${true}\n .borderRadius=${2}\n .advices=${this.hasAdvice ? this.advices : []}\n .adviceTrigger=${this.adviceTrigger}\n .adviceEmphasis=${this.adviceEmphasis}\n .advicePosition=${AdvicePosition.inner}\n .setpoint=${this.setpoint}\n .newSetpoint=${this.newSetpoint}\n .touching=${this.touching}\n .atSetpoint=${this.atSetpoint}\n .autoAtSetpoint=${this.autoAtSetpoint}\n .autoAtSetpointDeadband=${this.autoAtSetpointDeadband}\n .setpointAtZeroDeadband=${this.setpointAtZeroDeadband}\n .setpointOverride=${this.setpointOverride}\n .animateSetpoint=${this.animateSetpoint}\n style=\"width: 100%; height: 100%;\"\n .priority=${this.priority}\n ></obc-bar-vertical>`;\n chartCell = html`\n <div class=\"bar-container bar-cell\">\n ${hasSize ? barWrapper : null}\n ${this.hasGraphIcon ? graphIconOverlay : null}\n </div>\n `;\n }\n\n const frameClasses = classMap({\n 'tank-frame': true,\n [`type-${this.type}`]: true,\n [`orientation-${this.orientation}`]: true,\n [this.medium]: true,\n compact: isCompact,\n static: this.static,\n });\n\n let middleContents: HTMLTemplateResult;\n if (this.static) {\n middleContents = html`<div class=\"static-readout\">${readoutCell}</div>`;\n } else if (this.compact) {\n middleContents = chartCell;\n } else {\n middleContents = html`<div class=\"grid\">\n ${tagCell}${badgesCell}${readoutCell}${chartCell}\n </div>`;\n }\n\n const tankFrame = html`\n <div class=${frameClasses}>\n ${this.renderCap('start')}\n <div class=\"middle\">${middleContents}</div>\n ${this.renderCap('end')}\n </div>\n `;\n\n // One interactive element: the flat mixin paints `.halo` through\n // `visibleWrapperClass` so the surround hugs the bordered area only, and\n // the alert-frame overlay is its last child so the ring covers every cell\n // (automation-components.md § Tank rendering).\n let haloContents: HTMLTemplateResult;\n if (this.static) {\n haloContents = html`${badgesCell}${tankFrame}${tagCell}`;\n } else if (this.compact) {\n haloContents = html`${badgesCell}${tankFrame}${readoutCell}${tagCell}`;\n } else {\n haloContents = tankFrame;\n }\n const halo = html`\n <div class=\"halo\">${haloContents}${alertFrameOverlay}</div>\n `;\n\n // Both classes sit on `.root` so the mixin paints `.halo`: `activated`\n // like its hover and pressed states, `clickable` choosing between the\n // six-state variant and the resting-only `noClick` one\n // (automation-components.md § Tank rendering).\n const isClickable = this.clickable && !this.static;\n const rootClasses = classMap({\n root: true,\n activated: this.activated,\n clickable: isClickable,\n });\n\n // The live region stays on all three root shapes, so an `alert` label is\n // announced whatever the interactivity (automation-components.md § Tank\n // rendering).\n // TODO(a11y): the rest of the automation family lacks the live region;\n // consolidate when alert support moves into a shared mixin.\n if (this.static) {\n return html`<div\n class=${rootClasses}\n role=\"img\"\n aria-label=${this.tag || 'Tank'}\n aria-live=\"polite\"\n aria-atomic=\"true\"\n >\n ${halo}\n </div>`;\n }\n if (!isClickable) {\n return html`<div\n class=${rootClasses}\n aria-live=\"polite\"\n aria-atomic=\"true\"\n >\n ${halo}\n </div>`;\n }\n return html`<button\n class=${rootClasses}\n type=\"button\"\n aria-label=${this.tag || 'Tank'}\n aria-live=\"polite\"\n aria-atomic=\"true\"\n >\n ${halo}\n </button>`;\n }\n\n static override styles = unsafeCSS(compentStyle);\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'obc-automation-tank': ObcAutomationTank;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuDA,IAAY,YAAL,yBAAA,WAAA;CACL,UAAA,gBAAA;CACA,UAAA,YAAA;CACA,UAAA,YAAA;CACA,UAAA,aAAA;CACA,UAAA,iBAAA;CACA,UAAA,YAAA;;AACF,EAAA,CAAA,CAAA;AAEA,IAAY,WAAL,yBAAA,UAAA;CACL,SAAA,aAAA;CACA,SAAA,iBAAA;CACA,SAAA,iBAAA;CACA,SAAA,aAAA;;AACF,EAAA,CAAA,CAAA;AAEA,IAAY,kBAAL,yBAAA,iBAAA;CACL,gBAAA,cAAA;CACA,gBAAA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