@processmaker/screen-builder 2.91.0 → 2.93.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.
- package/dist/vue-form-builder.css +1 -1
- package/dist/vue-form-builder.es.js +53 -68
- package/dist/vue-form-builder.es.js.map +1 -1
- package/dist/vue-form-builder.umd.js +5 -5
- package/dist/vue-form-builder.umd.js.map +1 -1
- package/package.json +3 -3
- package/src/DataProvider.js +3 -3
- package/src/components/computed-properties.vue +1 -1
- package/src/components/inspector/options-list.vue +1 -1
- package/src/components/renderer/form-list-table.vue +5 -1
- package/src/components/renderer/form-requests.vue +11 -27
- package/src/components/renderer/form-tasks.vue +9 -13
- package/src/components/task.vue +14 -14
- package/src/mixins/Json2Vue.js +5 -3
|
@@ -22102,17 +22102,17 @@ const Xo = {
|
|
|
22102
22102
|
* @param {object} params
|
|
22103
22103
|
* @returns {object}
|
|
22104
22104
|
*/
|
|
22105
|
-
getDataSource(t, e) {
|
|
22105
|
+
getDataSource(t, e, r = null) {
|
|
22106
22106
|
if (!window.ProcessMaker.screen.cacheEnabled && !window.ProcessMaker.screen.cacheTimeout)
|
|
22107
22107
|
return this.postDataSource(t, null, e);
|
|
22108
|
-
let
|
|
22109
|
-
return
|
|
22108
|
+
let i = `/requests/data_sources/${t}/resources/${e.config.endpoint}/data`;
|
|
22109
|
+
return i += this.authQueryString(), this.get(i, {
|
|
22110
22110
|
useCache: window.ProcessMaker.screen.cacheEnabled,
|
|
22111
22111
|
params: {
|
|
22112
22112
|
pmds_config: JSON.stringify(e.config),
|
|
22113
22113
|
pmds_data: JSON.stringify(e.data)
|
|
22114
22114
|
}
|
|
22115
|
-
}).then((
|
|
22115
|
+
}).then((a) => [a, r]);
|
|
22116
22116
|
},
|
|
22117
22117
|
authQueryString() {
|
|
22118
22118
|
const t = Se(window, "PM4ConfigOverrides.authParams", null);
|
|
@@ -22142,18 +22142,19 @@ const Xo = {
|
|
|
22142
22142
|
);
|
|
22143
22143
|
},
|
|
22144
22144
|
getCollectionRecords(t, e, r = null) {
|
|
22145
|
-
|
|
22145
|
+
var i, a;
|
|
22146
|
+
return e.useCache = (a = (i = window.ProcessMaker) == null ? void 0 : i.screen) == null ? void 0 : a.cacheEnabled, this.get(
|
|
22146
22147
|
`/collections/${t}/records${this.authQueryString()}`,
|
|
22147
22148
|
e
|
|
22148
|
-
).then((
|
|
22149
|
-
const
|
|
22150
|
-
if (!
|
|
22149
|
+
).then((n) => {
|
|
22150
|
+
const s = n ? n.data : null;
|
|
22151
|
+
if (!s)
|
|
22151
22152
|
throw new Error(Ae.t("No data returned"));
|
|
22152
|
-
return [
|
|
22153
|
-
}).catch((
|
|
22154
|
-
if (
|
|
22153
|
+
return [s, r];
|
|
22154
|
+
}).catch((n) => {
|
|
22155
|
+
if (n.response && n.response.status === 404)
|
|
22155
22156
|
return [{ data: [] }, r];
|
|
22156
|
-
throw
|
|
22157
|
+
throw n;
|
|
22157
22158
|
});
|
|
22158
22159
|
}
|
|
22159
22160
|
};
|
|
@@ -22595,7 +22596,8 @@ const eR = {
|
|
|
22595
22596
|
return t && typeof t == "string" && t.match(/^[a-zA-Z_][0-9a-zA-Z_.]*$/);
|
|
22596
22597
|
},
|
|
22597
22598
|
isComputedVariable(t, e) {
|
|
22598
|
-
|
|
22599
|
+
var r;
|
|
22600
|
+
return (r = e == null ? void 0 : e.computed) == null ? void 0 : r.some((i) => i != null && i.byPass ? !1 : new RegExp(`^${i.property}(\\.|$)`, "i").test(t));
|
|
22599
22601
|
},
|
|
22600
22602
|
registerVariable(t, e = {}) {
|
|
22601
22603
|
if (t && t.startsWith("_parent.") || t && t.includes("._parent.") || !this.validVariableName(t))
|
|
@@ -45420,7 +45422,7 @@ const bK = ds(), yK = {
|
|
|
45420
45422
|
verifyDraft(t) {
|
|
45421
45423
|
let e = "";
|
|
45422
45424
|
return t.draft && t.status !== "CLOSED" && (e = `
|
|
45423
|
-
<span class ="badge badge-warning status-
|
|
45425
|
+
<span class ="badge badge-warning status-warning">
|
|
45424
45426
|
${this.$t("Draft")}
|
|
45425
45427
|
</span>
|
|
45426
45428
|
`), e;
|
|
@@ -45440,8 +45442,7 @@ const bK = ds(), yK = {
|
|
|
45440
45442
|
default: !0,
|
|
45441
45443
|
width: 153,
|
|
45442
45444
|
fixed_width: 153,
|
|
45443
|
-
truncate: !0
|
|
45444
|
-
resizable: !1
|
|
45445
|
+
truncate: !0
|
|
45445
45446
|
},
|
|
45446
45447
|
{
|
|
45447
45448
|
label: "Priority",
|
|
@@ -45449,8 +45450,7 @@ const bK = ds(), yK = {
|
|
|
45449
45450
|
sortable: !1,
|
|
45450
45451
|
default: !0,
|
|
45451
45452
|
width: 48,
|
|
45452
|
-
fixed_width: 48
|
|
45453
|
-
resizable: !1
|
|
45453
|
+
fixed_width: 48
|
|
45454
45454
|
},
|
|
45455
45455
|
{
|
|
45456
45456
|
label: "Case title",
|
|
@@ -45460,8 +45460,7 @@ const bK = ds(), yK = {
|
|
|
45460
45460
|
default: !0,
|
|
45461
45461
|
width: 314,
|
|
45462
45462
|
truncate: !0,
|
|
45463
|
-
fixed_width: 314
|
|
45464
|
-
resizable: !1
|
|
45463
|
+
fixed_width: 314
|
|
45465
45464
|
}
|
|
45466
45465
|
];
|
|
45467
45466
|
return this.status === "CLOSED" ? t.push({
|
|
@@ -45470,16 +45469,14 @@ const bK = ds(), yK = {
|
|
|
45470
45469
|
sortable: !0,
|
|
45471
45470
|
default: !0,
|
|
45472
45471
|
width: 220,
|
|
45473
|
-
fixed_width: 220
|
|
45474
|
-
resizable: !1
|
|
45472
|
+
fixed_width: 220
|
|
45475
45473
|
}) : t.push({
|
|
45476
45474
|
label: "Due",
|
|
45477
45475
|
field: "due_at",
|
|
45478
45476
|
sortable: !0,
|
|
45479
45477
|
default: !0,
|
|
45480
45478
|
width: 220,
|
|
45481
|
-
fixed_width: 220
|
|
45482
|
-
resizable: !1
|
|
45479
|
+
fixed_width: 220
|
|
45483
45480
|
}), t.push({
|
|
45484
45481
|
label: "",
|
|
45485
45482
|
field: "options",
|
|
@@ -45609,7 +45606,7 @@ const bK = ds(), yK = {
|
|
|
45609
45606
|
};
|
|
45610
45607
|
var xK = function() {
|
|
45611
45608
|
var e = this, r = e._self._c;
|
|
45612
|
-
return e.showTable ? r("div", [r("filter-table", { attrs: { headers: e.tableHeaders, data: e.tableData, unread: e.unreadColumnName, loading: e.shouldShowLoader }, on: { "table-row-mouseover": e.handleRowMouseover, "table-row-mouseleave": e.handleRowMouseleave }, scopedSlots: e._u([e._l(e.tableHeaders, function(i, a) {
|
|
45609
|
+
return e.showTable ? r("div", [r("filter-table", { attrs: { "table-name": "form-tasks", headers: e.tableHeaders, data: e.tableData, unread: e.unreadColumnName, loading: e.shouldShowLoader }, on: { "table-row-mouseover": e.handleRowMouseover, "table-row-mouseleave": e.handleRowMouseleave }, scopedSlots: e._u([e._l(e.tableHeaders, function(i, a) {
|
|
45613
45610
|
return { key: i.field, fn: function() {
|
|
45614
45611
|
return [r("div", { key: a, staticStyle: { display: "inline-block" } }, [i.field === "is_priority" ? r("img", { attrs: { src: gK, alt: "priority-header", width: "20", height: "20" } }) : r("span", [e._v(e._s(e.$t(i.label)))])])];
|
|
45615
45612
|
}, proxy: !0 };
|
|
@@ -45638,7 +45635,7 @@ var xK = function() {
|
|
|
45638
45635
|
wK,
|
|
45639
45636
|
!1,
|
|
45640
45637
|
null,
|
|
45641
|
-
"
|
|
45638
|
+
"4fc4989a",
|
|
45642
45639
|
null,
|
|
45643
45640
|
null
|
|
45644
45641
|
);
|
|
@@ -45749,20 +45746,14 @@ const SK = ds(), kK = {
|
|
|
45749
45746
|
this.pmqlSearch = "", this.pmqlSearch = t, this.fetch();
|
|
45750
45747
|
},
|
|
45751
45748
|
setupColumns() {
|
|
45752
|
-
const t = this.
|
|
45753
|
-
this.tableHeaders = this.
|
|
45749
|
+
const t = this.getColumnsCases();
|
|
45750
|
+
this.tableHeaders = this.getColumnsCases(), t.forEach((e) => {
|
|
45754
45751
|
const r = {
|
|
45755
45752
|
title: () => this.$t(e.label)
|
|
45756
45753
|
};
|
|
45757
45754
|
switch (e.field) {
|
|
45758
|
-
case "
|
|
45759
|
-
r.name = "__slot:
|
|
45760
|
-
break;
|
|
45761
|
-
case "participants":
|
|
45762
|
-
r.name = "__slot:participants";
|
|
45763
|
-
break;
|
|
45764
|
-
case "name":
|
|
45765
|
-
r.name = "__slot:name";
|
|
45755
|
+
case "case_number":
|
|
45756
|
+
r.name = "__slot:case_number";
|
|
45766
45757
|
break;
|
|
45767
45758
|
case "case_title":
|
|
45768
45759
|
r.name = "__slot:case_title";
|
|
@@ -45771,12 +45762,9 @@ const SK = ds(), kK = {
|
|
|
45771
45762
|
r.name = e.name || e.field;
|
|
45772
45763
|
}
|
|
45773
45764
|
r.field || (r.field = e.field), e.format === "datetime" && (r.callback = "formatDateUser|datetime"), e.format === "date" && (r.callback = "formatDateUser|date"), e.sortable === !0 && !r.sortField && (r.sortField = e.field), this.fields.push(r);
|
|
45774
|
-
}), this.fields.push({
|
|
45775
|
-
name: "__slot:actions",
|
|
45776
|
-
title: ""
|
|
45777
45765
|
});
|
|
45778
45766
|
},
|
|
45779
|
-
|
|
45767
|
+
getColumnsCases() {
|
|
45780
45768
|
return [
|
|
45781
45769
|
{
|
|
45782
45770
|
label: "Case #",
|
|
@@ -45793,8 +45781,7 @@ const SK = ds(), kK = {
|
|
|
45793
45781
|
default: !0,
|
|
45794
45782
|
truncate: !0,
|
|
45795
45783
|
width: 314,
|
|
45796
|
-
fixed_width: 314
|
|
45797
|
-
resizable: !1
|
|
45784
|
+
fixed_width: 314
|
|
45798
45785
|
},
|
|
45799
45786
|
{
|
|
45800
45787
|
label: "Status",
|
|
@@ -45802,8 +45789,7 @@ const SK = ds(), kK = {
|
|
|
45802
45789
|
sortable: !0,
|
|
45803
45790
|
default: !0,
|
|
45804
45791
|
width: 113,
|
|
45805
|
-
fixed_width:
|
|
45806
|
-
resizable: !1,
|
|
45792
|
+
fixed_width: 113,
|
|
45807
45793
|
filter_subject: { type: "Status" }
|
|
45808
45794
|
},
|
|
45809
45795
|
{
|
|
@@ -45818,7 +45804,7 @@ const SK = ds(), kK = {
|
|
|
45818
45804
|
};
|
|
45819
45805
|
var TK = function() {
|
|
45820
45806
|
var e = this, r = e._self._c;
|
|
45821
|
-
return e.showTable ? r("div", [r("filter-table", { attrs: { headers: e.tableHeaders, data: e.tableData, unread: e.unreadColumnName, loading: e.shouldShowLoader }, scopedSlots: e._u([e._l(e.data.data, function(i, a) {
|
|
45807
|
+
return e.showTable ? r("div", [r("filter-table", { attrs: { "table-name": "form-cases", headers: e.tableHeaders, data: e.tableData, unread: e.unreadColumnName, loading: e.shouldShowLoader }, scopedSlots: e._u([e._l(e.data.data, function(i, a) {
|
|
45822
45808
|
return { key: `row-${a}`, fn: function() {
|
|
45823
45809
|
return e._l(e.tableHeaders, function(n, s) {
|
|
45824
45810
|
return r("td", { key: `${a}-${s}` }, [e.containsHTML(e.getNestedPropertyValue(i, n)) ? [r("div", { class: { "pm-table-truncate": n.truncate }, style: { maxWidth: n.width + "px" }, attrs: { id: `element-${a}-${s}` } }, [r("span", { domProps: { innerHTML: e._s(e.sanitize(e.getNestedPropertyValue(i, n))) } })]), n.truncate ? r("b-tooltip", { attrs: { target: `element-${a}-${s}`, "custom-class": "pm-table-tooltip" }, on: { show: e.checkIfTooltipIsNeeded } }, [e._v(" " + e._s(e.sanitizeTooltip(e.getNestedPropertyValue(i, n))) + " ")]) : e._e()] : [e.isComponent(i[n.field]) ? [r(i[n.field].component, e._b({ tag: "component" }, "component", i[n.field].props, !1))] : [r("div", { class: { "pm-table-truncate": n.truncate }, style: { maxWidth: n.width + "px" }, attrs: { id: `element-${a}-${s}` } }, [e._v(" " + e._s(e.getNestedPropertyValue(i, n)) + " "), n.truncate ? r("b-tooltip", { attrs: { target: `element-${a}-${s}`, "custom-class": "pm-table-tooltip" }, on: { show: e.checkIfTooltipIsNeeded } }, [e._v(" " + e._s(e.getNestedPropertyValue(i, n)) + " ")]) : e._e()], 1)]]], 2);
|
|
@@ -45831,7 +45817,7 @@ var TK = function() {
|
|
|
45831
45817
|
CK,
|
|
45832
45818
|
!1,
|
|
45833
45819
|
null,
|
|
45834
|
-
"
|
|
45820
|
+
"9ebe7f58",
|
|
45835
45821
|
null,
|
|
45836
45822
|
null
|
|
45837
45823
|
);
|
|
@@ -46111,7 +46097,7 @@ var VK = function() {
|
|
|
46111
46097
|
qK,
|
|
46112
46098
|
!1,
|
|
46113
46099
|
null,
|
|
46114
|
-
"
|
|
46100
|
+
"830c77e3",
|
|
46115
46101
|
null,
|
|
46116
46102
|
null
|
|
46117
46103
|
);
|
|
@@ -47705,7 +47691,7 @@ var u$ = function() {
|
|
|
47705
47691
|
e.selectedDataSource = i;
|
|
47706
47692
|
}, expression: "selectedDataSource" } }), e.selectedDataSource ? e._e() : r("div", { staticClass: "invalid-feedback" }, [e._v(e._s(e.$t("An Data Connector must be selected")))]), r("small", { staticClass: "form-text text-muted mb-3" }, [e._v(e._s(e.$t("Data Connector to use")))])], 1) : e._e(), e.dataSource === e.dataSourceValues.dataConnector ? r("div", [r("label", { attrs: { for: "endpoint-list" } }, [e._v(e._s(e.$t("End Point")))]), r("b-form-select", { class: e.selectedDataSource && !e.selectedEndPoint ? "is-invalid" : "", attrs: { id: "endpoint-list", options: e.endPointList, "data-cy": "inspector-endpoint" }, model: { value: e.selectedEndPoint, callback: function(i) {
|
|
47707
47693
|
e.selectedEndPoint = i;
|
|
47708
|
-
}, expression: "selectedEndPoint" } }), e.selectedDataSource && !e.selectedEndPoint ? r("div", { staticClass: "invalid-feedback" }, [e._v(e._s(e.$t("An Endpoint must be selected")))]) : e._e(), r("small", { staticClass: "form-text text-muted mb-3" }, [e._v(e._s(e.$t("Endpoint to populate select")))])], 1) : e._e(), e.dataSource === e.dataSourceValues.dataConnector ? r("div", [r("pmql-input", { staticClass: "mb-1", attrs: { "search-type": "
|
|
47694
|
+
}, expression: "selectedEndPoint" } }), e.selectedDataSource && !e.selectedEndPoint ? r("div", { staticClass: "invalid-feedback" }, [e._v(e._s(e.$t("An Endpoint must be selected")))]) : e._e(), r("small", { staticClass: "form-text text-muted mb-3" }, [e._v(e._s(e.$t("Endpoint to populate select")))])], 1) : e._e(), e.dataSource === e.dataSourceValues.dataConnector ? r("div", [r("pmql-input", { staticClass: "mb-1", attrs: { "search-type": "collections_w_mustaches", "input-label": "PMQL", condensed: !0, "ai-enabled": !0, placeholder: e.$t("PMQL") }, model: { value: e.pmqlQuery, callback: function(i) {
|
|
47709
47695
|
e.pmqlQuery = i;
|
|
47710
47696
|
}, expression: "pmqlQuery" } }), r("small", { staticClass: "form-text text-muted" }, [e._v(e._s(e.$t("Advanced data search")))])], 1) : e._e()], 1);
|
|
47711
47697
|
}, c$ = [], d$ = /* @__PURE__ */ ne(
|
|
@@ -47714,7 +47700,7 @@ var u$ = function() {
|
|
|
47714
47700
|
c$,
|
|
47715
47701
|
!1,
|
|
47716
47702
|
null,
|
|
47717
|
-
"
|
|
47703
|
+
"282ac989",
|
|
47718
47704
|
null,
|
|
47719
47705
|
null
|
|
47720
47706
|
);
|
|
@@ -51350,22 +51336,22 @@ const nte = () => new Promise((t) => {
|
|
|
51350
51336
|
*/
|
|
51351
51337
|
// eslint-disable-next-line consistent-return
|
|
51352
51338
|
async getDestinationUrl() {
|
|
51353
|
-
const { elementDestination: t } = this.task || {};
|
|
51339
|
+
const { elementDestination: t, allow_interstitial: e } = this.task || {};
|
|
51354
51340
|
if (!t)
|
|
51355
51341
|
return null;
|
|
51356
51342
|
if (t.type === "taskSource")
|
|
51357
51343
|
try {
|
|
51358
|
-
const
|
|
51344
|
+
const a = {
|
|
51359
51345
|
processRequestId: this.requestId,
|
|
51360
51346
|
status: "ACTIVE",
|
|
51361
51347
|
userId: this.userId
|
|
51362
|
-
},
|
|
51363
|
-
return (
|
|
51364
|
-
} catch (
|
|
51365
|
-
return console.error("Error in getDestinationUrl:",
|
|
51348
|
+
}, s = (await this.retryApiCall(() => this.getTasks(a))).data.data[0];
|
|
51349
|
+
return e && (s == null ? void 0 : s.user_id) === this.userId ? `/tasks/${s.id}/edit` : document.referrer || null;
|
|
51350
|
+
} catch (a) {
|
|
51351
|
+
return console.error("Error in getDestinationUrl:", a), null;
|
|
51366
51352
|
}
|
|
51367
|
-
const
|
|
51368
|
-
return
|
|
51353
|
+
const r = t.value;
|
|
51354
|
+
return r || sessionStorage.getItem("elementDestinationURL") || null;
|
|
51369
51355
|
},
|
|
51370
51356
|
loadNextAssignedTask(t = null) {
|
|
51371
51357
|
if (t || (t = this.requestId), !this.userId)
|
|
@@ -51383,7 +51369,7 @@ const nte = () => new Promise((t) => {
|
|
|
51383
51369
|
this.emitIfTaskCompleted(t);
|
|
51384
51370
|
this.taskId = a.id, this.loadTask(), this.nodeId = a.element_id;
|
|
51385
51371
|
} else
|
|
51386
|
-
this.parentRequest && ["COMPLETED", "CLOSED"].includes(this.task.process_request.status)
|
|
51372
|
+
this.parentRequest && ["COMPLETED", "CLOSED"].includes(this.task.process_request.status) ? this.$emit("completed", this.getAllowedRequestId()) : this.taskPreview || this.emitClosedEvent();
|
|
51387
51373
|
});
|
|
51388
51374
|
},
|
|
51389
51375
|
emitIfTaskCompleted(t) {
|
|
@@ -51458,13 +51444,11 @@ const nte = () => new Promise((t) => {
|
|
|
51458
51444
|
const e = {
|
|
51459
51445
|
user_id: this.userId,
|
|
51460
51446
|
process_request_id: t.processRequestId,
|
|
51461
|
-
page: t.page,
|
|
51462
|
-
per_page: t.perPage,
|
|
51447
|
+
page: t.page || 1,
|
|
51448
|
+
per_page: t.perPage || 1,
|
|
51463
51449
|
status: t.status
|
|
51464
|
-
}, r =
|
|
51465
|
-
|
|
51466
|
-
).join("&");
|
|
51467
|
-
return window.ProcessMaker.apiClient.get(`tasks?${r}`);
|
|
51450
|
+
}, r = new URLSearchParams(e).toString();
|
|
51451
|
+
return this.$dataProvider.getTasks(`?${r}`);
|
|
51468
51452
|
},
|
|
51469
51453
|
/**
|
|
51470
51454
|
* Parses a JSON string and returns the result.
|
|
@@ -51517,7 +51501,8 @@ const nte = () => new Promise((t) => {
|
|
|
51517
51501
|
return e && e.allowed ? this.parentRequest : this.requestId;
|
|
51518
51502
|
},
|
|
51519
51503
|
processUpdated: ie.debounce(function(t) {
|
|
51520
|
-
|
|
51504
|
+
var e;
|
|
51505
|
+
t.event === "ACTIVITY_ACTIVATED" && t.elementType === "task" && ((e = this.task.elementDestination) != null && e.type || (this.taskId = t.taskId), this.reload()), t.event === "ACTIVITY_EXCEPTION" && this.$emit("error", this.requestId);
|
|
51521
51506
|
}, 100),
|
|
51522
51507
|
initSocketListeners() {
|
|
51523
51508
|
this.loadingListeners = !1, this.addSocketListener(
|
|
@@ -51597,7 +51582,7 @@ var ote = function() {
|
|
|
51597
51582
|
lte,
|
|
51598
51583
|
!1,
|
|
51599
51584
|
null,
|
|
51600
|
-
"
|
|
51585
|
+
"b5beddfe",
|
|
51601
51586
|
null,
|
|
51602
51587
|
null
|
|
51603
51588
|
);
|
|
@@ -52247,7 +52232,7 @@ const Fte = typeof window > "u" ? global : window, Bte = {
|
|
|
52247
52232
|
deleteProperty(t) {
|
|
52248
52233
|
Fte.ProcessMaker.confirmModal(
|
|
52249
52234
|
this.$t("Are you sure you want to delete the calc ?"),
|
|
52250
|
-
this.$t("If you do, you
|
|
52235
|
+
this.$t("If you do, you won’t be able to recover the Calc configuration."),
|
|
52251
52236
|
"",
|
|
52252
52237
|
() => {
|
|
52253
52238
|
this.remove(t);
|
|
@@ -52299,7 +52284,7 @@ var Hte = function() {
|
|
|
52299
52284
|
Rte,
|
|
52300
52285
|
!1,
|
|
52301
52286
|
null,
|
|
52302
|
-
"
|
|
52287
|
+
"6d70559c",
|
|
52303
52288
|
null,
|
|
52304
52289
|
null
|
|
52305
52290
|
);
|