@operato/scene-bpmn 7.0.1 → 7.3.19
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 +3 -3
- package/CHANGELOG.md +0 -365
- package/src/base/bpmn-activity.ts +0 -32
- package/src/base/bpmn-container-base.ts +0 -201
- package/src/base/bpmn-control-base.ts +0 -201
- package/src/bpmn-comment.ts +0 -64
- package/src/bpmn-data-object.ts +0 -181
- package/src/bpmn-data-store.ts +0 -63
- package/src/bpmn-event.ts +0 -468
- package/src/bpmn-expanded-subprocess.ts +0 -207
- package/src/bpmn-flow.ts +0 -37
- package/src/bpmn-gateway.ts +0 -181
- package/src/bpmn-group.ts +0 -39
- package/src/bpmn-lane.ts +0 -125
- package/src/bpmn-message.ts +0 -57
- package/src/bpmn-pool.ts +0 -25
- package/src/bpmn-subprocess.ts +0 -323
- package/src/bpmn-task.ts +0 -479
- package/src/characteristics/loop.ts +0 -0
- package/src/editors/index.ts +0 -0
- package/src/groups/index.ts +0 -3
- package/src/groups/process.ts +0 -48
- package/src/index.ts +0 -13
- package/src/templates/bpmn-comment.ts +0 -24
- package/src/templates/bpmn-data-object.ts +0 -21
- package/src/templates/bpmn-data-store.ts +0 -19
- package/src/templates/bpmn-event.ts +0 -19
- package/src/templates/bpmn-expanded-subprocess.ts +0 -24
- package/src/templates/bpmn-flow.ts +0 -23
- package/src/templates/bpmn-gateway.ts +0 -19
- package/src/templates/bpmn-group.ts +0 -20
- package/src/templates/bpmn-lane.ts +0 -20
- package/src/templates/bpmn-message.ts +0 -21
- package/src/templates/bpmn-pool.ts +0 -18
- package/src/templates/bpmn-subprocess.ts +0 -18
- package/src/templates/bpmn-task.ts +0 -18
- package/src/templates/index.ts +0 -31
- package/tsconfig.json +0 -24
- package/tsconfig.tsbuildinfo +0 -1
package/src/bpmn-event.ts
DELETED
|
@@ -1,468 +0,0 @@
|
|
|
1
|
-
import { BOUNDS, Component, ComponentNature, Properties } from '@hatiolab/things-scene'
|
|
2
|
-
|
|
3
|
-
import BPMNControlBase from './base/bpmn-control-base'
|
|
4
|
-
|
|
5
|
-
enum BEHAVIOR {
|
|
6
|
-
catching,
|
|
7
|
-
throwing
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
const NATURE: ComponentNature = {
|
|
11
|
-
mutable: false,
|
|
12
|
-
resizable: true,
|
|
13
|
-
rotatable: false,
|
|
14
|
-
properties: [
|
|
15
|
-
{
|
|
16
|
-
type: 'select',
|
|
17
|
-
name: 'eventType',
|
|
18
|
-
label: 'event-type',
|
|
19
|
-
property: {
|
|
20
|
-
options: [
|
|
21
|
-
{
|
|
22
|
-
display: 'start',
|
|
23
|
-
value: 'start'
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
display: 'intermediate',
|
|
27
|
-
value: 'intermediate'
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
display: 'end',
|
|
31
|
-
value: 'end'
|
|
32
|
-
}
|
|
33
|
-
]
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
type: 'select',
|
|
38
|
-
name: 'marker',
|
|
39
|
-
label: 'marker',
|
|
40
|
-
property: {
|
|
41
|
-
options: [
|
|
42
|
-
{
|
|
43
|
-
display: 'message',
|
|
44
|
-
value: 'message'
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
display: 'timer',
|
|
48
|
-
value: 'timer'
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
display: 'error',
|
|
52
|
-
value: 'error'
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
display: 'escalation',
|
|
56
|
-
value: 'escalation'
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
display: 'cancel',
|
|
60
|
-
value: 'cancel'
|
|
61
|
-
},
|
|
62
|
-
{
|
|
63
|
-
display: 'compensation',
|
|
64
|
-
value: 'compensation'
|
|
65
|
-
},
|
|
66
|
-
{
|
|
67
|
-
display: 'conditional',
|
|
68
|
-
value: 'conditional'
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
display: 'link',
|
|
72
|
-
value: 'link'
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
display: 'signal',
|
|
76
|
-
value: 'signal'
|
|
77
|
-
},
|
|
78
|
-
{
|
|
79
|
-
display: 'terminate',
|
|
80
|
-
value: 'terminate'
|
|
81
|
-
},
|
|
82
|
-
{
|
|
83
|
-
display: 'multiple',
|
|
84
|
-
value: 'multiple'
|
|
85
|
-
},
|
|
86
|
-
{
|
|
87
|
-
display: 'parallel multiple',
|
|
88
|
-
value: 'parallel-multiple'
|
|
89
|
-
}
|
|
90
|
-
]
|
|
91
|
-
}
|
|
92
|
-
},
|
|
93
|
-
{
|
|
94
|
-
type: 'checkbox',
|
|
95
|
-
label: 'interrupting',
|
|
96
|
-
name: 'interrupting'
|
|
97
|
-
}
|
|
98
|
-
],
|
|
99
|
-
help: '/bpmn/event/event'
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
export default class BPMNEvent extends BPMNControlBase {
|
|
103
|
-
private imageElement?: HTMLImageElement
|
|
104
|
-
|
|
105
|
-
static get nature() {
|
|
106
|
-
return NATURE
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
get textBounds(): BOUNDS {
|
|
110
|
-
var { left, top, width, height } = this.bounds
|
|
111
|
-
var { paddingTop, paddingLeft, paddingRight } = this.state
|
|
112
|
-
|
|
113
|
-
paddingTop ||= 0
|
|
114
|
-
paddingLeft ||= 0
|
|
115
|
-
paddingRight ||= 0
|
|
116
|
-
|
|
117
|
-
return {
|
|
118
|
-
left: left + paddingLeft,
|
|
119
|
-
top: top + paddingTop + height + 10,
|
|
120
|
-
width: Math.max(width - paddingLeft - paddingRight, 0),
|
|
121
|
-
height: 0
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
render(ctx: CanvasRenderingContext2D) {
|
|
126
|
-
const { left, top, width, height } = this.bounds
|
|
127
|
-
const { eventType, interrupting } = this.state
|
|
128
|
-
const cx = width / 2
|
|
129
|
-
const cy = height / 2
|
|
130
|
-
|
|
131
|
-
ctx.translate(left, top)
|
|
132
|
-
ctx.beginPath()
|
|
133
|
-
|
|
134
|
-
var lineWidth = 2
|
|
135
|
-
|
|
136
|
-
switch (eventType) {
|
|
137
|
-
case 'intermediate':
|
|
138
|
-
lineWidth = 1
|
|
139
|
-
ctx.ellipse(cx, cy, width / 2, height / 2, 0, 0, 2 * Math.PI)
|
|
140
|
-
ctx.moveTo(width / 2 + width / 2.5, height / 2)
|
|
141
|
-
ctx.ellipse(cx, cy, width / 2.5, height / 2.5, 0, 0, 2 * Math.PI)
|
|
142
|
-
break
|
|
143
|
-
|
|
144
|
-
case 'end':
|
|
145
|
-
lineWidth = 5
|
|
146
|
-
ctx.ellipse(cx, cy, width / 2 - 1.5, height / 2 - 1.5, 0, 0, 2 * Math.PI)
|
|
147
|
-
break
|
|
148
|
-
|
|
149
|
-
case 'start':
|
|
150
|
-
default:
|
|
151
|
-
ctx.ellipse(cx, cy, width / 2, height / 2, 0, 0, 2 * Math.PI)
|
|
152
|
-
break
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
ctx.translate(-left, -top)
|
|
156
|
-
|
|
157
|
-
this.drawFill(ctx)
|
|
158
|
-
|
|
159
|
-
this.drawStroke(ctx, {
|
|
160
|
-
lineWidth,
|
|
161
|
-
lineDash: interrupting ? 'round-dot' : 'solid'
|
|
162
|
-
})
|
|
163
|
-
|
|
164
|
-
ctx.beginPath()
|
|
165
|
-
|
|
166
|
-
const image = this.getImageElement()
|
|
167
|
-
if (image) {
|
|
168
|
-
this.drawImage(ctx, image, left + width / 6, top + height / 6, (width * 2) / 3, (height * 2) / 3)
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
onchange(after: Properties, before: Properties) {
|
|
173
|
-
if ('marker' in after || 'strokeStyle' in after) {
|
|
174
|
-
// Since strokeStyle affects the image, the image is redrawn according to the change of strokeStyle.
|
|
175
|
-
delete this.imageElement
|
|
176
|
-
this.invalidate()
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
getImageElement(): HTMLImageElement | undefined {
|
|
181
|
-
if (!this.imageElement) {
|
|
182
|
-
const { marker, strokeStyle } = this.state
|
|
183
|
-
|
|
184
|
-
if (!marker) {
|
|
185
|
-
return
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
const src = IMAGES[marker]
|
|
189
|
-
if (!src) {
|
|
190
|
-
return
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
this.imageElement = new Image()
|
|
194
|
-
this.imageElement.src =
|
|
195
|
-
'data:image/svg+xml;charset=UTF-8;base64,' + btoa(src.replace(/{{strokeColor}}/g, strokeStyle))
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
return this.imageElement
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
Component.register('bpmn-event', BPMNEvent)
|
|
203
|
-
|
|
204
|
-
const IMAGES: { [type: string]: string } = {
|
|
205
|
-
message: `
|
|
206
|
-
<svg version="1.1" id="Layer_3" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
|
207
|
-
viewBox="0 0 35 35" style="enable-background:new 0 0 35 35;" xml:space="preserve">
|
|
208
|
-
<style type="text/css">
|
|
209
|
-
.st0{fill:{{strokeColor}};}
|
|
210
|
-
</style>
|
|
211
|
-
<path class="st0" d="M29.5,10.3c0-1.3-1.1-2.4-2.4-2.4H7.9c-1.3,0-2.4,1.1-2.4,2.4v14.4c0,1.3,1.1,2.4,2.4,2.4h19.2c1.3,0,2.4-1.1,2.4-2.4V10.3z
|
|
212
|
-
M27.1,9.3l-9.6,7l-9.6-7H27.1z M28.1,25.7H6.9v-16l10.6,8l10.6-8V25.7z"/>
|
|
213
|
-
</svg>
|
|
214
|
-
`,
|
|
215
|
-
'message-fill': `
|
|
216
|
-
<svg version="1.1" id="Layer_3" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
|
217
|
-
viewBox="0 0 35 35" style="enable-background:new 0 0 35 35;" xml:space="preserve">
|
|
218
|
-
<style type="text/css">
|
|
219
|
-
.st0{fill:{{strokeColor}};}
|
|
220
|
-
</style>
|
|
221
|
-
<path d="M27.1,7.9H7.9c-1.3,0-2.4,1.1-2.4,2.4l0,14.4c0,1.3,1.1,2.4,2.4,2.4h19.2c1.3,0,2.4-1.1,2.4-2.4V10.3
|
|
222
|
-
C29.5,9,28.4,7.9,27.1,7.9z M27.1,12.7l-9.6,6l-9.6-6v-2.4l9.6,6l9.6-6V12.7z"/>
|
|
223
|
-
</svg>
|
|
224
|
-
`,
|
|
225
|
-
timer: `
|
|
226
|
-
<svg version="1.1" id="Layer_3" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
|
227
|
-
viewBox="0 0 35 35" style="enable-background:new 0 0 35 35;" xml:space="preserve">
|
|
228
|
-
<style type="text/css">
|
|
229
|
-
.st0{fill:{{strokeColor}};}
|
|
230
|
-
</style>
|
|
231
|
-
<g>
|
|
232
|
-
<g id="XMLID_807_">
|
|
233
|
-
<path class="st0" d="M17.5,9.6c0.3,0,0.6-0.3,0.6-0.6V7.2c0-0.3-0.3-0.6-0.6-0.6c-0.3,0-0.6,0.3-0.6,0.6V9C16.9,9.3,17.2,9.6,17.5,9.6z"/>
|
|
234
|
-
</g>
|
|
235
|
-
<g>
|
|
236
|
-
<path class="st0" d="M7.4,18.2h1.8c0.3,0,0.6-0.3,0.6-0.6c0-0.3-0.3-0.6-0.6-0.6H7.4c-0.3,0-0.6,0.3-0.6,0.6C6.8,18,7,18.2,7.4,18.2z"/>
|
|
237
|
-
</g>
|
|
238
|
-
<g>
|
|
239
|
-
<path class="st0" d="M17.5,28.5c0.3,0,0.6-0.3,0.6-0.6v-1.8c0-0.3-0.3-0.6-0.6-0.6c-0.3,0-0.6,0.3-0.6,0.6v1.8C16.9,28.2,17.2,28.5,17.5,28.5z
|
|
240
|
-
"/>
|
|
241
|
-
</g>
|
|
242
|
-
<g>
|
|
243
|
-
<path class="st0" d="M25.9,18.2h1.8c0.3,0,0.6-0.3,0.6-0.6c0-0.3-0.3-0.6-0.6-0.6h-1.8c-0.3,0-0.6,0.3-0.6,0.6C25.3,18,25.5,18.2,25.9,18.2z"
|
|
244
|
-
/>
|
|
245
|
-
</g>
|
|
246
|
-
<g>
|
|
247
|
-
<path class="st0" d="M13.2,10.9c0.1,0,0.2,0,0.3-0.1c0.3-0.2,0.4-0.5,0.2-0.8l-0.9-1.5c-0.2-0.3-0.5-0.4-0.8-0.2c-0.3,0.2-0.4,0.5-0.2,0.8
|
|
248
|
-
l0.9,1.5C12.8,10.8,13,10.9,13.2,10.9z"/>
|
|
249
|
-
</g>
|
|
250
|
-
<g>
|
|
251
|
-
<path class="st0" d="M9,23.5c0.1,0,0.2,0,0.3-0.1l1.5-0.9c0.3-0.2,0.4-0.5,0.2-0.8c-0.2-0.3-0.5-0.4-0.8-0.2l-1.5,0.9
|
|
252
|
-
c-0.3,0.2-0.4,0.5-0.2,0.8C8.6,23.4,8.8,23.5,9,23.5z"/>
|
|
253
|
-
</g>
|
|
254
|
-
<g>
|
|
255
|
-
<path class="st0" d="M22.6,27.2c0.1,0,0.2,0,0.3-0.1c0.3-0.2,0.4-0.5,0.2-0.8l-0.9-1.5c-0.2-0.3-0.5-0.4-0.8-0.2c-0.3,0.2-0.4,0.5-0.2,0.8
|
|
256
|
-
l0.9,1.5C22.2,27.1,22.4,27.2,22.6,27.2z"/>
|
|
257
|
-
</g>
|
|
258
|
-
<g>
|
|
259
|
-
<path class="st0" d="M25.1,14.5c0.1,0,0.2,0,0.3-0.1l1.5-0.9c0.3-0.2,0.4-0.5,0.2-0.8c-0.2-0.3-0.5-0.4-0.8-0.2l-1.5,0.9
|
|
260
|
-
c-0.3,0.2-0.4,0.5-0.2,0.8C24.7,14.4,24.9,14.5,25.1,14.5z"/>
|
|
261
|
-
</g>
|
|
262
|
-
<g>
|
|
263
|
-
<path class="st0" d="M10,13.8c0.2,0,0.4-0.1,0.5-0.3c0.2-0.3,0.1-0.7-0.2-0.8l-1.5-0.9c-0.3-0.2-0.7-0.1-0.8,0.2c-0.2,0.3-0.1,0.7,0.2,0.8
|
|
264
|
-
l1.5,0.9C9.8,13.8,9.9,13.8,10,13.8z"/>
|
|
265
|
-
</g>
|
|
266
|
-
<g>
|
|
267
|
-
<path class="st0" d="M12.4,27.1c0.2,0,0.4-0.1,0.5-0.3l0.9-1.5c0.2-0.3,0.1-0.7-0.2-0.8c-0.3-0.2-0.7-0.1-0.8,0.2l-0.9,1.5
|
|
268
|
-
c-0.2,0.3-0.1,0.7,0.2,0.8C12.2,27.1,12.3,27.1,12.4,27.1z"/>
|
|
269
|
-
</g>
|
|
270
|
-
<g>
|
|
271
|
-
<path class="st0" d="M26,23.5c0.2,0,0.4-0.1,0.5-0.3c0.2-0.3,0.1-0.7-0.2-0.8l-1.5-0.9c-0.3-0.2-0.7-0.1-0.8,0.2c-0.2,0.3-0.1,0.7,0.2,0.8
|
|
272
|
-
l1.5,0.9C25.8,23.5,25.9,23.5,26,23.5z"/>
|
|
273
|
-
</g>
|
|
274
|
-
<g>
|
|
275
|
-
<path class="st0" d="M21.8,10.8c0.2,0,0.4-0.1,0.5-0.3L23.2,9c0.2-0.3,0.1-0.7-0.2-0.8c-0.3-0.2-0.7-0.1-0.8,0.2l-0.9,1.5
|
|
276
|
-
c-0.2,0.3-0.1,0.7,0.2,0.8C21.6,10.8,21.7,10.8,21.8,10.8z"/>
|
|
277
|
-
</g>
|
|
278
|
-
<g id="XMLID_806_">
|
|
279
|
-
<path class="st0" d="M17.5,17.7c0.4,0,0.7-0.3,0.7-0.7v-5.6c0-0.4-0.3-0.7-0.7-0.7c-0.4,0-0.7,0.3-0.7,0.7V17C16.8,17.4,17.1,17.7,17.5,17.7z"
|
|
280
|
-
/>
|
|
281
|
-
</g>
|
|
282
|
-
<g id="XMLID_805_">
|
|
283
|
-
<path class="st0" d="M17.5,18.3h3.9c0.4,0,0.7-0.3,0.7-0.7c0-0.4-0.3-0.7-0.7-0.7h-3.9c-0.4,0-0.7,0.3-0.7,0.7C16.8,17.9,17.1,18.3,17.5,18.3z
|
|
284
|
-
"/>
|
|
285
|
-
</g>
|
|
286
|
-
<g>
|
|
287
|
-
<path class="st0" d="M17.5,7.2c5.7,0,10.2,4.6,10.2,10.2s-4.6,10.2-10.2,10.2S7.2,23.2,7.2,17.5S11.8,7.2,17.5,7.2 M17.5,6.5
|
|
288
|
-
c-6.1,0-11,4.9-11,11s4.9,11,11,11s11-4.9,11-11S23.6,6.5,17.5,6.5L17.5,6.5z"/>
|
|
289
|
-
</g>
|
|
290
|
-
</g>
|
|
291
|
-
</svg>
|
|
292
|
-
`,
|
|
293
|
-
error: `
|
|
294
|
-
<svg version="1.1" id="Layer_3" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
|
295
|
-
viewBox="0 0 35 35" style="enable-background:new 0 0 35 35;" xml:space="preserve">
|
|
296
|
-
<style type="text/css">
|
|
297
|
-
.st0{fill:{{strokeColor}};}
|
|
298
|
-
</style>
|
|
299
|
-
<g>
|
|
300
|
-
<path class="st0" d="M9.7,10.3l11.1,6.1c0.2,0.1,0.5,0.2,0.7,0.2c0.4,0,0.7-0.1,1-0.4l4.9-4.3l-2,12.7l-10.1-6c-0.2-0.1-0.5-0.2-0.8-0.2
|
|
301
|
-
c-0.3,0-0.7,0.1-0.9,0.3l-6,4.7L9.7,10.3 M29.5,8l-8,7.1L8.5,8l-3,19l9-7.1l12,7.1L29.5,8L29.5,8z"/>
|
|
302
|
-
</g>
|
|
303
|
-
</svg>
|
|
304
|
-
`,
|
|
305
|
-
'error-fill': `
|
|
306
|
-
<svg version="1.1" id="Layer_3" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
|
307
|
-
viewBox="0 0 35 35" style="enable-background:new 0 0 35 35;" xml:space="preserve">
|
|
308
|
-
<style type="text/css">
|
|
309
|
-
.st0{fill:{{strokeColor}};}
|
|
310
|
-
</style>
|
|
311
|
-
<g>
|
|
312
|
-
<polygon class="st0" points="26.5,27 29.5,8 21.5,15.1 8.5,8 5.5,27 14.5,19.9 "/>
|
|
313
|
-
</g>
|
|
314
|
-
</svg>
|
|
315
|
-
`,
|
|
316
|
-
escalation: `
|
|
317
|
-
<svg version="1.1" id="Layer_3" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
|
318
|
-
viewBox="0 0 35 35" style="enable-background:new 0 0 35 35;" xml:space="preserve">
|
|
319
|
-
<style type="text/css">
|
|
320
|
-
.st0{fill:none;stroke:{{strokeColor}};stroke-miterlimit:10;}
|
|
321
|
-
</style>
|
|
322
|
-
<polygon class="st0" points="17.5,19.9 7.5,27 17.5,8 27.5,27 "/>
|
|
323
|
-
</svg>
|
|
324
|
-
`,
|
|
325
|
-
'escalation-fill': `
|
|
326
|
-
<svg version="1.1" id="Layer_3" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
|
327
|
-
viewBox="0 0 35 35" style="enable-background:new 0 0 35 35;" xml:space="preserve">
|
|
328
|
-
<style type="text/css">
|
|
329
|
-
.st0{fill:{{strokeColor}};}
|
|
330
|
-
</style>
|
|
331
|
-
<polygon class="st0" points="17.5,19.9 7.5,27 17.5,8 27.5,27 "/>
|
|
332
|
-
</svg>
|
|
333
|
-
`,
|
|
334
|
-
cancel: `
|
|
335
|
-
<svg version="1.1" id="Layer_3" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
|
336
|
-
viewBox="0 0 35 35" style="enable-background:new 0 0 35 35;" xml:space="preserve">
|
|
337
|
-
<style type="text/css">
|
|
338
|
-
.st0{fill:{{strokeColor}};}
|
|
339
|
-
</style>
|
|
340
|
-
<path class="st0" d="M24.4,8.8l1.8,1.8l-6.9,6.9l6.9,6.9l-1.8,1.8l-6.9-6.9l-6.9,6.9l-1.8-1.8l6.9-6.9l-6.9-6.9l1.8-1.8l6.9,6.9L24.4,8.8
|
|
341
|
-
M24.4,7.4l-0.7,0.7l-6.2,6.2l-6.2-6.2l-0.7-0.7L9.9,8.1L8.1,9.9l-0.7,0.7l0.7,0.7l6.2,6.2l-6.2,6.2l-0.7,0.7l0.7,0.7l1.8,1.8
|
|
342
|
-
l0.7,0.7l0.7-0.7l6.2-6.2l6.2,6.2l0.7,0.7l0.7-0.7l1.8-1.8l0.7-0.7l-0.7-0.7l-6.2-6.2l6.2-6.2l0.7-0.7l-0.7-0.7l-1.8-1.8L24.4,7.4
|
|
343
|
-
L24.4,7.4z"/>
|
|
344
|
-
</svg>
|
|
345
|
-
`,
|
|
346
|
-
'cancel-fill': `
|
|
347
|
-
<svg version="1.1" id="Layer_3" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
|
348
|
-
viewBox="0 0 35 35" style="enable-background:new 0 0 35 35;" xml:space="preserve">
|
|
349
|
-
<style type="text/css">
|
|
350
|
-
.st0{fill:{{strokeColor}};}
|
|
351
|
-
</style>
|
|
352
|
-
<g>
|
|
353
|
-
<rect class="st0" x="6.5" y="16.3" transform="matrix(0.7071 -0.7071 0.7071 0.7071 -7.2487 17.5)" width="22" height="2.5"/>
|
|
354
|
-
</g>
|
|
355
|
-
<g>
|
|
356
|
-
<rect class="st0" x="16.2" y="6.5" transform="matrix(0.7071 -0.7071 0.7071 0.7071 -7.2487 17.5)" width="2.5" height="22"/>
|
|
357
|
-
</g>
|
|
358
|
-
</svg>
|
|
359
|
-
`,
|
|
360
|
-
compensation: `
|
|
361
|
-
<svg version="1.1" id="Layer_3" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
|
362
|
-
viewBox="0 0 35 35" style="enable-background:new 0 0 35 35;" xml:space="preserve">
|
|
363
|
-
<style type="text/css">
|
|
364
|
-
.st0{fill:{{strokeColor}};}
|
|
365
|
-
</style>
|
|
366
|
-
<path class="st0" d="M17,10.4v14.2l-7.1-7.1L17,10.4 M18,8l-9.5,9.5L18,27V8L18,8z M8.5,17.5L8.5,17.5L8.5,17.5L8.5,17.5L8.5,17.5z"/>
|
|
367
|
-
<path class="st0" d="M25.5,10.4v14.2l-7.1-7.1L25.5,10.4 M26.5,8L17,17.5l9.5,9.5V8L26.5,8z M17,17.5L17,17.5L17,17.5L17,17.5L17,17.5z"/>
|
|
368
|
-
</svg>
|
|
369
|
-
`,
|
|
370
|
-
'compensation-fill': `
|
|
371
|
-
<svg version="1.1" id="Layer_3" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
|
372
|
-
viewBox="0 0 35 35" style="enable-background:new 0 0 35 35;" xml:space="preserve">
|
|
373
|
-
<style type="text/css">
|
|
374
|
-
.st0{fill:{{strokeColor}};}
|
|
375
|
-
</style>
|
|
376
|
-
<polygon class="st0" points="8.5,17.5 18,8 18,27 8.5,17.5 "/>
|
|
377
|
-
<polygon class="st0" points="17,17.5 26.5,8 26.5,27 17,17.5 "/>
|
|
378
|
-
</svg>
|
|
379
|
-
`,
|
|
380
|
-
conditional: `
|
|
381
|
-
<svg version="1.1" id="Layer_3" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
|
382
|
-
viewBox="0 0 35 35" style="enable-background:new 0 0 35 35;" xml:space="preserve">
|
|
383
|
-
<style type="text/css">
|
|
384
|
-
.st0{fill:{{strokeColor}};}
|
|
385
|
-
</style>
|
|
386
|
-
<g>
|
|
387
|
-
<path class="st0" d="M28.6,11.1v14.8H6.5V11.1h20.3 M26.8,8H8.2c-1.5,0-2.7,1-2.7,2.1v15.8c0,1.2,1.2,1.1,2.7,1.1h18.7c1.5,0,2.7,0.1,2.7-1.1
|
|
388
|
-
V10.1C29.5,8.9,28.3,8,26.8,8L26.8,8z"/>
|
|
389
|
-
</g>
|
|
390
|
-
<path class="st0" d="M27.5,23.5h-20v-1h20V23.5z M27.5,17.8h-20v-1h20V17.8z M27.5,14.9h-20v-1h20V14.9z M27.5,20.6h-20v-1h20V20.6z"/>
|
|
391
|
-
</svg>
|
|
392
|
-
`,
|
|
393
|
-
link: `
|
|
394
|
-
<svg version="1.1" id="Layer_3" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
|
395
|
-
viewBox="0 0 35 35" style="enable-background:new 0 0 35 35;" xml:space="preserve">
|
|
396
|
-
<style type="text/css">
|
|
397
|
-
.st0{fill:none;stroke:{{strokeColor}};stroke-miterlimit:10;}
|
|
398
|
-
</style>
|
|
399
|
-
<path class="st0" d="M19,13.8V8l9.5,9.5L19,27v-5.8H6.5v-7.5H19z"/>
|
|
400
|
-
</svg>
|
|
401
|
-
`,
|
|
402
|
-
'link-fill': `
|
|
403
|
-
<svg version="1.1" id="Layer_3" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
|
404
|
-
viewBox="0 0 35 35" style="enable-background:new 0 0 35 35;" xml:space="preserve">
|
|
405
|
-
<style type="text/css">
|
|
406
|
-
.st0{fill:{{strokeColor}};}
|
|
407
|
-
</style>
|
|
408
|
-
<path class="st0" d="M19,13.8V8l9.5,9.5L19,27v-5.8H6.5v-7.5H19z"/>
|
|
409
|
-
</svg>
|
|
410
|
-
`,
|
|
411
|
-
signal: `
|
|
412
|
-
<svg version="1.1" id="Layer_3" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
|
413
|
-
viewBox="0 0 35 35" style="enable-background:new 0 0 35 35;" xml:space="preserve">
|
|
414
|
-
<style type="text/css">
|
|
415
|
-
.st0{fill:none;stroke:{{strokeColor}};stroke-miterlimit:10;}
|
|
416
|
-
</style>
|
|
417
|
-
<polygon class="st0" points="17.5,26.9 7.5,27 17.5,8 27.5,27 "/>
|
|
418
|
-
</svg>
|
|
419
|
-
`,
|
|
420
|
-
'signal-fill': `
|
|
421
|
-
<svg version="1.1" id="Layer_3" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
|
422
|
-
viewBox="0 0 35 35" style="enable-background:new 0 0 35 35;" xml:space="preserve">
|
|
423
|
-
<style type="text/css">
|
|
424
|
-
.st0{fill:{{strokeColor}};}
|
|
425
|
-
</style>
|
|
426
|
-
<polygon class="st0" points="17.5,26.9 7.5,27 17.5,8 27.5,27 "/>
|
|
427
|
-
</svg>
|
|
428
|
-
`,
|
|
429
|
-
terminate: `
|
|
430
|
-
<svg version="1.1" id="Layer_3" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
|
431
|
-
viewBox="0 0 35 35" style="enable-background:new 0 0 35 35;" xml:space="preserve">
|
|
432
|
-
<style type="text/css">
|
|
433
|
-
.st0{fill:{{strokeColor}};}
|
|
434
|
-
</style>
|
|
435
|
-
<circle class="st0" cx="17.5" cy="17.5" r="11.5"/>
|
|
436
|
-
</svg>
|
|
437
|
-
`,
|
|
438
|
-
multiple: `
|
|
439
|
-
<svg version="1.1" id="Layer_3" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
|
440
|
-
viewBox="0 0 35 35" style="enable-background:new 0 0 35 35;" xml:space="preserve">
|
|
441
|
-
<style type="text/css">
|
|
442
|
-
.st0{stroke:{{strokeColor}};}
|
|
443
|
-
</style>
|
|
444
|
-
<path class="st0" d="M17.5,9.2l8.8,6.4L23,26H12L8.7,15.6L17.5,9.2 M17.5,8l-10,7.3L11.3,27h12.4l3.8-11.8L17.5,8L17.5,8z"/>
|
|
445
|
-
</svg>
|
|
446
|
-
`,
|
|
447
|
-
'multiple-fill': `
|
|
448
|
-
<svg version="1.1" id="Layer_3" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
|
449
|
-
viewBox="0 0 35 35" style="enable-background:new 0 0 35 35;" xml:space="preserve">
|
|
450
|
-
<style type="text/css">
|
|
451
|
-
.st0{fill:{{strokeColor}};}
|
|
452
|
-
</style>
|
|
453
|
-
<polygon class="st0" points="17.5,8 7.5,15.3 11.3,27 23.7,27 27.5,15.3 "/>
|
|
454
|
-
</svg>
|
|
455
|
-
`,
|
|
456
|
-
'parallel-multiple': `
|
|
457
|
-
<svg version="1.1" id="Layer_3" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
|
458
|
-
viewBox="0 0 35 35" style="enable-background:new 0 0 35 35;" xml:space="preserve">
|
|
459
|
-
<style type="text/css">
|
|
460
|
-
.st0{fill:none;stroke:{{strokeColor}};stroke-width:1.2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;}
|
|
461
|
-
.st1{fill:{{strokeColor}};}
|
|
462
|
-
</style>
|
|
463
|
-
<path class="st1" d="M18.4,10v6.6H25l0,1.7h-6.6V25h-1.7l0-6.6H10v-1.7h6.6V10H18.4 M19.4,9h-1h-1.7h-1v1v5.6H10H9v1v1.7v1h1h5.6l0,5.6v1h1h1.7
|
|
464
|
-
h1v-1v-5.6H25h1l0-1l0-1.7l0-1h-1h-5.6V10V9L19.4,9z"/>
|
|
465
|
-
<circle class="st0" cx="17.5" cy="17.5" r="12"/>
|
|
466
|
-
</svg>
|
|
467
|
-
`
|
|
468
|
-
}
|
|
@@ -1,207 +0,0 @@
|
|
|
1
|
-
import { Component, ComponentNature } from '@hatiolab/things-scene'
|
|
2
|
-
import { over } from 'lodash'
|
|
3
|
-
|
|
4
|
-
import BPMNContainerBase, { DIRECTION, INOUT, NODE, FLOW } from './base/bpmn-container-base'
|
|
5
|
-
|
|
6
|
-
const NATURE: ComponentNature = {
|
|
7
|
-
mutable: false,
|
|
8
|
-
resizable: true,
|
|
9
|
-
rotatable: false,
|
|
10
|
-
properties: [
|
|
11
|
-
{
|
|
12
|
-
type: 'string',
|
|
13
|
-
name: 'name',
|
|
14
|
-
label: 'name'
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
type: 'checkbox',
|
|
18
|
-
label: 'call-activity',
|
|
19
|
-
name: 'callActivity'
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
type: 'checkbox',
|
|
23
|
-
label: 'transaction',
|
|
24
|
-
name: 'transaction'
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
type: 'checkbox',
|
|
28
|
-
label: 'interrupting',
|
|
29
|
-
name: 'interrupting'
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
type: 'select',
|
|
33
|
-
label: 'trigger-event',
|
|
34
|
-
name: 'triggerEvent',
|
|
35
|
-
property: {
|
|
36
|
-
options: [
|
|
37
|
-
{
|
|
38
|
-
display: '',
|
|
39
|
-
value: ''
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
display: 'message',
|
|
43
|
-
value: 'message'
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
display: 'timer',
|
|
47
|
-
value: 'timer'
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
display: 'error',
|
|
51
|
-
value: 'error'
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
display: 'escalation',
|
|
55
|
-
value: 'escalation'
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
display: 'cancel',
|
|
59
|
-
value: 'cancel'
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
display: 'compensation',
|
|
63
|
-
value: 'compensation'
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
display: 'conditional',
|
|
67
|
-
value: 'conditional'
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
display: 'link',
|
|
71
|
-
value: 'link'
|
|
72
|
-
},
|
|
73
|
-
{
|
|
74
|
-
display: 'signal',
|
|
75
|
-
value: 'signal'
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
display: 'terminate',
|
|
79
|
-
value: 'terminate'
|
|
80
|
-
},
|
|
81
|
-
{
|
|
82
|
-
display: 'multiple',
|
|
83
|
-
value: 'multiple'
|
|
84
|
-
},
|
|
85
|
-
{
|
|
86
|
-
display: 'parallel multiple',
|
|
87
|
-
value: 'parallel-multiple'
|
|
88
|
-
}
|
|
89
|
-
]
|
|
90
|
-
}
|
|
91
|
-
},
|
|
92
|
-
{
|
|
93
|
-
// TODO this property might be an array
|
|
94
|
-
type: 'select',
|
|
95
|
-
label: 'boundary-event',
|
|
96
|
-
name: 'boundaryEvent',
|
|
97
|
-
property: {
|
|
98
|
-
options: [
|
|
99
|
-
{
|
|
100
|
-
display: '',
|
|
101
|
-
value: ''
|
|
102
|
-
},
|
|
103
|
-
{
|
|
104
|
-
display: 'message',
|
|
105
|
-
value: 'message'
|
|
106
|
-
},
|
|
107
|
-
{
|
|
108
|
-
display: 'timer',
|
|
109
|
-
value: 'timer'
|
|
110
|
-
},
|
|
111
|
-
{
|
|
112
|
-
display: 'error',
|
|
113
|
-
value: 'error'
|
|
114
|
-
},
|
|
115
|
-
{
|
|
116
|
-
display: 'escalation',
|
|
117
|
-
value: 'escalation'
|
|
118
|
-
},
|
|
119
|
-
{
|
|
120
|
-
display: 'cancel',
|
|
121
|
-
value: 'cancel'
|
|
122
|
-
},
|
|
123
|
-
{
|
|
124
|
-
display: 'compensation',
|
|
125
|
-
value: 'compensation'
|
|
126
|
-
},
|
|
127
|
-
{
|
|
128
|
-
display: 'conditional',
|
|
129
|
-
value: 'conditional'
|
|
130
|
-
},
|
|
131
|
-
{
|
|
132
|
-
display: 'link',
|
|
133
|
-
value: 'link'
|
|
134
|
-
},
|
|
135
|
-
{
|
|
136
|
-
display: 'signal',
|
|
137
|
-
value: 'signal'
|
|
138
|
-
},
|
|
139
|
-
{
|
|
140
|
-
display: 'terminate',
|
|
141
|
-
value: 'terminate'
|
|
142
|
-
},
|
|
143
|
-
{
|
|
144
|
-
display: 'multiple',
|
|
145
|
-
value: 'multiple'
|
|
146
|
-
},
|
|
147
|
-
{
|
|
148
|
-
display: 'parallel multiple',
|
|
149
|
-
value: 'parallel-multiple'
|
|
150
|
-
}
|
|
151
|
-
]
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
],
|
|
155
|
-
help: '/bpmn/expanded-subprocess/expanded-subprocess'
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
export default class BPMNExpandedSubprocess extends BPMNContainerBase {
|
|
159
|
-
get nature() {
|
|
160
|
-
return NATURE
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
render(ctx: CanvasRenderingContext2D) {
|
|
164
|
-
const { left, top, width, height } = this.bounds
|
|
165
|
-
const { callActivity, interrupting, transaction } = this.state
|
|
166
|
-
var radius = 9
|
|
167
|
-
|
|
168
|
-
ctx.translate(left, top)
|
|
169
|
-
ctx.beginPath()
|
|
170
|
-
|
|
171
|
-
ctx.moveTo(radius, 0)
|
|
172
|
-
ctx.arcTo(width, 0, width, height, radius)
|
|
173
|
-
ctx.arcTo(width, height, 0, height, radius)
|
|
174
|
-
ctx.arcTo(0, height, 0, 0, radius)
|
|
175
|
-
ctx.arcTo(0, 0, width, 0, radius)
|
|
176
|
-
|
|
177
|
-
if (transaction) {
|
|
178
|
-
const LINEGAP = 3
|
|
179
|
-
radius -= LINEGAP
|
|
180
|
-
|
|
181
|
-
ctx.moveTo(radius + LINEGAP, LINEGAP)
|
|
182
|
-
ctx.arcTo(width - LINEGAP, LINEGAP, width - LINEGAP, height - LINEGAP, radius)
|
|
183
|
-
ctx.arcTo(width - LINEGAP, height - LINEGAP, LINEGAP, height, radius)
|
|
184
|
-
ctx.arcTo(LINEGAP, height - LINEGAP, LINEGAP, LINEGAP, radius)
|
|
185
|
-
ctx.arcTo(LINEGAP, LINEGAP, width - LINEGAP, LINEGAP, radius)
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
ctx.translate(-left, -top)
|
|
189
|
-
|
|
190
|
-
this.drawFill(ctx)
|
|
191
|
-
|
|
192
|
-
if (callActivity) {
|
|
193
|
-
this.drawStroke(ctx, { lineWidth: 5 })
|
|
194
|
-
} else {
|
|
195
|
-
this.drawStroke(ctx, {
|
|
196
|
-
lineWidth: transaction ? 1 : 2,
|
|
197
|
-
lineDash: interrupting ? 'dash' : 'solid'
|
|
198
|
-
})
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
get textHidden() {
|
|
203
|
-
return false
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
Component.register('bpmn-expanded-subprocess', BPMNExpandedSubprocess)
|