impaktapps-ui-builder 1.0.121 → 1.0.123-testValidation
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/impaktapps-ui-builder.es.js +30 -14
- package/dist/impaktapps-ui-builder.es.js.map +1 -1
- package/dist/impaktapps-ui-builder.umd.js +4 -4
- package/dist/impaktapps-ui-builder.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/impaktapps-ui-builder/builder/services/pageMaster.ts +9 -1
- package/src/impaktapps-ui-builder/runtime/services/events.ts +1 -1
- package/src/impaktapps-ui-builder/runtime/services/service.ts +20 -12
package/package.json
CHANGED
|
@@ -68,7 +68,15 @@ export default (funcParams: funcParamsProps) => {
|
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
},
|
|
71
|
-
saveHandler: async () =>
|
|
71
|
+
saveHandler: async () => {
|
|
72
|
+
if (store.ctx.core.errors.length > 0) {
|
|
73
|
+
store.setValidation("ValidateAndShow");
|
|
74
|
+
store.setNotify({
|
|
75
|
+
FailMessage: "Errors on page",
|
|
76
|
+
Fail: true,
|
|
77
|
+
});
|
|
78
|
+
}else await saveHandler(store, service, submitHandler);
|
|
79
|
+
},
|
|
72
80
|
Edit_Components: Component(store, dynamicData, submitHandler, service).editComponents,
|
|
73
81
|
|
|
74
82
|
Delete_Components: async function () {
|
|
@@ -72,10 +72,7 @@ export default (funcParams: funcParamsProps) => {
|
|
|
72
72
|
return {
|
|
73
73
|
setPage: async function () {
|
|
74
74
|
funcParams.store.setAdditionalErrors([]);
|
|
75
|
-
funcParams.store.setFormdata((
|
|
76
|
-
...pre,
|
|
77
|
-
...(funcParams?.initFormData())
|
|
78
|
-
}));
|
|
75
|
+
funcParams.store.setFormdata(funcParams?.initFormData() || {});
|
|
79
76
|
funcParams.store.setSchema({ type: "object", properties: {} });
|
|
80
77
|
funcParams.store.newData = {};
|
|
81
78
|
eventGroups = {};
|
|
@@ -195,14 +192,23 @@ export default (funcParams: funcParamsProps) => {
|
|
|
195
192
|
funcParams.store?.newData[componentName] !== undefined
|
|
196
193
|
) {
|
|
197
194
|
for (const eventConfig of eventGroups.onChange[componentName]) {
|
|
198
|
-
|
|
199
|
-
...executeEventsParameters,
|
|
200
|
-
config: eventConfig,
|
|
201
|
-
componentName,
|
|
202
|
-
formDataHolder
|
|
203
|
-
})
|
|
195
|
+
|
|
204
196
|
if (eventConfig.Handler === "refresh") {
|
|
205
|
-
|
|
197
|
+
await executeEvents({
|
|
198
|
+
...executeEventsParameters,
|
|
199
|
+
config: eventConfig,
|
|
200
|
+
componentName,
|
|
201
|
+
formDataHolder: formDataHolder
|
|
202
|
+
})
|
|
203
|
+
if (!isEmpty(formDataHolder)) {
|
|
204
|
+
funcParams.store.setFormdata((pre) => ({ ...pre, ...formDataHolder }));
|
|
205
|
+
}
|
|
206
|
+
} else {
|
|
207
|
+
await executeEvents({
|
|
208
|
+
...executeEventsParameters,
|
|
209
|
+
config: eventConfig,
|
|
210
|
+
componentName,
|
|
211
|
+
})
|
|
206
212
|
}
|
|
207
213
|
}
|
|
208
214
|
}
|
|
@@ -264,7 +270,9 @@ export default (funcParams: funcParamsProps) => {
|
|
|
264
270
|
componentName: path,
|
|
265
271
|
formDataHolder: formDataHolder
|
|
266
272
|
}).then((res) => {
|
|
267
|
-
|
|
273
|
+
if (!isEmpty(formDataHolder)) {
|
|
274
|
+
funcParams.store.setFormdata((pre) => ({ ...pre, ...formDataHolder }));
|
|
275
|
+
}
|
|
268
276
|
});
|
|
269
277
|
} else {
|
|
270
278
|
executeEvents({
|