@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.
@@ -11038,7 +11038,7 @@ __webpack_require__.r(__webpack_exports__);
11038
11038
 
11039
11039
  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()));
11040
11040
  // Module
11041
- ___CSS_LOADER_EXPORT___.push([module.id, ".inspector-column[data-v-738023ac]{max-width:265px}.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}", ""]);
11041
+ ___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}", ""]);
11042
11042
  // Exports
11043
11043
  /* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___);
11044
11044
 
@@ -27044,6 +27044,7 @@ function isPoint(item) {
27044
27044
  sourceShape: null,
27045
27045
  target: null,
27046
27046
  listeningToMouseup: false,
27047
+ listeningToMouseleave: false,
27047
27048
  vertices: null,
27048
27049
  anchorPointFunction: getDefaultAnchorPoint
27049
27050
  };
@@ -27175,10 +27176,11 @@ function isPoint(item) {
27175
27176
  var targetShape = this.shape.getTargetElement();
27176
27177
  resetShapeColor(targetShape);
27177
27178
  this.shape.on('change:vertices', this.onChangeVertices);
27178
- this.shape.on('change:source', this.onChangeVertices);
27179
- this.shape.on('change:target', this.onChangeVertices);
27179
+ this.shape.on('change:source', this.onChangeTargets);
27180
+ this.shape.on('change:target', this.onChangeTargets);
27180
27181
  this.shape.listenTo(this.sourceShape, 'change:position', this.updateWaypoints);
27181
27182
  this.shape.listenTo(targetShape, 'change:position', this.updateWaypoints);
27183
+ this.shape.listenTo(this.paper, 'link:mouseleave', this.storeWaypoints);
27182
27184
  var sourceShape = this.shape.getSourceElement();
27183
27185
  sourceShape.embed(this.shape);
27184
27186
  this.$emit('set-shape-stacking', sourceShape);
@@ -27191,46 +27193,90 @@ function isPoint(item) {
27191
27193
  resolve();
27192
27194
  });
27193
27195
  },
27196
+ storeWaypoints: function storeWaypoints() {
27197
+ var _this4 = this;
27198
+ return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
27199
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
27200
+ while (1) switch (_context.prev = _context.next) {
27201
+ case 0:
27202
+ if (!(_this4.highlighted && !_this4.listeningToMouseleave)) {
27203
+ _context.next = 6;
27204
+ break;
27205
+ }
27206
+ _this4.updateWaypoints();
27207
+ _context.next = 4;
27208
+ return _this4.$nextTick();
27209
+ case 4:
27210
+ _this4.listeningToMouseleave = true;
27211
+ _this4.$emit('save-state');
27212
+ case 6:
27213
+ case "end":
27214
+ return _context.stop();
27215
+ }
27216
+ }, _callee);
27217
+ }))();
27218
+ },
27194
27219
  /**
27195
27220
  * On Change vertices handler
27196
27221
  * @param {Object} link
27197
27222
  * @param {Array} vertices
27198
27223
  * @param {Object} options
27199
27224
  */
27200
- onChangeVertices: function onChangeVertices(link, vertices, options) {
27201
- var _this4 = this;
27202
- return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
27203
- return _regeneratorRuntime().wrap(function _callee$(_context) {
27204
- while (1) switch (_context.prev = _context.next) {
27225
+ onChangeTargets: function onChangeTargets(link, vertices, options) {
27226
+ var _this5 = this;
27227
+ return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
27228
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
27229
+ while (1) switch (_context2.prev = _context2.next) {
27205
27230
  case 0:
27206
27231
  if (!(options && options.ui)) {
27207
- _context.next = 8;
27232
+ _context2.next = 7;
27208
27233
  break;
27209
27234
  }
27210
- _context.next = 3;
27211
- return _this4.$nextTick();
27235
+ _context2.next = 3;
27236
+ return _this5.$nextTick();
27212
27237
  case 3:
27213
- _context.next = 5;
27214
- return _this4.waitForUpdateWaypoints();
27238
+ _context2.next = 5;
27239
+ return _this5.waitForUpdateWaypoints();
27215
27240
  case 5:
27216
- _context.next = 7;
27217
- return _this4.$nextTick();
27241
+ _context2.next = 7;
27242
+ return _this5.storeWaypoints();
27218
27243
  case 7:
27219
- _this4.$emit('save-state');
27220
- case 8:
27221
27244
  case "end":
27222
- return _context.stop();
27245
+ return _context2.stop();
27223
27246
  }
27224
- }, _callee);
27247
+ }, _callee2);
27248
+ }))();
27249
+ },
27250
+ onChangeVertices: function onChangeVertices(link, vertices, options) {
27251
+ var _this6 = this;
27252
+ return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
27253
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
27254
+ while (1) switch (_context3.prev = _context3.next) {
27255
+ case 0:
27256
+ if (!(options && options.ui)) {
27257
+ _context3.next = 6;
27258
+ break;
27259
+ }
27260
+ _this6.updateWaypoints();
27261
+ _context3.next = 4;
27262
+ return _this6.$nextTick();
27263
+ case 4:
27264
+ _this6.listeningToMouseleave = false;
27265
+ _this6.$emit('save-state');
27266
+ case 6:
27267
+ case "end":
27268
+ return _context3.stop();
27269
+ }
27270
+ }, _callee3);
27225
27271
  }))();
27226
27272
  },
27227
27273
  updateWaypoints: function updateWaypoints() {
27228
- var _this5 = this;
27274
+ var _this7 = this;
27229
27275
  var linkView = this.shape.findView(this.paper);
27230
27276
  var start = linkView.sourceAnchor;
27231
27277
  var end = linkView.targetAnchor;
27232
27278
  this.node.diagram.waypoint = [start].concat(_toConsumableArray(this.shape.vertices()), [end]).map(function (point) {
27233
- return _this5.moddle.create('dc:Point', point);
27279
+ return _this7.moddle.create('dc:Point', point);
27234
27280
  });
27235
27281
  if (!this.listeningToMouseup) {
27236
27282
  this.listeningToMouseup = true;
@@ -27238,7 +27284,7 @@ function isPoint(item) {
27238
27284
  }
27239
27285
  },
27240
27286
  updateLinkTarget: function updateLinkTarget(_ref) {
27241
- var _this6 = this;
27287
+ var _this8 = this;
27242
27288
  var clientX = _ref.clientX,
27243
27289
  clientY = _ref.clientY;
27244
27290
  var localMousePosition = this.paper.clientToLocalPoint({
@@ -27267,19 +27313,19 @@ function isPoint(item) {
27267
27313
  setShapeColor(this.target, validNodeColor);
27268
27314
  this.paper.el.removeEventListener('mousemove', this.updateLinkTarget);
27269
27315
  this.shape.listenToOnce(this.paper, 'cell:pointerclick', function () {
27270
- _this6.completeLink();
27271
- _this6.updateWaypoints();
27272
- _this6.updateWaypoints.flush();
27273
- if (_this6.updateDefinitionLinks) {
27274
- _this6.updateDefinitionLinks();
27316
+ _this8.completeLink();
27317
+ _this8.updateWaypoints();
27318
+ _this8.updateWaypoints.flush();
27319
+ if (_this8.updateDefinitionLinks) {
27320
+ _this8.updateDefinitionLinks();
27275
27321
  }
27276
- _this6.$emit('save-state');
27322
+ _this8.$emit('save-state');
27277
27323
  });
27278
27324
  this.shape.listenToOnce(this.paper, 'cell:mouseleave', function () {
27279
- _this6.paper.el.addEventListener('mousemove', _this6.updateLinkTarget);
27280
- _this6.shape.stopListening(_this6.paper, 'cell:pointerclick');
27281
- resetShapeColor(_this6.target);
27282
- _this6.$emit('set-cursor', 'not-allowed');
27325
+ _this8.paper.el.addEventListener('mousemove', _this8.updateLinkTarget);
27326
+ _this8.shape.stopListening(_this8.paper, 'cell:pointerclick');
27327
+ resetShapeColor(_this8.target);
27328
+ _this8.$emit('set-cursor', 'not-allowed');
27283
27329
  });
27284
27330
  },
27285
27331
  removeLink: function removeLink() {
@@ -27329,49 +27375,49 @@ function isPoint(item) {
27329
27375
  this.emitSave.bind(this);
27330
27376
  },
27331
27377
  mounted: function mounted() {
27332
- var _this7 = this;
27333
- return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
27334
- var targetRef, targetShape, sequenceFlowWaypoints, sourceAnchorPoint, targetAnchorPoint, _targetShape$position, targetX, targetY, targetAnchorOffset, _this7$sourceShape$po, sourceX, sourceY, sourceAnchorOffset, sequenceVertices;
27335
- return _regeneratorRuntime().wrap(function _callee2$(_context2) {
27336
- while (1) switch (_context2.prev = _context2.next) {
27378
+ var _this9 = this;
27379
+ return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
27380
+ var targetRef, targetShape, sequenceFlowWaypoints, sourceAnchorPoint, targetAnchorPoint, _targetShape$position, targetX, targetY, targetAnchorOffset, _this9$sourceShape$po, sourceX, sourceY, sourceAnchorOffset, sequenceVertices;
27381
+ return _regeneratorRuntime().wrap(function _callee4$(_context4) {
27382
+ while (1) switch (_context4.prev = _context4.next) {
27337
27383
  case 0:
27338
- _context2.next = 2;
27339
- return _this7.$nextTick();
27384
+ _context4.next = 2;
27385
+ return _this9.$nextTick();
27340
27386
  case 2:
27341
27387
  /* Use nextTick to ensure this code runs after the component it is mixed into mounts.
27342
27388
  * This will ensure this.shape is defined. */
27343
27389
 
27344
- _this7.sourceShape = _this7.findSourceShape();
27345
- _this7.setSource(_this7.sourceShape);
27346
- _this7.$once('click', function () {
27347
- _this7.$nextTick(function () {
27390
+ _this9.sourceShape = _this9.findSourceShape();
27391
+ _this9.setSource(_this9.sourceShape);
27392
+ _this9.$once('click', function () {
27393
+ _this9.$nextTick(function () {
27348
27394
  if (store.getters.isReadOnly) {
27349
27395
  return;
27350
27396
  }
27351
- _this7.setupLinkTools();
27397
+ _this9.setupLinkTools();
27352
27398
  });
27353
27399
  });
27354
- targetRef = _this7.getTargetRef ? _this7.getTargetRef() : _this7.node.definition.get('targetRef'); // if flow doesn't have a targetRef such as incomplete node, return
27400
+ targetRef = _this9.getTargetRef ? _this9.getTargetRef() : _this9.node.definition.get('targetRef'); // if flow doesn't have a targetRef such as incomplete node, return
27355
27401
  if (targetRef) {
27356
- _context2.next = 8;
27402
+ _context4.next = 8;
27357
27403
  break;
27358
27404
  }
27359
- return _context2.abrupt("return");
27405
+ return _context4.abrupt("return");
27360
27406
  case 8:
27361
27407
  if (targetRef.id) {
27362
- targetShape = _this7.graph.getElements().find(function (element) {
27408
+ targetShape = _this9.graph.getElements().find(function (element) {
27363
27409
  return element.component && element.component.node.definition === targetRef;
27364
27410
  });
27365
- _this7.target = targetShape;
27366
- sequenceFlowWaypoints = _this7.node.diagram.waypoint;
27367
- sourceAnchorPoint = _this7.node.diagram.waypoint[0];
27411
+ _this9.target = targetShape;
27412
+ sequenceFlowWaypoints = _this9.node.diagram.waypoint;
27413
+ sourceAnchorPoint = _this9.node.diagram.waypoint[0];
27368
27414
  targetAnchorPoint = sequenceFlowWaypoints[sequenceFlowWaypoints.length - 1];
27369
27415
  _targetShape$position = targetShape.position(), targetX = _targetShape$position.x, targetY = _targetShape$position.y;
27370
27416
  targetAnchorOffset = {
27371
27417
  x: targetAnchorPoint.x - targetX,
27372
27418
  y: targetAnchorPoint.y - targetY
27373
27419
  };
27374
- _this7$sourceShape$po = _this7.sourceShape.position(), sourceX = _this7$sourceShape$po.x, sourceY = _this7$sourceShape$po.y;
27420
+ _this9$sourceShape$po = _this9.sourceShape.position(), sourceX = _this9$sourceShape$po.x, sourceY = _this9$sourceShape$po.y;
27375
27421
  sourceAnchorOffset = {
27376
27422
  x: sourceAnchorPoint.x - sourceX,
27377
27423
  y: sourceAnchorPoint.y - sourceY
@@ -27385,38 +27431,38 @@ function isPoint(item) {
27385
27431
  y: y
27386
27432
  };
27387
27433
  });
27388
- _this7.shape.vertices(sequenceVertices);
27434
+ _this9.shape.vertices(sequenceVertices);
27389
27435
  }
27390
- _this7.setSource(_this7.sourceShape, sourceAnchorOffset);
27391
- _this7.setTarget(targetShape, targetAnchorOffset);
27392
- _this7.completeLink();
27436
+ _this9.setSource(_this9.sourceShape, sourceAnchorOffset);
27437
+ _this9.setTarget(targetShape, targetAnchorOffset);
27438
+ _this9.completeLink();
27393
27439
  } else {
27394
- _this7.setTarget(targetRef);
27395
- _this7.paper.setInteractivity(false);
27396
- _this7.paper.el.addEventListener('mousemove', _this7.updateLinkTarget);
27397
- _this7.$emit('set-cursor', 'not-allowed');
27398
- if (_this7.isValidConnection) {
27399
- _this7.shape.stopListening(_this7.paper, 'blank:pointerdown link:pointerdown element:pointerdown', _this7.removeLink);
27440
+ _this9.setTarget(targetRef);
27441
+ _this9.paper.setInteractivity(false);
27442
+ _this9.paper.el.addEventListener('mousemove', _this9.updateLinkTarget);
27443
+ _this9.$emit('set-cursor', 'not-allowed');
27444
+ if (_this9.isValidConnection) {
27445
+ _this9.shape.stopListening(_this9.paper, 'blank:pointerdown link:pointerdown element:pointerdown', _this9.removeLink);
27400
27446
  } else {
27401
- _this7.shape.listenToOnce(_this7.paper, 'blank:pointerdown link:pointerdown element:pointerdown', _this7.removeLink);
27447
+ _this9.shape.listenToOnce(_this9.paper, 'blank:pointerdown link:pointerdown element:pointerdown', _this9.removeLink);
27402
27448
  }
27403
27449
  }
27404
- _this7.updateRouter();
27405
- _this7.shape.on('change:vertices', function () {
27450
+ _this9.updateRouter();
27451
+ _this9.shape.on('change:vertices', function () {
27406
27452
  this.component.$emit('shape-resize');
27407
27453
  });
27408
27454
  if (store.getters.isReadOnly) {
27409
- _this7.$nextTick(function () {
27410
- _this7.paperManager.awaitScheduledUpdates().then(function () {
27411
- _this7.setShapeHighlight();
27455
+ _this9.$nextTick(function () {
27456
+ _this9.paperManager.awaitScheduledUpdates().then(function () {
27457
+ _this9.setShapeHighlight();
27412
27458
  });
27413
27459
  });
27414
27460
  }
27415
27461
  case 12:
27416
27462
  case "end":
27417
- return _context2.stop();
27463
+ return _context4.stop();
27418
27464
  }
27419
- }, _callee2);
27465
+ }, _callee4);
27420
27466
  }))();
27421
27467
  },
27422
27468
  beforeDestroy: function beforeDestroy() {