@oicl/openbridge-webcomponents 2.0.0-next.170 → 2.0.0-next.172

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 (100) hide show
  1. package/bundle/openbridge-webcomponents.bundle.js +974 -511
  2. package/bundle/openbridge-webcomponents.bundle.js.map +1 -1
  3. package/custom-elements.json +1853 -377
  4. package/dist/ar/poi/poi-aton.d.ts +1 -0
  5. package/dist/ar/poi/poi-aton.d.ts.map +1 -1
  6. package/dist/ar/poi/poi-aton.js +1 -0
  7. package/dist/ar/poi/poi-aton.js.map +1 -1
  8. package/dist/ar/poi/poi-base.d.ts +39 -5
  9. package/dist/ar/poi/poi-base.d.ts.map +1 -1
  10. package/dist/ar/poi/poi-base.js +108 -37
  11. package/dist/ar/poi/poi-base.js.map +1 -1
  12. package/dist/ar/poi/poi-data.d.ts +1 -0
  13. package/dist/ar/poi/poi-data.d.ts.map +1 -1
  14. package/dist/ar/poi/poi-data.js +1 -0
  15. package/dist/ar/poi/poi-data.js.map +1 -1
  16. package/dist/ar/poi/poi-vessel.d.ts +1 -0
  17. package/dist/ar/poi/poi-vessel.d.ts.map +1 -1
  18. package/dist/ar/poi/poi-vessel.js +1 -0
  19. package/dist/ar/poi/poi-vessel.js.map +1 -1
  20. package/dist/ar/poi/poi.d.ts +4 -12
  21. package/dist/ar/poi/poi.d.ts.map +1 -1
  22. package/dist/ar/poi/poi.js +6 -72
  23. package/dist/ar/poi/poi.js.map +1 -1
  24. package/dist/ar/poi-button/poi-button.d.ts +6 -2
  25. package/dist/ar/poi-button/poi-button.d.ts.map +1 -1
  26. package/dist/ar/poi-button/poi-button.js +10 -1
  27. package/dist/ar/poi-button/poi-button.js.map +1 -1
  28. package/dist/ar/poi-card/poi-card.d.ts +12 -1
  29. package/dist/ar/poi-card/poi-card.d.ts.map +1 -1
  30. package/dist/ar/poi-card/poi-card.js +4 -1
  31. package/dist/ar/poi-card/poi-card.js.map +1 -1
  32. package/dist/ar/poi-controller/poi-controller.d.ts +45 -1
  33. package/dist/ar/poi-controller/poi-controller.d.ts.map +1 -1
  34. package/dist/ar/poi-controller/poi-controller.js +72 -14
  35. package/dist/ar/poi-controller/poi-controller.js.map +1 -1
  36. package/dist/ar/poi-group/poi-group.d.ts +28 -5
  37. package/dist/ar/poi-group/poi-group.d.ts.map +1 -1
  38. package/dist/ar/poi-group/poi-group.js +50 -7
  39. package/dist/ar/poi-group/poi-group.js.map +1 -1
  40. package/dist/ar/poi-layer/poi-layer.css.js +69 -18
  41. package/dist/ar/poi-layer/poi-layer.css.js.map +1 -1
  42. package/dist/ar/poi-layer/poi-layer.d.ts +64 -5
  43. package/dist/ar/poi-layer/poi-layer.d.ts.map +1 -1
  44. package/dist/ar/poi-layer/poi-layer.js +173 -39
  45. package/dist/ar/poi-layer/poi-layer.js.map +1 -1
  46. package/dist/ar/poi-layer-stack/poi-layer-stack.d.ts +82 -7
  47. package/dist/ar/poi-layer-stack/poi-layer-stack.d.ts.map +1 -1
  48. package/dist/ar/poi-layer-stack/poi-layer-stack.js +172 -100
  49. package/dist/ar/poi-layer-stack/poi-layer-stack.js.map +1 -1
  50. package/dist/ar/poi-projection/poi-projection.d.ts +88 -0
  51. package/dist/ar/poi-projection/poi-projection.d.ts.map +1 -0
  52. package/dist/ar/poi-projection/poi-projection.js +90 -0
  53. package/dist/ar/poi-projection/poi-projection.js.map +1 -0
  54. package/dist/automation/automation-button/abstract-automation-button-motorized.d.ts +11 -1
  55. package/dist/automation/automation-button/abstract-automation-button-motorized.d.ts.map +1 -1
  56. package/dist/automation/automation-button/abstract-automation-button-motorized.js +14 -4
  57. package/dist/automation/automation-button/abstract-automation-button-motorized.js.map +1 -1
  58. package/dist/automation/automation-button/abstract-automation-button-squared.d.ts +25 -1
  59. package/dist/automation/automation-button/abstract-automation-button-squared.d.ts.map +1 -1
  60. package/dist/automation/automation-button/abstract-automation-button-squared.js +27 -3
  61. package/dist/automation/automation-button/abstract-automation-button-squared.js.map +1 -1
  62. package/dist/automation/automation-button/abstract-automation-button-storybook-helpers.d.ts +12 -0
  63. package/dist/automation/automation-button/abstract-automation-button-storybook-helpers.d.ts.map +1 -1
  64. package/dist/automation/automation-button/abstract-automation-button-storybook-helpers.js +8 -0
  65. package/dist/automation/automation-button/abstract-automation-button-storybook-helpers.js.map +1 -1
  66. package/dist/automation/bipolar-transistor/bipolar-transistor.js +4 -4
  67. package/dist/automation/bipolar-transistor/bipolar-transistor.js.map +1 -1
  68. package/dist/automation/capacitor/capacitor.js +4 -4
  69. package/dist/automation/capacitor/capacitor.js.map +1 -1
  70. package/dist/automation/converter/converter.js +4 -4
  71. package/dist/automation/converter/converter.js.map +1 -1
  72. package/dist/automation/damper/damper.js +1 -1
  73. package/dist/automation/damper/damper.js.map +1 -1
  74. package/dist/automation/diodes/diodes.js +6 -6
  75. package/dist/automation/diodes/diodes.js.map +1 -1
  76. package/dist/automation/fan/fan.js +1 -1
  77. package/dist/automation/fan/fan.js.map +1 -1
  78. package/dist/automation/filter/filter.js +4 -4
  79. package/dist/automation/filter/filter.js.map +1 -1
  80. package/dist/automation/ground/ground.js +3 -3
  81. package/dist/automation/ground/ground.js.map +1 -1
  82. package/dist/automation/logic/logic.js +6 -6
  83. package/dist/automation/logic/logic.js.map +1 -1
  84. package/dist/automation/mosfet/mosfet.js +8 -8
  85. package/dist/automation/mosfet/mosfet.js.map +1 -1
  86. package/dist/automation/motor/motor.js +2 -2
  87. package/dist/automation/motor/motor.js.map +1 -1
  88. package/dist/automation/pump/pump.js +2 -2
  89. package/dist/automation/pump/pump.js.map +1 -1
  90. package/dist/automation/resistor/resistor.js +5 -5
  91. package/dist/automation/resistor/resistor.js.map +1 -1
  92. package/dist/automation/router/router.js +2 -2
  93. package/dist/automation/router/router.js.map +1 -1
  94. package/dist/automation/source/source.js +5 -5
  95. package/dist/automation/source/source.js.map +1 -1
  96. package/dist/automation/switch/switch.js +4 -4
  97. package/dist/automation/switch/switch.js.map +1 -1
  98. package/dist/automation/transformer/transformer.js +2 -2
  99. package/dist/automation/transformer/transformer.js.map +1 -1
  100. package/package.json +2 -2
@@ -0,0 +1,88 @@
1
+ /**
2
+ * @module POI Projection
3
+ *
4
+ * Media-projection helpers for POI overlays.
5
+ *
6
+ * Maps points from media pixel space (video/image natural resolution) to
7
+ * rendered screen space, accounting for `cover`/`contain` letterboxing.
8
+ * This is the same math `obc-poi-controller` applies to its
9
+ * detections-driven targets, exported as pure functions so applications
10
+ * that manage their own POI elements can project coordinates without
11
+ * re-implementing the transform.
12
+ *
13
+ * ### Usage Guidelines
14
+ * - Build a {@link MediaProjection} once per resize/metadata change via
15
+ * {@link computeMediaProjection}; reuse it for every point in a frame.
16
+ * - `renderWidth`/`renderHeight` come from the media element's
17
+ * `getBoundingClientRect()`; `mediaWidth`/`mediaHeight` from
18
+ * `videoWidth`/`videoHeight` (video) or `naturalWidth`/`naturalHeight`
19
+ * (image).
20
+ * - {@link projectPointToLayer} additionally converts a projected
21
+ * point into `obc-poi-data` layer coordinates (`x` center px,
22
+ * `y` line length from the layer's bottom anchor), given the layer's
23
+ * bottom offset inside the projection container.
24
+ *
25
+ * ### Fit modes
26
+ * - `cover`: media fills the container; overflow is cropped.
27
+ * - `contain`: media letterboxes inside the container.
28
+ *
29
+ * The Storybook demo draws the rendered container (outer box), the scaled
30
+ * media content region (shaded), and a marker at the projected point.
31
+ */
32
+ /** Fit behavior matching `obc-poi-controller`'s `PoiFitMode` values. */
33
+ export declare enum MediaFit {
34
+ Cover = "cover",
35
+ Contain = "contain"
36
+ }
37
+ /** Natural and rendered media dimensions plus the fit mode. */
38
+ export interface MediaProjectionInput {
39
+ /** Media natural width in px (`videoWidth`/`naturalWidth`). */
40
+ mediaWidth: number;
41
+ /** Media natural height in px (`videoHeight`/`naturalHeight`). */
42
+ mediaHeight: number;
43
+ /** Rendered element width in px. */
44
+ renderWidth: number;
45
+ /** Rendered element height in px. */
46
+ renderHeight: number;
47
+ fit: MediaFit;
48
+ }
49
+ /** Resolved projection: uniform scale plus letterbox offsets. */
50
+ export interface MediaProjection {
51
+ scale: number;
52
+ /** Horizontal letterbox offset in rendered px (negative when cropped). */
53
+ offsetX: number;
54
+ /** Vertical letterbox offset in rendered px (negative when cropped). */
55
+ offsetY: number;
56
+ /** Scaled media content width in rendered px. */
57
+ contentWidth: number;
58
+ /** Scaled media content height in rendered px. */
59
+ contentHeight: number;
60
+ }
61
+ /**
62
+ * Compute the projection for the given dimensions, or `null` when any
63
+ * dimension is non-finite or zero (media not measured yet).
64
+ */
65
+ export declare function computeMediaProjection(input: MediaProjectionInput): MediaProjection | null;
66
+ /** Project a point from media pixel space into rendered space. */
67
+ export declare function projectPoint(projection: MediaProjection, x: number, y: number): {
68
+ x: number;
69
+ y: number;
70
+ };
71
+ /**
72
+ * Project a media-space anchor point into `obc-poi-data` layer
73
+ * coordinates.
74
+ *
75
+ * `layerBottom` is the POI layer's bottom edge measured in the same
76
+ * rendered coordinate space as the projection container (e.g.
77
+ * `layerRect.bottom - containerRect.top`). The returned `y` is the
78
+ * connector line length extending downward from the layer to the
79
+ * target point, clamped to `0` (matches how `obc-poi-controller`
80
+ * positions its detection targets).
81
+ */
82
+ export declare function projectPointToLayer(projection: MediaProjection, x: number, y: number, layerBottom: number): {
83
+ x: number;
84
+ y: number;
85
+ };
86
+ /** Scale a media-space box dimension into rendered px, or `null`. */
87
+ export declare function projectBoxSize(projection: MediaProjection, size: number | null | undefined): number | null;
88
+ //# sourceMappingURL=poi-projection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"poi-projection.d.ts","sourceRoot":"","sources":["../../../src/ar/poi-projection/poi-projection.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,wEAAwE;AACxE,oBAAY,QAAQ;IAClB,KAAK,UAAU;IACf,OAAO,YAAY;CACpB;AAED,+DAA+D;AAC/D,MAAM,WAAW,oBAAoB;IACnC,+DAA+D;IAC/D,UAAU,EAAE,MAAM,CAAC;IACnB,kEAAkE;IAClE,WAAW,EAAE,MAAM,CAAC;IACpB,oCAAoC;IACpC,WAAW,EAAE,MAAM,CAAC;IACpB,qCAAqC;IACrC,YAAY,EAAE,MAAM,CAAC;IACrB,GAAG,EAAE,QAAQ,CAAC;CACf;AAED,iEAAiE;AACjE,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,0EAA0E;IAC1E,OAAO,EAAE,MAAM,CAAC;IAChB,wEAAwE;IACxE,OAAO,EAAE,MAAM,CAAC;IAChB,iDAAiD;IACjD,YAAY,EAAE,MAAM,CAAC;IACrB,kDAAkD;IAClD,aAAa,EAAE,MAAM,CAAC;CACvB;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,oBAAoB,GAC1B,eAAe,GAAG,IAAI,CA6BxB;AAED,kEAAkE;AAClE,wBAAgB,YAAY,CAC1B,UAAU,EAAE,eAAe,EAC3B,CAAC,EAAE,MAAM,EACT,CAAC,EAAE,MAAM,GACR;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAC,CAKxB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,mBAAmB,CACjC,UAAU,EAAE,eAAe,EAC3B,CAAC,EAAE,MAAM,EACT,CAAC,EAAE,MAAM,EACT,WAAW,EAAE,MAAM,GAClB;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAC,CAMxB;AAED,qEAAqE;AACrE,wBAAgB,cAAc,CAC5B,UAAU,EAAE,eAAe,EAC3B,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAC9B,MAAM,GAAG,IAAI,CAKf"}
@@ -0,0 +1,90 @@
1
+ //#region src/ar/poi-projection/poi-projection.ts
2
+ /**
3
+ * @module POI Projection
4
+ *
5
+ * Media-projection helpers for POI overlays.
6
+ *
7
+ * Maps points from media pixel space (video/image natural resolution) to
8
+ * rendered screen space, accounting for `cover`/`contain` letterboxing.
9
+ * This is the same math `obc-poi-controller` applies to its
10
+ * detections-driven targets, exported as pure functions so applications
11
+ * that manage their own POI elements can project coordinates without
12
+ * re-implementing the transform.
13
+ *
14
+ * ### Usage Guidelines
15
+ * - Build a {@link MediaProjection} once per resize/metadata change via
16
+ * {@link computeMediaProjection}; reuse it for every point in a frame.
17
+ * - `renderWidth`/`renderHeight` come from the media element's
18
+ * `getBoundingClientRect()`; `mediaWidth`/`mediaHeight` from
19
+ * `videoWidth`/`videoHeight` (video) or `naturalWidth`/`naturalHeight`
20
+ * (image).
21
+ * - {@link projectPointToLayer} additionally converts a projected
22
+ * point into `obc-poi-data` layer coordinates (`x` center px,
23
+ * `y` line length from the layer's bottom anchor), given the layer's
24
+ * bottom offset inside the projection container.
25
+ *
26
+ * ### Fit modes
27
+ * - `cover`: media fills the container; overflow is cropped.
28
+ * - `contain`: media letterboxes inside the container.
29
+ *
30
+ * The Storybook demo draws the rendered container (outer box), the scaled
31
+ * media content region (shaded), and a marker at the projected point.
32
+ */
33
+ /** Fit behavior matching `obc-poi-controller`'s `PoiFitMode` values. */
34
+ var MediaFit = /* @__PURE__ */ function(MediaFit) {
35
+ MediaFit["Cover"] = "cover";
36
+ MediaFit["Contain"] = "contain";
37
+ return MediaFit;
38
+ }({});
39
+ /**
40
+ * Compute the projection for the given dimensions, or `null` when any
41
+ * dimension is non-finite or zero (media not measured yet).
42
+ */
43
+ function computeMediaProjection(input) {
44
+ const { mediaWidth, mediaHeight, renderWidth, renderHeight, fit } = input;
45
+ if (!Number.isFinite(mediaWidth) || !Number.isFinite(mediaHeight) || !Number.isFinite(renderWidth) || !Number.isFinite(renderHeight) || mediaWidth === 0 || mediaHeight === 0 || renderWidth === 0 || renderHeight === 0) return null;
46
+ const scale = fit === "cover" ? Math.max(renderWidth / mediaWidth, renderHeight / mediaHeight) : Math.min(renderWidth / mediaWidth, renderHeight / mediaHeight);
47
+ const contentWidth = mediaWidth * scale;
48
+ const contentHeight = mediaHeight * scale;
49
+ return {
50
+ scale,
51
+ offsetX: (renderWidth - contentWidth) / 2,
52
+ offsetY: (renderHeight - contentHeight) / 2,
53
+ contentWidth,
54
+ contentHeight
55
+ };
56
+ }
57
+ /** Project a point from media pixel space into rendered space. */
58
+ function projectPoint(projection, x, y) {
59
+ return {
60
+ x: projection.offsetX + x * projection.scale,
61
+ y: projection.offsetY + y * projection.scale
62
+ };
63
+ }
64
+ /**
65
+ * Project a media-space anchor point into `obc-poi-data` layer
66
+ * coordinates.
67
+ *
68
+ * `layerBottom` is the POI layer's bottom edge measured in the same
69
+ * rendered coordinate space as the projection container (e.g.
70
+ * `layerRect.bottom - containerRect.top`). The returned `y` is the
71
+ * connector line length extending downward from the layer to the
72
+ * target point, clamped to `0` (matches how `obc-poi-controller`
73
+ * positions its detection targets).
74
+ */
75
+ function projectPointToLayer(projection, x, y, layerBottom) {
76
+ const projected = projectPoint(projection, x, y);
77
+ return {
78
+ x: projected.x,
79
+ y: Math.max(0, projected.y - layerBottom)
80
+ };
81
+ }
82
+ /** Scale a media-space box dimension into rendered px, or `null`. */
83
+ function projectBoxSize(projection, size) {
84
+ if (typeof size !== "number" || !Number.isFinite(size)) return null;
85
+ return size * projection.scale;
86
+ }
87
+ //#endregion
88
+ export { MediaFit, computeMediaProjection, projectBoxSize, projectPoint, projectPointToLayer };
89
+
90
+ //# sourceMappingURL=poi-projection.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"poi-projection.js","names":[],"sources":["../../../src/ar/poi-projection/poi-projection.ts"],"sourcesContent":["/**\n * @module POI Projection\n *\n * Media-projection helpers for POI overlays.\n *\n * Maps points from media pixel space (video/image natural resolution) to\n * rendered screen space, accounting for `cover`/`contain` letterboxing.\n * This is the same math `obc-poi-controller` applies to its\n * detections-driven targets, exported as pure functions so applications\n * that manage their own POI elements can project coordinates without\n * re-implementing the transform.\n *\n * ### Usage Guidelines\n * - Build a {@link MediaProjection} once per resize/metadata change via\n * {@link computeMediaProjection}; reuse it for every point in a frame.\n * - `renderWidth`/`renderHeight` come from the media element's\n * `getBoundingClientRect()`; `mediaWidth`/`mediaHeight` from\n * `videoWidth`/`videoHeight` (video) or `naturalWidth`/`naturalHeight`\n * (image).\n * - {@link projectPointToLayer} additionally converts a projected\n * point into `obc-poi-data` layer coordinates (`x` center px,\n * `y` line length from the layer's bottom anchor), given the layer's\n * bottom offset inside the projection container.\n *\n * ### Fit modes\n * - `cover`: media fills the container; overflow is cropped.\n * - `contain`: media letterboxes inside the container.\n *\n * The Storybook demo draws the rendered container (outer box), the scaled\n * media content region (shaded), and a marker at the projected point.\n */\n\n/** Fit behavior matching `obc-poi-controller`'s `PoiFitMode` values. */\nexport enum MediaFit {\n Cover = 'cover',\n Contain = 'contain',\n}\n\n/** Natural and rendered media dimensions plus the fit mode. */\nexport interface MediaProjectionInput {\n /** Media natural width in px (`videoWidth`/`naturalWidth`). */\n mediaWidth: number;\n /** Media natural height in px (`videoHeight`/`naturalHeight`). */\n mediaHeight: number;\n /** Rendered element width in px. */\n renderWidth: number;\n /** Rendered element height in px. */\n renderHeight: number;\n fit: MediaFit;\n}\n\n/** Resolved projection: uniform scale plus letterbox offsets. */\nexport interface MediaProjection {\n scale: number;\n /** Horizontal letterbox offset in rendered px (negative when cropped). */\n offsetX: number;\n /** Vertical letterbox offset in rendered px (negative when cropped). */\n offsetY: number;\n /** Scaled media content width in rendered px. */\n contentWidth: number;\n /** Scaled media content height in rendered px. */\n contentHeight: number;\n}\n\n/**\n * Compute the projection for the given dimensions, or `null` when any\n * dimension is non-finite or zero (media not measured yet).\n */\nexport function computeMediaProjection(\n input: MediaProjectionInput\n): MediaProjection | null {\n const {mediaWidth, mediaHeight, renderWidth, renderHeight, fit} = input;\n if (\n !Number.isFinite(mediaWidth) ||\n !Number.isFinite(mediaHeight) ||\n !Number.isFinite(renderWidth) ||\n !Number.isFinite(renderHeight) ||\n mediaWidth === 0 ||\n mediaHeight === 0 ||\n renderWidth === 0 ||\n renderHeight === 0\n ) {\n return null;\n }\n\n const scale =\n fit === MediaFit.Cover\n ? Math.max(renderWidth / mediaWidth, renderHeight / mediaHeight)\n : Math.min(renderWidth / mediaWidth, renderHeight / mediaHeight);\n\n const contentWidth = mediaWidth * scale;\n const contentHeight = mediaHeight * scale;\n return {\n scale,\n offsetX: (renderWidth - contentWidth) / 2,\n offsetY: (renderHeight - contentHeight) / 2,\n contentWidth,\n contentHeight,\n };\n}\n\n/** Project a point from media pixel space into rendered space. */\nexport function projectPoint(\n projection: MediaProjection,\n x: number,\n y: number\n): {x: number; y: number} {\n return {\n x: projection.offsetX + x * projection.scale,\n y: projection.offsetY + y * projection.scale,\n };\n}\n\n/**\n * Project a media-space anchor point into `obc-poi-data` layer\n * coordinates.\n *\n * `layerBottom` is the POI layer's bottom edge measured in the same\n * rendered coordinate space as the projection container (e.g.\n * `layerRect.bottom - containerRect.top`). The returned `y` is the\n * connector line length extending downward from the layer to the\n * target point, clamped to `0` (matches how `obc-poi-controller`\n * positions its detection targets).\n */\nexport function projectPointToLayer(\n projection: MediaProjection,\n x: number,\n y: number,\n layerBottom: number\n): {x: number; y: number} {\n const projected = projectPoint(projection, x, y);\n return {\n x: projected.x,\n y: Math.max(0, projected.y - layerBottom),\n };\n}\n\n/** Scale a media-space box dimension into rendered px, or `null`. */\nexport function projectBoxSize(\n projection: MediaProjection,\n size: number | null | undefined\n): number | null {\n if (typeof size !== 'number' || !Number.isFinite(size)) {\n return null;\n }\n return size * projection.scale;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiCA,IAAY,WAAL,yBAAA,UAAA;CACL,SAAA,WAAA;CACA,SAAA,aAAA;;AACF,EAAA,CAAA,CAAA;;;;;AAgCA,SAAgB,uBACd,OACwB;CACxB,MAAM,EAAC,YAAY,aAAa,aAAa,cAAc,QAAO;CAClE,IACE,CAAC,OAAO,SAAS,UAAU,KAC3B,CAAC,OAAO,SAAS,WAAW,KAC5B,CAAC,OAAO,SAAS,WAAW,KAC5B,CAAC,OAAO,SAAS,YAAY,KAC7B,eAAe,KACf,gBAAgB,KAChB,gBAAgB,KAChB,iBAAiB,GAEjB,OAAO;CAGT,MAAM,QACJ,QAAA,UACI,KAAK,IAAI,cAAc,YAAY,eAAe,WAAW,IAC7D,KAAK,IAAI,cAAc,YAAY,eAAe,WAAW;CAEnE,MAAM,eAAe,aAAa;CAClC,MAAM,gBAAgB,cAAc;CACpC,OAAO;EACL;EACA,UAAU,cAAc,gBAAgB;EACxC,UAAU,eAAe,iBAAiB;EAC1C;EACA;CACF;AACF;;AAGA,SAAgB,aACd,YACA,GACA,GACwB;CACxB,OAAO;EACL,GAAG,WAAW,UAAU,IAAI,WAAW;EACvC,GAAG,WAAW,UAAU,IAAI,WAAW;CACzC;AACF;;;;;;;;;;;;AAaA,SAAgB,oBACd,YACA,GACA,GACA,aACwB;CACxB,MAAM,YAAY,aAAa,YAAY,GAAG,CAAC;CAC/C,OAAO;EACL,GAAG,UAAU;EACb,GAAG,KAAK,IAAI,GAAG,UAAU,IAAI,WAAW;CAC1C;AACF;;AAGA,SAAgB,eACd,YACA,MACe;CACf,IAAI,OAAO,SAAS,YAAY,CAAC,OAAO,SAAS,IAAI,GACnD,OAAO;CAET,OAAO,OAAO,WAAW;AAC3B"}
@@ -1,3 +1,4 @@
1
+ import { PropertyValues } from 'lit';
1
2
  import { ObcAbstractAutomationButton } from '../automation-button/abstract-automation-button.js';
2
3
  import { AutomationButtonDirection, AutomationButtonLabelDirection } from '../automation-button/automation-button.js';
3
4
  import { AutomationButtonReadoutStack } from '../../components/automation-button-readout-stack/automation-button-readout-stack.js';
@@ -20,10 +21,18 @@ export declare enum MotorizedVariant {
20
21
  * Not registered as a custom element. `obc-fan`, `obc-motor` and `obc-pump`
21
22
  * extend it and supply their own `icon` and `variant`.
22
23
  *
24
+ * @property turnedOn - Whether the device is running. Selects the running
25
+ * icon and the speed readout instead of the `Off` state. Not named `on`,
26
+ * which Svelte binds as an event listener in markup (#1090).
27
+ * @property on - Alias of `turnedOn` for 1.x markup: setting it sets
28
+ * `turnedOn`.
23
29
  * @availableWhen direction variant in [double, forward, flatForward]
24
30
  */
25
31
  export declare class ObcAbstractAutomationButtonMotorized extends ObcAbstractAutomationButton {
26
- on: boolean;
32
+ /** Whether the device is running. Selects the running icon and the speed readout instead of the `Off` state. Not named `on`, which Svelte binds as an event listener in markup (#1090). */
33
+ turnedOn: boolean;
34
+ /** @deprecated Use `turnedOn`. */
35
+ on?: boolean;
27
36
  /**
28
37
  * @deprecated Use `speed` together with `speedUnit` instead. When `speed`
29
38
  * is set it takes precedence over `speedInPercent`.
@@ -37,6 +46,7 @@ export declare class ObcAbstractAutomationButtonMotorized extends ObcAbstractAut
37
46
  /** Available when `variant in [double, forward, flatForward]`. */
38
47
  direction: AutomationButtonDirection;
39
48
  get extraReadouts(): AutomationButtonReadoutStack[];
49
+ willUpdate(changed: PropertyValues<this>): void;
40
50
  get _on(): boolean;
41
51
  }
42
52
  //# sourceMappingURL=abstract-automation-button-motorized.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"abstract-automation-button-motorized.d.ts","sourceRoot":"","sources":["../../../src/automation/automation-button/abstract-automation-button-motorized.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,2BAA2B,EAAC,MAAM,oDAAoD,CAAC;AAC/F,OAAO,EACL,yBAAyB,EACzB,8BAA8B,EAC/B,MAAM,2CAA2C,CAAC;AACnD,OAAO,EAAC,4BAA4B,EAAC,MAAM,qFAAqF,CAAC;AAEjI,oBAAY,gBAAgB;IAC1B,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,OAAO,YAAY;IACnB,IAAI,SAAS;IACb,WAAW,iBAAiB;CAC7B;AAED;;;;;;;;;;;;;GAaG;AACH,qBAAa,oCAAqC,SAAQ,2BAA2B;IACxD,EAAE,EAAE,OAAO,CAAS;IAC/C;;;OAGG;IACuB,cAAc,EAAE,MAAM,CAAK;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAO;IACxB,cAAc,EAAE,MAAM,CAAK;IAC3B,cAAc,EAAE,8BAA8B,CACjC;IACb,OAAO,EAAE,gBAAgB,CACxB;IACD,SAAS,EAAE,yBAAyB,CAC1B;IAEpC,IAAa,aAAa,IAAI,4BAA4B,EAAE,CA6B3D;IAED,IAAa,GAAG,IAAI,OAAO,CAE1B;CACF"}
1
+ {"version":3,"file":"abstract-automation-button-motorized.d.ts","sourceRoot":"","sources":["../../../src/automation/automation-button/abstract-automation-button-motorized.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,cAAc,EAAC,MAAM,KAAK,CAAC;AAEnC,OAAO,EAAC,2BAA2B,EAAC,MAAM,oDAAoD,CAAC;AAC/F,OAAO,EACL,yBAAyB,EACzB,8BAA8B,EAC/B,MAAM,2CAA2C,CAAC;AACnD,OAAO,EAAC,4BAA4B,EAAC,MAAM,qFAAqF,CAAC;AAEjI,oBAAY,gBAAgB;IAC1B,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,OAAO,YAAY;IACnB,IAAI,SAAS;IACb,WAAW,iBAAiB;CAC7B;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,qBAAa,oCAAqC,SAAQ,2BAA2B;IACxD,QAAQ,EAAE,OAAO,CAAS;IACrD,kCAAkC;IAEP,EAAE,CAAC,EAAE,OAAO,CAAC;IACxC;;;OAGG;IACuB,cAAc,EAAE,MAAM,CAAK;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAO;IACxB,cAAc,EAAE,MAAM,CAAK;IAC3B,cAAc,EAAE,8BAA8B,CACjC;IACb,OAAO,EAAE,gBAAgB,CACxB;IACD,SAAS,EAAE,yBAAyB,CAC1B;IAEpC,IAAa,aAAa,IAAI,4BAA4B,EAAE,CA6B3D;IAEQ,UAAU,CAAC,OAAO,EAAE,cAAc,CAAC,IAAI,CAAC,GAAG,IAAI;IAOxD,IAAa,GAAG,IAAI,OAAO,CAE1B;CACF"}
@@ -23,12 +23,17 @@ var MotorizedVariant = /* @__PURE__ */ function(MotorizedVariant) {
23
23
  * Not registered as a custom element. `obc-fan`, `obc-motor` and `obc-pump`
24
24
  * extend it and supply their own `icon` and `variant`.
25
25
  *
26
+ * @property turnedOn - Whether the device is running. Selects the running
27
+ * icon and the speed readout instead of the `Off` state. Not named `on`,
28
+ * which Svelte binds as an event listener in markup (#1090).
29
+ * @property on - Alias of `turnedOn` for 1.x markup: setting it sets
30
+ * `turnedOn`.
26
31
  * @availableWhen direction variant in [double, forward, flatForward]
27
32
  */
28
33
  var ObcAbstractAutomationButtonMotorized = class extends ObcAbstractAutomationButton {
29
34
  constructor(..._args) {
30
35
  super(..._args);
31
- this.on = false;
36
+ this.turnedOn = false;
32
37
  this.speedInPercent = 0;
33
38
  this.speedUnit = "%";
34
39
  this.speedMaxDigits = 3;
@@ -39,7 +44,7 @@ var ObcAbstractAutomationButtonMotorized = class extends ObcAbstractAutomationBu
39
44
  get extraReadouts() {
40
45
  const speed = this.speed ?? this.speedInPercent;
41
46
  if (!this.showStatus) return [];
42
- if (speed !== void 0 && speed !== null && this.on) return [{
47
+ if (speed !== void 0 && speed !== null && this.turnedOn) return [{
43
48
  type: "value",
44
49
  value: speed,
45
50
  nDigits: this.speedMaxDigits,
@@ -47,17 +52,22 @@ var ObcAbstractAutomationButtonMotorized = class extends ObcAbstractAutomationBu
47
52
  direction: this.labelDirection,
48
53
  icon: this.labelDirection === AutomationButtonLabelDirection.none ? "none" : "chevron"
49
54
  }];
50
- else if (!this.on) return [{
55
+ else if (!this.turnedOn) return [{
51
56
  type: "state-off",
52
57
  value: "Off",
53
58
  hasIcon: true
54
59
  }];
55
60
  return [];
56
61
  }
62
+ willUpdate(changed) {
63
+ super.willUpdate(changed);
64
+ if (changed.has("on") && this.on !== void 0) this.turnedOn = this.on;
65
+ }
57
66
  get _on() {
58
- return this.on;
67
+ return this.turnedOn;
59
68
  }
60
69
  };
70
+ __decorate([property({ type: Boolean })], ObcAbstractAutomationButtonMotorized.prototype, "turnedOn", void 0);
61
71
  __decorate([property({ type: Boolean })], ObcAbstractAutomationButtonMotorized.prototype, "on", void 0);
62
72
  __decorate([property({ type: Number })], ObcAbstractAutomationButtonMotorized.prototype, "speedInPercent", void 0);
63
73
  __decorate([property({ type: Number })], ObcAbstractAutomationButtonMotorized.prototype, "speed", void 0);
@@ -1 +1 @@
1
- {"version":3,"file":"abstract-automation-button-motorized.js","names":[],"sources":["../../../src/automation/automation-button/abstract-automation-button-motorized.ts"],"sourcesContent":["import {property} from 'lit/decorators.js';\nimport {ObcAbstractAutomationButton} from '../automation-button/abstract-automation-button.js';\nimport {\n AutomationButtonDirection,\n AutomationButtonLabelDirection,\n} from '../automation-button/automation-button.js';\nimport {AutomationButtonReadoutStack} from '../../components/automation-button-readout-stack/automation-button-readout-stack.js';\n\nexport enum MotorizedVariant {\n regular = 'regular',\n double = 'double',\n forward = 'forward',\n flat = 'flat',\n flatForward = 'flat-forward',\n}\n\n/**\n * Base class for motor-driven automation buttons.\n *\n * Extends `ObcAbstractAutomationButton` with the running state and the speed\n * readout: while the device is on it adds a value row carrying `speed` in\n * `speedUnit`, and while it is off it adds the `Off` state row instead.\n *\n * ## Usage Guidelines\n *\n * Not registered as a custom element. `obc-fan`, `obc-motor` and `obc-pump`\n * extend it and supply their own `icon` and `variant`.\n *\n * @availableWhen direction variant in [double, forward, flatForward]\n */\nexport class ObcAbstractAutomationButtonMotorized extends ObcAbstractAutomationButton {\n @property({type: Boolean}) on: boolean = false;\n /**\n * @deprecated Use `speed` together with `speedUnit` instead. When `speed`\n * is set it takes precedence over `speedInPercent`.\n */\n @property({type: Number}) speedInPercent: number = 0;\n @property({type: Number}) speed?: number;\n @property({type: String}) speedUnit: string = '%';\n @property({type: Number}) speedMaxDigits: number = 3;\n @property({type: String}) labelDirection: AutomationButtonLabelDirection =\n AutomationButtonLabelDirection.right;\n @property({type: String}) variant: MotorizedVariant =\n MotorizedVariant.regular;\n @property({type: String}) direction: AutomationButtonDirection =\n AutomationButtonDirection.forward;\n\n override get extraReadouts(): AutomationButtonReadoutStack[] {\n const speed = this.speed ?? this.speedInPercent;\n if (!this.showStatus) {\n return [];\n }\n if (speed !== undefined && speed !== null && this.on) {\n return [\n {\n type: 'value',\n value: speed,\n nDigits: this.speedMaxDigits,\n unit: this.speedUnit,\n direction: this.labelDirection,\n icon:\n this.labelDirection === AutomationButtonLabelDirection.none\n ? 'none'\n : 'chevron',\n },\n ];\n } else if (!this.on) {\n return [\n {\n type: 'state-off',\n value: 'Off',\n hasIcon: true,\n },\n ];\n }\n return [];\n }\n\n override get _on(): boolean {\n return this.on;\n }\n}\n"],"mappings":";;;;;AAQA,IAAY,mBAAL,yBAAA,kBAAA;CACL,iBAAA,aAAA;CACA,iBAAA,YAAA;CACA,iBAAA,aAAA;CACA,iBAAA,UAAA;CACA,iBAAA,iBAAA;;AACF,EAAA,CAAA,CAAA;;;;;;;;;;;;;;;AAgBA,IAAa,uCAAb,cAA0D,4BAA4B;;;EAC3C,KAAA,KAAA;EAKU,KAAA,iBAAA;EAEL,KAAA,YAAA;EACK,KAAA,iBAAA;EAEjD,KAAA,iBAAA,+BAA+B;;EAI/B,KAAA,YAAA,0BAA0B;;CAE5B,IAAa,gBAAgD;EAC3D,MAAM,QAAQ,KAAK,SAAS,KAAK;EACjC,IAAI,CAAC,KAAK,YACR,OAAO,CAAC;EAEV,IAAI,UAAU,KAAA,KAAa,UAAU,QAAQ,KAAK,IAChD,OAAO,CACL;GACE,MAAM;GACN,OAAO;GACP,SAAS,KAAK;GACd,MAAM,KAAK;GACX,WAAW,KAAK;GAChB,MACE,KAAK,mBAAmB,+BAA+B,OACnD,SACA;EACR,CACF;OACK,IAAI,CAAC,KAAK,IACf,OAAO,CACL;GACE,MAAM;GACN,OAAO;GACP,SAAS;EACX,CACF;EAEF,OAAO,CAAC;CACV;CAEA,IAAa,MAAe;EAC1B,OAAO,KAAK;CACd;AACF;AAlDG,WAAA,CAAA,SAAS,EAAC,MAAM,QAAO,CAAC,CAAA,GAAA,qCAAA,WAAA,MAAA,KAAA,CAAA;AAKxB,WAAA,CAAA,SAAS,EAAC,MAAM,OAAM,CAAC,CAAA,GAAA,qCAAA,WAAA,kBAAA,KAAA,CAAA;AACvB,WAAA,CAAA,SAAS,EAAC,MAAM,OAAM,CAAC,CAAA,GAAA,qCAAA,WAAA,SAAA,KAAA,CAAA;AACvB,WAAA,CAAA,SAAS,EAAC,MAAM,OAAM,CAAC,CAAA,GAAA,qCAAA,WAAA,aAAA,KAAA,CAAA;AACvB,WAAA,CAAA,SAAS,EAAC,MAAM,OAAM,CAAC,CAAA,GAAA,qCAAA,WAAA,kBAAA,KAAA,CAAA;AACvB,WAAA,CAAA,SAAS,EAAC,MAAM,OAAM,CAAC,CAAA,GAAA,qCAAA,WAAA,kBAAA,KAAA,CAAA;AAEvB,WAAA,CAAA,SAAS,EAAC,MAAM,OAAM,CAAC,CAAA,GAAA,qCAAA,WAAA,WAAA,KAAA,CAAA;AAEvB,WAAA,CAAA,SAAS,EAAC,MAAM,OAAM,CAAC,CAAA,GAAA,qCAAA,WAAA,aAAA,KAAA,CAAA"}
1
+ {"version":3,"file":"abstract-automation-button-motorized.js","names":[],"sources":["../../../src/automation/automation-button/abstract-automation-button-motorized.ts"],"sourcesContent":["import {PropertyValues} from 'lit';\nimport {property} from 'lit/decorators.js';\nimport {ObcAbstractAutomationButton} from '../automation-button/abstract-automation-button.js';\nimport {\n AutomationButtonDirection,\n AutomationButtonLabelDirection,\n} from '../automation-button/automation-button.js';\nimport {AutomationButtonReadoutStack} from '../../components/automation-button-readout-stack/automation-button-readout-stack.js';\n\nexport enum MotorizedVariant {\n regular = 'regular',\n double = 'double',\n forward = 'forward',\n flat = 'flat',\n flatForward = 'flat-forward',\n}\n\n/**\n * Base class for motor-driven automation buttons.\n *\n * Extends `ObcAbstractAutomationButton` with the running state and the speed\n * readout: while the device is on it adds a value row carrying `speed` in\n * `speedUnit`, and while it is off it adds the `Off` state row instead.\n *\n * ## Usage Guidelines\n *\n * Not registered as a custom element. `obc-fan`, `obc-motor` and `obc-pump`\n * extend it and supply their own `icon` and `variant`.\n *\n * @property turnedOn - Whether the device is running. Selects the running\n * icon and the speed readout instead of the `Off` state. Not named `on`,\n * which Svelte binds as an event listener in markup (#1090).\n * @property on - Alias of `turnedOn` for 1.x markup: setting it sets\n * `turnedOn`.\n * @availableWhen direction variant in [double, forward, flatForward]\n */\nexport class ObcAbstractAutomationButtonMotorized extends ObcAbstractAutomationButton {\n @property({type: Boolean}) turnedOn: boolean = false;\n /** @deprecated Use `turnedOn`. */\n // eslint-disable-next-line openbridge/no-event-like-property-name -- deprecated alias kept for 1.x markup (#1090)\n @property({type: Boolean}) on?: boolean;\n /**\n * @deprecated Use `speed` together with `speedUnit` instead. When `speed`\n * is set it takes precedence over `speedInPercent`.\n */\n @property({type: Number}) speedInPercent: number = 0;\n @property({type: Number}) speed?: number;\n @property({type: String}) speedUnit: string = '%';\n @property({type: Number}) speedMaxDigits: number = 3;\n @property({type: String}) labelDirection: AutomationButtonLabelDirection =\n AutomationButtonLabelDirection.right;\n @property({type: String}) variant: MotorizedVariant =\n MotorizedVariant.regular;\n @property({type: String}) direction: AutomationButtonDirection =\n AutomationButtonDirection.forward;\n\n override get extraReadouts(): AutomationButtonReadoutStack[] {\n const speed = this.speed ?? this.speedInPercent;\n if (!this.showStatus) {\n return [];\n }\n if (speed !== undefined && speed !== null && this.turnedOn) {\n return [\n {\n type: 'value',\n value: speed,\n nDigits: this.speedMaxDigits,\n unit: this.speedUnit,\n direction: this.labelDirection,\n icon:\n this.labelDirection === AutomationButtonLabelDirection.none\n ? 'none'\n : 'chevron',\n },\n ];\n } else if (!this.turnedOn) {\n return [\n {\n type: 'state-off',\n value: 'Off',\n hasIcon: true,\n },\n ];\n }\n return [];\n }\n\n override willUpdate(changed: PropertyValues<this>): void {\n super.willUpdate(changed);\n if (changed.has('on') && this.on !== undefined) {\n this.turnedOn = this.on;\n }\n }\n\n override get _on(): boolean {\n return this.turnedOn;\n }\n}\n"],"mappings":";;;;;AASA,IAAY,mBAAL,yBAAA,kBAAA;CACL,iBAAA,aAAA;CACA,iBAAA,YAAA;CACA,iBAAA,aAAA;CACA,iBAAA,UAAA;CACA,iBAAA,iBAAA;;AACF,EAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;AAqBA,IAAa,uCAAb,cAA0D,4BAA4B;;;EACrC,KAAA,WAAA;EAQI,KAAA,iBAAA;EAEL,KAAA,YAAA;EACK,KAAA,iBAAA;EAEjD,KAAA,iBAAA,+BAA+B;;EAI/B,KAAA,YAAA,0BAA0B;;CAE5B,IAAa,gBAAgD;EAC3D,MAAM,QAAQ,KAAK,SAAS,KAAK;EACjC,IAAI,CAAC,KAAK,YACR,OAAO,CAAC;EAEV,IAAI,UAAU,KAAA,KAAa,UAAU,QAAQ,KAAK,UAChD,OAAO,CACL;GACE,MAAM;GACN,OAAO;GACP,SAAS,KAAK;GACd,MAAM,KAAK;GACX,WAAW,KAAK;GAChB,MACE,KAAK,mBAAmB,+BAA+B,OACnD,SACA;EACR,CACF;OACK,IAAI,CAAC,KAAK,UACf,OAAO,CACL;GACE,MAAM;GACN,OAAO;GACP,SAAS;EACX,CACF;EAEF,OAAO,CAAC;CACV;CAEA,WAAoB,SAAqC;EACvD,MAAM,WAAW,OAAO;EACxB,IAAI,QAAQ,IAAI,IAAI,KAAK,KAAK,OAAO,KAAA,GACnC,KAAK,WAAW,KAAK;CAEzB;CAEA,IAAa,MAAe;EAC1B,OAAO,KAAK;CACd;AACF;AA5DG,WAAA,CAAA,SAAS,EAAC,MAAM,QAAO,CAAC,CAAA,GAAA,qCAAA,WAAA,YAAA,KAAA,CAAA;AAGxB,WAAA,CAAA,SAAS,EAAC,MAAM,QAAO,CAAC,CAAA,GAAA,qCAAA,WAAA,MAAA,KAAA,CAAA;AAKxB,WAAA,CAAA,SAAS,EAAC,MAAM,OAAM,CAAC,CAAA,GAAA,qCAAA,WAAA,kBAAA,KAAA,CAAA;AACvB,WAAA,CAAA,SAAS,EAAC,MAAM,OAAM,CAAC,CAAA,GAAA,qCAAA,WAAA,SAAA,KAAA,CAAA;AACvB,WAAA,CAAA,SAAS,EAAC,MAAM,OAAM,CAAC,CAAA,GAAA,qCAAA,WAAA,aAAA,KAAA,CAAA;AACvB,WAAA,CAAA,SAAS,EAAC,MAAM,OAAM,CAAC,CAAA,GAAA,qCAAA,WAAA,kBAAA,KAAA,CAAA;AACvB,WAAA,CAAA,SAAS,EAAC,MAAM,OAAM,CAAC,CAAA,GAAA,qCAAA,WAAA,kBAAA,KAAA,CAAA;AAEvB,WAAA,CAAA,SAAS,EAAC,MAAM,OAAM,CAAC,CAAA,GAAA,qCAAA,WAAA,WAAA,KAAA,CAAA;AAEvB,WAAA,CAAA,SAAS,EAAC,MAAM,OAAM,CAAC,CAAA,GAAA,qCAAA,WAAA,aAAA,KAAA,CAAA"}
@@ -1,3 +1,4 @@
1
+ import { PropertyValues } from 'lit';
1
2
  import { ObcAbstractAutomationButton } from './abstract-automation-button.js';
2
3
  import { AutomationButtonReadoutStack } from '../../components/automation-button-readout-stack/automation-button-readout-stack.js';
3
4
  import { AutomationButtonOrientation } from './automation-button.js';
@@ -5,12 +6,35 @@ export declare enum SquaredVariant {
5
6
  square = "square",
6
7
  flat = "flat"
7
8
  }
9
+ /**
10
+ * Base class for two-state automation buttons.
11
+ *
12
+ * Extends `ObcAbstractAutomationButton` with the on/off state: the subclass
13
+ * picks its icon from `turnedOn`, and the readout adds the `On` or `Off`
14
+ * state row.
15
+ *
16
+ * ## Usage Guidelines
17
+ *
18
+ * Not registered as a custom element. `obc-switch`, `obc-converter`,
19
+ * `obc-diodes` and the other two-state devices extend it and supply their own
20
+ * `icon`.
21
+ *
22
+ * @property turnedOn - Whether the device is on. Selects the on icon and the
23
+ * `On` state row instead of `Off`. Not named `on`, which Svelte binds as an
24
+ * event listener in markup (#1090).
25
+ * @property on - Alias of `turnedOn` for 1.x markup: setting it sets
26
+ * `turnedOn`.
27
+ */
8
28
  export declare class ObcAbstractAutomationButtonSquared extends ObcAbstractAutomationButton {
9
- on: boolean;
29
+ /** Whether the device is on. Selects the on icon and the `On` state row instead of `Off`. Not named `on`, which Svelte binds as an event listener in markup (#1090). */
30
+ turnedOn: boolean;
31
+ /** @deprecated Use `turnedOn`. */
32
+ on?: boolean;
10
33
  variant: SquaredVariant;
11
34
  orientation: AutomationButtonOrientation;
12
35
  get _orientation(): AutomationButtonOrientation;
13
36
  get extraReadouts(): AutomationButtonReadoutStack[];
37
+ willUpdate(changed: PropertyValues<this>): void;
14
38
  get _on(): boolean;
15
39
  }
16
40
  //# sourceMappingURL=abstract-automation-button-squared.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"abstract-automation-button-squared.d.ts","sourceRoot":"","sources":["../../../src/automation/automation-button/abstract-automation-button-squared.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,2BAA2B,EAAC,MAAM,iCAAiC,CAAC;AAC5E,OAAO,EAAC,4BAA4B,EAAC,MAAM,qFAAqF,CAAC;AACjI,OAAO,EAAC,2BAA2B,EAAC,MAAM,wBAAwB,CAAC;AAEnE,oBAAY,cAAc;IACxB,MAAM,WAAW;IACjB,IAAI,SAAS;CACd;AAED,qBAAa,kCAAmC,SAAQ,2BAA2B;IACtD,EAAE,EAAE,OAAO,CAAS;IACrB,OAAO,EAAE,cAAc,CAAyB;IAChD,WAAW,EAAE,2BAA2B,CACzB;IAEzC,IAAa,YAAY,IAAI,2BAA2B,CAEvD;IAED,IAAa,aAAa,IAAI,4BAA4B,EAAE,CAqB3D;IAED,IAAa,GAAG,IAAI,OAAO,CAE1B;CACF"}
1
+ {"version":3,"file":"abstract-automation-button-squared.d.ts","sourceRoot":"","sources":["../../../src/automation/automation-button/abstract-automation-button-squared.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,cAAc,EAAC,MAAM,KAAK,CAAC;AAEnC,OAAO,EAAC,2BAA2B,EAAC,MAAM,iCAAiC,CAAC;AAC5E,OAAO,EAAC,4BAA4B,EAAC,MAAM,qFAAqF,CAAC;AACjI,OAAO,EAAC,2BAA2B,EAAC,MAAM,wBAAwB,CAAC;AAEnE,oBAAY,cAAc;IACxB,MAAM,WAAW;IACjB,IAAI,SAAS;CACd;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,qBAAa,kCAAmC,SAAQ,2BAA2B;IACtD,QAAQ,EAAE,OAAO,CAAS;IACrD,kCAAkC;IAEP,EAAE,CAAC,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,cAAc,CAAyB;IAChD,WAAW,EAAE,2BAA2B,CACzB;IAEzC,IAAa,YAAY,IAAI,2BAA2B,CAEvD;IAED,IAAa,aAAa,IAAI,4BAA4B,EAAE,CAqB3D;IAEQ,UAAU,CAAC,OAAO,EAAE,cAAc,CAAC,IAAI,CAAC,GAAG,IAAI;IAOxD,IAAa,GAAG,IAAI,OAAO,CAE1B;CACF"}
@@ -8,10 +8,29 @@ var SquaredVariant = /* @__PURE__ */ function(SquaredVariant) {
8
8
  SquaredVariant["flat"] = "flat";
9
9
  return SquaredVariant;
10
10
  }({});
11
+ /**
12
+ * Base class for two-state automation buttons.
13
+ *
14
+ * Extends `ObcAbstractAutomationButton` with the on/off state: the subclass
15
+ * picks its icon from `turnedOn`, and the readout adds the `On` or `Off`
16
+ * state row.
17
+ *
18
+ * ## Usage Guidelines
19
+ *
20
+ * Not registered as a custom element. `obc-switch`, `obc-converter`,
21
+ * `obc-diodes` and the other two-state devices extend it and supply their own
22
+ * `icon`.
23
+ *
24
+ * @property turnedOn - Whether the device is on. Selects the on icon and the
25
+ * `On` state row instead of `Off`. Not named `on`, which Svelte binds as an
26
+ * event listener in markup (#1090).
27
+ * @property on - Alias of `turnedOn` for 1.x markup: setting it sets
28
+ * `turnedOn`.
29
+ */
11
30
  var ObcAbstractAutomationButtonSquared = class extends ObcAbstractAutomationButton {
12
31
  constructor(..._args) {
13
32
  super(..._args);
14
- this.on = false;
33
+ this.turnedOn = false;
15
34
  this.variant = "square";
16
35
  this.orientation = AutomationButtonOrientation.horizontal;
17
36
  }
@@ -20,7 +39,7 @@ var ObcAbstractAutomationButtonSquared = class extends ObcAbstractAutomationButt
20
39
  }
21
40
  get extraReadouts() {
22
41
  if (!this.showStatus) return [];
23
- if (this.on) return [{
42
+ if (this.turnedOn) return [{
24
43
  type: "state-on",
25
44
  value: "On",
26
45
  hasIcon: true
@@ -31,10 +50,15 @@ var ObcAbstractAutomationButtonSquared = class extends ObcAbstractAutomationButt
31
50
  hasIcon: true
32
51
  }];
33
52
  }
53
+ willUpdate(changed) {
54
+ super.willUpdate(changed);
55
+ if (changed.has("on") && this.on !== void 0) this.turnedOn = this.on;
56
+ }
34
57
  get _on() {
35
- return this.on;
58
+ return this.turnedOn;
36
59
  }
37
60
  };
61
+ __decorate([property({ type: Boolean })], ObcAbstractAutomationButtonSquared.prototype, "turnedOn", void 0);
38
62
  __decorate([property({ type: Boolean })], ObcAbstractAutomationButtonSquared.prototype, "on", void 0);
39
63
  __decorate([property({ type: String })], ObcAbstractAutomationButtonSquared.prototype, "variant", void 0);
40
64
  __decorate([property({ type: String })], ObcAbstractAutomationButtonSquared.prototype, "orientation", void 0);
@@ -1 +1 @@
1
- {"version":3,"file":"abstract-automation-button-squared.js","names":[],"sources":["../../../src/automation/automation-button/abstract-automation-button-squared.ts"],"sourcesContent":["import {property} from 'lit/decorators.js';\nimport {ObcAbstractAutomationButton} from './abstract-automation-button.js';\nimport {AutomationButtonReadoutStack} from '../../components/automation-button-readout-stack/automation-button-readout-stack.js';\nimport {AutomationButtonOrientation} from './automation-button.js';\n\nexport enum SquaredVariant {\n square = 'square',\n flat = 'flat',\n}\n\nexport class ObcAbstractAutomationButtonSquared extends ObcAbstractAutomationButton {\n @property({type: Boolean}) on: boolean = false;\n @property({type: String}) variant: SquaredVariant = SquaredVariant.square;\n @property({type: String}) orientation: AutomationButtonOrientation =\n AutomationButtonOrientation.horizontal;\n\n override get _orientation(): AutomationButtonOrientation {\n return this.orientation;\n }\n\n override get extraReadouts(): AutomationButtonReadoutStack[] {\n if (!this.showStatus) {\n return [];\n }\n if (this.on) {\n return [\n {\n type: 'state-on',\n value: 'On',\n hasIcon: true,\n },\n ];\n } else {\n return [\n {\n type: 'state-off',\n value: 'Off',\n hasIcon: true,\n },\n ];\n }\n }\n\n override get _on(): boolean {\n return this.on;\n }\n}\n"],"mappings":";;;;;AAKA,IAAY,iBAAL,yBAAA,gBAAA;CACL,eAAA,YAAA;CACA,eAAA,UAAA;;AACF,EAAA,CAAA,CAAA;AAEA,IAAa,qCAAb,cAAwD,4BAA4B;;;EACzC,KAAA,KAAA;;EAGvC,KAAA,cAAA,4BAA4B;;CAE9B,IAAa,eAA4C;EACvD,OAAO,KAAK;CACd;CAEA,IAAa,gBAAgD;EAC3D,IAAI,CAAC,KAAK,YACR,OAAO,CAAC;EAEV,IAAI,KAAK,IACP,OAAO,CACL;GACE,MAAM;GACN,OAAO;GACP,SAAS;EACX,CACF;OAEA,OAAO,CACL;GACE,MAAM;GACN,OAAO;GACP,SAAS;EACX,CACF;CAEJ;CAEA,IAAa,MAAe;EAC1B,OAAO,KAAK;CACd;AACF;AAnCG,WAAA,CAAA,SAAS,EAAC,MAAM,QAAO,CAAC,CAAA,GAAA,mCAAA,WAAA,MAAA,KAAA,CAAA;AACxB,WAAA,CAAA,SAAS,EAAC,MAAM,OAAM,CAAC,CAAA,GAAA,mCAAA,WAAA,WAAA,KAAA,CAAA;AACvB,WAAA,CAAA,SAAS,EAAC,MAAM,OAAM,CAAC,CAAA,GAAA,mCAAA,WAAA,eAAA,KAAA,CAAA"}
1
+ {"version":3,"file":"abstract-automation-button-squared.js","names":[],"sources":["../../../src/automation/automation-button/abstract-automation-button-squared.ts"],"sourcesContent":["import {PropertyValues} from 'lit';\nimport {property} from 'lit/decorators.js';\nimport {ObcAbstractAutomationButton} from './abstract-automation-button.js';\nimport {AutomationButtonReadoutStack} from '../../components/automation-button-readout-stack/automation-button-readout-stack.js';\nimport {AutomationButtonOrientation} from './automation-button.js';\n\nexport enum SquaredVariant {\n square = 'square',\n flat = 'flat',\n}\n\n/**\n * Base class for two-state automation buttons.\n *\n * Extends `ObcAbstractAutomationButton` with the on/off state: the subclass\n * picks its icon from `turnedOn`, and the readout adds the `On` or `Off`\n * state row.\n *\n * ## Usage Guidelines\n *\n * Not registered as a custom element. `obc-switch`, `obc-converter`,\n * `obc-diodes` and the other two-state devices extend it and supply their own\n * `icon`.\n *\n * @property turnedOn - Whether the device is on. Selects the on icon and the\n * `On` state row instead of `Off`. Not named `on`, which Svelte binds as an\n * event listener in markup (#1090).\n * @property on - Alias of `turnedOn` for 1.x markup: setting it sets\n * `turnedOn`.\n */\nexport class ObcAbstractAutomationButtonSquared extends ObcAbstractAutomationButton {\n @property({type: Boolean}) turnedOn: boolean = false;\n /** @deprecated Use `turnedOn`. */\n // eslint-disable-next-line openbridge/no-event-like-property-name -- deprecated alias kept for 1.x markup (#1090)\n @property({type: Boolean}) on?: boolean;\n @property({type: String}) variant: SquaredVariant = SquaredVariant.square;\n @property({type: String}) orientation: AutomationButtonOrientation =\n AutomationButtonOrientation.horizontal;\n\n override get _orientation(): AutomationButtonOrientation {\n return this.orientation;\n }\n\n override get extraReadouts(): AutomationButtonReadoutStack[] {\n if (!this.showStatus) {\n return [];\n }\n if (this.turnedOn) {\n return [\n {\n type: 'state-on',\n value: 'On',\n hasIcon: true,\n },\n ];\n } else {\n return [\n {\n type: 'state-off',\n value: 'Off',\n hasIcon: true,\n },\n ];\n }\n }\n\n override willUpdate(changed: PropertyValues<this>): void {\n super.willUpdate(changed);\n if (changed.has('on') && this.on !== undefined) {\n this.turnedOn = this.on;\n }\n }\n\n override get _on(): boolean {\n return this.turnedOn;\n }\n}\n"],"mappings":";;;;;AAMA,IAAY,iBAAL,yBAAA,gBAAA;CACL,eAAA,YAAA;CACA,eAAA,UAAA;;AACF,EAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;AAqBA,IAAa,qCAAb,cAAwD,4BAA4B;;;EACnC,KAAA,WAAA;;EAM7C,KAAA,cAAA,4BAA4B;;CAE9B,IAAa,eAA4C;EACvD,OAAO,KAAK;CACd;CAEA,IAAa,gBAAgD;EAC3D,IAAI,CAAC,KAAK,YACR,OAAO,CAAC;EAEV,IAAI,KAAK,UACP,OAAO,CACL;GACE,MAAM;GACN,OAAO;GACP,SAAS;EACX,CACF;OAEA,OAAO,CACL;GACE,MAAM;GACN,OAAO;GACP,SAAS;EACX,CACF;CAEJ;CAEA,WAAoB,SAAqC;EACvD,MAAM,WAAW,OAAO;EACxB,IAAI,QAAQ,IAAI,IAAI,KAAK,KAAK,OAAO,KAAA,GACnC,KAAK,WAAW,KAAK;CAEzB;CAEA,IAAa,MAAe;EAC1B,OAAO,KAAK;CACd;AACF;AA7CG,WAAA,CAAA,SAAS,EAAC,MAAM,QAAO,CAAC,CAAA,GAAA,mCAAA,WAAA,YAAA,KAAA,CAAA;AAGxB,WAAA,CAAA,SAAS,EAAC,MAAM,QAAO,CAAC,CAAA,GAAA,mCAAA,WAAA,MAAA,KAAA,CAAA;AACxB,WAAA,CAAA,SAAS,EAAC,MAAM,OAAM,CAAC,CAAA,GAAA,mCAAA,WAAA,WAAA,KAAA,CAAA;AACvB,WAAA,CAAA,SAAS,EAAC,MAAM,OAAM,CAAC,CAAA,GAAA,mCAAA,WAAA,eAAA,KAAA,CAAA"}
@@ -196,6 +196,12 @@ export declare const argTypesAbstractAutomationButtonPassiveRound: {
196
196
  };
197
197
  };
198
198
  export declare const argTypesAbstractAutomationButtonPassiveSquare: {
199
+ on: {
200
+ table: {
201
+ disable: boolean;
202
+ };
203
+ control: boolean;
204
+ };
199
205
  variant: {
200
206
  options: string[];
201
207
  control: {
@@ -301,6 +307,12 @@ export declare const argTypesAbstractAutomationButtonPassiveSquare: {
301
307
  };
302
308
  };
303
309
  export declare const argTypesAbstractAutomationButtonMotorized: {
310
+ on: {
311
+ table: {
312
+ disable: boolean;
313
+ };
314
+ control: boolean;
315
+ };
304
316
  speedInPercent: {
305
317
  control: {
306
318
  type: string;
@@ -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":"AAAA,OAAO,EACL,mBAAmB,EACnB,sBAAsB,EACtB,iBAAiB,EACjB,iBAAiB,EAClB,MAAM,6CAA6C,CAAC;AACrD,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyD5C,CAAC;AAEF,eAAO,MAAM,4CAA4C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAMxD,CAAC;AAEF,eAAO,MAAM,6CAA6C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAUzD,CAAC;AAEF,eAAO,MAAM,yCAAyC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2BrD,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":"AAAA,OAAO,EACL,mBAAmB,EACnB,sBAAsB,EACtB,iBAAiB,EACjB,iBAAiB,EAClB,MAAM,6CAA6C,CAAC;AACrD,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyD5C,CAAC;AAEF,eAAO,MAAM,4CAA4C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAMxD,CAAC;AAEF,eAAO,MAAM,6CAA6C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAWzD,CAAC;AAEF,eAAO,MAAM,yCAAyC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4BrD,CAAC"}
@@ -84,6 +84,10 @@ var argTypesAbstractAutomationButtonPassiveRound = {
84
84
  };
85
85
  var argTypesAbstractAutomationButtonPassiveSquare = {
86
86
  ...argTypesAbstractAutomationButton,
87
+ on: {
88
+ table: { disable: true },
89
+ control: false
90
+ },
87
91
  variant: {
88
92
  options: ["square", "flat"],
89
93
  control: { type: "radio" }
@@ -95,6 +99,10 @@ var argTypesAbstractAutomationButtonPassiveSquare = {
95
99
  };
96
100
  var argTypesAbstractAutomationButtonMotorized = {
97
101
  ...argTypesAbstractAutomationButton,
102
+ on: {
103
+ table: { disable: true },
104
+ control: false
105
+ },
98
106
  speedInPercent: {
99
107
  control: {
100
108
  type: "range",
@@ -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 {\n ObcAlertFrameStatus,\n ObcAlertFrameThickness,\n ObcAlertFrameType,\n ObcAlertFrameMode,\n} from '../../components/alert-frame/alert-frame.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 alertFrameType: {\n options: Object.values(ObcAlertFrameType),\n control: {type: 'radio'},\n },\n alertFrameMode: {\n options: Object.values(ObcAlertFrameMode),\n control: {type: 'radio'},\n },\n alertFrameThickness: {\n options: Object.values(ObcAlertFrameThickness),\n control: {type: 'radio'},\n },\n alertFrameStatus: {\n options: Object.values(ObcAlertFrameStatus),\n control: {type: 'radio'},\n },\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 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 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":";;;;;;;AAqBA,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,gBAAgB;EACd,SAAS,OAAO,OAAO,iBAAiB;EACxC,SAAS,EAAC,MAAM,QAAO;CACzB;CACA,gBAAgB;EACd,SAAS,OAAO,OAAO,iBAAiB;EACxC,SAAS,EAAC,MAAM,QAAO;CACzB;CACA,qBAAqB;EACnB,SAAS,OAAO,OAAO,sBAAsB;EAC7C,SAAS,EAAC,MAAM,QAAO;CACzB;CACA,kBAAkB;EAChB,SAAS,OAAO,OAAO,SAAmB;EAC1C,SAAS,EAAC,MAAM,QAAO;CACzB;CACA,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,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,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 {\n ObcAlertFrameStatus,\n ObcAlertFrameThickness,\n ObcAlertFrameType,\n ObcAlertFrameMode,\n} from '../../components/alert-frame/alert-frame.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 alertFrameType: {\n options: Object.values(ObcAlertFrameType),\n control: {type: 'radio'},\n },\n alertFrameMode: {\n options: Object.values(ObcAlertFrameMode),\n control: {type: 'radio'},\n },\n alertFrameThickness: {\n options: Object.values(ObcAlertFrameThickness),\n control: {type: 'radio'},\n },\n alertFrameStatus: {\n options: Object.values(ObcAlertFrameStatus),\n control: {type: 'radio'},\n },\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":";;;;;;;AAqBA,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,gBAAgB;EACd,SAAS,OAAO,OAAO,iBAAiB;EACxC,SAAS,EAAC,MAAM,QAAO;CACzB;CACA,gBAAgB;EACd,SAAS,OAAO,OAAO,iBAAiB;EACxC,SAAS,EAAC,MAAM,QAAO;CACzB;CACA,qBAAqB;EACnB,SAAS,OAAO,OAAO,sBAAsB;EAC7C,SAAS,EAAC,MAAM,QAAO;CACzB;CACA,kBAAkB;EAChB,SAAS,OAAO,OAAO,SAAmB;EAC1C,SAAS,EAAC,MAAM,QAAO;CACzB;CACA,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"}
@@ -30,7 +30,7 @@ var ObcBipolarTransistor = class ObcBipolarTransistor extends ObcAbstractAutomat
30
30
  }
31
31
  get icon() {
32
32
  switch (this.alternativeIcon) {
33
- case "bipolarTransistor02": if (this.on) return html`<obi-bipolar-transistor-02-on
33
+ case "bipolarTransistor02": if (this.turnedOn) return html`<obi-bipolar-transistor-02-on
34
34
  usecsscolor
35
35
  slot="icon"
36
36
  ></obi-bipolar-transistor-02-on>
@@ -46,7 +46,7 @@ var ObcBipolarTransistor = class ObcBipolarTransistor extends ObcAbstractAutomat
46
46
  usecsscolor
47
47
  slot="icon-silhouette"
48
48
  ></obi-bipolar-transistor-02-off>`;
49
- case "bipolarTransistor03": if (this.on) return html`<obi-bipolar-transistor-03-on
49
+ case "bipolarTransistor03": if (this.turnedOn) return html`<obi-bipolar-transistor-03-on
50
50
  usecsscolor
51
51
  slot="icon"
52
52
  ></obi-bipolar-transistor-03-on>
@@ -62,7 +62,7 @@ var ObcBipolarTransistor = class ObcBipolarTransistor extends ObcAbstractAutomat
62
62
  usecsscolor
63
63
  slot="icon-silhouette"
64
64
  ></obi-bipolar-transistor-03-off>`;
65
- case "bipolarTransistor04": if (this.on) return html`<obi-bipolar-transistor-04-on
65
+ case "bipolarTransistor04": if (this.turnedOn) return html`<obi-bipolar-transistor-04-on
66
66
  usecsscolor
67
67
  slot="icon"
68
68
  ></obi-bipolar-transistor-04-on>
@@ -94,7 +94,7 @@ var ObcBipolarTransistor = class ObcBipolarTransistor extends ObcAbstractAutomat
94
94
  usecsscolor
95
95
  slot="icon-silhouette"
96
96
  ></obi-bipolar-transistor-04-flat>`;
97
- default: if (this.on) return html`<obi-bipolar-transistor-on
97
+ default: if (this.turnedOn) return html`<obi-bipolar-transistor-on
98
98
  usecsscolor
99
99
  slot="icon"
100
100
  ></obi-bipolar-transistor-on>
@@ -1 +1 @@
1
- {"version":3,"file":"bipolar-transistor.js","names":[],"sources":["../../../src/automation/bipolar-transistor/bipolar-transistor.ts"],"sourcesContent":["import {html} from 'lit';\nimport {property} from 'lit/decorators.js';\nimport '../../icons/icon-bipolar-transistor-on.js';\nimport '../../icons/icon-bipolar-transistor-off.js';\nimport '../../icons/icon-bipolar-transistor-02-on.js';\nimport '../../icons/icon-bipolar-transistor-02-off.js';\nimport '../../icons/icon-bipolar-transistor-03-on.js';\nimport '../../icons/icon-bipolar-transistor-03-off.js';\nimport '../../icons/icon-bipolar-transistor-04-on.js';\nimport '../../icons/icon-bipolar-transistor-04-off.js';\nimport '../../icons/icon-bipolar-transistor-03-flat.js';\nimport '../../icons/icon-bipolar-transistor-04-flat.js';\nimport {customElement} from '../../decorator.js';\nimport {ObcAbstractAutomationButtonSquared} from '../automation-button/abstract-automation-button-squared.js';\n\nexport enum BipolarTransistorAlternativeIcon {\n bipolarTransistor01 = 'bipolarTransistor01',\n bipolarTransistor02 = 'bipolarTransistor02',\n bipolarTransistor03 = 'bipolarTransistor03',\n bipolarTransistor04 = 'bipolarTransistor04',\n bipolarTransistor03Flat = 'bipolarTransistor03Flat',\n bipolarTransistor04Flat = 'bipolarTransistor04Flat',\n}\n\n/**\n * @stable\n */\n@customElement('obc-bipolar-transistor')\nexport class ObcBipolarTransistor extends ObcAbstractAutomationButtonSquared {\n @property({type: String}) alternativeIcon: BipolarTransistorAlternativeIcon =\n BipolarTransistorAlternativeIcon.bipolarTransistor01;\n\n override get icon() {\n switch (this.alternativeIcon) {\n case BipolarTransistorAlternativeIcon.bipolarTransistor02:\n if (this.on) {\n return html`<obi-bipolar-transistor-02-on\n usecsscolor\n slot=\"icon\"\n ></obi-bipolar-transistor-02-on>\n <obi-bipolar-transistor-02-on\n usecsscolor\n slot=\"icon-silhouette\"\n ></obi-bipolar-transistor-02-on>`;\n } else {\n return html`<obi-bipolar-transistor-02-off\n usecsscolor\n slot=\"icon\"\n ></obi-bipolar-transistor-02-off>\n <obi-bipolar-transistor-02-off\n usecsscolor\n slot=\"icon-silhouette\"\n ></obi-bipolar-transistor-02-off>`;\n }\n case BipolarTransistorAlternativeIcon.bipolarTransistor03:\n if (this.on) {\n return html`<obi-bipolar-transistor-03-on\n usecsscolor\n slot=\"icon\"\n ></obi-bipolar-transistor-03-on>\n <obi-bipolar-transistor-03-on\n usecsscolor\n slot=\"icon-silhouette\"\n ></obi-bipolar-transistor-03-on>`;\n } else {\n return html`<obi-bipolar-transistor-03-off\n usecsscolor\n slot=\"icon\"\n ></obi-bipolar-transistor-03-off>\n <obi-bipolar-transistor-03-off\n usecsscolor\n slot=\"icon-silhouette\"\n ></obi-bipolar-transistor-03-off>`;\n }\n case BipolarTransistorAlternativeIcon.bipolarTransistor04:\n if (this.on) {\n return html`<obi-bipolar-transistor-04-on\n usecsscolor\n slot=\"icon\"\n ></obi-bipolar-transistor-04-on>\n <obi-bipolar-transistor-04-on\n usecsscolor\n slot=\"icon-silhouette\"\n ></obi-bipolar-transistor-04-on>`;\n } else {\n return html`<obi-bipolar-transistor-04-off\n usecsscolor\n slot=\"icon\"\n ></obi-bipolar-transistor-04-off>\n <obi-bipolar-transistor-04-off\n usecsscolor\n slot=\"icon-silhouette\"\n ></obi-bipolar-transistor-04-off>`;\n }\n case BipolarTransistorAlternativeIcon.bipolarTransistor03Flat:\n return html`<obi-bipolar-transistor-03-flat\n usecsscolor\n slot=\"icon\"\n ></obi-bipolar-transistor-03-flat>\n <obi-bipolar-transistor-03-flat\n usecsscolor\n slot=\"icon-silhouette\"\n ></obi-bipolar-transistor-03-flat>`;\n case BipolarTransistorAlternativeIcon.bipolarTransistor04Flat:\n return html`<obi-bipolar-transistor-04-flat\n usecsscolor\n slot=\"icon\"\n ></obi-bipolar-transistor-04-flat>\n <obi-bipolar-transistor-04-flat\n usecsscolor\n slot=\"icon-silhouette\"\n ></obi-bipolar-transistor-04-flat>`;\n default:\n if (this.on) {\n return html`<obi-bipolar-transistor-on\n usecsscolor\n slot=\"icon\"\n ></obi-bipolar-transistor-on>\n <obi-bipolar-transistor-on\n usecsscolor\n slot=\"icon-silhouette\"\n ></obi-bipolar-transistor-on>`;\n } else {\n return html`<obi-bipolar-transistor-off\n usecsscolor\n slot=\"icon\"\n ></obi-bipolar-transistor-off>\n <obi-bipolar-transistor-off\n usecsscolor\n slot=\"icon-silhouette\"\n ></obi-bipolar-transistor-off>`;\n }\n }\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'obc-bipolar-transistor': ObcBipolarTransistor;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAeA,IAAY,mCAAL,yBAAA,kCAAA;CACL,iCAAA,yBAAA;CACA,iCAAA,yBAAA;CACA,iCAAA,yBAAA;CACA,iCAAA,yBAAA;CACA,iCAAA,6BAAA;CACA,iCAAA,6BAAA;;AACF,EAAA,CAAA,CAAA;AAMO,IAAM,uBAAN,MAAM,6BAA6B,mCAAmC;;;;;CAI3E,IAAa,OAAO;EAClB,QAAQ,KAAK,iBAAb;GACE,KAAA,uBACE,IAAI,KAAK,IACP,OAAO,IAAI;;;;;;;;QASX,OAAO,IAAI;;;;;;;;GASf,KAAA,uBACE,IAAI,KAAK,IACP,OAAO,IAAI;;;;;;;;QASX,OAAO,IAAI;;;;;;;;GASf,KAAA,uBACE,IAAI,KAAK,IACP,OAAO,IAAI;;;;;;;;QASX,OAAO,IAAI;;;;;;;;GASf,KAAA,2BACE,OAAO,IAAI;;;;;;;;GAQb,KAAA,2BACE,OAAO,IAAI;;;;;;;;GAQb,SACE,IAAI,KAAK,IACP,OAAO,IAAI;;;;;;;;QASX,OAAO,IAAI;;;;;;;;EASjB;CACF;AACF;AAzGG,WAAA,CAAA,SAAS,EAAC,MAAM,OAAM,CAAC,CAAA,GAAA,qBAAA,WAAA,mBAAA,KAAA,CAAA;AAFzB,uBAAA,WAAA,CAAA,cAAc,wBAAwB,CAAA,GAAA,oBAAA"}
1
+ {"version":3,"file":"bipolar-transistor.js","names":[],"sources":["../../../src/automation/bipolar-transistor/bipolar-transistor.ts"],"sourcesContent":["import {html} from 'lit';\nimport {property} from 'lit/decorators.js';\nimport '../../icons/icon-bipolar-transistor-on.js';\nimport '../../icons/icon-bipolar-transistor-off.js';\nimport '../../icons/icon-bipolar-transistor-02-on.js';\nimport '../../icons/icon-bipolar-transistor-02-off.js';\nimport '../../icons/icon-bipolar-transistor-03-on.js';\nimport '../../icons/icon-bipolar-transistor-03-off.js';\nimport '../../icons/icon-bipolar-transistor-04-on.js';\nimport '../../icons/icon-bipolar-transistor-04-off.js';\nimport '../../icons/icon-bipolar-transistor-03-flat.js';\nimport '../../icons/icon-bipolar-transistor-04-flat.js';\nimport {customElement} from '../../decorator.js';\nimport {ObcAbstractAutomationButtonSquared} from '../automation-button/abstract-automation-button-squared.js';\n\nexport enum BipolarTransistorAlternativeIcon {\n bipolarTransistor01 = 'bipolarTransistor01',\n bipolarTransistor02 = 'bipolarTransistor02',\n bipolarTransistor03 = 'bipolarTransistor03',\n bipolarTransistor04 = 'bipolarTransistor04',\n bipolarTransistor03Flat = 'bipolarTransistor03Flat',\n bipolarTransistor04Flat = 'bipolarTransistor04Flat',\n}\n\n/**\n * @stable\n */\n@customElement('obc-bipolar-transistor')\nexport class ObcBipolarTransistor extends ObcAbstractAutomationButtonSquared {\n @property({type: String}) alternativeIcon: BipolarTransistorAlternativeIcon =\n BipolarTransistorAlternativeIcon.bipolarTransistor01;\n\n override get icon() {\n switch (this.alternativeIcon) {\n case BipolarTransistorAlternativeIcon.bipolarTransistor02:\n if (this.turnedOn) {\n return html`<obi-bipolar-transistor-02-on\n usecsscolor\n slot=\"icon\"\n ></obi-bipolar-transistor-02-on>\n <obi-bipolar-transistor-02-on\n usecsscolor\n slot=\"icon-silhouette\"\n ></obi-bipolar-transistor-02-on>`;\n } else {\n return html`<obi-bipolar-transistor-02-off\n usecsscolor\n slot=\"icon\"\n ></obi-bipolar-transistor-02-off>\n <obi-bipolar-transistor-02-off\n usecsscolor\n slot=\"icon-silhouette\"\n ></obi-bipolar-transistor-02-off>`;\n }\n case BipolarTransistorAlternativeIcon.bipolarTransistor03:\n if (this.turnedOn) {\n return html`<obi-bipolar-transistor-03-on\n usecsscolor\n slot=\"icon\"\n ></obi-bipolar-transistor-03-on>\n <obi-bipolar-transistor-03-on\n usecsscolor\n slot=\"icon-silhouette\"\n ></obi-bipolar-transistor-03-on>`;\n } else {\n return html`<obi-bipolar-transistor-03-off\n usecsscolor\n slot=\"icon\"\n ></obi-bipolar-transistor-03-off>\n <obi-bipolar-transistor-03-off\n usecsscolor\n slot=\"icon-silhouette\"\n ></obi-bipolar-transistor-03-off>`;\n }\n case BipolarTransistorAlternativeIcon.bipolarTransistor04:\n if (this.turnedOn) {\n return html`<obi-bipolar-transistor-04-on\n usecsscolor\n slot=\"icon\"\n ></obi-bipolar-transistor-04-on>\n <obi-bipolar-transistor-04-on\n usecsscolor\n slot=\"icon-silhouette\"\n ></obi-bipolar-transistor-04-on>`;\n } else {\n return html`<obi-bipolar-transistor-04-off\n usecsscolor\n slot=\"icon\"\n ></obi-bipolar-transistor-04-off>\n <obi-bipolar-transistor-04-off\n usecsscolor\n slot=\"icon-silhouette\"\n ></obi-bipolar-transistor-04-off>`;\n }\n case BipolarTransistorAlternativeIcon.bipolarTransistor03Flat:\n return html`<obi-bipolar-transistor-03-flat\n usecsscolor\n slot=\"icon\"\n ></obi-bipolar-transistor-03-flat>\n <obi-bipolar-transistor-03-flat\n usecsscolor\n slot=\"icon-silhouette\"\n ></obi-bipolar-transistor-03-flat>`;\n case BipolarTransistorAlternativeIcon.bipolarTransistor04Flat:\n return html`<obi-bipolar-transistor-04-flat\n usecsscolor\n slot=\"icon\"\n ></obi-bipolar-transistor-04-flat>\n <obi-bipolar-transistor-04-flat\n usecsscolor\n slot=\"icon-silhouette\"\n ></obi-bipolar-transistor-04-flat>`;\n default:\n if (this.turnedOn) {\n return html`<obi-bipolar-transistor-on\n usecsscolor\n slot=\"icon\"\n ></obi-bipolar-transistor-on>\n <obi-bipolar-transistor-on\n usecsscolor\n slot=\"icon-silhouette\"\n ></obi-bipolar-transistor-on>`;\n } else {\n return html`<obi-bipolar-transistor-off\n usecsscolor\n slot=\"icon\"\n ></obi-bipolar-transistor-off>\n <obi-bipolar-transistor-off\n usecsscolor\n slot=\"icon-silhouette\"\n ></obi-bipolar-transistor-off>`;\n }\n }\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'obc-bipolar-transistor': ObcBipolarTransistor;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAeA,IAAY,mCAAL,yBAAA,kCAAA;CACL,iCAAA,yBAAA;CACA,iCAAA,yBAAA;CACA,iCAAA,yBAAA;CACA,iCAAA,yBAAA;CACA,iCAAA,6BAAA;CACA,iCAAA,6BAAA;;AACF,EAAA,CAAA,CAAA;AAMO,IAAM,uBAAN,MAAM,6BAA6B,mCAAmC;;;;;CAI3E,IAAa,OAAO;EAClB,QAAQ,KAAK,iBAAb;GACE,KAAA,uBACE,IAAI,KAAK,UACP,OAAO,IAAI;;;;;;;;QASX,OAAO,IAAI;;;;;;;;GASf,KAAA,uBACE,IAAI,KAAK,UACP,OAAO,IAAI;;;;;;;;QASX,OAAO,IAAI;;;;;;;;GASf,KAAA,uBACE,IAAI,KAAK,UACP,OAAO,IAAI;;;;;;;;QASX,OAAO,IAAI;;;;;;;;GASf,KAAA,2BACE,OAAO,IAAI;;;;;;;;GAQb,KAAA,2BACE,OAAO,IAAI;;;;;;;;GAQb,SACE,IAAI,KAAK,UACP,OAAO,IAAI;;;;;;;;QASX,OAAO,IAAI;;;;;;;;EASjB;CACF;AACF;AAzGG,WAAA,CAAA,SAAS,EAAC,MAAM,OAAM,CAAC,CAAA,GAAA,qBAAA,WAAA,mBAAA,KAAA,CAAA;AAFzB,uBAAA,WAAA,CAAA,cAAc,wBAAwB,CAAA,GAAA,oBAAA"}