@oicl/openbridge-webcomponents-full-bundle 2.0.0 → 2.1.0-next.1
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 +64 -17
- package/bundle/openbridge-webcomponents.bundle.js.map +1 -1
- package/custom-elements.json +176 -18
- package/dist/automation/automation-button/abstract-automation-button-storybook-helpers.d.ts +135 -136
- package/dist/automation/automation-button/abstract-automation-button-storybook-helpers.d.ts.map +1 -1
- package/dist/automation/automation-button/abstract-automation-button-storybook-helpers.js +2 -18
- package/dist/automation/automation-button/abstract-automation-button-storybook-helpers.js.map +1 -1
- package/dist/automation/automation-button/abstract-automation-button.d.ts +2 -2
- package/dist/automation/automation-button/abstract-automation-button.js +2 -2
- package/dist/automation/automation-button/abstract-automation-button.js.map +1 -1
- package/dist/automation/automation-button/automation-button.d.ts +2 -2
- package/dist/automation/automation-button/automation-button.js.map +1 -1
- package/dist/automation/automation-tank/automation-tank.d.ts +23 -3
- package/dist/automation/automation-tank/automation-tank.d.ts.map +1 -1
- package/dist/automation/automation-tank/automation-tank.js +4 -1
- package/dist/automation/automation-tank/automation-tank.js.map +1 -1
- package/dist/automation/heat-exchanger/heat-exchanger.d.ts +1 -1
- package/dist/automation/heat-exchanger/heat-exchanger.js.map +1 -1
- package/dist/automation/heat-pump/heat-pump.d.ts +1 -1
- package/dist/automation/heat-pump/heat-pump.js.map +1 -1
- package/dist/automation/hydraulic-separator/hydraulic-separator.d.ts +1 -1
- package/dist/automation/hydraulic-separator/hydraulic-separator.js.map +1 -1
- package/dist/automation/specialty-tank/abstract-specialty-tank.d.ts +8 -3
- package/dist/automation/specialty-tank/abstract-specialty-tank.d.ts.map +1 -1
- package/dist/automation/specialty-tank/abstract-specialty-tank.js +9 -3
- package/dist/automation/specialty-tank/abstract-specialty-tank.js.map +1 -1
- package/dist/automation/specialty-tank/specialty-tank-story-meta.d.ts.map +1 -1
- package/dist/automation/specialty-tank/specialty-tank-story-meta.js +5 -13
- package/dist/automation/specialty-tank/specialty-tank-story-meta.js.map +1 -1
- package/dist/automation/transmitter/transmitter.d.ts +53 -8
- package/dist/automation/transmitter/transmitter.d.ts.map +1 -1
- package/dist/automation/transmitter/transmitter.js +37 -10
- package/dist/automation/transmitter/transmitter.js.map +1 -1
- package/dist/components/accordion-card/accordion-card.d.ts +19 -6
- package/dist/components/accordion-card/accordion-card.d.ts.map +1 -1
- package/dist/components/accordion-card/accordion-card.js +13 -1
- package/dist/components/accordion-card/accordion-card.js.map +1 -1
- package/dist/components/alert-frame/alert-frame-storybook-helpers.d.ts +33 -0
- package/dist/components/alert-frame/alert-frame-storybook-helpers.d.ts.map +1 -0
- package/dist/components/alert-frame/alert-frame-storybook-helpers.js +30 -0
- package/dist/components/alert-frame/alert-frame-storybook-helpers.js.map +1 -0
- package/dist/navigation-instruments/readout/readout.d.ts.map +1 -1
- package/dist/navigation-instruments/readout/readout.js.map +1 -1
- package/dist/navigation-instruments/readout-list-item/readout-list-item.d.ts.map +1 -1
- package/dist/navigation-instruments/readout-list-item/readout-list-item.js.map +1 -1
- package/package.json +1 -1
- package/src/automation/automation-button/abstract-automation-button-storybook-helpers.ts +2 -22
- package/src/automation/automation-button/abstract-automation-button.ts +2 -2
- package/src/automation/automation-button/automation-button.stories.ts +5 -20
- package/src/automation/automation-button/automation-button.ts +2 -2
- package/src/automation/automation-tank/automation-tank.stories.ts +15 -49
- package/src/automation/automation-tank/automation-tank.ts +18 -1
- package/src/automation/heat-exchanger/heat-exchanger.ts +1 -1
- package/src/automation/heat-pump/heat-pump.ts +1 -1
- package/src/automation/hydraulic-separator/hydraulic-separator.ts +1 -1
- package/src/automation/specialty-tank/abstract-specialty-tank.ts +9 -2
- package/src/automation/specialty-tank/specialty-tank-story-meta.ts +5 -12
- package/src/automation/transmitter/transmitter.stories.ts +102 -0
- package/src/automation/transmitter/transmitter.ts +72 -15
- package/src/components/accordion-card/accordion-card.stories.ts +15 -12
- package/src/components/accordion-card/accordion-card.ts +22 -4
- package/src/components/alert-frame/alert-frame-storybook-helpers.ts +30 -0
- package/src/navigation-instruments/readout/readout.ts +1 -2
- package/src/navigation-instruments/readout-list-item/readout-list-item.ts +1 -2
package/custom-elements.json
CHANGED
|
@@ -1550,7 +1550,7 @@
|
|
|
1550
1550
|
{
|
|
1551
1551
|
"kind": "variable",
|
|
1552
1552
|
"name": "ObcAutomationTank",
|
|
1553
|
-
"default": "class ObcAutomationTank extends SetpointMixin(LitElement) { constructor(..._args) { super(..._args); this.medium = LineMedium.water; this.value = 0; this.max = 100; this.trend = \"stable\"; this.type = \"generic\"; this.orientation = \"vertical\"; this.compact = false; this.positioning = TankPositioning.button; this.static = false; this.clickable = true; this.activated = false; this.tag = \"\"; this.chartMode = \"bar\"; this.chartData = []; this.priority = Priority.regular; this.advice = []; this.hasAdvice = false; this.hasGraphIcon = false; this.alert = false; this.alertFrameType = ObcAlertFrameType.SmallSideFlip; this.alertFrameThickness = ObcAlertFrameThickness.Small; this.alertFrameStatus = AlertType.Alarm; this.showAlertCategoryIcon = true; this.showAlertIcon = false; this.showTrendSymbol = true; this.percentFractionDigits = 0; this.badgeControl = AutomationButtonBadgeControl.None; this.badgeAlert = AutomationButtonBadgeAlert.None; this.badgeInterlock = AutomationButtonBadgeInterlock.None; this.badgeCommandLocked = AutomationButtonBadgeCommandLocked.None; this._cellWidth = 0; this._cellHeight = 0; this._hasBadges = false; this._hasTagSlot = false; this._hasRichSlot = false; } get isCompact() { return this.compact || this.static; } _badgeAlertType() { switch (this.badgeAlert) { case AutomationButtonBadgeAlert.Silence: return ObcAutomationBadgeType.AlertSilenced; case AutomationButtonBadgeAlert.Caution: return ObcAutomationBadgeType.Caution; case AutomationButtonBadgeAlert.Warning: return ObcAutomationBadgeType.Warning; case AutomationButtonBadgeAlert.Alarm: return ObcAutomationBadgeType.Alarm; case AutomationButtonBadgeAlert.LevelCritical: return ObcAutomationBadgeType.LevelCritical; case AutomationButtonBadgeAlert.LevelHigh: return ObcAutomationBadgeType.LevelHigh; case AutomationButtonBadgeAlert.LevelMedium: return ObcAutomationBadgeType.LevelMedium; case AutomationButtonBadgeAlert.LevelLow: return ObcAutomationBadgeType.LevelLow; case AutomationButtonBadgeAlert.LevelDiagnostic: return ObcAutomationBadgeType.LevelDiagnostic; default: return null; } } _badgeControlType() { switch (this.badgeControl) { case AutomationButtonBadgeControl.Local: return ObcAutomationBadgeType.Local; case AutomationButtonBadgeControl.LocalOnly: return ObcAutomationBadgeType.LocalOnly; case AutomationButtonBadgeControl.Manual: return ObcAutomationBadgeType.Manual; case AutomationButtonBadgeControl.ManualOnly: return ObcAutomationBadgeType.ManualOnly; case AutomationButtonBadgeControl.Auto: return ObcAutomationBadgeType.Auto; default: return null; } } _badgeInterlockType() { switch (this.badgeInterlock) { case AutomationButtonBadgeInterlock.Interlock: return ObcAutomationBadgeType.Interlock; case AutomationButtonBadgeInterlock.InterlockInhibit: return ObcAutomationBadgeType.InterlockInhibit; default: return null; } } _badgeCommandLockedType() { if (this.badgeCommandLocked === AutomationButtonBadgeCommandLocked.CommandLocked) return ObcAutomationBadgeType.CommandLocked; return null; } get _usesGaugeTrend() { return this.chartMode === \"graph\" || this.chartMode === \"graph-and-bar\"; } _onBadgesSlotChange(e) { const slot = e.target; this._hasBadges = slot.assignedNodes({ flatten: true }).some((n) => n.nodeType === Node.ELEMENT_NODE || n.nodeType === Node.TEXT_NODE && !!n.textContent?.trim()); } _onTagSlotChange(e) { const slot = e.target; this._hasTagSlot = slot.assignedNodes({ flatten: true }).some((n) => n.nodeType === Node.ELEMENT_NODE || n.nodeType === Node.TEXT_NODE && !!n.textContent?.trim()); } _onRichSlotChange(e) { const slot = e.target; this._hasRichSlot = slot.assignedNodes({ flatten: true }).some((n) => n.nodeType === Node.ELEMENT_NODE || n.nodeType === Node.TEXT_NODE && !!n.textContent?.trim()); } disconnectedCallback() { super.disconnectedCallback(); this._chartResizeObserver?.disconnect(); this._chartResizeObserver = void 0; this._observedCell = void 0; } updated(changed) { super.updated(changed); this._syncChartResizeObserver(); } _syncChartResizeObserver() { const cell = this.renderRoot.querySelector(\".bar-container\"); if (!cell) { if (this._chartResizeObserver) { this._chartResizeObserver.disconnect(); this._observedCell = void 0; } return; } if (cell === this._observedCell) return; if (!this._chartResizeObserver) this._chartResizeObserver = new ResizeObserver((entries) => { const entry = entries[0]; if (!entry) return; const w = Math.round(entry.contentRect.width); const h = Math.round(entry.contentRect.height); if (w !== this._cellWidth) this._cellWidth = w; if (h !== this._cellHeight) this._cellHeight = h; }); else this._chartResizeObserver.disconnect(); this._chartResizeObserver.observe(cell); this._observedCell = cell; } trendIcon() { if (this.trend === \"fast-rising\") return html`<obi-chevron-double-up-google class=\"trend-icon\" ></obi-chevron-double-up-google>`; else if (this.trend === \"rising\") return html`<obi-chevron-up-google class=\"trend-icon\" ></obi-chevron-up-google>`; else if (this.trend === \"fast-falling\") return html`<obi-chevron-double-down-google class=\"trend-icon\" ></obi-chevron-double-down-google>`; else if (this.trend === \"falling\") return html`<obi-chevron-down-google class=\"trend-icon\" ></obi-chevron-down-google>`; else if (this.trend === \"closed\") return html`<obi-off class=\"trend-icon\"></obi-off>`; else return html`<obi-arrow-right-google class=\"trend-icon\" ></obi-arrow-right-google>`; } /** * Atmospheric cap, 3-piece (corner-start / stretchable middle arc / corner-end). * Each piece draws its own fill (closed) and stroke (open) so adjacent pieces * abut without a visible vertical seam line. Coordinates are derived from the * Figma 248x14 path; corners stay 12px wide while the middle arc stretches. * Position (start vs end) and orientation flipping are handled in CSS. * * Horizontal orientation reuses the same path data but rotates each piece * via an inner `<g transform=\"translate(0 H) rotate(-90)\">`, mapping the * source coord (x, y) to (y, H - x). The viewBox is swapped accordingly: * corner: 12x14 -> 14x12 (H=12) * middle: 224x14 -> 14x224 (H=224) * Cap-end (right side in horizontal) is mirrored via CSS scaleX(-1). */ renderAtmosphericCap(side) { const isHorizontal = this.orientation === \"horizontal\"; let cornerStartFill; let cornerStartStroke; let midFill; let midStroke; let cornerEndFill; let cornerEndStroke; let cornerW; let capH; let midW; if (this.isCompact) { cornerW = 7; capH = 10; midW = 149; cornerStartFill = \"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\"; cornerStartStroke = \"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\"; midFill = \"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\"; midStroke = \"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\"; cornerEndFill = \"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\"; cornerEndStroke = \"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\"; } else { cornerW = 12; capH = 14; midW = 224; cornerStartFill = \"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\"; cornerStartStroke = \"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\"; midFill = \"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\"; midStroke = \"M 0 6.5837 C 16 5.1124, 56 1.9444, 112 1.9444 C 168 1.9444, 208 5.1124, 224 6.5837\"; cornerEndFill = \"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\"; cornerEndStroke = \"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\"; } if (isHorizontal) return html` <div class=\"cap cap-atmospheric cap-${side}\"> <svg class=\"cap-corner cap-corner-start\" viewBox=\"0 0 ${capH} ${cornerW}\" preserveAspectRatio=\"xMidYMax meet\" aria-hidden=\"true\" > ${svg` <g transform=\"translate(0 ${cornerW}) rotate(-90)\"> <path class=\"cap-fill\" d=\"${cornerStartFill}\" /> <path class=\"cap-stroke\" fill=\"none\" d=\"${cornerStartStroke}\" /> </g> `} </svg> <svg class=\"cap-mid\" viewBox=\"0 0 ${capH} ${midW}\" preserveAspectRatio=\"none\" aria-hidden=\"true\" > ${svg` <g transform=\"translate(0 ${midW}) rotate(-90)\"> <path class=\"cap-fill\" d=\"${midFill}\" /> <path class=\"cap-stroke\" fill=\"none\" vector-effect=\"non-scaling-stroke\" d=\"${midStroke}\" /> </g> `} </svg> <svg class=\"cap-corner cap-corner-end\" viewBox=\"0 0 ${capH} ${cornerW}\" preserveAspectRatio=\"xMidYMin meet\" aria-hidden=\"true\" > ${svg` <g transform=\"translate(0 ${cornerW}) rotate(-90)\"> <path class=\"cap-fill\" d=\"${cornerEndFill}\" /> <path class=\"cap-stroke\" fill=\"none\" d=\"${cornerEndStroke}\" /> </g> `} </svg> </div> `; return html` <div class=\"cap cap-atmospheric cap-${side}\"> <svg class=\"cap-corner cap-corner-start\" viewBox=\"0 0 ${cornerW} ${capH}\" preserveAspectRatio=\"xMaxYMid meet\" aria-hidden=\"true\" > ${svg` <path class=\"cap-fill\" d=\"${cornerStartFill}\" /> <path class=\"cap-stroke\" fill=\"none\" d=\"${cornerStartStroke}\" /> `} </svg> <svg class=\"cap-mid\" viewBox=\"0 0 ${midW} ${capH}\" preserveAspectRatio=\"none\" aria-hidden=\"true\" > ${svg` <path class=\"cap-fill\" d=\"${midFill}\" /> <path class=\"cap-stroke\" fill=\"none\" vector-effect=\"non-scaling-stroke\" d=\"${midStroke}\" /> `} </svg> <svg class=\"cap-corner cap-corner-end\" viewBox=\"0 0 ${cornerW} ${capH}\" preserveAspectRatio=\"xMinYMid meet\" aria-hidden=\"true\" > ${svg` <path class=\"cap-fill\" d=\"${cornerEndFill}\" /> <path class=\"cap-stroke\" fill=\"none\" d=\"${cornerEndStroke}\" /> `} </svg> </div> `; } renderCap(side) { if (this.type === \"generic\") return null; if (this.type === \"battery\" && side === \"end\") return null; if (this.type === \"atmospheric\") return this.renderAtmosphericCap(side); if (this.type === \"pressurized\") return html`<div class=\"cap cap-pressurized cap-${side}\"></div>`; return html`<div class=\"cap cap-battery cap-${side}\"></div>`; } render() { const safeMax = this.max > 0 ? this.max : 1; const percent = clamp(this.value / safeMax * 100, 0, 100); const isCompact = this.isCompact; const controlBadge = this._badgeControlType(); const alertBadge = this._badgeAlertType(); const interlockBadge = this._badgeInterlockType(); const commandLockedBadge = this._badgeCommandLockedType(); const hasEnumBadges = controlBadge !== null || alertBadge !== null || interlockBadge !== null || commandLockedBadge !== null; const badgesHidden = isCompact && !this._hasBadges && !hasEnumBadges; const tagHidden = isCompact && !this._hasTagSlot && !this.tag; const badgesCell = html` <div class=\"badges\" ?hidden=${badgesHidden}> <slot name=\"badges\" @slotchange=${this._onBadgesSlotChange}> ${controlBadge ? html`<obc-automation-badge .type=${controlBadge} ></obc-automation-badge>` : nothing} ${alertBadge ? html`<obc-automation-badge .type=${alertBadge} ></obc-automation-badge>` : nothing} ${interlockBadge ? html`<obc-automation-badge .type=${interlockBadge} ></obc-automation-badge>` : nothing} ${commandLockedBadge ? html`<obc-automation-badge .type=${commandLockedBadge} ></obc-automation-badge>` : nothing} </slot> </div> `; const tagCell = html` <div class=\"tag\" ?hidden=${tagHidden}> <slot name=\"tag\" @slotchange=${this._onTagSlotChange}>${this.tag}</slot> </div> `; const readoutCell = this.static ? html` <div class=\"readout readout-compact readout-static\"> <slot name=\"readout\"> <slot name=\"max-value\">${this.max.toFixed(0)}</slot> <slot name=\"unit\">m<sup>3</sup></slot> </slot> </div> ` : isCompact ? html` <div class=\"readout readout-compact\"> <slot name=\"readout\"> ${this.showTrendSymbol ? this.trendIcon() : null} <span class=\"percent\" >${percent.toFixed(0)}<span class=\"percent-symbol\" >%</span ></span > </slot> </div> ` : html` <div class=\"readout\"> <slot name=\"readout\"> <div class=\"header\"> ${this.showTrendSymbol ? this.trendIcon() : null} <div class=\"percent\"> ${percent.toFixed(this.percentFractionDigits)}<span class=\"percent-symbol\" >%</span > </div> </div> <div class=\"value\"> <div class=\"current\"> <slot name=\"current-value\" class=\"current-value\" >${this.value.toFixed(0)}</slot ><span class=\"divider\">/</span> </div> <div class=\"max\"> <slot class=\"max-value\" name=\"max-value\" >${this.max.toFixed(0)}</slot > <slot class=\"unit\" name=\"unit\">m<sup>3</sup></slot> </div> </div> <div class=\"rich-divider\" ?hidden=${!this._hasRichSlot}></div> <slot name=\"rich\" @slotchange=${this._onRichSlotChange}></slot> </slot> </div> `; const graphIconClasses = classMap({ \"graph-icon\": true, \"priority-enhanced\": this.priority === Priority.enhanced }); const graphIconOverlay = this.type === \"battery\" ? html` <div class=${graphIconClasses} aria-hidden=\"true\"> <obi-energy-battery class=\"graph-icon-stroke\" ></obi-energy-battery> <obi-energy-battery class=\"graph-icon-fill\"></obi-energy-battery> </div> ` : html` <div class=${graphIconClasses} aria-hidden=\"true\"> <obi-tank class=\"graph-icon-stroke\"></obi-tank> <obi-tank class=\"graph-icon-fill\"></obi-tank> </div> `; const alertFrameOverlay = this.alert ? html`<obc-alert-frame class=\"alert-frame\" .type=${this.alertFrameType} .thickness=${this.alertFrameThickness} .status=${this.alertFrameStatus} .showAlertCategoryIcon=${this.showAlertCategoryIcon} .showIcon=${this.showAlertIcon} > <span slot=\"icon\"><slot name=\"alert-icon\"></slot></span> <span slot=\"label\"><slot name=\"alert-label\"></slot></span> <span slot=\"timer\"><slot name=\"alert-timer\"></slot></span> </obc-alert-frame>` : null; let chartCell; if (this._usesGaugeTrend) { const hasSize = this._cellWidth > 0 && this._cellHeight > 0; chartCell = html` <div class=\"bar-container chart-cell\"> ${hasSize ? html`<obc-gauge-trend .data=${this.chartData} .minValue=${0} .maxValue=${safeMax} .value=${this.value} .hasBar=${this.chartMode === \"graph-and-bar\"} .hasScale=${false} .hasLabelPadding=${false} .chartFill=${true} .hasAdvice=${this.hasAdvice} .advice=${this.advice} .width=${this._cellWidth} .height=${this._cellHeight} .setpoint=${this.setpoint} .newSetpoint=${this.newSetpoint} .touching=${this.touching} .atSetpoint=${this.atSetpoint} .autoAtSetpoint=${this.autoAtSetpoint} .autoAtSetpointDeadband=${this.autoAtSetpointDeadband} .setpointAtZeroDeadband=${this.setpointAtZeroDeadband} .setpointOverride=${this.setpointOverride} .animateSetpoint=${this.animateSetpoint} style=\"width: 100%; height: 100%;\" .priority=${this.priority} ></obc-gauge-trend>` : null} ${this.hasGraphIcon ? graphIconOverlay : null} </div> `; } else { const hasSize = this._cellWidth > 0 && this._cellHeight > 0; const SCALE_REFERENCE_SIZE = 384; const hasSetpointMarker = this.setpoint !== void 0 || this.newSetpoint !== void 0 || this.departingNewSetpoint !== void 0; const outsideBarReserveVb = Math.max(this.hasAdvice ? 16 : 0, computeSetpointBandThickness({ hasSetpoint: hasSetpointMarker })); const safeCellHeight = Math.max(1, this._cellHeight); const viewBoxCross = this._cellWidth * SCALE_REFERENCE_SIZE / safeCellHeight; const barThickness = Math.max(0, viewBoxCross - outsideBarReserveVb); const barWrapper = html`<obc-bar-vertical .minValue=${0} .maxValue=${safeMax} .value=${this.value} .height=${this._cellHeight} .fixedAspectRatio=${true} .scaleReferenceSize=${SCALE_REFERENCE_SIZE} .paddingTop=${0} .paddingBottom=${0} .side=${ExternalScaleSide.right} .hasBar=${true} .hasScale=${false} .showLabels=${false} .barThickness=${barThickness} .fillMode=${FillMode.tint} .instrumentMode=${true} .borderRadius=${2} .advices=${this.hasAdvice ? this.advice : []} .advicePosition=${AdvicePosition.inner} .setpoint=${this.setpoint} .newSetpoint=${this.newSetpoint} .touching=${this.touching} .atSetpoint=${this.atSetpoint} .autoAtSetpoint=${this.autoAtSetpoint} .autoAtSetpointDeadband=${this.autoAtSetpointDeadband} .setpointAtZeroDeadband=${this.setpointAtZeroDeadband} .setpointOverride=${this.setpointOverride} .animateSetpoint=${this.animateSetpoint} style=\"width: 100%; height: 100%;\" .priority=${this.priority} ></obc-bar-vertical>`; chartCell = html` <div class=\"bar-container bar-cell\"> ${hasSize ? barWrapper : null} ${this.hasGraphIcon ? graphIconOverlay : null} </div> `; } const frameClasses = classMap({ \"tank-frame\": true, [`type-${this.type}`]: true, [`orientation-${this.orientation}`]: true, [this.medium]: true, compact: isCompact, static: this.static }); let middleContents; if (this.static) middleContents = html`<div class=\"static-readout\">${readoutCell}</div>`; else if (this.compact) middleContents = chartCell; else middleContents = html`<div class=\"grid\"> ${tagCell}${badgesCell}${readoutCell}${chartCell} </div>`; const tankFrame = html` <div class=${frameClasses}> ${this.renderCap(\"start\")} <div class=\"middle\">${middleContents}</div> ${this.renderCap(\"end\")} </div> `; let haloContents; if (this.static) haloContents = html`${badgesCell}${tankFrame}${tagCell}`; else if (this.compact) haloContents = html`${badgesCell}${tankFrame}${readoutCell}${tagCell}`; else haloContents = tankFrame; const halo = html` <div class=\"halo\">${haloContents}${alertFrameOverlay}</div> `; const isClickable = this.clickable && !this.static; const rootClasses = classMap({ root: true, activated: this.activated, clickable: isClickable }); if (this.static) return html`<div class=${rootClasses} role=\"img\" aria-label=${this.tag || \"Tank\"} aria-live=\"polite\" aria-atomic=\"true\" > ${halo} </div>`; if (!isClickable) return html`<div class=${rootClasses} aria-live=\"polite\" aria-atomic=\"true\" > ${halo} </div>`; return html`<button class=${rootClasses} type=\"button\" aria-label=${this.tag || \"Tank\"} aria-live=\"polite\" aria-atomic=\"true\" > ${halo} </button>`; } static { this.styles = unsafeCSS(automation_tank_default); } }"
|
|
1553
|
+
"default": "class ObcAutomationTank extends SetpointMixin(LitElement) { constructor(..._args) { super(..._args); this.medium = LineMedium.water; this.value = 0; this.max = 100; this.trend = \"stable\"; this.type = \"generic\"; this.orientation = \"vertical\"; this.compact = false; this.positioning = TankPositioning.button; this.static = false; this.clickable = true; this.activated = false; this.tag = \"\"; this.chartMode = \"bar\"; this.chartData = []; this.priority = Priority.regular; this.advice = []; this.hasAdvice = false; this.hasGraphIcon = false; this.alert = false; this.alertFrameType = ObcAlertFrameType.SmallSideFlip; this.alertFrameThickness = ObcAlertFrameThickness.Small; this.alertFrameStatus = AlertType.Alarm; this.alertFrameMode = ObcAlertFrameMode.ackedActive; this.showAlertCategoryIcon = true; this.showAlertIcon = false; this.showTrendSymbol = true; this.percentFractionDigits = 0; this.badgeControl = AutomationButtonBadgeControl.None; this.badgeAlert = AutomationButtonBadgeAlert.None; this.badgeInterlock = AutomationButtonBadgeInterlock.None; this.badgeCommandLocked = AutomationButtonBadgeCommandLocked.None; this._cellWidth = 0; this._cellHeight = 0; this._hasBadges = false; this._hasTagSlot = false; this._hasRichSlot = false; } get isCompact() { return this.compact || this.static; } _badgeAlertType() { switch (this.badgeAlert) { case AutomationButtonBadgeAlert.Silence: return ObcAutomationBadgeType.AlertSilenced; case AutomationButtonBadgeAlert.Caution: return ObcAutomationBadgeType.Caution; case AutomationButtonBadgeAlert.Warning: return ObcAutomationBadgeType.Warning; case AutomationButtonBadgeAlert.Alarm: return ObcAutomationBadgeType.Alarm; case AutomationButtonBadgeAlert.LevelCritical: return ObcAutomationBadgeType.LevelCritical; case AutomationButtonBadgeAlert.LevelHigh: return ObcAutomationBadgeType.LevelHigh; case AutomationButtonBadgeAlert.LevelMedium: return ObcAutomationBadgeType.LevelMedium; case AutomationButtonBadgeAlert.LevelLow: return ObcAutomationBadgeType.LevelLow; case AutomationButtonBadgeAlert.LevelDiagnostic: return ObcAutomationBadgeType.LevelDiagnostic; default: return null; } } _badgeControlType() { switch (this.badgeControl) { case AutomationButtonBadgeControl.Local: return ObcAutomationBadgeType.Local; case AutomationButtonBadgeControl.LocalOnly: return ObcAutomationBadgeType.LocalOnly; case AutomationButtonBadgeControl.Manual: return ObcAutomationBadgeType.Manual; case AutomationButtonBadgeControl.ManualOnly: return ObcAutomationBadgeType.ManualOnly; case AutomationButtonBadgeControl.Auto: return ObcAutomationBadgeType.Auto; default: return null; } } _badgeInterlockType() { switch (this.badgeInterlock) { case AutomationButtonBadgeInterlock.Interlock: return ObcAutomationBadgeType.Interlock; case AutomationButtonBadgeInterlock.InterlockInhibit: return ObcAutomationBadgeType.InterlockInhibit; default: return null; } } _badgeCommandLockedType() { if (this.badgeCommandLocked === AutomationButtonBadgeCommandLocked.CommandLocked) return ObcAutomationBadgeType.CommandLocked; return null; } get _usesGaugeTrend() { return this.chartMode === \"graph\" || this.chartMode === \"graph-and-bar\"; } _onBadgesSlotChange(e) { const slot = e.target; this._hasBadges = slot.assignedNodes({ flatten: true }).some((n) => n.nodeType === Node.ELEMENT_NODE || n.nodeType === Node.TEXT_NODE && !!n.textContent?.trim()); } _onTagSlotChange(e) { const slot = e.target; this._hasTagSlot = slot.assignedNodes({ flatten: true }).some((n) => n.nodeType === Node.ELEMENT_NODE || n.nodeType === Node.TEXT_NODE && !!n.textContent?.trim()); } _onRichSlotChange(e) { const slot = e.target; this._hasRichSlot = slot.assignedNodes({ flatten: true }).some((n) => n.nodeType === Node.ELEMENT_NODE || n.nodeType === Node.TEXT_NODE && !!n.textContent?.trim()); } disconnectedCallback() { super.disconnectedCallback(); this._chartResizeObserver?.disconnect(); this._chartResizeObserver = void 0; this._observedCell = void 0; } updated(changed) { super.updated(changed); this._syncChartResizeObserver(); } _syncChartResizeObserver() { const cell = this.renderRoot.querySelector(\".bar-container\"); if (!cell) { if (this._chartResizeObserver) { this._chartResizeObserver.disconnect(); this._observedCell = void 0; } return; } if (cell === this._observedCell) return; if (!this._chartResizeObserver) this._chartResizeObserver = new ResizeObserver((entries) => { const entry = entries[0]; if (!entry) return; const w = Math.round(entry.contentRect.width); const h = Math.round(entry.contentRect.height); if (w !== this._cellWidth) this._cellWidth = w; if (h !== this._cellHeight) this._cellHeight = h; }); else this._chartResizeObserver.disconnect(); this._chartResizeObserver.observe(cell); this._observedCell = cell; } trendIcon() { if (this.trend === \"fast-rising\") return html`<obi-chevron-double-up-google class=\"trend-icon\" ></obi-chevron-double-up-google>`; else if (this.trend === \"rising\") return html`<obi-chevron-up-google class=\"trend-icon\" ></obi-chevron-up-google>`; else if (this.trend === \"fast-falling\") return html`<obi-chevron-double-down-google class=\"trend-icon\" ></obi-chevron-double-down-google>`; else if (this.trend === \"falling\") return html`<obi-chevron-down-google class=\"trend-icon\" ></obi-chevron-down-google>`; else if (this.trend === \"closed\") return html`<obi-off class=\"trend-icon\"></obi-off>`; else return html`<obi-arrow-right-google class=\"trend-icon\" ></obi-arrow-right-google>`; } /** * Atmospheric cap, 3-piece (corner-start / stretchable middle arc / corner-end). * Each piece draws its own fill (closed) and stroke (open) so adjacent pieces * abut without a visible vertical seam line. Coordinates are derived from the * Figma 248x14 path; corners stay 12px wide while the middle arc stretches. * Position (start vs end) and orientation flipping are handled in CSS. * * Horizontal orientation reuses the same path data but rotates each piece * via an inner `<g transform=\"translate(0 H) rotate(-90)\">`, mapping the * source coord (x, y) to (y, H - x). The viewBox is swapped accordingly: * corner: 12x14 -> 14x12 (H=12) * middle: 224x14 -> 14x224 (H=224) * Cap-end (right side in horizontal) is mirrored via CSS scaleX(-1). */ renderAtmosphericCap(side) { const isHorizontal = this.orientation === \"horizontal\"; let cornerStartFill; let cornerStartStroke; let midFill; let midStroke; let cornerEndFill; let cornerEndStroke; let cornerW; let capH; let midW; if (this.isCompact) { cornerW = 7; capH = 10; midW = 149; cornerStartFill = \"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\"; cornerStartStroke = \"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\"; midFill = \"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\"; midStroke = \"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\"; cornerEndFill = \"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\"; cornerEndStroke = \"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\"; } else { cornerW = 12; capH = 14; midW = 224; cornerStartFill = \"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\"; cornerStartStroke = \"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\"; midFill = \"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\"; midStroke = \"M 0 6.5837 C 16 5.1124, 56 1.9444, 112 1.9444 C 168 1.9444, 208 5.1124, 224 6.5837\"; cornerEndFill = \"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\"; cornerEndStroke = \"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\"; } if (isHorizontal) return html` <div class=\"cap cap-atmospheric cap-${side}\"> <svg class=\"cap-corner cap-corner-start\" viewBox=\"0 0 ${capH} ${cornerW}\" preserveAspectRatio=\"xMidYMax meet\" aria-hidden=\"true\" > ${svg` <g transform=\"translate(0 ${cornerW}) rotate(-90)\"> <path class=\"cap-fill\" d=\"${cornerStartFill}\" /> <path class=\"cap-stroke\" fill=\"none\" d=\"${cornerStartStroke}\" /> </g> `} </svg> <svg class=\"cap-mid\" viewBox=\"0 0 ${capH} ${midW}\" preserveAspectRatio=\"none\" aria-hidden=\"true\" > ${svg` <g transform=\"translate(0 ${midW}) rotate(-90)\"> <path class=\"cap-fill\" d=\"${midFill}\" /> <path class=\"cap-stroke\" fill=\"none\" vector-effect=\"non-scaling-stroke\" d=\"${midStroke}\" /> </g> `} </svg> <svg class=\"cap-corner cap-corner-end\" viewBox=\"0 0 ${capH} ${cornerW}\" preserveAspectRatio=\"xMidYMin meet\" aria-hidden=\"true\" > ${svg` <g transform=\"translate(0 ${cornerW}) rotate(-90)\"> <path class=\"cap-fill\" d=\"${cornerEndFill}\" /> <path class=\"cap-stroke\" fill=\"none\" d=\"${cornerEndStroke}\" /> </g> `} </svg> </div> `; return html` <div class=\"cap cap-atmospheric cap-${side}\"> <svg class=\"cap-corner cap-corner-start\" viewBox=\"0 0 ${cornerW} ${capH}\" preserveAspectRatio=\"xMaxYMid meet\" aria-hidden=\"true\" > ${svg` <path class=\"cap-fill\" d=\"${cornerStartFill}\" /> <path class=\"cap-stroke\" fill=\"none\" d=\"${cornerStartStroke}\" /> `} </svg> <svg class=\"cap-mid\" viewBox=\"0 0 ${midW} ${capH}\" preserveAspectRatio=\"none\" aria-hidden=\"true\" > ${svg` <path class=\"cap-fill\" d=\"${midFill}\" /> <path class=\"cap-stroke\" fill=\"none\" vector-effect=\"non-scaling-stroke\" d=\"${midStroke}\" /> `} </svg> <svg class=\"cap-corner cap-corner-end\" viewBox=\"0 0 ${cornerW} ${capH}\" preserveAspectRatio=\"xMinYMid meet\" aria-hidden=\"true\" > ${svg` <path class=\"cap-fill\" d=\"${cornerEndFill}\" /> <path class=\"cap-stroke\" fill=\"none\" d=\"${cornerEndStroke}\" /> `} </svg> </div> `; } renderCap(side) { if (this.type === \"generic\") return null; if (this.type === \"battery\" && side === \"end\") return null; if (this.type === \"atmospheric\") return this.renderAtmosphericCap(side); if (this.type === \"pressurized\") return html`<div class=\"cap cap-pressurized cap-${side}\"></div>`; return html`<div class=\"cap cap-battery cap-${side}\"></div>`; } render() { const safeMax = this.max > 0 ? this.max : 1; const percent = clamp(this.value / safeMax * 100, 0, 100); const isCompact = this.isCompact; const controlBadge = this._badgeControlType(); const alertBadge = this._badgeAlertType(); const interlockBadge = this._badgeInterlockType(); const commandLockedBadge = this._badgeCommandLockedType(); const hasEnumBadges = controlBadge !== null || alertBadge !== null || interlockBadge !== null || commandLockedBadge !== null; const badgesHidden = isCompact && !this._hasBadges && !hasEnumBadges; const tagHidden = isCompact && !this._hasTagSlot && !this.tag; const badgesCell = html` <div class=\"badges\" ?hidden=${badgesHidden}> <slot name=\"badges\" @slotchange=${this._onBadgesSlotChange}> ${controlBadge ? html`<obc-automation-badge .type=${controlBadge} ></obc-automation-badge>` : nothing} ${alertBadge ? html`<obc-automation-badge .type=${alertBadge} ></obc-automation-badge>` : nothing} ${interlockBadge ? html`<obc-automation-badge .type=${interlockBadge} ></obc-automation-badge>` : nothing} ${commandLockedBadge ? html`<obc-automation-badge .type=${commandLockedBadge} ></obc-automation-badge>` : nothing} </slot> </div> `; const tagCell = html` <div class=\"tag\" ?hidden=${tagHidden}> <slot name=\"tag\" @slotchange=${this._onTagSlotChange}>${this.tag}</slot> </div> `; const readoutCell = this.static ? html` <div class=\"readout readout-compact readout-static\"> <slot name=\"readout\"> <slot name=\"max-value\">${this.max.toFixed(0)}</slot> <slot name=\"unit\">m<sup>3</sup></slot> </slot> </div> ` : isCompact ? html` <div class=\"readout readout-compact\"> <slot name=\"readout\"> ${this.showTrendSymbol ? this.trendIcon() : null} <span class=\"percent\" >${percent.toFixed(0)}<span class=\"percent-symbol\" >%</span ></span > </slot> </div> ` : html` <div class=\"readout\"> <slot name=\"readout\"> <div class=\"header\"> ${this.showTrendSymbol ? this.trendIcon() : null} <div class=\"percent\"> ${percent.toFixed(this.percentFractionDigits)}<span class=\"percent-symbol\" >%</span > </div> </div> <div class=\"value\"> <div class=\"current\"> <slot name=\"current-value\" class=\"current-value\" >${this.value.toFixed(0)}</slot ><span class=\"divider\">/</span> </div> <div class=\"max\"> <slot class=\"max-value\" name=\"max-value\" >${this.max.toFixed(0)}</slot > <slot class=\"unit\" name=\"unit\">m<sup>3</sup></slot> </div> </div> <div class=\"rich-divider\" ?hidden=${!this._hasRichSlot}></div> <slot name=\"rich\" @slotchange=${this._onRichSlotChange}></slot> </slot> </div> `; const graphIconClasses = classMap({ \"graph-icon\": true, \"priority-enhanced\": this.priority === Priority.enhanced }); const graphIconOverlay = this.type === \"battery\" ? html` <div class=${graphIconClasses} aria-hidden=\"true\"> <obi-energy-battery class=\"graph-icon-stroke\" ></obi-energy-battery> <obi-energy-battery class=\"graph-icon-fill\"></obi-energy-battery> </div> ` : html` <div class=${graphIconClasses} aria-hidden=\"true\"> <obi-tank class=\"graph-icon-stroke\"></obi-tank> <obi-tank class=\"graph-icon-fill\"></obi-tank> </div> `; const alertFrameOverlay = this.alert ? html`<obc-alert-frame class=\"alert-frame\" .type=${this.alertFrameType} .thickness=${this.alertFrameThickness} .status=${this.alertFrameStatus} .mode=${this.alertFrameMode} .showAlertCategoryIcon=${this.showAlertCategoryIcon} .showIcon=${this.showAlertIcon} > <span slot=\"icon\"><slot name=\"alert-icon\"></slot></span> <span slot=\"label\"><slot name=\"alert-label\"></slot></span> <span slot=\"timer\"><slot name=\"alert-timer\"></slot></span> </obc-alert-frame>` : null; let chartCell; if (this._usesGaugeTrend) { const hasSize = this._cellWidth > 0 && this._cellHeight > 0; chartCell = html` <div class=\"bar-container chart-cell\"> ${hasSize ? html`<obc-gauge-trend .data=${this.chartData} .minValue=${0} .maxValue=${safeMax} .value=${this.value} .hasBar=${this.chartMode === \"graph-and-bar\"} .hasScale=${false} .hasLabelPadding=${false} .chartFill=${true} .hasAdvice=${this.hasAdvice} .advice=${this.advice} .width=${this._cellWidth} .height=${this._cellHeight} .setpoint=${this.setpoint} .newSetpoint=${this.newSetpoint} .touching=${this.touching} .atSetpoint=${this.atSetpoint} .autoAtSetpoint=${this.autoAtSetpoint} .autoAtSetpointDeadband=${this.autoAtSetpointDeadband} .setpointAtZeroDeadband=${this.setpointAtZeroDeadband} .setpointOverride=${this.setpointOverride} .animateSetpoint=${this.animateSetpoint} style=\"width: 100%; height: 100%;\" .priority=${this.priority} ></obc-gauge-trend>` : null} ${this.hasGraphIcon ? graphIconOverlay : null} </div> `; } else { const hasSize = this._cellWidth > 0 && this._cellHeight > 0; const SCALE_REFERENCE_SIZE = 384; const hasSetpointMarker = this.setpoint !== void 0 || this.newSetpoint !== void 0 || this.departingNewSetpoint !== void 0; const outsideBarReserveVb = Math.max(this.hasAdvice ? 16 : 0, computeSetpointBandThickness({ hasSetpoint: hasSetpointMarker })); const safeCellHeight = Math.max(1, this._cellHeight); const viewBoxCross = this._cellWidth * SCALE_REFERENCE_SIZE / safeCellHeight; const barThickness = Math.max(0, viewBoxCross - outsideBarReserveVb); const barWrapper = html`<obc-bar-vertical .minValue=${0} .maxValue=${safeMax} .value=${this.value} .height=${this._cellHeight} .fixedAspectRatio=${true} .scaleReferenceSize=${SCALE_REFERENCE_SIZE} .paddingTop=${0} .paddingBottom=${0} .side=${ExternalScaleSide.right} .hasBar=${true} .hasScale=${false} .showLabels=${false} .barThickness=${barThickness} .fillMode=${FillMode.tint} .instrumentMode=${true} .borderRadius=${2} .advices=${this.hasAdvice ? this.advice : []} .advicePosition=${AdvicePosition.inner} .setpoint=${this.setpoint} .newSetpoint=${this.newSetpoint} .touching=${this.touching} .atSetpoint=${this.atSetpoint} .autoAtSetpoint=${this.autoAtSetpoint} .autoAtSetpointDeadband=${this.autoAtSetpointDeadband} .setpointAtZeroDeadband=${this.setpointAtZeroDeadband} .setpointOverride=${this.setpointOverride} .animateSetpoint=${this.animateSetpoint} style=\"width: 100%; height: 100%;\" .priority=${this.priority} ></obc-bar-vertical>`; chartCell = html` <div class=\"bar-container bar-cell\"> ${hasSize ? barWrapper : null} ${this.hasGraphIcon ? graphIconOverlay : null} </div> `; } const frameClasses = classMap({ \"tank-frame\": true, [`type-${this.type}`]: true, [`orientation-${this.orientation}`]: true, [this.medium]: true, compact: isCompact, static: this.static }); let middleContents; if (this.static) middleContents = html`<div class=\"static-readout\">${readoutCell}</div>`; else if (this.compact) middleContents = chartCell; else middleContents = html`<div class=\"grid\"> ${tagCell}${badgesCell}${readoutCell}${chartCell} </div>`; const tankFrame = html` <div class=${frameClasses}> ${this.renderCap(\"start\")} <div class=\"middle\">${middleContents}</div> ${this.renderCap(\"end\")} </div> `; let haloContents; if (this.static) haloContents = html`${badgesCell}${tankFrame}${tagCell}`; else if (this.compact) haloContents = html`${badgesCell}${tankFrame}${readoutCell}${tagCell}`; else haloContents = tankFrame; const halo = html` <div class=\"halo\">${haloContents}${alertFrameOverlay}</div> `; const isClickable = this.clickable && !this.static; const rootClasses = classMap({ root: true, activated: this.activated, clickable: isClickable }); if (this.static) return html`<div class=${rootClasses} role=\"img\" aria-label=${this.tag || \"Tank\"} aria-live=\"polite\" aria-atomic=\"true\" > ${halo} </div>`; if (!isClickable) return html`<div class=${rootClasses} aria-live=\"polite\" aria-atomic=\"true\" > ${halo} </div>`; return html`<button class=${rootClasses} type=\"button\" aria-label=${this.tag || \"Tank\"} aria-live=\"polite\" aria-atomic=\"true\" > ${halo} </button>`; } static { this.styles = unsafeCSS(automation_tank_default); } }"
|
|
1554
1554
|
}
|
|
1555
1555
|
],
|
|
1556
1556
|
"exports": [
|
|
@@ -2629,7 +2629,7 @@
|
|
|
2629
2629
|
{
|
|
2630
2630
|
"kind": "variable",
|
|
2631
2631
|
"name": "ObcAbstractSpecialtyTank",
|
|
2632
|
-
"default": "class extends LitElement { constructor(..._args) { super(..._args); this.medium = \"regular\"; this.static = false; this.showIcon = true; this.tag = \"\"; this.positioning = TankPositioning.button; this.clickable = true; this.activated = false; this.badgeControl = AutomationButtonBadgeControl.None; this.badgeAlert = AutomationButtonBadgeAlert.None; this.badgeInterlock = AutomationButtonBadgeInterlock.None; this.badgeCommandLocked = AutomationButtonBadgeCommandLocked.None; this.alert = false; this.alertFrameType = ObcAlertFrameType.SmallSideFlip; this.alertFrameThickness = ObcAlertFrameThickness.Small; this.alertFrameStatus = AlertType.Alarm; this.showAlertCategoryIcon = true; this.showAlertIcon = false; this._hasBadges = false; this._hasTagSlot = false; } get equipmentIcon() { throw new Error(\"\\\"equipmentIcon\\\" must be implemented in the subclass\"); } /** Accessible-name fallback used when `tag` is empty. */ get equipmentName() { throw new Error(\"\\\"equipmentName\\\" must be implemented in the subclass\"); } get frame() { throw new Error(\"\\\"frame\\\" must be implemented in the subclass\"); } get splitMode() { throw new Error(\"\\\"splitMode\\\" must be implemented in the subclass\"); } _badgeControlType() { switch (this.badgeControl) { case AutomationButtonBadgeControl.Local: return ObcAutomationBadgeType.Local; case AutomationButtonBadgeControl.LocalOnly: return ObcAutomationBadgeType.LocalOnly; case AutomationButtonBadgeControl.Manual: return ObcAutomationBadgeType.Manual; case AutomationButtonBadgeControl.ManualOnly: return ObcAutomationBadgeType.ManualOnly; case AutomationButtonBadgeControl.Auto: return ObcAutomationBadgeType.Auto; default: return null; } } _badgeAlertType() { switch (this.badgeAlert) { case AutomationButtonBadgeAlert.Silence: return ObcAutomationBadgeType.AlertSilenced; case AutomationButtonBadgeAlert.Caution: return ObcAutomationBadgeType.Caution; case AutomationButtonBadgeAlert.Warning: return ObcAutomationBadgeType.Warning; case AutomationButtonBadgeAlert.Alarm: return ObcAutomationBadgeType.Alarm; case AutomationButtonBadgeAlert.LevelCritical: return ObcAutomationBadgeType.LevelCritical; case AutomationButtonBadgeAlert.LevelHigh: return ObcAutomationBadgeType.LevelHigh; case AutomationButtonBadgeAlert.LevelMedium: return ObcAutomationBadgeType.LevelMedium; case AutomationButtonBadgeAlert.LevelLow: return ObcAutomationBadgeType.LevelLow; case AutomationButtonBadgeAlert.LevelDiagnostic: return ObcAutomationBadgeType.LevelDiagnostic; default: return null; } } _badgeInterlockType() { switch (this.badgeInterlock) { case AutomationButtonBadgeInterlock.Interlock: return ObcAutomationBadgeType.Interlock; case AutomationButtonBadgeInterlock.InterlockInhibit: return ObcAutomationBadgeType.InterlockInhibit; default: return null; } } _badgeCommandLockedType() { if (this.badgeCommandLocked === AutomationButtonBadgeCommandLocked.CommandLocked) return ObcAutomationBadgeType.CommandLocked; return null; } _slotHasContent(e) { return e.target.assignedNodes({ flatten: true }).some((n) => n.nodeType === Node.ELEMENT_NODE || n.nodeType === Node.TEXT_NODE && !!n.textContent?.trim()); } _onBadgesSlotChange(e) { this._hasBadges = this._slotHasContent(e); } _onTagSlotChange(e) { this._hasTagSlot = this._slotHasContent(e); } renderGraphic() { if (this.medium === \"regular\") return html`<div class=\"area area-single\"></div>`; if (this.splitMode === \"diagonal\") return this.renderDiagonalSplit(); return html` <div class=\"halves\"> <div class=\"area area-hot\"></div> <div class=\"area area-cold\"></div> </div> `; } /** * Diagonal split in a unit viewBox stretched over the area * (`preserveAspectRatio=\"none\"`); every stroke is `non-scaling` so the * borders and the gap keep their pixel widths at any aspect ratio. The * gap edges are drawn as one wide line per half, clipped to that half, * under the narrower frame-coloured gap line. */ renderDiagonalSplit() { const hot = \"0,0 1,0 0,1\"; const cold = \"1,0 1,1 0,1\"; return html` <div class=\"diagonal\"> <svg viewBox=\"0 0 1 1\" preserveAspectRatio=\"none\" aria-hidden=\"true\"> ${svg` <defs> <clipPath id=\"clip-hot\"><polygon points=${hot} /></clipPath> <clipPath id=\"clip-cold\"><polygon points=${cold} /></clipPath> </defs> <polygon class=\"area-fill area-hot\" points=${hot} /> <polygon class=\"area-fill area-cold\" points=${cold} /> <polygon class=\"area-stroke area-hot\" points=${hot} clip-path=\"url(#clip-hot)\" vector-effect=\"non-scaling-stroke\" /> <polygon class=\"area-stroke area-cold\" points=${cold} clip-path=\"url(#clip-cold)\" vector-effect=\"non-scaling-stroke\" /> <line class=\"gap-edge area-hot\" x1=\"1\" y1=\"0\" x2=\"0\" y2=\"1\" clip-path=\"url(#clip-hot)\" vector-effect=\"non-scaling-stroke\" /> <line class=\"gap-edge area-cold\" x1=\"1\" y1=\"0\" x2=\"0\" y2=\"1\" clip-path=\"url(#clip-cold)\" vector-effect=\"non-scaling-stroke\" /> <line class=\"gap\" x1=\"1\" y1=\"0\" x2=\"0\" y2=\"1\" vector-effect=\"non-scaling-stroke\" /> `} </svg> </div> `; } render() { const controlBadge = this._badgeControlType(); const alertBadge = this._badgeAlertType(); const interlockBadge = this._badgeInterlockType(); const commandLockedBadge = this._badgeCommandLockedType(); const hasEnumBadges = controlBadge !== null || alertBadge !== null || interlockBadge !== null || commandLockedBadge !== null; const badgesHidden = !this._hasBadges && !hasEnumBadges; const tagHidden = !this._hasTagSlot && !this.tag; const badgesCell = html` <div class=\"badges\" ?hidden=${badgesHidden}> <slot name=\"badges\" @slotchange=${this._onBadgesSlotChange}> ${controlBadge ? html`<obc-automation-badge .type=${controlBadge} ></obc-automation-badge>` : nothing} ${alertBadge ? html`<obc-automation-badge .type=${alertBadge} ></obc-automation-badge>` : nothing} ${interlockBadge ? html`<obc-automation-badge .type=${interlockBadge} ></obc-automation-badge>` : nothing} ${commandLockedBadge ? html`<obc-automation-badge .type=${commandLockedBadge} ></obc-automation-badge>` : nothing} </slot> </div> `; const tagCell = html` <div class=\"tag\" ?hidden=${tagHidden}> <slot name=\"tag\" @slotchange=${this._onTagSlotChange}>${this.tag}</slot> </div> `; const pressurized = this.frame === \"pressurized\"; const cap = (side) => pressurized ? html`<div class=\"cap cap-${side}\"><div class=\"cap-dome\"></div></div>` : nothing; const frameClasses = classMap({ \"tank-frame\": true, [`frame-${this.frame}`]: true, [`split-${this.splitMode}`]: true, [`medium-${this.medium}`]: true, static: this.static }); const tankFrame = html` <div class=${frameClasses}> ${cap(\"start\")} <div class=\"middle\"> <div class=\"content\"> ${this.static ? nothing : this.renderGraphic()} ${this.showIcon ? html`<div class=\"icon-frame\">${this.equipmentIcon}</div>` : nothing} </div> </div> ${cap(\"end\")} </div> `; const alertFrameOverlay = this.alert ? html`<obc-alert-frame class=\"alert-frame\" .type=${this.alertFrameType} .thickness=${this.alertFrameThickness} .status=${this.alertFrameStatus} .showAlertCategoryIcon=${this.showAlertCategoryIcon} .showIcon=${this.showAlertIcon} > <span slot=\"icon\"><slot name=\"alert-icon\"></slot></span> <span slot=\"label\"><slot name=\"alert-label\"></slot></span> <span slot=\"timer\"><slot name=\"alert-timer\"></slot></span> </obc-alert-frame>` : nothing; const halo = html` <div class=\"halo\"> ${badgesCell}${tankFrame}${tagCell}${alertFrameOverlay} </div> `; const isClickable = this.clickable && !this.static; const rootClasses = classMap({ root: true, activated: this.activated, clickable: isClickable }); const name = this.tag || this.equipmentName; if (this.static) return html`<div class=${rootClasses} role=\"img\" aria-label=${name} aria-live=\"polite\" aria-atomic=\"true\" > ${halo} </div>`; if (!isClickable) return html`<div class=${rootClasses} aria-live=\"polite\" aria-atomic=\"true\" > ${halo} </div>`; return html`<button class=${rootClasses} type=\"button\" aria-label=${name} aria-live=\"polite\" aria-atomic=\"true\" > ${halo} </button>`; } static { this.styles = unsafeCSS(specialty_tank_default); } }",
|
|
2632
|
+
"default": "class extends LitElement { constructor(..._args) { super(..._args); this.medium = \"regular\"; this.static = false; this.showIcon = true; this.tag = \"\"; this.positioning = TankPositioning.button; this.clickable = true; this.activated = false; this.badgeControl = AutomationButtonBadgeControl.None; this.badgeAlert = AutomationButtonBadgeAlert.None; this.badgeInterlock = AutomationButtonBadgeInterlock.None; this.badgeCommandLocked = AutomationButtonBadgeCommandLocked.None; this.alert = false; this.alertFrameType = ObcAlertFrameType.SmallSideFlip; this.alertFrameThickness = ObcAlertFrameThickness.Small; this.alertFrameStatus = AlertType.Alarm; this.alertFrameMode = ObcAlertFrameMode.ackedActive; this.showAlertCategoryIcon = true; this.showAlertIcon = false; this._hasBadges = false; this._hasTagSlot = false; } get equipmentIcon() { throw new Error(\"\\\"equipmentIcon\\\" must be implemented in the subclass\"); } /** Accessible-name fallback used when `tag` is empty. */ get equipmentName() { throw new Error(\"\\\"equipmentName\\\" must be implemented in the subclass\"); } get frame() { throw new Error(\"\\\"frame\\\" must be implemented in the subclass\"); } get splitMode() { throw new Error(\"\\\"splitMode\\\" must be implemented in the subclass\"); } _badgeControlType() { switch (this.badgeControl) { case AutomationButtonBadgeControl.Local: return ObcAutomationBadgeType.Local; case AutomationButtonBadgeControl.LocalOnly: return ObcAutomationBadgeType.LocalOnly; case AutomationButtonBadgeControl.Manual: return ObcAutomationBadgeType.Manual; case AutomationButtonBadgeControl.ManualOnly: return ObcAutomationBadgeType.ManualOnly; case AutomationButtonBadgeControl.Auto: return ObcAutomationBadgeType.Auto; default: return null; } } _badgeAlertType() { switch (this.badgeAlert) { case AutomationButtonBadgeAlert.Silence: return ObcAutomationBadgeType.AlertSilenced; case AutomationButtonBadgeAlert.Caution: return ObcAutomationBadgeType.Caution; case AutomationButtonBadgeAlert.Warning: return ObcAutomationBadgeType.Warning; case AutomationButtonBadgeAlert.Alarm: return ObcAutomationBadgeType.Alarm; case AutomationButtonBadgeAlert.LevelCritical: return ObcAutomationBadgeType.LevelCritical; case AutomationButtonBadgeAlert.LevelHigh: return ObcAutomationBadgeType.LevelHigh; case AutomationButtonBadgeAlert.LevelMedium: return ObcAutomationBadgeType.LevelMedium; case AutomationButtonBadgeAlert.LevelLow: return ObcAutomationBadgeType.LevelLow; case AutomationButtonBadgeAlert.LevelDiagnostic: return ObcAutomationBadgeType.LevelDiagnostic; default: return null; } } _badgeInterlockType() { switch (this.badgeInterlock) { case AutomationButtonBadgeInterlock.Interlock: return ObcAutomationBadgeType.Interlock; case AutomationButtonBadgeInterlock.InterlockInhibit: return ObcAutomationBadgeType.InterlockInhibit; default: return null; } } _badgeCommandLockedType() { if (this.badgeCommandLocked === AutomationButtonBadgeCommandLocked.CommandLocked) return ObcAutomationBadgeType.CommandLocked; return null; } _slotHasContent(e) { return e.target.assignedNodes({ flatten: true }).some((n) => n.nodeType === Node.ELEMENT_NODE || n.nodeType === Node.TEXT_NODE && !!n.textContent?.trim()); } _onBadgesSlotChange(e) { this._hasBadges = this._slotHasContent(e); } _onTagSlotChange(e) { this._hasTagSlot = this._slotHasContent(e); } renderGraphic() { if (this.medium === \"regular\") return html`<div class=\"area area-single\"></div>`; if (this.splitMode === \"diagonal\") return this.renderDiagonalSplit(); return html` <div class=\"halves\"> <div class=\"area area-hot\"></div> <div class=\"area area-cold\"></div> </div> `; } /** * Diagonal split in a unit viewBox stretched over the area * (`preserveAspectRatio=\"none\"`); every stroke is `non-scaling` so the * borders and the gap keep their pixel widths at any aspect ratio. The * gap edges are drawn as one wide line per half, clipped to that half, * under the narrower frame-coloured gap line. */ renderDiagonalSplit() { const hot = \"0,0 1,0 0,1\"; const cold = \"1,0 1,1 0,1\"; return html` <div class=\"diagonal\"> <svg viewBox=\"0 0 1 1\" preserveAspectRatio=\"none\" aria-hidden=\"true\"> ${svg` <defs> <clipPath id=\"clip-hot\"><polygon points=${hot} /></clipPath> <clipPath id=\"clip-cold\"><polygon points=${cold} /></clipPath> </defs> <polygon class=\"area-fill area-hot\" points=${hot} /> <polygon class=\"area-fill area-cold\" points=${cold} /> <polygon class=\"area-stroke area-hot\" points=${hot} clip-path=\"url(#clip-hot)\" vector-effect=\"non-scaling-stroke\" /> <polygon class=\"area-stroke area-cold\" points=${cold} clip-path=\"url(#clip-cold)\" vector-effect=\"non-scaling-stroke\" /> <line class=\"gap-edge area-hot\" x1=\"1\" y1=\"0\" x2=\"0\" y2=\"1\" clip-path=\"url(#clip-hot)\" vector-effect=\"non-scaling-stroke\" /> <line class=\"gap-edge area-cold\" x1=\"1\" y1=\"0\" x2=\"0\" y2=\"1\" clip-path=\"url(#clip-cold)\" vector-effect=\"non-scaling-stroke\" /> <line class=\"gap\" x1=\"1\" y1=\"0\" x2=\"0\" y2=\"1\" vector-effect=\"non-scaling-stroke\" /> `} </svg> </div> `; } render() { const controlBadge = this._badgeControlType(); const alertBadge = this._badgeAlertType(); const interlockBadge = this._badgeInterlockType(); const commandLockedBadge = this._badgeCommandLockedType(); const hasEnumBadges = controlBadge !== null || alertBadge !== null || interlockBadge !== null || commandLockedBadge !== null; const badgesHidden = !this._hasBadges && !hasEnumBadges; const tagHidden = !this._hasTagSlot && !this.tag; const badgesCell = html` <div class=\"badges\" ?hidden=${badgesHidden}> <slot name=\"badges\" @slotchange=${this._onBadgesSlotChange}> ${controlBadge ? html`<obc-automation-badge .type=${controlBadge} ></obc-automation-badge>` : nothing} ${alertBadge ? html`<obc-automation-badge .type=${alertBadge} ></obc-automation-badge>` : nothing} ${interlockBadge ? html`<obc-automation-badge .type=${interlockBadge} ></obc-automation-badge>` : nothing} ${commandLockedBadge ? html`<obc-automation-badge .type=${commandLockedBadge} ></obc-automation-badge>` : nothing} </slot> </div> `; const tagCell = html` <div class=\"tag\" ?hidden=${tagHidden}> <slot name=\"tag\" @slotchange=${this._onTagSlotChange}>${this.tag}</slot> </div> `; const pressurized = this.frame === \"pressurized\"; const cap = (side) => pressurized ? html`<div class=\"cap cap-${side}\"><div class=\"cap-dome\"></div></div>` : nothing; const frameClasses = classMap({ \"tank-frame\": true, [`frame-${this.frame}`]: true, [`split-${this.splitMode}`]: true, [`medium-${this.medium}`]: true, static: this.static }); const tankFrame = html` <div class=${frameClasses}> ${cap(\"start\")} <div class=\"middle\"> <div class=\"content\"> ${this.static ? nothing : this.renderGraphic()} ${this.showIcon ? html`<div class=\"icon-frame\">${this.equipmentIcon}</div>` : nothing} </div> </div> ${cap(\"end\")} </div> `; const alertFrameOverlay = this.alert ? html`<obc-alert-frame class=\"alert-frame\" .type=${this.alertFrameType} .thickness=${this.alertFrameThickness} .status=${this.alertFrameStatus} .mode=${this.alertFrameMode} .showAlertCategoryIcon=${this.showAlertCategoryIcon} .showIcon=${this.showAlertIcon} > <span slot=\"icon\"><slot name=\"alert-icon\"></slot></span> <span slot=\"label\"><slot name=\"alert-label\"></slot></span> <span slot=\"timer\"><slot name=\"alert-timer\"></slot></span> </obc-alert-frame>` : nothing; const halo = html` <div class=\"halo\"> ${badgesCell}${tankFrame}${tagCell}${alertFrameOverlay} </div> `; const isClickable = this.clickable && !this.static; const rootClasses = classMap({ root: true, activated: this.activated, clickable: isClickable }); const name = this.tag || this.equipmentName; if (this.static) return html`<div class=${rootClasses} role=\"img\" aria-label=${name} aria-live=\"polite\" aria-atomic=\"true\" > ${halo} </div>`; if (!isClickable) return html`<div class=${rootClasses} aria-live=\"polite\" aria-atomic=\"true\" > ${halo} </div>`; return html`<button class=${rootClasses} type=\"button\" aria-label=${name} aria-live=\"polite\" aria-atomic=\"true\" > ${halo} </button>`; } static { this.styles = unsafeCSS(specialty_tank_default); } }",
|
|
2633
2633
|
"description": "Base class for the specialty-tank tiles `obc-heat-pump`,\n`obc-hydraulic-separator` and `obc-heat-exchanger`. Owns the halo, badge\nrow, tank frame with its hot/cold graphic area and equipment icon, tag\nreadout and alert-frame overlay. Subclasses supply `equipmentIcon`,\n`equipmentName`, `frame` and `splitMode`, plus their own host footprint.\n\n## Layout\nThe same shell as a compact `obc-automation-tank`: a fixed host (or\n`positioning=\"button\"` to fill the parent), a 4px-padded halo holding\nbadges, the tank frame and the tag, the frame absorbing the space of\nempty badge and tag cells. Hover, pressed, focus-visible and `activated`\nare painted on the halo by the flat style mixin; `clickable` and `static`\nswitch the root between a `<button>`, a plain `<div>` and a\n`<div role=\"img\">` exactly as the tank does.\n\nNot declared `abstract`: the wrapper generators wrap every `LitElement`\nsubclass and pass its constructor as a concrete `Constructor<T>`, so the\noverride points throw instead (same as `ObcAbstractAutomationButton`)."
|
|
2634
2634
|
}
|
|
2635
2635
|
],
|
|
@@ -2820,7 +2820,7 @@
|
|
|
2820
2820
|
{
|
|
2821
2821
|
"kind": "variable",
|
|
2822
2822
|
"name": "ObcTransmitter",
|
|
2823
|
-
"default": "class ObcTransmitter extends LitElement { constructor(..._args) { super(..._args); this.orientation = TransmitterOrientation.bottom; this.type = \"value\"; this.lineType = void 0; this.unit = \"\"; this.fractionDigits = 1; this.maxDigits = 0; this.hintedZeros = false; this.hasSignSpacer = false; this.hasDegree = false; this.size = TransmitterButtonSize.regular; this.hasIcon = false; this.hasAdvice = false; this.hasAlert = false; this.hasSetPoint = false; this.tag = \"\"; this.idTag = \"\"; this.data = [[], []]; } get hasGraph() { return this.type === \"horizontal-graph\" || this.type === \"vertical-graph\"; } renderButton() { const isIndicator = this.type === \"indicator\"; return html` <obc-transmitter-button class=\"chip\" .variant=${isIndicator ? TransmitterButtonVariant.tag : TransmitterButtonVariant.value} .size=${this.size} .value=${this.value} .unit=${this.unit} .fractionDigits=${this.fractionDigits} .maxDigits=${this.maxDigits} .hintedZeros=${this.hintedZeros} .hasSignSpacer=${this.hasSignSpacer} .hasDegree=${this.hasDegree} .hasIcon=${this.hasIcon} .hasAdvice=${this.hasAdvice} .adviceValue=${this.adviceValue} .hasSetPoint=${this.hasSetPoint} .setpointValue=${this.setpointValue} .label=${this.tag} .idTag=${this.idTag} > <slot name=\"icon\" slot=\"icon\"></slot> </obc-transmitter-button> `; } renderGraph() { if (!this.hasGraph) return nothing; const layout = { size: ObcIndicatorGraphSize.small, fill: true }; return html` <div class=\"graph-box\"> <obc-indicator-graph .data=${this.data} .layout=${layout}> </obc-indicator-graph> </div> `; } renderLabel() { if (!this.idTag) return nothing; return html`<div class=\"id-tag\" aria-hidden=\"true\">${this.idTag}</div>`; } renderContent() { return html` <div class=\"content\"> <div class=\"body\">${this.renderButton()} ${this.renderGraph()}</div> ${this.renderLabel()} </div> `; }
|
|
2823
|
+
"default": "class ObcTransmitter extends LitElement { constructor(..._args) { super(..._args); this.orientation = TransmitterOrientation.bottom; this.type = \"value\"; this.lineType = void 0; this.unit = \"\"; this.fractionDigits = 1; this.maxDigits = 0; this.hintedZeros = false; this.hasSignSpacer = false; this.hasDegree = false; this.size = TransmitterButtonSize.regular; this.hasIcon = false; this.hasAdvice = false; this.hasAlert = false; this.alertFrameStatus = AlertType.Alarm; this.alertFrameType = ObcAlertFrameType.Regular; this.alertFrameThickness = ObcAlertFrameThickness.Small; this.alertFrameMode = ObcAlertFrameMode.ackedActive; this.showAlertCategoryIcon = true; this.showAlertIcon = false; this.hasSetPoint = false; this.tag = \"\"; this.idTag = \"\"; this.data = [[], []]; } get hasGraph() { return this.type === \"horizontal-graph\" || this.type === \"vertical-graph\"; } renderButton() { const isIndicator = this.type === \"indicator\"; return html` <obc-transmitter-button class=\"chip\" .variant=${isIndicator ? TransmitterButtonVariant.tag : TransmitterButtonVariant.value} .size=${this.size} .value=${this.value} .unit=${this.unit} .fractionDigits=${this.fractionDigits} .maxDigits=${this.maxDigits} .hintedZeros=${this.hintedZeros} .hasSignSpacer=${this.hasSignSpacer} .hasDegree=${this.hasDegree} .hasIcon=${this.hasIcon} .hasAdvice=${this.hasAdvice} .adviceValue=${this.adviceValue} .hasSetPoint=${this.hasSetPoint} .setpointValue=${this.setpointValue} .label=${this.tag} .idTag=${this.idTag} > <slot name=\"icon\" slot=\"icon\"></slot> </obc-transmitter-button> `; } renderGraph() { if (!this.hasGraph) return nothing; const layout = { size: ObcIndicatorGraphSize.small, fill: true }; return html` <div class=\"graph-box\"> <obc-indicator-graph .data=${this.data} .layout=${layout}> </obc-indicator-graph> </div> `; } renderLabel() { if (!this.idTag) return nothing; return html`<div class=\"id-tag\" aria-hidden=\"true\">${this.idTag}</div>`; } renderContent() { return html` <div class=\"content\"> <div class=\"body\">${this.renderButton()} ${this.renderGraph()}</div> ${this.renderLabel()} </div> `; } renderAlertFrame(content) { return html` <obc-alert-frame class=\"alert-frame\" .type=${this.alertFrameType} .thickness=${this.alertFrameThickness} .status=${this.alertFrameStatus} .mode=${this.alertFrameMode} .showAlertCategoryIcon=${this.showAlertCategoryIcon} .showIcon=${this.showAlertIcon} .wrapContent=${true} > ${content} <span slot=\"icon\"><slot name=\"alert-icon\"></slot></span> <span slot=\"label\"><slot name=\"alert-label\"></slot></span> <span slot=\"timer\"><slot name=\"alert-timer\"></slot></span> </obc-alert-frame> `; } render() { const content = this.hasAlert ? this.renderAlertFrame(this.renderContent()) : this.renderContent(); return html` <div class=${classMap({ transmitter: true, \"has-alert\": this.hasAlert, [`orientation-${this.orientation}`]: true, [`type-${this.type}`]: true })} style=\"--offset: ${transmitterLeaderOffset(this.lineType)}px;\" > ${content} </div> `; } static { this.styles = unsafeCSS(transmitter_default); } }"
|
|
2824
2824
|
}
|
|
2825
2825
|
],
|
|
2826
2826
|
"exports": [
|
|
@@ -3486,7 +3486,7 @@
|
|
|
3486
3486
|
{
|
|
3487
3487
|
"kind": "variable",
|
|
3488
3488
|
"name": "ObcAccordionCard",
|
|
3489
|
-
"default": "class ObcAccordionCard extends LitElement { constructor(..._args) { super(..._args); this.cardTitle = \"\"; this.description = \"\"; this.statusLabel = \"\"; this.expanded = false; this.disabled = false; this.hasAlert = false; this.hasDescription = false; this.hasStatusLabel = false; this.hasLeadingIcon = false; this.position = \"regular\"; this.size = \"single-line\"; this.alertFrameType = ObcAlertFrameType.Regular; this.alertFrameThickness = ObcAlertFrameThickness.Small; this.alertFrameStatus = AlertType.Alarm; } get shouldShowDescription() { return this.size === \"large\" && this.hasDescription && this.description.trim() !== \"\"; } handleToggle() { if (this.disabled) return; this.expanded = !this.expanded; /** * Fired when the accordion is expanded or collapsed. * @fires accordion-toggle */ this.dispatchEvent(new CustomEvent(\"accordion-toggle\", { detail: { expanded: this.expanded, cardTitle: this.cardTitle } })); } /** * Keeps the keyboard somewhere predictable when the panel closes. * * A collapsed panel is `inert`, and the browser drops focus out of anything * it makes inert — onto `<body>`, two frames later. Clicking the header * already leaves focus there; a consumer setting `expanded` while a slotted * control has focus is the case that needs the transfer. */ willUpdate(changed) { if (!changed.has(\"expanded\") || this.expanded) return; const panel = this.shadowRoot?.querySelector(\".panel\"); if (!panel) return; releaseFocusBefore(panel, this.shadowRoot?.querySelector(\".content-button\"), this.shadowRoot?.querySelector(\".wrapper\")); } renderContentMain() { return html` <div class=\"header-container\"> <div class=\"content-container\"> ${this.hasLeadingIcon ? html` <div class=\"container-icon\"> <slot name=\"leading-icon\"></slot> </div> ` : \"\"} <div class=\"container-labels\"> <div class=\"label-title\">${this.cardTitle}</div> ${this.shouldShowDescription ? html` <div class=\"label-description\">${this.description}</div> ` : \"\"} </div> ${this.hasStatusLabel ? html` <div class=\"container-status\"> <div class=\"status\">${this.statusLabel}</div> </div> ` : \"\"} <div class=\"trailing-icon\"> <obi-chevron-down-google></obi-chevron-down-google> </div> </div> </div> `; } renderContentAdditional() { return html` <div class=\"panel\" id=\"accordion-content\" ?inert=${!this.expanded}> <div class=\"panel-inner\"> <div class=\"container-content-additional\"> <slot name=\"expanded-content\"></slot> </div> </div> </div> `; } isShartEdgeBottom() { return this.position === \"top\" || this.position === \"center\"; } isShartEdgeTop() { return this.position === \"bottom\" || this.position === \"center\"; } render() { return html` <div tabindex=\"-1\" class=${classMap({ wrapper: true, \"state-expanded\": this.expanded, \"state-collapsed\": !this.expanded, \"state-disabled\": this.disabled, \"style-single-line\": this.size === \"single-line\", \"style-large\": this.size === \"large\", \"position-top\": this.position === \"top\", \"position-bottom\": this.position === \"bottom\", \"position-center\": this.position === \"center\" })} style=\"position: relative;\" > <div class=\"card-container\"> <button class=\"content-button\" @click=${this.handleToggle} ?disabled=${this.disabled} aria-expanded=${this.expanded} aria-controls=\"accordion-content\" > ${this.renderContentMain()} </button> ${this.renderContentAdditional()} </div> ${this.hasAlert ? html` <obc-alert-frame class=\"alert alert-${this.alertFrameStatus}\" .sharpEdgeTopLeft=${this.isShartEdgeTop()} .sharpEdgeTopRight=${this.isShartEdgeTop()} .sharpEdgeBottomLeft=${this.isShartEdgeBottom()} .sharpEdgeBottomRight=${this.isShartEdgeBottom()} .type=${this.alertFrameType} .thickness=${this.alertFrameThickness} .status=${this.alertFrameStatus} > <slot name=\"alert-icon\" slot=\"icon\"></slot> <slot name=\"alert-label\" slot=\"label\"></slot> <slot name=\"alert-timer\" slot=\"timer\"></slot> </obc-alert-frame> ` : \"\"} </div> `; } static { this.styles = unsafeCSS(accordion_card_default); } }"
|
|
3489
|
+
"default": "class ObcAccordionCard extends LitElement { constructor(..._args) { super(..._args); this.cardTitle = \"\"; this.description = \"\"; this.statusLabel = \"\"; this.expanded = false; this.disabled = false; this.hasAlert = false; this.hasDescription = false; this.hasStatusLabel = false; this.hasLeadingIcon = false; this.position = \"regular\"; this.size = \"single-line\"; this.alertFrameType = ObcAlertFrameType.Regular; this.alertFrameThickness = ObcAlertFrameThickness.Small; this.alertFrameStatus = AlertType.Alarm; this.alertFrameMode = ObcAlertFrameMode.ackedActive; this.showAlertCategoryIcon = true; this.showAlertIcon = false; } get shouldShowDescription() { return this.size === \"large\" && this.hasDescription && this.description.trim() !== \"\"; } handleToggle() { if (this.disabled) return; this.expanded = !this.expanded; /** * Fired when the accordion is expanded or collapsed. * @fires accordion-toggle */ this.dispatchEvent(new CustomEvent(\"accordion-toggle\", { detail: { expanded: this.expanded, cardTitle: this.cardTitle } })); } /** * Keeps the keyboard somewhere predictable when the panel closes. * * A collapsed panel is `inert`, and the browser drops focus out of anything * it makes inert — onto `<body>`, two frames later. Clicking the header * already leaves focus there; a consumer setting `expanded` while a slotted * control has focus is the case that needs the transfer. */ willUpdate(changed) { if (!changed.has(\"expanded\") || this.expanded) return; const panel = this.shadowRoot?.querySelector(\".panel\"); if (!panel) return; releaseFocusBefore(panel, this.shadowRoot?.querySelector(\".content-button\"), this.shadowRoot?.querySelector(\".wrapper\")); } renderContentMain() { return html` <div class=\"header-container\"> <div class=\"content-container\"> ${this.hasLeadingIcon ? html` <div class=\"container-icon\"> <slot name=\"leading-icon\"></slot> </div> ` : \"\"} <div class=\"container-labels\"> <div class=\"label-title\">${this.cardTitle}</div> ${this.shouldShowDescription ? html` <div class=\"label-description\">${this.description}</div> ` : \"\"} </div> ${this.hasStatusLabel ? html` <div class=\"container-status\"> <div class=\"status\">${this.statusLabel}</div> </div> ` : \"\"} <div class=\"trailing-icon\"> <obi-chevron-down-google></obi-chevron-down-google> </div> </div> </div> `; } renderContentAdditional() { return html` <div class=\"panel\" id=\"accordion-content\" ?inert=${!this.expanded}> <div class=\"panel-inner\"> <div class=\"container-content-additional\"> <slot name=\"expanded-content\"></slot> </div> </div> </div> `; } isShartEdgeBottom() { return this.position === \"top\" || this.position === \"center\"; } isShartEdgeTop() { return this.position === \"bottom\" || this.position === \"center\"; } render() { return html` <div tabindex=\"-1\" class=${classMap({ wrapper: true, \"state-expanded\": this.expanded, \"state-collapsed\": !this.expanded, \"state-disabled\": this.disabled, \"style-single-line\": this.size === \"single-line\", \"style-large\": this.size === \"large\", \"position-top\": this.position === \"top\", \"position-bottom\": this.position === \"bottom\", \"position-center\": this.position === \"center\" })} style=\"position: relative;\" > <div class=\"card-container\"> <button class=\"content-button\" @click=${this.handleToggle} ?disabled=${this.disabled} aria-expanded=${this.expanded} aria-controls=\"accordion-content\" > ${this.renderContentMain()} </button> ${this.renderContentAdditional()} </div> ${this.hasAlert ? html` <obc-alert-frame class=\"alert alert-${this.alertFrameStatus}\" .sharpEdgeTopLeft=${this.isShartEdgeTop()} .sharpEdgeTopRight=${this.isShartEdgeTop()} .sharpEdgeBottomLeft=${this.isShartEdgeBottom()} .sharpEdgeBottomRight=${this.isShartEdgeBottom()} .type=${this.alertFrameType} .thickness=${this.alertFrameThickness} .status=${this.alertFrameStatus} .mode=${this.alertFrameMode} .showAlertCategoryIcon=${this.showAlertCategoryIcon} .showIcon=${this.showAlertIcon} > <slot name=\"alert-icon\" slot=\"icon\"></slot> <slot name=\"alert-label\" slot=\"label\"></slot> <slot name=\"alert-timer\" slot=\"timer\"></slot> </obc-alert-frame> ` : \"\"} </div> `; } static { this.styles = unsafeCSS(accordion_card_default); } }"
|
|
3490
3490
|
}
|
|
3491
3491
|
],
|
|
3492
3492
|
"exports": [
|
|
@@ -23632,28 +23632,39 @@
|
|
|
23632
23632
|
"text": "boolean"
|
|
23633
23633
|
},
|
|
23634
23634
|
"default": "false",
|
|
23635
|
-
"description": "Show an `<obc-alert-frame>` overlay around the bordered tank area (the `.halo` wrapper). Mirrors the API of `obc-automation-button`: same
|
|
23635
|
+
"description": "Show an `<obc-alert-frame>` overlay around the bordered tank area (the `.halo` wrapper). Mirrors the API of `obc-automation-button`: same seven properties, same three slots (`alert-icon`, `alert-label`, `alert-timer`). The ring overlays `.halo` only, so the tag and readout that sit outside the halo in compact / static layouts remain unaffected."
|
|
23636
23636
|
},
|
|
23637
23637
|
{
|
|
23638
23638
|
"kind": "field",
|
|
23639
23639
|
"name": "alertFrameType",
|
|
23640
23640
|
"type": {
|
|
23641
23641
|
"text": "ObcAlertFrameType"
|
|
23642
|
-
}
|
|
23642
|
+
},
|
|
23643
|
+
"description": "Shape of the alert frame."
|
|
23643
23644
|
},
|
|
23644
23645
|
{
|
|
23645
23646
|
"kind": "field",
|
|
23646
23647
|
"name": "alertFrameThickness",
|
|
23647
23648
|
"type": {
|
|
23648
23649
|
"text": "ObcAlertFrameThickness"
|
|
23649
|
-
}
|
|
23650
|
+
},
|
|
23651
|
+
"description": "Thickness of the alert frame."
|
|
23650
23652
|
},
|
|
23651
23653
|
{
|
|
23652
23654
|
"kind": "field",
|
|
23653
23655
|
"name": "alertFrameStatus",
|
|
23654
23656
|
"type": {
|
|
23655
23657
|
"text": "AlertType"
|
|
23656
|
-
}
|
|
23658
|
+
},
|
|
23659
|
+
"description": "Alert status the frame is coloured for."
|
|
23660
|
+
},
|
|
23661
|
+
{
|
|
23662
|
+
"kind": "field",
|
|
23663
|
+
"name": "alertFrameMode",
|
|
23664
|
+
"type": {
|
|
23665
|
+
"text": "ObcAlertFrameMode"
|
|
23666
|
+
},
|
|
23667
|
+
"description": "Acknowledgement state of the alert: `acked-active` (default) is steady, `unacked-active` flashes, `unacked-rectified` flashes a dashed frame."
|
|
23657
23668
|
},
|
|
23658
23669
|
{
|
|
23659
23670
|
"kind": "field",
|
|
@@ -23661,7 +23672,8 @@
|
|
|
23661
23672
|
"type": {
|
|
23662
23673
|
"text": "boolean"
|
|
23663
23674
|
},
|
|
23664
|
-
"default": "true"
|
|
23675
|
+
"default": "true",
|
|
23676
|
+
"description": "Shows the alert category icon inside the frame."
|
|
23665
23677
|
},
|
|
23666
23678
|
{
|
|
23667
23679
|
"kind": "field",
|
|
@@ -23669,7 +23681,8 @@
|
|
|
23669
23681
|
"type": {
|
|
23670
23682
|
"text": "boolean"
|
|
23671
23683
|
},
|
|
23672
|
-
"default": "false"
|
|
23684
|
+
"default": "false",
|
|
23685
|
+
"description": "Shows the slotted alert icon inside the frame."
|
|
23673
23686
|
},
|
|
23674
23687
|
{
|
|
23675
23688
|
"kind": "field",
|
|
@@ -31826,7 +31839,7 @@
|
|
|
31826
31839
|
"declarations": [
|
|
31827
31840
|
{
|
|
31828
31841
|
"kind": "class",
|
|
31829
|
-
"description": "`<obc-heat-exchanger>` – HVAC tile for a heat exchanger.\n\nA 56×142 pressurized-tank silhouette whose graphic area splits diagonally\ninto two corner-to-corner triangles — hot top-left, cold bottom-right —\naround a centered heat-exchanger icon, with an optional badge row above\nthe frame and a tag readout below it.\n\n## Features / Variants\n- `medium` selects the graphic area: one grey area (`regular`), two grey\n triangles (`graphic`) or hot/cold triangles (`medium`).\n- `static` renders a flat, display-only tile with a bare icon.\n- Enum-driven badges (`badgeControl`, `badgeAlert`, `badgeInterlock`,\n `badgeCommandLocked`) or the `badges` slot fill the badge row; it\n collapses when empty, as does the tag cell.\n- Alert-frame overlay with the same
|
|
31842
|
+
"description": "`<obc-heat-exchanger>` – HVAC tile for a heat exchanger.\n\nA 56×142 pressurized-tank silhouette whose graphic area splits diagonally\ninto two corner-to-corner triangles — hot top-left, cold bottom-right —\naround a centered heat-exchanger icon, with an optional badge row above\nthe frame and a tag readout below it.\n\n## Features / Variants\n- `medium` selects the graphic area: one grey area (`regular`), two grey\n triangles (`graphic`) or hot/cold triangles (`medium`).\n- `static` renders a flat, display-only tile with a bare icon.\n- Enum-driven badges (`badgeControl`, `badgeAlert`, `badgeInterlock`,\n `badgeCommandLocked`) or the `badges` slot fill the badge row; it\n collapses when empty, as does the tag cell.\n- Alert-frame overlay with the same seven properties and three slots as\n `obc-automation-tank`.\n- `positioning`, `clickable` and `activated` behave as on\n `obc-automation-tank`.\n\n## Usage Guidelines\nUse for heat exchangers in automation system views. For heat pumps use\n`obc-heat-pump` and for hydraulic separators `obc-hydraulic-separator`;\nthe three tiles differ only in footprint, icon and split geometry.",
|
|
31830
31843
|
"name": "ObcHeatExchanger",
|
|
31831
31844
|
"slots": [
|
|
31832
31845
|
{
|
|
@@ -32103,6 +32116,18 @@
|
|
|
32103
32116
|
"module": "src/automation/specialty-tank/abstract-specialty-tank.ts"
|
|
32104
32117
|
}
|
|
32105
32118
|
},
|
|
32119
|
+
{
|
|
32120
|
+
"kind": "field",
|
|
32121
|
+
"name": "alertFrameMode",
|
|
32122
|
+
"type": {
|
|
32123
|
+
"text": "ObcAlertFrameMode"
|
|
32124
|
+
},
|
|
32125
|
+
"description": "Acknowledgement state of the alert: `acked-active` (default) is steady, `unacked-active` flashes, `unacked-rectified` flashes a dashed frame.",
|
|
32126
|
+
"inheritedFrom": {
|
|
32127
|
+
"name": "ObcAbstractSpecialtyTank",
|
|
32128
|
+
"module": "src/automation/specialty-tank/abstract-specialty-tank.ts"
|
|
32129
|
+
}
|
|
32130
|
+
},
|
|
32106
32131
|
{
|
|
32107
32132
|
"kind": "field",
|
|
32108
32133
|
"name": "showAlertCategoryIcon",
|
|
@@ -32344,7 +32369,7 @@
|
|
|
32344
32369
|
"declarations": [
|
|
32345
32370
|
{
|
|
32346
32371
|
"kind": "class",
|
|
32347
|
-
"description": "`<obc-heat-pump>` – HVAC tile for a heat pump.\n\nA 152×96 rounded frame whose graphic area splits vertically — hot on the\nleft, cold on the right — around a centered heat-pump icon, with an\noptional badge row above the frame and a tag readout below it.\n\n## Features / Variants\n- `medium` selects the graphic area: one grey area (`regular`), two grey\n halves (`graphic`) or hot/cold halves (`medium`).\n- `static` renders a flat, display-only tile with a bare icon.\n- Enum-driven badges (`badgeControl`, `badgeAlert`, `badgeInterlock`,\n `badgeCommandLocked`) or the `badges` slot fill the badge row; it\n collapses when empty, as does the tag cell.\n- Alert-frame overlay with the same
|
|
32372
|
+
"description": "`<obc-heat-pump>` – HVAC tile for a heat pump.\n\nA 152×96 rounded frame whose graphic area splits vertically — hot on the\nleft, cold on the right — around a centered heat-pump icon, with an\noptional badge row above the frame and a tag readout below it.\n\n## Features / Variants\n- `medium` selects the graphic area: one grey area (`regular`), two grey\n halves (`graphic`) or hot/cold halves (`medium`).\n- `static` renders a flat, display-only tile with a bare icon.\n- Enum-driven badges (`badgeControl`, `badgeAlert`, `badgeInterlock`,\n `badgeCommandLocked`) or the `badges` slot fill the badge row; it\n collapses when empty, as does the tag cell.\n- Alert-frame overlay with the same seven properties and three slots as\n `obc-automation-tank`.\n- `positioning`, `clickable` and `activated` behave as on\n `obc-automation-tank`.\n\n## Usage Guidelines\nUse for heat pumps in automation system views. For hydraulic separators use\n`obc-hydraulic-separator` and for heat exchangers `obc-heat-exchanger`;\nthe three tiles differ only in footprint, icon and split geometry.",
|
|
32348
32373
|
"name": "ObcHeatPump",
|
|
32349
32374
|
"slots": [
|
|
32350
32375
|
{
|
|
@@ -32621,6 +32646,18 @@
|
|
|
32621
32646
|
"module": "src/automation/specialty-tank/abstract-specialty-tank.ts"
|
|
32622
32647
|
}
|
|
32623
32648
|
},
|
|
32649
|
+
{
|
|
32650
|
+
"kind": "field",
|
|
32651
|
+
"name": "alertFrameMode",
|
|
32652
|
+
"type": {
|
|
32653
|
+
"text": "ObcAlertFrameMode"
|
|
32654
|
+
},
|
|
32655
|
+
"description": "Acknowledgement state of the alert: `acked-active` (default) is steady, `unacked-active` flashes, `unacked-rectified` flashes a dashed frame.",
|
|
32656
|
+
"inheritedFrom": {
|
|
32657
|
+
"name": "ObcAbstractSpecialtyTank",
|
|
32658
|
+
"module": "src/automation/specialty-tank/abstract-specialty-tank.ts"
|
|
32659
|
+
}
|
|
32660
|
+
},
|
|
32624
32661
|
{
|
|
32625
32662
|
"kind": "field",
|
|
32626
32663
|
"name": "showAlertCategoryIcon",
|
|
@@ -32982,7 +33019,7 @@
|
|
|
32982
33019
|
"declarations": [
|
|
32983
33020
|
{
|
|
32984
33021
|
"kind": "class",
|
|
32985
|
-
"description": "`<obc-hydraulic-separator>` – HVAC tile for a hydraulic separator.\n\nA 56×142 pressurized-tank silhouette whose graphic area splits\nhorizontally — hot on top, cold below — around a centered\nhydraulic-separator icon, with an optional badge row above the frame and a\ntag readout below it.\n\n## Features / Variants\n- `medium` selects the graphic area: one grey area (`regular`), two grey\n halves (`graphic`) or hot/cold halves (`medium`).\n- `static` renders a flat, display-only tile with a bare icon.\n- Enum-driven badges (`badgeControl`, `badgeAlert`, `badgeInterlock`,\n `badgeCommandLocked`) or the `badges` slot fill the badge row; it\n collapses when empty, as does the tag cell.\n- Alert-frame overlay with the same
|
|
33022
|
+
"description": "`<obc-hydraulic-separator>` – HVAC tile for a hydraulic separator.\n\nA 56×142 pressurized-tank silhouette whose graphic area splits\nhorizontally — hot on top, cold below — around a centered\nhydraulic-separator icon, with an optional badge row above the frame and a\ntag readout below it.\n\n## Features / Variants\n- `medium` selects the graphic area: one grey area (`regular`), two grey\n halves (`graphic`) or hot/cold halves (`medium`).\n- `static` renders a flat, display-only tile with a bare icon.\n- Enum-driven badges (`badgeControl`, `badgeAlert`, `badgeInterlock`,\n `badgeCommandLocked`) or the `badges` slot fill the badge row; it\n collapses when empty, as does the tag cell.\n- Alert-frame overlay with the same seven properties and three slots as\n `obc-automation-tank`.\n- `positioning`, `clickable` and `activated` behave as on\n `obc-automation-tank`.\n\n## Usage Guidelines\nUse for hydraulic separators in automation system views. For heat pumps\nuse `obc-heat-pump` and for heat exchangers `obc-heat-exchanger`; the\nthree tiles differ only in footprint, icon and split geometry.",
|
|
32986
33023
|
"name": "ObcHydraulicSeparator",
|
|
32987
33024
|
"slots": [
|
|
32988
33025
|
{
|
|
@@ -33259,6 +33296,18 @@
|
|
|
33259
33296
|
"module": "src/automation/specialty-tank/abstract-specialty-tank.ts"
|
|
33260
33297
|
}
|
|
33261
33298
|
},
|
|
33299
|
+
{
|
|
33300
|
+
"kind": "field",
|
|
33301
|
+
"name": "alertFrameMode",
|
|
33302
|
+
"type": {
|
|
33303
|
+
"text": "ObcAlertFrameMode"
|
|
33304
|
+
},
|
|
33305
|
+
"description": "Acknowledgement state of the alert: `acked-active` (default) is steady, `unacked-active` flashes, `unacked-rectified` flashes a dashed frame.",
|
|
33306
|
+
"inheritedFrom": {
|
|
33307
|
+
"name": "ObcAbstractSpecialtyTank",
|
|
33308
|
+
"module": "src/automation/specialty-tank/abstract-specialty-tank.ts"
|
|
33309
|
+
}
|
|
33310
|
+
},
|
|
33262
33311
|
{
|
|
33263
33312
|
"kind": "field",
|
|
33264
33313
|
"name": "showAlertCategoryIcon",
|
|
@@ -38767,6 +38816,14 @@
|
|
|
38767
38816
|
},
|
|
38768
38817
|
"description": "Alert status the frame is coloured for."
|
|
38769
38818
|
},
|
|
38819
|
+
{
|
|
38820
|
+
"kind": "field",
|
|
38821
|
+
"name": "alertFrameMode",
|
|
38822
|
+
"type": {
|
|
38823
|
+
"text": "ObcAlertFrameMode"
|
|
38824
|
+
},
|
|
38825
|
+
"description": "Acknowledgement state of the alert: `acked-active` (default) is steady, `unacked-active` flashes, `unacked-rectified` flashes a dashed frame."
|
|
38826
|
+
},
|
|
38770
38827
|
{
|
|
38771
38828
|
"kind": "field",
|
|
38772
38829
|
"name": "showAlertCategoryIcon",
|
|
@@ -40457,12 +40514,24 @@
|
|
|
40457
40514
|
"declarations": [
|
|
40458
40515
|
{
|
|
40459
40516
|
"kind": "class",
|
|
40460
|
-
"description": "`<obc-transmitter>` – A readout label that attaches to a line via a leader\nline, showing a measured value, a tag identifier, or a value paired with a\ntrend graph.\n\nPositioning (orientation + leader line) follows `<obc-automation-readout>`.\nThe value chip is an `<obc-transmitter-button>` and the trend is an\n`<obc-indicator-graph>` with its area fill enabled.\n\n### Features / Variants\n- **`type`** – `indicator` (tag pill), `value` (icon/value/unit), or value\n paired with a `horizontal-graph` (beside) or `vertical-graph` (below).\n- **`orientation`** – `top`, `right`, `bottom`, `left`; controls which edge\n the leader line attaches to.\n- **Segments** – opt into a leading advice segment with `hasAdvice`/\n `adviceValue` and a setpoint segment with `hasSetPoint`/`setpointValue`;\n both are read-only and shown in the value chip for non-`indicator` types.\n-
|
|
40517
|
+
"description": "`<obc-transmitter>` – A readout label that attaches to a line via a leader\nline, showing a measured value, a tag identifier, or a value paired with a\ntrend graph.\n\nPositioning (orientation + leader line) follows `<obc-automation-readout>`.\nThe value chip is an `<obc-transmitter-button>` and the trend is an\n`<obc-indicator-graph>` with its area fill enabled.\n\n### Features / Variants\n- **`type`** – `indicator` (tag pill), `value` (icon/value/unit), or value\n paired with a `horizontal-graph` (beside) or `vertical-graph` (below).\n- **`orientation`** – `top`, `right`, `bottom`, `left`; controls which edge\n the leader line attaches to.\n- **Segments** – opt into a leading advice segment with `hasAdvice`/\n `adviceValue` and a setpoint segment with `hasSetPoint`/`setpointValue`;\n both are read-only and shown in the value chip for non-`indicator` types.\n- **Alert frame** – `hasAlert` wraps the whole transmitter in an\n `<obc-alert-frame>`. `alertFrameStatus`, `alertFrameType`,\n `alertFrameThickness` and `alertFrameMode` set its severity, flap, border\n and flashing, with the same names as on the automation devices; a flap\n carries the status badge and the `alert-icon`, `alert-label` and\n `alert-timer` slots.\n- **Formatting** – `fractionDigits`, `maxDigits`, `hintedZeros` and\n `hasSignSpacer` are forwarded to the value chip to control decimal\n precision, muted leading-zero padding (e.g. `0012.3`) and the sign\n column. The advice and setpoint segments reuse the same formatting.\n `hasDegree` adds a degree column between the value and the unit.\n `value`, `adviceValue` and `setpointValue` render dashes when they are\n `NaN`, `null` or `undefined`.\n\n**TODO(designer):** the Figma Transmitter set (25656:45081) draws no alert\nstate, so the frame and its flaps follow the automation devices.\n\n### Slots\n| Slot Name | Conditions | Purpose |\n|-------------|----------------------------------------------------------|---------------------------------|\n| icon | value/graph + `hasIcon` | Leading icon in the value chip. |\n| alert-icon | `hasAlert` + `showAlertIcon`, large side/bottom/top flap | Custom icon in the alert flap. |\n| alert-label | `hasAlert`, bottom/top flap | Label in the alert flap. |\n| alert-timer | `hasAlert`, bottom/top flap | Timer in the alert flap. |",
|
|
40461
40518
|
"name": "ObcTransmitter",
|
|
40462
40519
|
"slots": [
|
|
40463
40520
|
{
|
|
40464
40521
|
"description": "Leading icon in the value chip.",
|
|
40465
40522
|
"name": "icon"
|
|
40523
|
+
},
|
|
40524
|
+
{
|
|
40525
|
+
"description": "Custom icon in the alert flap, shown when `hasAlert` and `showAlertIcon`.",
|
|
40526
|
+
"name": "alert-icon"
|
|
40527
|
+
},
|
|
40528
|
+
{
|
|
40529
|
+
"description": "Label in a bottom or top alert flap, shown when `hasAlert`.",
|
|
40530
|
+
"name": "alert-label"
|
|
40531
|
+
},
|
|
40532
|
+
{
|
|
40533
|
+
"description": "Timer in a bottom or top alert flap, shown when `hasAlert`.",
|
|
40534
|
+
"name": "alert-timer"
|
|
40466
40535
|
}
|
|
40467
40536
|
],
|
|
40468
40537
|
"members": [
|
|
@@ -40576,7 +40645,57 @@
|
|
|
40576
40645
|
"text": "boolean"
|
|
40577
40646
|
},
|
|
40578
40647
|
"default": "false",
|
|
40579
|
-
"description": "Wrap the transmitter in an `<obc-alert-frame>`
|
|
40648
|
+
"description": "Wrap the transmitter in an `<obc-alert-frame>` when true."
|
|
40649
|
+
},
|
|
40650
|
+
{
|
|
40651
|
+
"kind": "field",
|
|
40652
|
+
"name": "alertFrameStatus",
|
|
40653
|
+
"type": {
|
|
40654
|
+
"text": "AlertType"
|
|
40655
|
+
},
|
|
40656
|
+
"description": "Severity of the alert frame, which picks its colour and flap badge: `alarm` (default), `warning`, `caution` or one of the `level-*` severities."
|
|
40657
|
+
},
|
|
40658
|
+
{
|
|
40659
|
+
"kind": "field",
|
|
40660
|
+
"name": "alertFrameType",
|
|
40661
|
+
"type": {
|
|
40662
|
+
"text": "ObcAlertFrameType"
|
|
40663
|
+
},
|
|
40664
|
+
"description": "Flap of the alert frame: `regular` (default) draws the outline alone, `small-side-flip`, `large-side-flip`, `bottom-flip` and `top-flip` add a flap with the status badge."
|
|
40665
|
+
},
|
|
40666
|
+
{
|
|
40667
|
+
"kind": "field",
|
|
40668
|
+
"name": "alertFrameThickness",
|
|
40669
|
+
"type": {
|
|
40670
|
+
"text": "ObcAlertFrameThickness"
|
|
40671
|
+
},
|
|
40672
|
+
"description": "Border of the alert frame: `small` (default) or `large`."
|
|
40673
|
+
},
|
|
40674
|
+
{
|
|
40675
|
+
"kind": "field",
|
|
40676
|
+
"name": "alertFrameMode",
|
|
40677
|
+
"type": {
|
|
40678
|
+
"text": "ObcAlertFrameMode"
|
|
40679
|
+
},
|
|
40680
|
+
"description": "Acknowledgement state of the alert: `acked-active` (default) is steady, `unacked-active` flashes, `unacked-rectified` flashes a dashed frame."
|
|
40681
|
+
},
|
|
40682
|
+
{
|
|
40683
|
+
"kind": "field",
|
|
40684
|
+
"name": "showAlertCategoryIcon",
|
|
40685
|
+
"type": {
|
|
40686
|
+
"text": "boolean"
|
|
40687
|
+
},
|
|
40688
|
+
"default": "true",
|
|
40689
|
+
"description": "Show the status badge in the flap; a small side flap without it is not drawn."
|
|
40690
|
+
},
|
|
40691
|
+
{
|
|
40692
|
+
"kind": "field",
|
|
40693
|
+
"name": "showAlertIcon",
|
|
40694
|
+
"type": {
|
|
40695
|
+
"text": "boolean"
|
|
40696
|
+
},
|
|
40697
|
+
"default": "false",
|
|
40698
|
+
"description": "Show the `alert-icon` slot in a large side, bottom or top flap."
|
|
40580
40699
|
},
|
|
40581
40700
|
{
|
|
40582
40701
|
"kind": "field",
|
|
@@ -40655,6 +40774,19 @@
|
|
|
40655
40774
|
"name": "renderContent",
|
|
40656
40775
|
"privacy": "private"
|
|
40657
40776
|
},
|
|
40777
|
+
{
|
|
40778
|
+
"kind": "method",
|
|
40779
|
+
"name": "renderAlertFrame",
|
|
40780
|
+
"privacy": "private",
|
|
40781
|
+
"parameters": [
|
|
40782
|
+
{
|
|
40783
|
+
"name": "content",
|
|
40784
|
+
"type": {
|
|
40785
|
+
"text": "TemplateResult"
|
|
40786
|
+
}
|
|
40787
|
+
}
|
|
40788
|
+
]
|
|
40789
|
+
},
|
|
40658
40790
|
{
|
|
40659
40791
|
"kind": "method",
|
|
40660
40792
|
"name": "render"
|
|
@@ -48764,7 +48896,7 @@
|
|
|
48764
48896
|
"declarations": [
|
|
48765
48897
|
{
|
|
48766
48898
|
"kind": "class",
|
|
48767
|
-
"description": "`<obc-accordion-card>` – Expandable/collapsible card component for grouping content in a compact, interactive section (accordion, expandable panel, disclosure).\n\nProvides a summary row with optional icon, title, description, and status label. Expands to reveal additional content on click/tap, supporting both single-line and large layouts. Can display an alert overlay for contextual warnings or notifications.\n\n### Features\n- **Expandable/collapsible:** Click/tap toggles between collapsed and expanded states, revealing or hiding additional content. The panel slides open and closed, and the chevron turns with it; `prefers-reduced-motion: reduce` switches instantly instead.\n- **Variants:**\n - **Single-line:** Compact header with only title (and optional icon/status).\n - **Large:** Header includes a description beneath the title for more detail.\n- **Positioning:** Supports `top`, `bottom`, `center`, or `regular` (default) border radius/edge styling for stacking multiple accordions.\n- **Status label:** Optional status text displayed in the header (e.g., \"Active\", \"Warning\").\n- **Leading icon:** Optional icon slot at the start of the header for visual context.\n- **Alert overlay:** Can display an alert frame (with icon, label, timer) above the card for warnings or notifications.\n- **Disabled state:** Prevents interaction and visually indicates non-interactive status.\n- **Accessibility:** Uses button semantics and ARIA attributes for expand/collapse.\n\n### Usage Guidelines\nUse `obc-accordion-card` to organize related content in a collapsible section, especially when space is limited or when users may want to focus on one section at a time. Ideal for settings panels, grouped controls, or dashboards where expandable details are needed. Avoid using for persistent, always-visible content.\n\n- Use the **single-line** variant for brief titles or when space is tight.\n- Use the **large** variant when you need to provide a short description or supporting text under the title.\n- The **status label** is useful for showing quick state info (e.g., \"Active\", \"Error\").\n- The **alert overlay** is intended for contextual warnings or notifications related to the card's content.\n- For stacking multiple accordions, adjust the `position` property to control border radii and visual grouping.\n\n**TODO(designer):** Confirm if there are recommended limits on title/description length, and if only one accordion should be expanded at a time in a group.\n\n### Slots\n| Slot Name | Renders When... | Purpose |\n|-------------------|------------------------|-------------------------------------------------------|\n| leading-icon | `hasLeadingIcon` true | Icon at the start of the header (e.g., `<obi-placeholder></obi-placeholder>`). |\n| expanded-content | Always | Content revealed when the accordion is expanded. |\n| alert-icon | `hasAlert` true
|
|
48899
|
+
"description": "`<obc-accordion-card>` – Expandable/collapsible card component for grouping content in a compact, interactive section (accordion, expandable panel, disclosure).\n\nProvides a summary row with optional icon, title, description, and status label. Expands to reveal additional content on click/tap, supporting both single-line and large layouts. Can display an alert overlay for contextual warnings or notifications.\n\n### Features\n- **Expandable/collapsible:** Click/tap toggles between collapsed and expanded states, revealing or hiding additional content. The panel slides open and closed, and the chevron turns with it; `prefers-reduced-motion: reduce` switches instantly instead.\n- **Variants:**\n - **Single-line:** Compact header with only title (and optional icon/status).\n - **Large:** Header includes a description beneath the title for more detail.\n- **Positioning:** Supports `top`, `bottom`, `center`, or `regular` (default) border radius/edge styling for stacking multiple accordions.\n- **Status label:** Optional status text displayed in the header (e.g., \"Active\", \"Warning\").\n- **Leading icon:** Optional icon slot at the start of the header for visual context.\n- **Alert overlay:** Can display an alert frame (with icon, label, timer) above the card for warnings or notifications.\n- **Disabled state:** Prevents interaction and visually indicates non-interactive status.\n- **Accessibility:** Uses button semantics and ARIA attributes for expand/collapse.\n\n### Usage Guidelines\nUse `obc-accordion-card` to organize related content in a collapsible section, especially when space is limited or when users may want to focus on one section at a time. Ideal for settings panels, grouped controls, or dashboards where expandable details are needed. Avoid using for persistent, always-visible content.\n\n- Use the **single-line** variant for brief titles or when space is tight.\n- Use the **large** variant when you need to provide a short description or supporting text under the title.\n- The **status label** is useful for showing quick state info (e.g., \"Active\", \"Error\").\n- The **alert overlay** is intended for contextual warnings or notifications related to the card's content.\n- For stacking multiple accordions, adjust the `position` property to control border radii and visual grouping.\n\n**TODO(designer):** Confirm if there are recommended limits on title/description length, and if only one accordion should be expanded at a time in a group.\n\n### Slots\n| Slot Name | Renders When... | Purpose |\n|-------------------|------------------------|-------------------------------------------------------|\n| leading-icon | `hasLeadingIcon` true | Icon at the start of the header (e.g., `<obi-placeholder></obi-placeholder>`). |\n| expanded-content | Always | Content revealed when the accordion is expanded. |\n| alert-icon | `hasAlert` and `showAlertIcon` true | Icon for the alert overlay (slot=\"icon\" in alert frame). |\n| alert-label | `hasAlert` true | Label text for the alert overlay (slot=\"label\" in alert frame). |\n| alert-timer | `hasAlert` true | Timer or duration text for the alert overlay (slot=\"timer\" in alert frame). |\n\n### Properties\n- `expanded` (boolean): Whether the card is expanded (shows additional content). Toggled by user interaction.\n- `disabled` (boolean): Disables interaction and visually dims the card.\n- `cardTitle` (string): Main title text shown in the header.\n- `description` (string): Supporting description (shown only in large size and if `hasDescription` is true).\n- `statusLabel` (string): Optional status text in the header (shown if `hasStatusLabel` is true).\n- `hasAlert` (boolean): Shows an alert overlay above the card when true.\n- `hasDescription` (boolean): Enables description text in large variant.\n- `hasStatusLabel` (boolean): Enables status label in header.\n- `hasLeadingIcon` (boolean): Enables leading icon slot in header.\n- `size` (`AccordionSize` enum): Layout variant, either `'single-line'` (default) or `'large'`.\n- `position` (`Position` enum): Controls border radius for stacking (`'top'`, `'bottom'`, `'center'`, `'regular'`).\n- `alertFrameType`, `alertFrameThickness`, `alertFrameStatus`, `alertFrameMode`, `showAlertCategoryIcon`, `showAlertIcon`: Configure the alert overlay's appearance (see `obc-alert-frame` for details).\n\n### Events\n- `accordion-toggle` – Fired when the accordion is expanded or collapsed. Event detail includes `{ expanded, cardTitle }`.\n\n### Best Practices\n- Only use the alert overlay for important, contextual notifications related to the card's content.\n- For accessibility, ensure the card title is descriptive and unique within a group.\n- Avoid nesting interactive elements (like buttons) directly in the header; place them in the expanded content if needed.\n\n### Example:\n```\n<obc-accordion-card\n cardTitle=\"Settings\"\n description=\"Configure your preferences\"\n size=\"large\"\n hasDescription\n expanded\n hasLeadingIcon\n>\n <span slot=\"leading-icon\"><obi-placeholder></obi-placeholder></span>\n <div slot=\"expanded-content\">\n <!-- Additional settings controls here -->\n </div>\n</obc-accordion-card>\n```",
|
|
48768
48900
|
"name": "ObcAccordionCard",
|
|
48769
48901
|
"cssProperties": [
|
|
48770
48902
|
{
|
|
@@ -48783,7 +48915,7 @@
|
|
|
48783
48915
|
"name": "expanded-content"
|
|
48784
48916
|
},
|
|
48785
48917
|
{
|
|
48786
|
-
"description": "Icon for the alert overlay (used when `hasAlert`
|
|
48918
|
+
"description": "Icon for the alert overlay (used when `hasAlert` and `showAlertIcon` are true)",
|
|
48787
48919
|
"name": "alert-icon"
|
|
48788
48920
|
},
|
|
48789
48921
|
{
|
|
@@ -48848,7 +48980,7 @@
|
|
|
48848
48980
|
"text": "boolean"
|
|
48849
48981
|
},
|
|
48850
48982
|
"default": "false",
|
|
48851
|
-
"description": "Shows an alert overlay above the card when true. Configure appearance with `alertFrameType`, `alertFrameThickness`, and `
|
|
48983
|
+
"description": "Shows an alert overlay above the card when true. Configure appearance with `alertFrameType`, `alertFrameThickness`, `alertFrameStatus` and `alertFrameMode`."
|
|
48852
48984
|
},
|
|
48853
48985
|
{
|
|
48854
48986
|
"kind": "field",
|
|
@@ -48917,6 +49049,32 @@
|
|
|
48917
49049
|
},
|
|
48918
49050
|
"description": "Status of the alert frame overlay (used when `hasAlert` is true). See `obc-alert-frame` for available statuses."
|
|
48919
49051
|
},
|
|
49052
|
+
{
|
|
49053
|
+
"kind": "field",
|
|
49054
|
+
"name": "alertFrameMode",
|
|
49055
|
+
"type": {
|
|
49056
|
+
"text": "ObcAlertFrameMode"
|
|
49057
|
+
},
|
|
49058
|
+
"description": "Acknowledgement state of the alert: `acked-active` (default) is steady, `unacked-active` flashes, `unacked-rectified` flashes a dashed frame."
|
|
49059
|
+
},
|
|
49060
|
+
{
|
|
49061
|
+
"kind": "field",
|
|
49062
|
+
"name": "showAlertCategoryIcon",
|
|
49063
|
+
"type": {
|
|
49064
|
+
"text": "boolean"
|
|
49065
|
+
},
|
|
49066
|
+
"default": "true",
|
|
49067
|
+
"description": "Shows the alert category icon in the flap; a small side flap without it is not drawn."
|
|
49068
|
+
},
|
|
49069
|
+
{
|
|
49070
|
+
"kind": "field",
|
|
49071
|
+
"name": "showAlertIcon",
|
|
49072
|
+
"type": {
|
|
49073
|
+
"text": "boolean"
|
|
49074
|
+
},
|
|
49075
|
+
"default": "false",
|
|
49076
|
+
"description": "Shows the `alert-icon` slot in a large side, bottom or top flap."
|
|
49077
|
+
},
|
|
48920
49078
|
{
|
|
48921
49079
|
"kind": "field",
|
|
48922
49080
|
"name": "shouldShowDescription",
|