@processmaker/screen-builder 3.1.0 → 3.2.0

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.
@@ -14208,7 +14208,7 @@ const jb = /* @__PURE__ */ Sr(HO), Cr = typeof window > "u" ? global : window, a
14208
14208
  },
14209
14209
  pageNavigationBuild(t) {
14210
14210
  this.addData(t, "currentPage__", "this._initialPage"), t.methods.pageNavigate = function(e) {
14211
- this.$parent.definition.config[e] && (this.currentPage__ = e);
14211
+ this.$parent.definition.config[e] && (this.$parent.$emit("updatePage"), this.currentPage__ = e);
14212
14212
  };
14213
14213
  }
14214
14214
  },
@@ -44816,7 +44816,7 @@ const sK = {
44816
44816
  return this.$refs.component.getCurrentPage();
44817
44817
  },
44818
44818
  setCurrentPage(t) {
44819
- this.$refs.component.setCurrentPage(t);
44819
+ this.$emit("updatedPage"), this.$refs.component.setCurrentPage(t);
44820
44820
  },
44821
44821
  afterSubmit() {
44822
44822
  this.$emit("after-submit", ...arguments);
@@ -45065,7 +45065,7 @@ const cK = {
45065
45065
  return this.$refs.renderer.getCurrentPage();
45066
45066
  },
45067
45067
  setCurrentPage(t) {
45068
- this.$refs.renderer.setCurrentPage(t);
45068
+ this.$emit("update-page-task"), this.$refs.renderer.setCurrentPage(t);
45069
45069
  },
45070
45070
  onContainerObserver(t) {
45071
45071
  t[0].target.getBoundingClientRect(), this.parseCss();
@@ -45078,14 +45078,14 @@ const cK = {
45078
45078
  var dK = function() {
45079
45079
  var i;
45080
45080
  var e = this, r = e._self._c;
45081
- 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 || ((i = e.data) == null ? void 0 : i._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, taskdraft: e.taskdraft }, on: { "after-submit": e.afterSubmit, submit: e.submit } })], 1);
45081
+ 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 || ((i = e.data) == null ? void 0 : i._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, taskdraft: e.taskdraft }, on: { updatePage: e.setCurrentPage, "after-submit": e.afterSubmit, submit: e.submit } })], 1);
45082
45082
  }, fK = [], pK = /* @__PURE__ */ ee(
45083
45083
  cK,
45084
45084
  dK,
45085
45085
  fK,
45086
45086
  !1,
45087
45087
  null,
45088
- "f47c54c2",
45088
+ "fcdcc032",
45089
45089
  null,
45090
45090
  null
45091
45091
  );
@@ -48888,7 +48888,7 @@ const gee = {
48888
48888
  return this.value || "content";
48889
48889
  },
48890
48890
  ariaLabelField() {
48891
- return this.optionAriaLabel || "ariaLabel";
48891
+ return this.ariaLabel || "ariaLabel";
48892
48892
  },
48893
48893
  currentItemToDelete() {
48894
48894
  if (this.removeIndex !== null && this.optionsList.length > 0 && this.optionsList[this.removeIndex] !== void 0) {
@@ -48930,7 +48930,7 @@ const gee = {
48930
48930
  }, 1500);
48931
48931
  },
48932
48932
  mounted() {
48933
- this.dataSource = this.options.dataSource, this.jsonData = this.options.jsonData, this.dataName = this.options.dataName, this.collectionOptions = this.options.collectionOptions, this.selectedDataSource = this.options.selectedDataSource, this.selectedEndPoint = this.options.selectedEndPoint, this.key = this.options.key, this.value = this.options.value, this.optionAriaLabel = this.options.optionAriaLabel, this.pmqlQuery = this.options.pmqlQuery, this.defaultOptionKey = this.options.defaultOptionKey, this.selectedOptions = this.options.selectedOptions, this.optionsList = this.options.optionsList ? this.options.optionsList : [], this.jsonData = JSON.stringify(this.optionsList), this.showRenderAs = this.options.showRenderAs, this.renderAs = this.options.renderAs, this.allowMultiSelect = this.options.allowMultiSelect, this.valueTypeReturned = this.options.valueTypeReturned;
48933
+ this.dataSource = this.options.dataSource, this.jsonData = this.options.jsonData, this.dataName = this.options.dataName, this.collectionOptions = this.options.collectionOptions, this.selectedDataSource = this.options.selectedDataSource, this.selectedEndPoint = this.options.selectedEndPoint, this.key = this.options.key, this.value = this.options.value, this.optionAriaLabel = this.options.ariaLabel, this.pmqlQuery = this.options.pmqlQuery, this.defaultOptionKey = this.options.defaultOptionKey, this.selectedOptions = this.options.selectedOptions, this.optionsList = this.options.optionsList ? this.options.optionsList : [], this.jsonData = JSON.stringify(this.optionsList), this.showRenderAs = this.options.showRenderAs, this.renderAs = this.options.renderAs, this.allowMultiSelect = this.options.allowMultiSelect, this.valueTypeReturned = this.options.valueTypeReturned;
48934
48934
  },
48935
48935
  methods: {
48936
48936
  monacoMounted(t) {
@@ -48973,10 +48973,13 @@ const gee = {
48973
48973
  this.optionsList = [];
48974
48974
  const e = this;
48975
48975
  t.forEach((r) => {
48976
- e.optionsList.push({
48976
+ e.renderAs === "checkbox" ? e.optionsList.push({
48977
48977
  [e.keyField]: r[e.keyField],
48978
48978
  [e.valueField]: r[e.valueField],
48979
48979
  [e.ariaLabelField]: r[e.ariaLabelField]
48980
+ }) : e.optionsList.push({
48981
+ [e.keyField]: r[e.keyField],
48982
+ [e.valueField]: r[e.valueField]
48980
48983
  });
48981
48984
  }), this.jsonError = "";
48982
48985
  },
@@ -48996,7 +48999,7 @@ const gee = {
48996
48999
  this.jsonData = JSON.stringify(this.optionsList), this.$emit("change", this.dataObjectOptions);
48997
49000
  },
48998
49001
  showEditOption(t) {
48999
- this.optionCardType = "edit", this.editIndex = t, this.optionContent = this.optionsList[t][this.valueField], this.optionValue = this.optionsList[t][this.keyField], this.optionAriaLabel = this.optionsList[t][this.ariaLabelField], this.optionError = "";
49002
+ this.optionCardType = "edit", this.editIndex = t, this.optionContent = this.optionsList[t][this.valueField], this.optionValue = this.optionsList[t][this.keyField], this.renderAs === "checkbox" && (this.optionAriaLabel = this.optionsList[t][this.ariaLabelField]), this.optionError = "";
49000
49003
  },
49001
49004
  showAddOption() {
49002
49005
  this.optionCardType = "insert", this.optionContent = "", this.optionValue = "", this.optionAriaLabel = "", this.showOptionCard = !0, this.optionError = "", this.editIndex = null;
@@ -49008,19 +49011,20 @@ const gee = {
49008
49011
  this.optionError = "An item with the same key already exists";
49009
49012
  return;
49010
49013
  }
49011
- this.optionsList.push(
49012
- {
49013
- [this.valueField]: this.optionContent,
49014
- [this.keyField]: this.optionValue,
49015
- [this.ariaLabelField]: this.optionAriaLabel
49016
- }
49017
- );
49014
+ this.renderAs === "checkbox" ? this.optionsList.push({
49015
+ [this.valueField]: this.optionContent,
49016
+ [this.keyField]: this.optionValue,
49017
+ [this.ariaLabelField]: this.optionAriaLabel
49018
+ }) : this.optionsList.push({
49019
+ [this.valueField]: this.optionContent,
49020
+ [this.keyField]: this.optionValue
49021
+ });
49018
49022
  } else {
49019
49023
  if (this.optionsList.find((e, r) => e[t.keyField] === this.optionValue && r !== this.editIndex)) {
49020
49024
  this.optionError = "An item with the same key already exists";
49021
49025
  return;
49022
49026
  }
49023
- this.optionsList[this.editIndex][this.keyField] = this.optionValue, this.optionsList[this.editIndex][this.valueField] = this.optionContent, this.optionsList[this.editIndex][this.ariaLabelField] = this.optionAriaLabel;
49027
+ this.optionsList[this.editIndex][this.keyField] = this.optionValue, this.optionsList[this.editIndex][this.valueField] = this.optionContent, this.renderAs === "checkbox" && (this.optionsList[this.editIndex][this.ariaLabelField] = this.optionAriaLabel);
49024
49028
  }
49025
49029
  this.jsonData = JSON.stringify(this.optionsList), this.showOptionCard = !1, this.optionError = "", this.editIndex = null;
49026
49030
  },
@@ -49136,7 +49140,7 @@ var bee = function() {
49136
49140
  yee,
49137
49141
  !1,
49138
49142
  null,
49139
- "c8dcdddb",
49143
+ "e8b1152f",
49140
49144
  null,
49141
49145
  null
49142
49146
  );
@@ -51995,7 +51999,7 @@ var yre = function() {
51995
51999
  return e.shouldShow(a, i) ? r(a.type, e._b({ key: n, tag: "component", staticClass: "border-bottom m-0 p-4", attrs: { "data-cy": "inspector-" + (a.field || a.config.name), "field-name": a.field, "field-accordion": `accordion-${e.accordionName(i).replace(
51996
52000
  " ",
51997
52001
  ""
51998
- )}`, builder: e.builder, "form-config": e.extendedPages, "screen-type": e.screenType, "current-page": e.currentPage, "selected-control": e.selected }, on: { "update-state": e.updateState, setName: function(s) {
52002
+ )}`, builder: e.builder, "form-config": e.config, "screen-type": e.screenType, "current-page": e.currentPage, "selected-control": e.selected }, on: { "update-state": e.updateState, setName: function(s) {
51999
52003
  e.inspection.config.name = s;
52000
52004
  } }, nativeOn: { focusout: function(s) {
52001
52005
  return e.updateState.apply(null, arguments);
@@ -52025,7 +52029,7 @@ var yre = function() {
52025
52029
  xre,
52026
52030
  !1,
52027
52031
  null,
52028
- "8adaccab",
52032
+ "d259169f",
52029
52033
  null,
52030
52034
  null
52031
52035
  );
@@ -52320,6 +52324,7 @@ const Ire = Lu(Ere), hae = Lu(jre), mae = Lu([zre]), Lre = Lu([cS, uS]), Fre = N
52320
52324
  optionsList: [],
52321
52325
  key: "value",
52322
52326
  value: "content",
52327
+ ariaLabel: "ariaLabel",
52323
52328
  valueTypeReturned: "single"
52324
52329
  },
52325
52330
  helper: null
@@ -53488,6 +53493,9 @@ const Xre = () => new Promise((t) => {
53488
53493
  this.task.draft.data
53489
53494
  )), 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;
53490
53495
  },
53496
+ pageUpdate() {
53497
+ this.$emit("updated-page-core");
53498
+ },
53491
53499
  resetScreenState() {
53492
53500
  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());
53493
53501
  },
@@ -53942,9 +53950,9 @@ var Ure = function() {
53942
53950
  var e = this, r = e._self._c;
53943
53951
  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 || e.isSelfService, id: "overlay-background", variant: e.isSelfService ? "white" : "transparent", blur: null, cardStyles: "pointer-events: none;pointer-events: none;inset: 1px", rounded: "sm" }, scopedSlots: e._u([{ key: "overlay", fn: function() {
53944
53952
  return [r("div", { staticClass: "text-center" }, [e.isSelfService ? r("p", [e._v("Please claim this task to continue.")]) : e._e()])];
53945
- }, proxy: !0 }], null, !1, 2076353390) }, [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", class: { loading: e.loadingTask || e.loadingListeners }, attrs: { config: e.screen.config, computed: e.screen.computed, "custom-css": e.screen.custom_css, watchers: e.screen.watchers, "loop-context": e.loopContext, taskdraft: this.task }, on: { update: e.onUpdate, "after-submit": e.afterSubmit, submit: e.submit }, model: { value: e.requestData, callback: function(i) {
53953
+ }, proxy: !0 }], null, !1, 2076353390) }, [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", class: { loading: e.loadingTask || e.loadingListeners }, attrs: { config: e.screen.config, computed: e.screen.computed, "custom-css": e.screen.custom_css, watchers: e.screen.watchers, "loop-context": e.loopContext, taskdraft: this.task }, on: { "update-page-task": e.pageUpdate, update: e.onUpdate, "after-submit": e.afterSubmit, submit: e.submit }, model: { value: e.requestData, callback: function(i) {
53946
53954
  e.requestData = i;
53947
- }, 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: { update: e.onUpdate, "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(i) {
53955
+ }, 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: { "update-page-task": e.pageUpdate, update: e.onUpdate, "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(i) {
53948
53956
  return e.submit(null);
53949
53957
  } } }, [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);
53950
53958
  }, Gre = [], Qre = /* @__PURE__ */ ee(
@@ -53953,7 +53961,7 @@ var Ure = function() {
53953
53961
  Gre,
53954
53962
  !1,
53955
53963
  null,
53956
- "6b115e25",
53964
+ "fcbd2da6",
53957
53965
  null,
53958
53966
  null
53959
53967
  );