@oicl/openbridge-webcomponents 2.0.0-next.58 → 2.0.0-next.59
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle/openbridge-webcomponents.bundle.js +5999 -4348
- package/bundle/openbridge-webcomponents.bundle.js.map +1 -1
- package/custom-elements.json +755 -75
- package/dist/alert-severity.d.ts +38 -0
- package/dist/alert-severity.d.ts.map +1 -0
- package/dist/alert-severity.js +176 -0
- package/dist/alert-severity.js.map +1 -0
- package/dist/ar/building-blocks/poi-header/poi-header.css.js +38 -7
- package/dist/ar/building-blocks/poi-header/poi-header.css.js.map +1 -1
- package/dist/ar/building-blocks/poi-header/poi-header.d.ts +7 -2
- package/dist/ar/building-blocks/poi-header/poi-header.d.ts.map +1 -1
- package/dist/ar/building-blocks/poi-header/poi-header.js +5 -0
- package/dist/ar/building-blocks/poi-header/poi-header.js.map +1 -1
- package/dist/ar/poi-button/poi-button.css.js +110 -32
- package/dist/ar/poi-button/poi-button.css.js.map +1 -1
- package/dist/ar/poi-button/poi-button.d.ts +7 -2
- package/dist/ar/poi-button/poi-button.d.ts.map +1 -1
- package/dist/ar/poi-button/poi-button.js +15 -0
- package/dist/ar/poi-button/poi-button.js.map +1 -1
- package/dist/ar/types.d.ts +6 -1
- package/dist/ar/types.d.ts.map +1 -1
- package/dist/ar/types.js +5 -0
- package/dist/ar/types.js.map +1 -1
- package/dist/automation/automation-badge/automation-badge.d.ts +9 -1
- package/dist/automation/automation-badge/automation-badge.d.ts.map +1 -1
- package/dist/automation/automation-badge/automation-badge.js +119 -12
- package/dist/automation/automation-badge/automation-badge.js.map +1 -1
- package/dist/automation/automation-button/abstract-automation-button-storybook-helpers.d.ts +25 -1
- package/dist/automation/automation-button/abstract-automation-button-storybook-helpers.d.ts.map +1 -1
- package/dist/automation/automation-button/abstract-automation-button-storybook-helpers.js +7 -2
- package/dist/automation/automation-button/abstract-automation-button-storybook-helpers.js.map +1 -1
- package/dist/automation/automation-button/abstract-automation-button.d.ts +10 -3
- package/dist/automation/automation-button/abstract-automation-button.d.ts.map +1 -1
- package/dist/automation/automation-button/abstract-automation-button.js +23 -2
- package/dist/automation/automation-button/abstract-automation-button.js.map +1 -1
- package/dist/automation/automation-button/automation-button.css.js +9 -4
- package/dist/automation/automation-button/automation-button.css.js.map +1 -1
- package/dist/automation/automation-button/automation-button.d.ts +4 -2
- package/dist/automation/automation-button/automation-button.d.ts.map +1 -1
- package/dist/automation/automation-button/automation-button.js +24 -6
- package/dist/automation/automation-button/automation-button.js.map +1 -1
- package/dist/automation/automation-tank/automation-tank.d.ts +3 -2
- package/dist/automation/automation-tank/automation-tank.d.ts.map +1 -1
- package/dist/automation/automation-tank/automation-tank.js +13 -2
- package/dist/automation/automation-tank/automation-tank.js.map +1 -1
- package/dist/components/accordion-card/accordion-card.css.js +34 -0
- package/dist/components/accordion-card/accordion-card.css.js.map +1 -1
- package/dist/components/accordion-card/accordion-card.d.ts +3 -2
- package/dist/components/accordion-card/accordion-card.d.ts.map +1 -1
- package/dist/components/accordion-card/accordion-card.js +4 -3
- package/dist/components/accordion-card/accordion-card.js.map +1 -1
- package/dist/components/alert-button/alert-button.css.js +744 -7
- package/dist/components/alert-button/alert-button.css.js.map +1 -1
- package/dist/components/alert-button/alert-button.d.ts +3 -1
- package/dist/components/alert-button/alert-button.d.ts.map +1 -1
- package/dist/components/alert-button/alert-button.js +33 -31
- package/dist/components/alert-button/alert-button.js.map +1 -1
- package/dist/components/alert-frame/alert-frame.css.js +116 -29
- package/dist/components/alert-frame/alert-frame.css.js.map +1 -1
- package/dist/components/alert-frame/alert-frame.d.ts +42 -15
- package/dist/components/alert-frame/alert-frame.d.ts.map +1 -1
- package/dist/components/alert-frame/alert-frame.js +68 -17
- package/dist/components/alert-frame/alert-frame.js.map +1 -1
- package/dist/components/alert-frame/critical-badge.d.ts +12 -0
- package/dist/components/alert-frame/critical-badge.d.ts.map +1 -0
- package/dist/components/alert-frame/critical-badge.js +47 -0
- package/dist/components/alert-frame/critical-badge.js.map +1 -0
- package/dist/components/alert-frame/diagnostic-badge.d.ts +12 -0
- package/dist/components/alert-frame/diagnostic-badge.d.ts.map +1 -0
- package/dist/components/alert-frame/diagnostic-badge.js +60 -0
- package/dist/components/alert-frame/diagnostic-badge.js.map +1 -0
- package/dist/components/alert-icon/alert-icon.d.ts +6 -1
- package/dist/components/alert-icon/alert-icon.d.ts.map +1 -1
- package/dist/components/alert-icon/alert-icon.js +96 -38
- package/dist/components/alert-icon/alert-icon.js.map +1 -1
- package/dist/components/alert-icon/icons/icon-critical.d.ts +3 -0
- package/dist/components/alert-icon/icons/icon-critical.d.ts.map +1 -0
- package/dist/components/alert-icon/icons/icon-critical.js +26 -0
- package/dist/components/alert-icon/icons/icon-critical.js.map +1 -0
- package/dist/components/alert-list-details/alert-list-details.d.ts.map +1 -1
- package/dist/components/alert-list-details/alert-list-details.js +6 -7
- package/dist/components/alert-list-details/alert-list-details.js.map +1 -1
- package/dist/components/badge/badge.css.js +50 -2
- package/dist/components/badge/badge.css.js.map +1 -1
- package/dist/components/badge/badge.d.ts +13 -2
- package/dist/components/badge/badge.d.ts.map +1 -1
- package/dist/components/badge/badge.js +54 -0
- package/dist/components/badge/badge.js.map +1 -1
- package/dist/index.js +2 -1
- package/dist/manual-icon/icon-alerts-critical-twotone.d.ts +30 -0
- package/dist/manual-icon/icon-alerts-critical-twotone.d.ts.map +1 -0
- package/dist/manual-icon/icon-alerts-critical-twotone.js +55 -0
- package/dist/manual-icon/icon-alerts-critical-twotone.js.map +1 -0
- package/dist/manual-icon/icon-alerts-diagnostic-twotone.d.ts +30 -0
- package/dist/manual-icon/icon-alerts-diagnostic-twotone.d.ts.map +1 -0
- package/dist/manual-icon/icon-alerts-diagnostic-twotone.js +55 -0
- package/dist/manual-icon/icon-alerts-diagnostic-twotone.js.map +1 -0
- package/dist/navigation-instruments/readout/readout.css.js +3 -18
- package/dist/navigation-instruments/readout/readout.css.js.map +1 -1
- package/dist/navigation-instruments/readout/readout.d.ts +6 -7
- package/dist/navigation-instruments/readout/readout.d.ts.map +1 -1
- package/dist/navigation-instruments/readout/readout.js +54 -52
- package/dist/navigation-instruments/readout/readout.js.map +1 -1
- package/dist/navigation-instruments/readout-list-item/readout-list-item.css.js +9 -36
- package/dist/navigation-instruments/readout-list-item/readout-list-item.css.js.map +1 -1
- package/dist/navigation-instruments/readout-list-item/readout-list-item.d.ts +8 -8
- package/dist/navigation-instruments/readout-list-item/readout-list-item.d.ts.map +1 -1
- package/dist/navigation-instruments/readout-list-item/readout-list-item.js +49 -42
- package/dist/navigation-instruments/readout-list-item/readout-list-item.js.map +1 -1
- package/dist/openbridge.css +155 -0
- package/dist/types.d.ts +7 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +18 -7
- package/dist/types.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"readout-list-item.js","sources":["../../../src/navigation-instruments/readout-list-item/readout-list-item.ts"],"sourcesContent":["import {LitElement, html, nothing, unsafeCSS} from 'lit';\nimport {property} from 'lit/decorators.js';\nimport {classMap} from 'lit/directives/class-map.js';\nimport componentStyle from './readout-list-item.css?inline';\nimport {customElement} from '../../decorator.js';\nimport {ReadoutSetpointSize} from '../readout-setpoint/readout-setpoint.js';\nimport {ReadoutSetpointValueTypography} from '../readout-setpoint/readout-setpoint.js';\nimport {Priority} from '../types.js';\nimport '../readout-setpoint/readout-setpoint.js';\nimport '../../icons/icon-input-right.js';\nimport {ReadoutSetpointMode} from '../readout-setpoint/readout-setpoint.js';\n\nexport enum ReadoutListItemAlertState {\n none = 'none',\n lowIntegrity = 'low-integrity',\n invalid = 'invalid',\n caution = 'caution',\n warning = 'warning',\n alarm = 'alarm',\n}\n\nexport enum ReadoutListItemSize {\n base = 'base',\n priority = 'priority',\n enhanced = 'enhanced',\n}\n\nexport enum ReadoutListItemStacking {\n trailingUnit = 'trailing-unit',\n leadingUnit = 'leading-unit',\n leadingSrc = 'leading-src',\n}\n\nexport enum ReadoutListItemPriority {\n regular = 'regular',\n enhanced = 'enhanced',\n setpoint = 'setpoint',\n setpointFlipFlop = 'setpoint-flip-flop',\n}\n\n/**\n * `<obc-readout-list-item>` – A compact inline readout row for lists.\n *\n * Renders a compact label/value/unit composition with a dedicated size scale and stacking modes for unit and source placement. Use it when you need dense, consistent readout rows in tables or lists without bringing in the full `<obc-readout>` segment layout.\n *\n * ### Features\n * - **Sizes:** `base`, `priority`, and `enhanced` typography/padding scales.\n * - **Stacking modes:** `trailing-unit`, `leading-unit`, and `leading-src` control where unit/source appear relative to the label/value.\n * - **Priority styling:** `priority` controls emphasis and setpoint presentation (`regular`, `enhanced`, `setpoint`, `setpoint-flip-flop`).\n * - **Alert states:** Supports `alertState` styling for integrity/invalid and attention states (`caution`, `warning`, `alarm`).\n * - **Formatting:** Supports numeric formatting, fixed-length width templates, hinted zeros, and optional degree suffix (`°`).\n *\n * ### Usage Guidelines\n * Use this component for dense readouts in list contexts. Prefer `<obc-readout>` when you need multi-segment advice/setpoint/source composition, rich layouts, or source picker/flyout behavior.\n *\n * ### Slots\n * | Slot Name | Renders When | Purpose |\n * |---------------|--------------------------|---------|\n * | leading-icon | `hasLeadingIcon` is true | Optional leading icon before the label. |\n * | value-icon | `hasValueIcon` is true | Optional icon next to the value. |\n *\n * @slot leading-icon - Optional leading icon before the label.\n * @slot value-icon - Optional icon next to the value.\n */\n@customElement('obc-readout-list-item')\nexport class ObcReadoutListItem extends LitElement {\n @property({type: String}) size: ReadoutListItemSize =\n ReadoutListItemSize.base;\n @property({type: String})\n stacking: ReadoutListItemStacking = ReadoutListItemStacking.trailingUnit;\n @property({type: String})\n priority: ReadoutListItemPriority = ReadoutListItemPriority.regular;\n @property({type: String})\n alertState: ReadoutListItemAlertState = ReadoutListItemAlertState.none;\n\n @property({type: String}) label = '';\n @property({type: String}) unit = '';\n @property({type: String}) src = '';\n\n @property({type: Number}) value: number | undefined = undefined;\n @property({type: Number}) setpointValue: number | undefined = undefined;\n\n @property({type: Boolean}) hasSetpoint = false;\n\n @property({type: Boolean}) hasDegree = false;\n @property({type: Boolean}) hasUnit = false;\n @property({type: Boolean}) hasLabel = false;\n @property({type: Boolean}) hasSource = false;\n @property({type: Boolean}) hasLeadingIcon = false;\n @property({type: Boolean}) hasValueIcon = false;\n\n @property({type: Number}) fractionDigits = 0;\n @property({type: Boolean}) showZeroPadding = false;\n\n @property({type: Number}) minValueLength = 0;\n @property({type: Boolean}) hasHintedZeros = false;\n\n @property({type: Boolean}) labelOnly = false;\n\n private get resolvedMainValueSize(): ReadoutSetpointSize {\n return this.size === ReadoutListItemSize.enhanced\n ? ReadoutSetpointSize.large\n : this.size === ReadoutListItemSize.priority\n ? ReadoutSetpointSize.medium\n : ReadoutSetpointSize.regular;\n }\n\n private get resolvedValueSize(): ReadoutSetpointSize {\n if (this.priority === ReadoutListItemPriority.setpointFlipFlop) {\n if (this.size === ReadoutListItemSize.priority) {\n return ReadoutSetpointSize.small;\n }\n\n if (this.size === ReadoutListItemSize.enhanced) {\n return ReadoutSetpointSize.regular;\n }\n }\n\n if (this.size === ReadoutListItemSize.enhanced) {\n return ReadoutSetpointSize.large;\n }\n return ReadoutSetpointSize.regular;\n }\n\n private get resolvedValueTypography():\n | ReadoutSetpointValueTypography\n | undefined {\n if (\n this.priority === ReadoutListItemPriority.setpointFlipFlop &&\n this.resolvedValueSize === ReadoutSetpointSize.small\n ) {\n return undefined;\n }\n\n if (\n this.priority === ReadoutListItemPriority.setpointFlipFlop &&\n this.size === ReadoutListItemSize.enhanced\n ) {\n return ReadoutSetpointValueTypography.regular;\n }\n\n switch (this.size) {\n case ReadoutListItemSize.enhanced:\n return ReadoutSetpointValueTypography.large;\n case ReadoutListItemSize.priority:\n return ReadoutSetpointValueTypography.medium;\n case ReadoutListItemSize.base:\n default:\n return ReadoutSetpointValueTypography.regular;\n }\n }\n\n private get resolvedSetpointSize(): ReadoutSetpointSize {\n if (!this.hasSetpoint) {\n return ReadoutSetpointSize.small;\n }\n\n if (\n this.priority === ReadoutListItemPriority.setpoint ||\n this.priority === ReadoutListItemPriority.setpointFlipFlop\n ) {\n return this.resolvedMainValueSize;\n }\n\n return ReadoutSetpointSize.small;\n }\n\n private get resolvedActualPriority(): Priority {\n if (\n this.priority === ReadoutListItemPriority.enhanced ||\n (this.priority === ReadoutListItemPriority.setpoint &&\n !this.hasSetpoint) ||\n this.priority === ReadoutListItemPriority.setpointFlipFlop\n ) {\n return Priority.enhanced;\n }\n\n return Priority.regular;\n }\n\n private get resolvedActualMode(): ReadoutSetpointMode {\n return this.priority === ReadoutListItemPriority.enhanced\n ? ReadoutSetpointMode.setpoint\n : ReadoutSetpointMode.display;\n }\n\n private get resolvedSetpointPriority(): Priority {\n if (\n !this.hasSetpoint ||\n this.priority === ReadoutListItemPriority.regular\n ) {\n return Priority.regular;\n }\n\n return Priority.enhanced;\n }\n\n private get resolvedSetpointMode(): ReadoutSetpointMode {\n if (\n this.hasSetpoint &&\n this.priority === ReadoutListItemPriority.setpoint\n ) {\n return ReadoutSetpointMode.setpoint;\n }\n return ReadoutSetpointMode.display;\n }\n\n private get showsTrailingSource(): boolean {\n return (\n this.hasSource && this.stacking !== ReadoutListItemStacking.leadingSrc\n );\n }\n\n private get stacksLeadingUnitVertically(): boolean {\n return (\n this.stacking === ReadoutListItemStacking.leadingUnit &&\n this.size === ReadoutListItemSize.enhanced\n );\n }\n\n private get stacksLeadingSrcVertically(): boolean {\n return (\n this.stacking === ReadoutListItemStacking.leadingSrc &&\n this.size === ReadoutListItemSize.enhanced\n );\n }\n\n private renderLabelContainer() {\n if (!this.hasLabel) {\n return nothing;\n }\n\n const showsLeadingUnit =\n this.stacking === ReadoutListItemStacking.leadingUnit && this.hasUnit;\n const showsLeadingSrc =\n this.stacking === ReadoutListItemStacking.leadingSrc && this.hasSource;\n\n if (showsLeadingUnit && !this.stacksLeadingUnitVertically) {\n return html`\n <div class=\"label-inline\" part=\"label-inline\">\n <div class=\"label\" part=\"label\">${this.label}</div>\n <div class=\"unit unit-leading\" part=\"unit-leading\">${this.unit}</div>\n </div>\n `;\n }\n\n if (showsLeadingSrc && !this.stacksLeadingSrcVertically) {\n return html`\n <div class=\"label-inline\" part=\"label-inline\">\n <div class=\"label\" part=\"label\">${this.label}</div>\n <div class=\"source source-inline\" part=\"source-inline\">\n ${this.src}\n </div>\n </div>\n `;\n }\n\n return html`\n <div class=\"label-stack\" part=\"label-stack\">\n <div class=\"label\" part=\"label\">${this.label}</div>\n ${showsLeadingUnit\n ? html`<div class=\"unit unit-leading\" part=\"unit-leading\">\n ${this.unit}\n </div>`\n : nothing}\n ${showsLeadingSrc\n ? html`<div class=\"source source-inline\" part=\"source-inline\">\n ${this.src}\n </div>`\n : nothing}\n </div>\n `;\n }\n\n private renderValueIconSlot() {\n if (!this.hasValueIcon) {\n return nothing;\n }\n return html`<span class=\"value-icon\" slot=\"icon\" aria-hidden=\"true\">\n <slot name=\"value-icon\"></slot>\n </span>`;\n }\n\n private renderSetpoint() {\n if (!this.hasSetpoint) {\n return nothing;\n }\n\n return html`\n <obc-readout-setpoint\n .variant=${'setpoint'}\n .readoutStyle=${'regular'}\n .direction=${'horizontal'}\n .size=${this.resolvedSetpointSize}\n .priority=${this.resolvedSetpointPriority}\n .mode=${this.resolvedSetpointMode}\n .hugContent=${true}\n .value=${this.setpointValue}\n .showZeroPadding=${this.showZeroPadding}\n .fractionDigits=${this.fractionDigits}\n .minValueLength=${this.minValueLength}\n .hasHintedZeros=${this.hasHintedZeros}\n .hasDegree=${this.hasDegree}\n >\n <obi-input-right slot=\"icon\"></obi-input-right>\n </obc-readout-setpoint>\n `;\n }\n\n private renderActualValue() {\n return html`\n <obc-readout-setpoint\n .variant=${'value'}\n .readoutStyle=${'regular'}\n .direction=${'horizontal'}\n .size=${this.resolvedValueSize}\n .valueTypography=${this.resolvedValueTypography ?? undefined}\n .priority=${this.resolvedActualPriority}\n .mode=${this.resolvedActualMode}\n .hugContent=${true}\n .value=${this.value}\n .showZeroPadding=${this.showZeroPadding}\n .fractionDigits=${this.fractionDigits}\n .minValueLength=${this.minValueLength}\n .hasHintedZeros=${this.hasHintedZeros}\n .hasDegree=${this.hasDegree}\n >\n ${this.renderValueIconSlot()}\n </obc-readout-setpoint>\n `;\n }\n\n private renderValue() {\n return html`\n <div class=\"value-wrap\" part=\"value-wrap\">\n ${this.hasSetpoint\n ? html`<div class=\"value-cluster\" part=\"value-cluster\">\n ${this.renderSetpoint()} ${this.renderActualValue()}\n </div>`\n : this.renderActualValue()}\n </div>\n `;\n }\n\n private renderTrailingUnit() {\n if (\n !this.hasUnit ||\n this.stacking === ReadoutListItemStacking.leadingUnit\n ) {\n return nothing;\n }\n\n return html`<div class=\"unit unit-trailing\" part=\"unit-trailing\">\n ${this.unit}\n </div>`;\n }\n\n private renderTrailingSource() {\n if (!this.showsTrailingSource) {\n return nothing;\n }\n\n return html`\n <div class=\"divider\" part=\"divider\" aria-hidden=\"true\"></div>\n <div class=\"source source-trailing\" part=\"source-trailing\">\n ${this.src}\n </div>\n `;\n }\n\n override render() {\n return html`\n <div\n class=${classMap({\n root: true,\n [`size-${this.size}`]: true,\n [`stacking-${this.stacking}`]: true,\n 'priority-enhanced':\n this.priority === ReadoutListItemPriority.enhanced,\n 'priority-setpoint':\n this.priority === ReadoutListItemPriority.setpoint,\n 'priority-setpoint-flip-flop':\n this.priority === ReadoutListItemPriority.setpointFlipFlop,\n [`alert-${this.alertState}`]: true,\n 'has-leading-icon': this.hasLeadingIcon,\n 'has-value-icon': this.hasValueIcon,\n })}\n part=\"root\"\n >\n <div class=\"content\" part=\"content\">\n <div class=\"label-container\" part=\"label-container\">\n ${this.hasLeadingIcon\n ? html`<span class=\"leading-icon\" aria-hidden=\"true\"\n ><slot name=\"leading-icon\"></slot\n ></span>`\n : nothing}\n ${this.renderLabelContainer()}\n </div>\n\n ${this.labelOnly\n ? nothing\n : html`\n <div class=\"value-container\" part=\"value-container\">\n ${this.renderValue()} ${this.renderTrailingUnit()}\n </div>\n\n ${this.renderTrailingSource()}\n `}\n </div>\n </div>\n `;\n }\n\n static override styles = unsafeCSS(componentStyle);\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'obc-readout-list-item': ObcReadoutListItem;\n }\n}\n"],"names":["ReadoutListItemAlertState","ReadoutListItemSize","ReadoutListItemStacking","ReadoutListItemPriority"],"mappings":";;;;;;;;;;;;;;;;;;AAYO,IAAK,8CAAAA,+BAAL;AACLA,6BAAA,MAAA,IAAO;AACPA,6BAAA,cAAA,IAAe;AACfA,6BAAA,SAAA,IAAU;AACVA,6BAAA,SAAA,IAAU;AACVA,6BAAA,SAAA,IAAU;AACVA,6BAAA,OAAA,IAAQ;AANE,SAAAA;AAAA,GAAA,6BAAA,CAAA,CAAA;AASL,IAAK,wCAAAC,yBAAL;AACLA,uBAAA,MAAA,IAAO;AACPA,uBAAA,UAAA,IAAW;AACXA,uBAAA,UAAA,IAAW;AAHD,SAAAA;AAAA,GAAA,uBAAA,CAAA,CAAA;AAML,IAAK,4CAAAC,6BAAL;AACLA,2BAAA,cAAA,IAAe;AACfA,2BAAA,aAAA,IAAc;AACdA,2BAAA,YAAA,IAAa;AAHH,SAAAA;AAAA,GAAA,2BAAA,CAAA,CAAA;AAML,IAAK,4CAAAC,6BAAL;AACLA,2BAAA,SAAA,IAAU;AACVA,2BAAA,UAAA,IAAW;AACXA,2BAAA,UAAA,IAAW;AACXA,2BAAA,kBAAA,IAAmB;AAJT,SAAAA;AAAA,GAAA,2BAAA,CAAA,CAAA;AAgCL,IAAM,qBAAN,cAAiC,WAAW;AAAA,EAA5C,cAAA;AAAA,UAAA,GAAA,SAAA;AACqB,SAAA,OACxB;AAEF,SAAA,WAAoC;AAEpC,SAAA,WAAoC;AAEpC,SAAA,aAAwC;AAEd,SAAA,QAAQ;AACR,SAAA,OAAO;AACP,SAAA,MAAM;AAEN,SAAA,QAA4B;AAC5B,SAAA,gBAAoC;AAEnC,SAAA,cAAc;AAEd,SAAA,YAAY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AA,kBAAA,CAAA;AACA,gBAAA;AAAA,EAA1B,SAAS,EAAC,MAAM,QAAA,CAAQ;AAAA,GAxBd,mBAwBgB,WAAA,gBAAA,CAAA;AAED,gBAAA;AAAA,EAAzB,SAAS,EAAC,MAAM,OAAA,CAAO;AAAA,GA1Bb,mBA0Be,WAAA,kBAAA,CAAA;AACC,gBAAA;AAAA,EAA1B,SAAS,EAAC,MAAM,QAAA,CAAQ;AAAA,GA3Bd,mBA2BgB,WAAA,mBAAA,CAAA;AAED,gBAAA;AAAA,EAAzB,SAAS,EAAC,MAAM,OAAA,CAAO;AAAA,GA7Bb,mBA6Be,WAAA,kBAAA,CAAA;AACC,gBAAA;AAAA,EAA1B,SAAS,EAAC,MAAM,QAAA,CAAQ;AAAA,GA9Bd,mBA8BgB,WAAA,kBAAA,CAAA;AAEA,gBAAA;AAAA,EAA1B,SAAS,EAAC,MAAM,QAAA,CAAQ;AAAA,GAhCd,mBAgCgB,WAAA,aAAA,CAAA;AAhChB,qBAAN,gBAAA;AAAA,EADN,cAAc,uBAAuB;AAAA,GACzB,kBAAA;"}
|
|
1
|
+
{"version":3,"file":"readout-list-item.js","sources":["../../../src/navigation-instruments/readout-list-item/readout-list-item.ts"],"sourcesContent":["import {LitElement, html, nothing, unsafeCSS} from 'lit';\nimport {property} from 'lit/decorators.js';\nimport {classMap} from 'lit/directives/class-map.js';\nimport componentStyle from './readout-list-item.css?inline';\nimport {customElement} from '../../decorator.js';\nimport {ReadoutSetpointSize} from '../readout-setpoint/readout-setpoint.js';\nimport {ReadoutSetpointValueTypography} from '../readout-setpoint/readout-setpoint.js';\nimport {Priority} from '../types.js';\nimport '../readout-setpoint/readout-setpoint.js';\nimport '../../icons/icon-input-right.js';\nimport {ReadoutSetpointMode} from '../readout-setpoint/readout-setpoint.js';\nimport {\n type AlertFrameConfig,\n wrapWithAlertFrame,\n} from '../../components/alert-frame/alert-frame.js';\n\nexport enum ReadoutListItemDataState {\n none = 'none',\n lowIntegrity = 'low-integrity',\n invalid = 'invalid',\n}\n\nexport enum ReadoutListItemSize {\n base = 'base',\n priority = 'priority',\n enhanced = 'enhanced',\n}\n\nexport enum ReadoutListItemStacking {\n trailingUnit = 'trailing-unit',\n leadingUnit = 'leading-unit',\n leadingSrc = 'leading-src',\n}\n\nexport enum ReadoutListItemPriority {\n regular = 'regular',\n enhanced = 'enhanced',\n setpoint = 'setpoint',\n setpointFlipFlop = 'setpoint-flip-flop',\n}\n\n/**\n * `<obc-readout-list-item>` – A compact inline readout row for lists.\n *\n * Renders a compact label/value/unit composition with a dedicated size scale and stacking modes for unit and source placement. Use it when you need dense, consistent readout rows in tables or lists without bringing in the full `<obc-readout>` segment layout.\n *\n * ### Features\n * - **Sizes:** `base`, `priority`, and `enhanced` typography/padding scales.\n * - **Stacking modes:** `trailing-unit`, `leading-unit`, and `leading-src` control where unit/source appear relative to the label/value.\n * - **Priority styling:** `priority` controls emphasis and setpoint presentation (`regular`, `enhanced`, `setpoint`, `setpoint-flip-flop`).\n * - **Data states:** Supports `dataState` styling for `low-integrity` and `invalid` data quality.\n * - **Alert frame:** Optional `alert` wrapper for caution, warning, alarm, and other alert-frame statuses.\n * - **Formatting:** Supports numeric formatting, fixed-length width templates, hinted zeros, and optional degree suffix (`°`).\n *\n * ### Usage Guidelines\n * Use this component for dense readouts in list contexts. Prefer `<obc-readout>` when you need multi-segment advice/setpoint/source composition, rich layouts, or source picker/flyout behavior.\n *\n * ### Slots\n * | Slot Name | Renders When | Purpose |\n * |---------------|--------------------------|---------|\n * | leading-icon | `hasLeadingIcon` is true | Optional leading icon before the label. |\n * | value-icon | `hasValueIcon` is true | Optional icon next to the value. |\n *\n * @slot leading-icon - Optional leading icon before the label.\n * @slot value-icon - Optional icon next to the value.\n */\n@customElement('obc-readout-list-item')\nexport class ObcReadoutListItem extends LitElement {\n @property({type: String}) size: ReadoutListItemSize =\n ReadoutListItemSize.base;\n @property({type: String})\n stacking: ReadoutListItemStacking = ReadoutListItemStacking.trailingUnit;\n @property({type: String})\n priority: ReadoutListItemPriority = ReadoutListItemPriority.regular;\n @property({type: String})\n dataState: ReadoutListItemDataState = ReadoutListItemDataState.none;\n\n @property({type: Object}) alert: AlertFrameConfig | boolean = false;\n\n @property({type: String}) label = '';\n @property({type: String}) unit = '';\n @property({type: String}) src = '';\n\n @property({type: Number}) value: number | undefined = undefined;\n @property({type: Number}) setpointValue: number | undefined = undefined;\n\n @property({type: Boolean}) hasSetpoint = false;\n\n @property({type: Boolean}) hasDegree = false;\n @property({type: Boolean}) hasUnit = false;\n @property({type: Boolean}) hasLabel = false;\n @property({type: Boolean}) hasSource = false;\n @property({type: Boolean}) hasLeadingIcon = false;\n @property({type: Boolean}) hasValueIcon = false;\n\n @property({type: Number}) fractionDigits = 0;\n @property({type: Boolean}) showZeroPadding = false;\n\n @property({type: Number}) minValueLength = 0;\n @property({type: Boolean}) hasHintedZeros = false;\n\n @property({type: Boolean}) labelOnly = false;\n\n private get resolvedMainValueSize(): ReadoutSetpointSize {\n return this.size === ReadoutListItemSize.enhanced\n ? ReadoutSetpointSize.large\n : this.size === ReadoutListItemSize.priority\n ? ReadoutSetpointSize.medium\n : ReadoutSetpointSize.regular;\n }\n\n private get resolvedValueSize(): ReadoutSetpointSize {\n if (this.priority === ReadoutListItemPriority.setpointFlipFlop) {\n if (this.size === ReadoutListItemSize.priority) {\n return ReadoutSetpointSize.small;\n }\n\n if (this.size === ReadoutListItemSize.enhanced) {\n return ReadoutSetpointSize.regular;\n }\n }\n\n if (this.size === ReadoutListItemSize.enhanced) {\n return ReadoutSetpointSize.large;\n }\n return ReadoutSetpointSize.regular;\n }\n\n private get resolvedValueTypography():\n | ReadoutSetpointValueTypography\n | undefined {\n if (\n this.priority === ReadoutListItemPriority.setpointFlipFlop &&\n this.resolvedValueSize === ReadoutSetpointSize.small\n ) {\n return undefined;\n }\n\n if (\n this.priority === ReadoutListItemPriority.setpointFlipFlop &&\n this.size === ReadoutListItemSize.enhanced\n ) {\n return ReadoutSetpointValueTypography.regular;\n }\n\n switch (this.size) {\n case ReadoutListItemSize.enhanced:\n return ReadoutSetpointValueTypography.large;\n case ReadoutListItemSize.priority:\n return ReadoutSetpointValueTypography.medium;\n case ReadoutListItemSize.base:\n default:\n return ReadoutSetpointValueTypography.regular;\n }\n }\n\n private get resolvedSetpointSize(): ReadoutSetpointSize {\n if (!this.hasSetpoint) {\n return ReadoutSetpointSize.small;\n }\n\n if (\n this.priority === ReadoutListItemPriority.setpoint ||\n this.priority === ReadoutListItemPriority.setpointFlipFlop\n ) {\n return this.resolvedMainValueSize;\n }\n\n return ReadoutSetpointSize.small;\n }\n\n private get resolvedActualPriority(): Priority {\n if (\n this.priority === ReadoutListItemPriority.enhanced ||\n (this.priority === ReadoutListItemPriority.setpoint &&\n !this.hasSetpoint) ||\n this.priority === ReadoutListItemPriority.setpointFlipFlop\n ) {\n return Priority.enhanced;\n }\n\n return Priority.regular;\n }\n\n private get resolvedActualMode(): ReadoutSetpointMode {\n return this.priority === ReadoutListItemPriority.enhanced\n ? ReadoutSetpointMode.setpoint\n : ReadoutSetpointMode.display;\n }\n\n private get resolvedSetpointPriority(): Priority {\n if (\n !this.hasSetpoint ||\n this.priority === ReadoutListItemPriority.regular\n ) {\n return Priority.regular;\n }\n\n return Priority.enhanced;\n }\n\n private get resolvedSetpointMode(): ReadoutSetpointMode {\n if (\n this.hasSetpoint &&\n this.priority === ReadoutListItemPriority.setpoint\n ) {\n return ReadoutSetpointMode.setpoint;\n }\n return ReadoutSetpointMode.display;\n }\n\n private get showsTrailingSource(): boolean {\n return (\n this.hasSource && this.stacking !== ReadoutListItemStacking.leadingSrc\n );\n }\n\n private get stacksLeadingUnitVertically(): boolean {\n return (\n this.stacking === ReadoutListItemStacking.leadingUnit &&\n this.size === ReadoutListItemSize.enhanced\n );\n }\n\n private get stacksLeadingSrcVertically(): boolean {\n return (\n this.stacking === ReadoutListItemStacking.leadingSrc &&\n this.size === ReadoutListItemSize.enhanced\n );\n }\n\n private renderLabelContainer() {\n if (!this.hasLabel) {\n return nothing;\n }\n\n const showsLeadingUnit =\n this.stacking === ReadoutListItemStacking.leadingUnit && this.hasUnit;\n const showsLeadingSrc =\n this.stacking === ReadoutListItemStacking.leadingSrc && this.hasSource;\n\n if (showsLeadingUnit && !this.stacksLeadingUnitVertically) {\n return html`\n <div class=\"label-inline\" part=\"label-inline\">\n <div class=\"label\" part=\"label\">${this.label}</div>\n <div class=\"unit unit-leading\" part=\"unit-leading\">${this.unit}</div>\n </div>\n `;\n }\n\n if (showsLeadingSrc && !this.stacksLeadingSrcVertically) {\n return html`\n <div class=\"label-inline\" part=\"label-inline\">\n <div class=\"label\" part=\"label\">${this.label}</div>\n <div class=\"source source-inline\" part=\"source-inline\">\n ${this.src}\n </div>\n </div>\n `;\n }\n\n return html`\n <div class=\"label-stack\" part=\"label-stack\">\n <div class=\"label\" part=\"label\">${this.label}</div>\n ${showsLeadingUnit\n ? html`<div class=\"unit unit-leading\" part=\"unit-leading\">\n ${this.unit}\n </div>`\n : nothing}\n ${showsLeadingSrc\n ? html`<div class=\"source source-inline\" part=\"source-inline\">\n ${this.src}\n </div>`\n : nothing}\n </div>\n `;\n }\n\n private renderValueIconSlot() {\n if (!this.hasValueIcon) {\n return nothing;\n }\n return html`<span class=\"value-icon\" slot=\"icon\" aria-hidden=\"true\">\n <slot name=\"value-icon\"></slot>\n </span>`;\n }\n\n private renderSetpoint() {\n if (!this.hasSetpoint) {\n return nothing;\n }\n\n return html`\n <obc-readout-setpoint\n .variant=${'setpoint'}\n .readoutStyle=${'regular'}\n .direction=${'horizontal'}\n .size=${this.resolvedSetpointSize}\n .priority=${this.resolvedSetpointPriority}\n .mode=${this.resolvedSetpointMode}\n .hugContent=${true}\n .value=${this.setpointValue}\n .showZeroPadding=${this.showZeroPadding}\n .fractionDigits=${this.fractionDigits}\n .minValueLength=${this.minValueLength}\n .hasHintedZeros=${this.hasHintedZeros}\n .hasDegree=${this.hasDegree}\n >\n <obi-input-right slot=\"icon\"></obi-input-right>\n </obc-readout-setpoint>\n `;\n }\n\n private renderActualValue() {\n return html`\n <obc-readout-setpoint\n .variant=${'value'}\n .readoutStyle=${'regular'}\n .direction=${'horizontal'}\n .size=${this.resolvedValueSize}\n .valueTypography=${this.resolvedValueTypography ?? undefined}\n .priority=${this.resolvedActualPriority}\n .mode=${this.resolvedActualMode}\n .hugContent=${true}\n .value=${this.value}\n .showZeroPadding=${this.showZeroPadding}\n .fractionDigits=${this.fractionDigits}\n .minValueLength=${this.minValueLength}\n .hasHintedZeros=${this.hasHintedZeros}\n .hasDegree=${this.hasDegree}\n >\n ${this.renderValueIconSlot()}\n </obc-readout-setpoint>\n `;\n }\n\n private renderValue() {\n return html`\n <div class=\"value-wrap\" part=\"value-wrap\">\n ${this.hasSetpoint\n ? html`<div class=\"value-cluster\" part=\"value-cluster\">\n ${this.renderSetpoint()} ${this.renderActualValue()}\n </div>`\n : this.renderActualValue()}\n </div>\n `;\n }\n\n private renderTrailingUnit() {\n if (\n !this.hasUnit ||\n this.stacking === ReadoutListItemStacking.leadingUnit\n ) {\n return nothing;\n }\n\n return html`<div class=\"unit unit-trailing\" part=\"unit-trailing\">\n ${this.unit}\n </div>`;\n }\n\n private renderTrailingSource() {\n if (!this.showsTrailingSource) {\n return nothing;\n }\n\n return html`\n <div class=\"divider\" part=\"divider\" aria-hidden=\"true\"></div>\n <div class=\"source source-trailing\" part=\"source-trailing\">\n ${this.src}\n </div>\n `;\n }\n\n override render() {\n return wrapWithAlertFrame(\n this.alert,\n html`\n <div\n class=${classMap({\n root: true,\n [`size-${this.size}`]: true,\n [`stacking-${this.stacking}`]: true,\n 'priority-enhanced':\n this.priority === ReadoutListItemPriority.enhanced,\n 'priority-setpoint':\n this.priority === ReadoutListItemPriority.setpoint,\n 'priority-setpoint-flip-flop':\n this.priority === ReadoutListItemPriority.setpointFlipFlop,\n 'data-none': this.dataState === ReadoutListItemDataState.none,\n 'data-low-integrity':\n this.dataState === ReadoutListItemDataState.lowIntegrity,\n 'data-invalid': this.dataState === ReadoutListItemDataState.invalid,\n 'has-leading-icon': this.hasLeadingIcon,\n 'has-value-icon': this.hasValueIcon,\n })}\n part=\"root\"\n >\n <div class=\"content\" part=\"content\">\n <div class=\"label-container\" part=\"label-container\">\n ${this.hasLeadingIcon\n ? html`<span class=\"leading-icon\" aria-hidden=\"true\"\n ><slot name=\"leading-icon\"></slot\n ></span>`\n : nothing}\n ${this.renderLabelContainer()}\n </div>\n\n ${this.labelOnly\n ? nothing\n : html`\n <div class=\"value-container\" part=\"value-container\">\n ${this.renderValue()} ${this.renderTrailingUnit()}\n </div>\n\n ${this.renderTrailingSource()}\n `}\n </div>\n </div>\n `\n );\n }\n\n static override styles = unsafeCSS(componentStyle);\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'obc-readout-list-item': ObcReadoutListItem;\n }\n}\n"],"names":["ReadoutListItemDataState","ReadoutListItemSize","ReadoutListItemStacking","ReadoutListItemPriority"],"mappings":";;;;;;;;;;;;;;;;;;;AAgBO,IAAK,6CAAAA,8BAAL;AACLA,4BAAA,MAAA,IAAO;AACPA,4BAAA,cAAA,IAAe;AACfA,4BAAA,SAAA,IAAU;AAHA,SAAAA;AAAA,GAAA,4BAAA,CAAA,CAAA;AAML,IAAK,wCAAAC,yBAAL;AACLA,uBAAA,MAAA,IAAO;AACPA,uBAAA,UAAA,IAAW;AACXA,uBAAA,UAAA,IAAW;AAHD,SAAAA;AAAA,GAAA,uBAAA,CAAA,CAAA;AAML,IAAK,4CAAAC,6BAAL;AACLA,2BAAA,cAAA,IAAe;AACfA,2BAAA,aAAA,IAAc;AACdA,2BAAA,YAAA,IAAa;AAHH,SAAAA;AAAA,GAAA,2BAAA,CAAA,CAAA;AAML,IAAK,4CAAAC,6BAAL;AACLA,2BAAA,SAAA,IAAU;AACVA,2BAAA,UAAA,IAAW;AACXA,2BAAA,UAAA,IAAW;AACXA,2BAAA,kBAAA,IAAmB;AAJT,SAAAA;AAAA,GAAA,2BAAA,CAAA,CAAA;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
|
animation: warning-blink 4s infinite;
|
|
14565
14565
|
animation-timing-function: steps(1);
|
|
14566
14566
|
}
|
|
14567
|
+
:root[data-obc-theme="day"] {
|
|
14568
|
+
--critical-enabled-background-color: rgb(196, 36, 183);
|
|
14569
|
+
--critical-enabled-border-color: rgb(153, 0, 143);
|
|
14570
|
+
--critical-hover-background-color: rgb(173, 5, 162);
|
|
14571
|
+
--critical-hover-border-color: rgb(153, 0, 143);
|
|
14572
|
+
--critical-pressed-background-color: rgb(153, 0, 143);
|
|
14573
|
+
--critical-pressed-border-color: rgb(153, 0, 143);
|
|
14574
|
+
--critical-focused-background-color: rgb(196, 36, 183);
|
|
14575
|
+
--critical-focused-border-color: rgb(153, 0, 143);
|
|
14576
|
+
--critical-disabled-background-color: rgb(196, 36, 183);
|
|
14577
|
+
--critical-disabled-border-color: rgb(196, 36, 183);
|
|
14578
|
+
--on-critical-color: rgb(255, 255, 255);
|
|
14579
|
+
--on-critical-active-color: rgb(255, 255, 255);
|
|
14580
|
+
--on-critical-neutral-color: rgb(254, 232, 250);
|
|
14581
|
+
--on-critical-disabled-color: rgb(248, 155, 235);
|
|
14582
|
+
--alert-critical-color: var(--critical-enabled-background-color);
|
|
14583
|
+
--alert-critical-outline-color: var(--critical-enabled-border-color);
|
|
14584
|
+
--alert-critical-container-background-color: rgb(254, 207, 246);
|
|
14585
|
+
--alert-critical-container-border-color: rgb(248, 155, 235);
|
|
14586
|
+
--alert-diagnostic-color: var(--notification-enabled-background-color);
|
|
14587
|
+
--alert-diagnostic-outline-color: var(--notification-enabled-border-color);
|
|
14588
|
+
--alert-notification-container-background-color: rgb(226, 240, 255);
|
|
14589
|
+
--alert-notification-container-border-color: rgb(195, 223, 255);
|
|
14590
|
+
}
|
|
14591
|
+
:root[data-obc-theme="dusk"] {
|
|
14592
|
+
--critical-enabled-background-color: rgb(189, 40, 190);
|
|
14593
|
+
--critical-enabled-border-color: rgb(206, 65, 207);
|
|
14594
|
+
--critical-hover-background-color: rgb(206, 65, 207);
|
|
14595
|
+
--critical-hover-border-color: rgb(206, 65, 207);
|
|
14596
|
+
--critical-pressed-background-color: rgb(218, 85, 218);
|
|
14597
|
+
--critical-pressed-border-color: rgb(206, 65, 207);
|
|
14598
|
+
--critical-focused-background-color: rgb(189, 40, 190);
|
|
14599
|
+
--critical-focused-border-color: rgb(132, 179, 239);
|
|
14600
|
+
--critical-disabled-background-color: rgb(189, 40, 190);
|
|
14601
|
+
--critical-disabled-border-color: rgb(189, 40, 190);
|
|
14602
|
+
--on-critical-color: rgb(255, 255, 255);
|
|
14603
|
+
--on-critical-active-color: rgb(255, 255, 255);
|
|
14604
|
+
--on-critical-neutral-color: rgb(255, 255, 255);
|
|
14605
|
+
--on-critical-disabled-color: rgb(38, 38, 38);
|
|
14606
|
+
--alert-critical-color: var(--critical-enabled-background-color);
|
|
14607
|
+
--alert-critical-outline-color: var(--critical-enabled-border-color);
|
|
14608
|
+
--alert-critical-container-background-color: rgb(85, 0, 86);
|
|
14609
|
+
--alert-critical-container-border-color: rgb(102, 0, 104);
|
|
14610
|
+
--alert-diagnostic-color: var(--notification-enabled-background-color);
|
|
14611
|
+
--alert-diagnostic-outline-color: var(--notification-enabled-border-color);
|
|
14612
|
+
--alert-notification-container-background-color: rgb(0, 35, 123);
|
|
14613
|
+
--alert-notification-container-border-color: rgb(0, 44, 144);
|
|
14614
|
+
}
|
|
14615
|
+
:root[data-obc-theme="night"] {
|
|
14616
|
+
--critical-enabled-background-color: rgb(195, 48, 196);
|
|
14617
|
+
--critical-enabled-border-color: rgb(195, 48, 196);
|
|
14618
|
+
--critical-hover-background-color: rgb(195, 48, 196);
|
|
14619
|
+
--critical-hover-border-color: rgb(224, 100, 224);
|
|
14620
|
+
--critical-pressed-background-color: rgb(181, 30, 182);
|
|
14621
|
+
--critical-pressed-border-color: rgb(224, 100, 224);
|
|
14622
|
+
--critical-focused-background-color: rgb(195, 48, 196);
|
|
14623
|
+
--critical-focused-border-color: rgb(44, 131, 102);
|
|
14624
|
+
--critical-disabled-background-color: rgb(161, 6, 163);
|
|
14625
|
+
--critical-disabled-border-color: rgb(161, 6, 163);
|
|
14626
|
+
--on-critical-color: rgb(0, 0, 0);
|
|
14627
|
+
--on-critical-active-color: rgb(0, 0, 0);
|
|
14628
|
+
--on-critical-neutral-color: rgb(0, 0, 0, 0.699999988079071);
|
|
14629
|
+
--on-critical-disabled-color: rgb(0, 0, 0, 0.30000001192092896);
|
|
14630
|
+
--alert-critical-color: var(--critical-enabled-background-color);
|
|
14631
|
+
--alert-critical-outline-color: var(--critical-enabled-border-color);
|
|
14632
|
+
--alert-critical-container-background-color: rgb(59, 0, 60);
|
|
14633
|
+
--alert-critical-container-border-color: rgb(59, 0, 60);
|
|
14634
|
+
--alert-diagnostic-color: var(--notification-enabled-background-color);
|
|
14635
|
+
--alert-diagnostic-outline-color: var(--notification-enabled-border-color);
|
|
14636
|
+
--alert-notification-container-background-color: rgb(16, 33, 26);
|
|
14637
|
+
--alert-notification-container-border-color: rgb(16, 33, 26);
|
|
14638
|
+
}
|
|
14639
|
+
:root[data-obc-theme="bright"] {
|
|
14640
|
+
--critical-enabled-background-color: rgb(196, 36, 183);
|
|
14641
|
+
--critical-enabled-border-color: rgb(112, 0, 104);
|
|
14642
|
+
--critical-hover-background-color: rgb(153, 0, 143);
|
|
14643
|
+
--critical-hover-border-color: rgb(112, 0, 104);
|
|
14644
|
+
--critical-pressed-background-color: rgb(112, 0, 104);
|
|
14645
|
+
--critical-pressed-border-color: rgb(112, 0, 104);
|
|
14646
|
+
--critical-focused-background-color: rgb(153, 0, 143);
|
|
14647
|
+
--critical-focused-border-color: rgb(93, 143, 213);
|
|
14648
|
+
--critical-disabled-background-color: rgb(196, 36, 183);
|
|
14649
|
+
--critical-disabled-border-color: rgb(196, 36, 183);
|
|
14650
|
+
--on-critical-color: rgb(255, 255, 255);
|
|
14651
|
+
--on-critical-active-color: rgb(255, 255, 255);
|
|
14652
|
+
--on-critical-neutral-color: rgb(255, 255, 255);
|
|
14653
|
+
--on-critical-disabled-color: rgb(248, 155, 235);
|
|
14654
|
+
--alert-critical-color: var(--critical-enabled-background-color);
|
|
14655
|
+
--alert-critical-outline-color: var(--critical-enabled-border-color);
|
|
14656
|
+
--alert-critical-container-background-color: rgb(252, 184, 242);
|
|
14657
|
+
--alert-critical-container-border-color: rgb(252, 184, 242);
|
|
14658
|
+
--alert-diagnostic-color: var(--notification-enabled-background-color);
|
|
14659
|
+
--alert-diagnostic-outline-color: var(--notification-enabled-border-color);
|
|
14660
|
+
--alert-notification-container-background-color: rgb(226, 240, 255);
|
|
14661
|
+
--alert-notification-container-border-color: rgb(226, 240, 255);
|
|
14662
|
+
}
|
|
14663
|
+
@property --critical-blink-on {
|
|
14664
|
+
syntax: "<number>";
|
|
14665
|
+
inherits: true;
|
|
14666
|
+
initial-value: 1;
|
|
14667
|
+
}
|
|
14668
|
+
@property --critical-blink-off {
|
|
14669
|
+
syntax: "<number>";
|
|
14670
|
+
inherits: true;
|
|
14671
|
+
initial-value: 0;
|
|
14672
|
+
}
|
|
14673
|
+
@property --low-blink-on {
|
|
14674
|
+
syntax: "<number>";
|
|
14675
|
+
inherits: true;
|
|
14676
|
+
initial-value: 1;
|
|
14677
|
+
}
|
|
14678
|
+
@property --low-blink-off {
|
|
14679
|
+
syntax: "<number>";
|
|
14680
|
+
inherits: true;
|
|
14681
|
+
initial-value: 0;
|
|
14682
|
+
}
|
|
14683
|
+
@keyframes critical-blink {
|
|
14684
|
+
0% {
|
|
14685
|
+
--critical-blink-on: 1;
|
|
14686
|
+
--critical-blink-off: 0;
|
|
14687
|
+
}
|
|
14688
|
+
|
|
14689
|
+
50% {
|
|
14690
|
+
--critical-blink-on: 0;
|
|
14691
|
+
--critical-blink-off: 1;
|
|
14692
|
+
}
|
|
14693
|
+
|
|
14694
|
+
100% {
|
|
14695
|
+
--critical-blink-on: 1;
|
|
14696
|
+
--critical-blink-off: 0;
|
|
14697
|
+
}
|
|
14698
|
+
}
|
|
14699
|
+
@keyframes low-blink {
|
|
14700
|
+
0% {
|
|
14701
|
+
--low-blink-on: 1;
|
|
14702
|
+
--low-blink-off: 0;
|
|
14703
|
+
}
|
|
14704
|
+
|
|
14705
|
+
50% {
|
|
14706
|
+
--low-blink-on: 0;
|
|
14707
|
+
--low-blink-off: 1;
|
|
14708
|
+
}
|
|
14709
|
+
|
|
14710
|
+
100% {
|
|
14711
|
+
--low-blink-on: 1;
|
|
14712
|
+
--low-blink-off: 0;
|
|
14713
|
+
}
|
|
14714
|
+
}
|
|
14715
|
+
:root {
|
|
14716
|
+
animation:
|
|
14717
|
+
warning-blink 4s infinite,
|
|
14718
|
+
critical-blink 1s infinite,
|
|
14719
|
+
low-blink 8s infinite;
|
|
14720
|
+
animation-timing-function: steps(1);
|
|
14721
|
+
}
|
|
14567
14722
|
.obc-radio-button {
|
|
14568
14723
|
user-select: none;
|
|
14569
14724
|
|
package/dist/types.d.ts
CHANGED
|
@@ -7,8 +7,14 @@ export declare enum Direction {
|
|
|
7
7
|
export declare enum AlertType {
|
|
8
8
|
Alarm = "alarm",
|
|
9
9
|
Warning = "warning",
|
|
10
|
-
Caution = "caution"
|
|
10
|
+
Caution = "caution",
|
|
11
|
+
IsaCritical = "isa-critical",
|
|
12
|
+
IsaHigh = "isa-high",
|
|
13
|
+
IsaMedium = "isa-medium",
|
|
14
|
+
IsaLow = "isa-low",
|
|
15
|
+
IsaDiagnostic = "isa-diagnostic"
|
|
11
16
|
}
|
|
17
|
+
export declare const ALERT_SEVERITY_PRIORITY: AlertType[];
|
|
12
18
|
export declare enum AlertCategory {
|
|
13
19
|
a = "a",
|
|
14
20
|
b = "b",
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,oBAAY,SAAS;IACnB,EAAE,OAAO;IACT,IAAI,SAAS;IACb,IAAI,SAAS;IACb,KAAK,UAAU;CAChB;AAED,oBAAY,SAAS;IACnB,KAAK,UAAU;IACf,OAAO,YAAY;IACnB,OAAO,YAAY;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,oBAAY,SAAS;IACnB,EAAE,OAAO;IACT,IAAI,SAAS;IACb,IAAI,SAAS;IACb,KAAK,UAAU;CAChB;AAED,oBAAY,SAAS;IACnB,KAAK,UAAU;IACf,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,WAAW,iBAAiB;IAC5B,OAAO,aAAa;IACpB,SAAS,eAAe;IACxB,MAAM,YAAY;IAClB,aAAa,mBAAmB;CACjC;AAED,eAAO,MAAM,uBAAuB,aASnC,CAAC;AAEF,oBAAY,aAAa;IACvB,CAAC,MAAM;IACP,CAAC,MAAM;IACP,CAAC,MAAM;CACR;AAED,MAAM,WAAW,KAAK;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,YAAY,EACR,KAAK,GACL;QACE,cAAc,EAAE,MAAM,CAAC;QACvB,cAAc,EAAE,IAAI,CAAC;KACtB,CAAC;IACN,MAAM,EACF,IAAI,GACJ;QACE,aAAa,EAAE,IAAI,CAAC;KACrB,CAAC;IACN,IAAI,EAAE,SAAS,CAAC;IAChB,IAAI,EAAE,IAAI,CAAC;IACX,YAAY,CAAC,EAAE,IAAI,CAAC;IACpB,OAAO,CAAC,EACJ,KAAK,GACL;QACE,gBAAgB,EAAE,IAAI,CAAC;QACvB,cAAc,CAAC,EAAE,IAAI,CAAC;QACtB,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,CAAC;IACN,OAAO,CAAC,EACJ,KAAK,GACL;QACE,gBAAgB,EAAE,IAAI,CAAC;QACvB,cAAc,CAAC,EAAE,IAAI,CAAC;QACtB,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,CAAC;IACN,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,QAAQ,CAAC,EAAE,aAAa,CAAC;CAC1B;AAED,wBAAgB,QAAQ,CAAC,KAAK,EAAE,KAAK,WAEpC;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,KAAK,WAE1C;AAED,wBAAgB,SAAS,CAAC,KAAK,EAAE,KAAK,WAErC;AAED,wBAAgB,SAAS,CAAC,KAAK,EAAE,KAAK,WAErC;AAED,wBAAgB,qBAAqB,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,UAgBvD;AAED,MAAM,MAAM,WAAW,GAAG,CAAC,IAAI,EAAE,IAAI,KAAK,MAAM,CAAC;AAEjD,wBAAgB,eAAe,CAAC,IAAI,EAAE,IAAI,UA0BzC"}
|
package/dist/types.js
CHANGED
|
@@ -9,8 +9,24 @@ var AlertType = /* @__PURE__ */ ((AlertType2) => {
|
|
|
9
9
|
AlertType2["Alarm"] = "alarm";
|
|
10
10
|
AlertType2["Warning"] = "warning";
|
|
11
11
|
AlertType2["Caution"] = "caution";
|
|
12
|
+
AlertType2["IsaCritical"] = "isa-critical";
|
|
13
|
+
AlertType2["IsaHigh"] = "isa-high";
|
|
14
|
+
AlertType2["IsaMedium"] = "isa-medium";
|
|
15
|
+
AlertType2["IsaLow"] = "isa-low";
|
|
16
|
+
AlertType2["IsaDiagnostic"] = "isa-diagnostic";
|
|
12
17
|
return AlertType2;
|
|
13
18
|
})(AlertType || {});
|
|
19
|
+
const ALERT_SEVERITY_PRIORITY = [
|
|
20
|
+
"isa-critical",
|
|
21
|
+
"alarm",
|
|
22
|
+
"isa-high",
|
|
23
|
+
"warning",
|
|
24
|
+
"isa-medium",
|
|
25
|
+
"caution",
|
|
26
|
+
"isa-low",
|
|
27
|
+
"isa-diagnostic"
|
|
28
|
+
/* IsaDiagnostic */
|
|
29
|
+
];
|
|
14
30
|
var AlertCategory = /* @__PURE__ */ ((AlertCategory2) => {
|
|
15
31
|
AlertCategory2["a"] = "a";
|
|
16
32
|
AlertCategory2["b"] = "b";
|
|
@@ -29,15 +45,9 @@ function isShelved(alert) {
|
|
|
29
45
|
function isBlocked(alert) {
|
|
30
46
|
return alert.blocked !== false && alert.blocked !== void 0;
|
|
31
47
|
}
|
|
32
|
-
const priorityOrder = [
|
|
33
|
-
"alarm",
|
|
34
|
-
"warning",
|
|
35
|
-
"caution"
|
|
36
|
-
/* Caution */
|
|
37
|
-
];
|
|
38
48
|
function comparePriorityAlerts(a, b) {
|
|
39
49
|
if (a.type !== b.type) {
|
|
40
|
-
return
|
|
50
|
+
return ALERT_SEVERITY_PRIORITY.indexOf(b.type) - ALERT_SEVERITY_PRIORITY.indexOf(a.type);
|
|
41
51
|
}
|
|
42
52
|
if (isActive(a) !== isActive(b)) {
|
|
43
53
|
return isActive(a) ? 1 : -1;
|
|
@@ -69,6 +79,7 @@ function formatTimeSince(time) {
|
|
|
69
79
|
return Math.round(diffInDays / 365) + "y " + Math.round(diffInDays % 365) + "d";
|
|
70
80
|
}
|
|
71
81
|
export {
|
|
82
|
+
ALERT_SEVERITY_PRIORITY,
|
|
72
83
|
AlertCategory,
|
|
73
84
|
AlertType,
|
|
74
85
|
Direction,
|
package/dist/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sources":["../src/types.ts"],"sourcesContent":["export enum Direction {\n Up = 'up',\n Down = 'down',\n Left = 'left',\n Right = 'right',\n}\n\nexport enum AlertType {\n Alarm = 'alarm',\n Warning = 'warning',\n Caution = 'caution',\n}\n\nexport enum AlertCategory {\n a = 'a',\n b = 'b',\n c = 'c',\n}\n\nexport interface Alert {\n id: string; // The id of the alert\n tagId: string; // The tag ID visible to the user\n source: string;\n text: string;\n note?: string; // The note of the alert, typically by the operator\n acknowledged:\n | false\n | {\n acknowledgedBy: string;\n acknowledgedAt: Date;\n };\n active:\n | true\n | {\n rectifiedTime: Date;\n };\n type: AlertType;\n time: Date;\n lastModified?: Date;\n shelved?:\n | false\n | {\n shelvedStartTime: Date;\n shelvedEndTime?: Date;\n shelvedBy?: string;\n };\n blocked?:\n | false\n | {\n blockedStartTime: Date;\n blockedEndTime?: Date;\n blockedBy?: string;\n };\n noAck?: boolean; // If true, the alarm has no ack button\n category?: AlertCategory;\n}\n\nexport function isActive(alert: Alert) {\n return alert.active === true;\n}\n\nexport function isAcknowledged(alert: Alert) {\n return alert.acknowledged !== false && alert.acknowledged !== undefined;\n}\n\nexport function isShelved(alert: Alert) {\n return alert.shelved !== false && alert.shelved !== undefined;\n}\n\nexport function isBlocked(alert: Alert) {\n return alert.blocked !== false && alert.blocked !== undefined;\n}\n\
|
|
1
|
+
{"version":3,"file":"types.js","sources":["../src/types.ts"],"sourcesContent":["export enum Direction {\n Up = 'up',\n Down = 'down',\n Left = 'left',\n Right = 'right',\n}\n\nexport enum AlertType {\n Alarm = 'alarm',\n Warning = 'warning',\n Caution = 'caution',\n IsaCritical = 'isa-critical',\n IsaHigh = 'isa-high',\n IsaMedium = 'isa-medium',\n IsaLow = 'isa-low',\n IsaDiagnostic = 'isa-diagnostic',\n}\n\nexport const ALERT_SEVERITY_PRIORITY = [\n AlertType.IsaCritical,\n AlertType.Alarm,\n AlertType.IsaHigh,\n AlertType.Warning,\n AlertType.IsaMedium,\n AlertType.Caution,\n AlertType.IsaLow,\n AlertType.IsaDiagnostic,\n];\n\nexport enum AlertCategory {\n a = 'a',\n b = 'b',\n c = 'c',\n}\n\nexport interface Alert {\n id: string; // The id of the alert\n tagId: string; // The tag ID visible to the user\n source: string;\n text: string;\n note?: string; // The note of the alert, typically by the operator\n acknowledged:\n | false\n | {\n acknowledgedBy: string;\n acknowledgedAt: Date;\n };\n active:\n | true\n | {\n rectifiedTime: Date;\n };\n type: AlertType;\n time: Date;\n lastModified?: Date;\n shelved?:\n | false\n | {\n shelvedStartTime: Date;\n shelvedEndTime?: Date;\n shelvedBy?: string;\n };\n blocked?:\n | false\n | {\n blockedStartTime: Date;\n blockedEndTime?: Date;\n blockedBy?: string;\n };\n noAck?: boolean; // If true, the alarm has no ack button\n category?: AlertCategory;\n}\n\nexport function isActive(alert: Alert) {\n return alert.active === true;\n}\n\nexport function isAcknowledged(alert: Alert) {\n return alert.acknowledged !== false && alert.acknowledged !== undefined;\n}\n\nexport function isShelved(alert: Alert) {\n return alert.shelved !== false && alert.shelved !== undefined;\n}\n\nexport function isBlocked(alert: Alert) {\n return alert.blocked !== false && alert.blocked !== undefined;\n}\n\nexport function comparePriorityAlerts(a: Alert, b: Alert) {\n if (a.type !== b.type) {\n return (\n ALERT_SEVERITY_PRIORITY.indexOf(b.type) -\n ALERT_SEVERITY_PRIORITY.indexOf(a.type)\n );\n }\n\n if (isActive(a) !== isActive(b)) {\n return isActive(a) ? 1 : -1;\n }\n\n if (isAcknowledged(a) !== isAcknowledged(b)) {\n return isAcknowledged(a) ? -1 : 1;\n }\n return a.time.getTime() - b.time.getTime();\n}\n\nexport type TimeSinceFn = (time: Date) => string;\n\nexport function formatTimeSince(time: Date) {\n const now = new Date();\n const diff = now.getTime() - time.getTime();\n const diffInSeconds = diff / 1000;\n if (diffInSeconds < 60) {\n return Math.round(diffInSeconds) + 's';\n }\n const diffInMinutes = diffInSeconds / 60;\n if (diffInMinutes < 60) {\n return (\n Math.round(diffInMinutes) + 'm ' + Math.round(diffInSeconds % 60) + 's'\n );\n }\n const diffInHours = diffInMinutes / 60;\n if (diffInHours < 24) {\n return (\n Math.round(diffInHours) + 'h ' + Math.round(diffInMinutes % 60) + 'm'\n );\n }\n const diffInDays = diffInHours / 24;\n if (diffInDays < 365) {\n return Math.round(diffInDays) + 'd ' + Math.round(diffInHours % 24) + 'h';\n }\n return (\n Math.round(diffInDays / 365) + 'y ' + Math.round(diffInDays % 365) + 'd'\n );\n}\n"],"names":["Direction","AlertType","AlertCategory"],"mappings":"AAAO,IAAK,8BAAAA,eAAL;AACLA,aAAA,IAAA,IAAK;AACLA,aAAA,MAAA,IAAO;AACPA,aAAA,MAAA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