@processmaker/modeler 1.43.7 → 1.43.8

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.
@@ -48231,10 +48231,10 @@ var ValidationStatus_component = normalizeComponent(
48231
48231
  )
48232
48232
 
48233
48233
  /* harmony default export */ var ValidationStatus = (ValidationStatus_component.exports);
48234
- ;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/modeler/Modeler.vue?vue&type=template&id=27bb3680&
48234
+ ;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/modeler/Modeler.vue?vue&type=template&id=407e7f2f&
48235
48235
 
48236
48236
 
48237
- var Modelervue_type_template_id_27bb3680_render = function render() {
48237
+ var Modelervue_type_template_id_407e7f2f_render = function render() {
48238
48238
  var _vm = this,
48239
48239
  _c = _vm._self._c;
48240
48240
  return _c('span', {
@@ -48514,9 +48514,9 @@ var Modelervue_type_template_id_27bb3680_render = function render() {
48514
48514
  });
48515
48515
  })], 2)], 1);
48516
48516
  };
48517
- var Modelervue_type_template_id_27bb3680_staticRenderFns = [];
48517
+ var Modelervue_type_template_id_407e7f2f_staticRenderFns = [];
48518
48518
 
48519
- ;// CONCATENATED MODULE: ./src/components/modeler/Modeler.vue?vue&type=template&id=27bb3680&
48519
+ ;// CONCATENATED MODULE: ./src/components/modeler/Modeler.vue?vue&type=template&id=407e7f2f&
48520
48520
 
48521
48521
  ;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/nodes/boundaryEvent/boundaryEvent.vue?vue&type=template&id=728530a2&
48522
48522
  var boundaryEventvue_type_template_id_728530a2_render = function render() {
@@ -80408,6 +80408,9 @@ var Multiplayer = /*#__PURE__*/function () {
80408
80408
  var _window$ProcessMaker7,
80409
80409
  _this46 = this;
80410
80410
  this.getNonce();
80411
+
80412
+ // Show Generating message
80413
+ this.loadingAI = true;
80411
80414
  this.fetchHistory();
80412
80415
  var params = {
80413
80416
  promptSessionId: this.promptSessionId,
@@ -80415,8 +80418,13 @@ var Multiplayer = /*#__PURE__*/function () {
80415
80418
  processId: (_window$ProcessMaker7 = window.ProcessMaker) === null || _window$ProcessMaker7 === void 0 || (_window$ProcessMaker7 = _window$ProcessMaker7.modeler) === null || _window$ProcessMaker7 === void 0 || (_window$ProcessMaker7 = _window$ProcessMaker7.process) === null || _window$ProcessMaker7 === void 0 ? void 0 : _window$ProcessMaker7.id
80416
80419
  };
80417
80420
  var url = '/package-ai/generateProcessArtifacts';
80418
- window.ProcessMaker.apiClient.post(url, params).then(function () {
80419
- // Response
80421
+ window.ProcessMaker.apiClient.post(url, params).then(function (response) {
80422
+ if (response.data) {
80423
+ var _response$data;
80424
+ if ((_response$data = response.data) !== null && _response$data !== void 0 && _response$data.error) {
80425
+ _this46.assetFail = true;
80426
+ }
80427
+ }
80420
80428
  }).catch(function (error) {
80421
80429
  var _error$response;
80422
80430
  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;
@@ -80490,6 +80498,16 @@ var Multiplayer = /*#__PURE__*/function () {
80490
80498
  }
80491
80499
  });
80492
80500
  },
80501
+ subscribeToErrors: function subscribeToErrors() {
80502
+ var _window$ProcessMaker9,
80503
+ _this48 = this;
80504
+ var channel = "ProcessMaker.Models.User.".concat((_window$ProcessMaker9 = window.ProcessMaker) === null || _window$ProcessMaker9 === void 0 || (_window$ProcessMaker9 = _window$ProcessMaker9.modeler) === null || _window$ProcessMaker9 === void 0 || (_window$ProcessMaker9 = _window$ProcessMaker9.process) === null || _window$ProcessMaker9 === void 0 ? void 0 : _window$ProcessMaker9.user_id);
80505
+ var streamProgressEvent = '.ProcessMaker\\Package\\PackageAi\\Events\\GenerateArtifactsErrorEvent';
80506
+ window.Echo.private(channel).listen(streamProgressEvent, function () {
80507
+ // Output error
80508
+ _this48.assetFail = true;
80509
+ });
80510
+ },
80493
80511
  onStopAssetGeneration: function onStopAssetGeneration() {
80494
80512
  if (this.currentNonce) {
80495
80513
  this.cancelledJobs.push(this.currentNonce);
@@ -80533,7 +80551,7 @@ var Multiplayer = /*#__PURE__*/function () {
80533
80551
  this.$emit('set-xml-manager', this.xmlManager);
80534
80552
  },
80535
80553
  mounted: function mounted() {
80536
- var _this48 = this;
80554
+ var _this49 = this;
80537
80555
  store.commit('setReadOnly', this.readOnly);
80538
80556
  this.graph = new external_jointjs_namespaceObject.dia.Graph();
80539
80557
  store.commit('setGraph', this.graph);
@@ -80552,47 +80570,47 @@ var Multiplayer = /*#__PURE__*/function () {
80552
80570
  store.commit('setPaper', this.paperManager.paper);
80553
80571
  this.paperManager.addEventHandler('element:pointerclick', this.blurFocusedScreenBuilderElement, this);
80554
80572
  this.paperManager.addEventHandler('blank:pointerdown', function (event, x, y) {
80555
- if (_this48.isGrabbing) return;
80573
+ if (_this49.isGrabbing) return;
80556
80574
  if (store.getters.isReadOnly) {
80557
- _this48.isGrabbing = true;
80575
+ _this49.isGrabbing = true;
80558
80576
  }
80559
- var scale = _this48.paperManager.scale;
80560
- _this48.canvasDragPosition = {
80577
+ var scale = _this49.paperManager.scale;
80578
+ _this49.canvasDragPosition = {
80561
80579
  x: x * scale.sx,
80562
80580
  y: y * scale.sy
80563
80581
  };
80564
- _this48.isOverShape = false;
80565
- _this48.pointerDownHandler(event);
80582
+ _this49.isOverShape = false;
80583
+ _this49.pointerDownHandler(event);
80566
80584
  }, this);
80567
80585
  this.paperManager.addEventHandler('cell:mouseover element:mouseover', function (_ref19) {
80568
80586
  var shape = _ref19.model;
80569
- if (_this48.isBpmnNode(shape) && shape.attr('body/cursor') !== 'default' && !_this48.isGrabbing) {
80587
+ if (_this49.isBpmnNode(shape) && shape.attr('body/cursor') !== 'default' && !_this49.isGrabbing) {
80570
80588
  shape.attr('body/cursor', 'move');
80571
80589
  }
80572
80590
  // If the user is panning the Paper while hovering an element, ignore the default move cursor
80573
- if (_this48.isGrabbing && _this48.isBpmnNode(shape)) {
80591
+ if (_this49.isGrabbing && _this49.isBpmnNode(shape)) {
80574
80592
  shape.attr('body/cursor', 'grabbing');
80575
80593
  }
80576
80594
  });
80577
80595
  this.paperManager.addEventHandler('blank:pointerup', function (event) {
80578
- _this48.isGrabbing = false;
80579
- _this48.canvasDragPosition = null;
80580
- _this48.activeNode = null;
80581
- _this48.pointerUpHandler(event);
80596
+ _this49.isGrabbing = false;
80597
+ _this49.canvasDragPosition = null;
80598
+ _this49.activeNode = null;
80599
+ _this49.pointerUpHandler(event);
80582
80600
  }, this);
80583
80601
  this.paperManager.addEventHandler('cell:pointerup', function (cellView, event) {
80584
- _this48.canvasDragPosition = null;
80585
- _this48.activeNode = null;
80586
- _this48.pointerUpHandler(event, cellView);
80602
+ _this49.canvasDragPosition = null;
80603
+ _this49.activeNode = null;
80604
+ _this49.pointerUpHandler(event, cellView);
80587
80605
  }, this);
80588
80606
  this.$refs['paper-container'].addEventListener('mouseenter', function () {
80589
80607
  store.commit('setClientLeftPaper', false);
80590
80608
  });
80591
80609
  this.$el.addEventListener('mousemove', function (event) {
80592
- _this48.pointerMoveHandler(event);
80610
+ _this49.pointerMoveHandler(event);
80593
80611
  });
80594
80612
  this.$refs['paper-container'].addEventListener('mouseleave', function () {
80595
- _this48.paperManager.removeEventHandler('blank:pointermove');
80613
+ _this49.paperManager.removeEventHandler('blank:pointermove');
80596
80614
  store.commit('setClientLeftPaper', true);
80597
80615
  });
80598
80616
  this.paperManager.addEventHandler('cell:pointerclick', function (cellView, evt, x, y) {
@@ -80603,44 +80621,44 @@ var Multiplayer = /*#__PURE__*/function () {
80603
80621
  });
80604
80622
  this.paperManager.addEventHandler('cell:pointerclick', function (_ref20, event) {
80605
80623
  var shape = _ref20.model;
80606
- if (!_this48.isBpmnNode(shape)) {
80624
+ if (!_this49.isBpmnNode(shape)) {
80607
80625
  return;
80608
80626
  }
80609
80627
 
80610
80628
  // ignore click event if the user is Grabbing the paper
80611
- if (_this48.isGrabbing) return;
80629
+ if (_this49.isGrabbing) return;
80612
80630
  shape.component.$emit('click', event);
80613
- _this48.$emit('click', {
80631
+ _this49.$emit('click', {
80614
80632
  event: event,
80615
- node: _this48.highlightedNode.definition
80633
+ node: _this49.highlightedNode.definition
80616
80634
  });
80617
80635
  });
80618
80636
  this.paperManager.addEventHandler('cell:pointerdown', function (_ref21, event) {
80619
80637
  var shape = _ref21.model;
80620
- if (!_this48.isBpmnNode(shape)) {
80638
+ if (!_this49.isBpmnNode(shape)) {
80621
80639
  return;
80622
80640
  }
80623
80641
  // If the user is pressing Space (grabbing) and clicking on a Cell, return
80624
- if (_this48.isGrabbing) {
80642
+ if (_this49.isGrabbing) {
80625
80643
  return;
80626
80644
  }
80627
- _this48.setShapeStacking(shape);
80628
- _this48.activeNode = shape.component.node;
80629
- _this48.isOverShape = true;
80630
- _this48.pointerDowInShape(event, shape);
80645
+ _this49.setShapeStacking(shape);
80646
+ _this49.activeNode = shape.component.node;
80647
+ _this49.isOverShape = true;
80648
+ _this49.pointerDowInShape(event, shape);
80631
80649
  });
80632
80650
  // If the user is grabbing the paper while he clicked in a cell, move the paper and not the cell
80633
80651
  this.paperManager.addEventHandler('cell:pointermove', function (_, event, x, y) {
80634
- if (_this48.isGrabbing) {
80635
- if (!_this48.canvasDragPosition) {
80636
- var scale = _this48.paperManager.scale;
80637
- _this48.canvasDragPosition = {
80652
+ if (_this49.isGrabbing) {
80653
+ if (!_this49.canvasDragPosition) {
80654
+ var scale = _this49.paperManager.scale;
80655
+ _this49.canvasDragPosition = {
80638
80656
  x: x * scale.sx,
80639
80657
  y: y * scale.sy
80640
80658
  };
80641
80659
  }
80642
- if (_this48.canvasDragPosition && !_this48.clientLeftPaper) {
80643
- _this48.paperManager.translate(event.offsetX - _this48.canvasDragPosition.x, event.offsetY - _this48.canvasDragPosition.y);
80660
+ if (_this49.canvasDragPosition && !_this49.clientLeftPaper) {
80661
+ _this49.paperManager.translate(event.offsetX - _this49.canvasDragPosition.x, event.offsetY - _this49.canvasDragPosition.y);
80644
80662
  }
80645
80663
  }
80646
80664
  });
@@ -80657,15 +80675,15 @@ var Multiplayer = /*#__PURE__*/function () {
80657
80675
  while (1) switch (_context33.prev = _context33.next) {
80658
80676
  case 0:
80659
80677
  _context33.next = 2;
80660
- return _this48.loadXML(xml);
80678
+ return _this49.loadXML(xml);
80661
80679
  case 2:
80662
80680
  _context33.next = 4;
80663
80681
  return undoRedoStore.dispatch('pushState', xml);
80664
80682
  case 4:
80665
80683
  try {
80666
- multiplayer = new Multiplayer(_this48);
80684
+ multiplayer = new Multiplayer(_this49);
80667
80685
  multiplayer.init();
80668
- _this48.multiplayer = multiplayer;
80686
+ _this49.multiplayer = multiplayer;
80669
80687
  } catch (error) {
80670
80688
  console.warn('Could not initialize multiplayer', error);
80671
80689
  }
@@ -80681,18 +80699,18 @@ var Multiplayer = /*#__PURE__*/function () {
80681
80699
  return loadXML;
80682
80700
  }(),
80683
80701
  addWarnings: function addWarnings(warnings) {
80684
- return _this48.$emit('warnings', warnings);
80702
+ return _this49.$emit('warnings', warnings);
80685
80703
  },
80686
80704
  addBreadcrumbs: function addBreadcrumbs(breadcrumbs) {
80687
- return _this48.breadcrumbData.push(breadcrumbs);
80705
+ return _this49.breadcrumbData.push(breadcrumbs);
80688
80706
  }
80689
80707
  });
80690
80708
  this.$root.$on('replace-ai-node', function (data) {
80691
- _this48.replaceAiNode(data);
80709
+ _this49.replaceAiNode(data);
80692
80710
  });
80693
80711
  window.ProcessMaker.EventBus.$on('save-changes', function (redirectUrl) {
80694
80712
  if (redirectUrl) {
80695
- _this48.redirect(redirectUrl);
80713
+ _this49.redirect(redirectUrl);
80696
80714
  }
80697
80715
  });
80698
80716
 
@@ -80709,6 +80727,7 @@ var Multiplayer = /*#__PURE__*/function () {
80709
80727
  this.promptSessionId = this.getPromptSessionForUser();
80710
80728
  this.fetchHistory();
80711
80729
  this.subscribeToProgress();
80730
+ this.subscribeToErrors();
80712
80731
  }
80713
80732
  });
80714
80733
  ;// CONCATENATED MODULE: ./src/components/modeler/Modeler.vue?vue&type=script&lang=js&
@@ -80728,8 +80747,8 @@ var modelervue_type_style_index_0_prod_lang_scss_ = __webpack_require__(88242);
80728
80747
 
80729
80748
  var Modeler_component = normalizeComponent(
80730
80749
  modeler_Modelervue_type_script_lang_js_,
80731
- Modelervue_type_template_id_27bb3680_render,
80732
- Modelervue_type_template_id_27bb3680_staticRenderFns,
80750
+ Modelervue_type_template_id_407e7f2f_render,
80751
+ Modelervue_type_template_id_407e7f2f_staticRenderFns,
80733
80752
  false,
80734
80753
  null,
80735
80754
  null,