@processmaker/modeler 1.43.10 → 1.43.12
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 +113 -93
- package/dist/modeler.common.js.map +1 -1
- package/dist/modeler.umd.js +113 -93
- package/dist/modeler.umd.js.map +1 -1
- package/dist/modeler.umd.min.js +1 -1
- package/dist/modeler.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/src/components/modeler/Modeler.vue +11 -3
- package/src/multiplayer/multiplayer.js +13 -1
package/dist/modeler.umd.js
CHANGED
|
@@ -48329,10 +48329,10 @@ var ValidationStatus_component = normalizeComponent(
|
|
|
48329
48329
|
)
|
|
48330
48330
|
|
|
48331
48331
|
/* harmony default export */ var ValidationStatus = (ValidationStatus_component.exports);
|
|
48332
|
-
;// 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=
|
|
48332
|
+
;// 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=7e5b2922&
|
|
48333
48333
|
|
|
48334
48334
|
|
|
48335
|
-
var
|
|
48335
|
+
var Modelervue_type_template_id_7e5b2922_render = function render() {
|
|
48336
48336
|
var _vm = this,
|
|
48337
48337
|
_c = _vm._self._c;
|
|
48338
48338
|
return _c('span', {
|
|
@@ -48612,9 +48612,9 @@ var Modelervue_type_template_id_292ef746_render = function render() {
|
|
|
48612
48612
|
});
|
|
48613
48613
|
})], 2)], 1);
|
|
48614
48614
|
};
|
|
48615
|
-
var
|
|
48615
|
+
var Modelervue_type_template_id_7e5b2922_staticRenderFns = [];
|
|
48616
48616
|
|
|
48617
|
-
;// CONCATENATED MODULE: ./src/components/modeler/Modeler.vue?vue&type=template&id=
|
|
48617
|
+
;// CONCATENATED MODULE: ./src/components/modeler/Modeler.vue?vue&type=template&id=7e5b2922&
|
|
48618
48618
|
|
|
48619
48619
|
;// 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=728530a2&
|
|
48620
48620
|
var boundaryEventvue_type_template_id_728530a2_render = function render() {
|
|
@@ -77250,11 +77250,13 @@ var ColorUtil = /*#__PURE__*/function () {
|
|
|
77250
77250
|
|
|
77251
77251
|
|
|
77252
77252
|
|
|
77253
|
+
|
|
77253
77254
|
|
|
77254
77255
|
|
|
77255
77256
|
var _nodeIdGenerator = /*#__PURE__*/new WeakMap();
|
|
77256
77257
|
var Multiplayer = /*#__PURE__*/function () {
|
|
77257
77258
|
function Multiplayer(modeler) {
|
|
77259
|
+
var _this = this;
|
|
77258
77260
|
_classCallCheck(this, Multiplayer);
|
|
77259
77261
|
_defineProperty(this, "clientIO", null);
|
|
77260
77262
|
_defineProperty(this, "yDoc", null);
|
|
@@ -77268,6 +77270,15 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
77268
77270
|
_defineProperty(this, "inspector", null);
|
|
77269
77271
|
_defineProperty(this, "deletedItem", null);
|
|
77270
77272
|
_defineProperty(this, "colorUtil", null);
|
|
77273
|
+
/**
|
|
77274
|
+
* Debounces the updatedSelectedNodes function to avoid triggering multiple times
|
|
77275
|
+
* the update
|
|
77276
|
+
*
|
|
77277
|
+
* @param {Object} payload
|
|
77278
|
+
*/
|
|
77279
|
+
_defineProperty(this, "debouncedUpdateSelectedNodes", (0,external_lodash_.debounce)(function (data) {
|
|
77280
|
+
_this.updateSelectedNodes(data);
|
|
77281
|
+
}, 400));
|
|
77271
77282
|
// define document
|
|
77272
77283
|
this.yDoc = new Doc();
|
|
77273
77284
|
// Create a shared array
|
|
@@ -77301,42 +77312,42 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
77301
77312
|
}, {
|
|
77302
77313
|
key: "webSocketEvents",
|
|
77303
77314
|
value: function webSocketEvents() {
|
|
77304
|
-
var
|
|
77315
|
+
var _this2 = this;
|
|
77305
77316
|
this.clientIO.on('connect', function () {
|
|
77306
77317
|
var _window$ProcessMaker$2, _window$ProcessMaker$3, _window$ProcessMaker$4, _window$ProcessMaker$5;
|
|
77307
77318
|
// Join the room
|
|
77308
|
-
|
|
77309
|
-
|
|
77310
|
-
roomName:
|
|
77319
|
+
_this2.modeler.emptyPlayers();
|
|
77320
|
+
_this2.clientIO.emit('joinRoom', {
|
|
77321
|
+
roomName: _this2.room.getRoom(),
|
|
77311
77322
|
clientName: (_window$ProcessMaker$2 = window.ProcessMaker.user) === null || _window$ProcessMaker$2 === void 0 ? void 0 : _window$ProcessMaker$2.fullName,
|
|
77312
77323
|
clientAvatar: (_window$ProcessMaker$3 = window.ProcessMaker.user) === null || _window$ProcessMaker$3 === void 0 ? void 0 : _window$ProcessMaker$3.avatar,
|
|
77313
|
-
clientColor: ((_window$ProcessMaker$4 = window.ProcessMaker.user) === null || _window$ProcessMaker$4 === void 0 ? void 0 : _window$ProcessMaker$4.color) ||
|
|
77324
|
+
clientColor: ((_window$ProcessMaker$4 = window.ProcessMaker.user) === null || _window$ProcessMaker$4 === void 0 ? void 0 : _window$ProcessMaker$4.color) || _this2.colorUtil.randomColor((_window$ProcessMaker$5 = window.ProcessMaker.user) === null || _window$ProcessMaker$5 === void 0 ? void 0 : _window$ProcessMaker$5.fullName),
|
|
77314
77325
|
clientCursor: {
|
|
77315
77326
|
coordinates: {
|
|
77316
77327
|
clientX: 300,
|
|
77317
77328
|
clientY: 300
|
|
77318
77329
|
},
|
|
77319
|
-
paperTranslate:
|
|
77320
|
-
paperScale:
|
|
77330
|
+
paperTranslate: _this2.modeler.paper.translate(),
|
|
77331
|
+
paperScale: _this2.modeler.paper.scale()
|
|
77321
77332
|
}
|
|
77322
77333
|
});
|
|
77323
77334
|
});
|
|
77324
77335
|
this.clientIO.on('clientJoined', function (payload) {
|
|
77325
|
-
|
|
77326
|
-
|
|
77336
|
+
_this2.modeler.enableMultiplayer(payload.isMultiplayer);
|
|
77337
|
+
_this2.addPlayers(payload);
|
|
77327
77338
|
});
|
|
77328
77339
|
this.clientIO.on('clientLeft', function (payload) {
|
|
77329
77340
|
// Unhighlight nodes
|
|
77330
|
-
|
|
77341
|
+
_this2.modeler.unhightligtNodes(payload.clientId);
|
|
77331
77342
|
// Remove the player from the multiplayer list
|
|
77332
|
-
|
|
77333
|
-
|
|
77343
|
+
_this2.modeler.removePlayer(payload.clientId);
|
|
77344
|
+
_this2.modeler.enableMultiplayer(payload.isMultiplayer);
|
|
77334
77345
|
});
|
|
77335
77346
|
this.clientIO.on('requestProcess', function (payload) {
|
|
77336
77347
|
var clientId = payload.clientId;
|
|
77337
77348
|
// Sync the local Nodes
|
|
77338
77349
|
if (clientId) {
|
|
77339
|
-
|
|
77350
|
+
_this2.syncLocalNodes(clientId);
|
|
77340
77351
|
}
|
|
77341
77352
|
});
|
|
77342
77353
|
|
|
@@ -77346,7 +77357,7 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
77346
77357
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
77347
77358
|
while (1) switch (_context.prev = _context.next) {
|
|
77348
77359
|
case 0:
|
|
77349
|
-
|
|
77360
|
+
_this2.updateClientCursor(payload);
|
|
77350
77361
|
case 1:
|
|
77351
77362
|
case "end":
|
|
77352
77363
|
return _context.stop();
|
|
@@ -77364,7 +77375,7 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
77364
77375
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
77365
77376
|
while (1) switch (_context2.prev = _context2.next) {
|
|
77366
77377
|
case 0:
|
|
77367
|
-
|
|
77378
|
+
_this2.updateHightligtedNodes(payload);
|
|
77368
77379
|
case 1:
|
|
77369
77380
|
case "end":
|
|
77370
77381
|
return _context2.stop();
|
|
@@ -77383,10 +77394,10 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
77383
77394
|
while (1) switch (_context3.prev = _context3.next) {
|
|
77384
77395
|
case 0:
|
|
77385
77396
|
_context3.next = 2;
|
|
77386
|
-
return
|
|
77397
|
+
return _this2.createRemoteShape(payload.changes);
|
|
77387
77398
|
case 2:
|
|
77388
77399
|
// Add the new element to the shared array
|
|
77389
|
-
applyUpdate(
|
|
77400
|
+
applyUpdate(_this2.yDoc, new Uint8Array(payload.updateDoc));
|
|
77390
77401
|
case 3:
|
|
77391
77402
|
case "end":
|
|
77392
77403
|
return _context3.stop();
|
|
@@ -77404,15 +77415,15 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
77404
77415
|
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
77405
77416
|
while (1) switch (_context4.prev = _context4.next) {
|
|
77406
77417
|
case 0:
|
|
77407
|
-
if (!(payload.clientId ===
|
|
77418
|
+
if (!(payload.clientId === _this2.clientIO.id)) {
|
|
77408
77419
|
_context4.next = 4;
|
|
77409
77420
|
break;
|
|
77410
77421
|
}
|
|
77411
77422
|
_context4.next = 3;
|
|
77412
|
-
return
|
|
77423
|
+
return _this2.createRemoteShape(payload.changes);
|
|
77413
77424
|
case 3:
|
|
77414
77425
|
// Add the new element to the shared array
|
|
77415
|
-
applyUpdate(
|
|
77426
|
+
applyUpdate(_this2.yDoc, new Uint8Array(payload.updateDoc));
|
|
77416
77427
|
case 4:
|
|
77417
77428
|
case "end":
|
|
77418
77429
|
return _context4.stop();
|
|
@@ -77428,12 +77439,12 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
77428
77439
|
this.clientIO.on('removeElement', function (payload) {
|
|
77429
77440
|
payload.deletedNodes.forEach(function (nodeId) {
|
|
77430
77441
|
// Get the node id
|
|
77431
|
-
var node =
|
|
77442
|
+
var node = _this2.getNodeById(nodeId);
|
|
77432
77443
|
// Remove the element from the process
|
|
77433
|
-
|
|
77444
|
+
_this2.removeShape(node);
|
|
77434
77445
|
});
|
|
77435
77446
|
// Remove the element from the shared array
|
|
77436
|
-
applyUpdate(
|
|
77447
|
+
applyUpdate(_this2.yDoc, new Uint8Array(payload.updateDoc));
|
|
77437
77448
|
});
|
|
77438
77449
|
|
|
77439
77450
|
// Listen for updates when a element is updated
|
|
@@ -77443,16 +77454,16 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
77443
77454
|
isReplaced = payload.isReplaced;
|
|
77444
77455
|
if (isReplaced) {
|
|
77445
77456
|
// Replace the element in the process
|
|
77446
|
-
|
|
77457
|
+
_this2.replaceShape(updatedNodes[0]);
|
|
77447
77458
|
} else {
|
|
77448
77459
|
// Update the elements in the process
|
|
77449
77460
|
updatedNodes.forEach(function (data) {
|
|
77450
|
-
|
|
77461
|
+
_this2.updateShapes(data);
|
|
77451
77462
|
});
|
|
77452
77463
|
}
|
|
77453
77464
|
|
|
77454
77465
|
// Update the element in the shared array
|
|
77455
|
-
applyUpdate(
|
|
77466
|
+
applyUpdate(_this2.yDoc, new Uint8Array(updateDoc));
|
|
77456
77467
|
});
|
|
77457
77468
|
this.clientIO.on('updateInspector', function (payload) {
|
|
77458
77469
|
var updateDoc = payload.updateDoc,
|
|
@@ -77460,70 +77471,70 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
77460
77471
|
|
|
77461
77472
|
// Update the elements in the process
|
|
77462
77473
|
updatedNodes.forEach(function (data) {
|
|
77463
|
-
|
|
77474
|
+
_this2.updateShapeFromInspector(data);
|
|
77464
77475
|
});
|
|
77465
77476
|
|
|
77466
77477
|
// Update the element in the shared array
|
|
77467
|
-
applyUpdate(
|
|
77478
|
+
applyUpdate(_this2.yDoc, new Uint8Array(updateDoc));
|
|
77468
77479
|
});
|
|
77469
77480
|
this.clientIO.on('updateFlows', function (payload) {
|
|
77470
77481
|
var updateDoc = payload.updateDoc,
|
|
77471
77482
|
updatedNodes = payload.updatedNodes;
|
|
77472
77483
|
// Update the elements in the process
|
|
77473
77484
|
updatedNodes.forEach(function (data) {
|
|
77474
|
-
|
|
77485
|
+
_this2.updateFlowClient(data);
|
|
77475
77486
|
});
|
|
77476
77487
|
// Update the element in the shared array
|
|
77477
|
-
applyUpdate(
|
|
77488
|
+
applyUpdate(_this2.yDoc, new Uint8Array(updateDoc));
|
|
77478
77489
|
});
|
|
77479
77490
|
}
|
|
77480
77491
|
}, {
|
|
77481
77492
|
key: "multiplayerEvents",
|
|
77482
77493
|
value: function multiplayerEvents() {
|
|
77483
|
-
var
|
|
77494
|
+
var _this3 = this;
|
|
77484
77495
|
window.ProcessMaker.EventBus.$on('multiplayer-addNode', function (data) {
|
|
77485
|
-
|
|
77496
|
+
_this3.addNode(data);
|
|
77486
77497
|
});
|
|
77487
77498
|
window.ProcessMaker.EventBus.$on('multiplayer-removeNode', function (data) {
|
|
77488
|
-
|
|
77499
|
+
_this3.removeNode(data);
|
|
77489
77500
|
});
|
|
77490
77501
|
window.ProcessMaker.EventBus.$on('multiplayer-updateNodes', function (data) {
|
|
77491
|
-
if (
|
|
77492
|
-
|
|
77502
|
+
if (_this3.modeler.isMultiplayer) {
|
|
77503
|
+
_this3.updateNodes(data);
|
|
77493
77504
|
}
|
|
77494
77505
|
});
|
|
77495
77506
|
window.ProcessMaker.EventBus.$on('multiplayer-replaceNode', function (_ref5) {
|
|
77496
77507
|
var nodeData = _ref5.nodeData,
|
|
77497
77508
|
newControl = _ref5.newControl;
|
|
77498
|
-
|
|
77509
|
+
_this3.replaceNode(nodeData, newControl);
|
|
77499
77510
|
});
|
|
77500
77511
|
window.ProcessMaker.EventBus.$on('multiplayer-addFlow', function (data) {
|
|
77501
|
-
|
|
77512
|
+
_this3.addCommonElement(data);
|
|
77502
77513
|
});
|
|
77503
77514
|
window.ProcessMaker.EventBus.$on('multiplayer-addBoundaryEvent', function (data) {
|
|
77504
|
-
|
|
77515
|
+
_this3.addCommonElement(data);
|
|
77505
77516
|
});
|
|
77506
77517
|
window.ProcessMaker.EventBus.$on('multiplayer-addLanes', function (lanes) {
|
|
77507
|
-
|
|
77518
|
+
_this3.addLaneNodes(lanes);
|
|
77508
77519
|
});
|
|
77509
77520
|
window.ProcessMaker.EventBus.$on('multiplayer-updateInspectorProperty', function (data) {
|
|
77510
|
-
if (
|
|
77511
|
-
|
|
77521
|
+
if (_this3.modeler.isMultiplayer) {
|
|
77522
|
+
_this3.updateInspectorProperty(data);
|
|
77512
77523
|
}
|
|
77513
77524
|
});
|
|
77514
77525
|
window.ProcessMaker.EventBus.$on('multiplayer-updateFlows', function (data) {
|
|
77515
|
-
if (
|
|
77516
|
-
|
|
77526
|
+
if (_this3.modeler.isMultiplayer) {
|
|
77527
|
+
_this3.updateFlows(data);
|
|
77517
77528
|
}
|
|
77518
77529
|
});
|
|
77519
77530
|
window.ProcessMaker.EventBus.$on('multiplayer-updateSelectedNodes', function (data) {
|
|
77520
|
-
if (
|
|
77521
|
-
|
|
77531
|
+
if (_this3.modeler.isMultiplayer) {
|
|
77532
|
+
_this3.debouncedUpdateSelectedNodes(data);
|
|
77522
77533
|
}
|
|
77523
77534
|
});
|
|
77524
77535
|
window.ProcessMaker.EventBus.$on('multiplayer-updateMousePosition', function (data) {
|
|
77525
|
-
if (
|
|
77526
|
-
|
|
77536
|
+
if (_this3.modeler.isMultiplayer) {
|
|
77537
|
+
_this3.updateMousePosition(data);
|
|
77527
77538
|
}
|
|
77528
77539
|
});
|
|
77529
77540
|
}
|
|
@@ -77534,7 +77545,7 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
77534
77545
|
}, {
|
|
77535
77546
|
key: "addPlayers",
|
|
77536
77547
|
value: function addPlayers(payload) {
|
|
77537
|
-
var
|
|
77548
|
+
var _this4 = this;
|
|
77538
77549
|
if (payload.isMultiplayer) {
|
|
77539
77550
|
payload.clients.map(function (client) {
|
|
77540
77551
|
var newPlayer = {
|
|
@@ -77544,7 +77555,7 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
77544
77555
|
avatar: client.avatar,
|
|
77545
77556
|
cursor: client.cursor
|
|
77546
77557
|
};
|
|
77547
|
-
|
|
77558
|
+
_this4.modeler.addPlayer(newPlayer);
|
|
77548
77559
|
});
|
|
77549
77560
|
}
|
|
77550
77561
|
}
|
|
@@ -77568,18 +77579,19 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
77568
77579
|
}, {
|
|
77569
77580
|
key: "updateClientCursor",
|
|
77570
77581
|
value: function updateClientCursor(payload) {
|
|
77571
|
-
var
|
|
77582
|
+
var _this5 = this;
|
|
77572
77583
|
payload.clients.map(function (client) {
|
|
77573
|
-
|
|
77584
|
+
_this5.modeler.updateClientCursor(client);
|
|
77574
77585
|
});
|
|
77575
77586
|
}
|
|
77587
|
+
}, {
|
|
77588
|
+
key: "updateSelectedNodes",
|
|
77589
|
+
value:
|
|
77576
77590
|
/**
|
|
77577
77591
|
* Updates the selected nodes by the user
|
|
77578
77592
|
* @param {Object} data
|
|
77579
77593
|
*/
|
|
77580
|
-
|
|
77581
|
-
key: "updateSelectedNodes",
|
|
77582
|
-
value: function updateSelectedNodes(data) {
|
|
77594
|
+
function updateSelectedNodes(data) {
|
|
77583
77595
|
var warningMessage = 'Another user is working on this object, wait until they finish making changes.';
|
|
77584
77596
|
if (this.modeler.isMultiplayerSelected(data)) {
|
|
77585
77597
|
window.ProcessMaker.alert(warningMessage, 'warning');
|
|
@@ -77597,9 +77609,9 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
77597
77609
|
}, {
|
|
77598
77610
|
key: "updateHightligtedNodes",
|
|
77599
77611
|
value: function updateHightligtedNodes(payload) {
|
|
77600
|
-
var
|
|
77612
|
+
var _this6 = this;
|
|
77601
77613
|
payload.clients.map(function (client) {
|
|
77602
|
-
|
|
77614
|
+
_this6.modeler.updateHightligtedNodes(client);
|
|
77603
77615
|
});
|
|
77604
77616
|
}
|
|
77605
77617
|
|
|
@@ -77610,25 +77622,25 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
77610
77622
|
}, {
|
|
77611
77623
|
key: "syncLocalNodes",
|
|
77612
77624
|
value: function syncLocalNodes(clientId) {
|
|
77613
|
-
var
|
|
77625
|
+
var _this7 = this;
|
|
77614
77626
|
// Get the process definition
|
|
77615
77627
|
var nodes = this.modeler.nodes.map(function (node) {
|
|
77616
77628
|
if (node.definition.$type === 'bpmn:BoundaryEvent') {
|
|
77617
77629
|
return getBoundaryEventData(node);
|
|
77618
77630
|
}
|
|
77619
77631
|
if (node.definition.$type === 'bpmn:Lane') {
|
|
77620
|
-
return
|
|
77632
|
+
return _this7.prepareLaneData(node);
|
|
77621
77633
|
}
|
|
77622
|
-
return
|
|
77634
|
+
return _this7.modeler.multiplayerHook(node, false, true);
|
|
77623
77635
|
});
|
|
77624
77636
|
nodes.forEach(function (node) {
|
|
77625
77637
|
var yMapNested = new YMap();
|
|
77626
|
-
|
|
77627
|
-
|
|
77638
|
+
_this7.doTransact(yMapNested, node);
|
|
77639
|
+
_this7.yArray.push([yMapNested]);
|
|
77628
77640
|
// Encode the state as an update and send it to the server
|
|
77629
|
-
var stateUpdate = encodeStateAsUpdate(
|
|
77641
|
+
var stateUpdate = encodeStateAsUpdate(_this7.yDoc);
|
|
77630
77642
|
// Send the update to the web socket server
|
|
77631
|
-
|
|
77643
|
+
_this7.clientIO.emit('createElement', {
|
|
77632
77644
|
updateDoc: stateUpdate,
|
|
77633
77645
|
clientId: clientId
|
|
77634
77646
|
});
|
|
@@ -77667,10 +77679,10 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
77667
77679
|
}, {
|
|
77668
77680
|
key: "createRemoteShape",
|
|
77669
77681
|
value: function createRemoteShape(changes) {
|
|
77670
|
-
var
|
|
77682
|
+
var _this8 = this;
|
|
77671
77683
|
return new Promise(function (resolve) {
|
|
77672
77684
|
changes.map(function (data) {
|
|
77673
|
-
|
|
77685
|
+
_this8.createShape(data);
|
|
77674
77686
|
});
|
|
77675
77687
|
resolve();
|
|
77676
77688
|
});
|
|
@@ -77737,14 +77749,14 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
77737
77749
|
}, {
|
|
77738
77750
|
key: "updateNodes",
|
|
77739
77751
|
value: function updateNodes(data) {
|
|
77740
|
-
var
|
|
77752
|
+
var _this9 = this;
|
|
77741
77753
|
data.forEach(function (value) {
|
|
77742
|
-
var index =
|
|
77743
|
-
var nodeToUpdate =
|
|
77754
|
+
var index = _this9.getIndex(value.id);
|
|
77755
|
+
var nodeToUpdate = _this9.yArray.get(index);
|
|
77744
77756
|
var updateData = value.poolId ? _objectSpread2(_objectSpread2({}, value.properties), {
|
|
77745
77757
|
poolId: value.poolId
|
|
77746
77758
|
}) : value.properties;
|
|
77747
|
-
|
|
77759
|
+
_this9.doTransact(nodeToUpdate, updateData);
|
|
77748
77760
|
});
|
|
77749
77761
|
}
|
|
77750
77762
|
}, {
|
|
@@ -77926,7 +77938,7 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
77926
77938
|
}, {
|
|
77927
77939
|
key: "updateMovedWaypoint",
|
|
77928
77940
|
value: function updateMovedWaypoint(element, data) {
|
|
77929
|
-
var
|
|
77941
|
+
var _this10 = this;
|
|
77930
77942
|
var waypoint = data.waypoint;
|
|
77931
77943
|
var paper = this.modeler.paper;
|
|
77932
77944
|
// Update the element's waypoints
|
|
@@ -77939,14 +77951,14 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
77939
77951
|
element.vertices(waypoint);
|
|
77940
77952
|
// update bpmn waypoints
|
|
77941
77953
|
element.component.node.diagram.waypoint = waypoint.map(function (point) {
|
|
77942
|
-
return
|
|
77954
|
+
return _this10.modeler.moddle.create('dc:Point', point);
|
|
77943
77955
|
});
|
|
77944
77956
|
// Force Remount Flow
|
|
77945
77957
|
element.component.node._modelerId += '_replaced';
|
|
77946
77958
|
// Update the element's source anchor
|
|
77947
77959
|
element.source(sourceElem, {
|
|
77948
77960
|
anchor: function anchor() {
|
|
77949
|
-
return getDefaultAnchorPoint(
|
|
77961
|
+
return getDefaultAnchorPoint(_this10.getConnectionPoint(sourceElem, startWaypoint), sourceElem.findView(paper));
|
|
77950
77962
|
},
|
|
77951
77963
|
connectionPoint: {
|
|
77952
77964
|
name: 'boundary'
|
|
@@ -77956,7 +77968,7 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
77956
77968
|
// Update the element's target anchor
|
|
77957
77969
|
element.target(targetElem, {
|
|
77958
77970
|
anchor: function anchor() {
|
|
77959
|
-
return getDefaultAnchorPoint(
|
|
77971
|
+
return getDefaultAnchorPoint(_this10.getConnectionPoint(targetElem, endWaypoint), targetElem.findView(paper));
|
|
77960
77972
|
},
|
|
77961
77973
|
connectionPoint: {
|
|
77962
77974
|
name: 'boundary'
|
|
@@ -77999,7 +78011,7 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
77999
78011
|
}, {
|
|
78000
78012
|
key: "addLaneNodes",
|
|
78001
78013
|
value: function addLaneNodes(lanes) {
|
|
78002
|
-
var
|
|
78014
|
+
var _this11 = this;
|
|
78003
78015
|
var pool = this.getPool(lanes);
|
|
78004
78016
|
var defaultPoolData = {
|
|
78005
78017
|
id: pool.component.node.definition.id,
|
|
@@ -78015,11 +78027,11 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
78015
78027
|
this.yDoc.transact(function () {
|
|
78016
78028
|
lanes.forEach(function (lane) {
|
|
78017
78029
|
var yMapNested = new YMap();
|
|
78018
|
-
var data =
|
|
78019
|
-
|
|
78020
|
-
|
|
78021
|
-
var stateUpdate = encodeStateAsUpdate(
|
|
78022
|
-
|
|
78030
|
+
var data = _this11.prepareLaneData(lane);
|
|
78031
|
+
_this11.doTransact(yMapNested, data);
|
|
78032
|
+
_this11.yArray.push([yMapNested]);
|
|
78033
|
+
var stateUpdate = encodeStateAsUpdate(_this11.yDoc);
|
|
78034
|
+
_this11.clientIO.emit('createElement', {
|
|
78023
78035
|
updateDoc: stateUpdate
|
|
78024
78036
|
});
|
|
78025
78037
|
});
|
|
@@ -78159,11 +78171,11 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
78159
78171
|
}, {
|
|
78160
78172
|
key: "updateFlows",
|
|
78161
78173
|
value: function updateFlows(data) {
|
|
78162
|
-
var
|
|
78174
|
+
var _this12 = this;
|
|
78163
78175
|
data.forEach(function (value) {
|
|
78164
|
-
var index =
|
|
78165
|
-
var nodeToUpdate =
|
|
78166
|
-
|
|
78176
|
+
var index = _this12.getIndex(value.id);
|
|
78177
|
+
var nodeToUpdate = _this12.yArray.get(index);
|
|
78178
|
+
_this12.yDoc.transact(function () {
|
|
78167
78179
|
for (var key in value) {
|
|
78168
78180
|
if (Object.hasOwn(value, key)) {
|
|
78169
78181
|
nodeToUpdate.set(key, value[key]);
|
|
@@ -78226,12 +78238,12 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
78226
78238
|
}, {
|
|
78227
78239
|
key: "refreshNodeWaypoint",
|
|
78228
78240
|
value: function refreshNodeWaypoint(element) {
|
|
78229
|
-
var
|
|
78241
|
+
var _this13 = this;
|
|
78230
78242
|
var linkView = this.modeler.paper.findViewByModel(element);
|
|
78231
78243
|
var start = linkView.sourceAnchor;
|
|
78232
78244
|
var end = linkView.targetAnchor;
|
|
78233
78245
|
element.component.node.diagram.waypoint = [start].concat(_toConsumableArray(element.component.shape.vertices()), [end]).map(function (point) {
|
|
78234
|
-
return
|
|
78246
|
+
return _this13.modeler.moddle.create('dc:Point', point);
|
|
78235
78247
|
});
|
|
78236
78248
|
}
|
|
78237
78249
|
}]);
|
|
@@ -80367,7 +80379,9 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
80367
80379
|
});
|
|
80368
80380
|
player === null || player === void 0 || (_player$selectedNodes = player.selectedNodes) === null || _player$selectedNodes === void 0 || _player$selectedNodes.forEach(function (nodeId) {
|
|
80369
80381
|
var element = _this43.getElementByNodeId(nodeId);
|
|
80370
|
-
element
|
|
80382
|
+
if (element) {
|
|
80383
|
+
element.component.setHighlightColor(false, player.color);
|
|
80384
|
+
}
|
|
80371
80385
|
});
|
|
80372
80386
|
},
|
|
80373
80387
|
/**
|
|
@@ -80385,7 +80399,9 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
80385
80399
|
});
|
|
80386
80400
|
data === null || data === void 0 || (_data$selectedNodes = data.selectedNodes) === null || _data$selectedNodes === void 0 || _data$selectedNodes.forEach(function (nodeId) {
|
|
80387
80401
|
var element = _this44.getElementByNodeId(nodeId);
|
|
80388
|
-
element
|
|
80402
|
+
if (element) {
|
|
80403
|
+
element.component.setHighlightColor(true, data.color);
|
|
80404
|
+
}
|
|
80389
80405
|
});
|
|
80390
80406
|
}
|
|
80391
80407
|
},
|
|
@@ -80527,6 +80543,7 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
80527
80543
|
var _response$data;
|
|
80528
80544
|
if ((_response$data = response.data) !== null && _response$data !== void 0 && _response$data.error) {
|
|
80529
80545
|
_this46.assetFail = true;
|
|
80546
|
+
_this46.loadingAI = false;
|
|
80530
80547
|
}
|
|
80531
80548
|
}
|
|
80532
80549
|
}).catch(function (error) {
|
|
@@ -80534,6 +80551,7 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
80534
80551
|
var errorMsg = ((_error$response = error.response) === null || _error$response === void 0 || (_error$response = _error$response.data) === null || _error$response === void 0 ? void 0 : _error$response.message) || error.message;
|
|
80535
80552
|
window.ProcessMaker.alert(errorMsg, 'danger');
|
|
80536
80553
|
_this46.assetFail = true;
|
|
80554
|
+
_this46.loadingAI = false;
|
|
80537
80555
|
});
|
|
80538
80556
|
},
|
|
80539
80557
|
highlightTaskArrays: function highlightTaskArrays(data) {
|
|
@@ -80589,6 +80607,7 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
80589
80607
|
window.ProcessMaker.alert(response.data.message, 'danger');
|
|
80590
80608
|
// Stop and show error
|
|
80591
80609
|
_this47.assetFail = true;
|
|
80610
|
+
_this47.loadingAI = false;
|
|
80592
80611
|
} else {
|
|
80593
80612
|
_this47.setPromptSessions(response.data.promptSessionId);
|
|
80594
80613
|
// Successful generation
|
|
@@ -80622,6 +80641,7 @@ var Multiplayer = /*#__PURE__*/function () {
|
|
|
80622
80641
|
window.Echo.private(channel).listen(streamProgressEvent, function () {
|
|
80623
80642
|
// Output error
|
|
80624
80643
|
_this48.assetFail = true;
|
|
80644
|
+
_this48.loadingAI = false;
|
|
80625
80645
|
});
|
|
80626
80646
|
},
|
|
80627
80647
|
onStopAssetGeneration: function onStopAssetGeneration() {
|
|
@@ -80867,8 +80887,8 @@ var modelervue_type_style_index_0_prod_lang_scss_ = __webpack_require__(26695);
|
|
|
80867
80887
|
|
|
80868
80888
|
var Modeler_component = normalizeComponent(
|
|
80869
80889
|
modeler_Modelervue_type_script_lang_js_,
|
|
80870
|
-
|
|
80871
|
-
|
|
80890
|
+
Modelervue_type_template_id_7e5b2922_render,
|
|
80891
|
+
Modelervue_type_template_id_7e5b2922_staticRenderFns,
|
|
80872
80892
|
false,
|
|
80873
80893
|
null,
|
|
80874
80894
|
null,
|