@operato/process 1.1.37 → 1.1.38
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.
|
|
3
|
+
"version": "1.1.38",
|
|
4
4
|
"description": "Webcomponent for business process modeling following open-wc recommendations",
|
|
5
5
|
"author": "heartyoh",
|
|
6
6
|
"main": "dist/src/index.js",
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
"dependencies": {
|
|
69
69
|
"@open-wc/scoped-elements": "^2.1.3",
|
|
70
70
|
"@operato/app": "^1.1.37",
|
|
71
|
-
"@operato/board": "^1.1.
|
|
71
|
+
"@operato/board": "^1.1.38",
|
|
72
72
|
"@operato/data-grist": "^1.1.37",
|
|
73
73
|
"@operato/font": "^1.1.37",
|
|
74
74
|
"@operato/graphql": "^1.1.13",
|
|
@@ -127,5 +127,5 @@
|
|
|
127
127
|
"prettier --write"
|
|
128
128
|
]
|
|
129
129
|
},
|
|
130
|
-
"gitHead": "
|
|
130
|
+
"gitHead": "58cc13eb2ebd26572d68a3fd0518dde66d72bb6c"
|
|
131
131
|
}
|
package/src/ox-process-viewer.ts
CHANGED
|
@@ -97,12 +97,14 @@ export class OxProcessViewer extends LitElement {
|
|
|
97
97
|
@property({ type: Boolean, reflect: true, attribute: 'hide-navigation' }) hideNavigation = false
|
|
98
98
|
|
|
99
99
|
@state() _scene: any = null
|
|
100
|
-
@state() _forward:
|
|
101
|
-
@state() _backward:
|
|
100
|
+
@state() _forward: { id: string; scene: any }[] = []
|
|
101
|
+
@state() _backward: { id: string; scene: any }[] = []
|
|
102
102
|
|
|
103
103
|
@state() _oldtarget?: HTMLElement
|
|
104
104
|
@state() _fade_animations?: Array<Animation>
|
|
105
105
|
|
|
106
|
+
public currentProcessId?: string = this.process?.id
|
|
107
|
+
|
|
106
108
|
@query('#target') _target!: HTMLElement
|
|
107
109
|
@query('#prev') _prev!: HTMLElement
|
|
108
110
|
@query('#next') _next!: HTMLElement
|
|
@@ -207,7 +209,7 @@ export class OxProcessViewer extends LitElement {
|
|
|
207
209
|
if (!this.process || !this.process.id) return
|
|
208
210
|
|
|
209
211
|
this._scene = await this.provider!.get(this.process.id, true)
|
|
210
|
-
this.setupScene(this._scene)
|
|
212
|
+
this.setupScene({ id: this.process.id, scene: this._scene })
|
|
211
213
|
}
|
|
212
214
|
|
|
213
215
|
initScene() {
|
|
@@ -229,7 +231,7 @@ export class OxProcessViewer extends LitElement {
|
|
|
229
231
|
|
|
230
232
|
this.provider!.add(this.process.id, this._scene)
|
|
231
233
|
|
|
232
|
-
this.setupScene(this._scene)
|
|
234
|
+
this.setupScene({ id: this.process.id, scene: this._scene })
|
|
233
235
|
}
|
|
234
236
|
|
|
235
237
|
closeScene() {
|
|
@@ -243,10 +245,10 @@ export class OxProcessViewer extends LitElement {
|
|
|
243
245
|
}
|
|
244
246
|
|
|
245
247
|
// delete queued scenes
|
|
246
|
-
this._forward.forEach(scene => scene.release && scene.release())
|
|
248
|
+
this._forward.forEach(({ scene }) => scene.release && scene.release())
|
|
247
249
|
this._forward = []
|
|
248
250
|
|
|
249
|
-
this._backward.forEach(scene => scene.release && scene.release())
|
|
251
|
+
this._backward.forEach(({ scene }) => scene.release && scene.release())
|
|
250
252
|
this._backward = []
|
|
251
253
|
}
|
|
252
254
|
|
|
@@ -255,7 +257,7 @@ export class OxProcessViewer extends LitElement {
|
|
|
255
257
|
this.transientShowButtons()
|
|
256
258
|
}
|
|
257
259
|
|
|
258
|
-
setupScene(scene: any) {
|
|
260
|
+
setupScene({ id, scene }: { id: string; scene: any }) {
|
|
259
261
|
this._scene = scene
|
|
260
262
|
|
|
261
263
|
const backgroundColor = this._scene?.root.state.fillStyle
|
|
@@ -274,6 +276,7 @@ export class OxProcessViewer extends LitElement {
|
|
|
274
276
|
if (this.data) {
|
|
275
277
|
this._scene.data = this.data
|
|
276
278
|
}
|
|
279
|
+
this.currentProcessId = id
|
|
277
280
|
|
|
278
281
|
this.bindSceneEvents()
|
|
279
282
|
|
|
@@ -296,17 +299,17 @@ export class OxProcessViewer extends LitElement {
|
|
|
296
299
|
this.unbindSceneEvents(this._scene)
|
|
297
300
|
/* 원래의 target에 되돌린다. */
|
|
298
301
|
this._scene.target = this._oldtarget
|
|
299
|
-
this._backward.push(this._scene)
|
|
302
|
+
this._backward.push({ id: this.currentProcessId!, scene: this._scene })
|
|
300
303
|
}
|
|
301
304
|
|
|
302
305
|
this._scene = scene
|
|
303
306
|
|
|
304
|
-
this._forward.forEach(scene => scene.release && scene.release())
|
|
307
|
+
this._forward.forEach(({ scene }) => scene.release && scene.release())
|
|
305
308
|
|
|
306
309
|
/* forward를 비운다. */
|
|
307
310
|
this._forward = []
|
|
308
311
|
|
|
309
|
-
this.setupScene(scene)
|
|
312
|
+
this.setupScene({ id: processId, scene })
|
|
310
313
|
|
|
311
314
|
if (bindingData) {
|
|
312
315
|
scene.data = bindingData
|
|
@@ -383,7 +386,7 @@ export class OxProcessViewer extends LitElement {
|
|
|
383
386
|
/* event handlers */
|
|
384
387
|
|
|
385
388
|
onTapNext() {
|
|
386
|
-
var scene = this._forward.pop()
|
|
389
|
+
var { id, scene } = this._forward.pop() || {}
|
|
387
390
|
if (!scene) return
|
|
388
391
|
|
|
389
392
|
if (this._scene) {
|
|
@@ -391,14 +394,14 @@ export class OxProcessViewer extends LitElement {
|
|
|
391
394
|
/* 원래의 target에 되돌린다. */
|
|
392
395
|
this._scene.target = this._oldtarget
|
|
393
396
|
this.unbindSceneEvents(this._scene)
|
|
394
|
-
this._backward.push(this._scene)
|
|
397
|
+
this._backward.push({ id: id!, scene: this._scene })
|
|
395
398
|
}
|
|
396
399
|
|
|
397
|
-
this.setupScene(scene)
|
|
400
|
+
this.setupScene({ id: id!, scene })
|
|
398
401
|
}
|
|
399
402
|
|
|
400
403
|
onTapPrev() {
|
|
401
|
-
var scene = this._backward.pop()
|
|
404
|
+
var { id, scene } = this._backward.pop() || {}
|
|
402
405
|
if (!scene) return
|
|
403
406
|
|
|
404
407
|
if (this._scene) {
|
|
@@ -406,10 +409,10 @@ export class OxProcessViewer extends LitElement {
|
|
|
406
409
|
/* 원래의 target에 되돌린다. */
|
|
407
410
|
this._scene.target = this._oldtarget
|
|
408
411
|
this.unbindSceneEvents(this._scene)
|
|
409
|
-
this._forward.push(this._scene)
|
|
412
|
+
this._forward.push({ id: id!, scene: this._scene })
|
|
410
413
|
}
|
|
411
414
|
|
|
412
|
-
this.setupScene(scene)
|
|
415
|
+
this.setupScene({ id: id!, scene })
|
|
413
416
|
}
|
|
414
417
|
|
|
415
418
|
onTapFullscreen() {
|