@processmaker/screen-builder 3.1.0 → 3.2.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 +31 -23
- package/dist/vue-form-builder.es.js.map +1 -1
- package/dist/vue-form-builder.umd.js +42 -42
- package/dist/vue-form-builder.umd.js.map +1 -1
- package/package.json +3 -3
- package/src/components/inspector/options-list.vue +32 -17
- package/src/components/screen-renderer.vue +1 -0
- package/src/components/task.vue +6 -1
- package/src/components/vue-form-builder.vue +1 -1
- package/src/components/vue-form-renderer.vue +2 -0
- package/src/form-builder-controls.js +1 -0
- package/src/mixins/extensions/PageNavigate.js +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@processmaker/screen-builder",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.2.0",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"dev": "VITE_COVERAGE=true vite",
|
|
6
6
|
"build": "vite build",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"@fortawesome/fontawesome-free": "^5.6.1",
|
|
58
58
|
"@originjs/vite-plugin-commonjs": "^1.0.3",
|
|
59
59
|
"@panter/vue-i18next": "^0.15.2",
|
|
60
|
-
"@processmaker/vue-form-elements": "0.
|
|
60
|
+
"@processmaker/vue-form-elements": "0.63.0",
|
|
61
61
|
"@processmaker/vue-multiselect": "2.3.0",
|
|
62
62
|
"@storybook/addon-essentials": "^7.6.13",
|
|
63
63
|
"@storybook/addon-interactions": "^7.6.13",
|
|
@@ -116,7 +116,7 @@
|
|
|
116
116
|
},
|
|
117
117
|
"peerDependencies": {
|
|
118
118
|
"@panter/vue-i18next": "^0.15.0",
|
|
119
|
-
"@processmaker/vue-form-elements": "0.
|
|
119
|
+
"@processmaker/vue-form-elements": "0.63.0",
|
|
120
120
|
"i18next": "^15.0.8",
|
|
121
121
|
"vue": "^2.6.12",
|
|
122
122
|
"vuex": "^3.1.1"
|
|
@@ -430,7 +430,7 @@ export default {
|
|
|
430
430
|
return this.value || 'content';
|
|
431
431
|
},
|
|
432
432
|
ariaLabelField() {
|
|
433
|
-
return this.
|
|
433
|
+
return this.ariaLabel || 'ariaLabel';
|
|
434
434
|
},
|
|
435
435
|
currentItemToDelete() {
|
|
436
436
|
if (this.removeIndex !== null
|
|
@@ -487,7 +487,7 @@ export default {
|
|
|
487
487
|
this.selectedEndPoint = this.options.selectedEndPoint,
|
|
488
488
|
this.key = this.options.key;
|
|
489
489
|
this.value = this.options.value;
|
|
490
|
-
this.optionAriaLabel = this.options.
|
|
490
|
+
this.optionAriaLabel = this.options.ariaLabel;
|
|
491
491
|
this.pmqlQuery = this.options.pmqlQuery;
|
|
492
492
|
this.defaultOptionKey= this.options.defaultOptionKey;
|
|
493
493
|
this.selectedOptions = this.options.selectedOptions;
|
|
@@ -549,12 +549,19 @@ export default {
|
|
|
549
549
|
}
|
|
550
550
|
this.optionsList = [];
|
|
551
551
|
const that = this;
|
|
552
|
-
jsonList.forEach
|
|
553
|
-
that.
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
552
|
+
jsonList.forEach((item) => {
|
|
553
|
+
if (that.renderAs === "checkbox") {
|
|
554
|
+
that.optionsList.push({
|
|
555
|
+
[that.keyField]: item[that.keyField],
|
|
556
|
+
[that.valueField]: item[that.valueField],
|
|
557
|
+
[that.ariaLabelField]: item[that.ariaLabelField]
|
|
558
|
+
});
|
|
559
|
+
} else {
|
|
560
|
+
that.optionsList.push({
|
|
561
|
+
[that.keyField]: item[that.keyField],
|
|
562
|
+
[that.valueField]: item[that.valueField]
|
|
563
|
+
});
|
|
564
|
+
}
|
|
558
565
|
});
|
|
559
566
|
this.jsonError = '';
|
|
560
567
|
},
|
|
@@ -582,7 +589,9 @@ export default {
|
|
|
582
589
|
this.editIndex = index;
|
|
583
590
|
this.optionContent = this.optionsList[index][this.valueField];
|
|
584
591
|
this.optionValue = this.optionsList[index][this.keyField];
|
|
585
|
-
this.
|
|
592
|
+
if (this.renderAs === "checkbox") {
|
|
593
|
+
this.optionAriaLabel = this.optionsList[index][this.ariaLabelField];
|
|
594
|
+
}
|
|
586
595
|
this.optionError = '';
|
|
587
596
|
},
|
|
588
597
|
showAddOption() {
|
|
@@ -602,22 +611,28 @@ export default {
|
|
|
602
611
|
this.optionError = 'An item with the same key already exists';
|
|
603
612
|
return;
|
|
604
613
|
}
|
|
605
|
-
this.
|
|
606
|
-
{
|
|
614
|
+
if (this.renderAs === "checkbox") {
|
|
615
|
+
this.optionsList.push({
|
|
607
616
|
[this.valueField]: this.optionContent,
|
|
608
617
|
[this.keyField]: this.optionValue,
|
|
609
|
-
[this.ariaLabelField]: this.optionAriaLabel
|
|
610
|
-
}
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
618
|
+
[this.ariaLabelField]: this.optionAriaLabel
|
|
619
|
+
});
|
|
620
|
+
} else {
|
|
621
|
+
this.optionsList.push({
|
|
622
|
+
[this.valueField]: this.optionContent,
|
|
623
|
+
[this.keyField]: this.optionValue
|
|
624
|
+
});
|
|
625
|
+
}
|
|
626
|
+
} else {
|
|
614
627
|
if (this.optionsList.find((item, index) => { return item[that.keyField] === this.optionValue && index !== this.editIndex ; })) {
|
|
615
628
|
this.optionError = 'An item with the same key already exists';
|
|
616
629
|
return;
|
|
617
630
|
}
|
|
618
631
|
this.optionsList[this.editIndex][this.keyField] = this.optionValue;
|
|
619
632
|
this.optionsList[this.editIndex][this.valueField] = this.optionContent;
|
|
620
|
-
this.
|
|
633
|
+
if (this.renderAs === "checkbox") {
|
|
634
|
+
this.optionsList[this.editIndex][this.ariaLabelField] = this.optionAriaLabel;
|
|
635
|
+
}
|
|
621
636
|
}
|
|
622
637
|
|
|
623
638
|
this.jsonData = JSON.stringify(this.optionsList);
|
package/src/components/task.vue
CHANGED
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
:key="refreshScreen"
|
|
33
33
|
:loop-context="loopContext"
|
|
34
34
|
:taskdraft="this.task"
|
|
35
|
+
@update-page-task="pageUpdate"
|
|
35
36
|
@update="onUpdate"
|
|
36
37
|
@after-submit="afterSubmit"
|
|
37
38
|
@submit="submit"
|
|
@@ -50,6 +51,7 @@
|
|
|
50
51
|
:watchers="screen.watchers"
|
|
51
52
|
:data="requestData"
|
|
52
53
|
:type="screen.type"
|
|
54
|
+
@update-page-task="pageUpdate"
|
|
53
55
|
@update="onUpdate"
|
|
54
56
|
@after-submit="afterSubmit"
|
|
55
57
|
@submit="submit"
|
|
@@ -107,7 +109,7 @@ export default {
|
|
|
107
109
|
alwaysAllowEditing: { type: Boolean, default: false },
|
|
108
110
|
disableInterstitial: { type: Boolean, default: false },
|
|
109
111
|
waitLoadingListeners: { type: Boolean, default: false },
|
|
110
|
-
isWebEntry: { type: Boolean, default: false }
|
|
112
|
+
isWebEntry: { type: Boolean, default: false }
|
|
111
113
|
},
|
|
112
114
|
data() {
|
|
113
115
|
return {
|
|
@@ -365,6 +367,9 @@ export default {
|
|
|
365
367
|
this.hasErrors = false;
|
|
366
368
|
}
|
|
367
369
|
},
|
|
370
|
+
pageUpdate() {
|
|
371
|
+
this.$emit("updated-page-core");
|
|
372
|
+
},
|
|
368
373
|
resetScreenState() {
|
|
369
374
|
this.loadingButton = false;
|
|
370
375
|
this.disabled = false;
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
class="p-0"
|
|
20
20
|
:loop-context="loopContext"
|
|
21
21
|
:taskdraft="taskdraft"
|
|
22
|
+
@updatePage="setCurrentPage"
|
|
22
23
|
@after-submit="afterSubmit"
|
|
23
24
|
@submit="submit"
|
|
24
25
|
/>
|
|
@@ -361,6 +362,7 @@ export default {
|
|
|
361
362
|
return this.$refs.renderer.getCurrentPage();
|
|
362
363
|
},
|
|
363
364
|
setCurrentPage(page) {
|
|
365
|
+
this.$emit("update-page-task");
|
|
364
366
|
this.$refs.renderer.setCurrentPage(page);
|
|
365
367
|
},
|
|
366
368
|
onContainerObserver(entries) {
|