@processmaker/screen-builder 3.5.0 → 3.5.2
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 +39 -17
- package/dist/vue-form-builder.es.js.map +1 -1
- package/dist/vue-form-builder.umd.js +2 -2
- package/dist/vue-form-builder.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/components/inspector/collection-display-mode.vue +22 -8
- package/src/components/inspector/collection-records-list.vue +10 -6
- package/src/components/inspector/options-list.vue +0 -8
- package/src/components/renderer/form-collection-record-control.vue +7 -2
- package/src/components/task.vue +8 -1
package/package.json
CHANGED
|
@@ -41,23 +41,37 @@ export default {
|
|
|
41
41
|
data() {
|
|
42
42
|
return {
|
|
43
43
|
mode: "",
|
|
44
|
-
submitCollectionCheck: null
|
|
44
|
+
submitCollectionCheck: null,
|
|
45
|
+
defaultMode: 'Edit',
|
|
45
46
|
};
|
|
46
47
|
},
|
|
47
48
|
computed: {
|
|
48
49
|
showCollectionCheck() {
|
|
49
|
-
return this.mode ===
|
|
50
|
+
return this.mode === this.defaultMode;
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
watch: {
|
|
54
|
+
value: {
|
|
55
|
+
handler(newValue) {
|
|
56
|
+
this.updateModeAndCollectionCheck(newValue);
|
|
57
|
+
},
|
|
58
|
+
deep: true,
|
|
50
59
|
}
|
|
51
60
|
},
|
|
52
61
|
mounted() {
|
|
53
|
-
// Set the
|
|
54
|
-
this.
|
|
55
|
-
this.submitCollectionCheck =
|
|
56
|
-
this.value.submitCollectionCheck !== undefined
|
|
57
|
-
? this.value.submitCollectionCheck
|
|
58
|
-
: true;
|
|
62
|
+
// Set the default data
|
|
63
|
+
this.updateModeAndCollectionCheck(this.value);
|
|
59
64
|
},
|
|
60
65
|
methods: {
|
|
66
|
+
/**
|
|
67
|
+
* Update the mode and collection check value
|
|
68
|
+
*
|
|
69
|
+
* @param {Object} value
|
|
70
|
+
*/
|
|
71
|
+
updateModeAndCollectionCheck(value) {
|
|
72
|
+
this.mode = value.modeId || this.defaultMode;
|
|
73
|
+
this.submitCollectionCheck = value.submitCollectionCheck ?? true;
|
|
74
|
+
},
|
|
61
75
|
saveFields() {
|
|
62
76
|
this.$emit("input", {
|
|
63
77
|
modeId: this.mode,
|
|
@@ -10,15 +10,15 @@
|
|
|
10
10
|
data-cy="inspector-collection"
|
|
11
11
|
/>
|
|
12
12
|
<b-form-text class="mt-2">
|
|
13
|
-
{{ $t("Collection Record Control is not available for Anonymous Web Entry") }}
|
|
13
|
+
{{ $t("Collection Record Control is not available for Anonymous Web Entry") }}
|
|
14
14
|
</b-form-text>
|
|
15
15
|
</b-form-group>
|
|
16
16
|
</div>
|
|
17
17
|
<div v-if="collectionId > 0" class="screen-link mt-2">
|
|
18
|
-
<a
|
|
18
|
+
<a
|
|
19
19
|
:href="`/designer/screen-builder/${
|
|
20
20
|
screenMode === 'display' ? idCollectionScreenView : idCollectionScreenEdit
|
|
21
|
-
}/edit`"
|
|
21
|
+
}/edit`"
|
|
22
22
|
target="_blank">
|
|
23
23
|
{{ $t(screenMode === 'display' ? "Open View Screen" : "Open Edit Screen") }}
|
|
24
24
|
<i class="ml-1 fas fa-external-link-alt" />
|
|
@@ -67,11 +67,15 @@ export default {
|
|
|
67
67
|
},
|
|
68
68
|
watch: {
|
|
69
69
|
value: {
|
|
70
|
-
handler(
|
|
71
|
-
if (!
|
|
70
|
+
handler(newValue) {
|
|
71
|
+
if (!newValue) {
|
|
72
|
+
// Clear collection id
|
|
73
|
+
this.collectionId = null;
|
|
74
|
+
|
|
72
75
|
return;
|
|
73
76
|
}
|
|
74
|
-
|
|
77
|
+
|
|
78
|
+
CONFIG_FIELDS.forEach((field) => (this[field] = newValue[field]));
|
|
75
79
|
},
|
|
76
80
|
immediate: true
|
|
77
81
|
},
|
|
@@ -401,14 +401,6 @@ export default {
|
|
|
401
401
|
if (this.endPointList.length > 0) {
|
|
402
402
|
this.selectedEndPoint = this.endPointList[0].value;
|
|
403
403
|
}
|
|
404
|
-
},
|
|
405
|
-
renderAs(val) {
|
|
406
|
-
if (this.dataSource === 'provideData') {
|
|
407
|
-
if (val !== 'dropdown') {
|
|
408
|
-
// add aria label field when renderAs is not dropdown
|
|
409
|
-
this.optionsListExtra = this.optionsList.map(option => ({...option, [this.ariaLabelField]: ''}));
|
|
410
|
-
}
|
|
411
|
-
}
|
|
412
404
|
}
|
|
413
405
|
},
|
|
414
406
|
computed: {
|
|
@@ -63,7 +63,8 @@ export default {
|
|
|
63
63
|
flagDraft: {},
|
|
64
64
|
taskDraft: {},
|
|
65
65
|
enableDraft: true,
|
|
66
|
-
defaultColumnsRecordId: 1
|
|
66
|
+
defaultColumnsRecordId: 1,
|
|
67
|
+
defaultCollectionMode: 'Edit',
|
|
67
68
|
};
|
|
68
69
|
},
|
|
69
70
|
computed: {
|
|
@@ -148,13 +149,17 @@ export default {
|
|
|
148
149
|
const recordId = this.isMustache(this.record)
|
|
149
150
|
? this.defaultColumnsRecordId
|
|
150
151
|
: this.record;
|
|
152
|
+
|
|
151
153
|
if (this.isMustache(this.record)) {
|
|
152
154
|
this.hasMustache = true;
|
|
153
155
|
}
|
|
156
|
+
|
|
157
|
+
const collectionMode = this.collectionmode?.modeId ?? this.defaultCollectionMode;
|
|
158
|
+
|
|
154
159
|
this.loadRecordCollection(
|
|
155
160
|
this.collection.collectionId,
|
|
156
161
|
recordId,
|
|
157
|
-
|
|
162
|
+
collectionMode,
|
|
158
163
|
);
|
|
159
164
|
}
|
|
160
165
|
},
|
package/src/components/task.vue
CHANGED
|
@@ -880,12 +880,19 @@ export default {
|
|
|
880
880
|
this.loadingTask = true;
|
|
881
881
|
// Check if interstitial tasks are allowed for this task.
|
|
882
882
|
if (this.task && !(this.task.allow_interstitial || this.isSameUser(this.task, data))) {
|
|
883
|
-
|
|
883
|
+
// The getDestinationUrl() function is called asynchronously to retrieve the URL
|
|
884
884
|
window.location.href = await this.getDestinationUrl();
|
|
885
885
|
return;
|
|
886
886
|
}
|
|
887
887
|
this.nodeId = data.params[0].nodeId;
|
|
888
888
|
this.taskId = data.params[0].tokenId;
|
|
889
|
+
|
|
890
|
+
// Force a redirect to ensure the correct task is loaded immediately for ConversationalForm.
|
|
891
|
+
// This prevents async reloads that may cause inconsistencies specific to ConversationalForm.
|
|
892
|
+
if (this.renderComponent === "ConversationalForm") {
|
|
893
|
+
window.location.href = `/tasks/${this.taskId}/edit`;
|
|
894
|
+
}
|
|
895
|
+
|
|
889
896
|
this.reload();
|
|
890
897
|
}
|
|
891
898
|
},
|