@operato/board 1.4.55 → 1.4.57

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@operato/board",
3
- "version": "1.4.55",
3
+ "version": "1.4.57",
4
4
  "description": "Webcomponent for board following open-wc recommendations",
5
5
  "author": "heartyoh",
6
6
  "main": "dist/src/index.js",
@@ -148,5 +148,5 @@
148
148
  "prettier --write"
149
149
  ]
150
150
  },
151
- "gitHead": "d0abe895a05008b1366e4357dfb4e59b56c75e1e"
151
+ "gitHead": "d18a96ad0d1a4ab65acfec887d170235d0e31ea4"
152
152
  }
@@ -30,6 +30,7 @@ export type Mapping = {
30
30
  property?: string
31
31
  param?: Rule
32
32
  ndnsp?: boolean
33
+ partial?: boolean
33
34
  }
34
35
 
35
36
  /**
@@ -305,6 +306,11 @@ export class DataBindingMapper extends LitElement {
305
306
  </ox-input-code>
306
307
  </div>
307
308
 
309
+ <div class="checkbox-row">
310
+ <input id="checkbox-partial" type="checkbox" value-key="partial" .checked=${mapping.partial === true} />
311
+ <label for="checkbox-partial"> <ox-i18n msgid="label.partial-spreading">Partial Spreading</ox-i18n> </label>
312
+ </div>
313
+
308
314
  <div class="checkbox-row">
309
315
  <input id="checkbox-ndnsp" type="checkbox" value-key="ndnsp" .checked=${mapping.ndnsp === true} />
310
316
  <label for="checkbox-ndnsp"> <ox-i18n msgid="label.ndnsp">No Data No Spreading</ox-i18n> </label>
@@ -435,6 +441,13 @@ export class DataBindingMapper extends LitElement {
435
441
  ...this.mapping,
436
442
  ndnsp: value
437
443
  }
444
+ } else if (key === 'partial' /* partial spreading */) {
445
+ value = element.checked
446
+
447
+ this.mapping = {
448
+ ...this.mapping,
449
+ partial: value
450
+ }
438
451
  }
439
452
 
440
453
  if (!this.mapping.rule) {
@@ -14,6 +14,8 @@ import { Properties, Scene } from '@hatiolab/things-scene'
14
14
  import { EffectsSharedStyle } from './effects-shared-style.js'
15
15
  import { convert } from './value-converter'
16
16
 
17
+ const SETS_ACTION = ['data-set', 'partial-data-set', 'value-set', 'partial-value-set']
18
+
17
19
  export class PropertyEventHover extends LitElement {
18
20
  static styles = [
19
21
  EffectsSharedStyle,
@@ -84,7 +86,9 @@ export class PropertyEventHover extends LitElement {
84
86
  <option value="data-toggle">toggle(true/false) target component data</option>
85
87
  <option value="data-tristate">tristate(0/1/2) target component data</option>
86
88
  <option value="data-set">set value to target component data</option>
89
+ <option value="partial-data-set">set partial value to target component data</option>
87
90
  <option value="value-set">set value to target component value</option>
91
+ <option value="partial-value-set">set partial value to target component value</option>
88
92
  <option value="mouse-cursor">change mouse cursor to target style</option>
89
93
  </select>
90
94
 
@@ -109,7 +113,7 @@ export class PropertyEventHover extends LitElement {
109
113
  )}
110
114
  </datalist>
111
115
  `}
112
- ${action == 'data-set' || action == 'value-set'
116
+ ${SETS_ACTION.indexOf(action) != -1
113
117
  ? html`
114
118
  <label> <ox-i18n msgid="label.value">value</ox-i18n> </label>
115
119
  <ox-input-data value-key="value" .value=${value} custom-editor fullwidth></ox-input-data>
@@ -142,6 +146,8 @@ export class PropertyEventHover extends LitElement {
142
146
  case 'data-tristate':
143
147
  case 'data-set':
144
148
  case 'value-set':
149
+ case 'partial-data-set':
150
+ case 'partial-value-set':
145
151
  let ids =
146
152
  (this.scene &&
147
153
  this.scene.ids.map(i => {
@@ -14,6 +14,8 @@ import { scenarios } from '../../../graphql/scenario'
14
14
  import { EffectsSharedStyle } from './effects-shared-style'
15
15
  import { convert } from './value-converter'
16
16
 
17
+ const SETS_ACTION = ['data-set', 'partial-data-set', 'value-set', 'partial-value-set', 'start-scenario', 'run-scenario']
18
+
17
19
  export class PropertyEventTap extends LitElement {
18
20
  static styles = [EffectsSharedStyle]
19
21
 
@@ -61,7 +63,9 @@ export class PropertyEventTap extends LitElement {
61
63
  <option value="data-toggle">toggle(true/false) target component data</option>
62
64
  <option value="data-tristate">tristate(0/1/2) target component data</option>
63
65
  <option value="data-set">set value to target component data</option>
66
+ <option value="partial-data-set">set partial value to target component data</option>
64
67
  <option value="value-set">set value to target component value</option>
68
+ <option value="partial-value-set">set partial value to target component value</option>
65
69
  <option value="start-scenario">start the given scenario</option>
66
70
  <option value="run-scenario">run the given scenario</option>
67
71
  </select>
@@ -116,7 +120,7 @@ export class PropertyEventTap extends LitElement {
116
120
  : html``
117
121
  }
118
122
  `
119
- : action === 'data-set' || action === 'value-set' || action === 'start-scenario' || action === 'run-scenario'
123
+ : SETS_ACTION.indexOf(action) != -1
120
124
  ? html`
121
125
  <label> <ox-i18n msgid="label.value">value</ox-i18n> </label>
122
126
  <ox-input-data value-key="value" .value=${value} custom-editor fullwidth></ox-input-data>