@processmaker/screen-builder 2.77.4 → 2.77.6
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/cypress.json +2 -2
- package/dist/vue-form-builder.common.js +2766 -2458
- package/dist/vue-form-builder.common.js.map +1 -1
- package/dist/vue-form-builder.css +1 -1
- package/dist/vue-form-builder.umd.js +2766 -2458
- package/dist/vue-form-builder.umd.js.map +1 -1
- package/dist/vue-form-builder.umd.min.js +9 -9
- package/dist/vue-form-builder.umd.min.js.map +1 -1
- package/package.json +3 -3
- package/src/components/vue-form-builder.vue +28 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@processmaker/screen-builder",
|
|
3
|
-
"version": "2.77.
|
|
3
|
+
"version": "2.77.6",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"serve": "vue-cli-service serve",
|
|
6
6
|
"build": "vue-cli-service build",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"@cypress/code-coverage": "^3.8.1",
|
|
40
40
|
"@fortawesome/fontawesome-free": "^5.6.1",
|
|
41
41
|
"@panter/vue-i18next": "^0.15.2",
|
|
42
|
-
"@processmaker/vue-form-elements": "0.49.
|
|
42
|
+
"@processmaker/vue-form-elements": "0.49.4",
|
|
43
43
|
"@processmaker/vue-multiselect": "^2.2.0",
|
|
44
44
|
"@vue/cli-plugin-babel": "^3.6.0",
|
|
45
45
|
"@vue/cli-plugin-e2e-cypress": "^4.0.3",
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
},
|
|
89
89
|
"peerDependencies": {
|
|
90
90
|
"@panter/vue-i18next": "^0.15.0",
|
|
91
|
-
"@processmaker/vue-form-elements": "0.49.
|
|
91
|
+
"@processmaker/vue-form-elements": "0.49.4",
|
|
92
92
|
"i18next": "^15.0.8",
|
|
93
93
|
"vue": "^2.6.12",
|
|
94
94
|
"vuex": "^3.1.1"
|
|
@@ -127,9 +127,9 @@
|
|
|
127
127
|
class="d-flex justify-content-center align-items-center drag-placeholder text-center position-absolute rounded mt-4 flex-column"
|
|
128
128
|
>
|
|
129
129
|
<span class="mb-3" v-html="dragElementIcon"></span>
|
|
130
|
-
<h3>{{ $t("Place your controls here
|
|
130
|
+
<h3>{{ $t("Place your controls here.") }}</h3>
|
|
131
131
|
<p>
|
|
132
|
-
{{ $t("To
|
|
132
|
+
{{ $t("To begin creating a screen, drag and drop items from the Controls Menu on the left.") }}
|
|
133
133
|
</p>
|
|
134
134
|
<!-- {{ $t("Drag an element here") }} -->
|
|
135
135
|
</div>
|
|
@@ -505,7 +505,10 @@ export default {
|
|
|
505
505
|
},
|
|
506
506
|
screen: {
|
|
507
507
|
type: Object
|
|
508
|
-
}
|
|
508
|
+
},
|
|
509
|
+
processId: {
|
|
510
|
+
default: 0,
|
|
511
|
+
},
|
|
509
512
|
},
|
|
510
513
|
data() {
|
|
511
514
|
const config = this.initialConfig || defaultConfig;
|
|
@@ -626,6 +629,15 @@ export default {
|
|
|
626
629
|
}
|
|
627
630
|
}
|
|
628
631
|
this.translated.push(e);
|
|
632
|
+
},
|
|
633
|
+
controls() {
|
|
634
|
+
if (
|
|
635
|
+
this.processId !== 0 &&
|
|
636
|
+
this.processId !== undefined &&
|
|
637
|
+
!this.config[this.currentPage].items.length
|
|
638
|
+
) {
|
|
639
|
+
this.addDefaultAiControl();
|
|
640
|
+
}
|
|
629
641
|
}
|
|
630
642
|
},
|
|
631
643
|
created() {
|
|
@@ -1134,6 +1146,19 @@ export default {
|
|
|
1134
1146
|
}
|
|
1135
1147
|
});
|
|
1136
1148
|
});
|
|
1149
|
+
},
|
|
1150
|
+
addDefaultAiControl() {
|
|
1151
|
+
const aiControl = this.builder.controls.find((control) => {
|
|
1152
|
+
return control.component === "AiSection";
|
|
1153
|
+
});
|
|
1154
|
+
const clone = this.cloneControl(aiControl);
|
|
1155
|
+
clone.config.aiConfig.autofocus = true;
|
|
1156
|
+
clone.config.aiConfig.screenTitle = this.screen.title;
|
|
1157
|
+
clone.config.aiConfig.screenDescription = this.screen.description;
|
|
1158
|
+
|
|
1159
|
+
this.config[this.currentPage].items.push(clone);
|
|
1160
|
+
this.updateState();
|
|
1161
|
+
this.inspect(clone);
|
|
1137
1162
|
}
|
|
1138
1163
|
}
|
|
1139
1164
|
};
|