@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.common.js
CHANGED
|
@@ -12818,7 +12818,7 @@ ___CSS_LOADER_EXPORT___.push([module.id, ".weekday[data-v-4ae18478]{padding:.75e
|
|
|
12818
12818
|
|
|
12819
12819
|
/***/ }),
|
|
12820
12820
|
|
|
12821
|
-
/***/
|
|
12821
|
+
/***/ 80762:
|
|
12822
12822
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
12823
12823
|
|
|
12824
12824
|
"use strict";
|
|
@@ -12832,7 +12832,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
12832
12832
|
|
|
12833
12833
|
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()));
|
|
12834
12834
|
// Module
|
|
12835
|
-
___CSS_LOADER_EXPORT___.push([module.id, ".box[data-v-
|
|
12835
|
+
___CSS_LOADER_EXPORT___.push([module.id, ".box[data-v-7c27567b]{border:1px solid #5faaee;position:absolute;pointer-events:none}", ""]);
|
|
12836
12836
|
// Exports
|
|
12837
12837
|
/* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___);
|
|
12838
12838
|
|
|
@@ -12990,7 +12990,7 @@ ___CSS_LOADER_EXPORT___.push([module.id, ".crown-button[data-v-09d8a8ac]{border:
|
|
|
12990
12990
|
|
|
12991
12991
|
/***/ }),
|
|
12992
12992
|
|
|
12993
|
-
/***/
|
|
12993
|
+
/***/ 15855:
|
|
12994
12994
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
12995
12995
|
|
|
12996
12996
|
"use strict";
|
|
@@ -13009,7 +13009,7 @@ var ___CSS_LOADER_URL_IMPORT_0___ = new URL(/* asset import */ __webpack_require
|
|
|
13009
13009
|
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()));
|
|
13010
13010
|
var ___CSS_LOADER_URL_REPLACEMENT_0___ = _node_modules_css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_2___default()(___CSS_LOADER_URL_IMPORT_0___);
|
|
13011
13011
|
// Module
|
|
13012
|
-
___CSS_LOADER_EXPORT___.push([module.id, ".color-list[data-v-
|
|
13012
|
+
___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}", ""]);
|
|
13013
13013
|
// Exports
|
|
13014
13014
|
/* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___);
|
|
13015
13015
|
|
|
@@ -26431,19 +26431,19 @@ var update = add("406dc84a", content, true, {"sourceMap":false,"shadowMode":fals
|
|
|
26431
26431
|
|
|
26432
26432
|
/***/ }),
|
|
26433
26433
|
|
|
26434
|
-
/***/
|
|
26434
|
+
/***/ 34154:
|
|
26435
26435
|
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
|
26436
26436
|
|
|
26437
26437
|
// style-loader: Adds some css to the DOM by adding a <style> tag
|
|
26438
26438
|
|
|
26439
26439
|
// load the styles
|
|
26440
|
-
var content = __webpack_require__(
|
|
26440
|
+
var content = __webpack_require__(80762);
|
|
26441
26441
|
if(content.__esModule) content = content.default;
|
|
26442
26442
|
if(typeof content === 'string') content = [[module.id, content, '']];
|
|
26443
26443
|
if(content.locals) module.exports = content.locals;
|
|
26444
26444
|
// add the styles to the DOM
|
|
26445
26445
|
var add = (__webpack_require__(54402)/* ["default"] */ .Z)
|
|
26446
|
-
var update = add("
|
|
26446
|
+
var update = add("11827b8c", content, true, {"sourceMap":false,"shadowMode":false});
|
|
26447
26447
|
|
|
26448
26448
|
/***/ }),
|
|
26449
26449
|
|
|
@@ -26543,19 +26543,19 @@ var update = add("c508a614", content, true, {"sourceMap":false,"shadowMode":fals
|
|
|
26543
26543
|
|
|
26544
26544
|
/***/ }),
|
|
26545
26545
|
|
|
26546
|
-
/***/
|
|
26546
|
+
/***/ 19738:
|
|
26547
26547
|
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
|
26548
26548
|
|
|
26549
26549
|
// style-loader: Adds some css to the DOM by adding a <style> tag
|
|
26550
26550
|
|
|
26551
26551
|
// load the styles
|
|
26552
|
-
var content = __webpack_require__(
|
|
26552
|
+
var content = __webpack_require__(15855);
|
|
26553
26553
|
if(content.__esModule) content = content.default;
|
|
26554
26554
|
if(typeof content === 'string') content = [[module.id, content, '']];
|
|
26555
26555
|
if(content.locals) module.exports = content.locals;
|
|
26556
26556
|
// add the styles to the DOM
|
|
26557
26557
|
var add = (__webpack_require__(54402)/* ["default"] */ .Z)
|
|
26558
|
-
var update = add("
|
|
26558
|
+
var update = add("b9b04a9e", content, true, {"sourceMap":false,"shadowMode":false});
|
|
26559
26559
|
|
|
26560
26560
|
/***/ }),
|
|
26561
26561
|
|
|
@@ -34793,8 +34793,8 @@ var crownTaskDropdown_component = normalizeComponent(
|
|
|
34793
34793
|
)
|
|
34794
34794
|
|
|
34795
34795
|
/* harmony default export */ var crownTaskDropdown = (crownTaskDropdown_component.exports);
|
|
34796
|
-
;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/crown/crownButtons/crownBoundaryEventDropdown.vue?vue&type=template&id=
|
|
34797
|
-
var
|
|
34796
|
+
;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/crown/crownButtons/crownBoundaryEventDropdown.vue?vue&type=template&id=e00dd116&
|
|
34797
|
+
var crownBoundaryEventDropdownvue_type_template_id_e00dd116_render = function render() {
|
|
34798
34798
|
var _vm = this,
|
|
34799
34799
|
_c = _vm._self._c;
|
|
34800
34800
|
return _vm.dropdownData.length > 0 ? _c('div', {
|
|
@@ -34870,7 +34870,7 @@ var crownBoundaryEventDropdownvue_type_template_id_125b7b60_render = function re
|
|
|
34870
34870
|
}, [_vm._v(" " + _vm._s(_vm.getErrorTooltipText(disabledLabel)) + " ")]) : _vm._e()], 1);
|
|
34871
34871
|
}), 0) : _vm._e()], 1) : _vm._e();
|
|
34872
34872
|
};
|
|
34873
|
-
var
|
|
34873
|
+
var crownBoundaryEventDropdownvue_type_template_id_e00dd116_staticRenderFns = [];
|
|
34874
34874
|
|
|
34875
34875
|
;// CONCATENATED MODULE: ./src/assets/boundary-event.svg
|
|
34876
34876
|
var boundary_event_namespaceObject = __webpack_require__.p + "img/boundary-event.40a868e9.svg";
|
|
@@ -34950,6 +34950,7 @@ function spaceAvailable(dropTarget) {
|
|
|
34950
34950
|
diagram.bounds.y = emptyPort.y - diagram.bounds.height / 2;
|
|
34951
34951
|
var node = new Node(nodeType, definition, diagram);
|
|
34952
34952
|
node.pool = this.node.pool;
|
|
34953
|
+
node.fromCrown = true;
|
|
34953
34954
|
store.commit('highlightNode', node);
|
|
34954
34955
|
this.$emit('add-node', node);
|
|
34955
34956
|
}
|
|
@@ -34976,8 +34977,8 @@ var crownDropdownvue_type_style_index_0_prod_lang_scss_ = __webpack_require__(87
|
|
|
34976
34977
|
|
|
34977
34978
|
var crownBoundaryEventDropdown_component = normalizeComponent(
|
|
34978
34979
|
crownButtons_crownBoundaryEventDropdownvue_type_script_lang_js_,
|
|
34979
|
-
|
|
34980
|
-
|
|
34980
|
+
crownBoundaryEventDropdownvue_type_template_id_e00dd116_render,
|
|
34981
|
+
crownBoundaryEventDropdownvue_type_template_id_e00dd116_staticRenderFns,
|
|
34981
34982
|
false,
|
|
34982
34983
|
null,
|
|
34983
34984
|
null,
|
|
@@ -34986,9 +34987,9 @@ var crownBoundaryEventDropdown_component = normalizeComponent(
|
|
|
34986
34987
|
)
|
|
34987
34988
|
|
|
34988
34989
|
/* harmony default export */ var crownBoundaryEventDropdown = (crownBoundaryEventDropdown_component.exports);
|
|
34989
|
-
;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/crown/crownButtons/crownColorDropdown.vue?vue&type=template&id=
|
|
34990
|
+
;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/crown/crownButtons/crownColorDropdown.vue?vue&type=template&id=76b859ea&scoped=true&
|
|
34990
34991
|
|
|
34991
|
-
var
|
|
34992
|
+
var crownColorDropdownvue_type_template_id_76b859ea_scoped_true_render = function render() {
|
|
34992
34993
|
var _vm = this,
|
|
34993
34994
|
_c = _vm._self._c;
|
|
34994
34995
|
return !_vm.hide ? _c('div', {
|
|
@@ -35115,9 +35116,9 @@ var crownColorDropdownvue_type_template_id_76ef27c6_scoped_true_render = functio
|
|
|
35115
35116
|
}
|
|
35116
35117
|
})], 1)])], 1) : _vm._e();
|
|
35117
35118
|
};
|
|
35118
|
-
var
|
|
35119
|
+
var crownColorDropdownvue_type_template_id_76b859ea_scoped_true_staticRenderFns = [];
|
|
35119
35120
|
|
|
35120
|
-
;// CONCATENATED MODULE: ./src/components/crown/crownButtons/crownColorDropdown.vue?vue&type=template&id=
|
|
35121
|
+
;// CONCATENATED MODULE: ./src/components/crown/crownButtons/crownColorDropdown.vue?vue&type=template&id=76b859ea&scoped=true&
|
|
35121
35122
|
|
|
35122
35123
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/web.btoa.js
|
|
35123
35124
|
var web_btoa = __webpack_require__(27479);
|
|
@@ -35779,6 +35780,7 @@ var free_solid_svg_icons_namespaceObject = require("@fortawesome/free-solid-svg-
|
|
|
35779
35780
|
this.resetCustomIcon();
|
|
35780
35781
|
},
|
|
35781
35782
|
setNodeColor: function setNodeColor(color) {
|
|
35783
|
+
var _this$node$definition;
|
|
35782
35784
|
store.commit('updateNodeProp', {
|
|
35783
35785
|
node: this.node,
|
|
35784
35786
|
key: 'color',
|
|
@@ -35795,7 +35797,8 @@ var free_solid_svg_icons_namespaceObject = require("@fortawesome/free-solid-svg-
|
|
|
35795
35797
|
height: this.node.diagram.bounds.height,
|
|
35796
35798
|
width: this.node.diagram.bounds.width,
|
|
35797
35799
|
type: this.node.type,
|
|
35798
|
-
id: this.node.definition.id
|
|
35800
|
+
id: this.node.definition.id,
|
|
35801
|
+
attachedToRefId: (_this$node$definition = this.node.definition.get('attachedToRef')) === null || _this$node$definition === void 0 ? void 0 : _this$node$definition.id
|
|
35799
35802
|
}
|
|
35800
35803
|
};
|
|
35801
35804
|
window.ProcessMaker.EventBus.$emit('multiplayer-updateNodes', [properties]);
|
|
@@ -35849,9 +35852,9 @@ var free_solid_svg_icons_namespaceObject = require("@fortawesome/free-solid-svg-
|
|
|
35849
35852
|
});
|
|
35850
35853
|
;// CONCATENATED MODULE: ./src/components/crown/crownButtons/crownColorDropdown.vue?vue&type=script&lang=js&
|
|
35851
35854
|
/* harmony default export */ var crownButtons_crownColorDropdownvue_type_script_lang_js_ = (crownColorDropdownvue_type_script_lang_js_);
|
|
35852
|
-
// EXTERNAL MODULE: ./node_modules/vue-style-loader/index.js??clonedRuleSet-22.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-22.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-22.use[2]!./node_modules/@vue/cli-service/node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[3]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-22.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=
|
|
35853
|
-
var
|
|
35854
|
-
;// CONCATENATED MODULE: ./src/components/crown/crownButtons/crownColorDropdown.vue?vue&type=style&index=0&id=
|
|
35855
|
+
// EXTERNAL MODULE: ./node_modules/vue-style-loader/index.js??clonedRuleSet-22.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-22.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-22.use[2]!./node_modules/@vue/cli-service/node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[3]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-22.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&
|
|
35856
|
+
var crownColorDropdownvue_type_style_index_0_id_76b859ea_prod_lang_scss_scoped_true_ = __webpack_require__(19738);
|
|
35857
|
+
;// CONCATENATED MODULE: ./src/components/crown/crownButtons/crownColorDropdown.vue?vue&type=style&index=0&id=76b859ea&prod&lang=scss&scoped=true&
|
|
35855
35858
|
|
|
35856
35859
|
;// CONCATENATED MODULE: ./src/components/crown/crownButtons/crownColorDropdown.vue
|
|
35857
35860
|
|
|
@@ -35864,11 +35867,11 @@ var crownColorDropdownvue_type_style_index_0_id_76ef27c6_prod_lang_scss_scoped_t
|
|
|
35864
35867
|
|
|
35865
35868
|
var crownColorDropdown_component = normalizeComponent(
|
|
35866
35869
|
crownButtons_crownColorDropdownvue_type_script_lang_js_,
|
|
35867
|
-
|
|
35868
|
-
|
|
35870
|
+
crownColorDropdownvue_type_template_id_76b859ea_scoped_true_render,
|
|
35871
|
+
crownColorDropdownvue_type_template_id_76b859ea_scoped_true_staticRenderFns,
|
|
35869
35872
|
false,
|
|
35870
35873
|
null,
|
|
35871
|
-
"
|
|
35874
|
+
"76b859ea",
|
|
35872
35875
|
null
|
|
35873
35876
|
|
|
35874
35877
|
)
|
|
@@ -47688,10 +47691,10 @@ var ValidationStatus_component = normalizeComponent(
|
|
|
47688
47691
|
)
|
|
47689
47692
|
|
|
47690
47693
|
/* harmony default export */ var ValidationStatus = (ValidationStatus_component.exports);
|
|
47691
|
-
;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/modeler/Modeler.vue?vue&type=template&id=
|
|
47694
|
+
;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/modeler/Modeler.vue?vue&type=template&id=0e494be6&
|
|
47692
47695
|
|
|
47693
47696
|
|
|
47694
|
-
var
|
|
47697
|
+
var Modelervue_type_template_id_0e494be6_render = function render() {
|
|
47695
47698
|
var _vm = this,
|
|
47696
47699
|
_c = _vm._self._c;
|
|
47697
47700
|
return _c('span', {
|
|
@@ -47910,12 +47913,12 @@ var Modelervue_type_template_id_83a477c8_render = function render() {
|
|
|
47910
47913
|
}
|
|
47911
47914
|
}) : _vm._e()], 2)], 1);
|
|
47912
47915
|
};
|
|
47913
|
-
var
|
|
47916
|
+
var Modelervue_type_template_id_0e494be6_staticRenderFns = [];
|
|
47914
47917
|
|
|
47915
|
-
;// CONCATENATED MODULE: ./src/components/modeler/Modeler.vue?vue&type=template&id=
|
|
47918
|
+
;// CONCATENATED MODULE: ./src/components/modeler/Modeler.vue?vue&type=template&id=0e494be6&
|
|
47916
47919
|
|
|
47917
|
-
;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/nodes/boundaryEvent/boundaryEvent.vue?vue&type=template&id=
|
|
47918
|
-
var
|
|
47920
|
+
;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/nodes/boundaryEvent/boundaryEvent.vue?vue&type=template&id=58bceaa8&
|
|
47921
|
+
var boundaryEventvue_type_template_id_58bceaa8_render = function render() {
|
|
47919
47922
|
var _vm = this,
|
|
47920
47923
|
_c = _vm._self._c;
|
|
47921
47924
|
return _c('crown-config', _vm._g({
|
|
@@ -47934,7 +47937,7 @@ var boundaryEventvue_type_template_id_2979ecac_render = function render() {
|
|
|
47934
47937
|
}
|
|
47935
47938
|
}, _vm.$listeners));
|
|
47936
47939
|
};
|
|
47937
|
-
var
|
|
47940
|
+
var boundaryEventvue_type_template_id_58bceaa8_staticRenderFns = [];
|
|
47938
47941
|
|
|
47939
47942
|
;// CONCATENATED MODULE: ./src/components/nodes/boundaryEvent/shape.js
|
|
47940
47943
|
|
|
@@ -48164,6 +48167,26 @@ var boundaryEventvue_type_template_id_2979ecac_staticRenderFns = [];
|
|
|
48164
48167
|
resetShapeColor(this.invalidTargetElement);
|
|
48165
48168
|
}
|
|
48166
48169
|
this.invalidTargetElement = targetElement;
|
|
48170
|
+
},
|
|
48171
|
+
addMultiplayerBoundaryEvent: function addMultiplayerBoundaryEvent() {
|
|
48172
|
+
var _this$node$definition;
|
|
48173
|
+
var control = {
|
|
48174
|
+
bpmnType: this.node.diagram.$type,
|
|
48175
|
+
id: this.node.diagram.id,
|
|
48176
|
+
type: this.node.type,
|
|
48177
|
+
attachedToRef: this.node.definition.get('attachedToRef')
|
|
48178
|
+
};
|
|
48179
|
+
window.ProcessMaker.EventBus.$emit('multiplayer-addBoundaryEvent', {
|
|
48180
|
+
x: this.node.diagram.bounds.x,
|
|
48181
|
+
y: this.node.diagram.bounds.y,
|
|
48182
|
+
height: this.node.diagram.bounds.height,
|
|
48183
|
+
width: this.node.diagram.bounds.width,
|
|
48184
|
+
attachedToRefId: (_this$node$definition = this.node.definition.get('attachedToRef')) === null || _this$node$definition === void 0 ? void 0 : _this$node$definition.id,
|
|
48185
|
+
control: control,
|
|
48186
|
+
type: this.node.type,
|
|
48187
|
+
id: this.node.definition.id,
|
|
48188
|
+
color: this.node.definition.get('color')
|
|
48189
|
+
});
|
|
48167
48190
|
}
|
|
48168
48191
|
},
|
|
48169
48192
|
mounted: function mounted() {
|
|
@@ -48183,7 +48206,10 @@ var boundaryEventvue_type_template_id_2979ecac_staticRenderFns = [];
|
|
|
48183
48206
|
task = _this2.getTaskUnderShape();
|
|
48184
48207
|
_this2.attachBoundaryEventToTask(task);
|
|
48185
48208
|
_this2.updateShapePosition(task);
|
|
48186
|
-
|
|
48209
|
+
if (_this2.node.fromCrown) {
|
|
48210
|
+
_this2.addMultiplayerBoundaryEvent();
|
|
48211
|
+
}
|
|
48212
|
+
case 10:
|
|
48187
48213
|
case "end":
|
|
48188
48214
|
return _context.stop();
|
|
48189
48215
|
}
|
|
@@ -48203,8 +48229,8 @@ var boundaryEventvue_type_template_id_2979ecac_staticRenderFns = [];
|
|
|
48203
48229
|
;
|
|
48204
48230
|
var boundaryEvent_component = normalizeComponent(
|
|
48205
48231
|
boundaryEvent_boundaryEventvue_type_script_lang_js_,
|
|
48206
|
-
|
|
48207
|
-
|
|
48232
|
+
boundaryEventvue_type_template_id_58bceaa8_render,
|
|
48233
|
+
boundaryEventvue_type_template_id_58bceaa8_staticRenderFns,
|
|
48208
48234
|
false,
|
|
48209
48235
|
null,
|
|
48210
48236
|
null,
|
|
@@ -54944,8 +54970,8 @@ var genericFlow_component = normalizeComponent(
|
|
|
54944
54970
|
)
|
|
54945
54971
|
|
|
54946
54972
|
/* harmony default export */ var genericFlow = (genericFlow_component.exports);
|
|
54947
|
-
;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/modeler/Selection.vue?vue&type=template&id=
|
|
54948
|
-
var
|
|
54973
|
+
;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/modeler/Selection.vue?vue&type=template&id=7c27567b&scoped=true&
|
|
54974
|
+
var Selectionvue_type_template_id_7c27567b_scoped_true_render = function render() {
|
|
54949
54975
|
var _vm = this,
|
|
54950
54976
|
_c = _vm._self._c;
|
|
54951
54977
|
return _vm.showLasso && _vm.style ? _c('div', {
|
|
@@ -54975,7 +55001,7 @@ var Selectionvue_type_template_id_4045da65_scoped_true_render = function render(
|
|
|
54975
55001
|
}
|
|
54976
55002
|
}, _vm.$listeners))], 1) : _vm._e();
|
|
54977
55003
|
};
|
|
54978
|
-
var
|
|
55004
|
+
var Selectionvue_type_template_id_7c27567b_scoped_true_staticRenderFns = [];
|
|
54979
55005
|
|
|
54980
55006
|
;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/crown/crownMultiselect/crownMultiselect.vue?vue&type=template&id=bcd827ec&scoped=true&
|
|
54981
55007
|
|
|
@@ -55888,6 +55914,12 @@ var crownMultiselect_component = normalizeComponent(
|
|
|
55888
55914
|
|
|
55889
55915
|
|
|
55890
55916
|
|
|
55917
|
+
|
|
55918
|
+
|
|
55919
|
+
|
|
55920
|
+
|
|
55921
|
+
|
|
55922
|
+
|
|
55891
55923
|
|
|
55892
55924
|
|
|
55893
55925
|
|
|
@@ -56494,7 +56526,7 @@ var crownMultiselect_component = normalizeComponent(
|
|
|
56494
56526
|
getProperties: function getProperties(shapes) {
|
|
56495
56527
|
var _this6 = this;
|
|
56496
56528
|
var changed = [];
|
|
56497
|
-
var shapesToNotTranslate = ['PoolLane', 'standard.Link'
|
|
56529
|
+
var shapesToNotTranslate = ['PoolLane', 'standard.Link'];
|
|
56498
56530
|
shapes.filter(function (shape) {
|
|
56499
56531
|
return !shapesToNotTranslate.includes(shape.model.get('type'));
|
|
56500
56532
|
}).forEach(function (shape) {
|
|
@@ -56502,7 +56534,7 @@ var crownMultiselect_component = normalizeComponent(
|
|
|
56502
56534
|
var children = shape.model.component.getElementsUnderArea(shape.model, _this6.graph);
|
|
56503
56535
|
changed = [].concat(_toConsumableArray(changed), _toConsumableArray(_this6.getContainerProperties(children, changed)));
|
|
56504
56536
|
} else {
|
|
56505
|
-
var _node$pool;
|
|
56537
|
+
var _shape$model$componen, _shape$model$componen2, _node$pool;
|
|
56506
56538
|
var node = shape.model.component.node;
|
|
56507
56539
|
var defaultData = {
|
|
56508
56540
|
id: node.definition.id,
|
|
@@ -56511,6 +56543,7 @@ var crownMultiselect_component = normalizeComponent(
|
|
|
56511
56543
|
y: shape.model.get('position').y,
|
|
56512
56544
|
height: shape.model.get('size').height,
|
|
56513
56545
|
width: shape.model.get('size').width,
|
|
56546
|
+
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,
|
|
56514
56547
|
color: shape.model.get('color')
|
|
56515
56548
|
}
|
|
56516
56549
|
};
|
|
@@ -56519,9 +56552,38 @@ var crownMultiselect_component = normalizeComponent(
|
|
|
56519
56552
|
}
|
|
56520
56553
|
changed.push(defaultData);
|
|
56521
56554
|
}
|
|
56555
|
+
var boundariesChanges = _this6.getBoundariesChangesForShape(shape);
|
|
56556
|
+
changed = changed.concat(boundariesChanges);
|
|
56522
56557
|
});
|
|
56523
56558
|
return changed;
|
|
56524
56559
|
},
|
|
56560
|
+
/**
|
|
56561
|
+
* Get properties for each boundary inside a shape
|
|
56562
|
+
*/
|
|
56563
|
+
getBoundariesChangesForShape: function getBoundariesChangesForShape(shape) {
|
|
56564
|
+
var boundariesChanged = [];
|
|
56565
|
+
var boundaryEventTypes = [boundaryErrorEvent_id, boundaryConditionalEvent_id, boundaryEscalationEvent_id, boundaryMessageEvent_id, boundarySignalEvent_id, boundaryTimerEvent_id];
|
|
56566
|
+
var boundaryNodes = store.getters.nodes.filter(function (node) {
|
|
56567
|
+
return boundaryEventTypes.includes(node.type);
|
|
56568
|
+
});
|
|
56569
|
+
boundaryNodes.forEach(function (boundaryNode) {
|
|
56570
|
+
if (boundaryNode.definition.attachedToRef.id === shape.model.component.node.definition.id) {
|
|
56571
|
+
var _boundaryNode$definit, _boundaryNode$definit2, _boundaryNode$definit3;
|
|
56572
|
+
boundariesChanged.push({
|
|
56573
|
+
id: boundaryNode.definition.id,
|
|
56574
|
+
properties: {
|
|
56575
|
+
x: boundaryNode.diagram.bounds.x,
|
|
56576
|
+
y: boundaryNode.diagram.bounds.y,
|
|
56577
|
+
height: boundaryNode.diagram.bounds.height,
|
|
56578
|
+
width: boundaryNode.diagram.bounds.width,
|
|
56579
|
+
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,
|
|
56580
|
+
color: (_boundaryNode$definit3 = boundaryNode.definition.get('color')) !== null && _boundaryNode$definit3 !== void 0 ? _boundaryNode$definit3 : null
|
|
56581
|
+
}
|
|
56582
|
+
});
|
|
56583
|
+
}
|
|
56584
|
+
});
|
|
56585
|
+
return boundariesChanged;
|
|
56586
|
+
},
|
|
56525
56587
|
getContainerProperties: function getContainerProperties(children) {
|
|
56526
56588
|
var changed = [];
|
|
56527
56589
|
children.forEach(function (model) {
|
|
@@ -56921,9 +56983,9 @@ var crownMultiselect_component = normalizeComponent(
|
|
|
56921
56983
|
});
|
|
56922
56984
|
;// CONCATENATED MODULE: ./src/components/modeler/Selection.vue?vue&type=script&lang=js&
|
|
56923
56985
|
/* harmony default export */ var modeler_Selectionvue_type_script_lang_js_ = (Selectionvue_type_script_lang_js_);
|
|
56924
|
-
// EXTERNAL MODULE: ./node_modules/vue-style-loader/index.js??clonedRuleSet-12.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-12.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-12.use[2]!./node_modules/@vue/cli-service/node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-12.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=
|
|
56925
|
-
var
|
|
56926
|
-
;// CONCATENATED MODULE: ./src/components/modeler/Selection.vue?vue&type=style&index=0&id=
|
|
56986
|
+
// EXTERNAL MODULE: ./node_modules/vue-style-loader/index.js??clonedRuleSet-12.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-12.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-12.use[2]!./node_modules/@vue/cli-service/node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-12.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&
|
|
56987
|
+
var Selectionvue_type_style_index_0_id_7c27567b_prod_scoped_true_lang_css_ = __webpack_require__(34154);
|
|
56988
|
+
;// CONCATENATED MODULE: ./src/components/modeler/Selection.vue?vue&type=style&index=0&id=7c27567b&prod&scoped=true&lang=css&
|
|
56927
56989
|
|
|
56928
56990
|
;// CONCATENATED MODULE: ./src/components/modeler/Selection.vue
|
|
56929
56991
|
|
|
@@ -56936,11 +56998,11 @@ var Selectionvue_type_style_index_0_id_4045da65_prod_scoped_true_lang_css_ = __w
|
|
|
56936
56998
|
|
|
56937
56999
|
var Selection_component = normalizeComponent(
|
|
56938
57000
|
modeler_Selectionvue_type_script_lang_js_,
|
|
56939
|
-
|
|
56940
|
-
|
|
57001
|
+
Selectionvue_type_template_id_7c27567b_scoped_true_render,
|
|
57002
|
+
Selectionvue_type_template_id_7c27567b_scoped_true_staticRenderFns,
|
|
56941
57003
|
false,
|
|
56942
57004
|
null,
|
|
56943
|
-
"
|
|
57005
|
+
"7c27567b",
|
|
56944
57006
|
null
|
|
56945
57007
|
|
|
56946
57008
|
)
|
|
@@ -75581,6 +75643,30 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
75581
75643
|
_this.modeler.removePlayer(payload.clientId);
|
|
75582
75644
|
_this.modeler.enableMultiplayer(payload.isMultiplayer);
|
|
75583
75645
|
});
|
|
75646
|
+
this.clientIO.on('requestProcess', function (payload) {
|
|
75647
|
+
var firstClient = payload.firstClient,
|
|
75648
|
+
clientId = payload.clientId;
|
|
75649
|
+
|
|
75650
|
+
// Check if the current client is the first client
|
|
75651
|
+
if (firstClient.id === _this.clientIO.id) {
|
|
75652
|
+
// Get the process definition
|
|
75653
|
+
var nodes = _this.modeler.nodes.map(function (node) {
|
|
75654
|
+
return _this.modeler.multiplayerHook(node, false, true);
|
|
75655
|
+
});
|
|
75656
|
+
nodes.forEach(function (node) {
|
|
75657
|
+
var yMapNested = new YMap();
|
|
75658
|
+
_this.doTransact(yMapNested, node);
|
|
75659
|
+
_this.yArray.push([yMapNested]);
|
|
75660
|
+
// Encode the state as an update and send it to the server
|
|
75661
|
+
var stateUpdate = encodeStateAsUpdate(_this.yDoc);
|
|
75662
|
+
// Send the update to the web socket server
|
|
75663
|
+
_this.clientIO.emit('createElement', {
|
|
75664
|
+
updateDoc: stateUpdate,
|
|
75665
|
+
clientId: clientId
|
|
75666
|
+
});
|
|
75667
|
+
});
|
|
75668
|
+
}
|
|
75669
|
+
});
|
|
75584
75670
|
|
|
75585
75671
|
// Listen for updates when a new element is added
|
|
75586
75672
|
this.clientIO.on('createElement', /*#__PURE__*/function () {
|
|
@@ -75604,6 +75690,32 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
75604
75690
|
};
|
|
75605
75691
|
}());
|
|
75606
75692
|
|
|
75693
|
+
// Listen for updates when a new element is requested
|
|
75694
|
+
this.clientIO.on('createRequestedElement', /*#__PURE__*/function () {
|
|
75695
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(payload) {
|
|
75696
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
75697
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
75698
|
+
case 0:
|
|
75699
|
+
if (!(payload.clientId === _this.clientIO.id)) {
|
|
75700
|
+
_context2.next = 4;
|
|
75701
|
+
break;
|
|
75702
|
+
}
|
|
75703
|
+
_context2.next = 3;
|
|
75704
|
+
return _this.createRemoteShape(payload.changes);
|
|
75705
|
+
case 3:
|
|
75706
|
+
// Add the new element to the shared array
|
|
75707
|
+
applyUpdate(_this.yDoc, new Uint8Array(payload.updateDoc));
|
|
75708
|
+
case 4:
|
|
75709
|
+
case "end":
|
|
75710
|
+
return _context2.stop();
|
|
75711
|
+
}
|
|
75712
|
+
}, _callee2);
|
|
75713
|
+
}));
|
|
75714
|
+
return function (_x2) {
|
|
75715
|
+
return _ref2.apply(this, arguments);
|
|
75716
|
+
};
|
|
75717
|
+
}());
|
|
75718
|
+
|
|
75607
75719
|
// Listen for updates when an element is removed
|
|
75608
75720
|
this.clientIO.on('removeElement', function (payload) {
|
|
75609
75721
|
payload.deletedNodes.forEach(function (nodeId) {
|
|
@@ -75643,13 +75755,16 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
75643
75755
|
window.ProcessMaker.EventBus.$on('multiplayer-updateNodes', function (data) {
|
|
75644
75756
|
_this.updateNodes(data);
|
|
75645
75757
|
});
|
|
75646
|
-
window.ProcessMaker.EventBus.$on('multiplayer-replaceNode', function (
|
|
75647
|
-
var nodeData =
|
|
75648
|
-
newControl =
|
|
75758
|
+
window.ProcessMaker.EventBus.$on('multiplayer-replaceNode', function (_ref3) {
|
|
75759
|
+
var nodeData = _ref3.nodeData,
|
|
75760
|
+
newControl = _ref3.newControl;
|
|
75649
75761
|
_this.replaceNode(nodeData, newControl);
|
|
75650
75762
|
});
|
|
75651
75763
|
window.ProcessMaker.EventBus.$on('multiplayer-addFlow', function (data) {
|
|
75652
|
-
_this.
|
|
75764
|
+
_this.addCommonElement(data);
|
|
75765
|
+
});
|
|
75766
|
+
window.ProcessMaker.EventBus.$on('multiplayer-addBoundaryEvent', function (data) {
|
|
75767
|
+
_this.addCommonElement(data);
|
|
75653
75768
|
});
|
|
75654
75769
|
window.ProcessMaker.EventBus.$on('multiplayer-addLanes', function (lanes) {
|
|
75655
75770
|
_this.addLaneNodes(lanes);
|
|
@@ -75665,7 +75780,9 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
75665
75780
|
// Encode the state as an update and send it to the server
|
|
75666
75781
|
var stateUpdate = encodeStateAsUpdate(this.yDoc);
|
|
75667
75782
|
// Send the update to the web socket server
|
|
75668
|
-
this.clientIO.emit('createElement',
|
|
75783
|
+
this.clientIO.emit('createElement', {
|
|
75784
|
+
updateDoc: stateUpdate
|
|
75785
|
+
});
|
|
75669
75786
|
}
|
|
75670
75787
|
}, {
|
|
75671
75788
|
key: "createShape",
|
|
@@ -75828,17 +75945,17 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
75828
75945
|
}, {
|
|
75829
75946
|
key: "updateShapes",
|
|
75830
75947
|
value: function () {
|
|
75831
|
-
var _updateShapes = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
75948
|
+
var _updateShapes = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(data) {
|
|
75832
75949
|
var _this4 = this;
|
|
75833
75950
|
var paper, element, newPool, sourceElem, targetElem, waypoint, startWaypoint, endWaypoint, newWaypoint, node;
|
|
75834
|
-
return _regeneratorRuntime().wrap(function
|
|
75835
|
-
while (1) switch (
|
|
75951
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
75952
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
75836
75953
|
case 0:
|
|
75837
75954
|
paper = this.modeler.paper;
|
|
75838
75955
|
element = this.modeler.getElementByNodeId(data.id);
|
|
75839
75956
|
newPool = this.modeler.getElementByNodeId(data.poolId);
|
|
75840
75957
|
if (!this.modeler.flowTypes.includes(data.type)) {
|
|
75841
|
-
|
|
75958
|
+
_context3.next = 15;
|
|
75842
75959
|
break;
|
|
75843
75960
|
}
|
|
75844
75961
|
// Update the element's waypoints
|
|
@@ -75872,7 +75989,7 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
75872
75989
|
name: 'boundary'
|
|
75873
75990
|
}
|
|
75874
75991
|
});
|
|
75875
|
-
|
|
75992
|
+
_context3.next = 27;
|
|
75876
75993
|
break;
|
|
75877
75994
|
case 15:
|
|
75878
75995
|
// Update the element's position attribute
|
|
@@ -75889,40 +76006,66 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
75889
76006
|
value: data.color
|
|
75890
76007
|
});
|
|
75891
76008
|
|
|
76009
|
+
// boundary type
|
|
76010
|
+
if (element.component.node.definition.$type === 'bpmn:BoundaryEvent') {
|
|
76011
|
+
this.attachBoundaryEventToNode(element, data);
|
|
76012
|
+
}
|
|
76013
|
+
|
|
75892
76014
|
// Trigger a rendering of the element on the paper
|
|
75893
|
-
|
|
76015
|
+
_context3.next = 22;
|
|
75894
76016
|
return paper.findViewByModel(element).update();
|
|
75895
|
-
case
|
|
75896
|
-
|
|
76017
|
+
case 22:
|
|
76018
|
+
_context3.next = 24;
|
|
75897
76019
|
return element.component.$nextTick();
|
|
75898
|
-
case
|
|
75899
|
-
|
|
76020
|
+
case 24:
|
|
76021
|
+
_context3.next = 26;
|
|
75900
76022
|
return this.modeler.paperManager.awaitScheduledUpdates();
|
|
75901
|
-
case
|
|
76023
|
+
case 26:
|
|
75902
76024
|
if (newPool && element.component.node.pool && element.component.node.pool.component.id !== data.poolId) {
|
|
75903
76025
|
element.component.node.pool.component.moveElementRemote(element, newPool);
|
|
75904
76026
|
}
|
|
75905
|
-
case
|
|
76027
|
+
case 27:
|
|
75906
76028
|
case "end":
|
|
75907
|
-
return
|
|
76029
|
+
return _context3.stop();
|
|
75908
76030
|
}
|
|
75909
|
-
},
|
|
76031
|
+
}, _callee3, this);
|
|
75910
76032
|
}));
|
|
75911
|
-
function updateShapes(
|
|
76033
|
+
function updateShapes(_x3) {
|
|
75912
76034
|
return _updateShapes.apply(this, arguments);
|
|
75913
76035
|
}
|
|
75914
76036
|
return updateShapes;
|
|
75915
76037
|
}()
|
|
75916
76038
|
}, {
|
|
75917
|
-
key: "
|
|
75918
|
-
value: function
|
|
76039
|
+
key: "attachBoundaryEventToNode",
|
|
76040
|
+
value: function attachBoundaryEventToNode(element, data) {
|
|
76041
|
+
var node = this.getNodeById(data.attachedToRefId);
|
|
76042
|
+
|
|
76043
|
+
// Find previous attached task
|
|
76044
|
+
var previousAttachedTask = element.getParentCell();
|
|
76045
|
+
|
|
76046
|
+
// Find new attached task
|
|
76047
|
+
var newAttachedTask = this.modeler.getElementByNodeId(data.attachedToRefId);
|
|
76048
|
+
if (previousAttachedTask) {
|
|
76049
|
+
previousAttachedTask.unembed(element);
|
|
76050
|
+
}
|
|
76051
|
+
if (newAttachedTask) {
|
|
76052
|
+
newAttachedTask.embed(element);
|
|
76053
|
+
}
|
|
76054
|
+
element.component.node.definition.set('attachedToRef', node.definition);
|
|
76055
|
+
}
|
|
76056
|
+
}, {
|
|
76057
|
+
key: "addCommonElement",
|
|
76058
|
+
value: function addCommonElement(data) {
|
|
76059
|
+
// Add a new flow / boundary event to the shared array
|
|
75919
76060
|
var yMapNested = new YMap();
|
|
75920
76061
|
this.doTransact(yMapNested, data);
|
|
75921
76062
|
this.yArray.push([yMapNested]);
|
|
75922
76063
|
// Encode the state as an update and send it to the server
|
|
75923
76064
|
var stateUpdate = encodeStateAsUpdate(this.yDoc);
|
|
75924
76065
|
// Send the update to the web socket server
|
|
75925
|
-
this.clientIO.emit('createElement',
|
|
76066
|
+
this.clientIO.emit('createElement', {
|
|
76067
|
+
updateDoc: stateUpdate
|
|
76068
|
+
});
|
|
75926
76069
|
_classPrivateFieldGet(this, _nodeIdGenerator).updateCounters();
|
|
75927
76070
|
}
|
|
75928
76071
|
}, {
|
|
@@ -75947,7 +76090,9 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
75947
76090
|
_this5.doTransact(yMapNested, data);
|
|
75948
76091
|
_this5.yArray.push([yMapNested]);
|
|
75949
76092
|
var stateUpdate = encodeStateAsUpdate(_this5.yDoc);
|
|
75950
|
-
_this5.clientIO.emit('createElement',
|
|
76093
|
+
_this5.clientIO.emit('createElement', {
|
|
76094
|
+
updateDoc: stateUpdate
|
|
76095
|
+
});
|
|
75951
76096
|
});
|
|
75952
76097
|
});
|
|
75953
76098
|
}
|
|
@@ -76968,7 +77113,11 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
76968
77113
|
while (1) switch (_context8.prev = _context8.next) {
|
|
76969
77114
|
case 0:
|
|
76970
77115
|
node = _this21.createNode(type, definition, diagram);
|
|
76971
|
-
|
|
77116
|
+
if (!_this21.isMultiplayer) {
|
|
77117
|
+
store.commit('addNode', node);
|
|
77118
|
+
} else {
|
|
77119
|
+
_this21.loadNodeForMultiplayer(node);
|
|
77120
|
+
}
|
|
76972
77121
|
case 2:
|
|
76973
77122
|
case "end":
|
|
76974
77123
|
return _context8.stop();
|
|
@@ -76976,6 +77125,39 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
76976
77125
|
}, _callee8);
|
|
76977
77126
|
}))();
|
|
76978
77127
|
},
|
|
77128
|
+
loadNodeForMultiplayer: function loadNodeForMultiplayer(node) {
|
|
77129
|
+
var _this22 = this;
|
|
77130
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9() {
|
|
77131
|
+
return _regeneratorRuntime().wrap(function _callee9$(_context9) {
|
|
77132
|
+
while (1) switch (_context9.prev = _context9.next) {
|
|
77133
|
+
case 0:
|
|
77134
|
+
if (!(node.type === 'processmaker-modeler-lane')) {
|
|
77135
|
+
_context9.next = 10;
|
|
77136
|
+
break;
|
|
77137
|
+
}
|
|
77138
|
+
_context9.next = 3;
|
|
77139
|
+
return _this22.addNode(node, node.definition.id, true);
|
|
77140
|
+
case 3:
|
|
77141
|
+
_this22.nodeIdGenerator.updateCounters();
|
|
77142
|
+
_context9.next = 6;
|
|
77143
|
+
return _this22.$nextTick();
|
|
77144
|
+
case 6:
|
|
77145
|
+
_context9.next = 8;
|
|
77146
|
+
return _this22.paperManager.awaitScheduledUpdates();
|
|
77147
|
+
case 8:
|
|
77148
|
+
window.ProcessMaker.EventBus.$emit('multiplayer-addLanes', [node]);
|
|
77149
|
+
return _context9.abrupt("return");
|
|
77150
|
+
case 10:
|
|
77151
|
+
_this22.multiplayerHook(node, false);
|
|
77152
|
+
store.commit('addNode', node);
|
|
77153
|
+
_this22.poolTarget = null;
|
|
77154
|
+
case 13:
|
|
77155
|
+
case "end":
|
|
77156
|
+
return _context9.stop();
|
|
77157
|
+
}
|
|
77158
|
+
}, _callee9);
|
|
77159
|
+
}))();
|
|
77160
|
+
},
|
|
76979
77161
|
createNode: function createNode(type, definition, diagram) {
|
|
76980
77162
|
if (Node.isTimerType(type)) {
|
|
76981
77163
|
return new TimerEventNode(type, definition, diagram);
|
|
@@ -76994,95 +77176,95 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
76994
77176
|
return hasSource && hasTarget;
|
|
76995
77177
|
},
|
|
76996
77178
|
waitForCursorToChange: function waitForCursorToChange() {
|
|
76997
|
-
var
|
|
76998
|
-
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
77179
|
+
var _this23 = this;
|
|
77180
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10() {
|
|
76999
77181
|
var cursorWaitTime;
|
|
77000
|
-
return _regeneratorRuntime().wrap(function
|
|
77001
|
-
while (1) switch (
|
|
77182
|
+
return _regeneratorRuntime().wrap(function _callee10$(_context10) {
|
|
77183
|
+
while (1) switch (_context10.prev = _context10.next) {
|
|
77002
77184
|
case 0:
|
|
77003
77185
|
cursorWaitTime = 300;
|
|
77004
|
-
|
|
77005
|
-
return
|
|
77186
|
+
_context10.next = 3;
|
|
77187
|
+
return _this23.$nextTick();
|
|
77006
77188
|
case 3:
|
|
77007
|
-
return
|
|
77189
|
+
return _context10.abrupt("return", new Promise(function (resolve) {
|
|
77008
77190
|
return setTimeout(resolve, cursorWaitTime);
|
|
77009
77191
|
}));
|
|
77010
77192
|
case 4:
|
|
77011
77193
|
case "end":
|
|
77012
|
-
return
|
|
77194
|
+
return _context10.stop();
|
|
77013
77195
|
}
|
|
77014
|
-
},
|
|
77196
|
+
}, _callee10);
|
|
77015
77197
|
}))();
|
|
77016
77198
|
},
|
|
77017
77199
|
renderPaper: function renderPaper() {
|
|
77018
|
-
var
|
|
77019
|
-
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
77020
|
-
return _regeneratorRuntime().wrap(function
|
|
77021
|
-
while (1) switch (
|
|
77200
|
+
var _this24 = this;
|
|
77201
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12() {
|
|
77202
|
+
return _regeneratorRuntime().wrap(function _callee12$(_context12) {
|
|
77203
|
+
while (1) switch (_context12.prev = _context12.next) {
|
|
77022
77204
|
case 0:
|
|
77023
|
-
|
|
77024
|
-
|
|
77025
|
-
return
|
|
77026
|
-
return _regeneratorRuntime().wrap(function
|
|
77027
|
-
while (1) switch (
|
|
77205
|
+
_this24.isRendering = true;
|
|
77206
|
+
_context12.next = 3;
|
|
77207
|
+
return _this24.paperManager.performAtomicAction( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11() {
|
|
77208
|
+
return _regeneratorRuntime().wrap(function _callee11$(_context11) {
|
|
77209
|
+
while (1) switch (_context11.prev = _context11.next) {
|
|
77028
77210
|
case 0:
|
|
77029
|
-
|
|
77030
|
-
return
|
|
77211
|
+
_context11.next = 2;
|
|
77212
|
+
return _this24.waitForCursorToChange();
|
|
77031
77213
|
case 2:
|
|
77032
|
-
|
|
77033
|
-
|
|
77034
|
-
|
|
77214
|
+
_this24.parse();
|
|
77215
|
+
_this24.addPools();
|
|
77216
|
+
_this24.setUpDiagram();
|
|
77035
77217
|
case 5:
|
|
77036
77218
|
case "end":
|
|
77037
|
-
return
|
|
77219
|
+
return _context11.stop();
|
|
77038
77220
|
}
|
|
77039
|
-
},
|
|
77221
|
+
}, _callee11);
|
|
77040
77222
|
})));
|
|
77041
77223
|
case 3:
|
|
77042
|
-
|
|
77043
|
-
return
|
|
77224
|
+
_context12.next = 5;
|
|
77225
|
+
return _this24.paperManager.awaitScheduledUpdates();
|
|
77044
77226
|
case 5:
|
|
77045
|
-
|
|
77046
|
-
|
|
77227
|
+
_this24.isRendering = false;
|
|
77228
|
+
_this24.$emit('parsed');
|
|
77047
77229
|
case 7:
|
|
77048
77230
|
case "end":
|
|
77049
|
-
return
|
|
77231
|
+
return _context12.stop();
|
|
77050
77232
|
}
|
|
77051
|
-
},
|
|
77233
|
+
}, _callee12);
|
|
77052
77234
|
}))();
|
|
77053
77235
|
},
|
|
77054
77236
|
loadXML: function loadXML() {
|
|
77055
77237
|
var _arguments3 = arguments,
|
|
77056
|
-
|
|
77057
|
-
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
77238
|
+
_this25 = this;
|
|
77239
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee13() {
|
|
77058
77240
|
var xml, emitChangeEvent;
|
|
77059
|
-
return _regeneratorRuntime().wrap(function
|
|
77060
|
-
while (1) switch (
|
|
77241
|
+
return _regeneratorRuntime().wrap(function _callee13$(_context13) {
|
|
77242
|
+
while (1) switch (_context13.prev = _context13.next) {
|
|
77061
77243
|
case 0:
|
|
77062
77244
|
xml = _arguments3.length > 0 && _arguments3[0] !== undefined ? _arguments3[0] : null;
|
|
77063
77245
|
emitChangeEvent = false;
|
|
77064
77246
|
if (xml === null) {
|
|
77065
|
-
xml =
|
|
77247
|
+
xml = _this25.currentXML;
|
|
77066
77248
|
emitChangeEvent = true;
|
|
77067
77249
|
}
|
|
77068
|
-
|
|
77069
|
-
return
|
|
77250
|
+
_context13.next = 5;
|
|
77251
|
+
return _this25.xmlManager.getDefinitionsFromXml(xml);
|
|
77070
77252
|
case 5:
|
|
77071
|
-
|
|
77072
|
-
|
|
77073
|
-
|
|
77253
|
+
_this25.definitions = _context13.sent;
|
|
77254
|
+
_this25.xmlManager.definitions = _this25.definitions;
|
|
77255
|
+
_this25.nodeIdGenerator = getNodeIdGenerator(_this25.definitions);
|
|
77074
77256
|
store.commit('clearNodes');
|
|
77075
|
-
|
|
77076
|
-
return
|
|
77257
|
+
_context13.next = 11;
|
|
77258
|
+
return _this25.renderPaper();
|
|
77077
77259
|
case 11:
|
|
77078
77260
|
if (emitChangeEvent) {
|
|
77079
77261
|
window.ProcessMaker.EventBus.$emit('modeler-change');
|
|
77080
77262
|
}
|
|
77081
77263
|
case 12:
|
|
77082
77264
|
case "end":
|
|
77083
|
-
return
|
|
77265
|
+
return _context13.stop();
|
|
77084
77266
|
}
|
|
77085
|
-
},
|
|
77267
|
+
}, _callee13);
|
|
77086
77268
|
}))();
|
|
77087
77269
|
},
|
|
77088
77270
|
getBoundaryEvents: function getBoundaryEvents(process) {
|
|
@@ -77106,13 +77288,13 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
77106
77288
|
return boundaryEvent;
|
|
77107
77289
|
},
|
|
77108
77290
|
ensureCancelActivityIsAddedToBoundaryEvents: function ensureCancelActivityIsAddedToBoundaryEvents(process) {
|
|
77109
|
-
var
|
|
77291
|
+
var _this26 = this;
|
|
77110
77292
|
this.getBoundaryEvents(process).forEach(function (definition) {
|
|
77111
|
-
var boundaryEvent =
|
|
77293
|
+
var boundaryEvent = _this26.createBoundaryEvent(definition);
|
|
77112
77294
|
definition.get('outgoing').forEach(function (outgoing) {
|
|
77113
77295
|
return outgoing.set('sourceRef', boundaryEvent);
|
|
77114
77296
|
});
|
|
77115
|
-
|
|
77297
|
+
_this26.replaceDefinition(definition, boundaryEvent, process);
|
|
77116
77298
|
});
|
|
77117
77299
|
},
|
|
77118
77300
|
replaceDefinition: function replaceDefinition(definition, boundaryEvent, process) {
|
|
@@ -77138,82 +77320,82 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
77138
77320
|
});
|
|
77139
77321
|
},
|
|
77140
77322
|
addRemoteNode: function addRemoteNode(data) {
|
|
77141
|
-
var
|
|
77142
|
-
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
77323
|
+
var _this27 = this;
|
|
77324
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee14() {
|
|
77143
77325
|
var definition, diagram, newNode;
|
|
77144
|
-
return _regeneratorRuntime().wrap(function
|
|
77145
|
-
while (1) switch (
|
|
77326
|
+
return _regeneratorRuntime().wrap(function _callee14$(_context14) {
|
|
77327
|
+
while (1) switch (_context14.prev = _context14.next) {
|
|
77146
77328
|
case 0:
|
|
77147
|
-
definition =
|
|
77148
|
-
diagram =
|
|
77329
|
+
definition = _this27.nodeRegistry[data.type].definition(_this27.moddle, _this27.$t);
|
|
77330
|
+
diagram = _this27.nodeRegistry[data.type].diagram(_this27.moddle);
|
|
77149
77331
|
diagram.bounds.x = data.x;
|
|
77150
77332
|
diagram.bounds.y = data.y;
|
|
77151
|
-
newNode =
|
|
77152
|
-
|
|
77153
|
-
return
|
|
77333
|
+
newNode = _this27.createNode(data.type, definition, diagram);
|
|
77334
|
+
_context14.next = 7;
|
|
77335
|
+
return _this27.addNode(newNode, data.id, true);
|
|
77154
77336
|
case 7:
|
|
77155
|
-
|
|
77156
|
-
return
|
|
77337
|
+
_context14.next = 9;
|
|
77338
|
+
return _this27.$nextTick();
|
|
77157
77339
|
case 9:
|
|
77158
|
-
|
|
77159
|
-
return
|
|
77340
|
+
_context14.next = 11;
|
|
77341
|
+
return _this27.paperManager.awaitScheduledUpdates();
|
|
77160
77342
|
case 11:
|
|
77161
|
-
if (
|
|
77162
|
-
|
|
77343
|
+
if (_this27.autoValidate) {
|
|
77344
|
+
_this27.validateBpmnDiagram();
|
|
77163
77345
|
}
|
|
77164
77346
|
case 12:
|
|
77165
77347
|
case "end":
|
|
77166
|
-
return
|
|
77348
|
+
return _context14.stop();
|
|
77167
77349
|
}
|
|
77168
|
-
},
|
|
77350
|
+
}, _callee14);
|
|
77169
77351
|
}))();
|
|
77170
77352
|
},
|
|
77171
77353
|
handleDrop: function handleDrop(data) {
|
|
77172
|
-
var
|
|
77173
|
-
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
77174
|
-
var clientX, clientY, control, nodeThatWillBeReplaced, definition, diagram,
|
|
77175
|
-
return _regeneratorRuntime().wrap(function
|
|
77176
|
-
while (1) switch (
|
|
77354
|
+
var _this28 = this;
|
|
77355
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee15() {
|
|
77356
|
+
var clientX, clientY, control, nodeThatWillBeReplaced, definition, diagram, _this28$paperManager$, x, y, newNode, nodeMigrator;
|
|
77357
|
+
return _regeneratorRuntime().wrap(function _callee15$(_context15) {
|
|
77358
|
+
while (1) switch (_context15.prev = _context15.next) {
|
|
77177
77359
|
case 0:
|
|
77178
77360
|
clientX = data.clientX, clientY = data.clientY, control = data.control, nodeThatWillBeReplaced = data.nodeThatWillBeReplaced;
|
|
77179
|
-
|
|
77361
|
+
_this28.validateDropTarget({
|
|
77180
77362
|
clientX: clientX,
|
|
77181
77363
|
clientY: clientY,
|
|
77182
77364
|
control: control
|
|
77183
77365
|
});
|
|
77184
|
-
if (
|
|
77185
|
-
|
|
77366
|
+
if (_this28.allowDrop) {
|
|
77367
|
+
_context15.next = 4;
|
|
77186
77368
|
break;
|
|
77187
77369
|
}
|
|
77188
|
-
return
|
|
77370
|
+
return _context15.abrupt("return");
|
|
77189
77371
|
case 4:
|
|
77190
|
-
definition =
|
|
77191
|
-
diagram =
|
|
77192
|
-
|
|
77372
|
+
definition = _this28.nodeRegistry[control.type].definition(_this28.moddle, _this28.$t);
|
|
77373
|
+
diagram = _this28.nodeRegistry[control.type].diagram(_this28.moddle);
|
|
77374
|
+
_this28$paperManager$ = _this28.paperManager.clientToGridPoint(clientX, clientY), x = _this28$paperManager$.x, y = _this28$paperManager$.y;
|
|
77193
77375
|
diagram.bounds.x = x;
|
|
77194
77376
|
diagram.bounds.y = y;
|
|
77195
|
-
newNode =
|
|
77377
|
+
newNode = _this28.createNode(control.type, definition, diagram);
|
|
77196
77378
|
if (newNode.isBpmnType('bpmn:BoundaryEvent')) {
|
|
77197
|
-
|
|
77379
|
+
_this28.setShapeCenterUnderCursor(diagram);
|
|
77198
77380
|
}
|
|
77199
|
-
|
|
77200
|
-
|
|
77201
|
-
return
|
|
77381
|
+
_this28.highlightNode(newNode);
|
|
77382
|
+
_context15.next = 14;
|
|
77383
|
+
return _this28.addNode(newNode);
|
|
77202
77384
|
case 14:
|
|
77203
77385
|
if (nodeThatWillBeReplaced) {
|
|
77204
|
-
|
|
77386
|
+
_context15.next = 16;
|
|
77205
77387
|
break;
|
|
77206
77388
|
}
|
|
77207
|
-
return
|
|
77389
|
+
return _context15.abrupt("return");
|
|
77208
77390
|
case 16:
|
|
77209
|
-
nodeMigrator = new NodeMigrator(nodeThatWillBeReplaced, definition,
|
|
77391
|
+
nodeMigrator = new NodeMigrator(nodeThatWillBeReplaced, definition, _this28.graph, newNode, _this28.processes, _this28.collaboration);
|
|
77210
77392
|
nodeMigrator.migrate();
|
|
77211
|
-
return
|
|
77393
|
+
return _context15.abrupt("return", newNode);
|
|
77212
77394
|
case 19:
|
|
77213
77395
|
case "end":
|
|
77214
|
-
return
|
|
77396
|
+
return _context15.stop();
|
|
77215
77397
|
}
|
|
77216
|
-
},
|
|
77398
|
+
}, _callee15);
|
|
77217
77399
|
}))();
|
|
77218
77400
|
},
|
|
77219
77401
|
setShapeCenterUnderCursor: function setShapeCenterUnderCursor(diagram) {
|
|
@@ -77221,33 +77403,34 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
77221
77403
|
diagram.bounds.y -= diagram.bounds.height / 2;
|
|
77222
77404
|
},
|
|
77223
77405
|
selectNewNode: function selectNewNode(node) {
|
|
77224
|
-
var
|
|
77225
|
-
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
77406
|
+
var _this29 = this;
|
|
77407
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee16() {
|
|
77226
77408
|
var newNodeComponent, view;
|
|
77227
|
-
return _regeneratorRuntime().wrap(function
|
|
77228
|
-
while (1) switch (
|
|
77409
|
+
return _regeneratorRuntime().wrap(function _callee16$(_context16) {
|
|
77410
|
+
while (1) switch (_context16.prev = _context16.next) {
|
|
77229
77411
|
case 0:
|
|
77230
|
-
|
|
77231
|
-
return
|
|
77412
|
+
_context16.next = 2;
|
|
77413
|
+
return _this29.$nextTick();
|
|
77232
77414
|
case 2:
|
|
77233
|
-
|
|
77234
|
-
return
|
|
77415
|
+
_context16.next = 4;
|
|
77416
|
+
return _this29.paperManager.awaitScheduledUpdates();
|
|
77235
77417
|
case 4:
|
|
77236
|
-
newNodeComponent =
|
|
77418
|
+
newNodeComponent = _this29.$refs.nodeComponent.find(function (component) {
|
|
77237
77419
|
return component.node === node;
|
|
77238
77420
|
});
|
|
77239
77421
|
view = newNodeComponent.shapeView;
|
|
77240
|
-
|
|
77241
|
-
return
|
|
77422
|
+
_context16.next = 8;
|
|
77423
|
+
return _this29.$refs.selector.selectElement(view);
|
|
77242
77424
|
case 8:
|
|
77243
77425
|
case "end":
|
|
77244
|
-
return
|
|
77426
|
+
return _context16.stop();
|
|
77245
77427
|
}
|
|
77246
|
-
},
|
|
77428
|
+
}, _callee16);
|
|
77247
77429
|
}))();
|
|
77248
77430
|
},
|
|
77249
77431
|
multiplayerHook: function multiplayerHook(node, fromClient) {
|
|
77250
|
-
var
|
|
77432
|
+
var isProcessRequested = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
77433
|
+
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'];
|
|
77251
77434
|
if (!this.isMultiplayer) {
|
|
77252
77435
|
return;
|
|
77253
77436
|
}
|
|
@@ -77267,6 +77450,9 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
77267
77450
|
if (node !== null && node !== void 0 && (_node$pool = node.pool) !== null && _node$pool !== void 0 && _node$pool.component) {
|
|
77268
77451
|
defaultData['poolId'] = node.pool.component.id;
|
|
77269
77452
|
}
|
|
77453
|
+
if (isProcessRequested) {
|
|
77454
|
+
return defaultData;
|
|
77455
|
+
}
|
|
77270
77456
|
window.ProcessMaker.EventBus.$emit('multiplayer-addNode', defaultData);
|
|
77271
77457
|
}
|
|
77272
77458
|
if (this.flowTypes.includes(node.type)) {
|
|
@@ -77274,218 +77460,222 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
77274
77460
|
var sourceRefId = (_node$definition$sour = node.definition.sourceRef) === null || _node$definition$sour === void 0 ? void 0 : _node$definition$sour.id;
|
|
77275
77461
|
var targetRefId = (_node$definition$targ = node.definition.targetRef) === null || _node$definition$targ === void 0 ? void 0 : _node$definition$targ.id;
|
|
77276
77462
|
if (node.type === 'processmaker-modeler-data-input-association') {
|
|
77277
|
-
var _node$definition$sour2, _node$definition$targ2, _node$definition$targ3;
|
|
77463
|
+
var _node$definition$sour2, _node$definition$targ2, _node$definition$targ3, _node$definition$targ4;
|
|
77278
77464
|
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);
|
|
77279
|
-
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');
|
|
77465
|
+
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');
|
|
77280
77466
|
}
|
|
77281
77467
|
if (sourceRefId && targetRefId) {
|
|
77282
|
-
|
|
77468
|
+
var flowData = {
|
|
77283
77469
|
id: node.definition.id,
|
|
77284
77470
|
type: node.type,
|
|
77285
77471
|
sourceRefId: sourceRefId,
|
|
77286
77472
|
targetRefId: targetRefId,
|
|
77287
77473
|
waypoint: node.diagram.waypoint
|
|
77288
|
-
}
|
|
77474
|
+
};
|
|
77475
|
+
if (isProcessRequested) {
|
|
77476
|
+
return flowData;
|
|
77477
|
+
}
|
|
77478
|
+
window.ProcessMaker.EventBus.$emit('multiplayer-addFlow', flowData);
|
|
77289
77479
|
}
|
|
77290
77480
|
}
|
|
77291
77481
|
}
|
|
77292
77482
|
},
|
|
77293
77483
|
addNode: function addNode(node) {
|
|
77294
77484
|
var _arguments4 = arguments,
|
|
77295
|
-
|
|
77296
|
-
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
77485
|
+
_this30 = this;
|
|
77486
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee17() {
|
|
77297
77487
|
var id, fromClient, targetProcess;
|
|
77298
|
-
return _regeneratorRuntime().wrap(function
|
|
77299
|
-
while (1) switch (
|
|
77488
|
+
return _regeneratorRuntime().wrap(function _callee17$(_context17) {
|
|
77489
|
+
while (1) switch (_context17.prev = _context17.next) {
|
|
77300
77490
|
case 0:
|
|
77301
77491
|
id = _arguments4.length > 1 && _arguments4[1] !== undefined ? _arguments4[1] : null;
|
|
77302
77492
|
fromClient = _arguments4.length > 2 && _arguments4[2] !== undefined ? _arguments4[2] : false;
|
|
77303
77493
|
if (!node.pool) {
|
|
77304
|
-
node.pool =
|
|
77494
|
+
node.pool = _this30.poolTarget;
|
|
77305
77495
|
}
|
|
77306
|
-
targetProcess = node.getTargetProcess(
|
|
77496
|
+
targetProcess = node.getTargetProcess(_this30.processes, _this30.processNode);
|
|
77307
77497
|
addNodeToProcess(node, targetProcess);
|
|
77308
|
-
node.setIds(
|
|
77309
|
-
|
|
77498
|
+
node.setIds(_this30.nodeIdGenerator, id);
|
|
77499
|
+
_this30.planeElements.push(node.diagram);
|
|
77310
77500
|
// add multiplayer logic as a hook
|
|
77311
|
-
|
|
77501
|
+
_this30.multiplayerHook(node, fromClient);
|
|
77312
77502
|
store.commit('addNode', node);
|
|
77313
|
-
|
|
77503
|
+
_this30.poolTarget = null;
|
|
77314
77504
|
|
|
77315
77505
|
// add processmaker-modeler-generic-flow
|
|
77316
77506
|
if (![sequenceFlow_id, poolLane_config_id, associationConfig_id, messageFlow_config_id, config_id, dataInputAssociation_config_id, genericFlow_config_id].includes(node.type)) {
|
|
77317
|
-
|
|
77507
|
+
_context17.next = 12;
|
|
77318
77508
|
break;
|
|
77319
77509
|
}
|
|
77320
|
-
return
|
|
77510
|
+
return _context17.abrupt("return");
|
|
77321
77511
|
case 12:
|
|
77322
77512
|
if (!fromClient) {
|
|
77323
77513
|
// Select the node after it has been added to the store (does not apply to flows)
|
|
77324
|
-
|
|
77514
|
+
_this30.selectNewNode(node);
|
|
77325
77515
|
}
|
|
77326
|
-
return
|
|
77516
|
+
return _context17.abrupt("return", new Promise(function (resolve) {
|
|
77327
77517
|
setTimeout(function () {
|
|
77328
|
-
|
|
77518
|
+
_this30.pushToUndoStack();
|
|
77329
77519
|
resolve();
|
|
77330
77520
|
});
|
|
77331
77521
|
}));
|
|
77332
77522
|
case 14:
|
|
77333
77523
|
case "end":
|
|
77334
|
-
return
|
|
77524
|
+
return _context17.stop();
|
|
77335
77525
|
}
|
|
77336
|
-
},
|
|
77526
|
+
}, _callee17);
|
|
77337
77527
|
}))();
|
|
77338
77528
|
},
|
|
77339
77529
|
addClonedNodes: function addClonedNodes(nodes) {
|
|
77340
|
-
var
|
|
77341
|
-
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
77342
|
-
return _regeneratorRuntime().wrap(function
|
|
77343
|
-
while (1) switch (
|
|
77530
|
+
var _this31 = this;
|
|
77531
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee18() {
|
|
77532
|
+
return _regeneratorRuntime().wrap(function _callee18$(_context18) {
|
|
77533
|
+
while (1) switch (_context18.prev = _context18.next) {
|
|
77344
77534
|
case 0:
|
|
77345
77535
|
nodes.forEach(function (node) {
|
|
77346
77536
|
if (!node.pool) {
|
|
77347
|
-
node.pool =
|
|
77537
|
+
node.pool = _this31.poolTarget;
|
|
77348
77538
|
}
|
|
77349
|
-
var targetProcess = node.getTargetProcess(
|
|
77539
|
+
var targetProcess = node.getTargetProcess(_this31.processes, _this31.processNode);
|
|
77350
77540
|
addNodeToProcess(node, targetProcess);
|
|
77351
|
-
|
|
77352
|
-
|
|
77541
|
+
_this31.planeElements.push(node.diagram);
|
|
77542
|
+
_this31.multiplayerHook(node, false);
|
|
77353
77543
|
store.commit('addNode', node);
|
|
77354
|
-
|
|
77544
|
+
_this31.poolTarget = null;
|
|
77355
77545
|
});
|
|
77356
77546
|
case 1:
|
|
77357
77547
|
case "end":
|
|
77358
|
-
return
|
|
77548
|
+
return _context18.stop();
|
|
77359
77549
|
}
|
|
77360
|
-
},
|
|
77550
|
+
}, _callee18);
|
|
77361
77551
|
}))();
|
|
77362
77552
|
},
|
|
77363
77553
|
removeNode: function removeNode(node, options) {
|
|
77364
|
-
var
|
|
77365
|
-
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
77366
|
-
return _regeneratorRuntime().wrap(function
|
|
77367
|
-
while (1) switch (
|
|
77554
|
+
var _this32 = this;
|
|
77555
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee19() {
|
|
77556
|
+
return _regeneratorRuntime().wrap(function _callee19$(_context19) {
|
|
77557
|
+
while (1) switch (_context19.prev = _context19.next) {
|
|
77368
77558
|
case 0:
|
|
77369
77559
|
// Check if the node is not replaced
|
|
77370
|
-
if (
|
|
77560
|
+
if (_this32.isMultiplayer && !(options !== null && options !== void 0 && options.isReplaced)) {
|
|
77371
77561
|
// Emit event to server to remove node
|
|
77372
77562
|
window.ProcessMaker.EventBus.$emit('multiplayer-removeNode', node);
|
|
77373
77563
|
}
|
|
77374
|
-
|
|
77564
|
+
_this32.removeNodeProcedure(node, options);
|
|
77375
77565
|
case 2:
|
|
77376
77566
|
case "end":
|
|
77377
|
-
return
|
|
77567
|
+
return _context19.stop();
|
|
77378
77568
|
}
|
|
77379
|
-
},
|
|
77569
|
+
}, _callee19);
|
|
77380
77570
|
}))();
|
|
77381
77571
|
},
|
|
77382
77572
|
removeNodeProcedure: function removeNodeProcedure(node) {
|
|
77383
77573
|
var _arguments5 = arguments,
|
|
77384
|
-
|
|
77385
|
-
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
77574
|
+
_this33 = this;
|
|
77575
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee20() {
|
|
77386
77576
|
var _ref6, _ref6$removeRelations, removeRelationships;
|
|
77387
|
-
return _regeneratorRuntime().wrap(function
|
|
77388
|
-
while (1) switch (
|
|
77577
|
+
return _regeneratorRuntime().wrap(function _callee20$(_context20) {
|
|
77578
|
+
while (1) switch (_context20.prev = _context20.next) {
|
|
77389
77579
|
case 0:
|
|
77390
77580
|
_ref6 = _arguments5.length > 1 && _arguments5[1] !== undefined ? _arguments5[1] : {}, _ref6$removeRelations = _ref6.removeRelationships, removeRelationships = _ref6$removeRelations === void 0 ? true : _ref6$removeRelations;
|
|
77391
77581
|
if (node) {
|
|
77392
|
-
|
|
77582
|
+
_context20.next = 3;
|
|
77393
77583
|
break;
|
|
77394
77584
|
}
|
|
77395
|
-
return
|
|
77585
|
+
return _context20.abrupt("return");
|
|
77396
77586
|
case 3:
|
|
77397
77587
|
if (removeRelationships) {
|
|
77398
|
-
removeNodeFlows(node,
|
|
77399
|
-
removeNodeMessageFlows(node,
|
|
77400
|
-
removeNodeAssociations(node,
|
|
77588
|
+
removeNodeFlows(node, _this33);
|
|
77589
|
+
removeNodeMessageFlows(node, _this33);
|
|
77590
|
+
removeNodeAssociations(node, _this33);
|
|
77401
77591
|
}
|
|
77402
77592
|
removeOutgoingAndIncomingRefsToFlow(node);
|
|
77403
|
-
removeBoundaryEvents(
|
|
77593
|
+
removeBoundaryEvents(_this33.graph, node, _this33.removeNode);
|
|
77404
77594
|
removeSourceDefault(node);
|
|
77405
|
-
|
|
77406
|
-
|
|
77595
|
+
_this33.removeNodesFromLane(node);
|
|
77596
|
+
_this33.removeNodesFromPool(node);
|
|
77407
77597
|
store.commit('removeNode', node);
|
|
77408
|
-
store.commit('highlightNode',
|
|
77409
|
-
|
|
77410
|
-
|
|
77411
|
-
return
|
|
77598
|
+
store.commit('highlightNode', _this33.processNode);
|
|
77599
|
+
_this33.$refs.selector.clearSelection();
|
|
77600
|
+
_context20.next = 14;
|
|
77601
|
+
return _this33.$nextTick();
|
|
77412
77602
|
case 14:
|
|
77413
|
-
|
|
77414
|
-
return
|
|
77603
|
+
_context20.next = 16;
|
|
77604
|
+
return _this33.pushToUndoStack();
|
|
77415
77605
|
case 16:
|
|
77416
77606
|
// force to update the processNode property in every delete
|
|
77417
|
-
|
|
77418
|
-
if (
|
|
77419
|
-
|
|
77420
|
-
return diagram.bpmnElement.id ===
|
|
77607
|
+
_this33.processes = _this33.getProcesses();
|
|
77608
|
+
if (_this33.processes && _this33.processes.length > 0) {
|
|
77609
|
+
_this33.processNode = new Node('processmaker-modeler-process', _this33.processes[0], _this33.planeElements.find(function (diagram) {
|
|
77610
|
+
return diagram.bpmnElement.id === _this33.processes[0].id;
|
|
77421
77611
|
}));
|
|
77422
77612
|
}
|
|
77423
77613
|
case 18:
|
|
77424
77614
|
case "end":
|
|
77425
|
-
return
|
|
77615
|
+
return _context20.stop();
|
|
77426
77616
|
}
|
|
77427
|
-
},
|
|
77617
|
+
}, _callee20);
|
|
77428
77618
|
}))();
|
|
77429
77619
|
},
|
|
77430
77620
|
removeNodes: function removeNodes() {
|
|
77431
|
-
var
|
|
77432
|
-
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
77433
|
-
return _regeneratorRuntime().wrap(function
|
|
77434
|
-
while (1) switch (
|
|
77621
|
+
var _this34 = this;
|
|
77622
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee23() {
|
|
77623
|
+
return _regeneratorRuntime().wrap(function _callee23$(_context23) {
|
|
77624
|
+
while (1) switch (_context23.prev = _context23.next) {
|
|
77435
77625
|
case 0:
|
|
77436
|
-
|
|
77437
|
-
return
|
|
77438
|
-
return _regeneratorRuntime().wrap(function
|
|
77439
|
-
while (1) switch (
|
|
77626
|
+
_context23.next = 2;
|
|
77627
|
+
return _this34.performSingleUndoRedoTransaction( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee22() {
|
|
77628
|
+
return _regeneratorRuntime().wrap(function _callee22$(_context22) {
|
|
77629
|
+
while (1) switch (_context22.prev = _context22.next) {
|
|
77440
77630
|
case 0:
|
|
77441
|
-
|
|
77442
|
-
return
|
|
77631
|
+
_context22.next = 2;
|
|
77632
|
+
return _this34.paperManager.performAtomicAction( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee21() {
|
|
77443
77633
|
var waitPromises;
|
|
77444
|
-
return _regeneratorRuntime().wrap(function
|
|
77445
|
-
while (1) switch (
|
|
77634
|
+
return _regeneratorRuntime().wrap(function _callee21$(_context21) {
|
|
77635
|
+
while (1) switch (_context21.prev = _context21.next) {
|
|
77446
77636
|
case 0:
|
|
77447
77637
|
waitPromises = [];
|
|
77448
|
-
|
|
77449
|
-
return waitPromises.push(
|
|
77638
|
+
_this34.highlightedNodes.forEach(function (node) {
|
|
77639
|
+
return waitPromises.push(_this34.removeNode(node, {
|
|
77450
77640
|
removeRelationships: true
|
|
77451
77641
|
}));
|
|
77452
77642
|
});
|
|
77453
|
-
|
|
77643
|
+
_context21.next = 4;
|
|
77454
77644
|
return Promise.all(waitPromises);
|
|
77455
77645
|
case 4:
|
|
77456
77646
|
store.commit('highlightNode');
|
|
77457
77647
|
case 5:
|
|
77458
77648
|
case "end":
|
|
77459
|
-
return
|
|
77649
|
+
return _context21.stop();
|
|
77460
77650
|
}
|
|
77461
|
-
},
|
|
77651
|
+
}, _callee21);
|
|
77462
77652
|
})));
|
|
77463
77653
|
case 2:
|
|
77464
77654
|
case "end":
|
|
77465
|
-
return
|
|
77655
|
+
return _context22.stop();
|
|
77466
77656
|
}
|
|
77467
|
-
},
|
|
77657
|
+
}, _callee22);
|
|
77468
77658
|
})));
|
|
77469
77659
|
case 2:
|
|
77470
77660
|
case "end":
|
|
77471
|
-
return
|
|
77661
|
+
return _context23.stop();
|
|
77472
77662
|
}
|
|
77473
|
-
},
|
|
77663
|
+
}, _callee23);
|
|
77474
77664
|
}))();
|
|
77475
77665
|
},
|
|
77476
77666
|
replaceNode: function replaceNode(_ref9) {
|
|
77477
|
-
var
|
|
77667
|
+
var _this35 = this;
|
|
77478
77668
|
var node = _ref9.node,
|
|
77479
77669
|
typeToReplaceWith = _ref9.typeToReplaceWith;
|
|
77480
|
-
this.performSingleUndoRedoTransaction( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
77481
|
-
return _regeneratorRuntime().wrap(function
|
|
77482
|
-
while (1) switch (
|
|
77670
|
+
this.performSingleUndoRedoTransaction( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee25() {
|
|
77671
|
+
return _regeneratorRuntime().wrap(function _callee25$(_context25) {
|
|
77672
|
+
while (1) switch (_context25.prev = _context25.next) {
|
|
77483
77673
|
case 0:
|
|
77484
|
-
|
|
77485
|
-
return
|
|
77486
|
-
var _node$diagram$bounds, x, y, nodeData
|
|
77487
|
-
return _regeneratorRuntime().wrap(function
|
|
77488
|
-
while (1) switch (
|
|
77674
|
+
_context25.next = 2;
|
|
77675
|
+
return _this35.paperManager.performAtomicAction( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee24() {
|
|
77676
|
+
var _node$diagram$bounds, x, y, nodeData;
|
|
77677
|
+
return _regeneratorRuntime().wrap(function _callee24$(_context24) {
|
|
77678
|
+
while (1) switch (_context24.prev = _context24.next) {
|
|
77489
77679
|
case 0:
|
|
77490
77680
|
_node$diagram$bounds = node.diagram.bounds, x = _node$diagram$bounds.x, y = _node$diagram$bounds.y;
|
|
77491
77681
|
nodeData = {
|
|
@@ -77496,96 +77686,89 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
77496
77686
|
},
|
|
77497
77687
|
nodeThatWillBeReplaced: node
|
|
77498
77688
|
};
|
|
77499
|
-
|
|
77500
|
-
|
|
77501
|
-
|
|
77502
|
-
}
|
|
77503
|
-
// Get all node types
|
|
77504
|
-
nodeTypes = nodeTypesStore.getters.getNodeTypes; // Get the new control
|
|
77505
|
-
newControl = nodeTypes.flatMap(function (nodeType) {
|
|
77506
|
-
var _nodeType$items;
|
|
77507
|
-
return (_nodeType$items = nodeType.items) === null || _nodeType$items === void 0 ? void 0 : _nodeType$items.filter(function (item) {
|
|
77508
|
-
return item.type === typeToReplaceWith;
|
|
77509
|
-
});
|
|
77510
|
-
}).filter(Boolean); // If the new control is found, emit event to server to replace node
|
|
77511
|
-
if (newControl.length === 1) {
|
|
77512
|
-
window.ProcessMaker.EventBus.$emit('multiplayer-replaceNode', {
|
|
77513
|
-
nodeData: nodeData,
|
|
77514
|
-
newControl: newControl[0].type
|
|
77515
|
-
});
|
|
77516
|
-
}
|
|
77517
|
-
_context23.next = 10;
|
|
77518
|
-
break;
|
|
77519
|
-
case 8:
|
|
77520
|
-
_context23.next = 10;
|
|
77521
|
-
return _this34.replaceNodeProcedure(nodeData, true);
|
|
77522
|
-
case 10:
|
|
77689
|
+
_context24.next = 4;
|
|
77690
|
+
return _this35.replaceNodeProcedure(nodeData);
|
|
77691
|
+
case 4:
|
|
77523
77692
|
case "end":
|
|
77524
|
-
return
|
|
77693
|
+
return _context24.stop();
|
|
77525
77694
|
}
|
|
77526
|
-
},
|
|
77695
|
+
}, _callee24);
|
|
77527
77696
|
})));
|
|
77528
77697
|
case 2:
|
|
77529
77698
|
case "end":
|
|
77530
|
-
return
|
|
77699
|
+
return _context25.stop();
|
|
77531
77700
|
}
|
|
77532
|
-
},
|
|
77701
|
+
}, _callee25);
|
|
77533
77702
|
})));
|
|
77534
77703
|
},
|
|
77535
77704
|
replaceNodeProcedure: function replaceNodeProcedure(data) {
|
|
77536
77705
|
var _arguments6 = arguments,
|
|
77537
|
-
|
|
77538
|
-
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
77539
|
-
var isReplaced,
|
|
77540
|
-
return _regeneratorRuntime().wrap(function
|
|
77541
|
-
while (1) switch (
|
|
77706
|
+
_this36 = this;
|
|
77707
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee26() {
|
|
77708
|
+
var isReplaced, _this36$paper$localTo, clientX, clientY, newNode, nodeTypes, newControl;
|
|
77709
|
+
return _regeneratorRuntime().wrap(function _callee26$(_context26) {
|
|
77710
|
+
while (1) switch (_context26.prev = _context26.next) {
|
|
77542
77711
|
case 0:
|
|
77543
77712
|
isReplaced = _arguments6.length > 1 && _arguments6[1] !== undefined ? _arguments6[1] : false;
|
|
77544
|
-
|
|
77545
|
-
|
|
77546
|
-
|
|
77547
|
-
|
|
77548
|
-
|
|
77549
|
-
|
|
77550
|
-
|
|
77551
|
-
|
|
77552
|
-
|
|
77553
|
-
|
|
77554
|
-
_context25.next = 7;
|
|
77555
|
-
return _this35.removeNode(data.nodeThatWillBeReplaced, {
|
|
77713
|
+
// Get the clientX and clientY from the node that will be replaced
|
|
77714
|
+
_this36$paper$localTo = _this36.paper.localToClientPoint(data.nodeThatWillBeReplaced.diagram.bounds), clientX = _this36$paper$localTo.x, clientY = _this36$paper$localTo.y;
|
|
77715
|
+
data.clientX = clientX;
|
|
77716
|
+
data.clientY = clientY;
|
|
77717
|
+
_context26.next = 6;
|
|
77718
|
+
return _this36.handleDrop(data);
|
|
77719
|
+
case 6:
|
|
77720
|
+
newNode = _context26.sent;
|
|
77721
|
+
_context26.next = 9;
|
|
77722
|
+
return _this36.removeNode(data.nodeThatWillBeReplaced, {
|
|
77556
77723
|
removeRelationships: false,
|
|
77557
77724
|
isReplaced: isReplaced
|
|
77558
77725
|
});
|
|
77559
|
-
case 7:
|
|
77560
|
-
_this35.highlightNode(newNode);
|
|
77561
|
-
_this35.selectNewNode(newNode);
|
|
77562
77726
|
case 9:
|
|
77727
|
+
_this36.highlightNode(newNode);
|
|
77728
|
+
_this36.selectNewNode(newNode);
|
|
77729
|
+
if (_this36.isMultiplayer && !isReplaced) {
|
|
77730
|
+
// Get all node types
|
|
77731
|
+
nodeTypes = nodeTypesStore.getters.getNodeTypes; // Get the new control
|
|
77732
|
+
newControl = nodeTypes.flatMap(function (nodeType) {
|
|
77733
|
+
var _nodeType$items;
|
|
77734
|
+
return (_nodeType$items = nodeType.items) === null || _nodeType$items === void 0 ? void 0 : _nodeType$items.filter(function (item) {
|
|
77735
|
+
return item.type === data.typeToReplaceWith;
|
|
77736
|
+
});
|
|
77737
|
+
}).filter(Boolean); // If the new control is found, emit event to server to replace node
|
|
77738
|
+
if (newControl.length === 1) {
|
|
77739
|
+
window.ProcessMaker.EventBus.$emit('multiplayer-replaceNode', {
|
|
77740
|
+
data: data,
|
|
77741
|
+
newControl: newControl[0].type
|
|
77742
|
+
});
|
|
77743
|
+
}
|
|
77744
|
+
}
|
|
77745
|
+
case 12:
|
|
77563
77746
|
case "end":
|
|
77564
|
-
return
|
|
77747
|
+
return _context26.stop();
|
|
77565
77748
|
}
|
|
77566
|
-
},
|
|
77749
|
+
}, _callee26);
|
|
77567
77750
|
}))();
|
|
77568
77751
|
},
|
|
77569
77752
|
replaceAiNode: function replaceAiNode(_ref12) {
|
|
77570
|
-
var
|
|
77753
|
+
var _this37 = this;
|
|
77571
77754
|
var node = _ref12.node,
|
|
77572
77755
|
typeToReplaceWith = _ref12.typeToReplaceWith,
|
|
77573
77756
|
assetId = _ref12.assetId,
|
|
77574
77757
|
assetName = _ref12.assetName,
|
|
77575
77758
|
redirectTo = _ref12.redirectTo;
|
|
77576
|
-
this.performSingleUndoRedoTransaction( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
77577
|
-
return _regeneratorRuntime().wrap(function
|
|
77578
|
-
while (1) switch (
|
|
77759
|
+
this.performSingleUndoRedoTransaction( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee28() {
|
|
77760
|
+
return _regeneratorRuntime().wrap(function _callee28$(_context28) {
|
|
77761
|
+
while (1) switch (_context28.prev = _context28.next) {
|
|
77579
77762
|
case 0:
|
|
77580
|
-
|
|
77581
|
-
return
|
|
77582
|
-
var
|
|
77583
|
-
return _regeneratorRuntime().wrap(function
|
|
77584
|
-
while (1) switch (
|
|
77763
|
+
_context28.next = 2;
|
|
77764
|
+
return _this37.paperManager.performAtomicAction( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee27() {
|
|
77765
|
+
var _this37$paper$localTo, clientX, clientY, newNode;
|
|
77766
|
+
return _regeneratorRuntime().wrap(function _callee27$(_context27) {
|
|
77767
|
+
while (1) switch (_context27.prev = _context27.next) {
|
|
77585
77768
|
case 0:
|
|
77586
|
-
|
|
77587
|
-
|
|
77588
|
-
return
|
|
77769
|
+
_this37$paper$localTo = _this37.paper.localToClientPoint(node.diagram.bounds), clientX = _this37$paper$localTo.x, clientY = _this37$paper$localTo.y;
|
|
77770
|
+
_context27.next = 3;
|
|
77771
|
+
return _this37.handleDrop({
|
|
77589
77772
|
clientX: clientX,
|
|
77590
77773
|
clientY: clientY,
|
|
77591
77774
|
control: {
|
|
@@ -77594,7 +77777,7 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
77594
77777
|
nodeThatWillBeReplaced: node
|
|
77595
77778
|
});
|
|
77596
77779
|
case 3:
|
|
77597
|
-
newNode =
|
|
77780
|
+
newNode = _context27.sent;
|
|
77598
77781
|
if (typeToReplaceWith === 'processmaker-modeler-task') {
|
|
77599
77782
|
newNode.definition.screenRef = assetId;
|
|
77600
77783
|
newNode.definition.name = assetName;
|
|
@@ -77609,98 +77792,98 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
77609
77792
|
newNode.definition.config = "{\"calledElement\":\"ProcessId-".concat(assetId, "\",\"processId\":").concat(assetId, ",\"startEvent\":\"node_1\",\"name\":\"").concat(assetName, "\"}");
|
|
77610
77793
|
redirectTo = "".concat(redirectTo, "/").concat(newNode.id);
|
|
77611
77794
|
}
|
|
77612
|
-
|
|
77613
|
-
return
|
|
77795
|
+
_context27.next = 9;
|
|
77796
|
+
return _this37.removeNode(node, {
|
|
77614
77797
|
removeRelationships: false
|
|
77615
77798
|
});
|
|
77616
77799
|
case 9:
|
|
77617
|
-
|
|
77618
|
-
|
|
77619
|
-
|
|
77620
|
-
return
|
|
77800
|
+
_this37.highlightNode(newNode);
|
|
77801
|
+
_this37.selectNewNode(newNode);
|
|
77802
|
+
_context27.next = 13;
|
|
77803
|
+
return _this37.pushToUndoStack();
|
|
77621
77804
|
case 13:
|
|
77622
|
-
|
|
77623
|
-
return
|
|
77805
|
+
_context27.next = 15;
|
|
77806
|
+
return _this37.$nextTick();
|
|
77624
77807
|
case 15:
|
|
77625
|
-
|
|
77808
|
+
_this37.saveBpmn(redirectTo, newNode.id);
|
|
77626
77809
|
case 16:
|
|
77627
77810
|
case "end":
|
|
77628
|
-
return
|
|
77811
|
+
return _context27.stop();
|
|
77629
77812
|
}
|
|
77630
|
-
},
|
|
77813
|
+
}, _callee27);
|
|
77631
77814
|
})));
|
|
77632
77815
|
case 2:
|
|
77633
77816
|
case "end":
|
|
77634
|
-
return
|
|
77817
|
+
return _context28.stop();
|
|
77635
77818
|
}
|
|
77636
|
-
},
|
|
77819
|
+
}, _callee28);
|
|
77637
77820
|
})));
|
|
77638
77821
|
},
|
|
77639
77822
|
replaceGenericFlow: function replaceGenericFlow(_ref15) {
|
|
77640
|
-
var
|
|
77823
|
+
var _this38 = this;
|
|
77641
77824
|
var actualFlow = _ref15.actualFlow,
|
|
77642
77825
|
genericFlow = _ref15.genericFlow,
|
|
77643
77826
|
targetNode = _ref15.targetNode;
|
|
77644
|
-
this.performSingleUndoRedoTransaction( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
77645
|
-
return _regeneratorRuntime().wrap(function
|
|
77646
|
-
while (1) switch (
|
|
77827
|
+
this.performSingleUndoRedoTransaction( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee30() {
|
|
77828
|
+
return _regeneratorRuntime().wrap(function _callee30$(_context30) {
|
|
77829
|
+
while (1) switch (_context30.prev = _context30.next) {
|
|
77647
77830
|
case 0:
|
|
77648
|
-
|
|
77649
|
-
return
|
|
77650
|
-
return _regeneratorRuntime().wrap(function
|
|
77651
|
-
while (1) switch (
|
|
77831
|
+
_context30.next = 2;
|
|
77832
|
+
return _this38.paperManager.performAtomicAction( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee29() {
|
|
77833
|
+
return _regeneratorRuntime().wrap(function _callee29$(_context29) {
|
|
77834
|
+
while (1) switch (_context29.prev = _context29.next) {
|
|
77652
77835
|
case 0:
|
|
77653
|
-
|
|
77654
|
-
return
|
|
77836
|
+
_context29.next = 2;
|
|
77837
|
+
return _this38.highlightNode(null);
|
|
77655
77838
|
case 2:
|
|
77656
|
-
|
|
77657
|
-
return
|
|
77839
|
+
_context29.next = 4;
|
|
77840
|
+
return _this38.$nextTick();
|
|
77658
77841
|
case 4:
|
|
77659
|
-
|
|
77842
|
+
_context29.next = 6;
|
|
77660
77843
|
return store.commit('removeNode', genericFlow);
|
|
77661
77844
|
case 6:
|
|
77662
|
-
|
|
77663
|
-
return
|
|
77845
|
+
_context29.next = 8;
|
|
77846
|
+
return _this38.$nextTick();
|
|
77664
77847
|
case 8:
|
|
77665
|
-
|
|
77666
|
-
return
|
|
77848
|
+
_context29.next = 10;
|
|
77849
|
+
return _this38.addNode(actualFlow, genericFlow.definition.id);
|
|
77667
77850
|
case 10:
|
|
77668
|
-
|
|
77669
|
-
return
|
|
77851
|
+
_context29.next = 12;
|
|
77852
|
+
return _this38.$nextTick();
|
|
77670
77853
|
case 12:
|
|
77671
|
-
|
|
77672
|
-
return
|
|
77854
|
+
_context29.next = 14;
|
|
77855
|
+
return _this38.highlightNode(targetNode);
|
|
77673
77856
|
case 14:
|
|
77674
77857
|
case "end":
|
|
77675
|
-
return
|
|
77858
|
+
return _context29.stop();
|
|
77676
77859
|
}
|
|
77677
|
-
},
|
|
77860
|
+
}, _callee29);
|
|
77678
77861
|
})));
|
|
77679
77862
|
case 2:
|
|
77680
77863
|
case "end":
|
|
77681
|
-
return
|
|
77864
|
+
return _context30.stop();
|
|
77682
77865
|
}
|
|
77683
|
-
},
|
|
77866
|
+
}, _callee30);
|
|
77684
77867
|
})));
|
|
77685
77868
|
},
|
|
77686
77869
|
performSingleUndoRedoTransaction: function performSingleUndoRedoTransaction(cb) {
|
|
77687
|
-
var
|
|
77688
|
-
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
77689
|
-
return _regeneratorRuntime().wrap(function
|
|
77690
|
-
while (1) switch (
|
|
77870
|
+
var _this39 = this;
|
|
77871
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee31() {
|
|
77872
|
+
return _regeneratorRuntime().wrap(function _callee31$(_context31) {
|
|
77873
|
+
while (1) switch (_context31.prev = _context31.next) {
|
|
77691
77874
|
case 0:
|
|
77692
77875
|
undoRedoStore.commit('disableSavingState');
|
|
77693
|
-
|
|
77876
|
+
_context31.next = 3;
|
|
77694
77877
|
return cb();
|
|
77695
77878
|
case 3:
|
|
77696
77879
|
undoRedoStore.commit('enableSavingState');
|
|
77697
|
-
|
|
77698
|
-
return
|
|
77880
|
+
_context31.next = 6;
|
|
77881
|
+
return _this39.pushToUndoStack();
|
|
77699
77882
|
case 6:
|
|
77700
77883
|
case "end":
|
|
77701
|
-
return
|
|
77884
|
+
return _context31.stop();
|
|
77702
77885
|
}
|
|
77703
|
-
},
|
|
77886
|
+
}, _callee31);
|
|
77704
77887
|
}))();
|
|
77705
77888
|
},
|
|
77706
77889
|
removeNodesFromLane: function removeNodesFromLane(node) {
|
|
@@ -77713,36 +77896,36 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
77713
77896
|
pull_default()(containingLane.get('flowNodeRef'), node.definition);
|
|
77714
77897
|
},
|
|
77715
77898
|
removeNodesFromPool: function removeNodesFromPool(node) {
|
|
77716
|
-
var
|
|
77899
|
+
var _this40 = this;
|
|
77717
77900
|
if (node.type === 'processmaker-modeler-pool' && node.definition.processRef) {
|
|
77718
77901
|
if (node.definition.processRef.artifacts) {
|
|
77719
77902
|
node.definition.processRef.artifacts.forEach(function (artifact) {
|
|
77720
|
-
var nodeToRemove =
|
|
77903
|
+
var nodeToRemove = _this40.nodes.find(function (n) {
|
|
77721
77904
|
return n.definition === artifact;
|
|
77722
77905
|
});
|
|
77723
77906
|
if (nodeToRemove) {
|
|
77724
|
-
|
|
77907
|
+
_this40.removeNode(nodeToRemove);
|
|
77725
77908
|
}
|
|
77726
77909
|
});
|
|
77727
77910
|
}
|
|
77728
77911
|
if (node.definition.processRef.flowElements) {
|
|
77729
77912
|
node.definition.processRef.flowElements.forEach(function (flowElement) {
|
|
77730
|
-
var nodeToRemove =
|
|
77913
|
+
var nodeToRemove = _this40.nodes.find(function (n) {
|
|
77731
77914
|
return n.definition === flowElement;
|
|
77732
77915
|
});
|
|
77733
77916
|
if (nodeToRemove) {
|
|
77734
|
-
|
|
77917
|
+
_this40.removeNode(nodeToRemove);
|
|
77735
77918
|
}
|
|
77736
77919
|
});
|
|
77737
77920
|
}
|
|
77738
77921
|
var laneSets = node.definition.processRef.laneSets;
|
|
77739
77922
|
if (!!laneSets && laneSets.length > 0) {
|
|
77740
77923
|
laneSets[0].lanes.forEach(function (lane) {
|
|
77741
|
-
var nodeToRemove =
|
|
77924
|
+
var nodeToRemove = _this40.nodes.find(function (n) {
|
|
77742
77925
|
return n.definition === lane;
|
|
77743
77926
|
});
|
|
77744
77927
|
if (nodeToRemove) {
|
|
77745
|
-
|
|
77928
|
+
_this40.removeNode(nodeToRemove);
|
|
77746
77929
|
}
|
|
77747
77930
|
});
|
|
77748
77931
|
}
|
|
@@ -77770,13 +77953,13 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
77770
77953
|
return shape.component != null;
|
|
77771
77954
|
},
|
|
77772
77955
|
setShapeStacking: function setShapeStacking(shape) {
|
|
77773
|
-
var
|
|
77956
|
+
var _this41 = this;
|
|
77774
77957
|
if (this.isRendering || !shape.component.node.isType('processmaker-modeler-pool') && shape === this.previouslyStackedShape) {
|
|
77775
77958
|
return;
|
|
77776
77959
|
}
|
|
77777
77960
|
this.previouslyStackedShape = shape;
|
|
77778
77961
|
this.paperManager.performAtomicAction(function () {
|
|
77779
|
-
return ensureShapeIsNotCovered(shape,
|
|
77962
|
+
return ensureShapeIsNotCovered(shape, _this41.graph);
|
|
77780
77963
|
});
|
|
77781
77964
|
},
|
|
77782
77965
|
showSavedNotification: function showSavedNotification() {
|
|
@@ -77810,49 +77993,49 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
77810
77993
|
return false;
|
|
77811
77994
|
},
|
|
77812
77995
|
pointerDowInShape: function pointerDowInShape(event, element) {
|
|
77813
|
-
var
|
|
77814
|
-
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
77996
|
+
var _this42 = this;
|
|
77997
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee32() {
|
|
77815
77998
|
var x, y, shapeView;
|
|
77816
|
-
return _regeneratorRuntime().wrap(function
|
|
77817
|
-
while (1) switch (
|
|
77999
|
+
return _regeneratorRuntime().wrap(function _callee32$(_context32) {
|
|
78000
|
+
while (1) switch (_context32.prev = _context32.next) {
|
|
77818
78001
|
case 0:
|
|
77819
78002
|
x = event.clientX, y = event.clientY;
|
|
77820
|
-
shapeView =
|
|
77821
|
-
|
|
77822
|
-
|
|
77823
|
-
|
|
77824
|
-
|
|
78003
|
+
shapeView = _this42.paper.findViewByModel(element);
|
|
78004
|
+
_this42.isDragging = false;
|
|
78005
|
+
_this42.isSelecting = false;
|
|
78006
|
+
_this42.isIntoTheSelection = false;
|
|
78007
|
+
_this42.dragStart = {
|
|
77825
78008
|
x: x,
|
|
77826
78009
|
y: y
|
|
77827
78010
|
};
|
|
77828
78011
|
// Verify if is in the selection box
|
|
77829
|
-
if (!
|
|
77830
|
-
|
|
78012
|
+
if (!_this42.isPointInSelection(event)) {
|
|
78013
|
+
_context32.next = 10;
|
|
77831
78014
|
break;
|
|
77832
78015
|
}
|
|
77833
|
-
|
|
77834
|
-
|
|
78016
|
+
_this42.isIntoTheSelection = true;
|
|
78017
|
+
_context32.next = 15;
|
|
77835
78018
|
break;
|
|
77836
78019
|
case 10:
|
|
77837
78020
|
if (event.shiftKey) {
|
|
77838
|
-
|
|
78021
|
+
_context32.next = 15;
|
|
77839
78022
|
break;
|
|
77840
78023
|
}
|
|
77841
|
-
|
|
77842
|
-
return
|
|
78024
|
+
_context32.next = 13;
|
|
78025
|
+
return _this42.$refs.selector.selectElement(shapeView);
|
|
77843
78026
|
case 13:
|
|
77844
|
-
|
|
77845
|
-
return
|
|
78027
|
+
_context32.next = 15;
|
|
78028
|
+
return _this42.$nextTick();
|
|
77846
78029
|
case 15:
|
|
77847
|
-
|
|
78030
|
+
_this42.$refs.selector.startDrag({
|
|
77848
78031
|
clientX: event.clientX,
|
|
77849
78032
|
clientY: event.clientY
|
|
77850
78033
|
});
|
|
77851
78034
|
case 16:
|
|
77852
78035
|
case "end":
|
|
77853
|
-
return
|
|
78036
|
+
return _context32.stop();
|
|
77854
78037
|
}
|
|
77855
|
-
},
|
|
78038
|
+
}, _callee32);
|
|
77856
78039
|
}))();
|
|
77857
78040
|
},
|
|
77858
78041
|
pointerDownHandler: function pointerDownHandler(event) {
|
|
@@ -77973,7 +78156,7 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
77973
78156
|
this.$emit('set-xml-manager', this.xmlManager);
|
|
77974
78157
|
},
|
|
77975
78158
|
mounted: function mounted() {
|
|
77976
|
-
var
|
|
78159
|
+
var _this43 = this;
|
|
77977
78160
|
store.commit('setReadOnly', this.readOnly);
|
|
77978
78161
|
this.graph = new external_jointjs_namespaceObject.dia.Graph();
|
|
77979
78162
|
store.commit('setGraph', this.graph);
|
|
@@ -77992,47 +78175,47 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
77992
78175
|
store.commit('setPaper', this.paperManager.paper);
|
|
77993
78176
|
this.paperManager.addEventHandler('element:pointerclick', this.blurFocusedScreenBuilderElement, this);
|
|
77994
78177
|
this.paperManager.addEventHandler('blank:pointerdown', function (event, x, y) {
|
|
77995
|
-
if (
|
|
78178
|
+
if (_this43.isGrabbing) return;
|
|
77996
78179
|
if (store.getters.isReadOnly) {
|
|
77997
|
-
|
|
78180
|
+
_this43.isGrabbing = true;
|
|
77998
78181
|
}
|
|
77999
|
-
var scale =
|
|
78000
|
-
|
|
78182
|
+
var scale = _this43.paperManager.scale;
|
|
78183
|
+
_this43.canvasDragPosition = {
|
|
78001
78184
|
x: x * scale.sx,
|
|
78002
78185
|
y: y * scale.sy
|
|
78003
78186
|
};
|
|
78004
|
-
|
|
78005
|
-
|
|
78187
|
+
_this43.isOverShape = false;
|
|
78188
|
+
_this43.pointerDownHandler(event);
|
|
78006
78189
|
}, this);
|
|
78007
78190
|
this.paperManager.addEventHandler('cell:mouseover element:mouseover', function (_ref19) {
|
|
78008
78191
|
var shape = _ref19.model;
|
|
78009
|
-
if (
|
|
78192
|
+
if (_this43.isBpmnNode(shape) && shape.attr('body/cursor') !== 'default' && !_this43.isGrabbing) {
|
|
78010
78193
|
shape.attr('body/cursor', 'move');
|
|
78011
78194
|
}
|
|
78012
78195
|
// If the user is panning the Paper while hovering an element, ignore the default move cursor
|
|
78013
|
-
if (
|
|
78196
|
+
if (_this43.isGrabbing && _this43.isBpmnNode(shape)) {
|
|
78014
78197
|
shape.attr('body/cursor', 'grabbing');
|
|
78015
78198
|
}
|
|
78016
78199
|
});
|
|
78017
78200
|
this.paperManager.addEventHandler('blank:pointerup', function (event) {
|
|
78018
|
-
|
|
78019
|
-
|
|
78020
|
-
|
|
78021
|
-
|
|
78201
|
+
_this43.isGrabbing = false;
|
|
78202
|
+
_this43.canvasDragPosition = null;
|
|
78203
|
+
_this43.activeNode = null;
|
|
78204
|
+
_this43.pointerUpHandler(event);
|
|
78022
78205
|
}, this);
|
|
78023
78206
|
this.paperManager.addEventHandler('cell:pointerup', function (cellView, event) {
|
|
78024
|
-
|
|
78025
|
-
|
|
78026
|
-
|
|
78207
|
+
_this43.canvasDragPosition = null;
|
|
78208
|
+
_this43.activeNode = null;
|
|
78209
|
+
_this43.pointerUpHandler(event, cellView);
|
|
78027
78210
|
}, this);
|
|
78028
78211
|
this.$refs['paper-container'].addEventListener('mouseenter', function () {
|
|
78029
78212
|
store.commit('setClientLeftPaper', false);
|
|
78030
78213
|
});
|
|
78031
78214
|
this.$el.addEventListener('mousemove', function (event) {
|
|
78032
|
-
|
|
78215
|
+
_this43.pointerMoveHandler(event);
|
|
78033
78216
|
});
|
|
78034
78217
|
this.$refs['paper-container'].addEventListener('mouseleave', function () {
|
|
78035
|
-
|
|
78218
|
+
_this43.paperManager.removeEventHandler('blank:pointermove');
|
|
78036
78219
|
store.commit('setClientLeftPaper', true);
|
|
78037
78220
|
});
|
|
78038
78221
|
this.paperManager.addEventHandler('cell:pointerclick', function (cellView, evt, x, y) {
|
|
@@ -78043,44 +78226,44 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
78043
78226
|
});
|
|
78044
78227
|
this.paperManager.addEventHandler('cell:pointerclick', function (_ref20, event) {
|
|
78045
78228
|
var shape = _ref20.model;
|
|
78046
|
-
if (!
|
|
78229
|
+
if (!_this43.isBpmnNode(shape)) {
|
|
78047
78230
|
return;
|
|
78048
78231
|
}
|
|
78049
78232
|
|
|
78050
78233
|
// ignore click event if the user is Grabbing the paper
|
|
78051
|
-
if (
|
|
78234
|
+
if (_this43.isGrabbing) return;
|
|
78052
78235
|
shape.component.$emit('click', event);
|
|
78053
|
-
|
|
78236
|
+
_this43.$emit('click', {
|
|
78054
78237
|
event: event,
|
|
78055
|
-
node:
|
|
78238
|
+
node: _this43.highlightedNode.definition
|
|
78056
78239
|
});
|
|
78057
78240
|
});
|
|
78058
78241
|
this.paperManager.addEventHandler('cell:pointerdown', function (_ref21, event) {
|
|
78059
78242
|
var shape = _ref21.model;
|
|
78060
|
-
if (!
|
|
78243
|
+
if (!_this43.isBpmnNode(shape)) {
|
|
78061
78244
|
return;
|
|
78062
78245
|
}
|
|
78063
78246
|
// If the user is pressing Space (grabbing) and clicking on a Cell, return
|
|
78064
|
-
if (
|
|
78247
|
+
if (_this43.isGrabbing) {
|
|
78065
78248
|
return;
|
|
78066
78249
|
}
|
|
78067
|
-
|
|
78068
|
-
|
|
78069
|
-
|
|
78070
|
-
|
|
78250
|
+
_this43.setShapeStacking(shape);
|
|
78251
|
+
_this43.activeNode = shape.component.node;
|
|
78252
|
+
_this43.isOverShape = true;
|
|
78253
|
+
_this43.pointerDowInShape(event, shape);
|
|
78071
78254
|
});
|
|
78072
78255
|
// If the user is grabbing the paper while he clicked in a cell, move the paper and not the cell
|
|
78073
78256
|
this.paperManager.addEventHandler('cell:pointermove', function (_, event, x, y) {
|
|
78074
|
-
if (
|
|
78075
|
-
if (!
|
|
78076
|
-
var scale =
|
|
78077
|
-
|
|
78257
|
+
if (_this43.isGrabbing) {
|
|
78258
|
+
if (!_this43.canvasDragPosition) {
|
|
78259
|
+
var scale = _this43.paperManager.scale;
|
|
78260
|
+
_this43.canvasDragPosition = {
|
|
78078
78261
|
x: x * scale.sx,
|
|
78079
78262
|
y: y * scale.sy
|
|
78080
78263
|
};
|
|
78081
78264
|
}
|
|
78082
|
-
if (
|
|
78083
|
-
|
|
78265
|
+
if (_this43.canvasDragPosition && !_this43.clientLeftPaper) {
|
|
78266
|
+
_this43.paperManager.translate(event.offsetX - _this43.canvasDragPosition.x, event.offsetY - _this43.canvasDragPosition.y);
|
|
78084
78267
|
}
|
|
78085
78268
|
}
|
|
78086
78269
|
});
|
|
@@ -78091,28 +78274,29 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
78091
78274
|
modeler: this,
|
|
78092
78275
|
registerMenuAction: this.registerMenuAction,
|
|
78093
78276
|
loadXML: function () {
|
|
78094
|
-
var _loadXML = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
78277
|
+
var _loadXML = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee33(xml) {
|
|
78095
78278
|
var multiplayer;
|
|
78096
|
-
return _regeneratorRuntime().wrap(function
|
|
78097
|
-
while (1) switch (
|
|
78279
|
+
return _regeneratorRuntime().wrap(function _callee33$(_context33) {
|
|
78280
|
+
while (1) switch (_context33.prev = _context33.next) {
|
|
78098
78281
|
case 0:
|
|
78099
|
-
|
|
78100
|
-
return
|
|
78282
|
+
_context33.next = 2;
|
|
78283
|
+
return _this43.loadXML(xml);
|
|
78101
78284
|
case 2:
|
|
78102
|
-
|
|
78285
|
+
_context33.next = 4;
|
|
78103
78286
|
return undoRedoStore.dispatch('pushState', xml);
|
|
78104
78287
|
case 4:
|
|
78105
78288
|
try {
|
|
78106
|
-
multiplayer = new Multiplayer(
|
|
78289
|
+
multiplayer = new Multiplayer(_this43);
|
|
78107
78290
|
multiplayer.init();
|
|
78291
|
+
_this43.multiplayer = multiplayer;
|
|
78108
78292
|
} catch (error) {
|
|
78109
78293
|
console.warn('Could not initialize multiplayer', error);
|
|
78110
78294
|
}
|
|
78111
78295
|
case 5:
|
|
78112
78296
|
case "end":
|
|
78113
|
-
return
|
|
78297
|
+
return _context33.stop();
|
|
78114
78298
|
}
|
|
78115
|
-
},
|
|
78299
|
+
}, _callee33);
|
|
78116
78300
|
}));
|
|
78117
78301
|
function loadXML(_x) {
|
|
78118
78302
|
return _loadXML.apply(this, arguments);
|
|
@@ -78120,18 +78304,18 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
78120
78304
|
return loadXML;
|
|
78121
78305
|
}(),
|
|
78122
78306
|
addWarnings: function addWarnings(warnings) {
|
|
78123
|
-
return
|
|
78307
|
+
return _this43.$emit('warnings', warnings);
|
|
78124
78308
|
},
|
|
78125
78309
|
addBreadcrumbs: function addBreadcrumbs(breadcrumbs) {
|
|
78126
|
-
return
|
|
78310
|
+
return _this43.breadcrumbData.push(breadcrumbs);
|
|
78127
78311
|
}
|
|
78128
78312
|
});
|
|
78129
78313
|
this.$root.$on('replace-ai-node', function (data) {
|
|
78130
|
-
|
|
78314
|
+
_this43.replaceAiNode(data);
|
|
78131
78315
|
});
|
|
78132
78316
|
window.ProcessMaker.EventBus.$on('save-changes', function (redirectUrl) {
|
|
78133
78317
|
if (redirectUrl) {
|
|
78134
|
-
|
|
78318
|
+
_this43.redirect(redirectUrl);
|
|
78135
78319
|
}
|
|
78136
78320
|
});
|
|
78137
78321
|
}
|
|
@@ -78153,8 +78337,8 @@ var modelervue_type_style_index_0_prod_lang_scss_ = __webpack_require__(88242);
|
|
|
78153
78337
|
|
|
78154
78338
|
var Modeler_component = normalizeComponent(
|
|
78155
78339
|
modeler_Modelervue_type_script_lang_js_,
|
|
78156
|
-
|
|
78157
|
-
|
|
78340
|
+
Modelervue_type_template_id_0e494be6_render,
|
|
78341
|
+
Modelervue_type_template_id_0e494be6_staticRenderFns,
|
|
78158
78342
|
false,
|
|
78159
78343
|
null,
|
|
78160
78344
|
null,
|