@operato/process 1.1.28 → 1.1.30

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.1.28",
3
+ "version": "1.1.30",
4
4
  "description": "Webcomponent for business process modeling following open-wc recommendations",
5
5
  "author": "heartyoh",
6
6
  "main": "dist/src/index.js",
@@ -51,16 +51,16 @@
51
51
  },
52
52
  "dependencies": {
53
53
  "@open-wc/scoped-elements": "^2.1.3",
54
- "@operato/app": "^1.1.28",
55
- "@operato/board": "^1.1.28",
56
- "@operato/data-grist": "^1.1.28",
57
- "@operato/font": "^1.1.28",
54
+ "@operato/app": "^1.1.30",
55
+ "@operato/board": "^1.1.30",
56
+ "@operato/data-grist": "^1.1.30",
57
+ "@operato/font": "^1.1.30",
58
58
  "@operato/graphql": "^1.1.13",
59
59
  "@operato/i18n": "^1.1.13",
60
- "@operato/input": "^1.1.28",
60
+ "@operato/input": "^1.1.30",
61
61
  "@operato/markdown": "^1.1.28",
62
62
  "@operato/popup": "^1.1.28",
63
- "@operato/property-editor": "^1.1.28",
63
+ "@operato/property-editor": "^1.1.30",
64
64
  "@operato/styles": "^1.1.28",
65
65
  "@operato/utils": "^1.1.15",
66
66
  "@polymer/paper-dropdown-menu": "^3.2.0",
@@ -111,5 +111,5 @@
111
111
  "prettier --write"
112
112
  ]
113
113
  },
114
- "gitHead": "fe08b608e1c1a95b6341b49e9f6a6339a7a63999"
114
+ "gitHead": "ddd1109c7e57b25e5a14de870a0dc4157b3f5574"
115
115
  }
@@ -35,7 +35,12 @@ export class PropertyEventHover extends LitElement {
35
35
  <label> <ox-i18n msgid="label.action">action</ox-i18n> </label>
36
36
  <select id="tap-select" value-key="action" .value=${action || ''}>
37
37
  <option value=""></option>
38
- <option value="popup">popup target board</option>
38
+ <option value="popup">popup target process</option>
39
+ <option value="infoWindow">open infowindow</option>
40
+ <option value="data-toggle">toggle(true/false) target component data</option>
41
+ <option value="data-tristate">tristate(0/1/2) target component data</option>
42
+ <option value="data-set">set value to target component data</option>
43
+ <option value="value-set">set value to target component value</option>
39
44
  </select>
40
45
 
41
46
  <label> <ox-i18n msgid="label.target">target</ox-i18n> </label>
@@ -41,7 +41,7 @@ export class PropertyEventTap extends LitElement {
41
41
  value-key="action"
42
42
  .value=${action || ''}
43
43
  @change=${async (e: Event) => {
44
- if ((e.target as HTMLSelectElement).value === 'start-scenario') {
44
+ if ((e.target as HTMLSelectElement).value.includes('scenario')) {
45
45
  this.scenarios = (await scenarios()).map(({ name, description }) => {
46
46
  return { value: name, description }
47
47
  })
@@ -49,15 +49,22 @@ export class PropertyEventTap extends LitElement {
49
49
  }}
50
50
  >
51
51
  <option value=""></option>
52
- <option value="goto">go to target board</option>
52
+ <option value="run">run this process</option>
53
+ <option value="goto">go to target process</option>
53
54
  <option value="link-open">open new window for target link</option>
54
55
  <option value="link-move">move to target link</option>
55
56
  <option value="route-page">route to page</option>
56
- <option value="popup">popup target board</option>
57
- <option value="modal-popup">modal popup target board</option>
58
- <option value="close-scene">close current board</option>
57
+ <option value="popup">popup target process</option>
58
+ <option value="modal-popup">modal popup target process</option>
59
+ <option value="close-scene">close current process</option>
59
60
  <option value="infoWindow">open infowindow</option>
60
61
  <option value="toggle-info-window">toggle infowindow</option>
62
+ <option value="data-toggle">toggle(true/false) target component data</option>
63
+ <option value="data-tristate">tristate(0/1/2) target component data</option>
64
+ <option value="data-set">set value to target component data</option>
65
+ <option value="value-set">set value to target component value</option>
66
+ <option value="start-scenario">start the given scenario</option>
67
+ <option value="run-scenario">run the given scenario</option>
61
68
  </select>
62
69
 
63
70
  <label> <ox-i18n msgid="label.target">target</ox-i18n> </label>
@@ -70,7 +77,8 @@ export class PropertyEventTap extends LitElement {
70
77
  custom-editor
71
78
  ></things-editor-board-selector>
72
79
  `
73
- : html`
80
+ : action !== 'run'
81
+ ? html`
74
82
  <input
75
83
  value-key="target"
76
84
  .value=${target}
@@ -86,7 +94,8 @@ export class PropertyEventTap extends LitElement {
86
94
  ({ value, description }) => html` <option .value=${value}>${description}</option> `
87
95
  )}
88
96
  </datalist>
89
- `}
97
+ `
98
+ : html``}
90
99
  ${action === 'goto' || action?.includes('popup')
91
100
  ? html`
92
101
  <label for="input"> <ox-i18n msgid="label.input-data">input</ox-i18n> </label>
@@ -321,6 +321,7 @@ export class OxProcessViewer extends LitElement {
321
321
  }
322
322
 
323
323
  bindSceneEvents() {
324
+ this._scene.on('run', this.onRunProcess, this)
324
325
  this._scene.on('goto', this.onLinkGoto, this)
325
326
  this._scene.on('link-open', this.onLinkOpen, this)
326
327
  this._scene.on('link-move', this.onLinkMove, this)
@@ -330,6 +331,7 @@ export class OxProcessViewer extends LitElement {
330
331
  }
331
332
 
332
333
  unbindSceneEvents(scene: any) {
334
+ scene.off('run', this.onRunProcess, this)
333
335
  scene.off('goto', this.onLinkGoto, this)
334
336
  scene.off('link-open', this.onLinkOpen, this)
335
337
  scene.off('link-move', this.onLinkMove, this)
@@ -422,6 +424,10 @@ export class OxProcessViewer extends LitElement {
422
424
  )
423
425
  }
424
426
 
427
+ onRunProcess() {
428
+ this.dispatchEvent(new CustomEvent('run-process', { bubbles: true, composed: true, detail: this.process.id }))
429
+ }
430
+
425
431
  onLinkGoto(targetProcessId: string, options: any, fromComponent: any) {
426
432
  const { input, output } = options || { input: '(self)' }
427
433
  const data = input && fromComponent.root.findFirst(input, fromComponent)?.data