@oicl/openbridge-webcomponents 2.0.0-next.142 → 2.0.0-next.144

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.
Files changed (24) hide show
  1. package/bundle/openbridge-webcomponents.bundle.js +131 -30
  2. package/bundle/openbridge-webcomponents.bundle.js.map +1 -1
  3. package/custom-elements.json +51 -18
  4. package/dist/components/alert-list-details/alert-list-details.js +2 -2
  5. package/dist/components/alert-list-details/alert-list-details.js.map +1 -1
  6. package/dist/components/app-button/app-button.css.js +56 -0
  7. package/dist/components/app-button/app-button.css.js.map +1 -1
  8. package/dist/integration-systems/integration-app-bar/integration-app-bar.css.js +12 -1
  9. package/dist/integration-systems/integration-app-bar/integration-app-bar.css.js.map +1 -1
  10. package/dist/integration-systems/integration-app-bar/integration-app-bar.d.ts +2 -2
  11. package/dist/integration-systems/integration-app-bar/integration-app-bar.d.ts.map +1 -1
  12. package/dist/integration-systems/integration-app-bar/integration-app-bar.js +1 -21
  13. package/dist/integration-systems/integration-app-bar/integration-app-bar.js.map +1 -1
  14. package/dist/navigation-instruments/readout/readout.d.ts +11 -2
  15. package/dist/navigation-instruments/readout/readout.d.ts.map +1 -1
  16. package/dist/navigation-instruments/readout/readout.js +18 -0
  17. package/dist/navigation-instruments/readout/readout.js.map +1 -1
  18. package/dist/navigation-instruments/readout-list-item/readout-list-item.css.js +25 -0
  19. package/dist/navigation-instruments/readout-list-item/readout-list-item.css.js.map +1 -1
  20. package/dist/navigation-instruments/readout-list-item/readout-list-item.d.ts +20 -4
  21. package/dist/navigation-instruments/readout-list-item/readout-list-item.d.ts.map +1 -1
  22. package/dist/navigation-instruments/readout-list-item/readout-list-item.js +18 -6
  23. package/dist/navigation-instruments/readout-list-item/readout-list-item.js.map +1 -1
  24. package/package.json +1 -1
@@ -85474,27 +85474,20 @@
85474
85474
  "kind": "class",
85475
85475
  "description": "",
85476
85476
  "name": "ObcIntegrationAppBar",
85477
- "slots": [
85477
+ "cssProperties": [
85478
85478
  {
85479
- "description": "Application buttons; slotted elements are normalized to a uniform width",
85480
- "name": "apps"
85479
+ "description": "Minimum width of each app-button grid track. Tracks may grow equally to fit wider content.",
85480
+ "name": "--obc-integration-app-bar-app-width",
85481
+ "default": "max-content"
85481
85482
  }
85482
85483
  ],
85483
- "members": [
85484
+ "slots": [
85484
85485
  {
85485
- "kind": "method",
85486
- "name": "handleAppsSlotChange",
85487
- "privacy": "private",
85488
- "parameters": [
85489
- {
85490
- "name": "event",
85491
- "type": {
85492
- "text": "Event"
85493
- }
85494
- }
85495
- ]
85486
+ "description": "Application buttons; every button is laid out at the width of the widest one",
85487
+ "name": "apps"
85496
85488
  }
85497
85489
  ],
85490
+ "members": [],
85498
85491
  "superclass": {
85499
85492
  "name": "LitElement",
85500
85493
  "package": "lit"
@@ -105700,7 +105693,7 @@
105700
105693
  "declarations": [
105701
105694
  {
105702
105695
  "kind": "class",
105703
- "description": "`<obc-readout-list-item>` – A compact, dense readout row for lists and tables.\n\nRenders a label, an optional source, an optional unit, and up to three\ncap-height \"readout building blocks\" – advice, setpoint, and value – each a\nfixed-width-reservable numeric segment. Dynamic data is passed as top-level\nprimitives (`value`, `setpoint`, `advice`, `label`, `unit`, `src`). Global\nlayout/format is configured via top-level props (`size`, `priority`,\n`stacking`, `hasDegree`, `dataQuality`, `alert`, …) and per-block tweaks via one\nobject per block (`valueOptions`, `setpointOptions`, `adviceOptions`,\n`unitOptions`, `srcOptions`).\n\n### Features\n- **Building blocks:** value, optional setpoint, and optional advice segments,\n each cap-height-aligned and able to reserve a stable width.\n- **Sizes:** `small`, `medium`, `large` density scales.\n- **Stacking:** `trailing-unit`, `leading-unit`, `leading-src` placement.\n- **Priority:** `regular`/`enhanced` colour emphasis; per-value `weight`\n (`regular`/`semibold`/`bold`) is independent of colour.\n- **Setpoint flip-flop:** swaps emphasis between value and setpoint as the\n value reaches the setpoint.\n- **Data quality:** `low-integrity`/`invalid` styling, combinable with `alert`.\n- **Alert frame:** optional `alert` wrapper (caution/warning/alarm/level).\n- **Clickable:** optionally rendered as a focusable button with `squared`,\n `round-corners`, or `round` corners.\n- **Formatting:** shared `fractionDigits`, width reservation via `maxDigits`\n and per-segment `hintedZeros`; a `null` value renders a dash (`-`).\n- **Text values:** `valueType=\"text\"` renders `value` verbatim (e.g.\n `\"Thermo On\"`) instead of formatting it as a number.\n\n### Usage Guidelines\nUse for dense readout rows in lists/tables. Prefer `<obc-readout>` for rich\nmulti-segment instrument layouts, source pickers, or flyout behaviour.",
105696
+ "description": "`<obc-readout-list-item>` – A compact, dense readout row for lists and tables.\n\nRenders a label, an optional source, an optional unit, and up to three\ncap-height \"readout building blocks\" – advice, setpoint, and value – each a\nfixed-width-reservable numeric segment. Dynamic data is passed as top-level\nprimitives (`value`, `setpoint`, `advice`, `label`, `unit`, `src`). Global\nlayout/format is configured via top-level props (`size`, `priority`,\n`stacking`, `hasDegree`, `dataQuality`, `alert`, …) and per-block tweaks via one\nobject per block (`valueOptions`, `setpointOptions`, `adviceOptions`,\n`unitOptions`, `srcOptions`).\n\n### Features\n- **Building blocks:** value, optional setpoint, and optional advice segments,\n each cap-height-aligned and able to reserve a stable width.\n- **Sizes:** `small`, `medium`, `large` density scales.\n- **Stacking:** `trailing-unit`, `leading-unit`, `leading-src`,\n `leading-src-inline` placement.\n- **Priority:** `regular`/`enhanced` colour emphasis; per-value `weight`\n (`regular`/`semibold`/`bold`) is independent of colour.\n- **Setpoint flip-flop:** swaps emphasis between value and setpoint as the\n value reaches the setpoint.\n- **Data quality:** `low-integrity`/`invalid` styling, combinable with `alert`.\n- **Alert frame:** optional `alert` wrapper (caution/warning/alarm/level).\n- **Clickable:** optionally rendered as a focusable button with `squared`,\n `round-corners`, or `round` corners.\n- **Formatting:** shared `fractionDigits`, width reservation via `maxDigits`\n and per-segment `hintedZeros`; a `null` value renders a dash (`-`).\n- **Text values:** `valueType=\"text\"` renders `value` verbatim (e.g.\n `\"Thermo On\"`) instead of formatting it as a number.\n\n### Usage Guidelines\nUse for dense readout rows in lists/tables. Prefer `<obc-readout>` for rich\nmulti-segment instrument layouts, source pickers, or flyout behaviour.",
105704
105697
  "name": "ObcReadoutListItem",
105705
105698
  "slots": [
105706
105699
  {
@@ -106046,6 +106039,16 @@
106046
106039
  "privacy": "private",
106047
106040
  "readonly": true
106048
106041
  },
106042
+ {
106043
+ "kind": "field",
106044
+ "name": "hasLeadingSrc",
106045
+ "type": {
106046
+ "text": "boolean"
106047
+ },
106048
+ "privacy": "private",
106049
+ "description": "Both leading-src stackings move the source into the label stack.",
106050
+ "readonly": true
106051
+ },
106049
106052
  {
106050
106053
  "kind": "field",
106051
106054
  "name": "resolvedPriority",
@@ -106055,6 +106058,16 @@
106055
106058
  "privacy": "private",
106056
106059
  "readonly": true
106057
106060
  },
106061
+ {
106062
+ "kind": "field",
106063
+ "name": "hasTrailingUnitBox",
106064
+ "type": {
106065
+ "text": "boolean"
106066
+ },
106067
+ "privacy": "private",
106068
+ "description": "Whether a unit box follows the value: a unit, or a reserver alone — the\nblank reserved column keeps a unit-less row aligned with its neighbours.",
106069
+ "readonly": true
106070
+ },
106058
106071
  {
106059
106072
  "kind": "field",
106060
106073
  "name": "resolvedFractionDigits",
@@ -107072,7 +107085,7 @@
107072
107085
  "type": {
107073
107086
  "text": "ReadoutSize | undefined"
107074
107087
  },
107075
- "description": "Density tier. Applies to the vertical direction only — the horizontal arrangement exists in the large tier alone (Figma 6.1: it relies on the label+unit stack aligning with the L-size value caps), so `size` is ignored when `direction` is `horizontal`.\n\nAvailable when `direction==vertical`.",
107088
+ "description": "Density tier. Applies to the vertical direction only — the horizontal arrangement exists in the large tier alone (Figma 6.1: it relies on the label+unit stack aligning with the L-size value caps), so `size` is ignored when `direction` is `horizontal`; a horizontal readout given any other `size` logs a console warning once per element.\n\nAvailable when `direction==vertical`.",
107076
107089
  "attribute": "size",
107077
107090
  "availableWhen": "direction==vertical",
107078
107091
  "availableWhenIf": {
@@ -107315,6 +107328,15 @@
107315
107328
  "privacy": "private",
107316
107329
  "default": "false"
107317
107330
  },
107331
+ {
107332
+ "kind": "field",
107333
+ "name": "hasWarnedHorizontalSize",
107334
+ "type": {
107335
+ "text": "boolean"
107336
+ },
107337
+ "privacy": "private",
107338
+ "default": "false"
107339
+ },
107318
107340
  {
107319
107341
  "kind": "field",
107320
107342
  "name": "sourcePickerContentVisible",
@@ -108006,6 +108028,17 @@
108006
108028
  },
108007
108029
  "description": "Horizontal: advice, setpoint, value and the stacked label/unit meta flow on\none cap-height-aligned row, with the source at the end after an auto\ndivider."
108008
108030
  },
108031
+ {
108032
+ "kind": "method",
108033
+ "name": "warnHorizontalSizeIgnored",
108034
+ "privacy": "private",
108035
+ "return": {
108036
+ "type": {
108037
+ "text": "void"
108038
+ }
108039
+ },
108040
+ "description": "A horizontal readout discards any `size` but `large` (see `resolvedSize`).\nA silent discard is indistinguishable from a bug to a consumer, so each\noffending element says so once and logs itself for locating (#1182).\nA removed `size` attribute arrives as `null` and counts as unset."
108041
+ },
108009
108042
  {
108010
108043
  "kind": "method",
108011
108044
  "name": "clearDeferredSetpointHide",
@@ -108127,7 +108160,7 @@
108127
108160
  "type": {
108128
108161
  "text": "ReadoutSize | undefined"
108129
108162
  },
108130
- "description": "Density tier. Applies to the vertical direction only — the horizontal arrangement exists in the large tier alone (Figma 6.1: it relies on the label+unit stack aligning with the L-size value caps), so `size` is ignored when `direction` is `horizontal`.\n\nAvailable when `direction==vertical`.",
108163
+ "description": "Density tier. Applies to the vertical direction only — the horizontal arrangement exists in the large tier alone (Figma 6.1: it relies on the label+unit stack aligning with the L-size value caps), so `size` is ignored when `direction` is `horizontal`; a horizontal readout given any other `size` logs a console warning once per element.\n\nAvailable when `direction==vertical`.",
108131
108164
  "fieldName": "size"
108132
108165
  },
108133
108166
  {
@@ -118,7 +118,7 @@ let ObcAlertListDetails = class extends LitElement {
118
118
  if (this.small) {
119
119
  const columns = [
120
120
  {
121
- label: "status",
121
+ label: "Status",
122
122
  key: "status",
123
123
  sortDirection: "desc",
124
124
  sortable: true,
@@ -146,7 +146,7 @@ let ObcAlertListDetails = class extends LitElement {
146
146
  } else {
147
147
  const columns = [
148
148
  {
149
- label: "status",
149
+ label: "Status",
150
150
  key: "status",
151
151
  sortDirection: "desc",
152
152
  sortable: true,
@@ -1 +1 @@
1
- {"version":3,"file":"alert-list-details.js","sources":["../../../src/components/alert-list-details/alert-list-details.ts"],"sourcesContent":["import {LitElement, html, unsafeCSS} from 'lit';\nimport {customElement} from '../../decorator.js';\nimport compentStyle from './alert-list-details.css?inline';\nimport {msg} from '@lit/localize';\nimport {property, query} from 'lit/decorators.js';\nimport '../icon-button/icon-button.js';\nimport '../button/button.js';\nimport '../../icons/icon-silence-iec.js';\nimport '../../icons/icon-alerts.js';\nimport '../../icons/icon-alerts-shelf.js';\nimport '../../icons/icon-alerts-active.js';\nimport '../../icons/icon-alarm-rectified-iec.js';\nimport '../../icons/icon-unacknowledged.js';\nimport '../../icons/icon-alarm-noack-iec.js';\nimport '../../icons/icon-warning-noack-iec.js';\nimport '../alert-icon/alert-icon.js';\nimport {\n Alert,\n comparePriorityAlerts,\n isActive,\n isAcknowledged,\n isBlocked,\n isShelved,\n} from '../../types.js';\nimport {\n excludedFromUnackedFilter,\n requiresAcknowledgement,\n usesAlarmNoAckIcon,\n} from '../../alert-severity.js';\nimport {\n ObcTable,\n ObcTableCellClickEvent,\n ObcTableCellData,\n ObcTableCellType,\n ObcTableRowClickEvent,\n ObcTableRow,\n ObcTableColumn,\n} from '../table/table.js';\nimport '../scrollbar/scrollbar.js';\n\nexport enum AlertListMode {\n UNACKED = 'unacked',\n ALL = 'all',\n SHELVED = 'shelved',\n BLOCKED = 'blocked',\n RECTIFIED = 'rectified',\n}\n\nexport type ObcAckClickEvent = CustomEvent<{\n alert: Alert;\n}>;\n\nexport type ObcRowClickEvent = CustomEvent<{\n alert: Alert;\n}>;\n\nexport function getAlertListModeData(selectedMode: AlertListMode) {\n if (selectedMode === AlertListMode.ALL)\n return {\n name: AlertListMode.ALL,\n title: msg('All'),\n emptyTitle: msg('No active alerts'),\n emptyIcon: html`<obi-alerts></obi-alerts>`,\n filter: (alert: Alert) => !isShelved(alert) && isActive(alert),\n };\n else if (selectedMode === AlertListMode.UNACKED)\n return {\n name: AlertListMode.UNACKED,\n title: msg('Unacked'),\n emptyTitle: msg('No unacknowledged alerts'),\n emptyIcon: html`<obi-unacknowledged></obi-unacknowledged>`,\n filter: (alert: Alert) =>\n !isAcknowledged(alert) &&\n isActive(alert) &&\n !excludedFromUnackedFilter(alert.type) &&\n !isShelved(alert),\n };\n else if (selectedMode === AlertListMode.SHELVED)\n return {\n name: AlertListMode.SHELVED,\n title: msg('Shelved'),\n emptyTitle: msg('No shelved alerts'),\n emptyIcon: html`<obi-alerts-shelf></obi-alerts-shelf>`,\n filter: (alert: Alert) => isShelved(alert),\n };\n else if (selectedMode === AlertListMode.BLOCKED)\n return {\n name: AlertListMode.BLOCKED,\n title: msg('Blocked'),\n emptyTitle: msg('No blocked alerts'),\n emptyIcon: html`<obi-alerts-active></obi-alerts-active>`,\n filter: (alert: Alert) => isBlocked(alert),\n };\n else if (selectedMode === AlertListMode.RECTIFIED)\n return {\n name: AlertListMode.RECTIFIED,\n title: msg('Rectified'),\n emptyTitle: msg('No rectified alerts'),\n emptyIcon: html`<obi-alarm-rectified-iec></obi-alarm-rectified-iec>`,\n filter: (alert: Alert) => !isActive(alert),\n };\n else throw new Error('Invalid selected mode');\n}\n\nexport function canAckFilter(filter: (alert: Alert) => boolean) {\n return (alert: Alert) =>\n !isAcknowledged(alert) &&\n !alert.noAck &&\n !excludedFromUnackedFilter(alert.type) &&\n filter(alert);\n}\n\n/**\n * @availableWhen timeFormatter showTime==true\n * @fires {ObcAckClickEvent} ack-click - Fired when the user clicks the \"ACK\" button.\n * @fires {ObcRowClickEvent} row-click - Fired when the user clicks a row.\n * @stable\n */\n@customElement('obc-alert-list-details')\nexport class ObcAlertListDetails extends LitElement {\n @property({type: String}) selectedMode: AlertListMode = AlertListMode.ALL;\n @property({type: Array}) alerts: Alert[] = [];\n @property({type: Boolean}) showTime: boolean = false;\n @property({attribute: false}) timeFormatter: (time: Date) => string = (\n time: Date\n ) => time.toLocaleTimeString(undefined, {hour12: false});\n @property({type: Boolean}) small: boolean = false;\n\n @query('obc-table')\n private alertList!: ObcTable;\n\n public getVisibleAlerts(): Alert[] {\n const visibleElements = this.alertList\n .getAllVisibleRows()\n .map((id) => this.alerts.find((alert) => alert.id === id))\n .filter((alert): alert is Alert => alert !== undefined);\n return visibleElements;\n }\n\n private onRowClick(e: ObcTableRowClickEvent) {\n const row = this.alerts.find((alert) => alert.id === e.detail.row.id);\n if (row) {\n this.dispatchEvent(\n new CustomEvent('row-click', {detail: {alert: row}}) as ObcRowClickEvent\n );\n }\n }\n\n private onCellButtonClick(e: ObcTableCellClickEvent) {\n const row = this.alerts.find((alert) => alert.id === e.detail.rowId);\n if (row) {\n this.dispatchEvent(\n new CustomEvent('ack-click', {\n detail: {alert: row},\n bubbles: false,\n }) as ObcAckClickEvent\n );\n }\n }\n\n private get columns() {\n if (this.small) {\n const columns: ObcTableColumn<ObcTableCellData, ObcTableRow>[] = [\n {\n label: 'status',\n key: 'status',\n sortDirection: 'desc',\n sortable: true,\n compareFunction: (_a, _b, aRow, bRow) => {\n const aAlert = this.alerts.find((alert) => alert.id === aRow.id);\n const bAlert = this.alerts.find((alert) => alert.id === bRow.id);\n if (aAlert && bAlert) {\n return comparePriorityAlerts(aAlert, bAlert);\n }\n return 0;\n },\n },\n ];\n if (this.showTime) {\n columns.push({\n label: 'Activated',\n key: 'time',\n });\n }\n columns.push({\n label: 'ACK-status',\n key: 'action',\n });\n return columns;\n } else {\n const columns: ObcTableColumn<ObcTableCellData, ObcTableRow>[] = [\n {\n label: 'status',\n key: 'status',\n sortDirection: 'desc',\n sortable: true,\n compareFunction: (_a, _b, aRow, bRow) => {\n const aAlert = this.alerts.find((alert) => alert.id === aRow.id);\n const bAlert = this.alerts.find((alert) => alert.id === bRow.id);\n if (aAlert && bAlert) {\n return comparePriorityAlerts(aAlert, bAlert);\n }\n return 0;\n },\n },\n {\n label: 'ACK-status',\n key: 'action',\n dividerRight: true,\n },\n ];\n if (this.showTime) {\n columns.push({\n label: 'Activated',\n key: 'time',\n sortable: true,\n compareFunction: (_a, _b, aRow, bRow) => {\n const aAlert = this.alerts.find((alert) => alert.id === aRow.id);\n const bAlert = this.alerts.find((alert) => alert.id === bRow.id);\n if (aAlert && bAlert) {\n const aTime = new Date(aAlert.time);\n const bTime = new Date(bAlert.time);\n return aTime.getTime() - bTime.getTime();\n }\n return 0;\n },\n });\n }\n columns.push({\n label: 'Tag ID',\n key: 'tagId',\n sortable: true,\n compareFunction: (a, b) => {\n const aText =\n a?.type === ObcTableCellType.Regular ? String(a.text ?? '') : '';\n const bText =\n b?.type === ObcTableCellType.Regular ? String(b.text ?? '') : '';\n return aText.localeCompare(bText);\n },\n });\n return columns;\n }\n }\n\n private get metadata() {\n return getAlertListModeData(this.selectedMode);\n }\n\n private get filteredAlerts() {\n return this.alerts.filter(this.metadata.filter);\n }\n\n override render() {\n const selectedList = this.metadata;\n\n const data = this.filteredAlerts.map((alert) => {\n let action: ObcTableCellData = {\n type: ObcTableCellType.Regular,\n };\n if (\n !isAcknowledged(alert) &&\n isActive(alert) &&\n requiresAcknowledgement(alert.type)\n ) {\n if (alert.noAck) {\n const icon = usesAlarmNoAckIcon(alert.type)\n ? html`<obi-alarm-noack-iec usecsscolor></obi-alarm-noack-iec>`\n : html`<obi-warning-noack-iec usecsscolor></obi-warning-noack-iec>`;\n action = {\n type: ObcTableCellType.Regular,\n largeIcon: true,\n icon,\n align: 'center',\n };\n } else {\n action = {\n type: ObcTableCellType.Button,\n text: msg('ACK'),\n };\n }\n }\n\n const status = {\n type: ObcTableCellType.Regular,\n largeIcon: true,\n text: alert.text,\n title: alert.source,\n noWrap: true,\n icon: html`<obc-alert-icon\n .type=${alert.type}\n .acknowledged=${isAcknowledged(alert)}\n .active=${isActive(alert)}\n ></obc-alert-icon>`,\n };\n\n const time = this.showTime\n ? {\n type: ObcTableCellType.Regular,\n text: this.timeFormatter(alert.time),\n align: 'center',\n neutral: true,\n }\n : undefined;\n\n const tagId = this.small\n ? undefined\n : {\n type: ObcTableCellType.Regular,\n text: '#' + alert.id,\n align: 'right',\n };\n return {\n id: alert.id,\n status,\n time,\n action,\n tagId,\n };\n });\n\n return html`\n <div class=\"wrapper ${this.small ? 'small' : ''}\">\n ${data.length > 0\n ? html` <obc-table\n class=\"alert-list\"\n .data=${data}\n .columns=${this.columns}\n .striped=${true}\n .showHeader=${!this.small}\n @row-click=${this.onRowClick}\n @cell-button-click=${this.onCellButtonClick}\n ></obc-table>\n <div class=\"spacer\"></div>`\n : html` <div class=\"empty-list\">\n <div class=\"icon\">${selectedList.emptyIcon}</div>\n <div class=\"empty-title\">${selectedList.emptyTitle}</div>\n </div>`}\n </div>\n `;\n }\n\n static override styles = unsafeCSS(compentStyle);\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'obc-alert-list-details': ObcAlertListDetails;\n }\n}\n"],"names":["AlertListMode"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwCO,IAAK,kCAAAA,mBAAL;AACLA,iBAAA,SAAA,IAAU;AACVA,iBAAA,KAAA,IAAM;AACNA,iBAAA,SAAA,IAAU;AACVA,iBAAA,SAAA,IAAU;AACVA,iBAAA,WAAA,IAAY;AALF,SAAAA;AAAA,GAAA,iBAAA,CAAA,CAAA;AAgBL,SAAS,qBAAqB,cAA6B;AAChE,MAAI,iBAAiB;AACnB,WAAO;AAAA,MACL,MAAM;AAAA,MACN,OAAO,IAAI,KAAK;AAAA,MAChB,YAAY,IAAI,kBAAkB;AAAA,MAClC,WAAW;AAAA,MACX,QAAQ,CAAC,UAAiB,CAAC,UAAU,KAAK,KAAK,SAAS,KAAK;AAAA,IAAA;AAAA,WAExD,iBAAiB;AACxB,WAAO;AAAA,MACL,MAAM;AAAA,MACN,OAAO,I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AAVG,sBAAN,gBAAA;AAAA,EADN,cAAc,wBAAwB;AAAA,GAC1B,mBAAA;"}
1
+ {"version":3,"file":"alert-list-details.js","sources":["../../../src/components/alert-list-details/alert-list-details.ts"],"sourcesContent":["import {LitElement, html, unsafeCSS} from 'lit';\nimport {customElement} from '../../decorator.js';\nimport compentStyle from './alert-list-details.css?inline';\nimport {msg} from '@lit/localize';\nimport {property, query} from 'lit/decorators.js';\nimport '../icon-button/icon-button.js';\nimport '../button/button.js';\nimport '../../icons/icon-silence-iec.js';\nimport '../../icons/icon-alerts.js';\nimport '../../icons/icon-alerts-shelf.js';\nimport '../../icons/icon-alerts-active.js';\nimport '../../icons/icon-alarm-rectified-iec.js';\nimport '../../icons/icon-unacknowledged.js';\nimport '../../icons/icon-alarm-noack-iec.js';\nimport '../../icons/icon-warning-noack-iec.js';\nimport '../alert-icon/alert-icon.js';\nimport {\n Alert,\n comparePriorityAlerts,\n isActive,\n isAcknowledged,\n isBlocked,\n isShelved,\n} from '../../types.js';\nimport {\n excludedFromUnackedFilter,\n requiresAcknowledgement,\n usesAlarmNoAckIcon,\n} from '../../alert-severity.js';\nimport {\n ObcTable,\n ObcTableCellClickEvent,\n ObcTableCellData,\n ObcTableCellType,\n ObcTableRowClickEvent,\n ObcTableRow,\n ObcTableColumn,\n} from '../table/table.js';\nimport '../scrollbar/scrollbar.js';\n\nexport enum AlertListMode {\n UNACKED = 'unacked',\n ALL = 'all',\n SHELVED = 'shelved',\n BLOCKED = 'blocked',\n RECTIFIED = 'rectified',\n}\n\nexport type ObcAckClickEvent = CustomEvent<{\n alert: Alert;\n}>;\n\nexport type ObcRowClickEvent = CustomEvent<{\n alert: Alert;\n}>;\n\nexport function getAlertListModeData(selectedMode: AlertListMode) {\n if (selectedMode === AlertListMode.ALL)\n return {\n name: AlertListMode.ALL,\n title: msg('All'),\n emptyTitle: msg('No active alerts'),\n emptyIcon: html`<obi-alerts></obi-alerts>`,\n filter: (alert: Alert) => !isShelved(alert) && isActive(alert),\n };\n else if (selectedMode === AlertListMode.UNACKED)\n return {\n name: AlertListMode.UNACKED,\n title: msg('Unacked'),\n emptyTitle: msg('No unacknowledged alerts'),\n emptyIcon: html`<obi-unacknowledged></obi-unacknowledged>`,\n filter: (alert: Alert) =>\n !isAcknowledged(alert) &&\n isActive(alert) &&\n !excludedFromUnackedFilter(alert.type) &&\n !isShelved(alert),\n };\n else if (selectedMode === AlertListMode.SHELVED)\n return {\n name: AlertListMode.SHELVED,\n title: msg('Shelved'),\n emptyTitle: msg('No shelved alerts'),\n emptyIcon: html`<obi-alerts-shelf></obi-alerts-shelf>`,\n filter: (alert: Alert) => isShelved(alert),\n };\n else if (selectedMode === AlertListMode.BLOCKED)\n return {\n name: AlertListMode.BLOCKED,\n title: msg('Blocked'),\n emptyTitle: msg('No blocked alerts'),\n emptyIcon: html`<obi-alerts-active></obi-alerts-active>`,\n filter: (alert: Alert) => isBlocked(alert),\n };\n else if (selectedMode === AlertListMode.RECTIFIED)\n return {\n name: AlertListMode.RECTIFIED,\n title: msg('Rectified'),\n emptyTitle: msg('No rectified alerts'),\n emptyIcon: html`<obi-alarm-rectified-iec></obi-alarm-rectified-iec>`,\n filter: (alert: Alert) => !isActive(alert),\n };\n else throw new Error('Invalid selected mode');\n}\n\nexport function canAckFilter(filter: (alert: Alert) => boolean) {\n return (alert: Alert) =>\n !isAcknowledged(alert) &&\n !alert.noAck &&\n !excludedFromUnackedFilter(alert.type) &&\n filter(alert);\n}\n\n/**\n * @availableWhen timeFormatter showTime==true\n * @fires {ObcAckClickEvent} ack-click - Fired when the user clicks the \"ACK\" button.\n * @fires {ObcRowClickEvent} row-click - Fired when the user clicks a row.\n * @stable\n */\n@customElement('obc-alert-list-details')\nexport class ObcAlertListDetails extends LitElement {\n @property({type: String}) selectedMode: AlertListMode = AlertListMode.ALL;\n @property({type: Array}) alerts: Alert[] = [];\n @property({type: Boolean}) showTime: boolean = false;\n @property({attribute: false}) timeFormatter: (time: Date) => string = (\n time: Date\n ) => time.toLocaleTimeString(undefined, {hour12: false});\n @property({type: Boolean}) small: boolean = false;\n\n @query('obc-table')\n private alertList!: ObcTable;\n\n public getVisibleAlerts(): Alert[] {\n const visibleElements = this.alertList\n .getAllVisibleRows()\n .map((id) => this.alerts.find((alert) => alert.id === id))\n .filter((alert): alert is Alert => alert !== undefined);\n return visibleElements;\n }\n\n private onRowClick(e: ObcTableRowClickEvent) {\n const row = this.alerts.find((alert) => alert.id === e.detail.row.id);\n if (row) {\n this.dispatchEvent(\n new CustomEvent('row-click', {detail: {alert: row}}) as ObcRowClickEvent\n );\n }\n }\n\n private onCellButtonClick(e: ObcTableCellClickEvent) {\n const row = this.alerts.find((alert) => alert.id === e.detail.rowId);\n if (row) {\n this.dispatchEvent(\n new CustomEvent('ack-click', {\n detail: {alert: row},\n bubbles: false,\n }) as ObcAckClickEvent\n );\n }\n }\n\n private get columns() {\n if (this.small) {\n const columns: ObcTableColumn<ObcTableCellData, ObcTableRow>[] = [\n {\n label: 'Status',\n key: 'status',\n sortDirection: 'desc',\n sortable: true,\n compareFunction: (_a, _b, aRow, bRow) => {\n const aAlert = this.alerts.find((alert) => alert.id === aRow.id);\n const bAlert = this.alerts.find((alert) => alert.id === bRow.id);\n if (aAlert && bAlert) {\n return comparePriorityAlerts(aAlert, bAlert);\n }\n return 0;\n },\n },\n ];\n if (this.showTime) {\n columns.push({\n label: 'Activated',\n key: 'time',\n });\n }\n columns.push({\n label: 'ACK-status',\n key: 'action',\n });\n return columns;\n } else {\n const columns: ObcTableColumn<ObcTableCellData, ObcTableRow>[] = [\n {\n label: 'Status',\n key: 'status',\n sortDirection: 'desc',\n sortable: true,\n compareFunction: (_a, _b, aRow, bRow) => {\n const aAlert = this.alerts.find((alert) => alert.id === aRow.id);\n const bAlert = this.alerts.find((alert) => alert.id === bRow.id);\n if (aAlert && bAlert) {\n return comparePriorityAlerts(aAlert, bAlert);\n }\n return 0;\n },\n },\n {\n label: 'ACK-status',\n key: 'action',\n dividerRight: true,\n },\n ];\n if (this.showTime) {\n columns.push({\n label: 'Activated',\n key: 'time',\n sortable: true,\n compareFunction: (_a, _b, aRow, bRow) => {\n const aAlert = this.alerts.find((alert) => alert.id === aRow.id);\n const bAlert = this.alerts.find((alert) => alert.id === bRow.id);\n if (aAlert && bAlert) {\n const aTime = new Date(aAlert.time);\n const bTime = new Date(bAlert.time);\n return aTime.getTime() - bTime.getTime();\n }\n return 0;\n },\n });\n }\n columns.push({\n label: 'Tag ID',\n key: 'tagId',\n sortable: true,\n compareFunction: (a, b) => {\n const aText =\n a?.type === ObcTableCellType.Regular ? String(a.text ?? '') : '';\n const bText =\n b?.type === ObcTableCellType.Regular ? String(b.text ?? '') : '';\n return aText.localeCompare(bText);\n },\n });\n return columns;\n }\n }\n\n private get metadata() {\n return getAlertListModeData(this.selectedMode);\n }\n\n private get filteredAlerts() {\n return this.alerts.filter(this.metadata.filter);\n }\n\n override render() {\n const selectedList = this.metadata;\n\n const data = this.filteredAlerts.map((alert) => {\n let action: ObcTableCellData = {\n type: ObcTableCellType.Regular,\n };\n if (\n !isAcknowledged(alert) &&\n isActive(alert) &&\n requiresAcknowledgement(alert.type)\n ) {\n if (alert.noAck) {\n const icon = usesAlarmNoAckIcon(alert.type)\n ? html`<obi-alarm-noack-iec usecsscolor></obi-alarm-noack-iec>`\n : html`<obi-warning-noack-iec usecsscolor></obi-warning-noack-iec>`;\n action = {\n type: ObcTableCellType.Regular,\n largeIcon: true,\n icon,\n align: 'center',\n };\n } else {\n action = {\n type: ObcTableCellType.Button,\n text: msg('ACK'),\n };\n }\n }\n\n const status = {\n type: ObcTableCellType.Regular,\n largeIcon: true,\n text: alert.text,\n title: alert.source,\n noWrap: true,\n icon: html`<obc-alert-icon\n .type=${alert.type}\n .acknowledged=${isAcknowledged(alert)}\n .active=${isActive(alert)}\n ></obc-alert-icon>`,\n };\n\n const time = this.showTime\n ? {\n type: ObcTableCellType.Regular,\n text: this.timeFormatter(alert.time),\n align: 'center',\n neutral: true,\n }\n : undefined;\n\n const tagId = this.small\n ? undefined\n : {\n type: ObcTableCellType.Regular,\n text: '#' + alert.id,\n align: 'right',\n };\n return {\n id: alert.id,\n status,\n time,\n action,\n tagId,\n };\n });\n\n return html`\n <div class=\"wrapper ${this.small ? 'small' : ''}\">\n ${data.length > 0\n ? html` <obc-table\n class=\"alert-list\"\n .data=${data}\n .columns=${this.columns}\n .striped=${true}\n .showHeader=${!this.small}\n @row-click=${this.onRowClick}\n @cell-button-click=${this.onCellButtonClick}\n ></obc-table>\n <div class=\"spacer\"></div>`\n : html` <div class=\"empty-list\">\n <div class=\"icon\">${selectedList.emptyIcon}</div>\n <div class=\"empty-title\">${selectedList.emptyTitle}</div>\n </div>`}\n </div>\n `;\n }\n\n static override styles = unsafeCSS(compentStyle);\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'obc-alert-list-details': ObcAlertListDetails;\n }\n}\n"],"names":["AlertListMode"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwCO,IAAK,kCAAAA,mBAAL;AACLA,iBAAA,SAAA,IAAU;AACVA,iBAAA,KAAA,IAAM;AACNA,iBAAA,SAAA,IAAU;AACVA,iBAAA,SAAA,IAAU;AACVA,iBAAA,WAAA,IAAY;AALF,SAAAA;AAAA,GAAA,iBAAA,CAAA,CAAA;AAgBL,SAAS,qBAAqB,cAA6B;AAChE,MAAI,iBAAiB;AACnB,WAAO;AAAA,MACL,MAAM;AAAA,MACN,OAAO,IAAI,KAAK;AAAA,MAChB,YAAY,IAAI,kBAAkB;AAAA,MAClC,WAAW;AAAA,MACX,QAAQ,CAAC,UAAiB,CAAC,UAAU,KAAK,KAAK,SAAS,KAAK;AAAA,IAAA;AAAA,WAExD,iBAAiB;AACxB,WAAO;AAAA,MACL,MAAM;AAAA,MACN,OAAO,IAAI,SAAS;AAAA,MACpB,YAAY,IAAI,0BAA0B;AAAA,MAC1C,WAAW;AAAA,MACX,QAAQ,CAAC,UACP,CAAC,eAAe,KAAK,KACrB,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on;
209
209
  }
210
210
 
211
+ .wrapper.integration {
212
+ border-color: var(--integration-flat-enabled-border-color);
213
+ background-color: var(--integration-flat-enabled-background-color);
214
+ border-width: 1px;
215
+ border-style: solid;
216
+ cursor: pointer;
217
+ --base-border-color: var(--integration-flat-enabled-border-color);
218
+ --base-background-color: var(--integration-flat-enabled-background-color);
219
+ }
220
+
221
+ .wrapper.integration:focus {
222
+ outline: none;
223
+ }
224
+
225
+ .wrapper.integration.activated {
226
+ border-color: var(--integration-flat-activated-border-color);
227
+ background-color: var(--integration-flat-activated-background-color);
228
+ --base-border-color: var(--integration-flat-activated-border-color);
229
+ --base-background-color: var(--integration-flat-activated-background-color);
230
+ }
231
+
232
+ @media (hover:hover) {
233
+
234
+ .wrapper.integration:hover {
235
+ border-color: color-mix(in srgb, var(--integration-flat-hover-border-color) calc(var(--obc-can-hover) * 100%), var(--base-border-color));
236
+ background-color: color-mix(in srgb, var(--integration-flat-hover-background-color) calc(var(--obc-can-hover) * 100%), var(--base-background-color));
237
+ }
238
+ }
239
+
240
+ .wrapper.integration:active {
241
+ border-color: var(--integration-flat-pressed-border-color);
242
+ background-color: var(--integration-flat-pressed-background-color);
243
+ }
244
+
245
+ .wrapper.integration:focus-visible {
246
+ outline-color: var(--border-focus-color);
247
+ outline-width: var(--global-size-spacing-border-weight-focusframe);
248
+ outline-style: solid;
249
+ border-color: var(--container-global-color);
250
+ z-index: 1;
251
+ }
252
+
253
+ .wrapper.integration:disabled {
254
+ border-color: var(--integration-flat-disabled-border-color);
255
+ background-color: var(--integration-flat-disabled-background-color);
256
+ cursor: not-allowed;
257
+ color: var(--integration-on-flat-disabled-color) !important;
258
+ }
259
+
260
+ .wrapper.integration.disabled {
261
+ border-color: var(--integration-flat-disabled-border-color);
262
+ background-color: var(--integration-flat-disabled-background-color);
263
+ cursor: not-allowed;
264
+ color: var(--integration-on-flat-disabled-color) !important;
265
+ }
266
+
211
267
  :is(.wrapper.integration .icon-wrapper) {
212
268
  border-color: var(--integration-normal-enabled-border-color);
213
269
  background-color: var(--integration-normal-enabled-background-color);
@@ -1 +1 @@
1
- {"version":3,"file":"app-button.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"app-button.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -30,10 +30,21 @@ const compentStyle = css`* {
30
30
  }
31
31
 
32
32
  .wrapper .center {
33
- display: flex;
33
+ display: grid;
34
+ grid-auto-flow: column;
35
+ grid-auto-columns: minmax(
36
+ var(--obc-integration-app-bar-app-width, max-content),
37
+ 1fr
38
+ );
34
39
  gap: var(--app-components-app-menu-app-button-spacing);
35
40
  justify-content: center;
36
41
  }
42
+
43
+ /* Svelte wrappers add a slot container that must not become a grid item. */
44
+
45
+ slot[name="apps"]::slotted(:not(obc-app-button)) {
46
+ display: contents;
47
+ }
37
48
  `;
38
49
  export {
39
50
  compentStyle as default
@@ -1 +1 @@
1
- {"version":3,"file":"integration-app-bar.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"integration-app-bar.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,11 +1,11 @@
1
1
  import { LitElement } from 'lit';
2
2
  /**
3
- * @slot apps - Application buttons; slotted elements are normalized to a uniform width
3
+ * @slot apps - Application buttons; every button is laid out at the width of the widest one
4
+ * @cssprop [--obc-integration-app-bar-app-width=max-content] - Minimum width of each app-button grid track. Tracks may grow equally to fit wider content.
4
5
  * @experimental
5
6
  */
6
7
  export declare class ObcIntegrationAppBar extends LitElement {
7
8
  render(): import('lit-html').TemplateResult<1>;
8
- private handleAppsSlotChange;
9
9
  static styles: import('lit').CSSResult;
10
10
  }
11
11
  declare global {
@@ -1 +1 @@
1
- {"version":3,"file":"integration-app-bar.d.ts","sourceRoot":"","sources":["../../../src/integration-systems/integration-app-bar/integration-app-bar.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAkB,MAAM,KAAK,CAAC;AAIhD;;;GAGG;AACH,qBACa,oBAAqB,SAAQ,UAAU;IACzC,MAAM;IAYf,OAAO,CAAC,oBAAoB;IAyB5B,OAAgB,MAAM,0BAA2B;CAClD;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,yBAAyB,EAAE,oBAAoB,CAAC;KACjD;CACF"}
1
+ {"version":3,"file":"integration-app-bar.d.ts","sourceRoot":"","sources":["../../../src/integration-systems/integration-app-bar/integration-app-bar.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAkB,MAAM,KAAK,CAAC;AAIhD;;;;GAIG;AACH,qBACa,oBAAqB,SAAQ,UAAU;IACzC,MAAM;IAYf,OAAgB,MAAM,0BAA2B;CAClD;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,yBAAyB,EAAE,oBAAoB,CAAC;KACjD;CACF"}
@@ -15,32 +15,12 @@ let ObcIntegrationAppBar = class extends LitElement {
15
15
  <div class="wrapper">
16
16
  <div class="left-side"></div>
17
17
  <div class="center">
18
- <slot name="apps" @slotchange=${this.handleAppsSlotChange}></slot>
18
+ <slot name="apps"></slot>
19
19
  </div>
20
20
  <div class="right-side"></div>
21
21
  </div>
22
22
  `;
23
23
  }
24
- handleAppsSlotChange(event) {
25
- const slot = event.target;
26
- const buttons = slot.assignedElements();
27
- if (buttons.length === 0) {
28
- return;
29
- }
30
- for (const btn of buttons) {
31
- btn.style.width = "";
32
- }
33
- requestAnimationFrame(() => {
34
- const maxWidth = Math.max(
35
- ...buttons.map((btn) => btn.getBoundingClientRect().width)
36
- );
37
- if (maxWidth > 0) {
38
- for (const btn of buttons) {
39
- btn.style.width = `${maxWidth}px`;
40
- }
41
- }
42
- });
43
- }
44
24
  };
45
25
  ObcIntegrationAppBar.styles = unsafeCSS(compentStyle);
46
26
  ObcIntegrationAppBar = __decorateClass([
@@ -1 +1 @@
1
- {"version":3,"file":"integration-app-bar.js","sources":["../../../src/integration-systems/integration-app-bar/integration-app-bar.ts"],"sourcesContent":["import {LitElement, html, unsafeCSS} from 'lit';\nimport {customElement} from '../../decorator.js';\nimport compentStyle from './integration-app-bar.css?inline';\n\n/**\n * @slot apps - Application buttons; slotted elements are normalized to a uniform width\n * @experimental\n */\n@customElement('obc-integration-app-bar')\nexport class ObcIntegrationAppBar extends LitElement {\n override render() {\n return html`\n <div class=\"wrapper\">\n <div class=\"left-side\"></div>\n <div class=\"center\">\n <slot name=\"apps\" @slotchange=${this.handleAppsSlotChange}></slot>\n </div>\n <div class=\"right-side\"></div>\n </div>\n `;\n }\n\n private handleAppsSlotChange(event: Event) {\n const slot = event.target as HTMLSlotElement;\n const buttons = slot.assignedElements() as HTMLElement[];\n\n if (buttons.length === 0) {\n return;\n }\n\n for (const btn of buttons) {\n btn.style.width = '';\n }\n\n requestAnimationFrame(() => {\n const maxWidth = Math.max(\n ...buttons.map((btn) => btn.getBoundingClientRect().width)\n );\n\n if (maxWidth > 0) {\n for (const btn of buttons) {\n btn.style.width = `${maxWidth}px`;\n }\n }\n });\n }\n\n static override styles = unsafeCSS(compentStyle);\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'obc-integration-app-bar': ObcIntegrationAppBar;\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;AASO,IAAM,uBAAN,cAAmC,WAAW;AAAA,EAC1C,SAAS;AAChB,WAAO;AAAA;AAAA;AAAA;AAAA,0CAI+B,KAAK,oBAAoB;AAAA;AAAA;AAAA;AAAA;AAAA,EAKjE;AAAA,EAEQ,qBAAqB,OAAc;AACzC,UAAM,OAAO,MAAM;AACnB,UAAM,UAAU,KAAK,iBAAA;AAErB,QAAI,QAAQ,WAAW,GAAG;AACxB;AAAA,IACF;AAEA,eAAW,OAAO,SAAS;AACzB,UAAI,MAAM,QAAQ;AAAA,IACpB;AAEA,0BAAsB,MAAM;AAC1B,YAAM,WAAW,KAAK;AAAA,QACpB,GAAG,QAAQ,IAAI,CAAC,QAAQ,IAAI,sBAAA,EAAwB,KAAK;AAAA,MAAA;AAG3D,UAAI,WAAW,GAAG;AAChB,mBAAW,OAAO,SAAS;AACzB,cAAI,MAAM,QAAQ,GAAG,QAAQ;AAAA,QAC/B;AAAA,MACF;AAAA,IACF,CAAC;AAAA,EACH;AAGF;AAvCa,qBAsCK,SAAS,UAAU,YAAY;AAtCpC,uBAAN,gBAAA;AAAA,EADN,cAAc,yBAAyB;AAAA,GAC3B,oBAAA;"}
1
+ {"version":3,"file":"integration-app-bar.js","sources":["../../../src/integration-systems/integration-app-bar/integration-app-bar.ts"],"sourcesContent":["import {LitElement, html, unsafeCSS} from 'lit';\nimport {customElement} from '../../decorator.js';\nimport compentStyle from './integration-app-bar.css?inline';\n\n/**\n * @slot apps - Application buttons; every button is laid out at the width of the widest one\n * @cssprop [--obc-integration-app-bar-app-width=max-content] - Minimum width of each app-button grid track. Tracks may grow equally to fit wider content.\n * @experimental\n */\n@customElement('obc-integration-app-bar')\nexport class ObcIntegrationAppBar extends LitElement {\n override render() {\n return html`\n <div class=\"wrapper\">\n <div class=\"left-side\"></div>\n <div class=\"center\">\n <slot name=\"apps\"></slot>\n </div>\n <div class=\"right-side\"></div>\n </div>\n `;\n }\n\n static override styles = unsafeCSS(compentStyle);\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'obc-integration-app-bar': ObcIntegrationAppBar;\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;AAUO,IAAM,uBAAN,cAAmC,WAAW;AAAA,EAC1C,SAAS;AAChB,WAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAST;AAGF;AAda,qBAaK,SAAS,UAAU,YAAY;AAbpC,uBAAN,gBAAA;AAAA,EADN,cAAc,yBAAyB;AAAA,GAC3B,oBAAA;"}
@@ -171,7 +171,8 @@ export interface ReadoutSourceOptions extends ReadoutSrcOptions {
171
171
  * @property size - Density tier. Applies to the vertical direction only — the horizontal
172
172
  * arrangement exists in the large tier alone (Figma 6.1: it relies on the
173
173
  * label+unit stack aligning with the L-size value caps), so `size` is
174
- * ignored when `direction` is `horizontal`.
174
+ * ignored when `direction` is `horizontal`; a horizontal readout given any
175
+ * other `size` logs a console warning once per element.
175
176
  * @availableWhen size direction==vertical
176
177
  * @availableWhen stacking direction==vertical
177
178
  * @availableWhen alignment direction==vertical && stacking==stacked
@@ -257,7 +258,7 @@ export declare class ObcReadout extends LitElement {
257
258
  /** Available when `hasAdvice==true`. */
258
259
  advice?: number;
259
260
  /**
260
- * Density tier. Applies to the vertical direction only — the horizontal arrangement exists in the large tier alone (Figma 6.1: it relies on the label+unit stack aligning with the L-size value caps), so `size` is ignored when `direction` is `horizontal`.
261
+ * Density tier. Applies to the vertical direction only — the horizontal arrangement exists in the large tier alone (Figma 6.1: it relies on the label+unit stack aligning with the L-size value caps), so `size` is ignored when `direction` is `horizontal`; a horizontal readout given any other `size` logs a console warning once per element.
261
262
  *
262
263
  * Available when `direction==vertical`.
263
264
  */
@@ -306,6 +307,7 @@ export declare class ObcReadout extends LitElement {
306
307
  private deferredSetpointHidePhase;
307
308
  private deferredSetpointHideTimer?;
308
309
  private hasCompletedFirstUpdate;
310
+ private hasWarnedHorizontalSize;
309
311
  private sourcePickerContentVisible;
310
312
  private sourcePickerOptions;
311
313
  private sourcePickerSlot?;
@@ -488,6 +490,13 @@ export declare class ObcReadout extends LitElement {
488
490
  */
489
491
  private renderHorizontalLayout;
490
492
  protected willUpdate(changed: Map<string, unknown>): void;
493
+ /**
494
+ * A horizontal readout discards any `size` but `large` (see `resolvedSize`).
495
+ * A silent discard is indistinguishable from a bug to a consumer, so each
496
+ * offending element says so once and logs itself for locating (#1182).
497
+ * A removed `size` attribute arrives as `null` and counts as unset.
498
+ */
499
+ private warnHorizontalSizeIgnored;
491
500
  updated(changed: Map<string, unknown>): void;
492
501
  private clearDeferredSetpointHide;
493
502
  disconnectedCallback(): void;
@@ -1 +1 @@
1
- {"version":3,"file":"readout.d.ts","sourceRoot":"","sources":["../../../src/navigation-instruments/readout/readout.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAgD,MAAM,KAAK,CAAC;AAK9E,OAAO,qCAAqC,CAAC;AAK7C,OAAO,sDAAsD,CAAC;AAC9D,OAAO,EAEL,gBAAgB,EAChB,uBAAuB,EAGxB,MAAM,sDAAsD,CAAC;AAC9D,OAAO,EACL,kCAAkC,EAGlC,KAAK,mBAAmB,EACxB,KAAK,sBAAs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,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI;IAclE;;;;;OAKG;IACH,OAAO,CAAC,yBAAyB;IAkBxB,OAAO,CAAC,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI;IAoDrD,OAAO,CAAC,yBAAyB;IAQxB,oBAAoB,IAAI,IAAI;IAa5B,MAAM;IAkCf,OAAgB,MAAM,0BAA6B;CACpD;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,aAAa,EAAE,UAAU,CAAC;KAC3B;CACF"}
@@ -71,6 +71,7 @@ let ObcReadout = class extends LitElement {
71
71
  this.showDebugOverlay = false;
72
72
  this.deferredSetpointHidePhase = ReadoutBlockHidePhase.none;
73
73
  this.hasCompletedFirstUpdate = false;
74
+ this.hasWarnedHorizontalSize = false;
74
75
  this.sourcePickerContentVisible = false;
75
76
  this.sourcePickerOptions = [];
76
77
  this.onWindowPointerDown = (event) => {
@@ -820,6 +821,23 @@ let ObcReadout = class extends LitElement {
820
821
  super.willUpdate(changed);
821
822
  assertReadoutValueType("obc-readout", this.value, this.valueType);
822
823
  assertReadoutFractionDigits("obc-readout", this.fractionDigits);
824
+ this.warnHorizontalSizeIgnored();
825
+ }
826
+ /**
827
+ * A horizontal readout discards any `size` but `large` (see `resolvedSize`).
828
+ * A silent discard is indistinguishable from a bug to a consumer, so each
829
+ * offending element says so once and logs itself for locating (#1182).
830
+ * A removed `size` attribute arrives as `null` and counts as unset.
831
+ */
832
+ warnHorizontalSizeIgnored() {
833
+ if (this.hasWarnedHorizontalSize || !this.isHorizontal || !this.size || this.size === ReadoutSize.large) {
834
+ return;
835
+ }
836
+ this.hasWarnedHorizontalSize = true;
837
+ console.warn(
838
+ `[obc-readout] size="${this.size}" is ignored when direction="horizontal": the horizontal arrangement exists in the large tier only. Remove the size, or use direction="vertical" for the small / medium tiers.`,
839
+ this
840
+ );
823
841
  }
824
842
  updated(changed) {
825
843
  super.updated(changed);