@processmaker/screen-builder 3.8.33 → 3.8.34

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.
@@ -9686,6 +9686,10 @@ const IT = Ts(), LT = [
9686
9686
  components: { ...NT, RequiredAsterisk: af },
9687
9687
  mixins: [IT],
9688
9688
  props: ["label", "error", "helper", "name", "value", "controlClass", "endpoint", "accept", "validation", "parent", "config", "multipleUpload", "screenType"],
9689
+ created() {
9690
+ const t = this;
9691
+ this.options.processParams = (e, r) => (!t.isFileManagerPublicInterface() || !t.multipleUpload || (e.data_name = e.filename || r.name), e);
9692
+ },
9689
9693
  updated() {
9690
9694
  this.removeDefaultClasses();
9691
9695
  },
@@ -9853,6 +9857,12 @@ const IT = Ts(), LT = [
9853
9857
  };
9854
9858
  },
9855
9859
  methods: {
9860
+ isFileManagerPublicInterface() {
9861
+ if (typeof window > "u" || !window.location)
9862
+ return !1;
9863
+ const t = String(window.location.pathname || ""), e = String(window.location.hash || "");
9864
+ return t.includes("/file-manager/public") || /\/file-manager\/?$/i.test(t) && /^#\/public(\/|$)/i.test(e);
9865
+ },
9856
9866
  clearFiles() {
9857
9867
  this.showComponent = !1, this.$nextTick(() => {
9858
9868
  this.showComponent = !0;
@@ -9950,7 +9960,7 @@ const IT = Ts(), LT = [
9950
9960
  });
9951
9961
  t.fileType = e.fileType;
9952
9962
  }
9953
- return this.filesAccept && (t.ignored = !0, this.validateFile(t, this.filesAccept) && (t.ignored = !1), t.ignored) ? (this.invalidFile = !0, this.uploading = !1, window.ProcessMaker.alert(this.$t("This file type is not accepted."), "danger"), !1) : (t.ignored = !1, this.name || (this.options.query.data_name = t.name), !0);
9963
+ return this.filesAccept && (t.ignored = !0, this.validateFile(t, this.filesAccept) && (t.ignored = !1), t.ignored) ? (this.invalidFile = !0, this.uploading = !1, window.ProcessMaker.alert(this.$t("This file type is not accepted."), "danger"), !1) : (t.ignored = !1, !this.name && !(this.isFileManagerPublicInterface() && this.multipleUpload) && (this.options.query.data_name = t.name), !0);
9954
9964
  },
9955
9965
  removeDefaultClasses() {
9956
9966
  this.$el.querySelectorAll(".uploader-btn, .uploader-drop").forEach((t) => {
@@ -10076,7 +10086,7 @@ var RT = function() {
10076
10086
  BT,
10077
10087
  !1,
10078
10088
  null,
10079
- "917cc4d9"
10089
+ "49ef329f"
10080
10090
  );
10081
10091
  const Go = HT.exports;
10082
10092
  const VT = {
@@ -46281,10 +46291,16 @@ const u_ = {
46281
46291
  methods: {
46282
46292
  togglePopover(t, e, r) {
46283
46293
  if (this.deleteIndex = te.find(this.tableData.data, { row_id: r }), this.isPopoverVisible = this.isPopoverVisible === t ? null : t, this.isPopoverVisible !== null) {
46284
- const i = e.target.getBoundingClientRect();
46285
- this.popoverPosition = {
46286
- top: `${i.bottom + window.scrollY}px`,
46287
- left: `${i.left + window.scrollX}px`
46294
+ const a = (e.target.closest("button") || e.target).getBoundingClientRect(), n = 285, s = 130, o = 8;
46295
+ let u = a.bottom + o, l = a.left;
46296
+ u + s > window.innerHeight - o && (u = Math.max(
46297
+ o,
46298
+ a.top - s - o
46299
+ ));
46300
+ const c = window.innerWidth - n - o;
46301
+ l = Math.max(o, Math.min(l, c)), this.popoverPosition = {
46302
+ top: `${u}px`,
46303
+ left: `${l}px`
46288
46304
  };
46289
46305
  }
46290
46306
  },
@@ -46638,7 +46654,7 @@ var d_ = function() {
46638
46654
  "btn-danger": e.styleMode === "Classic"
46639
46655
  }, attrs: { title: e.$t("Delete"), "data-cy": "remove-row", popover: "manual" }, on: { click: function(n) {
46640
46656
  e.styleMode === "Modern" ? e.togglePopover(i, n, a.row_id) : e.showDeleteConfirmation(i, a.row_id);
46641
- } } }, [e.styleMode === "Classic" ? r("i", { staticClass: "fas fa-trash-alt" }) : r("img", { attrs: { src: l_, alt: "delete" } })]), r("div", { directives: [{ name: "show", rawName: "v-show", value: e.isPopoverVisible === i, expression: "isPopoverVisible === index" }], staticClass: "popover-content" }, [r("p", [e._v("Are you sure you want to delete it?")]), r("button", { staticClass: "btn btn-light", on: { click: e.hidePopover } }, [e._v("CANCEL")]), r("button", { staticClass: "btn btn-danger", on: { click: function(n) {
46657
+ } } }, [e.styleMode === "Classic" ? r("i", { staticClass: "fas fa-trash-alt" }) : r("img", { attrs: { src: l_, alt: "delete" } })]), r("div", { directives: [{ name: "show", rawName: "v-show", value: e.isPopoverVisible === i, expression: "isPopoverVisible === index" }], staticClass: "popover-content", style: e.popoverPosition }, [r("p", [e._v("Are you sure you want to delete it?")]), r("button", { staticClass: "btn btn-light", on: { click: e.hidePopover } }, [e._v("CANCEL")]), r("button", { staticClass: "btn btn-danger", on: { click: function(n) {
46642
46658
  return e.popover_remove();
46643
46659
  } } }, [e._v("DELETE")])])])])];
46644
46660
  } }]) }), r("div", { staticClass: "d-flex justify-content-between align-items-center" }, [r("div", { staticClass: "col text-left" }, [e.tableData.total > e.perPage && e.perPage !== 0 ? r("b-pagination", { attrs: { "data-cy": "table-pagination", "total-rows": e.tableData.total, "per-page": e.perPage, "aria-label": e.$t("Pagination"), "aria-controls": "vuetable" }, on: { change: e.onChangePage }, model: { value: e.currentPage, callback: function(i) {