@oicl/openbridge-webcomponents 2.0.0-next.57 → 2.0.0-next.59
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle/openbridge-webcomponents.bundle.js +6585 -4581
- package/bundle/openbridge-webcomponents.bundle.js.map +1 -1
- package/custom-elements.json +1047 -83
- package/dist/alert-severity.d.ts +38 -0
- package/dist/alert-severity.d.ts.map +1 -0
- package/dist/alert-severity.js +176 -0
- package/dist/alert-severity.js.map +1 -0
- package/dist/ar/building-blocks/poi-header/poi-header.css.js +38 -7
- package/dist/ar/building-blocks/poi-header/poi-header.css.js.map +1 -1
- package/dist/ar/building-blocks/poi-header/poi-header.d.ts +7 -2
- package/dist/ar/building-blocks/poi-header/poi-header.d.ts.map +1 -1
- package/dist/ar/building-blocks/poi-header/poi-header.js +5 -0
- package/dist/ar/building-blocks/poi-header/poi-header.js.map +1 -1
- package/dist/ar/poi-button/poi-button.css.js +110 -32
- package/dist/ar/poi-button/poi-button.css.js.map +1 -1
- package/dist/ar/poi-button/poi-button.d.ts +7 -2
- package/dist/ar/poi-button/poi-button.d.ts.map +1 -1
- package/dist/ar/poi-button/poi-button.js +15 -0
- package/dist/ar/poi-button/poi-button.js.map +1 -1
- package/dist/ar/types.d.ts +6 -1
- package/dist/ar/types.d.ts.map +1 -1
- package/dist/ar/types.js +5 -0
- package/dist/ar/types.js.map +1 -1
- package/dist/automation/automation-badge/automation-badge.d.ts +9 -1
- package/dist/automation/automation-badge/automation-badge.d.ts.map +1 -1
- package/dist/automation/automation-badge/automation-badge.js +119 -12
- package/dist/automation/automation-badge/automation-badge.js.map +1 -1
- package/dist/automation/automation-button/abstract-automation-button-storybook-helpers.d.ts +25 -1
- 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 +7 -2
- package/dist/automation/automation-button/abstract-automation-button-storybook-helpers.js.map +1 -1
- package/dist/automation/automation-button/abstract-automation-button.d.ts +10 -3
- package/dist/automation/automation-button/abstract-automation-button.d.ts.map +1 -1
- package/dist/automation/automation-button/abstract-automation-button.js +23 -2
- package/dist/automation/automation-button/abstract-automation-button.js.map +1 -1
- package/dist/automation/automation-button/automation-button.css.js +9 -4
- package/dist/automation/automation-button/automation-button.css.js.map +1 -1
- package/dist/automation/automation-button/automation-button.d.ts +4 -2
- package/dist/automation/automation-button/automation-button.d.ts.map +1 -1
- package/dist/automation/automation-button/automation-button.js +24 -6
- package/dist/automation/automation-button/automation-button.js.map +1 -1
- package/dist/automation/automation-tank/automation-tank.d.ts +3 -2
- package/dist/automation/automation-tank/automation-tank.d.ts.map +1 -1
- package/dist/automation/automation-tank/automation-tank.js +13 -2
- package/dist/automation/automation-tank/automation-tank.js.map +1 -1
- package/dist/building-blocks/instrument-radial/instrument-radial.d.ts +10 -0
- package/dist/building-blocks/instrument-radial/instrument-radial.d.ts.map +1 -1
- package/dist/building-blocks/instrument-radial/instrument-radial.js +86 -21
- package/dist/building-blocks/instrument-radial/instrument-radial.js.map +1 -1
- package/dist/components/accordion-card/accordion-card.css.js +34 -0
- package/dist/components/accordion-card/accordion-card.css.js.map +1 -1
- package/dist/components/accordion-card/accordion-card.d.ts +3 -2
- package/dist/components/accordion-card/accordion-card.d.ts.map +1 -1
- package/dist/components/accordion-card/accordion-card.js +4 -3
- package/dist/components/accordion-card/accordion-card.js.map +1 -1
- package/dist/components/alert-button/alert-button.css.js +744 -7
- package/dist/components/alert-button/alert-button.css.js.map +1 -1
- package/dist/components/alert-button/alert-button.d.ts +3 -1
- package/dist/components/alert-button/alert-button.d.ts.map +1 -1
- package/dist/components/alert-button/alert-button.js +33 -31
- package/dist/components/alert-button/alert-button.js.map +1 -1
- package/dist/components/alert-frame/alert-frame.css.js +116 -29
- package/dist/components/alert-frame/alert-frame.css.js.map +1 -1
- package/dist/components/alert-frame/alert-frame.d.ts +42 -15
- package/dist/components/alert-frame/alert-frame.d.ts.map +1 -1
- package/dist/components/alert-frame/alert-frame.js +68 -17
- package/dist/components/alert-frame/alert-frame.js.map +1 -1
- package/dist/components/alert-frame/critical-badge.d.ts +12 -0
- package/dist/components/alert-frame/critical-badge.d.ts.map +1 -0
- package/dist/components/alert-frame/critical-badge.js +47 -0
- package/dist/components/alert-frame/critical-badge.js.map +1 -0
- package/dist/components/alert-frame/diagnostic-badge.d.ts +12 -0
- package/dist/components/alert-frame/diagnostic-badge.d.ts.map +1 -0
- package/dist/components/alert-frame/diagnostic-badge.js +60 -0
- package/dist/components/alert-frame/diagnostic-badge.js.map +1 -0
- package/dist/components/alert-icon/alert-icon.d.ts +6 -1
- package/dist/components/alert-icon/alert-icon.d.ts.map +1 -1
- package/dist/components/alert-icon/alert-icon.js +96 -38
- package/dist/components/alert-icon/alert-icon.js.map +1 -1
- package/dist/components/alert-icon/icons/icon-critical.d.ts +3 -0
- package/dist/components/alert-icon/icons/icon-critical.d.ts.map +1 -0
- package/dist/components/alert-icon/icons/icon-critical.js +26 -0
- package/dist/components/alert-icon/icons/icon-critical.js.map +1 -0
- package/dist/components/alert-list-details/alert-list-details.d.ts.map +1 -1
- package/dist/components/alert-list-details/alert-list-details.js +6 -7
- package/dist/components/alert-list-details/alert-list-details.js.map +1 -1
- package/dist/components/badge/badge.css.js +50 -2
- package/dist/components/badge/badge.css.js.map +1 -1
- package/dist/components/badge/badge.d.ts +13 -2
- package/dist/components/badge/badge.d.ts.map +1 -1
- package/dist/components/badge/badge.js +54 -0
- package/dist/components/badge/badge.js.map +1 -1
- package/dist/index.js +2 -1
- package/dist/manual-icon/icon-alerts-critical-twotone.d.ts +30 -0
- package/dist/manual-icon/icon-alerts-critical-twotone.d.ts.map +1 -0
- package/dist/manual-icon/icon-alerts-critical-twotone.js +55 -0
- package/dist/manual-icon/icon-alerts-critical-twotone.js.map +1 -0
- package/dist/manual-icon/icon-alerts-diagnostic-twotone.d.ts +30 -0
- package/dist/manual-icon/icon-alerts-diagnostic-twotone.d.ts.map +1 -0
- package/dist/manual-icon/icon-alerts-diagnostic-twotone.js +55 -0
- package/dist/manual-icon/icon-alerts-diagnostic-twotone.js.map +1 -0
- package/dist/navigation-instruments/gauge-radial/gauge-radial.css.js +99 -0
- package/dist/navigation-instruments/gauge-radial/gauge-radial.css.js.map +1 -0
- package/dist/navigation-instruments/gauge-radial/gauge-radial.d.ts +42 -7
- package/dist/navigation-instruments/gauge-radial/gauge-radial.d.ts.map +1 -1
- package/dist/navigation-instruments/gauge-radial/gauge-radial.js +178 -31
- package/dist/navigation-instruments/gauge-radial/gauge-radial.js.map +1 -1
- package/dist/navigation-instruments/readout/readout.css.js +7 -18
- package/dist/navigation-instruments/readout/readout.css.js.map +1 -1
- package/dist/navigation-instruments/readout/readout.d.ts +6 -7
- package/dist/navigation-instruments/readout/readout.d.ts.map +1 -1
- package/dist/navigation-instruments/readout/readout.js +54 -52
- package/dist/navigation-instruments/readout/readout.js.map +1 -1
- package/dist/navigation-instruments/readout-list-item/readout-list-item.css.js +9 -36
- 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 +8 -8
- 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 +49 -42
- package/dist/navigation-instruments/readout-list-item/readout-list-item.js.map +1 -1
- package/dist/navigation-instruments/watch/tickmark.d.ts +2 -1
- package/dist/navigation-instruments/watch/tickmark.d.ts.map +1 -1
- package/dist/navigation-instruments/watch/tickmark.js +24 -4
- package/dist/navigation-instruments/watch/tickmark.js.map +1 -1
- package/dist/navigation-instruments/watch/watch.d.ts +23 -1
- package/dist/navigation-instruments/watch/watch.d.ts.map +1 -1
- package/dist/navigation-instruments/watch/watch.js +48 -20
- package/dist/navigation-instruments/watch/watch.js.map +1 -1
- package/dist/openbridge.css +155 -0
- package/dist/types.d.ts +7 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +18 -7
- package/dist/types.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"automation-tank.js","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-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 ObcAlertFrameStatus,\n ObcAlertFrameThickness,\n ObcAlertFrameType,\n} from '../../components/alert-frame/alert-frame.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} from '../../building-blocks/external-scale/external-scale.js';\nimport {classMap} from 'lit/directives/class-map.js';\nimport {customElement} from '../../decorator.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\n/**\n * Host positioning model.\n *\n * - `point` (default): the host has fixed default dimensions (per\n * orientation and compact / static variant) and a P&ID anchor — the\n * visual content is shifted with `translateX(-50%)` and (in non-compact)\n * `top: -20px` so the tank's top-center aligns with the host's top-left\n * placement coordinate. Use this when dropping the tank onto a P&ID\n * canvas at a pipe-grid coordinate.\n * - `button`: the host fills its parent container (100% × 100%) with no\n * anchor offset. Use this when embedding the tank inside a sized layout\n * slot — the parent controls the footprint and the tank renders\n * responsively inside it, just like a regular button. Compact / static\n * inner layout still applies; only the host box is changed.\n */\nexport enum TankPositioning {\n point = 'point',\n button = 'button',\n}\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 * A single detail row rendered in the tank's `readout` rich list (below the\n * main percent / value block, separated by a divider). Each row is rendered\n * as `<label>` on the left and `<value><degree?><percent?><unit>` on the\n * right, all on a single line.\n */\nexport interface TankReadoutItem {\n /** Left-aligned label text (e.g. `Temperature`). */\n label: string;\n /** Numeric value, formatted with the tank's `percentFractionDigits`. */\n value: number;\n /** Append a `°` glyph directly after the value with no gap. */\n hasDegree?: boolean;\n /** Append a `%` glyph directly after the value with no gap. */\n hasPercentage?: boolean;\n /** Unit text (e.g. `C`, `Pa`, `m/s`). Rendered after the value/glyph. */\n unit: string;\n}\n\n/**\n *\n *\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 - Content for additional detail rows.\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 *\n * @ignition-base-height: 173px\n * @ignition-base-width: 168px\n * @ignition-center-horizontal\n */\n@customElement('obc-automation-tank')\nexport class ObcAutomationTank extends 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 /**\n * Host positioning model — see `TankPositioning` for details. Defaults to\n * `point` for backward compatibility (fixed default dimensions + P&ID\n * top-center anchor). Set to `button` to make the host fill its parent\n * container (100% × 100%) with no anchor offset.\n */\n @property({type: String, reflect: true}) positioning: TankPositioning =\n TankPositioning.point;\n /**\n * Static (display-only) variant. Always rendered at the compact size; the\n * inner chart/bar is hidden, the bordered area is filled with\n * `--container-section-color`, and the readout is centered inside the frame.\n * Tag is rendered below the bordered area; badges (when slotted) sit above\n * the frame inside the halo and shrink the frame just like in compact mode.\n * Overrides `compact` (a static tank is always compact-sized).\n *\n * Static tanks render as a non-interactive `<div role=\"img\">` (not a\n * `<button>`), so they are not in the tab order and do not announce as\n * activatable controls.\n */\n @property({type: Boolean, reflect: true}) static: boolean = false;\n @property({type: String}) tag: string = '';\n\n /**\n * Chart cell rendering mode.\n * - `bar`: static fill bar driven by `value`/`max` (default).\n * - `graph`: embedded `obc-gauge-trend` line/area chart.\n * - `graphAndBar`: embedded `obc-gauge-trend` with an integrated side bar.\n */\n @property({type: String, reflect: true, attribute: 'chart-mode'})\n chartMode: TankChartMode = TankChartMode.bar;\n\n /** Time-series data points for the embedded gauge-trend (graph modes only). */\n @property({type: Array, attribute: false})\n chartData: ChartLineDataItem[] = [];\n\n /** Priority hint forwarded to child charts (regular | enhanced). */\n @property({type: String}) priority: Priority = Priority.regular;\n\n /**\n * 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 */\n @property({type: Array, attribute: false})\n advice: LinearAdvice[] = [];\n\n /** Show advice overlays (works in all `chartMode` variants). */\n @property({type: Boolean}) hasAdvice = false;\n\n /**\n * Overlay a 32×32 decorative icon (currently `<obi-tank>`) centered on the\n * chart cell. Works in all three `chartMode` variants (bar, graph,\n * graph-and-bar) and in both orientations. The icon is rendered above the\n * bar/graph in a fixed CSS layer (does not scale with the SVG meet\n * transform) and is silhouetted with a `--border-silhouette-color` halo so\n * it stays legible on any underlying fill. The icon size scales with the\n * ambient `obc-component-size-*` class on an ancestor via the design token\n * `--automation-components-tanks-graphs-graph-icon-size` (32 → 48 → 64 → 64\n * for regular → medium → large → xl).\n *\n * TODO(future): replace the hard-coded `<obi-tank>` with a `slot=\"graph-icon\"`\n * so consumers can pass any `<obi-*>` icon. The current API ships the\n * smallest viable surface; the slot can be added without breaking the\n * boolean property.\n */\n @property({type: Boolean, attribute: false}) hasGraphIcon = false;\n\n /**\n * 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 */\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: ObcAlertFrameStatus =\n ObcAlertFrameStatus.Alarm;\n @property({type: Boolean, attribute: false}) showAlertCategoryIcon: boolean =\n true;\n @property({type: Boolean}) showAlertIcon: boolean = false;\n\n /**\n * 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 */\n @property({type: Boolean, attribute: false}) showTrendSymbol: boolean = true;\n\n /**\n * 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 */\n @property({type: Number}) percentFractionDigits: number = 0;\n\n /**\n * Rich detail rows shown below the main percent/value block in the regular\n * (non-compact, non-static) layout, separated by a divider. When empty (the\n * default), nothing is rendered — neither the divider nor the list. In\n * vertical orientation the chart cell shrinks to make room; in horizontal\n * orientation the readout column already has reserved whitespace so the\n * chart is unaffected.\n *\n * Values are formatted using `percentFractionDigits`. Consumers that need\n * full control over the markup can replace the entire fallback by slotting\n * arbitrary content into `slot=\"rich\"` (note: this is a different name from\n * the existing `slot=\"readout\"` which replaces the whole readout block).\n */\n @property({type: Array, attribute: false}) readout: TankReadoutItem[] = [];\n\n /**\n * Enum-driven badges rendered inside the `badges` cell. Mirrors the API\n * introduced for `ObcAbstractAutomationButton` in PR #839 (#829). When set\n * to a non-`None` value, an `<obc-automation-badge>` of the corresponding\n * type is rendered as fallback content for the `badges` slot. Any content\n * the consumer slots into `badges` overrides these defaults, preserving\n * backward compatibility with the existing slot-based API.\n *\n * Render order (left → right): control, alert, interlock, commandLocked —\n * matching the positional convention used by `ObcAbstractAutomationButton`\n * (top-left, top-right, bottom-left, bottom-right) read row-by-row.\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 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 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 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 // No imperative forwarding here — child components receive `priority`\n // via template property bindings (`.priority=${this.priority}`). Rely on\n // their reactive `updated()` logic (e.g. `ObcGaugeTrend._updateBarVerticalProperties()`)\n // to propagate palette changes internally.\n // The chart cell DOM element is recreated when chartMode toggles between\n // bar and graph modes (different class/contents), and may also appear/\n // disappear with static/compact. Re-attach the observer to the current\n // .bar-container instance.\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 // stable: render no icon\n return nothing;\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 // Path data. Two variants — regular (14px tall, 12px corners) and compact\n // (10px tall, 7px corners). Curve Y-values are proportionally scaled from\n // the original 18/12-tall Figma reference so the corner curves stay\n // continuous at the new thickness.\n // Horizontal orientation reuses the same vertical path data inside an\n // inner `<g transform=\"translate(0 H) rotate(-90)\">`; the SVG viewBox is\n // swapped accordingly. Cap-end is mirrored via CSS scaleY/scaleX(-1).\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 // Stroke draws the curve + outer vertical edge only. The seam with\n // `.middle` (y = capH) is painted by a 1px CSS `border-top` on\n // `.tank-frame.type-atmospheric:not(.compact) .middle` so it pixel-\n // snaps identically to the pressurized cap's CSS border. Drawing it\n // as an SVG stroke here would render thinner / blurrier due to\n // sub-pixel anti-aliasing.\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 = Math.max(0, Math.min(100, (this.value / safeMax) * 100));\n const isCompact = this.isCompact;\n\n // In compact/static the `.halo` is a fixed-size column flex container\n // that holds badges + tank-frame + (compact only) readout + tag. To let\n // the tank-frame absorb the freed space when adjacent cells are empty,\n // we collapse the empty cells with the `hidden` attribute (see CSS).\n // In non-compact mode cells live inside the inner `.grid` and always\n // reserve their min-content rows — unchanged from previous behavior.\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 ${controlBadge\n ? html`<obc-automation-badge\n .type=${controlBadge}\n ></obc-automation-badge>`\n : nothing}\n ${alertBadge\n ? html`<obc-automation-badge\n .type=${alertBadge}\n ></obc-automation-badge>`\n : nothing}\n ${interlockBadge\n ? html`<obc-automation-badge\n .type=${interlockBadge}\n ></obc-automation-badge>`\n : nothing}\n ${commandLockedBadge\n ? html`<obc-automation-badge\n .type=${commandLockedBadge}\n ></obc-automation-badge>`\n : nothing}\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 mode intentionally renders the tank's capacity (max + unit)\n // instead of a percent reading: a static tank represents \"device is\n // present, current state unknown\", so a percent value would be\n // misleading. The trend icon is omitted for the same reason. Consumers\n // who need a custom label can still override the whole cell via the\n // `readout` slot, or supply formatted text through the existing\n // `max-value` / `unit` slots (no new API).\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 <slot name=\"rich\">\n ${this.readout.length > 0\n ? html`\n <div class=\"rich-divider\"></div>\n <div class=\"rich\">\n ${this.readout.map(\n (row) => html`\n <div class=\"rich-row\">\n <span class=\"rich-label\">${row.label}</span>\n <span class=\"rich-value\"\n >${row.value.toFixed(\n this.percentFractionDigits\n )}</span\n >\n <span class=\"rich-suffix\"\n >${row.hasDegree\n ? html`<span class=\"rich-glyph\">°</span>`\n : nothing}${row.hasPercentage\n ? html`<span class=\"rich-glyph\">%</span>`\n : nothing}<span class=\"rich-unit\"\n >${row.unit}</span\n ></span\n >\n </div>\n `\n )}\n </div>\n `\n : nothing}\n </slot>\n </slot>\n </div>\n `;\n // Decorative icon overlay (centered on the chart cell). Two stacked\n // icon elements: the back layer paints an inherited SVG `stroke` halo\n // (the icon's paths use `fill=\"currentColor\"`, and SVG `stroke` is\n // inherited across the icon's shadow DOM); the front layer paints the\n // colored fill via the `color` property. This mirrors the established\n // silhouette pattern used by `obc-automation-button` (back-layer slot\n // with stroke, front-layer slot with fill).\n //\n // The icon variant follows `type`: battery tanks show an energy-battery\n // icon, all other types show the generic tank icon.\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 // Forward the measured cell size as the gauge-trend's width/height,\n // which it interprets as an aspect-ratio reference. Its internal\n // ResizeObserver then picks up its own wrapper's clientWidth (= cell\n // width, since we set style width:100%) and computes height from the\n // aspect ratio — so the chart matches the cell exactly. We delay\n // rendering until both dimensions are measured to avoid a divide-by-\n // zero in the aspect-ratio math on first paint.\n const hasSize = this._cellWidth > 0 && this._cellHeight > 0;\n chartCell = html`\n <div class=\"bar-container chart-cell\">\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 style=\"width: 100%; height: 100%;\"\n .priority=${this.priority}\n ></obc-gauge-trend>`\n : null}\n ${this.hasGraphIcon ? graphIconOverlay : null}\n </div>\n `;\n } else {\n // Bar mode: render the shared SVG bar (`obc-bar-vertical` /\n // `-horizontal`) — the same renderer used by gauge-trend's side bar —\n // so advice overlays work the same way across all three chart modes.\n //\n // TODO(refactor): once `obc-gauge-trend` supports a bar-only layout at\n // this size (no chart-line area), migrate this branch to gauge-trend\n // too so all three chart modes share a single implementation.\n //\n // TODO(theming): the bar fill currently uses the standard instrument\n // palette (`--instrument-regular-tertiary-color` for tint mode). The\n // legacy CSS bar used per-medium colors (e.g. `--automation-medium-fuel`).\n // Extend `external-scale.ts` (and the bar-vertical/-horizontal wrappers)\n // to accept a medium / fuel color so the tank can restore its\n // per-`medium` coloring through the shared renderer.\n const hasSize = this._cellWidth > 0 && this._cellHeight > 0;\n // The inner bar always renders vertically, regardless of the tank's\n // outer `orientation`. Only the tank's outer wrapper flips; its inner\n // chart cell stays portrait. This matches gauge-trend behavior.\n //\n // Match gauge-trend's proportional sizing so advice pills (and other\n // fixed-pixel SVG primitives) render at the same on-screen size in\n // every chart mode. We mirror gauge-trend's defaults exactly:\n // `fixedAspectRatio=true` + `scaleReferenceSize=384`. The bar SVG is\n // then built in a 384-unit-tall viewBox and shrunk into the cell via\n // `xMidYMid meet`, giving on-screen scale = cellHeight / 384.\n //\n // Because the meet transform scales the viewBox uniformly, we must\n // also size `barThickness` in viewBox units (not cell pixels) so the\n // bar still fills the cell width after scaling. We pick the viewBox\n // cross-axis size so width-fit and height-fit ratios match exactly\n // (no horizontal gutters): viewBoxCross = cellWidth * 384 / cellHeight.\n const SCALE_REFERENCE_SIZE = 384;\n const adviceReserveVb = this.hasAdvice ? 16 : 0;\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 - adviceReserveVb);\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 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 // Whole component is one interactive element. The halo (flat-mixin\n // border/background that appears on hover/pressed/focus) is painted on\n // the inner `.halo` wrapper via `visibleWrapperClass`, so the surround\n // hugs only the bordered area:\n // - non-compact: just the tank-frame (grid inside it carries badges,\n // readout, tag).\n // - compact: fixed-size column flex — badges, tank-frame (flex-grow),\n // readout, tag. Empty cells (badges/tag) collapse via `?hidden`\n // above so the tank-frame absorbs the freed space.\n // - static: same as compact but no separate readout cell (the readout\n // is centered INSIDE the tank-frame via `static-readout`).\n //\n // The alert-frame overlay is the last child of `.halo` so the ring\n // overlays every cell (and any cell-collapse mechanics work uniformly).\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 // `aria-live=\"polite\"` + `aria-atomic=\"true\"` on the root so the\n // slotted alert label (and any state change of the alert frame) is\n // announced once when `alert` flips on. Always present — an empty live\n // region is harmless and avoids screen-reader re-registration races.\n // TODO(a11y): the rest of the automation component family still lacks\n // this live-region announcement; consolidate when alert support is\n // factored into a shared mixin.\n return html`\n ${this.static\n ? html`<div\n class=\"root\"\n role=\"img\"\n aria-label=${this.tag || 'Tank'}\n aria-live=\"polite\"\n aria-atomic=\"true\"\n >\n ${halo}\n </div>`\n : html`<button\n class=\"root\"\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\n static override styles = unsafeCSS(compentStyle);\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'obc-automation-tank': ObcAutomationTank;\n }\n}\n"],"names":["TankTrend","TankType","TankOrientation","TankPositioning","TankChartMode"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8CO,IAAK,8BAAAA,eAAL;AACLA,aAAA,YAAA,IAAa;AACbA,aAAA,QAAA,IAAS;AACTA,aAAA,QAAA,IAAS;AACTA,aAAA,SAAA,IAAU;AACVA,aAAA,aAAA,IAAc;AACdA,aAAA,QAAA,IAAS;AANC,SAAAA;AAAA,GAAA,aAAA,CAAA,CAAA;AASL,IAAK,6BAAAC,cAAL;AACLA,YAAA,SAAA,IAAU;AACVA,YAAA,aAAA,IAAc;AACdA,YAAA,aAAA,IAAc;AACdA,YAAA,SAAA,IAAU;AAJA,SAAAA;AAAA,GAAA,YAAA,CAAA,CAAA;AAOL,IAAK,oCAAAC,qBAAL;AACLA,mBAAA,UAAA,IAAW;AACXA,mBAAA,YAAA,IAAa;AAFH,SAAAA;AAAA,GAAA,mBAAA,CAAA,CAAA;AAoBL,IAAK,oCAAAC,qBAAL;AACLA,mBAAA,OAAA,IAAQ;AACRA,mBAAA,QAAA,IAAS;AAFC,SAAAA;AAAA,GAAA,mBAA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BAsKM,WAAA,eAAA,CAAA;AAtKN,oBAAN,gBAAA;AAAA,EADN,cAAc,qBAAqB;AAAA,GACvB,iBAAA;"}
|
|
1
|
+
{"version":3,"file":"automation-tank.js","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-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} from '../../building-blocks/external-scale/external-scale.js';\nimport {classMap} from 'lit/directives/class-map.js';\nimport {customElement} from '../../decorator.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\n/**\n * Host positioning model.\n *\n * - `point` (default): the host has fixed default dimensions (per\n * orientation and compact / static variant) and a P&ID anchor — the\n * visual content is shifted with `translateX(-50%)` and (in non-compact)\n * `top: -20px` so the tank's top-center aligns with the host's top-left\n * placement coordinate. Use this when dropping the tank onto a P&ID\n * canvas at a pipe-grid coordinate.\n * - `button`: the host fills its parent container (100% × 100%) with no\n * anchor offset. Use this when embedding the tank inside a sized layout\n * slot — the parent controls the footprint and the tank renders\n * responsively inside it, just like a regular button. Compact / static\n * inner layout still applies; only the host box is changed.\n */\nexport enum TankPositioning {\n point = 'point',\n button = 'button',\n}\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 * A single detail row rendered in the tank's `readout` rich list (below the\n * main percent / value block, separated by a divider). Each row is rendered\n * as `<label>` on the left and `<value><degree?><percent?><unit>` on the\n * right, all on a single line.\n */\nexport interface TankReadoutItem {\n /** Left-aligned label text (e.g. `Temperature`). */\n label: string;\n /** Numeric value, formatted with the tank's `percentFractionDigits`. */\n value: number;\n /** Append a `°` glyph directly after the value with no gap. */\n hasDegree?: boolean;\n /** Append a `%` glyph directly after the value with no gap. */\n hasPercentage?: boolean;\n /** Unit text (e.g. `C`, `Pa`, `m/s`). Rendered after the value/glyph. */\n unit: string;\n}\n\n/**\n *\n *\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 - Content for additional detail rows.\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 *\n * @ignition-base-height: 173px\n * @ignition-base-width: 168px\n * @ignition-center-horizontal\n */\n@customElement('obc-automation-tank')\nexport class ObcAutomationTank extends 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 /**\n * Host positioning model — see `TankPositioning` for details. Defaults to\n * `point` for backward compatibility (fixed default dimensions + P&ID\n * top-center anchor). Set to `button` to make the host fill its parent\n * container (100% × 100%) with no anchor offset.\n */\n @property({type: String, reflect: true}) positioning: TankPositioning =\n TankPositioning.point;\n /**\n * Static (display-only) variant. Always rendered at the compact size; the\n * inner chart/bar is hidden, the bordered area is filled with\n * `--container-section-color`, and the readout is centered inside the frame.\n * Tag is rendered below the bordered area; badges (when slotted) sit above\n * the frame inside the halo and shrink the frame just like in compact mode.\n * Overrides `compact` (a static tank is always compact-sized).\n *\n * Static tanks render as a non-interactive `<div role=\"img\">` (not a\n * `<button>`), so they are not in the tab order and do not announce as\n * activatable controls.\n */\n @property({type: Boolean, reflect: true}) static: boolean = false;\n @property({type: String}) tag: string = '';\n\n /**\n * Chart cell rendering mode.\n * - `bar`: static fill bar driven by `value`/`max` (default).\n * - `graph`: embedded `obc-gauge-trend` line/area chart.\n * - `graphAndBar`: embedded `obc-gauge-trend` with an integrated side bar.\n */\n @property({type: String, reflect: true, attribute: 'chart-mode'})\n chartMode: TankChartMode = TankChartMode.bar;\n\n /** Time-series data points for the embedded gauge-trend (graph modes only). */\n @property({type: Array, attribute: false})\n chartData: ChartLineDataItem[] = [];\n\n /** Priority hint forwarded to child charts (regular | enhanced). */\n @property({type: String}) priority: Priority = Priority.regular;\n\n /**\n * 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 */\n @property({type: Array, attribute: false})\n advice: LinearAdvice[] = [];\n\n /** Show advice overlays (works in all `chartMode` variants). */\n @property({type: Boolean}) hasAdvice = false;\n\n /**\n * Overlay a 32×32 decorative icon (currently `<obi-tank>`) centered on the\n * chart cell. Works in all three `chartMode` variants (bar, graph,\n * graph-and-bar) and in both orientations. The icon is rendered above the\n * bar/graph in a fixed CSS layer (does not scale with the SVG meet\n * transform) and is silhouetted with a `--border-silhouette-color` halo so\n * it stays legible on any underlying fill. The icon size scales with the\n * ambient `obc-component-size-*` class on an ancestor via the design token\n * `--automation-components-tanks-graphs-graph-icon-size` (32 → 48 → 64 → 64\n * for regular → medium → large → xl).\n *\n * TODO(future): replace the hard-coded `<obi-tank>` with a `slot=\"graph-icon\"`\n * so consumers can pass any `<obi-*>` icon. The current API ships the\n * smallest viable surface; the slot can be added without breaking the\n * boolean property.\n */\n @property({type: Boolean, attribute: false}) hasGraphIcon = false;\n\n /**\n * 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 */\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 /**\n * 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 */\n @property({type: Boolean, attribute: false}) showTrendSymbol: boolean = true;\n\n /**\n * 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 */\n @property({type: Number}) percentFractionDigits: number = 0;\n\n /**\n * Rich detail rows shown below the main percent/value block in the regular\n * (non-compact, non-static) layout, separated by a divider. When empty (the\n * default), nothing is rendered — neither the divider nor the list. In\n * vertical orientation the chart cell shrinks to make room; in horizontal\n * orientation the readout column already has reserved whitespace so the\n * chart is unaffected.\n *\n * Values are formatted using `percentFractionDigits`. Consumers that need\n * full control over the markup can replace the entire fallback by slotting\n * arbitrary content into `slot=\"rich\"` (note: this is a different name from\n * the existing `slot=\"readout\"` which replaces the whole readout block).\n */\n @property({type: Array, attribute: false}) readout: TankReadoutItem[] = [];\n\n /**\n * Enum-driven badges rendered inside the `badges` cell. Mirrors the API\n * introduced for `ObcAbstractAutomationButton` in PR #839 (#829). When set\n * to a non-`None` value, an `<obc-automation-badge>` of the corresponding\n * type is rendered as fallback content for the `badges` slot. Any content\n * the consumer slots into `badges` overrides these defaults, preserving\n * backward compatibility with the existing slot-based API.\n *\n * Render order (left → right): control, alert, interlock, commandLocked —\n * matching the positional convention used by `ObcAbstractAutomationButton`\n * (top-left, top-right, bottom-left, bottom-right) read row-by-row.\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 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.IsaCritical:\n return ObcAutomationBadgeType.IsaCritical;\n case AutomationButtonBadgeAlert.IsaHigh:\n return ObcAutomationBadgeType.IsaHigh;\n case AutomationButtonBadgeAlert.IsaMedium:\n return ObcAutomationBadgeType.IsaMedium;\n case AutomationButtonBadgeAlert.IsaLow:\n return ObcAutomationBadgeType.IsaLow;\n case AutomationButtonBadgeAlert.IsaDiagnostic:\n return ObcAutomationBadgeType.IsaDiagnostic;\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 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 // No imperative forwarding here — child components receive `priority`\n // via template property bindings (`.priority=${this.priority}`). Rely on\n // their reactive `updated()` logic (e.g. `ObcGaugeTrend._updateBarVerticalProperties()`)\n // to propagate palette changes internally.\n // The chart cell DOM element is recreated when chartMode toggles between\n // bar and graph modes (different class/contents), and may also appear/\n // disappear with static/compact. Re-attach the observer to the current\n // .bar-container instance.\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 // stable: render no icon\n return nothing;\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 // Path data. Two variants — regular (14px tall, 12px corners) and compact\n // (10px tall, 7px corners). Curve Y-values are proportionally scaled from\n // the original 18/12-tall Figma reference so the corner curves stay\n // continuous at the new thickness.\n // Horizontal orientation reuses the same vertical path data inside an\n // inner `<g transform=\"translate(0 H) rotate(-90)\">`; the SVG viewBox is\n // swapped accordingly. Cap-end is mirrored via CSS scaleY/scaleX(-1).\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 // Stroke draws the curve + outer vertical edge only. The seam with\n // `.middle` (y = capH) is painted by a 1px CSS `border-top` on\n // `.tank-frame.type-atmospheric:not(.compact) .middle` so it pixel-\n // snaps identically to the pressurized cap's CSS border. Drawing it\n // as an SVG stroke here would render thinner / blurrier due to\n // sub-pixel anti-aliasing.\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 = Math.max(0, Math.min(100, (this.value / safeMax) * 100));\n const isCompact = this.isCompact;\n\n // In compact/static the `.halo` is a fixed-size column flex container\n // that holds badges + tank-frame + (compact only) readout + tag. To let\n // the tank-frame absorb the freed space when adjacent cells are empty,\n // we collapse the empty cells with the `hidden` attribute (see CSS).\n // In non-compact mode cells live inside the inner `.grid` and always\n // reserve their min-content rows — unchanged from previous behavior.\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 ${controlBadge\n ? html`<obc-automation-badge\n .type=${controlBadge}\n ></obc-automation-badge>`\n : nothing}\n ${alertBadge\n ? html`<obc-automation-badge\n .type=${alertBadge}\n ></obc-automation-badge>`\n : nothing}\n ${interlockBadge\n ? html`<obc-automation-badge\n .type=${interlockBadge}\n ></obc-automation-badge>`\n : nothing}\n ${commandLockedBadge\n ? html`<obc-automation-badge\n .type=${commandLockedBadge}\n ></obc-automation-badge>`\n : nothing}\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 mode intentionally renders the tank's capacity (max + unit)\n // instead of a percent reading: a static tank represents \"device is\n // present, current state unknown\", so a percent value would be\n // misleading. The trend icon is omitted for the same reason. Consumers\n // who need a custom label can still override the whole cell via the\n // `readout` slot, or supply formatted text through the existing\n // `max-value` / `unit` slots (no new API).\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 <slot name=\"rich\">\n ${this.readout.length > 0\n ? html`\n <div class=\"rich-divider\"></div>\n <div class=\"rich\">\n ${this.readout.map(\n (row) => html`\n <div class=\"rich-row\">\n <span class=\"rich-label\">${row.label}</span>\n <span class=\"rich-value\"\n >${row.value.toFixed(\n this.percentFractionDigits\n )}</span\n >\n <span class=\"rich-suffix\"\n >${row.hasDegree\n ? html`<span class=\"rich-glyph\">°</span>`\n : nothing}${row.hasPercentage\n ? html`<span class=\"rich-glyph\">%</span>`\n : nothing}<span class=\"rich-unit\"\n >${row.unit}</span\n ></span\n >\n </div>\n `\n )}\n </div>\n `\n : nothing}\n </slot>\n </slot>\n </div>\n `;\n // Decorative icon overlay (centered on the chart cell). Two stacked\n // icon elements: the back layer paints an inherited SVG `stroke` halo\n // (the icon's paths use `fill=\"currentColor\"`, and SVG `stroke` is\n // inherited across the icon's shadow DOM); the front layer paints the\n // colored fill via the `color` property. This mirrors the established\n // silhouette pattern used by `obc-automation-button` (back-layer slot\n // with stroke, front-layer slot with fill).\n //\n // The icon variant follows `type`: battery tanks show an energy-battery\n // icon, all other types show the generic tank icon.\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 // Forward the measured cell size as the gauge-trend's width/height,\n // which it interprets as an aspect-ratio reference. Its internal\n // ResizeObserver then picks up its own wrapper's clientWidth (= cell\n // width, since we set style width:100%) and computes height from the\n // aspect ratio — so the chart matches the cell exactly. We delay\n // rendering until both dimensions are measured to avoid a divide-by-\n // zero in the aspect-ratio math on first paint.\n const hasSize = this._cellWidth > 0 && this._cellHeight > 0;\n chartCell = html`\n <div class=\"bar-container chart-cell\">\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 style=\"width: 100%; height: 100%;\"\n .priority=${this.priority}\n ></obc-gauge-trend>`\n : null}\n ${this.hasGraphIcon ? graphIconOverlay : null}\n </div>\n `;\n } else {\n // Bar mode: render the shared SVG bar (`obc-bar-vertical` /\n // `-horizontal`) — the same renderer used by gauge-trend's side bar —\n // so advice overlays work the same way across all three chart modes.\n //\n // TODO(refactor): once `obc-gauge-trend` supports a bar-only layout at\n // this size (no chart-line area), migrate this branch to gauge-trend\n // too so all three chart modes share a single implementation.\n //\n // TODO(theming): the bar fill currently uses the standard instrument\n // palette (`--instrument-regular-tertiary-color` for tint mode). The\n // legacy CSS bar used per-medium colors (e.g. `--automation-medium-fuel`).\n // Extend `external-scale.ts` (and the bar-vertical/-horizontal wrappers)\n // to accept a medium / fuel color so the tank can restore its\n // per-`medium` coloring through the shared renderer.\n const hasSize = this._cellWidth > 0 && this._cellHeight > 0;\n // The inner bar always renders vertically, regardless of the tank's\n // outer `orientation`. Only the tank's outer wrapper flips; its inner\n // chart cell stays portrait. This matches gauge-trend behavior.\n //\n // Match gauge-trend's proportional sizing so advice pills (and other\n // fixed-pixel SVG primitives) render at the same on-screen size in\n // every chart mode. We mirror gauge-trend's defaults exactly:\n // `fixedAspectRatio=true` + `scaleReferenceSize=384`. The bar SVG is\n // then built in a 384-unit-tall viewBox and shrunk into the cell via\n // `xMidYMid meet`, giving on-screen scale = cellHeight / 384.\n //\n // Because the meet transform scales the viewBox uniformly, we must\n // also size `barThickness` in viewBox units (not cell pixels) so the\n // bar still fills the cell width after scaling. We pick the viewBox\n // cross-axis size so width-fit and height-fit ratios match exactly\n // (no horizontal gutters): viewBoxCross = cellWidth * 384 / cellHeight.\n const SCALE_REFERENCE_SIZE = 384;\n const adviceReserveVb = this.hasAdvice ? 16 : 0;\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 - adviceReserveVb);\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 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 // Whole component is one interactive element. The halo (flat-mixin\n // border/background that appears on hover/pressed/focus) is painted on\n // the inner `.halo` wrapper via `visibleWrapperClass`, so the surround\n // hugs only the bordered area:\n // - non-compact: just the tank-frame (grid inside it carries badges,\n // readout, tag).\n // - compact: fixed-size column flex — badges, tank-frame (flex-grow),\n // readout, tag. Empty cells (badges/tag) collapse via `?hidden`\n // above so the tank-frame absorbs the freed space.\n // - static: same as compact but no separate readout cell (the readout\n // is centered INSIDE the tank-frame via `static-readout`).\n //\n // The alert-frame overlay is the last child of `.halo` so the ring\n // overlays every cell (and any cell-collapse mechanics work uniformly).\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 // `aria-live=\"polite\"` + `aria-atomic=\"true\"` on the root so the\n // slotted alert label (and any state change of the alert frame) is\n // announced once when `alert` flips on. Always present — an empty live\n // region is harmless and avoids screen-reader re-registration races.\n // TODO(a11y): the rest of the automation component family still lacks\n // this live-region announcement; consolidate when alert support is\n // factored into a shared mixin.\n return html`\n ${this.static\n ? html`<div\n class=\"root\"\n role=\"img\"\n aria-label=${this.tag || 'Tank'}\n aria-live=\"polite\"\n aria-atomic=\"true\"\n >\n ${halo}\n </div>`\n : html`<button\n class=\"root\"\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\n static override styles = unsafeCSS(compentStyle);\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'obc-automation-tank': ObcAutomationTank;\n }\n}\n"],"names":["TankTrend","TankType","TankOrientation","TankPositioning","TankChartMode"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8CO,IAAK,8BAAAA,eAAL;AACLA,aAAA,YAAA,IAAa;AACbA,aAAA,QAAA,IAAS;AACTA,aAAA,QAAA,IAAS;AACTA,aAAA,SAAA,IAAU;AACVA,aAAA,aAAA,IAAc;AACdA,aAAA,QAAA,IAAS;AANC,SAAAA;AAAA,GAAA,aAAA,CAAA,CAAA;AASL,IAAK,6BAAAC,cAAL;AACLA,YAAA,SAAA,IAAU;AACVA,YAAA,aAAA,IAAc;AACdA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A,CAAA;AAEA,gBAAA;AAAA,EAAzB,SAAS,EAAC,MAAM,OAAA,CAAO;AAAA,GAnJb,kBAmJe,WAAA,cAAA,CAAA;AAEA,gBAAA;AAAA,EAAzB,SAAS,EAAC,MAAM,OAAA,CAAO;AAAA,GArJb,kBAqJe,WAAA,kBAAA,CAAA;AAG1B,gBAAA;AAAA,EADC,SAAS,EAAC,MAAM,OAAA,CAAO;AAAA,GAvJb,kBAwJX,WAAA,sBAAA,CAAA;AAGiB,gBAAA;AAAA,EAAhB,MAAA;AAAM,GA3JI,kBA2JM,WAAA,cAAA,CAAA;AACA,gBAAA;AAAA,EAAhB,MAAA;AAAM,GA5JI,kBA4JM,WAAA,eAAA,CAAA;AAQA,gBAAA;AAAA,EAAhB,MAAA;AAAM,GApKI,kBAoKM,WAAA,cAAA,CAAA;AACA,gBAAA;AAAA,EAAhB,MAAA;AAAM,GArKI,kBAqKM,WAAA,eAAA,CAAA;AArKN,oBAAN,gBAAA;AAAA,EADN,cAAc,qBAAqB;AAAA,GACvB,iBAAA;"}
|
|
@@ -46,12 +46,22 @@ export declare class ObcInstrumentRadial extends ObcInstrumentRadial_base {
|
|
|
46
46
|
advices: GaugeRadialAdvice[];
|
|
47
47
|
clipTop: number;
|
|
48
48
|
clipBottom: number;
|
|
49
|
+
clipLeft: number;
|
|
50
|
+
clipRight: number;
|
|
51
|
+
/**
|
|
52
|
+
* Place the horizontal end labels (±90°, e.g. min/max) below the tick instead
|
|
53
|
+
* of beside it — the "Max-min" placement from the radial label model
|
|
54
|
+
* (External / Internal / Max-min). See PR #903 / design discussion.
|
|
55
|
+
*/
|
|
56
|
+
endLabelsMaxMin: boolean;
|
|
49
57
|
zoomToFitArc: boolean;
|
|
50
58
|
private _radiusOffset;
|
|
51
59
|
private _arcFrame;
|
|
52
60
|
private get clampedValue();
|
|
53
61
|
private get minAngle();
|
|
54
62
|
private get maxAngle();
|
|
63
|
+
private mapAngle;
|
|
64
|
+
private get safeClips();
|
|
55
65
|
private get _derivedNeedleColor();
|
|
56
66
|
private get _derivedBarColor();
|
|
57
67
|
render(): import('lit-html').TemplateResult<1>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instrument-radial.d.ts","sourceRoot":"","sources":["../../../src/building-blocks/instrument-radial/instrument-radial.ts"],"names":[],"mappings":"AAAA,OAAO,EAAM,UAAU,EAAqB,MAAM,KAAK,CAAC;AAGxD,OAAO,EAEL,UAAU,EAEX,MAAM,8CAA8C,CAAC;AAEtD,OAAO,EAAC,QAAQ,EAAC,MAAM,gDAAgD,CAAC;AAExE,OAAO,EAAC,aAAa,EAAC,MAAM,gDAAgD,CAAC;AAC7E,OAAO,EAAC,eAAe,EAAE,QAAQ,EAAC,MAAM,uCAAuC,CAAC;
|
|
1
|
+
{"version":3,"file":"instrument-radial.d.ts","sourceRoot":"","sources":["../../../src/building-blocks/instrument-radial/instrument-radial.ts"],"names":[],"mappings":"AAAA,OAAO,EAAM,UAAU,EAAqB,MAAM,KAAK,CAAC;AAGxD,OAAO,EAEL,UAAU,EAEX,MAAM,8CAA8C,CAAC;AAEtD,OAAO,EAAC,QAAQ,EAAC,MAAM,gDAAgD,CAAC;AAExE,OAAO,EAAC,aAAa,EAAC,MAAM,gDAAgD,CAAC;AAC7E,OAAO,EAAC,eAAe,EAAE,QAAQ,EAAC,MAAM,uCAAuC,CAAC;AAehF,oBAAY,kBAAkB;IAC5B,MAAM,WAAW;IACjB,GAAG,QAAQ;IACX,MAAM,WAAW;CAClB;AAED,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,UAAU,CAAC;IACjB,MAAM,EAAE,OAAO,CAAC;CACjB;;AA8ED,qBACa,mBAAoB,SAAQ,wBAAyB;IAKtC,KAAK,EAAE,eAAe,CAA0B;IAChD,QAAQ,EAAE,QAAQ,CAAoB;IAEtC,KAAK,SAAK;IACV,QAAQ,SAAO;IACf,QAA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E,mBAAmB,CAAC;KAC9C;CACF"}
|
|
@@ -17,12 +17,17 @@ var __decorateClass = (decorators, target, key, kind) => {
|
|
|
17
17
|
if (kind && result) __defProp(target, key, result);
|
|
18
18
|
return result;
|
|
19
19
|
};
|
|
20
|
+
const WATCH_DEFAULT_VIEWBOX = 448;
|
|
20
21
|
var ObcGaugeRadialType = /* @__PURE__ */ ((ObcGaugeRadialType2) => {
|
|
21
22
|
ObcGaugeRadialType2["filled"] = "filled";
|
|
22
23
|
ObcGaugeRadialType2["bar"] = "bar";
|
|
23
24
|
ObcGaugeRadialType2["needle"] = "needle";
|
|
24
25
|
return ObcGaugeRadialType2;
|
|
25
26
|
})(ObcGaugeRadialType || {});
|
|
27
|
+
const NEEDLE_TIP_RADIUS = 160;
|
|
28
|
+
const NEEDLE_TIP_GAP = 5;
|
|
29
|
+
const NEEDLE_WIDTH = 8;
|
|
30
|
+
const NEEDLE_HUB_RADIUS = 16;
|
|
26
31
|
function rangeIncludesZero(minValue, maxValue) {
|
|
27
32
|
return minValue <= 0 && maxValue >= 0;
|
|
28
33
|
}
|
|
@@ -38,6 +43,31 @@ function strongerTickmarkType(existing, candidate) {
|
|
|
38
43
|
};
|
|
39
44
|
return priority[candidate] > priority[existing] ? candidate : existing;
|
|
40
45
|
}
|
|
46
|
+
function clampClipPercent(n) {
|
|
47
|
+
return Number.isFinite(n) ? Math.min(Math.max(n, 0), 100) : 0;
|
|
48
|
+
}
|
|
49
|
+
function normalizeClips(clips) {
|
|
50
|
+
let top = clampClipPercent(clips.top);
|
|
51
|
+
let bottom = clampClipPercent(clips.bottom);
|
|
52
|
+
let left = clampClipPercent(clips.left);
|
|
53
|
+
let right = clampClipPercent(clips.right);
|
|
54
|
+
if (top + bottom >= 100) {
|
|
55
|
+
top = 0;
|
|
56
|
+
bottom = 0;
|
|
57
|
+
}
|
|
58
|
+
if (left + right >= 100) {
|
|
59
|
+
left = 0;
|
|
60
|
+
right = 0;
|
|
61
|
+
}
|
|
62
|
+
return { top, bottom, left, right };
|
|
63
|
+
}
|
|
64
|
+
function defaultGaugeAngle(value, minValue, maxValue) {
|
|
65
|
+
const span = maxValue - minValue;
|
|
66
|
+
if (!Number.isFinite(span) || span <= 0) {
|
|
67
|
+
return -135;
|
|
68
|
+
}
|
|
69
|
+
return (value - minValue) / span * 270 - 135;
|
|
70
|
+
}
|
|
41
71
|
let ObcInstrumentRadial = class extends SetpointMixin(LitElement) {
|
|
42
72
|
constructor() {
|
|
43
73
|
super(...arguments);
|
|
@@ -57,6 +87,9 @@ let ObcInstrumentRadial = class extends SetpointMixin(LitElement) {
|
|
|
57
87
|
this.advices = [];
|
|
58
88
|
this.clipTop = 0;
|
|
59
89
|
this.clipBottom = 0;
|
|
90
|
+
this.clipLeft = 0;
|
|
91
|
+
this.clipRight = 0;
|
|
92
|
+
this.endLabelsMaxMin = false;
|
|
60
93
|
this.zoomToFitArc = false;
|
|
61
94
|
this._radiusOffset = 0;
|
|
62
95
|
}
|
|
@@ -66,10 +99,27 @@ let ObcInstrumentRadial = class extends SetpointMixin(LitElement) {
|
|
|
66
99
|
return Math.max(lowerBound, Math.min(this.value, upperBound));
|
|
67
100
|
}
|
|
68
101
|
get minAngle() {
|
|
69
|
-
return this.
|
|
102
|
+
return this.mapAngle(this.minValue);
|
|
70
103
|
}
|
|
71
104
|
get maxAngle() {
|
|
72
|
-
return this.
|
|
105
|
+
return this.mapAngle(this.maxValue);
|
|
106
|
+
}
|
|
107
|
+
// Map a value to an angle via the consumer's `getAngle`, guarding a missing
|
|
108
|
+
// or non-finite mapping so a misconfigured consumer can't emit NaN geometry.
|
|
109
|
+
mapAngle(value) {
|
|
110
|
+
const fn = this.getAngle;
|
|
111
|
+
const angle = typeof fn === "function" ? fn(value) : defaultGaugeAngle(value, this.minValue, this.maxValue);
|
|
112
|
+
return Number.isFinite(angle) ? angle : 0;
|
|
113
|
+
}
|
|
114
|
+
// Clamped clips, reused for the overlay viewBox and the clips forwarded to
|
|
115
|
+
// obc-watch.
|
|
116
|
+
get safeClips() {
|
|
117
|
+
return normalizeClips({
|
|
118
|
+
top: this.clipTop,
|
|
119
|
+
bottom: this.clipBottom,
|
|
120
|
+
left: this.clipLeft,
|
|
121
|
+
right: this.clipRight
|
|
122
|
+
});
|
|
73
123
|
}
|
|
74
124
|
get _derivedNeedleColor() {
|
|
75
125
|
if (this.state === InstrumentState.loading || this.state === InstrumentState.off) {
|
|
@@ -90,12 +140,12 @@ let ObcInstrumentRadial = class extends SetpointMixin(LitElement) {
|
|
|
90
140
|
const barColor = this.barColor ?? this._derivedBarColor;
|
|
91
141
|
const barStartValue = Math.max(this.minValue, Math.min(0, this.maxValue));
|
|
92
142
|
const value = this.clampedValue;
|
|
93
|
-
const setpointAngle = this.setpoint !== void 0 ? this.
|
|
94
|
-
const newSetpointAngle = this.newSetpoint !== void 0 ? this.
|
|
143
|
+
const setpointAngle = this.setpoint !== void 0 ? this.mapAngle(this.setpoint) : void 0;
|
|
144
|
+
const newSetpointAngle = this.newSetpoint !== void 0 ? this.mapAngle(this.newSetpoint) : void 0;
|
|
95
145
|
const barAreas = this.type === "needle" ? [] : [
|
|
96
146
|
{
|
|
97
|
-
startAngle: this.
|
|
98
|
-
endAngle: this.
|
|
147
|
+
startAngle: this.mapAngle(barStartValue),
|
|
148
|
+
endAngle: this.mapAngle(value),
|
|
99
149
|
fillColor: barColor
|
|
100
150
|
}
|
|
101
151
|
];
|
|
@@ -108,6 +158,7 @@ let ObcInstrumentRadial = class extends SetpointMixin(LitElement) {
|
|
|
108
158
|
}
|
|
109
159
|
];
|
|
110
160
|
const watchCircleType = this.type === "needle" ? WatchCircleType.single : WatchCircleType.double;
|
|
161
|
+
const clips = this.safeClips;
|
|
111
162
|
let viewBox;
|
|
112
163
|
if (this.zoomToFitArc) {
|
|
113
164
|
const ext = 48;
|
|
@@ -119,16 +170,18 @@ let ObcInstrumentRadial = class extends SetpointMixin(LitElement) {
|
|
|
119
170
|
extension: ext,
|
|
120
171
|
targetSize
|
|
121
172
|
});
|
|
122
|
-
viewBox = frame.viewBox;
|
|
123
173
|
this._radiusOffset = frame.radiusOffset;
|
|
174
|
+
viewBox = frame.viewBox;
|
|
124
175
|
this._arcFrame = frame;
|
|
125
176
|
} else {
|
|
126
177
|
this._radiusOffset = 0;
|
|
127
178
|
this._arcFrame = void 0;
|
|
128
|
-
const
|
|
129
|
-
const
|
|
130
|
-
const
|
|
131
|
-
|
|
179
|
+
const full = WATCH_DEFAULT_VIEWBOX;
|
|
180
|
+
const w = full * (1 - clips.left / 100 - clips.right / 100);
|
|
181
|
+
const h = full * (1 - clips.top / 100 - clips.bottom / 100);
|
|
182
|
+
const left = -full / 2 + full * clips.left / 100;
|
|
183
|
+
const top = -full / 2 + full * clips.top / 100;
|
|
184
|
+
viewBox = `${left} ${top} ${w} ${h}`;
|
|
132
185
|
}
|
|
133
186
|
return html`
|
|
134
187
|
<div class="container">
|
|
@@ -149,8 +202,11 @@ let ObcInstrumentRadial = class extends SetpointMixin(LitElement) {
|
|
|
149
202
|
.areas=${areas}
|
|
150
203
|
.watchCircleType=${watchCircleType}
|
|
151
204
|
.barAreas=${barAreas}
|
|
152
|
-
.clipTop=${this.zoomToFitArc ? 0 :
|
|
153
|
-
.clipBottom=${this.zoomToFitArc ? 0 :
|
|
205
|
+
.clipTop=${this.zoomToFitArc ? 0 : clips.top}
|
|
206
|
+
.clipBottom=${this.zoomToFitArc ? 0 : clips.bottom}
|
|
207
|
+
.clipLeft=${this.zoomToFitArc ? 0 : clips.left}
|
|
208
|
+
.clipRight=${this.zoomToFitArc ? 0 : clips.right}
|
|
209
|
+
.endLabelsMaxMin=${this.endLabelsMaxMin}
|
|
154
210
|
.zoomToFitArc=${this.zoomToFitArc}
|
|
155
211
|
.arcFrame=${this._arcFrame}
|
|
156
212
|
></obc-watch>
|
|
@@ -166,14 +222,14 @@ let ObcInstrumentRadial = class extends SetpointMixin(LitElement) {
|
|
|
166
222
|
const rOff = this._radiusOffset;
|
|
167
223
|
const value = this.clampedValue;
|
|
168
224
|
if (this.type === "needle") {
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
<rect x="
|
|
172
|
-
<
|
|
225
|
+
const tipY = 256 - (NEEDLE_TIP_RADIUS - NEEDLE_TIP_GAP) - rOff;
|
|
226
|
+
return svg`<g transform="rotate(${this.mapAngle(value)}) translate(-256, -256)">
|
|
227
|
+
<rect x="${256 - NEEDLE_WIDTH / 2}" y="${tipY}" width="${NEEDLE_WIDTH}" height="${256 - tipY}" rx="${NEEDLE_WIDTH / 2}" fill=${needleColor} stroke=${needleColor}/>
|
|
228
|
+
<circle cx="256" cy="256" r="${NEEDLE_HUB_RADIUS}" fill=${needleColor}/>
|
|
173
229
|
</g>
|
|
174
230
|
`;
|
|
175
231
|
} else {
|
|
176
|
-
return svg`<g transform="rotate(${this.
|
|
232
|
+
return svg`<g transform="rotate(${this.mapAngle(value)}) translate(-256, -256)">
|
|
177
233
|
<rect x="252" y="${96 - rOff}" width="8" height="48" rx="4" fill=${needleColor} stroke="var(--border-silhouette-color)"/>
|
|
178
234
|
</g>
|
|
179
235
|
`;
|
|
@@ -196,7 +252,7 @@ let ObcInstrumentRadial = class extends SetpointMixin(LitElement) {
|
|
|
196
252
|
return;
|
|
197
253
|
}
|
|
198
254
|
tickmarksByValue.set(normalizedValue, {
|
|
199
|
-
angle: this.
|
|
255
|
+
angle: this.mapAngle(normalizedValue),
|
|
200
256
|
type,
|
|
201
257
|
text
|
|
202
258
|
});
|
|
@@ -256,8 +312,8 @@ let ObcInstrumentRadial = class extends SetpointMixin(LitElement) {
|
|
|
256
312
|
get _advices() {
|
|
257
313
|
const value = this.clampedValue;
|
|
258
314
|
return this.advices.map((advice) => {
|
|
259
|
-
const minAngle = this.
|
|
260
|
-
const maxAngle = this.
|
|
315
|
+
const minAngle = this.mapAngle(advice.minValue);
|
|
316
|
+
const maxAngle = this.mapAngle(advice.maxValue);
|
|
261
317
|
let state = advice.hinted ? AdviceState.hinted : AdviceState.regular;
|
|
262
318
|
if (value >= advice.minValue && value <= advice.maxValue) {
|
|
263
319
|
state = AdviceState.triggered;
|
|
@@ -366,6 +422,15 @@ __decorateClass([
|
|
|
366
422
|
__decorateClass([
|
|
367
423
|
property({ type: Number })
|
|
368
424
|
], ObcInstrumentRadial.prototype, "clipBottom", 2);
|
|
425
|
+
__decorateClass([
|
|
426
|
+
property({ type: Number })
|
|
427
|
+
], ObcInstrumentRadial.prototype, "clipLeft", 2);
|
|
428
|
+
__decorateClass([
|
|
429
|
+
property({ type: Number })
|
|
430
|
+
], ObcInstrumentRadial.prototype, "clipRight", 2);
|
|
431
|
+
__decorateClass([
|
|
432
|
+
property({ type: Boolean })
|
|
433
|
+
], ObcInstrumentRadial.prototype, "endLabelsMaxMin", 2);
|
|
369
434
|
__decorateClass([
|
|
370
435
|
property({ type: Boolean })
|
|
371
436
|
], ObcInstrumentRadial.prototype, "zoomToFitArc", 2);
|