@processmaker/screen-builder 3.8.18 → 3.8.19
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 +52 -15
- 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 +3 -3
- package/src/components/inspector/variables-to-submit.vue +59 -13
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@processmaker/screen-builder",
|
|
3
|
-
"version": "3.8.
|
|
3
|
+
"version": "3.8.19",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"dev": "VITE_COVERAGE=true vite",
|
|
6
6
|
"build": "vite build",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"@fortawesome/fontawesome-free": "^5.6.1",
|
|
62
62
|
"@originjs/vite-plugin-commonjs": "^1.0.3",
|
|
63
63
|
"@panter/vue-i18next": "^0.15.2",
|
|
64
|
-
"@processmaker/vue-form-elements": "0.65.
|
|
64
|
+
"@processmaker/vue-form-elements": "0.65.6",
|
|
65
65
|
"@processmaker/vue-multiselect": "2.3.0",
|
|
66
66
|
"@storybook/addon-essentials": "^7.6.13",
|
|
67
67
|
"@storybook/addon-interactions": "^7.6.13",
|
|
@@ -125,7 +125,7 @@
|
|
|
125
125
|
},
|
|
126
126
|
"peerDependencies": {
|
|
127
127
|
"@panter/vue-i18next": "^0.15.0",
|
|
128
|
-
"@processmaker/vue-form-elements": "0.65.
|
|
128
|
+
"@processmaker/vue-form-elements": "0.65.6",
|
|
129
129
|
"i18next": "^15.0.8",
|
|
130
130
|
"vue": "^2.6.12",
|
|
131
131
|
"vuex": "^3.1.1"
|
|
@@ -231,6 +231,20 @@ export default {
|
|
|
231
231
|
someSelected() {
|
|
232
232
|
const selectedCount = this.filteredVariables.filter(v => this.selectedVariables.includes(v)).length;
|
|
233
233
|
return selectedCount > 0 && selectedCount < this.filteredVariables.length;
|
|
234
|
+
},
|
|
235
|
+
|
|
236
|
+
/**
|
|
237
|
+
* Source for computed properties to watch for changes
|
|
238
|
+
*/
|
|
239
|
+
computedPropertiesSource() {
|
|
240
|
+
return this.getComputedProperties() || [];
|
|
241
|
+
},
|
|
242
|
+
|
|
243
|
+
/**
|
|
244
|
+
* Source for watchers to watch for changes
|
|
245
|
+
*/
|
|
246
|
+
watchersSource() {
|
|
247
|
+
return this.getWatchers() || [];
|
|
234
248
|
}
|
|
235
249
|
},
|
|
236
250
|
watch: {
|
|
@@ -267,22 +281,49 @@ export default {
|
|
|
267
281
|
'selectedControl.config.event'(newVal) {
|
|
268
282
|
this.event = newVal;
|
|
269
283
|
},
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
},
|
|
279
|
-
// Watch for
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
284
|
+
formConfig: {
|
|
285
|
+
handler() {
|
|
286
|
+
this.$nextTick(() => {
|
|
287
|
+
this.cleanupInvalidSelections();
|
|
288
|
+
});
|
|
289
|
+
},
|
|
290
|
+
deep: true,
|
|
291
|
+
immediate: true
|
|
292
|
+
},
|
|
293
|
+
// Watch for computed properties changes
|
|
294
|
+
computedPropertiesSource: {
|
|
295
|
+
handler() {
|
|
296
|
+
this.$nextTick(() => {
|
|
297
|
+
this.cleanupInvalidSelections();
|
|
298
|
+
});
|
|
299
|
+
},
|
|
300
|
+
deep: true
|
|
301
|
+
},
|
|
302
|
+
// Watch for watchers changes
|
|
303
|
+
watchersSource: {
|
|
304
|
+
handler() {
|
|
305
|
+
this.$nextTick(() => {
|
|
306
|
+
this.cleanupInvalidSelections();
|
|
307
|
+
});
|
|
308
|
+
},
|
|
309
|
+
deep: true
|
|
283
310
|
}
|
|
284
311
|
},
|
|
285
312
|
methods: {
|
|
313
|
+
/**
|
|
314
|
+
* Remove selected variables that no longer exist in availableVariables
|
|
315
|
+
*/
|
|
316
|
+
cleanupInvalidSelections() {
|
|
317
|
+
const available = this.availableVariables;
|
|
318
|
+
const validSelected = this.selectedVariables.filter(v => available.includes(v));
|
|
319
|
+
if (validSelected.length !== this.selectedVariables.length) {
|
|
320
|
+
this.selectedVariables = validSelected;
|
|
321
|
+
// Turn off toggle if no variables remain selected
|
|
322
|
+
if (validSelected.length === 0) {
|
|
323
|
+
this.isEnabled = false;
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
},
|
|
286
327
|
/**
|
|
287
328
|
* Load variables from the variables tree
|
|
288
329
|
* Only includes root-level variables (no prefix, no dots in name)
|
|
@@ -379,6 +420,11 @@ export default {
|
|
|
379
420
|
return this.$root.$data.computed;
|
|
380
421
|
}
|
|
381
422
|
|
|
423
|
+
// Try $root.$children[0] (App.vue pattern)
|
|
424
|
+
if (this.$root?.$children?.[0]?.computed && Array.isArray(this.$root.$children[0].computed)) {
|
|
425
|
+
return this.$root.$children[0].computed;
|
|
426
|
+
}
|
|
427
|
+
|
|
382
428
|
// Try builder sources
|
|
383
429
|
if (this.builder?.screen?.computed) {
|
|
384
430
|
return this.builder.screen.computed;
|