@processmaker/modeler 1.39.20 → 1.39.22
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 +641 -457
- package/dist/modeler.common.js.map +1 -1
- package/dist/modeler.umd.js +641 -457
- package/dist/modeler.umd.js.map +1 -1
- package/dist/modeler.umd.min.js +3 -3
- package/dist/modeler.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/src/components/crown/crownButtons/crownBoundaryEventDropdown.vue +1 -0
- package/src/components/crown/crownButtons/crownColorDropdown.vue +2 -1
- package/src/components/modeler/Modeler.vue +58 -27
- package/src/components/modeler/Selection.vue +41 -1
- package/src/components/nodes/boundaryEvent/boundaryEvent.vue +24 -0
- package/src/multiplayer/multiplayer.js +63 -7
package/dist/modeler.umd.js
CHANGED
|
@@ -12828,7 +12828,7 @@ ___CSS_LOADER_EXPORT___.push([module.id, ".weekday[data-v-4ae18478]{padding:.75e
|
|
|
12828
12828
|
|
|
12829
12829
|
/***/ }),
|
|
12830
12830
|
|
|
12831
|
-
/***/
|
|
12831
|
+
/***/ 99586:
|
|
12832
12832
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
12833
12833
|
|
|
12834
12834
|
"use strict";
|
|
@@ -12842,7 +12842,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
12842
12842
|
|
|
12843
12843
|
var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
|
|
12844
12844
|
// Module
|
|
12845
|
-
___CSS_LOADER_EXPORT___.push([module.id, ".box[data-v-
|
|
12845
|
+
___CSS_LOADER_EXPORT___.push([module.id, ".box[data-v-7c27567b]{border:1px solid #5faaee;position:absolute;pointer-events:none}", ""]);
|
|
12846
12846
|
// Exports
|
|
12847
12847
|
/* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___);
|
|
12848
12848
|
|
|
@@ -13000,7 +13000,7 @@ ___CSS_LOADER_EXPORT___.push([module.id, ".crown-button[data-v-09d8a8ac]{border:
|
|
|
13000
13000
|
|
|
13001
13001
|
/***/ }),
|
|
13002
13002
|
|
|
13003
|
-
/***/
|
|
13003
|
+
/***/ 43647:
|
|
13004
13004
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
13005
13005
|
|
|
13006
13006
|
"use strict";
|
|
@@ -13019,7 +13019,7 @@ var ___CSS_LOADER_URL_IMPORT_0___ = new URL(/* asset import */ __webpack_require
|
|
|
13019
13019
|
var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
|
|
13020
13020
|
var ___CSS_LOADER_URL_REPLACEMENT_0___ = _node_modules_css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_2___default()(___CSS_LOADER_URL_IMPORT_0___);
|
|
13021
13021
|
// Module
|
|
13022
|
-
___CSS_LOADER_EXPORT___.push([module.id, ".color-list[data-v-
|
|
13022
|
+
___CSS_LOADER_EXPORT___.push([module.id, ".color-list[data-v-76b859ea]{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:repeat(5,1fr);grid-auto-flow:column;grid-gap:.5rem;padding:.5rem}.color-list>.color-button[data-v-76b859ea]{background:#fff;width:1.75rem;height:1.75rem;border-radius:50%;border:2px solid #fff;position:relative}.color-picker[data-v-76b859ea]{position:absolute;right:40px;top:calc(100% - 36px)}.toggle-picker[data-v-76b859ea]{background:50%/cover no-repeat url(" + ___CSS_LOADER_URL_REPLACEMENT_0___ + ")!important}", ""]);
|
|
13023
13023
|
// Exports
|
|
13024
13024
|
/* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___);
|
|
13025
13025
|
|
|
@@ -26441,19 +26441,19 @@ var update = add("a84bfd8c", content, true, {"sourceMap":false,"shadowMode":fals
|
|
|
26441
26441
|
|
|
26442
26442
|
/***/ }),
|
|
26443
26443
|
|
|
26444
|
-
/***/
|
|
26444
|
+
/***/ 93416:
|
|
26445
26445
|
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
|
26446
26446
|
|
|
26447
26447
|
// style-loader: Adds some css to the DOM by adding a <style> tag
|
|
26448
26448
|
|
|
26449
26449
|
// load the styles
|
|
26450
|
-
var content = __webpack_require__(
|
|
26450
|
+
var content = __webpack_require__(99586);
|
|
26451
26451
|
if(content.__esModule) content = content.default;
|
|
26452
26452
|
if(typeof content === 'string') content = [[module.id, content, '']];
|
|
26453
26453
|
if(content.locals) module.exports = content.locals;
|
|
26454
26454
|
// add the styles to the DOM
|
|
26455
26455
|
var add = (__webpack_require__(54402)/* ["default"] */ .Z)
|
|
26456
|
-
var update = add("
|
|
26456
|
+
var update = add("15698e7b", content, true, {"sourceMap":false,"shadowMode":false});
|
|
26457
26457
|
|
|
26458
26458
|
/***/ }),
|
|
26459
26459
|
|
|
@@ -26553,19 +26553,19 @@ var update = add("6ffce0d4", content, true, {"sourceMap":false,"shadowMode":fals
|
|
|
26553
26553
|
|
|
26554
26554
|
/***/ }),
|
|
26555
26555
|
|
|
26556
|
-
/***/
|
|
26556
|
+
/***/ 73742:
|
|
26557
26557
|
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
|
26558
26558
|
|
|
26559
26559
|
// style-loader: Adds some css to the DOM by adding a <style> tag
|
|
26560
26560
|
|
|
26561
26561
|
// load the styles
|
|
26562
|
-
var content = __webpack_require__(
|
|
26562
|
+
var content = __webpack_require__(43647);
|
|
26563
26563
|
if(content.__esModule) content = content.default;
|
|
26564
26564
|
if(typeof content === 'string') content = [[module.id, content, '']];
|
|
26565
26565
|
if(content.locals) module.exports = content.locals;
|
|
26566
26566
|
// add the styles to the DOM
|
|
26567
26567
|
var add = (__webpack_require__(54402)/* ["default"] */ .Z)
|
|
26568
|
-
var update = add("
|
|
26568
|
+
var update = add("2259f20f", content, true, {"sourceMap":false,"shadowMode":false});
|
|
26569
26569
|
|
|
26570
26570
|
/***/ }),
|
|
26571
26571
|
|
|
@@ -34891,8 +34891,8 @@ var crownTaskDropdown_component = normalizeComponent(
|
|
|
34891
34891
|
)
|
|
34892
34892
|
|
|
34893
34893
|
/* harmony default export */ var crownTaskDropdown = (crownTaskDropdown_component.exports);
|
|
34894
|
-
;// 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/crown/crownButtons/crownBoundaryEventDropdown.vue?vue&type=template&id=
|
|
34895
|
-
var
|
|
34894
|
+
;// 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/crown/crownButtons/crownBoundaryEventDropdown.vue?vue&type=template&id=e00dd116&
|
|
34895
|
+
var crownBoundaryEventDropdownvue_type_template_id_e00dd116_render = function render() {
|
|
34896
34896
|
var _vm = this,
|
|
34897
34897
|
_c = _vm._self._c;
|
|
34898
34898
|
return _vm.dropdownData.length > 0 ? _c('div', {
|
|
@@ -34968,7 +34968,7 @@ var crownBoundaryEventDropdownvue_type_template_id_125b7b60_render = function re
|
|
|
34968
34968
|
}, [_vm._v(" " + _vm._s(_vm.getErrorTooltipText(disabledLabel)) + " ")]) : _vm._e()], 1);
|
|
34969
34969
|
}), 0) : _vm._e()], 1) : _vm._e();
|
|
34970
34970
|
};
|
|
34971
|
-
var
|
|
34971
|
+
var crownBoundaryEventDropdownvue_type_template_id_e00dd116_staticRenderFns = [];
|
|
34972
34972
|
|
|
34973
34973
|
;// CONCATENATED MODULE: ./src/assets/boundary-event.svg
|
|
34974
34974
|
var boundary_event_namespaceObject = __webpack_require__.p + "img/boundary-event.40a868e9.svg";
|
|
@@ -35048,6 +35048,7 @@ function spaceAvailable(dropTarget) {
|
|
|
35048
35048
|
diagram.bounds.y = emptyPort.y - diagram.bounds.height / 2;
|
|
35049
35049
|
var node = new Node(nodeType, definition, diagram);
|
|
35050
35050
|
node.pool = this.node.pool;
|
|
35051
|
+
node.fromCrown = true;
|
|
35051
35052
|
store.commit('highlightNode', node);
|
|
35052
35053
|
this.$emit('add-node', node);
|
|
35053
35054
|
}
|
|
@@ -35074,8 +35075,8 @@ var crownDropdownvue_type_style_index_0_prod_lang_scss_ = __webpack_require__(87
|
|
|
35074
35075
|
|
|
35075
35076
|
var crownBoundaryEventDropdown_component = normalizeComponent(
|
|
35076
35077
|
crownButtons_crownBoundaryEventDropdownvue_type_script_lang_js_,
|
|
35077
|
-
|
|
35078
|
-
|
|
35078
|
+
crownBoundaryEventDropdownvue_type_template_id_e00dd116_render,
|
|
35079
|
+
crownBoundaryEventDropdownvue_type_template_id_e00dd116_staticRenderFns,
|
|
35079
35080
|
false,
|
|
35080
35081
|
null,
|
|
35081
35082
|
null,
|
|
@@ -35084,9 +35085,9 @@ var crownBoundaryEventDropdown_component = normalizeComponent(
|
|
|
35084
35085
|
)
|
|
35085
35086
|
|
|
35086
35087
|
/* harmony default export */ var crownBoundaryEventDropdown = (crownBoundaryEventDropdown_component.exports);
|
|
35087
|
-
;// 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/crown/crownButtons/crownColorDropdown.vue?vue&type=template&id=
|
|
35088
|
+
;// 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/crown/crownButtons/crownColorDropdown.vue?vue&type=template&id=76b859ea&scoped=true&
|
|
35088
35089
|
|
|
35089
|
-
var
|
|
35090
|
+
var crownColorDropdownvue_type_template_id_76b859ea_scoped_true_render = function render() {
|
|
35090
35091
|
var _vm = this,
|
|
35091
35092
|
_c = _vm._self._c;
|
|
35092
35093
|
return !_vm.hide ? _c('div', {
|
|
@@ -35213,9 +35214,9 @@ var crownColorDropdownvue_type_template_id_76ef27c6_scoped_true_render = functio
|
|
|
35213
35214
|
}
|
|
35214
35215
|
})], 1)])], 1) : _vm._e();
|
|
35215
35216
|
};
|
|
35216
|
-
var
|
|
35217
|
+
var crownColorDropdownvue_type_template_id_76b859ea_scoped_true_staticRenderFns = [];
|
|
35217
35218
|
|
|
35218
|
-
;// CONCATENATED MODULE: ./src/components/crown/crownButtons/crownColorDropdown.vue?vue&type=template&id=
|
|
35219
|
+
;// CONCATENATED MODULE: ./src/components/crown/crownButtons/crownColorDropdown.vue?vue&type=template&id=76b859ea&scoped=true&
|
|
35219
35220
|
|
|
35220
35221
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/web.btoa.js
|
|
35221
35222
|
var web_btoa = __webpack_require__(27479);
|
|
@@ -35877,6 +35878,7 @@ var free_solid_svg_icons_ = __webpack_require__(9943);
|
|
|
35877
35878
|
this.resetCustomIcon();
|
|
35878
35879
|
},
|
|
35879
35880
|
setNodeColor: function setNodeColor(color) {
|
|
35881
|
+
var _this$node$definition;
|
|
35880
35882
|
store.commit('updateNodeProp', {
|
|
35881
35883
|
node: this.node,
|
|
35882
35884
|
key: 'color',
|
|
@@ -35893,7 +35895,8 @@ var free_solid_svg_icons_ = __webpack_require__(9943);
|
|
|
35893
35895
|
height: this.node.diagram.bounds.height,
|
|
35894
35896
|
width: this.node.diagram.bounds.width,
|
|
35895
35897
|
type: this.node.type,
|
|
35896
|
-
id: this.node.definition.id
|
|
35898
|
+
id: this.node.definition.id,
|
|
35899
|
+
attachedToRefId: (_this$node$definition = this.node.definition.get('attachedToRef')) === null || _this$node$definition === void 0 ? void 0 : _this$node$definition.id
|
|
35897
35900
|
}
|
|
35898
35901
|
};
|
|
35899
35902
|
window.ProcessMaker.EventBus.$emit('multiplayer-updateNodes', [properties]);
|
|
@@ -35947,9 +35950,9 @@ var free_solid_svg_icons_ = __webpack_require__(9943);
|
|
|
35947
35950
|
});
|
|
35948
35951
|
;// CONCATENATED MODULE: ./src/components/crown/crownButtons/crownColorDropdown.vue?vue&type=script&lang=js&
|
|
35949
35952
|
/* harmony default export */ var crownButtons_crownColorDropdownvue_type_script_lang_js_ = (crownColorDropdownvue_type_script_lang_js_);
|
|
35950
|
-
// EXTERNAL MODULE: ./node_modules/vue-style-loader/index.js??clonedRuleSet-65.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-65.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/@vue/cli-service/node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-65.use[2]!./node_modules/@vue/cli-service/node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-65.use[3]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-65.use[4]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/crown/crownButtons/crownColorDropdown.vue?vue&type=style&index=0&id=
|
|
35951
|
-
var
|
|
35952
|
-
;// CONCATENATED MODULE: ./src/components/crown/crownButtons/crownColorDropdown.vue?vue&type=style&index=0&id=
|
|
35953
|
+
// EXTERNAL MODULE: ./node_modules/vue-style-loader/index.js??clonedRuleSet-65.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-65.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/@vue/cli-service/node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-65.use[2]!./node_modules/@vue/cli-service/node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-65.use[3]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-65.use[4]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/crown/crownButtons/crownColorDropdown.vue?vue&type=style&index=0&id=76b859ea&prod&lang=scss&scoped=true&
|
|
35954
|
+
var crownColorDropdownvue_type_style_index_0_id_76b859ea_prod_lang_scss_scoped_true_ = __webpack_require__(73742);
|
|
35955
|
+
;// CONCATENATED MODULE: ./src/components/crown/crownButtons/crownColorDropdown.vue?vue&type=style&index=0&id=76b859ea&prod&lang=scss&scoped=true&
|
|
35953
35956
|
|
|
35954
35957
|
;// CONCATENATED MODULE: ./src/components/crown/crownButtons/crownColorDropdown.vue
|
|
35955
35958
|
|
|
@@ -35962,11 +35965,11 @@ var crownColorDropdownvue_type_style_index_0_id_76ef27c6_prod_lang_scss_scoped_t
|
|
|
35962
35965
|
|
|
35963
35966
|
var crownColorDropdown_component = normalizeComponent(
|
|
35964
35967
|
crownButtons_crownColorDropdownvue_type_script_lang_js_,
|
|
35965
|
-
|
|
35966
|
-
|
|
35968
|
+
crownColorDropdownvue_type_template_id_76b859ea_scoped_true_render,
|
|
35969
|
+
crownColorDropdownvue_type_template_id_76b859ea_scoped_true_staticRenderFns,
|
|
35967
35970
|
false,
|
|
35968
35971
|
null,
|
|
35969
|
-
"
|
|
35972
|
+
"76b859ea",
|
|
35970
35973
|
null
|
|
35971
35974
|
|
|
35972
35975
|
)
|
|
@@ -47786,10 +47789,10 @@ var ValidationStatus_component = normalizeComponent(
|
|
|
47786
47789
|
)
|
|
47787
47790
|
|
|
47788
47791
|
/* harmony default export */ var ValidationStatus = (ValidationStatus_component.exports);
|
|
47789
|
-
;// 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=
|
|
47792
|
+
;// 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=0e494be6&
|
|
47790
47793
|
|
|
47791
47794
|
|
|
47792
|
-
var
|
|
47795
|
+
var Modelervue_type_template_id_0e494be6_render = function render() {
|
|
47793
47796
|
var _vm = this,
|
|
47794
47797
|
_c = _vm._self._c;
|
|
47795
47798
|
return _c('span', {
|
|
@@ -48008,12 +48011,12 @@ var Modelervue_type_template_id_83a477c8_render = function render() {
|
|
|
48008
48011
|
}
|
|
48009
48012
|
}) : _vm._e()], 2)], 1);
|
|
48010
48013
|
};
|
|
48011
|
-
var
|
|
48014
|
+
var Modelervue_type_template_id_0e494be6_staticRenderFns = [];
|
|
48012
48015
|
|
|
48013
|
-
;// CONCATENATED MODULE: ./src/components/modeler/Modeler.vue?vue&type=template&id=
|
|
48016
|
+
;// CONCATENATED MODULE: ./src/components/modeler/Modeler.vue?vue&type=template&id=0e494be6&
|
|
48014
48017
|
|
|
48015
|
-
;// 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=
|
|
48016
|
-
var
|
|
48018
|
+
;// 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=58bceaa8&
|
|
48019
|
+
var boundaryEventvue_type_template_id_58bceaa8_render = function render() {
|
|
48017
48020
|
var _vm = this,
|
|
48018
48021
|
_c = _vm._self._c;
|
|
48019
48022
|
return _c('crown-config', _vm._g({
|
|
@@ -48032,7 +48035,7 @@ var boundaryEventvue_type_template_id_2979ecac_render = function render() {
|
|
|
48032
48035
|
}
|
|
48033
48036
|
}, _vm.$listeners));
|
|
48034
48037
|
};
|
|
48035
|
-
var
|
|
48038
|
+
var boundaryEventvue_type_template_id_58bceaa8_staticRenderFns = [];
|
|
48036
48039
|
|
|
48037
48040
|
;// CONCATENATED MODULE: ./src/components/nodes/boundaryEvent/shape.js
|
|
48038
48041
|
|
|
@@ -48262,6 +48265,26 @@ var boundaryEventvue_type_template_id_2979ecac_staticRenderFns = [];
|
|
|
48262
48265
|
resetShapeColor(this.invalidTargetElement);
|
|
48263
48266
|
}
|
|
48264
48267
|
this.invalidTargetElement = targetElement;
|
|
48268
|
+
},
|
|
48269
|
+
addMultiplayerBoundaryEvent: function addMultiplayerBoundaryEvent() {
|
|
48270
|
+
var _this$node$definition;
|
|
48271
|
+
var control = {
|
|
48272
|
+
bpmnType: this.node.diagram.$type,
|
|
48273
|
+
id: this.node.diagram.id,
|
|
48274
|
+
type: this.node.type,
|
|
48275
|
+
attachedToRef: this.node.definition.get('attachedToRef')
|
|
48276
|
+
};
|
|
48277
|
+
window.ProcessMaker.EventBus.$emit('multiplayer-addBoundaryEvent', {
|
|
48278
|
+
x: this.node.diagram.bounds.x,
|
|
48279
|
+
y: this.node.diagram.bounds.y,
|
|
48280
|
+
height: this.node.diagram.bounds.height,
|
|
48281
|
+
width: this.node.diagram.bounds.width,
|
|
48282
|
+
attachedToRefId: (_this$node$definition = this.node.definition.get('attachedToRef')) === null || _this$node$definition === void 0 ? void 0 : _this$node$definition.id,
|
|
48283
|
+
control: control,
|
|
48284
|
+
type: this.node.type,
|
|
48285
|
+
id: this.node.definition.id,
|
|
48286
|
+
color: this.node.definition.get('color')
|
|
48287
|
+
});
|
|
48265
48288
|
}
|
|
48266
48289
|
},
|
|
48267
48290
|
mounted: function mounted() {
|
|
@@ -48281,7 +48304,10 @@ var boundaryEventvue_type_template_id_2979ecac_staticRenderFns = [];
|
|
|
48281
48304
|
task = _this2.getTaskUnderShape();
|
|
48282
48305
|
_this2.attachBoundaryEventToTask(task);
|
|
48283
48306
|
_this2.updateShapePosition(task);
|
|
48284
|
-
|
|
48307
|
+
if (_this2.node.fromCrown) {
|
|
48308
|
+
_this2.addMultiplayerBoundaryEvent();
|
|
48309
|
+
}
|
|
48310
|
+
case 10:
|
|
48285
48311
|
case "end":
|
|
48286
48312
|
return _context.stop();
|
|
48287
48313
|
}
|
|
@@ -48301,8 +48327,8 @@ var boundaryEventvue_type_template_id_2979ecac_staticRenderFns = [];
|
|
|
48301
48327
|
;
|
|
48302
48328
|
var boundaryEvent_component = normalizeComponent(
|
|
48303
48329
|
boundaryEvent_boundaryEventvue_type_script_lang_js_,
|
|
48304
|
-
|
|
48305
|
-
|
|
48330
|
+
boundaryEventvue_type_template_id_58bceaa8_render,
|
|
48331
|
+
boundaryEventvue_type_template_id_58bceaa8_staticRenderFns,
|
|
48306
48332
|
false,
|
|
48307
48333
|
null,
|
|
48308
48334
|
null,
|
|
@@ -55042,8 +55068,8 @@ var genericFlow_component = normalizeComponent(
|
|
|
55042
55068
|
)
|
|
55043
55069
|
|
|
55044
55070
|
/* harmony default export */ var genericFlow = (genericFlow_component.exports);
|
|
55045
|
-
;// 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/Selection.vue?vue&type=template&id=
|
|
55046
|
-
var
|
|
55071
|
+
;// 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/Selection.vue?vue&type=template&id=7c27567b&scoped=true&
|
|
55072
|
+
var Selectionvue_type_template_id_7c27567b_scoped_true_render = function render() {
|
|
55047
55073
|
var _vm = this,
|
|
55048
55074
|
_c = _vm._self._c;
|
|
55049
55075
|
return _vm.showLasso && _vm.style ? _c('div', {
|
|
@@ -55073,7 +55099,7 @@ var Selectionvue_type_template_id_4045da65_scoped_true_render = function render(
|
|
|
55073
55099
|
}
|
|
55074
55100
|
}, _vm.$listeners))], 1) : _vm._e();
|
|
55075
55101
|
};
|
|
55076
|
-
var
|
|
55102
|
+
var Selectionvue_type_template_id_7c27567b_scoped_true_staticRenderFns = [];
|
|
55077
55103
|
|
|
55078
55104
|
;// 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/crown/crownMultiselect/crownMultiselect.vue?vue&type=template&id=bcd827ec&scoped=true&
|
|
55079
55105
|
|
|
@@ -55986,6 +56012,12 @@ var crownMultiselect_component = normalizeComponent(
|
|
|
55986
56012
|
|
|
55987
56013
|
|
|
55988
56014
|
|
|
56015
|
+
|
|
56016
|
+
|
|
56017
|
+
|
|
56018
|
+
|
|
56019
|
+
|
|
56020
|
+
|
|
55989
56021
|
|
|
55990
56022
|
|
|
55991
56023
|
|
|
@@ -56592,7 +56624,7 @@ var crownMultiselect_component = normalizeComponent(
|
|
|
56592
56624
|
getProperties: function getProperties(shapes) {
|
|
56593
56625
|
var _this6 = this;
|
|
56594
56626
|
var changed = [];
|
|
56595
|
-
var shapesToNotTranslate = ['PoolLane', 'standard.Link'
|
|
56627
|
+
var shapesToNotTranslate = ['PoolLane', 'standard.Link'];
|
|
56596
56628
|
shapes.filter(function (shape) {
|
|
56597
56629
|
return !shapesToNotTranslate.includes(shape.model.get('type'));
|
|
56598
56630
|
}).forEach(function (shape) {
|
|
@@ -56600,7 +56632,7 @@ var crownMultiselect_component = normalizeComponent(
|
|
|
56600
56632
|
var children = shape.model.component.getElementsUnderArea(shape.model, _this6.graph);
|
|
56601
56633
|
changed = [].concat(_toConsumableArray(changed), _toConsumableArray(_this6.getContainerProperties(children, changed)));
|
|
56602
56634
|
} else {
|
|
56603
|
-
var _node$pool;
|
|
56635
|
+
var _shape$model$componen, _shape$model$componen2, _node$pool;
|
|
56604
56636
|
var node = shape.model.component.node;
|
|
56605
56637
|
var defaultData = {
|
|
56606
56638
|
id: node.definition.id,
|
|
@@ -56609,6 +56641,7 @@ var crownMultiselect_component = normalizeComponent(
|
|
|
56609
56641
|
y: shape.model.get('position').y,
|
|
56610
56642
|
height: shape.model.get('size').height,
|
|
56611
56643
|
width: shape.model.get('size').width,
|
|
56644
|
+
attachedToRefId: (_shape$model$componen = (_shape$model$componen2 = shape.model.component.node.definition.get('attachedToRef')) === null || _shape$model$componen2 === void 0 ? void 0 : _shape$model$componen2.id) !== null && _shape$model$componen !== void 0 ? _shape$model$componen : null,
|
|
56612
56645
|
color: shape.model.get('color')
|
|
56613
56646
|
}
|
|
56614
56647
|
};
|
|
@@ -56617,9 +56650,38 @@ var crownMultiselect_component = normalizeComponent(
|
|
|
56617
56650
|
}
|
|
56618
56651
|
changed.push(defaultData);
|
|
56619
56652
|
}
|
|
56653
|
+
var boundariesChanges = _this6.getBoundariesChangesForShape(shape);
|
|
56654
|
+
changed = changed.concat(boundariesChanges);
|
|
56620
56655
|
});
|
|
56621
56656
|
return changed;
|
|
56622
56657
|
},
|
|
56658
|
+
/**
|
|
56659
|
+
* Get properties for each boundary inside a shape
|
|
56660
|
+
*/
|
|
56661
|
+
getBoundariesChangesForShape: function getBoundariesChangesForShape(shape) {
|
|
56662
|
+
var boundariesChanged = [];
|
|
56663
|
+
var boundaryEventTypes = [boundaryErrorEvent_id, boundaryConditionalEvent_id, boundaryEscalationEvent_id, boundaryMessageEvent_id, boundarySignalEvent_id, boundaryTimerEvent_id];
|
|
56664
|
+
var boundaryNodes = store.getters.nodes.filter(function (node) {
|
|
56665
|
+
return boundaryEventTypes.includes(node.type);
|
|
56666
|
+
});
|
|
56667
|
+
boundaryNodes.forEach(function (boundaryNode) {
|
|
56668
|
+
if (boundaryNode.definition.attachedToRef.id === shape.model.component.node.definition.id) {
|
|
56669
|
+
var _boundaryNode$definit, _boundaryNode$definit2, _boundaryNode$definit3;
|
|
56670
|
+
boundariesChanged.push({
|
|
56671
|
+
id: boundaryNode.definition.id,
|
|
56672
|
+
properties: {
|
|
56673
|
+
x: boundaryNode.diagram.bounds.x,
|
|
56674
|
+
y: boundaryNode.diagram.bounds.y,
|
|
56675
|
+
height: boundaryNode.diagram.bounds.height,
|
|
56676
|
+
width: boundaryNode.diagram.bounds.width,
|
|
56677
|
+
attachedToRefId: (_boundaryNode$definit = (_boundaryNode$definit2 = boundaryNode.definition.get('attachedToRef')) === null || _boundaryNode$definit2 === void 0 ? void 0 : _boundaryNode$definit2.id) !== null && _boundaryNode$definit !== void 0 ? _boundaryNode$definit : null,
|
|
56678
|
+
color: (_boundaryNode$definit3 = boundaryNode.definition.get('color')) !== null && _boundaryNode$definit3 !== void 0 ? _boundaryNode$definit3 : null
|
|
56679
|
+
}
|
|
56680
|
+
});
|
|
56681
|
+
}
|
|
56682
|
+
});
|
|
56683
|
+
return boundariesChanged;
|
|
56684
|
+
},
|
|
56623
56685
|
getContainerProperties: function getContainerProperties(children) {
|
|
56624
56686
|
var changed = [];
|
|
56625
56687
|
children.forEach(function (model) {
|
|
@@ -57019,9 +57081,9 @@ var crownMultiselect_component = normalizeComponent(
|
|
|
57019
57081
|
});
|
|
57020
57082
|
;// CONCATENATED MODULE: ./src/components/modeler/Selection.vue?vue&type=script&lang=js&
|
|
57021
57083
|
/* harmony default export */ var modeler_Selectionvue_type_script_lang_js_ = (Selectionvue_type_script_lang_js_);
|
|
57022
|
-
// EXTERNAL MODULE: ./node_modules/vue-style-loader/index.js??clonedRuleSet-55.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-55.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/@vue/cli-service/node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-55.use[2]!./node_modules/@vue/cli-service/node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-55.use[3]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/modeler/Selection.vue?vue&type=style&index=0&id=
|
|
57023
|
-
var
|
|
57024
|
-
;// CONCATENATED MODULE: ./src/components/modeler/Selection.vue?vue&type=style&index=0&id=
|
|
57084
|
+
// EXTERNAL MODULE: ./node_modules/vue-style-loader/index.js??clonedRuleSet-55.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-55.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/@vue/cli-service/node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-55.use[2]!./node_modules/@vue/cli-service/node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-55.use[3]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/modeler/Selection.vue?vue&type=style&index=0&id=7c27567b&prod&scoped=true&lang=css&
|
|
57085
|
+
var Selectionvue_type_style_index_0_id_7c27567b_prod_scoped_true_lang_css_ = __webpack_require__(93416);
|
|
57086
|
+
;// CONCATENATED MODULE: ./src/components/modeler/Selection.vue?vue&type=style&index=0&id=7c27567b&prod&scoped=true&lang=css&
|
|
57025
57087
|
|
|
57026
57088
|
;// CONCATENATED MODULE: ./src/components/modeler/Selection.vue
|
|
57027
57089
|
|
|
@@ -57034,11 +57096,11 @@ var Selectionvue_type_style_index_0_id_4045da65_prod_scoped_true_lang_css_ = __w
|
|
|
57034
57096
|
|
|
57035
57097
|
var Selection_component = normalizeComponent(
|
|
57036
57098
|
modeler_Selectionvue_type_script_lang_js_,
|
|
57037
|
-
|
|
57038
|
-
|
|
57099
|
+
Selectionvue_type_template_id_7c27567b_scoped_true_render,
|
|
57100
|
+
Selectionvue_type_template_id_7c27567b_scoped_true_staticRenderFns,
|
|
57039
57101
|
false,
|
|
57040
57102
|
null,
|
|
57041
|
-
"
|
|
57103
|
+
"7c27567b",
|
|
57042
57104
|
null
|
|
57043
57105
|
|
|
57044
57106
|
)
|
|
@@ -75679,6 +75741,30 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
75679
75741
|
_this.modeler.removePlayer(payload.clientId);
|
|
75680
75742
|
_this.modeler.enableMultiplayer(payload.isMultiplayer);
|
|
75681
75743
|
});
|
|
75744
|
+
this.clientIO.on('requestProcess', function (payload) {
|
|
75745
|
+
var firstClient = payload.firstClient,
|
|
75746
|
+
clientId = payload.clientId;
|
|
75747
|
+
|
|
75748
|
+
// Check if the current client is the first client
|
|
75749
|
+
if (firstClient.id === _this.clientIO.id) {
|
|
75750
|
+
// Get the process definition
|
|
75751
|
+
var nodes = _this.modeler.nodes.map(function (node) {
|
|
75752
|
+
return _this.modeler.multiplayerHook(node, false, true);
|
|
75753
|
+
});
|
|
75754
|
+
nodes.forEach(function (node) {
|
|
75755
|
+
var yMapNested = new YMap();
|
|
75756
|
+
_this.doTransact(yMapNested, node);
|
|
75757
|
+
_this.yArray.push([yMapNested]);
|
|
75758
|
+
// Encode the state as an update and send it to the server
|
|
75759
|
+
var stateUpdate = encodeStateAsUpdate(_this.yDoc);
|
|
75760
|
+
// Send the update to the web socket server
|
|
75761
|
+
_this.clientIO.emit('createElement', {
|
|
75762
|
+
updateDoc: stateUpdate,
|
|
75763
|
+
clientId: clientId
|
|
75764
|
+
});
|
|
75765
|
+
});
|
|
75766
|
+
}
|
|
75767
|
+
});
|
|
75682
75768
|
|
|
75683
75769
|
// Listen for updates when a new element is added
|
|
75684
75770
|
this.clientIO.on('createElement', /*#__PURE__*/function () {
|
|
@@ -75702,6 +75788,32 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
75702
75788
|
};
|
|
75703
75789
|
}());
|
|
75704
75790
|
|
|
75791
|
+
// Listen for updates when a new element is requested
|
|
75792
|
+
this.clientIO.on('createRequestedElement', /*#__PURE__*/function () {
|
|
75793
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(payload) {
|
|
75794
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
75795
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
75796
|
+
case 0:
|
|
75797
|
+
if (!(payload.clientId === _this.clientIO.id)) {
|
|
75798
|
+
_context2.next = 4;
|
|
75799
|
+
break;
|
|
75800
|
+
}
|
|
75801
|
+
_context2.next = 3;
|
|
75802
|
+
return _this.createRemoteShape(payload.changes);
|
|
75803
|
+
case 3:
|
|
75804
|
+
// Add the new element to the shared array
|
|
75805
|
+
applyUpdate(_this.yDoc, new Uint8Array(payload.updateDoc));
|
|
75806
|
+
case 4:
|
|
75807
|
+
case "end":
|
|
75808
|
+
return _context2.stop();
|
|
75809
|
+
}
|
|
75810
|
+
}, _callee2);
|
|
75811
|
+
}));
|
|
75812
|
+
return function (_x2) {
|
|
75813
|
+
return _ref2.apply(this, arguments);
|
|
75814
|
+
};
|
|
75815
|
+
}());
|
|
75816
|
+
|
|
75705
75817
|
// Listen for updates when an element is removed
|
|
75706
75818
|
this.clientIO.on('removeElement', function (payload) {
|
|
75707
75819
|
payload.deletedNodes.forEach(function (nodeId) {
|
|
@@ -75741,13 +75853,16 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
75741
75853
|
window.ProcessMaker.EventBus.$on('multiplayer-updateNodes', function (data) {
|
|
75742
75854
|
_this.updateNodes(data);
|
|
75743
75855
|
});
|
|
75744
|
-
window.ProcessMaker.EventBus.$on('multiplayer-replaceNode', function (
|
|
75745
|
-
var nodeData =
|
|
75746
|
-
newControl =
|
|
75856
|
+
window.ProcessMaker.EventBus.$on('multiplayer-replaceNode', function (_ref3) {
|
|
75857
|
+
var nodeData = _ref3.nodeData,
|
|
75858
|
+
newControl = _ref3.newControl;
|
|
75747
75859
|
_this.replaceNode(nodeData, newControl);
|
|
75748
75860
|
});
|
|
75749
75861
|
window.ProcessMaker.EventBus.$on('multiplayer-addFlow', function (data) {
|
|
75750
|
-
_this.
|
|
75862
|
+
_this.addCommonElement(data);
|
|
75863
|
+
});
|
|
75864
|
+
window.ProcessMaker.EventBus.$on('multiplayer-addBoundaryEvent', function (data) {
|
|
75865
|
+
_this.addCommonElement(data);
|
|
75751
75866
|
});
|
|
75752
75867
|
window.ProcessMaker.EventBus.$on('multiplayer-addLanes', function (lanes) {
|
|
75753
75868
|
_this.addLaneNodes(lanes);
|
|
@@ -75763,7 +75878,9 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
75763
75878
|
// Encode the state as an update and send it to the server
|
|
75764
75879
|
var stateUpdate = encodeStateAsUpdate(this.yDoc);
|
|
75765
75880
|
// Send the update to the web socket server
|
|
75766
|
-
this.clientIO.emit('createElement',
|
|
75881
|
+
this.clientIO.emit('createElement', {
|
|
75882
|
+
updateDoc: stateUpdate
|
|
75883
|
+
});
|
|
75767
75884
|
}
|
|
75768
75885
|
}, {
|
|
75769
75886
|
key: "createShape",
|
|
@@ -75926,17 +76043,17 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
75926
76043
|
}, {
|
|
75927
76044
|
key: "updateShapes",
|
|
75928
76045
|
value: function () {
|
|
75929
|
-
var _updateShapes = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
76046
|
+
var _updateShapes = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(data) {
|
|
75930
76047
|
var _this4 = this;
|
|
75931
76048
|
var paper, element, newPool, sourceElem, targetElem, waypoint, startWaypoint, endWaypoint, newWaypoint, node;
|
|
75932
|
-
return _regeneratorRuntime().wrap(function
|
|
75933
|
-
while (1) switch (
|
|
76049
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
76050
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
75934
76051
|
case 0:
|
|
75935
76052
|
paper = this.modeler.paper;
|
|
75936
76053
|
element = this.modeler.getElementByNodeId(data.id);
|
|
75937
76054
|
newPool = this.modeler.getElementByNodeId(data.poolId);
|
|
75938
76055
|
if (!this.modeler.flowTypes.includes(data.type)) {
|
|
75939
|
-
|
|
76056
|
+
_context3.next = 15;
|
|
75940
76057
|
break;
|
|
75941
76058
|
}
|
|
75942
76059
|
// Update the element's waypoints
|
|
@@ -75970,7 +76087,7 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
75970
76087
|
name: 'boundary'
|
|
75971
76088
|
}
|
|
75972
76089
|
});
|
|
75973
|
-
|
|
76090
|
+
_context3.next = 27;
|
|
75974
76091
|
break;
|
|
75975
76092
|
case 15:
|
|
75976
76093
|
// Update the element's position attribute
|
|
@@ -75987,40 +76104,66 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
75987
76104
|
value: data.color
|
|
75988
76105
|
});
|
|
75989
76106
|
|
|
76107
|
+
// boundary type
|
|
76108
|
+
if (element.component.node.definition.$type === 'bpmn:BoundaryEvent') {
|
|
76109
|
+
this.attachBoundaryEventToNode(element, data);
|
|
76110
|
+
}
|
|
76111
|
+
|
|
75990
76112
|
// Trigger a rendering of the element on the paper
|
|
75991
|
-
|
|
76113
|
+
_context3.next = 22;
|
|
75992
76114
|
return paper.findViewByModel(element).update();
|
|
75993
|
-
case
|
|
75994
|
-
|
|
76115
|
+
case 22:
|
|
76116
|
+
_context3.next = 24;
|
|
75995
76117
|
return element.component.$nextTick();
|
|
75996
|
-
case
|
|
75997
|
-
|
|
76118
|
+
case 24:
|
|
76119
|
+
_context3.next = 26;
|
|
75998
76120
|
return this.modeler.paperManager.awaitScheduledUpdates();
|
|
75999
|
-
case
|
|
76121
|
+
case 26:
|
|
76000
76122
|
if (newPool && element.component.node.pool && element.component.node.pool.component.id !== data.poolId) {
|
|
76001
76123
|
element.component.node.pool.component.moveElementRemote(element, newPool);
|
|
76002
76124
|
}
|
|
76003
|
-
case
|
|
76125
|
+
case 27:
|
|
76004
76126
|
case "end":
|
|
76005
|
-
return
|
|
76127
|
+
return _context3.stop();
|
|
76006
76128
|
}
|
|
76007
|
-
},
|
|
76129
|
+
}, _callee3, this);
|
|
76008
76130
|
}));
|
|
76009
|
-
function updateShapes(
|
|
76131
|
+
function updateShapes(_x3) {
|
|
76010
76132
|
return _updateShapes.apply(this, arguments);
|
|
76011
76133
|
}
|
|
76012
76134
|
return updateShapes;
|
|
76013
76135
|
}()
|
|
76014
76136
|
}, {
|
|
76015
|
-
key: "
|
|
76016
|
-
value: function
|
|
76137
|
+
key: "attachBoundaryEventToNode",
|
|
76138
|
+
value: function attachBoundaryEventToNode(element, data) {
|
|
76139
|
+
var node = this.getNodeById(data.attachedToRefId);
|
|
76140
|
+
|
|
76141
|
+
// Find previous attached task
|
|
76142
|
+
var previousAttachedTask = element.getParentCell();
|
|
76143
|
+
|
|
76144
|
+
// Find new attached task
|
|
76145
|
+
var newAttachedTask = this.modeler.getElementByNodeId(data.attachedToRefId);
|
|
76146
|
+
if (previousAttachedTask) {
|
|
76147
|
+
previousAttachedTask.unembed(element);
|
|
76148
|
+
}
|
|
76149
|
+
if (newAttachedTask) {
|
|
76150
|
+
newAttachedTask.embed(element);
|
|
76151
|
+
}
|
|
76152
|
+
element.component.node.definition.set('attachedToRef', node.definition);
|
|
76153
|
+
}
|
|
76154
|
+
}, {
|
|
76155
|
+
key: "addCommonElement",
|
|
76156
|
+
value: function addCommonElement(data) {
|
|
76157
|
+
// Add a new flow / boundary event to the shared array
|
|
76017
76158
|
var yMapNested = new YMap();
|
|
76018
76159
|
this.doTransact(yMapNested, data);
|
|
76019
76160
|
this.yArray.push([yMapNested]);
|
|
76020
76161
|
// Encode the state as an update and send it to the server
|
|
76021
76162
|
var stateUpdate = encodeStateAsUpdate(this.yDoc);
|
|
76022
76163
|
// Send the update to the web socket server
|
|
76023
|
-
this.clientIO.emit('createElement',
|
|
76164
|
+
this.clientIO.emit('createElement', {
|
|
76165
|
+
updateDoc: stateUpdate
|
|
76166
|
+
});
|
|
76024
76167
|
_classPrivateFieldGet(this, _nodeIdGenerator).updateCounters();
|
|
76025
76168
|
}
|
|
76026
76169
|
}, {
|
|
@@ -76045,7 +76188,9 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
76045
76188
|
_this5.doTransact(yMapNested, data);
|
|
76046
76189
|
_this5.yArray.push([yMapNested]);
|
|
76047
76190
|
var stateUpdate = encodeStateAsUpdate(_this5.yDoc);
|
|
76048
|
-
_this5.clientIO.emit('createElement',
|
|
76191
|
+
_this5.clientIO.emit('createElement', {
|
|
76192
|
+
updateDoc: stateUpdate
|
|
76193
|
+
});
|
|
76049
76194
|
});
|
|
76050
76195
|
});
|
|
76051
76196
|
}
|
|
@@ -77066,7 +77211,11 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
77066
77211
|
while (1) switch (_context8.prev = _context8.next) {
|
|
77067
77212
|
case 0:
|
|
77068
77213
|
node = _this21.createNode(type, definition, diagram);
|
|
77069
|
-
|
|
77214
|
+
if (!_this21.isMultiplayer) {
|
|
77215
|
+
store.commit('addNode', node);
|
|
77216
|
+
} else {
|
|
77217
|
+
_this21.loadNodeForMultiplayer(node);
|
|
77218
|
+
}
|
|
77070
77219
|
case 2:
|
|
77071
77220
|
case "end":
|
|
77072
77221
|
return _context8.stop();
|
|
@@ -77074,6 +77223,39 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
77074
77223
|
}, _callee8);
|
|
77075
77224
|
}))();
|
|
77076
77225
|
},
|
|
77226
|
+
loadNodeForMultiplayer: function loadNodeForMultiplayer(node) {
|
|
77227
|
+
var _this22 = this;
|
|
77228
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9() {
|
|
77229
|
+
return _regeneratorRuntime().wrap(function _callee9$(_context9) {
|
|
77230
|
+
while (1) switch (_context9.prev = _context9.next) {
|
|
77231
|
+
case 0:
|
|
77232
|
+
if (!(node.type === 'processmaker-modeler-lane')) {
|
|
77233
|
+
_context9.next = 10;
|
|
77234
|
+
break;
|
|
77235
|
+
}
|
|
77236
|
+
_context9.next = 3;
|
|
77237
|
+
return _this22.addNode(node, node.definition.id, true);
|
|
77238
|
+
case 3:
|
|
77239
|
+
_this22.nodeIdGenerator.updateCounters();
|
|
77240
|
+
_context9.next = 6;
|
|
77241
|
+
return _this22.$nextTick();
|
|
77242
|
+
case 6:
|
|
77243
|
+
_context9.next = 8;
|
|
77244
|
+
return _this22.paperManager.awaitScheduledUpdates();
|
|
77245
|
+
case 8:
|
|
77246
|
+
window.ProcessMaker.EventBus.$emit('multiplayer-addLanes', [node]);
|
|
77247
|
+
return _context9.abrupt("return");
|
|
77248
|
+
case 10:
|
|
77249
|
+
_this22.multiplayerHook(node, false);
|
|
77250
|
+
store.commit('addNode', node);
|
|
77251
|
+
_this22.poolTarget = null;
|
|
77252
|
+
case 13:
|
|
77253
|
+
case "end":
|
|
77254
|
+
return _context9.stop();
|
|
77255
|
+
}
|
|
77256
|
+
}, _callee9);
|
|
77257
|
+
}))();
|
|
77258
|
+
},
|
|
77077
77259
|
createNode: function createNode(type, definition, diagram) {
|
|
77078
77260
|
if (Node.isTimerType(type)) {
|
|
77079
77261
|
return new TimerEventNode(type, definition, diagram);
|
|
@@ -77092,95 +77274,95 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
77092
77274
|
return hasSource && hasTarget;
|
|
77093
77275
|
},
|
|
77094
77276
|
waitForCursorToChange: function waitForCursorToChange() {
|
|
77095
|
-
var
|
|
77096
|
-
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
77277
|
+
var _this23 = this;
|
|
77278
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10() {
|
|
77097
77279
|
var cursorWaitTime;
|
|
77098
|
-
return _regeneratorRuntime().wrap(function
|
|
77099
|
-
while (1) switch (
|
|
77280
|
+
return _regeneratorRuntime().wrap(function _callee10$(_context10) {
|
|
77281
|
+
while (1) switch (_context10.prev = _context10.next) {
|
|
77100
77282
|
case 0:
|
|
77101
77283
|
cursorWaitTime = 300;
|
|
77102
|
-
|
|
77103
|
-
return
|
|
77284
|
+
_context10.next = 3;
|
|
77285
|
+
return _this23.$nextTick();
|
|
77104
77286
|
case 3:
|
|
77105
|
-
return
|
|
77287
|
+
return _context10.abrupt("return", new Promise(function (resolve) {
|
|
77106
77288
|
return setTimeout(resolve, cursorWaitTime);
|
|
77107
77289
|
}));
|
|
77108
77290
|
case 4:
|
|
77109
77291
|
case "end":
|
|
77110
|
-
return
|
|
77292
|
+
return _context10.stop();
|
|
77111
77293
|
}
|
|
77112
|
-
},
|
|
77294
|
+
}, _callee10);
|
|
77113
77295
|
}))();
|
|
77114
77296
|
},
|
|
77115
77297
|
renderPaper: function renderPaper() {
|
|
77116
|
-
var
|
|
77117
|
-
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
77118
|
-
return _regeneratorRuntime().wrap(function
|
|
77119
|
-
while (1) switch (
|
|
77298
|
+
var _this24 = this;
|
|
77299
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12() {
|
|
77300
|
+
return _regeneratorRuntime().wrap(function _callee12$(_context12) {
|
|
77301
|
+
while (1) switch (_context12.prev = _context12.next) {
|
|
77120
77302
|
case 0:
|
|
77121
|
-
|
|
77122
|
-
|
|
77123
|
-
return
|
|
77124
|
-
return _regeneratorRuntime().wrap(function
|
|
77125
|
-
while (1) switch (
|
|
77303
|
+
_this24.isRendering = true;
|
|
77304
|
+
_context12.next = 3;
|
|
77305
|
+
return _this24.paperManager.performAtomicAction( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11() {
|
|
77306
|
+
return _regeneratorRuntime().wrap(function _callee11$(_context11) {
|
|
77307
|
+
while (1) switch (_context11.prev = _context11.next) {
|
|
77126
77308
|
case 0:
|
|
77127
|
-
|
|
77128
|
-
return
|
|
77309
|
+
_context11.next = 2;
|
|
77310
|
+
return _this24.waitForCursorToChange();
|
|
77129
77311
|
case 2:
|
|
77130
|
-
|
|
77131
|
-
|
|
77132
|
-
|
|
77312
|
+
_this24.parse();
|
|
77313
|
+
_this24.addPools();
|
|
77314
|
+
_this24.setUpDiagram();
|
|
77133
77315
|
case 5:
|
|
77134
77316
|
case "end":
|
|
77135
|
-
return
|
|
77317
|
+
return _context11.stop();
|
|
77136
77318
|
}
|
|
77137
|
-
},
|
|
77319
|
+
}, _callee11);
|
|
77138
77320
|
})));
|
|
77139
77321
|
case 3:
|
|
77140
|
-
|
|
77141
|
-
return
|
|
77322
|
+
_context12.next = 5;
|
|
77323
|
+
return _this24.paperManager.awaitScheduledUpdates();
|
|
77142
77324
|
case 5:
|
|
77143
|
-
|
|
77144
|
-
|
|
77325
|
+
_this24.isRendering = false;
|
|
77326
|
+
_this24.$emit('parsed');
|
|
77145
77327
|
case 7:
|
|
77146
77328
|
case "end":
|
|
77147
|
-
return
|
|
77329
|
+
return _context12.stop();
|
|
77148
77330
|
}
|
|
77149
|
-
},
|
|
77331
|
+
}, _callee12);
|
|
77150
77332
|
}))();
|
|
77151
77333
|
},
|
|
77152
77334
|
loadXML: function loadXML() {
|
|
77153
77335
|
var _arguments3 = arguments,
|
|
77154
|
-
|
|
77155
|
-
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
77336
|
+
_this25 = this;
|
|
77337
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee13() {
|
|
77156
77338
|
var xml, emitChangeEvent;
|
|
77157
|
-
return _regeneratorRuntime().wrap(function
|
|
77158
|
-
while (1) switch (
|
|
77339
|
+
return _regeneratorRuntime().wrap(function _callee13$(_context13) {
|
|
77340
|
+
while (1) switch (_context13.prev = _context13.next) {
|
|
77159
77341
|
case 0:
|
|
77160
77342
|
xml = _arguments3.length > 0 && _arguments3[0] !== undefined ? _arguments3[0] : null;
|
|
77161
77343
|
emitChangeEvent = false;
|
|
77162
77344
|
if (xml === null) {
|
|
77163
|
-
xml =
|
|
77345
|
+
xml = _this25.currentXML;
|
|
77164
77346
|
emitChangeEvent = true;
|
|
77165
77347
|
}
|
|
77166
|
-
|
|
77167
|
-
return
|
|
77348
|
+
_context13.next = 5;
|
|
77349
|
+
return _this25.xmlManager.getDefinitionsFromXml(xml);
|
|
77168
77350
|
case 5:
|
|
77169
|
-
|
|
77170
|
-
|
|
77171
|
-
|
|
77351
|
+
_this25.definitions = _context13.sent;
|
|
77352
|
+
_this25.xmlManager.definitions = _this25.definitions;
|
|
77353
|
+
_this25.nodeIdGenerator = getNodeIdGenerator(_this25.definitions);
|
|
77172
77354
|
store.commit('clearNodes');
|
|
77173
|
-
|
|
77174
|
-
return
|
|
77355
|
+
_context13.next = 11;
|
|
77356
|
+
return _this25.renderPaper();
|
|
77175
77357
|
case 11:
|
|
77176
77358
|
if (emitChangeEvent) {
|
|
77177
77359
|
window.ProcessMaker.EventBus.$emit('modeler-change');
|
|
77178
77360
|
}
|
|
77179
77361
|
case 12:
|
|
77180
77362
|
case "end":
|
|
77181
|
-
return
|
|
77363
|
+
return _context13.stop();
|
|
77182
77364
|
}
|
|
77183
|
-
},
|
|
77365
|
+
}, _callee13);
|
|
77184
77366
|
}))();
|
|
77185
77367
|
},
|
|
77186
77368
|
getBoundaryEvents: function getBoundaryEvents(process) {
|
|
@@ -77204,13 +77386,13 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
77204
77386
|
return boundaryEvent;
|
|
77205
77387
|
},
|
|
77206
77388
|
ensureCancelActivityIsAddedToBoundaryEvents: function ensureCancelActivityIsAddedToBoundaryEvents(process) {
|
|
77207
|
-
var
|
|
77389
|
+
var _this26 = this;
|
|
77208
77390
|
this.getBoundaryEvents(process).forEach(function (definition) {
|
|
77209
|
-
var boundaryEvent =
|
|
77391
|
+
var boundaryEvent = _this26.createBoundaryEvent(definition);
|
|
77210
77392
|
definition.get('outgoing').forEach(function (outgoing) {
|
|
77211
77393
|
return outgoing.set('sourceRef', boundaryEvent);
|
|
77212
77394
|
});
|
|
77213
|
-
|
|
77395
|
+
_this26.replaceDefinition(definition, boundaryEvent, process);
|
|
77214
77396
|
});
|
|
77215
77397
|
},
|
|
77216
77398
|
replaceDefinition: function replaceDefinition(definition, boundaryEvent, process) {
|
|
@@ -77236,82 +77418,82 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
77236
77418
|
});
|
|
77237
77419
|
},
|
|
77238
77420
|
addRemoteNode: function addRemoteNode(data) {
|
|
77239
|
-
var
|
|
77240
|
-
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
77421
|
+
var _this27 = this;
|
|
77422
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee14() {
|
|
77241
77423
|
var definition, diagram, newNode;
|
|
77242
|
-
return _regeneratorRuntime().wrap(function
|
|
77243
|
-
while (1) switch (
|
|
77424
|
+
return _regeneratorRuntime().wrap(function _callee14$(_context14) {
|
|
77425
|
+
while (1) switch (_context14.prev = _context14.next) {
|
|
77244
77426
|
case 0:
|
|
77245
|
-
definition =
|
|
77246
|
-
diagram =
|
|
77427
|
+
definition = _this27.nodeRegistry[data.type].definition(_this27.moddle, _this27.$t);
|
|
77428
|
+
diagram = _this27.nodeRegistry[data.type].diagram(_this27.moddle);
|
|
77247
77429
|
diagram.bounds.x = data.x;
|
|
77248
77430
|
diagram.bounds.y = data.y;
|
|
77249
|
-
newNode =
|
|
77250
|
-
|
|
77251
|
-
return
|
|
77431
|
+
newNode = _this27.createNode(data.type, definition, diagram);
|
|
77432
|
+
_context14.next = 7;
|
|
77433
|
+
return _this27.addNode(newNode, data.id, true);
|
|
77252
77434
|
case 7:
|
|
77253
|
-
|
|
77254
|
-
return
|
|
77435
|
+
_context14.next = 9;
|
|
77436
|
+
return _this27.$nextTick();
|
|
77255
77437
|
case 9:
|
|
77256
|
-
|
|
77257
|
-
return
|
|
77438
|
+
_context14.next = 11;
|
|
77439
|
+
return _this27.paperManager.awaitScheduledUpdates();
|
|
77258
77440
|
case 11:
|
|
77259
|
-
if (
|
|
77260
|
-
|
|
77441
|
+
if (_this27.autoValidate) {
|
|
77442
|
+
_this27.validateBpmnDiagram();
|
|
77261
77443
|
}
|
|
77262
77444
|
case 12:
|
|
77263
77445
|
case "end":
|
|
77264
|
-
return
|
|
77446
|
+
return _context14.stop();
|
|
77265
77447
|
}
|
|
77266
|
-
},
|
|
77448
|
+
}, _callee14);
|
|
77267
77449
|
}))();
|
|
77268
77450
|
},
|
|
77269
77451
|
handleDrop: function handleDrop(data) {
|
|
77270
|
-
var
|
|
77271
|
-
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
77272
|
-
var clientX, clientY, control, nodeThatWillBeReplaced, definition, diagram,
|
|
77273
|
-
return _regeneratorRuntime().wrap(function
|
|
77274
|
-
while (1) switch (
|
|
77452
|
+
var _this28 = this;
|
|
77453
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee15() {
|
|
77454
|
+
var clientX, clientY, control, nodeThatWillBeReplaced, definition, diagram, _this28$paperManager$, x, y, newNode, nodeMigrator;
|
|
77455
|
+
return _regeneratorRuntime().wrap(function _callee15$(_context15) {
|
|
77456
|
+
while (1) switch (_context15.prev = _context15.next) {
|
|
77275
77457
|
case 0:
|
|
77276
77458
|
clientX = data.clientX, clientY = data.clientY, control = data.control, nodeThatWillBeReplaced = data.nodeThatWillBeReplaced;
|
|
77277
|
-
|
|
77459
|
+
_this28.validateDropTarget({
|
|
77278
77460
|
clientX: clientX,
|
|
77279
77461
|
clientY: clientY,
|
|
77280
77462
|
control: control
|
|
77281
77463
|
});
|
|
77282
|
-
if (
|
|
77283
|
-
|
|
77464
|
+
if (_this28.allowDrop) {
|
|
77465
|
+
_context15.next = 4;
|
|
77284
77466
|
break;
|
|
77285
77467
|
}
|
|
77286
|
-
return
|
|
77468
|
+
return _context15.abrupt("return");
|
|
77287
77469
|
case 4:
|
|
77288
|
-
definition =
|
|
77289
|
-
diagram =
|
|
77290
|
-
|
|
77470
|
+
definition = _this28.nodeRegistry[control.type].definition(_this28.moddle, _this28.$t);
|
|
77471
|
+
diagram = _this28.nodeRegistry[control.type].diagram(_this28.moddle);
|
|
77472
|
+
_this28$paperManager$ = _this28.paperManager.clientToGridPoint(clientX, clientY), x = _this28$paperManager$.x, y = _this28$paperManager$.y;
|
|
77291
77473
|
diagram.bounds.x = x;
|
|
77292
77474
|
diagram.bounds.y = y;
|
|
77293
|
-
newNode =
|
|
77475
|
+
newNode = _this28.createNode(control.type, definition, diagram);
|
|
77294
77476
|
if (newNode.isBpmnType('bpmn:BoundaryEvent')) {
|
|
77295
|
-
|
|
77477
|
+
_this28.setShapeCenterUnderCursor(diagram);
|
|
77296
77478
|
}
|
|
77297
|
-
|
|
77298
|
-
|
|
77299
|
-
return
|
|
77479
|
+
_this28.highlightNode(newNode);
|
|
77480
|
+
_context15.next = 14;
|
|
77481
|
+
return _this28.addNode(newNode);
|
|
77300
77482
|
case 14:
|
|
77301
77483
|
if (nodeThatWillBeReplaced) {
|
|
77302
|
-
|
|
77484
|
+
_context15.next = 16;
|
|
77303
77485
|
break;
|
|
77304
77486
|
}
|
|
77305
|
-
return
|
|
77487
|
+
return _context15.abrupt("return");
|
|
77306
77488
|
case 16:
|
|
77307
|
-
nodeMigrator = new NodeMigrator(nodeThatWillBeReplaced, definition,
|
|
77489
|
+
nodeMigrator = new NodeMigrator(nodeThatWillBeReplaced, definition, _this28.graph, newNode, _this28.processes, _this28.collaboration);
|
|
77308
77490
|
nodeMigrator.migrate();
|
|
77309
|
-
return
|
|
77491
|
+
return _context15.abrupt("return", newNode);
|
|
77310
77492
|
case 19:
|
|
77311
77493
|
case "end":
|
|
77312
|
-
return
|
|
77494
|
+
return _context15.stop();
|
|
77313
77495
|
}
|
|
77314
|
-
},
|
|
77496
|
+
}, _callee15);
|
|
77315
77497
|
}))();
|
|
77316
77498
|
},
|
|
77317
77499
|
setShapeCenterUnderCursor: function setShapeCenterUnderCursor(diagram) {
|
|
@@ -77319,33 +77501,34 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
77319
77501
|
diagram.bounds.y -= diagram.bounds.height / 2;
|
|
77320
77502
|
},
|
|
77321
77503
|
selectNewNode: function selectNewNode(node) {
|
|
77322
|
-
var
|
|
77323
|
-
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
77504
|
+
var _this29 = this;
|
|
77505
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee16() {
|
|
77324
77506
|
var newNodeComponent, view;
|
|
77325
|
-
return _regeneratorRuntime().wrap(function
|
|
77326
|
-
while (1) switch (
|
|
77507
|
+
return _regeneratorRuntime().wrap(function _callee16$(_context16) {
|
|
77508
|
+
while (1) switch (_context16.prev = _context16.next) {
|
|
77327
77509
|
case 0:
|
|
77328
|
-
|
|
77329
|
-
return
|
|
77510
|
+
_context16.next = 2;
|
|
77511
|
+
return _this29.$nextTick();
|
|
77330
77512
|
case 2:
|
|
77331
|
-
|
|
77332
|
-
return
|
|
77513
|
+
_context16.next = 4;
|
|
77514
|
+
return _this29.paperManager.awaitScheduledUpdates();
|
|
77333
77515
|
case 4:
|
|
77334
|
-
newNodeComponent =
|
|
77516
|
+
newNodeComponent = _this29.$refs.nodeComponent.find(function (component) {
|
|
77335
77517
|
return component.node === node;
|
|
77336
77518
|
});
|
|
77337
77519
|
view = newNodeComponent.shapeView;
|
|
77338
|
-
|
|
77339
|
-
return
|
|
77520
|
+
_context16.next = 8;
|
|
77521
|
+
return _this29.$refs.selector.selectElement(view);
|
|
77340
77522
|
case 8:
|
|
77341
77523
|
case "end":
|
|
77342
|
-
return
|
|
77524
|
+
return _context16.stop();
|
|
77343
77525
|
}
|
|
77344
|
-
},
|
|
77526
|
+
}, _callee16);
|
|
77345
77527
|
}))();
|
|
77346
77528
|
},
|
|
77347
77529
|
multiplayerHook: function multiplayerHook(node, fromClient) {
|
|
77348
|
-
var
|
|
77530
|
+
var isProcessRequested = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
77531
|
+
var blackList = ['processmaker-modeler-lane', 'processmaker-modeler-generic-flow', 'processmaker-modeler-sequence-flow', 'processmaker-modeler-association', 'processmaker-modeler-data-input-association', 'processmaker-modeler-data-input-association', 'processmaker-modeler-boundary-timer-event', 'processmaker-modeler-boundary-error-event', 'processmaker-modeler-boundary-signal-event', 'processmaker-modeler-boundary-conditional-even', 'processmaker-modeler-boundary-message-event'];
|
|
77349
77532
|
if (!this.isMultiplayer) {
|
|
77350
77533
|
return;
|
|
77351
77534
|
}
|
|
@@ -77365,6 +77548,9 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
77365
77548
|
if (node !== null && node !== void 0 && (_node$pool = node.pool) !== null && _node$pool !== void 0 && _node$pool.component) {
|
|
77366
77549
|
defaultData['poolId'] = node.pool.component.id;
|
|
77367
77550
|
}
|
|
77551
|
+
if (isProcessRequested) {
|
|
77552
|
+
return defaultData;
|
|
77553
|
+
}
|
|
77368
77554
|
window.ProcessMaker.EventBus.$emit('multiplayer-addNode', defaultData);
|
|
77369
77555
|
}
|
|
77370
77556
|
if (this.flowTypes.includes(node.type)) {
|
|
@@ -77372,218 +77558,222 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
77372
77558
|
var sourceRefId = (_node$definition$sour = node.definition.sourceRef) === null || _node$definition$sour === void 0 ? void 0 : _node$definition$sour.id;
|
|
77373
77559
|
var targetRefId = (_node$definition$targ = node.definition.targetRef) === null || _node$definition$targ === void 0 ? void 0 : _node$definition$targ.id;
|
|
77374
77560
|
if (node.type === 'processmaker-modeler-data-input-association') {
|
|
77375
|
-
var _node$definition$sour2, _node$definition$targ2, _node$definition$targ3;
|
|
77561
|
+
var _node$definition$sour2, _node$definition$targ2, _node$definition$targ3, _node$definition$targ4;
|
|
77376
77562
|
sourceRefId = Array.isArray(node.definition.sourceRef) && ((_node$definition$sour2 = node.definition.sourceRef[0]) === null || _node$definition$sour2 === void 0 ? void 0 : _node$definition$sour2.id);
|
|
77377
|
-
targetRefId = (_node$definition$targ2 = node.definition.targetRef) === null || _node$definition$targ2 === void 0 ? void 0 : (_node$definition$targ3 = _node$definition$targ2.$parent) === null || _node$definition$targ3 === void 0 ? void 0 : _node$definition$targ3.$parent.get('id');
|
|
77563
|
+
targetRefId = (_node$definition$targ2 = node.definition.targetRef) === null || _node$definition$targ2 === void 0 ? void 0 : (_node$definition$targ3 = _node$definition$targ2.$parent) === null || _node$definition$targ3 === void 0 ? void 0 : (_node$definition$targ4 = _node$definition$targ3.$parent) === null || _node$definition$targ4 === void 0 ? void 0 : _node$definition$targ4.get('id');
|
|
77378
77564
|
}
|
|
77379
77565
|
if (sourceRefId && targetRefId) {
|
|
77380
|
-
|
|
77566
|
+
var flowData = {
|
|
77381
77567
|
id: node.definition.id,
|
|
77382
77568
|
type: node.type,
|
|
77383
77569
|
sourceRefId: sourceRefId,
|
|
77384
77570
|
targetRefId: targetRefId,
|
|
77385
77571
|
waypoint: node.diagram.waypoint
|
|
77386
|
-
}
|
|
77572
|
+
};
|
|
77573
|
+
if (isProcessRequested) {
|
|
77574
|
+
return flowData;
|
|
77575
|
+
}
|
|
77576
|
+
window.ProcessMaker.EventBus.$emit('multiplayer-addFlow', flowData);
|
|
77387
77577
|
}
|
|
77388
77578
|
}
|
|
77389
77579
|
}
|
|
77390
77580
|
},
|
|
77391
77581
|
addNode: function addNode(node) {
|
|
77392
77582
|
var _arguments4 = arguments,
|
|
77393
|
-
|
|
77394
|
-
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
77583
|
+
_this30 = this;
|
|
77584
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee17() {
|
|
77395
77585
|
var id, fromClient, targetProcess;
|
|
77396
|
-
return _regeneratorRuntime().wrap(function
|
|
77397
|
-
while (1) switch (
|
|
77586
|
+
return _regeneratorRuntime().wrap(function _callee17$(_context17) {
|
|
77587
|
+
while (1) switch (_context17.prev = _context17.next) {
|
|
77398
77588
|
case 0:
|
|
77399
77589
|
id = _arguments4.length > 1 && _arguments4[1] !== undefined ? _arguments4[1] : null;
|
|
77400
77590
|
fromClient = _arguments4.length > 2 && _arguments4[2] !== undefined ? _arguments4[2] : false;
|
|
77401
77591
|
if (!node.pool) {
|
|
77402
|
-
node.pool =
|
|
77592
|
+
node.pool = _this30.poolTarget;
|
|
77403
77593
|
}
|
|
77404
|
-
targetProcess = node.getTargetProcess(
|
|
77594
|
+
targetProcess = node.getTargetProcess(_this30.processes, _this30.processNode);
|
|
77405
77595
|
addNodeToProcess(node, targetProcess);
|
|
77406
|
-
node.setIds(
|
|
77407
|
-
|
|
77596
|
+
node.setIds(_this30.nodeIdGenerator, id);
|
|
77597
|
+
_this30.planeElements.push(node.diagram);
|
|
77408
77598
|
// add multiplayer logic as a hook
|
|
77409
|
-
|
|
77599
|
+
_this30.multiplayerHook(node, fromClient);
|
|
77410
77600
|
store.commit('addNode', node);
|
|
77411
|
-
|
|
77601
|
+
_this30.poolTarget = null;
|
|
77412
77602
|
|
|
77413
77603
|
// add processmaker-modeler-generic-flow
|
|
77414
77604
|
if (![sequenceFlow_id, poolLane_config_id, associationConfig_id, messageFlow_config_id, config_id, dataInputAssociation_config_id, genericFlow_config_id].includes(node.type)) {
|
|
77415
|
-
|
|
77605
|
+
_context17.next = 12;
|
|
77416
77606
|
break;
|
|
77417
77607
|
}
|
|
77418
|
-
return
|
|
77608
|
+
return _context17.abrupt("return");
|
|
77419
77609
|
case 12:
|
|
77420
77610
|
if (!fromClient) {
|
|
77421
77611
|
// Select the node after it has been added to the store (does not apply to flows)
|
|
77422
|
-
|
|
77612
|
+
_this30.selectNewNode(node);
|
|
77423
77613
|
}
|
|
77424
|
-
return
|
|
77614
|
+
return _context17.abrupt("return", new Promise(function (resolve) {
|
|
77425
77615
|
setTimeout(function () {
|
|
77426
|
-
|
|
77616
|
+
_this30.pushToUndoStack();
|
|
77427
77617
|
resolve();
|
|
77428
77618
|
});
|
|
77429
77619
|
}));
|
|
77430
77620
|
case 14:
|
|
77431
77621
|
case "end":
|
|
77432
|
-
return
|
|
77622
|
+
return _context17.stop();
|
|
77433
77623
|
}
|
|
77434
|
-
},
|
|
77624
|
+
}, _callee17);
|
|
77435
77625
|
}))();
|
|
77436
77626
|
},
|
|
77437
77627
|
addClonedNodes: function addClonedNodes(nodes) {
|
|
77438
|
-
var
|
|
77439
|
-
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
77440
|
-
return _regeneratorRuntime().wrap(function
|
|
77441
|
-
while (1) switch (
|
|
77628
|
+
var _this31 = this;
|
|
77629
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee18() {
|
|
77630
|
+
return _regeneratorRuntime().wrap(function _callee18$(_context18) {
|
|
77631
|
+
while (1) switch (_context18.prev = _context18.next) {
|
|
77442
77632
|
case 0:
|
|
77443
77633
|
nodes.forEach(function (node) {
|
|
77444
77634
|
if (!node.pool) {
|
|
77445
|
-
node.pool =
|
|
77635
|
+
node.pool = _this31.poolTarget;
|
|
77446
77636
|
}
|
|
77447
|
-
var targetProcess = node.getTargetProcess(
|
|
77637
|
+
var targetProcess = node.getTargetProcess(_this31.processes, _this31.processNode);
|
|
77448
77638
|
addNodeToProcess(node, targetProcess);
|
|
77449
|
-
|
|
77450
|
-
|
|
77639
|
+
_this31.planeElements.push(node.diagram);
|
|
77640
|
+
_this31.multiplayerHook(node, false);
|
|
77451
77641
|
store.commit('addNode', node);
|
|
77452
|
-
|
|
77642
|
+
_this31.poolTarget = null;
|
|
77453
77643
|
});
|
|
77454
77644
|
case 1:
|
|
77455
77645
|
case "end":
|
|
77456
|
-
return
|
|
77646
|
+
return _context18.stop();
|
|
77457
77647
|
}
|
|
77458
|
-
},
|
|
77648
|
+
}, _callee18);
|
|
77459
77649
|
}))();
|
|
77460
77650
|
},
|
|
77461
77651
|
removeNode: function removeNode(node, options) {
|
|
77462
|
-
var
|
|
77463
|
-
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
77464
|
-
return _regeneratorRuntime().wrap(function
|
|
77465
|
-
while (1) switch (
|
|
77652
|
+
var _this32 = this;
|
|
77653
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee19() {
|
|
77654
|
+
return _regeneratorRuntime().wrap(function _callee19$(_context19) {
|
|
77655
|
+
while (1) switch (_context19.prev = _context19.next) {
|
|
77466
77656
|
case 0:
|
|
77467
77657
|
// Check if the node is not replaced
|
|
77468
|
-
if (
|
|
77658
|
+
if (_this32.isMultiplayer && !(options !== null && options !== void 0 && options.isReplaced)) {
|
|
77469
77659
|
// Emit event to server to remove node
|
|
77470
77660
|
window.ProcessMaker.EventBus.$emit('multiplayer-removeNode', node);
|
|
77471
77661
|
}
|
|
77472
|
-
|
|
77662
|
+
_this32.removeNodeProcedure(node, options);
|
|
77473
77663
|
case 2:
|
|
77474
77664
|
case "end":
|
|
77475
|
-
return
|
|
77665
|
+
return _context19.stop();
|
|
77476
77666
|
}
|
|
77477
|
-
},
|
|
77667
|
+
}, _callee19);
|
|
77478
77668
|
}))();
|
|
77479
77669
|
},
|
|
77480
77670
|
removeNodeProcedure: function removeNodeProcedure(node) {
|
|
77481
77671
|
var _arguments5 = arguments,
|
|
77482
|
-
|
|
77483
|
-
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
77672
|
+
_this33 = this;
|
|
77673
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee20() {
|
|
77484
77674
|
var _ref6, _ref6$removeRelations, removeRelationships;
|
|
77485
|
-
return _regeneratorRuntime().wrap(function
|
|
77486
|
-
while (1) switch (
|
|
77675
|
+
return _regeneratorRuntime().wrap(function _callee20$(_context20) {
|
|
77676
|
+
while (1) switch (_context20.prev = _context20.next) {
|
|
77487
77677
|
case 0:
|
|
77488
77678
|
_ref6 = _arguments5.length > 1 && _arguments5[1] !== undefined ? _arguments5[1] : {}, _ref6$removeRelations = _ref6.removeRelationships, removeRelationships = _ref6$removeRelations === void 0 ? true : _ref6$removeRelations;
|
|
77489
77679
|
if (node) {
|
|
77490
|
-
|
|
77680
|
+
_context20.next = 3;
|
|
77491
77681
|
break;
|
|
77492
77682
|
}
|
|
77493
|
-
return
|
|
77683
|
+
return _context20.abrupt("return");
|
|
77494
77684
|
case 3:
|
|
77495
77685
|
if (removeRelationships) {
|
|
77496
|
-
removeNodeFlows(node,
|
|
77497
|
-
removeNodeMessageFlows(node,
|
|
77498
|
-
removeNodeAssociations(node,
|
|
77686
|
+
removeNodeFlows(node, _this33);
|
|
77687
|
+
removeNodeMessageFlows(node, _this33);
|
|
77688
|
+
removeNodeAssociations(node, _this33);
|
|
77499
77689
|
}
|
|
77500
77690
|
removeOutgoingAndIncomingRefsToFlow(node);
|
|
77501
|
-
removeBoundaryEvents(
|
|
77691
|
+
removeBoundaryEvents(_this33.graph, node, _this33.removeNode);
|
|
77502
77692
|
removeSourceDefault(node);
|
|
77503
|
-
|
|
77504
|
-
|
|
77693
|
+
_this33.removeNodesFromLane(node);
|
|
77694
|
+
_this33.removeNodesFromPool(node);
|
|
77505
77695
|
store.commit('removeNode', node);
|
|
77506
|
-
store.commit('highlightNode',
|
|
77507
|
-
|
|
77508
|
-
|
|
77509
|
-
return
|
|
77696
|
+
store.commit('highlightNode', _this33.processNode);
|
|
77697
|
+
_this33.$refs.selector.clearSelection();
|
|
77698
|
+
_context20.next = 14;
|
|
77699
|
+
return _this33.$nextTick();
|
|
77510
77700
|
case 14:
|
|
77511
|
-
|
|
77512
|
-
return
|
|
77701
|
+
_context20.next = 16;
|
|
77702
|
+
return _this33.pushToUndoStack();
|
|
77513
77703
|
case 16:
|
|
77514
77704
|
// force to update the processNode property in every delete
|
|
77515
|
-
|
|
77516
|
-
if (
|
|
77517
|
-
|
|
77518
|
-
return diagram.bpmnElement.id ===
|
|
77705
|
+
_this33.processes = _this33.getProcesses();
|
|
77706
|
+
if (_this33.processes && _this33.processes.length > 0) {
|
|
77707
|
+
_this33.processNode = new Node('processmaker-modeler-process', _this33.processes[0], _this33.planeElements.find(function (diagram) {
|
|
77708
|
+
return diagram.bpmnElement.id === _this33.processes[0].id;
|
|
77519
77709
|
}));
|
|
77520
77710
|
}
|
|
77521
77711
|
case 18:
|
|
77522
77712
|
case "end":
|
|
77523
|
-
return
|
|
77713
|
+
return _context20.stop();
|
|
77524
77714
|
}
|
|
77525
|
-
},
|
|
77715
|
+
}, _callee20);
|
|
77526
77716
|
}))();
|
|
77527
77717
|
},
|
|
77528
77718
|
removeNodes: function removeNodes() {
|
|
77529
|
-
var
|
|
77530
|
-
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
77531
|
-
return _regeneratorRuntime().wrap(function
|
|
77532
|
-
while (1) switch (
|
|
77719
|
+
var _this34 = this;
|
|
77720
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee23() {
|
|
77721
|
+
return _regeneratorRuntime().wrap(function _callee23$(_context23) {
|
|
77722
|
+
while (1) switch (_context23.prev = _context23.next) {
|
|
77533
77723
|
case 0:
|
|
77534
|
-
|
|
77535
|
-
return
|
|
77536
|
-
return _regeneratorRuntime().wrap(function
|
|
77537
|
-
while (1) switch (
|
|
77724
|
+
_context23.next = 2;
|
|
77725
|
+
return _this34.performSingleUndoRedoTransaction( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee22() {
|
|
77726
|
+
return _regeneratorRuntime().wrap(function _callee22$(_context22) {
|
|
77727
|
+
while (1) switch (_context22.prev = _context22.next) {
|
|
77538
77728
|
case 0:
|
|
77539
|
-
|
|
77540
|
-
return
|
|
77729
|
+
_context22.next = 2;
|
|
77730
|
+
return _this34.paperManager.performAtomicAction( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee21() {
|
|
77541
77731
|
var waitPromises;
|
|
77542
|
-
return _regeneratorRuntime().wrap(function
|
|
77543
|
-
while (1) switch (
|
|
77732
|
+
return _regeneratorRuntime().wrap(function _callee21$(_context21) {
|
|
77733
|
+
while (1) switch (_context21.prev = _context21.next) {
|
|
77544
77734
|
case 0:
|
|
77545
77735
|
waitPromises = [];
|
|
77546
|
-
|
|
77547
|
-
return waitPromises.push(
|
|
77736
|
+
_this34.highlightedNodes.forEach(function (node) {
|
|
77737
|
+
return waitPromises.push(_this34.removeNode(node, {
|
|
77548
77738
|
removeRelationships: true
|
|
77549
77739
|
}));
|
|
77550
77740
|
});
|
|
77551
|
-
|
|
77741
|
+
_context21.next = 4;
|
|
77552
77742
|
return Promise.all(waitPromises);
|
|
77553
77743
|
case 4:
|
|
77554
77744
|
store.commit('highlightNode');
|
|
77555
77745
|
case 5:
|
|
77556
77746
|
case "end":
|
|
77557
|
-
return
|
|
77747
|
+
return _context21.stop();
|
|
77558
77748
|
}
|
|
77559
|
-
},
|
|
77749
|
+
}, _callee21);
|
|
77560
77750
|
})));
|
|
77561
77751
|
case 2:
|
|
77562
77752
|
case "end":
|
|
77563
|
-
return
|
|
77753
|
+
return _context22.stop();
|
|
77564
77754
|
}
|
|
77565
|
-
},
|
|
77755
|
+
}, _callee22);
|
|
77566
77756
|
})));
|
|
77567
77757
|
case 2:
|
|
77568
77758
|
case "end":
|
|
77569
|
-
return
|
|
77759
|
+
return _context23.stop();
|
|
77570
77760
|
}
|
|
77571
|
-
},
|
|
77761
|
+
}, _callee23);
|
|
77572
77762
|
}))();
|
|
77573
77763
|
},
|
|
77574
77764
|
replaceNode: function replaceNode(_ref9) {
|
|
77575
|
-
var
|
|
77765
|
+
var _this35 = this;
|
|
77576
77766
|
var node = _ref9.node,
|
|
77577
77767
|
typeToReplaceWith = _ref9.typeToReplaceWith;
|
|
77578
|
-
this.performSingleUndoRedoTransaction( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
77579
|
-
return _regeneratorRuntime().wrap(function
|
|
77580
|
-
while (1) switch (
|
|
77768
|
+
this.performSingleUndoRedoTransaction( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee25() {
|
|
77769
|
+
return _regeneratorRuntime().wrap(function _callee25$(_context25) {
|
|
77770
|
+
while (1) switch (_context25.prev = _context25.next) {
|
|
77581
77771
|
case 0:
|
|
77582
|
-
|
|
77583
|
-
return
|
|
77584
|
-
var _node$diagram$bounds, x, y, nodeData
|
|
77585
|
-
return _regeneratorRuntime().wrap(function
|
|
77586
|
-
while (1) switch (
|
|
77772
|
+
_context25.next = 2;
|
|
77773
|
+
return _this35.paperManager.performAtomicAction( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee24() {
|
|
77774
|
+
var _node$diagram$bounds, x, y, nodeData;
|
|
77775
|
+
return _regeneratorRuntime().wrap(function _callee24$(_context24) {
|
|
77776
|
+
while (1) switch (_context24.prev = _context24.next) {
|
|
77587
77777
|
case 0:
|
|
77588
77778
|
_node$diagram$bounds = node.diagram.bounds, x = _node$diagram$bounds.x, y = _node$diagram$bounds.y;
|
|
77589
77779
|
nodeData = {
|
|
@@ -77594,96 +77784,89 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
77594
77784
|
},
|
|
77595
77785
|
nodeThatWillBeReplaced: node
|
|
77596
77786
|
};
|
|
77597
|
-
|
|
77598
|
-
|
|
77599
|
-
|
|
77600
|
-
}
|
|
77601
|
-
// Get all node types
|
|
77602
|
-
nodeTypes = nodeTypesStore.getters.getNodeTypes; // Get the new control
|
|
77603
|
-
newControl = nodeTypes.flatMap(function (nodeType) {
|
|
77604
|
-
var _nodeType$items;
|
|
77605
|
-
return (_nodeType$items = nodeType.items) === null || _nodeType$items === void 0 ? void 0 : _nodeType$items.filter(function (item) {
|
|
77606
|
-
return item.type === typeToReplaceWith;
|
|
77607
|
-
});
|
|
77608
|
-
}).filter(Boolean); // If the new control is found, emit event to server to replace node
|
|
77609
|
-
if (newControl.length === 1) {
|
|
77610
|
-
window.ProcessMaker.EventBus.$emit('multiplayer-replaceNode', {
|
|
77611
|
-
nodeData: nodeData,
|
|
77612
|
-
newControl: newControl[0].type
|
|
77613
|
-
});
|
|
77614
|
-
}
|
|
77615
|
-
_context23.next = 10;
|
|
77616
|
-
break;
|
|
77617
|
-
case 8:
|
|
77618
|
-
_context23.next = 10;
|
|
77619
|
-
return _this34.replaceNodeProcedure(nodeData, true);
|
|
77620
|
-
case 10:
|
|
77787
|
+
_context24.next = 4;
|
|
77788
|
+
return _this35.replaceNodeProcedure(nodeData);
|
|
77789
|
+
case 4:
|
|
77621
77790
|
case "end":
|
|
77622
|
-
return
|
|
77791
|
+
return _context24.stop();
|
|
77623
77792
|
}
|
|
77624
|
-
},
|
|
77793
|
+
}, _callee24);
|
|
77625
77794
|
})));
|
|
77626
77795
|
case 2:
|
|
77627
77796
|
case "end":
|
|
77628
|
-
return
|
|
77797
|
+
return _context25.stop();
|
|
77629
77798
|
}
|
|
77630
|
-
},
|
|
77799
|
+
}, _callee25);
|
|
77631
77800
|
})));
|
|
77632
77801
|
},
|
|
77633
77802
|
replaceNodeProcedure: function replaceNodeProcedure(data) {
|
|
77634
77803
|
var _arguments6 = arguments,
|
|
77635
|
-
|
|
77636
|
-
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
77637
|
-
var isReplaced,
|
|
77638
|
-
return _regeneratorRuntime().wrap(function
|
|
77639
|
-
while (1) switch (
|
|
77804
|
+
_this36 = this;
|
|
77805
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee26() {
|
|
77806
|
+
var isReplaced, _this36$paper$localTo, clientX, clientY, newNode, nodeTypes, newControl;
|
|
77807
|
+
return _regeneratorRuntime().wrap(function _callee26$(_context26) {
|
|
77808
|
+
while (1) switch (_context26.prev = _context26.next) {
|
|
77640
77809
|
case 0:
|
|
77641
77810
|
isReplaced = _arguments6.length > 1 && _arguments6[1] !== undefined ? _arguments6[1] : false;
|
|
77642
|
-
|
|
77643
|
-
|
|
77644
|
-
|
|
77645
|
-
|
|
77646
|
-
|
|
77647
|
-
|
|
77648
|
-
|
|
77649
|
-
|
|
77650
|
-
|
|
77651
|
-
|
|
77652
|
-
_context25.next = 7;
|
|
77653
|
-
return _this35.removeNode(data.nodeThatWillBeReplaced, {
|
|
77811
|
+
// Get the clientX and clientY from the node that will be replaced
|
|
77812
|
+
_this36$paper$localTo = _this36.paper.localToClientPoint(data.nodeThatWillBeReplaced.diagram.bounds), clientX = _this36$paper$localTo.x, clientY = _this36$paper$localTo.y;
|
|
77813
|
+
data.clientX = clientX;
|
|
77814
|
+
data.clientY = clientY;
|
|
77815
|
+
_context26.next = 6;
|
|
77816
|
+
return _this36.handleDrop(data);
|
|
77817
|
+
case 6:
|
|
77818
|
+
newNode = _context26.sent;
|
|
77819
|
+
_context26.next = 9;
|
|
77820
|
+
return _this36.removeNode(data.nodeThatWillBeReplaced, {
|
|
77654
77821
|
removeRelationships: false,
|
|
77655
77822
|
isReplaced: isReplaced
|
|
77656
77823
|
});
|
|
77657
|
-
case 7:
|
|
77658
|
-
_this35.highlightNode(newNode);
|
|
77659
|
-
_this35.selectNewNode(newNode);
|
|
77660
77824
|
case 9:
|
|
77825
|
+
_this36.highlightNode(newNode);
|
|
77826
|
+
_this36.selectNewNode(newNode);
|
|
77827
|
+
if (_this36.isMultiplayer && !isReplaced) {
|
|
77828
|
+
// Get all node types
|
|
77829
|
+
nodeTypes = nodeTypesStore.getters.getNodeTypes; // Get the new control
|
|
77830
|
+
newControl = nodeTypes.flatMap(function (nodeType) {
|
|
77831
|
+
var _nodeType$items;
|
|
77832
|
+
return (_nodeType$items = nodeType.items) === null || _nodeType$items === void 0 ? void 0 : _nodeType$items.filter(function (item) {
|
|
77833
|
+
return item.type === data.typeToReplaceWith;
|
|
77834
|
+
});
|
|
77835
|
+
}).filter(Boolean); // If the new control is found, emit event to server to replace node
|
|
77836
|
+
if (newControl.length === 1) {
|
|
77837
|
+
window.ProcessMaker.EventBus.$emit('multiplayer-replaceNode', {
|
|
77838
|
+
data: data,
|
|
77839
|
+
newControl: newControl[0].type
|
|
77840
|
+
});
|
|
77841
|
+
}
|
|
77842
|
+
}
|
|
77843
|
+
case 12:
|
|
77661
77844
|
case "end":
|
|
77662
|
-
return
|
|
77845
|
+
return _context26.stop();
|
|
77663
77846
|
}
|
|
77664
|
-
},
|
|
77847
|
+
}, _callee26);
|
|
77665
77848
|
}))();
|
|
77666
77849
|
},
|
|
77667
77850
|
replaceAiNode: function replaceAiNode(_ref12) {
|
|
77668
|
-
var
|
|
77851
|
+
var _this37 = this;
|
|
77669
77852
|
var node = _ref12.node,
|
|
77670
77853
|
typeToReplaceWith = _ref12.typeToReplaceWith,
|
|
77671
77854
|
assetId = _ref12.assetId,
|
|
77672
77855
|
assetName = _ref12.assetName,
|
|
77673
77856
|
redirectTo = _ref12.redirectTo;
|
|
77674
|
-
this.performSingleUndoRedoTransaction( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
77675
|
-
return _regeneratorRuntime().wrap(function
|
|
77676
|
-
while (1) switch (
|
|
77857
|
+
this.performSingleUndoRedoTransaction( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee28() {
|
|
77858
|
+
return _regeneratorRuntime().wrap(function _callee28$(_context28) {
|
|
77859
|
+
while (1) switch (_context28.prev = _context28.next) {
|
|
77677
77860
|
case 0:
|
|
77678
|
-
|
|
77679
|
-
return
|
|
77680
|
-
var
|
|
77681
|
-
return _regeneratorRuntime().wrap(function
|
|
77682
|
-
while (1) switch (
|
|
77861
|
+
_context28.next = 2;
|
|
77862
|
+
return _this37.paperManager.performAtomicAction( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee27() {
|
|
77863
|
+
var _this37$paper$localTo, clientX, clientY, newNode;
|
|
77864
|
+
return _regeneratorRuntime().wrap(function _callee27$(_context27) {
|
|
77865
|
+
while (1) switch (_context27.prev = _context27.next) {
|
|
77683
77866
|
case 0:
|
|
77684
|
-
|
|
77685
|
-
|
|
77686
|
-
return
|
|
77867
|
+
_this37$paper$localTo = _this37.paper.localToClientPoint(node.diagram.bounds), clientX = _this37$paper$localTo.x, clientY = _this37$paper$localTo.y;
|
|
77868
|
+
_context27.next = 3;
|
|
77869
|
+
return _this37.handleDrop({
|
|
77687
77870
|
clientX: clientX,
|
|
77688
77871
|
clientY: clientY,
|
|
77689
77872
|
control: {
|
|
@@ -77692,7 +77875,7 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
77692
77875
|
nodeThatWillBeReplaced: node
|
|
77693
77876
|
});
|
|
77694
77877
|
case 3:
|
|
77695
|
-
newNode =
|
|
77878
|
+
newNode = _context27.sent;
|
|
77696
77879
|
if (typeToReplaceWith === 'processmaker-modeler-task') {
|
|
77697
77880
|
newNode.definition.screenRef = assetId;
|
|
77698
77881
|
newNode.definition.name = assetName;
|
|
@@ -77707,98 +77890,98 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
77707
77890
|
newNode.definition.config = "{\"calledElement\":\"ProcessId-".concat(assetId, "\",\"processId\":").concat(assetId, ",\"startEvent\":\"node_1\",\"name\":\"").concat(assetName, "\"}");
|
|
77708
77891
|
redirectTo = "".concat(redirectTo, "/").concat(newNode.id);
|
|
77709
77892
|
}
|
|
77710
|
-
|
|
77711
|
-
return
|
|
77893
|
+
_context27.next = 9;
|
|
77894
|
+
return _this37.removeNode(node, {
|
|
77712
77895
|
removeRelationships: false
|
|
77713
77896
|
});
|
|
77714
77897
|
case 9:
|
|
77715
|
-
|
|
77716
|
-
|
|
77717
|
-
|
|
77718
|
-
return
|
|
77898
|
+
_this37.highlightNode(newNode);
|
|
77899
|
+
_this37.selectNewNode(newNode);
|
|
77900
|
+
_context27.next = 13;
|
|
77901
|
+
return _this37.pushToUndoStack();
|
|
77719
77902
|
case 13:
|
|
77720
|
-
|
|
77721
|
-
return
|
|
77903
|
+
_context27.next = 15;
|
|
77904
|
+
return _this37.$nextTick();
|
|
77722
77905
|
case 15:
|
|
77723
|
-
|
|
77906
|
+
_this37.saveBpmn(redirectTo, newNode.id);
|
|
77724
77907
|
case 16:
|
|
77725
77908
|
case "end":
|
|
77726
|
-
return
|
|
77909
|
+
return _context27.stop();
|
|
77727
77910
|
}
|
|
77728
|
-
},
|
|
77911
|
+
}, _callee27);
|
|
77729
77912
|
})));
|
|
77730
77913
|
case 2:
|
|
77731
77914
|
case "end":
|
|
77732
|
-
return
|
|
77915
|
+
return _context28.stop();
|
|
77733
77916
|
}
|
|
77734
|
-
},
|
|
77917
|
+
}, _callee28);
|
|
77735
77918
|
})));
|
|
77736
77919
|
},
|
|
77737
77920
|
replaceGenericFlow: function replaceGenericFlow(_ref15) {
|
|
77738
|
-
var
|
|
77921
|
+
var _this38 = this;
|
|
77739
77922
|
var actualFlow = _ref15.actualFlow,
|
|
77740
77923
|
genericFlow = _ref15.genericFlow,
|
|
77741
77924
|
targetNode = _ref15.targetNode;
|
|
77742
|
-
this.performSingleUndoRedoTransaction( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
77743
|
-
return _regeneratorRuntime().wrap(function
|
|
77744
|
-
while (1) switch (
|
|
77925
|
+
this.performSingleUndoRedoTransaction( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee30() {
|
|
77926
|
+
return _regeneratorRuntime().wrap(function _callee30$(_context30) {
|
|
77927
|
+
while (1) switch (_context30.prev = _context30.next) {
|
|
77745
77928
|
case 0:
|
|
77746
|
-
|
|
77747
|
-
return
|
|
77748
|
-
return _regeneratorRuntime().wrap(function
|
|
77749
|
-
while (1) switch (
|
|
77929
|
+
_context30.next = 2;
|
|
77930
|
+
return _this38.paperManager.performAtomicAction( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee29() {
|
|
77931
|
+
return _regeneratorRuntime().wrap(function _callee29$(_context29) {
|
|
77932
|
+
while (1) switch (_context29.prev = _context29.next) {
|
|
77750
77933
|
case 0:
|
|
77751
|
-
|
|
77752
|
-
return
|
|
77934
|
+
_context29.next = 2;
|
|
77935
|
+
return _this38.highlightNode(null);
|
|
77753
77936
|
case 2:
|
|
77754
|
-
|
|
77755
|
-
return
|
|
77937
|
+
_context29.next = 4;
|
|
77938
|
+
return _this38.$nextTick();
|
|
77756
77939
|
case 4:
|
|
77757
|
-
|
|
77940
|
+
_context29.next = 6;
|
|
77758
77941
|
return store.commit('removeNode', genericFlow);
|
|
77759
77942
|
case 6:
|
|
77760
|
-
|
|
77761
|
-
return
|
|
77943
|
+
_context29.next = 8;
|
|
77944
|
+
return _this38.$nextTick();
|
|
77762
77945
|
case 8:
|
|
77763
|
-
|
|
77764
|
-
return
|
|
77946
|
+
_context29.next = 10;
|
|
77947
|
+
return _this38.addNode(actualFlow, genericFlow.definition.id);
|
|
77765
77948
|
case 10:
|
|
77766
|
-
|
|
77767
|
-
return
|
|
77949
|
+
_context29.next = 12;
|
|
77950
|
+
return _this38.$nextTick();
|
|
77768
77951
|
case 12:
|
|
77769
|
-
|
|
77770
|
-
return
|
|
77952
|
+
_context29.next = 14;
|
|
77953
|
+
return _this38.highlightNode(targetNode);
|
|
77771
77954
|
case 14:
|
|
77772
77955
|
case "end":
|
|
77773
|
-
return
|
|
77956
|
+
return _context29.stop();
|
|
77774
77957
|
}
|
|
77775
|
-
},
|
|
77958
|
+
}, _callee29);
|
|
77776
77959
|
})));
|
|
77777
77960
|
case 2:
|
|
77778
77961
|
case "end":
|
|
77779
|
-
return
|
|
77962
|
+
return _context30.stop();
|
|
77780
77963
|
}
|
|
77781
|
-
},
|
|
77964
|
+
}, _callee30);
|
|
77782
77965
|
})));
|
|
77783
77966
|
},
|
|
77784
77967
|
performSingleUndoRedoTransaction: function performSingleUndoRedoTransaction(cb) {
|
|
77785
|
-
var
|
|
77786
|
-
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
77787
|
-
return _regeneratorRuntime().wrap(function
|
|
77788
|
-
while (1) switch (
|
|
77968
|
+
var _this39 = this;
|
|
77969
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee31() {
|
|
77970
|
+
return _regeneratorRuntime().wrap(function _callee31$(_context31) {
|
|
77971
|
+
while (1) switch (_context31.prev = _context31.next) {
|
|
77789
77972
|
case 0:
|
|
77790
77973
|
undoRedoStore.commit('disableSavingState');
|
|
77791
|
-
|
|
77974
|
+
_context31.next = 3;
|
|
77792
77975
|
return cb();
|
|
77793
77976
|
case 3:
|
|
77794
77977
|
undoRedoStore.commit('enableSavingState');
|
|
77795
|
-
|
|
77796
|
-
return
|
|
77978
|
+
_context31.next = 6;
|
|
77979
|
+
return _this39.pushToUndoStack();
|
|
77797
77980
|
case 6:
|
|
77798
77981
|
case "end":
|
|
77799
|
-
return
|
|
77982
|
+
return _context31.stop();
|
|
77800
77983
|
}
|
|
77801
|
-
},
|
|
77984
|
+
}, _callee31);
|
|
77802
77985
|
}))();
|
|
77803
77986
|
},
|
|
77804
77987
|
removeNodesFromLane: function removeNodesFromLane(node) {
|
|
@@ -77811,36 +77994,36 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
77811
77994
|
pull_default()(containingLane.get('flowNodeRef'), node.definition);
|
|
77812
77995
|
},
|
|
77813
77996
|
removeNodesFromPool: function removeNodesFromPool(node) {
|
|
77814
|
-
var
|
|
77997
|
+
var _this40 = this;
|
|
77815
77998
|
if (node.type === 'processmaker-modeler-pool' && node.definition.processRef) {
|
|
77816
77999
|
if (node.definition.processRef.artifacts) {
|
|
77817
78000
|
node.definition.processRef.artifacts.forEach(function (artifact) {
|
|
77818
|
-
var nodeToRemove =
|
|
78001
|
+
var nodeToRemove = _this40.nodes.find(function (n) {
|
|
77819
78002
|
return n.definition === artifact;
|
|
77820
78003
|
});
|
|
77821
78004
|
if (nodeToRemove) {
|
|
77822
|
-
|
|
78005
|
+
_this40.removeNode(nodeToRemove);
|
|
77823
78006
|
}
|
|
77824
78007
|
});
|
|
77825
78008
|
}
|
|
77826
78009
|
if (node.definition.processRef.flowElements) {
|
|
77827
78010
|
node.definition.processRef.flowElements.forEach(function (flowElement) {
|
|
77828
|
-
var nodeToRemove =
|
|
78011
|
+
var nodeToRemove = _this40.nodes.find(function (n) {
|
|
77829
78012
|
return n.definition === flowElement;
|
|
77830
78013
|
});
|
|
77831
78014
|
if (nodeToRemove) {
|
|
77832
|
-
|
|
78015
|
+
_this40.removeNode(nodeToRemove);
|
|
77833
78016
|
}
|
|
77834
78017
|
});
|
|
77835
78018
|
}
|
|
77836
78019
|
var laneSets = node.definition.processRef.laneSets;
|
|
77837
78020
|
if (!!laneSets && laneSets.length > 0) {
|
|
77838
78021
|
laneSets[0].lanes.forEach(function (lane) {
|
|
77839
|
-
var nodeToRemove =
|
|
78022
|
+
var nodeToRemove = _this40.nodes.find(function (n) {
|
|
77840
78023
|
return n.definition === lane;
|
|
77841
78024
|
});
|
|
77842
78025
|
if (nodeToRemove) {
|
|
77843
|
-
|
|
78026
|
+
_this40.removeNode(nodeToRemove);
|
|
77844
78027
|
}
|
|
77845
78028
|
});
|
|
77846
78029
|
}
|
|
@@ -77868,13 +78051,13 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
77868
78051
|
return shape.component != null;
|
|
77869
78052
|
},
|
|
77870
78053
|
setShapeStacking: function setShapeStacking(shape) {
|
|
77871
|
-
var
|
|
78054
|
+
var _this41 = this;
|
|
77872
78055
|
if (this.isRendering || !shape.component.node.isType('processmaker-modeler-pool') && shape === this.previouslyStackedShape) {
|
|
77873
78056
|
return;
|
|
77874
78057
|
}
|
|
77875
78058
|
this.previouslyStackedShape = shape;
|
|
77876
78059
|
this.paperManager.performAtomicAction(function () {
|
|
77877
|
-
return ensureShapeIsNotCovered(shape,
|
|
78060
|
+
return ensureShapeIsNotCovered(shape, _this41.graph);
|
|
77878
78061
|
});
|
|
77879
78062
|
},
|
|
77880
78063
|
showSavedNotification: function showSavedNotification() {
|
|
@@ -77908,49 +78091,49 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
77908
78091
|
return false;
|
|
77909
78092
|
},
|
|
77910
78093
|
pointerDowInShape: function pointerDowInShape(event, element) {
|
|
77911
|
-
var
|
|
77912
|
-
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
78094
|
+
var _this42 = this;
|
|
78095
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee32() {
|
|
77913
78096
|
var x, y, shapeView;
|
|
77914
|
-
return _regeneratorRuntime().wrap(function
|
|
77915
|
-
while (1) switch (
|
|
78097
|
+
return _regeneratorRuntime().wrap(function _callee32$(_context32) {
|
|
78098
|
+
while (1) switch (_context32.prev = _context32.next) {
|
|
77916
78099
|
case 0:
|
|
77917
78100
|
x = event.clientX, y = event.clientY;
|
|
77918
|
-
shapeView =
|
|
77919
|
-
|
|
77920
|
-
|
|
77921
|
-
|
|
77922
|
-
|
|
78101
|
+
shapeView = _this42.paper.findViewByModel(element);
|
|
78102
|
+
_this42.isDragging = false;
|
|
78103
|
+
_this42.isSelecting = false;
|
|
78104
|
+
_this42.isIntoTheSelection = false;
|
|
78105
|
+
_this42.dragStart = {
|
|
77923
78106
|
x: x,
|
|
77924
78107
|
y: y
|
|
77925
78108
|
};
|
|
77926
78109
|
// Verify if is in the selection box
|
|
77927
|
-
if (!
|
|
77928
|
-
|
|
78110
|
+
if (!_this42.isPointInSelection(event)) {
|
|
78111
|
+
_context32.next = 10;
|
|
77929
78112
|
break;
|
|
77930
78113
|
}
|
|
77931
|
-
|
|
77932
|
-
|
|
78114
|
+
_this42.isIntoTheSelection = true;
|
|
78115
|
+
_context32.next = 15;
|
|
77933
78116
|
break;
|
|
77934
78117
|
case 10:
|
|
77935
78118
|
if (event.shiftKey) {
|
|
77936
|
-
|
|
78119
|
+
_context32.next = 15;
|
|
77937
78120
|
break;
|
|
77938
78121
|
}
|
|
77939
|
-
|
|
77940
|
-
return
|
|
78122
|
+
_context32.next = 13;
|
|
78123
|
+
return _this42.$refs.selector.selectElement(shapeView);
|
|
77941
78124
|
case 13:
|
|
77942
|
-
|
|
77943
|
-
return
|
|
78125
|
+
_context32.next = 15;
|
|
78126
|
+
return _this42.$nextTick();
|
|
77944
78127
|
case 15:
|
|
77945
|
-
|
|
78128
|
+
_this42.$refs.selector.startDrag({
|
|
77946
78129
|
clientX: event.clientX,
|
|
77947
78130
|
clientY: event.clientY
|
|
77948
78131
|
});
|
|
77949
78132
|
case 16:
|
|
77950
78133
|
case "end":
|
|
77951
|
-
return
|
|
78134
|
+
return _context32.stop();
|
|
77952
78135
|
}
|
|
77953
|
-
},
|
|
78136
|
+
}, _callee32);
|
|
77954
78137
|
}))();
|
|
77955
78138
|
},
|
|
77956
78139
|
pointerDownHandler: function pointerDownHandler(event) {
|
|
@@ -78071,7 +78254,7 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
78071
78254
|
this.$emit('set-xml-manager', this.xmlManager);
|
|
78072
78255
|
},
|
|
78073
78256
|
mounted: function mounted() {
|
|
78074
|
-
var
|
|
78257
|
+
var _this43 = this;
|
|
78075
78258
|
store.commit('setReadOnly', this.readOnly);
|
|
78076
78259
|
this.graph = new external_jointjs_.dia.Graph();
|
|
78077
78260
|
store.commit('setGraph', this.graph);
|
|
@@ -78090,47 +78273,47 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
78090
78273
|
store.commit('setPaper', this.paperManager.paper);
|
|
78091
78274
|
this.paperManager.addEventHandler('element:pointerclick', this.blurFocusedScreenBuilderElement, this);
|
|
78092
78275
|
this.paperManager.addEventHandler('blank:pointerdown', function (event, x, y) {
|
|
78093
|
-
if (
|
|
78276
|
+
if (_this43.isGrabbing) return;
|
|
78094
78277
|
if (store.getters.isReadOnly) {
|
|
78095
|
-
|
|
78278
|
+
_this43.isGrabbing = true;
|
|
78096
78279
|
}
|
|
78097
|
-
var scale =
|
|
78098
|
-
|
|
78280
|
+
var scale = _this43.paperManager.scale;
|
|
78281
|
+
_this43.canvasDragPosition = {
|
|
78099
78282
|
x: x * scale.sx,
|
|
78100
78283
|
y: y * scale.sy
|
|
78101
78284
|
};
|
|
78102
|
-
|
|
78103
|
-
|
|
78285
|
+
_this43.isOverShape = false;
|
|
78286
|
+
_this43.pointerDownHandler(event);
|
|
78104
78287
|
}, this);
|
|
78105
78288
|
this.paperManager.addEventHandler('cell:mouseover element:mouseover', function (_ref19) {
|
|
78106
78289
|
var shape = _ref19.model;
|
|
78107
|
-
if (
|
|
78290
|
+
if (_this43.isBpmnNode(shape) && shape.attr('body/cursor') !== 'default' && !_this43.isGrabbing) {
|
|
78108
78291
|
shape.attr('body/cursor', 'move');
|
|
78109
78292
|
}
|
|
78110
78293
|
// If the user is panning the Paper while hovering an element, ignore the default move cursor
|
|
78111
|
-
if (
|
|
78294
|
+
if (_this43.isGrabbing && _this43.isBpmnNode(shape)) {
|
|
78112
78295
|
shape.attr('body/cursor', 'grabbing');
|
|
78113
78296
|
}
|
|
78114
78297
|
});
|
|
78115
78298
|
this.paperManager.addEventHandler('blank:pointerup', function (event) {
|
|
78116
|
-
|
|
78117
|
-
|
|
78118
|
-
|
|
78119
|
-
|
|
78299
|
+
_this43.isGrabbing = false;
|
|
78300
|
+
_this43.canvasDragPosition = null;
|
|
78301
|
+
_this43.activeNode = null;
|
|
78302
|
+
_this43.pointerUpHandler(event);
|
|
78120
78303
|
}, this);
|
|
78121
78304
|
this.paperManager.addEventHandler('cell:pointerup', function (cellView, event) {
|
|
78122
|
-
|
|
78123
|
-
|
|
78124
|
-
|
|
78305
|
+
_this43.canvasDragPosition = null;
|
|
78306
|
+
_this43.activeNode = null;
|
|
78307
|
+
_this43.pointerUpHandler(event, cellView);
|
|
78125
78308
|
}, this);
|
|
78126
78309
|
this.$refs['paper-container'].addEventListener('mouseenter', function () {
|
|
78127
78310
|
store.commit('setClientLeftPaper', false);
|
|
78128
78311
|
});
|
|
78129
78312
|
this.$el.addEventListener('mousemove', function (event) {
|
|
78130
|
-
|
|
78313
|
+
_this43.pointerMoveHandler(event);
|
|
78131
78314
|
});
|
|
78132
78315
|
this.$refs['paper-container'].addEventListener('mouseleave', function () {
|
|
78133
|
-
|
|
78316
|
+
_this43.paperManager.removeEventHandler('blank:pointermove');
|
|
78134
78317
|
store.commit('setClientLeftPaper', true);
|
|
78135
78318
|
});
|
|
78136
78319
|
this.paperManager.addEventHandler('cell:pointerclick', function (cellView, evt, x, y) {
|
|
@@ -78141,44 +78324,44 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
78141
78324
|
});
|
|
78142
78325
|
this.paperManager.addEventHandler('cell:pointerclick', function (_ref20, event) {
|
|
78143
78326
|
var shape = _ref20.model;
|
|
78144
|
-
if (!
|
|
78327
|
+
if (!_this43.isBpmnNode(shape)) {
|
|
78145
78328
|
return;
|
|
78146
78329
|
}
|
|
78147
78330
|
|
|
78148
78331
|
// ignore click event if the user is Grabbing the paper
|
|
78149
|
-
if (
|
|
78332
|
+
if (_this43.isGrabbing) return;
|
|
78150
78333
|
shape.component.$emit('click', event);
|
|
78151
|
-
|
|
78334
|
+
_this43.$emit('click', {
|
|
78152
78335
|
event: event,
|
|
78153
|
-
node:
|
|
78336
|
+
node: _this43.highlightedNode.definition
|
|
78154
78337
|
});
|
|
78155
78338
|
});
|
|
78156
78339
|
this.paperManager.addEventHandler('cell:pointerdown', function (_ref21, event) {
|
|
78157
78340
|
var shape = _ref21.model;
|
|
78158
|
-
if (!
|
|
78341
|
+
if (!_this43.isBpmnNode(shape)) {
|
|
78159
78342
|
return;
|
|
78160
78343
|
}
|
|
78161
78344
|
// If the user is pressing Space (grabbing) and clicking on a Cell, return
|
|
78162
|
-
if (
|
|
78345
|
+
if (_this43.isGrabbing) {
|
|
78163
78346
|
return;
|
|
78164
78347
|
}
|
|
78165
|
-
|
|
78166
|
-
|
|
78167
|
-
|
|
78168
|
-
|
|
78348
|
+
_this43.setShapeStacking(shape);
|
|
78349
|
+
_this43.activeNode = shape.component.node;
|
|
78350
|
+
_this43.isOverShape = true;
|
|
78351
|
+
_this43.pointerDowInShape(event, shape);
|
|
78169
78352
|
});
|
|
78170
78353
|
// If the user is grabbing the paper while he clicked in a cell, move the paper and not the cell
|
|
78171
78354
|
this.paperManager.addEventHandler('cell:pointermove', function (_, event, x, y) {
|
|
78172
|
-
if (
|
|
78173
|
-
if (!
|
|
78174
|
-
var scale =
|
|
78175
|
-
|
|
78355
|
+
if (_this43.isGrabbing) {
|
|
78356
|
+
if (!_this43.canvasDragPosition) {
|
|
78357
|
+
var scale = _this43.paperManager.scale;
|
|
78358
|
+
_this43.canvasDragPosition = {
|
|
78176
78359
|
x: x * scale.sx,
|
|
78177
78360
|
y: y * scale.sy
|
|
78178
78361
|
};
|
|
78179
78362
|
}
|
|
78180
|
-
if (
|
|
78181
|
-
|
|
78363
|
+
if (_this43.canvasDragPosition && !_this43.clientLeftPaper) {
|
|
78364
|
+
_this43.paperManager.translate(event.offsetX - _this43.canvasDragPosition.x, event.offsetY - _this43.canvasDragPosition.y);
|
|
78182
78365
|
}
|
|
78183
78366
|
}
|
|
78184
78367
|
});
|
|
@@ -78189,28 +78372,29 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
78189
78372
|
modeler: this,
|
|
78190
78373
|
registerMenuAction: this.registerMenuAction,
|
|
78191
78374
|
loadXML: function () {
|
|
78192
|
-
var _loadXML = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
78375
|
+
var _loadXML = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee33(xml) {
|
|
78193
78376
|
var multiplayer;
|
|
78194
|
-
return _regeneratorRuntime().wrap(function
|
|
78195
|
-
while (1) switch (
|
|
78377
|
+
return _regeneratorRuntime().wrap(function _callee33$(_context33) {
|
|
78378
|
+
while (1) switch (_context33.prev = _context33.next) {
|
|
78196
78379
|
case 0:
|
|
78197
|
-
|
|
78198
|
-
return
|
|
78380
|
+
_context33.next = 2;
|
|
78381
|
+
return _this43.loadXML(xml);
|
|
78199
78382
|
case 2:
|
|
78200
|
-
|
|
78383
|
+
_context33.next = 4;
|
|
78201
78384
|
return undoRedoStore.dispatch('pushState', xml);
|
|
78202
78385
|
case 4:
|
|
78203
78386
|
try {
|
|
78204
|
-
multiplayer = new Multiplayer(
|
|
78387
|
+
multiplayer = new Multiplayer(_this43);
|
|
78205
78388
|
multiplayer.init();
|
|
78389
|
+
_this43.multiplayer = multiplayer;
|
|
78206
78390
|
} catch (error) {
|
|
78207
78391
|
console.warn('Could not initialize multiplayer', error);
|
|
78208
78392
|
}
|
|
78209
78393
|
case 5:
|
|
78210
78394
|
case "end":
|
|
78211
|
-
return
|
|
78395
|
+
return _context33.stop();
|
|
78212
78396
|
}
|
|
78213
|
-
},
|
|
78397
|
+
}, _callee33);
|
|
78214
78398
|
}));
|
|
78215
78399
|
function loadXML(_x) {
|
|
78216
78400
|
return _loadXML.apply(this, arguments);
|
|
@@ -78218,18 +78402,18 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
78218
78402
|
return loadXML;
|
|
78219
78403
|
}(),
|
|
78220
78404
|
addWarnings: function addWarnings(warnings) {
|
|
78221
|
-
return
|
|
78405
|
+
return _this43.$emit('warnings', warnings);
|
|
78222
78406
|
},
|
|
78223
78407
|
addBreadcrumbs: function addBreadcrumbs(breadcrumbs) {
|
|
78224
|
-
return
|
|
78408
|
+
return _this43.breadcrumbData.push(breadcrumbs);
|
|
78225
78409
|
}
|
|
78226
78410
|
});
|
|
78227
78411
|
this.$root.$on('replace-ai-node', function (data) {
|
|
78228
|
-
|
|
78412
|
+
_this43.replaceAiNode(data);
|
|
78229
78413
|
});
|
|
78230
78414
|
window.ProcessMaker.EventBus.$on('save-changes', function (redirectUrl) {
|
|
78231
78415
|
if (redirectUrl) {
|
|
78232
|
-
|
|
78416
|
+
_this43.redirect(redirectUrl);
|
|
78233
78417
|
}
|
|
78234
78418
|
});
|
|
78235
78419
|
}
|
|
@@ -78251,8 +78435,8 @@ var modelervue_type_style_index_0_prod_lang_scss_ = __webpack_require__(26695);
|
|
|
78251
78435
|
|
|
78252
78436
|
var Modeler_component = normalizeComponent(
|
|
78253
78437
|
modeler_Modelervue_type_script_lang_js_,
|
|
78254
|
-
|
|
78255
|
-
|
|
78438
|
+
Modelervue_type_template_id_0e494be6_render,
|
|
78439
|
+
Modelervue_type_template_id_0e494be6_staticRenderFns,
|
|
78256
78440
|
false,
|
|
78257
78441
|
null,
|
|
78258
78442
|
null,
|