@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.umd.js
CHANGED
|
@@ -42408,10 +42408,10 @@ var ValidationStatus_component = normalizeComponent(
|
|
|
42408
42408
|
)
|
|
42409
42409
|
|
|
42410
42410
|
/* harmony default export */ var ValidationStatus = (ValidationStatus_component.exports);
|
|
42411
|
-
;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js??clonedRuleSet-83.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=
|
|
42411
|
+
;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js??clonedRuleSet-83.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&
|
|
42412
42412
|
|
|
42413
42413
|
|
|
42414
|
-
var
|
|
42414
|
+
var Modelervue_type_template_id_84267fa8_render = function render() {
|
|
42415
42415
|
var _vm = this,
|
|
42416
42416
|
_c = _vm._self._c;
|
|
42417
42417
|
return _c('span', {
|
|
@@ -42603,9 +42603,9 @@ var Modelervue_type_template_id_7233010b_render = function render() {
|
|
|
42603
42603
|
}
|
|
42604
42604
|
}) : _vm._e()], 2)], 1);
|
|
42605
42605
|
};
|
|
42606
|
-
var
|
|
42606
|
+
var Modelervue_type_template_id_84267fa8_staticRenderFns = [];
|
|
42607
42607
|
|
|
42608
|
-
;// CONCATENATED MODULE: ./src/components/modeler/Modeler.vue?vue&type=template&id=
|
|
42608
|
+
;// CONCATENATED MODULE: ./src/components/modeler/Modeler.vue?vue&type=template&id=84267fa8&
|
|
42609
42609
|
|
|
42610
42610
|
;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js??clonedRuleSet-83.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&
|
|
42611
42611
|
var boundaryEventvue_type_template_id_2979ecac_render = function render() {
|
|
@@ -51381,6 +51381,13 @@ var Selection_component = normalizeComponent(
|
|
|
51381
51381
|
this.pmBlockNodes.push(pmBlockNode);
|
|
51382
51382
|
var types = Array.isArray(pmBlockNode.bpmnType) ? pmBlockNode.bpmnType : [pmBlockNode.bpmnType];
|
|
51383
51383
|
types.forEach(function (bpmnType) {
|
|
51384
|
+
if (!_this12.parsers[bpmnType]) {
|
|
51385
|
+
_this12.parsers[bpmnType] = {
|
|
51386
|
+
custom: [],
|
|
51387
|
+
implementation: [],
|
|
51388
|
+
default: []
|
|
51389
|
+
};
|
|
51390
|
+
}
|
|
51384
51391
|
if (customParser) {
|
|
51385
51392
|
_this12.parsers[bpmnType].custom.push(customParser);
|
|
51386
51393
|
return;
|
|
@@ -51559,14 +51566,30 @@ var Selection_component = normalizeComponent(
|
|
|
51559
51566
|
return;
|
|
51560
51567
|
}
|
|
51561
51568
|
this.removeUnsupportedElementAttributes(definition);
|
|
51562
|
-
var
|
|
51569
|
+
var config = definition.config ? JSON.parse(definition.config) : {};
|
|
51570
|
+
var type = (config === null || config === void 0 ? void 0 : config.processKey) || parser(definition, this.moddle);
|
|
51563
51571
|
var unnamedElements = ['bpmn:TextAnnotation', 'bpmn:Association', 'bpmn:DataOutputAssociation', 'bpmn:DataInputAssociation'];
|
|
51564
51572
|
var requireName = unnamedElements.indexOf(bpmnType) === -1;
|
|
51565
51573
|
if (requireName && !definition.get('name')) {
|
|
51566
51574
|
definition.set('name', '');
|
|
51567
51575
|
}
|
|
51568
|
-
|
|
51569
|
-
|
|
51576
|
+
this.createNodeAsync(type, definition, diagram);
|
|
51577
|
+
},
|
|
51578
|
+
createNodeAsync: function createNodeAsync(type, definition, diagram) {
|
|
51579
|
+
var _this21 = this;
|
|
51580
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8() {
|
|
51581
|
+
var node;
|
|
51582
|
+
return _regeneratorRuntime().wrap(function _callee8$(_context8) {
|
|
51583
|
+
while (1) switch (_context8.prev = _context8.next) {
|
|
51584
|
+
case 0:
|
|
51585
|
+
node = _this21.createNode(type, definition, diagram);
|
|
51586
|
+
store.commit('addNode', node);
|
|
51587
|
+
case 2:
|
|
51588
|
+
case "end":
|
|
51589
|
+
return _context8.stop();
|
|
51590
|
+
}
|
|
51591
|
+
}, _callee8);
|
|
51592
|
+
}))();
|
|
51570
51593
|
},
|
|
51571
51594
|
createNode: function createNode(type, definition, diagram) {
|
|
51572
51595
|
if (Node.isTimerType(type)) {
|
|
@@ -51586,95 +51609,95 @@ var Selection_component = normalizeComponent(
|
|
|
51586
51609
|
return hasSource && hasTarget;
|
|
51587
51610
|
},
|
|
51588
51611
|
waitForCursorToChange: function waitForCursorToChange() {
|
|
51589
|
-
var
|
|
51590
|
-
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
51612
|
+
var _this22 = this;
|
|
51613
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9() {
|
|
51591
51614
|
var cursorWaitTime;
|
|
51592
|
-
return _regeneratorRuntime().wrap(function
|
|
51593
|
-
while (1) switch (
|
|
51615
|
+
return _regeneratorRuntime().wrap(function _callee9$(_context9) {
|
|
51616
|
+
while (1) switch (_context9.prev = _context9.next) {
|
|
51594
51617
|
case 0:
|
|
51595
51618
|
cursorWaitTime = 300;
|
|
51596
|
-
|
|
51597
|
-
return
|
|
51619
|
+
_context9.next = 3;
|
|
51620
|
+
return _this22.$nextTick();
|
|
51598
51621
|
case 3:
|
|
51599
|
-
return
|
|
51622
|
+
return _context9.abrupt("return", new Promise(function (resolve) {
|
|
51600
51623
|
return setTimeout(resolve, cursorWaitTime);
|
|
51601
51624
|
}));
|
|
51602
51625
|
case 4:
|
|
51603
51626
|
case "end":
|
|
51604
|
-
return
|
|
51627
|
+
return _context9.stop();
|
|
51605
51628
|
}
|
|
51606
|
-
},
|
|
51629
|
+
}, _callee9);
|
|
51607
51630
|
}))();
|
|
51608
51631
|
},
|
|
51609
51632
|
renderPaper: function renderPaper() {
|
|
51610
|
-
var
|
|
51611
|
-
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
51612
|
-
return _regeneratorRuntime().wrap(function
|
|
51613
|
-
while (1) switch (
|
|
51633
|
+
var _this23 = this;
|
|
51634
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11() {
|
|
51635
|
+
return _regeneratorRuntime().wrap(function _callee11$(_context11) {
|
|
51636
|
+
while (1) switch (_context11.prev = _context11.next) {
|
|
51614
51637
|
case 0:
|
|
51615
|
-
|
|
51616
|
-
|
|
51617
|
-
return
|
|
51618
|
-
return _regeneratorRuntime().wrap(function
|
|
51619
|
-
while (1) switch (
|
|
51638
|
+
_this23.isRendering = true;
|
|
51639
|
+
_context11.next = 3;
|
|
51640
|
+
return _this23.paperManager.performAtomicAction( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10() {
|
|
51641
|
+
return _regeneratorRuntime().wrap(function _callee10$(_context10) {
|
|
51642
|
+
while (1) switch (_context10.prev = _context10.next) {
|
|
51620
51643
|
case 0:
|
|
51621
|
-
|
|
51622
|
-
return
|
|
51644
|
+
_context10.next = 2;
|
|
51645
|
+
return _this23.waitForCursorToChange();
|
|
51623
51646
|
case 2:
|
|
51624
|
-
|
|
51625
|
-
|
|
51626
|
-
|
|
51647
|
+
_this23.parse();
|
|
51648
|
+
_this23.addPools();
|
|
51649
|
+
_this23.setUpDiagram();
|
|
51627
51650
|
case 5:
|
|
51628
51651
|
case "end":
|
|
51629
|
-
return
|
|
51652
|
+
return _context10.stop();
|
|
51630
51653
|
}
|
|
51631
|
-
},
|
|
51654
|
+
}, _callee10);
|
|
51632
51655
|
})));
|
|
51633
51656
|
case 3:
|
|
51634
|
-
|
|
51635
|
-
return
|
|
51657
|
+
_context11.next = 5;
|
|
51658
|
+
return _this23.paperManager.awaitScheduledUpdates();
|
|
51636
51659
|
case 5:
|
|
51637
|
-
|
|
51638
|
-
|
|
51660
|
+
_this23.isRendering = false;
|
|
51661
|
+
_this23.$emit('parsed');
|
|
51639
51662
|
case 7:
|
|
51640
51663
|
case "end":
|
|
51641
|
-
return
|
|
51664
|
+
return _context11.stop();
|
|
51642
51665
|
}
|
|
51643
|
-
},
|
|
51666
|
+
}, _callee11);
|
|
51644
51667
|
}))();
|
|
51645
51668
|
},
|
|
51646
51669
|
loadXML: function loadXML() {
|
|
51647
51670
|
var _arguments2 = arguments,
|
|
51648
|
-
|
|
51649
|
-
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
51671
|
+
_this24 = this;
|
|
51672
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12() {
|
|
51650
51673
|
var xml, emitChangeEvent;
|
|
51651
|
-
return _regeneratorRuntime().wrap(function
|
|
51652
|
-
while (1) switch (
|
|
51674
|
+
return _regeneratorRuntime().wrap(function _callee12$(_context12) {
|
|
51675
|
+
while (1) switch (_context12.prev = _context12.next) {
|
|
51653
51676
|
case 0:
|
|
51654
51677
|
xml = _arguments2.length > 0 && _arguments2[0] !== undefined ? _arguments2[0] : null;
|
|
51655
51678
|
emitChangeEvent = false;
|
|
51656
51679
|
if (xml === null) {
|
|
51657
|
-
xml =
|
|
51680
|
+
xml = _this24.currentXML;
|
|
51658
51681
|
emitChangeEvent = true;
|
|
51659
51682
|
}
|
|
51660
|
-
|
|
51661
|
-
return
|
|
51683
|
+
_context12.next = 5;
|
|
51684
|
+
return _this24.xmlManager.getDefinitionsFromXml(xml);
|
|
51662
51685
|
case 5:
|
|
51663
|
-
|
|
51664
|
-
|
|
51665
|
-
|
|
51686
|
+
_this24.definitions = _context12.sent;
|
|
51687
|
+
_this24.xmlManager.definitions = _this24.definitions;
|
|
51688
|
+
_this24.nodeIdGenerator = getNodeIdGenerator(_this24.definitions);
|
|
51666
51689
|
store.commit('clearNodes');
|
|
51667
|
-
|
|
51668
|
-
return
|
|
51690
|
+
_context12.next = 11;
|
|
51691
|
+
return _this24.renderPaper();
|
|
51669
51692
|
case 11:
|
|
51670
51693
|
if (emitChangeEvent) {
|
|
51671
51694
|
window.ProcessMaker.EventBus.$emit('modeler-change');
|
|
51672
51695
|
}
|
|
51673
51696
|
case 12:
|
|
51674
51697
|
case "end":
|
|
51675
|
-
return
|
|
51698
|
+
return _context12.stop();
|
|
51676
51699
|
}
|
|
51677
|
-
},
|
|
51700
|
+
}, _callee12);
|
|
51678
51701
|
}))();
|
|
51679
51702
|
},
|
|
51680
51703
|
getBoundaryEvents: function getBoundaryEvents(process) {
|
|
@@ -51698,13 +51721,13 @@ var Selection_component = normalizeComponent(
|
|
|
51698
51721
|
return boundaryEvent;
|
|
51699
51722
|
},
|
|
51700
51723
|
ensureCancelActivityIsAddedToBoundaryEvents: function ensureCancelActivityIsAddedToBoundaryEvents(process) {
|
|
51701
|
-
var
|
|
51724
|
+
var _this25 = this;
|
|
51702
51725
|
this.getBoundaryEvents(process).forEach(function (definition) {
|
|
51703
|
-
var boundaryEvent =
|
|
51726
|
+
var boundaryEvent = _this25.createBoundaryEvent(definition);
|
|
51704
51727
|
definition.get('outgoing').forEach(function (outgoing) {
|
|
51705
51728
|
return outgoing.set('sourceRef', boundaryEvent);
|
|
51706
51729
|
});
|
|
51707
|
-
|
|
51730
|
+
_this25.replaceDefinition(definition, boundaryEvent, process);
|
|
51708
51731
|
});
|
|
51709
51732
|
},
|
|
51710
51733
|
replaceDefinition: function replaceDefinition(definition, boundaryEvent, process) {
|
|
@@ -51730,51 +51753,51 @@ var Selection_component = normalizeComponent(
|
|
|
51730
51753
|
});
|
|
51731
51754
|
},
|
|
51732
51755
|
handleDrop: function handleDrop(_ref6) {
|
|
51733
|
-
var
|
|
51734
|
-
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
51735
|
-
var clientX, clientY, control, nodeThatWillBeReplaced, definition, diagram,
|
|
51736
|
-
return _regeneratorRuntime().wrap(function
|
|
51737
|
-
while (1) switch (
|
|
51756
|
+
var _this26 = this;
|
|
51757
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee13() {
|
|
51758
|
+
var clientX, clientY, control, nodeThatWillBeReplaced, definition, diagram, _this26$paperManager$, x, y, newNode, nodeMigrator;
|
|
51759
|
+
return _regeneratorRuntime().wrap(function _callee13$(_context13) {
|
|
51760
|
+
while (1) switch (_context13.prev = _context13.next) {
|
|
51738
51761
|
case 0:
|
|
51739
51762
|
clientX = _ref6.clientX, clientY = _ref6.clientY, control = _ref6.control, nodeThatWillBeReplaced = _ref6.nodeThatWillBeReplaced;
|
|
51740
|
-
|
|
51763
|
+
_this26.validateDropTarget({
|
|
51741
51764
|
clientX: clientX,
|
|
51742
51765
|
clientY: clientY,
|
|
51743
51766
|
control: control
|
|
51744
51767
|
});
|
|
51745
|
-
if (
|
|
51746
|
-
|
|
51768
|
+
if (_this26.allowDrop) {
|
|
51769
|
+
_context13.next = 4;
|
|
51747
51770
|
break;
|
|
51748
51771
|
}
|
|
51749
|
-
return
|
|
51772
|
+
return _context13.abrupt("return");
|
|
51750
51773
|
case 4:
|
|
51751
|
-
definition =
|
|
51752
|
-
diagram =
|
|
51753
|
-
|
|
51774
|
+
definition = _this26.nodeRegistry[control.type].definition(_this26.moddle, _this26.$t);
|
|
51775
|
+
diagram = _this26.nodeRegistry[control.type].diagram(_this26.moddle);
|
|
51776
|
+
_this26$paperManager$ = _this26.paperManager.clientToGridPoint(clientX, clientY), x = _this26$paperManager$.x, y = _this26$paperManager$.y;
|
|
51754
51777
|
diagram.bounds.x = x;
|
|
51755
51778
|
diagram.bounds.y = y;
|
|
51756
|
-
newNode =
|
|
51779
|
+
newNode = _this26.createNode(control.type, definition, diagram);
|
|
51757
51780
|
if (newNode.isBpmnType('bpmn:BoundaryEvent')) {
|
|
51758
|
-
|
|
51781
|
+
_this26.setShapeCenterUnderCursor(diagram);
|
|
51759
51782
|
}
|
|
51760
|
-
|
|
51761
|
-
|
|
51762
|
-
return
|
|
51783
|
+
_this26.highlightNode(newNode);
|
|
51784
|
+
_context13.next = 14;
|
|
51785
|
+
return _this26.addNode(newNode);
|
|
51763
51786
|
case 14:
|
|
51764
51787
|
if (nodeThatWillBeReplaced) {
|
|
51765
|
-
|
|
51788
|
+
_context13.next = 16;
|
|
51766
51789
|
break;
|
|
51767
51790
|
}
|
|
51768
|
-
return
|
|
51791
|
+
return _context13.abrupt("return");
|
|
51769
51792
|
case 16:
|
|
51770
|
-
nodeMigrator = new NodeMigrator(nodeThatWillBeReplaced, definition,
|
|
51793
|
+
nodeMigrator = new NodeMigrator(nodeThatWillBeReplaced, definition, _this26.graph, newNode, _this26.processes, _this26.collaboration);
|
|
51771
51794
|
nodeMigrator.migrate();
|
|
51772
|
-
return
|
|
51795
|
+
return _context13.abrupt("return", newNode);
|
|
51773
51796
|
case 19:
|
|
51774
51797
|
case "end":
|
|
51775
|
-
return
|
|
51798
|
+
return _context13.stop();
|
|
51776
51799
|
}
|
|
51777
|
-
},
|
|
51800
|
+
}, _callee13);
|
|
51778
51801
|
}))();
|
|
51779
51802
|
},
|
|
51780
51803
|
setShapeCenterUnderCursor: function setShapeCenterUnderCursor(diagram) {
|
|
@@ -51782,204 +51805,204 @@ var Selection_component = normalizeComponent(
|
|
|
51782
51805
|
diagram.bounds.y -= diagram.bounds.height / 2;
|
|
51783
51806
|
},
|
|
51784
51807
|
selectNewNode: function selectNewNode(node) {
|
|
51785
|
-
var
|
|
51786
|
-
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
51808
|
+
var _this27 = this;
|
|
51809
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee14() {
|
|
51787
51810
|
var newNodeComponent, view;
|
|
51788
|
-
return _regeneratorRuntime().wrap(function
|
|
51789
|
-
while (1) switch (
|
|
51811
|
+
return _regeneratorRuntime().wrap(function _callee14$(_context14) {
|
|
51812
|
+
while (1) switch (_context14.prev = _context14.next) {
|
|
51790
51813
|
case 0:
|
|
51791
|
-
|
|
51792
|
-
return
|
|
51814
|
+
_context14.next = 2;
|
|
51815
|
+
return _this27.$nextTick();
|
|
51793
51816
|
case 2:
|
|
51794
|
-
|
|
51795
|
-
return
|
|
51817
|
+
_context14.next = 4;
|
|
51818
|
+
return _this27.paperManager.awaitScheduledUpdates();
|
|
51796
51819
|
case 4:
|
|
51797
|
-
newNodeComponent =
|
|
51820
|
+
newNodeComponent = _this27.$refs.nodeComponent.find(function (component) {
|
|
51798
51821
|
return component.node === node;
|
|
51799
51822
|
});
|
|
51800
51823
|
view = newNodeComponent.shapeView;
|
|
51801
|
-
|
|
51802
|
-
return
|
|
51824
|
+
_context14.next = 8;
|
|
51825
|
+
return _this27.$refs.selector.selectElement(view);
|
|
51803
51826
|
case 8:
|
|
51804
51827
|
case "end":
|
|
51805
|
-
return
|
|
51828
|
+
return _context14.stop();
|
|
51806
51829
|
}
|
|
51807
|
-
},
|
|
51830
|
+
}, _callee14);
|
|
51808
51831
|
}))();
|
|
51809
51832
|
},
|
|
51810
51833
|
addNode: function addNode(node) {
|
|
51811
|
-
var
|
|
51812
|
-
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
51834
|
+
var _this28 = this;
|
|
51835
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee15() {
|
|
51813
51836
|
var targetProcess;
|
|
51814
|
-
return _regeneratorRuntime().wrap(function
|
|
51815
|
-
while (1) switch (
|
|
51837
|
+
return _regeneratorRuntime().wrap(function _callee15$(_context15) {
|
|
51838
|
+
while (1) switch (_context15.prev = _context15.next) {
|
|
51816
51839
|
case 0:
|
|
51817
51840
|
if (!node.pool) {
|
|
51818
|
-
node.pool =
|
|
51841
|
+
node.pool = _this28.poolTarget;
|
|
51819
51842
|
}
|
|
51820
|
-
targetProcess = node.getTargetProcess(
|
|
51843
|
+
targetProcess = node.getTargetProcess(_this28.processes, _this28.processNode);
|
|
51821
51844
|
addNodeToProcess(node, targetProcess);
|
|
51822
|
-
node.setIds(
|
|
51823
|
-
|
|
51845
|
+
node.setIds(_this28.nodeIdGenerator);
|
|
51846
|
+
_this28.planeElements.push(node.diagram);
|
|
51824
51847
|
store.commit('addNode', node);
|
|
51825
|
-
|
|
51848
|
+
_this28.poolTarget = null;
|
|
51826
51849
|
|
|
51827
51850
|
// add processmaker-modeler-generic-flow
|
|
51828
51851
|
if (![sequenceFlow_id, poolLane_config_id, association_id, messageFlow_config_id, id, config_id, genericFlow_config_id].includes(node.type)) {
|
|
51829
|
-
|
|
51852
|
+
_context15.next = 9;
|
|
51830
51853
|
break;
|
|
51831
51854
|
}
|
|
51832
|
-
return
|
|
51855
|
+
return _context15.abrupt("return");
|
|
51833
51856
|
case 9:
|
|
51834
51857
|
// Select the node after it has been added to the store (does not apply to flows)
|
|
51835
|
-
|
|
51836
|
-
return
|
|
51858
|
+
_this28.selectNewNode(node);
|
|
51859
|
+
return _context15.abrupt("return", new Promise(function (resolve) {
|
|
51837
51860
|
setTimeout(function () {
|
|
51838
|
-
|
|
51861
|
+
_this28.pushToUndoStack();
|
|
51839
51862
|
resolve();
|
|
51840
51863
|
});
|
|
51841
51864
|
}));
|
|
51842
51865
|
case 11:
|
|
51843
51866
|
case "end":
|
|
51844
|
-
return
|
|
51867
|
+
return _context15.stop();
|
|
51845
51868
|
}
|
|
51846
|
-
},
|
|
51869
|
+
}, _callee15);
|
|
51847
51870
|
}))();
|
|
51848
51871
|
},
|
|
51849
51872
|
addClonedNodes: function addClonedNodes(nodes) {
|
|
51850
|
-
var
|
|
51851
|
-
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
51852
|
-
return _regeneratorRuntime().wrap(function
|
|
51853
|
-
while (1) switch (
|
|
51873
|
+
var _this29 = this;
|
|
51874
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee16() {
|
|
51875
|
+
return _regeneratorRuntime().wrap(function _callee16$(_context16) {
|
|
51876
|
+
while (1) switch (_context16.prev = _context16.next) {
|
|
51854
51877
|
case 0:
|
|
51855
51878
|
nodes.forEach(function (node) {
|
|
51856
51879
|
if (!node.pool) {
|
|
51857
|
-
node.pool =
|
|
51880
|
+
node.pool = _this29.poolTarget;
|
|
51858
51881
|
}
|
|
51859
|
-
var targetProcess = node.getTargetProcess(
|
|
51882
|
+
var targetProcess = node.getTargetProcess(_this29.processes, _this29.processNode);
|
|
51860
51883
|
addNodeToProcess(node, targetProcess);
|
|
51861
|
-
|
|
51884
|
+
_this29.planeElements.push(node.diagram);
|
|
51862
51885
|
store.commit('addNode', node);
|
|
51863
|
-
|
|
51886
|
+
_this29.poolTarget = null;
|
|
51864
51887
|
});
|
|
51865
51888
|
case 1:
|
|
51866
51889
|
case "end":
|
|
51867
|
-
return
|
|
51890
|
+
return _context16.stop();
|
|
51868
51891
|
}
|
|
51869
|
-
},
|
|
51892
|
+
}, _callee16);
|
|
51870
51893
|
}))();
|
|
51871
51894
|
},
|
|
51872
51895
|
removeNode: function removeNode(node) {
|
|
51873
51896
|
var _arguments3 = arguments,
|
|
51874
|
-
|
|
51875
|
-
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
51897
|
+
_this30 = this;
|
|
51898
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee17() {
|
|
51876
51899
|
var _ref7, _ref7$removeRelations, removeRelationships;
|
|
51877
|
-
return _regeneratorRuntime().wrap(function
|
|
51878
|
-
while (1) switch (
|
|
51900
|
+
return _regeneratorRuntime().wrap(function _callee17$(_context17) {
|
|
51901
|
+
while (1) switch (_context17.prev = _context17.next) {
|
|
51879
51902
|
case 0:
|
|
51880
51903
|
_ref7 = _arguments3.length > 1 && _arguments3[1] !== undefined ? _arguments3[1] : {}, _ref7$removeRelations = _ref7.removeRelationships, removeRelationships = _ref7$removeRelations === void 0 ? true : _ref7$removeRelations;
|
|
51881
51904
|
if (node) {
|
|
51882
|
-
|
|
51905
|
+
_context17.next = 3;
|
|
51883
51906
|
break;
|
|
51884
51907
|
}
|
|
51885
|
-
return
|
|
51908
|
+
return _context17.abrupt("return");
|
|
51886
51909
|
case 3:
|
|
51887
51910
|
if (removeRelationships) {
|
|
51888
|
-
removeNodeFlows(node,
|
|
51889
|
-
removeNodeMessageFlows(node,
|
|
51890
|
-
removeNodeAssociations(node,
|
|
51911
|
+
removeNodeFlows(node, _this30);
|
|
51912
|
+
removeNodeMessageFlows(node, _this30);
|
|
51913
|
+
removeNodeAssociations(node, _this30);
|
|
51891
51914
|
}
|
|
51892
51915
|
removeOutgoingAndIncomingRefsToFlow(node);
|
|
51893
|
-
removeBoundaryEvents(
|
|
51916
|
+
removeBoundaryEvents(_this30.graph, node, _this30.removeNode);
|
|
51894
51917
|
removeSourceDefault(node);
|
|
51895
|
-
|
|
51896
|
-
|
|
51918
|
+
_this30.removeNodesFromLane(node);
|
|
51919
|
+
_this30.removeNodesFromPool(node);
|
|
51897
51920
|
store.commit('removeNode', node);
|
|
51898
|
-
store.commit('highlightNode',
|
|
51899
|
-
|
|
51900
|
-
|
|
51901
|
-
return
|
|
51921
|
+
store.commit('highlightNode', _this30.processNode);
|
|
51922
|
+
_this30.$refs.selector.clearSelection();
|
|
51923
|
+
_context17.next = 14;
|
|
51924
|
+
return _this30.$nextTick();
|
|
51902
51925
|
case 14:
|
|
51903
|
-
|
|
51904
|
-
return
|
|
51926
|
+
_context17.next = 16;
|
|
51927
|
+
return _this30.pushToUndoStack();
|
|
51905
51928
|
case 16:
|
|
51906
51929
|
// force to update the processNode property in every delete
|
|
51907
|
-
|
|
51908
|
-
if (
|
|
51909
|
-
|
|
51910
|
-
return diagram.bpmnElement.id ===
|
|
51930
|
+
_this30.processes = _this30.getProcesses();
|
|
51931
|
+
if (_this30.processes && _this30.processes.length > 0) {
|
|
51932
|
+
_this30.processNode = new Node('processmaker-modeler-process', _this30.processes[0], _this30.planeElements.find(function (diagram) {
|
|
51933
|
+
return diagram.bpmnElement.id === _this30.processes[0].id;
|
|
51911
51934
|
}));
|
|
51912
51935
|
}
|
|
51913
51936
|
case 18:
|
|
51914
51937
|
case "end":
|
|
51915
|
-
return
|
|
51938
|
+
return _context17.stop();
|
|
51916
51939
|
}
|
|
51917
|
-
},
|
|
51940
|
+
}, _callee17);
|
|
51918
51941
|
}))();
|
|
51919
51942
|
},
|
|
51920
51943
|
removeNodes: function removeNodes() {
|
|
51921
|
-
var
|
|
51922
|
-
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
51923
|
-
return _regeneratorRuntime().wrap(function
|
|
51924
|
-
while (1) switch (
|
|
51944
|
+
var _this31 = this;
|
|
51945
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee20() {
|
|
51946
|
+
return _regeneratorRuntime().wrap(function _callee20$(_context20) {
|
|
51947
|
+
while (1) switch (_context20.prev = _context20.next) {
|
|
51925
51948
|
case 0:
|
|
51926
|
-
|
|
51927
|
-
return
|
|
51928
|
-
return _regeneratorRuntime().wrap(function
|
|
51929
|
-
while (1) switch (
|
|
51949
|
+
_context20.next = 2;
|
|
51950
|
+
return _this31.performSingleUndoRedoTransaction( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee19() {
|
|
51951
|
+
return _regeneratorRuntime().wrap(function _callee19$(_context19) {
|
|
51952
|
+
while (1) switch (_context19.prev = _context19.next) {
|
|
51930
51953
|
case 0:
|
|
51931
|
-
|
|
51932
|
-
return
|
|
51954
|
+
_context19.next = 2;
|
|
51955
|
+
return _this31.paperManager.performAtomicAction( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee18() {
|
|
51933
51956
|
var waitPromises;
|
|
51934
|
-
return _regeneratorRuntime().wrap(function
|
|
51935
|
-
while (1) switch (
|
|
51957
|
+
return _regeneratorRuntime().wrap(function _callee18$(_context18) {
|
|
51958
|
+
while (1) switch (_context18.prev = _context18.next) {
|
|
51936
51959
|
case 0:
|
|
51937
51960
|
waitPromises = [];
|
|
51938
|
-
|
|
51939
|
-
return waitPromises.push(
|
|
51961
|
+
_this31.highlightedNodes.forEach(function (node) {
|
|
51962
|
+
return waitPromises.push(_this31.removeNode(node, {
|
|
51940
51963
|
removeRelationships: true
|
|
51941
51964
|
}));
|
|
51942
51965
|
});
|
|
51943
|
-
|
|
51966
|
+
_context18.next = 4;
|
|
51944
51967
|
return Promise.all(waitPromises);
|
|
51945
51968
|
case 4:
|
|
51946
51969
|
store.commit('highlightNode');
|
|
51947
51970
|
case 5:
|
|
51948
51971
|
case "end":
|
|
51949
|
-
return
|
|
51972
|
+
return _context18.stop();
|
|
51950
51973
|
}
|
|
51951
|
-
},
|
|
51974
|
+
}, _callee18);
|
|
51952
51975
|
})));
|
|
51953
51976
|
case 2:
|
|
51954
51977
|
case "end":
|
|
51955
|
-
return
|
|
51978
|
+
return _context19.stop();
|
|
51956
51979
|
}
|
|
51957
|
-
},
|
|
51980
|
+
}, _callee19);
|
|
51958
51981
|
})));
|
|
51959
51982
|
case 2:
|
|
51960
51983
|
case "end":
|
|
51961
|
-
return
|
|
51984
|
+
return _context20.stop();
|
|
51962
51985
|
}
|
|
51963
|
-
},
|
|
51986
|
+
}, _callee20);
|
|
51964
51987
|
}))();
|
|
51965
51988
|
},
|
|
51966
51989
|
replaceNode: function replaceNode(_ref10) {
|
|
51967
|
-
var
|
|
51990
|
+
var _this32 = this;
|
|
51968
51991
|
var node = _ref10.node,
|
|
51969
51992
|
typeToReplaceWith = _ref10.typeToReplaceWith;
|
|
51970
|
-
this.performSingleUndoRedoTransaction( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
51971
|
-
return _regeneratorRuntime().wrap(function
|
|
51972
|
-
while (1) switch (
|
|
51993
|
+
this.performSingleUndoRedoTransaction( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee22() {
|
|
51994
|
+
return _regeneratorRuntime().wrap(function _callee22$(_context22) {
|
|
51995
|
+
while (1) switch (_context22.prev = _context22.next) {
|
|
51973
51996
|
case 0:
|
|
51974
|
-
|
|
51975
|
-
return
|
|
51976
|
-
var
|
|
51977
|
-
return _regeneratorRuntime().wrap(function
|
|
51978
|
-
while (1) switch (
|
|
51997
|
+
_context22.next = 2;
|
|
51998
|
+
return _this32.paperManager.performAtomicAction( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee21() {
|
|
51999
|
+
var _this32$paper$localTo, clientX, clientY, newNode;
|
|
52000
|
+
return _regeneratorRuntime().wrap(function _callee21$(_context21) {
|
|
52001
|
+
while (1) switch (_context21.prev = _context21.next) {
|
|
51979
52002
|
case 0:
|
|
51980
|
-
|
|
51981
|
-
|
|
51982
|
-
return
|
|
52003
|
+
_this32$paper$localTo = _this32.paper.localToClientPoint(node.diagram.bounds), clientX = _this32$paper$localTo.x, clientY = _this32$paper$localTo.y;
|
|
52004
|
+
_context21.next = 3;
|
|
52005
|
+
return _this32.handleDrop({
|
|
51983
52006
|
clientX: clientX,
|
|
51984
52007
|
clientY: clientY,
|
|
51985
52008
|
control: {
|
|
@@ -51988,89 +52011,89 @@ var Selection_component = normalizeComponent(
|
|
|
51988
52011
|
nodeThatWillBeReplaced: node
|
|
51989
52012
|
});
|
|
51990
52013
|
case 3:
|
|
51991
|
-
newNode =
|
|
51992
|
-
|
|
51993
|
-
return
|
|
52014
|
+
newNode = _context21.sent;
|
|
52015
|
+
_context21.next = 6;
|
|
52016
|
+
return _this32.removeNode(node, {
|
|
51994
52017
|
removeRelationships: false
|
|
51995
52018
|
});
|
|
51996
52019
|
case 6:
|
|
51997
|
-
|
|
51998
|
-
|
|
52020
|
+
_this32.highlightNode(newNode);
|
|
52021
|
+
_this32.selectNewNode(newNode);
|
|
51999
52022
|
case 8:
|
|
52000
52023
|
case "end":
|
|
52001
|
-
return
|
|
52024
|
+
return _context21.stop();
|
|
52002
52025
|
}
|
|
52003
|
-
},
|
|
52026
|
+
}, _callee21);
|
|
52004
52027
|
})));
|
|
52005
52028
|
case 2:
|
|
52006
52029
|
case "end":
|
|
52007
|
-
return
|
|
52030
|
+
return _context22.stop();
|
|
52008
52031
|
}
|
|
52009
|
-
},
|
|
52032
|
+
}, _callee22);
|
|
52010
52033
|
})));
|
|
52011
52034
|
},
|
|
52012
52035
|
replaceGenericFlow: function replaceGenericFlow(_ref13) {
|
|
52013
|
-
var
|
|
52036
|
+
var _this33 = this;
|
|
52014
52037
|
var actualFlow = _ref13.actualFlow,
|
|
52015
52038
|
genericFlow = _ref13.genericFlow,
|
|
52016
52039
|
targetNode = _ref13.targetNode;
|
|
52017
|
-
this.performSingleUndoRedoTransaction( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
52018
|
-
return _regeneratorRuntime().wrap(function
|
|
52019
|
-
while (1) switch (
|
|
52040
|
+
this.performSingleUndoRedoTransaction( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee24() {
|
|
52041
|
+
return _regeneratorRuntime().wrap(function _callee24$(_context24) {
|
|
52042
|
+
while (1) switch (_context24.prev = _context24.next) {
|
|
52020
52043
|
case 0:
|
|
52021
|
-
|
|
52022
|
-
return
|
|
52023
|
-
return _regeneratorRuntime().wrap(function
|
|
52024
|
-
while (1) switch (
|
|
52044
|
+
_context24.next = 2;
|
|
52045
|
+
return _this33.paperManager.performAtomicAction( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee23() {
|
|
52046
|
+
return _regeneratorRuntime().wrap(function _callee23$(_context23) {
|
|
52047
|
+
while (1) switch (_context23.prev = _context23.next) {
|
|
52025
52048
|
case 0:
|
|
52026
|
-
|
|
52027
|
-
return
|
|
52049
|
+
_context23.next = 2;
|
|
52050
|
+
return _this33.highlightNode(null);
|
|
52028
52051
|
case 2:
|
|
52029
|
-
|
|
52030
|
-
return
|
|
52052
|
+
_context23.next = 4;
|
|
52053
|
+
return _this33.$nextTick();
|
|
52031
52054
|
case 4:
|
|
52032
|
-
|
|
52033
|
-
return
|
|
52055
|
+
_context23.next = 6;
|
|
52056
|
+
return _this33.addNode(actualFlow);
|
|
52034
52057
|
case 6:
|
|
52035
|
-
|
|
52058
|
+
_context23.next = 8;
|
|
52036
52059
|
return store.commit('removeNode', genericFlow);
|
|
52037
52060
|
case 8:
|
|
52038
|
-
|
|
52039
|
-
return
|
|
52061
|
+
_context23.next = 10;
|
|
52062
|
+
return _this33.$nextTick();
|
|
52040
52063
|
case 10:
|
|
52041
|
-
|
|
52042
|
-
return
|
|
52064
|
+
_context23.next = 12;
|
|
52065
|
+
return _this33.highlightNode(targetNode);
|
|
52043
52066
|
case 12:
|
|
52044
52067
|
case "end":
|
|
52045
|
-
return
|
|
52068
|
+
return _context23.stop();
|
|
52046
52069
|
}
|
|
52047
|
-
},
|
|
52070
|
+
}, _callee23);
|
|
52048
52071
|
})));
|
|
52049
52072
|
case 2:
|
|
52050
52073
|
case "end":
|
|
52051
|
-
return
|
|
52074
|
+
return _context24.stop();
|
|
52052
52075
|
}
|
|
52053
|
-
},
|
|
52076
|
+
}, _callee24);
|
|
52054
52077
|
})));
|
|
52055
52078
|
},
|
|
52056
52079
|
performSingleUndoRedoTransaction: function performSingleUndoRedoTransaction(cb) {
|
|
52057
|
-
var
|
|
52058
|
-
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
52059
|
-
return _regeneratorRuntime().wrap(function
|
|
52060
|
-
while (1) switch (
|
|
52080
|
+
var _this34 = this;
|
|
52081
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee25() {
|
|
52082
|
+
return _regeneratorRuntime().wrap(function _callee25$(_context25) {
|
|
52083
|
+
while (1) switch (_context25.prev = _context25.next) {
|
|
52061
52084
|
case 0:
|
|
52062
52085
|
undoRedoStore.commit('disableSavingState');
|
|
52063
|
-
|
|
52086
|
+
_context25.next = 3;
|
|
52064
52087
|
return cb();
|
|
52065
52088
|
case 3:
|
|
52066
52089
|
undoRedoStore.commit('enableSavingState');
|
|
52067
|
-
|
|
52068
|
-
return
|
|
52090
|
+
_context25.next = 6;
|
|
52091
|
+
return _this34.pushToUndoStack();
|
|
52069
52092
|
case 6:
|
|
52070
52093
|
case "end":
|
|
52071
|
-
return
|
|
52094
|
+
return _context25.stop();
|
|
52072
52095
|
}
|
|
52073
|
-
},
|
|
52096
|
+
}, _callee25);
|
|
52074
52097
|
}))();
|
|
52075
52098
|
},
|
|
52076
52099
|
removeNodesFromLane: function removeNodesFromLane(node) {
|
|
@@ -52083,36 +52106,36 @@ var Selection_component = normalizeComponent(
|
|
|
52083
52106
|
pull_default()(containingLane.get('flowNodeRef'), node.definition);
|
|
52084
52107
|
},
|
|
52085
52108
|
removeNodesFromPool: function removeNodesFromPool(node) {
|
|
52086
|
-
var
|
|
52109
|
+
var _this35 = this;
|
|
52087
52110
|
if (node.type === 'processmaker-modeler-pool' && node.definition.processRef) {
|
|
52088
52111
|
if (node.definition.processRef.artifacts) {
|
|
52089
52112
|
node.definition.processRef.artifacts.forEach(function (artifact) {
|
|
52090
|
-
var nodeToRemove =
|
|
52113
|
+
var nodeToRemove = _this35.nodes.find(function (n) {
|
|
52091
52114
|
return n.definition === artifact;
|
|
52092
52115
|
});
|
|
52093
52116
|
if (nodeToRemove) {
|
|
52094
|
-
|
|
52117
|
+
_this35.removeNode(nodeToRemove);
|
|
52095
52118
|
}
|
|
52096
52119
|
});
|
|
52097
52120
|
}
|
|
52098
52121
|
if (node.definition.processRef.flowElements) {
|
|
52099
52122
|
node.definition.processRef.flowElements.forEach(function (flowElement) {
|
|
52100
|
-
var nodeToRemove =
|
|
52123
|
+
var nodeToRemove = _this35.nodes.find(function (n) {
|
|
52101
52124
|
return n.definition === flowElement;
|
|
52102
52125
|
});
|
|
52103
52126
|
if (nodeToRemove) {
|
|
52104
|
-
|
|
52127
|
+
_this35.removeNode(nodeToRemove);
|
|
52105
52128
|
}
|
|
52106
52129
|
});
|
|
52107
52130
|
}
|
|
52108
52131
|
var laneSets = node.definition.processRef.laneSets;
|
|
52109
52132
|
if (!!laneSets && laneSets.length > 0) {
|
|
52110
52133
|
laneSets[0].lanes.forEach(function (lane) {
|
|
52111
|
-
var nodeToRemove =
|
|
52134
|
+
var nodeToRemove = _this35.nodes.find(function (n) {
|
|
52112
52135
|
return n.definition === lane;
|
|
52113
52136
|
});
|
|
52114
52137
|
if (nodeToRemove) {
|
|
52115
|
-
|
|
52138
|
+
_this35.removeNode(nodeToRemove);
|
|
52116
52139
|
}
|
|
52117
52140
|
});
|
|
52118
52141
|
}
|
|
@@ -52140,13 +52163,13 @@ var Selection_component = normalizeComponent(
|
|
|
52140
52163
|
return shape.component != null;
|
|
52141
52164
|
},
|
|
52142
52165
|
setShapeStacking: function setShapeStacking(shape) {
|
|
52143
|
-
var
|
|
52166
|
+
var _this36 = this;
|
|
52144
52167
|
if (this.isRendering || !shape.component.node.isType('processmaker-modeler-pool') && shape === this.previouslyStackedShape) {
|
|
52145
52168
|
return;
|
|
52146
52169
|
}
|
|
52147
52170
|
this.previouslyStackedShape = shape;
|
|
52148
52171
|
this.paperManager.performAtomicAction(function () {
|
|
52149
|
-
return ensureShapeIsNotCovered(shape,
|
|
52172
|
+
return ensureShapeIsNotCovered(shape, _this36.graph);
|
|
52150
52173
|
});
|
|
52151
52174
|
},
|
|
52152
52175
|
showSavedNotification: function showSavedNotification() {
|
|
@@ -52180,49 +52203,49 @@ var Selection_component = normalizeComponent(
|
|
|
52180
52203
|
return false;
|
|
52181
52204
|
},
|
|
52182
52205
|
pointerDowInShape: function pointerDowInShape(event, element) {
|
|
52183
|
-
var
|
|
52184
|
-
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
52206
|
+
var _this37 = this;
|
|
52207
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee26() {
|
|
52185
52208
|
var x, y, shapeView;
|
|
52186
|
-
return _regeneratorRuntime().wrap(function
|
|
52187
|
-
while (1) switch (
|
|
52209
|
+
return _regeneratorRuntime().wrap(function _callee26$(_context26) {
|
|
52210
|
+
while (1) switch (_context26.prev = _context26.next) {
|
|
52188
52211
|
case 0:
|
|
52189
52212
|
x = event.clientX, y = event.clientY;
|
|
52190
|
-
shapeView =
|
|
52191
|
-
|
|
52192
|
-
|
|
52193
|
-
|
|
52194
|
-
|
|
52213
|
+
shapeView = _this37.paper.findViewByModel(element);
|
|
52214
|
+
_this37.isDragging = false;
|
|
52215
|
+
_this37.isSelecting = false;
|
|
52216
|
+
_this37.isIntoTheSelection = false;
|
|
52217
|
+
_this37.dragStart = {
|
|
52195
52218
|
x: x,
|
|
52196
52219
|
y: y
|
|
52197
52220
|
};
|
|
52198
52221
|
// Verify if is in the selection box
|
|
52199
|
-
if (!
|
|
52200
|
-
|
|
52222
|
+
if (!_this37.isPointInSelection(event)) {
|
|
52223
|
+
_context26.next = 10;
|
|
52201
52224
|
break;
|
|
52202
52225
|
}
|
|
52203
|
-
|
|
52204
|
-
|
|
52226
|
+
_this37.isIntoTheSelection = true;
|
|
52227
|
+
_context26.next = 15;
|
|
52205
52228
|
break;
|
|
52206
52229
|
case 10:
|
|
52207
52230
|
if (event.shiftKey) {
|
|
52208
|
-
|
|
52231
|
+
_context26.next = 15;
|
|
52209
52232
|
break;
|
|
52210
52233
|
}
|
|
52211
|
-
|
|
52212
|
-
return
|
|
52234
|
+
_context26.next = 13;
|
|
52235
|
+
return _this37.$refs.selector.selectElement(shapeView);
|
|
52213
52236
|
case 13:
|
|
52214
|
-
|
|
52215
|
-
return
|
|
52237
|
+
_context26.next = 15;
|
|
52238
|
+
return _this37.$nextTick();
|
|
52216
52239
|
case 15:
|
|
52217
|
-
|
|
52240
|
+
_this37.$refs.selector.startDrag({
|
|
52218
52241
|
clientX: event.clientX,
|
|
52219
52242
|
clientY: event.clientY
|
|
52220
52243
|
});
|
|
52221
52244
|
case 16:
|
|
52222
52245
|
case "end":
|
|
52223
|
-
return
|
|
52246
|
+
return _context26.stop();
|
|
52224
52247
|
}
|
|
52225
|
-
},
|
|
52248
|
+
}, _callee26);
|
|
52226
52249
|
}))();
|
|
52227
52250
|
},
|
|
52228
52251
|
pointerDownHandler: function pointerDownHandler(event) {
|
|
@@ -52322,7 +52345,7 @@ var Selection_component = normalizeComponent(
|
|
|
52322
52345
|
this.$emit('set-xml-manager', this.xmlManager);
|
|
52323
52346
|
},
|
|
52324
52347
|
mounted: function mounted() {
|
|
52325
|
-
var
|
|
52348
|
+
var _this38 = this;
|
|
52326
52349
|
store.commit('setReadOnly', this.readOnly);
|
|
52327
52350
|
this.graph = new external_jointjs_.dia.Graph();
|
|
52328
52351
|
store.commit('setGraph', this.graph);
|
|
@@ -52341,47 +52364,47 @@ var Selection_component = normalizeComponent(
|
|
|
52341
52364
|
store.commit('setPaper', this.paperManager.paper);
|
|
52342
52365
|
this.paperManager.addEventHandler('element:pointerclick', this.blurFocusedScreenBuilderElement, this);
|
|
52343
52366
|
this.paperManager.addEventHandler('blank:pointerdown', function (event, x, y) {
|
|
52344
|
-
if (
|
|
52367
|
+
if (_this38.isGrabbing) return;
|
|
52345
52368
|
if (store.getters.isReadOnly) {
|
|
52346
|
-
|
|
52369
|
+
_this38.isGrabbing = true;
|
|
52347
52370
|
}
|
|
52348
|
-
var scale =
|
|
52349
|
-
|
|
52371
|
+
var scale = _this38.paperManager.scale;
|
|
52372
|
+
_this38.canvasDragPosition = {
|
|
52350
52373
|
x: x * scale.sx,
|
|
52351
52374
|
y: y * scale.sy
|
|
52352
52375
|
};
|
|
52353
|
-
|
|
52354
|
-
|
|
52376
|
+
_this38.isOverShape = false;
|
|
52377
|
+
_this38.pointerDownHandler(event);
|
|
52355
52378
|
}, this);
|
|
52356
52379
|
this.paperManager.addEventHandler('cell:mouseover element:mouseover', function (_ref17) {
|
|
52357
52380
|
var shape = _ref17.model;
|
|
52358
|
-
if (
|
|
52381
|
+
if (_this38.isBpmnNode(shape) && shape.attr('body/cursor') !== 'default' && !_this38.isGrabbing) {
|
|
52359
52382
|
shape.attr('body/cursor', 'move');
|
|
52360
52383
|
}
|
|
52361
52384
|
// If the user is panning the Paper while hovering an element, ignore the default move cursor
|
|
52362
|
-
if (
|
|
52385
|
+
if (_this38.isGrabbing && _this38.isBpmnNode(shape)) {
|
|
52363
52386
|
shape.attr('body/cursor', 'grabbing');
|
|
52364
52387
|
}
|
|
52365
52388
|
});
|
|
52366
52389
|
this.paperManager.addEventHandler('blank:pointerup', function (event) {
|
|
52367
|
-
|
|
52368
|
-
|
|
52369
|
-
|
|
52370
|
-
|
|
52390
|
+
_this38.isGrabbing = false;
|
|
52391
|
+
_this38.canvasDragPosition = null;
|
|
52392
|
+
_this38.activeNode = null;
|
|
52393
|
+
_this38.pointerUpHandler(event);
|
|
52371
52394
|
}, this);
|
|
52372
52395
|
this.paperManager.addEventHandler('cell:pointerup', function (cellView, event) {
|
|
52373
|
-
|
|
52374
|
-
|
|
52375
|
-
|
|
52396
|
+
_this38.canvasDragPosition = null;
|
|
52397
|
+
_this38.activeNode = null;
|
|
52398
|
+
_this38.pointerUpHandler(event, cellView);
|
|
52376
52399
|
}, this);
|
|
52377
52400
|
this.$refs['paper-container'].addEventListener('mouseenter', function () {
|
|
52378
52401
|
store.commit('setClientLeftPaper', false);
|
|
52379
52402
|
});
|
|
52380
52403
|
this.$el.addEventListener('mousemove', function (event) {
|
|
52381
|
-
|
|
52404
|
+
_this38.pointerMoveHandler(event);
|
|
52382
52405
|
});
|
|
52383
52406
|
this.$refs['paper-container'].addEventListener('mouseleave', function () {
|
|
52384
|
-
|
|
52407
|
+
_this38.paperManager.removeEventHandler('blank:pointermove');
|
|
52385
52408
|
store.commit('setClientLeftPaper', true);
|
|
52386
52409
|
});
|
|
52387
52410
|
this.paperManager.addEventHandler('cell:pointerclick', function (cellView, evt, x, y) {
|
|
@@ -52392,44 +52415,44 @@ var Selection_component = normalizeComponent(
|
|
|
52392
52415
|
});
|
|
52393
52416
|
this.paperManager.addEventHandler('cell:pointerclick', function (_ref18, event) {
|
|
52394
52417
|
var shape = _ref18.model;
|
|
52395
|
-
if (!
|
|
52418
|
+
if (!_this38.isBpmnNode(shape)) {
|
|
52396
52419
|
return;
|
|
52397
52420
|
}
|
|
52398
52421
|
|
|
52399
52422
|
// ignore click event if the user is Grabbing the paper
|
|
52400
|
-
if (
|
|
52423
|
+
if (_this38.isGrabbing) return;
|
|
52401
52424
|
shape.component.$emit('click', event);
|
|
52402
|
-
|
|
52425
|
+
_this38.$emit('click', {
|
|
52403
52426
|
event: event,
|
|
52404
|
-
node:
|
|
52427
|
+
node: _this38.highlightedNode.definition
|
|
52405
52428
|
});
|
|
52406
52429
|
});
|
|
52407
52430
|
this.paperManager.addEventHandler('cell:pointerdown', function (_ref19, event) {
|
|
52408
52431
|
var shape = _ref19.model;
|
|
52409
|
-
if (!
|
|
52432
|
+
if (!_this38.isBpmnNode(shape)) {
|
|
52410
52433
|
return;
|
|
52411
52434
|
}
|
|
52412
52435
|
// If the user is pressing Space (grabbing) and clicking on a Cell, return
|
|
52413
|
-
if (
|
|
52436
|
+
if (_this38.isGrabbing) {
|
|
52414
52437
|
return;
|
|
52415
52438
|
}
|
|
52416
|
-
|
|
52417
|
-
|
|
52418
|
-
|
|
52419
|
-
|
|
52439
|
+
_this38.setShapeStacking(shape);
|
|
52440
|
+
_this38.activeNode = shape.component.node;
|
|
52441
|
+
_this38.isOverShape = true;
|
|
52442
|
+
_this38.pointerDowInShape(event, shape);
|
|
52420
52443
|
});
|
|
52421
52444
|
// If the user is grabbing the paper while he clicked in a cell, move the paper and not the cell
|
|
52422
52445
|
this.paperManager.addEventHandler('cell:pointermove', function (_, event, x, y) {
|
|
52423
|
-
if (
|
|
52424
|
-
if (!
|
|
52425
|
-
var scale =
|
|
52426
|
-
|
|
52446
|
+
if (_this38.isGrabbing) {
|
|
52447
|
+
if (!_this38.canvasDragPosition) {
|
|
52448
|
+
var scale = _this38.paperManager.scale;
|
|
52449
|
+
_this38.canvasDragPosition = {
|
|
52427
52450
|
x: x * scale.sx,
|
|
52428
52451
|
y: y * scale.sy
|
|
52429
52452
|
};
|
|
52430
52453
|
}
|
|
52431
|
-
if (
|
|
52432
|
-
|
|
52454
|
+
if (_this38.canvasDragPosition && !_this38.clientLeftPaper) {
|
|
52455
|
+
_this38.paperManager.translate(event.offsetX - _this38.canvasDragPosition.x, event.offsetY - _this38.canvasDragPosition.y);
|
|
52433
52456
|
}
|
|
52434
52457
|
}
|
|
52435
52458
|
});
|
|
@@ -52437,20 +52460,20 @@ var Selection_component = normalizeComponent(
|
|
|
52437
52460
|
/* Register custom nodes */
|
|
52438
52461
|
window.ProcessMaker.EventBus.$emit('modeler-start', {
|
|
52439
52462
|
loadXML: function () {
|
|
52440
|
-
var _loadXML = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
52441
|
-
return _regeneratorRuntime().wrap(function
|
|
52442
|
-
while (1) switch (
|
|
52463
|
+
var _loadXML = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee27(xml) {
|
|
52464
|
+
return _regeneratorRuntime().wrap(function _callee27$(_context27) {
|
|
52465
|
+
while (1) switch (_context27.prev = _context27.next) {
|
|
52443
52466
|
case 0:
|
|
52444
|
-
|
|
52445
|
-
return
|
|
52467
|
+
_context27.next = 2;
|
|
52468
|
+
return _this38.loadXML(xml);
|
|
52446
52469
|
case 2:
|
|
52447
|
-
|
|
52470
|
+
_context27.next = 4;
|
|
52448
52471
|
return undoRedoStore.dispatch('pushState', xml);
|
|
52449
52472
|
case 4:
|
|
52450
52473
|
case "end":
|
|
52451
|
-
return
|
|
52474
|
+
return _context27.stop();
|
|
52452
52475
|
}
|
|
52453
|
-
},
|
|
52476
|
+
}, _callee27);
|
|
52454
52477
|
}));
|
|
52455
52478
|
function loadXML(_x) {
|
|
52456
52479
|
return _loadXML.apply(this, arguments);
|
|
@@ -52458,10 +52481,10 @@ var Selection_component = normalizeComponent(
|
|
|
52458
52481
|
return loadXML;
|
|
52459
52482
|
}(),
|
|
52460
52483
|
addWarnings: function addWarnings(warnings) {
|
|
52461
|
-
return
|
|
52484
|
+
return _this38.$emit('warnings', warnings);
|
|
52462
52485
|
},
|
|
52463
52486
|
addBreadcrumbs: function addBreadcrumbs(breadcrumbs) {
|
|
52464
|
-
return
|
|
52487
|
+
return _this38.breadcrumbData.push(breadcrumbs);
|
|
52465
52488
|
}
|
|
52466
52489
|
});
|
|
52467
52490
|
}
|
|
@@ -52483,8 +52506,8 @@ var modelervue_type_style_index_0_prod_lang_scss_ = __webpack_require__(26695);
|
|
|
52483
52506
|
|
|
52484
52507
|
var Modeler_component = normalizeComponent(
|
|
52485
52508
|
modeler_Modelervue_type_script_lang_js_,
|
|
52486
|
-
|
|
52487
|
-
|
|
52509
|
+
Modelervue_type_template_id_84267fa8_render,
|
|
52510
|
+
Modelervue_type_template_id_84267fa8_staticRenderFns,
|
|
52488
52511
|
false,
|
|
52489
52512
|
null,
|
|
52490
52513
|
null,
|