@processmaker/modeler 1.30.2 → 1.31.0
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/dist/img/{boundary-event.5bf51421.svg → boundary-event.4e0fb9de.svg} +3 -3
- package/dist/img/clipboard.5fe6f79e.svg +3 -0
- package/dist/img/conditional-start-event.a56e4b5b.svg +4 -0
- package/dist/img/{connect-artifacts.5f8bed89.svg → connect-artifacts.496eb4b9.svg} +3 -3
- package/dist/img/{connect-elements.d4abedf2.svg → connect-elements.9ec5ca93.svg} +3 -3
- package/dist/img/copy-regular.2d678143.svg +3 -0
- package/dist/img/data-object.0d6d1585.svg +3 -0
- package/dist/img/data-store.32bed5ce.svg +3 -0
- package/dist/img/{default-flow.212147b4.svg → default-flow.156a793b.svg} +3 -3
- package/dist/img/end-event.9d1ff5c0.svg +3 -0
- package/dist/img/error-end-event.aab86eca.svg +11 -0
- package/dist/img/event-based-gateway.9960eee5.svg +6 -0
- package/dist/img/exclusive-gateway.26db4fae.svg +4 -0
- package/dist/img/generic-gateway.09ca6929.svg +3 -0
- package/dist/img/generic-intermediate-event.a711eb33.svg +4 -0
- package/dist/img/inclusive-gateway.754cb36f.svg +4 -0
- package/dist/img/intermediate-conditional-catch-event.e9ae6198.svg +5 -0
- package/dist/img/intermediate-message-catch-event.9d25208e.svg +5 -0
- package/dist/img/intermediate-message-throw-event.4309dc45.svg +5 -0
- package/dist/img/intermediate-signal-catch-event.74b65f17.svg +5 -0
- package/dist/img/intermediate-signal-throw-event.29cad018.svg +5 -0
- package/dist/img/intermediate-timer-event.1670a1c8.svg +5 -0
- package/dist/img/{lane-below.890c069b.svg → lane-below.e67f9823.svg} +12 -12
- package/dist/img/manual-task.374a73c3.svg +4 -0
- package/dist/img/message-end-event.f15b67f5.svg +4 -0
- package/dist/img/message-start-event.f2d4a5e6.svg +4 -0
- package/dist/img/mini-map.ae46890c.svg +3 -0
- package/dist/img/minus.ca21cc3b.svg +3 -0
- package/dist/img/parallel-gateway.877bb628.svg +4 -0
- package/dist/img/pin-angle-fill.0e4af645.svg +3 -0
- package/dist/img/pin-angle.3462c115.svg +3 -0
- package/dist/img/plus.afbb0b13.svg +3 -0
- package/dist/img/pool.98d4734c.svg +3 -0
- package/dist/img/redo.8425ce7e.svg +4 -0
- package/dist/img/script-task.3d8c664a.svg +4 -0
- package/dist/img/signal-end-event.a38a6616.svg +4 -0
- package/dist/img/signal-start-event.3d7b096c.svg +4 -0
- package/dist/img/start-event.7f1911cb.svg +3 -0
- package/dist/img/sub-task.52d09847.svg +4 -0
- package/dist/img/task.8a1c6c75.svg +3 -0
- package/dist/img/terminate-end-event.3aa5cd00.svg +4 -0
- package/dist/img/text-annotation.02df53cd.svg +3 -0
- package/dist/img/timer-start-event.55abac82.svg +4 -0
- package/dist/img/trash-alt-solid.58c408b8.svg +1 -0
- package/dist/img/undo.e0ffff93.svg +4 -0
- package/dist/modeler.common.js +19227 -12350
- package/dist/modeler.common.js.map +1 -1
- package/dist/modeler.umd.js +19227 -12350
- package/dist/modeler.umd.js.map +1 -1
- package/dist/modeler.umd.min.js +28 -3
- package/dist/modeler.umd.min.js.map +1 -1
- package/jsconfig.json +12 -0
- package/package.json +3 -1
- package/src/.DS_Store +0 -0
- package/src/ModelerApp.vue +21 -21
- package/src/assets/boundary-event.svg +3 -3
- package/src/assets/clipboard.svg +3 -1
- package/src/assets/cog-solid.svg +1 -0
- package/src/assets/connect-artifacts.svg +3 -3
- package/src/assets/connect-elements.svg +3 -3
- package/src/assets/copy-regular.svg +3 -1
- package/src/assets/default-flow.svg +3 -3
- package/src/assets/lane-below.svg +12 -12
- package/src/assets/palette.svg +1 -0
- package/src/assets/pin-angle-fill.svg +3 -0
- package/src/assets/pin-angle.svg +3 -0
- package/src/assets/railBottom/mini-map.svg +3 -0
- package/src/assets/railBottom/minus.svg +3 -0
- package/src/assets/railBottom/plus.svg +3 -0
- package/src/assets/railBottom/redo.svg +4 -0
- package/src/assets/railBottom/undo.svg +4 -0
- package/src/assets/scss/settings/_settings.variables.scss +5 -0
- package/src/assets/scss/tools/_tools.chevron.scss +1 -1
- package/src/assets/toolpanel/conditional-start-event.svg +4 -0
- package/src/assets/toolpanel/data-object.svg +2 -8
- package/src/assets/toolpanel/data-store.svg +2 -5
- package/src/assets/toolpanel/end-event.svg +3 -19
- package/src/assets/toolpanel/error-end-event.svg +11 -0
- package/src/assets/toolpanel/event-based-gateway.svg +6 -0
- package/src/assets/toolpanel/exclusive-gateway.svg +4 -0
- package/src/assets/toolpanel/generic-gateway.svg +2 -13
- package/src/assets/toolpanel/generic-intermediate-event.svg +3 -4
- package/src/assets/toolpanel/inclusive-gateway.svg +4 -0
- package/src/assets/toolpanel/intermediate-conditional-catch-event.svg +5 -0
- package/src/assets/toolpanel/intermediate-message-catch-event.svg +5 -0
- package/src/assets/toolpanel/intermediate-message-throw-event.svg +4 -5
- package/src/assets/toolpanel/intermediate-signal-catch-event.svg +5 -0
- package/src/assets/toolpanel/intermediate-signal-throw-event.svg +5 -0
- package/src/assets/toolpanel/intermediate-timer-event.svg +5 -0
- package/src/assets/toolpanel/manual-task.svg +4 -0
- package/src/assets/toolpanel/message-end-event.svg +4 -0
- package/src/assets/toolpanel/message-start-event.svg +3 -3
- package/src/assets/toolpanel/parallel-gateway.svg +4 -0
- package/src/assets/toolpanel/pool.svg +3 -11
- package/src/assets/toolpanel/script-task.svg +4 -0
- package/src/assets/toolpanel/signal-end-event.svg +4 -0
- package/src/assets/toolpanel/signal-start-event.svg +4 -0
- package/src/assets/toolpanel/start-event.svg +3 -19
- package/src/assets/toolpanel/sub-task.svg +4 -0
- package/src/assets/toolpanel/task.svg +3 -14
- package/src/assets/toolpanel/terminate-end-event.svg +4 -0
- package/src/assets/toolpanel/text-annotation.svg +3 -17
- package/src/assets/toolpanel/timer-start-event.svg +4 -0
- package/src/assets/trash-alt-solid.svg +1 -4
- package/src/components/crown/crownButtons/addLaneAboveButton.vue +6 -4
- package/src/components/crown/crownButtons/addLaneBelowButton.vue +6 -4
- package/src/components/crown/crownButtons/associationFlowButton.vue +1 -14
- package/src/components/crown/crownButtons/cloneButton.vue +1 -6
- package/src/components/crown/crownButtons/copyButton.vue +1 -4
- package/src/components/crown/crownButtons/crownBoundaryEventDropdown.vue +7 -2
- package/src/components/crown/crownButtons/crownButton.vue +36 -11
- package/src/components/crown/crownButtons/crownColorDropdown.vue +1 -1
- package/src/components/crown/crownButtons/crownDropdown.scss +4 -9
- package/src/components/crown/crownButtons/crownTaskDropdown.vue +1 -1
- package/src/components/crown/crownButtons/deleteButton.vue +1 -7
- package/src/components/crown/crownButtons/genericFlowButton.vue +4 -4
- package/src/components/crown/crownButtons/icons/faAlignBottom.js +11 -0
- package/src/components/crown/crownButtons/icons/faAlignLeft.js +11 -0
- package/src/components/crown/crownButtons/icons/faAlignRight.js +11 -0
- package/src/components/crown/crownButtons/icons/faAlignTop.js +11 -0
- package/src/components/crown/crownButtons/icons/faBoundaryEvent.js +11 -0
- package/src/components/crown/crownButtons/icons/faCenterHorizontally.js +11 -0
- package/src/components/crown/crownButtons/icons/faCenterVertically.js +11 -0
- package/src/components/crown/crownButtons/icons/faConnectElements.js +11 -0
- package/src/components/crown/crownButtons/icons/faDistributeHorizontally.js +11 -0
- package/src/components/crown/crownButtons/icons/faDistributeVertically.js +11 -0
- package/src/components/crown/crownButtons/icons/faLaneAbove.js +11 -0
- package/src/components/crown/crownButtons/icons/faLaneBelow.js +11 -0
- package/src/components/crown/crownButtons/icons/index.js +12 -0
- package/src/components/crown/crownConfig/crownConfig.scss +5 -4
- package/src/components/crown/crownConfig/crownConfig.vue +5 -4
- package/src/components/crown/crownMultiselect/crownAlign.scss +20 -0
- package/src/components/crown/crownMultiselect/crownAlign.vue +302 -0
- package/src/components/crown/crownMultiselect/crownMultiselect.vue +60 -14
- package/src/components/miniPaper/MiniPaper.vue +16 -2
- package/src/components/miniPaper/miniPaper.scss +6 -12
- package/src/components/modeler/Modeler.vue +29 -23
- package/src/components/modeler/ModelerReadonly.vue +996 -0
- package/src/components/modeler/Selection.vue +206 -18
- package/src/components/nodes/boundaryEvent/boundaryEvent.vue +0 -5
- package/src/components/nodes/endEvent/index.js +37 -0
- package/src/components/nodes/exclusiveGateway/index.js +30 -0
- package/src/components/nodes/genericFlow/SequenceFlow.js +2 -1
- package/src/components/nodes/index.js +1 -0
- package/src/components/nodes/intermediateTimerEvent/index.js +44 -0
- package/src/components/nodes/pool/pool.vue +0 -8
- package/src/components/nodes/startEvent/index.js +43 -0
- package/src/components/nodes/task/index.js +30 -0
- package/src/components/railBottom/RailBottom.vue +120 -0
- package/src/components/railBottom/controls/Controls.vue +148 -0
- package/src/components/railBottom/controls/SubmenuPopper/SubmenuPopper.vue +188 -0
- package/src/components/railBottom/controls/controls.scss +98 -0
- package/src/components/railBottom/icons/MinusIcon.vue +5 -0
- package/src/components/railBottom/icons/PlusIcon.vue +5 -0
- package/src/components/railBottom/icons/index.js +2 -0
- package/src/components/railBottom/miniPaperControl/MiniPaperControl.vue +46 -0
- package/src/components/railBottom/miniPaperControl/miniPaperControl.scss +45 -0
- package/src/components/railBottom/railBottom.scss +28 -0
- package/src/components/railBottom/undoRedoControl/UndoRedoControl.vue +89 -0
- package/src/components/railBottom/undoRedoControl/undoRedoControl.scss +51 -0
- package/src/components/railBottom/zoomControl/ZoomControl.vue +80 -0
- package/src/components/railBottom/zoomControl/zoomControl.scss +66 -0
- package/src/components/rails/explorer-rail/explorer-rail.scss +55 -0
- package/src/components/rails/explorer-rail/explorer.vue +93 -0
- package/src/components/rails/explorer-rail/filterNodeTypes/filterNodeTypes.vue +54 -0
- package/src/components/rails/explorer-rail/nodeTypesLoop/nodeTypesLoop.vue +234 -0
- package/src/components/rails/explorer-rail/rankConstants.js +1 -0
- package/src/components/toolbar/ToolBar.vue +0 -66
- package/src/main.js +6 -0
- package/src/mixins/linkConfig.js +16 -5
- package/src/mixins/resizeConfig.js +3 -1
- package/src/nodeTypesStore.js +118 -0
- package/src/store.js +5 -0
- package/dist/img/clipboard.bcc7796a.svg +0 -1
- package/dist/img/copy-regular.3eb4c04a.svg +0 -1
- package/dist/img/data-object.e931f8e7.svg +0 -9
- package/dist/img/data-store.7ca4c899.svg +0 -6
- package/dist/img/end-event.1ad31396.svg +0 -19
- package/dist/img/generic-gateway.3a76fc75.svg +0 -14
- package/dist/img/generic-intermediate-event.ba2e1d71.svg +0 -5
- package/dist/img/intermediate-message-throw-event.ac432d96.svg +0 -6
- package/dist/img/pool.ac62ddae.svg +0 -11
- package/dist/img/start-event.e895cee2.svg +0 -19
- package/dist/img/task.e7419065.svg +0 -14
- package/dist/img/text-annotation.926416f4.svg +0 -17
- package/dist/img/trash-alt-solid.f2f64c1f.svg +0 -4
|
@@ -35,6 +35,7 @@ import { id as messageFlowId } from '@/components/nodes/messageFlow/config';
|
|
|
35
35
|
import { id as dataOutputAssociationFlowId } from '@/components/nodes/dataOutputAssociation/config';
|
|
36
36
|
import { id as dataInputAssociationFlowId } from '@/components/nodes/dataInputAssociation/config';
|
|
37
37
|
import { labelWidth, poolPadding } from '../nodes/pool/poolSizes';
|
|
38
|
+
import { invalidNodeColor, poolColor } from '@/components/nodeColors';
|
|
38
39
|
|
|
39
40
|
export default {
|
|
40
41
|
name: 'Selection',
|
|
@@ -53,6 +54,7 @@ export default {
|
|
|
53
54
|
isSelecting: false,
|
|
54
55
|
isSelected: false,
|
|
55
56
|
selected: [],
|
|
57
|
+
conectedLinks:[],
|
|
56
58
|
dragging: false,
|
|
57
59
|
style: {
|
|
58
60
|
left: '0px',
|
|
@@ -79,6 +81,10 @@ export default {
|
|
|
79
81
|
selectableBlackList:[
|
|
80
82
|
genericFlowId,
|
|
81
83
|
],
|
|
84
|
+
newPool: null,
|
|
85
|
+
oldPool: null,
|
|
86
|
+
isValidSelectionLinks: true,
|
|
87
|
+
invalidPool: null,
|
|
82
88
|
};
|
|
83
89
|
},
|
|
84
90
|
mounted(){
|
|
@@ -96,6 +102,7 @@ export default {
|
|
|
96
102
|
watch: {
|
|
97
103
|
// whenever selected changes
|
|
98
104
|
selected(newSelected) {
|
|
105
|
+
this.prepareConectedLinks(newSelected);
|
|
99
106
|
this.addToHighlightedNodes(newSelected);
|
|
100
107
|
},
|
|
101
108
|
},
|
|
@@ -132,7 +139,9 @@ export default {
|
|
|
132
139
|
}
|
|
133
140
|
this.filterSelected();
|
|
134
141
|
await this.$nextTick();
|
|
135
|
-
|
|
142
|
+
if (store.getters.isReadOnly === false) {
|
|
143
|
+
this.updateSelectionBox();
|
|
144
|
+
}
|
|
136
145
|
},
|
|
137
146
|
/**
|
|
138
147
|
* Select or unselect an element with shift key pressed
|
|
@@ -145,13 +154,21 @@ export default {
|
|
|
145
154
|
return;
|
|
146
155
|
}
|
|
147
156
|
// validate if there is a lane previously selected
|
|
148
|
-
let lane = this.selected.find(
|
|
149
|
-
return this.draggableBlackList.includes(
|
|
157
|
+
let lane = this.selected.find(shape => {
|
|
158
|
+
return this.draggableBlackList.includes(shape.model.component.node.type);
|
|
150
159
|
});
|
|
151
160
|
if (lane) {
|
|
152
161
|
this.selected = [view];
|
|
153
162
|
return;
|
|
154
|
-
}
|
|
163
|
+
}
|
|
164
|
+
// validate if there is a lane previously selected
|
|
165
|
+
let pool = this.selected.find(shape => {
|
|
166
|
+
return shape.model.component.node.type === poolId;
|
|
167
|
+
});
|
|
168
|
+
if (pool && view.model.component.node.type !== poolId) {
|
|
169
|
+
this.selected = [view];
|
|
170
|
+
return;
|
|
171
|
+
}
|
|
155
172
|
// validate if the current selection is a pool
|
|
156
173
|
if (view.model.component && view.model.component.node.type === poolId) {
|
|
157
174
|
//validate if previous selection are all pools
|
|
@@ -162,6 +179,14 @@ export default {
|
|
|
162
179
|
}
|
|
163
180
|
return;
|
|
164
181
|
}
|
|
182
|
+
// prevent select out of the current pool container
|
|
183
|
+
if (view.model.component && view.model.component.node.pool){
|
|
184
|
+
pool = this.getPool(this.selected);
|
|
185
|
+
if (pool && view.model.component.node.pool.id !== pool.model.get('id')) {
|
|
186
|
+
this.selected = [view];
|
|
187
|
+
return;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
165
190
|
this.selectOrUnselectShape(view);
|
|
166
191
|
},
|
|
167
192
|
/**
|
|
@@ -174,7 +199,7 @@ export default {
|
|
|
174
199
|
this.selected = this.selected.filter(item => item.id !== view.id);
|
|
175
200
|
} else {
|
|
176
201
|
this.selected.push(view);
|
|
177
|
-
}
|
|
202
|
+
}
|
|
178
203
|
},
|
|
179
204
|
clearSelection() {
|
|
180
205
|
this.initSelection();
|
|
@@ -294,6 +319,73 @@ export default {
|
|
|
294
319
|
});
|
|
295
320
|
return elements;
|
|
296
321
|
},
|
|
322
|
+
/**
|
|
323
|
+
* Check if a point is into the area
|
|
324
|
+
* @param {Object} position
|
|
325
|
+
* @param {Object} area
|
|
326
|
+
*/
|
|
327
|
+
isPositionWithinArea(position, area) {
|
|
328
|
+
const { x, y, width, height } = area;
|
|
329
|
+
return (
|
|
330
|
+
position.x >= x &&
|
|
331
|
+
position.x <= x + width &&
|
|
332
|
+
position.y >= y &&
|
|
333
|
+
position.y <= y + height
|
|
334
|
+
);
|
|
335
|
+
},
|
|
336
|
+
/**
|
|
337
|
+
* Prepare the conectedLinks collection
|
|
338
|
+
* @param {Array} shapes
|
|
339
|
+
*/
|
|
340
|
+
prepareConectedLinks(shapes){
|
|
341
|
+
const { paper } = this.paperManager;
|
|
342
|
+
this.conectedLinks = [];
|
|
343
|
+
this.isValidSelectionLinks = true;
|
|
344
|
+
shapes.forEach((shape) => {
|
|
345
|
+
let conectedLinks = this.graph.getConnectedLinks(shape.model);
|
|
346
|
+
// if the shape is a container
|
|
347
|
+
if ( shape.model.component && shape.model.component.node.type === poolId) {
|
|
348
|
+
const area = shape.model.getBBox();
|
|
349
|
+
const linksInArea = paper.model.getLinks().filter((link) => {
|
|
350
|
+
const sourcePosition = link.getSourcePoint();
|
|
351
|
+
const targetPosition = link.getTargetPoint();
|
|
352
|
+
return (
|
|
353
|
+
this.isPositionWithinArea(sourcePosition, area) ||
|
|
354
|
+
this.isPositionWithinArea(targetPosition, area)
|
|
355
|
+
);
|
|
356
|
+
});
|
|
357
|
+
if (linksInArea) {
|
|
358
|
+
conectedLinks = [...conectedLinks, ...linksInArea];
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
conectedLinks.forEach((link) => {
|
|
362
|
+
const linkView = paper.findViewByModel(link);
|
|
363
|
+
if (!this.conectedLinks.some(obj => obj.id === linkView.id)) {
|
|
364
|
+
this.conectedLinks.push(linkView);
|
|
365
|
+
this.validateSelectionLinks(linkView);
|
|
366
|
+
}
|
|
367
|
+
});
|
|
368
|
+
});
|
|
369
|
+
},
|
|
370
|
+
/**
|
|
371
|
+
* Validate if the selection is valid to drag and drop in other container
|
|
372
|
+
* @param {Object} linkView
|
|
373
|
+
*/
|
|
374
|
+
validateSelectionLinks(linkView){
|
|
375
|
+
if (this.isValidSelectionLinks) {
|
|
376
|
+
const source = this.selected.find(shape => {
|
|
377
|
+
return shape.model.get('id') === linkView.model.getSourceElement().get('id');
|
|
378
|
+
});
|
|
379
|
+
const target = this.selected.find(shape => {
|
|
380
|
+
return shape.model.get('id') === linkView.model.getTargetElement().get('id');
|
|
381
|
+
});
|
|
382
|
+
if (source && target) {
|
|
383
|
+
this.isValidSelectionLinks = true;
|
|
384
|
+
} else {
|
|
385
|
+
this.isValidSelectionLinks = false;
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
},
|
|
297
389
|
/**
|
|
298
390
|
* Return the bounding box of the selected elements,
|
|
299
391
|
* @param {Array} selected
|
|
@@ -367,7 +459,7 @@ export default {
|
|
|
367
459
|
// remove from selection the selected flows that belongs to a selected pools
|
|
368
460
|
if (shape.model.component && flowTypes.includes(shape.model.component.node.type)) {
|
|
369
461
|
const parent = shape.model.getParentCell();
|
|
370
|
-
if (parent
|
|
462
|
+
if (parent.component && parent.component.node.pool) {
|
|
371
463
|
return !selectedPoolsIds.includes(parent.component.node.pool.component.node.id);
|
|
372
464
|
}
|
|
373
465
|
}
|
|
@@ -394,7 +486,7 @@ export default {
|
|
|
394
486
|
});
|
|
395
487
|
if (shapes) {
|
|
396
488
|
return true;
|
|
397
|
-
}
|
|
489
|
+
}
|
|
398
490
|
return false;
|
|
399
491
|
},
|
|
400
492
|
/**
|
|
@@ -474,15 +566,30 @@ export default {
|
|
|
474
566
|
* Stop drag procedure
|
|
475
567
|
* @param {Object} event
|
|
476
568
|
*/
|
|
477
|
-
stopDrag() {
|
|
478
|
-
this.overPoolStopDrag();
|
|
479
|
-
this.$emit('save-state');
|
|
569
|
+
async stopDrag() {
|
|
480
570
|
this.dragging = false;
|
|
481
571
|
this.stopForceMove = false;
|
|
482
572
|
// Readjusts the selection box, taking into consideration elements
|
|
483
|
-
// that are anchored and did not move, such as boundary events.
|
|
573
|
+
// that are anchored and did not move, such as boundary events.
|
|
574
|
+
await this.$nextTick();
|
|
575
|
+
await this.paperManager.awaitScheduledUpdates();
|
|
576
|
+
this.overPoolStopDrag();
|
|
484
577
|
this.updateSelectionBox();
|
|
485
578
|
},
|
|
579
|
+
/**
|
|
580
|
+
* Selector will update the waypoints of the related flows
|
|
581
|
+
*/
|
|
582
|
+
updateFlowsWaypoint(){
|
|
583
|
+
this.conectedLinks.forEach((link)=> {
|
|
584
|
+
if (link.model.component && link.model.get('type') === 'standard.Link'){
|
|
585
|
+
const start = link.sourceAnchor;
|
|
586
|
+
const end = link.targetAnchor;
|
|
587
|
+
link.model.component.node.diagram.waypoint = [start,
|
|
588
|
+
...link.model.component.shape.vertices(),
|
|
589
|
+
end].map(point => link.model.component.moddle.create('dc:Point', point));
|
|
590
|
+
}
|
|
591
|
+
});
|
|
592
|
+
},
|
|
486
593
|
/**
|
|
487
594
|
* Translate the Selected shapes adding some custom validations
|
|
488
595
|
*/
|
|
@@ -500,10 +607,12 @@ export default {
|
|
|
500
607
|
return drafRef.model.get('id') !== shape.model.get('id');
|
|
501
608
|
});
|
|
502
609
|
}
|
|
503
|
-
// allow
|
|
504
|
-
if (this.selected && this.selected.length === 1 &&
|
|
610
|
+
// allow movements only if one boundary event is selected;
|
|
611
|
+
if (this.selected && this.selected.length === 1 &&
|
|
505
612
|
this.selected[0].model.get('type') === 'processmaker.components.nodes.boundaryEvent.Shape') {
|
|
506
613
|
this.selected[0].model.translate(x, y);
|
|
614
|
+
// validation about boundary event movements
|
|
615
|
+
this.selected[0].model.component.turnInvalidTargetRed();
|
|
507
616
|
return;
|
|
508
617
|
}
|
|
509
618
|
shapes.forEach((shape)=> shape.model.translate(x, y));
|
|
@@ -589,9 +698,24 @@ export default {
|
|
|
589
698
|
let selectedArea = g.rect(f.x, f.y, width, height);
|
|
590
699
|
return this.getElementsInSelectedArea(selectedArea, { strict: false });
|
|
591
700
|
},
|
|
701
|
+
getPool(elements){
|
|
702
|
+
const { paper } = this.paperManager;
|
|
703
|
+
let pool = null;
|
|
704
|
+
if (elements && elements.length > 0) {
|
|
705
|
+
elements.forEach(({ model }) => {
|
|
706
|
+
if (pool) {
|
|
707
|
+
return;
|
|
708
|
+
}
|
|
709
|
+
if (model.getParentCell() && model.getParentCell().component.node.type === poolId){
|
|
710
|
+
pool = model.getParentCell();
|
|
711
|
+
}
|
|
712
|
+
});
|
|
713
|
+
}
|
|
714
|
+
return paper.findViewByModel(pool);
|
|
715
|
+
},
|
|
592
716
|
/**
|
|
593
717
|
* Check that they are not in a pool
|
|
594
|
-
* @param {Array} elements
|
|
718
|
+
* @param {Array} elements
|
|
595
719
|
* @return true if there is a pool in the selection or if none of the selected elements are in a pool
|
|
596
720
|
*/
|
|
597
721
|
isNotPoolChilds(elements) {
|
|
@@ -613,18 +737,35 @@ export default {
|
|
|
613
737
|
if (this.isNotPoolChilds(this.selected)) {
|
|
614
738
|
return;
|
|
615
739
|
}
|
|
740
|
+
const currentPool = this.getPool(this.selected);
|
|
616
741
|
const elementsUnderDivArea = this.getShapesFromPoint(event);
|
|
617
742
|
const pool = elementsUnderDivArea.find(item => {
|
|
618
743
|
return item.model.component && item.model.component.node.type === poolId;
|
|
619
744
|
});
|
|
745
|
+
this.newPool = null;
|
|
746
|
+
this.oldPool = null;
|
|
620
747
|
if (!pool) {
|
|
621
748
|
this.isOutOfThePool = true;
|
|
622
749
|
store.commit('preventSavingElementPosition');
|
|
623
750
|
this.paperManager.setStateInvalid();
|
|
624
751
|
} else {
|
|
625
|
-
this.isOutOfThePool = false;
|
|
626
|
-
store.commit('preventSavingElementPosition');
|
|
627
752
|
this.paperManager.setStateValid();
|
|
753
|
+
|
|
754
|
+
if (this.invalidPool) {
|
|
755
|
+
this.invalidPool.model.component.shape.attr('body/fill', poolColor);
|
|
756
|
+
this.invalidPool = null;
|
|
757
|
+
}
|
|
758
|
+
if (currentPool && currentPool.model.get('id') !== pool.model.get('id')) {
|
|
759
|
+
this.newPool = pool;
|
|
760
|
+
this.oldPool = currentPool;
|
|
761
|
+
this.isOutOfThePool = false;
|
|
762
|
+
if (!this.isValidSelectionLinks){
|
|
763
|
+
this.isOutOfThePool = true;
|
|
764
|
+
this.invalidPool = pool;
|
|
765
|
+
pool.model.component.shape.attr('body/fill', invalidNodeColor);
|
|
766
|
+
store.commit('preventSavingElementPosition');
|
|
767
|
+
}
|
|
768
|
+
}
|
|
628
769
|
}
|
|
629
770
|
},
|
|
630
771
|
/**
|
|
@@ -632,12 +773,31 @@ export default {
|
|
|
632
773
|
*/
|
|
633
774
|
overPoolStopDrag(){
|
|
634
775
|
if (this.isNotPoolChilds(this.selected)) {
|
|
776
|
+
this.updateFlowsWaypoint();
|
|
777
|
+
this.$emit('save-state');
|
|
635
778
|
return;
|
|
636
779
|
}
|
|
637
780
|
if (this.isOutOfThePool) {
|
|
638
781
|
this.rollbackSelection();
|
|
782
|
+
if (this.invalidPool) {
|
|
783
|
+
this.invalidPool.model.component.shape.attr('body/fill', poolColor);
|
|
784
|
+
this.invalidPool = null;
|
|
785
|
+
}
|
|
639
786
|
} else {
|
|
640
|
-
this.
|
|
787
|
+
this.updateFlowsWaypoint();
|
|
788
|
+
if (this.newPool){
|
|
789
|
+
/* Remove the shape from its current pool */
|
|
790
|
+
this.moveElements(this.selected, this.oldPool, this.newPool);
|
|
791
|
+
this.newPool = null;
|
|
792
|
+
this.oldPool = null;
|
|
793
|
+
this.updateLaneChildren(this.selected);
|
|
794
|
+
this.$emit('save-state');
|
|
795
|
+
} else {
|
|
796
|
+
this.expandToFitElement(this.selected);
|
|
797
|
+
this.updateLaneChildren(this.selected);
|
|
798
|
+
this.$emit('save-state');
|
|
799
|
+
}
|
|
800
|
+
|
|
641
801
|
}
|
|
642
802
|
},
|
|
643
803
|
/**
|
|
@@ -734,10 +894,38 @@ export default {
|
|
|
734
894
|
node: pool.component.node,
|
|
735
895
|
bounds: pool.getBBox(),
|
|
736
896
|
});
|
|
737
|
-
this.$emit('save-state');
|
|
738
897
|
}
|
|
739
898
|
}
|
|
740
899
|
},
|
|
900
|
+
/**
|
|
901
|
+
* Updates the lane children when a element is moved into the pool
|
|
902
|
+
* @param {Array} selected
|
|
903
|
+
*/
|
|
904
|
+
updateLaneChildren(selected){
|
|
905
|
+
if (!selected) {
|
|
906
|
+
return;
|
|
907
|
+
}
|
|
908
|
+
const pool = selected.find(({ model }) => {
|
|
909
|
+
if (model.getParentCell()) {
|
|
910
|
+
return model.getParentCell().component.node.type === poolId;
|
|
911
|
+
}
|
|
912
|
+
return false;
|
|
913
|
+
});
|
|
914
|
+
if (pool){
|
|
915
|
+
pool.model.getParentCell();
|
|
916
|
+
pool.model.component.laneSet && pool.component.updateLaneChildren();
|
|
917
|
+
}
|
|
918
|
+
},
|
|
919
|
+
moveElements(selected, oldPool, newPool){
|
|
920
|
+
const shapesToMove= [
|
|
921
|
+
'PoolLane',
|
|
922
|
+
'standard.Link',
|
|
923
|
+
];
|
|
924
|
+
selected.filter(shape => !shapesToMove.includes(shape.model.get('type')))
|
|
925
|
+
.forEach(shape => {
|
|
926
|
+
oldPool.model.component.moveElement(shape.model, newPool.model);
|
|
927
|
+
});
|
|
928
|
+
},
|
|
741
929
|
},
|
|
742
930
|
};
|
|
743
931
|
</script>
|
|
@@ -174,8 +174,6 @@ export default {
|
|
|
174
174
|
this.shape.listenToOnce(this.paper, 'cell:pointerup blank:pointerup', () => {
|
|
175
175
|
this.moveBoundaryEventIfOverTask();
|
|
176
176
|
this.resetInvalidTarget();
|
|
177
|
-
this.$emit('save-state');
|
|
178
|
-
|
|
179
177
|
store.commit('allowSavingElementPosition');
|
|
180
178
|
});
|
|
181
179
|
},
|
|
@@ -216,9 +214,6 @@ export default {
|
|
|
216
214
|
const task = this.getTaskUnderShape();
|
|
217
215
|
this.attachBoundaryEventToTask(task);
|
|
218
216
|
this.updateShapePosition(task);
|
|
219
|
-
|
|
220
|
-
this.shape.on('change:position', this.turnInvalidTargetRed);
|
|
221
|
-
this.shape.listenTo(this.paper, 'element:pointerdown', this.attachToValidTarget);
|
|
222
217
|
},
|
|
223
218
|
};
|
|
224
219
|
</script>
|
|
@@ -15,6 +15,43 @@ export default {
|
|
|
15
15
|
icon: require('@/assets/toolpanel/end-event.svg'),
|
|
16
16
|
label: defaultNames[id],
|
|
17
17
|
rank: 30,
|
|
18
|
+
items: [
|
|
19
|
+
{
|
|
20
|
+
icon: require('@/assets/toolpanel/end-event.svg'),
|
|
21
|
+
label: defaultNames[id],
|
|
22
|
+
control: true,
|
|
23
|
+
rank: 31,
|
|
24
|
+
id: 'processmaker-modeler-end-event',
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
icon: require('@/assets/toolpanel/message-end-event.svg'),
|
|
28
|
+
label: defaultNames['processmaker-modeler-message-end-event'],
|
|
29
|
+
control: true,
|
|
30
|
+
rank: 32,
|
|
31
|
+
id: 'processmaker-modeler-message-end-event',
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
icon: require('@/assets/toolpanel/error-end-event.svg'),
|
|
35
|
+
label: defaultNames['processmaker-modeler-error-end-event'],
|
|
36
|
+
control: true,
|
|
37
|
+
rank: 33,
|
|
38
|
+
id: 'processmaker-modeler-error-end-event',
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
icon: require('@/assets/toolpanel/signal-end-event.svg'),
|
|
42
|
+
label: defaultNames['processmaker-modeler-signal-end-event'],
|
|
43
|
+
control: true,
|
|
44
|
+
rank: 34,
|
|
45
|
+
id: 'processmaker-modeler-signal-end-event',
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
icon: require('@/assets/toolpanel/terminate-end-event.svg'),
|
|
49
|
+
label: defaultNames['processmaker-modeler-terminate-end-event'],
|
|
50
|
+
control: true,
|
|
51
|
+
rank: 35,
|
|
52
|
+
id: 'processmaker-modeler-terminate-end-event',
|
|
53
|
+
},
|
|
54
|
+
],
|
|
18
55
|
definition(moddle, $t) {
|
|
19
56
|
return moddle.create('bpmn:EndEvent', {
|
|
20
57
|
name: $t(defaultNames[id]),
|
|
@@ -15,6 +15,36 @@ export default {
|
|
|
15
15
|
icon: require('@/assets/toolpanel/generic-gateway.svg'),
|
|
16
16
|
label: 'Gateway',
|
|
17
17
|
rank: 50,
|
|
18
|
+
items: [
|
|
19
|
+
{
|
|
20
|
+
icon: require('@/assets/toolpanel/exclusive-gateway.svg'),
|
|
21
|
+
label: 'Exclusive Gateway',
|
|
22
|
+
control: true,
|
|
23
|
+
rank: 51,
|
|
24
|
+
id: 'processmaker-modeler-exclusive-gateway',
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
icon: require('@/assets/toolpanel/inclusive-gateway.svg'),
|
|
28
|
+
label: 'Inclusive Gateway',
|
|
29
|
+
control: true,
|
|
30
|
+
rank: 52,
|
|
31
|
+
id: 'processmaker-modeler-inclusive-gateway',
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
icon: require('@/assets/toolpanel/parallel-gateway.svg'),
|
|
35
|
+
label: 'Parallel Gateway',
|
|
36
|
+
control: true,
|
|
37
|
+
rank: 53,
|
|
38
|
+
id: 'processmaker-modeler-parallel-gateway',
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
icon: require('@/assets/toolpanel/event-based-gateway.svg'),
|
|
42
|
+
label: 'Event Based Gateway',
|
|
43
|
+
control: true,
|
|
44
|
+
rank: 54,
|
|
45
|
+
id: 'processmaker-modeler-event-based-gateway',
|
|
46
|
+
},
|
|
47
|
+
],
|
|
18
48
|
definition(moddle, $t) {
|
|
19
49
|
return moddle.create('bpmn:ExclusiveGateway', {
|
|
20
50
|
name: $t(defaultNames[id]),
|
|
@@ -6,9 +6,10 @@ import DataAssociation from '@/components/nodes/genericFlow/DataAssociation';
|
|
|
6
6
|
|
|
7
7
|
export default class SequenceFlow extends Flow {
|
|
8
8
|
static isValid({ sourceShape, targetShape, targetConfig }) {
|
|
9
|
+
|
|
9
10
|
const targetNode = get(targetShape, 'component.node');
|
|
10
11
|
const sourceNode = get(sourceShape, 'component.node');
|
|
11
|
-
|
|
12
|
+
|
|
12
13
|
return Flow.hasTargetType(targetShape) &&
|
|
13
14
|
Flow.targetIsNotSource(sourceNode, targetNode) &&
|
|
14
15
|
SequenceFlow.targetIsNotALane(targetNode) &&
|
|
@@ -31,6 +31,7 @@ export { default as pool } from './pool';
|
|
|
31
31
|
export { default as poolLane } from './poolLane';
|
|
32
32
|
export { default as ValidationStatus } from '../validationStatus/ValidationStatus';
|
|
33
33
|
export { default as Modeler } from '../modeler/Modeler';
|
|
34
|
+
export { default as ModelerReadonly } from '../modeler/ModelerReadonly';
|
|
34
35
|
export { default as manualTask } from './manualTask';
|
|
35
36
|
export { default as boundaryTimerEvent } from './boundaryTimerEvent';
|
|
36
37
|
export { default as boundaryMessageEvent } from './boundaryMessageEvent';
|
|
@@ -17,6 +17,50 @@ export default {
|
|
|
17
17
|
icon: require('@/assets/toolpanel/generic-intermediate-event.svg'),
|
|
18
18
|
label: 'Intermediate Event',
|
|
19
19
|
rank: 20,
|
|
20
|
+
items: [
|
|
21
|
+
{
|
|
22
|
+
icon: require('@/assets/toolpanel/intermediate-timer-event.svg'),
|
|
23
|
+
label: 'Intermediate Timer Event',
|
|
24
|
+
control: true,
|
|
25
|
+
rank: 21,
|
|
26
|
+
id: 'processmaker-modeler-intermediate-catch-timer-event',
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
icon: require('@/assets/toolpanel/intermediate-signal-catch-event.svg'),
|
|
30
|
+
label: 'Intermediate Signal Catch Event',
|
|
31
|
+
control: true,
|
|
32
|
+
rank: 22,
|
|
33
|
+
id: 'processmaker-modeler-intermediate-signal-catch-event',
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
icon: require('@/assets/toolpanel/intermediate-signal-throw-event.svg'),
|
|
37
|
+
label: 'Intermediate Signal Throw Event',
|
|
38
|
+
control: true,
|
|
39
|
+
rank: 23,
|
|
40
|
+
id: 'processmaker-modeler-intermediate-signal-throw-event',
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
icon: require('@/assets/toolpanel/intermediate-message-catch-event.svg'),
|
|
44
|
+
label: 'Intermediate Message Catch Event',
|
|
45
|
+
control: true,
|
|
46
|
+
rank: 24,
|
|
47
|
+
id: 'processmaker-modeler-intermediate-message-catch-event',
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
icon: require('@/assets/toolpanel/intermediate-message-throw-event.svg'),
|
|
51
|
+
label: 'Intermediate Message Throw Event',
|
|
52
|
+
control: true,
|
|
53
|
+
rank: 25,
|
|
54
|
+
id: 'processmaker-modeler-intermediate-message-throw-event',
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
icon: require('@/assets/toolpanel/intermediate-conditional-catch-event.svg'),
|
|
58
|
+
label: 'Intermediate Conditional Catch Event',
|
|
59
|
+
control: true,
|
|
60
|
+
rank: 26,
|
|
61
|
+
id: 'processmaker-modeler-intermediate-conditional-catch-event',
|
|
62
|
+
},
|
|
63
|
+
],
|
|
20
64
|
definition(moddle, $t) {
|
|
21
65
|
return moddle.create('bpmn:IntermediateCatchEvent', {
|
|
22
66
|
name: $t(defaultNames[id]),
|
|
@@ -42,7 +42,6 @@ import highlightConfig from '@/mixins/highlightConfig';
|
|
|
42
42
|
import AddLaneAboveButton from '@/components/crown/crownButtons/addLaneAboveButton';
|
|
43
43
|
import AddLaneBelowButton from '@/components/crown/crownButtons/addLaneBelowButton';
|
|
44
44
|
import { configurePool, elementShouldHaveFlowNodeRef } from '@/components/nodes/pool/poolUtils';
|
|
45
|
-
import PoolEventHandlers from '@/components/nodes/pool/poolEventHandlers';
|
|
46
45
|
import Node from '@/components/nodes/node';
|
|
47
46
|
import { aPortEveryXPixels } from '@/portsUtils';
|
|
48
47
|
|
|
@@ -500,13 +499,6 @@ export default {
|
|
|
500
499
|
}
|
|
501
500
|
this.setPoolSize(this.shape);
|
|
502
501
|
this.$emit('set-shape-stacking', this.shape);
|
|
503
|
-
|
|
504
|
-
this.$nextTick(() => {
|
|
505
|
-
const handler = new PoolEventHandlers(this.graph, this.paper, this.paperManager, this.shape, this);
|
|
506
|
-
this.shape.listenTo(this.graph, 'change:position', (element, newPosition) => handler.onChangePosition(element, newPosition));
|
|
507
|
-
this.shape.listenTo(this.paper, 'cell:pointerdown', (cellView) => handler.onPointerDown(cellView));
|
|
508
|
-
this.shape.listenTo(this.paper, 'cell:pointerup', (cellView) => handler.onPointerUp(cellView));
|
|
509
|
-
});
|
|
510
502
|
},
|
|
511
503
|
beforeDestroy() {
|
|
512
504
|
const participants = this.collaboration.get('participants');
|
|
@@ -13,6 +13,49 @@ export default merge(cloneDeep(baseStartEventConfig), {
|
|
|
13
13
|
icon: require('@/assets/toolpanel/start-event.svg'),
|
|
14
14
|
label: defaultNames[id],
|
|
15
15
|
rank: 10,
|
|
16
|
+
items: [
|
|
17
|
+
{
|
|
18
|
+
icon: require('@/assets/toolpanel/start-event.svg'),
|
|
19
|
+
label: defaultNames[id],
|
|
20
|
+
control: true,
|
|
21
|
+
bpmnType: 'bpmn:StartEvent',
|
|
22
|
+
rank: 10,
|
|
23
|
+
id: 'processmaker-modeler-start-event',
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
icon: require('@/assets/toolpanel/message-start-event.svg'),
|
|
27
|
+
label: defaultNames['processmaker-modeler-message-start-event'],
|
|
28
|
+
control: true,
|
|
29
|
+
bpmnType: 'bpmn:StartEvent',
|
|
30
|
+
rank: 11,
|
|
31
|
+
id: 'processmaker-modeler-message-start-event',
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
icon: require('@/assets/toolpanel/conditional-start-event.svg'),
|
|
35
|
+
label: defaultNames['processmaker-modeler-conditional-start-event'],
|
|
36
|
+
control: true,
|
|
37
|
+
bpmnType: 'bpmn:StartEvent',
|
|
38
|
+
rank: 12,
|
|
39
|
+
id: 'processmaker-modeler-conditional-start-event',
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
icon: require('@/assets/toolpanel/signal-start-event.svg'),
|
|
43
|
+
label: defaultNames['processmaker-modeler-signal-start-event'],
|
|
44
|
+
control: true,
|
|
45
|
+
bpmnType: 'bpmn:StartEvent',
|
|
46
|
+
rank: 13,
|
|
47
|
+
id: 'processmaker-modeler-signal-start-event',
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
icon: require('@/assets/toolpanel/timer-start-event.svg'),
|
|
51
|
+
label: defaultNames['processmaker-modeler-start-timer-event'],
|
|
52
|
+
control: true,
|
|
53
|
+
bpmnType: 'bpmn:StartEvent',
|
|
54
|
+
rank: 14,
|
|
55
|
+
id: 'processmaker-modeler-start-timer-event',
|
|
56
|
+
|
|
57
|
+
},
|
|
58
|
+
],
|
|
16
59
|
definition(moddle, $t) {
|
|
17
60
|
return moddle.create('bpmn:StartEvent', {
|
|
18
61
|
name: $t(defaultNames[id]),
|
|
@@ -19,6 +19,36 @@ export default {
|
|
|
19
19
|
rank: 40,
|
|
20
20
|
icon: require('@/assets/toolpanel/task.svg'),
|
|
21
21
|
label: 'Task',
|
|
22
|
+
items: [
|
|
23
|
+
{
|
|
24
|
+
icon: require('@/assets/toolpanel/task.svg'),
|
|
25
|
+
label: 'Form Task',
|
|
26
|
+
control: true,
|
|
27
|
+
rank: 41,
|
|
28
|
+
id: 'processmaker-modeler-task',
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
icon: require('@/assets/toolpanel/manual-task.svg'),
|
|
32
|
+
label: 'Manual Task',
|
|
33
|
+
control: true,
|
|
34
|
+
rank: 42,
|
|
35
|
+
id: 'processmaker-modeler-manual-task',
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
icon: require('@/assets/toolpanel/script-task.svg'),
|
|
39
|
+
label: 'Script Task',
|
|
40
|
+
control: true,
|
|
41
|
+
rank: 43,
|
|
42
|
+
id: 'processmaker-modeler-script-task',
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
icon: require('@/assets/toolpanel/sub-task.svg'),
|
|
46
|
+
label: 'Sub Process',
|
|
47
|
+
control: true,
|
|
48
|
+
rank: 44,
|
|
49
|
+
id: 'processmaker-modeler-call-activity',
|
|
50
|
+
},
|
|
51
|
+
],
|
|
22
52
|
definition(moddle, $t) {
|
|
23
53
|
return moddle.create('bpmn:Task', {
|
|
24
54
|
name: $t(defaultNames[id]),
|