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