@processmaker/modeler 1.39.19 → 1.39.21
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 +563 -443
- package/dist/modeler.common.js.map +1 -1
- package/dist/modeler.umd.js +563 -443
- 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/crownColorDropdown.vue +14 -0
- package/src/components/modeler/Modeler.vue +53 -24
- package/src/components/modeler/Selection.vue +2 -0
- package/src/multiplayer/multiplayer.js +39 -4
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
|
+
/***/ 19262:
|
|
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-4045da65]{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
|
+
/***/ 58469:
|
|
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-76ef27c6]{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-76ef27c6]{background:#fff;width:1.75rem;height:1.75rem;border-radius:50%;border:2px solid #fff;position:relative}.color-picker[data-v-76ef27c6]{position:absolute;right:40px;top:calc(100% - 36px)}.toggle-picker[data-v-76ef27c6]{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
|
+
/***/ 27903:
|
|
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__(19262);
|
|
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("78adf176", 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
|
+
/***/ 99246:
|
|
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__(58469);
|
|
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("6b092a64", content, true, {"sourceMap":false,"shadowMode":false});
|
|
26559
26559
|
|
|
26560
26560
|
/***/ }),
|
|
26561
26561
|
|
|
@@ -34986,9 +34986,9 @@ var crownBoundaryEventDropdown_component = normalizeComponent(
|
|
|
34986
34986
|
)
|
|
34987
34987
|
|
|
34988
34988
|
/* 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=
|
|
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=76ef27c6&scoped=true&
|
|
34990
34990
|
|
|
34991
|
-
var
|
|
34991
|
+
var crownColorDropdownvue_type_template_id_76ef27c6_scoped_true_render = function render() {
|
|
34992
34992
|
var _vm = this,
|
|
34993
34993
|
_c = _vm._self._c;
|
|
34994
34994
|
return !_vm.hide ? _c('div', {
|
|
@@ -35115,9 +35115,9 @@ var crownColorDropdownvue_type_template_id_2c87b6c6_scoped_true_render = functio
|
|
|
35115
35115
|
}
|
|
35116
35116
|
})], 1)])], 1) : _vm._e();
|
|
35117
35117
|
};
|
|
35118
|
-
var
|
|
35118
|
+
var crownColorDropdownvue_type_template_id_76ef27c6_scoped_true_staticRenderFns = [];
|
|
35119
35119
|
|
|
35120
|
-
;// CONCATENATED MODULE: ./src/components/crown/crownButtons/crownColorDropdown.vue?vue&type=template&id=
|
|
35120
|
+
;// CONCATENATED MODULE: ./src/components/crown/crownButtons/crownColorDropdown.vue?vue&type=template&id=76ef27c6&scoped=true&
|
|
35121
35121
|
|
|
35122
35122
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/web.btoa.js
|
|
35123
35123
|
var web_btoa = __webpack_require__(27479);
|
|
@@ -35786,6 +35786,19 @@ var free_solid_svg_icons_namespaceObject = require("@fortawesome/free-solid-svg-
|
|
|
35786
35786
|
});
|
|
35787
35787
|
external_vue_default().set(this.node.definition, 'color', color);
|
|
35788
35788
|
this.$emit('save-state');
|
|
35789
|
+
var properties = {
|
|
35790
|
+
id: this.node.definition.id,
|
|
35791
|
+
properties: {
|
|
35792
|
+
color: this.node.definition.color,
|
|
35793
|
+
x: this.node.diagram.bounds.x,
|
|
35794
|
+
y: this.node.diagram.bounds.y,
|
|
35795
|
+
height: this.node.diagram.bounds.height,
|
|
35796
|
+
width: this.node.diagram.bounds.width,
|
|
35797
|
+
type: this.node.type,
|
|
35798
|
+
id: this.node.definition.id
|
|
35799
|
+
}
|
|
35800
|
+
};
|
|
35801
|
+
window.ProcessMaker.EventBus.$emit('multiplayer-updateNodes', [properties]);
|
|
35789
35802
|
},
|
|
35790
35803
|
resetNodeColor: function resetNodeColor() {
|
|
35791
35804
|
store.commit('updateNodeProp', {
|
|
@@ -35836,9 +35849,9 @@ var free_solid_svg_icons_namespaceObject = require("@fortawesome/free-solid-svg-
|
|
|
35836
35849
|
});
|
|
35837
35850
|
;// CONCATENATED MODULE: ./src/components/crown/crownButtons/crownColorDropdown.vue?vue&type=script&lang=js&
|
|
35838
35851
|
/* harmony default export */ var crownButtons_crownColorDropdownvue_type_script_lang_js_ = (crownColorDropdownvue_type_script_lang_js_);
|
|
35839
|
-
// 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=
|
|
35840
|
-
var
|
|
35841
|
-
;// CONCATENATED MODULE: ./src/components/crown/crownButtons/crownColorDropdown.vue?vue&type=style&index=0&id=
|
|
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=76ef27c6&prod&lang=scss&scoped=true&
|
|
35853
|
+
var crownColorDropdownvue_type_style_index_0_id_76ef27c6_prod_lang_scss_scoped_true_ = __webpack_require__(99246);
|
|
35854
|
+
;// CONCATENATED MODULE: ./src/components/crown/crownButtons/crownColorDropdown.vue?vue&type=style&index=0&id=76ef27c6&prod&lang=scss&scoped=true&
|
|
35842
35855
|
|
|
35843
35856
|
;// CONCATENATED MODULE: ./src/components/crown/crownButtons/crownColorDropdown.vue
|
|
35844
35857
|
|
|
@@ -35851,11 +35864,11 @@ var crownColorDropdownvue_type_style_index_0_id_2c87b6c6_prod_lang_scss_scoped_t
|
|
|
35851
35864
|
|
|
35852
35865
|
var crownColorDropdown_component = normalizeComponent(
|
|
35853
35866
|
crownButtons_crownColorDropdownvue_type_script_lang_js_,
|
|
35854
|
-
|
|
35855
|
-
|
|
35867
|
+
crownColorDropdownvue_type_template_id_76ef27c6_scoped_true_render,
|
|
35868
|
+
crownColorDropdownvue_type_template_id_76ef27c6_scoped_true_staticRenderFns,
|
|
35856
35869
|
false,
|
|
35857
35870
|
null,
|
|
35858
|
-
"
|
|
35871
|
+
"76ef27c6",
|
|
35859
35872
|
null
|
|
35860
35873
|
|
|
35861
35874
|
)
|
|
@@ -47675,10 +47688,10 @@ var ValidationStatus_component = normalizeComponent(
|
|
|
47675
47688
|
)
|
|
47676
47689
|
|
|
47677
47690
|
/* harmony default export */ var ValidationStatus = (ValidationStatus_component.exports);
|
|
47678
|
-
;// 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=
|
|
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=5fd6d55f&
|
|
47679
47692
|
|
|
47680
47693
|
|
|
47681
|
-
var
|
|
47694
|
+
var Modelervue_type_template_id_5fd6d55f_render = function render() {
|
|
47682
47695
|
var _vm = this,
|
|
47683
47696
|
_c = _vm._self._c;
|
|
47684
47697
|
return _c('span', {
|
|
@@ -47897,9 +47910,9 @@ var Modelervue_type_template_id_74d45ad8_render = function render() {
|
|
|
47897
47910
|
}
|
|
47898
47911
|
}) : _vm._e()], 2)], 1);
|
|
47899
47912
|
};
|
|
47900
|
-
var
|
|
47913
|
+
var Modelervue_type_template_id_5fd6d55f_staticRenderFns = [];
|
|
47901
47914
|
|
|
47902
|
-
;// CONCATENATED MODULE: ./src/components/modeler/Modeler.vue?vue&type=template&id=
|
|
47915
|
+
;// CONCATENATED MODULE: ./src/components/modeler/Modeler.vue?vue&type=template&id=5fd6d55f&
|
|
47903
47916
|
|
|
47904
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=2979ecac&
|
|
47905
47918
|
var boundaryEventvue_type_template_id_2979ecac_render = function render() {
|
|
@@ -54931,8 +54944,8 @@ var genericFlow_component = normalizeComponent(
|
|
|
54931
54944
|
)
|
|
54932
54945
|
|
|
54933
54946
|
/* harmony default export */ var genericFlow = (genericFlow_component.exports);
|
|
54934
|
-
;// 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=
|
|
54935
|
-
var
|
|
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=4045da65&scoped=true&
|
|
54948
|
+
var Selectionvue_type_template_id_4045da65_scoped_true_render = function render() {
|
|
54936
54949
|
var _vm = this,
|
|
54937
54950
|
_c = _vm._self._c;
|
|
54938
54951
|
return _vm.showLasso && _vm.style ? _c('div', {
|
|
@@ -54962,7 +54975,7 @@ var Selectionvue_type_template_id_68f84c00_scoped_true_render = function render(
|
|
|
54962
54975
|
}
|
|
54963
54976
|
}, _vm.$listeners))], 1) : _vm._e();
|
|
54964
54977
|
};
|
|
54965
|
-
var
|
|
54978
|
+
var Selectionvue_type_template_id_4045da65_scoped_true_staticRenderFns = [];
|
|
54966
54979
|
|
|
54967
54980
|
;// 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&
|
|
54968
54981
|
|
|
@@ -56497,7 +56510,8 @@ var crownMultiselect_component = normalizeComponent(
|
|
|
56497
56510
|
x: shape.model.get('position').x,
|
|
56498
56511
|
y: shape.model.get('position').y,
|
|
56499
56512
|
height: shape.model.get('size').height,
|
|
56500
|
-
width: shape.model.get('size').width
|
|
56513
|
+
width: shape.model.get('size').width,
|
|
56514
|
+
color: shape.model.get('color')
|
|
56501
56515
|
}
|
|
56502
56516
|
};
|
|
56503
56517
|
if (node !== null && node !== void 0 && (_node$pool = node.pool) !== null && _node$pool !== void 0 && _node$pool.component) {
|
|
@@ -56517,7 +56531,8 @@ var crownMultiselect_component = normalizeComponent(
|
|
|
56517
56531
|
x: model.get('position').x,
|
|
56518
56532
|
y: model.get('position').y,
|
|
56519
56533
|
height: model.get('size').height,
|
|
56520
|
-
width: model.get('size').width
|
|
56534
|
+
width: model.get('size').width,
|
|
56535
|
+
color: model.get('color')
|
|
56521
56536
|
}
|
|
56522
56537
|
});
|
|
56523
56538
|
});
|
|
@@ -56906,9 +56921,9 @@ var crownMultiselect_component = normalizeComponent(
|
|
|
56906
56921
|
});
|
|
56907
56922
|
;// CONCATENATED MODULE: ./src/components/modeler/Selection.vue?vue&type=script&lang=js&
|
|
56908
56923
|
/* harmony default export */ var modeler_Selectionvue_type_script_lang_js_ = (Selectionvue_type_script_lang_js_);
|
|
56909
|
-
// 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=
|
|
56910
|
-
var
|
|
56911
|
-
;// CONCATENATED MODULE: ./src/components/modeler/Selection.vue?vue&type=style&index=0&id=
|
|
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=4045da65&prod&scoped=true&lang=css&
|
|
56925
|
+
var Selectionvue_type_style_index_0_id_4045da65_prod_scoped_true_lang_css_ = __webpack_require__(27903);
|
|
56926
|
+
;// CONCATENATED MODULE: ./src/components/modeler/Selection.vue?vue&type=style&index=0&id=4045da65&prod&scoped=true&lang=css&
|
|
56912
56927
|
|
|
56913
56928
|
;// CONCATENATED MODULE: ./src/components/modeler/Selection.vue
|
|
56914
56929
|
|
|
@@ -56921,11 +56936,11 @@ var Selectionvue_type_style_index_0_id_68f84c00_prod_scoped_true_lang_css_ = __w
|
|
|
56921
56936
|
|
|
56922
56937
|
var Selection_component = normalizeComponent(
|
|
56923
56938
|
modeler_Selectionvue_type_script_lang_js_,
|
|
56924
|
-
|
|
56925
|
-
|
|
56939
|
+
Selectionvue_type_template_id_4045da65_scoped_true_render,
|
|
56940
|
+
Selectionvue_type_template_id_4045da65_scoped_true_staticRenderFns,
|
|
56926
56941
|
false,
|
|
56927
56942
|
null,
|
|
56928
|
-
"
|
|
56943
|
+
"4045da65",
|
|
56929
56944
|
null
|
|
56930
56945
|
|
|
56931
56946
|
)
|
|
@@ -75497,6 +75512,7 @@ var Room = /*#__PURE__*/function () {
|
|
|
75497
75512
|
|
|
75498
75513
|
|
|
75499
75514
|
|
|
75515
|
+
|
|
75500
75516
|
|
|
75501
75517
|
|
|
75502
75518
|
var _nodeIdGenerator = /*#__PURE__*/new WeakMap();
|
|
@@ -75565,6 +75581,30 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
75565
75581
|
_this.modeler.removePlayer(payload.clientId);
|
|
75566
75582
|
_this.modeler.enableMultiplayer(payload.isMultiplayer);
|
|
75567
75583
|
});
|
|
75584
|
+
this.clientIO.on('requestProcess', function (payload) {
|
|
75585
|
+
var firstClient = payload.firstClient,
|
|
75586
|
+
clientId = payload.clientId;
|
|
75587
|
+
|
|
75588
|
+
// Check if the current client is the first client
|
|
75589
|
+
if (firstClient.id === _this.clientIO.id) {
|
|
75590
|
+
// Get the process definition
|
|
75591
|
+
var nodes = _this.modeler.nodes.map(function (node) {
|
|
75592
|
+
return _this.modeler.multiplayerHook(node, false, true);
|
|
75593
|
+
});
|
|
75594
|
+
nodes.forEach(function (node) {
|
|
75595
|
+
var yMapNested = new YMap();
|
|
75596
|
+
_this.doTransact(yMapNested, node);
|
|
75597
|
+
_this.yArray.push([yMapNested]);
|
|
75598
|
+
// Encode the state as an update and send it to the server
|
|
75599
|
+
var stateUpdate = encodeStateAsUpdate(_this.yDoc);
|
|
75600
|
+
// Send the update to the web socket server
|
|
75601
|
+
_this.clientIO.emit('createElement', {
|
|
75602
|
+
updateDoc: stateUpdate,
|
|
75603
|
+
clientId: clientId
|
|
75604
|
+
});
|
|
75605
|
+
});
|
|
75606
|
+
}
|
|
75607
|
+
});
|
|
75568
75608
|
|
|
75569
75609
|
// Listen for updates when a new element is added
|
|
75570
75610
|
this.clientIO.on('createElement', /*#__PURE__*/function () {
|
|
@@ -75588,6 +75628,32 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
75588
75628
|
};
|
|
75589
75629
|
}());
|
|
75590
75630
|
|
|
75631
|
+
// Listen for updates when a new element is requested
|
|
75632
|
+
this.clientIO.on('createRequestedElement', /*#__PURE__*/function () {
|
|
75633
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(payload) {
|
|
75634
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
75635
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
75636
|
+
case 0:
|
|
75637
|
+
if (!(payload.clientId === _this.clientIO.id)) {
|
|
75638
|
+
_context2.next = 4;
|
|
75639
|
+
break;
|
|
75640
|
+
}
|
|
75641
|
+
_context2.next = 3;
|
|
75642
|
+
return _this.createRemoteShape(payload.changes);
|
|
75643
|
+
case 3:
|
|
75644
|
+
// Add the new element to the shared array
|
|
75645
|
+
applyUpdate(_this.yDoc, new Uint8Array(payload.updateDoc));
|
|
75646
|
+
case 4:
|
|
75647
|
+
case "end":
|
|
75648
|
+
return _context2.stop();
|
|
75649
|
+
}
|
|
75650
|
+
}, _callee2);
|
|
75651
|
+
}));
|
|
75652
|
+
return function (_x2) {
|
|
75653
|
+
return _ref2.apply(this, arguments);
|
|
75654
|
+
};
|
|
75655
|
+
}());
|
|
75656
|
+
|
|
75591
75657
|
// Listen for updates when an element is removed
|
|
75592
75658
|
this.clientIO.on('removeElement', function (payload) {
|
|
75593
75659
|
payload.deletedNodes.forEach(function (nodeId) {
|
|
@@ -75627,9 +75693,9 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
75627
75693
|
window.ProcessMaker.EventBus.$on('multiplayer-updateNodes', function (data) {
|
|
75628
75694
|
_this.updateNodes(data);
|
|
75629
75695
|
});
|
|
75630
|
-
window.ProcessMaker.EventBus.$on('multiplayer-replaceNode', function (
|
|
75631
|
-
var nodeData =
|
|
75632
|
-
newControl =
|
|
75696
|
+
window.ProcessMaker.EventBus.$on('multiplayer-replaceNode', function (_ref3) {
|
|
75697
|
+
var nodeData = _ref3.nodeData,
|
|
75698
|
+
newControl = _ref3.newControl;
|
|
75633
75699
|
_this.replaceNode(nodeData, newControl);
|
|
75634
75700
|
});
|
|
75635
75701
|
window.ProcessMaker.EventBus.$on('multiplayer-addFlow', function (data) {
|
|
@@ -75649,7 +75715,9 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
75649
75715
|
// Encode the state as an update and send it to the server
|
|
75650
75716
|
var stateUpdate = encodeStateAsUpdate(this.yDoc);
|
|
75651
75717
|
// Send the update to the web socket server
|
|
75652
|
-
this.clientIO.emit('createElement',
|
|
75718
|
+
this.clientIO.emit('createElement', {
|
|
75719
|
+
updateDoc: stateUpdate
|
|
75720
|
+
});
|
|
75653
75721
|
}
|
|
75654
75722
|
}, {
|
|
75655
75723
|
key: "createShape",
|
|
@@ -75782,6 +75850,7 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
75782
75850
|
type: updatedNode.type
|
|
75783
75851
|
},
|
|
75784
75852
|
nodeThatWillBeReplaced: node,
|
|
75853
|
+
color: node.color,
|
|
75785
75854
|
id: updatedNode.id
|
|
75786
75855
|
};
|
|
75787
75856
|
|
|
@@ -75811,17 +75880,17 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
75811
75880
|
}, {
|
|
75812
75881
|
key: "updateShapes",
|
|
75813
75882
|
value: function () {
|
|
75814
|
-
var _updateShapes = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
75883
|
+
var _updateShapes = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(data) {
|
|
75815
75884
|
var _this4 = this;
|
|
75816
|
-
var paper, element, newPool, sourceElem, targetElem, waypoint, startWaypoint, endWaypoint, newWaypoint;
|
|
75817
|
-
return _regeneratorRuntime().wrap(function
|
|
75818
|
-
while (1) switch (
|
|
75885
|
+
var paper, element, newPool, sourceElem, targetElem, waypoint, startWaypoint, endWaypoint, newWaypoint, node;
|
|
75886
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
75887
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
75819
75888
|
case 0:
|
|
75820
75889
|
paper = this.modeler.paper;
|
|
75821
75890
|
element = this.modeler.getElementByNodeId(data.id);
|
|
75822
75891
|
newPool = this.modeler.getElementByNodeId(data.poolId);
|
|
75823
75892
|
if (!this.modeler.flowTypes.includes(data.type)) {
|
|
75824
|
-
|
|
75893
|
+
_context3.next = 15;
|
|
75825
75894
|
break;
|
|
75826
75895
|
}
|
|
75827
75896
|
// Update the element's waypoints
|
|
@@ -75855,7 +75924,7 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
75855
75924
|
name: 'boundary'
|
|
75856
75925
|
}
|
|
75857
75926
|
});
|
|
75858
|
-
|
|
75927
|
+
_context3.next = 26;
|
|
75859
75928
|
break;
|
|
75860
75929
|
case 15:
|
|
75861
75930
|
// Update the element's position attribute
|
|
@@ -75865,26 +75934,33 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
75865
75934
|
x: data.x,
|
|
75866
75935
|
y: data.y
|
|
75867
75936
|
});
|
|
75937
|
+
node = this.getNodeById(data.id);
|
|
75938
|
+
store.commit('updateNodeProp', {
|
|
75939
|
+
node: node,
|
|
75940
|
+
key: 'color',
|
|
75941
|
+
value: data.color
|
|
75942
|
+
});
|
|
75943
|
+
|
|
75868
75944
|
// Trigger a rendering of the element on the paper
|
|
75869
|
-
|
|
75945
|
+
_context3.next = 21;
|
|
75870
75946
|
return paper.findViewByModel(element).update();
|
|
75871
|
-
case 19:
|
|
75872
|
-
_context2.next = 21;
|
|
75873
|
-
return element.component.$nextTick();
|
|
75874
75947
|
case 21:
|
|
75875
|
-
|
|
75876
|
-
return
|
|
75948
|
+
_context3.next = 23;
|
|
75949
|
+
return element.component.$nextTick();
|
|
75877
75950
|
case 23:
|
|
75951
|
+
_context3.next = 25;
|
|
75952
|
+
return this.modeler.paperManager.awaitScheduledUpdates();
|
|
75953
|
+
case 25:
|
|
75878
75954
|
if (newPool && element.component.node.pool && element.component.node.pool.component.id !== data.poolId) {
|
|
75879
75955
|
element.component.node.pool.component.moveElementRemote(element, newPool);
|
|
75880
75956
|
}
|
|
75881
|
-
case
|
|
75957
|
+
case 26:
|
|
75882
75958
|
case "end":
|
|
75883
|
-
return
|
|
75959
|
+
return _context3.stop();
|
|
75884
75960
|
}
|
|
75885
|
-
},
|
|
75961
|
+
}, _callee3, this);
|
|
75886
75962
|
}));
|
|
75887
|
-
function updateShapes(
|
|
75963
|
+
function updateShapes(_x3) {
|
|
75888
75964
|
return _updateShapes.apply(this, arguments);
|
|
75889
75965
|
}
|
|
75890
75966
|
return updateShapes;
|
|
@@ -75898,7 +75974,9 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
75898
75974
|
// Encode the state as an update and send it to the server
|
|
75899
75975
|
var stateUpdate = encodeStateAsUpdate(this.yDoc);
|
|
75900
75976
|
// Send the update to the web socket server
|
|
75901
|
-
this.clientIO.emit('createElement',
|
|
75977
|
+
this.clientIO.emit('createElement', {
|
|
75978
|
+
updateDoc: stateUpdate
|
|
75979
|
+
});
|
|
75902
75980
|
_classPrivateFieldGet(this, _nodeIdGenerator).updateCounters();
|
|
75903
75981
|
}
|
|
75904
75982
|
}, {
|
|
@@ -75923,7 +76001,9 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
75923
76001
|
_this5.doTransact(yMapNested, data);
|
|
75924
76002
|
_this5.yArray.push([yMapNested]);
|
|
75925
76003
|
var stateUpdate = encodeStateAsUpdate(_this5.yDoc);
|
|
75926
|
-
_this5.clientIO.emit('createElement',
|
|
76004
|
+
_this5.clientIO.emit('createElement', {
|
|
76005
|
+
updateDoc: stateUpdate
|
|
76006
|
+
});
|
|
75927
76007
|
});
|
|
75928
76008
|
});
|
|
75929
76009
|
}
|
|
@@ -76944,7 +77024,11 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
76944
77024
|
while (1) switch (_context8.prev = _context8.next) {
|
|
76945
77025
|
case 0:
|
|
76946
77026
|
node = _this21.createNode(type, definition, diagram);
|
|
76947
|
-
|
|
77027
|
+
if (!_this21.isMultiplayer) {
|
|
77028
|
+
store.commit('addNode', node);
|
|
77029
|
+
} else {
|
|
77030
|
+
_this21.loadNodeForMultiplayer(node);
|
|
77031
|
+
}
|
|
76948
77032
|
case 2:
|
|
76949
77033
|
case "end":
|
|
76950
77034
|
return _context8.stop();
|
|
@@ -76952,6 +77036,39 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
76952
77036
|
}, _callee8);
|
|
76953
77037
|
}))();
|
|
76954
77038
|
},
|
|
77039
|
+
loadNodeForMultiplayer: function loadNodeForMultiplayer(node) {
|
|
77040
|
+
var _this22 = this;
|
|
77041
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9() {
|
|
77042
|
+
return _regeneratorRuntime().wrap(function _callee9$(_context9) {
|
|
77043
|
+
while (1) switch (_context9.prev = _context9.next) {
|
|
77044
|
+
case 0:
|
|
77045
|
+
if (!(node.type === 'processmaker-modeler-lane')) {
|
|
77046
|
+
_context9.next = 10;
|
|
77047
|
+
break;
|
|
77048
|
+
}
|
|
77049
|
+
_context9.next = 3;
|
|
77050
|
+
return _this22.addNode(node, node.definition.id, true);
|
|
77051
|
+
case 3:
|
|
77052
|
+
_this22.nodeIdGenerator.updateCounters();
|
|
77053
|
+
_context9.next = 6;
|
|
77054
|
+
return _this22.$nextTick();
|
|
77055
|
+
case 6:
|
|
77056
|
+
_context9.next = 8;
|
|
77057
|
+
return _this22.paperManager.awaitScheduledUpdates();
|
|
77058
|
+
case 8:
|
|
77059
|
+
window.ProcessMaker.EventBus.$emit('multiplayer-addLanes', [node]);
|
|
77060
|
+
return _context9.abrupt("return");
|
|
77061
|
+
case 10:
|
|
77062
|
+
_this22.multiplayerHook(node, false);
|
|
77063
|
+
store.commit('addNode', node);
|
|
77064
|
+
_this22.poolTarget = null;
|
|
77065
|
+
case 13:
|
|
77066
|
+
case "end":
|
|
77067
|
+
return _context9.stop();
|
|
77068
|
+
}
|
|
77069
|
+
}, _callee9);
|
|
77070
|
+
}))();
|
|
77071
|
+
},
|
|
76955
77072
|
createNode: function createNode(type, definition, diagram) {
|
|
76956
77073
|
if (Node.isTimerType(type)) {
|
|
76957
77074
|
return new TimerEventNode(type, definition, diagram);
|
|
@@ -76970,95 +77087,95 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
76970
77087
|
return hasSource && hasTarget;
|
|
76971
77088
|
},
|
|
76972
77089
|
waitForCursorToChange: function waitForCursorToChange() {
|
|
76973
|
-
var
|
|
76974
|
-
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
77090
|
+
var _this23 = this;
|
|
77091
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10() {
|
|
76975
77092
|
var cursorWaitTime;
|
|
76976
|
-
return _regeneratorRuntime().wrap(function
|
|
76977
|
-
while (1) switch (
|
|
77093
|
+
return _regeneratorRuntime().wrap(function _callee10$(_context10) {
|
|
77094
|
+
while (1) switch (_context10.prev = _context10.next) {
|
|
76978
77095
|
case 0:
|
|
76979
77096
|
cursorWaitTime = 300;
|
|
76980
|
-
|
|
76981
|
-
return
|
|
77097
|
+
_context10.next = 3;
|
|
77098
|
+
return _this23.$nextTick();
|
|
76982
77099
|
case 3:
|
|
76983
|
-
return
|
|
77100
|
+
return _context10.abrupt("return", new Promise(function (resolve) {
|
|
76984
77101
|
return setTimeout(resolve, cursorWaitTime);
|
|
76985
77102
|
}));
|
|
76986
77103
|
case 4:
|
|
76987
77104
|
case "end":
|
|
76988
|
-
return
|
|
77105
|
+
return _context10.stop();
|
|
76989
77106
|
}
|
|
76990
|
-
},
|
|
77107
|
+
}, _callee10);
|
|
76991
77108
|
}))();
|
|
76992
77109
|
},
|
|
76993
77110
|
renderPaper: function renderPaper() {
|
|
76994
|
-
var
|
|
76995
|
-
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
76996
|
-
return _regeneratorRuntime().wrap(function
|
|
76997
|
-
while (1) switch (
|
|
77111
|
+
var _this24 = this;
|
|
77112
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12() {
|
|
77113
|
+
return _regeneratorRuntime().wrap(function _callee12$(_context12) {
|
|
77114
|
+
while (1) switch (_context12.prev = _context12.next) {
|
|
76998
77115
|
case 0:
|
|
76999
|
-
|
|
77000
|
-
|
|
77001
|
-
return
|
|
77002
|
-
return _regeneratorRuntime().wrap(function
|
|
77003
|
-
while (1) switch (
|
|
77116
|
+
_this24.isRendering = true;
|
|
77117
|
+
_context12.next = 3;
|
|
77118
|
+
return _this24.paperManager.performAtomicAction( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11() {
|
|
77119
|
+
return _regeneratorRuntime().wrap(function _callee11$(_context11) {
|
|
77120
|
+
while (1) switch (_context11.prev = _context11.next) {
|
|
77004
77121
|
case 0:
|
|
77005
|
-
|
|
77006
|
-
return
|
|
77122
|
+
_context11.next = 2;
|
|
77123
|
+
return _this24.waitForCursorToChange();
|
|
77007
77124
|
case 2:
|
|
77008
|
-
|
|
77009
|
-
|
|
77010
|
-
|
|
77125
|
+
_this24.parse();
|
|
77126
|
+
_this24.addPools();
|
|
77127
|
+
_this24.setUpDiagram();
|
|
77011
77128
|
case 5:
|
|
77012
77129
|
case "end":
|
|
77013
|
-
return
|
|
77130
|
+
return _context11.stop();
|
|
77014
77131
|
}
|
|
77015
|
-
},
|
|
77132
|
+
}, _callee11);
|
|
77016
77133
|
})));
|
|
77017
77134
|
case 3:
|
|
77018
|
-
|
|
77019
|
-
return
|
|
77135
|
+
_context12.next = 5;
|
|
77136
|
+
return _this24.paperManager.awaitScheduledUpdates();
|
|
77020
77137
|
case 5:
|
|
77021
|
-
|
|
77022
|
-
|
|
77138
|
+
_this24.isRendering = false;
|
|
77139
|
+
_this24.$emit('parsed');
|
|
77023
77140
|
case 7:
|
|
77024
77141
|
case "end":
|
|
77025
|
-
return
|
|
77142
|
+
return _context12.stop();
|
|
77026
77143
|
}
|
|
77027
|
-
},
|
|
77144
|
+
}, _callee12);
|
|
77028
77145
|
}))();
|
|
77029
77146
|
},
|
|
77030
77147
|
loadXML: function loadXML() {
|
|
77031
77148
|
var _arguments3 = arguments,
|
|
77032
|
-
|
|
77033
|
-
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
77149
|
+
_this25 = this;
|
|
77150
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee13() {
|
|
77034
77151
|
var xml, emitChangeEvent;
|
|
77035
|
-
return _regeneratorRuntime().wrap(function
|
|
77036
|
-
while (1) switch (
|
|
77152
|
+
return _regeneratorRuntime().wrap(function _callee13$(_context13) {
|
|
77153
|
+
while (1) switch (_context13.prev = _context13.next) {
|
|
77037
77154
|
case 0:
|
|
77038
77155
|
xml = _arguments3.length > 0 && _arguments3[0] !== undefined ? _arguments3[0] : null;
|
|
77039
77156
|
emitChangeEvent = false;
|
|
77040
77157
|
if (xml === null) {
|
|
77041
|
-
xml =
|
|
77158
|
+
xml = _this25.currentXML;
|
|
77042
77159
|
emitChangeEvent = true;
|
|
77043
77160
|
}
|
|
77044
|
-
|
|
77045
|
-
return
|
|
77161
|
+
_context13.next = 5;
|
|
77162
|
+
return _this25.xmlManager.getDefinitionsFromXml(xml);
|
|
77046
77163
|
case 5:
|
|
77047
|
-
|
|
77048
|
-
|
|
77049
|
-
|
|
77164
|
+
_this25.definitions = _context13.sent;
|
|
77165
|
+
_this25.xmlManager.definitions = _this25.definitions;
|
|
77166
|
+
_this25.nodeIdGenerator = getNodeIdGenerator(_this25.definitions);
|
|
77050
77167
|
store.commit('clearNodes');
|
|
77051
|
-
|
|
77052
|
-
return
|
|
77168
|
+
_context13.next = 11;
|
|
77169
|
+
return _this25.renderPaper();
|
|
77053
77170
|
case 11:
|
|
77054
77171
|
if (emitChangeEvent) {
|
|
77055
77172
|
window.ProcessMaker.EventBus.$emit('modeler-change');
|
|
77056
77173
|
}
|
|
77057
77174
|
case 12:
|
|
77058
77175
|
case "end":
|
|
77059
|
-
return
|
|
77176
|
+
return _context13.stop();
|
|
77060
77177
|
}
|
|
77061
|
-
},
|
|
77178
|
+
}, _callee13);
|
|
77062
77179
|
}))();
|
|
77063
77180
|
},
|
|
77064
77181
|
getBoundaryEvents: function getBoundaryEvents(process) {
|
|
@@ -77082,13 +77199,13 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
77082
77199
|
return boundaryEvent;
|
|
77083
77200
|
},
|
|
77084
77201
|
ensureCancelActivityIsAddedToBoundaryEvents: function ensureCancelActivityIsAddedToBoundaryEvents(process) {
|
|
77085
|
-
var
|
|
77202
|
+
var _this26 = this;
|
|
77086
77203
|
this.getBoundaryEvents(process).forEach(function (definition) {
|
|
77087
|
-
var boundaryEvent =
|
|
77204
|
+
var boundaryEvent = _this26.createBoundaryEvent(definition);
|
|
77088
77205
|
definition.get('outgoing').forEach(function (outgoing) {
|
|
77089
77206
|
return outgoing.set('sourceRef', boundaryEvent);
|
|
77090
77207
|
});
|
|
77091
|
-
|
|
77208
|
+
_this26.replaceDefinition(definition, boundaryEvent, process);
|
|
77092
77209
|
});
|
|
77093
77210
|
},
|
|
77094
77211
|
replaceDefinition: function replaceDefinition(definition, boundaryEvent, process) {
|
|
@@ -77114,82 +77231,82 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
77114
77231
|
});
|
|
77115
77232
|
},
|
|
77116
77233
|
addRemoteNode: function addRemoteNode(data) {
|
|
77117
|
-
var
|
|
77118
|
-
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
77234
|
+
var _this27 = this;
|
|
77235
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee14() {
|
|
77119
77236
|
var definition, diagram, newNode;
|
|
77120
|
-
return _regeneratorRuntime().wrap(function
|
|
77121
|
-
while (1) switch (
|
|
77237
|
+
return _regeneratorRuntime().wrap(function _callee14$(_context14) {
|
|
77238
|
+
while (1) switch (_context14.prev = _context14.next) {
|
|
77122
77239
|
case 0:
|
|
77123
|
-
definition =
|
|
77124
|
-
diagram =
|
|
77240
|
+
definition = _this27.nodeRegistry[data.type].definition(_this27.moddle, _this27.$t);
|
|
77241
|
+
diagram = _this27.nodeRegistry[data.type].diagram(_this27.moddle);
|
|
77125
77242
|
diagram.bounds.x = data.x;
|
|
77126
77243
|
diagram.bounds.y = data.y;
|
|
77127
|
-
newNode =
|
|
77128
|
-
|
|
77129
|
-
return
|
|
77244
|
+
newNode = _this27.createNode(data.type, definition, diagram);
|
|
77245
|
+
_context14.next = 7;
|
|
77246
|
+
return _this27.addNode(newNode, data.id, true);
|
|
77130
77247
|
case 7:
|
|
77131
|
-
|
|
77132
|
-
return
|
|
77248
|
+
_context14.next = 9;
|
|
77249
|
+
return _this27.$nextTick();
|
|
77133
77250
|
case 9:
|
|
77134
|
-
|
|
77135
|
-
return
|
|
77251
|
+
_context14.next = 11;
|
|
77252
|
+
return _this27.paperManager.awaitScheduledUpdates();
|
|
77136
77253
|
case 11:
|
|
77137
|
-
if (
|
|
77138
|
-
|
|
77254
|
+
if (_this27.autoValidate) {
|
|
77255
|
+
_this27.validateBpmnDiagram();
|
|
77139
77256
|
}
|
|
77140
77257
|
case 12:
|
|
77141
77258
|
case "end":
|
|
77142
|
-
return
|
|
77259
|
+
return _context14.stop();
|
|
77143
77260
|
}
|
|
77144
|
-
},
|
|
77261
|
+
}, _callee14);
|
|
77145
77262
|
}))();
|
|
77146
77263
|
},
|
|
77147
77264
|
handleDrop: function handleDrop(data) {
|
|
77148
|
-
var
|
|
77149
|
-
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
77150
|
-
var clientX, clientY, control, nodeThatWillBeReplaced, definition, diagram,
|
|
77151
|
-
return _regeneratorRuntime().wrap(function
|
|
77152
|
-
while (1) switch (
|
|
77265
|
+
var _this28 = this;
|
|
77266
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee15() {
|
|
77267
|
+
var clientX, clientY, control, nodeThatWillBeReplaced, definition, diagram, _this28$paperManager$, x, y, newNode, nodeMigrator;
|
|
77268
|
+
return _regeneratorRuntime().wrap(function _callee15$(_context15) {
|
|
77269
|
+
while (1) switch (_context15.prev = _context15.next) {
|
|
77153
77270
|
case 0:
|
|
77154
77271
|
clientX = data.clientX, clientY = data.clientY, control = data.control, nodeThatWillBeReplaced = data.nodeThatWillBeReplaced;
|
|
77155
|
-
|
|
77272
|
+
_this28.validateDropTarget({
|
|
77156
77273
|
clientX: clientX,
|
|
77157
77274
|
clientY: clientY,
|
|
77158
77275
|
control: control
|
|
77159
77276
|
});
|
|
77160
|
-
if (
|
|
77161
|
-
|
|
77277
|
+
if (_this28.allowDrop) {
|
|
77278
|
+
_context15.next = 4;
|
|
77162
77279
|
break;
|
|
77163
77280
|
}
|
|
77164
|
-
return
|
|
77281
|
+
return _context15.abrupt("return");
|
|
77165
77282
|
case 4:
|
|
77166
|
-
definition =
|
|
77167
|
-
diagram =
|
|
77168
|
-
|
|
77283
|
+
definition = _this28.nodeRegistry[control.type].definition(_this28.moddle, _this28.$t);
|
|
77284
|
+
diagram = _this28.nodeRegistry[control.type].diagram(_this28.moddle);
|
|
77285
|
+
_this28$paperManager$ = _this28.paperManager.clientToGridPoint(clientX, clientY), x = _this28$paperManager$.x, y = _this28$paperManager$.y;
|
|
77169
77286
|
diagram.bounds.x = x;
|
|
77170
77287
|
diagram.bounds.y = y;
|
|
77171
|
-
newNode =
|
|
77288
|
+
newNode = _this28.createNode(control.type, definition, diagram);
|
|
77172
77289
|
if (newNode.isBpmnType('bpmn:BoundaryEvent')) {
|
|
77173
|
-
|
|
77290
|
+
_this28.setShapeCenterUnderCursor(diagram);
|
|
77174
77291
|
}
|
|
77175
|
-
|
|
77176
|
-
|
|
77177
|
-
return
|
|
77292
|
+
_this28.highlightNode(newNode);
|
|
77293
|
+
_context15.next = 14;
|
|
77294
|
+
return _this28.addNode(newNode);
|
|
77178
77295
|
case 14:
|
|
77179
77296
|
if (nodeThatWillBeReplaced) {
|
|
77180
|
-
|
|
77297
|
+
_context15.next = 16;
|
|
77181
77298
|
break;
|
|
77182
77299
|
}
|
|
77183
|
-
return
|
|
77300
|
+
return _context15.abrupt("return");
|
|
77184
77301
|
case 16:
|
|
77185
|
-
nodeMigrator = new NodeMigrator(nodeThatWillBeReplaced, definition,
|
|
77302
|
+
nodeMigrator = new NodeMigrator(nodeThatWillBeReplaced, definition, _this28.graph, newNode, _this28.processes, _this28.collaboration);
|
|
77186
77303
|
nodeMigrator.migrate();
|
|
77187
|
-
return
|
|
77304
|
+
return _context15.abrupt("return", newNode);
|
|
77188
77305
|
case 19:
|
|
77189
77306
|
case "end":
|
|
77190
|
-
return
|
|
77307
|
+
return _context15.stop();
|
|
77191
77308
|
}
|
|
77192
|
-
},
|
|
77309
|
+
}, _callee15);
|
|
77193
77310
|
}))();
|
|
77194
77311
|
},
|
|
77195
77312
|
setShapeCenterUnderCursor: function setShapeCenterUnderCursor(diagram) {
|
|
@@ -77197,32 +77314,33 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
77197
77314
|
diagram.bounds.y -= diagram.bounds.height / 2;
|
|
77198
77315
|
},
|
|
77199
77316
|
selectNewNode: function selectNewNode(node) {
|
|
77200
|
-
var
|
|
77201
|
-
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
77317
|
+
var _this29 = this;
|
|
77318
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee16() {
|
|
77202
77319
|
var newNodeComponent, view;
|
|
77203
|
-
return _regeneratorRuntime().wrap(function
|
|
77204
|
-
while (1) switch (
|
|
77320
|
+
return _regeneratorRuntime().wrap(function _callee16$(_context16) {
|
|
77321
|
+
while (1) switch (_context16.prev = _context16.next) {
|
|
77205
77322
|
case 0:
|
|
77206
|
-
|
|
77207
|
-
return
|
|
77323
|
+
_context16.next = 2;
|
|
77324
|
+
return _this29.$nextTick();
|
|
77208
77325
|
case 2:
|
|
77209
|
-
|
|
77210
|
-
return
|
|
77326
|
+
_context16.next = 4;
|
|
77327
|
+
return _this29.paperManager.awaitScheduledUpdates();
|
|
77211
77328
|
case 4:
|
|
77212
|
-
newNodeComponent =
|
|
77329
|
+
newNodeComponent = _this29.$refs.nodeComponent.find(function (component) {
|
|
77213
77330
|
return component.node === node;
|
|
77214
77331
|
});
|
|
77215
77332
|
view = newNodeComponent.shapeView;
|
|
77216
|
-
|
|
77217
|
-
return
|
|
77333
|
+
_context16.next = 8;
|
|
77334
|
+
return _this29.$refs.selector.selectElement(view);
|
|
77218
77335
|
case 8:
|
|
77219
77336
|
case "end":
|
|
77220
|
-
return
|
|
77337
|
+
return _context16.stop();
|
|
77221
77338
|
}
|
|
77222
|
-
},
|
|
77339
|
+
}, _callee16);
|
|
77223
77340
|
}))();
|
|
77224
77341
|
},
|
|
77225
77342
|
multiplayerHook: function multiplayerHook(node, fromClient) {
|
|
77343
|
+
var isProcessRequested = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
77226
77344
|
var blackList = ['processmaker-modeler-lane', 'processmaker-modeler-generic-flow', 'processmaker-modeler-sequence-flow', 'processmaker-modeler-association', 'processmaker-modeler-data-input-association', 'processmaker-modeler-data-output-association'];
|
|
77227
77345
|
if (!this.isMultiplayer) {
|
|
77228
77346
|
return;
|
|
@@ -77237,11 +77355,15 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
77237
77355
|
width: node.diagram.bounds.width,
|
|
77238
77356
|
type: node.type,
|
|
77239
77357
|
id: node.definition.id,
|
|
77240
|
-
isAddingLaneAbove: true
|
|
77358
|
+
isAddingLaneAbove: true,
|
|
77359
|
+
color: node.color
|
|
77241
77360
|
};
|
|
77242
77361
|
if (node !== null && node !== void 0 && (_node$pool = node.pool) !== null && _node$pool !== void 0 && _node$pool.component) {
|
|
77243
77362
|
defaultData['poolId'] = node.pool.component.id;
|
|
77244
77363
|
}
|
|
77364
|
+
if (isProcessRequested) {
|
|
77365
|
+
return defaultData;
|
|
77366
|
+
}
|
|
77245
77367
|
window.ProcessMaker.EventBus.$emit('multiplayer-addNode', defaultData);
|
|
77246
77368
|
}
|
|
77247
77369
|
if (this.flowTypes.includes(node.type)) {
|
|
@@ -77249,218 +77371,222 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
77249
77371
|
var sourceRefId = (_node$definition$sour = node.definition.sourceRef) === null || _node$definition$sour === void 0 ? void 0 : _node$definition$sour.id;
|
|
77250
77372
|
var targetRefId = (_node$definition$targ = node.definition.targetRef) === null || _node$definition$targ === void 0 ? void 0 : _node$definition$targ.id;
|
|
77251
77373
|
if (node.type === 'processmaker-modeler-data-input-association') {
|
|
77252
|
-
var _node$definition$sour2, _node$definition$targ2, _node$definition$targ3;
|
|
77374
|
+
var _node$definition$sour2, _node$definition$targ2, _node$definition$targ3, _node$definition$targ4;
|
|
77253
77375
|
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);
|
|
77254
|
-
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');
|
|
77376
|
+
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');
|
|
77255
77377
|
}
|
|
77256
77378
|
if (sourceRefId && targetRefId) {
|
|
77257
|
-
|
|
77379
|
+
var flowData = {
|
|
77258
77380
|
id: node.definition.id,
|
|
77259
77381
|
type: node.type,
|
|
77260
77382
|
sourceRefId: sourceRefId,
|
|
77261
77383
|
targetRefId: targetRefId,
|
|
77262
77384
|
waypoint: node.diagram.waypoint
|
|
77263
|
-
}
|
|
77385
|
+
};
|
|
77386
|
+
if (isProcessRequested) {
|
|
77387
|
+
return flowData;
|
|
77388
|
+
}
|
|
77389
|
+
window.ProcessMaker.EventBus.$emit('multiplayer-addFlow', flowData);
|
|
77264
77390
|
}
|
|
77265
77391
|
}
|
|
77266
77392
|
}
|
|
77267
77393
|
},
|
|
77268
77394
|
addNode: function addNode(node) {
|
|
77269
77395
|
var _arguments4 = arguments,
|
|
77270
|
-
|
|
77271
|
-
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
77396
|
+
_this30 = this;
|
|
77397
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee17() {
|
|
77272
77398
|
var id, fromClient, targetProcess;
|
|
77273
|
-
return _regeneratorRuntime().wrap(function
|
|
77274
|
-
while (1) switch (
|
|
77399
|
+
return _regeneratorRuntime().wrap(function _callee17$(_context17) {
|
|
77400
|
+
while (1) switch (_context17.prev = _context17.next) {
|
|
77275
77401
|
case 0:
|
|
77276
77402
|
id = _arguments4.length > 1 && _arguments4[1] !== undefined ? _arguments4[1] : null;
|
|
77277
77403
|
fromClient = _arguments4.length > 2 && _arguments4[2] !== undefined ? _arguments4[2] : false;
|
|
77278
77404
|
if (!node.pool) {
|
|
77279
|
-
node.pool =
|
|
77405
|
+
node.pool = _this30.poolTarget;
|
|
77280
77406
|
}
|
|
77281
|
-
targetProcess = node.getTargetProcess(
|
|
77407
|
+
targetProcess = node.getTargetProcess(_this30.processes, _this30.processNode);
|
|
77282
77408
|
addNodeToProcess(node, targetProcess);
|
|
77283
|
-
node.setIds(
|
|
77284
|
-
|
|
77409
|
+
node.setIds(_this30.nodeIdGenerator, id);
|
|
77410
|
+
_this30.planeElements.push(node.diagram);
|
|
77285
77411
|
// add multiplayer logic as a hook
|
|
77286
|
-
|
|
77412
|
+
_this30.multiplayerHook(node, fromClient);
|
|
77287
77413
|
store.commit('addNode', node);
|
|
77288
|
-
|
|
77414
|
+
_this30.poolTarget = null;
|
|
77289
77415
|
|
|
77290
77416
|
// add processmaker-modeler-generic-flow
|
|
77291
77417
|
if (![sequenceFlow_id, poolLane_config_id, associationConfig_id, messageFlow_config_id, config_id, dataInputAssociation_config_id, genericFlow_config_id].includes(node.type)) {
|
|
77292
|
-
|
|
77418
|
+
_context17.next = 12;
|
|
77293
77419
|
break;
|
|
77294
77420
|
}
|
|
77295
|
-
return
|
|
77421
|
+
return _context17.abrupt("return");
|
|
77296
77422
|
case 12:
|
|
77297
77423
|
if (!fromClient) {
|
|
77298
77424
|
// Select the node after it has been added to the store (does not apply to flows)
|
|
77299
|
-
|
|
77425
|
+
_this30.selectNewNode(node);
|
|
77300
77426
|
}
|
|
77301
|
-
return
|
|
77427
|
+
return _context17.abrupt("return", new Promise(function (resolve) {
|
|
77302
77428
|
setTimeout(function () {
|
|
77303
|
-
|
|
77429
|
+
_this30.pushToUndoStack();
|
|
77304
77430
|
resolve();
|
|
77305
77431
|
});
|
|
77306
77432
|
}));
|
|
77307
77433
|
case 14:
|
|
77308
77434
|
case "end":
|
|
77309
|
-
return
|
|
77435
|
+
return _context17.stop();
|
|
77310
77436
|
}
|
|
77311
|
-
},
|
|
77437
|
+
}, _callee17);
|
|
77312
77438
|
}))();
|
|
77313
77439
|
},
|
|
77314
77440
|
addClonedNodes: function addClonedNodes(nodes) {
|
|
77315
|
-
var
|
|
77316
|
-
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
77317
|
-
return _regeneratorRuntime().wrap(function
|
|
77318
|
-
while (1) switch (
|
|
77441
|
+
var _this31 = this;
|
|
77442
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee18() {
|
|
77443
|
+
return _regeneratorRuntime().wrap(function _callee18$(_context18) {
|
|
77444
|
+
while (1) switch (_context18.prev = _context18.next) {
|
|
77319
77445
|
case 0:
|
|
77320
77446
|
nodes.forEach(function (node) {
|
|
77321
77447
|
if (!node.pool) {
|
|
77322
|
-
node.pool =
|
|
77448
|
+
node.pool = _this31.poolTarget;
|
|
77323
77449
|
}
|
|
77324
|
-
var targetProcess = node.getTargetProcess(
|
|
77450
|
+
var targetProcess = node.getTargetProcess(_this31.processes, _this31.processNode);
|
|
77325
77451
|
addNodeToProcess(node, targetProcess);
|
|
77326
|
-
|
|
77327
|
-
|
|
77452
|
+
_this31.planeElements.push(node.diagram);
|
|
77453
|
+
_this31.multiplayerHook(node, false);
|
|
77328
77454
|
store.commit('addNode', node);
|
|
77329
|
-
|
|
77455
|
+
_this31.poolTarget = null;
|
|
77330
77456
|
});
|
|
77331
77457
|
case 1:
|
|
77332
77458
|
case "end":
|
|
77333
|
-
return
|
|
77459
|
+
return _context18.stop();
|
|
77334
77460
|
}
|
|
77335
|
-
},
|
|
77461
|
+
}, _callee18);
|
|
77336
77462
|
}))();
|
|
77337
77463
|
},
|
|
77338
77464
|
removeNode: function removeNode(node, options) {
|
|
77339
|
-
var
|
|
77340
|
-
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
77341
|
-
return _regeneratorRuntime().wrap(function
|
|
77342
|
-
while (1) switch (
|
|
77465
|
+
var _this32 = this;
|
|
77466
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee19() {
|
|
77467
|
+
return _regeneratorRuntime().wrap(function _callee19$(_context19) {
|
|
77468
|
+
while (1) switch (_context19.prev = _context19.next) {
|
|
77343
77469
|
case 0:
|
|
77344
77470
|
// Check if the node is not replaced
|
|
77345
|
-
if (
|
|
77471
|
+
if (_this32.isMultiplayer && !(options !== null && options !== void 0 && options.isReplaced)) {
|
|
77346
77472
|
// Emit event to server to remove node
|
|
77347
77473
|
window.ProcessMaker.EventBus.$emit('multiplayer-removeNode', node);
|
|
77348
77474
|
}
|
|
77349
|
-
|
|
77475
|
+
_this32.removeNodeProcedure(node, options);
|
|
77350
77476
|
case 2:
|
|
77351
77477
|
case "end":
|
|
77352
|
-
return
|
|
77478
|
+
return _context19.stop();
|
|
77353
77479
|
}
|
|
77354
|
-
},
|
|
77480
|
+
}, _callee19);
|
|
77355
77481
|
}))();
|
|
77356
77482
|
},
|
|
77357
77483
|
removeNodeProcedure: function removeNodeProcedure(node) {
|
|
77358
77484
|
var _arguments5 = arguments,
|
|
77359
|
-
|
|
77360
|
-
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
77485
|
+
_this33 = this;
|
|
77486
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee20() {
|
|
77361
77487
|
var _ref6, _ref6$removeRelations, removeRelationships;
|
|
77362
|
-
return _regeneratorRuntime().wrap(function
|
|
77363
|
-
while (1) switch (
|
|
77488
|
+
return _regeneratorRuntime().wrap(function _callee20$(_context20) {
|
|
77489
|
+
while (1) switch (_context20.prev = _context20.next) {
|
|
77364
77490
|
case 0:
|
|
77365
77491
|
_ref6 = _arguments5.length > 1 && _arguments5[1] !== undefined ? _arguments5[1] : {}, _ref6$removeRelations = _ref6.removeRelationships, removeRelationships = _ref6$removeRelations === void 0 ? true : _ref6$removeRelations;
|
|
77366
77492
|
if (node) {
|
|
77367
|
-
|
|
77493
|
+
_context20.next = 3;
|
|
77368
77494
|
break;
|
|
77369
77495
|
}
|
|
77370
|
-
return
|
|
77496
|
+
return _context20.abrupt("return");
|
|
77371
77497
|
case 3:
|
|
77372
77498
|
if (removeRelationships) {
|
|
77373
|
-
removeNodeFlows(node,
|
|
77374
|
-
removeNodeMessageFlows(node,
|
|
77375
|
-
removeNodeAssociations(node,
|
|
77499
|
+
removeNodeFlows(node, _this33);
|
|
77500
|
+
removeNodeMessageFlows(node, _this33);
|
|
77501
|
+
removeNodeAssociations(node, _this33);
|
|
77376
77502
|
}
|
|
77377
77503
|
removeOutgoingAndIncomingRefsToFlow(node);
|
|
77378
|
-
removeBoundaryEvents(
|
|
77504
|
+
removeBoundaryEvents(_this33.graph, node, _this33.removeNode);
|
|
77379
77505
|
removeSourceDefault(node);
|
|
77380
|
-
|
|
77381
|
-
|
|
77506
|
+
_this33.removeNodesFromLane(node);
|
|
77507
|
+
_this33.removeNodesFromPool(node);
|
|
77382
77508
|
store.commit('removeNode', node);
|
|
77383
|
-
store.commit('highlightNode',
|
|
77384
|
-
|
|
77385
|
-
|
|
77386
|
-
return
|
|
77509
|
+
store.commit('highlightNode', _this33.processNode);
|
|
77510
|
+
_this33.$refs.selector.clearSelection();
|
|
77511
|
+
_context20.next = 14;
|
|
77512
|
+
return _this33.$nextTick();
|
|
77387
77513
|
case 14:
|
|
77388
|
-
|
|
77389
|
-
return
|
|
77514
|
+
_context20.next = 16;
|
|
77515
|
+
return _this33.pushToUndoStack();
|
|
77390
77516
|
case 16:
|
|
77391
77517
|
// force to update the processNode property in every delete
|
|
77392
|
-
|
|
77393
|
-
if (
|
|
77394
|
-
|
|
77395
|
-
return diagram.bpmnElement.id ===
|
|
77518
|
+
_this33.processes = _this33.getProcesses();
|
|
77519
|
+
if (_this33.processes && _this33.processes.length > 0) {
|
|
77520
|
+
_this33.processNode = new Node('processmaker-modeler-process', _this33.processes[0], _this33.planeElements.find(function (diagram) {
|
|
77521
|
+
return diagram.bpmnElement.id === _this33.processes[0].id;
|
|
77396
77522
|
}));
|
|
77397
77523
|
}
|
|
77398
77524
|
case 18:
|
|
77399
77525
|
case "end":
|
|
77400
|
-
return
|
|
77526
|
+
return _context20.stop();
|
|
77401
77527
|
}
|
|
77402
|
-
},
|
|
77528
|
+
}, _callee20);
|
|
77403
77529
|
}))();
|
|
77404
77530
|
},
|
|
77405
77531
|
removeNodes: function removeNodes() {
|
|
77406
|
-
var
|
|
77407
|
-
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
77408
|
-
return _regeneratorRuntime().wrap(function
|
|
77409
|
-
while (1) switch (
|
|
77532
|
+
var _this34 = this;
|
|
77533
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee23() {
|
|
77534
|
+
return _regeneratorRuntime().wrap(function _callee23$(_context23) {
|
|
77535
|
+
while (1) switch (_context23.prev = _context23.next) {
|
|
77410
77536
|
case 0:
|
|
77411
|
-
|
|
77412
|
-
return
|
|
77413
|
-
return _regeneratorRuntime().wrap(function
|
|
77414
|
-
while (1) switch (
|
|
77537
|
+
_context23.next = 2;
|
|
77538
|
+
return _this34.performSingleUndoRedoTransaction( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee22() {
|
|
77539
|
+
return _regeneratorRuntime().wrap(function _callee22$(_context22) {
|
|
77540
|
+
while (1) switch (_context22.prev = _context22.next) {
|
|
77415
77541
|
case 0:
|
|
77416
|
-
|
|
77417
|
-
return
|
|
77542
|
+
_context22.next = 2;
|
|
77543
|
+
return _this34.paperManager.performAtomicAction( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee21() {
|
|
77418
77544
|
var waitPromises;
|
|
77419
|
-
return _regeneratorRuntime().wrap(function
|
|
77420
|
-
while (1) switch (
|
|
77545
|
+
return _regeneratorRuntime().wrap(function _callee21$(_context21) {
|
|
77546
|
+
while (1) switch (_context21.prev = _context21.next) {
|
|
77421
77547
|
case 0:
|
|
77422
77548
|
waitPromises = [];
|
|
77423
|
-
|
|
77424
|
-
return waitPromises.push(
|
|
77549
|
+
_this34.highlightedNodes.forEach(function (node) {
|
|
77550
|
+
return waitPromises.push(_this34.removeNode(node, {
|
|
77425
77551
|
removeRelationships: true
|
|
77426
77552
|
}));
|
|
77427
77553
|
});
|
|
77428
|
-
|
|
77554
|
+
_context21.next = 4;
|
|
77429
77555
|
return Promise.all(waitPromises);
|
|
77430
77556
|
case 4:
|
|
77431
77557
|
store.commit('highlightNode');
|
|
77432
77558
|
case 5:
|
|
77433
77559
|
case "end":
|
|
77434
|
-
return
|
|
77560
|
+
return _context21.stop();
|
|
77435
77561
|
}
|
|
77436
|
-
},
|
|
77562
|
+
}, _callee21);
|
|
77437
77563
|
})));
|
|
77438
77564
|
case 2:
|
|
77439
77565
|
case "end":
|
|
77440
|
-
return
|
|
77566
|
+
return _context22.stop();
|
|
77441
77567
|
}
|
|
77442
|
-
},
|
|
77568
|
+
}, _callee22);
|
|
77443
77569
|
})));
|
|
77444
77570
|
case 2:
|
|
77445
77571
|
case "end":
|
|
77446
|
-
return
|
|
77572
|
+
return _context23.stop();
|
|
77447
77573
|
}
|
|
77448
|
-
},
|
|
77574
|
+
}, _callee23);
|
|
77449
77575
|
}))();
|
|
77450
77576
|
},
|
|
77451
77577
|
replaceNode: function replaceNode(_ref9) {
|
|
77452
|
-
var
|
|
77578
|
+
var _this35 = this;
|
|
77453
77579
|
var node = _ref9.node,
|
|
77454
77580
|
typeToReplaceWith = _ref9.typeToReplaceWith;
|
|
77455
|
-
this.performSingleUndoRedoTransaction( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
77456
|
-
return _regeneratorRuntime().wrap(function
|
|
77457
|
-
while (1) switch (
|
|
77581
|
+
this.performSingleUndoRedoTransaction( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee25() {
|
|
77582
|
+
return _regeneratorRuntime().wrap(function _callee25$(_context25) {
|
|
77583
|
+
while (1) switch (_context25.prev = _context25.next) {
|
|
77458
77584
|
case 0:
|
|
77459
|
-
|
|
77460
|
-
return
|
|
77461
|
-
var _node$diagram$bounds, x, y, nodeData
|
|
77462
|
-
return _regeneratorRuntime().wrap(function
|
|
77463
|
-
while (1) switch (
|
|
77585
|
+
_context25.next = 2;
|
|
77586
|
+
return _this35.paperManager.performAtomicAction( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee24() {
|
|
77587
|
+
var _node$diagram$bounds, x, y, nodeData;
|
|
77588
|
+
return _regeneratorRuntime().wrap(function _callee24$(_context24) {
|
|
77589
|
+
while (1) switch (_context24.prev = _context24.next) {
|
|
77464
77590
|
case 0:
|
|
77465
77591
|
_node$diagram$bounds = node.diagram.bounds, x = _node$diagram$bounds.x, y = _node$diagram$bounds.y;
|
|
77466
77592
|
nodeData = {
|
|
@@ -77471,96 +77597,89 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
77471
77597
|
},
|
|
77472
77598
|
nodeThatWillBeReplaced: node
|
|
77473
77599
|
};
|
|
77474
|
-
|
|
77475
|
-
|
|
77476
|
-
|
|
77477
|
-
}
|
|
77478
|
-
// Get all node types
|
|
77479
|
-
nodeTypes = nodeTypesStore.getters.getNodeTypes; // Get the new control
|
|
77480
|
-
newControl = nodeTypes.flatMap(function (nodeType) {
|
|
77481
|
-
var _nodeType$items;
|
|
77482
|
-
return (_nodeType$items = nodeType.items) === null || _nodeType$items === void 0 ? void 0 : _nodeType$items.filter(function (item) {
|
|
77483
|
-
return item.type === typeToReplaceWith;
|
|
77484
|
-
});
|
|
77485
|
-
}).filter(Boolean); // If the new control is found, emit event to server to replace node
|
|
77486
|
-
if (newControl.length === 1) {
|
|
77487
|
-
window.ProcessMaker.EventBus.$emit('multiplayer-replaceNode', {
|
|
77488
|
-
nodeData: nodeData,
|
|
77489
|
-
newControl: newControl[0].type
|
|
77490
|
-
});
|
|
77491
|
-
}
|
|
77492
|
-
_context23.next = 10;
|
|
77493
|
-
break;
|
|
77494
|
-
case 8:
|
|
77495
|
-
_context23.next = 10;
|
|
77496
|
-
return _this34.replaceNodeProcedure(nodeData, true);
|
|
77497
|
-
case 10:
|
|
77600
|
+
_context24.next = 4;
|
|
77601
|
+
return _this35.replaceNodeProcedure(nodeData);
|
|
77602
|
+
case 4:
|
|
77498
77603
|
case "end":
|
|
77499
|
-
return
|
|
77604
|
+
return _context24.stop();
|
|
77500
77605
|
}
|
|
77501
|
-
},
|
|
77606
|
+
}, _callee24);
|
|
77502
77607
|
})));
|
|
77503
77608
|
case 2:
|
|
77504
77609
|
case "end":
|
|
77505
|
-
return
|
|
77610
|
+
return _context25.stop();
|
|
77506
77611
|
}
|
|
77507
|
-
},
|
|
77612
|
+
}, _callee25);
|
|
77508
77613
|
})));
|
|
77509
77614
|
},
|
|
77510
77615
|
replaceNodeProcedure: function replaceNodeProcedure(data) {
|
|
77511
77616
|
var _arguments6 = arguments,
|
|
77512
|
-
|
|
77513
|
-
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
77514
|
-
var isReplaced,
|
|
77515
|
-
return _regeneratorRuntime().wrap(function
|
|
77516
|
-
while (1) switch (
|
|
77617
|
+
_this36 = this;
|
|
77618
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee26() {
|
|
77619
|
+
var isReplaced, _this36$paper$localTo, clientX, clientY, newNode, nodeTypes, newControl;
|
|
77620
|
+
return _regeneratorRuntime().wrap(function _callee26$(_context26) {
|
|
77621
|
+
while (1) switch (_context26.prev = _context26.next) {
|
|
77517
77622
|
case 0:
|
|
77518
77623
|
isReplaced = _arguments6.length > 1 && _arguments6[1] !== undefined ? _arguments6[1] : false;
|
|
77519
|
-
|
|
77520
|
-
|
|
77521
|
-
|
|
77522
|
-
|
|
77523
|
-
|
|
77524
|
-
|
|
77525
|
-
|
|
77526
|
-
|
|
77527
|
-
|
|
77528
|
-
|
|
77529
|
-
_context25.next = 7;
|
|
77530
|
-
return _this35.removeNode(data.nodeThatWillBeReplaced, {
|
|
77624
|
+
// Get the clientX and clientY from the node that will be replaced
|
|
77625
|
+
_this36$paper$localTo = _this36.paper.localToClientPoint(data.nodeThatWillBeReplaced.diagram.bounds), clientX = _this36$paper$localTo.x, clientY = _this36$paper$localTo.y;
|
|
77626
|
+
data.clientX = clientX;
|
|
77627
|
+
data.clientY = clientY;
|
|
77628
|
+
_context26.next = 6;
|
|
77629
|
+
return _this36.handleDrop(data);
|
|
77630
|
+
case 6:
|
|
77631
|
+
newNode = _context26.sent;
|
|
77632
|
+
_context26.next = 9;
|
|
77633
|
+
return _this36.removeNode(data.nodeThatWillBeReplaced, {
|
|
77531
77634
|
removeRelationships: false,
|
|
77532
77635
|
isReplaced: isReplaced
|
|
77533
77636
|
});
|
|
77534
|
-
case 7:
|
|
77535
|
-
_this35.highlightNode(newNode);
|
|
77536
|
-
_this35.selectNewNode(newNode);
|
|
77537
77637
|
case 9:
|
|
77638
|
+
_this36.highlightNode(newNode);
|
|
77639
|
+
_this36.selectNewNode(newNode);
|
|
77640
|
+
if (_this36.isMultiplayer && !isReplaced) {
|
|
77641
|
+
// Get all node types
|
|
77642
|
+
nodeTypes = nodeTypesStore.getters.getNodeTypes; // Get the new control
|
|
77643
|
+
newControl = nodeTypes.flatMap(function (nodeType) {
|
|
77644
|
+
var _nodeType$items;
|
|
77645
|
+
return (_nodeType$items = nodeType.items) === null || _nodeType$items === void 0 ? void 0 : _nodeType$items.filter(function (item) {
|
|
77646
|
+
return item.type === data.typeToReplaceWith;
|
|
77647
|
+
});
|
|
77648
|
+
}).filter(Boolean); // If the new control is found, emit event to server to replace node
|
|
77649
|
+
if (newControl.length === 1) {
|
|
77650
|
+
window.ProcessMaker.EventBus.$emit('multiplayer-replaceNode', {
|
|
77651
|
+
data: data,
|
|
77652
|
+
newControl: newControl[0].type
|
|
77653
|
+
});
|
|
77654
|
+
}
|
|
77655
|
+
}
|
|
77656
|
+
case 12:
|
|
77538
77657
|
case "end":
|
|
77539
|
-
return
|
|
77658
|
+
return _context26.stop();
|
|
77540
77659
|
}
|
|
77541
|
-
},
|
|
77660
|
+
}, _callee26);
|
|
77542
77661
|
}))();
|
|
77543
77662
|
},
|
|
77544
77663
|
replaceAiNode: function replaceAiNode(_ref12) {
|
|
77545
|
-
var
|
|
77664
|
+
var _this37 = this;
|
|
77546
77665
|
var node = _ref12.node,
|
|
77547
77666
|
typeToReplaceWith = _ref12.typeToReplaceWith,
|
|
77548
77667
|
assetId = _ref12.assetId,
|
|
77549
77668
|
assetName = _ref12.assetName,
|
|
77550
77669
|
redirectTo = _ref12.redirectTo;
|
|
77551
|
-
this.performSingleUndoRedoTransaction( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
77552
|
-
return _regeneratorRuntime().wrap(function
|
|
77553
|
-
while (1) switch (
|
|
77670
|
+
this.performSingleUndoRedoTransaction( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee28() {
|
|
77671
|
+
return _regeneratorRuntime().wrap(function _callee28$(_context28) {
|
|
77672
|
+
while (1) switch (_context28.prev = _context28.next) {
|
|
77554
77673
|
case 0:
|
|
77555
|
-
|
|
77556
|
-
return
|
|
77557
|
-
var
|
|
77558
|
-
return _regeneratorRuntime().wrap(function
|
|
77559
|
-
while (1) switch (
|
|
77674
|
+
_context28.next = 2;
|
|
77675
|
+
return _this37.paperManager.performAtomicAction( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee27() {
|
|
77676
|
+
var _this37$paper$localTo, clientX, clientY, newNode;
|
|
77677
|
+
return _regeneratorRuntime().wrap(function _callee27$(_context27) {
|
|
77678
|
+
while (1) switch (_context27.prev = _context27.next) {
|
|
77560
77679
|
case 0:
|
|
77561
|
-
|
|
77562
|
-
|
|
77563
|
-
return
|
|
77680
|
+
_this37$paper$localTo = _this37.paper.localToClientPoint(node.diagram.bounds), clientX = _this37$paper$localTo.x, clientY = _this37$paper$localTo.y;
|
|
77681
|
+
_context27.next = 3;
|
|
77682
|
+
return _this37.handleDrop({
|
|
77564
77683
|
clientX: clientX,
|
|
77565
77684
|
clientY: clientY,
|
|
77566
77685
|
control: {
|
|
@@ -77569,7 +77688,7 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
77569
77688
|
nodeThatWillBeReplaced: node
|
|
77570
77689
|
});
|
|
77571
77690
|
case 3:
|
|
77572
|
-
newNode =
|
|
77691
|
+
newNode = _context27.sent;
|
|
77573
77692
|
if (typeToReplaceWith === 'processmaker-modeler-task') {
|
|
77574
77693
|
newNode.definition.screenRef = assetId;
|
|
77575
77694
|
newNode.definition.name = assetName;
|
|
@@ -77584,98 +77703,98 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
77584
77703
|
newNode.definition.config = "{\"calledElement\":\"ProcessId-".concat(assetId, "\",\"processId\":").concat(assetId, ",\"startEvent\":\"node_1\",\"name\":\"").concat(assetName, "\"}");
|
|
77585
77704
|
redirectTo = "".concat(redirectTo, "/").concat(newNode.id);
|
|
77586
77705
|
}
|
|
77587
|
-
|
|
77588
|
-
return
|
|
77706
|
+
_context27.next = 9;
|
|
77707
|
+
return _this37.removeNode(node, {
|
|
77589
77708
|
removeRelationships: false
|
|
77590
77709
|
});
|
|
77591
77710
|
case 9:
|
|
77592
|
-
|
|
77593
|
-
|
|
77594
|
-
|
|
77595
|
-
return
|
|
77711
|
+
_this37.highlightNode(newNode);
|
|
77712
|
+
_this37.selectNewNode(newNode);
|
|
77713
|
+
_context27.next = 13;
|
|
77714
|
+
return _this37.pushToUndoStack();
|
|
77596
77715
|
case 13:
|
|
77597
|
-
|
|
77598
|
-
return
|
|
77716
|
+
_context27.next = 15;
|
|
77717
|
+
return _this37.$nextTick();
|
|
77599
77718
|
case 15:
|
|
77600
|
-
|
|
77719
|
+
_this37.saveBpmn(redirectTo, newNode.id);
|
|
77601
77720
|
case 16:
|
|
77602
77721
|
case "end":
|
|
77603
|
-
return
|
|
77722
|
+
return _context27.stop();
|
|
77604
77723
|
}
|
|
77605
|
-
},
|
|
77724
|
+
}, _callee27);
|
|
77606
77725
|
})));
|
|
77607
77726
|
case 2:
|
|
77608
77727
|
case "end":
|
|
77609
|
-
return
|
|
77728
|
+
return _context28.stop();
|
|
77610
77729
|
}
|
|
77611
|
-
},
|
|
77730
|
+
}, _callee28);
|
|
77612
77731
|
})));
|
|
77613
77732
|
},
|
|
77614
77733
|
replaceGenericFlow: function replaceGenericFlow(_ref15) {
|
|
77615
|
-
var
|
|
77734
|
+
var _this38 = this;
|
|
77616
77735
|
var actualFlow = _ref15.actualFlow,
|
|
77617
77736
|
genericFlow = _ref15.genericFlow,
|
|
77618
77737
|
targetNode = _ref15.targetNode;
|
|
77619
|
-
this.performSingleUndoRedoTransaction( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
77620
|
-
return _regeneratorRuntime().wrap(function
|
|
77621
|
-
while (1) switch (
|
|
77738
|
+
this.performSingleUndoRedoTransaction( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee30() {
|
|
77739
|
+
return _regeneratorRuntime().wrap(function _callee30$(_context30) {
|
|
77740
|
+
while (1) switch (_context30.prev = _context30.next) {
|
|
77622
77741
|
case 0:
|
|
77623
|
-
|
|
77624
|
-
return
|
|
77625
|
-
return _regeneratorRuntime().wrap(function
|
|
77626
|
-
while (1) switch (
|
|
77742
|
+
_context30.next = 2;
|
|
77743
|
+
return _this38.paperManager.performAtomicAction( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee29() {
|
|
77744
|
+
return _regeneratorRuntime().wrap(function _callee29$(_context29) {
|
|
77745
|
+
while (1) switch (_context29.prev = _context29.next) {
|
|
77627
77746
|
case 0:
|
|
77628
|
-
|
|
77629
|
-
return
|
|
77747
|
+
_context29.next = 2;
|
|
77748
|
+
return _this38.highlightNode(null);
|
|
77630
77749
|
case 2:
|
|
77631
|
-
|
|
77632
|
-
return
|
|
77750
|
+
_context29.next = 4;
|
|
77751
|
+
return _this38.$nextTick();
|
|
77633
77752
|
case 4:
|
|
77634
|
-
|
|
77753
|
+
_context29.next = 6;
|
|
77635
77754
|
return store.commit('removeNode', genericFlow);
|
|
77636
77755
|
case 6:
|
|
77637
|
-
|
|
77638
|
-
return
|
|
77756
|
+
_context29.next = 8;
|
|
77757
|
+
return _this38.$nextTick();
|
|
77639
77758
|
case 8:
|
|
77640
|
-
|
|
77641
|
-
return
|
|
77759
|
+
_context29.next = 10;
|
|
77760
|
+
return _this38.addNode(actualFlow, genericFlow.definition.id);
|
|
77642
77761
|
case 10:
|
|
77643
|
-
|
|
77644
|
-
return
|
|
77762
|
+
_context29.next = 12;
|
|
77763
|
+
return _this38.$nextTick();
|
|
77645
77764
|
case 12:
|
|
77646
|
-
|
|
77647
|
-
return
|
|
77765
|
+
_context29.next = 14;
|
|
77766
|
+
return _this38.highlightNode(targetNode);
|
|
77648
77767
|
case 14:
|
|
77649
77768
|
case "end":
|
|
77650
|
-
return
|
|
77769
|
+
return _context29.stop();
|
|
77651
77770
|
}
|
|
77652
|
-
},
|
|
77771
|
+
}, _callee29);
|
|
77653
77772
|
})));
|
|
77654
77773
|
case 2:
|
|
77655
77774
|
case "end":
|
|
77656
|
-
return
|
|
77775
|
+
return _context30.stop();
|
|
77657
77776
|
}
|
|
77658
|
-
},
|
|
77777
|
+
}, _callee30);
|
|
77659
77778
|
})));
|
|
77660
77779
|
},
|
|
77661
77780
|
performSingleUndoRedoTransaction: function performSingleUndoRedoTransaction(cb) {
|
|
77662
|
-
var
|
|
77663
|
-
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
77664
|
-
return _regeneratorRuntime().wrap(function
|
|
77665
|
-
while (1) switch (
|
|
77781
|
+
var _this39 = this;
|
|
77782
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee31() {
|
|
77783
|
+
return _regeneratorRuntime().wrap(function _callee31$(_context31) {
|
|
77784
|
+
while (1) switch (_context31.prev = _context31.next) {
|
|
77666
77785
|
case 0:
|
|
77667
77786
|
undoRedoStore.commit('disableSavingState');
|
|
77668
|
-
|
|
77787
|
+
_context31.next = 3;
|
|
77669
77788
|
return cb();
|
|
77670
77789
|
case 3:
|
|
77671
77790
|
undoRedoStore.commit('enableSavingState');
|
|
77672
|
-
|
|
77673
|
-
return
|
|
77791
|
+
_context31.next = 6;
|
|
77792
|
+
return _this39.pushToUndoStack();
|
|
77674
77793
|
case 6:
|
|
77675
77794
|
case "end":
|
|
77676
|
-
return
|
|
77795
|
+
return _context31.stop();
|
|
77677
77796
|
}
|
|
77678
|
-
},
|
|
77797
|
+
}, _callee31);
|
|
77679
77798
|
}))();
|
|
77680
77799
|
},
|
|
77681
77800
|
removeNodesFromLane: function removeNodesFromLane(node) {
|
|
@@ -77688,36 +77807,36 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
77688
77807
|
pull_default()(containingLane.get('flowNodeRef'), node.definition);
|
|
77689
77808
|
},
|
|
77690
77809
|
removeNodesFromPool: function removeNodesFromPool(node) {
|
|
77691
|
-
var
|
|
77810
|
+
var _this40 = this;
|
|
77692
77811
|
if (node.type === 'processmaker-modeler-pool' && node.definition.processRef) {
|
|
77693
77812
|
if (node.definition.processRef.artifacts) {
|
|
77694
77813
|
node.definition.processRef.artifacts.forEach(function (artifact) {
|
|
77695
|
-
var nodeToRemove =
|
|
77814
|
+
var nodeToRemove = _this40.nodes.find(function (n) {
|
|
77696
77815
|
return n.definition === artifact;
|
|
77697
77816
|
});
|
|
77698
77817
|
if (nodeToRemove) {
|
|
77699
|
-
|
|
77818
|
+
_this40.removeNode(nodeToRemove);
|
|
77700
77819
|
}
|
|
77701
77820
|
});
|
|
77702
77821
|
}
|
|
77703
77822
|
if (node.definition.processRef.flowElements) {
|
|
77704
77823
|
node.definition.processRef.flowElements.forEach(function (flowElement) {
|
|
77705
|
-
var nodeToRemove =
|
|
77824
|
+
var nodeToRemove = _this40.nodes.find(function (n) {
|
|
77706
77825
|
return n.definition === flowElement;
|
|
77707
77826
|
});
|
|
77708
77827
|
if (nodeToRemove) {
|
|
77709
|
-
|
|
77828
|
+
_this40.removeNode(nodeToRemove);
|
|
77710
77829
|
}
|
|
77711
77830
|
});
|
|
77712
77831
|
}
|
|
77713
77832
|
var laneSets = node.definition.processRef.laneSets;
|
|
77714
77833
|
if (!!laneSets && laneSets.length > 0) {
|
|
77715
77834
|
laneSets[0].lanes.forEach(function (lane) {
|
|
77716
|
-
var nodeToRemove =
|
|
77835
|
+
var nodeToRemove = _this40.nodes.find(function (n) {
|
|
77717
77836
|
return n.definition === lane;
|
|
77718
77837
|
});
|
|
77719
77838
|
if (nodeToRemove) {
|
|
77720
|
-
|
|
77839
|
+
_this40.removeNode(nodeToRemove);
|
|
77721
77840
|
}
|
|
77722
77841
|
});
|
|
77723
77842
|
}
|
|
@@ -77745,13 +77864,13 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
77745
77864
|
return shape.component != null;
|
|
77746
77865
|
},
|
|
77747
77866
|
setShapeStacking: function setShapeStacking(shape) {
|
|
77748
|
-
var
|
|
77867
|
+
var _this41 = this;
|
|
77749
77868
|
if (this.isRendering || !shape.component.node.isType('processmaker-modeler-pool') && shape === this.previouslyStackedShape) {
|
|
77750
77869
|
return;
|
|
77751
77870
|
}
|
|
77752
77871
|
this.previouslyStackedShape = shape;
|
|
77753
77872
|
this.paperManager.performAtomicAction(function () {
|
|
77754
|
-
return ensureShapeIsNotCovered(shape,
|
|
77873
|
+
return ensureShapeIsNotCovered(shape, _this41.graph);
|
|
77755
77874
|
});
|
|
77756
77875
|
},
|
|
77757
77876
|
showSavedNotification: function showSavedNotification() {
|
|
@@ -77785,49 +77904,49 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
77785
77904
|
return false;
|
|
77786
77905
|
},
|
|
77787
77906
|
pointerDowInShape: function pointerDowInShape(event, element) {
|
|
77788
|
-
var
|
|
77789
|
-
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
77907
|
+
var _this42 = this;
|
|
77908
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee32() {
|
|
77790
77909
|
var x, y, shapeView;
|
|
77791
|
-
return _regeneratorRuntime().wrap(function
|
|
77792
|
-
while (1) switch (
|
|
77910
|
+
return _regeneratorRuntime().wrap(function _callee32$(_context32) {
|
|
77911
|
+
while (1) switch (_context32.prev = _context32.next) {
|
|
77793
77912
|
case 0:
|
|
77794
77913
|
x = event.clientX, y = event.clientY;
|
|
77795
|
-
shapeView =
|
|
77796
|
-
|
|
77797
|
-
|
|
77798
|
-
|
|
77799
|
-
|
|
77914
|
+
shapeView = _this42.paper.findViewByModel(element);
|
|
77915
|
+
_this42.isDragging = false;
|
|
77916
|
+
_this42.isSelecting = false;
|
|
77917
|
+
_this42.isIntoTheSelection = false;
|
|
77918
|
+
_this42.dragStart = {
|
|
77800
77919
|
x: x,
|
|
77801
77920
|
y: y
|
|
77802
77921
|
};
|
|
77803
77922
|
// Verify if is in the selection box
|
|
77804
|
-
if (!
|
|
77805
|
-
|
|
77923
|
+
if (!_this42.isPointInSelection(event)) {
|
|
77924
|
+
_context32.next = 10;
|
|
77806
77925
|
break;
|
|
77807
77926
|
}
|
|
77808
|
-
|
|
77809
|
-
|
|
77927
|
+
_this42.isIntoTheSelection = true;
|
|
77928
|
+
_context32.next = 15;
|
|
77810
77929
|
break;
|
|
77811
77930
|
case 10:
|
|
77812
77931
|
if (event.shiftKey) {
|
|
77813
|
-
|
|
77932
|
+
_context32.next = 15;
|
|
77814
77933
|
break;
|
|
77815
77934
|
}
|
|
77816
|
-
|
|
77817
|
-
return
|
|
77935
|
+
_context32.next = 13;
|
|
77936
|
+
return _this42.$refs.selector.selectElement(shapeView);
|
|
77818
77937
|
case 13:
|
|
77819
|
-
|
|
77820
|
-
return
|
|
77938
|
+
_context32.next = 15;
|
|
77939
|
+
return _this42.$nextTick();
|
|
77821
77940
|
case 15:
|
|
77822
|
-
|
|
77941
|
+
_this42.$refs.selector.startDrag({
|
|
77823
77942
|
clientX: event.clientX,
|
|
77824
77943
|
clientY: event.clientY
|
|
77825
77944
|
});
|
|
77826
77945
|
case 16:
|
|
77827
77946
|
case "end":
|
|
77828
|
-
return
|
|
77947
|
+
return _context32.stop();
|
|
77829
77948
|
}
|
|
77830
|
-
},
|
|
77949
|
+
}, _callee32);
|
|
77831
77950
|
}))();
|
|
77832
77951
|
},
|
|
77833
77952
|
pointerDownHandler: function pointerDownHandler(event) {
|
|
@@ -77948,7 +78067,7 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
77948
78067
|
this.$emit('set-xml-manager', this.xmlManager);
|
|
77949
78068
|
},
|
|
77950
78069
|
mounted: function mounted() {
|
|
77951
|
-
var
|
|
78070
|
+
var _this43 = this;
|
|
77952
78071
|
store.commit('setReadOnly', this.readOnly);
|
|
77953
78072
|
this.graph = new external_jointjs_namespaceObject.dia.Graph();
|
|
77954
78073
|
store.commit('setGraph', this.graph);
|
|
@@ -77967,47 +78086,47 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
77967
78086
|
store.commit('setPaper', this.paperManager.paper);
|
|
77968
78087
|
this.paperManager.addEventHandler('element:pointerclick', this.blurFocusedScreenBuilderElement, this);
|
|
77969
78088
|
this.paperManager.addEventHandler('blank:pointerdown', function (event, x, y) {
|
|
77970
|
-
if (
|
|
78089
|
+
if (_this43.isGrabbing) return;
|
|
77971
78090
|
if (store.getters.isReadOnly) {
|
|
77972
|
-
|
|
78091
|
+
_this43.isGrabbing = true;
|
|
77973
78092
|
}
|
|
77974
|
-
var scale =
|
|
77975
|
-
|
|
78093
|
+
var scale = _this43.paperManager.scale;
|
|
78094
|
+
_this43.canvasDragPosition = {
|
|
77976
78095
|
x: x * scale.sx,
|
|
77977
78096
|
y: y * scale.sy
|
|
77978
78097
|
};
|
|
77979
|
-
|
|
77980
|
-
|
|
78098
|
+
_this43.isOverShape = false;
|
|
78099
|
+
_this43.pointerDownHandler(event);
|
|
77981
78100
|
}, this);
|
|
77982
78101
|
this.paperManager.addEventHandler('cell:mouseover element:mouseover', function (_ref19) {
|
|
77983
78102
|
var shape = _ref19.model;
|
|
77984
|
-
if (
|
|
78103
|
+
if (_this43.isBpmnNode(shape) && shape.attr('body/cursor') !== 'default' && !_this43.isGrabbing) {
|
|
77985
78104
|
shape.attr('body/cursor', 'move');
|
|
77986
78105
|
}
|
|
77987
78106
|
// If the user is panning the Paper while hovering an element, ignore the default move cursor
|
|
77988
|
-
if (
|
|
78107
|
+
if (_this43.isGrabbing && _this43.isBpmnNode(shape)) {
|
|
77989
78108
|
shape.attr('body/cursor', 'grabbing');
|
|
77990
78109
|
}
|
|
77991
78110
|
});
|
|
77992
78111
|
this.paperManager.addEventHandler('blank:pointerup', function (event) {
|
|
77993
|
-
|
|
77994
|
-
|
|
77995
|
-
|
|
77996
|
-
|
|
78112
|
+
_this43.isGrabbing = false;
|
|
78113
|
+
_this43.canvasDragPosition = null;
|
|
78114
|
+
_this43.activeNode = null;
|
|
78115
|
+
_this43.pointerUpHandler(event);
|
|
77997
78116
|
}, this);
|
|
77998
78117
|
this.paperManager.addEventHandler('cell:pointerup', function (cellView, event) {
|
|
77999
|
-
|
|
78000
|
-
|
|
78001
|
-
|
|
78118
|
+
_this43.canvasDragPosition = null;
|
|
78119
|
+
_this43.activeNode = null;
|
|
78120
|
+
_this43.pointerUpHandler(event, cellView);
|
|
78002
78121
|
}, this);
|
|
78003
78122
|
this.$refs['paper-container'].addEventListener('mouseenter', function () {
|
|
78004
78123
|
store.commit('setClientLeftPaper', false);
|
|
78005
78124
|
});
|
|
78006
78125
|
this.$el.addEventListener('mousemove', function (event) {
|
|
78007
|
-
|
|
78126
|
+
_this43.pointerMoveHandler(event);
|
|
78008
78127
|
});
|
|
78009
78128
|
this.$refs['paper-container'].addEventListener('mouseleave', function () {
|
|
78010
|
-
|
|
78129
|
+
_this43.paperManager.removeEventHandler('blank:pointermove');
|
|
78011
78130
|
store.commit('setClientLeftPaper', true);
|
|
78012
78131
|
});
|
|
78013
78132
|
this.paperManager.addEventHandler('cell:pointerclick', function (cellView, evt, x, y) {
|
|
@@ -78018,44 +78137,44 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
78018
78137
|
});
|
|
78019
78138
|
this.paperManager.addEventHandler('cell:pointerclick', function (_ref20, event) {
|
|
78020
78139
|
var shape = _ref20.model;
|
|
78021
|
-
if (!
|
|
78140
|
+
if (!_this43.isBpmnNode(shape)) {
|
|
78022
78141
|
return;
|
|
78023
78142
|
}
|
|
78024
78143
|
|
|
78025
78144
|
// ignore click event if the user is Grabbing the paper
|
|
78026
|
-
if (
|
|
78145
|
+
if (_this43.isGrabbing) return;
|
|
78027
78146
|
shape.component.$emit('click', event);
|
|
78028
|
-
|
|
78147
|
+
_this43.$emit('click', {
|
|
78029
78148
|
event: event,
|
|
78030
|
-
node:
|
|
78149
|
+
node: _this43.highlightedNode.definition
|
|
78031
78150
|
});
|
|
78032
78151
|
});
|
|
78033
78152
|
this.paperManager.addEventHandler('cell:pointerdown', function (_ref21, event) {
|
|
78034
78153
|
var shape = _ref21.model;
|
|
78035
|
-
if (!
|
|
78154
|
+
if (!_this43.isBpmnNode(shape)) {
|
|
78036
78155
|
return;
|
|
78037
78156
|
}
|
|
78038
78157
|
// If the user is pressing Space (grabbing) and clicking on a Cell, return
|
|
78039
|
-
if (
|
|
78158
|
+
if (_this43.isGrabbing) {
|
|
78040
78159
|
return;
|
|
78041
78160
|
}
|
|
78042
|
-
|
|
78043
|
-
|
|
78044
|
-
|
|
78045
|
-
|
|
78161
|
+
_this43.setShapeStacking(shape);
|
|
78162
|
+
_this43.activeNode = shape.component.node;
|
|
78163
|
+
_this43.isOverShape = true;
|
|
78164
|
+
_this43.pointerDowInShape(event, shape);
|
|
78046
78165
|
});
|
|
78047
78166
|
// If the user is grabbing the paper while he clicked in a cell, move the paper and not the cell
|
|
78048
78167
|
this.paperManager.addEventHandler('cell:pointermove', function (_, event, x, y) {
|
|
78049
|
-
if (
|
|
78050
|
-
if (!
|
|
78051
|
-
var scale =
|
|
78052
|
-
|
|
78168
|
+
if (_this43.isGrabbing) {
|
|
78169
|
+
if (!_this43.canvasDragPosition) {
|
|
78170
|
+
var scale = _this43.paperManager.scale;
|
|
78171
|
+
_this43.canvasDragPosition = {
|
|
78053
78172
|
x: x * scale.sx,
|
|
78054
78173
|
y: y * scale.sy
|
|
78055
78174
|
};
|
|
78056
78175
|
}
|
|
78057
|
-
if (
|
|
78058
|
-
|
|
78176
|
+
if (_this43.canvasDragPosition && !_this43.clientLeftPaper) {
|
|
78177
|
+
_this43.paperManager.translate(event.offsetX - _this43.canvasDragPosition.x, event.offsetY - _this43.canvasDragPosition.y);
|
|
78059
78178
|
}
|
|
78060
78179
|
}
|
|
78061
78180
|
});
|
|
@@ -78066,28 +78185,29 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
78066
78185
|
modeler: this,
|
|
78067
78186
|
registerMenuAction: this.registerMenuAction,
|
|
78068
78187
|
loadXML: function () {
|
|
78069
|
-
var _loadXML = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
78188
|
+
var _loadXML = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee33(xml) {
|
|
78070
78189
|
var multiplayer;
|
|
78071
|
-
return _regeneratorRuntime().wrap(function
|
|
78072
|
-
while (1) switch (
|
|
78190
|
+
return _regeneratorRuntime().wrap(function _callee33$(_context33) {
|
|
78191
|
+
while (1) switch (_context33.prev = _context33.next) {
|
|
78073
78192
|
case 0:
|
|
78074
|
-
|
|
78075
|
-
return
|
|
78193
|
+
_context33.next = 2;
|
|
78194
|
+
return _this43.loadXML(xml);
|
|
78076
78195
|
case 2:
|
|
78077
|
-
|
|
78196
|
+
_context33.next = 4;
|
|
78078
78197
|
return undoRedoStore.dispatch('pushState', xml);
|
|
78079
78198
|
case 4:
|
|
78080
78199
|
try {
|
|
78081
|
-
multiplayer = new Multiplayer(
|
|
78200
|
+
multiplayer = new Multiplayer(_this43);
|
|
78082
78201
|
multiplayer.init();
|
|
78202
|
+
_this43.multiplayer = multiplayer;
|
|
78083
78203
|
} catch (error) {
|
|
78084
78204
|
console.warn('Could not initialize multiplayer', error);
|
|
78085
78205
|
}
|
|
78086
78206
|
case 5:
|
|
78087
78207
|
case "end":
|
|
78088
|
-
return
|
|
78208
|
+
return _context33.stop();
|
|
78089
78209
|
}
|
|
78090
|
-
},
|
|
78210
|
+
}, _callee33);
|
|
78091
78211
|
}));
|
|
78092
78212
|
function loadXML(_x) {
|
|
78093
78213
|
return _loadXML.apply(this, arguments);
|
|
@@ -78095,18 +78215,18 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
78095
78215
|
return loadXML;
|
|
78096
78216
|
}(),
|
|
78097
78217
|
addWarnings: function addWarnings(warnings) {
|
|
78098
|
-
return
|
|
78218
|
+
return _this43.$emit('warnings', warnings);
|
|
78099
78219
|
},
|
|
78100
78220
|
addBreadcrumbs: function addBreadcrumbs(breadcrumbs) {
|
|
78101
|
-
return
|
|
78221
|
+
return _this43.breadcrumbData.push(breadcrumbs);
|
|
78102
78222
|
}
|
|
78103
78223
|
});
|
|
78104
78224
|
this.$root.$on('replace-ai-node', function (data) {
|
|
78105
|
-
|
|
78225
|
+
_this43.replaceAiNode(data);
|
|
78106
78226
|
});
|
|
78107
78227
|
window.ProcessMaker.EventBus.$on('save-changes', function (redirectUrl) {
|
|
78108
78228
|
if (redirectUrl) {
|
|
78109
|
-
|
|
78229
|
+
_this43.redirect(redirectUrl);
|
|
78110
78230
|
}
|
|
78111
78231
|
});
|
|
78112
78232
|
}
|
|
@@ -78128,8 +78248,8 @@ var modelervue_type_style_index_0_prod_lang_scss_ = __webpack_require__(88242);
|
|
|
78128
78248
|
|
|
78129
78249
|
var Modeler_component = normalizeComponent(
|
|
78130
78250
|
modeler_Modelervue_type_script_lang_js_,
|
|
78131
|
-
|
|
78132
|
-
|
|
78251
|
+
Modelervue_type_template_id_5fd6d55f_render,
|
|
78252
|
+
Modelervue_type_template_id_5fd6d55f_staticRenderFns,
|
|
78133
78253
|
false,
|
|
78134
78254
|
null,
|
|
78135
78255
|
null,
|