impaktapps-ui-builder 1.0.124 → 1.0.126
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 +42 -27
- package/dist/impaktapps-ui-builder.es.js.map +1 -1
- package/dist/impaktapps-ui-builder.umd.js +1 -1
- package/dist/impaktapps-ui-builder.umd.js.map +1 -1
- package/dist/src/impaktapps-ui-builder/runtime/services/service.d.ts +1 -1
- package/package.json +1 -1
- package/src/impaktapps-ui-builder/runtime/services/service.ts +52 -29
|
@@ -10423,26 +10423,34 @@ var service = (funcParams) => {
|
|
|
10423
10423
|
return response == null ? void 0 : response.data;
|
|
10424
10424
|
}
|
|
10425
10425
|
},
|
|
10426
|
-
onChange:
|
|
10427
|
-
if (eventGroups.onChange)
|
|
10428
|
-
|
|
10429
|
-
|
|
10430
|
-
|
|
10431
|
-
|
|
10432
|
-
|
|
10433
|
-
|
|
10434
|
-
|
|
10435
|
-
|
|
10436
|
-
|
|
10437
|
-
|
|
10438
|
-
|
|
10439
|
-
|
|
10426
|
+
onChange: function() {
|
|
10427
|
+
if (!eventGroups.onChange)
|
|
10428
|
+
return;
|
|
10429
|
+
const ChangeEventsKeysArray = Object.keys(eventGroups.onChange);
|
|
10430
|
+
const promises = ChangeEventsKeysArray.flatMap((componentName) => {
|
|
10431
|
+
var _a, _b;
|
|
10432
|
+
if (((_a = funcParams.store) == null ? void 0 : _a.formData[componentName]) === funcParams.store.newData[componentName] || ((_b = funcParams.store) == null ? void 0 : _b.newData[componentName]) === void 0) {
|
|
10433
|
+
return [];
|
|
10434
|
+
}
|
|
10435
|
+
return eventGroups.onChange[componentName].map(
|
|
10436
|
+
(eventConfig) => Promise.resolve(
|
|
10437
|
+
executeEvents({
|
|
10438
|
+
...executeEventsParameters,
|
|
10439
|
+
config: eventConfig,
|
|
10440
|
+
componentName,
|
|
10441
|
+
formDataHolder
|
|
10442
|
+
})
|
|
10443
|
+
).then(() => {
|
|
10440
10444
|
if (!lodash.exports.isEmpty(formDataHolder)) {
|
|
10441
|
-
funcParams.store.setFormdata((pre) => ({
|
|
10445
|
+
funcParams.store.setFormdata((pre) => ({
|
|
10446
|
+
...pre,
|
|
10447
|
+
...formDataHolder
|
|
10448
|
+
}));
|
|
10442
10449
|
}
|
|
10443
|
-
}
|
|
10444
|
-
|
|
10445
|
-
}
|
|
10450
|
+
})
|
|
10451
|
+
);
|
|
10452
|
+
});
|
|
10453
|
+
Promise.allSettled(promises);
|
|
10446
10454
|
},
|
|
10447
10455
|
callExecuteEvents: async function(paramValue, apiBody, eventType) {
|
|
10448
10456
|
var _a, _b;
|
|
@@ -10494,22 +10502,29 @@ var service = (funcParams) => {
|
|
|
10494
10502
|
}
|
|
10495
10503
|
},
|
|
10496
10504
|
callHandler: function(eventType, functionParameters) {
|
|
10497
|
-
var _a, _b
|
|
10498
|
-
const path = ((_a = funcParams.dynamicData) == null ? void 0 : _a.tableButtonPath) || funcParams.dynamicData.path.split(".")
|
|
10499
|
-
if (((_b = eventGroups == null ? void 0 : eventGroups[eventType]) == null ? void 0 : _b[path])
|
|
10500
|
-
|
|
10501
|
-
|
|
10502
|
-
|
|
10505
|
+
var _a, _b;
|
|
10506
|
+
const path = ((_a = funcParams.dynamicData) == null ? void 0 : _a.tableButtonPath) || funcParams.dynamicData.path.split(".").pop();
|
|
10507
|
+
if (!((_b = eventGroups == null ? void 0 : eventGroups[eventType]) == null ? void 0 : _b[path]))
|
|
10508
|
+
return;
|
|
10509
|
+
const promises = eventGroups[eventType][path].map((eventConfig) => {
|
|
10510
|
+
executeEventsParameters.store.functionParameters = functionParameters;
|
|
10511
|
+
return Promise.resolve(
|
|
10512
|
+
executeEvents({
|
|
10503
10513
|
...executeEventsParameters,
|
|
10504
10514
|
config: eventConfig,
|
|
10505
10515
|
componentName: path,
|
|
10506
10516
|
formDataHolder
|
|
10507
|
-
})
|
|
10517
|
+
})
|
|
10518
|
+
).then(() => {
|
|
10508
10519
|
if (!lodash.exports.isEmpty(formDataHolder)) {
|
|
10509
|
-
funcParams.store.setFormdata((pre) => ({
|
|
10520
|
+
funcParams.store.setFormdata((pre) => ({
|
|
10521
|
+
...pre,
|
|
10522
|
+
...formDataHolder
|
|
10523
|
+
}));
|
|
10510
10524
|
}
|
|
10511
10525
|
});
|
|
10512
|
-
}
|
|
10526
|
+
});
|
|
10527
|
+
Promise.allSettled(promises);
|
|
10513
10528
|
},
|
|
10514
10529
|
downloadFile: downloadFile$1,
|
|
10515
10530
|
downloadFileFromUrl,
|