impaktapps-ui-builder 0.0.412-a → 0.0.412-d
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 +17 -14
- package/dist/impaktapps-ui-builder.es.js.map +1 -1
- package/dist/impaktapps-ui-builder.umd.js +3 -3
- package/dist/impaktapps-ui-builder.umd.js.map +1 -1
- package/dist/src/impaktapps-ui-builder/runtime/services/events.d.ts +1 -1
- package/dist/src/impaktapps-ui-builder/runtime/services/interface.d.ts +1 -0
- package/package.json +1 -1
- package/src/impaktapps-ui-builder/runtime/services/events.ts +8 -11
- package/src/impaktapps-ui-builder/runtime/services/interface.ts +1 -0
- package/src/impaktapps-ui-builder/runtime/services/service.ts +5 -8
|
@@ -8513,7 +8513,8 @@ function executeEventsHandler(params2) {
|
|
|
8513
8513
|
params2.componentName,
|
|
8514
8514
|
params2.config,
|
|
8515
8515
|
params2.store,
|
|
8516
|
-
params2.service
|
|
8516
|
+
params2.service,
|
|
8517
|
+
params2.formDataHolder
|
|
8517
8518
|
);
|
|
8518
8519
|
} else if (params2.config.Handler === "onBackHandler") {
|
|
8519
8520
|
return (_a = params2.store.functionParameters) == null ? void 0 : _a.handleBack();
|
|
@@ -8545,9 +8546,7 @@ function executeRefreshHandler(params2) {
|
|
|
8545
8546
|
return Promise.all(params2.eventGroups.onLoad[componentName].map((compEventConfig) => {
|
|
8546
8547
|
return executeEvents({ ...params2, config: compEventConfig, componentName });
|
|
8547
8548
|
}));
|
|
8548
|
-
}))
|
|
8549
|
-
params2.store.setFormdata(params2.store.ctx.core.data);
|
|
8550
|
-
});
|
|
8549
|
+
}));
|
|
8551
8550
|
}
|
|
8552
8551
|
function executeApiRequest(params2) {
|
|
8553
8552
|
var _a;
|
|
@@ -8584,7 +8583,7 @@ function executeCustomHandler(params) {
|
|
|
8584
8583
|
return response;
|
|
8585
8584
|
}
|
|
8586
8585
|
}
|
|
8587
|
-
function mergeFormdata(handlerResponse, componentName, eventConfig, store2, service2) {
|
|
8586
|
+
function mergeFormdata(handlerResponse, componentName, eventConfig, store2, service2, formDataHolder2) {
|
|
8588
8587
|
var _a;
|
|
8589
8588
|
if (eventConfig.type === "Select" && !(_.isEmpty(handlerResponse == null ? void 0 : handlerResponse.data) && (handlerResponse == null ? void 0 : handlerResponse.data))) {
|
|
8590
8589
|
store2.setSchema((pre) => {
|
|
@@ -8619,11 +8618,16 @@ function mergeFormdata(handlerResponse, componentName, eventConfig, store2, serv
|
|
|
8619
8618
|
});
|
|
8620
8619
|
} else if (eventConfig.type === "page") {
|
|
8621
8620
|
if (!(_.isEmpty(handlerResponse == null ? void 0 : handlerResponse.data) && (handlerResponse == null ? void 0 : handlerResponse.data))) {
|
|
8622
|
-
store2.
|
|
8621
|
+
store2.setFormdata((pre) => {
|
|
8622
|
+
return { ...pre, ...handlerResponse == null ? void 0 : handlerResponse.data };
|
|
8623
|
+
});
|
|
8623
8624
|
}
|
|
8624
8625
|
} else {
|
|
8625
8626
|
if (handlerResponse) {
|
|
8626
|
-
|
|
8627
|
+
formDataHolder2[componentName] = eventConfig.lazyLoading ? (_a = handlerResponse == null ? void 0 : handlerResponse.data) == null ? void 0 : _a.data : handlerResponse.data;
|
|
8628
|
+
store2.setFormdata((pre) => {
|
|
8629
|
+
return { ...pre, ...formDataHolder2 };
|
|
8630
|
+
});
|
|
8627
8631
|
}
|
|
8628
8632
|
}
|
|
8629
8633
|
}
|
|
@@ -8704,6 +8708,7 @@ const notifyUiSchema = {
|
|
|
8704
8708
|
},
|
|
8705
8709
|
layout: 6
|
|
8706
8710
|
};
|
|
8711
|
+
let formDataHolder = {};
|
|
8707
8712
|
let pageData = false;
|
|
8708
8713
|
const extractEvents = (eventConfig) => {
|
|
8709
8714
|
function extractsConfigEvents(eventConfigObj) {
|
|
@@ -8760,7 +8765,8 @@ var service = (funcParams) => {
|
|
|
8760
8765
|
service: funcParams.service,
|
|
8761
8766
|
serviceHolder: { downloadFile: downloadFile$1, download: doDownload, ...funcParams.functionsProvider },
|
|
8762
8767
|
eventGroups,
|
|
8763
|
-
functionsProvider: funcParams.functionsProvider
|
|
8768
|
+
functionsProvider: funcParams.functionsProvider,
|
|
8769
|
+
formDataHolder
|
|
8764
8770
|
};
|
|
8765
8771
|
return {
|
|
8766
8772
|
setPage: async function() {
|
|
@@ -8882,9 +8888,7 @@ var service = (funcParams) => {
|
|
|
8882
8888
|
});
|
|
8883
8889
|
}
|
|
8884
8890
|
}
|
|
8885
|
-
}))
|
|
8886
|
-
funcParams.store.setFormdata(funcParams.store.ctx.core.data);
|
|
8887
|
-
});
|
|
8891
|
+
}));
|
|
8888
8892
|
}
|
|
8889
8893
|
},
|
|
8890
8894
|
updateConfigApiBody: async function(paramValue, apiBody) {
|
|
@@ -8937,6 +8941,7 @@ var service = (funcParams) => {
|
|
|
8937
8941
|
},
|
|
8938
8942
|
callHandler: async function(eventType, functionParameters) {
|
|
8939
8943
|
var _a, _b, _c;
|
|
8944
|
+
formDataHolder = {};
|
|
8940
8945
|
const path = ((_a = funcParams.dynamicData) == null ? void 0 : _a.tableButtonPath) || funcParams.dynamicData.path.split(".")[0];
|
|
8941
8946
|
if (((_b = eventGroups == null ? void 0 : eventGroups[eventType]) == null ? void 0 : _b[path]) !== void 0) {
|
|
8942
8947
|
Promise.all((_c = eventGroups == null ? void 0 : eventGroups[eventType]) == null ? void 0 : _c[path].map((eventConfig) => {
|
|
@@ -8946,9 +8951,7 @@ var service = (funcParams) => {
|
|
|
8946
8951
|
config: eventConfig,
|
|
8947
8952
|
componentName: path
|
|
8948
8953
|
});
|
|
8949
|
-
}))
|
|
8950
|
-
funcParams.store.setFormdata(funcParams.store.ctx.core.data);
|
|
8951
|
-
});
|
|
8954
|
+
}));
|
|
8952
8955
|
}
|
|
8953
8956
|
},
|
|
8954
8957
|
downloadFile: downloadFile$1,
|