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.
@@ -12,8 +12,7 @@ declare const _default: (funcParams: funcParamsProps) => {
12
12
  onCellRenderer: (cellParams: any) => {};
13
13
  onClick: () => void;
14
14
  onKeyDown: () => void;
15
- onDeletePopupNo: () => void;
16
- onDeletePopupYes: () => void;
15
+ onFileDelete: () => Promise<void>;
17
16
  onMount: () => void;
18
17
  onFileDownload: () => void;
19
18
  onFileUpload: () => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "impaktapps-ui-builder",
3
- "version": "1.0.57",
3
+ "version": "1.0.59-flcikering.0.1",
4
4
  "scripts": {
5
5
  "dev": "vite",
6
6
  "build": "tsc && vite build",
@@ -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
- { title: "PopUP NO Event", const: "onDeletePopupNo" },
56
- { title: "PopUP Yes Event", const: "onDeletePopupYes" },
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
- formDataHolder[componentName] = handlerResponse.data?.data
192
- formDataHolder[`${componentName}_RowCount`] = handlerResponse.data?.meta?.totalRowCount
193
- store.setFormdata((pre) => { return { ...pre, ...formDataHolder } });
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
- onDeletePopupNo: function () {
240
- this.callHandler("onDeletePopupNo")
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")