impaktapps-ui-builder 1.0.125 → 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 +48 -52
- 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/service.d.ts +1 -1
- package/package.json +1 -1
- package/src/impaktapps-ui-builder/builder/build/buildTable.ts +0 -3
- package/src/impaktapps-ui-builder/builder/build/uischema/buildPropertiesSection.ts +0 -5
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/schema.ts +0 -8
- package/src/impaktapps-ui-builder/runtime/services/service.ts +58 -42
|
@@ -22,7 +22,7 @@ declare const _default: (funcParams: funcParamsProps) => {
|
|
|
22
22
|
onRowMovement: (paginationValues: any) => Promise<any>;
|
|
23
23
|
onPaginationChange: (paginationValues: any) => Promise<any>;
|
|
24
24
|
getSelectOptions: (param: any) => Promise<any>;
|
|
25
|
-
onChange: () =>
|
|
25
|
+
onChange: () => void;
|
|
26
26
|
callExecuteEvents: (paramValue: any, apiBody: any, eventType: string) => Promise<any>;
|
|
27
27
|
onBack: (functionParameters: any) => Promise<void>;
|
|
28
28
|
onNext: (functionParameters: any) => Promise<void>;
|
package/package.json
CHANGED
|
@@ -77,8 +77,5 @@ export const buildTable = (config: any, componentScope: string) => {
|
|
|
77
77
|
if (config.maxPageSize) {
|
|
78
78
|
table.config.main.maxPageSize = config.maxPageSize
|
|
79
79
|
}
|
|
80
|
-
if(config.initialDensity){
|
|
81
|
-
table.config.main.initialDensity = config.initialDensity
|
|
82
|
-
}
|
|
83
80
|
return table;
|
|
84
81
|
};
|
|
@@ -487,11 +487,6 @@ export const buildPropertiesSection = function (type: String) {
|
|
|
487
487
|
{ label: "100", value: 100 },
|
|
488
488
|
{ label: "500", value: 500 }
|
|
489
489
|
]),
|
|
490
|
-
getSelectField("initialDensity", "Initial Toggle Density", [
|
|
491
|
-
{ label: "Compact", value: "compact" },
|
|
492
|
-
{ label: "Comfortable", value: "comfortable" },
|
|
493
|
-
{ label: "Spacious", value: "spacious" }
|
|
494
|
-
]),
|
|
495
490
|
buildWrapper("Tree Table Properties", [
|
|
496
491
|
getRadioInputField("enableRowMovement", "Row Rearrangement", ["YES", "NO"]),
|
|
497
492
|
getRadioInputField("enableExpanding", "Row Expanding", ["YES", "NO"]),
|
|
@@ -94,14 +94,6 @@ export const ComponentSchema: any = {
|
|
|
94
94
|
{ title: "500", const: 500 }
|
|
95
95
|
]
|
|
96
96
|
},
|
|
97
|
-
initialDensity:{
|
|
98
|
-
type: "string",
|
|
99
|
-
oneOf: [
|
|
100
|
-
{ title: "Compact", const: "compact" },
|
|
101
|
-
{ title: "Comfortable", const: "comfortable" },
|
|
102
|
-
{ title: "Spacious", const: "spacious" }
|
|
103
|
-
]
|
|
104
|
-
},
|
|
105
97
|
layout: {
|
|
106
98
|
type: "array",
|
|
107
99
|
items: {
|
|
@@ -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,
|