@logicflow/extension 2.2.0 → 2.2.1
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/README.md +16 -0
- package/dist/index.css +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/es/NodeResize/node/RectResize.d.ts +0 -6
- package/es/NodeResize/node/RectResize.js +2 -11
- package/es/bpmn-elements-adapter/json2xml.d.ts +2 -1
- package/es/bpmn-elements-adapter/json2xml.js +18 -4
- package/es/bpmn-elements-adapter/xml2json.js +2 -7
- package/es/components/control/index.d.ts +1 -0
- package/es/components/control/index.js +24 -11
- package/es/components/mini-map/index.js +1 -1
- package/es/dynamic-group/model.d.ts +2 -1
- package/es/dynamic-group/model.js +28 -11
- package/es/dynamic-group/node.js +1 -0
- package/es/index.css +1 -1
- package/es/index.d.ts +1 -0
- package/es/index.js +2 -0
- package/es/insert-node-in-polyline/index.js +11 -35
- package/es/materials/curved-edge/index.js +49 -21
- package/es/materials/group/GroupNode.d.ts +0 -6
- package/es/materials/group/GroupNode.js +1 -6
- package/es/pool/LaneModel.d.ts +90 -0
- package/es/pool/LaneModel.js +252 -0
- package/es/pool/LaneView.d.ts +40 -0
- package/es/pool/LaneView.js +202 -0
- package/es/pool/PoolModel.d.ts +120 -0
- package/es/pool/PoolModel.js +586 -0
- package/es/pool/PoolView.d.ts +17 -0
- package/es/pool/PoolView.js +76 -0
- package/es/pool/constant.d.ts +15 -0
- package/es/pool/constant.js +17 -0
- package/es/pool/index.d.ts +89 -0
- package/es/pool/index.js +524 -0
- package/es/pool/utils.d.ts +19 -0
- package/es/pool/utils.js +33 -0
- package/es/style/index.css +1 -1
- package/es/style/raw.d.ts +1 -1
- package/es/style/raw.js +1 -1
- package/es/tools/label/LabelOverlay.js +3 -3
- package/es/tools/label/mediumEditor.d.ts +1 -1
- package/es/tools/label/mediumEditor.js +89 -52
- package/es/tools/snapshot/index.d.ts +7 -3
- package/es/tools/snapshot/index.js +72 -77
- package/lib/NodeResize/node/RectResize.d.ts +0 -6
- package/lib/NodeResize/node/RectResize.js +1 -10
- package/lib/bpmn-elements-adapter/json2xml.d.ts +2 -1
- package/lib/bpmn-elements-adapter/json2xml.js +19 -4
- package/lib/bpmn-elements-adapter/xml2json.js +2 -7
- package/lib/components/control/index.d.ts +1 -0
- package/lib/components/control/index.js +24 -11
- package/lib/components/mini-map/index.js +1 -1
- package/lib/dynamic-group/model.d.ts +2 -1
- package/lib/dynamic-group/model.js +28 -11
- package/lib/dynamic-group/node.js +1 -0
- package/lib/index.css +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.js +2 -0
- package/lib/insert-node-in-polyline/index.js +10 -34
- package/lib/materials/curved-edge/index.js +49 -21
- package/lib/materials/group/GroupNode.d.ts +0 -6
- package/lib/materials/group/GroupNode.js +1 -6
- package/lib/pool/LaneModel.d.ts +90 -0
- package/lib/pool/LaneModel.js +255 -0
- package/lib/pool/LaneView.d.ts +40 -0
- package/lib/pool/LaneView.js +205 -0
- package/lib/pool/PoolModel.d.ts +120 -0
- package/lib/pool/PoolModel.js +589 -0
- package/lib/pool/PoolView.d.ts +17 -0
- package/lib/pool/PoolView.js +79 -0
- package/lib/pool/constant.d.ts +15 -0
- package/lib/pool/constant.js +20 -0
- package/lib/pool/index.d.ts +89 -0
- package/lib/pool/index.js +527 -0
- package/lib/pool/utils.d.ts +19 -0
- package/lib/pool/utils.js +38 -0
- package/lib/style/index.css +1 -1
- package/lib/style/raw.d.ts +1 -1
- package/lib/style/raw.js +1 -1
- package/lib/tools/label/LabelOverlay.js +2 -2
- package/lib/tools/label/mediumEditor.d.ts +1 -1
- package/lib/tools/label/mediumEditor.js +91 -53
- package/lib/tools/snapshot/index.d.ts +7 -3
- package/lib/tools/snapshot/index.js +72 -77
- package/package.json +10 -7
- package/.turbo/turbo-build.log +0 -38
- package/CHANGELOG.md +0 -1766
- package/__test__/bpmn-adapter.test.js +0 -227
- package/es/materials/curved-edge/__test__/curved-edge.test.d.ts +0 -1
- package/es/materials/curved-edge/__test__/curved-edge.test.js +0 -18
- package/jest.config.js +0 -198
- package/lib/materials/curved-edge/__test__/curved-edge.test.d.ts +0 -1
- package/lib/materials/curved-edge/__test__/curved-edge.test.js +0 -20
- package/rollup.config.js +0 -52
- package/src/NodeResize/BasicShape/Ellipse.tsx +0 -22
- package/src/NodeResize/BasicShape/Polygon.tsx +0 -24
- package/src/NodeResize/BasicShape/Rect.tsx +0 -44
- package/src/NodeResize/control/Control.tsx +0 -537
- package/src/NodeResize/control/ControlGroup.tsx +0 -76
- package/src/NodeResize/control/Util.ts +0 -206
- package/src/NodeResize/index.ts +0 -26
- package/src/NodeResize/node/DiamondResize.tsx +0 -149
- package/src/NodeResize/node/EllipseResize.tsx +0 -140
- package/src/NodeResize/node/HtmlResize.tsx +0 -125
- package/src/NodeResize/node/RectResize.tsx +0 -146
- package/src/NodeResize/node/index.ts +0 -4
- package/src/bpmn/constant.ts +0 -56
- package/src/bpmn/events/EndEvent.ts +0 -73
- package/src/bpmn/events/StartEvent.ts +0 -52
- package/src/bpmn/events/index.ts +0 -2
- package/src/bpmn/flow/SequenceFlow.ts +0 -25
- package/src/bpmn/flow/index.ts +0 -1
- package/src/bpmn/gateways/ExclusiveGateway.ts +0 -71
- package/src/bpmn/gateways/index.ts +0 -1
- package/src/bpmn/getBpmnId.ts +0 -31
- package/src/bpmn/index.ts +0 -60
- package/src/bpmn/tasks/ServiceTask.ts +0 -63
- package/src/bpmn/tasks/UserTask.ts +0 -64
- package/src/bpmn/tasks/index.ts +0 -2
- package/src/bpmn-adapter/bpmnIds.ts +0 -31
- package/src/bpmn-adapter/index.ts +0 -835
- package/src/bpmn-adapter/json2xml.ts +0 -127
- package/src/bpmn-adapter/xml2json.ts +0 -544
- package/src/bpmn-elements/README.md +0 -223
- package/src/bpmn-elements/__tests__/definition.test.js +0 -72
- package/src/bpmn-elements/index.d.ts +0 -26
- package/src/bpmn-elements/index.ts +0 -107
- package/src/bpmn-elements/presets/Event/EndEventFactory.ts +0 -114
- package/src/bpmn-elements/presets/Event/IntermediateCatchEvent.ts +0 -108
- package/src/bpmn-elements/presets/Event/IntermediateThrowEvent.ts +0 -109
- package/src/bpmn-elements/presets/Event/StartEventFactory.ts +0 -114
- package/src/bpmn-elements/presets/Event/boundaryEventFactory.ts +0 -117
- package/src/bpmn-elements/presets/Event/index.ts +0 -14
- package/src/bpmn-elements/presets/Flow/flow.d.ts +0 -6
- package/src/bpmn-elements/presets/Flow/index.ts +0 -8
- package/src/bpmn-elements/presets/Flow/manhattan.ts +0 -691
- package/src/bpmn-elements/presets/Flow/sequenceFlow.ts +0 -65
- package/src/bpmn-elements/presets/Gateway/gateway.ts +0 -107
- package/src/bpmn-elements/presets/Gateway/index.ts +0 -23
- package/src/bpmn-elements/presets/Pool/Lane.ts +0 -211
- package/src/bpmn-elements/presets/Pool/Pool.ts +0 -284
- package/src/bpmn-elements/presets/Pool/index.ts +0 -89
- package/src/bpmn-elements/presets/Task/index.ts +0 -122
- package/src/bpmn-elements/presets/Task/subProcess.ts +0 -189
- package/src/bpmn-elements/presets/Task/task.ts +0 -193
- package/src/bpmn-elements/presets/icons.ts +0 -155
- package/src/bpmn-elements/utils.ts +0 -52
- package/src/bpmn-elements-adapter/README.md +0 -293
- package/src/bpmn-elements-adapter/__tests__/adapter_in.test.js +0 -528
- package/src/bpmn-elements-adapter/__tests__/adapter_out.test.js +0 -569
- package/src/bpmn-elements-adapter/constant.ts +0 -76
- package/src/bpmn-elements-adapter/index.ts +0 -1134
- package/src/bpmn-elements-adapter/json2xml.ts +0 -91
- package/src/bpmn-elements-adapter/xml2json.ts +0 -548
- package/src/components/context-menu/index.ts +0 -253
- package/src/components/control/index.ts +0 -141
- package/src/components/dnd-panel/index.ts +0 -137
- package/src/components/highlight/index.ts +0 -227
- package/src/components/menu/index.ts +0 -748
- package/src/components/mini-map/index.ts +0 -686
- package/src/components/selection-select/index.ts +0 -387
- package/src/dynamic-group/index.ts +0 -775
- package/src/dynamic-group/model.ts +0 -562
- package/src/dynamic-group/node.ts +0 -288
- package/src/dynamic-group/utils.ts +0 -46
- package/src/index.less +0 -1
- package/src/index.ts +0 -45
- package/src/insert-node-in-polyline/edge.ts +0 -175
- package/src/insert-node-in-polyline/index.ts +0 -187
- package/src/materials/curved-edge/__test__/curved-edge.test.ts +0 -46
- package/src/materials/curved-edge/index.ts +0 -185
- package/src/materials/group/GroupNode.ts +0 -442
- package/src/materials/group/index.ts +0 -542
- package/src/materials/node-selection/index.ts +0 -380
- package/src/mindmap/fakerRoot.ts +0 -19
- package/src/mindmap/index.ts +0 -328
- package/src/mindmap/markContent.ts +0 -81
- package/src/mindmap/markContentOption.ts +0 -81
- package/src/mindmap/markEntity.ts +0 -82
- package/src/mindmap/markRoot.ts +0 -83
- package/src/mindmap/theme.ts +0 -11
- package/src/rect-label-node/RectLabelNodeView.ts +0 -33
- package/src/rect-label-node/index.ts +0 -15
- package/src/style/index.less +0 -342
- package/src/style/raw.ts +0 -295
- package/src/tools/auto-layout/index.ts +0 -282
- package/src/tools/flow-path/index.ts +0 -233
- package/src/tools/label/Label.tsx +0 -357
- package/src/tools/label/LabelModel.ts +0 -83
- package/src/tools/label/LabelOverlay.tsx +0 -158
- package/src/tools/label/algorithm.ts +0 -42
- package/src/tools/label/index.ts +0 -479
- package/src/tools/label/mediumEditor.ts +0 -94
- package/src/tools/label/utils.ts +0 -395
- package/src/tools/proximity-connect/index.ts +0 -435
- package/src/tools/snapshot/README.md +0 -145
- package/src/tools/snapshot/index.ts +0 -718
- package/src/tools/snapshot/utils.ts +0 -163
- package/src/turbo-adapter/index.ts +0 -212
- package/stats.html +0 -4842
- package/tsconfig.json +0 -18
|
@@ -1,569 +0,0 @@
|
|
|
1
|
-
/* eslint-disable no-useless-concat */
|
|
2
|
-
/* eslint-disable no-template-curly-in-string */
|
|
3
|
-
/* eslint-disable no-new */
|
|
4
|
-
/* eslint-disable no-undef */
|
|
5
|
-
/* eslint-disable no-tabs */
|
|
6
|
-
import { BPMNAdapter } from '..'
|
|
7
|
-
|
|
8
|
-
describe('Test BPMNAdapter: export xml', () => {
|
|
9
|
-
const graphData = {
|
|
10
|
-
nodes: [
|
|
11
|
-
{
|
|
12
|
-
id: 'Event_0rqndvp',
|
|
13
|
-
type: 'bpmn:startEvent',
|
|
14
|
-
x: 350,
|
|
15
|
-
y: 110,
|
|
16
|
-
properties: {},
|
|
17
|
-
text: {
|
|
18
|
-
x: 350,
|
|
19
|
-
y: 150,
|
|
20
|
-
value: '开始',
|
|
21
|
-
},
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
id: '121213b3-8fad-4b41-bb1e-a7672e9bfc07',
|
|
25
|
-
type: 'bpmn:subProcess',
|
|
26
|
-
x: 640,
|
|
27
|
-
y: 530,
|
|
28
|
-
properties: {},
|
|
29
|
-
children: [
|
|
30
|
-
'Activity_383p4ds',
|
|
31
|
-
'Event_3nm6g45',
|
|
32
|
-
'Gateway_10p8112',
|
|
33
|
-
'Gateway_36vu52v',
|
|
34
|
-
],
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
id: 'Event_2ffv4vc',
|
|
38
|
-
type: 'bpmn:boundaryEvent',
|
|
39
|
-
x: 220,
|
|
40
|
-
y: 570,
|
|
41
|
-
properties: {
|
|
42
|
-
attachedToRef: 'Activity_05avavm',
|
|
43
|
-
cancelActivity: false,
|
|
44
|
-
definitionType: 'bpmn:timerEventDefinition',
|
|
45
|
-
timerValue: '',
|
|
46
|
-
timerType: '',
|
|
47
|
-
definitionId: 'bpmn:timerEventDefinitionEventDefinition_0anvuso',
|
|
48
|
-
isBoundaryEvent: true,
|
|
49
|
-
},
|
|
50
|
-
text: {
|
|
51
|
-
x: 220,
|
|
52
|
-
y: 610,
|
|
53
|
-
value: '时间边界',
|
|
54
|
-
},
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
id: 'Event_2o2l6ht',
|
|
58
|
-
type: 'bpmn:boundaryEvent',
|
|
59
|
-
x: 310,
|
|
60
|
-
y: 320,
|
|
61
|
-
properties: {
|
|
62
|
-
attachedToRef: 'Activity_28r64ai',
|
|
63
|
-
cancelActivity: false,
|
|
64
|
-
definitionType: 'bpmn:timerEventDefinition',
|
|
65
|
-
timerValue: 'PT15S',
|
|
66
|
-
timerType: 'timeDuration',
|
|
67
|
-
definitionId: 'bpmn:timerEventDefinitionEventDefinition_11s0ei9',
|
|
68
|
-
isBoundaryEvent: true,
|
|
69
|
-
},
|
|
70
|
-
text: {
|
|
71
|
-
x: 310,
|
|
72
|
-
y: 360,
|
|
73
|
-
value: '时间边界',
|
|
74
|
-
},
|
|
75
|
-
},
|
|
76
|
-
{
|
|
77
|
-
id: 'Event_3nm6g45',
|
|
78
|
-
type: 'bpmn:boundaryEvent',
|
|
79
|
-
x: 710,
|
|
80
|
-
y: 530,
|
|
81
|
-
properties: {
|
|
82
|
-
attachedToRef: 'Activity_383p4ds',
|
|
83
|
-
cancelActivity: false,
|
|
84
|
-
definitionType: 'bpmn:timerEventDefinition',
|
|
85
|
-
timerValue: 'R5/PT10S',
|
|
86
|
-
timerType: 'timeCycle',
|
|
87
|
-
definitionId: 'bpmn:timerEventDefinitionEventDefinition_0ukj8qs',
|
|
88
|
-
isBoundaryEvent: true,
|
|
89
|
-
},
|
|
90
|
-
text: {
|
|
91
|
-
x: 710,
|
|
92
|
-
y: 570,
|
|
93
|
-
value: '时间边界',
|
|
94
|
-
},
|
|
95
|
-
},
|
|
96
|
-
{
|
|
97
|
-
id: 'Gateway_0ke5iid',
|
|
98
|
-
type: 'bpmn:parallelGateway',
|
|
99
|
-
x: 500,
|
|
100
|
-
y: 140,
|
|
101
|
-
properties: {},
|
|
102
|
-
text: {
|
|
103
|
-
x: 500,
|
|
104
|
-
y: 180,
|
|
105
|
-
value: '并行网关',
|
|
106
|
-
},
|
|
107
|
-
},
|
|
108
|
-
{
|
|
109
|
-
id: 'Gateway_10p8112',
|
|
110
|
-
type: 'bpmn:parallelGateway',
|
|
111
|
-
x: 490,
|
|
112
|
-
y: 530,
|
|
113
|
-
properties: {
|
|
114
|
-
expr: '${A > B}',
|
|
115
|
-
},
|
|
116
|
-
text: {
|
|
117
|
-
x: 490,
|
|
118
|
-
y: 570,
|
|
119
|
-
value: '并行网关',
|
|
120
|
-
},
|
|
121
|
-
},
|
|
122
|
-
{
|
|
123
|
-
id: 'Activity_05avavm',
|
|
124
|
-
type: 'bpmn:userTask',
|
|
125
|
-
x: 270,
|
|
126
|
-
y: 540,
|
|
127
|
-
properties: {},
|
|
128
|
-
text: {
|
|
129
|
-
x: 270,
|
|
130
|
-
y: 540,
|
|
131
|
-
value: '人工任务',
|
|
132
|
-
},
|
|
133
|
-
},
|
|
134
|
-
{
|
|
135
|
-
id: 'Activity_28r64ai',
|
|
136
|
-
type: 'bpmn:userTask',
|
|
137
|
-
x: 370,
|
|
138
|
-
y: 280,
|
|
139
|
-
properties: {},
|
|
140
|
-
text: {
|
|
141
|
-
x: 370,
|
|
142
|
-
y: 280,
|
|
143
|
-
value: '人工任务',
|
|
144
|
-
},
|
|
145
|
-
},
|
|
146
|
-
{
|
|
147
|
-
id: 'Event_3t9u7bs',
|
|
148
|
-
type: 'bpmn:endEvent',
|
|
149
|
-
x: 220,
|
|
150
|
-
y: 210,
|
|
151
|
-
properties: {},
|
|
152
|
-
text: {
|
|
153
|
-
x: 220,
|
|
154
|
-
y: 250,
|
|
155
|
-
value: '结束',
|
|
156
|
-
},
|
|
157
|
-
},
|
|
158
|
-
{
|
|
159
|
-
id: 'Activity_383p4ds',
|
|
160
|
-
type: 'bpmn:serviceTask',
|
|
161
|
-
x: 760,
|
|
162
|
-
y: 530,
|
|
163
|
-
properties: {},
|
|
164
|
-
text: {
|
|
165
|
-
x: 760,
|
|
166
|
-
y: 530,
|
|
167
|
-
value: '服务任务',
|
|
168
|
-
},
|
|
169
|
-
},
|
|
170
|
-
{
|
|
171
|
-
id: 'Gateway_36vu52v',
|
|
172
|
-
type: 'bpmn:inclusiveGateway',
|
|
173
|
-
x: 640,
|
|
174
|
-
y: 580,
|
|
175
|
-
properties: {},
|
|
176
|
-
text: {
|
|
177
|
-
x: 640,
|
|
178
|
-
y: 620,
|
|
179
|
-
value: '包容网关',
|
|
180
|
-
},
|
|
181
|
-
},
|
|
182
|
-
],
|
|
183
|
-
edges: [
|
|
184
|
-
{
|
|
185
|
-
id: 'Flow_19ep598',
|
|
186
|
-
type: 'bpmn:sequenceFlow',
|
|
187
|
-
sourceNodeId: 'Gateway_0ke5iid',
|
|
188
|
-
targetNodeId: 'Event_3t9u7bs',
|
|
189
|
-
startPoint: {
|
|
190
|
-
x: 475,
|
|
191
|
-
y: 140,
|
|
192
|
-
},
|
|
193
|
-
endPoint: {
|
|
194
|
-
x: 238,
|
|
195
|
-
y: 210,
|
|
196
|
-
},
|
|
197
|
-
properties: {},
|
|
198
|
-
pointsList: [
|
|
199
|
-
{
|
|
200
|
-
x: 475,
|
|
201
|
-
y: 140,
|
|
202
|
-
},
|
|
203
|
-
{
|
|
204
|
-
x: 445,
|
|
205
|
-
y: 140,
|
|
206
|
-
},
|
|
207
|
-
{
|
|
208
|
-
x: 445,
|
|
209
|
-
y: 210,
|
|
210
|
-
},
|
|
211
|
-
{
|
|
212
|
-
x: 238,
|
|
213
|
-
y: 210,
|
|
214
|
-
},
|
|
215
|
-
],
|
|
216
|
-
},
|
|
217
|
-
{
|
|
218
|
-
id: 'Flow_1cju7v0',
|
|
219
|
-
type: 'bpmn:sequenceFlow',
|
|
220
|
-
sourceNodeId: 'Gateway_0ke5iid',
|
|
221
|
-
targetNodeId: '121213b3-8fad-4b41-bb1e-a7672e9bfc07',
|
|
222
|
-
startPoint: {
|
|
223
|
-
x: 500,
|
|
224
|
-
y: 165,
|
|
225
|
-
},
|
|
226
|
-
endPoint: {
|
|
227
|
-
x: 640,
|
|
228
|
-
y: 430,
|
|
229
|
-
},
|
|
230
|
-
properties: {},
|
|
231
|
-
pointsList: [
|
|
232
|
-
{
|
|
233
|
-
x: 500,
|
|
234
|
-
y: 165,
|
|
235
|
-
},
|
|
236
|
-
{
|
|
237
|
-
x: 500,
|
|
238
|
-
y: 195,
|
|
239
|
-
},
|
|
240
|
-
{
|
|
241
|
-
x: 640,
|
|
242
|
-
y: 195,
|
|
243
|
-
},
|
|
244
|
-
{
|
|
245
|
-
x: 640,
|
|
246
|
-
y: 430,
|
|
247
|
-
},
|
|
248
|
-
],
|
|
249
|
-
},
|
|
250
|
-
{
|
|
251
|
-
id: 'Flow_0phuver',
|
|
252
|
-
type: 'bpmn:sequenceFlow',
|
|
253
|
-
sourceNodeId: 'Activity_05avavm',
|
|
254
|
-
targetNodeId: 'Activity_28r64ai',
|
|
255
|
-
startPoint: {
|
|
256
|
-
x: 270,
|
|
257
|
-
y: 500,
|
|
258
|
-
},
|
|
259
|
-
endPoint: {
|
|
260
|
-
x: 370,
|
|
261
|
-
y: 320,
|
|
262
|
-
},
|
|
263
|
-
properties: {},
|
|
264
|
-
pointsList: [
|
|
265
|
-
{
|
|
266
|
-
x: 220,
|
|
267
|
-
y: 540,
|
|
268
|
-
},
|
|
269
|
-
{
|
|
270
|
-
x: 190,
|
|
271
|
-
y: 540,
|
|
272
|
-
},
|
|
273
|
-
{
|
|
274
|
-
x: 190,
|
|
275
|
-
y: 410,
|
|
276
|
-
},
|
|
277
|
-
{
|
|
278
|
-
x: 450,
|
|
279
|
-
y: 410,
|
|
280
|
-
},
|
|
281
|
-
{
|
|
282
|
-
x: 450,
|
|
283
|
-
y: 280,
|
|
284
|
-
},
|
|
285
|
-
{
|
|
286
|
-
x: 420,
|
|
287
|
-
y: 280,
|
|
288
|
-
},
|
|
289
|
-
],
|
|
290
|
-
},
|
|
291
|
-
{
|
|
292
|
-
id: 'Flow_3ql1931',
|
|
293
|
-
type: 'bpmn:sequenceFlow',
|
|
294
|
-
sourceNodeId: '121213b3-8fad-4b41-bb1e-a7672e9bfc07',
|
|
295
|
-
targetNodeId: 'Activity_05avavm',
|
|
296
|
-
startPoint: {
|
|
297
|
-
x: 440,
|
|
298
|
-
y: 530,
|
|
299
|
-
},
|
|
300
|
-
endPoint: {
|
|
301
|
-
x: 320,
|
|
302
|
-
y: 540,
|
|
303
|
-
},
|
|
304
|
-
properties: {},
|
|
305
|
-
pointsList: [
|
|
306
|
-
{
|
|
307
|
-
x: 440,
|
|
308
|
-
y: 530,
|
|
309
|
-
},
|
|
310
|
-
{
|
|
311
|
-
x: 380,
|
|
312
|
-
y: 530,
|
|
313
|
-
},
|
|
314
|
-
{
|
|
315
|
-
x: 380,
|
|
316
|
-
y: 540,
|
|
317
|
-
},
|
|
318
|
-
{
|
|
319
|
-
x: 320,
|
|
320
|
-
y: 540,
|
|
321
|
-
},
|
|
322
|
-
],
|
|
323
|
-
},
|
|
324
|
-
{
|
|
325
|
-
id: 'Flow_39cdevi',
|
|
326
|
-
type: 'bpmn:sequenceFlow',
|
|
327
|
-
sourceNodeId: 'Gateway_10p8112',
|
|
328
|
-
targetNodeId: 'Activity_383p4ds',
|
|
329
|
-
startPoint: {
|
|
330
|
-
x: 515,
|
|
331
|
-
y: 530,
|
|
332
|
-
},
|
|
333
|
-
endPoint: {
|
|
334
|
-
x: 710,
|
|
335
|
-
y: 530,
|
|
336
|
-
},
|
|
337
|
-
properties: {
|
|
338
|
-
expressionType: 'cdata',
|
|
339
|
-
condition: 'foo > bar',
|
|
340
|
-
},
|
|
341
|
-
pointsList: [
|
|
342
|
-
{
|
|
343
|
-
x: 515,
|
|
344
|
-
y: 530,
|
|
345
|
-
},
|
|
346
|
-
{
|
|
347
|
-
x: 545,
|
|
348
|
-
y: 530,
|
|
349
|
-
},
|
|
350
|
-
{
|
|
351
|
-
x: 545,
|
|
352
|
-
y: 460,
|
|
353
|
-
},
|
|
354
|
-
{
|
|
355
|
-
x: 760,
|
|
356
|
-
y: 460,
|
|
357
|
-
},
|
|
358
|
-
{
|
|
359
|
-
x: 760,
|
|
360
|
-
y: 490,
|
|
361
|
-
},
|
|
362
|
-
],
|
|
363
|
-
},
|
|
364
|
-
{
|
|
365
|
-
id: 'Flow_1mpq63n',
|
|
366
|
-
type: 'bpmn:sequenceFlow',
|
|
367
|
-
sourceNodeId: 'Gateway_10p8112',
|
|
368
|
-
targetNodeId: 'Gateway_36vu52v',
|
|
369
|
-
startPoint: {
|
|
370
|
-
x: 515,
|
|
371
|
-
y: 530,
|
|
372
|
-
},
|
|
373
|
-
endPoint: {
|
|
374
|
-
x: 615,
|
|
375
|
-
y: 580,
|
|
376
|
-
},
|
|
377
|
-
properties: {
|
|
378
|
-
isDefaultFlow: true,
|
|
379
|
-
},
|
|
380
|
-
pointsList: [
|
|
381
|
-
{
|
|
382
|
-
x: 515,
|
|
383
|
-
y: 530,
|
|
384
|
-
},
|
|
385
|
-
{
|
|
386
|
-
x: 565,
|
|
387
|
-
y: 530,
|
|
388
|
-
},
|
|
389
|
-
{
|
|
390
|
-
x: 565,
|
|
391
|
-
y: 580,
|
|
392
|
-
},
|
|
393
|
-
{
|
|
394
|
-
x: 615,
|
|
395
|
-
y: 580,
|
|
396
|
-
},
|
|
397
|
-
],
|
|
398
|
-
},
|
|
399
|
-
],
|
|
400
|
-
}
|
|
401
|
-
const xml = ` <bpmn:definitions id="Definitions" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" targetNamespace="http://logic-flow.org" exporter="logicflow" exporterVersion="1.2.10">
|
|
402
|
-
<bpmn:process isExecutable="true" id="Process">
|
|
403
|
-
<bpmn:startEvent id="Event_0rqndvp" name="开始" />
|
|
404
|
-
<bpmn:subProcess id="121213b3-8fad-4b41-bb1e-a7672e9bfc07">
|
|
405
|
-
<bpmn:incoming>Flow_1cju7v0</bpmn:incoming>
|
|
406
|
-
<bpmn:outgoing>Flow_3ql1931</bpmn:outgoing>
|
|
407
|
-
<bpmn:serviceTask id="Activity_383p4ds" name="服务任务">
|
|
408
|
-
<bpmn:incoming>Flow_39cdevi</bpmn:incoming>
|
|
409
|
-
</bpmn:serviceTask>
|
|
410
|
-
<bpmn:boundaryEvent id="Event_3nm6g45" name="时间边界" attachedToRef="Activity_383p4ds" cancelActivity="false" definitionType="bpmn:timerEventDefinition" timerValue="R5/PT10S" timerType="timeCycle" definitionId="bpmn:timerEventDefinitionEventDefinition_0ukj8qs" isBoundaryEvent="true">
|
|
411
|
-
<bpmn:timerEventDefinition id="bpmn:timerEventDefinitionEventDefinition_0ukj8qs"><bpmn:timeCycle xsi:type="bpmn:tFormalExpression">R5/PT10S</bpmn:timeCycle></bpmn:timerEventDefinition>
|
|
412
|
-
</bpmn:boundaryEvent>
|
|
413
|
-
<bpmn:parallelGateway id="Gateway_10p8112" name="并行网关" expr="\${A > B}">
|
|
414
|
-
<bpmn:outgoing>Flow_39cdevi</bpmn:outgoing>
|
|
415
|
-
<bpmn:outgoing>Flow_1mpq63n</bpmn:outgoing>
|
|
416
|
-
</bpmn:parallelGateway>
|
|
417
|
-
<bpmn:inclusiveGateway id="Gateway_36vu52v" name="包容网关">
|
|
418
|
-
<bpmn:incoming>Flow_1mpq63n</bpmn:incoming>
|
|
419
|
-
</bpmn:inclusiveGateway>
|
|
420
|
-
<bpmn:sequenceFlow id="Flow_39cdevi" sourceRef="Gateway_10p8112" targetRef="Activity_383p4ds" expressionType="cdata" condition="foo > bar">
|
|
421
|
-
<bpmn:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[\${foo > bar}]]></bpmn:conditionExpression>
|
|
422
|
-
</bpmn:sequenceFlow>
|
|
423
|
-
<bpmn:sequenceFlow id="Flow_1mpq63n" sourceRef="Gateway_10p8112" targetRef="Gateway_36vu52v" isDefaultFlow="true" />
|
|
424
|
-
</bpmn:subProcess>
|
|
425
|
-
<bpmn:boundaryEvent id="Event_2ffv4vc" name="时间边界" attachedToRef="Activity_05avavm" cancelActivity="false" definitionType="bpmn:timerEventDefinition" timerValue="" timerType="" definitionId="bpmn:timerEventDefinitionEventDefinition_0anvuso" isBoundaryEvent="true">
|
|
426
|
-
<bpmn:timerEventDefinition id="bpmn:timerEventDefinitionEventDefinition_0anvuso"/>
|
|
427
|
-
</bpmn:boundaryEvent>
|
|
428
|
-
<bpmn:boundaryEvent id="Event_2o2l6ht" name="时间边界" attachedToRef="Activity_28r64ai" cancelActivity="false" definitionType="bpmn:timerEventDefinition" timerValue="PT15S" timerType="timeDuration" definitionId="bpmn:timerEventDefinitionEventDefinition_11s0ei9" isBoundaryEvent="true">
|
|
429
|
-
<bpmn:timerEventDefinition id="bpmn:timerEventDefinitionEventDefinition_11s0ei9"><bpmn:timeDuration xsi:type="bpmn:tFormalExpression">PT15S</bpmn:timeDuration></bpmn:timerEventDefinition>
|
|
430
|
-
</bpmn:boundaryEvent>
|
|
431
|
-
<bpmn:parallelGateway id="Gateway_0ke5iid" name="并行网关">
|
|
432
|
-
<bpmn:outgoing>Flow_19ep598</bpmn:outgoing>
|
|
433
|
-
<bpmn:outgoing>Flow_1cju7v0</bpmn:outgoing>
|
|
434
|
-
</bpmn:parallelGateway>
|
|
435
|
-
<bpmn:userTask id="Activity_05avavm" name="人工任务">
|
|
436
|
-
<bpmn:incoming>Flow_3ql1931</bpmn:incoming>
|
|
437
|
-
<bpmn:outgoing>Flow_0phuver</bpmn:outgoing>
|
|
438
|
-
</bpmn:userTask>
|
|
439
|
-
<bpmn:userTask id="Activity_28r64ai" name="人工任务">
|
|
440
|
-
<bpmn:incoming>Flow_0phuver</bpmn:incoming>
|
|
441
|
-
</bpmn:userTask>
|
|
442
|
-
<bpmn:endEvent id="Event_3t9u7bs" name="结束">
|
|
443
|
-
<bpmn:incoming>Flow_19ep598</bpmn:incoming>
|
|
444
|
-
</bpmn:endEvent>
|
|
445
|
-
<bpmn:sequenceFlow id="Flow_19ep598" sourceRef="Gateway_0ke5iid" targetRef="Event_3t9u7bs" />
|
|
446
|
-
<bpmn:sequenceFlow id="Flow_1cju7v0" sourceRef="Gateway_0ke5iid" targetRef="121213b3-8fad-4b41-bb1e-a7672e9bfc07" />
|
|
447
|
-
<bpmn:sequenceFlow id="Flow_0phuver" sourceRef="Activity_05avavm" targetRef="Activity_28r64ai" />
|
|
448
|
-
<bpmn:sequenceFlow id="Flow_3ql1931" sourceRef="121213b3-8fad-4b41-bb1e-a7672e9bfc07" targetRef="Activity_05avavm" />
|
|
449
|
-
</bpmn:process>
|
|
450
|
-
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
|
|
451
|
-
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Process">
|
|
452
|
-
<bpmndi:BPMNEdge id="Flow_19ep598_di" bpmnElement="Flow_19ep598">
|
|
453
|
-
<di:waypoint x="475" y="140" />
|
|
454
|
-
<di:waypoint x="445" y="140" />
|
|
455
|
-
<di:waypoint x="445" y="210" />
|
|
456
|
-
<di:waypoint x="238" y="210" />
|
|
457
|
-
</bpmndi:BPMNEdge>
|
|
458
|
-
<bpmndi:BPMNEdge id="Flow_1cju7v0_di" bpmnElement="Flow_1cju7v0">
|
|
459
|
-
<di:waypoint x="500" y="165" />
|
|
460
|
-
<di:waypoint x="500" y="195" />
|
|
461
|
-
<di:waypoint x="640" y="195" />
|
|
462
|
-
<di:waypoint x="640" y="430" />
|
|
463
|
-
</bpmndi:BPMNEdge>
|
|
464
|
-
<bpmndi:BPMNEdge id="Flow_0phuver_di" bpmnElement="Flow_0phuver">
|
|
465
|
-
<di:waypoint x="220" y="540" />
|
|
466
|
-
<di:waypoint x="190" y="540" />
|
|
467
|
-
<di:waypoint x="190" y="410" />
|
|
468
|
-
<di:waypoint x="450" y="410" />
|
|
469
|
-
<di:waypoint x="450" y="280" />
|
|
470
|
-
<di:waypoint x="420" y="280" />
|
|
471
|
-
</bpmndi:BPMNEdge>
|
|
472
|
-
<bpmndi:BPMNEdge id="Flow_3ql1931_di" bpmnElement="Flow_3ql1931">
|
|
473
|
-
<di:waypoint x="440" y="530" />
|
|
474
|
-
<di:waypoint x="380" y="530" />
|
|
475
|
-
<di:waypoint x="380" y="540" />
|
|
476
|
-
<di:waypoint x="320" y="540" />
|
|
477
|
-
</bpmndi:BPMNEdge>
|
|
478
|
-
<bpmndi:BPMNEdge id="Flow_39cdevi_di" bpmnElement="Flow_39cdevi">
|
|
479
|
-
<di:waypoint x="515" y="530" />
|
|
480
|
-
<di:waypoint x="545" y="530" />
|
|
481
|
-
<di:waypoint x="545" y="460" />
|
|
482
|
-
<di:waypoint x="760" y="460" />
|
|
483
|
-
<di:waypoint x="760" y="490" />
|
|
484
|
-
</bpmndi:BPMNEdge>
|
|
485
|
-
<bpmndi:BPMNEdge id="Flow_1mpq63n_di" bpmnElement="Flow_1mpq63n">
|
|
486
|
-
<di:waypoint x="515" y="530" />
|
|
487
|
-
<di:waypoint x="565" y="530" />
|
|
488
|
-
<di:waypoint x="565" y="580" />
|
|
489
|
-
<di:waypoint x="615" y="580" />
|
|
490
|
-
</bpmndi:BPMNEdge>
|
|
491
|
-
<bpmndi:BPMNShape id="Event_0rqndvp_di" bpmnElement="Event_0rqndvp">
|
|
492
|
-
<dc:Bounds x="330" y="90" width="40" height="40" />
|
|
493
|
-
<bpmndi:BPMNLabel>
|
|
494
|
-
<dc:Bounds x="340" y="143" width="20" height="14" />
|
|
495
|
-
</bpmndi:BPMNLabel>
|
|
496
|
-
</bpmndi:BPMNShape>
|
|
497
|
-
<bpmndi:BPMNShape id="121213b3-8fad-4b41-bb1e-a7672e9bfc07_di" bpmnElement="121213b3-8fad-4b41-bb1e-a7672e9bfc07">
|
|
498
|
-
<dc:Bounds x="590" y="490" width="100" height="80" />
|
|
499
|
-
</bpmndi:BPMNShape>
|
|
500
|
-
<bpmndi:BPMNShape id="Event_2ffv4vc_di" bpmnElement="Event_2ffv4vc">
|
|
501
|
-
<dc:Bounds x="170" y="530" width="100" height="80" />
|
|
502
|
-
<bpmndi:BPMNLabel>
|
|
503
|
-
<dc:Bounds x="200" y="603" width="40" height="14" />
|
|
504
|
-
</bpmndi:BPMNLabel>
|
|
505
|
-
</bpmndi:BPMNShape>
|
|
506
|
-
<bpmndi:BPMNShape id="Event_2o2l6ht_di" bpmnElement="Event_2o2l6ht">
|
|
507
|
-
<dc:Bounds x="260" y="280" width="100" height="80" />
|
|
508
|
-
<bpmndi:BPMNLabel>
|
|
509
|
-
<dc:Bounds x="290" y="353" width="40" height="14" />
|
|
510
|
-
</bpmndi:BPMNLabel>
|
|
511
|
-
</bpmndi:BPMNShape>
|
|
512
|
-
<bpmndi:BPMNShape id="Event_3nm6g45_di" bpmnElement="Event_3nm6g45">
|
|
513
|
-
<dc:Bounds x="660" y="490" width="100" height="80" />
|
|
514
|
-
<bpmndi:BPMNLabel>
|
|
515
|
-
<dc:Bounds x="690" y="563" width="40" height="14" />
|
|
516
|
-
</bpmndi:BPMNLabel>
|
|
517
|
-
</bpmndi:BPMNShape>
|
|
518
|
-
<bpmndi:BPMNShape id="Gateway_0ke5iid_di" bpmnElement="Gateway_0ke5iid">
|
|
519
|
-
<dc:Bounds x="450" y="100" width="100" height="80" />
|
|
520
|
-
<bpmndi:BPMNLabel>
|
|
521
|
-
<dc:Bounds x="480" y="173" width="40" height="14" />
|
|
522
|
-
</bpmndi:BPMNLabel>
|
|
523
|
-
</bpmndi:BPMNShape>
|
|
524
|
-
<bpmndi:BPMNShape id="Gateway_10p8112_di" bpmnElement="Gateway_10p8112">
|
|
525
|
-
<dc:Bounds x="440" y="490" width="100" height="80" />
|
|
526
|
-
<bpmndi:BPMNLabel>
|
|
527
|
-
<dc:Bounds x="470" y="563" width="40" height="14" />
|
|
528
|
-
</bpmndi:BPMNLabel>
|
|
529
|
-
</bpmndi:BPMNShape>
|
|
530
|
-
<bpmndi:BPMNShape id="Activity_05avavm_di" bpmnElement="Activity_05avavm">
|
|
531
|
-
<dc:Bounds x="220" y="500" width="100" height="80" />
|
|
532
|
-
<bpmndi:BPMNLabel>
|
|
533
|
-
<dc:Bounds x="250" y="533" width="40" height="14" />
|
|
534
|
-
</bpmndi:BPMNLabel>
|
|
535
|
-
</bpmndi:BPMNShape>
|
|
536
|
-
<bpmndi:BPMNShape id="Activity_28r64ai_di" bpmnElement="Activity_28r64ai">
|
|
537
|
-
<dc:Bounds x="320" y="240" width="100" height="80" />
|
|
538
|
-
<bpmndi:BPMNLabel>
|
|
539
|
-
<dc:Bounds x="350" y="273" width="40" height="14" />
|
|
540
|
-
</bpmndi:BPMNLabel>
|
|
541
|
-
</bpmndi:BPMNShape>
|
|
542
|
-
<bpmndi:BPMNShape id="Event_3t9u7bs_di" bpmnElement="Event_3t9u7bs">
|
|
543
|
-
<dc:Bounds x="200" y="190" width="40" height="40" />
|
|
544
|
-
<bpmndi:BPMNLabel>
|
|
545
|
-
<dc:Bounds x="210" y="243" width="20" height="14" />
|
|
546
|
-
</bpmndi:BPMNLabel>
|
|
547
|
-
</bpmndi:BPMNShape>
|
|
548
|
-
<bpmndi:BPMNShape id="Activity_383p4ds_di" bpmnElement="Activity_383p4ds">
|
|
549
|
-
<dc:Bounds x="710" y="490" width="100" height="80" />
|
|
550
|
-
<bpmndi:BPMNLabel>
|
|
551
|
-
<dc:Bounds x="740" y="523" width="40" height="14" />
|
|
552
|
-
</bpmndi:BPMNLabel>
|
|
553
|
-
</bpmndi:BPMNShape>
|
|
554
|
-
<bpmndi:BPMNShape id="Gateway_36vu52v_di" bpmnElement="Gateway_36vu52v">
|
|
555
|
-
<dc:Bounds x="590" y="540" width="100" height="80" />
|
|
556
|
-
<bpmndi:BPMNLabel>
|
|
557
|
-
<dc:Bounds x="620" y="613" width="40" height="14" />
|
|
558
|
-
</bpmndi:BPMNLabel>
|
|
559
|
-
</bpmndi:BPMNShape>
|
|
560
|
-
</bpmndi:BPMNPlane>
|
|
561
|
-
</bpmndi:BPMNDiagram>
|
|
562
|
-
</bpmn:definitions>`
|
|
563
|
-
const lf = {}
|
|
564
|
-
const adapter = new BPMNAdapter({ lf })
|
|
565
|
-
|
|
566
|
-
it('should transform logic-flow graph data to bpmn xml', () => {
|
|
567
|
-
expect(adapter.adapterXmlOut(graphData)).toEqual(xml)
|
|
568
|
-
})
|
|
569
|
-
})
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
export const StartEventConfig = {
|
|
2
|
-
width: 40,
|
|
3
|
-
height: 40,
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
export const EndEventConfig = {
|
|
7
|
-
width: 40,
|
|
8
|
-
height: 40,
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export const BoundaryEventConfig = {
|
|
12
|
-
width: 100,
|
|
13
|
-
height: 80,
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export const IntermediateEventConfig = {
|
|
17
|
-
width: 100,
|
|
18
|
-
height: 80,
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export const ParallelGatewayConfig = {
|
|
22
|
-
width: 100,
|
|
23
|
-
height: 80,
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export const InclusiveGatewayConfig = {
|
|
27
|
-
width: 100,
|
|
28
|
-
height: 80,
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export const ExclusiveGatewayConfig = {
|
|
32
|
-
width: 100,
|
|
33
|
-
height: 80,
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
export const ServiceTaskConfig = {
|
|
37
|
-
width: 100,
|
|
38
|
-
height: 80,
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
export const UserTaskConfig = {
|
|
42
|
-
width: 100,
|
|
43
|
-
height: 80,
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
export const SubProcessConfig = {
|
|
47
|
-
width: 100,
|
|
48
|
-
height: 80,
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
export const theme = {
|
|
52
|
-
rect: {
|
|
53
|
-
radius: 5,
|
|
54
|
-
stroke: 'rgb(24, 125, 255)',
|
|
55
|
-
},
|
|
56
|
-
circle: {
|
|
57
|
-
r: 18,
|
|
58
|
-
stroke: 'rgb(24, 125, 255)',
|
|
59
|
-
},
|
|
60
|
-
polygon: {
|
|
61
|
-
stroke: 'rgb(24, 125, 255)',
|
|
62
|
-
},
|
|
63
|
-
polyline: {
|
|
64
|
-
stroke: 'rgb(24, 125, 255)',
|
|
65
|
-
hoverStroke: 'rgb(24, 125, 255)',
|
|
66
|
-
selectedStroke: 'rgb(24, 125, 255)',
|
|
67
|
-
},
|
|
68
|
-
edgeText: {
|
|
69
|
-
background: {
|
|
70
|
-
fill: 'white',
|
|
71
|
-
height: 14,
|
|
72
|
-
stroke: 'transparent',
|
|
73
|
-
radius: 3,
|
|
74
|
-
},
|
|
75
|
-
},
|
|
76
|
-
}
|