impaktapps-ui-builder 0.0.382-alpha.329 → 0.0.382-alpha.330
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.
|
@@ -9117,12 +9117,25 @@ const extractEvents = (eventConfig) => {
|
|
|
9117
9117
|
return elem.eventType === "Success";
|
|
9118
9118
|
});
|
|
9119
9119
|
if (!!!SuccessEvent && event2.eventType === "onLoad") {
|
|
9120
|
-
event2.events.push({
|
|
9120
|
+
event2.events.push({
|
|
9121
|
+
Handler: "mergeFormdata",
|
|
9122
|
+
eventType: "Success",
|
|
9123
|
+
type: compType,
|
|
9124
|
+
lazyLoading: eventConfig.lazyLoading === "YES" ? true : false
|
|
9125
|
+
});
|
|
9121
9126
|
}
|
|
9122
9127
|
if (!!!SuccessEvent && (event2.eventType === "onBack" || event2.eventType === "onNext" || event2.eventType === "onReset")) {
|
|
9123
|
-
event2.events.push({
|
|
9128
|
+
event2.events.push({
|
|
9129
|
+
Handler: `${event2.eventType}Handler`,
|
|
9130
|
+
eventType: "Success",
|
|
9131
|
+
type: compType,
|
|
9132
|
+
lazyLoading: eventConfig.lazyLoading === "YES" ? true : false
|
|
9133
|
+
});
|
|
9124
9134
|
}
|
|
9125
|
-
eventGroups[event2.eventType][eventConfigObj.name].push({
|
|
9135
|
+
eventGroups[event2.eventType][eventConfigObj.name].push({
|
|
9136
|
+
...event2,
|
|
9137
|
+
type: compType
|
|
9138
|
+
});
|
|
9126
9139
|
});
|
|
9127
9140
|
}
|
|
9128
9141
|
}
|
|
@@ -9145,12 +9158,13 @@ var service = (funcParams) => {
|
|
|
9145
9158
|
serviceHolder: { downloadFile: downloadFile$1, download: doDownload },
|
|
9146
9159
|
eventGroups
|
|
9147
9160
|
};
|
|
9148
|
-
lodash.exports.debounce(async
|
|
9149
|
-
await
|
|
9161
|
+
const debouncedExecuteEvents = lodash.exports.debounce(async (eventConfig, componentName) => {
|
|
9162
|
+
await executeEvents({
|
|
9163
|
+
...executeEventsParameters,
|
|
9164
|
+
config: eventConfig,
|
|
9165
|
+
componentName
|
|
9166
|
+
});
|
|
9150
9167
|
}, 300);
|
|
9151
|
-
lodash.exports.throttle(async (executeEventsParams) => {
|
|
9152
|
-
await executeEvents(executeEventsParams);
|
|
9153
|
-
}, 1e3);
|
|
9154
9168
|
return {
|
|
9155
9169
|
setPage: async function() {
|
|
9156
9170
|
funcParams.store.setFormdata({});
|
|
@@ -9164,9 +9178,12 @@ var service = (funcParams) => {
|
|
|
9164
9178
|
serviceHolder: this,
|
|
9165
9179
|
eventGroups
|
|
9166
9180
|
};
|
|
9167
|
-
funcParams.store.
|
|
9168
|
-
|
|
9169
|
-
|
|
9181
|
+
funcParams.store.setSchema((pre) => {
|
|
9182
|
+
return {
|
|
9183
|
+
...funcParams.schema,
|
|
9184
|
+
properties: { ...funcParams.schema.properties, ...pre.properties }
|
|
9185
|
+
};
|
|
9186
|
+
});
|
|
9170
9187
|
funcParams.uiSchema.elements.push(notifyUiSchema);
|
|
9171
9188
|
funcParams.store.setUiSchema(funcParams.uiSchema);
|
|
9172
9189
|
await executeRefreshHandler({
|
|
@@ -9213,18 +9230,16 @@ var service = (funcParams) => {
|
|
|
9213
9230
|
onChange: async function() {
|
|
9214
9231
|
if (eventGroups.onChange) {
|
|
9215
9232
|
const ChangeEventsKeysArray = Object.keys(eventGroups.onChange);
|
|
9216
|
-
Promise.all(
|
|
9217
|
-
|
|
9218
|
-
|
|
9219
|
-
|
|
9220
|
-
|
|
9221
|
-
|
|
9222
|
-
|
|
9223
|
-
componentName
|
|
9224
|
-
});
|
|
9233
|
+
await Promise.all(
|
|
9234
|
+
ChangeEventsKeysArray.map(async (componentName) => {
|
|
9235
|
+
var _a, _b;
|
|
9236
|
+
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) {
|
|
9237
|
+
for (const eventConfig of eventGroups.onChange[componentName]) {
|
|
9238
|
+
await debouncedExecuteEvents(eventConfig, componentName);
|
|
9239
|
+
}
|
|
9225
9240
|
}
|
|
9226
|
-
}
|
|
9227
|
-
|
|
9241
|
+
})
|
|
9242
|
+
);
|
|
9228
9243
|
}
|
|
9229
9244
|
},
|
|
9230
9245
|
updateConfigApiBody: async function(paramValue, apiBody) {
|
|
@@ -9232,10 +9247,7 @@ var service = (funcParams) => {
|
|
|
9232
9247
|
let LastCallResponse = void 0;
|
|
9233
9248
|
for (const eventConfig of eventGroups == null ? void 0 : eventGroups.onLoad[paramValue.path]) {
|
|
9234
9249
|
if (eventConfig.body) {
|
|
9235
|
-
eventConfig.body = [
|
|
9236
|
-
...eventConfig.body,
|
|
9237
|
-
...apiBody
|
|
9238
|
-
];
|
|
9250
|
+
eventConfig.body = [...eventConfig.body, ...apiBody];
|
|
9239
9251
|
} else {
|
|
9240
9252
|
eventConfig.body = apiBody;
|
|
9241
9253
|
}
|
|
@@ -9278,17 +9290,10 @@ var service = (funcParams) => {
|
|
|
9278
9290
|
callHandler: async function(eventType, functionParameters) {
|
|
9279
9291
|
var _a, _b, _c;
|
|
9280
9292
|
const path = ((_a = funcParams.dynamicData) == null ? void 0 : _a.tableButtonPath) || funcParams.dynamicData.path.split(".")[0];
|
|
9281
|
-
const throttledExecuteEvents2 = lodash.exports.throttle(async (eventConfig) => {
|
|
9282
|
-
executeEventsParameters.store.functionParameters = functionParameters;
|
|
9283
|
-
await executeEvents({
|
|
9284
|
-
...executeEventsParameters,
|
|
9285
|
-
config: eventConfig,
|
|
9286
|
-
componentName: path
|
|
9287
|
-
});
|
|
9288
|
-
}, 1e3);
|
|
9289
9293
|
if (((_b = eventGroups == null ? void 0 : eventGroups[eventType]) == null ? void 0 : _b[path]) !== void 0) {
|
|
9290
9294
|
for (const eventConfig of (_c = eventGroups == null ? void 0 : eventGroups[eventType]) == null ? void 0 : _c[path]) {
|
|
9291
|
-
|
|
9295
|
+
executeEventsParameters.store.functionParameters = functionParameters;
|
|
9296
|
+
await debouncedExecuteEvents(eventConfig, path);
|
|
9292
9297
|
}
|
|
9293
9298
|
}
|
|
9294
9299
|
},
|