@processmaker/modeler 1.39.1 → 1.39.3
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 +116 -70
- package/dist/modeler.common.js.map +1 -1
- package/dist/modeler.umd.js +116 -70
- package/dist/modeler.umd.js.map +1 -1
- package/dist/modeler.umd.min.js +2 -2
- package/dist/modeler.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/src/components/inspectors/inspector.scss +1 -1
- package/src/mixins/linkConfig.js +22 -3
package/dist/modeler.umd.js
CHANGED
|
@@ -11048,7 +11048,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
11048
11048
|
|
|
11049
11049
|
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()));
|
|
11050
11050
|
// Module
|
|
11051
|
-
___CSS_LOADER_EXPORT___.push([module.id, ".inspector-column[data-v-738023ac]{max-width:
|
|
11051
|
+
___CSS_LOADER_EXPORT___.push([module.id, ".inspector-column[data-v-738023ac]{max-width:330px}.inspector[data-v-738023ac]{z-index:2}.inspector-container[data-v-738023ac]{text-align:left;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;padding-bottom:4rem}.inspector-container .form-group[data-v-738023ac]{padding:0 .5rem}.inspector-container .form-group>label[data-v-738023ac]{font-size:.8125rem}.inspector-container .inspector-font-size[data-v-738023ac]{font-size:.875rem}.inspector-header[data-v-738023ac]{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}.inspector-header-title[data-v-738023ac]{-webkit-box-flex:0;-ms-flex-positive:0;font-weight:600;letter-spacing:-.02em;flex-grow:0}", ""]);
|
|
11052
11052
|
// Exports
|
|
11053
11053
|
/* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___);
|
|
11054
11054
|
|
|
@@ -27142,6 +27142,7 @@ function isPoint(item) {
|
|
|
27142
27142
|
sourceShape: null,
|
|
27143
27143
|
target: null,
|
|
27144
27144
|
listeningToMouseup: false,
|
|
27145
|
+
listeningToMouseleave: false,
|
|
27145
27146
|
vertices: null,
|
|
27146
27147
|
anchorPointFunction: getDefaultAnchorPoint
|
|
27147
27148
|
};
|
|
@@ -27273,10 +27274,11 @@ function isPoint(item) {
|
|
|
27273
27274
|
var targetShape = this.shape.getTargetElement();
|
|
27274
27275
|
resetShapeColor(targetShape);
|
|
27275
27276
|
this.shape.on('change:vertices', this.onChangeVertices);
|
|
27276
|
-
this.shape.on('change:source', this.
|
|
27277
|
-
this.shape.on('change:target', this.
|
|
27277
|
+
this.shape.on('change:source', this.onChangeTargets);
|
|
27278
|
+
this.shape.on('change:target', this.onChangeTargets);
|
|
27278
27279
|
this.shape.listenTo(this.sourceShape, 'change:position', this.updateWaypoints);
|
|
27279
27280
|
this.shape.listenTo(targetShape, 'change:position', this.updateWaypoints);
|
|
27281
|
+
this.shape.listenTo(this.paper, 'link:mouseleave', this.storeWaypoints);
|
|
27280
27282
|
var sourceShape = this.shape.getSourceElement();
|
|
27281
27283
|
sourceShape.embed(this.shape);
|
|
27282
27284
|
this.$emit('set-shape-stacking', sourceShape);
|
|
@@ -27289,46 +27291,90 @@ function isPoint(item) {
|
|
|
27289
27291
|
resolve();
|
|
27290
27292
|
});
|
|
27291
27293
|
},
|
|
27294
|
+
storeWaypoints: function storeWaypoints() {
|
|
27295
|
+
var _this4 = this;
|
|
27296
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
27297
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
27298
|
+
while (1) switch (_context.prev = _context.next) {
|
|
27299
|
+
case 0:
|
|
27300
|
+
if (!(_this4.highlighted && !_this4.listeningToMouseleave)) {
|
|
27301
|
+
_context.next = 6;
|
|
27302
|
+
break;
|
|
27303
|
+
}
|
|
27304
|
+
_this4.updateWaypoints();
|
|
27305
|
+
_context.next = 4;
|
|
27306
|
+
return _this4.$nextTick();
|
|
27307
|
+
case 4:
|
|
27308
|
+
_this4.listeningToMouseleave = true;
|
|
27309
|
+
_this4.$emit('save-state');
|
|
27310
|
+
case 6:
|
|
27311
|
+
case "end":
|
|
27312
|
+
return _context.stop();
|
|
27313
|
+
}
|
|
27314
|
+
}, _callee);
|
|
27315
|
+
}))();
|
|
27316
|
+
},
|
|
27292
27317
|
/**
|
|
27293
27318
|
* On Change vertices handler
|
|
27294
27319
|
* @param {Object} link
|
|
27295
27320
|
* @param {Array} vertices
|
|
27296
27321
|
* @param {Object} options
|
|
27297
27322
|
*/
|
|
27298
|
-
|
|
27299
|
-
var
|
|
27300
|
-
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
27301
|
-
return _regeneratorRuntime().wrap(function
|
|
27302
|
-
while (1) switch (
|
|
27323
|
+
onChangeTargets: function onChangeTargets(link, vertices, options) {
|
|
27324
|
+
var _this5 = this;
|
|
27325
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
27326
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
27327
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
27303
27328
|
case 0:
|
|
27304
27329
|
if (!(options && options.ui)) {
|
|
27305
|
-
|
|
27330
|
+
_context2.next = 7;
|
|
27306
27331
|
break;
|
|
27307
27332
|
}
|
|
27308
|
-
|
|
27309
|
-
return
|
|
27333
|
+
_context2.next = 3;
|
|
27334
|
+
return _this5.$nextTick();
|
|
27310
27335
|
case 3:
|
|
27311
|
-
|
|
27312
|
-
return
|
|
27336
|
+
_context2.next = 5;
|
|
27337
|
+
return _this5.waitForUpdateWaypoints();
|
|
27313
27338
|
case 5:
|
|
27314
|
-
|
|
27315
|
-
return
|
|
27339
|
+
_context2.next = 7;
|
|
27340
|
+
return _this5.storeWaypoints();
|
|
27316
27341
|
case 7:
|
|
27317
|
-
_this4.$emit('save-state');
|
|
27318
|
-
case 8:
|
|
27319
27342
|
case "end":
|
|
27320
|
-
return
|
|
27343
|
+
return _context2.stop();
|
|
27321
27344
|
}
|
|
27322
|
-
},
|
|
27345
|
+
}, _callee2);
|
|
27346
|
+
}))();
|
|
27347
|
+
},
|
|
27348
|
+
onChangeVertices: function onChangeVertices(link, vertices, options) {
|
|
27349
|
+
var _this6 = this;
|
|
27350
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
|
|
27351
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
27352
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
27353
|
+
case 0:
|
|
27354
|
+
if (!(options && options.ui)) {
|
|
27355
|
+
_context3.next = 6;
|
|
27356
|
+
break;
|
|
27357
|
+
}
|
|
27358
|
+
_this6.updateWaypoints();
|
|
27359
|
+
_context3.next = 4;
|
|
27360
|
+
return _this6.$nextTick();
|
|
27361
|
+
case 4:
|
|
27362
|
+
_this6.listeningToMouseleave = false;
|
|
27363
|
+
_this6.$emit('save-state');
|
|
27364
|
+
case 6:
|
|
27365
|
+
case "end":
|
|
27366
|
+
return _context3.stop();
|
|
27367
|
+
}
|
|
27368
|
+
}, _callee3);
|
|
27323
27369
|
}))();
|
|
27324
27370
|
},
|
|
27325
27371
|
updateWaypoints: function updateWaypoints() {
|
|
27326
|
-
var
|
|
27372
|
+
var _this7 = this;
|
|
27327
27373
|
var linkView = this.shape.findView(this.paper);
|
|
27328
27374
|
var start = linkView.sourceAnchor;
|
|
27329
27375
|
var end = linkView.targetAnchor;
|
|
27330
27376
|
this.node.diagram.waypoint = [start].concat(_toConsumableArray(this.shape.vertices()), [end]).map(function (point) {
|
|
27331
|
-
return
|
|
27377
|
+
return _this7.moddle.create('dc:Point', point);
|
|
27332
27378
|
});
|
|
27333
27379
|
if (!this.listeningToMouseup) {
|
|
27334
27380
|
this.listeningToMouseup = true;
|
|
@@ -27336,7 +27382,7 @@ function isPoint(item) {
|
|
|
27336
27382
|
}
|
|
27337
27383
|
},
|
|
27338
27384
|
updateLinkTarget: function updateLinkTarget(_ref) {
|
|
27339
|
-
var
|
|
27385
|
+
var _this8 = this;
|
|
27340
27386
|
var clientX = _ref.clientX,
|
|
27341
27387
|
clientY = _ref.clientY;
|
|
27342
27388
|
var localMousePosition = this.paper.clientToLocalPoint({
|
|
@@ -27365,19 +27411,19 @@ function isPoint(item) {
|
|
|
27365
27411
|
setShapeColor(this.target, validNodeColor);
|
|
27366
27412
|
this.paper.el.removeEventListener('mousemove', this.updateLinkTarget);
|
|
27367
27413
|
this.shape.listenToOnce(this.paper, 'cell:pointerclick', function () {
|
|
27368
|
-
|
|
27369
|
-
|
|
27370
|
-
|
|
27371
|
-
if (
|
|
27372
|
-
|
|
27414
|
+
_this8.completeLink();
|
|
27415
|
+
_this8.updateWaypoints();
|
|
27416
|
+
_this8.updateWaypoints.flush();
|
|
27417
|
+
if (_this8.updateDefinitionLinks) {
|
|
27418
|
+
_this8.updateDefinitionLinks();
|
|
27373
27419
|
}
|
|
27374
|
-
|
|
27420
|
+
_this8.$emit('save-state');
|
|
27375
27421
|
});
|
|
27376
27422
|
this.shape.listenToOnce(this.paper, 'cell:mouseleave', function () {
|
|
27377
|
-
|
|
27378
|
-
|
|
27379
|
-
resetShapeColor(
|
|
27380
|
-
|
|
27423
|
+
_this8.paper.el.addEventListener('mousemove', _this8.updateLinkTarget);
|
|
27424
|
+
_this8.shape.stopListening(_this8.paper, 'cell:pointerclick');
|
|
27425
|
+
resetShapeColor(_this8.target);
|
|
27426
|
+
_this8.$emit('set-cursor', 'not-allowed');
|
|
27381
27427
|
});
|
|
27382
27428
|
},
|
|
27383
27429
|
removeLink: function removeLink() {
|
|
@@ -27427,49 +27473,49 @@ function isPoint(item) {
|
|
|
27427
27473
|
this.emitSave.bind(this);
|
|
27428
27474
|
},
|
|
27429
27475
|
mounted: function mounted() {
|
|
27430
|
-
var
|
|
27431
|
-
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
27432
|
-
var targetRef, targetShape, sequenceFlowWaypoints, sourceAnchorPoint, targetAnchorPoint, _targetShape$position, targetX, targetY, targetAnchorOffset,
|
|
27433
|
-
return _regeneratorRuntime().wrap(function
|
|
27434
|
-
while (1) switch (
|
|
27476
|
+
var _this9 = this;
|
|
27477
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
|
|
27478
|
+
var targetRef, targetShape, sequenceFlowWaypoints, sourceAnchorPoint, targetAnchorPoint, _targetShape$position, targetX, targetY, targetAnchorOffset, _this9$sourceShape$po, sourceX, sourceY, sourceAnchorOffset, sequenceVertices;
|
|
27479
|
+
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
27480
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
27435
27481
|
case 0:
|
|
27436
|
-
|
|
27437
|
-
return
|
|
27482
|
+
_context4.next = 2;
|
|
27483
|
+
return _this9.$nextTick();
|
|
27438
27484
|
case 2:
|
|
27439
27485
|
/* Use nextTick to ensure this code runs after the component it is mixed into mounts.
|
|
27440
27486
|
* This will ensure this.shape is defined. */
|
|
27441
27487
|
|
|
27442
|
-
|
|
27443
|
-
|
|
27444
|
-
|
|
27445
|
-
|
|
27488
|
+
_this9.sourceShape = _this9.findSourceShape();
|
|
27489
|
+
_this9.setSource(_this9.sourceShape);
|
|
27490
|
+
_this9.$once('click', function () {
|
|
27491
|
+
_this9.$nextTick(function () {
|
|
27446
27492
|
if (store.getters.isReadOnly) {
|
|
27447
27493
|
return;
|
|
27448
27494
|
}
|
|
27449
|
-
|
|
27495
|
+
_this9.setupLinkTools();
|
|
27450
27496
|
});
|
|
27451
27497
|
});
|
|
27452
|
-
targetRef =
|
|
27498
|
+
targetRef = _this9.getTargetRef ? _this9.getTargetRef() : _this9.node.definition.get('targetRef'); // if flow doesn't have a targetRef such as incomplete node, return
|
|
27453
27499
|
if (targetRef) {
|
|
27454
|
-
|
|
27500
|
+
_context4.next = 8;
|
|
27455
27501
|
break;
|
|
27456
27502
|
}
|
|
27457
|
-
return
|
|
27503
|
+
return _context4.abrupt("return");
|
|
27458
27504
|
case 8:
|
|
27459
27505
|
if (targetRef.id) {
|
|
27460
|
-
targetShape =
|
|
27506
|
+
targetShape = _this9.graph.getElements().find(function (element) {
|
|
27461
27507
|
return element.component && element.component.node.definition === targetRef;
|
|
27462
27508
|
});
|
|
27463
|
-
|
|
27464
|
-
sequenceFlowWaypoints =
|
|
27465
|
-
sourceAnchorPoint =
|
|
27509
|
+
_this9.target = targetShape;
|
|
27510
|
+
sequenceFlowWaypoints = _this9.node.diagram.waypoint;
|
|
27511
|
+
sourceAnchorPoint = _this9.node.diagram.waypoint[0];
|
|
27466
27512
|
targetAnchorPoint = sequenceFlowWaypoints[sequenceFlowWaypoints.length - 1];
|
|
27467
27513
|
_targetShape$position = targetShape.position(), targetX = _targetShape$position.x, targetY = _targetShape$position.y;
|
|
27468
27514
|
targetAnchorOffset = {
|
|
27469
27515
|
x: targetAnchorPoint.x - targetX,
|
|
27470
27516
|
y: targetAnchorPoint.y - targetY
|
|
27471
27517
|
};
|
|
27472
|
-
|
|
27518
|
+
_this9$sourceShape$po = _this9.sourceShape.position(), sourceX = _this9$sourceShape$po.x, sourceY = _this9$sourceShape$po.y;
|
|
27473
27519
|
sourceAnchorOffset = {
|
|
27474
27520
|
x: sourceAnchorPoint.x - sourceX,
|
|
27475
27521
|
y: sourceAnchorPoint.y - sourceY
|
|
@@ -27483,38 +27529,38 @@ function isPoint(item) {
|
|
|
27483
27529
|
y: y
|
|
27484
27530
|
};
|
|
27485
27531
|
});
|
|
27486
|
-
|
|
27532
|
+
_this9.shape.vertices(sequenceVertices);
|
|
27487
27533
|
}
|
|
27488
|
-
|
|
27489
|
-
|
|
27490
|
-
|
|
27534
|
+
_this9.setSource(_this9.sourceShape, sourceAnchorOffset);
|
|
27535
|
+
_this9.setTarget(targetShape, targetAnchorOffset);
|
|
27536
|
+
_this9.completeLink();
|
|
27491
27537
|
} else {
|
|
27492
|
-
|
|
27493
|
-
|
|
27494
|
-
|
|
27495
|
-
|
|
27496
|
-
if (
|
|
27497
|
-
|
|
27538
|
+
_this9.setTarget(targetRef);
|
|
27539
|
+
_this9.paper.setInteractivity(false);
|
|
27540
|
+
_this9.paper.el.addEventListener('mousemove', _this9.updateLinkTarget);
|
|
27541
|
+
_this9.$emit('set-cursor', 'not-allowed');
|
|
27542
|
+
if (_this9.isValidConnection) {
|
|
27543
|
+
_this9.shape.stopListening(_this9.paper, 'blank:pointerdown link:pointerdown element:pointerdown', _this9.removeLink);
|
|
27498
27544
|
} else {
|
|
27499
|
-
|
|
27545
|
+
_this9.shape.listenToOnce(_this9.paper, 'blank:pointerdown link:pointerdown element:pointerdown', _this9.removeLink);
|
|
27500
27546
|
}
|
|
27501
27547
|
}
|
|
27502
|
-
|
|
27503
|
-
|
|
27548
|
+
_this9.updateRouter();
|
|
27549
|
+
_this9.shape.on('change:vertices', function () {
|
|
27504
27550
|
this.component.$emit('shape-resize');
|
|
27505
27551
|
});
|
|
27506
27552
|
if (store.getters.isReadOnly) {
|
|
27507
|
-
|
|
27508
|
-
|
|
27509
|
-
|
|
27553
|
+
_this9.$nextTick(function () {
|
|
27554
|
+
_this9.paperManager.awaitScheduledUpdates().then(function () {
|
|
27555
|
+
_this9.setShapeHighlight();
|
|
27510
27556
|
});
|
|
27511
27557
|
});
|
|
27512
27558
|
}
|
|
27513
27559
|
case 12:
|
|
27514
27560
|
case "end":
|
|
27515
|
-
return
|
|
27561
|
+
return _context4.stop();
|
|
27516
27562
|
}
|
|
27517
|
-
},
|
|
27563
|
+
}, _callee4);
|
|
27518
27564
|
}))();
|
|
27519
27565
|
},
|
|
27520
27566
|
beforeDestroy: function beforeDestroy() {
|