@operato/process 1.4.54 → 1.4.56

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 (20) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/src/modeller/property-sidebar/data-binding/data-binding.js +2 -0
  3. package/dist/src/modeller/property-sidebar/data-binding/data-binding.js.map +1 -1
  4. package/dist/src/modeller/property-sidebar/effects/property-event-hover.d.ts +2 -1
  5. package/dist/src/modeller/property-sidebar/effects/property-event-hover.js +60 -8
  6. package/dist/src/modeller/property-sidebar/effects/property-event-hover.js.map +1 -1
  7. package/dist/src/modeller/property-sidebar/effects/property-event-tap.d.ts +0 -1
  8. package/dist/src/modeller/property-sidebar/effects/property-event-tap.js +11 -14
  9. package/dist/src/modeller/property-sidebar/effects/property-event-tap.js.map +1 -1
  10. package/dist/tsconfig.tsbuildinfo +1 -1
  11. package/package.json +3 -3
  12. package/src/modeller/property-sidebar/data-binding/data-binding.ts +2 -0
  13. package/src/modeller/property-sidebar/effects/property-event-hover.ts +68 -9
  14. package/src/modeller/property-sidebar/effects/property-event-tap.ts +10 -12
  15. package/dist/src/modeller/property-sidebar/data-binding/data-binding-mapper copy.d.ts +0 -60
  16. package/dist/src/modeller/property-sidebar/data-binding/data-binding-mapper copy.js +0 -425
  17. package/dist/src/modeller/property-sidebar/data-binding/data-binding-mapper copy.js.map +0 -1
  18. package/dist/src/modeller/property-sidebar/data-binding/data-binding-value-map.d.ts +0 -6
  19. package/dist/src/modeller/property-sidebar/data-binding/data-binding-value-map.js +0 -20
  20. package/dist/src/modeller/property-sidebar/data-binding/data-binding-value-map.js.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@operato/process",
3
- "version": "1.4.54",
3
+ "version": "1.4.56",
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.54",
72
+ "@operato/board": "^1.4.56",
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": "783bec574847b8b6d40bf3173a68167781ca849d"
131
+ "gitHead": "6efbdbb21c3d45712916c7eb6ed918b1d3f25e87"
132
132
  }
@@ -40,6 +40,8 @@ const PROPS = [
40
40
  'dimension',
41
41
  'location',
42
42
  'accessor',
43
+ 'partial-data',
44
+ 'partial-value',
43
45
  '(action)'
44
46
  ].map(prop => {
45
47
  return typeof prop == 'string' ? { name: prop, label: prop } : { name: prop[0], label: prop[1] }
@@ -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>
@@ -1,60 +0,0 @@
1
- /**
2
- * @license Copyright © HatioLab Inc. All rights reserved.
3
- */
4
- import '@operato/input/ox-buttons-radio.js';
5
- import '@operato/input/ox-input-code.js';
6
- import '@operato/i18n/ox-i18n.js';
7
- import '@operato/help/ox-help-icon.js';
8
- import './data-binding-value-map.js';
9
- import './data-binding-value-range.js';
10
- import { LitElement, PropertyValues } from 'lit';
11
- import { Properties, Scene } from '@hatiolab/things-scene';
12
- export type Rule = {
13
- map?: Properties;
14
- range?: Properties[];
15
- eval?: string;
16
- } | any;
17
- export type Mapping = {
18
- source?: string;
19
- rule: 'map' | 'range' | 'eval' | 'value';
20
- accessor?: string;
21
- target?: string;
22
- property?: string;
23
- param?: Rule;
24
- ndnsp?: boolean;
25
- };
26
- /**
27
- element for mapping data value editing
28
-
29
- Example:
30
-
31
- <data-binding-mapper mapping=${mapping}>
32
- </data-binding-mapper>
33
- */
34
- export declare class DataBindingMapper extends LitElement {
35
- static styles: import("lit").CSSResult[];
36
- mapping: Mapping;
37
- rule: Rule;
38
- properties: Properties[];
39
- scene?: Scene;
40
- _valueTypes: any;
41
- _componentIds: {
42
- value: string;
43
- description: string;
44
- }[];
45
- editor: HTMLInputElement;
46
- source: HTMLInputElement;
47
- target: HTMLInputElement;
48
- firstUpdated(): void;
49
- updated(changes: PropertyValues<this>): void;
50
- findComponentIds(): {
51
- value: string;
52
- description: any;
53
- }[];
54
- render(): import("lit-html").TemplateResult<1>;
55
- _valuetype(property: string): any;
56
- private _keep_saved_rule_params;
57
- _onChangedMapping(): Promise<void>;
58
- _onChangeRule(e: Event): void;
59
- _onChange(e: Event): void;
60
- }