@oicl/openbridge-webcomponents 2.0.0 → 2.1.0-next.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (97) hide show
  1. package/README.md +1 -0
  2. package/bundle/openbridge-webcomponents.bundle.js +416 -261
  3. package/bundle/openbridge-webcomponents.bundle.js.map +1 -1
  4. package/custom-elements.json +1443 -446
  5. package/dist/automation/automation-button/abstract-automation-button-storybook-helpers.d.ts +135 -136
  6. package/dist/automation/automation-button/abstract-automation-button-storybook-helpers.d.ts.map +1 -1
  7. package/dist/automation/automation-button/abstract-automation-button-storybook-helpers.js +2 -18
  8. package/dist/automation/automation-button/abstract-automation-button-storybook-helpers.js.map +1 -1
  9. package/dist/automation/automation-button/abstract-automation-button.d.ts +4 -4
  10. package/dist/automation/automation-button/abstract-automation-button.js +2 -2
  11. package/dist/automation/automation-button/abstract-automation-button.js.map +1 -1
  12. package/dist/automation/automation-button/automation-button.d.ts +4 -4
  13. package/dist/automation/automation-button/automation-button.js.map +1 -1
  14. package/dist/automation/automation-tank/automation-tank.d.ts +47 -3
  15. package/dist/automation/automation-tank/automation-tank.d.ts.map +1 -1
  16. package/dist/automation/automation-tank/automation-tank.js +4 -1
  17. package/dist/automation/automation-tank/automation-tank.js.map +1 -1
  18. package/dist/automation/heat-exchanger/heat-exchanger.d.ts +1 -1
  19. package/dist/automation/heat-exchanger/heat-exchanger.js.map +1 -1
  20. package/dist/automation/heat-pump/heat-pump.d.ts +1 -1
  21. package/dist/automation/heat-pump/heat-pump.js.map +1 -1
  22. package/dist/automation/hydraulic-separator/hydraulic-separator.d.ts +1 -1
  23. package/dist/automation/hydraulic-separator/hydraulic-separator.js.map +1 -1
  24. package/dist/automation/specialty-tank/abstract-specialty-tank.d.ts +14 -5
  25. package/dist/automation/specialty-tank/abstract-specialty-tank.d.ts.map +1 -1
  26. package/dist/automation/specialty-tank/abstract-specialty-tank.js +9 -3
  27. package/dist/automation/specialty-tank/abstract-specialty-tank.js.map +1 -1
  28. package/dist/automation/specialty-tank/specialty-tank-story-meta.d.ts.map +1 -1
  29. package/dist/automation/specialty-tank/specialty-tank-story-meta.js +5 -13
  30. package/dist/automation/specialty-tank/specialty-tank-story-meta.js.map +1 -1
  31. package/dist/automation/transmitter/transmitter.d.ts +77 -8
  32. package/dist/automation/transmitter/transmitter.d.ts.map +1 -1
  33. package/dist/automation/transmitter/transmitter.js +37 -10
  34. package/dist/automation/transmitter/transmitter.js.map +1 -1
  35. package/dist/building-blocks/alert-list/alert-list-base.d.ts +60 -0
  36. package/dist/building-blocks/alert-list/alert-list-base.d.ts.map +1 -0
  37. package/dist/building-blocks/alert-list/alert-list-base.js +191 -0
  38. package/dist/building-blocks/alert-list/alert-list-base.js.map +1 -0
  39. package/dist/building-blocks/alert-list/alert-list.css.js.map +1 -1
  40. package/dist/building-blocks/alert-list/alert-list.d.ts +13 -26
  41. package/dist/building-blocks/alert-list/alert-list.d.ts.map +1 -1
  42. package/dist/building-blocks/alert-list/alert-list.js +7 -142
  43. package/dist/building-blocks/alert-list/alert-list.js.map +1 -1
  44. package/dist/components/accordion-card/accordion-card.d.ts +31 -6
  45. package/dist/components/accordion-card/accordion-card.d.ts.map +1 -1
  46. package/dist/components/accordion-card/accordion-card.js +13 -1
  47. package/dist/components/accordion-card/accordion-card.js.map +1 -1
  48. package/dist/components/alert-frame/alert-frame-storybook-helpers.d.ts +33 -0
  49. package/dist/components/alert-frame/alert-frame-storybook-helpers.d.ts.map +1 -0
  50. package/dist/components/alert-frame/alert-frame-storybook-helpers.js +30 -0
  51. package/dist/components/alert-frame/alert-frame-storybook-helpers.js.map +1 -0
  52. package/dist/components/alert-icon/alert-icon.d.ts.map +1 -1
  53. package/dist/components/alert-icon/alert-icon.js +6 -5
  54. package/dist/components/alert-icon/alert-icon.js.map +1 -1
  55. package/dist/components/alert-list-details/alert-list-details.css.js +4 -1
  56. package/dist/components/alert-list-details/alert-list-details.css.js.map +1 -1
  57. package/dist/components/alert-menu/alert-menu.css.js +3 -42
  58. package/dist/components/alert-menu/alert-menu.css.js.map +1 -1
  59. package/dist/components/alert-menu/alert-menu.d.ts +28 -6
  60. package/dist/components/alert-menu/alert-menu.d.ts.map +1 -1
  61. package/dist/components/alert-menu/alert-menu.js +81 -60
  62. package/dist/components/alert-menu/alert-menu.js.map +1 -1
  63. package/dist/components/alert-menu-item/alert-menu-item.d.ts +16 -6
  64. package/dist/components/alert-menu-item/alert-menu-item.d.ts.map +1 -1
  65. package/dist/components/alert-menu-item/alert-menu-item.js +11 -2
  66. package/dist/components/alert-menu-item/alert-menu-item.js.map +1 -1
  67. package/dist/components/number-input-field/number-input-field.css.js +8 -2
  68. package/dist/components/number-input-field/number-input-field.css.js.map +1 -1
  69. package/dist/components/number-input-field/number-input-field.d.ts +15 -1
  70. package/dist/components/number-input-field/number-input-field.d.ts.map +1 -1
  71. package/dist/components/number-input-field/number-input-field.js +38 -44
  72. package/dist/components/number-input-field/number-input-field.js.map +1 -1
  73. package/dist/components/textbox/textbox.css.js +3 -9
  74. package/dist/components/textbox/textbox.css.js.map +1 -1
  75. package/dist/components/textbox/textbox.d.ts +3 -0
  76. package/dist/components/textbox/textbox.d.ts.map +1 -1
  77. package/dist/components/textbox/textbox.js.map +1 -1
  78. package/dist/generated/locales/es-419.d.ts +1 -1
  79. package/dist/generated/locales/es-419.js +1 -1
  80. package/dist/generated/locales/es-419.js.map +1 -1
  81. package/dist/navigation-instruments/readout/readout.d.ts.map +1 -1
  82. package/dist/navigation-instruments/readout/readout.js.map +1 -1
  83. package/dist/navigation-instruments/readout-list-item/readout-list-item.css.js +2 -1
  84. package/dist/navigation-instruments/readout-list-item/readout-list-item.css.js.map +1 -1
  85. package/dist/navigation-instruments/readout-list-item/readout-list-item.d.ts.map +1 -1
  86. package/dist/navigation-instruments/readout-list-item/readout-list-item.js.map +1 -1
  87. package/dist/pages/alert-detail-page/alert-detail-page.js +1 -1
  88. package/dist/pages/alert-detail-page/alert-detail-page.js.map +1 -1
  89. package/dist/pages/alert-list-page-small/alert-list-page-small-base.d.ts +63 -0
  90. package/dist/pages/alert-list-page-small/alert-list-page-small-base.d.ts.map +1 -0
  91. package/dist/pages/alert-list-page-small/alert-list-page-small-base.js +126 -0
  92. package/dist/pages/alert-list-page-small/alert-list-page-small-base.js.map +1 -0
  93. package/dist/pages/alert-list-page-small/alert-list-page-small.d.ts +12 -15
  94. package/dist/pages/alert-list-page-small/alert-list-page-small.d.ts.map +1 -1
  95. package/dist/pages/alert-list-page-small/alert-list-page-small.js +41 -92
  96. package/dist/pages/alert-list-page-small/alert-list-page-small.js.map +1 -1
  97. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"hydraulic-separator.js","names":[],"sources":["../../../src/automation/hydraulic-separator/hydraulic-separator.ts"],"sourcesContent":["import {html, unsafeCSS} from 'lit';\nimport type {CSSResultGroup, TemplateResult} from 'lit';\nimport '../../icons/icon-hydraulic-separator.js';\nimport {\n ObcAbstractSpecialtyTank,\n SpecialtyTankFrame,\n SpecialtyTankSplitMode,\n} from '../specialty-tank/abstract-specialty-tank.js';\nimport hostStyle from './hydraulic-separator.css?inline';\nimport {customElement} from '../../decorator.js';\n\n/**\n * `<obc-hydraulic-separator>` – HVAC tile for a hydraulic separator.\n *\n * A 56×142 pressurized-tank silhouette whose graphic area splits\n * horizontally — hot on top, cold below — around a centered\n * hydraulic-separator icon, with an optional badge row above the frame and a\n * tag readout below it.\n *\n * ## Features / Variants\n * - `medium` selects the graphic area: one grey area (`regular`), two grey\n * halves (`graphic`) or hot/cold halves (`medium`).\n * - `static` renders a flat, display-only tile with a bare icon.\n * - Enum-driven badges (`badgeControl`, `badgeAlert`, `badgeInterlock`,\n * `badgeCommandLocked`) or the `badges` slot fill the badge row; it\n * collapses when empty, as does the tag cell.\n * - Alert-frame overlay with the same six properties and three slots as\n * `obc-automation-tank`.\n * - `positioning`, `clickable` and `activated` behave as on\n * `obc-automation-tank`.\n *\n * ## Usage Guidelines\n * Use for hydraulic separators in automation system views. For heat pumps\n * use `obc-heat-pump` and for heat exchangers `obc-heat-exchanger`; the\n * three tiles differ only in footprint, icon and split geometry.\n *\n * @ignition-base-width: 56px\n * @ignition-base-height: 142px\n * @ignition-center-horizontal\n *\n * @slot badges - Custom badges, overriding the enum-driven defaults.\n * @slot tag - Text or element replacing the `tag` property readout.\n * @slot alert-icon - Custom icon for the alert frame.\n * @slot alert-label - Label for the alert frame.\n * @slot alert-timer - Timer for the alert frame.\n * @fires click - Fired when the tile is clicked. When `clickable` is `false` the tile renders a plain `<div>`, and in `static` mode a `<div role=\"img\">`, instead of a `<button>` — in both cases it is not focusable or keyboard-activatable; pointer clicks still reach the host.\n * @beta\n */\n@customElement('obc-hydraulic-separator')\nexport class ObcHydraulicSeparator extends ObcAbstractSpecialtyTank {\n protected override get equipmentIcon(): TemplateResult {\n return html`<obi-hydraulic-separator\n usecsscolor\n ></obi-hydraulic-separator>`;\n }\n\n protected override get equipmentName(): string {\n return 'Hydraulic separator';\n }\n\n protected override get frame(): SpecialtyTankFrame {\n return SpecialtyTankFrame.pressurized;\n }\n\n protected override get splitMode(): SpecialtyTankSplitMode {\n return SpecialtyTankSplitMode.horizontal;\n }\n\n static override styles: CSSResultGroup = [\n ObcAbstractSpecialtyTank.styles,\n unsafeCSS(hostStyle),\n ];\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'obc-hydraulic-separator': ObcHydraulicSeparator;\n }\n}\n"],"mappings":";;;;;;;AAiDO,IAAM,wBAAN,MAAM,8BAA8B,yBAAyB;CAClE,IAAuB,gBAAgC;EACrD,OAAO,IAAI;;;CAGb;CAEA,IAAuB,gBAAwB;EAC7C,OAAO;CACT;CAEA,IAAuB,QAA4B;EACjD,OAAO,mBAAmB;CAC5B;CAEA,IAAuB,YAAoC;EACzD,OAAO,uBAAuB;CAChC;;EAEyC,KAAA,SAAA,CACvC,yBAAyB,QACzB,UAAU,2BAAS,CACrB;;AACF;AAxBC,wBAAA,WAAA,CAAA,cAAc,yBAAyB,CAAA,GAAA,qBAAA"}
1
+ {"version":3,"file":"hydraulic-separator.js","names":[],"sources":["../../../src/automation/hydraulic-separator/hydraulic-separator.ts"],"sourcesContent":["import {html, unsafeCSS} from 'lit';\nimport type {CSSResultGroup, TemplateResult} from 'lit';\nimport '../../icons/icon-hydraulic-separator.js';\nimport {\n ObcAbstractSpecialtyTank,\n SpecialtyTankFrame,\n SpecialtyTankSplitMode,\n} from '../specialty-tank/abstract-specialty-tank.js';\nimport hostStyle from './hydraulic-separator.css?inline';\nimport {customElement} from '../../decorator.js';\n\n/**\n * `<obc-hydraulic-separator>` – HVAC tile for a hydraulic separator.\n *\n * A 56×142 pressurized-tank silhouette whose graphic area splits\n * horizontally — hot on top, cold below — around a centered\n * hydraulic-separator icon, with an optional badge row above the frame and a\n * tag readout below it.\n *\n * ## Features / Variants\n * - `medium` selects the graphic area: one grey area (`regular`), two grey\n * halves (`graphic`) or hot/cold halves (`medium`).\n * - `static` renders a flat, display-only tile with a bare icon.\n * - Enum-driven badges (`badgeControl`, `badgeAlert`, `badgeInterlock`,\n * `badgeCommandLocked`) or the `badges` slot fill the badge row; it\n * collapses when empty, as does the tag cell.\n * - Alert-frame overlay with the same seven properties and three slots as\n * `obc-automation-tank`.\n * - `positioning`, `clickable` and `activated` behave as on\n * `obc-automation-tank`.\n *\n * ## Usage Guidelines\n * Use for hydraulic separators in automation system views. For heat pumps\n * use `obc-heat-pump` and for heat exchangers `obc-heat-exchanger`; the\n * three tiles differ only in footprint, icon and split geometry.\n *\n * @ignition-base-width: 56px\n * @ignition-base-height: 142px\n * @ignition-center-horizontal\n *\n * @slot badges - Custom badges, overriding the enum-driven defaults.\n * @slot tag - Text or element replacing the `tag` property readout.\n * @slot alert-icon - Custom icon for the alert frame.\n * @slot alert-label - Label for the alert frame.\n * @slot alert-timer - Timer for the alert frame.\n * @fires click - Fired when the tile is clicked. When `clickable` is `false` the tile renders a plain `<div>`, and in `static` mode a `<div role=\"img\">`, instead of a `<button>` — in both cases it is not focusable or keyboard-activatable; pointer clicks still reach the host.\n * @beta\n */\n@customElement('obc-hydraulic-separator')\nexport class ObcHydraulicSeparator extends ObcAbstractSpecialtyTank {\n protected override get equipmentIcon(): TemplateResult {\n return html`<obi-hydraulic-separator\n usecsscolor\n ></obi-hydraulic-separator>`;\n }\n\n protected override get equipmentName(): string {\n return 'Hydraulic separator';\n }\n\n protected override get frame(): SpecialtyTankFrame {\n return SpecialtyTankFrame.pressurized;\n }\n\n protected override get splitMode(): SpecialtyTankSplitMode {\n return SpecialtyTankSplitMode.horizontal;\n }\n\n static override styles: CSSResultGroup = [\n ObcAbstractSpecialtyTank.styles,\n unsafeCSS(hostStyle),\n ];\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'obc-hydraulic-separator': ObcHydraulicSeparator;\n }\n}\n"],"mappings":";;;;;;;AAiDO,IAAM,wBAAN,MAAM,8BAA8B,yBAAyB;CAClE,IAAuB,gBAAgC;EACrD,OAAO,IAAI;;;CAGb;CAEA,IAAuB,gBAAwB;EAC7C,OAAO;CACT;CAEA,IAAuB,QAA4B;EACjD,OAAO,mBAAmB;CAC5B;CAEA,IAAuB,YAAoC;EACzD,OAAO,uBAAuB;CAChC;;EAEyC,KAAA,SAAA,CACvC,yBAAyB,QACzB,UAAU,2BAAS,CACrB;;AACF;AAxBC,wBAAA,WAAA,CAAA,cAAc,yBAAyB,CAAA,GAAA,qBAAA"}
@@ -1,6 +1,6 @@
1
1
  import { LitElement, CSSResultGroup, TemplateResult } from 'lit';
2
2
  import { AutomationButtonBadgeAlert, AutomationButtonBadgeCommandLocked, AutomationButtonBadgeControl, AutomationButtonBadgeInterlock } from '../automation-button/abstract-automation-button.js';
3
- import { ObcAlertFrameThickness, ObcAlertFrameType } from '../../components/alert-frame/alert-frame.js';
3
+ import { ObcAlertFrameMode, ObcAlertFrameThickness, ObcAlertFrameType } from '../../components/alert-frame/alert-frame.js';
4
4
  import { AlertType } from '../../types.js';
5
5
  import { TankPositioning } from '../automation-tank/tank-positioning.js';
6
6
  import '../automation-badge/automation-badge.js';
@@ -77,10 +77,13 @@ export declare enum SpecialtyTankFrame {
77
77
  * @availableWhen alertFrameThickness alert==true
78
78
  * @property alertFrameStatus - Alert status the frame is coloured for.
79
79
  * @availableWhen alertFrameStatus alert==true
80
+ * @property alertFrameMode - Acknowledgement state of the alert: `acked-active` (default) is steady,
81
+ * `unacked-active` flashes, `unacked-rectified` flashes a dashed frame.
82
+ * @availableWhen alertFrameMode alert==true
80
83
  * @property showAlertCategoryIcon - Shows the alert category icon inside the frame.
81
- * @availableWhen showAlertCategoryIcon alert==true
84
+ * @availableWhen showAlertCategoryIcon alert==true && alertFrameType in [SmallSideFlip, LargeSideFlip, BottomFlip, TopFlip]
82
85
  * @property showAlertIcon - Shows the slotted alert icon inside the frame.
83
- * @availableWhen showAlertIcon alert==true
86
+ * @availableWhen showAlertIcon alert==true && alertFrameType in [LargeSideFlip, BottomFlip, TopFlip]
84
87
  */
85
88
  export declare class ObcAbstractSpecialtyTank extends LitElement {
86
89
  /** What the graphic area shows: `regular` (one grey area), `graphic` (two grey halves) or `medium` (hot/cold halves). */
@@ -130,15 +133,21 @@ export declare class ObcAbstractSpecialtyTank extends LitElement {
130
133
  */
131
134
  alertFrameStatus: AlertType;
132
135
  /**
133
- * Shows the alert category icon inside the frame.
136
+ * Acknowledgement state of the alert: `acked-active` (default) is steady, `unacked-active` flashes, `unacked-rectified` flashes a dashed frame.
134
137
  *
135
138
  * Available when `alert==true`.
136
139
  */
140
+ alertFrameMode: ObcAlertFrameMode;
141
+ /**
142
+ * Shows the alert category icon inside the frame.
143
+ *
144
+ * Available when `alert==true && alertFrameType in [SmallSideFlip, LargeSideFlip, BottomFlip, TopFlip]`.
145
+ */
137
146
  showAlertCategoryIcon: boolean;
138
147
  /**
139
148
  * Shows the slotted alert icon inside the frame.
140
149
  *
141
- * Available when `alert==true`.
150
+ * Available when `alert==true && alertFrameType in [LargeSideFlip, BottomFlip, TopFlip]`.
142
151
  */
143
152
  showAlertIcon: boolean;
144
153
  private _hasBadges;
@@ -1 +1 @@
1
- {"version":3,"file":"abstract-specialty-tank.d.ts","sourceRoot":"","sources":["../../../src/automation/specialty-tank/abstract-specialty-tank.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAgC,MAAM,KAAK,CAAC;AAC9D,OAAO,KAAK,EAAC,cAAc,EAAE,cAAc,EAAC,MAAM,KAAK,CAAC;AAIxD,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EACL,0BAA0B,EAC1B,kCAAkC,EAClC,4BAA4B,EAC5B,8BAA8B,EAC/B,MAAM,oDAAoD,CAAC;AAC5D,OAAO,6CAA6C,CAAC;AACrD,OAAO,EACL,sBAAsB,EACtB,iBAAiB,EAClB,MAAM,6CAA6C,CAAC;AACrD,OAAO,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAC,eAAe,EAAC,MAAM,wCAAwC,CAAC;AAEvE;;;GAGG;AACH,oBAAY,mBAAmB;IAC7B,+BAA+B;IAC/B,OAAO,YAAY;IACnB,0CAA0C;IAC1C,OAAO,YAAY;IACnB,2DAA2D;IAC3D,MAAM,WAAW;CAClB;AAED;;;GAGG;AACH,oBAAY,sBAAsB;IAChC,sCAAsC;IACtC,QAAQ,aAAa;IACrB,sCAAsC;IACtC,UAAU,eAAe;IACzB,0EAA0E;IAC1E,QAAQ,aAAa;CACtB;AAED;;GAEG;AACH,oBAAY,kBAAkB;IAC5B,8BAA8B;IAC9B,OAAO,YAAY;IACnB,uEAAuE;IACvE,WAAW,gBAAgB;CAC5B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AACH,qBAAa,wBAAyB,SAAQ,UAAU;IAC5B,MAAM,EAAE,mBAAmB,CACvB;IACY,MAAM,EAAE,OAAO,CAAS;IACrB,QAAQ,EAAE,OAAO,CAAQ;IAC5C,GAAG,EAAE,MAAM,CAAM;IACF,WAAW,EAAE,eAAe,CAC5C;IACoB,SAAS,EAAE,OAAO,CAAQ;IAC5C,SAAS,EAAE,OAAO,CAAS;IAE5B,YAAY,EAAE,4BAA4B,CAChC;IACV,UAAU,EAAE,0BAA0B,CAC9B;IACR,cAAc,EAAE,8BAA8B,CAClC;IAEtC,kBAAkB,EAAE,kCAAkC,CACZ;IAEf,KAAK,EAAE,OAAO,CAAS;IACxB,cAAc,EAAE,iBAAiB,CACzB;IACR,mBAAmB,EAAE,sBAAsB,CACtC;IACL,gBAAgB,EAAE,SAAS,CAAmB;IAC3B,qBAAqB,EAAE,OAAO,CACpE;IACoB,aAAa,EAAE,OAAO,CAAS;IAEjD,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC,WAAW,CAAS;IAErC,SAAS,KAAK,aAAa,IAAI,cAAc,CAE5C;IAED,yDAAyD;IACzD,SAAS,KAAK,aAAa,IAAI,MAAM,CAEpC;IAED,SAAS,KAAK,KAAK,IAAI,kBAAkB,CAExC;IAED,SAAS,KAAK,SAAS,IAAI,sBAAsB,CAEhD;IAED,OAAO,CAAC,iBAAiB;IAiBzB,OAAO,CAAC,eAAe;IAyBvB,OAAO,CAAC,mBAAmB;IAW3B,OAAO,CAAC,uBAAuB;IAU/B,OAAO,CAAC,eAAe;IAWvB,OAAO,CAAC,mBAAmB;IAI3B,OAAO,CAAC,gBAAgB;IAIxB,OAAO,CAAC,aAAa;IAerB;;;;;;OAMG;IACH,OAAO,CAAC,mBAAmB;IAwBlB,MAAM;IAkJf,OAAgB,MAAM,EAAE,cAAc,CAA6B;CACpE"}
1
+ {"version":3,"file":"abstract-specialty-tank.d.ts","sourceRoot":"","sources":["../../../src/automation/specialty-tank/abstract-specialty-tank.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAgC,MAAM,KAAK,CAAC;AAC9D,OAAO,KAAK,EAAC,cAAc,EAAE,cAAc,EAAC,MAAM,KAAK,CAAC;AAIxD,OAAO,yCAAyC,CAAC;AAEjD,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BAAsB,CACtC;IACL,gBAAgB,EAAE,SAAS,CAAmB;IAC9C,cAAc,EAAE,iBAAiB,CAC3B;IACa,qBAAqB,EAAE,OAAO,CACpE;IACoB,aAAa,EAAE,OAAO,CAAS;IAEjD,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC,WAAW,CAAS;IAErC,SAAS,KAAK,aAAa,IAAI,cAAc,CAE5C;IAED,yDAAyD;IACzD,SAAS,KAAK,aAAa,IAAI,MAAM,CAEpC;IAED,SAAS,KAAK,KAAK,IAAI,kBAAkB,CAExC;IAED,SAAS,KAAK,SAAS,IAAI,sBAAsB,CAEhD;IAED,OAAO,CAAC,iBAAiB;IAiBzB,OAAO,CAAC,eAAe;IAyBvB,OAAO,CAAC,mBAAmB;IAW3B,OAAO,CAAC,uBAAuB;IAU/B,OAAO,CAAC,eAAe;IAWvB,OAAO,CAAC,mBAAmB;IAI3B,OAAO,CAAC,gBAAgB;IAIxB,OAAO,CAAC,aAAa;IAerB;;;;;;OAMG;IACH,OAAO,CAAC,mBAAmB;IAwBlB,MAAM;IAmJf,OAAgB,MAAM,EAAE,cAAc,CAA6B;CACpE"}
@@ -1,6 +1,6 @@
1
1
  import { AlertType } from "../../types.js";
2
2
  import __decorate from "../../_virtual/_@oxc-project_runtime@0.150.0/helpers/esm/decorate.js";
3
- import { ObcAlertFrameThickness, ObcAlertFrameType } from "../../components/alert-frame/alert-frame.js";
3
+ import { ObcAlertFrameMode, ObcAlertFrameThickness, ObcAlertFrameType } from "../../components/alert-frame/alert-frame.js";
4
4
  import { ObcAutomationBadgeType } from "../automation-badge/automation-badge.js";
5
5
  import { AutomationButtonBadgeAlert, AutomationButtonBadgeCommandLocked, AutomationButtonBadgeControl, AutomationButtonBadgeInterlock } from "../automation-button/abstract-automation-button.js";
6
6
  import { TankPositioning } from "../automation-tank/tank-positioning.js";
@@ -84,10 +84,13 @@ var SpecialtyTankFrame = /* @__PURE__ */ function(SpecialtyTankFrame) {
84
84
  * @availableWhen alertFrameThickness alert==true
85
85
  * @property alertFrameStatus - Alert status the frame is coloured for.
86
86
  * @availableWhen alertFrameStatus alert==true
87
+ * @property alertFrameMode - Acknowledgement state of the alert: `acked-active` (default) is steady,
88
+ * `unacked-active` flashes, `unacked-rectified` flashes a dashed frame.
89
+ * @availableWhen alertFrameMode alert==true
87
90
  * @property showAlertCategoryIcon - Shows the alert category icon inside the frame.
88
- * @availableWhen showAlertCategoryIcon alert==true
91
+ * @availableWhen showAlertCategoryIcon alert==true && alertFrameType in [SmallSideFlip, LargeSideFlip, BottomFlip, TopFlip]
89
92
  * @property showAlertIcon - Shows the slotted alert icon inside the frame.
90
- * @availableWhen showAlertIcon alert==true
93
+ * @availableWhen showAlertIcon alert==true && alertFrameType in [LargeSideFlip, BottomFlip, TopFlip]
91
94
  */
92
95
  var ObcAbstractSpecialtyTank = class extends LitElement {
93
96
  constructor(..._args) {
@@ -107,6 +110,7 @@ var ObcAbstractSpecialtyTank = class extends LitElement {
107
110
  this.alertFrameType = ObcAlertFrameType.SmallSideFlip;
108
111
  this.alertFrameThickness = ObcAlertFrameThickness.Small;
109
112
  this.alertFrameStatus = AlertType.Alarm;
113
+ this.alertFrameMode = ObcAlertFrameMode.ackedActive;
110
114
  this.showAlertCategoryIcon = true;
111
115
  this.showAlertIcon = false;
112
116
  this._hasBadges = false;
@@ -266,6 +270,7 @@ var ObcAbstractSpecialtyTank = class extends LitElement {
266
270
  .type=${this.alertFrameType}
267
271
  .thickness=${this.alertFrameThickness}
268
272
  .status=${this.alertFrameStatus}
273
+ .mode=${this.alertFrameMode}
269
274
  .showAlertCategoryIcon=${this.showAlertCategoryIcon}
270
275
  .showIcon=${this.showAlertIcon}
271
276
  >
@@ -342,6 +347,7 @@ __decorate([property({ type: Boolean })], ObcAbstractSpecialtyTank.prototype, "a
342
347
  __decorate([property({ type: String })], ObcAbstractSpecialtyTank.prototype, "alertFrameType", void 0);
343
348
  __decorate([property({ type: String })], ObcAbstractSpecialtyTank.prototype, "alertFrameThickness", void 0);
344
349
  __decorate([property({ type: String })], ObcAbstractSpecialtyTank.prototype, "alertFrameStatus", void 0);
350
+ __decorate([property({ type: String })], ObcAbstractSpecialtyTank.prototype, "alertFrameMode", void 0);
345
351
  __decorate([property({
346
352
  type: Boolean,
347
353
  attribute: false
@@ -1 +1 @@
1
- {"version":3,"file":"abstract-specialty-tank.js","names":[],"sources":["../../../src/automation/specialty-tank/abstract-specialty-tank.ts"],"sourcesContent":["import {LitElement, html, nothing, svg, unsafeCSS} from 'lit';\nimport type {CSSResultGroup, TemplateResult} from 'lit';\nimport {property, state} from 'lit/decorators.js';\nimport {classMap} from 'lit/directives/class-map.js';\nimport componentStyle from './specialty-tank.css?inline';\nimport '../automation-badge/automation-badge.js';\nimport {ObcAutomationBadgeType} from '../automation-badge/automation-badge.js';\nimport {\n AutomationButtonBadgeAlert,\n AutomationButtonBadgeCommandLocked,\n AutomationButtonBadgeControl,\n AutomationButtonBadgeInterlock,\n} from '../automation-button/abstract-automation-button.js';\nimport '../../components/alert-frame/alert-frame.js';\nimport {\n ObcAlertFrameThickness,\n ObcAlertFrameType,\n} from '../../components/alert-frame/alert-frame.js';\nimport {AlertType} from '../../types.js';\nimport {TankPositioning} from '../automation-tank/tank-positioning.js';\n\n/**\n * What the graphic area of a specialty tank shows. Mirrors the Figma\n * `has Medium` property; its fourth value, Static, is the `static` property.\n */\nexport enum SpecialtyTankMedium {\n /** One grey area, no split. */\n regular = 'regular',\n /** Two grey halves separated by a gap. */\n graphic = 'graphic',\n /** Hot (red) and cold (blue) halves separated by a gap. */\n medium = 'medium',\n}\n\n/**\n * Hot/cold split geometry of a specialty tank. Drives the halves and the\n * gap between them through the `split-<mode>` class on the tank frame.\n */\nexport enum SpecialtyTankSplitMode {\n /** Left half hot, right half cold. */\n vertical = 'vertical',\n /** Top half hot, bottom half cold. */\n horizontal = 'horizontal',\n /** Two corner-to-corner triangles, top-left hot and bottom-right cold. */\n diagonal = 'diagonal',\n}\n\n/**\n * Frame silhouette of a specialty tank.\n */\nexport enum SpecialtyTankFrame {\n /** One rounded border box. */\n rounded = 'rounded',\n /** Pressurized-tank silhouette: domed caps on a side-bordered body. */\n pressurized = 'pressurized',\n}\n\n/**\n * Base class for the specialty-tank tiles `obc-heat-pump`,\n * `obc-hydraulic-separator` and `obc-heat-exchanger`. Owns the halo, badge\n * row, tank frame with its hot/cold graphic area and equipment icon, tag\n * readout and alert-frame overlay. Subclasses supply `equipmentIcon`,\n * `equipmentName`, `frame` and `splitMode`, plus their own host footprint.\n *\n * ## Layout\n * The same shell as a compact `obc-automation-tank`: a fixed host (or\n * `positioning=\"button\"` to fill the parent), a 4px-padded halo holding\n * badges, the tank frame and the tag, the frame absorbing the space of\n * empty badge and tag cells. Hover, pressed, focus-visible and `activated`\n * are painted on the halo by the flat style mixin; `clickable` and `static`\n * switch the root between a `<button>`, a plain `<div>` and a\n * `<div role=\"img\">` exactly as the tank does.\n *\n * Not declared `abstract`: the wrapper generators wrap every `LitElement`\n * subclass and pass its constructor as a concrete `Constructor<T>`, so the\n * override points throw instead (same as `ObcAbstractAutomationButton`).\n *\n * @property medium - What the graphic area shows: `regular` (one grey area), `graphic` (two grey halves) or `medium` (hot/cold halves).\n * @property static - Display-only tile with a flat grey frame and a bare icon, rendered as a non-interactive `<div role=\"img\">`. Hides the graphic area.\n * @property showIcon - Show the equipment icon centered on the graphic area.\n * @property tag - Identifier rendered in the tag readout below the frame (for example `#0000`); also the accessible name. The cell collapses when empty.\n * @property positioning - Host positioning model — see `TankPositioning`. `button` (default) fills the parent, `point` uses the fixed design footprint with the P&ID anchor.\n * @property clickable - Whether the tile is interactive. `false` keeps the resting appearance but drops hover, pressed and focus states and leaves the tab order; property-only because the default is `true`.\n * @property activated - Paints the activated background on the halo. Needs an interactive tile.\n * @availableWhen activated clickable==true\n * @property badgeControl - Mode badge (auto / manual / local variants), first in the badge row.\n * @property badgeAlert - Alert badge, second in the badge row.\n * @property badgeInterlock - Interlock badge, third in the badge row.\n * @property badgeCommandLocked - Command-locked badge, last in the badge row.\n * @property alert - Show an alert-frame overlay around the halo, mirroring `obc-automation-tank`.\n * @property alertFrameType - Shape of the alert frame.\n * @availableWhen alertFrameType alert==true\n * @property alertFrameThickness - Thickness of the alert frame.\n * @availableWhen alertFrameThickness alert==true\n * @property alertFrameStatus - Alert status the frame is coloured for.\n * @availableWhen alertFrameStatus alert==true\n * @property showAlertCategoryIcon - Shows the alert category icon inside the frame.\n * @availableWhen showAlertCategoryIcon alert==true\n * @property showAlertIcon - Shows the slotted alert icon inside the frame.\n * @availableWhen showAlertIcon alert==true\n */\nexport class ObcAbstractSpecialtyTank extends LitElement {\n @property({type: String}) medium: SpecialtyTankMedium =\n SpecialtyTankMedium.regular;\n @property({type: Boolean, reflect: true}) static: boolean = false;\n @property({type: Boolean, attribute: false}) showIcon: boolean = true;\n @property({type: String}) tag: string = '';\n @property({type: String, reflect: true}) positioning: TankPositioning =\n TankPositioning.button;\n @property({type: Boolean, attribute: false}) clickable: boolean = true;\n @property({type: Boolean}) activated: boolean = false;\n\n @property({type: String}) badgeControl: AutomationButtonBadgeControl =\n AutomationButtonBadgeControl.None;\n @property({type: String}) badgeAlert: AutomationButtonBadgeAlert =\n AutomationButtonBadgeAlert.None;\n @property({type: String}) badgeInterlock: AutomationButtonBadgeInterlock =\n AutomationButtonBadgeInterlock.None;\n @property({type: String})\n badgeCommandLocked: AutomationButtonBadgeCommandLocked =\n AutomationButtonBadgeCommandLocked.None;\n\n @property({type: Boolean}) alert: boolean = false;\n @property({type: String}) alertFrameType: ObcAlertFrameType =\n ObcAlertFrameType.SmallSideFlip;\n @property({type: String}) alertFrameThickness: ObcAlertFrameThickness =\n ObcAlertFrameThickness.Small;\n @property({type: String}) alertFrameStatus: AlertType = AlertType.Alarm;\n @property({type: Boolean, attribute: false}) showAlertCategoryIcon: boolean =\n true;\n @property({type: Boolean}) showAlertIcon: boolean = false;\n\n @state() private _hasBadges = false;\n @state() private _hasTagSlot = false;\n\n protected get equipmentIcon(): TemplateResult {\n throw new Error('\"equipmentIcon\" must be implemented in the subclass');\n }\n\n /** Accessible-name fallback used when `tag` is empty. */\n protected get equipmentName(): string {\n throw new Error('\"equipmentName\" must be implemented in the subclass');\n }\n\n protected get frame(): SpecialtyTankFrame {\n throw new Error('\"frame\" must be implemented in the subclass');\n }\n\n protected get splitMode(): SpecialtyTankSplitMode {\n throw new Error('\"splitMode\" must be implemented in the subclass');\n }\n\n private _badgeControlType(): ObcAutomationBadgeType | null {\n switch (this.badgeControl) {\n case AutomationButtonBadgeControl.Local:\n return ObcAutomationBadgeType.Local;\n case AutomationButtonBadgeControl.LocalOnly:\n return ObcAutomationBadgeType.LocalOnly;\n case AutomationButtonBadgeControl.Manual:\n return ObcAutomationBadgeType.Manual;\n case AutomationButtonBadgeControl.ManualOnly:\n return ObcAutomationBadgeType.ManualOnly;\n case AutomationButtonBadgeControl.Auto:\n return ObcAutomationBadgeType.Auto;\n default:\n return null;\n }\n }\n\n private _badgeAlertType(): ObcAutomationBadgeType | null {\n switch (this.badgeAlert) {\n case AutomationButtonBadgeAlert.Silence:\n return ObcAutomationBadgeType.AlertSilenced;\n case AutomationButtonBadgeAlert.Caution:\n return ObcAutomationBadgeType.Caution;\n case AutomationButtonBadgeAlert.Warning:\n return ObcAutomationBadgeType.Warning;\n case AutomationButtonBadgeAlert.Alarm:\n return ObcAutomationBadgeType.Alarm;\n case AutomationButtonBadgeAlert.LevelCritical:\n return ObcAutomationBadgeType.LevelCritical;\n case AutomationButtonBadgeAlert.LevelHigh:\n return ObcAutomationBadgeType.LevelHigh;\n case AutomationButtonBadgeAlert.LevelMedium:\n return ObcAutomationBadgeType.LevelMedium;\n case AutomationButtonBadgeAlert.LevelLow:\n return ObcAutomationBadgeType.LevelLow;\n case AutomationButtonBadgeAlert.LevelDiagnostic:\n return ObcAutomationBadgeType.LevelDiagnostic;\n default:\n return null;\n }\n }\n\n private _badgeInterlockType(): ObcAutomationBadgeType | null {\n switch (this.badgeInterlock) {\n case AutomationButtonBadgeInterlock.Interlock:\n return ObcAutomationBadgeType.Interlock;\n case AutomationButtonBadgeInterlock.InterlockInhibit:\n return ObcAutomationBadgeType.InterlockInhibit;\n default:\n return null;\n }\n }\n\n private _badgeCommandLockedType(): ObcAutomationBadgeType | null {\n if (\n this.badgeCommandLocked ===\n AutomationButtonBadgeCommandLocked.CommandLocked\n ) {\n return ObcAutomationBadgeType.CommandLocked;\n }\n return null;\n }\n\n private _slotHasContent(e: Event): boolean {\n const slot = e.target as HTMLSlotElement;\n return slot\n .assignedNodes({flatten: true})\n .some(\n (n) =>\n n.nodeType === Node.ELEMENT_NODE ||\n (n.nodeType === Node.TEXT_NODE && !!n.textContent?.trim())\n );\n }\n\n private _onBadgesSlotChange(e: Event): void {\n this._hasBadges = this._slotHasContent(e);\n }\n\n private _onTagSlotChange(e: Event): void {\n this._hasTagSlot = this._slotHasContent(e);\n }\n\n private renderGraphic(): TemplateResult {\n if (this.medium === SpecialtyTankMedium.regular) {\n return html`<div class=\"area area-single\"></div>`;\n }\n if (this.splitMode === SpecialtyTankSplitMode.diagonal) {\n return this.renderDiagonalSplit();\n }\n return html`\n <div class=\"halves\">\n <div class=\"area area-hot\"></div>\n <div class=\"area area-cold\"></div>\n </div>\n `;\n }\n\n /**\n * Diagonal split in a unit viewBox stretched over the area\n * (`preserveAspectRatio=\"none\"`); every stroke is `non-scaling` so the\n * borders and the gap keep their pixel widths at any aspect ratio. The\n * gap edges are drawn as one wide line per half, clipped to that half,\n * under the narrower frame-coloured gap line.\n */\n private renderDiagonalSplit(): TemplateResult {\n const hot = '0,0 1,0 0,1';\n const cold = '1,0 1,1 0,1';\n return html`\n <div class=\"diagonal\">\n <svg viewBox=\"0 0 1 1\" preserveAspectRatio=\"none\" aria-hidden=\"true\">\n ${svg`\n <defs>\n <clipPath id=\"clip-hot\"><polygon points=${hot} /></clipPath>\n <clipPath id=\"clip-cold\"><polygon points=${cold} /></clipPath>\n </defs>\n <polygon class=\"area-fill area-hot\" points=${hot} />\n <polygon class=\"area-fill area-cold\" points=${cold} />\n <polygon class=\"area-stroke area-hot\" points=${hot} clip-path=\"url(#clip-hot)\" vector-effect=\"non-scaling-stroke\" />\n <polygon class=\"area-stroke area-cold\" points=${cold} clip-path=\"url(#clip-cold)\" vector-effect=\"non-scaling-stroke\" />\n <line class=\"gap-edge area-hot\" x1=\"1\" y1=\"0\" x2=\"0\" y2=\"1\" clip-path=\"url(#clip-hot)\" vector-effect=\"non-scaling-stroke\" />\n <line class=\"gap-edge area-cold\" x1=\"1\" y1=\"0\" x2=\"0\" y2=\"1\" clip-path=\"url(#clip-cold)\" vector-effect=\"non-scaling-stroke\" />\n <line class=\"gap\" x1=\"1\" y1=\"0\" x2=\"0\" y2=\"1\" vector-effect=\"non-scaling-stroke\" />\n `}\n </svg>\n </div>\n `;\n }\n\n override render() {\n const controlBadge = this._badgeControlType();\n const alertBadge = this._badgeAlertType();\n const interlockBadge = this._badgeInterlockType();\n const commandLockedBadge = this._badgeCommandLockedType();\n const hasEnumBadges =\n controlBadge !== null ||\n alertBadge !== null ||\n interlockBadge !== null ||\n commandLockedBadge !== null;\n\n const badgesHidden = !this._hasBadges && !hasEnumBadges;\n const tagHidden = !this._hasTagSlot && !this.tag;\n\n const badgesCell = html`\n <div class=\"badges\" ?hidden=${badgesHidden}>\n <slot name=\"badges\" @slotchange=${this._onBadgesSlotChange}>\n ${\n controlBadge\n ? html`<obc-automation-badge\n .type=${controlBadge}\n ></obc-automation-badge>`\n : nothing\n }\n ${\n alertBadge\n ? html`<obc-automation-badge\n .type=${alertBadge}\n ></obc-automation-badge>`\n : nothing\n }\n ${\n interlockBadge\n ? html`<obc-automation-badge\n .type=${interlockBadge}\n ></obc-automation-badge>`\n : nothing\n }\n ${\n commandLockedBadge\n ? html`<obc-automation-badge\n .type=${commandLockedBadge}\n ></obc-automation-badge>`\n : nothing\n }\n </slot>\n </div>\n `;\n\n const tagCell = html`\n <div class=\"tag\" ?hidden=${tagHidden}>\n <slot name=\"tag\" @slotchange=${this._onTagSlotChange}>${this.tag}</slot>\n </div>\n `;\n\n const pressurized = this.frame === SpecialtyTankFrame.pressurized;\n const cap = (side: 'start' | 'end') =>\n pressurized\n ? html`<div class=\"cap cap-${side}\"><div class=\"cap-dome\"></div></div>`\n : nothing;\n const frameClasses = classMap({\n 'tank-frame': true,\n [`frame-${this.frame}`]: true,\n [`split-${this.splitMode}`]: true,\n [`medium-${this.medium}`]: true,\n static: this.static,\n });\n const tankFrame = html`\n <div class=${frameClasses}>\n ${cap('start')}\n <div class=\"middle\">\n <div class=\"content\">\n ${this.static ? nothing : this.renderGraphic()}\n ${\n this.showIcon\n ? html`<div class=\"icon-frame\">${this.equipmentIcon}</div>`\n : nothing\n }\n </div>\n </div>\n ${cap('end')}\n </div>\n `;\n\n const alertFrameOverlay = this.alert\n ? html`<obc-alert-frame\n class=\"alert-frame\"\n .type=${this.alertFrameType}\n .thickness=${this.alertFrameThickness}\n .status=${this.alertFrameStatus}\n .showAlertCategoryIcon=${this.showAlertCategoryIcon}\n .showIcon=${this.showAlertIcon}\n >\n <span slot=\"icon\"><slot name=\"alert-icon\"></slot></span>\n <span slot=\"label\"><slot name=\"alert-label\"></slot></span>\n <span slot=\"timer\"><slot name=\"alert-timer\"></slot></span>\n </obc-alert-frame>`\n : nothing;\n\n const halo = html`\n <div class=\"halo\">\n ${badgesCell}${tankFrame}${tagCell}${alertFrameOverlay}\n </div>\n `;\n\n const isClickable = this.clickable && !this.static;\n const rootClasses = classMap({\n root: true,\n activated: this.activated,\n clickable: isClickable,\n });\n const name = this.tag || this.equipmentName;\n\n // Same three root shapes as obc-automation-tank; the live region stays on\n // all of them so a slotted alert label is announced regardless.\n if (this.static) {\n return html`<div\n class=${rootClasses}\n role=\"img\"\n aria-label=${name}\n aria-live=\"polite\"\n aria-atomic=\"true\"\n >\n ${halo}\n </div>`;\n }\n if (!isClickable) {\n return html`<div\n class=${rootClasses}\n aria-live=\"polite\"\n aria-atomic=\"true\"\n >\n ${halo}\n </div>`;\n }\n return html`<button\n class=${rootClasses}\n type=\"button\"\n aria-label=${name}\n aria-live=\"polite\"\n aria-atomic=\"true\"\n >\n ${halo}\n </button>`;\n }\n\n static override styles: CSSResultGroup = unsafeCSS(componentStyle);\n}\n"],"mappings":";;;;;;;;;;;;;;;AAyBA,IAAY,sBAAL,yBAAA,qBAAA;;CAEL,oBAAA,aAAA;;CAEA,oBAAA,aAAA;;CAEA,oBAAA,YAAA;;AACF,EAAA,CAAA,CAAA;;;;;AAMA,IAAY,yBAAL,yBAAA,wBAAA;;CAEL,uBAAA,cAAA;;CAEA,uBAAA,gBAAA;;CAEA,uBAAA,cAAA;;AACF,EAAA,CAAA,CAAA;;;;AAKA,IAAY,qBAAL,yBAAA,oBAAA;;CAEL,mBAAA,aAAA;;CAEA,mBAAA,iBAAA;;AACF,EAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8CA,IAAa,2BAAb,cAA8C,WAAW;;;;EAGK,KAAA,SAAA;EACK,KAAA,WAAA;EACzB,KAAA,MAAA;EAEtC,KAAA,cAAA,gBAAgB;EACgD,KAAA,YAAA;EAClB,KAAA,YAAA;EAG9C,KAAA,eAAA,6BAA6B;EAE7B,KAAA,aAAA,2BAA2B;EAE3B,KAAA,iBAAA,+BAA+B;EAG/B,KAAA,qBAAA,mCAAmC;EAEO,KAAA,QAAA;EAE1C,KAAA,iBAAA,kBAAkB;EAElB,KAAA,sBAAA,uBAAuB;EAC+B,KAAA,mBAAA,UAAU;EAEhE,KAAA,wBAAA;EACkD,KAAA,gBAAA;EAEtB,KAAA,aAAA;EACC,KAAA,cAAA;;CAE/B,IAAc,gBAAgC;EAC5C,MAAM,IAAI,MAAM,uDAAqD;CACvE;;CAGA,IAAc,gBAAwB;EACpC,MAAM,IAAI,MAAM,uDAAqD;CACvE;CAEA,IAAc,QAA4B;EACxC,MAAM,IAAI,MAAM,+CAA6C;CAC/D;CAEA,IAAc,YAAoC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,iBAAA,KAAA,CAAA;AAExB,WAAA,CAAA,MAAM,CAAA,GAAA,yBAAA,WAAA,cAAA,KAAA,CAAA;AACN,WAAA,CAAA,MAAM,CAAA,GAAA,yBAAA,WAAA,eAAA,KAAA,CAAA"}
1
+ {"version":3,"file":"abstract-specialty-tank.js","names":[],"sources":["../../../src/automation/specialty-tank/abstract-specialty-tank.ts"],"sourcesContent":["import {LitElement, html, nothing, svg, unsafeCSS} from 'lit';\nimport type {CSSResultGroup, TemplateResult} from 'lit';\nimport {property, state} from 'lit/decorators.js';\nimport {classMap} from 'lit/directives/class-map.js';\nimport componentStyle from './specialty-tank.css?inline';\nimport '../automation-badge/automation-badge.js';\nimport {ObcAutomationBadgeType} from '../automation-badge/automation-badge.js';\nimport {\n AutomationButtonBadgeAlert,\n AutomationButtonBadgeCommandLocked,\n AutomationButtonBadgeControl,\n AutomationButtonBadgeInterlock,\n} from '../automation-button/abstract-automation-button.js';\nimport '../../components/alert-frame/alert-frame.js';\nimport {\n ObcAlertFrameMode,\n ObcAlertFrameThickness,\n ObcAlertFrameType,\n} from '../../components/alert-frame/alert-frame.js';\nimport {AlertType} from '../../types.js';\nimport {TankPositioning} from '../automation-tank/tank-positioning.js';\n\n/**\n * What the graphic area of a specialty tank shows. Mirrors the Figma\n * `has Medium` property; its fourth value, Static, is the `static` property.\n */\nexport enum SpecialtyTankMedium {\n /** One grey area, no split. */\n regular = 'regular',\n /** Two grey halves separated by a gap. */\n graphic = 'graphic',\n /** Hot (red) and cold (blue) halves separated by a gap. */\n medium = 'medium',\n}\n\n/**\n * Hot/cold split geometry of a specialty tank. Drives the halves and the\n * gap between them through the `split-<mode>` class on the tank frame.\n */\nexport enum SpecialtyTankSplitMode {\n /** Left half hot, right half cold. */\n vertical = 'vertical',\n /** Top half hot, bottom half cold. */\n horizontal = 'horizontal',\n /** Two corner-to-corner triangles, top-left hot and bottom-right cold. */\n diagonal = 'diagonal',\n}\n\n/**\n * Frame silhouette of a specialty tank.\n */\nexport enum SpecialtyTankFrame {\n /** One rounded border box. */\n rounded = 'rounded',\n /** Pressurized-tank silhouette: domed caps on a side-bordered body. */\n pressurized = 'pressurized',\n}\n\n/**\n * Base class for the specialty-tank tiles `obc-heat-pump`,\n * `obc-hydraulic-separator` and `obc-heat-exchanger`. Owns the halo, badge\n * row, tank frame with its hot/cold graphic area and equipment icon, tag\n * readout and alert-frame overlay. Subclasses supply `equipmentIcon`,\n * `equipmentName`, `frame` and `splitMode`, plus their own host footprint.\n *\n * ## Layout\n * The same shell as a compact `obc-automation-tank`: a fixed host (or\n * `positioning=\"button\"` to fill the parent), a 4px-padded halo holding\n * badges, the tank frame and the tag, the frame absorbing the space of\n * empty badge and tag cells. Hover, pressed, focus-visible and `activated`\n * are painted on the halo by the flat style mixin; `clickable` and `static`\n * switch the root between a `<button>`, a plain `<div>` and a\n * `<div role=\"img\">` exactly as the tank does.\n *\n * Not declared `abstract`: the wrapper generators wrap every `LitElement`\n * subclass and pass its constructor as a concrete `Constructor<T>`, so the\n * override points throw instead (same as `ObcAbstractAutomationButton`).\n *\n * @property medium - What the graphic area shows: `regular` (one grey area), `graphic` (two grey halves) or `medium` (hot/cold halves).\n * @property static - Display-only tile with a flat grey frame and a bare icon, rendered as a non-interactive `<div role=\"img\">`. Hides the graphic area.\n * @property showIcon - Show the equipment icon centered on the graphic area.\n * @property tag - Identifier rendered in the tag readout below the frame (for example `#0000`); also the accessible name. The cell collapses when empty.\n * @property positioning - Host positioning model — see `TankPositioning`. `button` (default) fills the parent, `point` uses the fixed design footprint with the P&ID anchor.\n * @property clickable - Whether the tile is interactive. `false` keeps the resting appearance but drops hover, pressed and focus states and leaves the tab order; property-only because the default is `true`.\n * @property activated - Paints the activated background on the halo. Needs an interactive tile.\n * @availableWhen activated clickable==true\n * @property badgeControl - Mode badge (auto / manual / local variants), first in the badge row.\n * @property badgeAlert - Alert badge, second in the badge row.\n * @property badgeInterlock - Interlock badge, third in the badge row.\n * @property badgeCommandLocked - Command-locked badge, last in the badge row.\n * @property alert - Show an alert-frame overlay around the halo, mirroring `obc-automation-tank`.\n * @property alertFrameType - Shape of the alert frame.\n * @availableWhen alertFrameType alert==true\n * @property alertFrameThickness - Thickness of the alert frame.\n * @availableWhen alertFrameThickness alert==true\n * @property alertFrameStatus - Alert status the frame is coloured for.\n * @availableWhen alertFrameStatus alert==true\n * @property alertFrameMode - Acknowledgement state of the alert: `acked-active` (default) is steady,\n * `unacked-active` flashes, `unacked-rectified` flashes a dashed frame.\n * @availableWhen alertFrameMode alert==true\n * @property showAlertCategoryIcon - Shows the alert category icon inside the frame.\n * @availableWhen showAlertCategoryIcon alert==true && alertFrameType in [SmallSideFlip, LargeSideFlip, BottomFlip, TopFlip]\n * @property showAlertIcon - Shows the slotted alert icon inside the frame.\n * @availableWhen showAlertIcon alert==true && alertFrameType in [LargeSideFlip, BottomFlip, TopFlip]\n */\nexport class ObcAbstractSpecialtyTank extends LitElement {\n @property({type: String}) medium: SpecialtyTankMedium =\n SpecialtyTankMedium.regular;\n @property({type: Boolean, reflect: true}) static: boolean = false;\n @property({type: Boolean, attribute: false}) showIcon: boolean = true;\n @property({type: String}) tag: string = '';\n @property({type: String, reflect: true}) positioning: TankPositioning =\n TankPositioning.button;\n @property({type: Boolean, attribute: false}) clickable: boolean = true;\n @property({type: Boolean}) activated: boolean = false;\n\n @property({type: String}) badgeControl: AutomationButtonBadgeControl =\n AutomationButtonBadgeControl.None;\n @property({type: String}) badgeAlert: AutomationButtonBadgeAlert =\n AutomationButtonBadgeAlert.None;\n @property({type: String}) badgeInterlock: AutomationButtonBadgeInterlock =\n AutomationButtonBadgeInterlock.None;\n @property({type: String})\n badgeCommandLocked: AutomationButtonBadgeCommandLocked =\n AutomationButtonBadgeCommandLocked.None;\n\n @property({type: Boolean}) alert: boolean = false;\n @property({type: String}) alertFrameType: ObcAlertFrameType =\n ObcAlertFrameType.SmallSideFlip;\n @property({type: String}) alertFrameThickness: ObcAlertFrameThickness =\n ObcAlertFrameThickness.Small;\n @property({type: String}) alertFrameStatus: AlertType = AlertType.Alarm;\n @property({type: String}) alertFrameMode: ObcAlertFrameMode =\n ObcAlertFrameMode.ackedActive;\n @property({type: Boolean, attribute: false}) showAlertCategoryIcon: boolean =\n true;\n @property({type: Boolean}) showAlertIcon: boolean = false;\n\n @state() private _hasBadges = false;\n @state() private _hasTagSlot = false;\n\n protected get equipmentIcon(): TemplateResult {\n throw new Error('\"equipmentIcon\" must be implemented in the subclass');\n }\n\n /** Accessible-name fallback used when `tag` is empty. */\n protected get equipmentName(): string {\n throw new Error('\"equipmentName\" must be implemented in the subclass');\n }\n\n protected get frame(): SpecialtyTankFrame {\n throw new Error('\"frame\" must be implemented in the subclass');\n }\n\n protected get splitMode(): SpecialtyTankSplitMode {\n throw new Error('\"splitMode\" must be implemented in the subclass');\n }\n\n private _badgeControlType(): ObcAutomationBadgeType | null {\n switch (this.badgeControl) {\n case AutomationButtonBadgeControl.Local:\n return ObcAutomationBadgeType.Local;\n case AutomationButtonBadgeControl.LocalOnly:\n return ObcAutomationBadgeType.LocalOnly;\n case AutomationButtonBadgeControl.Manual:\n return ObcAutomationBadgeType.Manual;\n case AutomationButtonBadgeControl.ManualOnly:\n return ObcAutomationBadgeType.ManualOnly;\n case AutomationButtonBadgeControl.Auto:\n return ObcAutomationBadgeType.Auto;\n default:\n return null;\n }\n }\n\n private _badgeAlertType(): ObcAutomationBadgeType | null {\n switch (this.badgeAlert) {\n case AutomationButtonBadgeAlert.Silence:\n return ObcAutomationBadgeType.AlertSilenced;\n case AutomationButtonBadgeAlert.Caution:\n return ObcAutomationBadgeType.Caution;\n case AutomationButtonBadgeAlert.Warning:\n return ObcAutomationBadgeType.Warning;\n case AutomationButtonBadgeAlert.Alarm:\n return ObcAutomationBadgeType.Alarm;\n case AutomationButtonBadgeAlert.LevelCritical:\n return ObcAutomationBadgeType.LevelCritical;\n case AutomationButtonBadgeAlert.LevelHigh:\n return ObcAutomationBadgeType.LevelHigh;\n case AutomationButtonBadgeAlert.LevelMedium:\n return ObcAutomationBadgeType.LevelMedium;\n case AutomationButtonBadgeAlert.LevelLow:\n return ObcAutomationBadgeType.LevelLow;\n case AutomationButtonBadgeAlert.LevelDiagnostic:\n return ObcAutomationBadgeType.LevelDiagnostic;\n default:\n return null;\n }\n }\n\n private _badgeInterlockType(): ObcAutomationBadgeType | null {\n switch (this.badgeInterlock) {\n case AutomationButtonBadgeInterlock.Interlock:\n return ObcAutomationBadgeType.Interlock;\n case AutomationButtonBadgeInterlock.InterlockInhibit:\n return ObcAutomationBadgeType.InterlockInhibit;\n default:\n return null;\n }\n }\n\n private _badgeCommandLockedType(): ObcAutomationBadgeType | null {\n if (\n this.badgeCommandLocked ===\n AutomationButtonBadgeCommandLocked.CommandLocked\n ) {\n return ObcAutomationBadgeType.CommandLocked;\n }\n return null;\n }\n\n private _slotHasContent(e: Event): boolean {\n const slot = e.target as HTMLSlotElement;\n return slot\n .assignedNodes({flatten: true})\n .some(\n (n) =>\n n.nodeType === Node.ELEMENT_NODE ||\n (n.nodeType === Node.TEXT_NODE && !!n.textContent?.trim())\n );\n }\n\n private _onBadgesSlotChange(e: Event): void {\n this._hasBadges = this._slotHasContent(e);\n }\n\n private _onTagSlotChange(e: Event): void {\n this._hasTagSlot = this._slotHasContent(e);\n }\n\n private renderGraphic(): TemplateResult {\n if (this.medium === SpecialtyTankMedium.regular) {\n return html`<div class=\"area area-single\"></div>`;\n }\n if (this.splitMode === SpecialtyTankSplitMode.diagonal) {\n return this.renderDiagonalSplit();\n }\n return html`\n <div class=\"halves\">\n <div class=\"area area-hot\"></div>\n <div class=\"area area-cold\"></div>\n </div>\n `;\n }\n\n /**\n * Diagonal split in a unit viewBox stretched over the area\n * (`preserveAspectRatio=\"none\"`); every stroke is `non-scaling` so the\n * borders and the gap keep their pixel widths at any aspect ratio. The\n * gap edges are drawn as one wide line per half, clipped to that half,\n * under the narrower frame-coloured gap line.\n */\n private renderDiagonalSplit(): TemplateResult {\n const hot = '0,0 1,0 0,1';\n const cold = '1,0 1,1 0,1';\n return html`\n <div class=\"diagonal\">\n <svg viewBox=\"0 0 1 1\" preserveAspectRatio=\"none\" aria-hidden=\"true\">\n ${svg`\n <defs>\n <clipPath id=\"clip-hot\"><polygon points=${hot} /></clipPath>\n <clipPath id=\"clip-cold\"><polygon points=${cold} /></clipPath>\n </defs>\n <polygon class=\"area-fill area-hot\" points=${hot} />\n <polygon class=\"area-fill area-cold\" points=${cold} />\n <polygon class=\"area-stroke area-hot\" points=${hot} clip-path=\"url(#clip-hot)\" vector-effect=\"non-scaling-stroke\" />\n <polygon class=\"area-stroke area-cold\" points=${cold} clip-path=\"url(#clip-cold)\" vector-effect=\"non-scaling-stroke\" />\n <line class=\"gap-edge area-hot\" x1=\"1\" y1=\"0\" x2=\"0\" y2=\"1\" clip-path=\"url(#clip-hot)\" vector-effect=\"non-scaling-stroke\" />\n <line class=\"gap-edge area-cold\" x1=\"1\" y1=\"0\" x2=\"0\" y2=\"1\" clip-path=\"url(#clip-cold)\" vector-effect=\"non-scaling-stroke\" />\n <line class=\"gap\" x1=\"1\" y1=\"0\" x2=\"0\" y2=\"1\" vector-effect=\"non-scaling-stroke\" />\n `}\n </svg>\n </div>\n `;\n }\n\n override render() {\n const controlBadge = this._badgeControlType();\n const alertBadge = this._badgeAlertType();\n const interlockBadge = this._badgeInterlockType();\n const commandLockedBadge = this._badgeCommandLockedType();\n const hasEnumBadges =\n controlBadge !== null ||\n alertBadge !== null ||\n interlockBadge !== null ||\n commandLockedBadge !== null;\n\n const badgesHidden = !this._hasBadges && !hasEnumBadges;\n const tagHidden = !this._hasTagSlot && !this.tag;\n\n const badgesCell = html`\n <div class=\"badges\" ?hidden=${badgesHidden}>\n <slot name=\"badges\" @slotchange=${this._onBadgesSlotChange}>\n ${\n controlBadge\n ? html`<obc-automation-badge\n .type=${controlBadge}\n ></obc-automation-badge>`\n : nothing\n }\n ${\n alertBadge\n ? html`<obc-automation-badge\n .type=${alertBadge}\n ></obc-automation-badge>`\n : nothing\n }\n ${\n interlockBadge\n ? html`<obc-automation-badge\n .type=${interlockBadge}\n ></obc-automation-badge>`\n : nothing\n }\n ${\n commandLockedBadge\n ? html`<obc-automation-badge\n .type=${commandLockedBadge}\n ></obc-automation-badge>`\n : nothing\n }\n </slot>\n </div>\n `;\n\n const tagCell = html`\n <div class=\"tag\" ?hidden=${tagHidden}>\n <slot name=\"tag\" @slotchange=${this._onTagSlotChange}>${this.tag}</slot>\n </div>\n `;\n\n const pressurized = this.frame === SpecialtyTankFrame.pressurized;\n const cap = (side: 'start' | 'end') =>\n pressurized\n ? html`<div class=\"cap cap-${side}\"><div class=\"cap-dome\"></div></div>`\n : nothing;\n const frameClasses = classMap({\n 'tank-frame': true,\n [`frame-${this.frame}`]: true,\n [`split-${this.splitMode}`]: true,\n [`medium-${this.medium}`]: true,\n static: this.static,\n });\n const tankFrame = html`\n <div class=${frameClasses}>\n ${cap('start')}\n <div class=\"middle\">\n <div class=\"content\">\n ${this.static ? nothing : this.renderGraphic()}\n ${\n this.showIcon\n ? html`<div class=\"icon-frame\">${this.equipmentIcon}</div>`\n : nothing\n }\n </div>\n </div>\n ${cap('end')}\n </div>\n `;\n\n const alertFrameOverlay = this.alert\n ? html`<obc-alert-frame\n class=\"alert-frame\"\n .type=${this.alertFrameType}\n .thickness=${this.alertFrameThickness}\n .status=${this.alertFrameStatus}\n .mode=${this.alertFrameMode}\n .showAlertCategoryIcon=${this.showAlertCategoryIcon}\n .showIcon=${this.showAlertIcon}\n >\n <span slot=\"icon\"><slot name=\"alert-icon\"></slot></span>\n <span slot=\"label\"><slot name=\"alert-label\"></slot></span>\n <span slot=\"timer\"><slot name=\"alert-timer\"></slot></span>\n </obc-alert-frame>`\n : nothing;\n\n const halo = html`\n <div class=\"halo\">\n ${badgesCell}${tankFrame}${tagCell}${alertFrameOverlay}\n </div>\n `;\n\n const isClickable = this.clickable && !this.static;\n const rootClasses = classMap({\n root: true,\n activated: this.activated,\n clickable: isClickable,\n });\n const name = this.tag || this.equipmentName;\n\n // Same three root shapes as obc-automation-tank; the live region stays on\n // all of them so a slotted alert label is announced regardless.\n if (this.static) {\n return html`<div\n class=${rootClasses}\n role=\"img\"\n aria-label=${name}\n aria-live=\"polite\"\n aria-atomic=\"true\"\n >\n ${halo}\n </div>`;\n }\n if (!isClickable) {\n return html`<div\n class=${rootClasses}\n aria-live=\"polite\"\n aria-atomic=\"true\"\n >\n ${halo}\n </div>`;\n }\n return html`<button\n class=${rootClasses}\n type=\"button\"\n aria-label=${name}\n aria-live=\"polite\"\n aria-atomic=\"true\"\n >\n ${halo}\n </button>`;\n }\n\n static override styles: CSSResultGroup = unsafeCSS(componentStyle);\n}\n"],"mappings":";;;;;;;;;;;;;;;AA0BA,IAAY,sBAAL,yBAAA,qBAAA;;CAEL,oBAAA,aAAA;;CAEA,oBAAA,aAAA;;CAEA,oBAAA,YAAA;;AACF,EAAA,CAAA,CAAA;;;;;AAMA,IAAY,yBAAL,yBAAA,wBAAA;;CAEL,uBAAA,cAAA;;CAEA,uBAAA,gBAAA;;CAEA,uBAAA,cAAA;;AACF,EAAA,CAAA,CAAA;;;;AAKA,IAAY,qBAAL,yBAAA,oBAAA;;CAEL,mBAAA,aAAA;;CAEA,mBAAA,iBAAA;;AACF,EAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiDA,IAAa,2BAAb,cAA8C,WAAW;;;;EAGK,KAAA,SAAA;EACK,KAAA,WAAA;EACzB,KAAA,MAAA;EAEtC,KAAA,cAAA,gBAAgB;EACgD,KAAA,YAAA;EAClB,KAAA,YAAA;EAG9C,KAAA,eAAA,6BAA6B;EAE7B,KAAA,aAAA,2BAA2B;EAE3B,KAAA,iBAAA,+BAA+B;EAG/B,KAAA,qBAAA,mCAAmC;EAEO,KAAA,QAAA;EAE1C,KAAA,iBAAA,kBAAkB;EAElB,KAAA,sBAAA,uBAAuB;EAC+B,KAAA,mBAAA,UAAU;EAEhE,KAAA,iBA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A,yBAAA,WAAA,uBAAA,KAAA,CAAA;AAEvB,WAAA,CAAA,SAAS,EAAC,MAAM,OAAM,CAAC,CAAA,GAAA,yBAAA,WAAA,oBAAA,KAAA,CAAA;AACvB,WAAA,CAAA,SAAS,EAAC,MAAM,OAAM,CAAC,CAAA,GAAA,yBAAA,WAAA,kBAAA,KAAA,CAAA;AAEvB,WAAA,CAAA,SAAS;CAAC,MAAM;CAAS,WAAW;AAAK,CAAC,CAAA,GAAA,yBAAA,WAAA,yBAAA,KAAA,CAAA;AAE1C,WAAA,CAAA,SAAS,EAAC,MAAM,QAAO,CAAC,CAAA,GAAA,yBAAA,WAAA,iBAAA,KAAA,CAAA;AAExB,WAAA,CAAA,MAAM,CAAA,GAAA,yBAAA,WAAA,cAAA,KAAA,CAAA;AACN,WAAA,CAAA,MAAM,CAAA,GAAA,yBAAA,WAAA,eAAA,KAAA,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"specialty-tank-story-meta.d.ts","sourceRoot":"","sources":["../../../src/automation/specialty-tank/specialty-tank-story-meta.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,KAAK,CAAC;AACxC,OAAO,EAAO,OAAO,EAAC,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAC,cAAc,EAAC,MAAM,yBAAyB,CAAC;AAavD,OAAO,EACL,wBAAwB,EAEzB,MAAM,8BAA8B,CAAC;AAEtC,MAAM,MAAM,sBAAsB,GAAG,wBAAwB,CAAC;AAE9D,+EAA+E;AAC/E,MAAM,WAAW,kBAAkB;IACjC,IAAI,CAAC,EAAE,OAAO,CAAC,sBAAsB,CAAC,CAAC;CACxC;AAED,UAAU,aAAa;IACrB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,OAAO,EAAE;QAAC,IAAI,EAAE,OAAO,GAAG,QAAQ,CAAA;KAAC,CAAC;CACrC;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,WAAW,GAAG;IACnD,IAAI,EAAE,OAAO,CAAC,sBAAsB,CAAC,CAAC;IACtC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;IACxC,UAAU,EAAE,CAAC,OAAO,cAAc,CAAC,EAAE,CAAC;IACtC,MAAM,EAAE,CAAC,IAAI,EAAE,sBAAsB,KAAK,cAAc,CAAC;CAC1D,CAkFA;AAED,8DAA8D;AAC9D,eAAO,MAAM,oBAAoB,EAAE,MAAM,CAAC,MAAM,EAAE,kBAAkB,CAgBnE,CAAC;AAEF,OAAO,EAAC,OAAO,EAAC,CAAC"}
1
+ {"version":3,"file":"specialty-tank-story-meta.d.ts","sourceRoot":"","sources":["../../../src/automation/specialty-tank/specialty-tank-story-meta.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,KAAK,CAAC;AACxC,OAAO,EAAO,OAAO,EAAC,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAC,cAAc,EAAC,MAAM,yBAAyB,CAAC;AAevD,OAAO,EACL,wBAAwB,EAEzB,MAAM,8BAA8B,CAAC;AAEtC,MAAM,MAAM,sBAAsB,GAAG,wBAAwB,CAAC;AAE9D,+EAA+E;AAC/E,MAAM,WAAW,kBAAkB;IACjC,IAAI,CAAC,EAAE,OAAO,CAAC,sBAAsB,CAAC,CAAC;CACxC;AAED,UAAU,aAAa;IACrB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,OAAO,EAAE;QAAC,IAAI,EAAE,OAAO,GAAG,QAAQ,CAAA;KAAC,CAAC;CACrC;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,WAAW,GAAG;IACnD,IAAI,EAAE,OAAO,CAAC,sBAAsB,CAAC,CAAC;IACtC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;IACxC,UAAU,EAAE,CAAC,OAAO,cAAc,CAAC,EAAE,CAAC;IACtC,MAAM,EAAE,CAAC,IAAI,EAAE,sBAAsB,KAAK,cAAc,CAAC;CAC1D,CAyEA;AAED,8DAA8D;AAC9D,eAAO,MAAM,oBAAoB,EAAE,MAAM,CAAC,MAAM,EAAE,kBAAkB,CAgBnE,CAAC;AAEF,OAAO,EAAC,OAAO,EAAC,CAAC"}
@@ -1,6 +1,7 @@
1
1
  import { AlertType } from "../../types.js";
2
- import { ObcAlertFrameThickness, ObcAlertFrameType } from "../../components/alert-frame/alert-frame.js";
2
+ import { ObcAlertFrameMode, ObcAlertFrameThickness, ObcAlertFrameType } from "../../components/alert-frame/alert-frame.js";
3
3
  import { AutomationButtonBadgeAlert, AutomationButtonBadgeCommandLocked, AutomationButtonBadgeControl, AutomationButtonBadgeInterlock } from "../automation-button/abstract-automation-button.js";
4
+ import { argTypesAlertFrame } from "../../components/alert-frame/alert-frame-storybook-helpers.js";
4
5
  import { TankPositioning } from "../automation-tank/tank-positioning.js";
5
6
  import { SpecialtyTankMedium } from "./abstract-specialty-tank.js";
6
7
  import { crossDecorator } from "../../storybook-util.js";
@@ -29,6 +30,7 @@ function specialtyTankMeta(tag) {
29
30
  alertFrameType: ObcAlertFrameType.SmallSideFlip,
30
31
  alertFrameThickness: ObcAlertFrameThickness.Small,
31
32
  alertFrameStatus: AlertType.Alarm,
33
+ alertFrameMode: ObcAlertFrameMode.ackedActive,
32
34
  showAlertCategoryIcon: true,
33
35
  showAlertIcon: false
34
36
  },
@@ -57,18 +59,7 @@ function specialtyTankMeta(tag) {
57
59
  options: Object.values(AutomationButtonBadgeCommandLocked),
58
60
  control: { type: "select" }
59
61
  },
60
- alertFrameType: {
61
- options: Object.values(ObcAlertFrameType),
62
- control: { type: "select" }
63
- },
64
- alertFrameThickness: {
65
- options: Object.values(ObcAlertFrameThickness),
66
- control: { type: "select" }
67
- },
68
- alertFrameStatus: {
69
- options: Object.values(AlertType),
70
- control: { type: "select" }
71
- }
62
+ ...argTypesAlertFrame
72
63
  },
73
64
  decorators: [crossDecorator],
74
65
  render: (args) => html`
@@ -88,6 +79,7 @@ function specialtyTankMeta(tag) {
88
79
  .alertFrameType=${args.alertFrameType}
89
80
  .alertFrameThickness=${args.alertFrameThickness}
90
81
  .alertFrameStatus=${args.alertFrameStatus}
82
+ .alertFrameMode=${args.alertFrameMode}
91
83
  .showAlertCategoryIcon=${args.showAlertCategoryIcon}
92
84
  .showAlertIcon=${args.showAlertIcon}
93
85
  ></${tag}>
@@ -1 +1 @@
1
- {"version":3,"file":"specialty-tank-story-meta.js","names":[],"sources":["../../../src/automation/specialty-tank/specialty-tank-story-meta.ts"],"sourcesContent":["import type {TemplateResult} from 'lit';\nimport {html, literal} from 'lit/static-html.js';\nimport type {StaticValue} from 'lit/static-html.js';\nimport {crossDecorator} from '../../storybook-util.js';\nimport {\n ObcAlertFrameStatus,\n ObcAlertFrameThickness,\n ObcAlertFrameType,\n} from '../../components/alert-frame/alert-frame.js';\nimport {\n AutomationButtonBadgeAlert,\n AutomationButtonBadgeCommandLocked,\n AutomationButtonBadgeControl,\n AutomationButtonBadgeInterlock,\n} from '../automation-button/abstract-automation-button.js';\nimport {TankPositioning} from '../automation-tank/tank-positioning.js';\nimport {\n ObcAbstractSpecialtyTank,\n SpecialtyTankMedium,\n} from './abstract-specialty-tank.js';\n\nexport type SpecialtyTankStoryArgs = ObcAbstractSpecialtyTank;\n\n/** A story of the shared set: only `args`, everything else comes from meta. */\nexport interface SpecialtyTankStory {\n args?: Partial<SpecialtyTankStoryArgs>;\n}\n\ninterface SelectArgType {\n options: string[];\n control: {type: 'radio' | 'select'};\n}\n\n/**\n * Shared story meta for the three specialty-tank tiles. Every public property\n * is bound in `render`, so a story can set any of them as an arg; the tag\n * name is a static literal because the tiles share one template.\n */\nexport function specialtyTankMeta(tag: StaticValue): {\n args: Partial<SpecialtyTankStoryArgs>;\n argTypes: Record<string, SelectArgType>;\n decorators: (typeof crossDecorator)[];\n render: (args: SpecialtyTankStoryArgs) => TemplateResult;\n} {\n return {\n args: {\n medium: SpecialtyTankMedium.regular,\n static: false,\n showIcon: true,\n tag: '#0000',\n positioning: TankPositioning.point,\n clickable: true,\n activated: false,\n badgeControl: AutomationButtonBadgeControl.None,\n badgeAlert: AutomationButtonBadgeAlert.None,\n badgeInterlock: AutomationButtonBadgeInterlock.None,\n badgeCommandLocked: AutomationButtonBadgeCommandLocked.None,\n alert: false,\n alertFrameType: ObcAlertFrameType.SmallSideFlip,\n alertFrameThickness: ObcAlertFrameThickness.Small,\n alertFrameStatus: ObcAlertFrameStatus.Alarm,\n showAlertCategoryIcon: true,\n showAlertIcon: false,\n },\n argTypes: {\n medium: {\n options: Object.values(SpecialtyTankMedium),\n control: {type: 'radio'},\n },\n positioning: {\n options: Object.values(TankPositioning),\n control: {type: 'radio'},\n },\n badgeControl: {\n options: Object.values(AutomationButtonBadgeControl),\n control: {type: 'select'},\n },\n badgeAlert: {\n options: Object.values(AutomationButtonBadgeAlert),\n control: {type: 'select'},\n },\n badgeInterlock: {\n options: Object.values(AutomationButtonBadgeInterlock),\n control: {type: 'select'},\n },\n badgeCommandLocked: {\n options: Object.values(AutomationButtonBadgeCommandLocked),\n control: {type: 'select'},\n },\n alertFrameType: {\n options: Object.values(ObcAlertFrameType),\n control: {type: 'select'},\n },\n alertFrameThickness: {\n options: Object.values(ObcAlertFrameThickness),\n control: {type: 'select'},\n },\n alertFrameStatus: {\n options: Object.values(ObcAlertFrameStatus),\n control: {type: 'select'},\n },\n },\n decorators: [crossDecorator],\n render: (args) => html`\n <${tag}\n .medium=${args.medium}\n .static=${args.static}\n .showIcon=${args.showIcon}\n .tag=${args.tag}\n .positioning=${args.positioning}\n .clickable=${args.clickable}\n ?activated=${args.activated}\n .badgeControl=${args.badgeControl}\n .badgeAlert=${args.badgeAlert}\n .badgeInterlock=${args.badgeInterlock}\n .badgeCommandLocked=${args.badgeCommandLocked}\n ?alert=${args.alert}\n .alertFrameType=${args.alertFrameType}\n .alertFrameThickness=${args.alertFrameThickness}\n .alertFrameStatus=${args.alertFrameStatus}\n .showAlertCategoryIcon=${args.showAlertCategoryIcon}\n .showAlertIcon=${args.showAlertIcon}\n ></${tag}>\n `,\n };\n}\n\n/** The story set every tile exports, keyed by export name. */\nexport const specialtyTankStories: Record<string, SpecialtyTankStory> = {\n Default: {},\n Graphic: {args: {medium: SpecialtyTankMedium.graphic}},\n Medium: {args: {medium: SpecialtyTankMedium.medium}},\n Static: {args: {static: true}},\n WithoutIcon: {args: {medium: SpecialtyTankMedium.medium, showIcon: false}},\n WithBadges: {\n args: {\n medium: SpecialtyTankMedium.medium,\n badgeControl: AutomationButtonBadgeControl.Auto,\n badgeAlert: AutomationButtonBadgeAlert.Silence,\n badgeInterlock: AutomationButtonBadgeInterlock.Interlock,\n badgeCommandLocked: AutomationButtonBadgeCommandLocked.CommandLocked,\n },\n },\n WithAlert: {args: {medium: SpecialtyTankMedium.medium, alert: true}},\n};\n\nexport {literal};\n"],"mappings":";;;;;;;;;;;;;AAsCA,SAAgB,kBAAkB,KAKhC;CACA,OAAO;EACL,MAAM;GACJ,QAAQ,oBAAoB;GAC5B,QAAQ;GACR,UAAU;GACV,KAAK;GACL,aAAa,gBAAgB;GAC7B,WAAW;GACX,WAAW;GACX,cAAc,6BAA6B;GAC3C,YAAY,2BAA2B;GACvC,gBAAgB,+BAA+B;GAC/C,oBAAoB,mCAAmC;GACvD,OAAO;GACP,gBAAgB,kBAAkB;GAClC,qBAAqB,uBAAuB;GAC5C,kBAAkB,UAAoB;GACtC,uBAAuB;GACvB,eAAe;EACjB;EACA,UAAU;GACR,QAAQ;IACN,SAAS,OAAO,OAAO,mBAAmB;IAC1C,SAAS,EAAC,MAAM,QAAO;GACzB;GACA,aAAa;IACX,SAAS,OAAO,OAAO,eAAe;IACtC,SAAS,EAAC,MAAM,QAAO;GACzB;GACA,cAAc;IACZ,SAAS,OAAO,O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AAU;CAAK,EAAC;CACzE,YAAY,EACV,MAAM;EACJ,QAAQ,oBAAoB;EAC5B,cAAc,6BAA6B;EAC3C,YAAY,2BAA2B;EACvC,gBAAgB,+BAA+B;EAC/C,oBAAoB,mCAAmC;CACzD,EACF;CACA,WAAW,EAAC,MAAM;EAAC,QAAQ,oBAAoB;EAAQ,OAAO;CAAI,EAAC;AACrE"}
1
+ {"version":3,"file":"specialty-tank-story-meta.js","names":[],"sources":["../../../src/automation/specialty-tank/specialty-tank-story-meta.ts"],"sourcesContent":["import type {TemplateResult} from 'lit';\nimport {html, literal} from 'lit/static-html.js';\nimport type {StaticValue} from 'lit/static-html.js';\nimport {crossDecorator} from '../../storybook-util.js';\nimport {\n ObcAlertFrameMode,\n ObcAlertFrameStatus,\n ObcAlertFrameThickness,\n ObcAlertFrameType,\n} from '../../components/alert-frame/alert-frame.js';\nimport {argTypesAlertFrame} from '../../components/alert-frame/alert-frame-storybook-helpers.js';\nimport {\n AutomationButtonBadgeAlert,\n AutomationButtonBadgeCommandLocked,\n AutomationButtonBadgeControl,\n AutomationButtonBadgeInterlock,\n} from '../automation-button/abstract-automation-button.js';\nimport {TankPositioning} from '../automation-tank/tank-positioning.js';\nimport {\n ObcAbstractSpecialtyTank,\n SpecialtyTankMedium,\n} from './abstract-specialty-tank.js';\n\nexport type SpecialtyTankStoryArgs = ObcAbstractSpecialtyTank;\n\n/** A story of the shared set: only `args`, everything else comes from meta. */\nexport interface SpecialtyTankStory {\n args?: Partial<SpecialtyTankStoryArgs>;\n}\n\ninterface SelectArgType {\n options: string[];\n control: {type: 'radio' | 'select'};\n}\n\n/**\n * Shared story meta for the three specialty-tank tiles. Every public property\n * is bound in `render`, so a story can set any of them as an arg; the tag\n * name is a static literal because the tiles share one template.\n */\nexport function specialtyTankMeta(tag: StaticValue): {\n args: Partial<SpecialtyTankStoryArgs>;\n argTypes: Record<string, SelectArgType>;\n decorators: (typeof crossDecorator)[];\n render: (args: SpecialtyTankStoryArgs) => TemplateResult;\n} {\n return {\n args: {\n medium: SpecialtyTankMedium.regular,\n static: false,\n showIcon: true,\n tag: '#0000',\n positioning: TankPositioning.point,\n clickable: true,\n activated: false,\n badgeControl: AutomationButtonBadgeControl.None,\n badgeAlert: AutomationButtonBadgeAlert.None,\n badgeInterlock: AutomationButtonBadgeInterlock.None,\n badgeCommandLocked: AutomationButtonBadgeCommandLocked.None,\n alert: false,\n alertFrameType: ObcAlertFrameType.SmallSideFlip,\n alertFrameThickness: ObcAlertFrameThickness.Small,\n alertFrameStatus: ObcAlertFrameStatus.Alarm,\n alertFrameMode: ObcAlertFrameMode.ackedActive,\n showAlertCategoryIcon: true,\n showAlertIcon: false,\n },\n argTypes: {\n medium: {\n options: Object.values(SpecialtyTankMedium),\n control: {type: 'radio'},\n },\n positioning: {\n options: Object.values(TankPositioning),\n control: {type: 'radio'},\n },\n badgeControl: {\n options: Object.values(AutomationButtonBadgeControl),\n control: {type: 'select'},\n },\n badgeAlert: {\n options: Object.values(AutomationButtonBadgeAlert),\n control: {type: 'select'},\n },\n badgeInterlock: {\n options: Object.values(AutomationButtonBadgeInterlock),\n control: {type: 'select'},\n },\n badgeCommandLocked: {\n options: Object.values(AutomationButtonBadgeCommandLocked),\n control: {type: 'select'},\n },\n ...argTypesAlertFrame,\n },\n decorators: [crossDecorator],\n render: (args) => html`\n <${tag}\n .medium=${args.medium}\n .static=${args.static}\n .showIcon=${args.showIcon}\n .tag=${args.tag}\n .positioning=${args.positioning}\n .clickable=${args.clickable}\n ?activated=${args.activated}\n .badgeControl=${args.badgeControl}\n .badgeAlert=${args.badgeAlert}\n .badgeInterlock=${args.badgeInterlock}\n .badgeCommandLocked=${args.badgeCommandLocked}\n ?alert=${args.alert}\n .alertFrameType=${args.alertFrameType}\n .alertFrameThickness=${args.alertFrameThickness}\n .alertFrameStatus=${args.alertFrameStatus}\n .alertFrameMode=${args.alertFrameMode}\n .showAlertCategoryIcon=${args.showAlertCategoryIcon}\n .showAlertIcon=${args.showAlertIcon}\n ></${tag}>\n `,\n };\n}\n\n/** The story set every tile exports, keyed by export name. */\nexport const specialtyTankStories: Record<string, SpecialtyTankStory> = {\n Default: {},\n Graphic: {args: {medium: SpecialtyTankMedium.graphic}},\n Medium: {args: {medium: SpecialtyTankMedium.medium}},\n Static: {args: {static: true}},\n WithoutIcon: {args: {medium: SpecialtyTankMedium.medium, showIcon: false}},\n WithBadges: {\n args: {\n medium: SpecialtyTankMedium.medium,\n badgeControl: AutomationButtonBadgeControl.Auto,\n badgeAlert: AutomationButtonBadgeAlert.Silence,\n badgeInterlock: AutomationButtonBadgeInterlock.Interlock,\n badgeCommandLocked: AutomationButtonBadgeCommandLocked.CommandLocked,\n },\n },\n WithAlert: {args: {medium: SpecialtyTankMedium.medium, alert: true}},\n};\n\nexport {literal};\n"],"mappings":";;;;;;;;;;;;;;AAwCA,SAAgB,kBAAkB,KAKhC;CACA,OAAO;EACL,MAAM;GACJ,QAAQ,oBAAoB;GAC5B,QAAQ;GACR,UAAU;GACV,KAAK;GACL,aAAa,gBAAgB;GAC7B,WAAW;GACX,WAAW;GACX,cAAc,6BAA6B;GAC3C,YAAY,2BAA2B;GACvC,gBAAgB,+BAA+B;GAC/C,oBAAoB,mCAAmC;GACvD,OAAO;GACP,gBAAgB,kBAAkB;GAClC,qBAAqB,uBAAuB;GAC5C,kBAAkB,UAAoB;GACtC,gBAAgB,kBAAkB;GAClC,uBAAuB;GACvB,eAAe;EACjB;EACA,UAAU;GACR,QAAQ;IACN,SAAS,OAAO,OAAO,mBAAmB;IAC1C,SAAS,EAAC,MAAM,QAAO;GACzB;GACA,aAAa;IACX,SAAS,OAAO,OAAO,eAAe;IACtC,SAAS,EAAC,MAAM,QAAO;GACzB;GACA,cAAc;IACZ,SAAS,OAAO,OAAO,4BAA4B;IACnD,SAAS,EAAC,MAAM,SAAQ;GAC1B;GACA,YAAY;IACV,SAAS,OAAO,OAAO,0BAA0B;IACjD,SAAS,EAAC,MAAM,SAAQ;GAC1B;GACA,gBAAgB;IACd,SAAS,OAAO,OAAO,8BAA8B;IACrD,SAAS,EAAC,MAAM,SAAQ;GAC1B;GACA,oBAAoB;IAClB,SAAS,OAAO,OAAO,kCAAkC;IACzD,SAAS,EAAC,MAAM,SAAQ;GAC1B;GACA,GAAG;EACL;EACA,YAAY,CAAC,cAAc;EAC3B,SAAS,SAAS,IAAI;SACjB,IAAI;kBACK,KAAK,OAAO;kBACZ,KAAK,OAAO;oBACV,KAAK,SAAS;eACnB,KAAK,IAAI;uBACD,KAAK,YAAY;qBACnB,KAAK,UAAU;qBACf,KAAK,UAAU;wBACZ,KAAK,aAAa;sBACpB,KAAK,WAAW;0BACZ,KAAK,eAAe;8BAChB,KAAK,mBAAmB;iBACrC,KAAK,MAAM;0BACF,KAAK,eAAe;+BACf,KAAK,oBAAoB;4BAC5B,KAAK,iBAAiB;0BACxB,KAAK,eAAe;iCACb,KAAK,sBAAsB;yBACnC,KAAK,cAAc;WACjC,IAAI;;CAEb;AACF;;AAGA,IAAa,uBAA2D;CACtE,SAAS,CAAC;CACV,SAAS,EAAC,MAAM,EAAC,QAAQ,oBAAoB,QAAO,EAAC;CACrD,QAAQ,EAAC,MAAM,EAAC,QAAQ,oBAAoB,OAAM,EAAC;CACnD,QAAQ,EAAC,MAAM,EAAC,QAAQ,KAAI,EAAC;CAC7B,aAAa,EAAC,MAAM;EAAC,QAAQ,oBAAoB;EAAQ,UAAU;CAAK,EAAC;CACzE,YAAY,EACV,MAAM;EACJ,QAAQ,oBAAoB;EAC5B,cAAc,6BAA6B;EAC3C,YAAY,2BAA2B;EACvC,gBAAgB,+BAA+B;EAC/C,oBAAoB,mCAAmC;CACzD,EACF;CACA,WAAW,EAAC,MAAM;EAAC,QAAQ,oBAAoB;EAAQ,OAAO;CAAI,EAAC;AACrE"}
@@ -1,7 +1,9 @@
1
- import { LitElement } from 'lit';
1
+ import { LitElement, TemplateResult } from 'lit';
2
2
  import { LineType } from '../index.js';
3
3
  import { TransmitterOrientation } from './transmitter-shared.js';
4
4
  import { TransmitterButtonSize } from '../transmitter-button/transmitter-button.js';
5
+ import { ObcAlertFrameMode, ObcAlertFrameThickness, ObcAlertFrameType } from '../../components/alert-frame/alert-frame.js';
6
+ import { AlertType } from '../../types.js';
5
7
  import '../transmitter-button/transmitter-button.js';
6
8
  import '../../navigation-instruments/indicator-graph/indicator-graph.js';
7
9
  import '../../components/alert-frame/alert-frame.js';
@@ -29,7 +31,12 @@ export declare enum TransmitterType {
29
31
  * - **Segments** – opt into a leading advice segment with `hasAdvice`/
30
32
  * `adviceValue` and a setpoint segment with `hasSetPoint`/`setpointValue`;
31
33
  * both are read-only and shown in the value chip for non-`indicator` types.
32
- * - **`hasAlert`** – wraps the whole transmitter in an alarm `<obc-alert-frame>`.
34
+ * - **Alert frame** – `hasAlert` wraps the whole transmitter in an
35
+ * `<obc-alert-frame>`. `alertFrameStatus`, `alertFrameType`,
36
+ * `alertFrameThickness` and `alertFrameMode` set its severity, flap, border
37
+ * and flashing, with the same names as on the automation devices; a flap
38
+ * carries the status badge and the `alert-icon`, `alert-label` and
39
+ * `alert-timer` slots.
33
40
  * - **Formatting** – `fractionDigits`, `maxDigits`, `hintedZeros` and
34
41
  * `hasSignSpacer` are forwarded to the value chip to control decimal
35
42
  * precision, muted leading-zero padding (e.g. `0012.3`) and the sign
@@ -38,23 +45,48 @@ export declare enum TransmitterType {
38
45
  * `value`, `adviceValue` and `setpointValue` render dashes when they are
39
46
  * `NaN`, `null` or `undefined`.
40
47
  *
48
+ * **TODO(designer):** the Figma Transmitter set (25656:45081) draws no alert
49
+ * state, so the frame and its flaps follow the automation devices.
50
+ *
41
51
  * ### Slots
42
- * | Slot Name | Conditions | Purpose |
43
- * |-----------|-------------------------|---------------------------------|
44
- * | icon | value/graph + `hasIcon` | Leading icon in the value chip. |
52
+ * | Slot Name | Conditions | Purpose |
53
+ * |-------------|----------------------------------------------------------|---------------------------------|
54
+ * | icon | value/graph + `hasIcon` | Leading icon in the value chip. |
55
+ * | alert-icon | `hasAlert` + `showAlertIcon`, large side/bottom/top flap | Custom icon in the alert flap. |
56
+ * | alert-label | `hasAlert`, bottom/top flap | Label in the alert flap. |
57
+ * | alert-timer | `hasAlert`, bottom/top flap | Timer in the alert flap. |
45
58
  *
46
59
  * @property maxDigits - Integer digits to reserve / hint (independent of `fractionDigits`).
47
60
  * @property hasSignSpacer - Reserve a minus-sign column on every segment, filled by the real sign
48
61
  * only while a value is negative, so the chip's width does not change
49
62
  * across zero.
50
63
  * @property hasDegree - Show a degree column between the value and the unit (e.g. `12.3°` then `C`).
51
- * @property hasAlert - Wrap the transmitter in an `<obc-alert-frame>` (alarm) when true.
64
+ * @property hasAlert - Wrap the transmitter in an `<obc-alert-frame>` when true.
65
+ * @property alertFrameStatus - Severity of the alert frame, which picks its colour and flap badge:
66
+ * `alarm` (default), `warning`, `caution` or one of the `level-*` severities.
67
+ * @availableWhen alertFrameStatus hasAlert==true
68
+ * @property alertFrameType - Flap of the alert frame: `regular` (default) draws the outline alone,
69
+ * `small-side-flip`, `large-side-flip`, `bottom-flip` and `top-flip` add a flap
70
+ * with the status badge.
71
+ * @availableWhen alertFrameType hasAlert==true
72
+ * @property alertFrameThickness - Border of the alert frame: `small` (default) or `large`.
73
+ * @availableWhen alertFrameThickness hasAlert==true
74
+ * @property alertFrameMode - Acknowledgement state of the alert: `acked-active` (default) is steady,
75
+ * `unacked-active` flashes, `unacked-rectified` flashes a dashed frame.
76
+ * @availableWhen alertFrameMode hasAlert==true
77
+ * @property showAlertCategoryIcon - Show the status badge in the flap; a small side flap without it is not drawn.
78
+ * @availableWhen showAlertCategoryIcon hasAlert==true && alertFrameType in [SmallSideFlip, LargeSideFlip, BottomFlip, TopFlip]
79
+ * @property showAlertIcon - Show the `alert-icon` slot in a large side, bottom or top flap.
80
+ * @availableWhen showAlertIcon hasAlert==true && alertFrameType in [LargeSideFlip, BottomFlip, TopFlip]
52
81
  * @property adviceValue - Advisory value shown in the leading advice segment when `hasAdvice`.
53
82
  * @property setpointValue - Target value shown in the setpoint segment when `hasSetPoint`.
54
83
  * @property tag - Tag identifier shown when `type` is `indicator` (e.g. `TT`).
55
84
  * @property idTag - Optional identifier shown below the chip (e.g. `#0000`).
56
85
  * @property data - Trend data for the graph types: `[xValues, yValues]`.
57
86
  * @slot icon - Leading icon in the value chip.
87
+ * @slot alert-icon - Custom icon in the alert flap, shown when `hasAlert` and `showAlertIcon`.
88
+ * @slot alert-label - Label in a bottom or top alert flap, shown when `hasAlert`.
89
+ * @slot alert-timer - Timer in a bottom or top alert flap, shown when `hasAlert`.
58
90
  *
59
91
  * @experimental
60
92
  */
@@ -75,8 +107,44 @@ export declare class ObcTransmitter extends LitElement {
75
107
  size: TransmitterButtonSize;
76
108
  hasIcon: boolean;
77
109
  hasAdvice: boolean;
78
- /** Wrap the transmitter in an `<obc-alert-frame>` (alarm) when true. */
110
+ /** Wrap the transmitter in an `<obc-alert-frame>` when true. */
79
111
  hasAlert: boolean;
112
+ /**
113
+ * Severity of the alert frame, which picks its colour and flap badge: `alarm` (default), `warning`, `caution` or one of the `level-*` severities.
114
+ *
115
+ * Available when `hasAlert==true`.
116
+ */
117
+ alertFrameStatus: AlertType;
118
+ /**
119
+ * Flap of the alert frame: `regular` (default) draws the outline alone, `small-side-flip`, `large-side-flip`, `bottom-flip` and `top-flip` add a flap with the status badge.
120
+ *
121
+ * Available when `hasAlert==true`.
122
+ */
123
+ alertFrameType: ObcAlertFrameType;
124
+ /**
125
+ * Border of the alert frame: `small` (default) or `large`.
126
+ *
127
+ * Available when `hasAlert==true`.
128
+ */
129
+ alertFrameThickness: ObcAlertFrameThickness;
130
+ /**
131
+ * Acknowledgement state of the alert: `acked-active` (default) is steady, `unacked-active` flashes, `unacked-rectified` flashes a dashed frame.
132
+ *
133
+ * Available when `hasAlert==true`.
134
+ */
135
+ alertFrameMode: ObcAlertFrameMode;
136
+ /**
137
+ * Show the status badge in the flap; a small side flap without it is not drawn.
138
+ *
139
+ * Available when `hasAlert==true && alertFrameType in [SmallSideFlip, LargeSideFlip, BottomFlip, TopFlip]`.
140
+ */
141
+ showAlertCategoryIcon: boolean;
142
+ /**
143
+ * Show the `alert-icon` slot in a large side, bottom or top flap.
144
+ *
145
+ * Available when `hasAlert==true && alertFrameType in [LargeSideFlip, BottomFlip, TopFlip]`.
146
+ */
147
+ showAlertIcon: boolean;
80
148
  /** Advisory value shown in the leading advice segment when `hasAdvice`. */
81
149
  adviceValue?: number | null;
82
150
  hasSetPoint: boolean;
@@ -93,7 +161,8 @@ export declare class ObcTransmitter extends LitElement {
93
161
  private renderGraph;
94
162
  private renderLabel;
95
163
  private renderContent;
96
- render(): import('lit-html').TemplateResult<1>;
164
+ private renderAlertFrame;
165
+ render(): TemplateResult<1>;
97
166
  static styles: import('lit').CSSResult;
98
167
  }
99
168
  declare global {
@@ -1 +1 @@
1
- {"version":3,"file":"transmitter.d.ts","sourceRoot":"","sources":["../../../src/automation/transmitter/transmitter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAA2B,MAAM,KAAK,CAAC;AAKzD,OAAO,EAAC,QAAQ,EAAC,MAAM,aAAa,CAAC;AACrC,OAAO,EACL,sBAAsB,EAEvB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,qBAAqB,EAEtB,MAAM,6CAA6C,CAAC;AACrD,OAAO,6CAA6C,CAAC;AAKrD,OAAO,iEAAiE,CAAC;AAEzE,OAAO,6CAA6C,CAAC;AAErD,OAAO,EACL,sBAAsB,EACtB,uBAAuB,GACxB,MAAM,yBAAyB,CAAC;AAEjC,oBAAY,eAAe;IACzB,SAAS,cAAc;IACvB,KAAK,UAAU;IACf,eAAe,qBAAqB;IACpC,aAAa,mBAAmB;CACjC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AACH,qBACa,cAAe,SAAQ,UAAU;IAClB,WAAW,EAAE,sBAAsB,CAC7B;IACN,IAAI,EAAE,eAAe,CAAyB;IAC9C,QAAQ,EAAE,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AAO,CAAC,WAAW;IAOnB,OAAO,CAAC,aAAa;IASrB,OAAO,CAAC,gBAAgB;IAoBf,MAAM;IAoBf,OAAgB,MAAM,0BAA6B;CACpD;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,iBAAiB,EAAE,cAAc,CAAC;KACnC;CACF"}
@@ -1,6 +1,7 @@
1
+ import { AlertType } from "../../types.js";
1
2
  import { customElement } from "../../decorator.js";
2
3
  import __decorate from "../../_virtual/_@oxc-project_runtime@0.150.0/helpers/esm/decorate.js";
3
- import { ObcAlertFrameType } from "../../components/alert-frame/alert-frame.js";
4
+ import { ObcAlertFrameMode, ObcAlertFrameThickness, ObcAlertFrameType } from "../../components/alert-frame/alert-frame.js";
4
5
  import { TransmitterOrientation, transmitterLeaderOffset } from "./transmitter-shared.js";
5
6
  import transmitter_default from "./transmitter.css.js";
6
7
  import { TransmitterButtonSize, TransmitterButtonVariant } from "../transmitter-button/transmitter-button.js";
@@ -32,6 +33,12 @@ var ObcTransmitter = class ObcTransmitter extends LitElement {
32
33
  this.hasIcon = false;
33
34
  this.hasAdvice = false;
34
35
  this.hasAlert = false;
36
+ this.alertFrameStatus = AlertType.Alarm;
37
+ this.alertFrameType = ObcAlertFrameType.Regular;
38
+ this.alertFrameThickness = ObcAlertFrameThickness.Small;
39
+ this.alertFrameMode = ObcAlertFrameMode.ackedActive;
40
+ this.showAlertCategoryIcon = true;
41
+ this.showAlertIcon = false;
35
42
  this.hasSetPoint = false;
36
43
  this.tag = "";
37
44
  this.idTag = "";
@@ -89,18 +96,29 @@ var ObcTransmitter = class ObcTransmitter extends LitElement {
89
96
  <div class="body">${this.renderButton()} ${this.renderGraph()}</div>
90
97
  ${this.renderLabel()}
91
98
  </div>
99
+ `;
100
+ }
101
+ renderAlertFrame(content) {
102
+ return html`
103
+ <obc-alert-frame
104
+ class="alert-frame"
105
+ .type=${this.alertFrameType}
106
+ .thickness=${this.alertFrameThickness}
107
+ .status=${this.alertFrameStatus}
108
+ .mode=${this.alertFrameMode}
109
+ .showAlertCategoryIcon=${this.showAlertCategoryIcon}
110
+ .showIcon=${this.showAlertIcon}
111
+ .wrapContent=${true}
112
+ >
113
+ ${content}
114
+ <span slot="icon"><slot name="alert-icon"></slot></span>
115
+ <span slot="label"><slot name="alert-label"></slot></span>
116
+ <span slot="timer"><slot name="alert-timer"></slot></span>
117
+ </obc-alert-frame>
92
118
  `;
93
119
  }
94
120
  render() {
95
- const content = this.hasAlert ? html`
96
- <obc-alert-frame
97
- class="alert-frame"
98
- .type=${ObcAlertFrameType.Regular}
99
- .wrapContent=${true}
100
- >
101
- ${this.renderContent()}
102
- </obc-alert-frame>
103
- ` : this.renderContent();
121
+ const content = this.hasAlert ? this.renderAlertFrame(this.renderContent()) : this.renderContent();
104
122
  return html`
105
123
  <div
106
124
  class=${classMap({
@@ -133,6 +151,15 @@ __decorate([property({ type: String })], ObcTransmitter.prototype, "size", void
133
151
  __decorate([property({ type: Boolean })], ObcTransmitter.prototype, "hasIcon", void 0);
134
152
  __decorate([property({ type: Boolean })], ObcTransmitter.prototype, "hasAdvice", void 0);
135
153
  __decorate([property({ type: Boolean })], ObcTransmitter.prototype, "hasAlert", void 0);
154
+ __decorate([property({ type: String })], ObcTransmitter.prototype, "alertFrameStatus", void 0);
155
+ __decorate([property({ type: String })], ObcTransmitter.prototype, "alertFrameType", void 0);
156
+ __decorate([property({ type: String })], ObcTransmitter.prototype, "alertFrameThickness", void 0);
157
+ __decorate([property({ type: String })], ObcTransmitter.prototype, "alertFrameMode", void 0);
158
+ __decorate([property({
159
+ type: Boolean,
160
+ attribute: false
161
+ })], ObcTransmitter.prototype, "showAlertCategoryIcon", void 0);
162
+ __decorate([property({ type: Boolean })], ObcTransmitter.prototype, "showAlertIcon", void 0);
136
163
  __decorate([property({ type: Number })], ObcTransmitter.prototype, "adviceValue", void 0);
137
164
  __decorate([property({ type: Boolean })], ObcTransmitter.prototype, "hasSetPoint", void 0);
138
165
  __decorate([property({ type: Number })], ObcTransmitter.prototype, "setpointValue", void 0);