@processmaker/screen-builder 3.0.4 → 3.0.5
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 +1055 -1045
- package/dist/vue-form-builder.es.js.map +1 -1
- package/dist/vue-form-builder.umd.js +3 -3
- package/dist/vue-form-builder.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/components/renderer/form-collection-record-control.vue +11 -7
- package/src/components/renderer/form-list-table.vue +2 -2
- package/src/components/renderer/form-new-request.vue +1 -1
- package/src/components/renderer/form-record-list.vue +16 -14
- package/src/components/renderer/form-requests.vue +1 -1
- package/src/form-builder-controls.js +9 -0
package/package.json
CHANGED
|
@@ -61,7 +61,8 @@ export default {
|
|
|
61
61
|
screenType: "",
|
|
62
62
|
hasMustache: false,
|
|
63
63
|
flagDraft: {},
|
|
64
|
-
taskDraft: {}
|
|
64
|
+
taskDraft: {},
|
|
65
|
+
enableDraft: true
|
|
65
66
|
};
|
|
66
67
|
},
|
|
67
68
|
computed: {
|
|
@@ -167,7 +168,6 @@ export default {
|
|
|
167
168
|
this.selCollectionId = collectionId;
|
|
168
169
|
this.selRecordId = recordId;
|
|
169
170
|
this.selDisplayMode = modeId;
|
|
170
|
-
|
|
171
171
|
this.$dataProvider
|
|
172
172
|
.getCollectionRecordsView(collectionId, recordId)
|
|
173
173
|
.then((response) => {
|
|
@@ -176,22 +176,25 @@ export default {
|
|
|
176
176
|
const viewScreen = response.collection.read_screen_id;
|
|
177
177
|
const editScreen = response.collection.update_screen_id;
|
|
178
178
|
//Choose screen id regarding of the display Mode
|
|
179
|
-
this.screenCollectionId =
|
|
180
|
-
this.selDisplayMode ===
|
|
181
|
-
|
|
179
|
+
this.screenCollectionId =
|
|
180
|
+
typeof this.selDisplayMode === 'function' ?
|
|
181
|
+
(this.collectionmode.modeId === "View" ? viewScreen : editScreen) :
|
|
182
|
+
(this.selDisplayMode === "View" ? viewScreen : editScreen);
|
|
182
183
|
this.loadScreen(this.screenCollectionId);
|
|
183
184
|
|
|
184
185
|
//This section validates if Collection has draft data
|
|
185
|
-
if(this.taskDraft?.draft?.data == null || this.taskDraft.draft.data === '')
|
|
186
|
+
if (this.taskDraft?.draft?.data == null || this.taskDraft.draft.data === '' || !this.enableDraft)
|
|
187
|
+
{
|
|
186
188
|
this.localData = respData;
|
|
187
189
|
}else{
|
|
188
190
|
this.localData = _.merge({}, respData, this.taskDraft.draft.data);
|
|
189
191
|
}
|
|
190
|
-
|
|
192
|
+
|
|
191
193
|
})
|
|
192
194
|
.catch(() => {
|
|
193
195
|
this.localData = {};
|
|
194
196
|
globalObject.ProcessMaker.alert(this.$t('This content does not exist. We could not locate indicated data'), "danger");
|
|
197
|
+
this.placeholder = "Select a collection";
|
|
195
198
|
});;
|
|
196
199
|
},
|
|
197
200
|
isMustache(record) {
|
|
@@ -213,6 +216,7 @@ export default {
|
|
|
213
216
|
},
|
|
214
217
|
record(record) {
|
|
215
218
|
this.hasMustache = false;
|
|
219
|
+
this.enableDraft = false;
|
|
216
220
|
if (record && !isNaN(record) && record > 0 && this.collection.collectionId) {
|
|
217
221
|
this.selRecordId = record;
|
|
218
222
|
this.loadRecordCollection(this.collection.collectionId, record, this.selDisplayMode);
|
|
@@ -160,12 +160,12 @@ export default {
|
|
|
160
160
|
},
|
|
161
161
|
watch: {
|
|
162
162
|
listOption() {
|
|
163
|
-
this.title = this.checkTitle(this.listOption);
|
|
163
|
+
this.title = this.$t(this.checkTitle(this.listOption));
|
|
164
164
|
this.dataControl = {};
|
|
165
165
|
}
|
|
166
166
|
},
|
|
167
167
|
mounted() {
|
|
168
|
-
this.title = this.checkTitle(this.listOption);
|
|
168
|
+
this.title = this.$t(this.checkTitle(this.listOption));
|
|
169
169
|
},
|
|
170
170
|
methods: {
|
|
171
171
|
/**
|
|
@@ -431,20 +431,22 @@ export default {
|
|
|
431
431
|
}
|
|
432
432
|
|
|
433
433
|
// Adds radio buttons or checkbox to the table depending selected option
|
|
434
|
-
if
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
434
|
+
if(this.source?.sourceOptions === "Collection") {
|
|
435
|
+
if (['single-field', 'single-record'].includes(this.source?.dataSelectionOptions)) {
|
|
436
|
+
fields.unshift({
|
|
437
|
+
key: 'radio',
|
|
438
|
+
label: '',
|
|
439
|
+
sortable: false,
|
|
440
|
+
});
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
if (this.source?.dataSelectionOptions === 'multiple-records') {
|
|
444
|
+
fields.unshift({
|
|
445
|
+
key: 'checkbox',
|
|
446
|
+
label: '',
|
|
447
|
+
sortable: false
|
|
448
|
+
});
|
|
449
|
+
}
|
|
448
450
|
}
|
|
449
451
|
|
|
450
452
|
return fields;
|
|
@@ -481,6 +481,15 @@ export default [
|
|
|
481
481
|
jsonData: '',
|
|
482
482
|
},
|
|
483
483
|
form: '',
|
|
484
|
+
source: {
|
|
485
|
+
collectionFields: [],
|
|
486
|
+
collectionFieldsColumns: [],
|
|
487
|
+
pmql: null,
|
|
488
|
+
sourceOptions: "Variable",
|
|
489
|
+
variableStore: null,
|
|
490
|
+
dataSelectionOptions: "no-selection",
|
|
491
|
+
singleField: null
|
|
492
|
+
}
|
|
484
493
|
},
|
|
485
494
|
inspector: [
|
|
486
495
|
keyNameProperty,
|