@oicl/openbridge-webcomponents-full-bundle 2.2.0-next.16 → 2.2.0-next.17

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 (36) hide show
  1. package/bundle/openbridge-webcomponents.bundle.js +173 -20
  2. package/bundle/openbridge-webcomponents.bundle.js.map +1 -1
  3. package/custom-elements.json +1713 -14
  4. package/dist/automation/analog-threeway-valve/analog-threeway-valve.d.ts +4 -4
  5. package/dist/automation/analog-threeway-valve/analog-threeway-valve.js.map +1 -1
  6. package/dist/automation/automation-button/abstract-automation-button-storybook-helpers.d.ts +20 -0
  7. package/dist/automation/automation-button/abstract-automation-button-storybook-helpers.d.ts.map +1 -1
  8. package/dist/automation/automation-button/abstract-automation-button-storybook-helpers.js +1 -0
  9. package/dist/automation/automation-button/abstract-automation-button-storybook-helpers.js.map +1 -1
  10. package/dist/automation/automation-button/abstract-automation-button.d.ts +11 -2
  11. package/dist/automation/automation-button/abstract-automation-button.d.ts.map +1 -1
  12. package/dist/automation/automation-button/abstract-automation-button.js +40 -20
  13. package/dist/automation/automation-button/abstract-automation-button.js.map +1 -1
  14. package/dist/automation/automation-button/badge-layout.d.ts +34 -0
  15. package/dist/automation/automation-button/badge-layout.d.ts.map +1 -0
  16. package/dist/automation/automation-button/badge-layout.js +64 -0
  17. package/dist/automation/automation-button/badge-layout.js.map +1 -0
  18. package/dist/automation/digital-threeway-valve/digital-threeway-valve.d.ts +4 -4
  19. package/dist/automation/digital-threeway-valve/digital-threeway-valve.js.map +1 -1
  20. package/dist/automation/electricity-battery/electricity-battery.d.ts +4 -4
  21. package/dist/automation/electricity-battery/electricity-battery.js.map +1 -1
  22. package/dist/internal/global-setting.d.ts +55 -0
  23. package/dist/internal/global-setting.d.ts.map +1 -0
  24. package/dist/internal/global-setting.js +86 -0
  25. package/dist/internal/global-setting.js.map +1 -0
  26. package/package.json +1 -1
  27. package/src/automation/analog-threeway-valve/analog-threeway-valve.ts +4 -4
  28. package/src/automation/automation-button/abstract-automation-button-storybook-helpers.ts +3 -0
  29. package/src/automation/automation-button/abstract-automation-button.ts +57 -23
  30. package/src/automation/automation-button/badge-layout.spec.ts +138 -0
  31. package/src/automation/automation-button/badge-layout.ts +120 -0
  32. package/src/automation/digital-threeway-valve/digital-threeway-valve.ts +4 -4
  33. package/src/automation/electricity-battery/electricity-battery.ts +4 -4
  34. package/src/automation/pump/pump.stories.ts +59 -0
  35. package/src/internal/global-setting.spec.ts +119 -0
  36. package/src/internal/global-setting.ts +105 -0
@@ -44,10 +44,10 @@ export declare enum AnalogThreewayValveVariant {
44
44
  * @property orientation - Side the stem points to.
45
45
  * @property flows - Readout rows, one per flow: an optional arrow direction with either a value and optional unit (default `%`) or `open` for an `Open`/`Closed` state.
46
46
  * @property variant - Visual style of the button surround.
47
- * @slot badge-top-right - Content projected into the top-right badge position; overrides `badgeAlert`.
48
- * @slot badge-top-left - Content projected into the top-left badge position; overrides `badgeControl`.
49
- * @slot badge-bottom-left - Content projected into the bottom-left badge position; overrides `badgeInterlock`.
50
- * @slot badge-bottom-right - Content projected into the bottom-right badge position; overrides `badgeCommandLocked`.
47
+ * @slot badge-top-right - Content projected into the top-right badge position; overrides the badge `badgeLayout` puts in that corner.
48
+ * @slot badge-top-left - Content projected into the top-left badge position; overrides the badge `badgeLayout` puts in that corner.
49
+ * @slot badge-bottom-left - Content projected into the bottom-left badge position; overrides the badge `badgeLayout` puts in that corner.
50
+ * @slot badge-bottom-right - Content projected into the bottom-right badge position; overrides the badge `badgeLayout` puts in that corner.
51
51
  * @fires click - Fired when the valve is clicked.
52
52
  * @experimental
53
53
  */
@@ -1 +1 @@
1
- {"version":3,"file":"analog-threeway-valve.js","names":["_decorate"],"sources":["../../../src/automation/analog-threeway-valve/analog-threeway-valve.ts"],"sourcesContent":["import {html} from 'lit';\nimport {property} from 'lit/decorators.js';\nimport '../valve-analog-three-way-icon/valve-analog-three-way-icon.js';\nimport {customElement} from '../../decorator.js';\nimport {ObcAbstractAutomationButton} from '../automation-button/abstract-automation-button.js';\nimport {AutomationButtonReadoutPosition} from '../automation-button/automation-button.js';\nimport {AutomationButtonReadoutStack} from '../../components/automation-button-readout-stack/automation-button-readout-stack.js';\nimport {\n ThreewayValveFlow,\n ThreewayValveOrientation,\n threewayValveOpenSide,\n threewayValveReadouts,\n} from '../threeway-valve-shared/threeway-valve-shared.js';\n\nexport enum AnalogThreewayValveVariant {\n regular = 'regular',\n flat = 'flat',\n}\n\n/**\n * `<obc-analog-threeway-valve>` – three-way control valve for process\n * diagrams, with a continuous opening per port.\n *\n * ## Features\n *\n * - **Three ports:** `open1`, `open2` and `open3` set each port's opening in\n * percent. Ports are numbered from the side without a port: with\n * `orientation` `bottom`, port 1 is left, port 2 is the stem at the bottom\n * and port 3 is right. The numbering turns with the symbol.\n * - **Symbol:** a partly open port shows its shut part as a band at the port\n * end, a port at 0 % is drawn plugged, and the handle shows how the most\n * open port splits between the two others (`obc-valve-analog-three-way-icon`).\n * - **Orientation:** `bottom` and `top` lay the valve on a horizontal pipe,\n * `left` and `right` on a vertical one; the value names the side the stem\n * points to.\n * - **Flow readout:** `flows` lists one readout row per flow, each with an\n * optional arrow direction and either a value with a unit (`%` when left out)\n * or a state, `{open}`, shown as `Open` or `Closed` after the arrow, or\n * after the on/off icon when there is no direction. Without flows the\n * readout shows `Open` or `Closed`.\n * - Badges, alert frame, progress and readout placement come from the shared\n * automation button base.\n *\n * ## Usage Guidelines\n *\n * Use for a mixing or diverting valve that opens its ports continuously.\n * With fewer than two ports open no flow can pass, and the valve shows as\n * closed. For on/off ports use `obc-digital-threeway-valve`; for a two-port\n * control valve use `obc-analog-valve`.\n *\n * @property open1 - Opening of port 1 in percent (0–100).\n * @property open2 - Opening of port 2, the stem, in percent (0–100).\n * @property open3 - Opening of port 3 in percent (0–100).\n * @property orientation - Side the stem points to.\n * @property flows - Readout rows, one per flow: an optional arrow direction with either a value and optional unit (default `%`) or `open` for an `Open`/`Closed` state.\n * @property variant - Visual style of the button surround.\n * @slot badge-top-right - Content projected into the top-right badge position; overrides `badgeAlert`.\n * @slot badge-top-left - Content projected into the top-left badge position; overrides `badgeControl`.\n * @slot badge-bottom-left - Content projected into the bottom-left badge position; overrides `badgeInterlock`.\n * @slot badge-bottom-right - Content projected into the bottom-right badge position; overrides `badgeCommandLocked`.\n * @fires click - Fired when the valve is clicked.\n * @experimental\n */\n@customElement('obc-analog-threeway-valve')\nexport class ObcAnalogThreewayValve extends ObcAbstractAutomationButton {\n @property({type: Number}) open1: number = 0;\n @property({type: Number}) open2: number = 0;\n @property({type: Number}) open3: number = 0;\n @property({type: String}) orientation: ThreewayValveOrientation =\n ThreewayValveOrientation.bottom;\n @property({type: Array, attribute: false}) flows: ThreewayValveFlow[] = [];\n @property({type: String}) variant: AnalogThreewayValveVariant =\n AnalogThreewayValveVariant.regular;\n\n override get _on(): boolean {\n return (\n [this.open1, this.open2, this.open3].filter((o) => o > 0).length >= 2\n );\n }\n\n override get _readoutPosition(): AutomationButtonReadoutPosition {\n return this.readoutPosition ?? threewayValveOpenSide(this.orientation);\n }\n\n override get extraReadouts(): AutomationButtonReadoutStack[] {\n if (!this.showStatus) {\n return [];\n }\n return threewayValveReadouts(this._on, this.flows, this.showStatusIcon);\n }\n\n private renderIcon(slot: string) {\n return html`<obc-valve-analog-three-way-icon\n .open1=${this.open1}\n .open2=${this.open2}\n .open3=${this.open3}\n .orientation=${this.orientation}\n slot=${slot}\n ></obc-valve-analog-three-way-icon>`;\n }\n\n override get icon() {\n return html`${this.renderIcon('icon')}${this.renderIcon('icon-silhouette')}`;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'obc-analog-threeway-valve': ObcAnalogThreewayValve;\n }\n}\n"],"mappings":";;;;;;;;AAcA,IAAY,6BAAL,yBAAA,4BAAA;CACL,2BAAA,aAAA;CACA,2BAAA,UAAA;;AACF,EAAA,CAAA,CAAA;AA+CO,IAAM,yBAAN,MAAM,+BAA+B,4BAA4B;;;EAC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A;AARzB,yBAAAA,WAAA,CAAA,cAAc,2BAA2B,CAAA,GAAA,sBAAA"}
1
+ {"version":3,"file":"analog-threeway-valve.js","names":["_decorate"],"sources":["../../../src/automation/analog-threeway-valve/analog-threeway-valve.ts"],"sourcesContent":["import {html} from 'lit';\nimport {property} from 'lit/decorators.js';\nimport '../valve-analog-three-way-icon/valve-analog-three-way-icon.js';\nimport {customElement} from '../../decorator.js';\nimport {ObcAbstractAutomationButton} from '../automation-button/abstract-automation-button.js';\nimport {AutomationButtonReadoutPosition} from '../automation-button/automation-button.js';\nimport {AutomationButtonReadoutStack} from '../../components/automation-button-readout-stack/automation-button-readout-stack.js';\nimport {\n ThreewayValveFlow,\n ThreewayValveOrientation,\n threewayValveOpenSide,\n threewayValveReadouts,\n} from '../threeway-valve-shared/threeway-valve-shared.js';\n\nexport enum AnalogThreewayValveVariant {\n regular = 'regular',\n flat = 'flat',\n}\n\n/**\n * `<obc-analog-threeway-valve>` – three-way control valve for process\n * diagrams, with a continuous opening per port.\n *\n * ## Features\n *\n * - **Three ports:** `open1`, `open2` and `open3` set each port's opening in\n * percent. Ports are numbered from the side without a port: with\n * `orientation` `bottom`, port 1 is left, port 2 is the stem at the bottom\n * and port 3 is right. The numbering turns with the symbol.\n * - **Symbol:** a partly open port shows its shut part as a band at the port\n * end, a port at 0 % is drawn plugged, and the handle shows how the most\n * open port splits between the two others (`obc-valve-analog-three-way-icon`).\n * - **Orientation:** `bottom` and `top` lay the valve on a horizontal pipe,\n * `left` and `right` on a vertical one; the value names the side the stem\n * points to.\n * - **Flow readout:** `flows` lists one readout row per flow, each with an\n * optional arrow direction and either a value with a unit (`%` when left out)\n * or a state, `{open}`, shown as `Open` or `Closed` after the arrow, or\n * after the on/off icon when there is no direction. Without flows the\n * readout shows `Open` or `Closed`.\n * - Badges, alert frame, progress and readout placement come from the shared\n * automation button base.\n *\n * ## Usage Guidelines\n *\n * Use for a mixing or diverting valve that opens its ports continuously.\n * With fewer than two ports open no flow can pass, and the valve shows as\n * closed. For on/off ports use `obc-digital-threeway-valve`; for a two-port\n * control valve use `obc-analog-valve`.\n *\n * @property open1 - Opening of port 1 in percent (0–100).\n * @property open2 - Opening of port 2, the stem, in percent (0–100).\n * @property open3 - Opening of port 3 in percent (0–100).\n * @property orientation - Side the stem points to.\n * @property flows - Readout rows, one per flow: an optional arrow direction with either a value and optional unit (default `%`) or `open` for an `Open`/`Closed` state.\n * @property variant - Visual style of the button surround.\n * @slot badge-top-right - Content projected into the top-right badge position; overrides the badge `badgeLayout` puts in that corner.\n * @slot badge-top-left - Content projected into the top-left badge position; overrides the badge `badgeLayout` puts in that corner.\n * @slot badge-bottom-left - Content projected into the bottom-left badge position; overrides the badge `badgeLayout` puts in that corner.\n * @slot badge-bottom-right - Content projected into the bottom-right badge position; overrides the badge `badgeLayout` puts in that corner.\n * @fires click - Fired when the valve is clicked.\n * @experimental\n */\n@customElement('obc-analog-threeway-valve')\nexport class ObcAnalogThreewayValve extends ObcAbstractAutomationButton {\n @property({type: Number}) open1: number = 0;\n @property({type: Number}) open2: number = 0;\n @property({type: Number}) open3: number = 0;\n @property({type: String}) orientation: ThreewayValveOrientation =\n ThreewayValveOrientation.bottom;\n @property({type: Array, attribute: false}) flows: ThreewayValveFlow[] = [];\n @property({type: String}) variant: AnalogThreewayValveVariant =\n AnalogThreewayValveVariant.regular;\n\n override get _on(): boolean {\n return (\n [this.open1, this.open2, this.open3].filter((o) => o > 0).length >= 2\n );\n }\n\n override get _readoutPosition(): AutomationButtonReadoutPosition {\n return this.readoutPosition ?? threewayValveOpenSide(this.orientation);\n }\n\n override get extraReadouts(): AutomationButtonReadoutStack[] {\n if (!this.showStatus) {\n return [];\n }\n return threewayValveReadouts(this._on, this.flows, this.showStatusIcon);\n }\n\n private renderIcon(slot: string) {\n return html`<obc-valve-analog-three-way-icon\n .open1=${this.open1}\n .open2=${this.open2}\n .open3=${this.open3}\n .orientation=${this.orientation}\n slot=${slot}\n ></obc-valve-analog-three-way-icon>`;\n }\n\n override get icon() {\n return html`${this.renderIcon('icon')}${this.renderIcon('icon-silhouette')}`;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'obc-analog-threeway-valve': ObcAnalogThreewayValve;\n }\n}\n"],"mappings":";;;;;;;;AAcA,IAAY,6BAAL,yBAAA,4BAAA;CACL,2BAAA,aAAA;CACA,2BAAA,UAAA;;AACF,EAAA,CAAA,CAAA;AA+CO,IAAM,yBAAN,MAAM,+BAA+B,4BAA4B;;;EAC5B,KAAA,QAAA;EACA,KAAA,QAAA;EACA,KAAA,QAAA;EAExC,KAAA,cAAA,yBAAyB;EAC6C,KAAA,QAAA,CAAC;;;CAIzE,IAAa,MAAe;EAC1B,OACE;GAAC,KAAK;GAAO,KAAK;GAAO,KAAK;EAAK,CAAC,CAAC,QAAQ,MAAM,IAAI,CAAC,CAAC,CAAC,UAAU;CAExE;CAEA,IAAa,mBAAoD;EAC/D,OAAO,KAAK,mBAAmB,sBAAsB,KAAK,WAAW;CACvE;CAEA,IAAa,gBAAgD;EAC3D,IAAI,CAAC,KAAK,YACR,OAAO,CAAC;EAEV,OAAO,sBAAsB,KAAK,KAAK,KAAK,OAAO,KAAK,cAAc;CACxE;CAEA,WAAmB,MAAc;EAC/B,OAAO,IAAI;eACA,KAAK,MAAM;eACX,KAAK,MAAM;eACX,KAAK,MAAM;qBACL,KAAK,YAAY;aACzB,KAAK;;CAEhB;CAEA,IAAa,OAAO;EAClB,OAAO,IAAI,GAAG,KAAK,WAAW,MAAM,IAAI,KAAK,WAAW,iBAAiB;CAC3E;AACF;AAvCGA,WAAA,CAAA,SAAS,EAAC,MAAM,OAAM,CAAC,CAAA,GAAA,uBAAA,WAAA,SAAA,KAAA,CAAA;AACvBA,WAAA,CAAA,SAAS,EAAC,MAAM,OAAM,CAAC,CAAA,GAAA,uBAAA,WAAA,SAAA,KAAA,CAAA;AACvBA,WAAA,CAAA,SAAS,EAAC,MAAM,OAAM,CAAC,CAAA,GAAA,uBAAA,WAAA,SAAA,KAAA,CAAA;AACvBA,WAAA,CAAA,SAAS,EAAC,MAAM,OAAM,CAAC,CAAA,GAAA,uBAAA,WAAA,eAAA,KAAA,CAAA;AAEvBA,WAAA,CAAA,SAAS;CAAC,MAAM;CAAO,WAAW;AAAK,CAAC,CAAA,GAAA,uBAAA,WAAA,SAAA,KAAA,CAAA;AACxCA,WAAA,CAAA,SAAS,EAAC,MAAM,OAAM,CAAC,CAAA,GAAA,uBAAA,WAAA,WAAA,KAAA,CAAA;AARzB,yBAAAA,WAAA,CAAA,cAAc,2BAA2B,CAAA,GAAA,sBAAA"}
@@ -33,6 +33,11 @@ export declare const argTypesAbstractAutomationButton: {
33
33
  type: string;
34
34
  };
35
35
  };
36
+ badgeLayout: {
37
+ control: {
38
+ type: string;
39
+ };
40
+ };
36
41
  progressMode: {
37
42
  options: CircularProgressMode[];
38
43
  control: {
@@ -132,6 +137,11 @@ export declare const argTypesAbstractAutomationButtonPassiveRound: {
132
137
  type: string;
133
138
  };
134
139
  };
140
+ badgeLayout: {
141
+ control: {
142
+ type: string;
143
+ };
144
+ };
135
145
  progressMode: {
136
146
  options: CircularProgressMode[];
137
147
  control: {
@@ -243,6 +253,11 @@ export declare const argTypesAbstractAutomationButtonPassiveSquare: {
243
253
  type: string;
244
254
  };
245
255
  };
256
+ badgeLayout: {
257
+ control: {
258
+ type: string;
259
+ };
260
+ };
246
261
  progressMode: {
247
262
  options: CircularProgressMode[];
248
263
  control: {
@@ -384,6 +399,11 @@ export declare const argTypesAbstractAutomationButtonMotorized: {
384
399
  type: string;
385
400
  };
386
401
  };
402
+ badgeLayout: {
403
+ control: {
404
+ type: string;
405
+ };
406
+ };
387
407
  progressMode: {
388
408
  options: CircularProgressMode[];
389
409
  control: {
@@ -1 +1 @@
1
- {"version":3,"file":"abstract-automation-button-storybook-helpers.d.ts","sourceRoot":"","sources":["../../../src/automation/automation-button/abstract-automation-button-storybook-helpers.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,gBAAgB,EAAC,MAAM,2CAA2C,CAAC;AAC3E,OAAO,EACL,yBAAyB,EACzB,8BAA8B,EAC9B,2BAA2B,EAC3B,2BAA2B,EAC5B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAC,oBAAoB,EAAC,MAAM,8DAA8D,CAAC;AAClG,OAAO,EACL,0BAA0B,EAC1B,kCAAkC,EAClC,4BAA4B,EAC5B,8BAA8B,EAC/B,MAAM,iCAAiC,CAAC;AAEzC,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0C5C,CAAC;AAEF,eAAO,MAAM,4CAA4C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAMxD,CAAC;AAEF,eAAO,MAAM,6CAA6C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAWzD,CAAC;AAEF,eAAO,MAAM,yCAAyC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4BrD,CAAC"}
1
+ {"version":3,"file":"abstract-automation-button-storybook-helpers.d.ts","sourceRoot":"","sources":["../../../src/automation/automation-button/abstract-automation-button-storybook-helpers.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,gBAAgB,EAAC,MAAM,2CAA2C,CAAC;AAC3E,OAAO,EACL,yBAAyB,EACzB,8BAA8B,EAC9B,2BAA2B,EAC3B,2BAA2B,EAC5B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAC,oBAAoB,EAAC,MAAM,8DAA8D,CAAC;AAClG,OAAO,EACL,0BAA0B,EAC1B,kCAAkC,EAClC,4BAA4B,EAC5B,8BAA8B,EAC/B,MAAM,iCAAiC,CAAC;AAEzC,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6C5C,CAAC;AAEF,eAAO,MAAM,4CAA4C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAMxD,CAAC;AAEF,eAAO,MAAM,6CAA6C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAWzD,CAAC;AAEF,eAAO,MAAM,yCAAyC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4BrD,CAAC"}
@@ -44,6 +44,7 @@ var argTypesAbstractAutomationButton = {
44
44
  options: Object.values(AutomationButtonBadgeAlert),
45
45
  control: { type: "select" }
46
46
  },
47
+ badgeLayout: { control: { type: "object" } },
47
48
  progressMode: {
48
49
  options: Object.values(CircularProgressMode),
49
50
  control: { type: "select" },
@@ -1 +1 @@
1
- {"version":3,"file":"abstract-automation-button-storybook-helpers.js","names":[],"sources":["../../../src/automation/automation-button/abstract-automation-button-storybook-helpers.ts"],"sourcesContent":["import {argTypesAlertFrame} from '../../components/alert-frame/alert-frame-storybook-helpers.js';\nimport {MotorizedVariant} from './abstract-automation-button-motorized.js';\nimport {\n AutomationButtonDirection,\n AutomationButtonLabelDirection,\n AutomationButtonOrientation,\n AutomationButtonPositioning,\n} from './automation-button.js';\nimport {CircularProgressMode} from '../../building-blocks/circular-progress/circular-progress.js';\nimport {\n AutomationButtonBadgeAlert,\n AutomationButtonBadgeCommandLocked,\n AutomationButtonBadgeControl,\n AutomationButtonBadgeInterlock,\n} from './abstract-automation-button.js';\n\nexport const argTypesAbstractAutomationButton = {\n tag: {\n control: {type: 'text'},\n },\n readoutPosition: {\n options: ['top', 'bottom', 'left', 'right'],\n control: {type: 'radio'},\n },\n readoutSize: {\n options: ['small', 'regular', 'enhanced'],\n control: {type: 'radio'},\n },\n ...argTypesAlertFrame,\n positioning: {\n options: Object.values(AutomationButtonPositioning),\n control: {type: 'select'},\n },\n badgeControl: {\n options: Object.values(AutomationButtonBadgeControl),\n control: {type: 'select'},\n },\n badgeCommandLocked: {\n options: Object.values(AutomationButtonBadgeCommandLocked),\n control: {type: 'select'},\n },\n badgeInterlock: {\n options: Object.values(AutomationButtonBadgeInterlock),\n control: {type: 'select'},\n },\n badgeAlert: {\n options: Object.values(AutomationButtonBadgeAlert),\n control: {type: 'select'},\n },\n progressMode: {\n options: Object.values(CircularProgressMode),\n control: {type: 'select'},\n if: {arg: 'progress'},\n },\n progressValue: {\n control: {type: 'range', min: 0, max: 100, step: 1},\n if: {arg: 'progress'},\n },\n};\n\nexport const argTypesAbstractAutomationButtonPassiveRound = {\n ...argTypesAbstractAutomationButton,\n variant: {\n options: ['regular', 'flat'],\n control: {type: 'radio'},\n },\n};\n\nexport const argTypesAbstractAutomationButtonPassiveSquare = {\n ...argTypesAbstractAutomationButton,\n on: {table: {disable: true}, control: false},\n variant: {\n options: ['square', 'flat'],\n control: {type: 'radio'},\n },\n orientation: {\n options: Object.values(AutomationButtonOrientation),\n control: {type: 'radio'},\n },\n};\n\nexport const argTypesAbstractAutomationButtonMotorized = {\n ...argTypesAbstractAutomationButton,\n on: {table: {disable: true}, control: false},\n speedInPercent: {\n control: {type: 'range', min: 0, max: 100, step: 1},\n description: 'Deprecated, use `speed` together with `speedUnit` instead.',\n },\n speed: {\n control: {type: 'number'},\n },\n speedUnit: {\n control: {type: 'text'},\n },\n speedMaxDigits: {\n control: {type: 'number'},\n },\n labelDirection: {\n options: Object.values(AutomationButtonLabelDirection),\n control: {type: 'radio'},\n },\n direction: {\n options: Object.values(AutomationButtonDirection),\n control: {type: 'radio'},\n },\n variant: {\n options: Object.values(MotorizedVariant),\n control: {type: 'radio'},\n },\n};\n"],"mappings":";;;;;;AAgBA,IAAa,mCAAmC;CAC9C,KAAK,EACH,SAAS,EAAC,MAAM,OAAM,EACxB;CACA,iBAAiB;EACf,SAAS;GAAC;GAAO;GAAU;GAAQ;EAAO;EAC1C,SAAS,EAAC,MAAM,QAAO;CACzB;CACA,aAAa;EACX,SAAS;GAAC;GAAS;GAAW;EAAU;EACxC,SAAS,EAAC,MAAM,QAAO;CACzB;CACA,GAAG;CACH,aAAa;EACX,SAAS,OAAO,OAAO,2BAA2B;EAClD,SAAS,EAAC,MAAM,SAAQ;CAC1B;CACA,cAAc;EACZ,SAAS,OAAO,OAAO,4BAA4B;EACnD,SAAS,EAAC,MAAM,SAAQ;CAC1B;CACA,oBAAoB;EAClB,SAAS,OAAO,OAAO,kCAAkC;EACzD,SAAS,EAAC,MAAM,SAAQ;CAC1B;CACA,gBAAgB;EACd,SAAS,OAAO,OAAO,8BAA8B;EACrD,SAAS,EAAC,MAAM,SAAQ;CAC1B;CACA,YAAY;EACV,SAAS,OAAO,OAAO,0BAA0B;EACjD,SAAS,EAAC,MAAM,SAAQ;CAC1B;CACA,cAAc;EACZ,SAAS,OAAO,OAAO,oBAAoB;EAC3C,SAAS,EAAC,MAAM,SAAQ;EACxB,IAAI,EAAC,KAAK,WAAU;CACtB;CACA,eAAe;EACb,SAAS;GAAC,MAAM;GAAS,KAAK;GAAG,KAAK;GAAK,MAAM;EAAC;EAClD,IAAI,EAAC,KAAK,WAAU;CACtB;AACF;AAEA,IAAa,+CAA+C;CAC1D,GAAG;CACH,SAAS;EACP,SAAS,CAAC,WAAW,MAAM;EAC3B,SAAS,EAAC,MAAM,QAAO;CACzB;AACF;AAEA,IAAa,gDAAgD;CAC3D,GAAG;CACH,IAAI;EAAC,OAAO,EAAC,SAAS,KAAI;EAAG,SAAS;CAAK;CAC3C,SAAS;EACP,SAAS,CAAC,UAAU,MAAM;EAC1B,SAAS,EAAC,MAAM,QAAO;CACzB;CACA,aAAa;EACX,SAAS,OAAO,OAAO,2BAA2B;EAClD,SAAS,EAAC,MAAM,QAAO;CACzB;AACF;AAEA,IAAa,4CAA4C;CACvD,GAAG;CACH,IAAI;EAAC,OAAO,EAAC,SAAS,KAAI;EAAG,SAAS;CAAK;CAC3C,gBAAgB;EACd,SAAS;GAAC,MAAM;GAAS,KAAK;GAAG,KAAK;GAAK,MAAM;EAAC;EAClD,aAAa;CACf;CACA,OAAO,EACL,SAAS,EAAC,MAAM,SAAQ,EAC1B;CACA,WAAW,EACT,SAAS,EAAC,MAAM,OAAM,EACxB;CACA,gBAAgB,EACd,SAAS,EAAC,MAAM,SAAQ,EAC1B;CACA,gBAAgB;EACd,SAAS,OAAO,OAAO,8BAA8B;EACrD,SAAS,EAAC,MAAM,QAAO;CACzB;CACA,WAAW;EACT,SAAS,OAAO,OAAO,yBAAyB;EAChD,SAAS,EAAC,MAAM,QAAO;CACzB;CACA,SAAS;EACP,SAAS,OAAO,OAAO,gBAAgB;EACvC,SAAS,EAAC,MAAM,QAAO;CACzB;AACF"}
1
+ {"version":3,"file":"abstract-automation-button-storybook-helpers.js","names":[],"sources":["../../../src/automation/automation-button/abstract-automation-button-storybook-helpers.ts"],"sourcesContent":["import {argTypesAlertFrame} from '../../components/alert-frame/alert-frame-storybook-helpers.js';\nimport {MotorizedVariant} from './abstract-automation-button-motorized.js';\nimport {\n AutomationButtonDirection,\n AutomationButtonLabelDirection,\n AutomationButtonOrientation,\n AutomationButtonPositioning,\n} from './automation-button.js';\nimport {CircularProgressMode} from '../../building-blocks/circular-progress/circular-progress.js';\nimport {\n AutomationButtonBadgeAlert,\n AutomationButtonBadgeCommandLocked,\n AutomationButtonBadgeControl,\n AutomationButtonBadgeInterlock,\n} from './abstract-automation-button.js';\n\nexport const argTypesAbstractAutomationButton = {\n tag: {\n control: {type: 'text'},\n },\n readoutPosition: {\n options: ['top', 'bottom', 'left', 'right'],\n control: {type: 'radio'},\n },\n readoutSize: {\n options: ['small', 'regular', 'enhanced'],\n control: {type: 'radio'},\n },\n ...argTypesAlertFrame,\n positioning: {\n options: Object.values(AutomationButtonPositioning),\n control: {type: 'select'},\n },\n badgeControl: {\n options: Object.values(AutomationButtonBadgeControl),\n control: {type: 'select'},\n },\n badgeCommandLocked: {\n options: Object.values(AutomationButtonBadgeCommandLocked),\n control: {type: 'select'},\n },\n badgeInterlock: {\n options: Object.values(AutomationButtonBadgeInterlock),\n control: {type: 'select'},\n },\n badgeAlert: {\n options: Object.values(AutomationButtonBadgeAlert),\n control: {type: 'select'},\n },\n badgeLayout: {\n control: {type: 'object'},\n },\n progressMode: {\n options: Object.values(CircularProgressMode),\n control: {type: 'select'},\n if: {arg: 'progress'},\n },\n progressValue: {\n control: {type: 'range', min: 0, max: 100, step: 1},\n if: {arg: 'progress'},\n },\n};\n\nexport const argTypesAbstractAutomationButtonPassiveRound = {\n ...argTypesAbstractAutomationButton,\n variant: {\n options: ['regular', 'flat'],\n control: {type: 'radio'},\n },\n};\n\nexport const argTypesAbstractAutomationButtonPassiveSquare = {\n ...argTypesAbstractAutomationButton,\n on: {table: {disable: true}, control: false},\n variant: {\n options: ['square', 'flat'],\n control: {type: 'radio'},\n },\n orientation: {\n options: Object.values(AutomationButtonOrientation),\n control: {type: 'radio'},\n },\n};\n\nexport const argTypesAbstractAutomationButtonMotorized = {\n ...argTypesAbstractAutomationButton,\n on: {table: {disable: true}, control: false},\n speedInPercent: {\n control: {type: 'range', min: 0, max: 100, step: 1},\n description: 'Deprecated, use `speed` together with `speedUnit` instead.',\n },\n speed: {\n control: {type: 'number'},\n },\n speedUnit: {\n control: {type: 'text'},\n },\n speedMaxDigits: {\n control: {type: 'number'},\n },\n labelDirection: {\n options: Object.values(AutomationButtonLabelDirection),\n control: {type: 'radio'},\n },\n direction: {\n options: Object.values(AutomationButtonDirection),\n control: {type: 'radio'},\n },\n variant: {\n options: Object.values(MotorizedVariant),\n control: {type: 'radio'},\n },\n};\n"],"mappings":";;;;;;AAgBA,IAAa,mCAAmC;CAC9C,KAAK,EACH,SAAS,EAAC,MAAM,OAAM,EACxB;CACA,iBAAiB;EACf,SAAS;GAAC;GAAO;GAAU;GAAQ;EAAO;EAC1C,SAAS,EAAC,MAAM,QAAO;CACzB;CACA,aAAa;EACX,SAAS;GAAC;GAAS;GAAW;EAAU;EACxC,SAAS,EAAC,MAAM,QAAO;CACzB;CACA,GAAG;CACH,aAAa;EACX,SAAS,OAAO,OAAO,2BAA2B;EAClD,SAAS,EAAC,MAAM,SAAQ;CAC1B;CACA,cAAc;EACZ,SAAS,OAAO,OAAO,4BAA4B;EACnD,SAAS,EAAC,MAAM,SAAQ;CAC1B;CACA,oBAAoB;EAClB,SAAS,OAAO,OAAO,kCAAkC;EACzD,SAAS,EAAC,MAAM,SAAQ;CAC1B;CACA,gBAAgB;EACd,SAAS,OAAO,OAAO,8BAA8B;EACrD,SAAS,EAAC,MAAM,SAAQ;CAC1B;CACA,YAAY;EACV,SAAS,OAAO,OAAO,0BAA0B;EACjD,SAAS,EAAC,MAAM,SAAQ;CAC1B;CACA,aAAa,EACX,SAAS,EAAC,MAAM,SAAQ,EAC1B;CACA,cAAc;EACZ,SAAS,OAAO,OAAO,oBAAoB;EAC3C,SAAS,EAAC,MAAM,SAAQ;EACxB,IAAI,EAAC,KAAK,WAAU;CACtB;CACA,eAAe;EACb,SAAS;GAAC,MAAM;GAAS,KAAK;GAAG,KAAK;GAAK,MAAM;EAAC;EAClD,IAAI,EAAC,KAAK,WAAU;CACtB;AACF;AAEA,IAAa,+CAA+C;CAC1D,GAAG;CACH,SAAS;EACP,SAAS,CAAC,WAAW,MAAM;EAC3B,SAAS,EAAC,MAAM,QAAO;CACzB;AACF;AAEA,IAAa,gDAAgD;CAC3D,GAAG;CACH,IAAI;EAAC,OAAO,EAAC,SAAS,KAAI;EAAG,SAAS;CAAK;CAC3C,SAAS;EACP,SAAS,CAAC,UAAU,MAAM;EAC1B,SAAS,EAAC,MAAM,QAAO;CACzB;CACA,aAAa;EACX,SAAS,OAAO,OAAO,2BAA2B;EAClD,SAAS,EAAC,MAAM,QAAO;CACzB;AACF;AAEA,IAAa,4CAA4C;CACvD,GAAG;CACH,IAAI;EAAC,OAAO,EAAC,SAAS,KAAI;EAAG,SAAS;CAAK;CAC3C,gBAAgB;EACd,SAAS;GAAC,MAAM;GAAS,KAAK;GAAG,KAAK;GAAK,MAAM;EAAC;EAClD,aAAa;CACf;CACA,OAAO,EACL,SAAS,EAAC,MAAM,SAAQ,EAC1B;CACA,WAAW,EACT,SAAS,EAAC,MAAM,OAAM,EACxB;CACA,gBAAgB,EACd,SAAS,EAAC,MAAM,SAAQ,EAC1B;CACA,gBAAgB;EACd,SAAS,OAAO,OAAO,8BAA8B;EACrD,SAAS,EAAC,MAAM,QAAO;CACzB;CACA,WAAW;EACT,SAAS,OAAO,OAAO,yBAAyB;EAChD,SAAS,EAAC,MAAM,QAAO;CACzB;CACA,SAAS;EACP,SAAS,OAAO,OAAO,gBAAgB;EACvC,SAAS,EAAC,MAAM,QAAO;CACzB;AACF"}
@@ -5,6 +5,7 @@ import { AutomationButtonReadoutStack, AutomationButtonReadoutStackSize } from '
5
5
  import { ObcAlertFrameThickness, ObcAlertFrameType, ObcAlertFrameMode } from '../../components/alert-frame/alert-frame.js';
6
6
  import { AlertType } from '../../types.js';
7
7
  import { CircularProgressMode } from '../../building-blocks/circular-progress/circular-progress.js';
8
+ import { AutomationButtonBadgeLayout } from './badge-layout.js';
8
9
  import '../automation-button/automation-button.js';
9
10
  import '../automation-badge/automation-badge.js';
10
11
  export declare enum AutomationButtonBadgeAlert {
@@ -44,8 +45,11 @@ export declare enum AutomationButtonBadgeCommandLocked {
44
45
  *
45
46
  * Renders an `<obc-automation-button>` with the shared surface every device
46
47
  * button needs: the readout stack and its status row, the alert frame, the
47
- * circular progress indicator, and the four badge corners (control, alert,
48
- * interlock, command-locked) with their slots and enum-driven fallbacks.
48
+ * circular progress indicator, and the four badge corners with their slots and
49
+ * enum-driven fallbacks. Which badge goes in which corner follows the badge
50
+ * layout (`badge-layout.ts`): control top-left, alert top-right, interlock
51
+ * bottom-left and command-locked bottom-right unless the app or `badgeLayout`
52
+ * moves them.
49
53
  *
50
54
  * ## Usage Guidelines
51
55
  *
@@ -67,6 +71,7 @@ export declare enum AutomationButtonBadgeCommandLocked {
67
71
  * @availableWhen alertFrameMode alert==true
68
72
  * @availableWhen showAlertCategoryIcon alert==true && alertFrameType in [SmallSideFlip, LargeSideFlip, BottomFlip, TopFlip]
69
73
  * @availableWhen showAlertIcon alert==true && alertFrameType in [LargeSideFlip, BottomFlip, TopFlip]
74
+ * @property badgeLayout - Which badge kind each corner shows, on top of the app-wide layout set with `setAutomationBadgeLayout()`. A corner left out keeps the app-wide badge, `null` leaves it empty, and a badge moved here leaves the corner it came from.
70
75
  * @property progress - Shows a progress indicator, used to indicate that an user action is in progress
71
76
  * @availableWhen progressMode progress==true
72
77
  * @availableWhen progressValue progress==true && progressMode in [determinate, progressiveIndeterminate]
@@ -110,6 +115,9 @@ export declare class ObcAbstractAutomationButton extends LitElement {
110
115
  badgeCommandLocked: AutomationButtonBadgeCommandLocked;
111
116
  badgeInterlock: AutomationButtonBadgeInterlock;
112
117
  badgeAlert: AutomationButtonBadgeAlert;
118
+ /** Which badge kind each corner shows, on top of the app-wide layout set with `setAutomationBadgeLayout()`. A corner left out keeps the app-wide badge, `null` leaves it empty, and a badge moved here leaves the corner it came from. */
119
+ badgeLayout: AutomationButtonBadgeLayout | undefined;
120
+ private readonly _badgeLayout;
113
121
  get icon(): TemplateResult;
114
122
  get _on(): boolean;
115
123
  get _variant(): AutomationButtonVariant;
@@ -133,6 +141,7 @@ export declare class ObcAbstractAutomationButton extends LitElement {
133
141
  protected get _isVertical(): boolean;
134
142
  private getBadgeSpacer;
135
143
  private handleBadgeSlotChange;
144
+ private getBadgeType;
136
145
  private getBadgeAlertType;
137
146
  private getBadgeControlType;
138
147
  private getBadgeInterlockType;
@@ -1 +1 @@
1
- {"version":3,"file":"abstract-automation-button.d.ts","sourceRoot":"","sources":["../../../src/automation/automation-button/abstract-automation-button.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EAGf,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,kBAAkB,EAClB,UAAU,EACV,cAAc,EAGf,MAAM,KAAK,CAAC;AAEb,OAAO,2CAA2C,CAAC;AACnD,OAAO,EACL,yBAAyB,EACzB,8BAA8B,EAC9B,0BAA0B,EAC1B,2BAA2B,EAC3B,2BAA2B,EAC3B,+BAA+B,EAC/B,iCAAiC,EAEjC,uBAAuB,EACxB,MAAM,2CAA2C,CAAC;AACnD,OAAO,EACL,4BAA4B,EAC5B,gCAAgC,EACjC,MAAM,qFAAqF,CAAC;AAC7F,OAAO,EACL,sBAAsB,EACtB,iBAAiB,EACjB,iBAAiB,EAClB,MAAM,6CAA6C,CAAC;AACrD,OAAO,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AACzC,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAC,oBAAoB,EAAC,MAAM,8DAA8D,CAAC;AAElG,oBAAY,0BAA0B;IACpC,IAAI,SAAS;IACb,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,KAAK,UAAU;IACf,aAAa,mBAAmB;IAChC,SAAS,eAAe;IACxB,WAAW,iBAAiB;IAC5B,QAAQ,cAAc;IACtB,eAAe,qBAAqB;CACrC;AAED,oBAAY,8BAA8B;IACxC,IAA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,IAAI,uBAAuB,CAGtC;IAED,IAAI,YAAY,IAAI,2BAA2B,CAE9C;IAED,IAAI,UAAU,IAAI,yBAAyB,CAK1C;IAED,IAAI,aAAa,IAAI,4BAA4B,EAAE,CAElD;IAED,gEAAgE;IAChE,IAAI,eAAe,IAAI,MAAM,GAAG,IAAI,CAEnC;IAED,IAAI,eAAe,IAAI,8BAA8B,CAEpD;IAED,IAAI,WAAW,IAAI,0BAA0B,CAE5C;IAED,IAAI,OAAO,IAAI,kBAAkB,GAAG,KAAK,CAExC;IAED,2EAA2E;IAC3E,SAAS,CAAC,iBAAiB,CACzB,MAAM,EAAE,cAAc,GACrB,kBAAkB,GAAG,KAAK;IAa7B,IAAI,kBAAkB,IAAI,iCAAiC,CAE1D;IAGD,aAAa,EAAG,WAAW,EAAE,CAAC;IAE9B,YAAY,EAAG,WAAW,EAAE,CAAC;IAE7B,eAAe,EAAG,WAAW,EAAE,CAAC;IAEhC,gBAAgB,EAAG,WAAW,EAAE,CAAC;IAEjC,SAAS,KAAK,gBAAgB,IAAI,+BAA+B,CAOhE;IAED,gGAAgG;IAChG,SAAS,KAAK,WAAW,IAAI,OAAO,CAKnC;IAED,OAAO,CAAC,cAAc;IA8BtB,OAAO,CAAC,qBAAqB;IAI7B,OAAO,CAAC,iBAAiB;IAyBzB,OAAO,CAAC,mBAAmB;IAe3B,OAAO,CAAC,qBAAqB;IAe7B,OAAO,CAAC,yBAAyB;IAcxB,MAAM;CA8FhB"}
1
+ {"version":3,"file":"abstract-automation-button.d.ts","sourceRoot":"","sources":["../../../src/automation/automation-button/abstract-automation-button.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EAGf,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,kBAAkB,EAClB,UAAU,EACV,cAAc,EAGf,MAAM,KAAK,CAAC;AAEb,OAAO,2CAA2C,CAAC;AACnD,OAAO,EACL,yBAAyB,EACzB,8BAA8B,EAC9B,0BAA0B,EAC1B,2BAA2B,EAC3B,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AiC,CAE1D;IAGD,aAAa,EAAG,WAAW,EAAE,CAAC;IAE9B,YAAY,EAAG,WAAW,EAAE,CAAC;IAE7B,eAAe,EAAG,WAAW,EAAE,CAAC;IAEhC,gBAAgB,EAAG,WAAW,EAAE,CAAC;IAEjC,SAAS,KAAK,gBAAgB,IAAI,+BAA+B,CAOhE;IAED,gGAAgG;IAChG,SAAS,KAAK,WAAW,IAAI,OAAO,CAKnC;IAED,OAAO,CAAC,cAAc;IA6BtB,OAAO,CAAC,qBAAqB;IAI7B,OAAO,CAAC,YAAY;IAiBpB,OAAO,CAAC,iBAAiB;IAyBzB,OAAO,CAAC,mBAAmB;IAe3B,OAAO,CAAC,qBAAqB;IAe7B,OAAO,CAAC,yBAAyB;IAcxB,MAAM;CAiGhB"}
@@ -5,6 +5,7 @@ import { ObcAlertFrameMode, ObcAlertFrameThickness, ObcAlertFrameType } from "..
5
5
  import { AlertType } from "../../types.js";
6
6
  import { ObcAutomationBadgeType } from "../automation-badge/automation-badge.js";
7
7
  import { CircularProgressMode } from "../../building-blocks/circular-progress/circular-progress.js";
8
+ import { AutomationButtonBadgeKind, BadgeLayoutController } from "./badge-layout.js";
8
9
  import __decorate from "../../_virtual/_@oxc-project_runtime@0.156.0/helpers/esm/decorate.js";
9
10
  import { LitElement, html, nothing } from "lit";
10
11
  import { property, queryAssignedElements } from "lit/decorators.js";
@@ -50,8 +51,11 @@ var AutomationButtonBadgeCommandLocked = /* @__PURE__ */ function(AutomationButt
50
51
  *
51
52
  * Renders an `<obc-automation-button>` with the shared surface every device
52
53
  * button needs: the readout stack and its status row, the alert frame, the
53
- * circular progress indicator, and the four badge corners (control, alert,
54
- * interlock, command-locked) with their slots and enum-driven fallbacks.
54
+ * circular progress indicator, and the four badge corners with their slots and
55
+ * enum-driven fallbacks. Which badge goes in which corner follows the badge
56
+ * layout (`badge-layout.ts`): control top-left, alert top-right, interlock
57
+ * bottom-left and command-locked bottom-right unless the app or `badgeLayout`
58
+ * moves them.
55
59
  *
56
60
  * ## Usage Guidelines
57
61
  *
@@ -73,6 +77,7 @@ var AutomationButtonBadgeCommandLocked = /* @__PURE__ */ function(AutomationButt
73
77
  * @availableWhen alertFrameMode alert==true
74
78
  * @availableWhen showAlertCategoryIcon alert==true && alertFrameType in [SmallSideFlip, LargeSideFlip, BottomFlip, TopFlip]
75
79
  * @availableWhen showAlertIcon alert==true && alertFrameType in [LargeSideFlip, BottomFlip, TopFlip]
80
+ * @property badgeLayout - Which badge kind each corner shows, on top of the app-wide layout set with `setAutomationBadgeLayout()`. A corner left out keeps the app-wide badge, `null` leaves it empty, and a badge moved here leaves the corner it came from.
76
81
  * @property progress - Shows a progress indicator, used to indicate that an user action is in progress
77
82
  * @availableWhen progressMode progress==true
78
83
  * @availableWhen progressValue progress==true && progressMode in [determinate, progressiveIndeterminate]
@@ -103,6 +108,8 @@ var ObcAbstractAutomationButton = class extends LitElement {
103
108
  this.badgeCommandLocked = "none";
104
109
  this.badgeInterlock = "none";
105
110
  this.badgeAlert = "none";
111
+ this.badgeLayout = void 0;
112
+ this._badgeLayout = new BadgeLayoutController(this);
106
113
  }
107
114
  get icon() {
108
115
  throw new Error("Method \"icon\" must be implemented in subclass");
@@ -153,12 +160,12 @@ var ObcAbstractAutomationButton = class extends LitElement {
153
160
  get _isVertical() {
154
161
  return this._orientation !== AutomationButtonOrientation.horizontal || "vertical" in this && Boolean(this.vertical);
155
162
  }
156
- getBadgeSpacer() {
163
+ getBadgeSpacer(badges) {
157
164
  if (!this.showReadoutStack) return false;
158
- const topLeft = this.badgeTopLeft.length > 0 || this.getBadgeControlType() !== null;
159
- const topRight = this.badgeTopRight.length > 0 || this.getBadgeAlertType() !== null;
160
- const bottomLeft = this.badgeBottomLeft.length > 0 || this.getBadgeInterlockType() !== null;
161
- const bottomRight = this.badgeBottomRight.length > 0 || this.getBadgeCommandLockedType() !== null;
165
+ const topLeft = this.badgeTopLeft.length > 0 || badges.topLeft !== null;
166
+ const topRight = this.badgeTopRight.length > 0 || badges.topRight !== null;
167
+ const bottomLeft = this.badgeBottomLeft.length > 0 || badges.bottomLeft !== null;
168
+ const bottomRight = this.badgeBottomRight.length > 0 || badges.bottomRight !== null;
162
169
  if (this._readoutPosition === AutomationButtonReadoutPosition.top) return topRight || topLeft;
163
170
  else if (this._readoutPosition === AutomationButtonReadoutPosition.bottom) return bottomLeft || bottomRight;
164
171
  else if (this._readoutPosition === AutomationButtonReadoutPosition.left) return topLeft || bottomLeft;
@@ -168,6 +175,15 @@ var ObcAbstractAutomationButton = class extends LitElement {
168
175
  handleBadgeSlotChange() {
169
176
  this.requestUpdate();
170
177
  }
178
+ getBadgeType(kind) {
179
+ switch (kind) {
180
+ case AutomationButtonBadgeKind.Control: return this.getBadgeControlType();
181
+ case AutomationButtonBadgeKind.Alert: return this.getBadgeAlertType();
182
+ case AutomationButtonBadgeKind.Interlock: return this.getBadgeInterlockType();
183
+ case AutomationButtonBadgeKind.CommandLocked: return this.getBadgeCommandLockedType();
184
+ default: return null;
185
+ }
186
+ }
171
187
  getBadgeAlertType() {
172
188
  if (this.badgeAlert === "silence") return ObcAutomationBadgeType.AlertSilenced;
173
189
  else if (this.badgeAlert === "shelved") return ObcAutomationBadgeType.AlertShelved;
@@ -202,10 +218,13 @@ var ObcAbstractAutomationButton = class extends LitElement {
202
218
  }
203
219
  render() {
204
220
  const readouts = [...this.extraReadouts];
205
- const badgeAlertType = this.getBadgeAlertType();
206
- const badgeControlType = this.getBadgeControlType();
207
- const badgeInterlockType = this.getBadgeInterlockType();
208
- const badgeCommandLockedType = this.getBadgeCommandLockedType();
221
+ const layout = this._badgeLayout.resolve(this.badgeLayout);
222
+ const badges = {
223
+ topLeft: this.getBadgeType(layout.topLeft),
224
+ topRight: this.getBadgeType(layout.topRight),
225
+ bottomLeft: this.getBadgeType(layout.bottomLeft),
226
+ bottomRight: this.getBadgeType(layout.bottomRight)
227
+ };
209
228
  return html`<obc-automation-button
210
229
  .state=${this._on ? AutomationButtonState.open : AutomationButtonState.closed}
211
230
  .readouts=${readouts}
@@ -227,7 +246,7 @@ var ObcAbstractAutomationButton = class extends LitElement {
227
246
  .variant=${this._variant}
228
247
  .direction=${this._direction}
229
248
  .orientation=${this._orientation}
230
- .hasBadgeSpacer=${this.getBadgeSpacer()}
249
+ .hasBadgeSpacer=${this.getBadgeSpacer(badges)}
231
250
  .handlePosition=${this._handlePosition}
232
251
  .static=${this.static}
233
252
  .handleSize=${this._handleSize}
@@ -241,8 +260,8 @@ var ObcAbstractAutomationButton = class extends LitElement {
241
260
  slot="badge-top-right"
242
261
  @slotchange=${this.handleBadgeSlotChange}
243
262
  >
244
- ${badgeAlertType ? html`<obc-automation-badge
245
- .type=${badgeAlertType}
263
+ ${badges.topRight ? html`<obc-automation-badge
264
+ .type=${badges.topRight}
246
265
  ></obc-automation-badge>` : nothing}
247
266
  </slot>
248
267
  <slot
@@ -250,8 +269,8 @@ var ObcAbstractAutomationButton = class extends LitElement {
250
269
  slot="badge-top-left"
251
270
  @slotchange=${this.handleBadgeSlotChange}
252
271
  >
253
- ${badgeControlType ? html`<obc-automation-badge
254
- .type=${badgeControlType}
272
+ ${badges.topLeft ? html`<obc-automation-badge
273
+ .type=${badges.topLeft}
255
274
  ></obc-automation-badge>` : nothing}
256
275
  </slot>
257
276
  <slot
@@ -259,8 +278,8 @@ var ObcAbstractAutomationButton = class extends LitElement {
259
278
  slot="badge-bottom-left"
260
279
  @slotchange=${this.handleBadgeSlotChange}
261
280
  >
262
- ${badgeInterlockType ? html`<obc-automation-badge
263
- .type=${badgeInterlockType}
281
+ ${badges.bottomLeft ? html`<obc-automation-badge
282
+ .type=${badges.bottomLeft}
264
283
  ></obc-automation-badge>` : nothing}
265
284
  </slot>
266
285
  <slot
@@ -268,8 +287,8 @@ var ObcAbstractAutomationButton = class extends LitElement {
268
287
  slot="badge-bottom-right"
269
288
  @slotchange=${this.handleBadgeSlotChange}
270
289
  >
271
- ${badgeCommandLockedType ? html`<obc-automation-badge
272
- .type=${badgeCommandLockedType}
290
+ ${badges.bottomRight ? html`<obc-automation-badge
291
+ .type=${badges.bottomRight}
273
292
  ></obc-automation-badge>` : nothing}
274
293
  </slot>
275
294
  ${this._handle !== false ? this._handle : nothing}
@@ -311,6 +330,7 @@ __decorate([property({ type: String })], ObcAbstractAutomationButton.prototype,
311
330
  __decorate([property({ type: String })], ObcAbstractAutomationButton.prototype, "badgeCommandLocked", void 0);
312
331
  __decorate([property({ type: String })], ObcAbstractAutomationButton.prototype, "badgeInterlock", void 0);
313
332
  __decorate([property({ type: String })], ObcAbstractAutomationButton.prototype, "badgeAlert", void 0);
333
+ __decorate([property({ attribute: false })], ObcAbstractAutomationButton.prototype, "badgeLayout", void 0);
314
334
  __decorate([queryAssignedElements({ slot: "badge-top-right" })], ObcAbstractAutomationButton.prototype, "badgeTopRight", void 0);
315
335
  __decorate([queryAssignedElements({ slot: "badge-top-left" })], ObcAbstractAutomationButton.prototype, "badgeTopLeft", void 0);
316
336
  __decorate([queryAssignedElements({ slot: "badge-bottom-left" })], ObcAbstractAutomationButton.prototype, "badgeBottomLeft", void 0);
@@ -1 +1 @@
1
- {"version":3,"file":"abstract-automation-button.js","names":["_decorate"],"sources":["../../../src/automation/automation-button/abstract-automation-button.ts"],"sourcesContent":["import {\n ObcValveHandle,\n ValveHandleState,\n valveHandleIcon,\n} from './valve-handle.js';\nimport {\n HTMLTemplateResult,\n LitElement,\n TemplateResult,\n html,\n nothing,\n} from 'lit';\nimport {property, queryAssignedElements} from 'lit/decorators.js';\nimport '../automation-button/automation-button.js';\nimport {\n AutomationButtonDirection,\n AutomationButtonHandlePosition,\n AutomationButtonHandleSize,\n AutomationButtonOrientation,\n AutomationButtonPositioning,\n AutomationButtonReadoutPosition,\n AutomationButtonSelfActuationLine,\n AutomationButtonState,\n AutomationButtonVariant,\n} from '../automation-button/automation-button.js';\nimport {\n AutomationButtonReadoutStack,\n AutomationButtonReadoutStackSize,\n} from '../../components/automation-button-readout-stack/automation-button-readout-stack.js';\nimport {\n ObcAlertFrameThickness,\n ObcAlertFrameType,\n ObcAlertFrameMode,\n} from '../../components/alert-frame/alert-frame.js';\nimport {AlertType} from '../../types.js';\nimport '../automation-badge/automation-badge.js';\nimport {ObcAutomationBadgeType} from '../automation-badge/automation-badge.js';\nimport {CircularProgressMode} from '../../building-blocks/circular-progress/circular-progress.js';\n\nexport enum AutomationButtonBadgeAlert {\n None = 'none',\n Silence = 'silence',\n Shelved = 'shelved',\n Caution = 'caution',\n Warning = 'warning',\n Alarm = 'alarm',\n LevelCritical = 'level-critical',\n LevelHigh = 'level-high',\n LevelMedium = 'level-medium',\n LevelLow = 'level-low',\n LevelDiagnostic = 'level-diagnostic',\n}\n\nexport enum AutomationButtonBadgeInterlock {\n None = 'none',\n Interlock = 'interlock',\n InterlockInhibit = 'interlock-inhibit',\n Simulation = 'simulation',\n}\n\nexport enum AutomationButtonBadgeControl {\n None = 'none',\n Local = 'local',\n LocalOnly = 'local-only',\n Manual = 'manual',\n ManualOnly = 'manual-only',\n Auto = 'auto',\n}\n\nexport enum AutomationButtonBadgeCommandLocked {\n None = 'none',\n CommandLocked = 'command-locked',\n Simulation = 'simulation',\n}\n\n/**\n * Base class for the automation device buttons.\n *\n * Renders an `<obc-automation-button>` with the shared surface every device\n * button needs: the readout stack and its status row, the alert frame, the\n * circular progress indicator, and the four badge corners (control, alert,\n * interlock, command-locked) with their slots and enum-driven fallbacks.\n *\n * ## Usage Guidelines\n *\n * Not registered as a custom element. A subclass supplies the device\n * rendering through `icon`, `_on` and `_variant`, and may add rows to the\n * readout stack through `extraReadouts`. `ObcAbstractAutomationButtonSquared`\n * and `ObcAbstractAutomationButtonMotorized` extend it further;\n * `obc-analog-valve` and `obc-digital-valve` extend it directly.\n *\n * @property static - Draws the device as present with its state unknown: a grey button, and the static icon where the device has one.\n * @availableWhen readoutPosition showReadoutStack==true\n * @availableWhen showStatus showReadoutStack==true\n * @availableWhen readoutSize showReadoutStack==true\n * @availableWhen tag showReadoutStack==true\n * @property activated - Enables the activated background color, used to indicate that the button is activated/selected.\n * @availableWhen alertFrameType alert==true\n * @availableWhen alertFrameThickness alert==true\n * @availableWhen alertFrameStatus alert==true\n * @availableWhen alertFrameMode alert==true\n * @availableWhen showAlertCategoryIcon alert==true && alertFrameType in [SmallSideFlip, LargeSideFlip, BottomFlip, TopFlip]\n * @availableWhen showAlertIcon alert==true && alertFrameType in [LargeSideFlip, BottomFlip, TopFlip]\n * @property progress - Shows a progress indicator, used to indicate that an user action is in progress\n * @availableWhen progressMode progress==true\n * @availableWhen progressValue progress==true && progressMode in [determinate, progressiveIndeterminate]\n */\nexport class ObcAbstractAutomationButton extends LitElement {\n @property({type: Boolean, attribute: false}) showReadoutStack: boolean = true;\n @property({type: Boolean}) static: boolean = false;\n @property({type: String}) readoutPosition:\n AutomationButtonReadoutPosition | undefined = undefined;\n @property({type: Boolean, attribute: false}) showStatus: boolean = true;\n @property({type: Boolean, attribute: false}) showStatusIcon: boolean = false;\n @property({type: String}) readoutSize: AutomationButtonReadoutStackSize =\n AutomationButtonReadoutStackSize.regular;\n @property({type: String}) tag: string | null = null;\n\n @property({type: String}) positioning: AutomationButtonPositioning =\n AutomationButtonPositioning.point;\n @property({type: Boolean}) activated: boolean = false;\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 @property({type: Boolean}) progress: boolean = false;\n @property({type: String}) progressMode: CircularProgressMode =\n CircularProgressMode.indeterminate;\n @property({type: Number}) progressValue: number = 0;\n\n @property({type: String}) badgeControl: AutomationButtonBadgeControl =\n AutomationButtonBadgeControl.None;\n @property({type: String})\n badgeCommandLocked: AutomationButtonBadgeCommandLocked =\n AutomationButtonBadgeCommandLocked.None;\n @property({type: String}) badgeInterlock: AutomationButtonBadgeInterlock =\n AutomationButtonBadgeInterlock.None;\n @property({type: String}) badgeAlert: AutomationButtonBadgeAlert =\n AutomationButtonBadgeAlert.None;\n\n get icon(): TemplateResult {\n throw new Error('Method \"icon\" must be implemented in subclass');\n }\n\n get _on(): boolean {\n throw new Error('Method \"_on\" must be implemented in subclass');\n }\n\n get _variant(): AutomationButtonVariant {\n // @ts-expect-error - property should be defined in subclass\n return this.variant as AutomationButtonVariant;\n }\n\n get _orientation(): AutomationButtonOrientation {\n return AutomationButtonOrientation.horizontal;\n }\n\n get _direction(): AutomationButtonDirection {\n if ('direction' in this) {\n return this.direction as AutomationButtonDirection;\n }\n return AutomationButtonDirection.forward;\n }\n\n get extraReadouts(): AutomationButtonReadoutStack[] {\n return [];\n }\n\n /** Name of a device that can render with no text of its own. */\n get _accessibleName(): string | null {\n return null;\n }\n\n get _handlePosition(): AutomationButtonHandlePosition {\n return AutomationButtonHandlePosition.none;\n }\n\n get _handleSize(): AutomationButtonHandleSize {\n return AutomationButtonHandleSize.regular;\n }\n\n get _handle(): HTMLTemplateResult | false {\n return false;\n }\n\n /** The given handle on this device's side, in the colours of its state. */\n protected renderValveHandle(\n handle: ObcValveHandle\n ): HTMLTemplateResult | false {\n let state = this._on ? ValveHandleState.on : ValveHandleState.off;\n if (this.static) {\n state = ValveHandleState.static;\n }\n return valveHandleIcon(\n handle,\n this._handlePosition,\n state,\n this._handleSize\n );\n }\n\n get _selfActuationLine(): AutomationButtonSelfActuationLine {\n return AutomationButtonSelfActuationLine.none;\n }\n\n @queryAssignedElements({slot: 'badge-top-right'})\n badgeTopRight!: HTMLElement[];\n @queryAssignedElements({slot: 'badge-top-left'})\n badgeTopLeft!: HTMLElement[];\n @queryAssignedElements({slot: 'badge-bottom-left'})\n badgeBottomLeft!: HTMLElement[];\n @queryAssignedElements({slot: 'badge-bottom-right'})\n badgeBottomRight!: HTMLElement[];\n\n protected get _readoutPosition(): AutomationButtonReadoutPosition {\n if (this.readoutPosition) {\n return this.readoutPosition;\n }\n return this._isVertical\n ? AutomationButtonReadoutPosition.left\n : AutomationButtonReadoutPosition.bottom;\n }\n\n /** True when the device sits on a vertical pipe, which puts the default readout on the left. */\n protected get _isVertical(): boolean {\n return (\n this._orientation !== AutomationButtonOrientation.horizontal ||\n ('vertical' in this && Boolean(this.vertical))\n );\n }\n\n private getBadgeSpacer(): boolean {\n if (!this.showReadoutStack) {\n return false;\n }\n\n const topLeft =\n this.badgeTopLeft.length > 0 || this.getBadgeControlType() !== null;\n const topRight =\n this.badgeTopRight.length > 0 || this.getBadgeAlertType() !== null;\n const bottomLeft =\n this.badgeBottomLeft.length > 0 || this.getBadgeInterlockType() !== null;\n const bottomRight =\n this.badgeBottomRight.length > 0 ||\n this.getBadgeCommandLockedType() !== null;\n if (this._readoutPosition === AutomationButtonReadoutPosition.top) {\n return topRight || topLeft;\n } else if (\n this._readoutPosition === AutomationButtonReadoutPosition.bottom\n ) {\n return bottomLeft || bottomRight;\n } else if (this._readoutPosition === AutomationButtonReadoutPosition.left) {\n return topLeft || bottomLeft;\n } else if (\n this._readoutPosition === AutomationButtonReadoutPosition.right\n ) {\n return topRight || bottomRight;\n }\n return false;\n }\n\n private handleBadgeSlotChange() {\n this.requestUpdate();\n }\n\n private getBadgeAlertType(): ObcAutomationBadgeType | null {\n if (this.badgeAlert === AutomationButtonBadgeAlert.Silence) {\n return ObcAutomationBadgeType.AlertSilenced;\n } else if (this.badgeAlert === AutomationButtonBadgeAlert.Shelved) {\n return ObcAutomationBadgeType.AlertShelved;\n } else if (this.badgeAlert === AutomationButtonBadgeAlert.Caution) {\n return ObcAutomationBadgeType.Caution;\n } else if (this.badgeAlert === AutomationButtonBadgeAlert.Warning) {\n return ObcAutomationBadgeType.Warning;\n } else if (this.badgeAlert === AutomationButtonBadgeAlert.Alarm) {\n return ObcAutomationBadgeType.Alarm;\n } else if (this.badgeAlert === AutomationButtonBadgeAlert.LevelCritical) {\n return ObcAutomationBadgeType.LevelCritical;\n } else if (this.badgeAlert === AutomationButtonBadgeAlert.LevelHigh) {\n return ObcAutomationBadgeType.LevelHigh;\n } else if (this.badgeAlert === AutomationButtonBadgeAlert.LevelMedium) {\n return ObcAutomationBadgeType.LevelMedium;\n } else if (this.badgeAlert === AutomationButtonBadgeAlert.LevelLow) {\n return ObcAutomationBadgeType.LevelLow;\n } else if (this.badgeAlert === AutomationButtonBadgeAlert.LevelDiagnostic) {\n return ObcAutomationBadgeType.LevelDiagnostic;\n }\n return null;\n }\n\n private getBadgeControlType(): ObcAutomationBadgeType | null {\n if (this.badgeControl === AutomationButtonBadgeControl.Local) {\n return ObcAutomationBadgeType.Local;\n } else if (this.badgeControl === AutomationButtonBadgeControl.LocalOnly) {\n return ObcAutomationBadgeType.LocalOnly;\n } else if (this.badgeControl === AutomationButtonBadgeControl.Manual) {\n return ObcAutomationBadgeType.Manual;\n } else if (this.badgeControl === AutomationButtonBadgeControl.ManualOnly) {\n return ObcAutomationBadgeType.ManualOnly;\n } else if (this.badgeControl === AutomationButtonBadgeControl.Auto) {\n return ObcAutomationBadgeType.Auto;\n }\n return null;\n }\n\n private getBadgeInterlockType(): ObcAutomationBadgeType | null {\n if (this.badgeInterlock === AutomationButtonBadgeInterlock.Interlock) {\n return ObcAutomationBadgeType.Interlock;\n } else if (\n this.badgeInterlock === AutomationButtonBadgeInterlock.InterlockInhibit\n ) {\n return ObcAutomationBadgeType.InterlockInhibit;\n } else if (\n this.badgeInterlock === AutomationButtonBadgeInterlock.Simulation\n ) {\n return ObcAutomationBadgeType.Simulation;\n }\n return null;\n }\n\n private getBadgeCommandLockedType(): ObcAutomationBadgeType | null {\n if (\n this.badgeCommandLocked ===\n AutomationButtonBadgeCommandLocked.CommandLocked\n ) {\n return ObcAutomationBadgeType.CommandLocked;\n } else if (\n this.badgeCommandLocked === AutomationButtonBadgeCommandLocked.Simulation\n ) {\n return ObcAutomationBadgeType.Simulation;\n }\n return null;\n }\n\n override render() {\n const readouts: AutomationButtonReadoutStack[] = [...this.extraReadouts];\n const badgeAlertType = this.getBadgeAlertType();\n const badgeControlType = this.getBadgeControlType();\n const badgeInterlockType = this.getBadgeInterlockType();\n const badgeCommandLockedType = this.getBadgeCommandLockedType();\n\n return html`<obc-automation-button\n .state=${\n this._on ? AutomationButtonState.open : AutomationButtonState.closed\n }\n .readouts=${readouts}\n .tag=${this.tag}\n .accessibleName=${this._accessibleName}\n .showReadoutStack=${this.showReadoutStack}\n .readoutPosition=${this._readoutPosition}\n .readoutSize=${this.readoutSize}\n ?alert=${this.alert}\n .alertFrameType=${this.alertFrameType}\n .alertFrameThickness=${this.alertFrameThickness}\n .alertFrameStatus=${this.alertFrameStatus}\n .alertFrameMode=${this.alertFrameMode}\n .showAlertCategoryIcon=${this.showAlertCategoryIcon}\n .showAlertIcon=${this.showAlertIcon}\n ?progress=${this.progress}\n .progressMode=${this.progressMode}\n .progressValue=${this.progressValue}\n .variant=${this._variant}\n .direction=${this._direction}\n .orientation=${this._orientation}\n .hasBadgeSpacer=${this.getBadgeSpacer()}\n .handlePosition=${this._handlePosition}\n .static=${this.static}\n .handleSize=${this._handleSize}\n .positioning=${this.positioning}\n .selfActuationLine=${this._selfActuationLine}\n ?activated=${this.activated}\n >\n ${this.icon}\n <slot\n name=\"badge-top-right\"\n slot=\"badge-top-right\"\n @slotchange=${this.handleBadgeSlotChange}\n >\n ${\n badgeAlertType\n ? html`<obc-automation-badge\n .type=${badgeAlertType}\n ></obc-automation-badge>`\n : nothing\n }\n </slot>\n <slot\n name=\"badge-top-left\"\n slot=\"badge-top-left\"\n @slotchange=${this.handleBadgeSlotChange}\n >\n ${\n badgeControlType\n ? html`<obc-automation-badge\n .type=${badgeControlType}\n ></obc-automation-badge>`\n : nothing\n }\n </slot>\n <slot\n name=\"badge-bottom-left\"\n slot=\"badge-bottom-left\"\n @slotchange=${this.handleBadgeSlotChange}\n >\n ${\n badgeInterlockType\n ? html`<obc-automation-badge\n .type=${badgeInterlockType}\n ></obc-automation-badge>`\n : nothing\n }\n </slot>\n <slot\n name=\"badge-bottom-right\"\n slot=\"badge-bottom-right\"\n @slotchange=${this.handleBadgeSlotChange}\n >\n ${\n badgeCommandLockedType\n ? html`<obc-automation-badge\n .type=${badgeCommandLockedType}\n ></obc-automation-badge>`\n : nothing\n }\n </slot>\n ${this._handle !== false ? this._handle : nothing}\n </obc-automation-button>`;\n }\n}\n"],"mappings":";;;;;;;;;;;AAuCA,IAAY,6BAAL,yBAAA,4BAAA;CACL,2BAAA,UAAA;CACA,2BAAA,aAAA;CACA,2BAAA,aAAA;CACA,2BAAA,aAAA;CACA,2BAAA,aAAA;CACA,2BAAA,WAAA;CACA,2BAAA,mBAAA;CACA,2BAAA,eAAA;CACA,2BAAA,iBAAA;CACA,2BAAA,cAAA;CACA,2BAAA,qBAAA;;AACF,EAAA,CAAA,CAAA;AAEA,IAAY,iCAAL,yBAAA,gCAAA;CACL,+BAAA,UAAA;CACA,+BAAA,eAAA;CACA,+BAAA,sBAAA;CACA,+BAAA,gBAAA;;AACF,EAAA,CAAA,CAAA;AAEA,IAAY,+BAAL,yBAAA,8BAAA;CACL,6BAAA,UAAA;CACA,6BAAA,WAAA;CACA,6BAAA,eAAA;CACA,6BAAA,YAAA;CACA,6BAAA,gBAAA;CACA,6BAAA,UAAA;;AACF,EAAA,CAAA,CAAA;AAEA,IAAY,qCAAL,yBAAA,oCAAA;CACL,mCAAA,UAAA;CACA,mCAAA,mBAAA;CACA,mCAAA,gBAAA;;AACF,EAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCA,IAAa,8BAAb,cAAiD,WAAW;;;EACe,KAAA,mBAAA;EAC5B,KAAA,SAAA;EAEG,KAAA,kBAAA,KAAA;EACmB,KAAA,aAAA;EACI,KAAA,iBAAA;EAErE,KAAA,cAAA,iCAAiC;EACY,K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cAAA,KAAA,CAAA;AAoEvBA,WAAA,CAAA,sBAAsB,EAAC,MAAM,kBAAiB,CAAC,CAAA,GAAA,4BAAA,WAAA,iBAAA,KAAA,CAAA;AAE/CA,WAAA,CAAA,sBAAsB,EAAC,MAAM,iBAAgB,CAAC,CAAA,GAAA,4BAAA,WAAA,gBAAA,KAAA,CAAA;AAE9CA,WAAA,CAAA,sBAAsB,EAAC,MAAM,oBAAmB,CAAC,CAAA,GAAA,4BAAA,WAAA,mBAAA,KAAA,CAAA;AAEjDA,WAAA,CAAA,sBAAsB,EAAC,MAAM,qBAAoB,CAAC,CAAA,GAAA,4BAAA,WAAA,oBAAA,KAAA,CAAA"}
1
+ {"version":3,"file":"abstract-automation-button.js","names":["_decorate"],"sources":["../../../src/automation/automation-button/abstract-automation-button.ts"],"sourcesContent":["import {\n ObcValveHandle,\n ValveHandleState,\n valveHandleIcon,\n} from './valve-handle.js';\nimport {\n HTMLTemplateResult,\n LitElement,\n TemplateResult,\n html,\n nothing,\n} from 'lit';\nimport {property, queryAssignedElements} from 'lit/decorators.js';\nimport '../automation-button/automation-button.js';\nimport {\n AutomationButtonDirection,\n AutomationButtonHandlePosition,\n AutomationButtonHandleSize,\n AutomationButtonOrientation,\n AutomationButtonPositioning,\n AutomationButtonReadoutPosition,\n AutomationButtonSelfActuationLine,\n AutomationButtonState,\n AutomationButtonVariant,\n} from '../automation-button/automation-button.js';\nimport {\n AutomationButtonReadoutStack,\n AutomationButtonReadoutStackSize,\n} from '../../components/automation-button-readout-stack/automation-button-readout-stack.js';\nimport {\n ObcAlertFrameThickness,\n ObcAlertFrameType,\n ObcAlertFrameMode,\n} from '../../components/alert-frame/alert-frame.js';\nimport {AlertType} from '../../types.js';\nimport '../automation-badge/automation-badge.js';\nimport {ObcAutomationBadgeType} from '../automation-badge/automation-badge.js';\nimport {CircularProgressMode} from '../../building-blocks/circular-progress/circular-progress.js';\nimport {\n AutomationButtonBadgeKind,\n AutomationButtonBadgeLayout,\n BadgeLayoutController,\n} from './badge-layout.js';\n\nexport enum AutomationButtonBadgeAlert {\n None = 'none',\n Silence = 'silence',\n Shelved = 'shelved',\n Caution = 'caution',\n Warning = 'warning',\n Alarm = 'alarm',\n LevelCritical = 'level-critical',\n LevelHigh = 'level-high',\n LevelMedium = 'level-medium',\n LevelLow = 'level-low',\n LevelDiagnostic = 'level-diagnostic',\n}\n\nexport enum AutomationButtonBadgeInterlock {\n None = 'none',\n Interlock = 'interlock',\n InterlockInhibit = 'interlock-inhibit',\n Simulation = 'simulation',\n}\n\nexport enum AutomationButtonBadgeControl {\n None = 'none',\n Local = 'local',\n LocalOnly = 'local-only',\n Manual = 'manual',\n ManualOnly = 'manual-only',\n Auto = 'auto',\n}\n\nexport enum AutomationButtonBadgeCommandLocked {\n None = 'none',\n CommandLocked = 'command-locked',\n Simulation = 'simulation',\n}\n\ntype BadgeCorner = keyof AutomationButtonBadgeLayout;\n\n/**\n * Base class for the automation device buttons.\n *\n * Renders an `<obc-automation-button>` with the shared surface every device\n * button needs: the readout stack and its status row, the alert frame, the\n * circular progress indicator, and the four badge corners with their slots and\n * enum-driven fallbacks. Which badge goes in which corner follows the badge\n * layout (`badge-layout.ts`): control top-left, alert top-right, interlock\n * bottom-left and command-locked bottom-right unless the app or `badgeLayout`\n * moves them.\n *\n * ## Usage Guidelines\n *\n * Not registered as a custom element. A subclass supplies the device\n * rendering through `icon`, `_on` and `_variant`, and may add rows to the\n * readout stack through `extraReadouts`. `ObcAbstractAutomationButtonSquared`\n * and `ObcAbstractAutomationButtonMotorized` extend it further;\n * `obc-analog-valve` and `obc-digital-valve` extend it directly.\n *\n * @property static - Draws the device as present with its state unknown: a grey button, and the static icon where the device has one.\n * @availableWhen readoutPosition showReadoutStack==true\n * @availableWhen showStatus showReadoutStack==true\n * @availableWhen readoutSize showReadoutStack==true\n * @availableWhen tag showReadoutStack==true\n * @property activated - Enables the activated background color, used to indicate that the button is activated/selected.\n * @availableWhen alertFrameType alert==true\n * @availableWhen alertFrameThickness alert==true\n * @availableWhen alertFrameStatus alert==true\n * @availableWhen alertFrameMode alert==true\n * @availableWhen showAlertCategoryIcon alert==true && alertFrameType in [SmallSideFlip, LargeSideFlip, BottomFlip, TopFlip]\n * @availableWhen showAlertIcon alert==true && alertFrameType in [LargeSideFlip, BottomFlip, TopFlip]\n * @property badgeLayout - Which badge kind each corner shows, on top of the app-wide layout set with `setAutomationBadgeLayout()`. A corner left out keeps the app-wide badge, `null` leaves it empty, and a badge moved here leaves the corner it came from.\n * @property progress - Shows a progress indicator, used to indicate that an user action is in progress\n * @availableWhen progressMode progress==true\n * @availableWhen progressValue progress==true && progressMode in [determinate, progressiveIndeterminate]\n */\nexport class ObcAbstractAutomationButton extends LitElement {\n @property({type: Boolean, attribute: false}) showReadoutStack: boolean = true;\n @property({type: Boolean}) static: boolean = false;\n @property({type: String}) readoutPosition:\n AutomationButtonReadoutPosition | undefined = undefined;\n @property({type: Boolean, attribute: false}) showStatus: boolean = true;\n @property({type: Boolean, attribute: false}) showStatusIcon: boolean = false;\n @property({type: String}) readoutSize: AutomationButtonReadoutStackSize =\n AutomationButtonReadoutStackSize.regular;\n @property({type: String}) tag: string | null = null;\n\n @property({type: String}) positioning: AutomationButtonPositioning =\n AutomationButtonPositioning.point;\n @property({type: Boolean}) activated: boolean = false;\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 @property({type: Boolean}) progress: boolean = false;\n @property({type: String}) progressMode: CircularProgressMode =\n CircularProgressMode.indeterminate;\n @property({type: Number}) progressValue: number = 0;\n\n @property({type: String}) badgeControl: AutomationButtonBadgeControl =\n AutomationButtonBadgeControl.None;\n @property({type: String})\n badgeCommandLocked: AutomationButtonBadgeCommandLocked =\n AutomationButtonBadgeCommandLocked.None;\n @property({type: String}) badgeInterlock: AutomationButtonBadgeInterlock =\n AutomationButtonBadgeInterlock.None;\n @property({type: String}) badgeAlert: AutomationButtonBadgeAlert =\n AutomationButtonBadgeAlert.None;\n @property({attribute: false}) badgeLayout:\n AutomationButtonBadgeLayout | undefined = undefined;\n\n private readonly _badgeLayout = new BadgeLayoutController(this);\n\n get icon(): TemplateResult {\n throw new Error('Method \"icon\" must be implemented in subclass');\n }\n\n get _on(): boolean {\n throw new Error('Method \"_on\" must be implemented in subclass');\n }\n\n get _variant(): AutomationButtonVariant {\n // @ts-expect-error - property should be defined in subclass\n return this.variant as AutomationButtonVariant;\n }\n\n get _orientation(): AutomationButtonOrientation {\n return AutomationButtonOrientation.horizontal;\n }\n\n get _direction(): AutomationButtonDirection {\n if ('direction' in this) {\n return this.direction as AutomationButtonDirection;\n }\n return AutomationButtonDirection.forward;\n }\n\n get extraReadouts(): AutomationButtonReadoutStack[] {\n return [];\n }\n\n /** Name of a device that can render with no text of its own. */\n get _accessibleName(): string | null {\n return null;\n }\n\n get _handlePosition(): AutomationButtonHandlePosition {\n return AutomationButtonHandlePosition.none;\n }\n\n get _handleSize(): AutomationButtonHandleSize {\n return AutomationButtonHandleSize.regular;\n }\n\n get _handle(): HTMLTemplateResult | false {\n return false;\n }\n\n /** The given handle on this device's side, in the colours of its state. */\n protected renderValveHandle(\n handle: ObcValveHandle\n ): HTMLTemplateResult | false {\n let state = this._on ? ValveHandleState.on : ValveHandleState.off;\n if (this.static) {\n state = ValveHandleState.static;\n }\n return valveHandleIcon(\n handle,\n this._handlePosition,\n state,\n this._handleSize\n );\n }\n\n get _selfActuationLine(): AutomationButtonSelfActuationLine {\n return AutomationButtonSelfActuationLine.none;\n }\n\n @queryAssignedElements({slot: 'badge-top-right'})\n badgeTopRight!: HTMLElement[];\n @queryAssignedElements({slot: 'badge-top-left'})\n badgeTopLeft!: HTMLElement[];\n @queryAssignedElements({slot: 'badge-bottom-left'})\n badgeBottomLeft!: HTMLElement[];\n @queryAssignedElements({slot: 'badge-bottom-right'})\n badgeBottomRight!: HTMLElement[];\n\n protected get _readoutPosition(): AutomationButtonReadoutPosition {\n if (this.readoutPosition) {\n return this.readoutPosition;\n }\n return this._isVertical\n ? AutomationButtonReadoutPosition.left\n : AutomationButtonReadoutPosition.bottom;\n }\n\n /** True when the device sits on a vertical pipe, which puts the default readout on the left. */\n protected get _isVertical(): boolean {\n return (\n this._orientation !== AutomationButtonOrientation.horizontal ||\n ('vertical' in this && Boolean(this.vertical))\n );\n }\n\n private getBadgeSpacer(\n badges: Record<BadgeCorner, ObcAutomationBadgeType | null>\n ): boolean {\n if (!this.showReadoutStack) {\n return false;\n }\n\n const topLeft = this.badgeTopLeft.length > 0 || badges.topLeft !== null;\n const topRight = this.badgeTopRight.length > 0 || badges.topRight !== null;\n const bottomLeft =\n this.badgeBottomLeft.length > 0 || badges.bottomLeft !== null;\n const bottomRight =\n this.badgeBottomRight.length > 0 || badges.bottomRight !== null;\n if (this._readoutPosition === AutomationButtonReadoutPosition.top) {\n return topRight || topLeft;\n } else if (\n this._readoutPosition === AutomationButtonReadoutPosition.bottom\n ) {\n return bottomLeft || bottomRight;\n } else if (this._readoutPosition === AutomationButtonReadoutPosition.left) {\n return topLeft || bottomLeft;\n } else if (\n this._readoutPosition === AutomationButtonReadoutPosition.right\n ) {\n return topRight || bottomRight;\n }\n return false;\n }\n\n private handleBadgeSlotChange() {\n this.requestUpdate();\n }\n\n private getBadgeType(\n kind: AutomationButtonBadgeKind | null\n ): ObcAutomationBadgeType | null {\n switch (kind) {\n case AutomationButtonBadgeKind.Control:\n return this.getBadgeControlType();\n case AutomationButtonBadgeKind.Alert:\n return this.getBadgeAlertType();\n case AutomationButtonBadgeKind.Interlock:\n return this.getBadgeInterlockType();\n case AutomationButtonBadgeKind.CommandLocked:\n return this.getBadgeCommandLockedType();\n default:\n return null;\n }\n }\n\n private getBadgeAlertType(): ObcAutomationBadgeType | null {\n if (this.badgeAlert === AutomationButtonBadgeAlert.Silence) {\n return ObcAutomationBadgeType.AlertSilenced;\n } else if (this.badgeAlert === AutomationButtonBadgeAlert.Shelved) {\n return ObcAutomationBadgeType.AlertShelved;\n } else if (this.badgeAlert === AutomationButtonBadgeAlert.Caution) {\n return ObcAutomationBadgeType.Caution;\n } else if (this.badgeAlert === AutomationButtonBadgeAlert.Warning) {\n return ObcAutomationBadgeType.Warning;\n } else if (this.badgeAlert === AutomationButtonBadgeAlert.Alarm) {\n return ObcAutomationBadgeType.Alarm;\n } else if (this.badgeAlert === AutomationButtonBadgeAlert.LevelCritical) {\n return ObcAutomationBadgeType.LevelCritical;\n } else if (this.badgeAlert === AutomationButtonBadgeAlert.LevelHigh) {\n return ObcAutomationBadgeType.LevelHigh;\n } else if (this.badgeAlert === AutomationButtonBadgeAlert.LevelMedium) {\n return ObcAutomationBadgeType.LevelMedium;\n } else if (this.badgeAlert === AutomationButtonBadgeAlert.LevelLow) {\n return ObcAutomationBadgeType.LevelLow;\n } else if (this.badgeAlert === AutomationButtonBadgeAlert.LevelDiagnostic) {\n return ObcAutomationBadgeType.LevelDiagnostic;\n }\n return null;\n }\n\n private getBadgeControlType(): ObcAutomationBadgeType | null {\n if (this.badgeControl === AutomationButtonBadgeControl.Local) {\n return ObcAutomationBadgeType.Local;\n } else if (this.badgeControl === AutomationButtonBadgeControl.LocalOnly) {\n return ObcAutomationBadgeType.LocalOnly;\n } else if (this.badgeControl === AutomationButtonBadgeControl.Manual) {\n return ObcAutomationBadgeType.Manual;\n } else if (this.badgeControl === AutomationButtonBadgeControl.ManualOnly) {\n return ObcAutomationBadgeType.ManualOnly;\n } else if (this.badgeControl === AutomationButtonBadgeControl.Auto) {\n return ObcAutomationBadgeType.Auto;\n }\n return null;\n }\n\n private getBadgeInterlockType(): ObcAutomationBadgeType | null {\n if (this.badgeInterlock === AutomationButtonBadgeInterlock.Interlock) {\n return ObcAutomationBadgeType.Interlock;\n } else if (\n this.badgeInterlock === AutomationButtonBadgeInterlock.InterlockInhibit\n ) {\n return ObcAutomationBadgeType.InterlockInhibit;\n } else if (\n this.badgeInterlock === AutomationButtonBadgeInterlock.Simulation\n ) {\n return ObcAutomationBadgeType.Simulation;\n }\n return null;\n }\n\n private getBadgeCommandLockedType(): ObcAutomationBadgeType | null {\n if (\n this.badgeCommandLocked ===\n AutomationButtonBadgeCommandLocked.CommandLocked\n ) {\n return ObcAutomationBadgeType.CommandLocked;\n } else if (\n this.badgeCommandLocked === AutomationButtonBadgeCommandLocked.Simulation\n ) {\n return ObcAutomationBadgeType.Simulation;\n }\n return null;\n }\n\n override render() {\n const readouts: AutomationButtonReadoutStack[] = [...this.extraReadouts];\n const layout = this._badgeLayout.resolve(this.badgeLayout);\n const badges = {\n topLeft: this.getBadgeType(layout.topLeft),\n topRight: this.getBadgeType(layout.topRight),\n bottomLeft: this.getBadgeType(layout.bottomLeft),\n bottomRight: this.getBadgeType(layout.bottomRight),\n };\n\n return html`<obc-automation-button\n .state=${\n this._on ? AutomationButtonState.open : AutomationButtonState.closed\n }\n .readouts=${readouts}\n .tag=${this.tag}\n .accessibleName=${this._accessibleName}\n .showReadoutStack=${this.showReadoutStack}\n .readoutPosition=${this._readoutPosition}\n .readoutSize=${this.readoutSize}\n ?alert=${this.alert}\n .alertFrameType=${this.alertFrameType}\n .alertFrameThickness=${this.alertFrameThickness}\n .alertFrameStatus=${this.alertFrameStatus}\n .alertFrameMode=${this.alertFrameMode}\n .showAlertCategoryIcon=${this.showAlertCategoryIcon}\n .showAlertIcon=${this.showAlertIcon}\n ?progress=${this.progress}\n .progressMode=${this.progressMode}\n .progressValue=${this.progressValue}\n .variant=${this._variant}\n .direction=${this._direction}\n .orientation=${this._orientation}\n .hasBadgeSpacer=${this.getBadgeSpacer(badges)}\n .handlePosition=${this._handlePosition}\n .static=${this.static}\n .handleSize=${this._handleSize}\n .positioning=${this.positioning}\n .selfActuationLine=${this._selfActuationLine}\n ?activated=${this.activated}\n >\n ${this.icon}\n <slot\n name=\"badge-top-right\"\n slot=\"badge-top-right\"\n @slotchange=${this.handleBadgeSlotChange}\n >\n ${\n badges.topRight\n ? html`<obc-automation-badge\n .type=${badges.topRight}\n ></obc-automation-badge>`\n : nothing\n }\n </slot>\n <slot\n name=\"badge-top-left\"\n slot=\"badge-top-left\"\n @slotchange=${this.handleBadgeSlotChange}\n >\n ${\n badges.topLeft\n ? html`<obc-automation-badge\n .type=${badges.topLeft}\n ></obc-automation-badge>`\n : nothing\n }\n </slot>\n <slot\n name=\"badge-bottom-left\"\n slot=\"badge-bottom-left\"\n @slotchange=${this.handleBadgeSlotChange}\n >\n ${\n badges.bottomLeft\n ? html`<obc-automation-badge\n .type=${badges.bottomLeft}\n ></obc-automation-badge>`\n : nothing\n }\n </slot>\n <slot\n name=\"badge-bottom-right\"\n slot=\"badge-bottom-right\"\n @slotchange=${this.handleBadgeSlotChange}\n >\n ${\n badges.bottomRight\n ? html`<obc-automation-badge\n .type=${badges.bottomRight}\n ></obc-automation-badge>`\n : nothing\n }\n </slot>\n ${this._handle !== false ? this._handle : nothing}\n </obc-automation-button>`;\n }\n}\n"],"mappings":";;;;;;;;;;;;AA4CA,IAAY,6BAAL,yBAAA,4BAAA;CACL,2BAAA,UAAA;CACA,2BAAA,aAAA;CACA,2BAAA,aAAA;CACA,2BAAA,aAAA;CACA,2BAAA,aAAA;CACA,2BAAA,WAAA;CACA,2BAAA,mBAAA;CACA,2BAAA,eAAA;CACA,2BAAA,iBAAA;CACA,2BAAA,cAAA;CACA,2BAAA,qBAAA;;AACF,EAAA,CAAA,CAAA;AAEA,IAAY,iCAAL,yBAAA,gCAAA;CACL,+BAAA,UAAA;CACA,+BAAA,eAAA;CACA,+BAAA,sBAAA;CACA,+BAAA,gBAAA;;AACF,EAAA,CAAA,CAAA;AAEA,IAAY,+BAAL,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,MAAM,oBAAmB,CAAC,CAAA,GAAA,4BAAA,WAAA,mBAAA,KAAA,CAAA;AAEjDA,WAAA,CAAA,sBAAsB,EAAC,MAAM,qBAAoB,CAAC,CAAA,GAAA,4BAAA,WAAA,oBAAA,KAAA,CAAA"}
@@ -0,0 +1,34 @@
1
+ import { ReactiveControllerHost } from 'lit';
2
+ import { GlobalSettingController } from '../../internal/global-setting.js';
3
+ export declare enum AutomationButtonBadgeKind {
4
+ Control = "control",
5
+ Alert = "alert",
6
+ Interlock = "interlock",
7
+ CommandLocked = "command-locked"
8
+ }
9
+ /** Which badge kind each corner shows. `null` leaves the corner empty. */
10
+ export interface AutomationButtonBadgeLayout {
11
+ topLeft?: AutomationButtonBadgeKind | null;
12
+ topRight?: AutomationButtonBadgeKind | null;
13
+ bottomLeft?: AutomationButtonBadgeKind | null;
14
+ bottomRight?: AutomationButtonBadgeKind | null;
15
+ }
16
+ export type ResolvedAutomationButtonBadgeLayout = Required<AutomationButtonBadgeLayout>;
17
+ export declare const defaultAutomationButtonBadgeLayout: Readonly<ResolvedAutomationButtonBadgeLayout>;
18
+ /**
19
+ * The `base` layout with the corners `override` names put on top of it.
20
+ * A kind `override` names twice stays in the first corner, in reading order.
21
+ */
22
+ export declare function resolveBadgeLayout(base: ResolvedAutomationButtonBadgeLayout, override: AutomationButtonBadgeLayout | undefined): ResolvedAutomationButtonBadgeLayout;
23
+ /**
24
+ * Sets the badge layout of every automation button on the page, and
25
+ * re-renders the ones already connected. `undefined` restores the default.
26
+ */
27
+ export declare function setAutomationBadgeLayout(layout: AutomationButtonBadgeLayout | undefined): void;
28
+ export declare function getAutomationBadgeLayout(): ResolvedAutomationButtonBadgeLayout;
29
+ /** Re-renders its host when the global badge layout changes, and puts the host's own corners on top of it. */
30
+ export declare class BadgeLayoutController extends GlobalSettingController<ResolvedAutomationButtonBadgeLayout> {
31
+ constructor(host: ReactiveControllerHost);
32
+ resolve(local: AutomationButtonBadgeLayout | undefined): ResolvedAutomationButtonBadgeLayout;
33
+ }
34
+ //# sourceMappingURL=badge-layout.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"badge-layout.d.ts","sourceRoot":"","sources":["../../../src/automation/automation-button/badge-layout.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,OAAO,KAAK,EAAC,sBAAsB,EAAC,MAAM,KAAK,CAAC;AAChD,OAAO,EAEL,uBAAuB,EACxB,MAAM,kCAAkC,CAAC;AAE1C,oBAAY,yBAAyB;IACnC,OAAO,YAAY;IACnB,KAAK,UAAU;IACf,SAAS,cAAc;IACvB,aAAa,mBAAmB;CACjC;AAED,0EAA0E;AAC1E,MAAM,WAAW,2BAA2B;IAC1C,OAAO,CAAC,EAAE,yBAAyB,GAAG,IAAI,CAAC;IAC3C,QAAQ,CAAC,EAAE,yBAAyB,GAAG,IAAI,CAAC;IAC5C,UAAU,CAAC,EAAE,yBAAyB,GAAG,IAAI,CAAC;IAC9C,WAAW,CAAC,EAAE,yBAAyB,GAAG,IAAI,CAAC;CAChD;AAED,MAAM,MAAM,mCAAmC,GAC7C,QAAQ,CAAC,2BAA2B,CAAC,CAAC;AAIxC,eAAO,MAAM,kCAAkC,EAAE,QAAQ,CAAC,mCAAmC,CAMzF,CAAC;AAEL;;;GAGG;AACH,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,mCAAmC,EACzC,QAAQ,EAAE,2BAA2B,GAAG,SAAS,GAChD,mCAAmC,CAuBrC;AAMD;;;GAGG;AACH,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,2BAA2B,GAAG,SAAS,GAC9C,IAAI,CAIN;AAED,wBAAgB,wBAAwB,IAAI,mCAAmC,CAE9E;AAED,8GAA8G;AAC9G,qBAAa,qBAAsB,SAAQ,uBAAuB,CAAC,mCAAmC,CAAC;gBACzF,IAAI,EAAE,sBAAsB;IAIxC,OAAO,CACL,KAAK,EAAE,2BAA2B,GAAG,SAAS,GAC7C,mCAAmC;CAGvC"}
@@ -0,0 +1,64 @@
1
+ import { GlobalSetting, GlobalSettingController } from "../../internal/global-setting.js";
2
+ // src/automation/automation-button/badge-layout.ts
3
+ var AutomationButtonBadgeKind = /* @__PURE__ */ function(AutomationButtonBadgeKind) {
4
+ AutomationButtonBadgeKind["Control"] = "control";
5
+ AutomationButtonBadgeKind["Alert"] = "alert";
6
+ AutomationButtonBadgeKind["Interlock"] = "interlock";
7
+ AutomationButtonBadgeKind["CommandLocked"] = "command-locked";
8
+ return AutomationButtonBadgeKind;
9
+ }({});
10
+ var corners = [
11
+ "topLeft",
12
+ "topRight",
13
+ "bottomLeft",
14
+ "bottomRight"
15
+ ];
16
+ var defaultAutomationButtonBadgeLayout = Object.freeze({
17
+ topLeft: "control",
18
+ topRight: "alert",
19
+ bottomLeft: "interlock",
20
+ bottomRight: "command-locked"
21
+ });
22
+ /**
23
+ * The `base` layout with the corners `override` names put on top of it.
24
+ * A kind `override` names twice stays in the first corner, in reading order.
25
+ */
26
+ function resolveBadgeLayout(base, override) {
27
+ const result = { ...base };
28
+ if (!override) return result;
29
+ const placed = /* @__PURE__ */ new Set();
30
+ for (const corner of corners) {
31
+ const kind = override[corner];
32
+ if (kind === void 0) continue;
33
+ result[corner] = kind !== null && placed.has(kind) ? null : kind;
34
+ if (kind !== null) placed.add(kind);
35
+ }
36
+ for (const corner of corners) {
37
+ const kind = result[corner];
38
+ if (override[corner] === void 0 && kind !== null && placed.has(kind)) result[corner] = null;
39
+ }
40
+ return result;
41
+ }
42
+ var globalLayout = new GlobalSetting({ ...defaultAutomationButtonBadgeLayout });
43
+ /**
44
+ * Sets the badge layout of every automation button on the page, and
45
+ * re-renders the ones already connected. `undefined` restores the default.
46
+ */
47
+ function setAutomationBadgeLayout(layout) {
48
+ globalLayout.set(resolveBadgeLayout(defaultAutomationButtonBadgeLayout, layout));
49
+ }
50
+ function getAutomationBadgeLayout() {
51
+ return { ...globalLayout.get() };
52
+ }
53
+ /** Re-renders its host when the global badge layout changes, and puts the host's own corners on top of it. */
54
+ var BadgeLayoutController = class extends GlobalSettingController {
55
+ constructor(host) {
56
+ super(host, globalLayout);
57
+ }
58
+ resolve(local) {
59
+ return resolveBadgeLayout(this.value, local);
60
+ }
61
+ };
62
+ export { AutomationButtonBadgeKind, BadgeLayoutController, defaultAutomationButtonBadgeLayout, getAutomationBadgeLayout, resolveBadgeLayout, setAutomationBadgeLayout };
63
+
64
+ //# sourceMappingURL=badge-layout.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"badge-layout.js","names":[],"sources":["../../../src/automation/automation-button/badge-layout.ts"],"sourcesContent":["/**\n * Badge layout of the automation buttons.\n *\n * Says which badge kind each corner of an automation button shows. The app\n * sets one layout for every button with `setAutomationBadgeLayout()`; a\n * button's own `badgeLayout` property changes single corners on top of it.\n *\n * Merge rules, for both the global and the local layout:\n * - a corner left out keeps the layout underneath it,\n * - `null` leaves the corner empty,\n * - a kind moved to a new corner leaves the corner it came from, so it is\n * never shown twice.\n *\n * ```ts\n * setAutomationBadgeLayout({\n * topLeft: AutomationButtonBadgeKind.Alert,\n * topRight: AutomationButtonBadgeKind.Control,\n * });\n * ```\n *\n * @module\n */\nimport type {ReactiveControllerHost} from 'lit';\nimport {\n GlobalSetting,\n GlobalSettingController,\n} from '../../internal/global-setting.js';\n\nexport enum AutomationButtonBadgeKind {\n Control = 'control',\n Alert = 'alert',\n Interlock = 'interlock',\n CommandLocked = 'command-locked',\n}\n\n/** Which badge kind each corner shows. `null` leaves the corner empty. */\nexport interface AutomationButtonBadgeLayout {\n topLeft?: AutomationButtonBadgeKind | null;\n topRight?: AutomationButtonBadgeKind | null;\n bottomLeft?: AutomationButtonBadgeKind | null;\n bottomRight?: AutomationButtonBadgeKind | null;\n}\n\nexport type ResolvedAutomationButtonBadgeLayout =\n Required<AutomationButtonBadgeLayout>;\n\nconst corners = ['topLeft', 'topRight', 'bottomLeft', 'bottomRight'] as const;\n\nexport const defaultAutomationButtonBadgeLayout: Readonly<ResolvedAutomationButtonBadgeLayout> =\n Object.freeze({\n topLeft: AutomationButtonBadgeKind.Control,\n topRight: AutomationButtonBadgeKind.Alert,\n bottomLeft: AutomationButtonBadgeKind.Interlock,\n bottomRight: AutomationButtonBadgeKind.CommandLocked,\n });\n\n/**\n * The `base` layout with the corners `override` names put on top of it.\n * A kind `override` names twice stays in the first corner, in reading order.\n */\nexport function resolveBadgeLayout(\n base: ResolvedAutomationButtonBadgeLayout,\n override: AutomationButtonBadgeLayout | undefined\n): ResolvedAutomationButtonBadgeLayout {\n const result = {...base};\n if (!override) {\n return result;\n }\n const placed = new Set<AutomationButtonBadgeKind>();\n for (const corner of corners) {\n const kind = override[corner];\n if (kind === undefined) {\n continue;\n }\n result[corner] = kind !== null && placed.has(kind) ? null : kind;\n if (kind !== null) {\n placed.add(kind);\n }\n }\n for (const corner of corners) {\n const kind = result[corner];\n if (override[corner] === undefined && kind !== null && placed.has(kind)) {\n result[corner] = null;\n }\n }\n return result;\n}\n\nconst globalLayout = new GlobalSetting<ResolvedAutomationButtonBadgeLayout>({\n ...defaultAutomationButtonBadgeLayout,\n});\n\n/**\n * Sets the badge layout of every automation button on the page, and\n * re-renders the ones already connected. `undefined` restores the default.\n */\nexport function setAutomationBadgeLayout(\n layout: AutomationButtonBadgeLayout | undefined\n): void {\n globalLayout.set(\n resolveBadgeLayout(defaultAutomationButtonBadgeLayout, layout)\n );\n}\n\nexport function getAutomationBadgeLayout(): ResolvedAutomationButtonBadgeLayout {\n return {...globalLayout.get()};\n}\n\n/** Re-renders its host when the global badge layout changes, and puts the host's own corners on top of it. */\nexport class BadgeLayoutController extends GlobalSettingController<ResolvedAutomationButtonBadgeLayout> {\n constructor(host: ReactiveControllerHost) {\n super(host, globalLayout);\n }\n\n resolve(\n local: AutomationButtonBadgeLayout | undefined\n ): ResolvedAutomationButtonBadgeLayout {\n return resolveBadgeLayout(this.value, local);\n }\n}\n"],"mappings":";;AA4BA,IAAY,4BAAL,yBAAA,2BAAA;CACL,0BAAA,aAAA;CACA,0BAAA,WAAA;CACA,0BAAA,eAAA;CACA,0BAAA,mBAAA;;AACF,EAAA,CAAA,CAAA;AAaA,IAAM,UAAU;CAAC;CAAW;CAAY;CAAc;AAAa;AAEnE,IAAa,qCACX,OAAO,OAAO;CACZ,SAAA;CACA,UAAA;CACA,YAAA;CACA,aAAA;AACF,CAAC;;;;;AAMH,SAAgB,mBACd,MACA,UACqC;CACrC,MAAM,SAAS,EAAC,GAAG,KAAI;CACvB,IAAI,CAAC,UACH,OAAO;CAET,MAAM,yBAAS,IAAI,IAA+B;CAClD,KAAK,MAAM,UAAU,SAAS;EAC5B,MAAM,OAAO,SAAS;EACtB,IAAI,SAAS,KAAA,GACX;EAEF,OAAO,UAAU,SAAS,QAAQ,OAAO,IAAI,IAAI,IAAI,OAAO;EAC5D,IAAI,SAAS,MACX,OAAO,IAAI,IAAI;CAEnB;CACA,KAAK,MAAM,UAAU,SAAS;EAC5B,MAAM,OAAO,OAAO;EACpB,IAAI,SAAS,YAAY,KAAA,KAAa,SAAS,QAAQ,OAAO,IAAI,IAAI,GACpE,OAAO,UAAU;CAErB;CACA,OAAO;AACT;AAEA,IAAM,eAAe,IAAI,cAAmD,EAC1E,GAAG,mCACL,CAAC;;;;;AAMD,SAAgB,yBACd,QACM;CACN,aAAa,IACX,mBAAmB,oCAAoC,MAAM,CAC/D;AACF;AAEA,SAAgB,2BAAgE;CAC9E,OAAO,EAAC,GAAG,aAAa,IAAI,EAAC;AAC/B;;AAGA,IAAa,wBAAb,cAA2C,wBAA6D;CACtG,YAAY,MAA8B;EACxC,MAAM,MAAM,YAAY;CAC1B;CAEA,QACE,OACqC;EACrC,OAAO,mBAAmB,KAAK,OAAO,KAAK;CAC7C;AACF"}
@@ -49,10 +49,10 @@ export declare enum DigitalThreewayValveVariant {
49
49
  * @property orientation - Side the stem points to.
50
50
  * @property flows - Readout rows, one per flow: an optional arrow direction with either a value and optional unit (default `%`) or `open` for an `Open`/`Closed` state.
51
51
  * @property variant - Visual style of the button surround.
52
- * @slot badge-top-right - Content projected into the top-right badge position; overrides `badgeAlert`.
53
- * @slot badge-top-left - Content projected into the top-left badge position; overrides `badgeControl`.
54
- * @slot badge-bottom-left - Content projected into the bottom-left badge position; overrides `badgeInterlock`.
55
- * @slot badge-bottom-right - Content projected into the bottom-right badge position; overrides `badgeCommandLocked`.
52
+ * @slot badge-top-right - Content projected into the top-right badge position; overrides the badge `badgeLayout` puts in that corner.
53
+ * @slot badge-top-left - Content projected into the top-left badge position; overrides the badge `badgeLayout` puts in that corner.
54
+ * @slot badge-bottom-left - Content projected into the bottom-left badge position; overrides the badge `badgeLayout` puts in that corner.
55
+ * @slot badge-bottom-right - Content projected into the bottom-right badge position; overrides the badge `badgeLayout` puts in that corner.
56
56
  * @fires click - Fired when the valve is clicked.
57
57
  * @experimental
58
58
  */