@oicl/openbridge-webcomponents-full-bundle 2.2.0-next.18 → 2.2.0-next.19

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 (50) hide show
  1. package/bundle/openbridge-webcomponents.bundle.js +141 -145
  2. package/bundle/openbridge-webcomponents.bundle.js.map +1 -1
  3. package/custom-elements.json +593 -2034
  4. package/dist/automation/automation-button/abstract-automation-button-storybook-helpers.d.ts +20 -0
  5. package/dist/automation/automation-button/abstract-automation-button-storybook-helpers.d.ts.map +1 -1
  6. package/dist/automation/automation-button/abstract-automation-button-storybook-helpers.js +1 -0
  7. package/dist/automation/automation-button/abstract-automation-button-storybook-helpers.js.map +1 -1
  8. package/dist/automation/automation-button/abstract-automation-button.d.ts +5 -5
  9. package/dist/automation/automation-button/abstract-automation-button.d.ts.map +1 -1
  10. package/dist/automation/automation-button/abstract-automation-button.js +21 -47
  11. package/dist/automation/automation-button/abstract-automation-button.js.map +1 -1
  12. package/dist/automation/automation-button/badge-layout.d.ts +5 -7
  13. package/dist/automation/automation-button/badge-layout.d.ts.map +1 -1
  14. package/dist/automation/automation-button/badge-layout.js +32 -14
  15. package/dist/automation/automation-button/badge-layout.js.map +1 -1
  16. package/dist/automation/automation-button/badge-settings-controller.d.ts +11 -0
  17. package/dist/automation/automation-button/badge-settings-controller.d.ts.map +1 -0
  18. package/dist/automation/automation-button/badge-settings-controller.js +13 -0
  19. package/dist/automation/automation-button/badge-settings-controller.js.map +1 -0
  20. package/dist/automation/automation-button/badge-symbols.d.ts +37 -0
  21. package/dist/automation/automation-button/badge-symbols.d.ts.map +1 -0
  22. package/dist/automation/automation-button/badge-symbols.js +84 -0
  23. package/dist/automation/automation-button/badge-symbols.js.map +1 -0
  24. package/dist/automation/automation-tank/automation-tank.d.ts +5 -4
  25. package/dist/automation/automation-tank/automation-tank.d.ts.map +1 -1
  26. package/dist/automation/automation-tank/automation-tank.js +13 -47
  27. package/dist/automation/automation-tank/automation-tank.js.map +1 -1
  28. package/dist/automation/specialty-tank/abstract-specialty-tank.d.ts +5 -4
  29. package/dist/automation/specialty-tank/abstract-specialty-tank.d.ts.map +1 -1
  30. package/dist/automation/specialty-tank/abstract-specialty-tank.js +14 -47
  31. package/dist/automation/specialty-tank/abstract-specialty-tank.js.map +1 -1
  32. package/dist/automation/specialty-tank/specialty-tank-story-meta.d.ts +6 -1
  33. package/dist/automation/specialty-tank/specialty-tank-story-meta.d.ts.map +1 -1
  34. package/dist/automation/specialty-tank/specialty-tank-story-meta.js +10 -0
  35. package/dist/automation/specialty-tank/specialty-tank-story-meta.js.map +1 -1
  36. package/package.json +1 -1
  37. package/src/automation/automation-button/abstract-automation-button-storybook-helpers.ts +3 -0
  38. package/src/automation/automation-button/abstract-automation-button.ts +39 -81
  39. package/src/automation/automation-button/badge-layout.ts +13 -21
  40. package/src/automation/automation-button/badge-settings-controller.ts +33 -0
  41. package/src/automation/automation-button/badge-symbols.spec.ts +203 -0
  42. package/src/automation/automation-button/badge-symbols.ts +178 -0
  43. package/src/automation/automation-tank/automation-tank.stories.ts +15 -0
  44. package/src/automation/automation-tank/automation-tank.ts +36 -73
  45. package/src/automation/heat-exchanger/heat-exchanger.stories.ts +2 -0
  46. package/src/automation/heat-pump/heat-pump.stories.ts +2 -0
  47. package/src/automation/hydraulic-separator/hydraulic-separator.stories.ts +2 -0
  48. package/src/automation/pump/pump.stories.ts +44 -0
  49. package/src/automation/specialty-tank/abstract-specialty-tank.ts +36 -73
  50. package/src/automation/specialty-tank/specialty-tank-story-meta.ts +19 -1
@@ -38,6 +38,11 @@ export declare const argTypesAbstractAutomationButton: {
38
38
  type: string;
39
39
  };
40
40
  };
41
+ badgeSymbolOverride: {
42
+ control: {
43
+ type: string;
44
+ };
45
+ };
41
46
  progressMode: {
42
47
  options: CircularProgressMode[];
43
48
  control: {
@@ -142,6 +147,11 @@ export declare const argTypesAbstractAutomationButtonPassiveRound: {
142
147
  type: string;
143
148
  };
144
149
  };
150
+ badgeSymbolOverride: {
151
+ control: {
152
+ type: string;
153
+ };
154
+ };
145
155
  progressMode: {
146
156
  options: CircularProgressMode[];
147
157
  control: {
@@ -258,6 +268,11 @@ export declare const argTypesAbstractAutomationButtonPassiveSquare: {
258
268
  type: string;
259
269
  };
260
270
  };
271
+ badgeSymbolOverride: {
272
+ control: {
273
+ type: string;
274
+ };
275
+ };
261
276
  progressMode: {
262
277
  options: CircularProgressMode[];
263
278
  control: {
@@ -404,6 +419,11 @@ export declare const argTypesAbstractAutomationButtonMotorized: {
404
419
  type: string;
405
420
  };
406
421
  };
422
+ badgeSymbolOverride: {
423
+ control: {
424
+ type: string;
425
+ };
426
+ };
407
427
  progressMode: {
408
428
  options: CircularProgressMode[];
409
429
  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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6C5C,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgD5C,CAAC;AAEF,eAAO,MAAM,4CAA4C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAMxD,CAAC;AAEF,eAAO,MAAM,6CAA6C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAWzD,CAAC;AAEF,eAAO,MAAM,yCAAyC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4BrD,CAAC"}
@@ -45,6 +45,7 @@ var argTypesAbstractAutomationButton = {
45
45
  control: { type: "select" }
46
46
  },
47
47
  badgeLayout: { control: { type: "object" } },
48
+ badgeSymbolOverride: { control: { type: "object" } },
48
49
  progressMode: {
49
50
  options: Object.values(CircularProgressMode),
50
51
  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 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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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 badgeSymbolOverride: {\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,QA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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"}
@@ -6,6 +6,7 @@ import { ObcAlertFrameThickness, ObcAlertFrameType, ObcAlertFrameMode } from '..
6
6
  import { AlertType } from '../../types.js';
7
7
  import { CircularProgressMode } from '../../building-blocks/circular-progress/circular-progress.js';
8
8
  import { AutomationButtonBadgeLayout } from './badge-layout.js';
9
+ import { AutomationBadgeSymbolOverride } from './badge-symbols.js';
9
10
  import '../automation-button/automation-button.js';
10
11
  import '../automation-badge/automation-badge.js';
11
12
  export declare enum AutomationButtonBadgeAlert {
@@ -72,6 +73,7 @@ export declare enum AutomationButtonBadgeCommandLocked {
72
73
  * @availableWhen showAlertCategoryIcon alert==true && alertFrameType in [SmallSideFlip, LargeSideFlip, BottomFlip, TopFlip]
73
74
  * @availableWhen showAlertIcon alert==true && alertFrameType in [LargeSideFlip, BottomFlip, TopFlip]
74
75
  * @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
+ * @property badgeSymbolOverride - Letters that replace badge symbols on this device, per badge property and value, on top of the app-wide ones set with `setAutomationBadgeSymbolOverride()`; for example `{commandLocked: {simulation: 's'}}`. `null` brings the symbol back.
75
77
  * @property progress - Shows a progress indicator, used to indicate that an user action is in progress
76
78
  * @availableWhen progressMode progress==true
77
79
  * @availableWhen progressValue progress==true && progressMode in [determinate, progressiveIndeterminate]
@@ -117,7 +119,9 @@ export declare class ObcAbstractAutomationButton extends LitElement {
117
119
  badgeAlert: AutomationButtonBadgeAlert;
118
120
  /** 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
121
  badgeLayout: AutomationButtonBadgeLayout | undefined;
120
- private readonly _badgeLayout;
122
+ /** Letters that replace badge symbols on this device, per badge property and value, on top of the app-wide ones set with `setAutomationBadgeSymbolOverride()`; for example `{commandLocked: {simulation: 's'}}`. `null` brings the symbol back. */
123
+ badgeSymbolOverride: AutomationBadgeSymbolOverride | undefined;
124
+ constructor();
121
125
  get icon(): TemplateResult;
122
126
  get _on(): boolean;
123
127
  get _variant(): AutomationButtonVariant;
@@ -142,10 +146,6 @@ export declare class ObcAbstractAutomationButton extends LitElement {
142
146
  private getBadgeSpacer;
143
147
  private handleBadgeSlotChange;
144
148
  private getBadgeType;
145
- private getBadgeAlertType;
146
- private getBadgeControlType;
147
- private getBadgeInterlockType;
148
- private getBadgeCommandLockedType;
149
149
  render(): TemplateResult<1>;
150
150
  }
151
151
  //# sourceMappingURL=abstract-automation-button.d.ts.map
@@ -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,8BAA8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AG,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;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"}
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;AAClG,OAAO,EAEL,2BAA2B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AAO,CAAC,YAAY;IA8BX,MAAM;CAkGhB"}
@@ -3,9 +3,11 @@ import { AutomationButtonDirection, AutomationButtonHandlePosition, AutomationBu
3
3
  import { AutomationButtonReadoutStackSize } from "../../components/automation-button-readout-stack/automation-button-readout-stack.js";
4
4
  import { ObcAlertFrameMode, ObcAlertFrameThickness, ObcAlertFrameType } from "../../components/alert-frame/alert-frame.js";
5
5
  import { AlertType } from "../../types.js";
6
- import { ObcAutomationBadgeType } from "../automation-badge/automation-badge.js";
6
+ import "../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
+ import { AutomationButtonBadgeKind, currentBadgeLayout } from "./badge-layout.js";
9
+ import { automationBadgeType, currentBadgeSymbolOverride } from "./badge-symbols.js";
10
+ import { BadgeSettingsController } from "./badge-settings-controller.js";
9
11
  import __decorate from "../../_virtual/_@oxc-project_runtime@0.156.0/helpers/esm/decorate.js";
10
12
  import { LitElement, html, nothing } from "lit";
11
13
  import { property, queryAssignedElements } from "lit/decorators.js";
@@ -78,13 +80,14 @@ var AutomationButtonBadgeCommandLocked = /* @__PURE__ */ function(AutomationButt
78
80
  * @availableWhen showAlertCategoryIcon alert==true && alertFrameType in [SmallSideFlip, LargeSideFlip, BottomFlip, TopFlip]
79
81
  * @availableWhen showAlertIcon alert==true && alertFrameType in [LargeSideFlip, BottomFlip, TopFlip]
80
82
  * @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.
83
+ * @property badgeSymbolOverride - Letters that replace badge symbols on this device, per badge property and value, on top of the app-wide ones set with `setAutomationBadgeSymbolOverride()`; for example `{commandLocked: {simulation: 's'}}`. `null` brings the symbol back.
81
84
  * @property progress - Shows a progress indicator, used to indicate that an user action is in progress
82
85
  * @availableWhen progressMode progress==true
83
86
  * @availableWhen progressValue progress==true && progressMode in [determinate, progressiveIndeterminate]
84
87
  */
85
88
  var ObcAbstractAutomationButton = class extends LitElement {
86
- constructor(..._args) {
87
- super(..._args);
89
+ constructor() {
90
+ super();
88
91
  this.showReadoutStack = true;
89
92
  this.static = false;
90
93
  this.readoutPosition = void 0;
@@ -109,7 +112,8 @@ var ObcAbstractAutomationButton = class extends LitElement {
109
112
  this.badgeInterlock = "none";
110
113
  this.badgeAlert = "none";
111
114
  this.badgeLayout = void 0;
112
- this._badgeLayout = new BadgeLayoutController(this);
115
+ this.badgeSymbolOverride = void 0;
116
+ new BadgeSettingsController(this);
113
117
  }
114
118
  get icon() {
115
119
  throw new Error("Method \"icon\" must be implemented in subclass");
@@ -175,55 +179,24 @@ var ObcAbstractAutomationButton = class extends LitElement {
175
179
  handleBadgeSlotChange() {
176
180
  this.requestUpdate();
177
181
  }
178
- getBadgeType(kind) {
182
+ getBadgeType(kind, symbolOverride) {
179
183
  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
+ case AutomationButtonBadgeKind.Control: return automationBadgeType("control", this.badgeControl, symbolOverride);
185
+ case AutomationButtonBadgeKind.Alert: return automationBadgeType("alert", this.badgeAlert, symbolOverride);
186
+ case AutomationButtonBadgeKind.Interlock: return automationBadgeType("interlock", this.badgeInterlock, symbolOverride);
187
+ case AutomationButtonBadgeKind.CommandLocked: return automationBadgeType("commandLocked", this.badgeCommandLocked, symbolOverride);
184
188
  default: return null;
185
189
  }
186
190
  }
187
- getBadgeAlertType() {
188
- if (this.badgeAlert === "silence") return ObcAutomationBadgeType.AlertSilenced;
189
- else if (this.badgeAlert === "shelved") return ObcAutomationBadgeType.AlertShelved;
190
- else if (this.badgeAlert === "caution") return ObcAutomationBadgeType.Caution;
191
- else if (this.badgeAlert === "warning") return ObcAutomationBadgeType.Warning;
192
- else if (this.badgeAlert === "alarm") return ObcAutomationBadgeType.Alarm;
193
- else if (this.badgeAlert === "level-critical") return ObcAutomationBadgeType.LevelCritical;
194
- else if (this.badgeAlert === "level-high") return ObcAutomationBadgeType.LevelHigh;
195
- else if (this.badgeAlert === "level-medium") return ObcAutomationBadgeType.LevelMedium;
196
- else if (this.badgeAlert === "level-low") return ObcAutomationBadgeType.LevelLow;
197
- else if (this.badgeAlert === "level-diagnostic") return ObcAutomationBadgeType.LevelDiagnostic;
198
- return null;
199
- }
200
- getBadgeControlType() {
201
- if (this.badgeControl === "local") return ObcAutomationBadgeType.Local;
202
- else if (this.badgeControl === "local-only") return ObcAutomationBadgeType.LocalOnly;
203
- else if (this.badgeControl === "manual") return ObcAutomationBadgeType.Manual;
204
- else if (this.badgeControl === "manual-only") return ObcAutomationBadgeType.ManualOnly;
205
- else if (this.badgeControl === "auto") return ObcAutomationBadgeType.Auto;
206
- return null;
207
- }
208
- getBadgeInterlockType() {
209
- if (this.badgeInterlock === "interlock") return ObcAutomationBadgeType.Interlock;
210
- else if (this.badgeInterlock === "interlock-inhibit") return ObcAutomationBadgeType.InterlockInhibit;
211
- else if (this.badgeInterlock === "simulation") return ObcAutomationBadgeType.Simulation;
212
- return null;
213
- }
214
- getBadgeCommandLockedType() {
215
- if (this.badgeCommandLocked === "command-locked") return ObcAutomationBadgeType.CommandLocked;
216
- else if (this.badgeCommandLocked === "simulation") return ObcAutomationBadgeType.Simulation;
217
- return null;
218
- }
219
191
  render() {
220
192
  const readouts = [...this.extraReadouts];
221
- const layout = this._badgeLayout.resolve(this.badgeLayout);
193
+ const layout = currentBadgeLayout(this.badgeLayout);
194
+ const symbolOverride = currentBadgeSymbolOverride(this.badgeSymbolOverride);
222
195
  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)
196
+ topLeft: this.getBadgeType(layout.topLeft, symbolOverride),
197
+ topRight: this.getBadgeType(layout.topRight, symbolOverride),
198
+ bottomLeft: this.getBadgeType(layout.bottomLeft, symbolOverride),
199
+ bottomRight: this.getBadgeType(layout.bottomRight, symbolOverride)
227
200
  };
228
201
  return html`<obc-automation-button
229
202
  .state=${this._on ? AutomationButtonState.open : AutomationButtonState.closed}
@@ -331,6 +304,7 @@ __decorate([property({ type: String })], ObcAbstractAutomationButton.prototype,
331
304
  __decorate([property({ type: String })], ObcAbstractAutomationButton.prototype, "badgeInterlock", void 0);
332
305
  __decorate([property({ type: String })], ObcAbstractAutomationButton.prototype, "badgeAlert", void 0);
333
306
  __decorate([property({ attribute: false })], ObcAbstractAutomationButton.prototype, "badgeLayout", void 0);
307
+ __decorate([property({ attribute: false })], ObcAbstractAutomationButton.prototype, "badgeSymbolOverride", void 0);
334
308
  __decorate([queryAssignedElements({ slot: "badge-top-right" })], ObcAbstractAutomationButton.prototype, "badgeTopRight", void 0);
335
309
  __decorate([queryAssignedElements({ slot: "badge-top-left" })], ObcAbstractAutomationButton.prototype, "badgeTopLeft", void 0);
336
310
  __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';\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":";;;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;AAEvBA,WAAA,CAAA,SAAS,EAAC,MAAM,OAAM,CAAC,CAAA,GAAA,4BAAA,WAAA,cAAA,KAAA,CAAA;AAEvBA,WAAA,CAAA,SAAS,EAAC,WAAW,MAAK,CAAC,CAAA,GAAA,4BAAA,WAAA,eAAA,KAAA,CAAA;AAsE3BA,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 currentBadgeLayout,\n} from './badge-layout.js';\nimport {\n AutomationBadgeSymbolOverride,\n automationBadgeType,\n currentBadgeSymbolOverride,\n} from './badge-symbols.js';\nimport {BadgeSettingsController} from './badge-settings-controller.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 badgeSymbolOverride - Letters that replace badge symbols on this device, per badge property and value, on top of the app-wide ones set with `setAutomationBadgeSymbolOverride()`; for example `{commandLocked: {simulation: 's'}}`. `null` brings the symbol back.\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 @property({attribute: false}) badgeSymbolOverride:\n AutomationBadgeSymbolOverride | undefined = undefined;\n\n constructor() {\n super();\n // Registers itself on the host; nothing else holds it.\n new BadgeSettingsController(this);\n }\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 symbolOverride: AutomationBadgeSymbolOverride\n ): ObcAutomationBadgeType | null {\n switch (kind) {\n case AutomationButtonBadgeKind.Control:\n return automationBadgeType(\n 'control',\n this.badgeControl,\n symbolOverride\n );\n case AutomationButtonBadgeKind.Alert:\n return automationBadgeType('alert', this.badgeAlert, symbolOverride);\n case AutomationButtonBadgeKind.Interlock:\n return automationBadgeType(\n 'interlock',\n this.badgeInterlock,\n symbolOverride\n );\n case AutomationButtonBadgeKind.CommandLocked:\n return automationBadgeType(\n 'commandLocked',\n this.badgeCommandLocked,\n symbolOverride\n );\n default:\n return null;\n }\n }\n\n override render() {\n const readouts: AutomationButtonReadoutStack[] = [...this.extraReadouts];\n const layout = currentBadgeLayout(this.badgeLayout);\n const symbolOverride = currentBadgeSymbolOverride(this.badgeSymbolOverride);\n const badges = {\n topLeft: this.getBadgeType(layout.topLeft, symbolOverride),\n topRight: this.getBadgeType(layout.topRight, symbolOverride),\n bottomLeft: this.getBadgeType(layout.bottomLeft, symbolOverride),\n bottomRight: this.getBadgeType(layout.bottomRight, symbolOverride),\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":";;;;;;;;;;;;;;AAkDA,IAAY,6BAAL,yBAAA,4BAAA;CACL,2BAAA,UAAA;CACA,2BAAA,aAAA;CACA,2BAAA,aAAA;CACA,2BAAA,aAAA;CACA,2BAAA,a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,OAAM,CAAC,CAAA,GAAA,4BAAA,WAAA,gBAAA,KAAA,CAAA;AAEvBA,WAAA,CAAA,SAAS,EAAC,MAAM,OAAM,CAAC,CAAA,GAAA,4BAAA,WAAA,sBAAA,KAAA,CAAA;AAGvBA,WAAA,CAAA,SAAS,EAAC,MAAM,OAAM,CAAC,CAAA,GAAA,4BAAA,WAAA,kBAAA,KAAA,CAAA;AAEvBA,WAAA,CAAA,SAAS,EAAC,MAAM,OAAM,CAAC,CAAA,GAAA,4BAAA,WAAA,cAAA,KAAA,CAAA;AAEvBA,WAAA,CAAA,SAAS,EAAC,WAAW,MAAK,CAAC,CAAA,GAAA,4BAAA,WAAA,eAAA,KAAA,CAAA;AAE3BA,WAAA,CAAA,SAAS,EAAC,WAAW,MAAK,CAAC,CAAA,GAAA,4BAAA,WAAA,uBAAA,KAAA,CAAA;AA0E3BA,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,5 +1,4 @@
1
- import { ReactiveControllerHost } from 'lit';
2
- import { GlobalSettingController } from '../../internal/global-setting.js';
1
+ import { GlobalSetting } from '../../internal/global-setting.js';
3
2
  export declare enum AutomationButtonBadgeKind {
4
3
  Control = "control",
5
4
  Alert = "alert",
@@ -20,15 +19,14 @@ export declare const defaultAutomationButtonBadgeLayout: Readonly<ResolvedAutoma
20
19
  * A kind `override` names twice stays in the first corner, in reading order.
21
20
  */
22
21
  export declare function resolveBadgeLayout(base: ResolvedAutomationButtonBadgeLayout, override: AutomationButtonBadgeLayout | undefined): ResolvedAutomationButtonBadgeLayout;
22
+ /** The app-wide layout; a device re-renders on a change through `BadgeSettingsController`. */
23
+ export declare const badgeLayoutSetting: GlobalSetting<Required<AutomationButtonBadgeLayout>>;
23
24
  /**
24
25
  * Sets the badge layout of every automation button on the page, and
25
26
  * re-renders the ones already connected. `undefined` restores the default.
26
27
  */
27
28
  export declare function setAutomationBadgeLayout(layout: AutomationButtonBadgeLayout | undefined): void;
28
29
  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
- }
30
+ /** The app-wide layout with a device's own corners on top. */
31
+ export declare function currentBadgeLayout(local: AutomationButtonBadgeLayout | undefined): ResolvedAutomationButtonBadgeLayout;
34
32
  //# sourceMappingURL=badge-layout.d.ts.map
@@ -1 +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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C,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;AAED,8FAA8F;AAC9F,eAAO,MAAM,kBAAkB,sDAG3B,CAAC;AAEL;;;GAGG;AACH,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,2BAA2B,GAAG,SAAS,GAC9C,IAAI,CAIN;AAED,wBAAgB,wBAAwB,IAAI,mCAAmC,CAE9E;AAED,8DAA8D;AAC9D,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,2BAA2B,GAAG,SAAS,GAC7C,mCAAmC,CAErC"}
@@ -1,5 +1,27 @@
1
- import { GlobalSetting, GlobalSettingController } from "../../internal/global-setting.js";
1
+ import { GlobalSetting } from "../../internal/global-setting.js";
2
2
  // src/automation/automation-button/badge-layout.ts
3
+ /**
4
+ * Badge layout of the automation buttons.
5
+ *
6
+ * Says which badge kind each corner of an automation button shows. The app
7
+ * sets one layout for every button with `setAutomationBadgeLayout()`; a
8
+ * button's own `badgeLayout` property changes single corners on top of it.
9
+ *
10
+ * Merge rules, for both the global and the local layout:
11
+ * - a corner left out keeps the layout underneath it,
12
+ * - `null` leaves the corner empty,
13
+ * - a kind moved to a new corner leaves the corner it came from, so it is
14
+ * never shown twice.
15
+ *
16
+ * ```ts
17
+ * setAutomationBadgeLayout({
18
+ * topLeft: AutomationButtonBadgeKind.Alert,
19
+ * topRight: AutomationButtonBadgeKind.Control,
20
+ * });
21
+ * ```
22
+ *
23
+ * @module
24
+ */
3
25
  var AutomationButtonBadgeKind = /* @__PURE__ */ function(AutomationButtonBadgeKind) {
4
26
  AutomationButtonBadgeKind["Control"] = "control";
5
27
  AutomationButtonBadgeKind["Alert"] = "alert";
@@ -39,26 +61,22 @@ function resolveBadgeLayout(base, override) {
39
61
  }
40
62
  return result;
41
63
  }
42
- var globalLayout = new GlobalSetting({ ...defaultAutomationButtonBadgeLayout });
64
+ /** The app-wide layout; a device re-renders on a change through `BadgeSettingsController`. */
65
+ var badgeLayoutSetting = new GlobalSetting({ ...defaultAutomationButtonBadgeLayout });
43
66
  /**
44
67
  * Sets the badge layout of every automation button on the page, and
45
68
  * re-renders the ones already connected. `undefined` restores the default.
46
69
  */
47
70
  function setAutomationBadgeLayout(layout) {
48
- globalLayout.set(resolveBadgeLayout(defaultAutomationButtonBadgeLayout, layout));
71
+ badgeLayoutSetting.set(resolveBadgeLayout(defaultAutomationButtonBadgeLayout, layout));
49
72
  }
50
73
  function getAutomationBadgeLayout() {
51
- return { ...globalLayout.get() };
74
+ return { ...badgeLayoutSetting.get() };
52
75
  }
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 };
76
+ /** The app-wide layout with a device's own corners on top. */
77
+ function currentBadgeLayout(local) {
78
+ return resolveBadgeLayout(badgeLayoutSetting.get(), local);
79
+ }
80
+ export { AutomationButtonBadgeKind, badgeLayoutSetting, currentBadgeLayout, defaultAutomationButtonBadgeLayout, getAutomationBadgeLayout, resolveBadgeLayout, setAutomationBadgeLayout };
63
81
 
64
82
  //# sourceMappingURL=badge-layout.js.map
@@ -1 +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"}
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 {GlobalSetting} 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\n/** The app-wide layout; a device re-renders on a change through `BadgeSettingsController`. */\nexport const badgeLayoutSetting =\n 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 badgeLayoutSetting.set(\n resolveBadgeLayout(defaultAutomationButtonBadgeLayout, layout)\n );\n}\n\nexport function getAutomationBadgeLayout(): ResolvedAutomationButtonBadgeLayout {\n return {...badgeLayoutSetting.get()};\n}\n\n/** The app-wide layout with a device's own corners on top. */\nexport function currentBadgeLayout(\n local: AutomationButtonBadgeLayout | undefined\n): ResolvedAutomationButtonBadgeLayout {\n return resolveBadgeLayout(badgeLayoutSetting.get(), local);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAwBA,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;;AAGA,IAAa,qBACX,IAAI,cAAmD,EACrD,GAAG,mCACL,CAAC;;;;;AAMH,SAAgB,yBACd,QACM;CACN,mBAAmB,IACjB,mBAAmB,oCAAoC,MAAM,CAC/D;AACF;AAEA,SAAgB,2BAAgE;CAC9E,OAAO,EAAC,GAAG,mBAAmB,IAAI,EAAC;AACrC;;AAGA,SAAgB,mBACd,OACqC;CACrC,OAAO,mBAAmB,mBAAmB,IAAI,GAAG,KAAK;AAC3D"}
@@ -0,0 +1,11 @@
1
+ import { ReactiveControllerHost } from 'lit';
2
+ import { GlobalSettingController } from '../../internal/global-setting.js';
3
+ import { ResolvedAutomationButtonBadgeLayout } from './badge-layout.js';
4
+ import { AutomationBadgeSymbolOverride } from './badge-symbols.js';
5
+ /** Re-renders its host when an app-wide badge setting changes. */
6
+ export declare class BadgeSettingsController {
7
+ readonly layout: GlobalSettingController<ResolvedAutomationButtonBadgeLayout>;
8
+ readonly symbols: GlobalSettingController<AutomationBadgeSymbolOverride>;
9
+ constructor(host: ReactiveControllerHost);
10
+ }
11
+ //# sourceMappingURL=badge-settings-controller.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"badge-settings-controller.d.ts","sourceRoot":"","sources":["../../../src/automation/automation-button/badge-settings-controller.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,KAAK,EAAC,sBAAsB,EAAC,MAAM,KAAK,CAAC;AAChD,OAAO,KAAK,EAAC,uBAAuB,EAAC,MAAM,kCAAkC,CAAC;AAC9E,OAAO,EAEL,KAAK,mCAAmC,EACzC,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAEL,KAAK,6BAA6B,EACnC,MAAM,oBAAoB,CAAC;AAE5B,kEAAkE;AAClE,qBAAa,uBAAuB;IAClC,QAAQ,CAAC,MAAM,EAAE,uBAAuB,CAAC,mCAAmC,CAAC,CAAC;IAC9E,QAAQ,CAAC,OAAO,EAAE,uBAAuB,CAAC,6BAA6B,CAAC,CAAC;gBAE7D,IAAI,EAAE,sBAAsB;CAIzC"}
@@ -0,0 +1,13 @@
1
+ import { badgeLayoutSetting } from "./badge-layout.js";
2
+ import { badgeSymbolOverrideSetting } from "./badge-symbols.js";
3
+ // src/automation/automation-button/badge-settings-controller.ts
4
+ /** Re-renders its host when an app-wide badge setting changes. */
5
+ var BadgeSettingsController = class {
6
+ constructor(host) {
7
+ this.layout = badgeLayoutSetting.controller(host);
8
+ this.symbols = badgeSymbolOverrideSetting.controller(host);
9
+ }
10
+ };
11
+ export { BadgeSettingsController };
12
+
13
+ //# sourceMappingURL=badge-settings-controller.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"badge-settings-controller.js","names":[],"sources":["../../../src/automation/automation-button/badge-settings-controller.ts"],"sourcesContent":["/**\n * Re-rendering for the app-wide badge settings.\n *\n * The badge layout (`setAutomationBadgeLayout()`) and the badge symbol\n * override (`setAutomationBadgeSymbolOverride()`) are `GlobalSetting`s\n * (`internal/global-setting.ts`). A device holds one\n * `BadgeSettingsController`, which holds a controller for each, so it\n * re-renders when either changes and comes back current after a change made\n * while it was detached.\n *\n * @module\n */\nimport type {ReactiveControllerHost} from 'lit';\nimport type {GlobalSettingController} from '../../internal/global-setting.js';\nimport {\n badgeLayoutSetting,\n type ResolvedAutomationButtonBadgeLayout,\n} from './badge-layout.js';\nimport {\n badgeSymbolOverrideSetting,\n type AutomationBadgeSymbolOverride,\n} from './badge-symbols.js';\n\n/** Re-renders its host when an app-wide badge setting changes. */\nexport class BadgeSettingsController {\n readonly layout: GlobalSettingController<ResolvedAutomationButtonBadgeLayout>;\n readonly symbols: GlobalSettingController<AutomationBadgeSymbolOverride>;\n\n constructor(host: ReactiveControllerHost) {\n this.layout = badgeLayoutSetting.controller(host);\n this.symbols = badgeSymbolOverrideSetting.controller(host);\n }\n}\n"],"mappings":";;;;AAwBA,IAAa,0BAAb,MAAqC;CAInC,YAAY,MAA8B;EACxC,KAAK,SAAS,mBAAmB,WAAW,IAAI;EAChD,KAAK,UAAU,2BAA2B,WAAW,IAAI;CAC3D;AACF"}
@@ -0,0 +1,37 @@
1
+ import { AutomationButtonBadgeAlert, AutomationButtonBadgeCommandLocked, AutomationButtonBadgeControl, AutomationButtonBadgeInterlock } from './abstract-automation-button.js';
2
+ import { ObcAutomationBadgeType } from '../automation-badge/automation-badge.js';
3
+ import { GlobalSetting } from '../../internal/global-setting.js';
4
+ /** The letters `obc-automation-badge` draws: `letter-a` to `letter-z`. */
5
+ type LowercaseLetter = `${ObcAutomationBadgeType}` extends infer Type ? Type extends `letter-${infer Letter}` ? Letter : never : never;
6
+ /** One letter, either case; the badge draws it as a capital. */
7
+ export type AutomationBadgeLetter = LowercaseLetter | Uppercase<LowercaseLetter>;
8
+ /** A letter per badge value. `null` keeps the symbol. */
9
+ export type AutomationBadgeLetters<Value extends string> = Partial<Record<Exclude<`${Value}`, 'none'>, AutomationBadgeLetter | null>>;
10
+ /** Letters that replace badge symbols, per badge property. */
11
+ export interface AutomationBadgeSymbolOverride {
12
+ control?: AutomationBadgeLetters<AutomationButtonBadgeControl>;
13
+ alert?: AutomationBadgeLetters<AutomationButtonBadgeAlert>;
14
+ interlock?: AutomationBadgeLetters<AutomationButtonBadgeInterlock>;
15
+ commandLocked?: AutomationBadgeLetters<AutomationButtonBadgeCommandLocked>;
16
+ }
17
+ export type AutomationBadgeGroup = keyof AutomationBadgeSymbolOverride;
18
+ /**
19
+ * The badge type a badge property value draws: the letter `override` names
20
+ * for it, else its symbol. `null` for `none`.
21
+ */
22
+ export declare function automationBadgeType(group: AutomationBadgeGroup, value: string, override?: AutomationBadgeSymbolOverride): ObcAutomationBadgeType | null;
23
+ /** `base` with the letters `override` names put on top of it. */
24
+ export declare function mergeBadgeSymbolOverride(base: AutomationBadgeSymbolOverride | undefined, override: AutomationBadgeSymbolOverride | undefined): AutomationBadgeSymbolOverride;
25
+ /** The app-wide letters; a device re-renders on a change through `BadgeSettingsController`. */
26
+ export declare const badgeSymbolOverrideSetting: GlobalSetting<AutomationBadgeSymbolOverride>;
27
+ /**
28
+ * Sets the letters that replace badge symbols on every automation device on
29
+ * the page, and re-renders the ones already connected. `undefined` restores
30
+ * the symbols.
31
+ */
32
+ export declare function setAutomationBadgeSymbolOverride(override: AutomationBadgeSymbolOverride | undefined): void;
33
+ export declare function getAutomationBadgeSymbolOverride(): AutomationBadgeSymbolOverride;
34
+ /** The app-wide letters with a device's own letters on top. */
35
+ export declare function currentBadgeSymbolOverride(local: AutomationBadgeSymbolOverride | undefined): AutomationBadgeSymbolOverride;
36
+ export {};
37
+ //# sourceMappingURL=badge-symbols.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"badge-symbols.d.ts","sourceRoot":"","sources":["../../../src/automation/automation-button/badge-symbols.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,OAAO,KAAK,EACV,0BAA0B,EAC1B,kCAAkC,EAClC,4BAA4B,EAC5B,8BAA8B,EAC/B,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAC,sBAAsB,EAAC,MAAM,yCAAyC,CAAC;AAC/E,OAAO,EAAC,aAAa,EAAC,MAAM,kCAAkC,CAAC;AAE/D,0EAA0E;AAC1E,KAAK,eAAe,GAAG,GAAG,sBAAsB,EAAE,SAAS,MAAM,IAAI,GACjE,IAAI,SAAS,UAAU,MAAM,MAAM,EAAE,GACnC,MAAM,GACN,KAAK,GACP,KAAK,CAAC;AAEV,gEAAgE;AAChE,MAAM,MAAM,qBAAqB,GAC/B,eAAe,GAAG,SAAS,CAAC,eAAe,CAAC,CAAC;AAE/C,yDAAyD;AACzD,MAAM,MAAM,sBAAsB,CAAC,KAAK,SAAS,MAAM,IAAI,OAAO,CAChE,MAAM,CAAC,OAAO,CAAC,GAAG,KAAK,EAAE,EAAE,MAAM,CAAC,EAAE,qBAAqB,GAAG,IAAI,CAAC,CAClE,CAAC;AAEF,8DAA8D;AAC9D,MAAM,WAAW,6BAA6B;IAC5C,OAAO,CAAC,EAAE,sBAAsB,CAAC,4BAA4B,CAAC,CAAC;IAC/D,KAAK,CAAC,EAAE,sBAAsB,CAAC,0BAA0B,CAAC,CAAC;IAC3D,SAAS,CAAC,EAAE,sBAAsB,CAAC,8BAA8B,CAAC,CAAC;IACnE,aAAa,CAAC,EAAE,sBAAsB,CAAC,kCAAkC,CAAC,CAAC;CAC5E;AAED,MAAM,MAAM,oBAAoB,GAAG,MAAM,6BAA6B,CAAC;AA+CvE;;;GAGG;AACH,wBAAgB,mBAAmB,CACjC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