@oicl/openbridge-webcomponents 2.0.0 → 2.1.0-next.2
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/README.md +1 -0
- package/bundle/openbridge-webcomponents.bundle.js +416 -261
- package/bundle/openbridge-webcomponents.bundle.js.map +1 -1
- package/custom-elements.json +1443 -446
- package/dist/automation/automation-button/abstract-automation-button-storybook-helpers.d.ts +135 -136
- package/dist/automation/automation-button/abstract-automation-button-storybook-helpers.d.ts.map +1 -1
- package/dist/automation/automation-button/abstract-automation-button-storybook-helpers.js +2 -18
- package/dist/automation/automation-button/abstract-automation-button-storybook-helpers.js.map +1 -1
- package/dist/automation/automation-button/abstract-automation-button.d.ts +4 -4
- package/dist/automation/automation-button/abstract-automation-button.js +2 -2
- package/dist/automation/automation-button/abstract-automation-button.js.map +1 -1
- package/dist/automation/automation-button/automation-button.d.ts +4 -4
- package/dist/automation/automation-button/automation-button.js.map +1 -1
- package/dist/automation/automation-tank/automation-tank.d.ts +47 -3
- package/dist/automation/automation-tank/automation-tank.d.ts.map +1 -1
- package/dist/automation/automation-tank/automation-tank.js +4 -1
- package/dist/automation/automation-tank/automation-tank.js.map +1 -1
- package/dist/automation/heat-exchanger/heat-exchanger.d.ts +1 -1
- package/dist/automation/heat-exchanger/heat-exchanger.js.map +1 -1
- package/dist/automation/heat-pump/heat-pump.d.ts +1 -1
- package/dist/automation/heat-pump/heat-pump.js.map +1 -1
- package/dist/automation/hydraulic-separator/hydraulic-separator.d.ts +1 -1
- package/dist/automation/hydraulic-separator/hydraulic-separator.js.map +1 -1
- package/dist/automation/specialty-tank/abstract-specialty-tank.d.ts +14 -5
- package/dist/automation/specialty-tank/abstract-specialty-tank.d.ts.map +1 -1
- package/dist/automation/specialty-tank/abstract-specialty-tank.js +9 -3
- package/dist/automation/specialty-tank/abstract-specialty-tank.js.map +1 -1
- package/dist/automation/specialty-tank/specialty-tank-story-meta.d.ts.map +1 -1
- package/dist/automation/specialty-tank/specialty-tank-story-meta.js +5 -13
- package/dist/automation/specialty-tank/specialty-tank-story-meta.js.map +1 -1
- package/dist/automation/transmitter/transmitter.d.ts +77 -8
- package/dist/automation/transmitter/transmitter.d.ts.map +1 -1
- package/dist/automation/transmitter/transmitter.js +37 -10
- package/dist/automation/transmitter/transmitter.js.map +1 -1
- package/dist/building-blocks/alert-list/alert-list-base.d.ts +60 -0
- package/dist/building-blocks/alert-list/alert-list-base.d.ts.map +1 -0
- package/dist/building-blocks/alert-list/alert-list-base.js +191 -0
- package/dist/building-blocks/alert-list/alert-list-base.js.map +1 -0
- package/dist/building-blocks/alert-list/alert-list.css.js.map +1 -1
- package/dist/building-blocks/alert-list/alert-list.d.ts +13 -26
- package/dist/building-blocks/alert-list/alert-list.d.ts.map +1 -1
- package/dist/building-blocks/alert-list/alert-list.js +7 -142
- package/dist/building-blocks/alert-list/alert-list.js.map +1 -1
- package/dist/components/accordion-card/accordion-card.d.ts +31 -6
- package/dist/components/accordion-card/accordion-card.d.ts.map +1 -1
- package/dist/components/accordion-card/accordion-card.js +13 -1
- package/dist/components/accordion-card/accordion-card.js.map +1 -1
- package/dist/components/alert-frame/alert-frame-storybook-helpers.d.ts +33 -0
- package/dist/components/alert-frame/alert-frame-storybook-helpers.d.ts.map +1 -0
- package/dist/components/alert-frame/alert-frame-storybook-helpers.js +30 -0
- package/dist/components/alert-frame/alert-frame-storybook-helpers.js.map +1 -0
- package/dist/components/alert-icon/alert-icon.d.ts.map +1 -1
- package/dist/components/alert-icon/alert-icon.js +6 -5
- package/dist/components/alert-icon/alert-icon.js.map +1 -1
- package/dist/components/alert-list-details/alert-list-details.css.js +4 -1
- package/dist/components/alert-list-details/alert-list-details.css.js.map +1 -1
- package/dist/components/alert-menu/alert-menu.css.js +3 -42
- package/dist/components/alert-menu/alert-menu.css.js.map +1 -1
- package/dist/components/alert-menu/alert-menu.d.ts +28 -6
- package/dist/components/alert-menu/alert-menu.d.ts.map +1 -1
- package/dist/components/alert-menu/alert-menu.js +81 -60
- package/dist/components/alert-menu/alert-menu.js.map +1 -1
- package/dist/components/alert-menu-item/alert-menu-item.d.ts +16 -6
- package/dist/components/alert-menu-item/alert-menu-item.d.ts.map +1 -1
- package/dist/components/alert-menu-item/alert-menu-item.js +11 -2
- package/dist/components/alert-menu-item/alert-menu-item.js.map +1 -1
- package/dist/components/number-input-field/number-input-field.css.js +8 -2
- package/dist/components/number-input-field/number-input-field.css.js.map +1 -1
- package/dist/components/number-input-field/number-input-field.d.ts +15 -1
- package/dist/components/number-input-field/number-input-field.d.ts.map +1 -1
- package/dist/components/number-input-field/number-input-field.js +38 -44
- package/dist/components/number-input-field/number-input-field.js.map +1 -1
- package/dist/components/textbox/textbox.css.js +3 -9
- package/dist/components/textbox/textbox.css.js.map +1 -1
- package/dist/components/textbox/textbox.d.ts +3 -0
- package/dist/components/textbox/textbox.d.ts.map +1 -1
- package/dist/components/textbox/textbox.js.map +1 -1
- package/dist/generated/locales/es-419.d.ts +1 -1
- package/dist/generated/locales/es-419.js +1 -1
- package/dist/generated/locales/es-419.js.map +1 -1
- package/dist/navigation-instruments/readout/readout.d.ts.map +1 -1
- package/dist/navigation-instruments/readout/readout.js.map +1 -1
- package/dist/navigation-instruments/readout-list-item/readout-list-item.css.js +2 -1
- package/dist/navigation-instruments/readout-list-item/readout-list-item.css.js.map +1 -1
- package/dist/navigation-instruments/readout-list-item/readout-list-item.d.ts.map +1 -1
- package/dist/navigation-instruments/readout-list-item/readout-list-item.js.map +1 -1
- package/dist/pages/alert-detail-page/alert-detail-page.js +1 -1
- package/dist/pages/alert-detail-page/alert-detail-page.js.map +1 -1
- package/dist/pages/alert-list-page-small/alert-list-page-small-base.d.ts +63 -0
- package/dist/pages/alert-list-page-small/alert-list-page-small-base.d.ts.map +1 -0
- package/dist/pages/alert-list-page-small/alert-list-page-small-base.js +126 -0
- package/dist/pages/alert-list-page-small/alert-list-page-small-base.js.map +1 -0
- package/dist/pages/alert-list-page-small/alert-list-page-small.d.ts +12 -15
- package/dist/pages/alert-list-page-small/alert-list-page-small.d.ts.map +1 -1
- package/dist/pages/alert-list-page-small/alert-list-page-small.js +41 -92
- package/dist/pages/alert-list-page-small/alert-list-page-small.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"automation-button.js","names":[],"sources":["../../../src/automation/automation-button/automation-button.ts"],"sourcesContent":["import {HTMLTemplateResult, LitElement, html, nothing, unsafeCSS} from 'lit';\nimport {property} from 'lit/decorators.js';\nimport compentStyle from './automation-button.css?inline';\nimport {classMap} from 'lit/directives/class-map.js';\nimport '../../icons/icon-forward.js';\nimport '../../icons/icon-forward-fast.js';\nimport '../../icons/icon-forward-stopped.js';\nimport '../../icons/icon-backward.js';\nimport '../../icons/icon-backward-fast.js';\nimport '../../icons/icon-backward-stopped.js';\nimport '../../icons/icon-standby.js';\nimport '../../icons/icon-arrow-up-google.js';\nimport '../../icons/icon-arrow-down-google.js';\nimport '../../icons/icon-arrow-left-google.js';\nimport '../../icons/icon-arrow-right-google.js';\nimport '../../components/alert-frame/alert-frame.js';\nimport {\n ObcAlertFrameThickness,\n ObcAlertFrameType,\n ObcAlertFrameMode,\n wrapWithAlertFrame,\n} from '../../components/alert-frame/alert-frame.js';\nimport {AlertType} from '../../types.js';\nimport {customElement} from '../../decorator.js';\nimport {\n AutomationButtonReadoutStack,\n AutomationButtonReadoutStackSize,\n IdTagOrientation,\n} from '../../components/automation-button-readout-stack/automation-button-readout-stack.js';\nimport '../../components/automation-button-readout-stack/automation-button-readout-stack.js';\nimport '../../building-blocks/circular-progress/circular-progress.js';\nimport {CircularProgressMode} from '../../building-blocks/circular-progress/circular-progress.js';\n\nexport {CircularProgressMode};\n\nexport enum AutomationButtonVariant {\n regular = 'regular',\n double = 'double',\n forward = 'forward',\n square = 'square',\n flat = 'flat',\n flatForward = 'flat-forward',\n}\n\nexport enum AutomationButtonState {\n closed = 'closed',\n open = 'open',\n}\n\nexport enum AutomationButtonReadoutPosition {\n top = 'top',\n bottom = 'bottom',\n left = 'left',\n right = 'right',\n}\n\nexport enum AutomationButtonDirection {\n forward = 'forward',\n forwardFast = 'forward-fast',\n forwardStopped = 'forward-stopped',\n backward = 'backward',\n backwardFast = 'backward-fast',\n backwardStopped = 'backward-stopped',\n standby = 'standby',\n}\n\nexport enum AutomationButtonLabelDirection {\n up = 'up',\n down = 'down',\n left = 'left',\n right = 'right',\n none = 'none',\n}\n\n/**\n * The orientation of the inner icon/symbol.\n * - `horizontal`: The icon is shown in its default horizontal orientation.\n * - `verticalRight`: The icon is rotated 90° clockwise.\n * - `verticalLeft`: The icon is rotated 90° counter-clockwise.\n */\nexport enum AutomationButtonOrientation {\n horizontal = 'horizontal',\n verticalRight = 'verticalRight',\n verticalLeft = 'verticalLeft',\n}\n\n/**\n * The positioning of the automation button.\n * - `point`: The button is wrapped in a 0x0 px div, where the center of the symbol is the center of the div.\n * - `symbol`: The button is wrapped in a div containing the symbol but not the readout stack\n * - `button`: The button not wrapped, in is positioned based on the full size of the button.\n */\nexport enum AutomationButtonPositioning {\n point = 'point',\n symbol = 'symbol',\n button = 'button',\n}\n\n/**\n * @property activated - Enables the activated background color, used to indicate that the button is activated/selected.\n * @availableWhen readouts showReadoutStack==true\n * @availableWhen tag showReadoutStack==true\n * @availableWhen readoutPosition showReadoutStack==true\n * @availableWhen readoutSize showReadoutStack==true\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 [LargeSideFlip, BottomFlip, TopFlip]\n * @availableWhen showAlertIcon alert==true\n * @availableWhen progressMode progress==true\n * @availableWhen progressValue progress==true && progressMode in [determinate, progressive-indeterminate]\n * @availableWhen direction variant in [double, forward, flatForward]\n * @property hasBadgeSpacer - Badge spacer should be set to true if there is a badge on the same side as the label\n * @slot badge-top-right - Content projected into the top-right badge position of the button.\n * @slot badge-top-left - Content projected into the top-left badge position of the button.\n * @slot badge-bottom-left - Content projected into the bottom-left badge position of the button.\n * @slot badge-bottom-right - Content projected into the bottom-right badge position of the button.\n * @slot icon - Primary icon shown inside the button (regular, double, flat and square variants).\n * @slot icon-silhouette - Silhouette/outline icon shown behind the primary icon (flat variant only).\n * @slot alert-icon - Custom icon for the alert frame, shown when alert==true and positioning==\"point\".\n * @slot alert-label - Label for the alert frame, shown when alert==true and positioning==\"point\".\n * @slot alert-timer - Timer for the alert frame, shown when alert==true and positioning==\"point\".\n * @fires click - Fired when the button is clicked.\n * @stable\n */\n@customElement('obc-automation-button')\nexport class ObcAutomationButton extends LitElement {\n @property({type: String}) variant: AutomationButtonVariant =\n AutomationButtonVariant.regular;\n @property({type: String}) state: AutomationButtonState =\n AutomationButtonState.open;\n @property({type: Boolean}) static: boolean = false;\n @property({type: Boolean}) activated: boolean = false;\n @property({type: Boolean, attribute: false}) showReadoutStack: boolean = true;\n @property({type: Array, attribute: false})\n readouts: AutomationButtonReadoutStack[] = [];\n @property({type: String})\n tag: string | null = null;\n @property({type: String}) readoutPosition: AutomationButtonReadoutPosition =\n AutomationButtonReadoutPosition.bottom;\n @property({type: String}) readoutSize: AutomationButtonReadoutStackSize =\n AutomationButtonReadoutStackSize.regular;\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 @property({type: String}) direction: AutomationButtonDirection =\n AutomationButtonDirection.forward;\n @property({type: String}) positioning: AutomationButtonPositioning =\n AutomationButtonPositioning.point;\n @property({type: String}) orientation: AutomationButtonOrientation =\n AutomationButtonOrientation.horizontal;\n @property({type: Boolean}) hasBadgeSpacer: boolean = false;\n\n override render() {\n const effectiveVariant = this.effectiveVariant;\n\n const hasLabelContent =\n this.showReadoutStack && (this.readouts.length > 0 || this.tag !== null);\n\n return this.wrapContent(html`\n <button\n class=${classMap({\n wrapper: true,\n ['positioning-' + this.positioning]: true,\n ['variant-' + effectiveVariant]: true,\n ['state-' + this.state]: true,\n 'label-empty': !hasLabelContent,\n ['label-' + this.readoutPosition]: true,\n 'has-badge-spacer': this.hasBadgeSpacer,\n alert: this.alert,\n progress: this.progress,\n static: this.static,\n activated: this.activated,\n })}\n >\n <div class=\"icon-touch-target\">\n ${this.renderIconHolder()}\n <div class=\"badge-top-right\">\n <slot name=\"badge-top-right\"></slot>\n </div>\n <div class=\"badge-top-left\">\n <slot name=\"badge-top-left\"></slot>\n </div>\n <div class=\"badge-bottom-left\">\n <slot name=\"badge-bottom-left\"></slot>\n </div>\n <div class=\"badge-bottom-right\">\n <slot name=\"badge-bottom-right\"></slot>\n </div>\n </div>\n ${\n this.showReadoutStack\n ? html`\n <div class=\"badge-spacer\"></div>\n <obc-automation-button-readout-stack\n .readouts=${this.readouts}\n .tag=${this.tag}\n .size=${this.readoutSize}\n .idTagOrientation=${this.getIdTagOrientation()}\n ></obc-automation-button-readout-stack>\n `\n : nothing\n }\n ${\n this.alert && this.positioning === AutomationButtonPositioning.point\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 : nothing\n }\n </button>\n `);\n }\n\n private wrapContent(content: HTMLTemplateResult): HTMLTemplateResult {\n if (this.positioning === AutomationButtonPositioning.point) {\n return html`<div class=\"point-wrapper\">${content}</div>`;\n }\n const innerContent = wrapWithAlertFrame(\n this.alert\n ? {\n type: this.alertFrameType,\n thickness: this.alertFrameThickness,\n status: this.alertFrameStatus,\n mode: this.alertFrameMode,\n showIcon: this.showAlertIcon,\n showAlertCategoryIcon: this.showAlertCategoryIcon,\n }\n : false,\n content\n );\n if (this.positioning === AutomationButtonPositioning.symbol) {\n return html`<div\n class=${classMap({\n 'symbol-wrapper': true,\n ['label-' + this.readoutPosition]: true,\n })}\n >\n ${innerContent}\n </div> `;\n }\n return innerContent;\n }\n\n static override styles = unsafeCSS(compentStyle);\n\n private get effectiveVariant(): AutomationButtonVariant {\n if (this.progress) {\n return AutomationButtonVariant.regular;\n }\n return this.variant;\n }\n\n private renderIconHolder(): HTMLTemplateResult {\n const effectiveVariant = this.effectiveVariant;\n const progressRing = this.getProgressRing();\n const iconHolderClasses = classMap({\n 'icon-holder': true,\n ['orientation-' + this.orientation]: true,\n });\n if (this.variant === AutomationButtonVariant.flatForward) {\n return html`<div class=${iconHolderClasses}>\n ${this.getDirectionIcon(effectiveVariant, 'icon-primary')}\n ${this.getDirectionIcon(effectiveVariant, 'icon-silhouette')}\n ${progressRing}\n </div>`;\n } else if (this.variant === AutomationButtonVariant.forward) {\n return html`<div class=${iconHolderClasses}>\n ${this.getDirectionIcon(effectiveVariant, 'icon-primary')}\n ${progressRing}\n </div>`;\n }\n\n const direction = this.getDirectionIcon(effectiveVariant);\n const showIcon = [\n AutomationButtonVariant.regular,\n AutomationButtonVariant.double,\n AutomationButtonVariant.flat,\n AutomationButtonVariant.square,\n ].includes(effectiveVariant);\n return html`<div class=${iconHolderClasses}>\n ${direction}\n ${\n showIcon\n ? html`<div class=\"icon-primary\">\n <slot name=\"icon\"></slot>\n </div>\n ${\n effectiveVariant === AutomationButtonVariant.flat\n ? html` <div class=\"icon-silhouette\">\n <slot name=\"icon-silhouette\"></slot>\n </div>`\n : nothing\n } `\n : nothing\n }\n ${progressRing}\n </div>`;\n }\n\n private getProgressRing(): null | HTMLTemplateResult {\n if (!this.progress) {\n return null;\n }\n\n return html`<obc-circular-progress\n class=\"progress-ring\"\n .mode=${this.progressMode}\n .value=${this.progressValue}\n ></obc-circular-progress>`;\n }\n\n private getDirectionIcon(\n variant: AutomationButtonVariant,\n className: string = 'icon-direction'\n ): typeof nothing | HTMLTemplateResult {\n if (\n ![\n AutomationButtonVariant.double,\n AutomationButtonVariant.forward,\n AutomationButtonVariant.flatForward,\n ].includes(variant)\n ) {\n return nothing;\n } else if (this.direction === AutomationButtonDirection.forward) {\n return html`<svg\n class=\"${className}\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M8 5 v 14 L 20 12Z\"\n stroke=\"var(--automation-device-tertiary-color)\"\n fill=\"var(--automation-device-primary-color)\"\n vector-effect=\"non-scaling-stroke\"\n />\n </svg> `;\n } else if (this.direction === AutomationButtonDirection.forwardFast) {\n return html`<svg\n class=\"${className}\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M3.5 5 v 14 l 8.5 -7 Z M14.5 5 v 14 l 8.5 -7 Z\"\n stroke=\"var(--automation-device-tertiary-color)\"\n fill=\"var(--automation-device-primary-color)\"\n vector-effect=\"non-scaling-stroke\"\n />\n </svg> `;\n } else if (this.direction === AutomationButtonDirection.forwardStopped) {\n return html`<svg\n class=\"${className}\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M8 5 v 14 L 20 12Z\"\n fill=\"var(--automation-device-tertiary-color)\"\n stroke=\"var(--automation-device-tertiary-inverted-color)\"\n vector-effect=\"non-scaling-stroke\"\n />\n </svg> `;\n } else if (this.direction === AutomationButtonDirection.backward) {\n return html`<svg\n class=\"${className}\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M16 5 v 14 L 4 12Z\"\n stroke=\"var(--automation-device-tertiary-color)\"\n fill=\"var(--automation-device-primary-color)\"\n vector-effect=\"non-scaling-stroke\"\n />\n </svg>`;\n } else if (this.direction === AutomationButtonDirection.backwardFast) {\n return html`<svg\n class=\"${className}\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M20.5 5 v 14 l -8.5 -7 Z M9.5 5 v 14 l -8.5 -7 Z\"\n stroke=\"var(--automation-device-tertiary-color)\"\n fill=\"var(--automation-device-primary-color)\"\n vector-effect=\"non-scaling-stroke\"\n />\n </svg>`;\n } else if (this.direction === AutomationButtonDirection.backwardStopped) {\n return html`<svg\n class=\"${className}\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M16 5 v 14 L 4 12Z\"\n fill=\"var(--automation-device-tertiary-color)\"\n stroke=\"var(--automation-device-tertiary-inverted-color)\"\n vector-effect=\"non-scaling-stroke\"\n />\n </svg> `;\n } else if (this.direction === AutomationButtonDirection.standby) {\n return html`<obi-standby class=\"${className}\" usecsscolor></obi-standby>`;\n }\n throw new Error('Invalid direction');\n }\n\n private getIdTagOrientation(): IdTagOrientation {\n if (this.readoutPosition === AutomationButtonReadoutPosition.top) {\n return IdTagOrientation.top;\n }\n return IdTagOrientation.bottom;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n '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AEvB,WAAA,CAAA,SAAS,EAAC,MAAM,OAAM,CAAC,CAAA,GAAA,oBAAA,WAAA,eAAA,KAAA,CAAA;AAEvB,WAAA,CAAA,SAAS,EAAC,MAAM,QAAO,CAAC,CAAA,GAAA,oBAAA,WAAA,kBAAA,KAAA,CAAA;AAtC1B,sBAAA,WAAA,CAAA,cAAc,uBAAuB,CAAA,GAAA,mBAAA"}
|
|
1
|
+
{"version":3,"file":"automation-button.js","names":[],"sources":["../../../src/automation/automation-button/automation-button.ts"],"sourcesContent":["import {HTMLTemplateResult, LitElement, html, nothing, unsafeCSS} from 'lit';\nimport {property} from 'lit/decorators.js';\nimport compentStyle from './automation-button.css?inline';\nimport {classMap} from 'lit/directives/class-map.js';\nimport '../../icons/icon-forward.js';\nimport '../../icons/icon-forward-fast.js';\nimport '../../icons/icon-forward-stopped.js';\nimport '../../icons/icon-backward.js';\nimport '../../icons/icon-backward-fast.js';\nimport '../../icons/icon-backward-stopped.js';\nimport '../../icons/icon-standby.js';\nimport '../../icons/icon-arrow-up-google.js';\nimport '../../icons/icon-arrow-down-google.js';\nimport '../../icons/icon-arrow-left-google.js';\nimport '../../icons/icon-arrow-right-google.js';\nimport '../../components/alert-frame/alert-frame.js';\nimport {\n ObcAlertFrameThickness,\n ObcAlertFrameType,\n ObcAlertFrameMode,\n wrapWithAlertFrame,\n} from '../../components/alert-frame/alert-frame.js';\nimport {AlertType} from '../../types.js';\nimport {customElement} from '../../decorator.js';\nimport {\n AutomationButtonReadoutStack,\n AutomationButtonReadoutStackSize,\n IdTagOrientation,\n} from '../../components/automation-button-readout-stack/automation-button-readout-stack.js';\nimport '../../components/automation-button-readout-stack/automation-button-readout-stack.js';\nimport '../../building-blocks/circular-progress/circular-progress.js';\nimport {CircularProgressMode} from '../../building-blocks/circular-progress/circular-progress.js';\n\nexport {CircularProgressMode};\n\nexport enum AutomationButtonVariant {\n regular = 'regular',\n double = 'double',\n forward = 'forward',\n square = 'square',\n flat = 'flat',\n flatForward = 'flat-forward',\n}\n\nexport enum AutomationButtonState {\n closed = 'closed',\n open = 'open',\n}\n\nexport enum AutomationButtonReadoutPosition {\n top = 'top',\n bottom = 'bottom',\n left = 'left',\n right = 'right',\n}\n\nexport enum AutomationButtonDirection {\n forward = 'forward',\n forwardFast = 'forward-fast',\n forwardStopped = 'forward-stopped',\n backward = 'backward',\n backwardFast = 'backward-fast',\n backwardStopped = 'backward-stopped',\n standby = 'standby',\n}\n\nexport enum AutomationButtonLabelDirection {\n up = 'up',\n down = 'down',\n left = 'left',\n right = 'right',\n none = 'none',\n}\n\n/**\n * The orientation of the inner icon/symbol.\n * - `horizontal`: The icon is shown in its default horizontal orientation.\n * - `verticalRight`: The icon is rotated 90° clockwise.\n * - `verticalLeft`: The icon is rotated 90° counter-clockwise.\n */\nexport enum AutomationButtonOrientation {\n horizontal = 'horizontal',\n verticalRight = 'verticalRight',\n verticalLeft = 'verticalLeft',\n}\n\n/**\n * The positioning of the automation button.\n * - `point`: The button is wrapped in a 0x0 px div, where the center of the symbol is the center of the div.\n * - `symbol`: The button is wrapped in a div containing the symbol but not the readout stack\n * - `button`: The button not wrapped, in is positioned based on the full size of the button.\n */\nexport enum AutomationButtonPositioning {\n point = 'point',\n symbol = 'symbol',\n button = 'button',\n}\n\n/**\n * @property activated - Enables the activated background color, used to indicate that the button is activated/selected.\n * @availableWhen readouts showReadoutStack==true\n * @availableWhen tag showReadoutStack==true\n * @availableWhen readoutPosition showReadoutStack==true\n * @availableWhen readoutSize showReadoutStack==true\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 * @availableWhen progressMode progress==true\n * @availableWhen progressValue progress==true && progressMode in [determinate, progressive-indeterminate]\n * @availableWhen direction variant in [double, forward, flatForward]\n * @property hasBadgeSpacer - Badge spacer should be set to true if there is a badge on the same side as the label\n * @slot badge-top-right - Content projected into the top-right badge position of the button.\n * @slot badge-top-left - Content projected into the top-left badge position of the button.\n * @slot badge-bottom-left - Content projected into the bottom-left badge position of the button.\n * @slot badge-bottom-right - Content projected into the bottom-right badge position of the button.\n * @slot icon - Primary icon shown inside the button (regular, double, flat and square variants).\n * @slot icon-silhouette - Silhouette/outline icon shown behind the primary icon (flat variant only).\n * @slot alert-icon - Custom icon for the alert frame, shown when alert==true and positioning==\"point\".\n * @slot alert-label - Label for the alert frame, shown when alert==true and positioning==\"point\".\n * @slot alert-timer - Timer for the alert frame, shown when alert==true and positioning==\"point\".\n * @fires click - Fired when the button is clicked.\n * @stable\n */\n@customElement('obc-automation-button')\nexport class ObcAutomationButton extends LitElement {\n @property({type: String}) variant: AutomationButtonVariant =\n AutomationButtonVariant.regular;\n @property({type: String}) state: AutomationButtonState =\n AutomationButtonState.open;\n @property({type: Boolean}) static: boolean = false;\n @property({type: Boolean}) activated: boolean = false;\n @property({type: Boolean, attribute: false}) showReadoutStack: boolean = true;\n @property({type: Array, attribute: false})\n readouts: AutomationButtonReadoutStack[] = [];\n @property({type: String})\n tag: string | null = null;\n @property({type: String}) readoutPosition: AutomationButtonReadoutPosition =\n AutomationButtonReadoutPosition.bottom;\n @property({type: String}) readoutSize: AutomationButtonReadoutStackSize =\n AutomationButtonReadoutStackSize.regular;\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 @property({type: String}) direction: AutomationButtonDirection =\n AutomationButtonDirection.forward;\n @property({type: String}) positioning: AutomationButtonPositioning =\n AutomationButtonPositioning.point;\n @property({type: String}) orientation: AutomationButtonOrientation =\n AutomationButtonOrientation.horizontal;\n @property({type: Boolean}) hasBadgeSpacer: boolean = false;\n\n override render() {\n const effectiveVariant = this.effectiveVariant;\n\n const hasLabelContent =\n this.showReadoutStack && (this.readouts.length > 0 || this.tag !== null);\n\n return this.wrapContent(html`\n <button\n class=${classMap({\n wrapper: true,\n ['positioning-' + this.positioning]: true,\n ['variant-' + effectiveVariant]: true,\n ['state-' + this.state]: true,\n 'label-empty': !hasLabelContent,\n ['label-' + this.readoutPosition]: true,\n 'has-badge-spacer': this.hasBadgeSpacer,\n alert: this.alert,\n progress: this.progress,\n static: this.static,\n activated: this.activated,\n })}\n >\n <div class=\"icon-touch-target\">\n ${this.renderIconHolder()}\n <div class=\"badge-top-right\">\n <slot name=\"badge-top-right\"></slot>\n </div>\n <div class=\"badge-top-left\">\n <slot name=\"badge-top-left\"></slot>\n </div>\n <div class=\"badge-bottom-left\">\n <slot name=\"badge-bottom-left\"></slot>\n </div>\n <div class=\"badge-bottom-right\">\n <slot name=\"badge-bottom-right\"></slot>\n </div>\n </div>\n ${\n this.showReadoutStack\n ? html`\n <div class=\"badge-spacer\"></div>\n <obc-automation-button-readout-stack\n .readouts=${this.readouts}\n .tag=${this.tag}\n .size=${this.readoutSize}\n .idTagOrientation=${this.getIdTagOrientation()}\n ></obc-automation-button-readout-stack>\n `\n : nothing\n }\n ${\n this.alert && this.positioning === AutomationButtonPositioning.point\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 : nothing\n }\n </button>\n `);\n }\n\n private wrapContent(content: HTMLTemplateResult): HTMLTemplateResult {\n if (this.positioning === AutomationButtonPositioning.point) {\n return html`<div class=\"point-wrapper\">${content}</div>`;\n }\n const innerContent = wrapWithAlertFrame(\n this.alert\n ? {\n type: this.alertFrameType,\n thickness: this.alertFrameThickness,\n status: this.alertFrameStatus,\n mode: this.alertFrameMode,\n showIcon: this.showAlertIcon,\n showAlertCategoryIcon: this.showAlertCategoryIcon,\n }\n : false,\n content\n );\n if (this.positioning === AutomationButtonPositioning.symbol) {\n return html`<div\n class=${classMap({\n 'symbol-wrapper': true,\n ['label-' + this.readoutPosition]: true,\n })}\n >\n ${innerContent}\n </div> `;\n }\n return innerContent;\n }\n\n static override styles = unsafeCSS(compentStyle);\n\n private get effectiveVariant(): AutomationButtonVariant {\n if (this.progress) {\n return AutomationButtonVariant.regular;\n }\n return this.variant;\n }\n\n private renderIconHolder(): HTMLTemplateResult {\n const effectiveVariant = this.effectiveVariant;\n const progressRing = this.getProgressRing();\n const iconHolderClasses = classMap({\n 'icon-holder': true,\n ['orientation-' + this.orientation]: true,\n });\n if (this.variant === AutomationButtonVariant.flatForward) {\n return html`<div class=${iconHolderClasses}>\n ${this.getDirectionIcon(effectiveVariant, 'icon-primary')}\n ${this.getDirectionIcon(effectiveVariant, 'icon-silhouette')}\n ${progressRing}\n </div>`;\n } else if (this.variant === AutomationButtonVariant.forward) {\n return html`<div class=${iconHolderClasses}>\n ${this.getDirectionIcon(effectiveVariant, 'icon-primary')}\n ${progressRing}\n </div>`;\n }\n\n const direction = this.getDirectionIcon(effectiveVariant);\n const showIcon = [\n AutomationButtonVariant.regular,\n AutomationButtonVariant.double,\n AutomationButtonVariant.flat,\n AutomationButtonVariant.square,\n ].includes(effectiveVariant);\n return html`<div class=${iconHolderClasses}>\n ${direction}\n ${\n showIcon\n ? html`<div class=\"icon-primary\">\n <slot name=\"icon\"></slot>\n </div>\n ${\n effectiveVariant === AutomationButtonVariant.flat\n ? html` <div class=\"icon-silhouette\">\n <slot name=\"icon-silhouette\"></slot>\n </div>`\n : nothing\n } `\n : nothing\n }\n ${progressRing}\n </div>`;\n }\n\n private getProgressRing(): null | HTMLTemplateResult {\n if (!this.progress) {\n return null;\n }\n\n return html`<obc-circular-progress\n class=\"progress-ring\"\n .mode=${this.progressMode}\n .value=${this.progressValue}\n ></obc-circular-progress>`;\n }\n\n private getDirectionIcon(\n variant: AutomationButtonVariant,\n className: string = 'icon-direction'\n ): typeof nothing | HTMLTemplateResult {\n if (\n ![\n AutomationButtonVariant.double,\n AutomationButtonVariant.forward,\n AutomationButtonVariant.flatForward,\n ].includes(variant)\n ) {\n return nothing;\n } else if (this.direction === AutomationButtonDirection.forward) {\n return html`<svg\n class=\"${className}\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M8 5 v 14 L 20 12Z\"\n stroke=\"var(--automation-device-tertiary-color)\"\n fill=\"var(--automation-device-primary-color)\"\n vector-effect=\"non-scaling-stroke\"\n />\n </svg> `;\n } else if (this.direction === AutomationButtonDirection.forwardFast) {\n return html`<svg\n class=\"${className}\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M3.5 5 v 14 l 8.5 -7 Z M14.5 5 v 14 l 8.5 -7 Z\"\n stroke=\"var(--automation-device-tertiary-color)\"\n fill=\"var(--automation-device-primary-color)\"\n vector-effect=\"non-scaling-stroke\"\n />\n </svg> `;\n } else if (this.direction === AutomationButtonDirection.forwardStopped) {\n return html`<svg\n class=\"${className}\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M8 5 v 14 L 20 12Z\"\n fill=\"var(--automation-device-tertiary-color)\"\n stroke=\"var(--automation-device-tertiary-inverted-color)\"\n vector-effect=\"non-scaling-stroke\"\n />\n </svg> `;\n } else if (this.direction === AutomationButtonDirection.backward) {\n return html`<svg\n class=\"${className}\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M16 5 v 14 L 4 12Z\"\n stroke=\"var(--automation-device-tertiary-color)\"\n fill=\"var(--automation-device-primary-color)\"\n vector-effect=\"non-scaling-stroke\"\n />\n </svg>`;\n } else if (this.direction === AutomationButtonDirection.backwardFast) {\n return html`<svg\n class=\"${className}\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M20.5 5 v 14 l -8.5 -7 Z M9.5 5 v 14 l -8.5 -7 Z\"\n stroke=\"var(--automation-device-tertiary-color)\"\n fill=\"var(--automation-device-primary-color)\"\n vector-effect=\"non-scaling-stroke\"\n />\n </svg>`;\n } else if (this.direction === AutomationButtonDirection.backwardStopped) {\n return html`<svg\n class=\"${className}\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M16 5 v 14 L 4 12Z\"\n fill=\"var(--automation-device-tertiary-color)\"\n stroke=\"var(--automation-device-tertiary-inverted-color)\"\n vector-effect=\"non-scaling-stroke\"\n />\n </svg> `;\n } else if (this.direction === AutomationButtonDirection.standby) {\n return html`<obi-standby class=\"${className}\" usecsscolor></obi-standby>`;\n }\n throw new Error('Invalid direction');\n }\n\n private getIdTagOrientation(): IdTagOrientation {\n if (this.readoutPosition === AutomationButtonReadoutPosition.top) {\n return IdTagOrientation.top;\n }\n return IdTagOrientation.bottom;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'obc-automation-button': ObcAutomationButton;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAmCA,IAAY,0BAAL,yBAAA,yBAAA;CACL,wBAAA,aAAA;CACA,wBAAA,YAAA;CACA,wBAAA,aAAA;CACA,wBAAA,YAAA;CACA,wBAAA,UAAA;CACA,wBAAA,iBAAA;;AACF,EAAA,CAAA,CAAA;AAEA,IAAY,wBAAL,yBAAA,uBAAA;CACL,sBAAA,YAAA;CACA,sBAAA,UAAA;;AACF,EAAA,CAAA,CAAA;AAEA,IAAY,kCAAL,yBAAA,iCAAA;CACL,gCAAA,SAAA;CACA,gCAAA,YAAA;CACA,gCAAA,UAAA;CACA,gCAAA,WAAA;;AACF,EAAA,CAAA,CAAA;AAEA,IAAY,4BAAL,yBAAA,2BAAA;CACL,0BAAA,aAAA;CACA,0BAAA,iBAAA;CACA,0BAAA,oBAAA;CACA,0BAAA,cAAA;CACA,0BAAA,kBAAA;CACA,0BAAA,qBAAA;CACA,0BAAA,aAAA;;AACF,EAAA,CAAA,CAAA;AAEA,IAAY,iCAAL,yBAAA,gCAAA;CACL,+BAAA,QAAA;CACA,+BAAA,UAAA;CACA,+BAAA,UAAA;CACA,+BAAA,WAAA;CACA,+BAAA,UAAA;;AACF,EAAA,CAAA,CAAA;;;;;;;AAQA,IAAY,8BAAL,yBAAA,6BAAA;CACL,4BAAA,gBAAA;CACA,4BAAA,mBAAA;CACA,4BAAA,kBAAA;;AACF,EAAA,CAAA,CAAA;;;;;;;AAQA,IAAY,8BAAL,yBAAA,6BAAA;CACL,4BAAA,WAAA;CACA,4BAAA,YAAA;CACA,4BAAA,YAAA;;AACF,EAAA,CAAA,CAAA;AA+BO,IAAM,sBAAN,MAAM,4BAA4B,WAAW;;;;;EAKL,KAAA,SAAA;EACG,KAAA,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A,WAAA,aAAA,KAAA,CAAA;AAEvB,WAAA,CAAA,SAAS,EAAC,MAAM,OAAM,CAAC,CAAA,GAAA,oBAAA,WAAA,eAAA,KAAA,CAAA;AAEvB,WAAA,CAAA,SAAS,EAAC,MAAM,OAAM,CAAC,CAAA,GAAA,oBAAA,WAAA,eAAA,KAAA,CAAA;AAEvB,WAAA,CAAA,SAAS,EAAC,MAAM,QAAO,CAAC,CAAA,GAAA,oBAAA,WAAA,kBAAA,KAAA,CAAA;AAtC1B,sBAAA,WAAA,CAAA,cAAc,uBAAuB,CAAA,GAAA,mBAAA"}
|
|
@@ -2,7 +2,7 @@ import { HTMLTemplateResult, LitElement, nothing } from 'lit';
|
|
|
2
2
|
import { LineMedium } from '../index.js';
|
|
3
3
|
import { AutomationButtonBadgeAlert, AutomationButtonBadgeCommandLocked, AutomationButtonBadgeControl, AutomationButtonBadgeInterlock } from '../automation-button/abstract-automation-button.js';
|
|
4
4
|
import { Priority } from '../../navigation-instruments/types.js';
|
|
5
|
-
import { ObcAlertFrameThickness, ObcAlertFrameType } from '../../components/alert-frame/alert-frame.js';
|
|
5
|
+
import { ObcAlertFrameMode, ObcAlertFrameThickness, ObcAlertFrameType } from '../../components/alert-frame/alert-frame.js';
|
|
6
6
|
import { AlertType } from '../../types.js';
|
|
7
7
|
import { ChartLineDataItem } from '../../building-blocks/chart-line/chart-line-base.js';
|
|
8
8
|
import { LinearAdvice } from '../../building-blocks/instrument-linear/advice.js';
|
|
@@ -75,10 +75,23 @@ declare const ObcAutomationTank_base: (new (...args: any[]) => import('../../svg
|
|
|
75
75
|
* bar in `bar` mode.
|
|
76
76
|
* @property hasAdvice - Show advice overlays (works in all `chartMode` variants).
|
|
77
77
|
* @property alert - Show an `<obc-alert-frame>` overlay around the bordered tank area (the
|
|
78
|
-
* `.halo` wrapper). Mirrors the API of `obc-automation-button`: same
|
|
78
|
+
* `.halo` wrapper). Mirrors the API of `obc-automation-button`: same seven
|
|
79
79
|
* properties, same three slots (`alert-icon`, `alert-label`, `alert-timer`).
|
|
80
80
|
* The ring overlays `.halo` only, so the tag and readout that sit outside
|
|
81
81
|
* the halo in compact / static layouts remain unaffected.
|
|
82
|
+
* @property alertFrameType - Shape of the alert frame.
|
|
83
|
+
* @availableWhen alertFrameType alert==true
|
|
84
|
+
* @property alertFrameThickness - Thickness of the alert frame.
|
|
85
|
+
* @availableWhen alertFrameThickness alert==true
|
|
86
|
+
* @property alertFrameStatus - Alert status the frame is coloured for.
|
|
87
|
+
* @availableWhen alertFrameStatus alert==true
|
|
88
|
+
* @property alertFrameMode - Acknowledgement state of the alert: `acked-active` (default) is steady,
|
|
89
|
+
* `unacked-active` flashes, `unacked-rectified` flashes a dashed frame.
|
|
90
|
+
* @availableWhen alertFrameMode alert==true
|
|
91
|
+
* @property showAlertCategoryIcon - Shows the alert category icon inside the frame.
|
|
92
|
+
* @availableWhen showAlertCategoryIcon alert==true && alertFrameType in [SmallSideFlip, LargeSideFlip, BottomFlip, TopFlip]
|
|
93
|
+
* @property showAlertIcon - Shows the slotted alert icon inside the frame.
|
|
94
|
+
* @availableWhen showAlertIcon alert==true && alertFrameType in [LargeSideFlip, BottomFlip, TopFlip]
|
|
82
95
|
* @property showTrendSymbol - Show the trend chevron / off icon next to the percent readout. Default
|
|
83
96
|
* `true` preserves existing behavior. Set to `false` to hide the trend
|
|
84
97
|
* indicator in both compact and non-compact readouts — useful when the
|
|
@@ -169,12 +182,43 @@ export declare class ObcAutomationTank extends ObcAutomationTank_base {
|
|
|
169
182
|
hasAdvice: boolean;
|
|
170
183
|
/** Overlays a decorative icon centred on the chart cell — the energy-battery icon for a battery tank, the generic tank icon otherwise. Works in every `chartMode` and both orientations; the icon sits in a fixed CSS layer above the bar or graph and is silhouetted so it stays legible on any fill, and its size follows the ambient `obc-component-size-*` class. */
|
|
171
184
|
hasGraphIcon: boolean;
|
|
172
|
-
/** Show an `<obc-alert-frame>` overlay around the bordered tank area (the `.halo` wrapper). Mirrors the API of `obc-automation-button`: same
|
|
185
|
+
/** Show an `<obc-alert-frame>` overlay around the bordered tank area (the `.halo` wrapper). Mirrors the API of `obc-automation-button`: same seven properties, same three slots (`alert-icon`, `alert-label`, `alert-timer`). The ring overlays `.halo` only, so the tag and readout that sit outside the halo in compact / static layouts remain unaffected. */
|
|
173
186
|
alert: boolean;
|
|
187
|
+
/**
|
|
188
|
+
* Shape of the alert frame.
|
|
189
|
+
*
|
|
190
|
+
* Available when `alert==true`.
|
|
191
|
+
*/
|
|
174
192
|
alertFrameType: ObcAlertFrameType;
|
|
193
|
+
/**
|
|
194
|
+
* Thickness of the alert frame.
|
|
195
|
+
*
|
|
196
|
+
* Available when `alert==true`.
|
|
197
|
+
*/
|
|
175
198
|
alertFrameThickness: ObcAlertFrameThickness;
|
|
199
|
+
/**
|
|
200
|
+
* Alert status the frame is coloured for.
|
|
201
|
+
*
|
|
202
|
+
* Available when `alert==true`.
|
|
203
|
+
*/
|
|
176
204
|
alertFrameStatus: AlertType;
|
|
205
|
+
/**
|
|
206
|
+
* Acknowledgement state of the alert: `acked-active` (default) is steady, `unacked-active` flashes, `unacked-rectified` flashes a dashed frame.
|
|
207
|
+
*
|
|
208
|
+
* Available when `alert==true`.
|
|
209
|
+
*/
|
|
210
|
+
alertFrameMode: ObcAlertFrameMode;
|
|
211
|
+
/**
|
|
212
|
+
* Shows the alert category icon inside the frame.
|
|
213
|
+
*
|
|
214
|
+
* Available when `alert==true && alertFrameType in [SmallSideFlip, LargeSideFlip, BottomFlip, TopFlip]`.
|
|
215
|
+
*/
|
|
177
216
|
showAlertCategoryIcon: boolean;
|
|
217
|
+
/**
|
|
218
|
+
* Shows the slotted alert icon inside the frame.
|
|
219
|
+
*
|
|
220
|
+
* Available when `alert==true && alertFrameType in [LargeSideFlip, BottomFlip, TopFlip]`.
|
|
221
|
+
*/
|
|
178
222
|
showAlertIcon: boolean;
|
|
179
223
|
/** Show the trend chevron / off icon next to the percent readout. Default `true` preserves existing behavior. Set to `false` to hide the trend indicator in both compact and non-compact readouts — useful when the trend is not meaningful for a given tank, or when the consumer wants to keep the readout compact. Has no effect in `static` mode, which renders the tank's capacity (`max` + `unit`) instead of a percent and intentionally omits the trend indicator (a static tank represents "device present, current state unknown"). `attribute: false` per the repo's positive-default-true boolean convention. */
|
|
180
224
|
showTrendSymbol: boolean;
|
|
@@ -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,EAGR,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,oCAAoC,CAAC;AAC5C,OAAO,yDAAyD,CAAC;AACjE,OAAO,oDAAoD,CAAC;AAC5D,OAAO,6CAA6C,CAAC;AACrD,OAAO,EAAC,QAAQ,EAAC,MAAM,uCAAuC,CAAC;AAC/D,OAAO,EACL,sBAAsB,EACtB,iBAAiB,EAClB,MAAM,6CAA6C,CAAC;AACrD,OAAO,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AACzC,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,qDAAqD,CAAC;AAC3F,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,mDAAmD,CAAC;AAUpF,OAAO,EAAC,eAAe,EAAC,MAAM,uBAAuB,CAAC;AAGtD,oBAAY,SAAS;IACnB,UAAU,gBAAgB;IAC1B,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,OAAO,YAAY;IACnB,WAAW,iBAAiB;IAC5B,MAAM,WAAW;CAClB;AAED,oBAAY,QAAQ;IAClB,OAAO,YAAY;IACnB,WAAW,gBAAgB;IAC3B,WAAW,gBAAgB;IAC3B,OAAO,YAAY;CACpB;AAED,oBAAY,eAAe;IACzB,QAAQ,aAAa;IACrB,UAAU,eAAe;CAC1B;AAED,OAAO,EAAC,eAAe,EAAC,CAAC;AAEzB,oBAAY,aAAa;IACvB,gFAAgF;IAChF,GAAG,QAAQ;IACX,+DAA+D;IAC/D,KAAK,UAAU;IACf,kEAAkE;IAClE,WAAW,kBAAkB;CAC9B;;AAED
|
|
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,EAGR,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,oCAAoC,CAAC;AAC5C,OAAO,yDAAyD,CAAC;AACjE,OAAO,oDAAoD,CAAC;AAC5D,OAAO,6CAA6C,CAAC;AACrD,OAAO,EAAC,QAAQ,EAAC,MAAM,uCAAuC,CAAC;AAC/D,OAAO,EACL,iBAAiB,EACjB,sBAAsB,EACtB,iBAAiB,EAClB,MAAM,6CAA6C,CAAC;AACrD,OAAO,EAAC,SA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,OAAO,CAAC,wBAAwB;IA8BhC,SAAS,IAAI,kBAAkB,GAAG,OAAO,OAAO;IA0BhD;;;;;;;;;;;;;OAaG;IACH,OAAO,CAAC,oBAAoB;IA4I5B,OAAO,CAAC,SAAS;IAaR,MAAM;IAuWf,OAAgB,MAAM,0BAA2B;CAClD;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,qBAAqB,EAAE,iBAAiB,CAAC;KAC1C;CACF"}
|
|
@@ -13,7 +13,7 @@ import "../../icons/icon-off.js";
|
|
|
13
13
|
import "../../icons/icon-tank.js";
|
|
14
14
|
import { Priority } from "../../navigation-instruments/types.js";
|
|
15
15
|
import { SetpointMixin } from "../../svghelpers/setpoint-mixin.js";
|
|
16
|
-
import { ObcAlertFrameThickness, ObcAlertFrameType } from "../../components/alert-frame/alert-frame.js";
|
|
16
|
+
import { ObcAlertFrameMode, ObcAlertFrameThickness, ObcAlertFrameType } from "../../components/alert-frame/alert-frame.js";
|
|
17
17
|
import { ObcAutomationBadgeType } from "../automation-badge/automation-badge.js";
|
|
18
18
|
import { AutomationButtonBadgeAlert, AutomationButtonBadgeCommandLocked, AutomationButtonBadgeControl, AutomationButtonBadgeInterlock } from "../automation-button/abstract-automation-button.js";
|
|
19
19
|
import automation_tank_default from "./automation-tank.css.js";
|
|
@@ -80,6 +80,7 @@ var ObcAutomationTank = class ObcAutomationTank extends SetpointMixin(LitElement
|
|
|
80
80
|
this.alertFrameType = ObcAlertFrameType.SmallSideFlip;
|
|
81
81
|
this.alertFrameThickness = ObcAlertFrameThickness.Small;
|
|
82
82
|
this.alertFrameStatus = AlertType.Alarm;
|
|
83
|
+
this.alertFrameMode = ObcAlertFrameMode.ackedActive;
|
|
83
84
|
this.showAlertCategoryIcon = true;
|
|
84
85
|
this.showAlertIcon = false;
|
|
85
86
|
this.showTrendSymbol = true;
|
|
@@ -435,6 +436,7 @@ var ObcAutomationTank = class ObcAutomationTank extends SetpointMixin(LitElement
|
|
|
435
436
|
.type=${this.alertFrameType}
|
|
436
437
|
.thickness=${this.alertFrameThickness}
|
|
437
438
|
.status=${this.alertFrameStatus}
|
|
439
|
+
.mode=${this.alertFrameMode}
|
|
438
440
|
.showAlertCategoryIcon=${this.showAlertCategoryIcon}
|
|
439
441
|
.showIcon=${this.showAlertIcon}
|
|
440
442
|
>
|
|
@@ -638,6 +640,7 @@ __decorate([property({ type: Boolean })], ObcAutomationTank.prototype, "alert",
|
|
|
638
640
|
__decorate([property({ type: String })], ObcAutomationTank.prototype, "alertFrameType", void 0);
|
|
639
641
|
__decorate([property({ type: String })], ObcAutomationTank.prototype, "alertFrameThickness", void 0);
|
|
640
642
|
__decorate([property({ type: String })], ObcAutomationTank.prototype, "alertFrameStatus", void 0);
|
|
643
|
+
__decorate([property({ type: String })], ObcAutomationTank.prototype, "alertFrameMode", void 0);
|
|
641
644
|
__decorate([property({
|
|
642
645
|
type: Boolean,
|
|
643
646
|
attribute: false
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"automation-tank.js","names":[],"sources":["../../../src/automation/automation-tank/automation-tank.ts"],"sourcesContent":["import {\n HTMLTemplateResult,\n LitElement,\n html,\n nothing,\n svg,\n unsafeCSS,\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 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 type {LinearAdvice} from '../../building-blocks/instrument-linear/advice.js';\nimport {\n AdvicePosition,\n ExternalScaleSide,\n FillMode,\n computeSetpointBandThickness,\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 six\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 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 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 @property({type: Array, attribute: false})\n advice: LinearAdvice[] = [];\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: 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 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 .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 .advice=${this.advice}\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 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 = Math.max(\n this.hasAdvice ? 16 : 0,\n computeSetpointBandThickness({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.advice : []}\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":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAmDA,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;AA4FO,IAAM,oBAAN,MAAM,0BAA0B,cAAc,UAAU,CAAC,CAAC;;;EAChB,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;EAG/B,KAAA,SAAA,CAAC;EAEa,KAAA,YAAA;EAEqB,KAAA,eAAA;EAEhB,KAAA,QAAA;EAE1C,KAAA,iBAAA,kBAAkB;EAElB,KAAA,sBAAA,uBAAuB;EAC+B,KAAA,mBAAA,UAAU;EAEhE,KAAA,wBAAA;EACkD,KAAA,gBAAA;EAEoB,KAAA,kBAAA;EAEd,KAAA,wBAAA;EAGxD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CAAA,SAAS,EAAC,MAAM,OAAM,CAAC,CAAA,GAAA,kBAAA,WAAA,cAAA,KAAA,CAAA;AAEvB,WAAA,CAAA,SAAS,EAAC,MAAM,OAAM,CAAC,CAAA,GAAA,kBAAA,WAAA,kBAAA,KAAA,CAAA;AAEvB,WAAA,CAAA,SAAS,EAAC,MAAM,OAAM,CAAC,CAAA,GAAA,kBAAA,WAAA,sBAAA,KAAA,CAAA;AAIvB,WAAA,CAAA,MAAM,CAAA,GAAA,kBAAA,WAAA,cAAA,KAAA,CAAA;AACN,WAAA,CAAA,MAAM,CAAA,GAAA,kBAAA,WAAA,eAAA,KAAA,CAAA;AAQN,WAAA,CAAA,MAAM,CAAA,GAAA,kBAAA,WAAA,cAAA,KAAA,CAAA;AACN,WAAA,CAAA,MAAM,CAAA,GAAA,kBAAA,WAAA,eAAA,KAAA,CAAA;AAON,WAAA,CAAA,MAAM,CAAA,GAAA,kBAAA,WAAA,gBAAA,KAAA,CAAA;AAzER,oBAAA,WAAA,CAAA,cAAc,qBAAqB,CAAA,GAAA,iBAAA"}
|
|
1
|
+
{"version":3,"file":"automation-tank.js","names":[],"sources":["../../../src/automation/automation-tank/automation-tank.ts"],"sourcesContent":["import {\n HTMLTemplateResult,\n LitElement,\n html,\n nothing,\n svg,\n unsafeCSS,\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 type {LinearAdvice} from '../../building-blocks/instrument-linear/advice.js';\nimport {\n AdvicePosition,\n ExternalScaleSide,\n FillMode,\n computeSetpointBandThickness,\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 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 @property({type: Array, attribute: false})\n advice: LinearAdvice[] = [];\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 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 .advice=${this.advice}\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 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 = Math.max(\n this.hasAdvice ? 16 : 0,\n computeSetpointBandThickness({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.advice : []}\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":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAoDA,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,y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A,KAAA,CAAA;AACN,WAAA,CAAA,MAAM,CAAA,GAAA,kBAAA,WAAA,eAAA,KAAA,CAAA;AAON,WAAA,CAAA,MAAM,CAAA,GAAA,kBAAA,WAAA,gBAAA,KAAA,CAAA;AA3ER,oBAAA,WAAA,CAAA,cAAc,qBAAqB,CAAA,GAAA,iBAAA"}
|
|
@@ -16,7 +16,7 @@ import '../../icons/icon-heatexhanger.js';
|
|
|
16
16
|
* - Enum-driven badges (`badgeControl`, `badgeAlert`, `badgeInterlock`,
|
|
17
17
|
* `badgeCommandLocked`) or the `badges` slot fill the badge row; it
|
|
18
18
|
* collapses when empty, as does the tag cell.
|
|
19
|
-
* - Alert-frame overlay with the same
|
|
19
|
+
* - Alert-frame overlay with the same seven properties and three slots as
|
|
20
20
|
* `obc-automation-tank`.
|
|
21
21
|
* - `positioning`, `clickable` and `activated` behave as on
|
|
22
22
|
* `obc-automation-tank`.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"heat-exchanger.js","names":[],"sources":["../../../src/automation/heat-exchanger/heat-exchanger.ts"],"sourcesContent":["import {html, unsafeCSS} from 'lit';\nimport type {CSSResultGroup, TemplateResult} from 'lit';\nimport '../../icons/icon-heatexhanger.js';\nimport {\n ObcAbstractSpecialtyTank,\n SpecialtyTankFrame,\n SpecialtyTankSplitMode,\n} from '../specialty-tank/abstract-specialty-tank.js';\nimport hostStyle from './heat-exchanger.css?inline';\nimport {customElement} from '../../decorator.js';\n\n/**\n * `<obc-heat-exchanger>` – HVAC tile for a heat exchanger.\n *\n * A 56×142 pressurized-tank silhouette whose graphic area splits diagonally\n * into two corner-to-corner triangles — hot top-left, cold bottom-right —\n * around a centered heat-exchanger icon, with an optional badge row above\n * the frame and a tag readout below it.\n *\n * ## Features / Variants\n * - `medium` selects the graphic area: one grey area (`regular`), two grey\n * triangles (`graphic`) or hot/cold triangles (`medium`).\n * - `static` renders a flat, display-only tile with a bare icon.\n * - Enum-driven badges (`badgeControl`, `badgeAlert`, `badgeInterlock`,\n * `badgeCommandLocked`) or the `badges` slot fill the badge row; it\n * collapses when empty, as does the tag cell.\n * - Alert-frame overlay with the same
|
|
1
|
+
{"version":3,"file":"heat-exchanger.js","names":[],"sources":["../../../src/automation/heat-exchanger/heat-exchanger.ts"],"sourcesContent":["import {html, unsafeCSS} from 'lit';\nimport type {CSSResultGroup, TemplateResult} from 'lit';\nimport '../../icons/icon-heatexhanger.js';\nimport {\n ObcAbstractSpecialtyTank,\n SpecialtyTankFrame,\n SpecialtyTankSplitMode,\n} from '../specialty-tank/abstract-specialty-tank.js';\nimport hostStyle from './heat-exchanger.css?inline';\nimport {customElement} from '../../decorator.js';\n\n/**\n * `<obc-heat-exchanger>` – HVAC tile for a heat exchanger.\n *\n * A 56×142 pressurized-tank silhouette whose graphic area splits diagonally\n * into two corner-to-corner triangles — hot top-left, cold bottom-right —\n * around a centered heat-exchanger icon, with an optional badge row above\n * the frame and a tag readout below it.\n *\n * ## Features / Variants\n * - `medium` selects the graphic area: one grey area (`regular`), two grey\n * triangles (`graphic`) or hot/cold triangles (`medium`).\n * - `static` renders a flat, display-only tile with a bare icon.\n * - Enum-driven badges (`badgeControl`, `badgeAlert`, `badgeInterlock`,\n * `badgeCommandLocked`) or the `badges` slot fill the badge row; it\n * collapses when empty, as does the tag cell.\n * - Alert-frame overlay with the same seven properties and three slots as\n * `obc-automation-tank`.\n * - `positioning`, `clickable` and `activated` behave as on\n * `obc-automation-tank`.\n *\n * ## Usage Guidelines\n * Use for heat exchangers in automation system views. For heat pumps use\n * `obc-heat-pump` and for hydraulic separators `obc-hydraulic-separator`;\n * the three tiles differ only in footprint, icon and split geometry.\n *\n * @ignition-base-width: 56px\n * @ignition-base-height: 142px\n * @ignition-center-horizontal\n *\n * @slot badges - Custom badges, overriding the enum-driven defaults.\n * @slot tag - Text or element replacing the `tag` property readout.\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 tile is clicked. When `clickable` is `false` the tile 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-heat-exchanger')\nexport class ObcHeatExchanger extends ObcAbstractSpecialtyTank {\n protected override get equipmentIcon(): TemplateResult {\n return html`<obi-heatexhanger usecsscolor></obi-heatexhanger>`;\n }\n\n protected override get equipmentName(): string {\n return 'Heat exchanger';\n }\n\n protected override get frame(): SpecialtyTankFrame {\n return SpecialtyTankFrame.pressurized;\n }\n\n protected override get splitMode(): SpecialtyTankSplitMode {\n return SpecialtyTankSplitMode.diagonal;\n }\n\n static override styles: CSSResultGroup = [\n ObcAbstractSpecialtyTank.styles,\n unsafeCSS(hostStyle),\n ];\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'obc-heat-exchanger': ObcHeatExchanger;\n }\n}\n"],"mappings":";;;;;;;AAiDO,IAAM,mBAAN,MAAM,yBAAyB,yBAAyB;CAC7D,IAAuB,gBAAgC;EACrD,OAAO,IAAI;CACb;CAEA,IAAuB,gBAAwB;EAC7C,OAAO;CACT;CAEA,IAAuB,QAA4B;EACjD,OAAO,mBAAmB;CAC5B;CAEA,IAAuB,YAAoC;EACzD,OAAO,uBAAuB;CAChC;;EAEyC,KAAA,SAAA,CACvC,yBAAyB,QACzB,UAAU,sBAAS,CACrB;;AACF;AAtBC,mBAAA,WAAA,CAAA,cAAc,oBAAoB,CAAA,GAAA,gBAAA"}
|
|
@@ -15,7 +15,7 @@ import '../../icons/icon-heatpump.js';
|
|
|
15
15
|
* - Enum-driven badges (`badgeControl`, `badgeAlert`, `badgeInterlock`,
|
|
16
16
|
* `badgeCommandLocked`) or the `badges` slot fill the badge row; it
|
|
17
17
|
* collapses when empty, as does the tag cell.
|
|
18
|
-
* - Alert-frame overlay with the same
|
|
18
|
+
* - Alert-frame overlay with the same seven properties and three slots as
|
|
19
19
|
* `obc-automation-tank`.
|
|
20
20
|
* - `positioning`, `clickable` and `activated` behave as on
|
|
21
21
|
* `obc-automation-tank`.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"heat-pump.js","names":[],"sources":["../../../src/automation/heat-pump/heat-pump.ts"],"sourcesContent":["import {html, unsafeCSS} from 'lit';\nimport type {CSSResultGroup, TemplateResult} from 'lit';\nimport '../../icons/icon-heatpump.js';\nimport {\n ObcAbstractSpecialtyTank,\n SpecialtyTankFrame,\n SpecialtyTankSplitMode,\n} from '../specialty-tank/abstract-specialty-tank.js';\nimport hostStyle from './heat-pump.css?inline';\nimport {customElement} from '../../decorator.js';\n\n/**\n * `<obc-heat-pump>` – HVAC tile for a heat pump.\n *\n * A 152×96 rounded frame whose graphic area splits vertically — hot on the\n * left, cold on the right — around a centered heat-pump icon, with an\n * optional badge row above the frame and a tag readout below it.\n *\n * ## Features / Variants\n * - `medium` selects the graphic area: one grey area (`regular`), two grey\n * halves (`graphic`) or hot/cold halves (`medium`).\n * - `static` renders a flat, display-only tile with a bare icon.\n * - Enum-driven badges (`badgeControl`, `badgeAlert`, `badgeInterlock`,\n * `badgeCommandLocked`) or the `badges` slot fill the badge row; it\n * collapses when empty, as does the tag cell.\n * - Alert-frame overlay with the same
|
|
1
|
+
{"version":3,"file":"heat-pump.js","names":[],"sources":["../../../src/automation/heat-pump/heat-pump.ts"],"sourcesContent":["import {html, unsafeCSS} from 'lit';\nimport type {CSSResultGroup, TemplateResult} from 'lit';\nimport '../../icons/icon-heatpump.js';\nimport {\n ObcAbstractSpecialtyTank,\n SpecialtyTankFrame,\n SpecialtyTankSplitMode,\n} from '../specialty-tank/abstract-specialty-tank.js';\nimport hostStyle from './heat-pump.css?inline';\nimport {customElement} from '../../decorator.js';\n\n/**\n * `<obc-heat-pump>` – HVAC tile for a heat pump.\n *\n * A 152×96 rounded frame whose graphic area splits vertically — hot on the\n * left, cold on the right — around a centered heat-pump icon, with an\n * optional badge row above the frame and a tag readout below it.\n *\n * ## Features / Variants\n * - `medium` selects the graphic area: one grey area (`regular`), two grey\n * halves (`graphic`) or hot/cold halves (`medium`).\n * - `static` renders a flat, display-only tile with a bare icon.\n * - Enum-driven badges (`badgeControl`, `badgeAlert`, `badgeInterlock`,\n * `badgeCommandLocked`) or the `badges` slot fill the badge row; it\n * collapses when empty, as does the tag cell.\n * - Alert-frame overlay with the same seven properties and three slots as\n * `obc-automation-tank`.\n * - `positioning`, `clickable` and `activated` behave as on\n * `obc-automation-tank`.\n *\n * ## Usage Guidelines\n * Use for heat pumps in automation system views. For hydraulic separators use\n * `obc-hydraulic-separator` and for heat exchangers `obc-heat-exchanger`;\n * the three tiles differ only in footprint, icon and split geometry.\n *\n * @ignition-base-width: 152px\n * @ignition-base-height: 96px\n * @ignition-center-horizontal\n *\n * @slot badges - Custom badges, overriding the enum-driven defaults.\n * @slot tag - Text or element replacing the `tag` property readout.\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 tile is clicked. When `clickable` is `false` the tile 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-heat-pump')\nexport class ObcHeatPump extends ObcAbstractSpecialtyTank {\n protected override get equipmentIcon(): TemplateResult {\n return html`<obi-heatpump usecsscolor></obi-heatpump>`;\n }\n\n protected override get equipmentName(): string {\n return 'Heat pump';\n }\n\n protected override get frame(): SpecialtyTankFrame {\n return SpecialtyTankFrame.rounded;\n }\n\n protected override get splitMode(): SpecialtyTankSplitMode {\n return SpecialtyTankSplitMode.vertical;\n }\n\n static override styles: CSSResultGroup = [\n ObcAbstractSpecialtyTank.styles,\n unsafeCSS(hostStyle),\n ];\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'obc-heat-pump': ObcHeatPump;\n }\n}\n"],"mappings":";;;;;;;AAgDO,IAAM,cAAN,MAAM,oBAAoB,yBAAyB;CACxD,IAAuB,gBAAgC;EACrD,OAAO,IAAI;CACb;CAEA,IAAuB,gBAAwB;EAC7C,OAAO;CACT;CAEA,IAAuB,QAA4B;EACjD,OAAO,mBAAmB;CAC5B;CAEA,IAAuB,YAAoC;EACzD,OAAO,uBAAuB;CAChC;;EAEyC,KAAA,SAAA,CACvC,yBAAyB,QACzB,UAAU,iBAAS,CACrB;;AACF;AAtBC,cAAA,WAAA,CAAA,cAAc,eAAe,CAAA,GAAA,WAAA"}
|
|
@@ -16,7 +16,7 @@ import '../../icons/icon-hydraulic-separator.js';
|
|
|
16
16
|
* - Enum-driven badges (`badgeControl`, `badgeAlert`, `badgeInterlock`,
|
|
17
17
|
* `badgeCommandLocked`) or the `badges` slot fill the badge row; it
|
|
18
18
|
* collapses when empty, as does the tag cell.
|
|
19
|
-
* - Alert-frame overlay with the same
|
|
19
|
+
* - Alert-frame overlay with the same seven properties and three slots as
|
|
20
20
|
* `obc-automation-tank`.
|
|
21
21
|
* - `positioning`, `clickable` and `activated` behave as on
|
|
22
22
|
* `obc-automation-tank`.
|