@processmaker/modeler 1.36.9 → 1.37.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/modeler.common.js +315 -291
- package/dist/modeler.common.js.map +1 -1
- package/dist/modeler.umd.js +315 -291
- package/dist/modeler.umd.js.map +1 -1
- package/dist/modeler.umd.min.js +1 -1
- package/dist/modeler.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/src/components/modeler/Modeler.vue +11 -4
- package/src/components/nodes/boundaryTimerEvent/index.js +3 -0
- package/src/setup/registerPmBlock.js +9 -0
package/dist/modeler.common.js
CHANGED
|
@@ -42310,10 +42310,10 @@ var ValidationStatus_component = normalizeComponent(
|
|
|
42310
42310
|
)
|
|
42311
42311
|
|
|
42312
42312
|
/* harmony default export */ var ValidationStatus = (ValidationStatus_component.exports);
|
|
42313
|
-
;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/modeler/Modeler.vue?vue&type=template&id=
|
|
42313
|
+
;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/modeler/Modeler.vue?vue&type=template&id=84267fa8&
|
|
42314
42314
|
|
|
42315
42315
|
|
|
42316
|
-
var
|
|
42316
|
+
var Modelervue_type_template_id_84267fa8_render = function render() {
|
|
42317
42317
|
var _vm = this,
|
|
42318
42318
|
_c = _vm._self._c;
|
|
42319
42319
|
return _c('span', {
|
|
@@ -42505,9 +42505,9 @@ var Modelervue_type_template_id_7233010b_render = function render() {
|
|
|
42505
42505
|
}
|
|
42506
42506
|
}) : _vm._e()], 2)], 1);
|
|
42507
42507
|
};
|
|
42508
|
-
var
|
|
42508
|
+
var Modelervue_type_template_id_84267fa8_staticRenderFns = [];
|
|
42509
42509
|
|
|
42510
|
-
;// CONCATENATED MODULE: ./src/components/modeler/Modeler.vue?vue&type=template&id=
|
|
42510
|
+
;// CONCATENATED MODULE: ./src/components/modeler/Modeler.vue?vue&type=template&id=84267fa8&
|
|
42511
42511
|
|
|
42512
42512
|
;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/nodes/boundaryEvent/boundaryEvent.vue?vue&type=template&id=2979ecac&
|
|
42513
42513
|
var boundaryEventvue_type_template_id_2979ecac_render = function render() {
|
|
@@ -45315,6 +45315,7 @@ var boundaryTimerEvent_id = 'processmaker-modeler-boundary-timer-event';
|
|
|
45315
45315
|
body: body
|
|
45316
45316
|
}));
|
|
45317
45317
|
var eventDefinitions = [moddle.create('bpmn:TimerEventDefinition', eventDefinition)];
|
|
45318
|
+
eventDefinitions[0].id = node.definition.get('eventDefinitions')[0].id;
|
|
45318
45319
|
setNodeProp(node, 'eventDefinitions', eventDefinitions);
|
|
45319
45320
|
} else {
|
|
45320
45321
|
setNodeProp(node, key, value[key]);
|
|
@@ -51283,6 +51284,13 @@ var Selection_component = normalizeComponent(
|
|
|
51283
51284
|
this.pmBlockNodes.push(pmBlockNode);
|
|
51284
51285
|
var types = Array.isArray(pmBlockNode.bpmnType) ? pmBlockNode.bpmnType : [pmBlockNode.bpmnType];
|
|
51285
51286
|
types.forEach(function (bpmnType) {
|
|
51287
|
+
if (!_this12.parsers[bpmnType]) {
|
|
51288
|
+
_this12.parsers[bpmnType] = {
|
|
51289
|
+
custom: [],
|
|
51290
|
+
implementation: [],
|
|
51291
|
+
default: []
|
|
51292
|
+
};
|
|
51293
|
+
}
|
|
51286
51294
|
if (customParser) {
|
|
51287
51295
|
_this12.parsers[bpmnType].custom.push(customParser);
|
|
51288
51296
|
return;
|
|
@@ -51461,14 +51469,30 @@ var Selection_component = normalizeComponent(
|
|
|
51461
51469
|
return;
|
|
51462
51470
|
}
|
|
51463
51471
|
this.removeUnsupportedElementAttributes(definition);
|
|
51464
|
-
var
|
|
51472
|
+
var config = definition.config ? JSON.parse(definition.config) : {};
|
|
51473
|
+
var type = (config === null || config === void 0 ? void 0 : config.processKey) || parser(definition, this.moddle);
|
|
51465
51474
|
var unnamedElements = ['bpmn:TextAnnotation', 'bpmn:Association', 'bpmn:DataOutputAssociation', 'bpmn:DataInputAssociation'];
|
|
51466
51475
|
var requireName = unnamedElements.indexOf(bpmnType) === -1;
|
|
51467
51476
|
if (requireName && !definition.get('name')) {
|
|
51468
51477
|
definition.set('name', '');
|
|
51469
51478
|
}
|
|
51470
|
-
|
|
51471
|
-
|
|
51479
|
+
this.createNodeAsync(type, definition, diagram);
|
|
51480
|
+
},
|
|
51481
|
+
createNodeAsync: function createNodeAsync(type, definition, diagram) {
|
|
51482
|
+
var _this21 = this;
|
|
51483
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8() {
|
|
51484
|
+
var node;
|
|
51485
|
+
return _regeneratorRuntime().wrap(function _callee8$(_context8) {
|
|
51486
|
+
while (1) switch (_context8.prev = _context8.next) {
|
|
51487
|
+
case 0:
|
|
51488
|
+
node = _this21.createNode(type, definition, diagram);
|
|
51489
|
+
store.commit('addNode', node);
|
|
51490
|
+
case 2:
|
|
51491
|
+
case "end":
|
|
51492
|
+
return _context8.stop();
|
|
51493
|
+
}
|
|
51494
|
+
}, _callee8);
|
|
51495
|
+
}))();
|
|
51472
51496
|
},
|
|
51473
51497
|
createNode: function createNode(type, definition, diagram) {
|
|
51474
51498
|
if (Node.isTimerType(type)) {
|
|
@@ -51488,95 +51512,95 @@ var Selection_component = normalizeComponent(
|
|
|
51488
51512
|
return hasSource && hasTarget;
|
|
51489
51513
|
},
|
|
51490
51514
|
waitForCursorToChange: function waitForCursorToChange() {
|
|
51491
|
-
var
|
|
51492
|
-
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
51515
|
+
var _this22 = this;
|
|
51516
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9() {
|
|
51493
51517
|
var cursorWaitTime;
|
|
51494
|
-
return _regeneratorRuntime().wrap(function
|
|
51495
|
-
while (1) switch (
|
|
51518
|
+
return _regeneratorRuntime().wrap(function _callee9$(_context9) {
|
|
51519
|
+
while (1) switch (_context9.prev = _context9.next) {
|
|
51496
51520
|
case 0:
|
|
51497
51521
|
cursorWaitTime = 300;
|
|
51498
|
-
|
|
51499
|
-
return
|
|
51522
|
+
_context9.next = 3;
|
|
51523
|
+
return _this22.$nextTick();
|
|
51500
51524
|
case 3:
|
|
51501
|
-
return
|
|
51525
|
+
return _context9.abrupt("return", new Promise(function (resolve) {
|
|
51502
51526
|
return setTimeout(resolve, cursorWaitTime);
|
|
51503
51527
|
}));
|
|
51504
51528
|
case 4:
|
|
51505
51529
|
case "end":
|
|
51506
|
-
return
|
|
51530
|
+
return _context9.stop();
|
|
51507
51531
|
}
|
|
51508
|
-
},
|
|
51532
|
+
}, _callee9);
|
|
51509
51533
|
}))();
|
|
51510
51534
|
},
|
|
51511
51535
|
renderPaper: function renderPaper() {
|
|
51512
|
-
var
|
|
51513
|
-
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
51514
|
-
return _regeneratorRuntime().wrap(function
|
|
51515
|
-
while (1) switch (
|
|
51536
|
+
var _this23 = this;
|
|
51537
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11() {
|
|
51538
|
+
return _regeneratorRuntime().wrap(function _callee11$(_context11) {
|
|
51539
|
+
while (1) switch (_context11.prev = _context11.next) {
|
|
51516
51540
|
case 0:
|
|
51517
|
-
|
|
51518
|
-
|
|
51519
|
-
return
|
|
51520
|
-
return _regeneratorRuntime().wrap(function
|
|
51521
|
-
while (1) switch (
|
|
51541
|
+
_this23.isRendering = true;
|
|
51542
|
+
_context11.next = 3;
|
|
51543
|
+
return _this23.paperManager.performAtomicAction( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10() {
|
|
51544
|
+
return _regeneratorRuntime().wrap(function _callee10$(_context10) {
|
|
51545
|
+
while (1) switch (_context10.prev = _context10.next) {
|
|
51522
51546
|
case 0:
|
|
51523
|
-
|
|
51524
|
-
return
|
|
51547
|
+
_context10.next = 2;
|
|
51548
|
+
return _this23.waitForCursorToChange();
|
|
51525
51549
|
case 2:
|
|
51526
|
-
|
|
51527
|
-
|
|
51528
|
-
|
|
51550
|
+
_this23.parse();
|
|
51551
|
+
_this23.addPools();
|
|
51552
|
+
_this23.setUpDiagram();
|
|
51529
51553
|
case 5:
|
|
51530
51554
|
case "end":
|
|
51531
|
-
return
|
|
51555
|
+
return _context10.stop();
|
|
51532
51556
|
}
|
|
51533
|
-
},
|
|
51557
|
+
}, _callee10);
|
|
51534
51558
|
})));
|
|
51535
51559
|
case 3:
|
|
51536
|
-
|
|
51537
|
-
return
|
|
51560
|
+
_context11.next = 5;
|
|
51561
|
+
return _this23.paperManager.awaitScheduledUpdates();
|
|
51538
51562
|
case 5:
|
|
51539
|
-
|
|
51540
|
-
|
|
51563
|
+
_this23.isRendering = false;
|
|
51564
|
+
_this23.$emit('parsed');
|
|
51541
51565
|
case 7:
|
|
51542
51566
|
case "end":
|
|
51543
|
-
return
|
|
51567
|
+
return _context11.stop();
|
|
51544
51568
|
}
|
|
51545
|
-
},
|
|
51569
|
+
}, _callee11);
|
|
51546
51570
|
}))();
|
|
51547
51571
|
},
|
|
51548
51572
|
loadXML: function loadXML() {
|
|
51549
51573
|
var _arguments2 = arguments,
|
|
51550
|
-
|
|
51551
|
-
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
51574
|
+
_this24 = this;
|
|
51575
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12() {
|
|
51552
51576
|
var xml, emitChangeEvent;
|
|
51553
|
-
return _regeneratorRuntime().wrap(function
|
|
51554
|
-
while (1) switch (
|
|
51577
|
+
return _regeneratorRuntime().wrap(function _callee12$(_context12) {
|
|
51578
|
+
while (1) switch (_context12.prev = _context12.next) {
|
|
51555
51579
|
case 0:
|
|
51556
51580
|
xml = _arguments2.length > 0 && _arguments2[0] !== undefined ? _arguments2[0] : null;
|
|
51557
51581
|
emitChangeEvent = false;
|
|
51558
51582
|
if (xml === null) {
|
|
51559
|
-
xml =
|
|
51583
|
+
xml = _this24.currentXML;
|
|
51560
51584
|
emitChangeEvent = true;
|
|
51561
51585
|
}
|
|
51562
|
-
|
|
51563
|
-
return
|
|
51586
|
+
_context12.next = 5;
|
|
51587
|
+
return _this24.xmlManager.getDefinitionsFromXml(xml);
|
|
51564
51588
|
case 5:
|
|
51565
|
-
|
|
51566
|
-
|
|
51567
|
-
|
|
51589
|
+
_this24.definitions = _context12.sent;
|
|
51590
|
+
_this24.xmlManager.definitions = _this24.definitions;
|
|
51591
|
+
_this24.nodeIdGenerator = getNodeIdGenerator(_this24.definitions);
|
|
51568
51592
|
store.commit('clearNodes');
|
|
51569
|
-
|
|
51570
|
-
return
|
|
51593
|
+
_context12.next = 11;
|
|
51594
|
+
return _this24.renderPaper();
|
|
51571
51595
|
case 11:
|
|
51572
51596
|
if (emitChangeEvent) {
|
|
51573
51597
|
window.ProcessMaker.EventBus.$emit('modeler-change');
|
|
51574
51598
|
}
|
|
51575
51599
|
case 12:
|
|
51576
51600
|
case "end":
|
|
51577
|
-
return
|
|
51601
|
+
return _context12.stop();
|
|
51578
51602
|
}
|
|
51579
|
-
},
|
|
51603
|
+
}, _callee12);
|
|
51580
51604
|
}))();
|
|
51581
51605
|
},
|
|
51582
51606
|
getBoundaryEvents: function getBoundaryEvents(process) {
|
|
@@ -51600,13 +51624,13 @@ var Selection_component = normalizeComponent(
|
|
|
51600
51624
|
return boundaryEvent;
|
|
51601
51625
|
},
|
|
51602
51626
|
ensureCancelActivityIsAddedToBoundaryEvents: function ensureCancelActivityIsAddedToBoundaryEvents(process) {
|
|
51603
|
-
var
|
|
51627
|
+
var _this25 = this;
|
|
51604
51628
|
this.getBoundaryEvents(process).forEach(function (definition) {
|
|
51605
|
-
var boundaryEvent =
|
|
51629
|
+
var boundaryEvent = _this25.createBoundaryEvent(definition);
|
|
51606
51630
|
definition.get('outgoing').forEach(function (outgoing) {
|
|
51607
51631
|
return outgoing.set('sourceRef', boundaryEvent);
|
|
51608
51632
|
});
|
|
51609
|
-
|
|
51633
|
+
_this25.replaceDefinition(definition, boundaryEvent, process);
|
|
51610
51634
|
});
|
|
51611
51635
|
},
|
|
51612
51636
|
replaceDefinition: function replaceDefinition(definition, boundaryEvent, process) {
|
|
@@ -51632,51 +51656,51 @@ var Selection_component = normalizeComponent(
|
|
|
51632
51656
|
});
|
|
51633
51657
|
},
|
|
51634
51658
|
handleDrop: function handleDrop(_ref6) {
|
|
51635
|
-
var
|
|
51636
|
-
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
51637
|
-
var clientX, clientY, control, nodeThatWillBeReplaced, definition, diagram,
|
|
51638
|
-
return _regeneratorRuntime().wrap(function
|
|
51639
|
-
while (1) switch (
|
|
51659
|
+
var _this26 = this;
|
|
51660
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee13() {
|
|
51661
|
+
var clientX, clientY, control, nodeThatWillBeReplaced, definition, diagram, _this26$paperManager$, x, y, newNode, nodeMigrator;
|
|
51662
|
+
return _regeneratorRuntime().wrap(function _callee13$(_context13) {
|
|
51663
|
+
while (1) switch (_context13.prev = _context13.next) {
|
|
51640
51664
|
case 0:
|
|
51641
51665
|
clientX = _ref6.clientX, clientY = _ref6.clientY, control = _ref6.control, nodeThatWillBeReplaced = _ref6.nodeThatWillBeReplaced;
|
|
51642
|
-
|
|
51666
|
+
_this26.validateDropTarget({
|
|
51643
51667
|
clientX: clientX,
|
|
51644
51668
|
clientY: clientY,
|
|
51645
51669
|
control: control
|
|
51646
51670
|
});
|
|
51647
|
-
if (
|
|
51648
|
-
|
|
51671
|
+
if (_this26.allowDrop) {
|
|
51672
|
+
_context13.next = 4;
|
|
51649
51673
|
break;
|
|
51650
51674
|
}
|
|
51651
|
-
return
|
|
51675
|
+
return _context13.abrupt("return");
|
|
51652
51676
|
case 4:
|
|
51653
|
-
definition =
|
|
51654
|
-
diagram =
|
|
51655
|
-
|
|
51677
|
+
definition = _this26.nodeRegistry[control.type].definition(_this26.moddle, _this26.$t);
|
|
51678
|
+
diagram = _this26.nodeRegistry[control.type].diagram(_this26.moddle);
|
|
51679
|
+
_this26$paperManager$ = _this26.paperManager.clientToGridPoint(clientX, clientY), x = _this26$paperManager$.x, y = _this26$paperManager$.y;
|
|
51656
51680
|
diagram.bounds.x = x;
|
|
51657
51681
|
diagram.bounds.y = y;
|
|
51658
|
-
newNode =
|
|
51682
|
+
newNode = _this26.createNode(control.type, definition, diagram);
|
|
51659
51683
|
if (newNode.isBpmnType('bpmn:BoundaryEvent')) {
|
|
51660
|
-
|
|
51684
|
+
_this26.setShapeCenterUnderCursor(diagram);
|
|
51661
51685
|
}
|
|
51662
|
-
|
|
51663
|
-
|
|
51664
|
-
return
|
|
51686
|
+
_this26.highlightNode(newNode);
|
|
51687
|
+
_context13.next = 14;
|
|
51688
|
+
return _this26.addNode(newNode);
|
|
51665
51689
|
case 14:
|
|
51666
51690
|
if (nodeThatWillBeReplaced) {
|
|
51667
|
-
|
|
51691
|
+
_context13.next = 16;
|
|
51668
51692
|
break;
|
|
51669
51693
|
}
|
|
51670
|
-
return
|
|
51694
|
+
return _context13.abrupt("return");
|
|
51671
51695
|
case 16:
|
|
51672
|
-
nodeMigrator = new NodeMigrator(nodeThatWillBeReplaced, definition,
|
|
51696
|
+
nodeMigrator = new NodeMigrator(nodeThatWillBeReplaced, definition, _this26.graph, newNode, _this26.processes, _this26.collaboration);
|
|
51673
51697
|
nodeMigrator.migrate();
|
|
51674
|
-
return
|
|
51698
|
+
return _context13.abrupt("return", newNode);
|
|
51675
51699
|
case 19:
|
|
51676
51700
|
case "end":
|
|
51677
|
-
return
|
|
51701
|
+
return _context13.stop();
|
|
51678
51702
|
}
|
|
51679
|
-
},
|
|
51703
|
+
}, _callee13);
|
|
51680
51704
|
}))();
|
|
51681
51705
|
},
|
|
51682
51706
|
setShapeCenterUnderCursor: function setShapeCenterUnderCursor(diagram) {
|
|
@@ -51684,204 +51708,204 @@ var Selection_component = normalizeComponent(
|
|
|
51684
51708
|
diagram.bounds.y -= diagram.bounds.height / 2;
|
|
51685
51709
|
},
|
|
51686
51710
|
selectNewNode: function selectNewNode(node) {
|
|
51687
|
-
var
|
|
51688
|
-
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
51711
|
+
var _this27 = this;
|
|
51712
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee14() {
|
|
51689
51713
|
var newNodeComponent, view;
|
|
51690
|
-
return _regeneratorRuntime().wrap(function
|
|
51691
|
-
while (1) switch (
|
|
51714
|
+
return _regeneratorRuntime().wrap(function _callee14$(_context14) {
|
|
51715
|
+
while (1) switch (_context14.prev = _context14.next) {
|
|
51692
51716
|
case 0:
|
|
51693
|
-
|
|
51694
|
-
return
|
|
51717
|
+
_context14.next = 2;
|
|
51718
|
+
return _this27.$nextTick();
|
|
51695
51719
|
case 2:
|
|
51696
|
-
|
|
51697
|
-
return
|
|
51720
|
+
_context14.next = 4;
|
|
51721
|
+
return _this27.paperManager.awaitScheduledUpdates();
|
|
51698
51722
|
case 4:
|
|
51699
|
-
newNodeComponent =
|
|
51723
|
+
newNodeComponent = _this27.$refs.nodeComponent.find(function (component) {
|
|
51700
51724
|
return component.node === node;
|
|
51701
51725
|
});
|
|
51702
51726
|
view = newNodeComponent.shapeView;
|
|
51703
|
-
|
|
51704
|
-
return
|
|
51727
|
+
_context14.next = 8;
|
|
51728
|
+
return _this27.$refs.selector.selectElement(view);
|
|
51705
51729
|
case 8:
|
|
51706
51730
|
case "end":
|
|
51707
|
-
return
|
|
51731
|
+
return _context14.stop();
|
|
51708
51732
|
}
|
|
51709
|
-
},
|
|
51733
|
+
}, _callee14);
|
|
51710
51734
|
}))();
|
|
51711
51735
|
},
|
|
51712
51736
|
addNode: function addNode(node) {
|
|
51713
|
-
var
|
|
51714
|
-
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
51737
|
+
var _this28 = this;
|
|
51738
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee15() {
|
|
51715
51739
|
var targetProcess;
|
|
51716
|
-
return _regeneratorRuntime().wrap(function
|
|
51717
|
-
while (1) switch (
|
|
51740
|
+
return _regeneratorRuntime().wrap(function _callee15$(_context15) {
|
|
51741
|
+
while (1) switch (_context15.prev = _context15.next) {
|
|
51718
51742
|
case 0:
|
|
51719
51743
|
if (!node.pool) {
|
|
51720
|
-
node.pool =
|
|
51744
|
+
node.pool = _this28.poolTarget;
|
|
51721
51745
|
}
|
|
51722
|
-
targetProcess = node.getTargetProcess(
|
|
51746
|
+
targetProcess = node.getTargetProcess(_this28.processes, _this28.processNode);
|
|
51723
51747
|
addNodeToProcess(node, targetProcess);
|
|
51724
|
-
node.setIds(
|
|
51725
|
-
|
|
51748
|
+
node.setIds(_this28.nodeIdGenerator);
|
|
51749
|
+
_this28.planeElements.push(node.diagram);
|
|
51726
51750
|
store.commit('addNode', node);
|
|
51727
|
-
|
|
51751
|
+
_this28.poolTarget = null;
|
|
51728
51752
|
|
|
51729
51753
|
// add processmaker-modeler-generic-flow
|
|
51730
51754
|
if (![sequenceFlow_id, poolLane_config_id, association_id, messageFlow_config_id, id, config_id, genericFlow_config_id].includes(node.type)) {
|
|
51731
|
-
|
|
51755
|
+
_context15.next = 9;
|
|
51732
51756
|
break;
|
|
51733
51757
|
}
|
|
51734
|
-
return
|
|
51758
|
+
return _context15.abrupt("return");
|
|
51735
51759
|
case 9:
|
|
51736
51760
|
// Select the node after it has been added to the store (does not apply to flows)
|
|
51737
|
-
|
|
51738
|
-
return
|
|
51761
|
+
_this28.selectNewNode(node);
|
|
51762
|
+
return _context15.abrupt("return", new Promise(function (resolve) {
|
|
51739
51763
|
setTimeout(function () {
|
|
51740
|
-
|
|
51764
|
+
_this28.pushToUndoStack();
|
|
51741
51765
|
resolve();
|
|
51742
51766
|
});
|
|
51743
51767
|
}));
|
|
51744
51768
|
case 11:
|
|
51745
51769
|
case "end":
|
|
51746
|
-
return
|
|
51770
|
+
return _context15.stop();
|
|
51747
51771
|
}
|
|
51748
|
-
},
|
|
51772
|
+
}, _callee15);
|
|
51749
51773
|
}))();
|
|
51750
51774
|
},
|
|
51751
51775
|
addClonedNodes: function addClonedNodes(nodes) {
|
|
51752
|
-
var
|
|
51753
|
-
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
51754
|
-
return _regeneratorRuntime().wrap(function
|
|
51755
|
-
while (1) switch (
|
|
51776
|
+
var _this29 = this;
|
|
51777
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee16() {
|
|
51778
|
+
return _regeneratorRuntime().wrap(function _callee16$(_context16) {
|
|
51779
|
+
while (1) switch (_context16.prev = _context16.next) {
|
|
51756
51780
|
case 0:
|
|
51757
51781
|
nodes.forEach(function (node) {
|
|
51758
51782
|
if (!node.pool) {
|
|
51759
|
-
node.pool =
|
|
51783
|
+
node.pool = _this29.poolTarget;
|
|
51760
51784
|
}
|
|
51761
|
-
var targetProcess = node.getTargetProcess(
|
|
51785
|
+
var targetProcess = node.getTargetProcess(_this29.processes, _this29.processNode);
|
|
51762
51786
|
addNodeToProcess(node, targetProcess);
|
|
51763
|
-
|
|
51787
|
+
_this29.planeElements.push(node.diagram);
|
|
51764
51788
|
store.commit('addNode', node);
|
|
51765
|
-
|
|
51789
|
+
_this29.poolTarget = null;
|
|
51766
51790
|
});
|
|
51767
51791
|
case 1:
|
|
51768
51792
|
case "end":
|
|
51769
|
-
return
|
|
51793
|
+
return _context16.stop();
|
|
51770
51794
|
}
|
|
51771
|
-
},
|
|
51795
|
+
}, _callee16);
|
|
51772
51796
|
}))();
|
|
51773
51797
|
},
|
|
51774
51798
|
removeNode: function removeNode(node) {
|
|
51775
51799
|
var _arguments3 = arguments,
|
|
51776
|
-
|
|
51777
|
-
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
51800
|
+
_this30 = this;
|
|
51801
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee17() {
|
|
51778
51802
|
var _ref7, _ref7$removeRelations, removeRelationships;
|
|
51779
|
-
return _regeneratorRuntime().wrap(function
|
|
51780
|
-
while (1) switch (
|
|
51803
|
+
return _regeneratorRuntime().wrap(function _callee17$(_context17) {
|
|
51804
|
+
while (1) switch (_context17.prev = _context17.next) {
|
|
51781
51805
|
case 0:
|
|
51782
51806
|
_ref7 = _arguments3.length > 1 && _arguments3[1] !== undefined ? _arguments3[1] : {}, _ref7$removeRelations = _ref7.removeRelationships, removeRelationships = _ref7$removeRelations === void 0 ? true : _ref7$removeRelations;
|
|
51783
51807
|
if (node) {
|
|
51784
|
-
|
|
51808
|
+
_context17.next = 3;
|
|
51785
51809
|
break;
|
|
51786
51810
|
}
|
|
51787
|
-
return
|
|
51811
|
+
return _context17.abrupt("return");
|
|
51788
51812
|
case 3:
|
|
51789
51813
|
if (removeRelationships) {
|
|
51790
|
-
removeNodeFlows(node,
|
|
51791
|
-
removeNodeMessageFlows(node,
|
|
51792
|
-
removeNodeAssociations(node,
|
|
51814
|
+
removeNodeFlows(node, _this30);
|
|
51815
|
+
removeNodeMessageFlows(node, _this30);
|
|
51816
|
+
removeNodeAssociations(node, _this30);
|
|
51793
51817
|
}
|
|
51794
51818
|
removeOutgoingAndIncomingRefsToFlow(node);
|
|
51795
|
-
removeBoundaryEvents(
|
|
51819
|
+
removeBoundaryEvents(_this30.graph, node, _this30.removeNode);
|
|
51796
51820
|
removeSourceDefault(node);
|
|
51797
|
-
|
|
51798
|
-
|
|
51821
|
+
_this30.removeNodesFromLane(node);
|
|
51822
|
+
_this30.removeNodesFromPool(node);
|
|
51799
51823
|
store.commit('removeNode', node);
|
|
51800
|
-
store.commit('highlightNode',
|
|
51801
|
-
|
|
51802
|
-
|
|
51803
|
-
return
|
|
51824
|
+
store.commit('highlightNode', _this30.processNode);
|
|
51825
|
+
_this30.$refs.selector.clearSelection();
|
|
51826
|
+
_context17.next = 14;
|
|
51827
|
+
return _this30.$nextTick();
|
|
51804
51828
|
case 14:
|
|
51805
|
-
|
|
51806
|
-
return
|
|
51829
|
+
_context17.next = 16;
|
|
51830
|
+
return _this30.pushToUndoStack();
|
|
51807
51831
|
case 16:
|
|
51808
51832
|
// force to update the processNode property in every delete
|
|
51809
|
-
|
|
51810
|
-
if (
|
|
51811
|
-
|
|
51812
|
-
return diagram.bpmnElement.id ===
|
|
51833
|
+
_this30.processes = _this30.getProcesses();
|
|
51834
|
+
if (_this30.processes && _this30.processes.length > 0) {
|
|
51835
|
+
_this30.processNode = new Node('processmaker-modeler-process', _this30.processes[0], _this30.planeElements.find(function (diagram) {
|
|
51836
|
+
return diagram.bpmnElement.id === _this30.processes[0].id;
|
|
51813
51837
|
}));
|
|
51814
51838
|
}
|
|
51815
51839
|
case 18:
|
|
51816
51840
|
case "end":
|
|
51817
|
-
return
|
|
51841
|
+
return _context17.stop();
|
|
51818
51842
|
}
|
|
51819
|
-
},
|
|
51843
|
+
}, _callee17);
|
|
51820
51844
|
}))();
|
|
51821
51845
|
},
|
|
51822
51846
|
removeNodes: function removeNodes() {
|
|
51823
|
-
var
|
|
51824
|
-
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
51825
|
-
return _regeneratorRuntime().wrap(function
|
|
51826
|
-
while (1) switch (
|
|
51847
|
+
var _this31 = this;
|
|
51848
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee20() {
|
|
51849
|
+
return _regeneratorRuntime().wrap(function _callee20$(_context20) {
|
|
51850
|
+
while (1) switch (_context20.prev = _context20.next) {
|
|
51827
51851
|
case 0:
|
|
51828
|
-
|
|
51829
|
-
return
|
|
51830
|
-
return _regeneratorRuntime().wrap(function
|
|
51831
|
-
while (1) switch (
|
|
51852
|
+
_context20.next = 2;
|
|
51853
|
+
return _this31.performSingleUndoRedoTransaction( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee19() {
|
|
51854
|
+
return _regeneratorRuntime().wrap(function _callee19$(_context19) {
|
|
51855
|
+
while (1) switch (_context19.prev = _context19.next) {
|
|
51832
51856
|
case 0:
|
|
51833
|
-
|
|
51834
|
-
return
|
|
51857
|
+
_context19.next = 2;
|
|
51858
|
+
return _this31.paperManager.performAtomicAction( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee18() {
|
|
51835
51859
|
var waitPromises;
|
|
51836
|
-
return _regeneratorRuntime().wrap(function
|
|
51837
|
-
while (1) switch (
|
|
51860
|
+
return _regeneratorRuntime().wrap(function _callee18$(_context18) {
|
|
51861
|
+
while (1) switch (_context18.prev = _context18.next) {
|
|
51838
51862
|
case 0:
|
|
51839
51863
|
waitPromises = [];
|
|
51840
|
-
|
|
51841
|
-
return waitPromises.push(
|
|
51864
|
+
_this31.highlightedNodes.forEach(function (node) {
|
|
51865
|
+
return waitPromises.push(_this31.removeNode(node, {
|
|
51842
51866
|
removeRelationships: true
|
|
51843
51867
|
}));
|
|
51844
51868
|
});
|
|
51845
|
-
|
|
51869
|
+
_context18.next = 4;
|
|
51846
51870
|
return Promise.all(waitPromises);
|
|
51847
51871
|
case 4:
|
|
51848
51872
|
store.commit('highlightNode');
|
|
51849
51873
|
case 5:
|
|
51850
51874
|
case "end":
|
|
51851
|
-
return
|
|
51875
|
+
return _context18.stop();
|
|
51852
51876
|
}
|
|
51853
|
-
},
|
|
51877
|
+
}, _callee18);
|
|
51854
51878
|
})));
|
|
51855
51879
|
case 2:
|
|
51856
51880
|
case "end":
|
|
51857
|
-
return
|
|
51881
|
+
return _context19.stop();
|
|
51858
51882
|
}
|
|
51859
|
-
},
|
|
51883
|
+
}, _callee19);
|
|
51860
51884
|
})));
|
|
51861
51885
|
case 2:
|
|
51862
51886
|
case "end":
|
|
51863
|
-
return
|
|
51887
|
+
return _context20.stop();
|
|
51864
51888
|
}
|
|
51865
|
-
},
|
|
51889
|
+
}, _callee20);
|
|
51866
51890
|
}))();
|
|
51867
51891
|
},
|
|
51868
51892
|
replaceNode: function replaceNode(_ref10) {
|
|
51869
|
-
var
|
|
51893
|
+
var _this32 = this;
|
|
51870
51894
|
var node = _ref10.node,
|
|
51871
51895
|
typeToReplaceWith = _ref10.typeToReplaceWith;
|
|
51872
|
-
this.performSingleUndoRedoTransaction( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
51873
|
-
return _regeneratorRuntime().wrap(function
|
|
51874
|
-
while (1) switch (
|
|
51896
|
+
this.performSingleUndoRedoTransaction( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee22() {
|
|
51897
|
+
return _regeneratorRuntime().wrap(function _callee22$(_context22) {
|
|
51898
|
+
while (1) switch (_context22.prev = _context22.next) {
|
|
51875
51899
|
case 0:
|
|
51876
|
-
|
|
51877
|
-
return
|
|
51878
|
-
var
|
|
51879
|
-
return _regeneratorRuntime().wrap(function
|
|
51880
|
-
while (1) switch (
|
|
51900
|
+
_context22.next = 2;
|
|
51901
|
+
return _this32.paperManager.performAtomicAction( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee21() {
|
|
51902
|
+
var _this32$paper$localTo, clientX, clientY, newNode;
|
|
51903
|
+
return _regeneratorRuntime().wrap(function _callee21$(_context21) {
|
|
51904
|
+
while (1) switch (_context21.prev = _context21.next) {
|
|
51881
51905
|
case 0:
|
|
51882
|
-
|
|
51883
|
-
|
|
51884
|
-
return
|
|
51906
|
+
_this32$paper$localTo = _this32.paper.localToClientPoint(node.diagram.bounds), clientX = _this32$paper$localTo.x, clientY = _this32$paper$localTo.y;
|
|
51907
|
+
_context21.next = 3;
|
|
51908
|
+
return _this32.handleDrop({
|
|
51885
51909
|
clientX: clientX,
|
|
51886
51910
|
clientY: clientY,
|
|
51887
51911
|
control: {
|
|
@@ -51890,89 +51914,89 @@ var Selection_component = normalizeComponent(
|
|
|
51890
51914
|
nodeThatWillBeReplaced: node
|
|
51891
51915
|
});
|
|
51892
51916
|
case 3:
|
|
51893
|
-
newNode =
|
|
51894
|
-
|
|
51895
|
-
return
|
|
51917
|
+
newNode = _context21.sent;
|
|
51918
|
+
_context21.next = 6;
|
|
51919
|
+
return _this32.removeNode(node, {
|
|
51896
51920
|
removeRelationships: false
|
|
51897
51921
|
});
|
|
51898
51922
|
case 6:
|
|
51899
|
-
|
|
51900
|
-
|
|
51923
|
+
_this32.highlightNode(newNode);
|
|
51924
|
+
_this32.selectNewNode(newNode);
|
|
51901
51925
|
case 8:
|
|
51902
51926
|
case "end":
|
|
51903
|
-
return
|
|
51927
|
+
return _context21.stop();
|
|
51904
51928
|
}
|
|
51905
|
-
},
|
|
51929
|
+
}, _callee21);
|
|
51906
51930
|
})));
|
|
51907
51931
|
case 2:
|
|
51908
51932
|
case "end":
|
|
51909
|
-
return
|
|
51933
|
+
return _context22.stop();
|
|
51910
51934
|
}
|
|
51911
|
-
},
|
|
51935
|
+
}, _callee22);
|
|
51912
51936
|
})));
|
|
51913
51937
|
},
|
|
51914
51938
|
replaceGenericFlow: function replaceGenericFlow(_ref13) {
|
|
51915
|
-
var
|
|
51939
|
+
var _this33 = this;
|
|
51916
51940
|
var actualFlow = _ref13.actualFlow,
|
|
51917
51941
|
genericFlow = _ref13.genericFlow,
|
|
51918
51942
|
targetNode = _ref13.targetNode;
|
|
51919
|
-
this.performSingleUndoRedoTransaction( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
51920
|
-
return _regeneratorRuntime().wrap(function
|
|
51921
|
-
while (1) switch (
|
|
51943
|
+
this.performSingleUndoRedoTransaction( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee24() {
|
|
51944
|
+
return _regeneratorRuntime().wrap(function _callee24$(_context24) {
|
|
51945
|
+
while (1) switch (_context24.prev = _context24.next) {
|
|
51922
51946
|
case 0:
|
|
51923
|
-
|
|
51924
|
-
return
|
|
51925
|
-
return _regeneratorRuntime().wrap(function
|
|
51926
|
-
while (1) switch (
|
|
51947
|
+
_context24.next = 2;
|
|
51948
|
+
return _this33.paperManager.performAtomicAction( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee23() {
|
|
51949
|
+
return _regeneratorRuntime().wrap(function _callee23$(_context23) {
|
|
51950
|
+
while (1) switch (_context23.prev = _context23.next) {
|
|
51927
51951
|
case 0:
|
|
51928
|
-
|
|
51929
|
-
return
|
|
51952
|
+
_context23.next = 2;
|
|
51953
|
+
return _this33.highlightNode(null);
|
|
51930
51954
|
case 2:
|
|
51931
|
-
|
|
51932
|
-
return
|
|
51955
|
+
_context23.next = 4;
|
|
51956
|
+
return _this33.$nextTick();
|
|
51933
51957
|
case 4:
|
|
51934
|
-
|
|
51935
|
-
return
|
|
51958
|
+
_context23.next = 6;
|
|
51959
|
+
return _this33.addNode(actualFlow);
|
|
51936
51960
|
case 6:
|
|
51937
|
-
|
|
51961
|
+
_context23.next = 8;
|
|
51938
51962
|
return store.commit('removeNode', genericFlow);
|
|
51939
51963
|
case 8:
|
|
51940
|
-
|
|
51941
|
-
return
|
|
51964
|
+
_context23.next = 10;
|
|
51965
|
+
return _this33.$nextTick();
|
|
51942
51966
|
case 10:
|
|
51943
|
-
|
|
51944
|
-
return
|
|
51967
|
+
_context23.next = 12;
|
|
51968
|
+
return _this33.highlightNode(targetNode);
|
|
51945
51969
|
case 12:
|
|
51946
51970
|
case "end":
|
|
51947
|
-
return
|
|
51971
|
+
return _context23.stop();
|
|
51948
51972
|
}
|
|
51949
|
-
},
|
|
51973
|
+
}, _callee23);
|
|
51950
51974
|
})));
|
|
51951
51975
|
case 2:
|
|
51952
51976
|
case "end":
|
|
51953
|
-
return
|
|
51977
|
+
return _context24.stop();
|
|
51954
51978
|
}
|
|
51955
|
-
},
|
|
51979
|
+
}, _callee24);
|
|
51956
51980
|
})));
|
|
51957
51981
|
},
|
|
51958
51982
|
performSingleUndoRedoTransaction: function performSingleUndoRedoTransaction(cb) {
|
|
51959
|
-
var
|
|
51960
|
-
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
51961
|
-
return _regeneratorRuntime().wrap(function
|
|
51962
|
-
while (1) switch (
|
|
51983
|
+
var _this34 = this;
|
|
51984
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee25() {
|
|
51985
|
+
return _regeneratorRuntime().wrap(function _callee25$(_context25) {
|
|
51986
|
+
while (1) switch (_context25.prev = _context25.next) {
|
|
51963
51987
|
case 0:
|
|
51964
51988
|
undoRedoStore.commit('disableSavingState');
|
|
51965
|
-
|
|
51989
|
+
_context25.next = 3;
|
|
51966
51990
|
return cb();
|
|
51967
51991
|
case 3:
|
|
51968
51992
|
undoRedoStore.commit('enableSavingState');
|
|
51969
|
-
|
|
51970
|
-
return
|
|
51993
|
+
_context25.next = 6;
|
|
51994
|
+
return _this34.pushToUndoStack();
|
|
51971
51995
|
case 6:
|
|
51972
51996
|
case "end":
|
|
51973
|
-
return
|
|
51997
|
+
return _context25.stop();
|
|
51974
51998
|
}
|
|
51975
|
-
},
|
|
51999
|
+
}, _callee25);
|
|
51976
52000
|
}))();
|
|
51977
52001
|
},
|
|
51978
52002
|
removeNodesFromLane: function removeNodesFromLane(node) {
|
|
@@ -51985,36 +52009,36 @@ var Selection_component = normalizeComponent(
|
|
|
51985
52009
|
pull_default()(containingLane.get('flowNodeRef'), node.definition);
|
|
51986
52010
|
},
|
|
51987
52011
|
removeNodesFromPool: function removeNodesFromPool(node) {
|
|
51988
|
-
var
|
|
52012
|
+
var _this35 = this;
|
|
51989
52013
|
if (node.type === 'processmaker-modeler-pool' && node.definition.processRef) {
|
|
51990
52014
|
if (node.definition.processRef.artifacts) {
|
|
51991
52015
|
node.definition.processRef.artifacts.forEach(function (artifact) {
|
|
51992
|
-
var nodeToRemove =
|
|
52016
|
+
var nodeToRemove = _this35.nodes.find(function (n) {
|
|
51993
52017
|
return n.definition === artifact;
|
|
51994
52018
|
});
|
|
51995
52019
|
if (nodeToRemove) {
|
|
51996
|
-
|
|
52020
|
+
_this35.removeNode(nodeToRemove);
|
|
51997
52021
|
}
|
|
51998
52022
|
});
|
|
51999
52023
|
}
|
|
52000
52024
|
if (node.definition.processRef.flowElements) {
|
|
52001
52025
|
node.definition.processRef.flowElements.forEach(function (flowElement) {
|
|
52002
|
-
var nodeToRemove =
|
|
52026
|
+
var nodeToRemove = _this35.nodes.find(function (n) {
|
|
52003
52027
|
return n.definition === flowElement;
|
|
52004
52028
|
});
|
|
52005
52029
|
if (nodeToRemove) {
|
|
52006
|
-
|
|
52030
|
+
_this35.removeNode(nodeToRemove);
|
|
52007
52031
|
}
|
|
52008
52032
|
});
|
|
52009
52033
|
}
|
|
52010
52034
|
var laneSets = node.definition.processRef.laneSets;
|
|
52011
52035
|
if (!!laneSets && laneSets.length > 0) {
|
|
52012
52036
|
laneSets[0].lanes.forEach(function (lane) {
|
|
52013
|
-
var nodeToRemove =
|
|
52037
|
+
var nodeToRemove = _this35.nodes.find(function (n) {
|
|
52014
52038
|
return n.definition === lane;
|
|
52015
52039
|
});
|
|
52016
52040
|
if (nodeToRemove) {
|
|
52017
|
-
|
|
52041
|
+
_this35.removeNode(nodeToRemove);
|
|
52018
52042
|
}
|
|
52019
52043
|
});
|
|
52020
52044
|
}
|
|
@@ -52042,13 +52066,13 @@ var Selection_component = normalizeComponent(
|
|
|
52042
52066
|
return shape.component != null;
|
|
52043
52067
|
},
|
|
52044
52068
|
setShapeStacking: function setShapeStacking(shape) {
|
|
52045
|
-
var
|
|
52069
|
+
var _this36 = this;
|
|
52046
52070
|
if (this.isRendering || !shape.component.node.isType('processmaker-modeler-pool') && shape === this.previouslyStackedShape) {
|
|
52047
52071
|
return;
|
|
52048
52072
|
}
|
|
52049
52073
|
this.previouslyStackedShape = shape;
|
|
52050
52074
|
this.paperManager.performAtomicAction(function () {
|
|
52051
|
-
return ensureShapeIsNotCovered(shape,
|
|
52075
|
+
return ensureShapeIsNotCovered(shape, _this36.graph);
|
|
52052
52076
|
});
|
|
52053
52077
|
},
|
|
52054
52078
|
showSavedNotification: function showSavedNotification() {
|
|
@@ -52082,49 +52106,49 @@ var Selection_component = normalizeComponent(
|
|
|
52082
52106
|
return false;
|
|
52083
52107
|
},
|
|
52084
52108
|
pointerDowInShape: function pointerDowInShape(event, element) {
|
|
52085
|
-
var
|
|
52086
|
-
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
52109
|
+
var _this37 = this;
|
|
52110
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee26() {
|
|
52087
52111
|
var x, y, shapeView;
|
|
52088
|
-
return _regeneratorRuntime().wrap(function
|
|
52089
|
-
while (1) switch (
|
|
52112
|
+
return _regeneratorRuntime().wrap(function _callee26$(_context26) {
|
|
52113
|
+
while (1) switch (_context26.prev = _context26.next) {
|
|
52090
52114
|
case 0:
|
|
52091
52115
|
x = event.clientX, y = event.clientY;
|
|
52092
|
-
shapeView =
|
|
52093
|
-
|
|
52094
|
-
|
|
52095
|
-
|
|
52096
|
-
|
|
52116
|
+
shapeView = _this37.paper.findViewByModel(element);
|
|
52117
|
+
_this37.isDragging = false;
|
|
52118
|
+
_this37.isSelecting = false;
|
|
52119
|
+
_this37.isIntoTheSelection = false;
|
|
52120
|
+
_this37.dragStart = {
|
|
52097
52121
|
x: x,
|
|
52098
52122
|
y: y
|
|
52099
52123
|
};
|
|
52100
52124
|
// Verify if is in the selection box
|
|
52101
|
-
if (!
|
|
52102
|
-
|
|
52125
|
+
if (!_this37.isPointInSelection(event)) {
|
|
52126
|
+
_context26.next = 10;
|
|
52103
52127
|
break;
|
|
52104
52128
|
}
|
|
52105
|
-
|
|
52106
|
-
|
|
52129
|
+
_this37.isIntoTheSelection = true;
|
|
52130
|
+
_context26.next = 15;
|
|
52107
52131
|
break;
|
|
52108
52132
|
case 10:
|
|
52109
52133
|
if (event.shiftKey) {
|
|
52110
|
-
|
|
52134
|
+
_context26.next = 15;
|
|
52111
52135
|
break;
|
|
52112
52136
|
}
|
|
52113
|
-
|
|
52114
|
-
return
|
|
52137
|
+
_context26.next = 13;
|
|
52138
|
+
return _this37.$refs.selector.selectElement(shapeView);
|
|
52115
52139
|
case 13:
|
|
52116
|
-
|
|
52117
|
-
return
|
|
52140
|
+
_context26.next = 15;
|
|
52141
|
+
return _this37.$nextTick();
|
|
52118
52142
|
case 15:
|
|
52119
|
-
|
|
52143
|
+
_this37.$refs.selector.startDrag({
|
|
52120
52144
|
clientX: event.clientX,
|
|
52121
52145
|
clientY: event.clientY
|
|
52122
52146
|
});
|
|
52123
52147
|
case 16:
|
|
52124
52148
|
case "end":
|
|
52125
|
-
return
|
|
52149
|
+
return _context26.stop();
|
|
52126
52150
|
}
|
|
52127
|
-
},
|
|
52151
|
+
}, _callee26);
|
|
52128
52152
|
}))();
|
|
52129
52153
|
},
|
|
52130
52154
|
pointerDownHandler: function pointerDownHandler(event) {
|
|
@@ -52224,7 +52248,7 @@ var Selection_component = normalizeComponent(
|
|
|
52224
52248
|
this.$emit('set-xml-manager', this.xmlManager);
|
|
52225
52249
|
},
|
|
52226
52250
|
mounted: function mounted() {
|
|
52227
|
-
var
|
|
52251
|
+
var _this38 = this;
|
|
52228
52252
|
store.commit('setReadOnly', this.readOnly);
|
|
52229
52253
|
this.graph = new external_jointjs_namespaceObject.dia.Graph();
|
|
52230
52254
|
store.commit('setGraph', this.graph);
|
|
@@ -52243,47 +52267,47 @@ var Selection_component = normalizeComponent(
|
|
|
52243
52267
|
store.commit('setPaper', this.paperManager.paper);
|
|
52244
52268
|
this.paperManager.addEventHandler('element:pointerclick', this.blurFocusedScreenBuilderElement, this);
|
|
52245
52269
|
this.paperManager.addEventHandler('blank:pointerdown', function (event, x, y) {
|
|
52246
|
-
if (
|
|
52270
|
+
if (_this38.isGrabbing) return;
|
|
52247
52271
|
if (store.getters.isReadOnly) {
|
|
52248
|
-
|
|
52272
|
+
_this38.isGrabbing = true;
|
|
52249
52273
|
}
|
|
52250
|
-
var scale =
|
|
52251
|
-
|
|
52274
|
+
var scale = _this38.paperManager.scale;
|
|
52275
|
+
_this38.canvasDragPosition = {
|
|
52252
52276
|
x: x * scale.sx,
|
|
52253
52277
|
y: y * scale.sy
|
|
52254
52278
|
};
|
|
52255
|
-
|
|
52256
|
-
|
|
52279
|
+
_this38.isOverShape = false;
|
|
52280
|
+
_this38.pointerDownHandler(event);
|
|
52257
52281
|
}, this);
|
|
52258
52282
|
this.paperManager.addEventHandler('cell:mouseover element:mouseover', function (_ref17) {
|
|
52259
52283
|
var shape = _ref17.model;
|
|
52260
|
-
if (
|
|
52284
|
+
if (_this38.isBpmnNode(shape) && shape.attr('body/cursor') !== 'default' && !_this38.isGrabbing) {
|
|
52261
52285
|
shape.attr('body/cursor', 'move');
|
|
52262
52286
|
}
|
|
52263
52287
|
// If the user is panning the Paper while hovering an element, ignore the default move cursor
|
|
52264
|
-
if (
|
|
52288
|
+
if (_this38.isGrabbing && _this38.isBpmnNode(shape)) {
|
|
52265
52289
|
shape.attr('body/cursor', 'grabbing');
|
|
52266
52290
|
}
|
|
52267
52291
|
});
|
|
52268
52292
|
this.paperManager.addEventHandler('blank:pointerup', function (event) {
|
|
52269
|
-
|
|
52270
|
-
|
|
52271
|
-
|
|
52272
|
-
|
|
52293
|
+
_this38.isGrabbing = false;
|
|
52294
|
+
_this38.canvasDragPosition = null;
|
|
52295
|
+
_this38.activeNode = null;
|
|
52296
|
+
_this38.pointerUpHandler(event);
|
|
52273
52297
|
}, this);
|
|
52274
52298
|
this.paperManager.addEventHandler('cell:pointerup', function (cellView, event) {
|
|
52275
|
-
|
|
52276
|
-
|
|
52277
|
-
|
|
52299
|
+
_this38.canvasDragPosition = null;
|
|
52300
|
+
_this38.activeNode = null;
|
|
52301
|
+
_this38.pointerUpHandler(event, cellView);
|
|
52278
52302
|
}, this);
|
|
52279
52303
|
this.$refs['paper-container'].addEventListener('mouseenter', function () {
|
|
52280
52304
|
store.commit('setClientLeftPaper', false);
|
|
52281
52305
|
});
|
|
52282
52306
|
this.$el.addEventListener('mousemove', function (event) {
|
|
52283
|
-
|
|
52307
|
+
_this38.pointerMoveHandler(event);
|
|
52284
52308
|
});
|
|
52285
52309
|
this.$refs['paper-container'].addEventListener('mouseleave', function () {
|
|
52286
|
-
|
|
52310
|
+
_this38.paperManager.removeEventHandler('blank:pointermove');
|
|
52287
52311
|
store.commit('setClientLeftPaper', true);
|
|
52288
52312
|
});
|
|
52289
52313
|
this.paperManager.addEventHandler('cell:pointerclick', function (cellView, evt, x, y) {
|
|
@@ -52294,44 +52318,44 @@ var Selection_component = normalizeComponent(
|
|
|
52294
52318
|
});
|
|
52295
52319
|
this.paperManager.addEventHandler('cell:pointerclick', function (_ref18, event) {
|
|
52296
52320
|
var shape = _ref18.model;
|
|
52297
|
-
if (!
|
|
52321
|
+
if (!_this38.isBpmnNode(shape)) {
|
|
52298
52322
|
return;
|
|
52299
52323
|
}
|
|
52300
52324
|
|
|
52301
52325
|
// ignore click event if the user is Grabbing the paper
|
|
52302
|
-
if (
|
|
52326
|
+
if (_this38.isGrabbing) return;
|
|
52303
52327
|
shape.component.$emit('click', event);
|
|
52304
|
-
|
|
52328
|
+
_this38.$emit('click', {
|
|
52305
52329
|
event: event,
|
|
52306
|
-
node:
|
|
52330
|
+
node: _this38.highlightedNode.definition
|
|
52307
52331
|
});
|
|
52308
52332
|
});
|
|
52309
52333
|
this.paperManager.addEventHandler('cell:pointerdown', function (_ref19, event) {
|
|
52310
52334
|
var shape = _ref19.model;
|
|
52311
|
-
if (!
|
|
52335
|
+
if (!_this38.isBpmnNode(shape)) {
|
|
52312
52336
|
return;
|
|
52313
52337
|
}
|
|
52314
52338
|
// If the user is pressing Space (grabbing) and clicking on a Cell, return
|
|
52315
|
-
if (
|
|
52339
|
+
if (_this38.isGrabbing) {
|
|
52316
52340
|
return;
|
|
52317
52341
|
}
|
|
52318
|
-
|
|
52319
|
-
|
|
52320
|
-
|
|
52321
|
-
|
|
52342
|
+
_this38.setShapeStacking(shape);
|
|
52343
|
+
_this38.activeNode = shape.component.node;
|
|
52344
|
+
_this38.isOverShape = true;
|
|
52345
|
+
_this38.pointerDowInShape(event, shape);
|
|
52322
52346
|
});
|
|
52323
52347
|
// If the user is grabbing the paper while he clicked in a cell, move the paper and not the cell
|
|
52324
52348
|
this.paperManager.addEventHandler('cell:pointermove', function (_, event, x, y) {
|
|
52325
|
-
if (
|
|
52326
|
-
if (!
|
|
52327
|
-
var scale =
|
|
52328
|
-
|
|
52349
|
+
if (_this38.isGrabbing) {
|
|
52350
|
+
if (!_this38.canvasDragPosition) {
|
|
52351
|
+
var scale = _this38.paperManager.scale;
|
|
52352
|
+
_this38.canvasDragPosition = {
|
|
52329
52353
|
x: x * scale.sx,
|
|
52330
52354
|
y: y * scale.sy
|
|
52331
52355
|
};
|
|
52332
52356
|
}
|
|
52333
|
-
if (
|
|
52334
|
-
|
|
52357
|
+
if (_this38.canvasDragPosition && !_this38.clientLeftPaper) {
|
|
52358
|
+
_this38.paperManager.translate(event.offsetX - _this38.canvasDragPosition.x, event.offsetY - _this38.canvasDragPosition.y);
|
|
52335
52359
|
}
|
|
52336
52360
|
}
|
|
52337
52361
|
});
|
|
@@ -52339,20 +52363,20 @@ var Selection_component = normalizeComponent(
|
|
|
52339
52363
|
/* Register custom nodes */
|
|
52340
52364
|
window.ProcessMaker.EventBus.$emit('modeler-start', {
|
|
52341
52365
|
loadXML: function () {
|
|
52342
|
-
var _loadXML = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
52343
|
-
return _regeneratorRuntime().wrap(function
|
|
52344
|
-
while (1) switch (
|
|
52366
|
+
var _loadXML = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee27(xml) {
|
|
52367
|
+
return _regeneratorRuntime().wrap(function _callee27$(_context27) {
|
|
52368
|
+
while (1) switch (_context27.prev = _context27.next) {
|
|
52345
52369
|
case 0:
|
|
52346
|
-
|
|
52347
|
-
return
|
|
52370
|
+
_context27.next = 2;
|
|
52371
|
+
return _this38.loadXML(xml);
|
|
52348
52372
|
case 2:
|
|
52349
|
-
|
|
52373
|
+
_context27.next = 4;
|
|
52350
52374
|
return undoRedoStore.dispatch('pushState', xml);
|
|
52351
52375
|
case 4:
|
|
52352
52376
|
case "end":
|
|
52353
|
-
return
|
|
52377
|
+
return _context27.stop();
|
|
52354
52378
|
}
|
|
52355
|
-
},
|
|
52379
|
+
}, _callee27);
|
|
52356
52380
|
}));
|
|
52357
52381
|
function loadXML(_x) {
|
|
52358
52382
|
return _loadXML.apply(this, arguments);
|
|
@@ -52360,10 +52384,10 @@ var Selection_component = normalizeComponent(
|
|
|
52360
52384
|
return loadXML;
|
|
52361
52385
|
}(),
|
|
52362
52386
|
addWarnings: function addWarnings(warnings) {
|
|
52363
|
-
return
|
|
52387
|
+
return _this38.$emit('warnings', warnings);
|
|
52364
52388
|
},
|
|
52365
52389
|
addBreadcrumbs: function addBreadcrumbs(breadcrumbs) {
|
|
52366
|
-
return
|
|
52390
|
+
return _this38.breadcrumbData.push(breadcrumbs);
|
|
52367
52391
|
}
|
|
52368
52392
|
});
|
|
52369
52393
|
}
|
|
@@ -52385,8 +52409,8 @@ var modelervue_type_style_index_0_prod_lang_scss_ = __webpack_require__(88242);
|
|
|
52385
52409
|
|
|
52386
52410
|
var Modeler_component = normalizeComponent(
|
|
52387
52411
|
modeler_Modelervue_type_script_lang_js_,
|
|
52388
|
-
|
|
52389
|
-
|
|
52412
|
+
Modelervue_type_template_id_84267fa8_render,
|
|
52413
|
+
Modelervue_type_template_id_84267fa8_staticRenderFns,
|
|
52390
52414
|
false,
|
|
52391
52415
|
null,
|
|
52392
52416
|
null,
|