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