@processmaker/screen-builder 2.26.0 → 2.27.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/package-lock.json +1 -1
- package/package.json +1 -1
- package/src/.DS_Store +0 -0
- package/src/components/inspector/screen-selector.vue +6 -0
- package/src/components/renderer/form-nested-screen.vue +1 -0
- package/src/components/vue-form-builder.vue +34 -0
- package/dist/demo.html +0 -10
- package/dist/vue-form-builder.common.js +0 -195214
- package/dist/vue-form-builder.common.js.map +0 -1
- package/dist/vue-form-builder.css +0 -1
- package/dist/vue-form-builder.umd.js +0 -195224
- package/dist/vue-form-builder.umd.js.map +0 -1
- package/dist/vue-form-builder.umd.min.js +0 -324
- package/dist/vue-form-builder.umd.min.js.map +0 -1
package/package-lock.json
CHANGED
package/package.json
CHANGED
package/src/.DS_Store
CHANGED
|
Binary file
|
|
@@ -102,6 +102,12 @@ export default {
|
|
|
102
102
|
},
|
|
103
103
|
},
|
|
104
104
|
mounted() {
|
|
105
|
+
this.$root.$on('remove-nested', (nestedScreenId) => {
|
|
106
|
+
if (this.value === nestedScreenId) {
|
|
107
|
+
this.$emit('input', null);
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
|
|
105
111
|
let pmql = '(type = "FORM" or type = "DISPLAY")';
|
|
106
112
|
if (this.screenType === formTypes.display) {
|
|
107
113
|
pmql = '(type = "DISPLAY")';
|
|
@@ -474,6 +474,7 @@ export default {
|
|
|
474
474
|
watch: {
|
|
475
475
|
config: {
|
|
476
476
|
handler() {
|
|
477
|
+
this.checkForCaptchaInLoops();
|
|
477
478
|
this.$emit('change', this.config);
|
|
478
479
|
this.loadVariablesTree();
|
|
479
480
|
},
|
|
@@ -517,6 +518,36 @@ export default {
|
|
|
517
518
|
refreshContent() {
|
|
518
519
|
this.editorContentKey++;
|
|
519
520
|
},
|
|
521
|
+
checkForCaptchaInLoops() {
|
|
522
|
+
this.config.forEach(page => {
|
|
523
|
+
this.checkForCaptcha(page.items);
|
|
524
|
+
});
|
|
525
|
+
},
|
|
526
|
+
checkForCaptcha(items, insideLoop = false, nestedScreen = null) {
|
|
527
|
+
items.forEach(item => {
|
|
528
|
+
if (!item.items && item.component == 'Captcha' && insideLoop) {
|
|
529
|
+
if (nestedScreen && nestedScreen.config.screen) {
|
|
530
|
+
this.$root.$emit('remove-nested', nestedScreen.config.screen);
|
|
531
|
+
nestedScreen.config.screen = null;
|
|
532
|
+
globalObject.ProcessMaker.alert(this.$t('You are trying to place a nested screen within CAPTCHA elements inside a loop. CAPTCHA controls cannot be placed within a Loop control.'), 'danger');
|
|
533
|
+
} else {
|
|
534
|
+
items.splice(items.indexOf(item), 1);
|
|
535
|
+
globalObject.ProcessMaker.alert(this.$t('CAPTCHA controls cannot be placed within a Loop control.'), 'danger');
|
|
536
|
+
}
|
|
537
|
+
}
|
|
538
|
+
if (item.items) {
|
|
539
|
+
this.checkForCaptcha(item.items, true);
|
|
540
|
+
}
|
|
541
|
+
if (item.component == 'FormNestedScreen' && insideLoop && item.config.screen && window.nestedScreens) {
|
|
542
|
+
let nestedScreenItems = window.nestedScreens['id_' + item.config.screen];
|
|
543
|
+
if (nestedScreenItems) {
|
|
544
|
+
nestedScreenItems.forEach(nestedScreenPage => {
|
|
545
|
+
this.checkForCaptcha(nestedScreenPage.items, true, item);
|
|
546
|
+
});
|
|
547
|
+
}
|
|
548
|
+
}
|
|
549
|
+
});
|
|
550
|
+
},
|
|
520
551
|
loadVariablesTree() {
|
|
521
552
|
const definition = {
|
|
522
553
|
config : this.$parent.config,
|
|
@@ -843,6 +874,9 @@ export default {
|
|
|
843
874
|
},
|
|
844
875
|
mounted() {
|
|
845
876
|
this.loadVariablesTree();
|
|
877
|
+
this.$root.$on('nested-screen-updated', () => {
|
|
878
|
+
this.checkForCaptchaInLoops();
|
|
879
|
+
});
|
|
846
880
|
},
|
|
847
881
|
};
|
|
848
882
|
</script>
|
package/dist/demo.html
DELETED