impaktapps-ui-builder 1.0.57 → 1.0.59-flcikering.0.1
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 +20 -15
- package/dist/impaktapps-ui-builder.es.js.map +1 -1
- package/dist/impaktapps-ui-builder.umd.js +8 -8
- package/dist/impaktapps-ui-builder.umd.js.map +1 -1
- package/dist/src/impaktapps-ui-builder/runtime/services/service.d.ts +1 -2
- package/package.json +1 -1
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/event/schema.ts +4 -2
- package/src/impaktapps-ui-builder/runtime/services/events.ts +23 -4
- package/src/impaktapps-ui-builder/runtime/services/service.ts +2 -5
|
@@ -12,8 +12,7 @@ declare const _default: (funcParams: funcParamsProps) => {
|
|
|
12
12
|
onCellRenderer: (cellParams: any) => {};
|
|
13
13
|
onClick: () => void;
|
|
14
14
|
onKeyDown: () => void;
|
|
15
|
-
|
|
16
|
-
onDeletePopupYes: () => void;
|
|
15
|
+
onFileDelete: () => Promise<void>;
|
|
17
16
|
onMount: () => void;
|
|
18
17
|
onFileDownload: () => void;
|
|
19
18
|
onFileUpload: () => void;
|
package/package.json
CHANGED
|
@@ -46,14 +46,16 @@ export const EventSchema = {
|
|
|
46
46
|
{ title: "Start", const: "onStart" },
|
|
47
47
|
{ title: "Cell Render", const: "onCellRenderer" },
|
|
48
48
|
{ title: "Upload", const: "onUpload" },
|
|
49
|
+
{ title: "FileDelete", const: "onFileDelete" },
|
|
50
|
+
{ title: "Download", const: "onDownload" },
|
|
49
51
|
{ title: "Back", const: "onBack" },
|
|
50
52
|
{ title: "Next", const: "onNext" },
|
|
51
53
|
{ title: "Row Movement", const: "onRowMovement" },
|
|
52
54
|
{ title: "Download", const: "onDownload" },
|
|
53
55
|
{ title: "Fail", const: "Fail" },
|
|
54
56
|
{ title: "Key Down", const: "onKeyDown" },
|
|
55
|
-
|
|
56
|
-
|
|
57
|
+
|
|
58
|
+
|
|
57
59
|
]
|
|
58
60
|
},
|
|
59
61
|
Handler: {
|
|
@@ -188,9 +188,24 @@ function mergeFormdata(handlerResponse: any, componentName: string, eventConfig:
|
|
|
188
188
|
}
|
|
189
189
|
else if (eventConfig.type === "Table" && eventConfig.lazyLoading) {
|
|
190
190
|
if (handlerResponse && handlerResponse?.data) {
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
191
|
+
const tableData = Array.isArray(handlerResponse.data?.data)
|
|
192
|
+
? cloneDeep(handlerResponse.data.data)
|
|
193
|
+
: cloneDeep(handlerResponse.data?.data);
|
|
194
|
+
|
|
195
|
+
const rowCount = handlerResponse.data?.meta?.totalRowCount ?? null;
|
|
196
|
+
|
|
197
|
+
const newFormDataHolder = {
|
|
198
|
+
...formDataHolder,
|
|
199
|
+
[componentName]: tableData,
|
|
200
|
+
[`${componentName}_RowCount`]: rowCount,
|
|
201
|
+
};
|
|
202
|
+
store.setFormdata((prev) => {
|
|
203
|
+
// we merge prev with newFormDataHolder immutably:
|
|
204
|
+
return { ...prev, ...newFormDataHolder }; // CHANGED: no in-place mutation
|
|
205
|
+
});
|
|
206
|
+
// formDataHolder[componentName] = handlerResponse.data?.data
|
|
207
|
+
// formDataHolder[`${componentName}_RowCount`] = handlerResponse.data?.meta?.totalRowCount
|
|
208
|
+
// store.setFormdata((pre) => { return { ...pre, ...formDataHolder } });
|
|
194
209
|
}
|
|
195
210
|
}
|
|
196
211
|
else {
|
|
@@ -292,4 +307,8 @@ export function asyncOperation() {
|
|
|
292
307
|
}
|
|
293
308
|
}, 50);
|
|
294
309
|
});
|
|
295
|
-
}
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
function cloneDeep(data: any) {
|
|
313
|
+
throw new Error("Function not implemented.");
|
|
314
|
+
}
|
|
@@ -236,11 +236,8 @@ export default (funcParams: funcParamsProps) => {
|
|
|
236
236
|
onKeyDown: function () {
|
|
237
237
|
this.callHandler("onKeyDown")
|
|
238
238
|
},
|
|
239
|
-
|
|
240
|
-
this.callHandler("
|
|
241
|
-
},
|
|
242
|
-
onDeletePopupYes: function () {
|
|
243
|
-
this.callHandler("onDeletePopupYes")
|
|
239
|
+
onFileDelete: async function () {
|
|
240
|
+
this.callHandler("onFileDelete")
|
|
244
241
|
},
|
|
245
242
|
onMount: function () {
|
|
246
243
|
this.callHandler("onMount")
|