impaktapps-ui-builder 1.0.135 → 1.0.137
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 +269 -74
- package/dist/impaktapps-ui-builder.es.js.map +1 -1
- package/dist/impaktapps-ui-builder.umd.js +11 -11
- 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/builder/build/buildConfig.ts +1 -1
- package/src/impaktapps-ui-builder/builder/build/buildUiSchema.ts +4 -2
- package/src/impaktapps-ui-builder/builder/build/uischema/coreSection.ts +75 -19
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/schema.ts +102 -80
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/uiSchema.ts +61 -1
- package/src/impaktapps-ui-builder/builder/services/component.ts +23 -0
- package/src/impaktapps-ui-builder/runtime/services/service.ts +58 -42
|
@@ -183,28 +183,39 @@ export default (funcParams: funcParamsProps) => {
|
|
|
183
183
|
return response?.data;
|
|
184
184
|
}
|
|
185
185
|
},
|
|
186
|
-
onChange:
|
|
187
|
-
if (eventGroups.onChange)
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
186
|
+
onChange: function () {
|
|
187
|
+
if (!eventGroups.onChange) return;
|
|
188
|
+
|
|
189
|
+
const ChangeEventsKeysArray = Object.keys(eventGroups.onChange);
|
|
190
|
+
|
|
191
|
+
const promises = ChangeEventsKeysArray.flatMap((componentName: string) => {
|
|
192
|
+
if (
|
|
193
|
+
funcParams.store?.formData[componentName] === funcParams.store.newData[componentName] ||
|
|
194
|
+
funcParams.store?.newData[componentName] === undefined
|
|
195
|
+
) {
|
|
196
|
+
return [];
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
return eventGroups.onChange[componentName].map(eventConfig =>
|
|
200
|
+
Promise.resolve(
|
|
201
|
+
executeEvents({
|
|
202
|
+
...executeEventsParameters,
|
|
203
|
+
config: eventConfig,
|
|
204
|
+
componentName,
|
|
205
|
+
formDataHolder
|
|
206
|
+
})
|
|
207
|
+
).then(() => {
|
|
208
|
+
if (!isEmpty(formDataHolder)) {
|
|
209
|
+
funcParams.store.setFormdata(pre => ({
|
|
210
|
+
...pre,
|
|
211
|
+
...formDataHolder
|
|
212
|
+
}));
|
|
204
213
|
}
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
}
|
|
214
|
+
})
|
|
215
|
+
);
|
|
216
|
+
});
|
|
217
|
+
|
|
218
|
+
Promise.allSettled(promises);
|
|
208
219
|
},
|
|
209
220
|
callExecuteEvents: async function (paramValue, apiBody, eventType: string) {
|
|
210
221
|
let LastCallResponse = undefined;
|
|
@@ -250,28 +261,33 @@ export default (funcParams: funcParamsProps) => {
|
|
|
250
261
|
}
|
|
251
262
|
},
|
|
252
263
|
callHandler: function (eventType: string, functionParameters?: any) {
|
|
253
|
-
const path =
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
264
|
+
const path =
|
|
265
|
+
funcParams.dynamicData?.tableButtonPath ||
|
|
266
|
+
funcParams.dynamicData.path.split(".").pop();
|
|
267
|
+
|
|
268
|
+
if (!eventGroups?.[eventType]?.[path]) return;
|
|
269
|
+
|
|
270
|
+
const promises = eventGroups[eventType][path].map(eventConfig => {
|
|
271
|
+
executeEventsParameters.store.functionParameters = functionParameters;
|
|
272
|
+
|
|
273
|
+
return Promise.resolve(
|
|
274
|
+
executeEvents({
|
|
275
|
+
...executeEventsParameters,
|
|
276
|
+
config: eventConfig,
|
|
277
|
+
componentName: path,
|
|
278
|
+
formDataHolder
|
|
279
|
+
})
|
|
280
|
+
).then(() => {
|
|
281
|
+
if (!isEmpty(formDataHolder)) {
|
|
282
|
+
funcParams.store.setFormdata(pre => ({
|
|
283
|
+
...pre,
|
|
284
|
+
...formDataHolder
|
|
285
|
+
}));
|
|
272
286
|
}
|
|
273
|
-
})
|
|
274
|
-
}
|
|
287
|
+
});
|
|
288
|
+
});
|
|
289
|
+
|
|
290
|
+
Promise.allSettled(promises);
|
|
275
291
|
},
|
|
276
292
|
downloadFile: downloadFile,
|
|
277
293
|
downloadFileFromUrl: downloadFileFromUrl,
|