impaktapps-ui-builder 0.0.411 → 0.0.412-a
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 -15
- 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/package.json +1 -1
- package/src/impaktapps-ui-builder/runtime/services/events.ts +10 -4
- package/src/impaktapps-ui-builder/runtime/services/service.ts +8 -3
|
@@ -8545,7 +8545,9 @@ function executeRefreshHandler(params2) {
|
|
|
8545
8545
|
return Promise.all(params2.eventGroups.onLoad[componentName].map((compEventConfig) => {
|
|
8546
8546
|
return executeEvents({ ...params2, config: compEventConfig, componentName });
|
|
8547
8547
|
}));
|
|
8548
|
-
}))
|
|
8548
|
+
})).then(() => {
|
|
8549
|
+
params2.store.setFormdata(params2.store.ctx.core.data);
|
|
8550
|
+
});
|
|
8549
8551
|
}
|
|
8550
8552
|
function executeApiRequest(params2) {
|
|
8551
8553
|
var _a;
|
|
@@ -8583,15 +8585,16 @@ function executeCustomHandler(params) {
|
|
|
8583
8585
|
}
|
|
8584
8586
|
}
|
|
8585
8587
|
function mergeFormdata(handlerResponse, componentName, eventConfig, store2, service2) {
|
|
8588
|
+
var _a;
|
|
8586
8589
|
if (eventConfig.type === "Select" && !(_.isEmpty(handlerResponse == null ? void 0 : handlerResponse.data) && (handlerResponse == null ? void 0 : handlerResponse.data))) {
|
|
8587
8590
|
store2.setSchema((pre) => {
|
|
8588
|
-
var
|
|
8591
|
+
var _a2;
|
|
8589
8592
|
return {
|
|
8590
8593
|
...pre,
|
|
8591
8594
|
properties: {
|
|
8592
8595
|
...pre.properties,
|
|
8593
8596
|
[componentName]: {
|
|
8594
|
-
...(
|
|
8597
|
+
...(_a2 = pre.properties) == null ? void 0 : _a2[componentName],
|
|
8595
8598
|
oneOf: handlerResponse.data
|
|
8596
8599
|
}
|
|
8597
8600
|
}
|
|
@@ -8599,13 +8602,13 @@ function mergeFormdata(handlerResponse, componentName, eventConfig, store2, serv
|
|
|
8599
8602
|
});
|
|
8600
8603
|
} else if (eventConfig.type === "MultipleSelect" && !(_.isEmpty(handlerResponse == null ? void 0 : handlerResponse.data) && (handlerResponse == null ? void 0 : handlerResponse.data))) {
|
|
8601
8604
|
store2.setSchema((pre) => {
|
|
8602
|
-
var
|
|
8605
|
+
var _a2;
|
|
8603
8606
|
return {
|
|
8604
8607
|
...pre,
|
|
8605
8608
|
properties: {
|
|
8606
8609
|
...pre.properties,
|
|
8607
8610
|
[componentName]: {
|
|
8608
|
-
...(
|
|
8611
|
+
...(_a2 = pre.properties) == null ? void 0 : _a2[componentName],
|
|
8609
8612
|
type: "array",
|
|
8610
8613
|
items: {
|
|
8611
8614
|
oneOf: handlerResponse == null ? void 0 : handlerResponse.data
|
|
@@ -8616,16 +8619,11 @@ function mergeFormdata(handlerResponse, componentName, eventConfig, store2, serv
|
|
|
8616
8619
|
});
|
|
8617
8620
|
} else if (eventConfig.type === "page") {
|
|
8618
8621
|
if (!(_.isEmpty(handlerResponse == null ? void 0 : handlerResponse.data) && (handlerResponse == null ? void 0 : handlerResponse.data))) {
|
|
8619
|
-
store2.
|
|
8620
|
-
return { ...pre, ...handlerResponse == null ? void 0 : handlerResponse.data };
|
|
8621
|
-
});
|
|
8622
|
+
store2.ctx.core.data = { ...store2.ctx.core.data, ...handlerResponse.data };
|
|
8622
8623
|
}
|
|
8623
8624
|
} else {
|
|
8624
8625
|
if (handlerResponse) {
|
|
8625
|
-
store2.
|
|
8626
|
-
var _a;
|
|
8627
|
-
return { ...pre, [componentName]: eventConfig.lazyLoading ? (_a = handlerResponse == null ? void 0 : handlerResponse.data) == null ? void 0 : _a.data : handlerResponse.data };
|
|
8628
|
-
});
|
|
8626
|
+
store2.ctx.core.data[componentName] = eventConfig.lazyLoading ? (_a = handlerResponse == null ? void 0 : handlerResponse.data) == null ? void 0 : _a.data : handlerResponse.data;
|
|
8629
8627
|
}
|
|
8630
8628
|
}
|
|
8631
8629
|
}
|
|
@@ -8884,7 +8882,9 @@ var service = (funcParams) => {
|
|
|
8884
8882
|
});
|
|
8885
8883
|
}
|
|
8886
8884
|
}
|
|
8887
|
-
}))
|
|
8885
|
+
})).then((res) => {
|
|
8886
|
+
funcParams.store.setFormdata(funcParams.store.ctx.core.data);
|
|
8887
|
+
});
|
|
8888
8888
|
}
|
|
8889
8889
|
},
|
|
8890
8890
|
updateConfigApiBody: async function(paramValue, apiBody) {
|
|
@@ -8939,14 +8939,16 @@ var service = (funcParams) => {
|
|
|
8939
8939
|
var _a, _b, _c;
|
|
8940
8940
|
const path = ((_a = funcParams.dynamicData) == null ? void 0 : _a.tableButtonPath) || funcParams.dynamicData.path.split(".")[0];
|
|
8941
8941
|
if (((_b = eventGroups == null ? void 0 : eventGroups[eventType]) == null ? void 0 : _b[path]) !== void 0) {
|
|
8942
|
-
|
|
8942
|
+
Promise.all((_c = eventGroups == null ? void 0 : eventGroups[eventType]) == null ? void 0 : _c[path].map((eventConfig) => {
|
|
8943
8943
|
executeEventsParameters.store.functionParameters = functionParameters;
|
|
8944
8944
|
executeEvents({
|
|
8945
8945
|
...executeEventsParameters,
|
|
8946
8946
|
config: eventConfig,
|
|
8947
8947
|
componentName: path
|
|
8948
8948
|
});
|
|
8949
|
-
}
|
|
8949
|
+
})).then((res) => {
|
|
8950
|
+
funcParams.store.setFormdata(funcParams.store.ctx.core.data);
|
|
8951
|
+
});
|
|
8950
8952
|
}
|
|
8951
8953
|
},
|
|
8952
8954
|
downloadFile: downloadFile$1,
|