impaktapps-ui-builder 0.0.305 → 0.0.306
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.
|
@@ -8070,12 +8070,13 @@ async function executeEventsHandler(params2) {
|
|
|
8070
8070
|
} else if (params2.config.Handler === "refresh") {
|
|
8071
8071
|
return await executeRefreshHandler(params2);
|
|
8072
8072
|
} else if (params2.config.Handler === "mergeFormdata") {
|
|
8073
|
-
|
|
8073
|
+
const result = mergeFormdata(
|
|
8074
8074
|
params2.parentEventOutput,
|
|
8075
8075
|
params2.componentName,
|
|
8076
8076
|
params2.config,
|
|
8077
8077
|
params2.store
|
|
8078
8078
|
);
|
|
8079
|
+
return result;
|
|
8079
8080
|
}
|
|
8080
8081
|
}
|
|
8081
8082
|
async function executeRefreshHandler(params2) {
|
|
@@ -8114,7 +8115,7 @@ async function executeCustomHandler(params) {
|
|
|
8114
8115
|
const response = await makeFunc(params.store, params.dynamicData, params.userValue, params.parentEventOutput, params.service, params.componentName);
|
|
8115
8116
|
return response;
|
|
8116
8117
|
}
|
|
8117
|
-
|
|
8118
|
+
function mergeFormdata(handlerResponse, componentName, eventConfig, store2) {
|
|
8118
8119
|
if (eventConfig.type === "Select" && !(_.isEmpty(handlerResponse == null ? void 0 : handlerResponse.data) && (handlerResponse == null ? void 0 : handlerResponse.data))) {
|
|
8119
8120
|
store2.setSchema((pre) => {
|
|
8120
8121
|
var _a;
|
|
@@ -8147,9 +8148,11 @@ async function mergeFormdata(handlerResponse, componentName, eventConfig, store2
|
|
|
8147
8148
|
};
|
|
8148
8149
|
});
|
|
8149
8150
|
} else if (eventConfig.type === "page") {
|
|
8150
|
-
|
|
8151
|
-
|
|
8152
|
-
|
|
8151
|
+
if (!(_.isEmpty(handlerResponse == null ? void 0 : handlerResponse.data) && (handlerResponse == null ? void 0 : handlerResponse.data))) {
|
|
8152
|
+
store2.setFormdata((pre) => {
|
|
8153
|
+
return { ...pre, ...handlerResponse == null ? void 0 : handlerResponse.data };
|
|
8154
|
+
});
|
|
8155
|
+
}
|
|
8153
8156
|
} else {
|
|
8154
8157
|
if (handlerResponse) {
|
|
8155
8158
|
store2.setFormdata((pre) => {
|