@oicl/openbridge-webcomponents-full-bundle 2.1.0-next.2 → 2.1.0-next.4

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 (40) hide show
  1. package/bundle/openbridge-webcomponents.bundle.js +726 -504
  2. package/bundle/openbridge-webcomponents.bundle.js.map +1 -1
  3. package/custom-elements.json +2035 -720
  4. package/dist/automation/analog-threeway-valve/analog-threeway-valve.d.ts +76 -0
  5. package/dist/automation/analog-threeway-valve/analog-threeway-valve.d.ts.map +1 -0
  6. package/dist/automation/analog-threeway-valve/analog-threeway-valve.js +61 -0
  7. package/dist/automation/analog-threeway-valve/analog-threeway-valve.js.map +1 -0
  8. package/dist/automation/analog-valve/analog-valve.js +1 -1
  9. package/dist/automation/digital-threeway-valve/digital-threeway-valve.d.ts +82 -0
  10. package/dist/automation/digital-threeway-valve/digital-threeway-valve.d.ts.map +1 -0
  11. package/dist/automation/digital-threeway-valve/digital-threeway-valve.js +90 -0
  12. package/dist/automation/digital-threeway-valve/digital-threeway-valve.js.map +1 -0
  13. package/dist/automation/threeway-valve-shared/threeway-valve-shared.d.ts +39 -0
  14. package/dist/automation/threeway-valve-shared/threeway-valve-shared.d.ts.map +1 -0
  15. package/dist/automation/threeway-valve-shared/threeway-valve-shared.js +80 -0
  16. package/dist/automation/threeway-valve-shared/threeway-valve-shared.js.map +1 -0
  17. package/dist/automation/valve-analog-three-way-icon/valve-analog-three-way-icon.d.ts +65 -4
  18. package/dist/automation/valve-analog-three-way-icon/valve-analog-three-way-icon.d.ts.map +1 -1
  19. package/dist/automation/valve-analog-three-way-icon/valve-analog-three-way-icon.js +153 -111
  20. package/dist/automation/valve-analog-three-way-icon/valve-analog-three-way-icon.js.map +1 -1
  21. package/dist/automation/valve-analoge-two-way-icon/valve-analog-two-way-icon.d.ts +21 -0
  22. package/dist/automation/valve-analoge-two-way-icon/valve-analog-two-way-icon.d.ts.map +1 -1
  23. package/dist/automation/valve-analoge-two-way-icon/valve-analog-two-way-icon.js +39 -58
  24. package/dist/automation/valve-analoge-two-way-icon/valve-analog-two-way-icon.js.map +1 -1
  25. package/dist/components/automation-button-readout-stack/automation-button-readout-stack.d.ts +3 -0
  26. package/dist/components/automation-button-readout-stack/automation-button-readout-stack.d.ts.map +1 -1
  27. package/dist/components/automation-button-readout-stack/automation-button-readout-stack.js +17 -10
  28. package/dist/components/automation-button-readout-stack/automation-button-readout-stack.js.map +1 -1
  29. package/package.json +1 -1
  30. package/src/automation/analog-threeway-valve/analog-threeway-valve.stories.ts +106 -0
  31. package/src/automation/analog-threeway-valve/analog-threeway-valve.ts +105 -0
  32. package/src/automation/digital-threeway-valve/digital-threeway-valve.stories.ts +122 -0
  33. package/src/automation/digital-threeway-valve/digital-threeway-valve.ts +143 -0
  34. package/src/automation/threeway-valve-shared/threeway-valve-shared.ts +110 -0
  35. package/src/automation/valve-analog-three-way-icon/valve-analog-three-way-icon.stories.ts +145 -37
  36. package/src/automation/valve-analog-three-way-icon/valve-analog-three-way-icon.ts +225 -126
  37. package/src/automation/valve-analoge-two-way-icon/valve-analog-two-way-icon.stories.ts +63 -0
  38. package/src/automation/valve-analoge-two-way-icon/valve-analog-two-way-icon.ts +58 -60
  39. package/src/components/automation-button-readout-stack/automation-button-readout-stack.stories.ts +13 -0
  40. package/src/components/automation-button-readout-stack/automation-button-readout-stack.ts +31 -16
@@ -71,12 +71,14 @@ export interface AutomationButtonReadoutStackStateOn {
71
71
  type: 'state-on';
72
72
  value: string;
73
73
  hasIcon: boolean;
74
+ direction?: 'up' | 'down' | 'left' | 'right' | 'none';
74
75
  }
75
76
 
76
77
  export interface AutomationButtonReadoutStackStateOff {
77
78
  type: 'state-off';
78
79
  value: string;
79
80
  hasIcon: boolean;
81
+ direction?: 'up' | 'down' | 'left' | 'right' | 'none';
80
82
  }
81
83
 
82
84
  export interface AutomationButtonReadoutStackButton {
@@ -166,30 +168,39 @@ export class ObcAutomationButtonReadoutStack extends LitElement {
166
168
  ></obc-readout-block>`;
167
169
  }
168
170
 
169
- renderValue(readout: AutomationButtonReadoutStackValue): HTMLTemplateResult {
170
- let directionIcon: HTMLTemplateResult | typeof nothing = nothing;
171
- if (readout.icon == 'arrow') {
172
- if (readout.direction == 'up') {
173
- directionIcon = html`<obi-arrow-up-google
171
+ private renderArrow(
172
+ direction: 'up' | 'down' | 'left' | 'right' | 'none' | undefined
173
+ ): HTMLTemplateResult | typeof nothing {
174
+ switch (direction) {
175
+ case 'up':
176
+ return html`<obi-arrow-up-google
174
177
  class="icon"
175
178
  useCssColor
176
179
  ></obi-arrow-up-google>`;
177
- } else if (readout.direction == 'down') {
178
- directionIcon = html`<obi-arrow-down-google
180
+ case 'down':
181
+ return html`<obi-arrow-down-google
179
182
  class="icon"
180
183
  useCssColor
181
184
  ></obi-arrow-down-google>`;
182
- } else if (readout.direction == 'left') {
183
- directionIcon = html`<obi-arrow-left-google
185
+ case 'left':
186
+ return html`<obi-arrow-left-google
184
187
  class="icon"
185
188
  useCssColor
186
189
  ></obi-arrow-left-google>`;
187
- } else if (readout.direction == 'right') {
188
- directionIcon = html`<obi-arrow-right-google
190
+ case 'right':
191
+ return html`<obi-arrow-right-google
189
192
  class="icon"
190
193
  useCssColor
191
194
  ></obi-arrow-right-google>`;
192
- }
195
+ default:
196
+ return nothing;
197
+ }
198
+ }
199
+
200
+ renderValue(readout: AutomationButtonReadoutStackValue): HTMLTemplateResult {
201
+ let directionIcon: HTMLTemplateResult | typeof nothing = nothing;
202
+ if (readout.icon == 'arrow') {
203
+ directionIcon = this.renderArrow(readout.direction);
193
204
  } else if (readout.icon == 'chevron') {
194
205
  if (readout.direction == 'up') {
195
206
  directionIcon = html`<obi-chevron-double-up-google
@@ -251,8 +262,10 @@ export class ObcAutomationButtonReadoutStack extends LitElement {
251
262
  renderStateOff(
252
263
  readout: AutomationButtonReadoutStackStateOff
253
264
  ): HTMLTemplateResult {
254
- let offIcon: HTMLTemplateResult = html``;
255
- if (readout.hasIcon) {
265
+ let offIcon: HTMLTemplateResult | typeof nothing = html``;
266
+ if (readout.direction && readout.direction !== 'none') {
267
+ offIcon = this.renderArrow(readout.direction);
268
+ } else if (readout.hasIcon) {
256
269
  offIcon = html`<obi-off class="icon" useCssColor></obi-off>`;
257
270
  }
258
271
 
@@ -263,8 +276,10 @@ export class ObcAutomationButtonReadoutStack extends LitElement {
263
276
  renderStateOn(
264
277
  readout: AutomationButtonReadoutStackStateOn
265
278
  ): HTMLTemplateResult {
266
- let onIcon: HTMLTemplateResult = html``;
267
- if (readout.hasIcon) {
279
+ let onIcon: HTMLTemplateResult | typeof nothing = html``;
280
+ if (readout.direction && readout.direction !== 'none') {
281
+ onIcon = this.renderArrow(readout.direction);
282
+ } else if (readout.hasIcon) {
268
283
  onIcon = html`<obi-on class="icon" useCssColor></obi-on>`;
269
284
  }
270
285