@processmaker/screen-builder 2.84.0 → 2.84.1

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.
@@ -48400,7 +48400,7 @@ const $X = {
48400
48400
  * @param {PageItem} page - The selected page item.
48401
48401
  */
48402
48402
  onClickPage(t) {
48403
- this.$emit("clickPage", t);
48403
+ this.$emit("clickPage", this.data[t]);
48404
48404
  }
48405
48405
  }
48406
48406
  };
@@ -48419,7 +48419,7 @@ var PX = function() {
48419
48419
  DX,
48420
48420
  !1,
48421
48421
  null,
48422
- "3da78c3f",
48422
+ "18f6828f",
48423
48423
  null,
48424
48424
  null
48425
48425
  );
@@ -48497,8 +48497,7 @@ var BX = function() {
48497
48497
  null,
48498
48498
  null
48499
48499
  );
48500
- const UX = WX.exports;
48501
- const av = 200, GX = {
48500
+ const UX = WX.exports, av = 200, GX = {
48502
48501
  props: {
48503
48502
  /**
48504
48503
  * The configuration of all the pages
@@ -48661,21 +48660,14 @@ const JX = {
48661
48660
  return {
48662
48661
  draggedItem: 0,
48663
48662
  draggedOverItem: 0,
48664
- itemsClone: [],
48665
48663
  editRowIndex: null
48666
48664
  };
48667
48665
  },
48668
48666
  computed: {
48669
48667
  sortedItems() {
48670
- return this.filteredItems.sort((t, e) => t.order - e.order);
48671
- }
48672
- },
48673
- watch: {
48674
- items: {
48675
- handler(t) {
48676
- this.itemsClone = [...t];
48677
- },
48678
- immediate: !0
48668
+ return [...this.filteredItems].sort(
48669
+ (e, r) => e.order - r.order
48670
+ );
48679
48671
  }
48680
48672
  },
48681
48673
  methods: {
@@ -48697,24 +48689,30 @@ const JX = {
48697
48689
  },
48698
48690
  dragEnd(t) {
48699
48691
  t.target.classList.remove("dragging");
48700
- const e = this.itemsClone.findIndex((a) => a.order === this.draggedItem), r = this.itemsClone.findIndex((a) => a.order === this.draggedOverItem);
48701
- if (e !== r) {
48702
- const a = this.itemsClone[r].order, i = this.draggedItem > this.draggedOverItem ? 1 : -1;
48703
- if (e < r) {
48704
- for (let n = e + 1; n <= r; n++) {
48705
- const s = this.itemsClone[n].order;
48706
- this.itemsClone[n].order = s + i;
48707
- }
48708
- this.itemsClone[e].order = a;
48709
- } else if (e > r) {
48710
- for (let n = r; n <= e - 1; n++) {
48711
- const s = this.itemsClone[n].order;
48712
- this.itemsClone[n].order = s + i;
48713
- }
48714
- this.itemsClone[e].order = a;
48692
+ const e = [...this.items].sort(
48693
+ (i, n) => i.order - n.order
48694
+ ), r = e.findIndex(
48695
+ (i) => i.order === this.draggedItem
48696
+ ), a = e.findIndex(
48697
+ (i) => i.order === this.draggedOverItem
48698
+ );
48699
+ if (r !== a) {
48700
+ const i = e[a].order, n = this.draggedItem > this.draggedOverItem ? 1 : -1;
48701
+ if (r < a) {
48702
+ for (let s = r + 1; s <= a; s++) {
48703
+ const o = e[s].order;
48704
+ e[s].order = o + n;
48705
+ }
48706
+ e[r].order = i;
48707
+ } else if (r > a) {
48708
+ for (let s = a; s <= r - 1; s++) {
48709
+ const o = e[s].order;
48710
+ e[s].order = o + n;
48711
+ }
48712
+ e[r].order = i;
48715
48713
  }
48716
48714
  }
48717
- this.$emit("ordered", this.itemsClone);
48715
+ this.$emit("ordered", e);
48718
48716
  },
48719
48717
  dragOver(t) {
48720
48718
  t.preventDefault();
@@ -48746,7 +48744,7 @@ var ZX = function() {
48746
48744
  XX,
48747
48745
  !1,
48748
48746
  null,
48749
- "b9ba844a",
48747
+ "79fd3284",
48750
48748
  null,
48751
48749
  null
48752
48750
  );
@@ -48914,6 +48912,9 @@ const oee = [
48914
48912
  };
48915
48913
  },
48916
48914
  computed: {
48915
+ sortedPages() {
48916
+ return [...this.config].sort((t, e) => t.order - e.order);
48917
+ },
48917
48918
  builder() {
48918
48919
  return this;
48919
48920
  },
@@ -48993,7 +48994,7 @@ const oee = [
48993
48994
  return ((r = (e = this.config[t]) == null ? void 0 : e.items) == null ? void 0 : r.length) === 0;
48994
48995
  },
48995
48996
  onClick(t) {
48996
- this.$refs.tabsBar.openPageByIndex(t);
48997
+ this.$refs.tabsBar.openPageByIndex(this.config.indexOf(t));
48997
48998
  },
48998
48999
  checkPageName(t, e = !1) {
48999
49000
  return !e && !this.showAddPageValidations ? null : t.trim() ? this.config.map((a) => a.name).filter((a) => a !== this.originalPageName).includes(t) ? this.$t("Must be unique.") : "" : this.$t("The Page Name field is required.");
@@ -49370,45 +49371,45 @@ var dee = function() {
49370
49371
  })], 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) {
49371
49372
  e.currentPage = a;
49372
49373
  } }, scopedSlots: e._u([{ key: "tabs-start", fn: function() {
49373
- return [e.showToolbar ? r("pages-dropdown", { attrs: { data: e.config }, on: { addPage: function(a) {
49374
+ return [e.showToolbar ? r("pages-dropdown", { attrs: { data: e.sortedPages }, on: { addPage: function(a) {
49374
49375
  return e.$bvModal.show("addPageModal");
49375
49376
  }, clickPage: e.onClick, seeAllPages: function(a) {
49376
49377
  return e.$bvModal.show("openSortable");
49377
49378
  } } }) : e._e()];
49378
- }, proxy: !0 }, { key: "default", fn: function() {
49379
- return [e.isCurrentPageEmpty(e.currentPage) ? r("div", { staticClass: "d-flex justify-content-center align-items-center drag-placeholder text-center position-absolute rounded mt-4 flex-column", attrs: { "data-cy": "screen-drop-zone" } }, [r("svg", { attrs: { width: "81", height: "107", viewBox: "0 0 81 107", fill: "none", xmlns: "http://www.w3.org/2000/svg" } }, [r("path", { attrs: { d: "M47.125 28.6562V0.5H5.71875C2.96523 0.5 0.75 2.71523 0.75 5.46875V101.531C0.75 104.285 2.96523 106.5 5.71875 106.5H75.2812C78.0348 106.5 80.25 104.285 80.25 101.531V33.625H52.0938C49.3609 33.625 47.125 31.3891 47.125 28.6562ZM60.375 77.5156C60.375 78.882 59.257 80 57.8906 80H23.1094C21.743 80 20.625 78.882 20.625 77.5156V75.8594C20.625 74.493 21.743 73.375 23.1094 73.375H57.8906C59.257 73.375 60.375 74.493 60.375 75.8594V77.5156ZM60.375 64.2656C60.375 65.632 59.257 66.75 57.8906 66.75H23.1094C21.743 66.75 20.625 65.632 20.625 64.2656V62.6094C20.625 61.243 21.743 60.125 23.1094 60.125H57.8906C59.257 60.125 60.375 61.243 60.375 62.6094V64.2656ZM60.375 49.3594V51.0156C60.375 52.382 59.257 53.5 57.8906 53.5H23.1094C21.743 53.5 20.625 52.382 20.625 51.0156V49.3594C20.625 47.993 21.743 46.875 23.1094 46.875H57.8906C59.257 46.875 60.375 47.993 60.375 49.3594ZM80.25 25.7371V27H53.75V0.5H55.0129C56.3379 0.5 57.6008 1.01758 58.5324 1.94922L78.8008 22.2383C79.7324 23.1699 80.25 24.4328 80.25 25.7371Z", fill: "#699CFF" } })]), r("h3", [e._v(e._s(e.$t("Place your controls here.")))]), r("p", [e._v(" " + e._s(e.$t("To begin creating a screen, drag and drop items from the Controls Menu on the left.")) + " ")])]) : e._e(), e.renderControls ? r("draggable", e._b({ key: e.editorContentKey, staticClass: "h-100", attrs: { "data-cy": "editor-content", "ghost-class": "form-control-ghost", value: e.config[e.currentPage].items }, on: { input: e.updateConfig } }, "draggable", {
49379
+ }, proxy: !0 }, { key: "default", fn: function({ currentPage: a }) {
49380
+ return [e.isCurrentPageEmpty(a) ? r("div", { staticClass: "d-flex justify-content-center align-items-center drag-placeholder text-center position-absolute rounded mt-4 flex-column", attrs: { "data-cy": "screen-drop-zone" } }, [r("svg", { attrs: { width: "81", height: "107", viewBox: "0 0 81 107", fill: "none", xmlns: "http://www.w3.org/2000/svg" } }, [r("path", { attrs: { d: "M47.125 28.6562V0.5H5.71875C2.96523 0.5 0.75 2.71523 0.75 5.46875V101.531C0.75 104.285 2.96523 106.5 5.71875 106.5H75.2812C78.0348 106.5 80.25 104.285 80.25 101.531V33.625H52.0938C49.3609 33.625 47.125 31.3891 47.125 28.6562ZM60.375 77.5156C60.375 78.882 59.257 80 57.8906 80H23.1094C21.743 80 20.625 78.882 20.625 77.5156V75.8594C20.625 74.493 21.743 73.375 23.1094 73.375H57.8906C59.257 73.375 60.375 74.493 60.375 75.8594V77.5156ZM60.375 64.2656C60.375 65.632 59.257 66.75 57.8906 66.75H23.1094C21.743 66.75 20.625 65.632 20.625 64.2656V62.6094C20.625 61.243 21.743 60.125 23.1094 60.125H57.8906C59.257 60.125 60.375 61.243 60.375 62.6094V64.2656ZM60.375 49.3594V51.0156C60.375 52.382 59.257 53.5 57.8906 53.5H23.1094C21.743 53.5 20.625 52.382 20.625 51.0156V49.3594C20.625 47.993 21.743 46.875 23.1094 46.875H57.8906C59.257 46.875 60.375 47.993 60.375 49.3594ZM80.25 25.7371V27H53.75V0.5H55.0129C56.3379 0.5 57.6008 1.01758 58.5324 1.94922L78.8008 22.2383C79.7324 23.1699 80.25 24.4328 80.25 25.7371Z", fill: "#699CFF" } })]), r("h3", [e._v(e._s(e.$t("Place your controls here.")))]), r("p", [e._v(" " + e._s(e.$t("To begin creating a screen, drag and drop items from the Controls Menu on the left.")) + " ")])]) : e._e(), e.renderControls ? r("draggable", e._b({ key: e.editorContentKey, staticClass: "h-100", attrs: { "data-cy": "editor-content", "ghost-class": "form-control-ghost", value: e.config[a].items }, on: { input: e.updateConfig } }, "draggable", {
49380
49381
  group: { name: "controls" },
49381
49382
  swapThreshold: 0.5
49382
- }, !1), e._l(e.config[e.currentPage].items, function(a, i) {
49383
- return r("div", { key: i, staticClass: "control-item mt-4 mb-4", class: {
49384
- selected: e.selected === a,
49385
- hasError: e.hasError(a)
49386
- }, attrs: { selector: a.config.customCssSelector }, on: { click: function(n) {
49387
- return e.inspect(a);
49388
- } } }, [a.container ? r("div", { staticClass: "card container-lement", class: { "ai-section-card": e.isAiSection(a) }, attrs: { "data-cy": "screen-element-container" }, on: { click: function(n) {
49389
- return e.inspect(a);
49390
- } } }, [e.selected === a ? r("div", { staticClass: "card-header form-element-header d-flex align-items-center", class: { pulse: e.isAiSection(a) && e.aiPreview(a) } }, [r("i", { staticClass: "fas fa-arrows-alt-v mr-1 text-muted" }), a.config.icon ? r("i", { staticClass: "mr-2 ml-1", class: a.config.icon }) : e._e(), e._v(" " + e._s(a.config.name || a.label || e.$t("Field Name")) + " "), r("div", { staticClass: "ml-auto" }, [e.isAiSection(a) && e.aiPreview(a) ? r("button", { staticClass: "btn btn-sm btn-primary mr-2", attrs: { "data-test": "apply-ai-btn", title: e.$t("Apply Changes") }, on: { click: function(n) {
49391
- return e.applyAiChanges(a);
49392
- } } }, [e._v(" " + e._s(e.$t("Apply Changes")) + " ")]) : e._e(), e.isAiSection(a) && e.aiPreview(a) ? e._e() : r("button", { staticClass: "btn btn-sm btn-secondary mr-2", attrs: { "data-test": "copy-control-btn", title: e.$t("Copy Control") }, on: { click: function(n) {
49393
- return e.duplicateItem(i);
49394
- } } }, [r("i", { staticClass: "fas fa-copy text-light" })]), r("button", { staticClass: "btn btn-sm btn-danger", attrs: { "data-test": "delete-control-btn", title: e.$t("Delete Control") }, on: { click: function(n) {
49395
- return e.deleteItem(i);
49396
- } } }, [r("i", { staticClass: "far fa-trash-alt text-light" })])])]) : e._e(), r(a["editor-component"], { tag: "component", staticClass: "card-body", class: e.elementCssClass(a), attrs: { "validation-errors": e.validationErrors, selected: e.selected, config: a.config, "ai-element": a }, on: { inspect: e.inspect, "update-state": e.updateState }, model: { value: a.items, callback: function(n) {
49397
- e.$set(a, "items", n);
49398
- }, expression: "element.items" } })], 1) : r("div", { staticClass: "card", attrs: { "data-cy": "screen-element-container" } }, [e.selected === a ? r("div", { staticClass: "card-header form-element-header d-flex align-items-center" }, [r("i", { staticClass: "fas fa-arrows-alt-v mr-1 text-muted" }), a.config.icon ? r("i", { staticClass: "mr-2 ml-1", class: a.config.icon }) : e._e(), e._v(" " + e._s(a.config.name || e.$t("Variable Name")) + " "), r("div", { staticClass: "ml-auto" }, [r("button", { staticClass: "btn btn-sm btn-secondary mr-2", attrs: { title: e.$t("Copy Control") }, on: { click: function(n) {
49399
- return e.duplicateItem(i);
49400
- } } }, [r("i", { staticClass: "fas fa-copy text-light" })]), r("button", { staticClass: "btn btn-sm btn-danger", attrs: { title: e.$t("Delete Control") }, on: { click: function(n) {
49401
- return e.deleteItem(i);
49402
- } } }, [r("i", { staticClass: "far fa-trash-alt text-light" })])])]) : e._e(), r(a["editor-component"], e._b({ tag: "component", staticClass: "card-body m-0 pb-4 pt-4", class: [
49403
- e.elementCssClass(a),
49404
- { "prevent-interaction": !a.config.interactive }
49405
- ], attrs: { tabindex: a.config.interactive ? 0 : -1 }, on: { input: function(n) {
49406
- a.config.interactive && (a.config.content = n);
49407
- } }, nativeOn: { focusout: function(n) {
49383
+ }, !1), e._l(e.config[a].items, function(i, n) {
49384
+ return r("div", { key: n, staticClass: "control-item mt-4 mb-4", class: {
49385
+ selected: e.selected === i,
49386
+ hasError: e.hasError(i)
49387
+ }, attrs: { selector: i.config.customCssSelector }, on: { click: function(s) {
49388
+ return e.inspect(i);
49389
+ } } }, [i.container ? r("div", { staticClass: "card container-lement", class: { "ai-section-card": e.isAiSection(i) }, attrs: { "data-cy": "screen-element-container" }, on: { click: function(s) {
49390
+ return e.inspect(i);
49391
+ } } }, [e.selected === i ? r("div", { staticClass: "card-header form-element-header d-flex align-items-center", class: { pulse: e.isAiSection(i) && e.aiPreview(i) } }, [r("i", { staticClass: "fas fa-arrows-alt-v mr-1 text-muted" }), i.config.icon ? r("i", { staticClass: "mr-2 ml-1", class: i.config.icon }) : e._e(), e._v(" " + e._s(i.config.name || i.label || e.$t("Field Name")) + " "), r("div", { staticClass: "ml-auto" }, [e.isAiSection(i) && e.aiPreview(i) ? r("button", { staticClass: "btn btn-sm btn-primary mr-2", attrs: { "data-test": "apply-ai-btn", title: e.$t("Apply Changes") }, on: { click: function(s) {
49392
+ return e.applyAiChanges(i);
49393
+ } } }, [e._v(" " + e._s(e.$t("Apply Changes")) + " ")]) : e._e(), e.isAiSection(i) && e.aiPreview(i) ? e._e() : r("button", { staticClass: "btn btn-sm btn-secondary mr-2", attrs: { "data-test": "copy-control-btn", title: e.$t("Copy Control") }, on: { click: function(s) {
49394
+ return e.duplicateItem(n);
49395
+ } } }, [r("i", { staticClass: "fas fa-copy text-light" })]), r("button", { staticClass: "btn btn-sm btn-danger", attrs: { "data-test": "delete-control-btn", title: e.$t("Delete Control") }, on: { click: function(s) {
49396
+ return e.deleteItem(n);
49397
+ } } }, [r("i", { staticClass: "far fa-trash-alt text-light" })])])]) : e._e(), r(i["editor-component"], { tag: "component", staticClass: "card-body", class: e.elementCssClass(i), attrs: { "validation-errors": e.validationErrors, selected: e.selected, config: i.config, "ai-element": i }, on: { inspect: e.inspect, "update-state": e.updateState }, model: { value: i.items, callback: function(s) {
49398
+ e.$set(i, "items", s);
49399
+ }, expression: "element.items" } })], 1) : r("div", { staticClass: "card", attrs: { "data-cy": "screen-element-container" } }, [e.selected === i ? r("div", { staticClass: "card-header form-element-header d-flex align-items-center" }, [r("i", { staticClass: "fas fa-arrows-alt-v mr-1 text-muted" }), i.config.icon ? r("i", { staticClass: "mr-2 ml-1", class: i.config.icon }) : e._e(), e._v(" " + e._s(i.config.name || e.$t("Variable Name")) + " "), r("div", { staticClass: "ml-auto" }, [r("button", { staticClass: "btn btn-sm btn-secondary mr-2", attrs: { title: e.$t("Copy Control") }, on: { click: function(s) {
49400
+ return e.duplicateItem(n);
49401
+ } } }, [r("i", { staticClass: "fas fa-copy text-light" })]), r("button", { staticClass: "btn btn-sm btn-danger", attrs: { title: e.$t("Delete Control") }, on: { click: function(s) {
49402
+ return e.deleteItem(n);
49403
+ } } }, [r("i", { staticClass: "far fa-trash-alt text-light" })])])]) : e._e(), r(i["editor-component"], e._b({ tag: "component", staticClass: "card-body m-0 pb-4 pt-4", class: [
49404
+ e.elementCssClass(i),
49405
+ { "prevent-interaction": !i.config.interactive }
49406
+ ], attrs: { tabindex: i.config.interactive ? 0 : -1 }, on: { input: function(s) {
49407
+ i.config.interactive && (i.config.content = s);
49408
+ } }, nativeOn: { focusout: function(s) {
49408
49409
  return e.updateState.apply(null, arguments);
49409
- } } }, "component", a.config, !1))], 1)]);
49410
- }), 0) : e._e(), e.isCurrentPageEmpty ? e._e() : r("div", { attrs: { "data-cy": "screen-drop-zone" } }, [e._v("   ")])];
49411
- }, proxy: !0 }]) })], 1), e.renderControls ? r("b-col", { staticClass: "overflow-hidden h-100 p-0 inspector-column" }, [r("b-card", { staticClass: "p-0 h-100 border-top-0 border-bottom-0 border-right-0 rounded-0", attrs: { "no-body": "" } }, [r("b-card-body", { staticClass: "p-0 h-100 overflow-auto" }, [e._l(e.accordions, function(a) {
49410
+ } } }, "component", i.config, !1))], 1)]);
49411
+ }), 0) : e._e(), e.isCurrentPageEmpty(a) ? e._e() : r("div", { attrs: { "data-cy": "screen-drop-zone" } }, [e._v("   ")])];
49412
+ } }]) })], 1), e.renderControls ? r("b-col", { staticClass: "overflow-hidden h-100 p-0 inspector-column" }, [r("b-card", { staticClass: "p-0 h-100 border-top-0 border-bottom-0 border-right-0 rounded-0", attrs: { "no-body": "" } }, [r("b-card-body", { staticClass: "p-0 h-100 overflow-auto" }, [e._l(e.accordions, function(a) {
49412
49413
  return [e.getInspectorFields(a) && e.getInspectorFields(a).length > 0 ? r("b-button", { key: `${e.accordionName(a)}-button`, staticClass: "text-left card-header d-flex align-items-center w-100 outline-0 text-capitalize shadow-none", attrs: { variant: "outline", "data-cy": `accordion-${e.accordionName(a).replace(
49413
49414
  " ",
49414
49415
  ""
@@ -49455,7 +49456,7 @@ var dee = function() {
49455
49456
  pee,
49456
49457
  !1,
49457
49458
  null,
49458
- "0af66870",
49459
+ "6dca9fa7",
49459
49460
  null,
49460
49461
  null
49461
49462
  );
@@ -52060,7 +52061,8 @@ var Ite = function() {
52060
52061
  null,
52061
52062
  null
52062
52063
  );
52063
- const ure = jte.exports, cre = {
52064
+ const ure = jte.exports;
52065
+ const cre = {
52064
52066
  ...Os,
52065
52067
  FormMultiColumn: sl
52066
52068
  };