@operato/process 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/process",
3
- "version": "1.4.55",
3
+ "version": "1.4.57",
4
4
  "description": "Webcomponent for business process modeling following open-wc recommendations",
5
5
  "author": "heartyoh",
6
6
  "main": "dist/src/index.js",
@@ -69,7 +69,7 @@
69
69
  "dependencies": {
70
70
  "@open-wc/scoped-elements": "^2.1.3",
71
71
  "@operato/app": "^1.4.47",
72
- "@operato/board": "^1.4.55",
72
+ "@operato/board": "^1.4.57",
73
73
  "@operato/data-grist": "^1.4.39",
74
74
  "@operato/font": "^1.4.39",
75
75
  "@operato/graphql": "^1.4.20",
@@ -128,5 +128,5 @@
128
128
  "prettier --write"
129
129
  ]
130
130
  },
131
- "gitHead": "d0abe895a05008b1366e4357dfb4e59b56c75e1e"
131
+ "gitHead": "d18a96ad0d1a4ab65acfec887d170235d0e31ea4"
132
132
  }
@@ -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) {
@@ -5,16 +5,62 @@
5
5
  import '@operato/input/ox-input-data.js'
6
6
  import '@operato/i18n/ox-i18n.js'
7
7
 
8
- import { html, LitElement } from 'lit'
8
+ import { css, html, LitElement } from 'lit'
9
9
  import { property } from 'lit/decorators.js'
10
+ import { ifDefined } from 'lit/directives/if-defined.js'
10
11
 
11
12
  import { Properties, Scene } from '@hatiolab/things-scene'
12
13
 
13
14
  import { EffectsSharedStyle } from './effects-shared-style.js'
14
15
  import { convert } from './value-converter'
15
16
 
17
+ const SETS_ACTION = ['data-set', 'partial-data-set', 'value-set', 'partial-value-set']
18
+
16
19
  export class PropertyEventHover extends LitElement {
17
- static styles = [EffectsSharedStyle]
20
+ static styles = [
21
+ EffectsSharedStyle,
22
+ css`
23
+ datalist option.cursor-auto {
24
+ cursor: auto;
25
+ }
26
+
27
+ datalist option.cursor-pointer {
28
+ cursor: pointer;
29
+ }
30
+
31
+ datalist option.cursor-default {
32
+ cursor: default;
33
+ }
34
+
35
+ datalist option.cursor-move {
36
+ cursor: move;
37
+ }
38
+
39
+ datalist option.cursor-text {
40
+ cursor: text;
41
+ }
42
+
43
+ datalist option.cursor-wait {
44
+ cursor: wait;
45
+ }
46
+
47
+ datalist option.cursor-help {
48
+ cursor: help;
49
+ }
50
+
51
+ datalist option.cursor-crosshair {
52
+ cursor: crosshair;
53
+ }
54
+
55
+ datalist option.cursor-not-allowed {
56
+ cursor: not-allowed;
57
+ }
58
+
59
+ datalist option.cursor-grab {
60
+ cursor: grab;
61
+ }
62
+ `
63
+ ]
18
64
 
19
65
  @property({ type: Object }) value?: Properties
20
66
  @property({ type: Object }) scene?: Scene
@@ -35,19 +81,20 @@ export class PropertyEventHover extends LitElement {
35
81
  <label> <ox-i18n msgid="label.action">action</ox-i18n> </label>
36
82
  <select id="tap-select" value-key="action" .value=${action || ''}>
37
83
  <option value=""></option>
38
- <option value="popup">popup target process</option>
39
- <option value="infoWindow">open infowindow</option>
84
+ <option value="popup">popup target board</option>
85
+ <option value="info-window">open infowindow</option>
40
86
  <option value="data-toggle">toggle(true/false) target component data</option>
41
87
  <option value="data-tristate">tristate(0/1/2) target component data</option>
42
88
  <option value="data-set">set value to target component data</option>
43
89
  <option value="value-set">set value to target component value</option>
90
+ <option value="mouse-cursor">change mouse cursor to target style</option>
44
91
  </select>
45
92
 
46
93
  <label> <ox-i18n msgid="label.target">target</ox-i18n> </label>
47
94
 
48
95
  ${action == 'popup'
49
96
  ? html`
50
- <ox-editor-process-selector value-key="target" .value=${target} custom-editor></ox-editor-process-selector>
97
+ <ox-editor-board-selector value-key="target" .value=${target} custom-editor></ox-editor-board-selector>
51
98
  `
52
99
  : html`
53
100
  <input
@@ -59,11 +106,12 @@ export class PropertyEventHover extends LitElement {
59
106
 
60
107
  <datalist id="target-list">
61
108
  ${this._getTargetList(action).map(
62
- ({ value, description }) => html` <option .value=${value}>${description}</option> `
109
+ ({ value, description, class: clazz }) =>
110
+ html` <option .value=${value} class=${ifDefined(clazz)}>${description}</option> `
63
111
  )}
64
112
  </datalist>
65
113
  `}
66
- ${action == 'data-set' || action == 'value-set'
114
+ ${SETS_ACTION.indexOf(action) != -1
67
115
  ? html`
68
116
  <label> <ox-i18n msgid="label.value">value</ox-i18n> </label>
69
117
  <ox-input-data value-key="value" .value=${value} custom-editor fullwidth></ox-input-data>
@@ -90,12 +138,14 @@ export class PropertyEventHover extends LitElement {
90
138
  }
91
139
  }
92
140
 
93
- _getTargetList(action: string): { value: string; description: string }[] {
141
+ _getTargetList(action: string): { value: string; description?: string; class?: string }[] {
94
142
  switch (action) {
95
143
  case 'data-toggle':
96
144
  case 'data-tristate':
97
145
  case 'data-set':
98
146
  case 'value-set':
147
+ case 'partial-data-set':
148
+ case 'partial-value-set':
99
149
  let ids =
100
150
  (this.scene &&
101
151
  this.scene.ids.map(i => {
@@ -105,7 +155,8 @@ export class PropertyEventHover extends LitElement {
105
155
  []
106
156
  ids.unshift({ value: '(self)', description: 'self component' })
107
157
  return ids
108
- case 'infoWindow':
158
+
159
+ case 'info-window':
109
160
  return (
110
161
  (this.scene &&
111
162
  this.scene.ids
@@ -118,6 +169,14 @@ export class PropertyEventHover extends LitElement {
118
169
  })) ||
119
170
  []
120
171
  )
172
+
173
+ case 'mouse-cursor':
174
+ return ['auto', 'pointer', 'default', 'move', 'text', 'wait', 'help', 'crosshair', 'not-allowed', 'grab'].map(
175
+ style => {
176
+ return { value: style, class: `cursor-${style}` }
177
+ }
178
+ )
179
+
121
180
  default:
122
181
  return []
123
182
  }
@@ -4,7 +4,6 @@
4
4
 
5
5
  import '@operato/input/ox-input-data.js'
6
6
  import '@operato/i18n/ox-i18n.js'
7
- import '../../../ox-editor-process-selector.js'
8
7
 
9
8
  import { html, LitElement } from 'lit'
10
9
  import { property, state } from 'lit/decorators.js'
@@ -15,6 +14,8 @@ import { scenarios } from '../../../graphql/scenario'
15
14
  import { EffectsSharedStyle } from './effects-shared-style'
16
15
  import { convert } from './value-converter'
17
16
 
17
+ const SETS_ACTION = ['data-set', 'partial-data-set', 'value-set', 'partial-value-set', 'start-scenario', 'run-scenario']
18
+
18
19
  export class PropertyEventTap extends LitElement {
19
20
  static styles = [EffectsSharedStyle]
20
21
 
@@ -50,14 +51,13 @@ export class PropertyEventTap extends LitElement {
50
51
  }}
51
52
  >
52
53
  <option value=""></option>
53
- <option value="run">run this process</option>
54
- <option value="goto">go to target process</option>
54
+ <option value="goto">go to target board</option>
55
55
  <option value="link-open">open new window for target link</option>
56
56
  <option value="link-move">move to target link</option>
57
57
  <option value="route-page">route to page</option>
58
- <option value="popup">popup target process</option>
59
- <option value="modal-popup">modal popup target process</option>
60
- <option value="close-scene">close current process</option>
58
+ <option value="popup">popup target board</option>
59
+ <option value="modal-popup">modal popup target board</option>
60
+ <option value="close-scene">close current board</option>
61
61
  <option value="infoWindow">open infowindow</option>
62
62
  <option value="toggle-info-window">toggle infowindow</option>
63
63
  <option value="data-toggle">toggle(true/false) target component data</option>
@@ -72,10 +72,9 @@ export class PropertyEventTap extends LitElement {
72
72
 
73
73
  ${action === 'goto' || action?.includes('popup')
74
74
  ? html`
75
- <ox-editor-process-selector value-key="target" .value=${target} custom-editor></ox-editor-process-selector>
75
+ <ox-editor-board-selector value-key="target" .value=${target} custom-editor></ox-editor-board-selector>
76
76
  `
77
- : action !== 'run'
78
- ? html`
77
+ : html`
79
78
  <input
80
79
  value-key="target"
81
80
  .value=${target}
@@ -91,8 +90,7 @@ export class PropertyEventTap extends LitElement {
91
90
  ({ value, description }) => html` <option .value=${value}>${description}</option> `
92
91
  )}
93
92
  </datalist>
94
- `
95
- : html``}
93
+ `}
96
94
  ${action === 'goto' || action?.includes('popup')
97
95
  ? html`
98
96
  <label for="input"> <ox-i18n msgid="label.input-data">input</ox-i18n> </label>
@@ -120,7 +118,7 @@ export class PropertyEventTap extends LitElement {
120
118
  : html``
121
119
  }
122
120
  `
123
- : action === 'data-set' || action === 'value-set' || action === 'start-scenario' || action === 'run-scenario'
121
+ : SETS_ACTION.indexOf(action) != -1
124
122
  ? html`
125
123
  <label> <ox-i18n msgid="label.value">value</ox-i18n> </label>
126
124
  <ox-input-data value-key="value" .value=${value} custom-editor fullwidth></ox-input-data>