@processmaker/screen-builder 2.98.4 → 2.99.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.
- package/dist/vue-form-builder.css +1 -1
- package/dist/vue-form-builder.es.js +36 -14
- package/dist/vue-form-builder.es.js.map +1 -1
- package/dist/vue-form-builder.umd.js +2 -2
- package/dist/vue-form-builder.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/components/renderer/file-upload.vue +19 -0
- package/src/components/task.vue +32 -6
|
@@ -9833,6 +9833,16 @@ const J0 = ds(), U0 = [
|
|
|
9833
9833
|
browse(t) {
|
|
9834
9834
|
["Enter", "Space"].includes(t.code) && t.target.click();
|
|
9835
9835
|
},
|
|
9836
|
+
fileError(t, e, r, i) {
|
|
9837
|
+
let a = "";
|
|
9838
|
+
try {
|
|
9839
|
+
a = JSON.parse(r).join(", ");
|
|
9840
|
+
} catch {
|
|
9841
|
+
a = r;
|
|
9842
|
+
}
|
|
9843
|
+
a.length > 0 && window.ProcessMaker.alert(`${this.$t("File Upload Error:")} ${a}`, "danger"), window.onbeforeunload = function() {
|
|
9844
|
+
}, this.$emit("file-error", r);
|
|
9845
|
+
},
|
|
9836
9846
|
fileUploaded(t, e, r) {
|
|
9837
9847
|
this.uploading = !1;
|
|
9838
9848
|
let i = e.name;
|
|
@@ -9883,7 +9893,7 @@ const J0 = ds(), U0 = [
|
|
|
9883
9893
|
};
|
|
9884
9894
|
var Q0 = function() {
|
|
9885
9895
|
var e = this, r = e._self._c;
|
|
9886
|
-
return r("div", [r("required-asterisk"), r("label", { directives: [{ name: "uni-for", rawName: "v-uni-for", value: e.name, expression: "name" }] }, [e._v(e._s(e.label))]), e.inPreviewMode ? r("b-card", { staticClass: "mb-2" }, [e._v(" " + e._s(e.$t("File uploads are unavailable in preview mode.")) + " ")]) : e._e(), !e.inPreviewMode && e.showComponent ? r("uploader", { ref: "uploader", class: { "was-validated": e.required }, attrs: { options: e.options, attrs: e.attrs }, on: { complete: e.complete, "upload-start": e.start, "file-removed": e.removed, "file-success": e.fileUploaded, "file-added": e.addFile } }, [r("uploader-unsupport"), e.uploaderLoaded ? r("uploader-drop", { staticClass: "form-control-file" }, [r("p", [e._v(e._s(e.$t("Drop a file here to upload or")))]), r("uploader-btn", { staticClass: "btn btn-secondary text-white", class: { disabled: e.disabled }, attrs: { attrs: e.nativeButtonAttrs, tabindex: "0", "aria-label": e.$attrs["aria-label"] }, nativeOn: { keyup: function(i) {
|
|
9896
|
+
return r("div", [r("required-asterisk"), r("label", { directives: [{ name: "uni-for", rawName: "v-uni-for", value: e.name, expression: "name" }] }, [e._v(e._s(e.label))]), e.inPreviewMode ? r("b-card", { staticClass: "mb-2" }, [e._v(" " + e._s(e.$t("File uploads are unavailable in preview mode.")) + " ")]) : e._e(), !e.inPreviewMode && e.showComponent ? r("uploader", { ref: "uploader", class: { "was-validated": e.required }, attrs: { options: e.options, attrs: e.attrs }, on: { complete: e.complete, "upload-start": e.start, "file-removed": e.removed, "file-success": e.fileUploaded, "file-error": e.fileError, "file-added": e.addFile } }, [r("uploader-unsupport"), e.uploaderLoaded ? r("uploader-drop", { staticClass: "form-control-file" }, [r("p", [e._v(e._s(e.$t("Drop a file here to upload or")))]), r("uploader-btn", { staticClass: "btn btn-secondary text-white", class: { disabled: e.disabled }, attrs: { attrs: e.nativeButtonAttrs, tabindex: "0", "aria-label": e.$attrs["aria-label"] }, nativeOn: { keyup: function(i) {
|
|
9887
9897
|
return e.browse.apply(null, arguments);
|
|
9888
9898
|
} } }, [e._v(" " + e._s(e.$t("select file")) + " ")]), e.validation === "required" && !e.value ? r("span", { staticClass: "required" }, [e._v(e._s(e.$t("Required")))]) : e._e()], 1) : e._e(), r("uploader-list", { scopedSlots: e._u([{ key: "default", fn: function({ fileList: i }) {
|
|
9889
9899
|
return [e.uploading ? r("ul", e._l(i, function(a) {
|
|
@@ -9900,7 +9910,7 @@ var Q0 = function() {
|
|
|
9900
9910
|
Y0,
|
|
9901
9911
|
!1,
|
|
9902
9912
|
null,
|
|
9903
|
-
"
|
|
9913
|
+
"8d8f38e4",
|
|
9904
9914
|
null,
|
|
9905
9915
|
null
|
|
9906
9916
|
);
|
|
@@ -51270,15 +51280,15 @@ const nte = () => new Promise((t) => {
|
|
|
51270
51280
|
reload() {
|
|
51271
51281
|
this.taskId ? this.loadTask() : this.loadNextAssignedTask();
|
|
51272
51282
|
},
|
|
51273
|
-
loadTask() {
|
|
51283
|
+
loadTask(t = !1) {
|
|
51274
51284
|
if (!this.taskId)
|
|
51275
51285
|
return;
|
|
51276
|
-
const
|
|
51286
|
+
const e = `/${this.taskId}?include=data,user,draft,requestor,processRequest,component,screen,requestData,loopContext,bpmnTagName,interstitial,definition,nested,userRequestPermission,elementDestination`;
|
|
51277
51287
|
return window.ProcessMaker && window.ProcessMaker.packages && window.ProcessMaker.packages.includes("package-vocabularies") && (window.ProcessMaker.VocabulariesSchemaUrl = `vocabularies/task_schema/${this.taskId}`), this.beforeLoadTask(this.taskId, this.nodeId).then(() => {
|
|
51278
|
-
this.$dataProvider.getTasks(
|
|
51279
|
-
if (this.task =
|
|
51280
|
-
const
|
|
51281
|
-
|
|
51288
|
+
this.$dataProvider.getTasks(e).then((r) => {
|
|
51289
|
+
if (this.task = r.data, this.linkTask(t), this.checkTaskStatus(), window.PM4ConfigOverrides && window.PM4ConfigOverrides.getScreenEndpoint && window.PM4ConfigOverrides.getScreenEndpoint.includes("tasks/")) {
|
|
51290
|
+
const i = window.PM4ConfigOverrides.getScreenEndpoint.split("/");
|
|
51291
|
+
i[1] = this.task.id, window.PM4ConfigOverrides.getScreenEndpoint = i.join("/");
|
|
51282
51292
|
}
|
|
51283
51293
|
}).catch(() => {
|
|
51284
51294
|
this.hasErrors = !0;
|
|
@@ -51287,8 +51297,15 @@ const nte = () => new Promise((t) => {
|
|
|
51287
51297
|
});
|
|
51288
51298
|
});
|
|
51289
51299
|
},
|
|
51290
|
-
linkTask() {
|
|
51291
|
-
this.nodeId = this.task.element_id, this.listenForParentChanges(), this.task.process_request.status === "COMPLETED" && (this.taskPreview || this.$emit("completed", this.task.process_request.id)
|
|
51300
|
+
linkTask(t) {
|
|
51301
|
+
this.nodeId = this.task.element_id, this.listenForParentChanges(), this.task.process_request.status === "COMPLETED" && (this.taskPreview || (this.$emit("completed", this.task.process_request.id), t && window.ProcessMaker.apiClient.get(`/requests/${this.requestId}/end-event-destination`).then((e) => {
|
|
51302
|
+
var r, i;
|
|
51303
|
+
if (!((i = (r = e.data) == null ? void 0 : r.data) != null && i.endEventDestination)) {
|
|
51304
|
+
window.location.href = `/requests/${this.requestId}`;
|
|
51305
|
+
return;
|
|
51306
|
+
}
|
|
51307
|
+
this.processCompletedRedirect(e.data.data, this.userId, this.requestId);
|
|
51308
|
+
}))), this.taskPreview && this.task.status === "CLOSED" && (this.task.interstitial_screen._interstitial = !1, this.alwaysAllowEditing || (this.task.screen.config = this.disableForm(this.task.screen.config)), this.screen = this.task.screen);
|
|
51292
51309
|
},
|
|
51293
51310
|
prepareTask() {
|
|
51294
51311
|
(!this.loadingButton || this.task.status === "ACTIVE") && (this.resetScreenState(), this.requestData = ie.get(this.task, "request_data", {}), this.loopContext = ie.get(this.task, "loop_context", ""), this.task.draft && (this.requestData = ie.merge(
|
|
@@ -51628,8 +51645,13 @@ const nte = () => new Promise((t) => {
|
|
|
51628
51645
|
* @param {Object} data - The event data containing the process update information.
|
|
51629
51646
|
*/
|
|
51630
51647
|
handleProcessUpdated(t) {
|
|
51631
|
-
var
|
|
51632
|
-
|
|
51648
|
+
var r, i, a, n;
|
|
51649
|
+
const e = (r = this.task.elementDestination) == null ? void 0 : r.value;
|
|
51650
|
+
if (e && ((i = t == null ? void 0 : t.params[0]) == null ? void 0 : i.tokenId) === this.taskId && ((a = t == null ? void 0 : t.params[0]) == null ? void 0 : a.requestStatus) === "ACTIVE") {
|
|
51651
|
+
window.location.href = e;
|
|
51652
|
+
return;
|
|
51653
|
+
}
|
|
51654
|
+
["ACTIVITY_ACTIVATED", "ACTIVITY_COMPLETED"].includes(t.event) && t.elementType === "task" && ((n = this.task.elementDestination) != null && n.type || (this.taskId = t.taskId), this.reload()), t.event === "ACTIVITY_EXCEPTION" && this.$emit("error", this.requestId);
|
|
51633
51655
|
},
|
|
51634
51656
|
/**
|
|
51635
51657
|
* Handles the default redirect action by logging a warning and redirecting the user to the request page.
|
|
@@ -51694,7 +51716,7 @@ const nte = () => new Promise((t) => {
|
|
|
51694
51716
|
}
|
|
51695
51717
|
},
|
|
51696
51718
|
mounted() {
|
|
51697
|
-
this.screenId = this.initialScreenId, this.taskId = this.initialTaskId, this.requestId = this.initialRequestId, this.processId = this.initialProcessId, this.nodeId = this.initialNodeId, this.requestData = this.value, this.loopContext = this.initialLoopContext, this.loadTask();
|
|
51719
|
+
this.screenId = this.initialScreenId, this.taskId = this.initialTaskId, this.requestId = this.initialRequestId, this.processId = this.initialProcessId, this.nodeId = this.initialNodeId, this.requestData = this.value, this.loopContext = this.initialLoopContext, this.loadTask(!0);
|
|
51698
51720
|
},
|
|
51699
51721
|
destroyed() {
|
|
51700
51722
|
this.unsubscribeSocketListeners();
|
|
@@ -51715,7 +51737,7 @@ var ote = function() {
|
|
|
51715
51737
|
lte,
|
|
51716
51738
|
!1,
|
|
51717
51739
|
null,
|
|
51718
|
-
"
|
|
51740
|
+
"eca3b9ec",
|
|
51719
51741
|
null,
|
|
51720
51742
|
null
|
|
51721
51743
|
);
|