@processmaker/screen-builder 3.8.15-patch.a.1 → 3.8.15-patch.c
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 +3518 -3864
- package/dist/vue-form-builder.es.js.map +1 -1
- package/dist/vue-form-builder.umd.js +48 -48
- package/dist/vue-form-builder.umd.js.map +1 -1
- package/package.json +1 -9
- package/src/components/accordions.js +0 -1
- package/src/components/inspector/index.js +0 -1
- package/src/components/renderer/form-button.vue +2 -4
- package/src/components/task.vue +7 -5
- package/src/components/vue-form-renderer.vue +2 -4
- package/src/form-builder-controls.js +0 -8
- package/src/mixins/Json2Vue.js +1 -2
- package/src/mixins/ScreenBase.js +3 -28
- package/src/mixins/index.js +0 -1
- package/src/components/inspector/variables-to-submit.vue +0 -782
- package/src/mixins/VariablesToSubmitFilter.js +0 -76
- package/src/stories/VariablesToSubmit.stories.js +0 -686
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@processmaker/screen-builder",
|
|
3
|
-
"version": "3.8.15-patch.
|
|
3
|
+
"version": "3.8.15-patch.c",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"dev": "VITE_COVERAGE=true vite",
|
|
6
6
|
"build": "vite build",
|
|
@@ -12,9 +12,6 @@
|
|
|
12
12
|
"storybook": "storybook dev -p 6006",
|
|
13
13
|
"build-storybook": "storybook build",
|
|
14
14
|
"test-storybook": "test-storybook",
|
|
15
|
-
"test": "jest tests/unit --no-coverage",
|
|
16
|
-
"test:coverage": "jest tests/unit --coverage",
|
|
17
|
-
"test:variables": "jest tests/unit/VariablesToSubmit.spec.js --no-coverage",
|
|
18
15
|
"serve": "npm run dev"
|
|
19
16
|
},
|
|
20
17
|
"main": "./dist/vue-form-builder.umd.js",
|
|
@@ -75,7 +72,6 @@
|
|
|
75
72
|
"@vue/test-utils": "^1.1.1",
|
|
76
73
|
"axios": "^1.6.0",
|
|
77
74
|
"babel-core": "7.0.0-bridge.0",
|
|
78
|
-
"babel-jest": "^26.6.3",
|
|
79
75
|
"babel-plugin-istanbul": "^6.1.1",
|
|
80
76
|
"bootstrap": "^4.5.3",
|
|
81
77
|
"bootstrap-vue": "^2.19.0",
|
|
@@ -97,9 +93,6 @@
|
|
|
97
93
|
"i18next": "^15.0.8",
|
|
98
94
|
"identity-obj-proxy": "^3.0.0",
|
|
99
95
|
"inputmask": "^5.0.7",
|
|
100
|
-
"jest-environment-jsdom": "^30.2.0",
|
|
101
|
-
"jest-serializer-vue": "^2.0.2",
|
|
102
|
-
"jest-transform-stub": "^2.0.0",
|
|
103
96
|
"mustache": "^3.0.1",
|
|
104
97
|
"nyc": "^15.1.0",
|
|
105
98
|
"prettier": "2.7.1",
|
|
@@ -114,7 +107,6 @@
|
|
|
114
107
|
"vite-plugin-monaco-editor": "^1.1.0",
|
|
115
108
|
"vue": "^2.6.12",
|
|
116
109
|
"vue-deepset": "^0.6.3",
|
|
117
|
-
"vue-jest": "^3.0.7",
|
|
118
110
|
"vue-template-compiler": "^2.6.14",
|
|
119
111
|
"vue-uniq-ids": "^1.0.0",
|
|
120
112
|
"vue-upload-component": "^2.8.14",
|
|
@@ -32,4 +32,3 @@ export { default as LabelSubmitButton } from "./label-submit-button.vue";
|
|
|
32
32
|
export { default as AnalyticsSelector } from "./analytics-selector.vue";
|
|
33
33
|
export { default as EncryptedConfig } from "./encrypted-config.vue";
|
|
34
34
|
export { default as CodeEditor } from "./code-editor.vue";
|
|
35
|
-
export { default as VariablesToSubmit } from "./variables-to-submit.vue";
|
|
@@ -41,8 +41,7 @@ export default {
|
|
|
41
41
|
"loading",
|
|
42
42
|
"loadingLabel",
|
|
43
43
|
"handler",
|
|
44
|
-
"handlerSecurityEnabled"
|
|
45
|
-
"config"
|
|
44
|
+
"handlerSecurityEnabled"
|
|
46
45
|
],
|
|
47
46
|
data() {
|
|
48
47
|
return {
|
|
@@ -87,8 +86,7 @@ export default {
|
|
|
87
86
|
return {
|
|
88
87
|
name: this.name,
|
|
89
88
|
label: this.label,
|
|
90
|
-
value: this.fieldValue
|
|
91
|
-
variablesToSubmit: this.config?.variablesToSubmit
|
|
89
|
+
value: this.fieldValue
|
|
92
90
|
};
|
|
93
91
|
}
|
|
94
92
|
},
|
package/src/components/task.vue
CHANGED
|
@@ -586,9 +586,7 @@ export default {
|
|
|
586
586
|
}
|
|
587
587
|
this.disabled = true;
|
|
588
588
|
|
|
589
|
-
|
|
590
|
-
const safeFormData = (formData && typeof formData === 'object') ? formData : (this.requestData || {});
|
|
591
|
-
if (formData && typeof formData === 'object') {
|
|
589
|
+
if (formData) {
|
|
592
590
|
this.onUpdate(Object.assign({}, this.requestData, formData));
|
|
593
591
|
}
|
|
594
592
|
|
|
@@ -597,7 +595,7 @@ export default {
|
|
|
597
595
|
} else {
|
|
598
596
|
this.loadingButton = false;
|
|
599
597
|
}
|
|
600
|
-
this.$emit('submit', this.task,
|
|
598
|
+
this.$emit('submit', this.task, loading, buttonInfo);
|
|
601
599
|
|
|
602
600
|
if (this.task?.allow_interstitial && !this.loadingButton && !this.disableInterstitial) {
|
|
603
601
|
this.task.interstitial_screen['_interstitial'] = true;
|
|
@@ -900,7 +898,11 @@ export default {
|
|
|
900
898
|
* @param {Object} data - The event data containing the tokenId of the task.
|
|
901
899
|
*/
|
|
902
900
|
async handleRedirectToTask(data) {
|
|
903
|
-
if (
|
|
901
|
+
if (
|
|
902
|
+
(data?.params[0]?.tokenId &&
|
|
903
|
+
this.task.user?.id === data.params[0]?.userId) ||
|
|
904
|
+
this.task.elementDestination?.type === 'taskSource'
|
|
905
|
+
) {
|
|
904
906
|
this.loadingTask = true;
|
|
905
907
|
// Check if interstitial tasks are allowed for this task.
|
|
906
908
|
if (this.task && !(this.task.allow_interstitial || this.isSameUser(this.task, data))) {
|
|
@@ -38,13 +38,12 @@ import { getItemsFromConfig } from "../itemProcessingUtils";
|
|
|
38
38
|
import { ValidatorFactory } from "../factories/ValidatorFactory";
|
|
39
39
|
import CurrentPageProperty from "../mixins/CurrentPageProperty";
|
|
40
40
|
import DeviceDetector, { MAX_MOBILE_WIDTH } from "../mixins/DeviceDetector";
|
|
41
|
-
import VariablesToSubmitFilter from "../mixins/VariablesToSubmitFilter";
|
|
42
41
|
import ScreenRenderer from "@/components/screen-renderer.vue";
|
|
43
42
|
|
|
44
43
|
export default {
|
|
45
44
|
name: "VueFormRenderer",
|
|
46
45
|
components: { ScreenRenderer, CustomCssOutput },
|
|
47
|
-
mixins: [CurrentPageProperty, DeviceDetector
|
|
46
|
+
mixins: [CurrentPageProperty, DeviceDetector],
|
|
48
47
|
model: {
|
|
49
48
|
prop: "data",
|
|
50
49
|
event: "update"
|
|
@@ -258,8 +257,7 @@ export default {
|
|
|
258
257
|
this.$emit('after-submit', ...arguments);
|
|
259
258
|
},
|
|
260
259
|
submit(eventData, loading = false, buttonInfo = null) {
|
|
261
|
-
|
|
262
|
-
this.$emit("submit", eventData, loading, buttonInfo);
|
|
260
|
+
this.$emit("submit", this.data, loading, buttonInfo);
|
|
263
261
|
},
|
|
264
262
|
parseCss() {
|
|
265
263
|
const containerSelector = `.${this.containerClass}`;
|
|
@@ -800,14 +800,6 @@ export default [
|
|
|
800
800
|
},
|
|
801
801
|
},
|
|
802
802
|
buttonVariantStyleProperty,
|
|
803
|
-
{
|
|
804
|
-
type: 'VariablesToSubmit',
|
|
805
|
-
field: 'variablesToSubmit',
|
|
806
|
-
config: {
|
|
807
|
-
label: 'Variables to Submit',
|
|
808
|
-
helper: 'Select which variables should be included in the submission payload. Only variables from the parent (top-level) request can be used.',
|
|
809
|
-
},
|
|
810
|
-
},
|
|
811
803
|
],
|
|
812
804
|
},
|
|
813
805
|
},
|
package/src/mixins/Json2Vue.js
CHANGED
|
@@ -57,8 +57,7 @@ export default {
|
|
|
57
57
|
if (buttonInfo && this.loopContext) {
|
|
58
58
|
buttonInfo.loopContext = this.loopContext;
|
|
59
59
|
}
|
|
60
|
-
|
|
61
|
-
this.$emit('submit', eventData, loading, buttonInfo);
|
|
60
|
+
this.$emit('submit', this.value, loading, buttonInfo);
|
|
62
61
|
},
|
|
63
62
|
buildComponent(definition) {
|
|
64
63
|
if (window.ProcessMaker && window.ProcessMaker.EventBus) {
|
package/src/mixins/ScreenBase.js
CHANGED
|
@@ -4,7 +4,6 @@ import { mapActions, mapGetters, mapState } from 'vuex';
|
|
|
4
4
|
import { ValidationMsg } from './ValidationRules';
|
|
5
5
|
import DataReference from "./DataReference";
|
|
6
6
|
import computedFields from "./computedFields";
|
|
7
|
-
import VariablesToSubmitFilter from "./VariablesToSubmitFilter";
|
|
8
7
|
import { findRootScreen } from "./DataReference";
|
|
9
8
|
|
|
10
9
|
const stringFormats = ['string', 'datetime', 'date', 'password'];
|
|
@@ -12,7 +11,7 @@ const parentReference = [];
|
|
|
12
11
|
|
|
13
12
|
export default {
|
|
14
13
|
name: "ScreenContent",
|
|
15
|
-
mixins: [DataReference, computedFields
|
|
14
|
+
mixins: [DataReference, computedFields],
|
|
16
15
|
schema: [
|
|
17
16
|
function() {
|
|
18
17
|
if (window.ProcessMaker && window.ProcessMaker.packages && window.ProcessMaker.packages.includes('package-vocabularies')) {
|
|
@@ -159,19 +158,7 @@ export default {
|
|
|
159
158
|
};
|
|
160
159
|
this.$emit('after-submit', event, ...arguments);
|
|
161
160
|
if (event.validation === false) {
|
|
162
|
-
|
|
163
|
-
const dataToSubmit = this.filterDataForSubmission(this.vdata, buttonInfo);
|
|
164
|
-
|
|
165
|
-
// Debug logging for variables filtering
|
|
166
|
-
if (buttonInfo?.variablesToSubmit?.length > 0) {
|
|
167
|
-
console.log('[VariablesToSubmit] Filtering enabled (validation bypassed)');
|
|
168
|
-
console.log('[VariablesToSubmit] Original data keys:', Object.keys(this.vdata || {}));
|
|
169
|
-
console.log('[VariablesToSubmit] Selected variables:', buttonInfo.variablesToSubmit);
|
|
170
|
-
console.log('[VariablesToSubmit] Filtered data keys:', Object.keys(dataToSubmit));
|
|
171
|
-
console.log('[VariablesToSubmit] Data to submit:', dataToSubmit);
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
this.$emit('submit', dataToSubmit, loading, buttonInfo);
|
|
161
|
+
this.$emit('submit', this.vdata, loading, buttonInfo);
|
|
175
162
|
return;
|
|
176
163
|
}
|
|
177
164
|
await this.validateNow(findRootScreen(this));
|
|
@@ -183,19 +170,7 @@ export default {
|
|
|
183
170
|
// if the form is not valid the data is not emitted
|
|
184
171
|
return;
|
|
185
172
|
}
|
|
186
|
-
|
|
187
|
-
const dataToSubmit = this.filterDataForSubmission(this.vdata, buttonInfo);
|
|
188
|
-
|
|
189
|
-
// Debug logging for variables filtering
|
|
190
|
-
if (buttonInfo?.variablesToSubmit?.length > 0) {
|
|
191
|
-
console.log('[VariablesToSubmit] Filtering enabled');
|
|
192
|
-
console.log('[VariablesToSubmit] Original data keys:', Object.keys(this.vdata || {}));
|
|
193
|
-
console.log('[VariablesToSubmit] Selected variables:', buttonInfo.variablesToSubmit);
|
|
194
|
-
console.log('[VariablesToSubmit] Filtered data keys:', Object.keys(dataToSubmit));
|
|
195
|
-
console.log('[VariablesToSubmit] Data to submit:', dataToSubmit);
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
this.$emit('submit', dataToSubmit, loading, buttonInfo);
|
|
173
|
+
this.$emit('submit', this.vdata, loading, buttonInfo);;
|
|
199
174
|
},
|
|
200
175
|
resetValue(safeDotName, variableName) {
|
|
201
176
|
this.setValue(safeDotName, null);
|
package/src/mixins/index.js
CHANGED
|
@@ -16,7 +16,6 @@ export { default as ScreenBase } from "./ScreenBase";
|
|
|
16
16
|
export { default as shouldElementBeVisible } from "./shouldElementBeVisible";
|
|
17
17
|
export { default as testing } from "./testing";
|
|
18
18
|
export { ValidationMsg, validators } from "./ValidationRules";
|
|
19
|
-
export { default as VariablesToSubmitFilter } from "./VariablesToSubmitFilter";
|
|
20
19
|
export { default as VisibilityRule } from "./VisibilityRule";
|
|
21
20
|
export { default as watchers } from "./watchers";
|
|
22
21
|
export { default as Clipboard } from "./Clipboard";
|