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