@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.
@@ -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=27bb3680&
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=407e7f2f&
48333
48333
 
48334
48334
 
48335
- var Modelervue_type_template_id_27bb3680_render = function render() {
48335
+ var Modelervue_type_template_id_407e7f2f_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_27bb3680_render = function render() {
48612
48612
  });
48613
48613
  })], 2)], 1);
48614
48614
  };
48615
- var Modelervue_type_template_id_27bb3680_staticRenderFns = [];
48615
+ var Modelervue_type_template_id_407e7f2f_staticRenderFns = [];
48616
48616
 
48617
- ;// CONCATENATED MODULE: ./src/components/modeler/Modeler.vue?vue&type=template&id=27bb3680&
48617
+ ;// CONCATENATED MODULE: ./src/components/modeler/Modeler.vue?vue&type=template&id=407e7f2f&
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() {
@@ -80506,6 +80506,9 @@ var Multiplayer = /*#__PURE__*/function () {
80506
80506
  var _window$ProcessMaker7,
80507
80507
  _this46 = this;
80508
80508
  this.getNonce();
80509
+
80510
+ // Show Generating message
80511
+ this.loadingAI = true;
80509
80512
  this.fetchHistory();
80510
80513
  var params = {
80511
80514
  promptSessionId: this.promptSessionId,
@@ -80513,8 +80516,13 @@ var Multiplayer = /*#__PURE__*/function () {
80513
80516
  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
80514
80517
  };
80515
80518
  var url = '/package-ai/generateProcessArtifacts';
80516
- window.ProcessMaker.apiClient.post(url, params).then(function () {
80517
- // Response
80519
+ window.ProcessMaker.apiClient.post(url, params).then(function (response) {
80520
+ if (response.data) {
80521
+ var _response$data;
80522
+ if ((_response$data = response.data) !== null && _response$data !== void 0 && _response$data.error) {
80523
+ _this46.assetFail = true;
80524
+ }
80525
+ }
80518
80526
  }).catch(function (error) {
80519
80527
  var _error$response;
80520
80528
  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;
@@ -80588,6 +80596,16 @@ var Multiplayer = /*#__PURE__*/function () {
80588
80596
  }
80589
80597
  });
80590
80598
  },
80599
+ subscribeToErrors: function subscribeToErrors() {
80600
+ var _window$ProcessMaker9,
80601
+ _this48 = this;
80602
+ 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);
80603
+ var streamProgressEvent = '.ProcessMaker\\Package\\PackageAi\\Events\\GenerateArtifactsErrorEvent';
80604
+ window.Echo.private(channel).listen(streamProgressEvent, function () {
80605
+ // Output error
80606
+ _this48.assetFail = true;
80607
+ });
80608
+ },
80591
80609
  onStopAssetGeneration: function onStopAssetGeneration() {
80592
80610
  if (this.currentNonce) {
80593
80611
  this.cancelledJobs.push(this.currentNonce);
@@ -80631,7 +80649,7 @@ var Multiplayer = /*#__PURE__*/function () {
80631
80649
  this.$emit('set-xml-manager', this.xmlManager);
80632
80650
  },
80633
80651
  mounted: function mounted() {
80634
- var _this48 = this;
80652
+ var _this49 = this;
80635
80653
  store.commit('setReadOnly', this.readOnly);
80636
80654
  this.graph = new external_jointjs_.dia.Graph();
80637
80655
  store.commit('setGraph', this.graph);
@@ -80650,47 +80668,47 @@ var Multiplayer = /*#__PURE__*/function () {
80650
80668
  store.commit('setPaper', this.paperManager.paper);
80651
80669
  this.paperManager.addEventHandler('element:pointerclick', this.blurFocusedScreenBuilderElement, this);
80652
80670
  this.paperManager.addEventHandler('blank:pointerdown', function (event, x, y) {
80653
- if (_this48.isGrabbing) return;
80671
+ if (_this49.isGrabbing) return;
80654
80672
  if (store.getters.isReadOnly) {
80655
- _this48.isGrabbing = true;
80673
+ _this49.isGrabbing = true;
80656
80674
  }
80657
- var scale = _this48.paperManager.scale;
80658
- _this48.canvasDragPosition = {
80675
+ var scale = _this49.paperManager.scale;
80676
+ _this49.canvasDragPosition = {
80659
80677
  x: x * scale.sx,
80660
80678
  y: y * scale.sy
80661
80679
  };
80662
- _this48.isOverShape = false;
80663
- _this48.pointerDownHandler(event);
80680
+ _this49.isOverShape = false;
80681
+ _this49.pointerDownHandler(event);
80664
80682
  }, this);
80665
80683
  this.paperManager.addEventHandler('cell:mouseover element:mouseover', function (_ref19) {
80666
80684
  var shape = _ref19.model;
80667
- if (_this48.isBpmnNode(shape) && shape.attr('body/cursor') !== 'default' && !_this48.isGrabbing) {
80685
+ if (_this49.isBpmnNode(shape) && shape.attr('body/cursor') !== 'default' && !_this49.isGrabbing) {
80668
80686
  shape.attr('body/cursor', 'move');
80669
80687
  }
80670
80688
  // If the user is panning the Paper while hovering an element, ignore the default move cursor
80671
- if (_this48.isGrabbing && _this48.isBpmnNode(shape)) {
80689
+ if (_this49.isGrabbing && _this49.isBpmnNode(shape)) {
80672
80690
  shape.attr('body/cursor', 'grabbing');
80673
80691
  }
80674
80692
  });
80675
80693
  this.paperManager.addEventHandler('blank:pointerup', function (event) {
80676
- _this48.isGrabbing = false;
80677
- _this48.canvasDragPosition = null;
80678
- _this48.activeNode = null;
80679
- _this48.pointerUpHandler(event);
80694
+ _this49.isGrabbing = false;
80695
+ _this49.canvasDragPosition = null;
80696
+ _this49.activeNode = null;
80697
+ _this49.pointerUpHandler(event);
80680
80698
  }, this);
80681
80699
  this.paperManager.addEventHandler('cell:pointerup', function (cellView, event) {
80682
- _this48.canvasDragPosition = null;
80683
- _this48.activeNode = null;
80684
- _this48.pointerUpHandler(event, cellView);
80700
+ _this49.canvasDragPosition = null;
80701
+ _this49.activeNode = null;
80702
+ _this49.pointerUpHandler(event, cellView);
80685
80703
  }, this);
80686
80704
  this.$refs['paper-container'].addEventListener('mouseenter', function () {
80687
80705
  store.commit('setClientLeftPaper', false);
80688
80706
  });
80689
80707
  this.$el.addEventListener('mousemove', function (event) {
80690
- _this48.pointerMoveHandler(event);
80708
+ _this49.pointerMoveHandler(event);
80691
80709
  });
80692
80710
  this.$refs['paper-container'].addEventListener('mouseleave', function () {
80693
- _this48.paperManager.removeEventHandler('blank:pointermove');
80711
+ _this49.paperManager.removeEventHandler('blank:pointermove');
80694
80712
  store.commit('setClientLeftPaper', true);
80695
80713
  });
80696
80714
  this.paperManager.addEventHandler('cell:pointerclick', function (cellView, evt, x, y) {
@@ -80701,44 +80719,44 @@ var Multiplayer = /*#__PURE__*/function () {
80701
80719
  });
80702
80720
  this.paperManager.addEventHandler('cell:pointerclick', function (_ref20, event) {
80703
80721
  var shape = _ref20.model;
80704
- if (!_this48.isBpmnNode(shape)) {
80722
+ if (!_this49.isBpmnNode(shape)) {
80705
80723
  return;
80706
80724
  }
80707
80725
 
80708
80726
  // ignore click event if the user is Grabbing the paper
80709
- if (_this48.isGrabbing) return;
80727
+ if (_this49.isGrabbing) return;
80710
80728
  shape.component.$emit('click', event);
80711
- _this48.$emit('click', {
80729
+ _this49.$emit('click', {
80712
80730
  event: event,
80713
- node: _this48.highlightedNode.definition
80731
+ node: _this49.highlightedNode.definition
80714
80732
  });
80715
80733
  });
80716
80734
  this.paperManager.addEventHandler('cell:pointerdown', function (_ref21, event) {
80717
80735
  var shape = _ref21.model;
80718
- if (!_this48.isBpmnNode(shape)) {
80736
+ if (!_this49.isBpmnNode(shape)) {
80719
80737
  return;
80720
80738
  }
80721
80739
  // If the user is pressing Space (grabbing) and clicking on a Cell, return
80722
- if (_this48.isGrabbing) {
80740
+ if (_this49.isGrabbing) {
80723
80741
  return;
80724
80742
  }
80725
- _this48.setShapeStacking(shape);
80726
- _this48.activeNode = shape.component.node;
80727
- _this48.isOverShape = true;
80728
- _this48.pointerDowInShape(event, shape);
80743
+ _this49.setShapeStacking(shape);
80744
+ _this49.activeNode = shape.component.node;
80745
+ _this49.isOverShape = true;
80746
+ _this49.pointerDowInShape(event, shape);
80729
80747
  });
80730
80748
  // If the user is grabbing the paper while he clicked in a cell, move the paper and not the cell
80731
80749
  this.paperManager.addEventHandler('cell:pointermove', function (_, event, x, y) {
80732
- if (_this48.isGrabbing) {
80733
- if (!_this48.canvasDragPosition) {
80734
- var scale = _this48.paperManager.scale;
80735
- _this48.canvasDragPosition = {
80750
+ if (_this49.isGrabbing) {
80751
+ if (!_this49.canvasDragPosition) {
80752
+ var scale = _this49.paperManager.scale;
80753
+ _this49.canvasDragPosition = {
80736
80754
  x: x * scale.sx,
80737
80755
  y: y * scale.sy
80738
80756
  };
80739
80757
  }
80740
- if (_this48.canvasDragPosition && !_this48.clientLeftPaper) {
80741
- _this48.paperManager.translate(event.offsetX - _this48.canvasDragPosition.x, event.offsetY - _this48.canvasDragPosition.y);
80758
+ if (_this49.canvasDragPosition && !_this49.clientLeftPaper) {
80759
+ _this49.paperManager.translate(event.offsetX - _this49.canvasDragPosition.x, event.offsetY - _this49.canvasDragPosition.y);
80742
80760
  }
80743
80761
  }
80744
80762
  });
@@ -80755,15 +80773,15 @@ var Multiplayer = /*#__PURE__*/function () {
80755
80773
  while (1) switch (_context33.prev = _context33.next) {
80756
80774
  case 0:
80757
80775
  _context33.next = 2;
80758
- return _this48.loadXML(xml);
80776
+ return _this49.loadXML(xml);
80759
80777
  case 2:
80760
80778
  _context33.next = 4;
80761
80779
  return undoRedoStore.dispatch('pushState', xml);
80762
80780
  case 4:
80763
80781
  try {
80764
- multiplayer = new Multiplayer(_this48);
80782
+ multiplayer = new Multiplayer(_this49);
80765
80783
  multiplayer.init();
80766
- _this48.multiplayer = multiplayer;
80784
+ _this49.multiplayer = multiplayer;
80767
80785
  } catch (error) {
80768
80786
  console.warn('Could not initialize multiplayer', error);
80769
80787
  }
@@ -80779,18 +80797,18 @@ var Multiplayer = /*#__PURE__*/function () {
80779
80797
  return loadXML;
80780
80798
  }(),
80781
80799
  addWarnings: function addWarnings(warnings) {
80782
- return _this48.$emit('warnings', warnings);
80800
+ return _this49.$emit('warnings', warnings);
80783
80801
  },
80784
80802
  addBreadcrumbs: function addBreadcrumbs(breadcrumbs) {
80785
- return _this48.breadcrumbData.push(breadcrumbs);
80803
+ return _this49.breadcrumbData.push(breadcrumbs);
80786
80804
  }
80787
80805
  });
80788
80806
  this.$root.$on('replace-ai-node', function (data) {
80789
- _this48.replaceAiNode(data);
80807
+ _this49.replaceAiNode(data);
80790
80808
  });
80791
80809
  window.ProcessMaker.EventBus.$on('save-changes', function (redirectUrl) {
80792
80810
  if (redirectUrl) {
80793
- _this48.redirect(redirectUrl);
80811
+ _this49.redirect(redirectUrl);
80794
80812
  }
80795
80813
  });
80796
80814
 
@@ -80807,6 +80825,7 @@ var Multiplayer = /*#__PURE__*/function () {
80807
80825
  this.promptSessionId = this.getPromptSessionForUser();
80808
80826
  this.fetchHistory();
80809
80827
  this.subscribeToProgress();
80828
+ this.subscribeToErrors();
80810
80829
  }
80811
80830
  });
80812
80831
  ;// CONCATENATED MODULE: ./src/components/modeler/Modeler.vue?vue&type=script&lang=js&
@@ -80826,8 +80845,8 @@ var modelervue_type_style_index_0_prod_lang_scss_ = __webpack_require__(26695);
80826
80845
 
80827
80846
  var Modeler_component = normalizeComponent(
80828
80847
  modeler_Modelervue_type_script_lang_js_,
80829
- Modelervue_type_template_id_27bb3680_render,
80830
- Modelervue_type_template_id_27bb3680_staticRenderFns,
80848
+ Modelervue_type_template_id_407e7f2f_render,
80849
+ Modelervue_type_template_id_407e7f2f_staticRenderFns,
80831
80850
  false,
80832
80851
  null,
80833
80852
  null,