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