@processmaker/screen-builder 2.85.1 → 2.85.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.
@@ -17358,12 +17358,12 @@ const ac = {
17358
17358
  return "MUSTACHE: " + e.message;
17359
17359
  }
17360
17360
  },
17361
- async submitForm(t, e = !1) {
17361
+ async submitForm(t, e = !1, r = null) {
17362
17362
  if (await this.validateNow(qv(this)), this.hasSubmitted(!0), !this.valid__ || this.disableSubmit__) {
17363
17363
  this.message__ && window.ProcessMaker.alert(this.message__, "danger");
17364
17364
  return;
17365
17365
  }
17366
- this.$emit("submit", this.vdata, e);
17366
+ this.$emit("submit", this.vdata, e, r);
17367
17367
  },
17368
17368
  resetValue(t, e) {
17369
17369
  this.setValue(t, null), this.updateScreenDataNow(t, e, !1);
@@ -22341,8 +22341,8 @@ const LW = {
22341
22341
  dot2bracket(t) {
22342
22342
  return t.replace(/\.\d/g, (e) => `[${e.substr(1)}]`);
22343
22343
  },
22344
- submit(t, e = !1) {
22345
- this.$emit("submit", this.value, e);
22344
+ submit(t, e = !1, r = null) {
22345
+ this.$emit("submit", this.value, e, r);
22346
22346
  },
22347
22347
  buildComponent(t) {
22348
22348
  window.ProcessMaker && window.ProcessMaker.EventBus && window.ProcessMaker.EventBus.$emit("screen-renderer-build-component", this);
@@ -22766,6 +22766,13 @@ const FW = {
22766
22766
  variant: this.tooltip.variant || "",
22767
22767
  boundary: "window"
22768
22768
  };
22769
+ },
22770
+ buttonInfo() {
22771
+ return {
22772
+ name: this.name,
22773
+ label: this.label,
22774
+ value: this.fieldValue
22775
+ };
22769
22776
  }
22770
22777
  },
22771
22778
  methods: {
@@ -22779,7 +22786,7 @@ const FW = {
22779
22786
  }
22780
22787
  if (this.event !== "pageNavigate" && this.name && this.setValue(this.$parent, this.name, this.fieldValue), this.event === "submit") {
22781
22788
  this.loading && this.valid && (this.showSpinner = !0), this.$emit("input", this.fieldValue), this.$nextTick(() => {
22782
- this.$emit("submit", this.eventData, this.loading);
22789
+ this.$emit("submit", this.eventData, this.loading, this.buttonInfo);
22783
22790
  });
22784
22791
  return;
22785
22792
  }
@@ -44406,8 +44413,8 @@ const yK = {
44406
44413
  t.registerCustomFunction(e, this.customFunctions[e]);
44407
44414
  }), t.$children instanceof Array && t.$children.forEach((e) => this.registerCustomFunctions(e));
44408
44415
  },
44409
- submit(t, e = !1) {
44410
- this.$emit("submit", this.data, e);
44416
+ submit(t, e = !1, r = null) {
44417
+ this.$emit("submit", this.data, e, r);
44411
44418
  },
44412
44419
  parseCss() {
44413
44420
  const t = `.${this.containerClass}`;
@@ -44485,7 +44492,7 @@ var xK = function() {
44485
44492
  SK,
44486
44493
  !1,
44487
44494
  null,
44488
- "5c027fb6",
44495
+ "caa03b53",
44489
44496
  null,
44490
44497
  null
44491
44498
  );
@@ -48659,6 +48666,7 @@ const JX = {
48659
48666
  },
48660
48667
  data() {
48661
48668
  return {
48669
+ refreshSort: 1,
48662
48670
  newName: "",
48663
48671
  draggedItem: 0,
48664
48672
  draggedOverItem: 0,
@@ -48667,9 +48675,7 @@ const JX = {
48667
48675
  },
48668
48676
  computed: {
48669
48677
  sortedItems() {
48670
- return [...this.filteredItems].sort(
48671
- (e, r) => e.order - r.order
48672
- );
48678
+ return this.refreshSort && [...this.filteredItems].sort((e, r) => e.order - r.order);
48673
48679
  }
48674
48680
  },
48675
48681
  methods: {
@@ -48729,7 +48735,7 @@ const JX = {
48729
48735
  o.order = u + 1;
48730
48736
  });
48731
48737
  }
48732
- this.$emit("ordered", e);
48738
+ this.refreshSort++, this.$emit("ordered", e);
48733
48739
  },
48734
48740
  dragOver(t) {
48735
48741
  t.preventDefault();
@@ -48767,7 +48773,7 @@ var ZX = function() {
48767
48773
  XX,
48768
48774
  !1,
48769
48775
  null,
48770
- "783e3808",
48776
+ "dabf2ccb",
48771
48777
  null,
48772
48778
  null
48773
48779
  );
@@ -48784,7 +48790,7 @@ const ree = {
48784
48790
  data() {
48785
48791
  return {
48786
48792
  search: "",
48787
- filteredItems: [...this.items]
48793
+ filteredItems: [...this.items].map((t, e) => (t.order === void 0 && this.$set(t, "order", e + 1), t))
48788
48794
  };
48789
48795
  },
48790
48796
  watch: {
@@ -48827,7 +48833,7 @@ var aee = function() {
48827
48833
  iee,
48828
48834
  !1,
48829
48835
  null,
48830
- "787061e3",
48836
+ "679e087a",
48831
48837
  null,
48832
48838
  null
48833
48839
  );
@@ -50722,7 +50728,7 @@ const zee = Iee.exports, jee = () => new Promise((t) => {
50722
50728
  this.taskId ? this.loadTask() : this.loadNextAssignedTask();
50723
50729
  },
50724
50730
  loadTask() {
50725
- const t = `/${this.taskId}?include=data,user,requestor,processRequest,component,screen,requestData,loopContext,bpmnTagName,interstitial,definition,nested,userRequestPermission`;
50731
+ const t = `/${this.taskId}?include=data,user,draft,requestor,processRequest,component,screen,requestData,loopContext,bpmnTagName,interstitial,definition,nested,userRequestPermission`;
50726
50732
  return window.ProcessMaker && window.ProcessMaker.packages && window.ProcessMaker.packages.includes("package-vocabularies") && (window.ProcessMaker.VocabulariesSchemaUrl = `vocabularies/task_schema/${this.taskId}`), this.beforeLoadTask(this.taskId, this.nodeId).then(() => {
50727
50733
  this.$dataProvider.getTasks(t).then((e) => {
50728
50734
  if (this.task = e.data, this.checkTaskStatus(), window.PM4ConfigOverrides && window.PM4ConfigOverrides.getScreenEndpoint && window.PM4ConfigOverrides.getScreenEndpoint.includes("tasks/")) {
@@ -50735,7 +50741,11 @@ const zee = Iee.exports, jee = () => new Promise((t) => {
50735
50741
  });
50736
50742
  },
50737
50743
  prepareTask() {
50738
- (!this.loadingButton || this.task.status === "ACTIVE") && (this.resetScreenState(), this.requestData = ae.get(this.task, "request_data", {}), this.loopContext = ae.get(this.task, "loop_context", ""), this.refreshScreen++), this.$emit("task-updated", this.task), this.task.process_request.status === "ERROR" ? (this.hasErrors = !0, this.$emit("error", this.requestId)) : this.hasErrors = !1;
50744
+ (!this.loadingButton || this.task.status === "ACTIVE") && (this.resetScreenState(), this.requestData = ae.get(this.task, "request_data", {}), this.loopContext = ae.get(this.task, "loop_context", ""), this.task.draft && (this.requestData = ae.merge(
50745
+ {},
50746
+ this.requestData,
50747
+ this.task.draft.data
50748
+ )), this.refreshScreen++), this.$emit("task-updated", this.task), this.task.process_request.status === "ERROR" ? (this.hasErrors = !0, this.$emit("error", this.requestId)) : this.hasErrors = !1;
50739
50749
  },
50740
50750
  resetScreenState() {
50741
50751
  this.loadingButton = !1, this.disabled = !1, this.$refs.renderer && this.$refs.renderer.$children[0] && (this.$refs.renderer.$children[0].currentPage = 0, this.$refs.renderer.restartValidation());
@@ -50788,8 +50798,8 @@ const zee = Iee.exports, jee = () => new Promise((t) => {
50788
50798
  }
50789
50799
  return "card-header text-capitalize text-white " + e;
50790
50800
  },
50791
- submit(t = null, e = !1) {
50792
- this.disabled || (this.disabled = !0, t && this.onUpdate(Object.assign({}, this.requestData, t)), e ? this.loadingButton = !0 : this.loadingButton = !1, this.$emit("submit", this.task, e), this.task && this.task.allow_interstitial && !this.loadingButton && (this.task.interstitial_screen._interstitial = !0, this.screen = this.task.interstitial_screen));
50801
+ submit(t = null, e = !1, r = null) {
50802
+ this.disabled || (this.disabled = !0, t && this.onUpdate(Object.assign({}, this.requestData, t)), e ? this.loadingButton = !0 : this.loadingButton = !1, this.$emit("submit", this.task, e, r), this.task && this.task.allow_interstitial && !this.loadingButton && (this.task.interstitial_screen._interstitial = !0, this.screen = this.task.interstitial_screen));
50793
50803
  },
50794
50804
  onUpdate(t) {
50795
50805
  this.$emit("input", t), this.disableForSelfService();