@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.umd.js
CHANGED
|
@@ -12828,7 +12828,7 @@ ___CSS_LOADER_EXPORT___.push([module.id, ".weekday[data-v-4ae18478]{padding:.75e
|
|
|
12828
12828
|
|
|
12829
12829
|
/***/ }),
|
|
12830
12830
|
|
|
12831
|
-
/***/
|
|
12831
|
+
/***/ 56163:
|
|
12832
12832
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
12833
12833
|
|
|
12834
12834
|
"use strict";
|
|
@@ -12842,7 +12842,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
12842
12842
|
|
|
12843
12843
|
var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
|
|
12844
12844
|
// Module
|
|
12845
|
-
___CSS_LOADER_EXPORT___.push([module.id, ".box[data-v-
|
|
12845
|
+
___CSS_LOADER_EXPORT___.push([module.id, ".box[data-v-4045da65]{border:1px solid #5faaee;position:absolute;pointer-events:none}", ""]);
|
|
12846
12846
|
// Exports
|
|
12847
12847
|
/* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___);
|
|
12848
12848
|
|
|
@@ -13000,7 +13000,7 @@ ___CSS_LOADER_EXPORT___.push([module.id, ".crown-button[data-v-09d8a8ac]{border:
|
|
|
13000
13000
|
|
|
13001
13001
|
/***/ }),
|
|
13002
13002
|
|
|
13003
|
-
/***/
|
|
13003
|
+
/***/ 53846:
|
|
13004
13004
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
13005
13005
|
|
|
13006
13006
|
"use strict";
|
|
@@ -13019,7 +13019,7 @@ var ___CSS_LOADER_URL_IMPORT_0___ = new URL(/* asset import */ __webpack_require
|
|
|
13019
13019
|
var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
|
|
13020
13020
|
var ___CSS_LOADER_URL_REPLACEMENT_0___ = _node_modules_css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_2___default()(___CSS_LOADER_URL_IMPORT_0___);
|
|
13021
13021
|
// Module
|
|
13022
|
-
___CSS_LOADER_EXPORT___.push([module.id, ".color-list[data-v-
|
|
13022
|
+
___CSS_LOADER_EXPORT___.push([module.id, ".color-list[data-v-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}", ""]);
|
|
13023
13023
|
// Exports
|
|
13024
13024
|
/* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___);
|
|
13025
13025
|
|
|
@@ -26441,19 +26441,19 @@ var update = add("a84bfd8c", content, true, {"sourceMap":false,"shadowMode":fals
|
|
|
26441
26441
|
|
|
26442
26442
|
/***/ }),
|
|
26443
26443
|
|
|
26444
|
-
/***/
|
|
26444
|
+
/***/ 87181:
|
|
26445
26445
|
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
|
26446
26446
|
|
|
26447
26447
|
// style-loader: Adds some css to the DOM by adding a <style> tag
|
|
26448
26448
|
|
|
26449
26449
|
// load the styles
|
|
26450
|
-
var content = __webpack_require__(
|
|
26450
|
+
var content = __webpack_require__(56163);
|
|
26451
26451
|
if(content.__esModule) content = content.default;
|
|
26452
26452
|
if(typeof content === 'string') content = [[module.id, content, '']];
|
|
26453
26453
|
if(content.locals) module.exports = content.locals;
|
|
26454
26454
|
// add the styles to the DOM
|
|
26455
26455
|
var add = (__webpack_require__(54402)/* ["default"] */ .Z)
|
|
26456
|
-
var update = add("
|
|
26456
|
+
var update = add("d24e8492", content, true, {"sourceMap":false,"shadowMode":false});
|
|
26457
26457
|
|
|
26458
26458
|
/***/ }),
|
|
26459
26459
|
|
|
@@ -26553,19 +26553,19 @@ var update = add("6ffce0d4", content, true, {"sourceMap":false,"shadowMode":fals
|
|
|
26553
26553
|
|
|
26554
26554
|
/***/ }),
|
|
26555
26555
|
|
|
26556
|
-
/***/
|
|
26556
|
+
/***/ 80034:
|
|
26557
26557
|
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
|
26558
26558
|
|
|
26559
26559
|
// style-loader: Adds some css to the DOM by adding a <style> tag
|
|
26560
26560
|
|
|
26561
26561
|
// load the styles
|
|
26562
|
-
var content = __webpack_require__(
|
|
26562
|
+
var content = __webpack_require__(53846);
|
|
26563
26563
|
if(content.__esModule) content = content.default;
|
|
26564
26564
|
if(typeof content === 'string') content = [[module.id, content, '']];
|
|
26565
26565
|
if(content.locals) module.exports = content.locals;
|
|
26566
26566
|
// add the styles to the DOM
|
|
26567
26567
|
var add = (__webpack_require__(54402)/* ["default"] */ .Z)
|
|
26568
|
-
var update = add("
|
|
26568
|
+
var update = add("49ad822c", content, true, {"sourceMap":false,"shadowMode":false});
|
|
26569
26569
|
|
|
26570
26570
|
/***/ }),
|
|
26571
26571
|
|
|
@@ -35084,9 +35084,9 @@ var crownBoundaryEventDropdown_component = normalizeComponent(
|
|
|
35084
35084
|
)
|
|
35085
35085
|
|
|
35086
35086
|
/* harmony default export */ var crownBoundaryEventDropdown = (crownBoundaryEventDropdown_component.exports);
|
|
35087
|
-
;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js??clonedRuleSet-83.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/crown/crownButtons/crownColorDropdown.vue?vue&type=template&id=
|
|
35087
|
+
;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js??clonedRuleSet-83.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/crown/crownButtons/crownColorDropdown.vue?vue&type=template&id=76ef27c6&scoped=true&
|
|
35088
35088
|
|
|
35089
|
-
var
|
|
35089
|
+
var crownColorDropdownvue_type_template_id_76ef27c6_scoped_true_render = function render() {
|
|
35090
35090
|
var _vm = this,
|
|
35091
35091
|
_c = _vm._self._c;
|
|
35092
35092
|
return !_vm.hide ? _c('div', {
|
|
@@ -35213,9 +35213,9 @@ var crownColorDropdownvue_type_template_id_2c87b6c6_scoped_true_render = functio
|
|
|
35213
35213
|
}
|
|
35214
35214
|
})], 1)])], 1) : _vm._e();
|
|
35215
35215
|
};
|
|
35216
|
-
var
|
|
35216
|
+
var crownColorDropdownvue_type_template_id_76ef27c6_scoped_true_staticRenderFns = [];
|
|
35217
35217
|
|
|
35218
|
-
;// CONCATENATED MODULE: ./src/components/crown/crownButtons/crownColorDropdown.vue?vue&type=template&id=
|
|
35218
|
+
;// CONCATENATED MODULE: ./src/components/crown/crownButtons/crownColorDropdown.vue?vue&type=template&id=76ef27c6&scoped=true&
|
|
35219
35219
|
|
|
35220
35220
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/web.btoa.js
|
|
35221
35221
|
var web_btoa = __webpack_require__(27479);
|
|
@@ -35884,6 +35884,19 @@ var free_solid_svg_icons_ = __webpack_require__(9943);
|
|
|
35884
35884
|
});
|
|
35885
35885
|
external_vue_default().set(this.node.definition, 'color', color);
|
|
35886
35886
|
this.$emit('save-state');
|
|
35887
|
+
var properties = {
|
|
35888
|
+
id: this.node.definition.id,
|
|
35889
|
+
properties: {
|
|
35890
|
+
color: this.node.definition.color,
|
|
35891
|
+
x: this.node.diagram.bounds.x,
|
|
35892
|
+
y: this.node.diagram.bounds.y,
|
|
35893
|
+
height: this.node.diagram.bounds.height,
|
|
35894
|
+
width: this.node.diagram.bounds.width,
|
|
35895
|
+
type: this.node.type,
|
|
35896
|
+
id: this.node.definition.id
|
|
35897
|
+
}
|
|
35898
|
+
};
|
|
35899
|
+
window.ProcessMaker.EventBus.$emit('multiplayer-updateNodes', [properties]);
|
|
35887
35900
|
},
|
|
35888
35901
|
resetNodeColor: function resetNodeColor() {
|
|
35889
35902
|
store.commit('updateNodeProp', {
|
|
@@ -35934,9 +35947,9 @@ var free_solid_svg_icons_ = __webpack_require__(9943);
|
|
|
35934
35947
|
});
|
|
35935
35948
|
;// CONCATENATED MODULE: ./src/components/crown/crownButtons/crownColorDropdown.vue?vue&type=script&lang=js&
|
|
35936
35949
|
/* harmony default export */ var crownButtons_crownColorDropdownvue_type_script_lang_js_ = (crownColorDropdownvue_type_script_lang_js_);
|
|
35937
|
-
// EXTERNAL MODULE: ./node_modules/vue-style-loader/index.js??clonedRuleSet-65.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-65.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/@vue/cli-service/node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-65.use[2]!./node_modules/@vue/cli-service/node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-65.use[3]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-65.use[4]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/crown/crownButtons/crownColorDropdown.vue?vue&type=style&index=0&id=
|
|
35938
|
-
var
|
|
35939
|
-
;// CONCATENATED MODULE: ./src/components/crown/crownButtons/crownColorDropdown.vue?vue&type=style&index=0&id=
|
|
35950
|
+
// EXTERNAL MODULE: ./node_modules/vue-style-loader/index.js??clonedRuleSet-65.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-65.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/@vue/cli-service/node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-65.use[2]!./node_modules/@vue/cli-service/node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-65.use[3]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-65.use[4]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/crown/crownButtons/crownColorDropdown.vue?vue&type=style&index=0&id=76ef27c6&prod&lang=scss&scoped=true&
|
|
35951
|
+
var crownColorDropdownvue_type_style_index_0_id_76ef27c6_prod_lang_scss_scoped_true_ = __webpack_require__(80034);
|
|
35952
|
+
;// CONCATENATED MODULE: ./src/components/crown/crownButtons/crownColorDropdown.vue?vue&type=style&index=0&id=76ef27c6&prod&lang=scss&scoped=true&
|
|
35940
35953
|
|
|
35941
35954
|
;// CONCATENATED MODULE: ./src/components/crown/crownButtons/crownColorDropdown.vue
|
|
35942
35955
|
|
|
@@ -35949,11 +35962,11 @@ var crownColorDropdownvue_type_style_index_0_id_2c87b6c6_prod_lang_scss_scoped_t
|
|
|
35949
35962
|
|
|
35950
35963
|
var crownColorDropdown_component = normalizeComponent(
|
|
35951
35964
|
crownButtons_crownColorDropdownvue_type_script_lang_js_,
|
|
35952
|
-
|
|
35953
|
-
|
|
35965
|
+
crownColorDropdownvue_type_template_id_76ef27c6_scoped_true_render,
|
|
35966
|
+
crownColorDropdownvue_type_template_id_76ef27c6_scoped_true_staticRenderFns,
|
|
35954
35967
|
false,
|
|
35955
35968
|
null,
|
|
35956
|
-
"
|
|
35969
|
+
"76ef27c6",
|
|
35957
35970
|
null
|
|
35958
35971
|
|
|
35959
35972
|
)
|
|
@@ -47773,10 +47786,10 @@ var ValidationStatus_component = normalizeComponent(
|
|
|
47773
47786
|
)
|
|
47774
47787
|
|
|
47775
47788
|
/* harmony default export */ var ValidationStatus = (ValidationStatus_component.exports);
|
|
47776
|
-
;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js??clonedRuleSet-83.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/modeler/Modeler.vue?vue&type=template&id=
|
|
47789
|
+
;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js??clonedRuleSet-83.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/modeler/Modeler.vue?vue&type=template&id=5fd6d55f&
|
|
47777
47790
|
|
|
47778
47791
|
|
|
47779
|
-
var
|
|
47792
|
+
var Modelervue_type_template_id_5fd6d55f_render = function render() {
|
|
47780
47793
|
var _vm = this,
|
|
47781
47794
|
_c = _vm._self._c;
|
|
47782
47795
|
return _c('span', {
|
|
@@ -47995,9 +48008,9 @@ var Modelervue_type_template_id_74d45ad8_render = function render() {
|
|
|
47995
48008
|
}
|
|
47996
48009
|
}) : _vm._e()], 2)], 1);
|
|
47997
48010
|
};
|
|
47998
|
-
var
|
|
48011
|
+
var Modelervue_type_template_id_5fd6d55f_staticRenderFns = [];
|
|
47999
48012
|
|
|
48000
|
-
;// CONCATENATED MODULE: ./src/components/modeler/Modeler.vue?vue&type=template&id=
|
|
48013
|
+
;// CONCATENATED MODULE: ./src/components/modeler/Modeler.vue?vue&type=template&id=5fd6d55f&
|
|
48001
48014
|
|
|
48002
48015
|
;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js??clonedRuleSet-83.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/nodes/boundaryEvent/boundaryEvent.vue?vue&type=template&id=2979ecac&
|
|
48003
48016
|
var boundaryEventvue_type_template_id_2979ecac_render = function render() {
|
|
@@ -55029,8 +55042,8 @@ var genericFlow_component = normalizeComponent(
|
|
|
55029
55042
|
)
|
|
55030
55043
|
|
|
55031
55044
|
/* harmony default export */ var genericFlow = (genericFlow_component.exports);
|
|
55032
|
-
;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js??clonedRuleSet-83.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/modeler/Selection.vue?vue&type=template&id=
|
|
55033
|
-
var
|
|
55045
|
+
;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js??clonedRuleSet-83.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/modeler/Selection.vue?vue&type=template&id=4045da65&scoped=true&
|
|
55046
|
+
var Selectionvue_type_template_id_4045da65_scoped_true_render = function render() {
|
|
55034
55047
|
var _vm = this,
|
|
55035
55048
|
_c = _vm._self._c;
|
|
55036
55049
|
return _vm.showLasso && _vm.style ? _c('div', {
|
|
@@ -55060,7 +55073,7 @@ var Selectionvue_type_template_id_68f84c00_scoped_true_render = function render(
|
|
|
55060
55073
|
}
|
|
55061
55074
|
}, _vm.$listeners))], 1) : _vm._e();
|
|
55062
55075
|
};
|
|
55063
|
-
var
|
|
55076
|
+
var Selectionvue_type_template_id_4045da65_scoped_true_staticRenderFns = [];
|
|
55064
55077
|
|
|
55065
55078
|
;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js??clonedRuleSet-83.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/crown/crownMultiselect/crownMultiselect.vue?vue&type=template&id=bcd827ec&scoped=true&
|
|
55066
55079
|
|
|
@@ -56595,7 +56608,8 @@ var crownMultiselect_component = normalizeComponent(
|
|
|
56595
56608
|
x: shape.model.get('position').x,
|
|
56596
56609
|
y: shape.model.get('position').y,
|
|
56597
56610
|
height: shape.model.get('size').height,
|
|
56598
|
-
width: shape.model.get('size').width
|
|
56611
|
+
width: shape.model.get('size').width,
|
|
56612
|
+
color: shape.model.get('color')
|
|
56599
56613
|
}
|
|
56600
56614
|
};
|
|
56601
56615
|
if (node !== null && node !== void 0 && (_node$pool = node.pool) !== null && _node$pool !== void 0 && _node$pool.component) {
|
|
@@ -56615,7 +56629,8 @@ var crownMultiselect_component = normalizeComponent(
|
|
|
56615
56629
|
x: model.get('position').x,
|
|
56616
56630
|
y: model.get('position').y,
|
|
56617
56631
|
height: model.get('size').height,
|
|
56618
|
-
width: model.get('size').width
|
|
56632
|
+
width: model.get('size').width,
|
|
56633
|
+
color: model.get('color')
|
|
56619
56634
|
}
|
|
56620
56635
|
});
|
|
56621
56636
|
});
|
|
@@ -57004,9 +57019,9 @@ var crownMultiselect_component = normalizeComponent(
|
|
|
57004
57019
|
});
|
|
57005
57020
|
;// CONCATENATED MODULE: ./src/components/modeler/Selection.vue?vue&type=script&lang=js&
|
|
57006
57021
|
/* harmony default export */ var modeler_Selectionvue_type_script_lang_js_ = (Selectionvue_type_script_lang_js_);
|
|
57007
|
-
// EXTERNAL MODULE: ./node_modules/vue-style-loader/index.js??clonedRuleSet-55.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-55.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/@vue/cli-service/node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-55.use[2]!./node_modules/@vue/cli-service/node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-55.use[3]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/modeler/Selection.vue?vue&type=style&index=0&id=
|
|
57008
|
-
var
|
|
57009
|
-
;// CONCATENATED MODULE: ./src/components/modeler/Selection.vue?vue&type=style&index=0&id=
|
|
57022
|
+
// EXTERNAL MODULE: ./node_modules/vue-style-loader/index.js??clonedRuleSet-55.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-55.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/@vue/cli-service/node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-55.use[2]!./node_modules/@vue/cli-service/node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-55.use[3]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/modeler/Selection.vue?vue&type=style&index=0&id=4045da65&prod&scoped=true&lang=css&
|
|
57023
|
+
var Selectionvue_type_style_index_0_id_4045da65_prod_scoped_true_lang_css_ = __webpack_require__(87181);
|
|
57024
|
+
;// CONCATENATED MODULE: ./src/components/modeler/Selection.vue?vue&type=style&index=0&id=4045da65&prod&scoped=true&lang=css&
|
|
57010
57025
|
|
|
57011
57026
|
;// CONCATENATED MODULE: ./src/components/modeler/Selection.vue
|
|
57012
57027
|
|
|
@@ -57019,11 +57034,11 @@ var Selectionvue_type_style_index_0_id_68f84c00_prod_scoped_true_lang_css_ = __w
|
|
|
57019
57034
|
|
|
57020
57035
|
var Selection_component = normalizeComponent(
|
|
57021
57036
|
modeler_Selectionvue_type_script_lang_js_,
|
|
57022
|
-
|
|
57023
|
-
|
|
57037
|
+
Selectionvue_type_template_id_4045da65_scoped_true_render,
|
|
57038
|
+
Selectionvue_type_template_id_4045da65_scoped_true_staticRenderFns,
|
|
57024
57039
|
false,
|
|
57025
57040
|
null,
|
|
57026
|
-
"
|
|
57041
|
+
"4045da65",
|
|
57027
57042
|
null
|
|
57028
57043
|
|
|
57029
57044
|
)
|
|
@@ -75595,6 +75610,7 @@ var Room = /*#__PURE__*/function () {
|
|
|
75595
75610
|
|
|
75596
75611
|
|
|
75597
75612
|
|
|
75613
|
+
|
|
75598
75614
|
|
|
75599
75615
|
|
|
75600
75616
|
var _nodeIdGenerator = /*#__PURE__*/new WeakMap();
|
|
@@ -75663,6 +75679,30 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
75663
75679
|
_this.modeler.removePlayer(payload.clientId);
|
|
75664
75680
|
_this.modeler.enableMultiplayer(payload.isMultiplayer);
|
|
75665
75681
|
});
|
|
75682
|
+
this.clientIO.on('requestProcess', function (payload) {
|
|
75683
|
+
var firstClient = payload.firstClient,
|
|
75684
|
+
clientId = payload.clientId;
|
|
75685
|
+
|
|
75686
|
+
// Check if the current client is the first client
|
|
75687
|
+
if (firstClient.id === _this.clientIO.id) {
|
|
75688
|
+
// Get the process definition
|
|
75689
|
+
var nodes = _this.modeler.nodes.map(function (node) {
|
|
75690
|
+
return _this.modeler.multiplayerHook(node, false, true);
|
|
75691
|
+
});
|
|
75692
|
+
nodes.forEach(function (node) {
|
|
75693
|
+
var yMapNested = new YMap();
|
|
75694
|
+
_this.doTransact(yMapNested, node);
|
|
75695
|
+
_this.yArray.push([yMapNested]);
|
|
75696
|
+
// Encode the state as an update and send it to the server
|
|
75697
|
+
var stateUpdate = encodeStateAsUpdate(_this.yDoc);
|
|
75698
|
+
// Send the update to the web socket server
|
|
75699
|
+
_this.clientIO.emit('createElement', {
|
|
75700
|
+
updateDoc: stateUpdate,
|
|
75701
|
+
clientId: clientId
|
|
75702
|
+
});
|
|
75703
|
+
});
|
|
75704
|
+
}
|
|
75705
|
+
});
|
|
75666
75706
|
|
|
75667
75707
|
// Listen for updates when a new element is added
|
|
75668
75708
|
this.clientIO.on('createElement', /*#__PURE__*/function () {
|
|
@@ -75686,6 +75726,32 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
75686
75726
|
};
|
|
75687
75727
|
}());
|
|
75688
75728
|
|
|
75729
|
+
// Listen for updates when a new element is requested
|
|
75730
|
+
this.clientIO.on('createRequestedElement', /*#__PURE__*/function () {
|
|
75731
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(payload) {
|
|
75732
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
75733
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
75734
|
+
case 0:
|
|
75735
|
+
if (!(payload.clientId === _this.clientIO.id)) {
|
|
75736
|
+
_context2.next = 4;
|
|
75737
|
+
break;
|
|
75738
|
+
}
|
|
75739
|
+
_context2.next = 3;
|
|
75740
|
+
return _this.createRemoteShape(payload.changes);
|
|
75741
|
+
case 3:
|
|
75742
|
+
// Add the new element to the shared array
|
|
75743
|
+
applyUpdate(_this.yDoc, new Uint8Array(payload.updateDoc));
|
|
75744
|
+
case 4:
|
|
75745
|
+
case "end":
|
|
75746
|
+
return _context2.stop();
|
|
75747
|
+
}
|
|
75748
|
+
}, _callee2);
|
|
75749
|
+
}));
|
|
75750
|
+
return function (_x2) {
|
|
75751
|
+
return _ref2.apply(this, arguments);
|
|
75752
|
+
};
|
|
75753
|
+
}());
|
|
75754
|
+
|
|
75689
75755
|
// Listen for updates when an element is removed
|
|
75690
75756
|
this.clientIO.on('removeElement', function (payload) {
|
|
75691
75757
|
payload.deletedNodes.forEach(function (nodeId) {
|
|
@@ -75725,9 +75791,9 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
75725
75791
|
window.ProcessMaker.EventBus.$on('multiplayer-updateNodes', function (data) {
|
|
75726
75792
|
_this.updateNodes(data);
|
|
75727
75793
|
});
|
|
75728
|
-
window.ProcessMaker.EventBus.$on('multiplayer-replaceNode', function (
|
|
75729
|
-
var nodeData =
|
|
75730
|
-
newControl =
|
|
75794
|
+
window.ProcessMaker.EventBus.$on('multiplayer-replaceNode', function (_ref3) {
|
|
75795
|
+
var nodeData = _ref3.nodeData,
|
|
75796
|
+
newControl = _ref3.newControl;
|
|
75731
75797
|
_this.replaceNode(nodeData, newControl);
|
|
75732
75798
|
});
|
|
75733
75799
|
window.ProcessMaker.EventBus.$on('multiplayer-addFlow', function (data) {
|
|
@@ -75747,7 +75813,9 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
75747
75813
|
// Encode the state as an update and send it to the server
|
|
75748
75814
|
var stateUpdate = encodeStateAsUpdate(this.yDoc);
|
|
75749
75815
|
// Send the update to the web socket server
|
|
75750
|
-
this.clientIO.emit('createElement',
|
|
75816
|
+
this.clientIO.emit('createElement', {
|
|
75817
|
+
updateDoc: stateUpdate
|
|
75818
|
+
});
|
|
75751
75819
|
}
|
|
75752
75820
|
}, {
|
|
75753
75821
|
key: "createShape",
|
|
@@ -75880,6 +75948,7 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
75880
75948
|
type: updatedNode.type
|
|
75881
75949
|
},
|
|
75882
75950
|
nodeThatWillBeReplaced: node,
|
|
75951
|
+
color: node.color,
|
|
75883
75952
|
id: updatedNode.id
|
|
75884
75953
|
};
|
|
75885
75954
|
|
|
@@ -75909,17 +75978,17 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
75909
75978
|
}, {
|
|
75910
75979
|
key: "updateShapes",
|
|
75911
75980
|
value: function () {
|
|
75912
|
-
var _updateShapes = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
75981
|
+
var _updateShapes = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(data) {
|
|
75913
75982
|
var _this4 = this;
|
|
75914
|
-
var paper, element, newPool, sourceElem, targetElem, waypoint, startWaypoint, endWaypoint, newWaypoint;
|
|
75915
|
-
return _regeneratorRuntime().wrap(function
|
|
75916
|
-
while (1) switch (
|
|
75983
|
+
var paper, element, newPool, sourceElem, targetElem, waypoint, startWaypoint, endWaypoint, newWaypoint, node;
|
|
75984
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
75985
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
75917
75986
|
case 0:
|
|
75918
75987
|
paper = this.modeler.paper;
|
|
75919
75988
|
element = this.modeler.getElementByNodeId(data.id);
|
|
75920
75989
|
newPool = this.modeler.getElementByNodeId(data.poolId);
|
|
75921
75990
|
if (!this.modeler.flowTypes.includes(data.type)) {
|
|
75922
|
-
|
|
75991
|
+
_context3.next = 15;
|
|
75923
75992
|
break;
|
|
75924
75993
|
}
|
|
75925
75994
|
// Update the element's waypoints
|
|
@@ -75953,7 +76022,7 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
75953
76022
|
name: 'boundary'
|
|
75954
76023
|
}
|
|
75955
76024
|
});
|
|
75956
|
-
|
|
76025
|
+
_context3.next = 26;
|
|
75957
76026
|
break;
|
|
75958
76027
|
case 15:
|
|
75959
76028
|
// Update the element's position attribute
|
|
@@ -75963,26 +76032,33 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
75963
76032
|
x: data.x,
|
|
75964
76033
|
y: data.y
|
|
75965
76034
|
});
|
|
76035
|
+
node = this.getNodeById(data.id);
|
|
76036
|
+
store.commit('updateNodeProp', {
|
|
76037
|
+
node: node,
|
|
76038
|
+
key: 'color',
|
|
76039
|
+
value: data.color
|
|
76040
|
+
});
|
|
76041
|
+
|
|
75966
76042
|
// Trigger a rendering of the element on the paper
|
|
75967
|
-
|
|
76043
|
+
_context3.next = 21;
|
|
75968
76044
|
return paper.findViewByModel(element).update();
|
|
75969
|
-
case 19:
|
|
75970
|
-
_context2.next = 21;
|
|
75971
|
-
return element.component.$nextTick();
|
|
75972
76045
|
case 21:
|
|
75973
|
-
|
|
75974
|
-
return
|
|
76046
|
+
_context3.next = 23;
|
|
76047
|
+
return element.component.$nextTick();
|
|
75975
76048
|
case 23:
|
|
76049
|
+
_context3.next = 25;
|
|
76050
|
+
return this.modeler.paperManager.awaitScheduledUpdates();
|
|
76051
|
+
case 25:
|
|
75976
76052
|
if (newPool && element.component.node.pool && element.component.node.pool.component.id !== data.poolId) {
|
|
75977
76053
|
element.component.node.pool.component.moveElementRemote(element, newPool);
|
|
75978
76054
|
}
|
|
75979
|
-
case
|
|
76055
|
+
case 26:
|
|
75980
76056
|
case "end":
|
|
75981
|
-
return
|
|
76057
|
+
return _context3.stop();
|
|
75982
76058
|
}
|
|
75983
|
-
},
|
|
76059
|
+
}, _callee3, this);
|
|
75984
76060
|
}));
|
|
75985
|
-
function updateShapes(
|
|
76061
|
+
function updateShapes(_x3) {
|
|
75986
76062
|
return _updateShapes.apply(this, arguments);
|
|
75987
76063
|
}
|
|
75988
76064
|
return updateShapes;
|
|
@@ -75996,7 +76072,9 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
75996
76072
|
// Encode the state as an update and send it to the server
|
|
75997
76073
|
var stateUpdate = encodeStateAsUpdate(this.yDoc);
|
|
75998
76074
|
// Send the update to the web socket server
|
|
75999
|
-
this.clientIO.emit('createElement',
|
|
76075
|
+
this.clientIO.emit('createElement', {
|
|
76076
|
+
updateDoc: stateUpdate
|
|
76077
|
+
});
|
|
76000
76078
|
_classPrivateFieldGet(this, _nodeIdGenerator).updateCounters();
|
|
76001
76079
|
}
|
|
76002
76080
|
}, {
|
|
@@ -76021,7 +76099,9 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
76021
76099
|
_this5.doTransact(yMapNested, data);
|
|
76022
76100
|
_this5.yArray.push([yMapNested]);
|
|
76023
76101
|
var stateUpdate = encodeStateAsUpdate(_this5.yDoc);
|
|
76024
|
-
_this5.clientIO.emit('createElement',
|
|
76102
|
+
_this5.clientIO.emit('createElement', {
|
|
76103
|
+
updateDoc: stateUpdate
|
|
76104
|
+
});
|
|
76025
76105
|
});
|
|
76026
76106
|
});
|
|
76027
76107
|
}
|
|
@@ -77042,7 +77122,11 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
77042
77122
|
while (1) switch (_context8.prev = _context8.next) {
|
|
77043
77123
|
case 0:
|
|
77044
77124
|
node = _this21.createNode(type, definition, diagram);
|
|
77045
|
-
|
|
77125
|
+
if (!_this21.isMultiplayer) {
|
|
77126
|
+
store.commit('addNode', node);
|
|
77127
|
+
} else {
|
|
77128
|
+
_this21.loadNodeForMultiplayer(node);
|
|
77129
|
+
}
|
|
77046
77130
|
case 2:
|
|
77047
77131
|
case "end":
|
|
77048
77132
|
return _context8.stop();
|
|
@@ -77050,6 +77134,39 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
77050
77134
|
}, _callee8);
|
|
77051
77135
|
}))();
|
|
77052
77136
|
},
|
|
77137
|
+
loadNodeForMultiplayer: function loadNodeForMultiplayer(node) {
|
|
77138
|
+
var _this22 = this;
|
|
77139
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9() {
|
|
77140
|
+
return _regeneratorRuntime().wrap(function _callee9$(_context9) {
|
|
77141
|
+
while (1) switch (_context9.prev = _context9.next) {
|
|
77142
|
+
case 0:
|
|
77143
|
+
if (!(node.type === 'processmaker-modeler-lane')) {
|
|
77144
|
+
_context9.next = 10;
|
|
77145
|
+
break;
|
|
77146
|
+
}
|
|
77147
|
+
_context9.next = 3;
|
|
77148
|
+
return _this22.addNode(node, node.definition.id, true);
|
|
77149
|
+
case 3:
|
|
77150
|
+
_this22.nodeIdGenerator.updateCounters();
|
|
77151
|
+
_context9.next = 6;
|
|
77152
|
+
return _this22.$nextTick();
|
|
77153
|
+
case 6:
|
|
77154
|
+
_context9.next = 8;
|
|
77155
|
+
return _this22.paperManager.awaitScheduledUpdates();
|
|
77156
|
+
case 8:
|
|
77157
|
+
window.ProcessMaker.EventBus.$emit('multiplayer-addLanes', [node]);
|
|
77158
|
+
return _context9.abrupt("return");
|
|
77159
|
+
case 10:
|
|
77160
|
+
_this22.multiplayerHook(node, false);
|
|
77161
|
+
store.commit('addNode', node);
|
|
77162
|
+
_this22.poolTarget = null;
|
|
77163
|
+
case 13:
|
|
77164
|
+
case "end":
|
|
77165
|
+
return _context9.stop();
|
|
77166
|
+
}
|
|
77167
|
+
}, _callee9);
|
|
77168
|
+
}))();
|
|
77169
|
+
},
|
|
77053
77170
|
createNode: function createNode(type, definition, diagram) {
|
|
77054
77171
|
if (Node.isTimerType(type)) {
|
|
77055
77172
|
return new TimerEventNode(type, definition, diagram);
|
|
@@ -77068,95 +77185,95 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
77068
77185
|
return hasSource && hasTarget;
|
|
77069
77186
|
},
|
|
77070
77187
|
waitForCursorToChange: function waitForCursorToChange() {
|
|
77071
|
-
var
|
|
77072
|
-
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
77188
|
+
var _this23 = this;
|
|
77189
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10() {
|
|
77073
77190
|
var cursorWaitTime;
|
|
77074
|
-
return _regeneratorRuntime().wrap(function
|
|
77075
|
-
while (1) switch (
|
|
77191
|
+
return _regeneratorRuntime().wrap(function _callee10$(_context10) {
|
|
77192
|
+
while (1) switch (_context10.prev = _context10.next) {
|
|
77076
77193
|
case 0:
|
|
77077
77194
|
cursorWaitTime = 300;
|
|
77078
|
-
|
|
77079
|
-
return
|
|
77195
|
+
_context10.next = 3;
|
|
77196
|
+
return _this23.$nextTick();
|
|
77080
77197
|
case 3:
|
|
77081
|
-
return
|
|
77198
|
+
return _context10.abrupt("return", new Promise(function (resolve) {
|
|
77082
77199
|
return setTimeout(resolve, cursorWaitTime);
|
|
77083
77200
|
}));
|
|
77084
77201
|
case 4:
|
|
77085
77202
|
case "end":
|
|
77086
|
-
return
|
|
77203
|
+
return _context10.stop();
|
|
77087
77204
|
}
|
|
77088
|
-
},
|
|
77205
|
+
}, _callee10);
|
|
77089
77206
|
}))();
|
|
77090
77207
|
},
|
|
77091
77208
|
renderPaper: function renderPaper() {
|
|
77092
|
-
var
|
|
77093
|
-
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
77094
|
-
return _regeneratorRuntime().wrap(function
|
|
77095
|
-
while (1) switch (
|
|
77209
|
+
var _this24 = this;
|
|
77210
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12() {
|
|
77211
|
+
return _regeneratorRuntime().wrap(function _callee12$(_context12) {
|
|
77212
|
+
while (1) switch (_context12.prev = _context12.next) {
|
|
77096
77213
|
case 0:
|
|
77097
|
-
|
|
77098
|
-
|
|
77099
|
-
return
|
|
77100
|
-
return _regeneratorRuntime().wrap(function
|
|
77101
|
-
while (1) switch (
|
|
77214
|
+
_this24.isRendering = true;
|
|
77215
|
+
_context12.next = 3;
|
|
77216
|
+
return _this24.paperManager.performAtomicAction( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11() {
|
|
77217
|
+
return _regeneratorRuntime().wrap(function _callee11$(_context11) {
|
|
77218
|
+
while (1) switch (_context11.prev = _context11.next) {
|
|
77102
77219
|
case 0:
|
|
77103
|
-
|
|
77104
|
-
return
|
|
77220
|
+
_context11.next = 2;
|
|
77221
|
+
return _this24.waitForCursorToChange();
|
|
77105
77222
|
case 2:
|
|
77106
|
-
|
|
77107
|
-
|
|
77108
|
-
|
|
77223
|
+
_this24.parse();
|
|
77224
|
+
_this24.addPools();
|
|
77225
|
+
_this24.setUpDiagram();
|
|
77109
77226
|
case 5:
|
|
77110
77227
|
case "end":
|
|
77111
|
-
return
|
|
77228
|
+
return _context11.stop();
|
|
77112
77229
|
}
|
|
77113
|
-
},
|
|
77230
|
+
}, _callee11);
|
|
77114
77231
|
})));
|
|
77115
77232
|
case 3:
|
|
77116
|
-
|
|
77117
|
-
return
|
|
77233
|
+
_context12.next = 5;
|
|
77234
|
+
return _this24.paperManager.awaitScheduledUpdates();
|
|
77118
77235
|
case 5:
|
|
77119
|
-
|
|
77120
|
-
|
|
77236
|
+
_this24.isRendering = false;
|
|
77237
|
+
_this24.$emit('parsed');
|
|
77121
77238
|
case 7:
|
|
77122
77239
|
case "end":
|
|
77123
|
-
return
|
|
77240
|
+
return _context12.stop();
|
|
77124
77241
|
}
|
|
77125
|
-
},
|
|
77242
|
+
}, _callee12);
|
|
77126
77243
|
}))();
|
|
77127
77244
|
},
|
|
77128
77245
|
loadXML: function loadXML() {
|
|
77129
77246
|
var _arguments3 = arguments,
|
|
77130
|
-
|
|
77131
|
-
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
77247
|
+
_this25 = this;
|
|
77248
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee13() {
|
|
77132
77249
|
var xml, emitChangeEvent;
|
|
77133
|
-
return _regeneratorRuntime().wrap(function
|
|
77134
|
-
while (1) switch (
|
|
77250
|
+
return _regeneratorRuntime().wrap(function _callee13$(_context13) {
|
|
77251
|
+
while (1) switch (_context13.prev = _context13.next) {
|
|
77135
77252
|
case 0:
|
|
77136
77253
|
xml = _arguments3.length > 0 && _arguments3[0] !== undefined ? _arguments3[0] : null;
|
|
77137
77254
|
emitChangeEvent = false;
|
|
77138
77255
|
if (xml === null) {
|
|
77139
|
-
xml =
|
|
77256
|
+
xml = _this25.currentXML;
|
|
77140
77257
|
emitChangeEvent = true;
|
|
77141
77258
|
}
|
|
77142
|
-
|
|
77143
|
-
return
|
|
77259
|
+
_context13.next = 5;
|
|
77260
|
+
return _this25.xmlManager.getDefinitionsFromXml(xml);
|
|
77144
77261
|
case 5:
|
|
77145
|
-
|
|
77146
|
-
|
|
77147
|
-
|
|
77262
|
+
_this25.definitions = _context13.sent;
|
|
77263
|
+
_this25.xmlManager.definitions = _this25.definitions;
|
|
77264
|
+
_this25.nodeIdGenerator = getNodeIdGenerator(_this25.definitions);
|
|
77148
77265
|
store.commit('clearNodes');
|
|
77149
|
-
|
|
77150
|
-
return
|
|
77266
|
+
_context13.next = 11;
|
|
77267
|
+
return _this25.renderPaper();
|
|
77151
77268
|
case 11:
|
|
77152
77269
|
if (emitChangeEvent) {
|
|
77153
77270
|
window.ProcessMaker.EventBus.$emit('modeler-change');
|
|
77154
77271
|
}
|
|
77155
77272
|
case 12:
|
|
77156
77273
|
case "end":
|
|
77157
|
-
return
|
|
77274
|
+
return _context13.stop();
|
|
77158
77275
|
}
|
|
77159
|
-
},
|
|
77276
|
+
}, _callee13);
|
|
77160
77277
|
}))();
|
|
77161
77278
|
},
|
|
77162
77279
|
getBoundaryEvents: function getBoundaryEvents(process) {
|
|
@@ -77180,13 +77297,13 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
77180
77297
|
return boundaryEvent;
|
|
77181
77298
|
},
|
|
77182
77299
|
ensureCancelActivityIsAddedToBoundaryEvents: function ensureCancelActivityIsAddedToBoundaryEvents(process) {
|
|
77183
|
-
var
|
|
77300
|
+
var _this26 = this;
|
|
77184
77301
|
this.getBoundaryEvents(process).forEach(function (definition) {
|
|
77185
|
-
var boundaryEvent =
|
|
77302
|
+
var boundaryEvent = _this26.createBoundaryEvent(definition);
|
|
77186
77303
|
definition.get('outgoing').forEach(function (outgoing) {
|
|
77187
77304
|
return outgoing.set('sourceRef', boundaryEvent);
|
|
77188
77305
|
});
|
|
77189
|
-
|
|
77306
|
+
_this26.replaceDefinition(definition, boundaryEvent, process);
|
|
77190
77307
|
});
|
|
77191
77308
|
},
|
|
77192
77309
|
replaceDefinition: function replaceDefinition(definition, boundaryEvent, process) {
|
|
@@ -77212,82 +77329,82 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
77212
77329
|
});
|
|
77213
77330
|
},
|
|
77214
77331
|
addRemoteNode: function addRemoteNode(data) {
|
|
77215
|
-
var
|
|
77216
|
-
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
77332
|
+
var _this27 = this;
|
|
77333
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee14() {
|
|
77217
77334
|
var definition, diagram, newNode;
|
|
77218
|
-
return _regeneratorRuntime().wrap(function
|
|
77219
|
-
while (1) switch (
|
|
77335
|
+
return _regeneratorRuntime().wrap(function _callee14$(_context14) {
|
|
77336
|
+
while (1) switch (_context14.prev = _context14.next) {
|
|
77220
77337
|
case 0:
|
|
77221
|
-
definition =
|
|
77222
|
-
diagram =
|
|
77338
|
+
definition = _this27.nodeRegistry[data.type].definition(_this27.moddle, _this27.$t);
|
|
77339
|
+
diagram = _this27.nodeRegistry[data.type].diagram(_this27.moddle);
|
|
77223
77340
|
diagram.bounds.x = data.x;
|
|
77224
77341
|
diagram.bounds.y = data.y;
|
|
77225
|
-
newNode =
|
|
77226
|
-
|
|
77227
|
-
return
|
|
77342
|
+
newNode = _this27.createNode(data.type, definition, diagram);
|
|
77343
|
+
_context14.next = 7;
|
|
77344
|
+
return _this27.addNode(newNode, data.id, true);
|
|
77228
77345
|
case 7:
|
|
77229
|
-
|
|
77230
|
-
return
|
|
77346
|
+
_context14.next = 9;
|
|
77347
|
+
return _this27.$nextTick();
|
|
77231
77348
|
case 9:
|
|
77232
|
-
|
|
77233
|
-
return
|
|
77349
|
+
_context14.next = 11;
|
|
77350
|
+
return _this27.paperManager.awaitScheduledUpdates();
|
|
77234
77351
|
case 11:
|
|
77235
|
-
if (
|
|
77236
|
-
|
|
77352
|
+
if (_this27.autoValidate) {
|
|
77353
|
+
_this27.validateBpmnDiagram();
|
|
77237
77354
|
}
|
|
77238
77355
|
case 12:
|
|
77239
77356
|
case "end":
|
|
77240
|
-
return
|
|
77357
|
+
return _context14.stop();
|
|
77241
77358
|
}
|
|
77242
|
-
},
|
|
77359
|
+
}, _callee14);
|
|
77243
77360
|
}))();
|
|
77244
77361
|
},
|
|
77245
77362
|
handleDrop: function handleDrop(data) {
|
|
77246
|
-
var
|
|
77247
|
-
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
77248
|
-
var clientX, clientY, control, nodeThatWillBeReplaced, definition, diagram,
|
|
77249
|
-
return _regeneratorRuntime().wrap(function
|
|
77250
|
-
while (1) switch (
|
|
77363
|
+
var _this28 = this;
|
|
77364
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee15() {
|
|
77365
|
+
var clientX, clientY, control, nodeThatWillBeReplaced, definition, diagram, _this28$paperManager$, x, y, newNode, nodeMigrator;
|
|
77366
|
+
return _regeneratorRuntime().wrap(function _callee15$(_context15) {
|
|
77367
|
+
while (1) switch (_context15.prev = _context15.next) {
|
|
77251
77368
|
case 0:
|
|
77252
77369
|
clientX = data.clientX, clientY = data.clientY, control = data.control, nodeThatWillBeReplaced = data.nodeThatWillBeReplaced;
|
|
77253
|
-
|
|
77370
|
+
_this28.validateDropTarget({
|
|
77254
77371
|
clientX: clientX,
|
|
77255
77372
|
clientY: clientY,
|
|
77256
77373
|
control: control
|
|
77257
77374
|
});
|
|
77258
|
-
if (
|
|
77259
|
-
|
|
77375
|
+
if (_this28.allowDrop) {
|
|
77376
|
+
_context15.next = 4;
|
|
77260
77377
|
break;
|
|
77261
77378
|
}
|
|
77262
|
-
return
|
|
77379
|
+
return _context15.abrupt("return");
|
|
77263
77380
|
case 4:
|
|
77264
|
-
definition =
|
|
77265
|
-
diagram =
|
|
77266
|
-
|
|
77381
|
+
definition = _this28.nodeRegistry[control.type].definition(_this28.moddle, _this28.$t);
|
|
77382
|
+
diagram = _this28.nodeRegistry[control.type].diagram(_this28.moddle);
|
|
77383
|
+
_this28$paperManager$ = _this28.paperManager.clientToGridPoint(clientX, clientY), x = _this28$paperManager$.x, y = _this28$paperManager$.y;
|
|
77267
77384
|
diagram.bounds.x = x;
|
|
77268
77385
|
diagram.bounds.y = y;
|
|
77269
|
-
newNode =
|
|
77386
|
+
newNode = _this28.createNode(control.type, definition, diagram);
|
|
77270
77387
|
if (newNode.isBpmnType('bpmn:BoundaryEvent')) {
|
|
77271
|
-
|
|
77388
|
+
_this28.setShapeCenterUnderCursor(diagram);
|
|
77272
77389
|
}
|
|
77273
|
-
|
|
77274
|
-
|
|
77275
|
-
return
|
|
77390
|
+
_this28.highlightNode(newNode);
|
|
77391
|
+
_context15.next = 14;
|
|
77392
|
+
return _this28.addNode(newNode);
|
|
77276
77393
|
case 14:
|
|
77277
77394
|
if (nodeThatWillBeReplaced) {
|
|
77278
|
-
|
|
77395
|
+
_context15.next = 16;
|
|
77279
77396
|
break;
|
|
77280
77397
|
}
|
|
77281
|
-
return
|
|
77398
|
+
return _context15.abrupt("return");
|
|
77282
77399
|
case 16:
|
|
77283
|
-
nodeMigrator = new NodeMigrator(nodeThatWillBeReplaced, definition,
|
|
77400
|
+
nodeMigrator = new NodeMigrator(nodeThatWillBeReplaced, definition, _this28.graph, newNode, _this28.processes, _this28.collaboration);
|
|
77284
77401
|
nodeMigrator.migrate();
|
|
77285
|
-
return
|
|
77402
|
+
return _context15.abrupt("return", newNode);
|
|
77286
77403
|
case 19:
|
|
77287
77404
|
case "end":
|
|
77288
|
-
return
|
|
77405
|
+
return _context15.stop();
|
|
77289
77406
|
}
|
|
77290
|
-
},
|
|
77407
|
+
}, _callee15);
|
|
77291
77408
|
}))();
|
|
77292
77409
|
},
|
|
77293
77410
|
setShapeCenterUnderCursor: function setShapeCenterUnderCursor(diagram) {
|
|
@@ -77295,32 +77412,33 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
77295
77412
|
diagram.bounds.y -= diagram.bounds.height / 2;
|
|
77296
77413
|
},
|
|
77297
77414
|
selectNewNode: function selectNewNode(node) {
|
|
77298
|
-
var
|
|
77299
|
-
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
77415
|
+
var _this29 = this;
|
|
77416
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee16() {
|
|
77300
77417
|
var newNodeComponent, view;
|
|
77301
|
-
return _regeneratorRuntime().wrap(function
|
|
77302
|
-
while (1) switch (
|
|
77418
|
+
return _regeneratorRuntime().wrap(function _callee16$(_context16) {
|
|
77419
|
+
while (1) switch (_context16.prev = _context16.next) {
|
|
77303
77420
|
case 0:
|
|
77304
|
-
|
|
77305
|
-
return
|
|
77421
|
+
_context16.next = 2;
|
|
77422
|
+
return _this29.$nextTick();
|
|
77306
77423
|
case 2:
|
|
77307
|
-
|
|
77308
|
-
return
|
|
77424
|
+
_context16.next = 4;
|
|
77425
|
+
return _this29.paperManager.awaitScheduledUpdates();
|
|
77309
77426
|
case 4:
|
|
77310
|
-
newNodeComponent =
|
|
77427
|
+
newNodeComponent = _this29.$refs.nodeComponent.find(function (component) {
|
|
77311
77428
|
return component.node === node;
|
|
77312
77429
|
});
|
|
77313
77430
|
view = newNodeComponent.shapeView;
|
|
77314
|
-
|
|
77315
|
-
return
|
|
77431
|
+
_context16.next = 8;
|
|
77432
|
+
return _this29.$refs.selector.selectElement(view);
|
|
77316
77433
|
case 8:
|
|
77317
77434
|
case "end":
|
|
77318
|
-
return
|
|
77435
|
+
return _context16.stop();
|
|
77319
77436
|
}
|
|
77320
|
-
},
|
|
77437
|
+
}, _callee16);
|
|
77321
77438
|
}))();
|
|
77322
77439
|
},
|
|
77323
77440
|
multiplayerHook: function multiplayerHook(node, fromClient) {
|
|
77441
|
+
var isProcessRequested = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
77324
77442
|
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'];
|
|
77325
77443
|
if (!this.isMultiplayer) {
|
|
77326
77444
|
return;
|
|
@@ -77335,11 +77453,15 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
77335
77453
|
width: node.diagram.bounds.width,
|
|
77336
77454
|
type: node.type,
|
|
77337
77455
|
id: node.definition.id,
|
|
77338
|
-
isAddingLaneAbove: true
|
|
77456
|
+
isAddingLaneAbove: true,
|
|
77457
|
+
color: node.color
|
|
77339
77458
|
};
|
|
77340
77459
|
if (node !== null && node !== void 0 && (_node$pool = node.pool) !== null && _node$pool !== void 0 && _node$pool.component) {
|
|
77341
77460
|
defaultData['poolId'] = node.pool.component.id;
|
|
77342
77461
|
}
|
|
77462
|
+
if (isProcessRequested) {
|
|
77463
|
+
return defaultData;
|
|
77464
|
+
}
|
|
77343
77465
|
window.ProcessMaker.EventBus.$emit('multiplayer-addNode', defaultData);
|
|
77344
77466
|
}
|
|
77345
77467
|
if (this.flowTypes.includes(node.type)) {
|
|
@@ -77347,218 +77469,222 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
77347
77469
|
var sourceRefId = (_node$definition$sour = node.definition.sourceRef) === null || _node$definition$sour === void 0 ? void 0 : _node$definition$sour.id;
|
|
77348
77470
|
var targetRefId = (_node$definition$targ = node.definition.targetRef) === null || _node$definition$targ === void 0 ? void 0 : _node$definition$targ.id;
|
|
77349
77471
|
if (node.type === 'processmaker-modeler-data-input-association') {
|
|
77350
|
-
var _node$definition$sour2, _node$definition$targ2, _node$definition$targ3;
|
|
77472
|
+
var _node$definition$sour2, _node$definition$targ2, _node$definition$targ3, _node$definition$targ4;
|
|
77351
77473
|
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);
|
|
77352
|
-
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');
|
|
77474
|
+
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');
|
|
77353
77475
|
}
|
|
77354
77476
|
if (sourceRefId && targetRefId) {
|
|
77355
|
-
|
|
77477
|
+
var flowData = {
|
|
77356
77478
|
id: node.definition.id,
|
|
77357
77479
|
type: node.type,
|
|
77358
77480
|
sourceRefId: sourceRefId,
|
|
77359
77481
|
targetRefId: targetRefId,
|
|
77360
77482
|
waypoint: node.diagram.waypoint
|
|
77361
|
-
}
|
|
77483
|
+
};
|
|
77484
|
+
if (isProcessRequested) {
|
|
77485
|
+
return flowData;
|
|
77486
|
+
}
|
|
77487
|
+
window.ProcessMaker.EventBus.$emit('multiplayer-addFlow', flowData);
|
|
77362
77488
|
}
|
|
77363
77489
|
}
|
|
77364
77490
|
}
|
|
77365
77491
|
},
|
|
77366
77492
|
addNode: function addNode(node) {
|
|
77367
77493
|
var _arguments4 = arguments,
|
|
77368
|
-
|
|
77369
|
-
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
77494
|
+
_this30 = this;
|
|
77495
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee17() {
|
|
77370
77496
|
var id, fromClient, targetProcess;
|
|
77371
|
-
return _regeneratorRuntime().wrap(function
|
|
77372
|
-
while (1) switch (
|
|
77497
|
+
return _regeneratorRuntime().wrap(function _callee17$(_context17) {
|
|
77498
|
+
while (1) switch (_context17.prev = _context17.next) {
|
|
77373
77499
|
case 0:
|
|
77374
77500
|
id = _arguments4.length > 1 && _arguments4[1] !== undefined ? _arguments4[1] : null;
|
|
77375
77501
|
fromClient = _arguments4.length > 2 && _arguments4[2] !== undefined ? _arguments4[2] : false;
|
|
77376
77502
|
if (!node.pool) {
|
|
77377
|
-
node.pool =
|
|
77503
|
+
node.pool = _this30.poolTarget;
|
|
77378
77504
|
}
|
|
77379
|
-
targetProcess = node.getTargetProcess(
|
|
77505
|
+
targetProcess = node.getTargetProcess(_this30.processes, _this30.processNode);
|
|
77380
77506
|
addNodeToProcess(node, targetProcess);
|
|
77381
|
-
node.setIds(
|
|
77382
|
-
|
|
77507
|
+
node.setIds(_this30.nodeIdGenerator, id);
|
|
77508
|
+
_this30.planeElements.push(node.diagram);
|
|
77383
77509
|
// add multiplayer logic as a hook
|
|
77384
|
-
|
|
77510
|
+
_this30.multiplayerHook(node, fromClient);
|
|
77385
77511
|
store.commit('addNode', node);
|
|
77386
|
-
|
|
77512
|
+
_this30.poolTarget = null;
|
|
77387
77513
|
|
|
77388
77514
|
// add processmaker-modeler-generic-flow
|
|
77389
77515
|
if (![sequenceFlow_id, poolLane_config_id, associationConfig_id, messageFlow_config_id, config_id, dataInputAssociation_config_id, genericFlow_config_id].includes(node.type)) {
|
|
77390
|
-
|
|
77516
|
+
_context17.next = 12;
|
|
77391
77517
|
break;
|
|
77392
77518
|
}
|
|
77393
|
-
return
|
|
77519
|
+
return _context17.abrupt("return");
|
|
77394
77520
|
case 12:
|
|
77395
77521
|
if (!fromClient) {
|
|
77396
77522
|
// Select the node after it has been added to the store (does not apply to flows)
|
|
77397
|
-
|
|
77523
|
+
_this30.selectNewNode(node);
|
|
77398
77524
|
}
|
|
77399
|
-
return
|
|
77525
|
+
return _context17.abrupt("return", new Promise(function (resolve) {
|
|
77400
77526
|
setTimeout(function () {
|
|
77401
|
-
|
|
77527
|
+
_this30.pushToUndoStack();
|
|
77402
77528
|
resolve();
|
|
77403
77529
|
});
|
|
77404
77530
|
}));
|
|
77405
77531
|
case 14:
|
|
77406
77532
|
case "end":
|
|
77407
|
-
return
|
|
77533
|
+
return _context17.stop();
|
|
77408
77534
|
}
|
|
77409
|
-
},
|
|
77535
|
+
}, _callee17);
|
|
77410
77536
|
}))();
|
|
77411
77537
|
},
|
|
77412
77538
|
addClonedNodes: function addClonedNodes(nodes) {
|
|
77413
|
-
var
|
|
77414
|
-
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
77415
|
-
return _regeneratorRuntime().wrap(function
|
|
77416
|
-
while (1) switch (
|
|
77539
|
+
var _this31 = this;
|
|
77540
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee18() {
|
|
77541
|
+
return _regeneratorRuntime().wrap(function _callee18$(_context18) {
|
|
77542
|
+
while (1) switch (_context18.prev = _context18.next) {
|
|
77417
77543
|
case 0:
|
|
77418
77544
|
nodes.forEach(function (node) {
|
|
77419
77545
|
if (!node.pool) {
|
|
77420
|
-
node.pool =
|
|
77546
|
+
node.pool = _this31.poolTarget;
|
|
77421
77547
|
}
|
|
77422
|
-
var targetProcess = node.getTargetProcess(
|
|
77548
|
+
var targetProcess = node.getTargetProcess(_this31.processes, _this31.processNode);
|
|
77423
77549
|
addNodeToProcess(node, targetProcess);
|
|
77424
|
-
|
|
77425
|
-
|
|
77550
|
+
_this31.planeElements.push(node.diagram);
|
|
77551
|
+
_this31.multiplayerHook(node, false);
|
|
77426
77552
|
store.commit('addNode', node);
|
|
77427
|
-
|
|
77553
|
+
_this31.poolTarget = null;
|
|
77428
77554
|
});
|
|
77429
77555
|
case 1:
|
|
77430
77556
|
case "end":
|
|
77431
|
-
return
|
|
77557
|
+
return _context18.stop();
|
|
77432
77558
|
}
|
|
77433
|
-
},
|
|
77559
|
+
}, _callee18);
|
|
77434
77560
|
}))();
|
|
77435
77561
|
},
|
|
77436
77562
|
removeNode: function removeNode(node, options) {
|
|
77437
|
-
var
|
|
77438
|
-
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
77439
|
-
return _regeneratorRuntime().wrap(function
|
|
77440
|
-
while (1) switch (
|
|
77563
|
+
var _this32 = this;
|
|
77564
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee19() {
|
|
77565
|
+
return _regeneratorRuntime().wrap(function _callee19$(_context19) {
|
|
77566
|
+
while (1) switch (_context19.prev = _context19.next) {
|
|
77441
77567
|
case 0:
|
|
77442
77568
|
// Check if the node is not replaced
|
|
77443
|
-
if (
|
|
77569
|
+
if (_this32.isMultiplayer && !(options !== null && options !== void 0 && options.isReplaced)) {
|
|
77444
77570
|
// Emit event to server to remove node
|
|
77445
77571
|
window.ProcessMaker.EventBus.$emit('multiplayer-removeNode', node);
|
|
77446
77572
|
}
|
|
77447
|
-
|
|
77573
|
+
_this32.removeNodeProcedure(node, options);
|
|
77448
77574
|
case 2:
|
|
77449
77575
|
case "end":
|
|
77450
|
-
return
|
|
77576
|
+
return _context19.stop();
|
|
77451
77577
|
}
|
|
77452
|
-
},
|
|
77578
|
+
}, _callee19);
|
|
77453
77579
|
}))();
|
|
77454
77580
|
},
|
|
77455
77581
|
removeNodeProcedure: function removeNodeProcedure(node) {
|
|
77456
77582
|
var _arguments5 = arguments,
|
|
77457
|
-
|
|
77458
|
-
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
77583
|
+
_this33 = this;
|
|
77584
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee20() {
|
|
77459
77585
|
var _ref6, _ref6$removeRelations, removeRelationships;
|
|
77460
|
-
return _regeneratorRuntime().wrap(function
|
|
77461
|
-
while (1) switch (
|
|
77586
|
+
return _regeneratorRuntime().wrap(function _callee20$(_context20) {
|
|
77587
|
+
while (1) switch (_context20.prev = _context20.next) {
|
|
77462
77588
|
case 0:
|
|
77463
77589
|
_ref6 = _arguments5.length > 1 && _arguments5[1] !== undefined ? _arguments5[1] : {}, _ref6$removeRelations = _ref6.removeRelationships, removeRelationships = _ref6$removeRelations === void 0 ? true : _ref6$removeRelations;
|
|
77464
77590
|
if (node) {
|
|
77465
|
-
|
|
77591
|
+
_context20.next = 3;
|
|
77466
77592
|
break;
|
|
77467
77593
|
}
|
|
77468
|
-
return
|
|
77594
|
+
return _context20.abrupt("return");
|
|
77469
77595
|
case 3:
|
|
77470
77596
|
if (removeRelationships) {
|
|
77471
|
-
removeNodeFlows(node,
|
|
77472
|
-
removeNodeMessageFlows(node,
|
|
77473
|
-
removeNodeAssociations(node,
|
|
77597
|
+
removeNodeFlows(node, _this33);
|
|
77598
|
+
removeNodeMessageFlows(node, _this33);
|
|
77599
|
+
removeNodeAssociations(node, _this33);
|
|
77474
77600
|
}
|
|
77475
77601
|
removeOutgoingAndIncomingRefsToFlow(node);
|
|
77476
|
-
removeBoundaryEvents(
|
|
77602
|
+
removeBoundaryEvents(_this33.graph, node, _this33.removeNode);
|
|
77477
77603
|
removeSourceDefault(node);
|
|
77478
|
-
|
|
77479
|
-
|
|
77604
|
+
_this33.removeNodesFromLane(node);
|
|
77605
|
+
_this33.removeNodesFromPool(node);
|
|
77480
77606
|
store.commit('removeNode', node);
|
|
77481
|
-
store.commit('highlightNode',
|
|
77482
|
-
|
|
77483
|
-
|
|
77484
|
-
return
|
|
77607
|
+
store.commit('highlightNode', _this33.processNode);
|
|
77608
|
+
_this33.$refs.selector.clearSelection();
|
|
77609
|
+
_context20.next = 14;
|
|
77610
|
+
return _this33.$nextTick();
|
|
77485
77611
|
case 14:
|
|
77486
|
-
|
|
77487
|
-
return
|
|
77612
|
+
_context20.next = 16;
|
|
77613
|
+
return _this33.pushToUndoStack();
|
|
77488
77614
|
case 16:
|
|
77489
77615
|
// force to update the processNode property in every delete
|
|
77490
|
-
|
|
77491
|
-
if (
|
|
77492
|
-
|
|
77493
|
-
return diagram.bpmnElement.id ===
|
|
77616
|
+
_this33.processes = _this33.getProcesses();
|
|
77617
|
+
if (_this33.processes && _this33.processes.length > 0) {
|
|
77618
|
+
_this33.processNode = new Node('processmaker-modeler-process', _this33.processes[0], _this33.planeElements.find(function (diagram) {
|
|
77619
|
+
return diagram.bpmnElement.id === _this33.processes[0].id;
|
|
77494
77620
|
}));
|
|
77495
77621
|
}
|
|
77496
77622
|
case 18:
|
|
77497
77623
|
case "end":
|
|
77498
|
-
return
|
|
77624
|
+
return _context20.stop();
|
|
77499
77625
|
}
|
|
77500
|
-
},
|
|
77626
|
+
}, _callee20);
|
|
77501
77627
|
}))();
|
|
77502
77628
|
},
|
|
77503
77629
|
removeNodes: function removeNodes() {
|
|
77504
|
-
var
|
|
77505
|
-
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
77506
|
-
return _regeneratorRuntime().wrap(function
|
|
77507
|
-
while (1) switch (
|
|
77630
|
+
var _this34 = this;
|
|
77631
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee23() {
|
|
77632
|
+
return _regeneratorRuntime().wrap(function _callee23$(_context23) {
|
|
77633
|
+
while (1) switch (_context23.prev = _context23.next) {
|
|
77508
77634
|
case 0:
|
|
77509
|
-
|
|
77510
|
-
return
|
|
77511
|
-
return _regeneratorRuntime().wrap(function
|
|
77512
|
-
while (1) switch (
|
|
77635
|
+
_context23.next = 2;
|
|
77636
|
+
return _this34.performSingleUndoRedoTransaction( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee22() {
|
|
77637
|
+
return _regeneratorRuntime().wrap(function _callee22$(_context22) {
|
|
77638
|
+
while (1) switch (_context22.prev = _context22.next) {
|
|
77513
77639
|
case 0:
|
|
77514
|
-
|
|
77515
|
-
return
|
|
77640
|
+
_context22.next = 2;
|
|
77641
|
+
return _this34.paperManager.performAtomicAction( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee21() {
|
|
77516
77642
|
var waitPromises;
|
|
77517
|
-
return _regeneratorRuntime().wrap(function
|
|
77518
|
-
while (1) switch (
|
|
77643
|
+
return _regeneratorRuntime().wrap(function _callee21$(_context21) {
|
|
77644
|
+
while (1) switch (_context21.prev = _context21.next) {
|
|
77519
77645
|
case 0:
|
|
77520
77646
|
waitPromises = [];
|
|
77521
|
-
|
|
77522
|
-
return waitPromises.push(
|
|
77647
|
+
_this34.highlightedNodes.forEach(function (node) {
|
|
77648
|
+
return waitPromises.push(_this34.removeNode(node, {
|
|
77523
77649
|
removeRelationships: true
|
|
77524
77650
|
}));
|
|
77525
77651
|
});
|
|
77526
|
-
|
|
77652
|
+
_context21.next = 4;
|
|
77527
77653
|
return Promise.all(waitPromises);
|
|
77528
77654
|
case 4:
|
|
77529
77655
|
store.commit('highlightNode');
|
|
77530
77656
|
case 5:
|
|
77531
77657
|
case "end":
|
|
77532
|
-
return
|
|
77658
|
+
return _context21.stop();
|
|
77533
77659
|
}
|
|
77534
|
-
},
|
|
77660
|
+
}, _callee21);
|
|
77535
77661
|
})));
|
|
77536
77662
|
case 2:
|
|
77537
77663
|
case "end":
|
|
77538
|
-
return
|
|
77664
|
+
return _context22.stop();
|
|
77539
77665
|
}
|
|
77540
|
-
},
|
|
77666
|
+
}, _callee22);
|
|
77541
77667
|
})));
|
|
77542
77668
|
case 2:
|
|
77543
77669
|
case "end":
|
|
77544
|
-
return
|
|
77670
|
+
return _context23.stop();
|
|
77545
77671
|
}
|
|
77546
|
-
},
|
|
77672
|
+
}, _callee23);
|
|
77547
77673
|
}))();
|
|
77548
77674
|
},
|
|
77549
77675
|
replaceNode: function replaceNode(_ref9) {
|
|
77550
|
-
var
|
|
77676
|
+
var _this35 = this;
|
|
77551
77677
|
var node = _ref9.node,
|
|
77552
77678
|
typeToReplaceWith = _ref9.typeToReplaceWith;
|
|
77553
|
-
this.performSingleUndoRedoTransaction( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
77554
|
-
return _regeneratorRuntime().wrap(function
|
|
77555
|
-
while (1) switch (
|
|
77679
|
+
this.performSingleUndoRedoTransaction( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee25() {
|
|
77680
|
+
return _regeneratorRuntime().wrap(function _callee25$(_context25) {
|
|
77681
|
+
while (1) switch (_context25.prev = _context25.next) {
|
|
77556
77682
|
case 0:
|
|
77557
|
-
|
|
77558
|
-
return
|
|
77559
|
-
var _node$diagram$bounds, x, y, nodeData
|
|
77560
|
-
return _regeneratorRuntime().wrap(function
|
|
77561
|
-
while (1) switch (
|
|
77683
|
+
_context25.next = 2;
|
|
77684
|
+
return _this35.paperManager.performAtomicAction( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee24() {
|
|
77685
|
+
var _node$diagram$bounds, x, y, nodeData;
|
|
77686
|
+
return _regeneratorRuntime().wrap(function _callee24$(_context24) {
|
|
77687
|
+
while (1) switch (_context24.prev = _context24.next) {
|
|
77562
77688
|
case 0:
|
|
77563
77689
|
_node$diagram$bounds = node.diagram.bounds, x = _node$diagram$bounds.x, y = _node$diagram$bounds.y;
|
|
77564
77690
|
nodeData = {
|
|
@@ -77569,96 +77695,89 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
77569
77695
|
},
|
|
77570
77696
|
nodeThatWillBeReplaced: node
|
|
77571
77697
|
};
|
|
77572
|
-
|
|
77573
|
-
|
|
77574
|
-
|
|
77575
|
-
}
|
|
77576
|
-
// Get all node types
|
|
77577
|
-
nodeTypes = nodeTypesStore.getters.getNodeTypes; // Get the new control
|
|
77578
|
-
newControl = nodeTypes.flatMap(function (nodeType) {
|
|
77579
|
-
var _nodeType$items;
|
|
77580
|
-
return (_nodeType$items = nodeType.items) === null || _nodeType$items === void 0 ? void 0 : _nodeType$items.filter(function (item) {
|
|
77581
|
-
return item.type === typeToReplaceWith;
|
|
77582
|
-
});
|
|
77583
|
-
}).filter(Boolean); // If the new control is found, emit event to server to replace node
|
|
77584
|
-
if (newControl.length === 1) {
|
|
77585
|
-
window.ProcessMaker.EventBus.$emit('multiplayer-replaceNode', {
|
|
77586
|
-
nodeData: nodeData,
|
|
77587
|
-
newControl: newControl[0].type
|
|
77588
|
-
});
|
|
77589
|
-
}
|
|
77590
|
-
_context23.next = 10;
|
|
77591
|
-
break;
|
|
77592
|
-
case 8:
|
|
77593
|
-
_context23.next = 10;
|
|
77594
|
-
return _this34.replaceNodeProcedure(nodeData, true);
|
|
77595
|
-
case 10:
|
|
77698
|
+
_context24.next = 4;
|
|
77699
|
+
return _this35.replaceNodeProcedure(nodeData);
|
|
77700
|
+
case 4:
|
|
77596
77701
|
case "end":
|
|
77597
|
-
return
|
|
77702
|
+
return _context24.stop();
|
|
77598
77703
|
}
|
|
77599
|
-
},
|
|
77704
|
+
}, _callee24);
|
|
77600
77705
|
})));
|
|
77601
77706
|
case 2:
|
|
77602
77707
|
case "end":
|
|
77603
|
-
return
|
|
77708
|
+
return _context25.stop();
|
|
77604
77709
|
}
|
|
77605
|
-
},
|
|
77710
|
+
}, _callee25);
|
|
77606
77711
|
})));
|
|
77607
77712
|
},
|
|
77608
77713
|
replaceNodeProcedure: function replaceNodeProcedure(data) {
|
|
77609
77714
|
var _arguments6 = arguments,
|
|
77610
|
-
|
|
77611
|
-
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
77612
|
-
var isReplaced,
|
|
77613
|
-
return _regeneratorRuntime().wrap(function
|
|
77614
|
-
while (1) switch (
|
|
77715
|
+
_this36 = this;
|
|
77716
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee26() {
|
|
77717
|
+
var isReplaced, _this36$paper$localTo, clientX, clientY, newNode, nodeTypes, newControl;
|
|
77718
|
+
return _regeneratorRuntime().wrap(function _callee26$(_context26) {
|
|
77719
|
+
while (1) switch (_context26.prev = _context26.next) {
|
|
77615
77720
|
case 0:
|
|
77616
77721
|
isReplaced = _arguments6.length > 1 && _arguments6[1] !== undefined ? _arguments6[1] : false;
|
|
77617
|
-
|
|
77618
|
-
|
|
77619
|
-
|
|
77620
|
-
|
|
77621
|
-
|
|
77622
|
-
|
|
77623
|
-
|
|
77624
|
-
|
|
77625
|
-
|
|
77626
|
-
|
|
77627
|
-
_context25.next = 7;
|
|
77628
|
-
return _this35.removeNode(data.nodeThatWillBeReplaced, {
|
|
77722
|
+
// Get the clientX and clientY from the node that will be replaced
|
|
77723
|
+
_this36$paper$localTo = _this36.paper.localToClientPoint(data.nodeThatWillBeReplaced.diagram.bounds), clientX = _this36$paper$localTo.x, clientY = _this36$paper$localTo.y;
|
|
77724
|
+
data.clientX = clientX;
|
|
77725
|
+
data.clientY = clientY;
|
|
77726
|
+
_context26.next = 6;
|
|
77727
|
+
return _this36.handleDrop(data);
|
|
77728
|
+
case 6:
|
|
77729
|
+
newNode = _context26.sent;
|
|
77730
|
+
_context26.next = 9;
|
|
77731
|
+
return _this36.removeNode(data.nodeThatWillBeReplaced, {
|
|
77629
77732
|
removeRelationships: false,
|
|
77630
77733
|
isReplaced: isReplaced
|
|
77631
77734
|
});
|
|
77632
|
-
case 7:
|
|
77633
|
-
_this35.highlightNode(newNode);
|
|
77634
|
-
_this35.selectNewNode(newNode);
|
|
77635
77735
|
case 9:
|
|
77736
|
+
_this36.highlightNode(newNode);
|
|
77737
|
+
_this36.selectNewNode(newNode);
|
|
77738
|
+
if (_this36.isMultiplayer && !isReplaced) {
|
|
77739
|
+
// Get all node types
|
|
77740
|
+
nodeTypes = nodeTypesStore.getters.getNodeTypes; // Get the new control
|
|
77741
|
+
newControl = nodeTypes.flatMap(function (nodeType) {
|
|
77742
|
+
var _nodeType$items;
|
|
77743
|
+
return (_nodeType$items = nodeType.items) === null || _nodeType$items === void 0 ? void 0 : _nodeType$items.filter(function (item) {
|
|
77744
|
+
return item.type === data.typeToReplaceWith;
|
|
77745
|
+
});
|
|
77746
|
+
}).filter(Boolean); // If the new control is found, emit event to server to replace node
|
|
77747
|
+
if (newControl.length === 1) {
|
|
77748
|
+
window.ProcessMaker.EventBus.$emit('multiplayer-replaceNode', {
|
|
77749
|
+
data: data,
|
|
77750
|
+
newControl: newControl[0].type
|
|
77751
|
+
});
|
|
77752
|
+
}
|
|
77753
|
+
}
|
|
77754
|
+
case 12:
|
|
77636
77755
|
case "end":
|
|
77637
|
-
return
|
|
77756
|
+
return _context26.stop();
|
|
77638
77757
|
}
|
|
77639
|
-
},
|
|
77758
|
+
}, _callee26);
|
|
77640
77759
|
}))();
|
|
77641
77760
|
},
|
|
77642
77761
|
replaceAiNode: function replaceAiNode(_ref12) {
|
|
77643
|
-
var
|
|
77762
|
+
var _this37 = this;
|
|
77644
77763
|
var node = _ref12.node,
|
|
77645
77764
|
typeToReplaceWith = _ref12.typeToReplaceWith,
|
|
77646
77765
|
assetId = _ref12.assetId,
|
|
77647
77766
|
assetName = _ref12.assetName,
|
|
77648
77767
|
redirectTo = _ref12.redirectTo;
|
|
77649
|
-
this.performSingleUndoRedoTransaction( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
77650
|
-
return _regeneratorRuntime().wrap(function
|
|
77651
|
-
while (1) switch (
|
|
77768
|
+
this.performSingleUndoRedoTransaction( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee28() {
|
|
77769
|
+
return _regeneratorRuntime().wrap(function _callee28$(_context28) {
|
|
77770
|
+
while (1) switch (_context28.prev = _context28.next) {
|
|
77652
77771
|
case 0:
|
|
77653
|
-
|
|
77654
|
-
return
|
|
77655
|
-
var
|
|
77656
|
-
return _regeneratorRuntime().wrap(function
|
|
77657
|
-
while (1) switch (
|
|
77772
|
+
_context28.next = 2;
|
|
77773
|
+
return _this37.paperManager.performAtomicAction( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee27() {
|
|
77774
|
+
var _this37$paper$localTo, clientX, clientY, newNode;
|
|
77775
|
+
return _regeneratorRuntime().wrap(function _callee27$(_context27) {
|
|
77776
|
+
while (1) switch (_context27.prev = _context27.next) {
|
|
77658
77777
|
case 0:
|
|
77659
|
-
|
|
77660
|
-
|
|
77661
|
-
return
|
|
77778
|
+
_this37$paper$localTo = _this37.paper.localToClientPoint(node.diagram.bounds), clientX = _this37$paper$localTo.x, clientY = _this37$paper$localTo.y;
|
|
77779
|
+
_context27.next = 3;
|
|
77780
|
+
return _this37.handleDrop({
|
|
77662
77781
|
clientX: clientX,
|
|
77663
77782
|
clientY: clientY,
|
|
77664
77783
|
control: {
|
|
@@ -77667,7 +77786,7 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
77667
77786
|
nodeThatWillBeReplaced: node
|
|
77668
77787
|
});
|
|
77669
77788
|
case 3:
|
|
77670
|
-
newNode =
|
|
77789
|
+
newNode = _context27.sent;
|
|
77671
77790
|
if (typeToReplaceWith === 'processmaker-modeler-task') {
|
|
77672
77791
|
newNode.definition.screenRef = assetId;
|
|
77673
77792
|
newNode.definition.name = assetName;
|
|
@@ -77682,98 +77801,98 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
77682
77801
|
newNode.definition.config = "{\"calledElement\":\"ProcessId-".concat(assetId, "\",\"processId\":").concat(assetId, ",\"startEvent\":\"node_1\",\"name\":\"").concat(assetName, "\"}");
|
|
77683
77802
|
redirectTo = "".concat(redirectTo, "/").concat(newNode.id);
|
|
77684
77803
|
}
|
|
77685
|
-
|
|
77686
|
-
return
|
|
77804
|
+
_context27.next = 9;
|
|
77805
|
+
return _this37.removeNode(node, {
|
|
77687
77806
|
removeRelationships: false
|
|
77688
77807
|
});
|
|
77689
77808
|
case 9:
|
|
77690
|
-
|
|
77691
|
-
|
|
77692
|
-
|
|
77693
|
-
return
|
|
77809
|
+
_this37.highlightNode(newNode);
|
|
77810
|
+
_this37.selectNewNode(newNode);
|
|
77811
|
+
_context27.next = 13;
|
|
77812
|
+
return _this37.pushToUndoStack();
|
|
77694
77813
|
case 13:
|
|
77695
|
-
|
|
77696
|
-
return
|
|
77814
|
+
_context27.next = 15;
|
|
77815
|
+
return _this37.$nextTick();
|
|
77697
77816
|
case 15:
|
|
77698
|
-
|
|
77817
|
+
_this37.saveBpmn(redirectTo, newNode.id);
|
|
77699
77818
|
case 16:
|
|
77700
77819
|
case "end":
|
|
77701
|
-
return
|
|
77820
|
+
return _context27.stop();
|
|
77702
77821
|
}
|
|
77703
|
-
},
|
|
77822
|
+
}, _callee27);
|
|
77704
77823
|
})));
|
|
77705
77824
|
case 2:
|
|
77706
77825
|
case "end":
|
|
77707
|
-
return
|
|
77826
|
+
return _context28.stop();
|
|
77708
77827
|
}
|
|
77709
|
-
},
|
|
77828
|
+
}, _callee28);
|
|
77710
77829
|
})));
|
|
77711
77830
|
},
|
|
77712
77831
|
replaceGenericFlow: function replaceGenericFlow(_ref15) {
|
|
77713
|
-
var
|
|
77832
|
+
var _this38 = this;
|
|
77714
77833
|
var actualFlow = _ref15.actualFlow,
|
|
77715
77834
|
genericFlow = _ref15.genericFlow,
|
|
77716
77835
|
targetNode = _ref15.targetNode;
|
|
77717
|
-
this.performSingleUndoRedoTransaction( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
77718
|
-
return _regeneratorRuntime().wrap(function
|
|
77719
|
-
while (1) switch (
|
|
77836
|
+
this.performSingleUndoRedoTransaction( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee30() {
|
|
77837
|
+
return _regeneratorRuntime().wrap(function _callee30$(_context30) {
|
|
77838
|
+
while (1) switch (_context30.prev = _context30.next) {
|
|
77720
77839
|
case 0:
|
|
77721
|
-
|
|
77722
|
-
return
|
|
77723
|
-
return _regeneratorRuntime().wrap(function
|
|
77724
|
-
while (1) switch (
|
|
77840
|
+
_context30.next = 2;
|
|
77841
|
+
return _this38.paperManager.performAtomicAction( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee29() {
|
|
77842
|
+
return _regeneratorRuntime().wrap(function _callee29$(_context29) {
|
|
77843
|
+
while (1) switch (_context29.prev = _context29.next) {
|
|
77725
77844
|
case 0:
|
|
77726
|
-
|
|
77727
|
-
return
|
|
77845
|
+
_context29.next = 2;
|
|
77846
|
+
return _this38.highlightNode(null);
|
|
77728
77847
|
case 2:
|
|
77729
|
-
|
|
77730
|
-
return
|
|
77848
|
+
_context29.next = 4;
|
|
77849
|
+
return _this38.$nextTick();
|
|
77731
77850
|
case 4:
|
|
77732
|
-
|
|
77851
|
+
_context29.next = 6;
|
|
77733
77852
|
return store.commit('removeNode', genericFlow);
|
|
77734
77853
|
case 6:
|
|
77735
|
-
|
|
77736
|
-
return
|
|
77854
|
+
_context29.next = 8;
|
|
77855
|
+
return _this38.$nextTick();
|
|
77737
77856
|
case 8:
|
|
77738
|
-
|
|
77739
|
-
return
|
|
77857
|
+
_context29.next = 10;
|
|
77858
|
+
return _this38.addNode(actualFlow, genericFlow.definition.id);
|
|
77740
77859
|
case 10:
|
|
77741
|
-
|
|
77742
|
-
return
|
|
77860
|
+
_context29.next = 12;
|
|
77861
|
+
return _this38.$nextTick();
|
|
77743
77862
|
case 12:
|
|
77744
|
-
|
|
77745
|
-
return
|
|
77863
|
+
_context29.next = 14;
|
|
77864
|
+
return _this38.highlightNode(targetNode);
|
|
77746
77865
|
case 14:
|
|
77747
77866
|
case "end":
|
|
77748
|
-
return
|
|
77867
|
+
return _context29.stop();
|
|
77749
77868
|
}
|
|
77750
|
-
},
|
|
77869
|
+
}, _callee29);
|
|
77751
77870
|
})));
|
|
77752
77871
|
case 2:
|
|
77753
77872
|
case "end":
|
|
77754
|
-
return
|
|
77873
|
+
return _context30.stop();
|
|
77755
77874
|
}
|
|
77756
|
-
},
|
|
77875
|
+
}, _callee30);
|
|
77757
77876
|
})));
|
|
77758
77877
|
},
|
|
77759
77878
|
performSingleUndoRedoTransaction: function performSingleUndoRedoTransaction(cb) {
|
|
77760
|
-
var
|
|
77761
|
-
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
77762
|
-
return _regeneratorRuntime().wrap(function
|
|
77763
|
-
while (1) switch (
|
|
77879
|
+
var _this39 = this;
|
|
77880
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee31() {
|
|
77881
|
+
return _regeneratorRuntime().wrap(function _callee31$(_context31) {
|
|
77882
|
+
while (1) switch (_context31.prev = _context31.next) {
|
|
77764
77883
|
case 0:
|
|
77765
77884
|
undoRedoStore.commit('disableSavingState');
|
|
77766
|
-
|
|
77885
|
+
_context31.next = 3;
|
|
77767
77886
|
return cb();
|
|
77768
77887
|
case 3:
|
|
77769
77888
|
undoRedoStore.commit('enableSavingState');
|
|
77770
|
-
|
|
77771
|
-
return
|
|
77889
|
+
_context31.next = 6;
|
|
77890
|
+
return _this39.pushToUndoStack();
|
|
77772
77891
|
case 6:
|
|
77773
77892
|
case "end":
|
|
77774
|
-
return
|
|
77893
|
+
return _context31.stop();
|
|
77775
77894
|
}
|
|
77776
|
-
},
|
|
77895
|
+
}, _callee31);
|
|
77777
77896
|
}))();
|
|
77778
77897
|
},
|
|
77779
77898
|
removeNodesFromLane: function removeNodesFromLane(node) {
|
|
@@ -77786,36 +77905,36 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
77786
77905
|
pull_default()(containingLane.get('flowNodeRef'), node.definition);
|
|
77787
77906
|
},
|
|
77788
77907
|
removeNodesFromPool: function removeNodesFromPool(node) {
|
|
77789
|
-
var
|
|
77908
|
+
var _this40 = this;
|
|
77790
77909
|
if (node.type === 'processmaker-modeler-pool' && node.definition.processRef) {
|
|
77791
77910
|
if (node.definition.processRef.artifacts) {
|
|
77792
77911
|
node.definition.processRef.artifacts.forEach(function (artifact) {
|
|
77793
|
-
var nodeToRemove =
|
|
77912
|
+
var nodeToRemove = _this40.nodes.find(function (n) {
|
|
77794
77913
|
return n.definition === artifact;
|
|
77795
77914
|
});
|
|
77796
77915
|
if (nodeToRemove) {
|
|
77797
|
-
|
|
77916
|
+
_this40.removeNode(nodeToRemove);
|
|
77798
77917
|
}
|
|
77799
77918
|
});
|
|
77800
77919
|
}
|
|
77801
77920
|
if (node.definition.processRef.flowElements) {
|
|
77802
77921
|
node.definition.processRef.flowElements.forEach(function (flowElement) {
|
|
77803
|
-
var nodeToRemove =
|
|
77922
|
+
var nodeToRemove = _this40.nodes.find(function (n) {
|
|
77804
77923
|
return n.definition === flowElement;
|
|
77805
77924
|
});
|
|
77806
77925
|
if (nodeToRemove) {
|
|
77807
|
-
|
|
77926
|
+
_this40.removeNode(nodeToRemove);
|
|
77808
77927
|
}
|
|
77809
77928
|
});
|
|
77810
77929
|
}
|
|
77811
77930
|
var laneSets = node.definition.processRef.laneSets;
|
|
77812
77931
|
if (!!laneSets && laneSets.length > 0) {
|
|
77813
77932
|
laneSets[0].lanes.forEach(function (lane) {
|
|
77814
|
-
var nodeToRemove =
|
|
77933
|
+
var nodeToRemove = _this40.nodes.find(function (n) {
|
|
77815
77934
|
return n.definition === lane;
|
|
77816
77935
|
});
|
|
77817
77936
|
if (nodeToRemove) {
|
|
77818
|
-
|
|
77937
|
+
_this40.removeNode(nodeToRemove);
|
|
77819
77938
|
}
|
|
77820
77939
|
});
|
|
77821
77940
|
}
|
|
@@ -77843,13 +77962,13 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
77843
77962
|
return shape.component != null;
|
|
77844
77963
|
},
|
|
77845
77964
|
setShapeStacking: function setShapeStacking(shape) {
|
|
77846
|
-
var
|
|
77965
|
+
var _this41 = this;
|
|
77847
77966
|
if (this.isRendering || !shape.component.node.isType('processmaker-modeler-pool') && shape === this.previouslyStackedShape) {
|
|
77848
77967
|
return;
|
|
77849
77968
|
}
|
|
77850
77969
|
this.previouslyStackedShape = shape;
|
|
77851
77970
|
this.paperManager.performAtomicAction(function () {
|
|
77852
|
-
return ensureShapeIsNotCovered(shape,
|
|
77971
|
+
return ensureShapeIsNotCovered(shape, _this41.graph);
|
|
77853
77972
|
});
|
|
77854
77973
|
},
|
|
77855
77974
|
showSavedNotification: function showSavedNotification() {
|
|
@@ -77883,49 +78002,49 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
77883
78002
|
return false;
|
|
77884
78003
|
},
|
|
77885
78004
|
pointerDowInShape: function pointerDowInShape(event, element) {
|
|
77886
|
-
var
|
|
77887
|
-
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
78005
|
+
var _this42 = this;
|
|
78006
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee32() {
|
|
77888
78007
|
var x, y, shapeView;
|
|
77889
|
-
return _regeneratorRuntime().wrap(function
|
|
77890
|
-
while (1) switch (
|
|
78008
|
+
return _regeneratorRuntime().wrap(function _callee32$(_context32) {
|
|
78009
|
+
while (1) switch (_context32.prev = _context32.next) {
|
|
77891
78010
|
case 0:
|
|
77892
78011
|
x = event.clientX, y = event.clientY;
|
|
77893
|
-
shapeView =
|
|
77894
|
-
|
|
77895
|
-
|
|
77896
|
-
|
|
77897
|
-
|
|
78012
|
+
shapeView = _this42.paper.findViewByModel(element);
|
|
78013
|
+
_this42.isDragging = false;
|
|
78014
|
+
_this42.isSelecting = false;
|
|
78015
|
+
_this42.isIntoTheSelection = false;
|
|
78016
|
+
_this42.dragStart = {
|
|
77898
78017
|
x: x,
|
|
77899
78018
|
y: y
|
|
77900
78019
|
};
|
|
77901
78020
|
// Verify if is in the selection box
|
|
77902
|
-
if (!
|
|
77903
|
-
|
|
78021
|
+
if (!_this42.isPointInSelection(event)) {
|
|
78022
|
+
_context32.next = 10;
|
|
77904
78023
|
break;
|
|
77905
78024
|
}
|
|
77906
|
-
|
|
77907
|
-
|
|
78025
|
+
_this42.isIntoTheSelection = true;
|
|
78026
|
+
_context32.next = 15;
|
|
77908
78027
|
break;
|
|
77909
78028
|
case 10:
|
|
77910
78029
|
if (event.shiftKey) {
|
|
77911
|
-
|
|
78030
|
+
_context32.next = 15;
|
|
77912
78031
|
break;
|
|
77913
78032
|
}
|
|
77914
|
-
|
|
77915
|
-
return
|
|
78033
|
+
_context32.next = 13;
|
|
78034
|
+
return _this42.$refs.selector.selectElement(shapeView);
|
|
77916
78035
|
case 13:
|
|
77917
|
-
|
|
77918
|
-
return
|
|
78036
|
+
_context32.next = 15;
|
|
78037
|
+
return _this42.$nextTick();
|
|
77919
78038
|
case 15:
|
|
77920
|
-
|
|
78039
|
+
_this42.$refs.selector.startDrag({
|
|
77921
78040
|
clientX: event.clientX,
|
|
77922
78041
|
clientY: event.clientY
|
|
77923
78042
|
});
|
|
77924
78043
|
case 16:
|
|
77925
78044
|
case "end":
|
|
77926
|
-
return
|
|
78045
|
+
return _context32.stop();
|
|
77927
78046
|
}
|
|
77928
|
-
},
|
|
78047
|
+
}, _callee32);
|
|
77929
78048
|
}))();
|
|
77930
78049
|
},
|
|
77931
78050
|
pointerDownHandler: function pointerDownHandler(event) {
|
|
@@ -78046,7 +78165,7 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
78046
78165
|
this.$emit('set-xml-manager', this.xmlManager);
|
|
78047
78166
|
},
|
|
78048
78167
|
mounted: function mounted() {
|
|
78049
|
-
var
|
|
78168
|
+
var _this43 = this;
|
|
78050
78169
|
store.commit('setReadOnly', this.readOnly);
|
|
78051
78170
|
this.graph = new external_jointjs_.dia.Graph();
|
|
78052
78171
|
store.commit('setGraph', this.graph);
|
|
@@ -78065,47 +78184,47 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
78065
78184
|
store.commit('setPaper', this.paperManager.paper);
|
|
78066
78185
|
this.paperManager.addEventHandler('element:pointerclick', this.blurFocusedScreenBuilderElement, this);
|
|
78067
78186
|
this.paperManager.addEventHandler('blank:pointerdown', function (event, x, y) {
|
|
78068
|
-
if (
|
|
78187
|
+
if (_this43.isGrabbing) return;
|
|
78069
78188
|
if (store.getters.isReadOnly) {
|
|
78070
|
-
|
|
78189
|
+
_this43.isGrabbing = true;
|
|
78071
78190
|
}
|
|
78072
|
-
var scale =
|
|
78073
|
-
|
|
78191
|
+
var scale = _this43.paperManager.scale;
|
|
78192
|
+
_this43.canvasDragPosition = {
|
|
78074
78193
|
x: x * scale.sx,
|
|
78075
78194
|
y: y * scale.sy
|
|
78076
78195
|
};
|
|
78077
|
-
|
|
78078
|
-
|
|
78196
|
+
_this43.isOverShape = false;
|
|
78197
|
+
_this43.pointerDownHandler(event);
|
|
78079
78198
|
}, this);
|
|
78080
78199
|
this.paperManager.addEventHandler('cell:mouseover element:mouseover', function (_ref19) {
|
|
78081
78200
|
var shape = _ref19.model;
|
|
78082
|
-
if (
|
|
78201
|
+
if (_this43.isBpmnNode(shape) && shape.attr('body/cursor') !== 'default' && !_this43.isGrabbing) {
|
|
78083
78202
|
shape.attr('body/cursor', 'move');
|
|
78084
78203
|
}
|
|
78085
78204
|
// If the user is panning the Paper while hovering an element, ignore the default move cursor
|
|
78086
|
-
if (
|
|
78205
|
+
if (_this43.isGrabbing && _this43.isBpmnNode(shape)) {
|
|
78087
78206
|
shape.attr('body/cursor', 'grabbing');
|
|
78088
78207
|
}
|
|
78089
78208
|
});
|
|
78090
78209
|
this.paperManager.addEventHandler('blank:pointerup', function (event) {
|
|
78091
|
-
|
|
78092
|
-
|
|
78093
|
-
|
|
78094
|
-
|
|
78210
|
+
_this43.isGrabbing = false;
|
|
78211
|
+
_this43.canvasDragPosition = null;
|
|
78212
|
+
_this43.activeNode = null;
|
|
78213
|
+
_this43.pointerUpHandler(event);
|
|
78095
78214
|
}, this);
|
|
78096
78215
|
this.paperManager.addEventHandler('cell:pointerup', function (cellView, event) {
|
|
78097
|
-
|
|
78098
|
-
|
|
78099
|
-
|
|
78216
|
+
_this43.canvasDragPosition = null;
|
|
78217
|
+
_this43.activeNode = null;
|
|
78218
|
+
_this43.pointerUpHandler(event, cellView);
|
|
78100
78219
|
}, this);
|
|
78101
78220
|
this.$refs['paper-container'].addEventListener('mouseenter', function () {
|
|
78102
78221
|
store.commit('setClientLeftPaper', false);
|
|
78103
78222
|
});
|
|
78104
78223
|
this.$el.addEventListener('mousemove', function (event) {
|
|
78105
|
-
|
|
78224
|
+
_this43.pointerMoveHandler(event);
|
|
78106
78225
|
});
|
|
78107
78226
|
this.$refs['paper-container'].addEventListener('mouseleave', function () {
|
|
78108
|
-
|
|
78227
|
+
_this43.paperManager.removeEventHandler('blank:pointermove');
|
|
78109
78228
|
store.commit('setClientLeftPaper', true);
|
|
78110
78229
|
});
|
|
78111
78230
|
this.paperManager.addEventHandler('cell:pointerclick', function (cellView, evt, x, y) {
|
|
@@ -78116,44 +78235,44 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
78116
78235
|
});
|
|
78117
78236
|
this.paperManager.addEventHandler('cell:pointerclick', function (_ref20, event) {
|
|
78118
78237
|
var shape = _ref20.model;
|
|
78119
|
-
if (!
|
|
78238
|
+
if (!_this43.isBpmnNode(shape)) {
|
|
78120
78239
|
return;
|
|
78121
78240
|
}
|
|
78122
78241
|
|
|
78123
78242
|
// ignore click event if the user is Grabbing the paper
|
|
78124
|
-
if (
|
|
78243
|
+
if (_this43.isGrabbing) return;
|
|
78125
78244
|
shape.component.$emit('click', event);
|
|
78126
|
-
|
|
78245
|
+
_this43.$emit('click', {
|
|
78127
78246
|
event: event,
|
|
78128
|
-
node:
|
|
78247
|
+
node: _this43.highlightedNode.definition
|
|
78129
78248
|
});
|
|
78130
78249
|
});
|
|
78131
78250
|
this.paperManager.addEventHandler('cell:pointerdown', function (_ref21, event) {
|
|
78132
78251
|
var shape = _ref21.model;
|
|
78133
|
-
if (!
|
|
78252
|
+
if (!_this43.isBpmnNode(shape)) {
|
|
78134
78253
|
return;
|
|
78135
78254
|
}
|
|
78136
78255
|
// If the user is pressing Space (grabbing) and clicking on a Cell, return
|
|
78137
|
-
if (
|
|
78256
|
+
if (_this43.isGrabbing) {
|
|
78138
78257
|
return;
|
|
78139
78258
|
}
|
|
78140
|
-
|
|
78141
|
-
|
|
78142
|
-
|
|
78143
|
-
|
|
78259
|
+
_this43.setShapeStacking(shape);
|
|
78260
|
+
_this43.activeNode = shape.component.node;
|
|
78261
|
+
_this43.isOverShape = true;
|
|
78262
|
+
_this43.pointerDowInShape(event, shape);
|
|
78144
78263
|
});
|
|
78145
78264
|
// If the user is grabbing the paper while he clicked in a cell, move the paper and not the cell
|
|
78146
78265
|
this.paperManager.addEventHandler('cell:pointermove', function (_, event, x, y) {
|
|
78147
|
-
if (
|
|
78148
|
-
if (!
|
|
78149
|
-
var scale =
|
|
78150
|
-
|
|
78266
|
+
if (_this43.isGrabbing) {
|
|
78267
|
+
if (!_this43.canvasDragPosition) {
|
|
78268
|
+
var scale = _this43.paperManager.scale;
|
|
78269
|
+
_this43.canvasDragPosition = {
|
|
78151
78270
|
x: x * scale.sx,
|
|
78152
78271
|
y: y * scale.sy
|
|
78153
78272
|
};
|
|
78154
78273
|
}
|
|
78155
|
-
if (
|
|
78156
|
-
|
|
78274
|
+
if (_this43.canvasDragPosition && !_this43.clientLeftPaper) {
|
|
78275
|
+
_this43.paperManager.translate(event.offsetX - _this43.canvasDragPosition.x, event.offsetY - _this43.canvasDragPosition.y);
|
|
78157
78276
|
}
|
|
78158
78277
|
}
|
|
78159
78278
|
});
|
|
@@ -78164,28 +78283,29 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
78164
78283
|
modeler: this,
|
|
78165
78284
|
registerMenuAction: this.registerMenuAction,
|
|
78166
78285
|
loadXML: function () {
|
|
78167
|
-
var _loadXML = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
78286
|
+
var _loadXML = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee33(xml) {
|
|
78168
78287
|
var multiplayer;
|
|
78169
|
-
return _regeneratorRuntime().wrap(function
|
|
78170
|
-
while (1) switch (
|
|
78288
|
+
return _regeneratorRuntime().wrap(function _callee33$(_context33) {
|
|
78289
|
+
while (1) switch (_context33.prev = _context33.next) {
|
|
78171
78290
|
case 0:
|
|
78172
|
-
|
|
78173
|
-
return
|
|
78291
|
+
_context33.next = 2;
|
|
78292
|
+
return _this43.loadXML(xml);
|
|
78174
78293
|
case 2:
|
|
78175
|
-
|
|
78294
|
+
_context33.next = 4;
|
|
78176
78295
|
return undoRedoStore.dispatch('pushState', xml);
|
|
78177
78296
|
case 4:
|
|
78178
78297
|
try {
|
|
78179
|
-
multiplayer = new Multiplayer(
|
|
78298
|
+
multiplayer = new Multiplayer(_this43);
|
|
78180
78299
|
multiplayer.init();
|
|
78300
|
+
_this43.multiplayer = multiplayer;
|
|
78181
78301
|
} catch (error) {
|
|
78182
78302
|
console.warn('Could not initialize multiplayer', error);
|
|
78183
78303
|
}
|
|
78184
78304
|
case 5:
|
|
78185
78305
|
case "end":
|
|
78186
|
-
return
|
|
78306
|
+
return _context33.stop();
|
|
78187
78307
|
}
|
|
78188
|
-
},
|
|
78308
|
+
}, _callee33);
|
|
78189
78309
|
}));
|
|
78190
78310
|
function loadXML(_x) {
|
|
78191
78311
|
return _loadXML.apply(this, arguments);
|
|
@@ -78193,18 +78313,18 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
78193
78313
|
return loadXML;
|
|
78194
78314
|
}(),
|
|
78195
78315
|
addWarnings: function addWarnings(warnings) {
|
|
78196
|
-
return
|
|
78316
|
+
return _this43.$emit('warnings', warnings);
|
|
78197
78317
|
},
|
|
78198
78318
|
addBreadcrumbs: function addBreadcrumbs(breadcrumbs) {
|
|
78199
|
-
return
|
|
78319
|
+
return _this43.breadcrumbData.push(breadcrumbs);
|
|
78200
78320
|
}
|
|
78201
78321
|
});
|
|
78202
78322
|
this.$root.$on('replace-ai-node', function (data) {
|
|
78203
|
-
|
|
78323
|
+
_this43.replaceAiNode(data);
|
|
78204
78324
|
});
|
|
78205
78325
|
window.ProcessMaker.EventBus.$on('save-changes', function (redirectUrl) {
|
|
78206
78326
|
if (redirectUrl) {
|
|
78207
|
-
|
|
78327
|
+
_this43.redirect(redirectUrl);
|
|
78208
78328
|
}
|
|
78209
78329
|
});
|
|
78210
78330
|
}
|
|
@@ -78226,8 +78346,8 @@ var modelervue_type_style_index_0_prod_lang_scss_ = __webpack_require__(26695);
|
|
|
78226
78346
|
|
|
78227
78347
|
var Modeler_component = normalizeComponent(
|
|
78228
78348
|
modeler_Modelervue_type_script_lang_js_,
|
|
78229
|
-
|
|
78230
|
-
|
|
78349
|
+
Modelervue_type_template_id_5fd6d55f_render,
|
|
78350
|
+
Modelervue_type_template_id_5fd6d55f_staticRenderFns,
|
|
78231
78351
|
false,
|
|
78232
78352
|
null,
|
|
78233
78353
|
null,
|