@processmaker/modeler 1.43.4 → 1.43.5

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.
@@ -37388,6 +37388,29 @@ var idleHighlighter = {
37388
37388
  this.shapeView.unhighlight(this.shapeBody, this.prepareCustomColorHighlighter(color));
37389
37389
  }
37390
37390
  },
37391
+ setAiStatusHighlight: function setAiStatusHighlight(status) {
37392
+ this.shapeView.unhighlight(this.shapeBody, completedHighlighter);
37393
+ if (status === 'generated') {
37394
+ this.shape.attr('body/fill', COLOR_COMPLETED_FILL);
37395
+ this.shapeView.highlight(this.shapeBody, completedHighlighter);
37396
+ }
37397
+ this.shapeView.unhighlight(this.shapeBody, inProgressHighlighter);
37398
+ if (status === 'generating') {
37399
+ this.shape.attr('body/fill', COLOR_IN_PROGRESS_FILL);
37400
+ this.shapeView.highlight(this.shapeBody, inProgressHighlighter);
37401
+ }
37402
+ this.shapeView.unhighlight(this.shapeBody, idleHighlighter);
37403
+ if (status === 'previously generated') {
37404
+ this.shape.attr('body/fill', COLOR_IDLE_FILL);
37405
+ this.shapeView.highlight(this.shapeBody, idleHighlighter);
37406
+ }
37407
+ },
37408
+ unsetHighlights: function unsetHighlights() {
37409
+ this.shape.attr('body/fill', '#FFFFFF');
37410
+ this.shapeView.unhighlight(this.shapeBody, inProgressHighlighter);
37411
+ this.shapeView.unhighlight(this.shapeBody, completedHighlighter);
37412
+ this.shapeView.unhighlight(this.shapeBody, idleHighlighter);
37413
+ },
37391
37414
  setShapeHighlightForReadOnly: function setShapeHighlightForReadOnly() {
37392
37415
  if (!this.shapeView) {
37393
37416
  return;
@@ -48231,10 +48254,10 @@ var ValidationStatus_component = normalizeComponent(
48231
48254
  )
48232
48255
 
48233
48256
  /* 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=22be23c5&
48257
+ ;// 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=6a9d9f5c&
48235
48258
 
48236
48259
 
48237
- var Modelervue_type_template_id_22be23c5_render = function render() {
48260
+ var Modelervue_type_template_id_6a9d9f5c_render = function render() {
48238
48261
  var _vm = this,
48239
48262
  _c = _vm._self._c;
48240
48263
  return _c('span', {
@@ -48514,9 +48537,9 @@ var Modelervue_type_template_id_22be23c5_render = function render() {
48514
48537
  });
48515
48538
  })], 2)], 1);
48516
48539
  };
48517
- var Modelervue_type_template_id_22be23c5_staticRenderFns = [];
48540
+ var Modelervue_type_template_id_6a9d9f5c_staticRenderFns = [];
48518
48541
 
48519
- ;// CONCATENATED MODULE: ./src/components/modeler/Modeler.vue?vue&type=template&id=22be23c5&
48542
+ ;// CONCATENATED MODULE: ./src/components/modeler/Modeler.vue?vue&type=template&id=6a9d9f5c&
48520
48543
 
48521
48544
  ;// 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
48545
  var boundaryEventvue_type_template_id_728530a2_render = function render() {
@@ -80372,6 +80395,34 @@ var Multiplayer = /*#__PURE__*/function () {
80372
80395
  _this46.assetFail = true;
80373
80396
  });
80374
80397
  },
80398
+ highlightTaskArrays: function highlightTaskArrays(data) {
80399
+ if (data) {
80400
+ this.addAiHighlights(data.tasks);
80401
+ this.addAiHighlights(data.serviceTasks);
80402
+ this.addAiHighlights(data.scriptTasks);
80403
+ }
80404
+ },
80405
+ unhighlightTaskArrays: function unhighlightTaskArrays(data) {
80406
+ if (data) {
80407
+ this.removeAiHighlights(data.tasks);
80408
+ this.removeAiHighlights(data.serviceTasks);
80409
+ this.removeAiHighlights(data.scriptTasks);
80410
+ }
80411
+ },
80412
+ addAiHighlights: function addAiHighlights(taskArray) {
80413
+ var self = this;
80414
+ taskArray.forEach(function (task) {
80415
+ var taskNode = self.getElementByNodeId(task.id);
80416
+ taskNode.component.setAiStatusHighlight(task.status);
80417
+ });
80418
+ },
80419
+ removeAiHighlights: function removeAiHighlights(taskArray) {
80420
+ var self = this;
80421
+ taskArray.forEach(function (task) {
80422
+ var taskNode = self.getElementByNodeId(task.id);
80423
+ taskNode.component.unsetHighlights();
80424
+ });
80425
+ },
80375
80426
  subscribeToProgress: function subscribeToProgress() {
80376
80427
  var _window$ProcessMaker18,
80377
80428
  _window$ProcessMaker19,
@@ -80381,17 +80432,19 @@ var Multiplayer = /*#__PURE__*/function () {
80381
80432
  var streamProgressEvent = '.ProcessMaker\\Package\\PackageAi\\Events\\GenerateArtifactsProgressEvent';
80382
80433
  window.Echo.private(channel).listen(streamProgressEvent, function (response) {
80383
80434
  if (response.data.promptSessionId !== _this47.promptSessionId) {
80435
+ _this47.unhighlightTaskArrays(response.data);
80384
80436
  return;
80385
80437
  }
80386
80438
  if (_this47.cancelledJobs.some(function (element) {
80387
80439
  return element === response.data.nonce;
80388
80440
  })) {
80441
+ _this47.unhighlightTaskArrays(response.data);
80389
80442
  return;
80390
80443
  }
80391
80444
  if (response.data) {
80392
80445
  if (response.data.progress.status === 'running') {
80393
80446
  _this47.loadingAI = true;
80394
- // Blue color for nodes running
80447
+ _this47.highlightTaskArrays(response.data);
80395
80448
  } else if (response.data.progress.status === 'error') {
80396
80449
  _this47.loadingAI = false;
80397
80450
  window.ProcessMaker.alert(response.data.message, 'danger');
@@ -80401,6 +80454,7 @@ var Multiplayer = /*#__PURE__*/function () {
80401
80454
  _this47.setPromptSessions(response.data.promptSessionId);
80402
80455
  // Successful generation
80403
80456
  _this47.assetsCreated = true;
80457
+ _this47.unhighlightTaskArrays(response.data);
80404
80458
  _this47.fetchHistory();
80405
80459
  setTimeout(function () {
80406
80460
  _this47.loadingAI = false;
@@ -80647,8 +80701,8 @@ var modelervue_type_style_index_0_prod_lang_scss_ = __webpack_require__(88242);
80647
80701
 
80648
80702
  var Modeler_component = normalizeComponent(
80649
80703
  modeler_Modelervue_type_script_lang_js_,
80650
- Modelervue_type_template_id_22be23c5_render,
80651
- Modelervue_type_template_id_22be23c5_staticRenderFns,
80704
+ Modelervue_type_template_id_6a9d9f5c_render,
80705
+ Modelervue_type_template_id_6a9d9f5c_staticRenderFns,
80652
80706
  false,
80653
80707
  null,
80654
80708
  null,