@processmaker/screen-builder 3.8.17 → 3.8.18
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 +61 -5
- package/dist/vue-form-builder.es.js.map +1 -1
- package/dist/vue-form-builder.umd.js +1 -1
- package/dist/vue-form-builder.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/components/inspector/variables-to-submit.vue +113 -26
|
@@ -51112,7 +51112,7 @@ const nre = {
|
|
|
51112
51112
|
const l = this.loadVariables(r);
|
|
51113
51113
|
Object.assign(t, l.variables || {});
|
|
51114
51114
|
}
|
|
51115
|
-
return Object.assign(t, this.extractCalculatedVariables()), Object.keys(t).filter((l) =>
|
|
51115
|
+
return Object.assign(t, this.extractCalculatedVariables()), Object.assign(t, this.extractWatcherVariables()), Object.keys(t).filter((l) => this.isValidVariableName(l)).sort();
|
|
51116
51116
|
},
|
|
51117
51117
|
filteredVariables() {
|
|
51118
51118
|
if (!this.searchQuery)
|
|
@@ -51139,6 +51139,19 @@ const nre = {
|
|
|
51139
51139
|
return this.isEnabled ? this.requiredVariables.filter(
|
|
51140
51140
|
(t) => !this.selectedVariables.includes(t)
|
|
51141
51141
|
) : [];
|
|
51142
|
+
},
|
|
51143
|
+
/**
|
|
51144
|
+
* Check if all filtered variables are selected
|
|
51145
|
+
*/
|
|
51146
|
+
allSelected() {
|
|
51147
|
+
return this.filteredVariables.length > 0 && this.filteredVariables.every((t) => this.selectedVariables.includes(t));
|
|
51148
|
+
},
|
|
51149
|
+
/**
|
|
51150
|
+
* Check if some (but not all) filtered variables are selected
|
|
51151
|
+
*/
|
|
51152
|
+
someSelected() {
|
|
51153
|
+
const t = this.filteredVariables.filter((e) => this.selectedVariables.includes(e)).length;
|
|
51154
|
+
return t > 0 && t < this.filteredVariables.length;
|
|
51142
51155
|
}
|
|
51143
51156
|
},
|
|
51144
51157
|
watch: {
|
|
@@ -51148,8 +51161,8 @@ const nre = {
|
|
|
51148
51161
|
selectedVariables(t) {
|
|
51149
51162
|
this.isEnabled ? (this.$emit("input", t), this.$emit("change", t)) : (this.$emit("input", []), this.$emit("change", []));
|
|
51150
51163
|
},
|
|
51151
|
-
isEnabled(t) {
|
|
51152
|
-
t || (this.selectedVariables = [], this.$emit("input", []), this.$emit("change", []));
|
|
51164
|
+
isEnabled(t, e) {
|
|
51165
|
+
t && !e ? (this.selectedVariables = [...this.availableVariables], this.$emit("input", this.selectedVariables), this.$emit("change", this.selectedVariables)) : t || (this.selectedVariables = [], this.$emit("input", []), this.$emit("change", []));
|
|
51153
51166
|
},
|
|
51154
51167
|
"selectedControl.config.event"(t) {
|
|
51155
51168
|
this.event = t;
|
|
@@ -51160,6 +51173,10 @@ const nre = {
|
|
|
51160
51173
|
// Watch for computed properties changes in App.vue
|
|
51161
51174
|
"$root.computed"() {
|
|
51162
51175
|
this.$forceUpdate();
|
|
51176
|
+
},
|
|
51177
|
+
// Watch for watchers changes in App.vue
|
|
51178
|
+
"$root.watchers"() {
|
|
51179
|
+
this.$forceUpdate();
|
|
51163
51180
|
}
|
|
51164
51181
|
},
|
|
51165
51182
|
methods: {
|
|
@@ -51183,9 +51200,22 @@ const nre = {
|
|
|
51183
51200
|
const t = new Set(this.filteredVariables);
|
|
51184
51201
|
this.selectedVariables = this.selectedVariables.filter((e) => !t.has(e));
|
|
51185
51202
|
},
|
|
51203
|
+
toggleSelectAll(t) {
|
|
51204
|
+
t ? this.selectAll() : this.deselectAll();
|
|
51205
|
+
},
|
|
51186
51206
|
toggleSearch() {
|
|
51187
51207
|
this.showSearch = !this.showSearch, this.showSearch || (this.searchQuery = "");
|
|
51188
51208
|
},
|
|
51209
|
+
/**
|
|
51210
|
+
* Check if a variable name is valid
|
|
51211
|
+
* Uses same logic as dot_notation validation rule
|
|
51212
|
+
*/
|
|
51213
|
+
isValidVariableName(t) {
|
|
51214
|
+
if (!t || typeof t != "string" || t.startsWith("_parent."))
|
|
51215
|
+
return !1;
|
|
51216
|
+
const e = /^[a-zA-Z][a-zA-Z0-9_]*$/;
|
|
51217
|
+
return t.split(".").every((i) => e.test(i));
|
|
51218
|
+
},
|
|
51189
51219
|
/**
|
|
51190
51220
|
* Extract calculated variables (computed properties) from the screen
|
|
51191
51221
|
* Searches in multiple locations: App.vue, builder, or parent components
|
|
@@ -51217,6 +51247,32 @@ const nre = {
|
|
|
51217
51247
|
}
|
|
51218
51248
|
return [];
|
|
51219
51249
|
},
|
|
51250
|
+
/**
|
|
51251
|
+
* Extract watcher output variables from the screen
|
|
51252
|
+
*/
|
|
51253
|
+
extractWatcherVariables() {
|
|
51254
|
+
const t = {};
|
|
51255
|
+
return (this.getWatchers() || []).forEach((r) => {
|
|
51256
|
+
if (!r.byPass) {
|
|
51257
|
+
r.output_variable && (t[r.output_variable] = null);
|
|
51258
|
+
try {
|
|
51259
|
+
const i = typeof r.script_configuration == "string" ? JSON.parse(r.script_configuration) : r.script_configuration;
|
|
51260
|
+
((i == null ? void 0 : i.dataMapping) || []).forEach((a) => {
|
|
51261
|
+
a.key && (t[a.key] = null);
|
|
51262
|
+
});
|
|
51263
|
+
} catch {
|
|
51264
|
+
console.error("Invalid JSON in script_configuration for watcher:", r.name);
|
|
51265
|
+
}
|
|
51266
|
+
}
|
|
51267
|
+
}), t;
|
|
51268
|
+
},
|
|
51269
|
+
/**
|
|
51270
|
+
* Get watchers from various sources
|
|
51271
|
+
*/
|
|
51272
|
+
getWatchers() {
|
|
51273
|
+
var t, e, r, i, a, n, s, o, u;
|
|
51274
|
+
return ((e = (t = this.$root) == null ? void 0 : t.$data) == null ? void 0 : e.watchers) || ((a = (i = (r = this.$root) == null ? void 0 : r.$children) == null ? void 0 : i[0]) == null ? void 0 : a.watchers) || ((u = (o = (s = (n = this.$root) == null ? void 0 : n.$children) == null ? void 0 : s[0]) == null ? void 0 : o.$data) == null ? void 0 : u.watchers) || [];
|
|
51275
|
+
},
|
|
51220
51276
|
/**
|
|
51221
51277
|
* Extract variables from form config
|
|
51222
51278
|
* Recursively searches through all pages and items
|
|
@@ -51350,7 +51406,7 @@ var sre = function() {
|
|
|
51350
51406
|
var e = this, r = e._self._c;
|
|
51351
51407
|
return e.event === "submit" ? r("div", { staticClass: "variables-to-submit-wrapper" }, [e.isEnabled && e.missingRequiredVariables.length > 0 ? r("b-alert", { staticClass: "warning-alert", attrs: { show: "", variant: "warning", "data-cy": "missing-required-warning" } }, [r("i", { staticClass: "fas fa-bolt warning-icon" }), r("span", { staticClass: "warning-text" }, [e._v(" " + e._s(e.$t("The following required fields are not included")) + ' "'), r("strong", [e._v(e._s(e.missingRequiredVariables.join('", "')))]), e._v('". ' + e._s(e.$t("This may cause validation errors during submission.")) + " ")])]) : e._e(), r("div", { staticClass: "variables-to-submit-card" }, [r("div", { staticClass: "header-section" }, [r("h6", { staticClass: "header-title" }, [e._v(e._s(e.$t("Submit Information")))]), r("b-form-checkbox", { staticClass: "toggle-switch", attrs: { switch: "", size: "lg", "data-cy": "variables-to-submit-toggle" }, model: { value: e.isEnabled, callback: function(i) {
|
|
51352
51408
|
e.isEnabled = i;
|
|
51353
|
-
}, expression: "isEnabled" } })], 1), r("div", { staticClass: "description-text" }, [r("p", [e._v(e._s(e.$t("Select variables to submit, otherwise all variables will be submitted by default.")))])]), e.isEnabled && e.availableVariables.length === 0 ? r("div", { staticClass: "alert alert-info" }, [r("small", [e._v(e._s(e.$t("No variables available. Variables will be available after you add form fields to your screen.")))])]) : e.isEnabled ? r("div", [r("div", { staticClass: "divider" }), r("div", { staticClass: "controls-section" }, [r("
|
|
51409
|
+
}, expression: "isEnabled" } })], 1), r("div", { staticClass: "description-text" }, [r("p", [e._v(e._s(e.$t("Select variables to submit, otherwise all variables will be submitted by default.")))])]), e.isEnabled && e.availableVariables.length === 0 ? r("div", { staticClass: "alert alert-info" }, [r("small", [e._v(e._s(e.$t("No variables available. Variables will be available after you add form fields to your screen.")))])]) : e.isEnabled ? r("div", [r("div", { staticClass: "divider" }), r("div", { staticClass: "controls-section" }, [r("b-form-checkbox", { staticClass: "select-all-checkbox", attrs: { checked: e.allSelected, indeterminate: e.someSelected, disabled: e.filteredVariables.length === 0, "data-cy": "variables-to-submit-select-all" }, on: { change: e.toggleSelectAll } }, [e._v(" " + e._s(e.$t("Select All")) + " ")]), r("button", { staticClass: "search-button", attrs: { type: "button", "data-cy": "variables-to-submit-search-toggle" }, on: { click: e.toggleSearch } }, [r("i", { staticClass: "fas fa-search" })])], 1), e.showSearch ? r("div", { staticClass: "search-container" }, [r("b-input-group", [r("b-form-input", { staticClass: "search-input", attrs: { placeholder: e.$t("Search variables..."), "data-cy": "variables-to-submit-search" }, model: { value: e.searchQuery, callback: function(i) {
|
|
51354
51410
|
e.searchQuery = i;
|
|
51355
51411
|
}, expression: "searchQuery" } }), r("b-input-group-append", [r("b-button", { staticClass: "clear-search-button", attrs: { disabled: !e.searchQuery, "data-cy": "variables-to-submit-clear-search", variant: "outline-secondary" }, on: { click: function(i) {
|
|
51356
51412
|
e.searchQuery = "";
|
|
@@ -51365,7 +51421,7 @@ var sre = function() {
|
|
|
51365
51421
|
ore,
|
|
51366
51422
|
!1,
|
|
51367
51423
|
null,
|
|
51368
|
-
"
|
|
51424
|
+
"277c10d3",
|
|
51369
51425
|
null,
|
|
51370
51426
|
null
|
|
51371
51427
|
);
|