@processmaker/screen-builder 3.0.5 → 3.0.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/dist/vue-form-builder.css +1 -1
- package/dist/vue-form-builder.es.js +1068 -1056
- package/dist/vue-form-builder.es.js.map +1 -1
- package/dist/vue-form-builder.umd.js +41 -41
- package/dist/vue-form-builder.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/components/editor/loop.vue +2 -2
- package/src/components/editor/multi-column.vue +2 -2
- package/src/components/inspector/collection-records-list.vue +25 -10
- package/src/components/inspector/options-list.vue +1 -1
- package/src/components/screen-renderer.vue +1 -1
- package/src/components/vue-form-builder.vue +4 -8
- package/src/components/vue-form-renderer.vue +1 -1
- package/src/mixins/HasColorProperty.js +1 -0
package/package.json
CHANGED
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
</button>
|
|
63
63
|
<button
|
|
64
64
|
v-if="!(isAiSection(element) && aiPreview(element))"
|
|
65
|
-
class="btn btn-sm btn-
|
|
65
|
+
class="btn btn-sm btn-primary mr-2"
|
|
66
66
|
:title="$t('Copy Control')"
|
|
67
67
|
@click="duplicateItem(index)"
|
|
68
68
|
>
|
|
@@ -128,7 +128,7 @@
|
|
|
128
128
|
@removeFromClipboard="removeFromClipboard(items[index])"
|
|
129
129
|
/>
|
|
130
130
|
<button
|
|
131
|
-
class="btn btn-sm btn-
|
|
131
|
+
class="btn btn-sm btn-primary mr-2"
|
|
132
132
|
:title="$t('Copy Control')"
|
|
133
133
|
@click="duplicateItem(index)"
|
|
134
134
|
>
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
</button>
|
|
73
73
|
<button
|
|
74
74
|
v-if="!(isAiSection(element) && aiPreview(element))"
|
|
75
|
-
class="btn btn-sm btn-
|
|
75
|
+
class="btn btn-sm btn-primary mr-2"
|
|
76
76
|
:aria-label="$t('Duplicate')"
|
|
77
77
|
@click="duplicateItem(index, row)"
|
|
78
78
|
>
|
|
@@ -140,7 +140,7 @@
|
|
|
140
140
|
@removeFromClipboard="removeFromClipboard(element)"
|
|
141
141
|
/>
|
|
142
142
|
<button
|
|
143
|
-
class="btn btn-sm btn-
|
|
143
|
+
class="btn btn-sm btn-primary mr-2"
|
|
144
144
|
:title="$t('Copy Control')"
|
|
145
145
|
@click="duplicateItem(index, row)"
|
|
146
146
|
>
|
|
@@ -54,7 +54,8 @@ export default {
|
|
|
54
54
|
dataRecordList: [],
|
|
55
55
|
idCollectionScreenView: null,
|
|
56
56
|
idCollectionScreenEdit: null,
|
|
57
|
-
screenMode: null
|
|
57
|
+
screenMode: null,
|
|
58
|
+
collectionsMap: {}
|
|
58
59
|
};
|
|
59
60
|
},
|
|
60
61
|
computed: {
|
|
@@ -76,6 +77,7 @@ export default {
|
|
|
76
77
|
},
|
|
77
78
|
collectionId: {
|
|
78
79
|
handler() {
|
|
80
|
+
this.updateScreenIds();
|
|
79
81
|
this.getFields();
|
|
80
82
|
}
|
|
81
83
|
},
|
|
@@ -114,17 +116,20 @@ export default {
|
|
|
114
116
|
},
|
|
115
117
|
getCollections() {
|
|
116
118
|
this.$dataProvider.getCollections().then((response) => {
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
119
|
+
this.collectionsMap = response.data.data.reduce((acc, collection) => {
|
|
120
|
+
acc[collection.id] = {
|
|
121
|
+
read_screen_id: collection.read_screen_id,
|
|
122
|
+
create_screen_id: collection.create_screen_id
|
|
123
|
+
};
|
|
124
|
+
return acc;
|
|
125
|
+
}, {});
|
|
126
|
+
|
|
120
127
|
this.collections = [
|
|
121
128
|
{ value: null, text: this.$t("Select a collection") },
|
|
122
|
-
...response.data.data.map((collection) => {
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
};
|
|
127
|
-
})
|
|
129
|
+
...response.data.data.map((collection) => ({
|
|
130
|
+
text: collection.name,
|
|
131
|
+
value: collection.id
|
|
132
|
+
}))
|
|
128
133
|
];
|
|
129
134
|
});
|
|
130
135
|
},
|
|
@@ -155,6 +160,16 @@ export default {
|
|
|
155
160
|
},
|
|
156
161
|
onPmqlChange(pmql) {
|
|
157
162
|
this.pmql = pmql;
|
|
163
|
+
},
|
|
164
|
+
updateScreenIds() {
|
|
165
|
+
if (this.collectionId && this.collectionsMap[this.collectionId]) {
|
|
166
|
+
const selectedCollection = this.collectionsMap[this.collectionId];
|
|
167
|
+
this.idCollectionScreenView = selectedCollection.read_screen_id;
|
|
168
|
+
this.idCollectionScreenEdit = selectedCollection.create_screen_id;
|
|
169
|
+
} else {
|
|
170
|
+
this.idCollectionScreenView = null;
|
|
171
|
+
this.idCollectionScreenEdit = null;
|
|
172
|
+
}
|
|
158
173
|
}
|
|
159
174
|
}
|
|
160
175
|
};
|
|
@@ -192,7 +192,7 @@
|
|
|
192
192
|
</div>
|
|
193
193
|
|
|
194
194
|
<div v-if="dataSource === dataSourceValues.dataConnector">
|
|
195
|
-
<div v-if="valueTypeReturned === 'single'">
|
|
195
|
+
<div v-if="valueTypeReturned === 'single' || valueTypeReturned === 'object' && $attrs['screen-type'] === 'conversational'">
|
|
196
196
|
<label for="key">{{ $t('Value') }}</label>
|
|
197
197
|
<mustache-helper/>
|
|
198
198
|
<b-form-input id="key" v-model="key" @change="keyChanged" data-cy="inspector-datasource-value"/>
|
|
@@ -234,7 +234,7 @@
|
|
|
234
234
|
<button
|
|
235
235
|
v-if="!(isAiSection(element) && aiPreview(element))"
|
|
236
236
|
data-test="copy-control-btn"
|
|
237
|
-
class="btn btn-sm btn-
|
|
237
|
+
class="btn btn-sm btn-primary mr-2"
|
|
238
238
|
:title="$t('Copy Control')"
|
|
239
239
|
@click="duplicateItem(index)"
|
|
240
240
|
>
|
|
@@ -255,9 +255,7 @@
|
|
|
255
255
|
v-model="element.items"
|
|
256
256
|
:validation-errors="validationErrors"
|
|
257
257
|
class="card-body"
|
|
258
|
-
:class="
|
|
259
|
-
? elementCssClassModern(element)
|
|
260
|
-
: elementCssClass(element)"
|
|
258
|
+
:class="elementCssClass(element)"
|
|
261
259
|
:selected="selected"
|
|
262
260
|
:config="element.config"
|
|
263
261
|
:ai-element="element"
|
|
@@ -300,7 +298,7 @@
|
|
|
300
298
|
@removeFromClipboard="removeFromClipboard(extendedPages[tabPage].items[index])"
|
|
301
299
|
/>
|
|
302
300
|
<button
|
|
303
|
-
class="btn btn-sm btn-
|
|
301
|
+
class="btn btn-sm btn-primary mr-2"
|
|
304
302
|
:title="$t('Copy Control')"
|
|
305
303
|
@click="duplicateItem(index)"
|
|
306
304
|
>
|
|
@@ -321,9 +319,7 @@
|
|
|
321
319
|
:tabindex="element.config.interactive ? 0 : -1"
|
|
322
320
|
class="card-body m-0 pb-4 pt-4"
|
|
323
321
|
:class="[
|
|
324
|
-
|
|
325
|
-
? elementCssClassModern(element)
|
|
326
|
-
: elementCssClass(element),
|
|
322
|
+
elementCssClass(element),
|
|
327
323
|
{ 'prevent-interaction': !element.config.interactive }
|
|
328
324
|
]"
|
|
329
325
|
:screen-type="screenType"
|
|
@@ -5,6 +5,7 @@ export default {
|
|
|
5
5
|
const css = [];
|
|
6
6
|
element.config.bgcolor ? css.push(element.config.bgcolor) : null;
|
|
7
7
|
element.config.color ? css.push(element.config.color) : null;
|
|
8
|
+
element.config.bgcolormodern ? css.push(element.config.bgcolormodern) : null;
|
|
8
9
|
return css.join(' ');
|
|
9
10
|
},
|
|
10
11
|
elementCssClassModern(element) {
|