@processmaker/screen-builder 2.85.8 → 2.85.10

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.
@@ -17359,6 +17359,14 @@ const ac = {
17359
17359
  }
17360
17360
  },
17361
17361
  async submitForm(t, e = !1, r = null) {
17362
+ const a = {
17363
+ name: "after-submit",
17364
+ validation: !0
17365
+ };
17366
+ if (this.$emit("after-submit", a, ...arguments), a.validation === !1) {
17367
+ this.$emit("submit", this.vdata, e, r);
17368
+ return;
17369
+ }
17362
17370
  if (await this.validateNow(qv(this)), this.hasSubmitted(!0), !this.valid__ || this.disableSubmit__) {
17363
17371
  this.message__ && window.ProcessMaker.alert(this.message__, "danger");
17364
17372
  return;
@@ -26319,9 +26327,7 @@ const JW = {
26319
26327
  }
26320
26328
  },
26321
26329
  currencyValue() {
26322
- this.unformattedValue = parseFloat(
26323
- this.currencyInput.inputmask.unmaskedvalue().replace(",", ".")
26324
- ), this.$emit("input", this.unformattedValue || 0);
26330
+ this.handleInput();
26325
26331
  }
26326
26332
  },
26327
26333
  methods: {
@@ -26336,7 +26342,12 @@ const JW = {
26336
26342
  }).mask(this.currencyInput), this.value && this.currencyInput.inputmask.setValue(this.value);
26337
26343
  },
26338
26344
  keyup(t) {
26339
- this.currencyValue !== t.target.value && (this.currencyValue = t.target.value);
26345
+ this.currencyValue !== t.target.value ? this.currencyValue = t.target.value : this.handleInput();
26346
+ },
26347
+ handleInput() {
26348
+ this.unformattedValue = parseFloat(
26349
+ this.currencyInput.inputmask.unmaskedvalue().replace(",", ".")
26350
+ ), this.$emit("input", this.unformattedValue || 0);
26340
26351
  }
26341
26352
  },
26342
26353
  mounted() {
@@ -44237,12 +44248,15 @@ const mK = {
44237
44248
  },
44238
44249
  setCurrentPage(t) {
44239
44250
  this.$refs.component.setCurrentPage(t);
44251
+ },
44252
+ afterSubmit() {
44253
+ this.$emit("after-submit", ...arguments);
44240
44254
  }
44241
44255
  }
44242
44256
  };
44243
44257
  var gK = function() {
44244
44258
  var e = this, r = e._self._c;
44245
- return r("b-container", { attrs: { fluid: "" } }, [e.displayAsyncLoading ? r("div", { ref: "watchersAsynchronous", staticClass: "alert alert-light", attrs: { role: "alert" } }, [r("svg", { staticClass: "lds-gear", attrs: { width: "20px", height: "20px", xmlns: "http://www.w3.org/2000/svg", "xmlns:xlink": "http://www.w3.org/1999/xlink", viewBox: "0 0 100 100", preserveAspectRatio: "xMidYMid" } }, [r("g", { attrs: { transform: "translate(50 50)" } }, [r("g", { attrs: { transform: "rotate(248.825)" } }, [r("animateTransform", { attrs: { attributeName: "transform", type: "rotate", values: "0;360", keyTimes: "0;1", dur: "4.7s", repeatCount: "indefinite" } }), r("path", { attrs: { d: "M37.43995192304605 -6.5 L47.43995192304605 -6.5 L47.43995192304605 6.5 L37.43995192304605 6.5 A38 38 0 0 1 35.67394948182593 13.090810836924174 L35.67394948182593 13.090810836924174 L44.33420351967032 18.090810836924174 L37.83420351967032 29.34914108612188 L29.17394948182593 24.34914108612188 A38 38 0 0 1 24.34914108612188 29.17394948182593 L24.34914108612188 29.17394948182593 L29.34914108612188 37.83420351967032 L18.090810836924184 44.33420351967032 L13.090810836924183 35.67394948182593 A38 38 0 0 1 6.5 37.43995192304605 L6.5 37.43995192304605 L6.500000000000001 47.43995192304605 L-6.499999999999995 47.43995192304606 L-6.499999999999996 37.43995192304606 A38 38 0 0 1 -13.09081083692417 35.67394948182593 L-13.09081083692417 35.67394948182593 L-18.09081083692417 44.33420351967032 L-29.34914108612187 37.834203519670325 L-24.349141086121872 29.173949481825936 A38 38 0 0 1 -29.17394948182592 24.34914108612189 L-29.17394948182592 24.34914108612189 L-37.83420351967031 29.349141086121893 L-44.33420351967031 18.0908108369242 L-35.67394948182592 13.090810836924193 A38 38 0 0 1 -37.43995192304605 6.5000000000000036 L-37.43995192304605 6.5000000000000036 L-47.43995192304605 6.500000000000004 L-47.43995192304606 -6.499999999999993 L-37.43995192304606 -6.499999999999994 A38 38 0 0 1 -35.67394948182593 -13.090810836924167 L-35.67394948182593 -13.090810836924167 L-44.33420351967032 -18.090810836924163 L-37.834203519670325 -29.34914108612187 L-29.173949481825936 -24.34914108612187 A38 38 0 0 1 -24.349141086121893 -29.17394948182592 L-24.349141086121893 -29.17394948182592 L-29.349141086121897 -37.834203519670304 L-18.0908108369242 -44.334203519670304 L-13.090810836924195 -35.67394948182592 A38 38 0 0 1 -6.500000000000005 -37.43995192304605 L-6.500000000000005 -37.43995192304605 L-6.500000000000007 -47.43995192304605 L6.49999999999999 -47.43995192304606 L6.499999999999992 -37.43995192304606 A38 38 0 0 1 13.090810836924149 -35.67394948182594 L13.090810836924149 -35.67394948182594 L18.090810836924142 -44.33420351967033 L29.349141086121847 -37.83420351967034 L24.349141086121854 -29.17394948182595 A38 38 0 0 1 29.17394948182592 -24.349141086121893 L29.17394948182592 -24.349141086121893 L37.834203519670304 -29.349141086121897 L44.334203519670304 -18.0908108369242 L35.67394948182592 -13.090810836924197 A38 38 0 0 1 37.43995192304605 -6.500000000000007 M0 -20A20 20 0 1 0 0 20 A20 20 0 1 0 0 -20" } })], 1)])]), e._v(" " + e._s(e.$t("Loading...")) + " ")]) : e._e(), r(e.component, { ref: "component", tag: "component", attrs: { vdata: e.value, _parent: e._parent, "_initial-page": e.currentPage }, on: { submit: e.submit, asyncWatcherTriggered: e.onAsyncWatcherOn, asyncWatcherCompleted: e.onAsyncWatcherOff } }), e.showErrors && e.building.error ? r("screen-renderer-error", { model: { value: e.building, callback: function(a) {
44259
+ return r("b-container", { attrs: { fluid: "" } }, [e.displayAsyncLoading ? r("div", { ref: "watchersAsynchronous", staticClass: "alert alert-light", attrs: { role: "alert" } }, [r("svg", { staticClass: "lds-gear", attrs: { width: "20px", height: "20px", xmlns: "http://www.w3.org/2000/svg", "xmlns:xlink": "http://www.w3.org/1999/xlink", viewBox: "0 0 100 100", preserveAspectRatio: "xMidYMid" } }, [r("g", { attrs: { transform: "translate(50 50)" } }, [r("g", { attrs: { transform: "rotate(248.825)" } }, [r("animateTransform", { attrs: { attributeName: "transform", type: "rotate", values: "0;360", keyTimes: "0;1", dur: "4.7s", repeatCount: "indefinite" } }), r("path", { attrs: { d: "M37.43995192304605 -6.5 L47.43995192304605 -6.5 L47.43995192304605 6.5 L37.43995192304605 6.5 A38 38 0 0 1 35.67394948182593 13.090810836924174 L35.67394948182593 13.090810836924174 L44.33420351967032 18.090810836924174 L37.83420351967032 29.34914108612188 L29.17394948182593 24.34914108612188 A38 38 0 0 1 24.34914108612188 29.17394948182593 L24.34914108612188 29.17394948182593 L29.34914108612188 37.83420351967032 L18.090810836924184 44.33420351967032 L13.090810836924183 35.67394948182593 A38 38 0 0 1 6.5 37.43995192304605 L6.5 37.43995192304605 L6.500000000000001 47.43995192304605 L-6.499999999999995 47.43995192304606 L-6.499999999999996 37.43995192304606 A38 38 0 0 1 -13.09081083692417 35.67394948182593 L-13.09081083692417 35.67394948182593 L-18.09081083692417 44.33420351967032 L-29.34914108612187 37.834203519670325 L-24.349141086121872 29.173949481825936 A38 38 0 0 1 -29.17394948182592 24.34914108612189 L-29.17394948182592 24.34914108612189 L-37.83420351967031 29.349141086121893 L-44.33420351967031 18.0908108369242 L-35.67394948182592 13.090810836924193 A38 38 0 0 1 -37.43995192304605 6.5000000000000036 L-37.43995192304605 6.5000000000000036 L-47.43995192304605 6.500000000000004 L-47.43995192304606 -6.499999999999993 L-37.43995192304606 -6.499999999999994 A38 38 0 0 1 -35.67394948182593 -13.090810836924167 L-35.67394948182593 -13.090810836924167 L-44.33420351967032 -18.090810836924163 L-37.834203519670325 -29.34914108612187 L-29.173949481825936 -24.34914108612187 A38 38 0 0 1 -24.349141086121893 -29.17394948182592 L-24.349141086121893 -29.17394948182592 L-29.349141086121897 -37.834203519670304 L-18.0908108369242 -44.334203519670304 L-13.090810836924195 -35.67394948182592 A38 38 0 0 1 -6.500000000000005 -37.43995192304605 L-6.500000000000005 -37.43995192304605 L-6.500000000000007 -47.43995192304605 L6.49999999999999 -47.43995192304606 L6.499999999999992 -37.43995192304606 A38 38 0 0 1 13.090810836924149 -35.67394948182594 L13.090810836924149 -35.67394948182594 L18.090810836924142 -44.33420351967033 L29.349141086121847 -37.83420351967034 L24.349141086121854 -29.17394948182595 A38 38 0 0 1 29.17394948182592 -24.349141086121893 L29.17394948182592 -24.349141086121893 L37.834203519670304 -29.349141086121897 L44.334203519670304 -18.0908108369242 L35.67394948182592 -13.090810836924197 A38 38 0 0 1 37.43995192304605 -6.500000000000007 M0 -20A20 20 0 1 0 0 20 A20 20 0 1 0 0 -20" } })], 1)])]), e._v(" " + e._s(e.$t("Loading...")) + " ")]) : e._e(), r(e.component, { ref: "component", tag: "component", attrs: { vdata: e.value, _parent: e._parent, "_initial-page": e.currentPage }, on: { "after-submit": e.afterSubmit, submit: e.submit, asyncWatcherTriggered: e.onAsyncWatcherOn, asyncWatcherCompleted: e.onAsyncWatcherOff } }), e.showErrors && e.building.error ? r("screen-renderer-error", { model: { value: e.building, callback: function(a) {
44246
44260
  e.building = a;
44247
44261
  }, expression: "building" } }) : e._e(), r("watchers-synchronous", { ref: "watchersSynchronous" })], 1);
44248
44262
  }, vK = [], bK = /* @__PURE__ */ oe(
@@ -44414,6 +44428,9 @@ const yK = {
44414
44428
  t.registerCustomFunction(e, this.customFunctions[e]);
44415
44429
  }), t.$children instanceof Array && t.$children.forEach((e) => this.registerCustomFunctions(e));
44416
44430
  },
44431
+ afterSubmit() {
44432
+ this.$emit("after-submit", ...arguments);
44433
+ },
44417
44434
  submit(t, e = !1, r = null) {
44418
44435
  this.$emit("submit", this.data, e, r);
44419
44436
  },
@@ -44486,14 +44503,14 @@ const yK = {
44486
44503
  };
44487
44504
  var xK = function() {
44488
44505
  var e = this, r = e._self._c;
44489
- return r("div", { ref: "formRendererContainer", class: [e.containerClass, e.containerDeviceClass], style: e.cssDevice, attrs: { id: "vue-form-renderer", "data-cy": "screen-renderer-container" } }, [r("custom-css-output", [e._v(e._s(e.customCssWrapped))]), r("screen-renderer", { ref: "renderer", staticClass: "p-0", attrs: { value: e.data, _parent: e._parent, definition: e.definition, "current-page": e.currentPage, "data-cy": "screen-renderer", "show-errors": e.showErrors, "test-screen-definition": e.testScreenDefinition || !1, "loop-context": e.loopContext }, on: { submit: e.submit } })], 1);
44506
+ return r("div", { ref: "formRendererContainer", class: [e.containerClass, e.containerDeviceClass], style: e.cssDevice, attrs: { id: "vue-form-renderer", "data-cy": "screen-renderer-container" } }, [r("custom-css-output", [e._v(e._s(e.customCssWrapped))]), r("screen-renderer", { ref: "renderer", staticClass: "p-0", attrs: { value: e.data, _parent: e._parent, definition: e.definition, "current-page": e.currentPage, "data-cy": "screen-renderer", "show-errors": e.showErrors, "test-screen-definition": e.testScreenDefinition || !1, "loop-context": e.loopContext }, on: { "after-submit": e.afterSubmit, submit: e.submit } })], 1);
44490
44507
  }, SK = [], _K = /* @__PURE__ */ oe(
44491
44508
  yK,
44492
44509
  xK,
44493
44510
  SK,
44494
44511
  !1,
44495
44512
  null,
44496
- "caa03b53",
44513
+ "d595a04b",
44497
44514
  null,
44498
44515
  null
44499
44516
  );
@@ -48527,6 +48544,13 @@ const UX = WX.exports, av = 200, GX = {
48527
48544
  buttonIcon: {
48528
48545
  type: String,
48529
48546
  default: () => "fa fa-file"
48547
+ },
48548
+ /**
48549
+ * Is multi page mode enabled
48550
+ */
48551
+ isMultiPage: {
48552
+ type: Boolean,
48553
+ default: !0
48530
48554
  }
48531
48555
  },
48532
48556
  data() {
@@ -48641,9 +48665,9 @@ var HX = function() {
48641
48665
  }, expression: "activeTab" } }, e._l(e.validLocalOpenedPages, function(a, i) {
48642
48666
  return r("b-tab", { key: `tab-${i}`, staticClass: "h-100 w-100", scopedSlots: e._u([{ key: "title", fn: function() {
48643
48667
  var n;
48644
- return [r("b-badge", { staticClass: "mr-1", attrs: { variant: "primary" } }, [e._v(" " + e._s(e.pageNumber(a)) + " ")]), r("span", { attrs: { "data-test": `tab-${i}` } }, [e._v(" " + e._s((n = e.pages[a]) == null ? void 0 : n.name) + " ")]), r("span", { staticClass: "close-tab", attrs: { "data-test": `close-tab-${i}`, role: "link" }, on: { click: function(s) {
48668
+ return [r("b-badge", { staticClass: "mr-1", attrs: { variant: "primary" } }, [e._v(" " + e._s(e.pageNumber(a)) + " ")]), r("span", { attrs: { "data-test": `tab-${i}` } }, [e._v(" " + e._s((n = e.pages[a]) == null ? void 0 : n.name) + " ")]), e.isMultiPage ? r("span", { staticClass: "close-tab", attrs: { "data-test": `close-tab-${i}`, role: "link" }, on: { click: function(s) {
48645
48669
  return s.stopPropagation(), e.closeTab(i);
48646
- } } }, [r("i", { staticClass: "fas fa-times" })])];
48670
+ } } }, [r("i", { staticClass: "fas fa-times" })]) : e._e()];
48647
48671
  }, proxy: !0 }, { key: "default", fn: function() {
48648
48672
  return [r("div", { staticClass: "h-100 w-100", attrs: { "data-test": "tab-content" } }, [e._t("default", null, { currentPage: a })], 2)];
48649
48673
  }, proxy: !0 }], null, !0) });
@@ -49407,7 +49431,7 @@ var dee = function() {
49407
49431
  boundaryPadding: 16
49408
49432
  }`, modifiers: { hover: !0, right: !0 } }], key: o, staticClass: "gray-text", attrs: { boundary: "viewport", "data-cy": `controls-${s.component}` } }, [s.config && s.config.icon ? r("i", { class: s.config.icon }) : e._e(), r("span", { staticClass: "svg-icon", staticStyle: { width: "12px", height: "12px" }, domProps: { innerHTML: e._s(s.config.svg) } }), e._v(" " + e._s(e.$t(s.label)) + " ")]);
49409
49433
  }), 1) : e._e()], 1)], 1)];
49410
- })], 2)], 1)], 1), r("b-col", { ref: "screen-container", staticClass: "overflow-auto mh-100 p-0 d-flex flex-column position-relative", attrs: { id: "screen-container" } }, [r("tabs-bar", { ref: "tabsBar", attrs: { pages: e.config }, on: { "tab-opened": function(a) {
49434
+ })], 2)], 1)], 1), r("b-col", { ref: "screen-container", staticClass: "overflow-auto mh-100 p-0 d-flex flex-column position-relative", attrs: { id: "screen-container" } }, [r("tabs-bar", { ref: "tabsBar", attrs: { pages: e.config, "is-multi-page": e.showToolbar }, on: { "tab-opened": function(a) {
49411
49435
  e.currentPage = a;
49412
49436
  } }, scopedSlots: e._u([{ key: "tabs-start", fn: function() {
49413
49437
  return [e.showToolbar ? r("pages-dropdown", { attrs: { data: e.sortedPages }, on: { addPage: function(a) {
@@ -49495,7 +49519,7 @@ var dee = function() {
49495
49519
  pee,
49496
49520
  !1,
49497
49521
  null,
49498
- "18839616",
49522
+ "404a695f",
49499
49523
  null,
49500
49524
  null
49501
49525
  );
@@ -50801,6 +50825,9 @@ const zee = Iee.exports, jee = () => new Promise((t) => {
50801
50825
  }
50802
50826
  return "card-header text-capitalize text-white " + e;
50803
50827
  },
50828
+ afterSubmit() {
50829
+ this.$emit("after-submit", ...arguments);
50830
+ },
50804
50831
  submit(t = null, e = !1, r = null) {
50805
50832
  var a;
50806
50833
  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), (a = this.task) != null && a.allow_interstitial && !this.loadingButton && !this.disableInterstitial && (this.task.interstitial_screen._interstitial = !0, this.screen = this.task.interstitial_screen));
@@ -50888,9 +50915,9 @@ var Nee = function() {
50888
50915
  var e = this, r = e._self._c;
50889
50916
  return r("div", { staticClass: "tab-pane active show h-100", attrs: { id: "tab-form", role: "tabpanel", "aria-labelledby": "tab-form" } }, [e.screen ? [r("b-overlay", { attrs: { show: e.disabled, id: "overlay-background", variant: "white", cardStyles: "pointer-events: none;pointer-events: none;inset: 1px", rounded: "sm" }, scopedSlots: e._u([{ key: "overlay", fn: function() {
50890
50917
  return [r("div", { staticClass: "text-center" }, [r("p", [e._v("Please claim this task to continue.")])])];
50891
- }, proxy: !0 }], null, !1, 2499821482) }, [r("div", { staticClass: "card card-body border-top-0 h-100", class: e.screenTypeClass }, [e.renderComponent === "task-screen" ? r("div", [r("vue-form-renderer", { key: e.refreshScreen, ref: "renderer", attrs: { config: e.screen.config, computed: e.screen.computed, "custom-css": e.screen.custom_css, watchers: e.screen.watchers, "loop-context": e.loopContext }, on: { update: e.onUpdate, submit: e.submit }, model: { value: e.requestData, callback: function(a) {
50918
+ }, proxy: !0 }], null, !1, 2499821482) }, [r("div", { staticClass: "card card-body border-top-0 h-100", class: e.screenTypeClass }, [e.renderComponent === "task-screen" ? r("div", [r("vue-form-renderer", { key: e.refreshScreen, ref: "renderer", attrs: { config: e.screen.config, computed: e.screen.computed, "custom-css": e.screen.custom_css, watchers: e.screen.watchers, "loop-context": e.loopContext }, on: { update: e.onUpdate, "after-submit": e.afterSubmit, submit: e.submit }, model: { value: e.requestData, callback: function(a) {
50892
50919
  e.requestData = a;
50893
- }, expression: "requestData" } })], 1) : r("div", [r(e.renderComponent, { tag: "component", attrs: { "process-id": e.processId, "instance-id": e.requestId, "token-id": e.taskId, screen: e.screen.config, "csrf-token": e.csrfToken, computed: e.screen.computed, "custom-css": e.screen.custom_css, watchers: e.screen.watchers, data: e.requestData, type: e.screen.type }, on: { submit: e.submit } })], 1)]), e.shouldAddSubmitButton ? r("div", { staticClass: "card-footer" }, [r("button", { staticClass: "btn btn-primary", attrs: { type: "button" }, on: { click: function(a) {
50920
+ }, expression: "requestData" } })], 1) : r("div", [r(e.renderComponent, { tag: "component", attrs: { "process-id": e.processId, "instance-id": e.requestId, "token-id": e.taskId, screen: e.screen.config, "csrf-token": e.csrfToken, computed: e.screen.computed, "custom-css": e.screen.custom_css, watchers: e.screen.watchers, data: e.requestData, type: e.screen.type }, on: { "after-submit": e.afterSubmit, submit: e.submit } })], 1)]), e.shouldAddSubmitButton ? r("div", { staticClass: "card-footer" }, [r("button", { staticClass: "btn btn-primary", attrs: { type: "button" }, on: { click: function(a) {
50894
50921
  return e.submit(null);
50895
50922
  } } }, [e._v(" " + e._s(e.$t("Complete Task")) + " ")])]) : e._e()])] : e._e(), e.showTaskIsCompleted ? [r("div", { staticClass: "card card-body text-center" }, [r("h1", [e._v(" " + e._s(e.$t("Task Completed")) + " "), r("i", { staticClass: "fas fa-clipboard-check" })])])] : e._e()], 2);
50896
50923
  }, Ree = [], Fee = /* @__PURE__ */ oe(