impaktapps-ui-builder 1.0.58 → 1.0.59-flcikering.0.2

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.
@@ -4795,7 +4795,7 @@ var lodash = { exports: {} };
4795
4795
  customizer = typeof customizer == "function" ? customizer : undefined$1;
4796
4796
  return baseClone(value, CLONE_SYMBOLS_FLAG, customizer);
4797
4797
  }
4798
- function cloneDeep(value) {
4798
+ function cloneDeep2(value) {
4799
4799
  return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);
4800
4800
  }
4801
4801
  function cloneDeepWith(value, customizer) {
@@ -5921,7 +5921,7 @@ var lodash = { exports: {} };
5921
5921
  lodash2.ceil = ceil;
5922
5922
  lodash2.clamp = clamp;
5923
5923
  lodash2.clone = clone;
5924
- lodash2.cloneDeep = cloneDeep;
5924
+ lodash2.cloneDeep = cloneDeep2;
5925
5925
  lodash2.cloneDeepWith = cloneDeepWith;
5926
5926
  lodash2.cloneWith = cloneWith;
5927
5927
  lodash2.conformsTo = conformsTo;
@@ -10117,7 +10117,7 @@ function executeCustomHandler(params) {
10117
10117
  }
10118
10118
  }
10119
10119
  function mergeFormdata(handlerResponse, componentName, eventConfig, store2, service2, formDataHolder) {
10120
- var _a, _b, _c;
10120
+ var _a, _b, _c, _d, _e;
10121
10121
  if (eventConfig.type === "Select" && (handlerResponse == null ? void 0 : handlerResponse.data)) {
10122
10122
  if (!_.isEmpty(handlerResponse == null ? void 0 : handlerResponse.data)) {
10123
10123
  store2.setSchema((pre) => {
@@ -10155,28 +10155,39 @@ function mergeFormdata(handlerResponse, componentName, eventConfig, store2, serv
10155
10155
  }
10156
10156
  } else if (eventConfig.type === "page") {
10157
10157
  if (!(_.isEmpty(handlerResponse == null ? void 0 : handlerResponse.data) && (handlerResponse == null ? void 0 : handlerResponse.data))) {
10158
+ const clonedData = _.cloneDeep(handlerResponse.data);
10158
10159
  store2.newData = {
10159
10160
  ...store2.newData,
10160
- ...handlerResponse == null ? void 0 : handlerResponse.data
10161
+ ...clonedData
10161
10162
  };
10162
- store2.setFormdata((pre) => {
10163
- return { ...pre, ...handlerResponse == null ? void 0 : handlerResponse.data };
10164
- });
10163
+ store2.setFormdata((prev) => ({
10164
+ ...prev,
10165
+ ...clonedData
10166
+ }));
10165
10167
  }
10166
10168
  } else if (eventConfig.type === "Table" && eventConfig.lazyLoading) {
10169
+ console.log("eventConfig.type === Table >>", handlerResponse);
10167
10170
  if (handlerResponse && (handlerResponse == null ? void 0 : handlerResponse.data)) {
10168
- formDataHolder[componentName] = (_a = handlerResponse.data) == null ? void 0 : _a.data;
10169
- formDataHolder[`${componentName}_RowCount`] = (_c = (_b = handlerResponse.data) == null ? void 0 : _b.meta) == null ? void 0 : _c.totalRowCount;
10170
- store2.setFormdata((pre) => {
10171
- return { ...pre, ...formDataHolder };
10171
+ const tableData = Array.isArray((_a = handlerResponse.data) == null ? void 0 : _a.data) ? cloneDeep(handlerResponse.data.data) : cloneDeep((_b = handlerResponse.data) == null ? void 0 : _b.data);
10172
+ const rowCount = (_e = (_d = (_c = handlerResponse.data) == null ? void 0 : _c.meta) == null ? void 0 : _d.totalRowCount) != null ? _e : null;
10173
+ const newFormDataHolder = {
10174
+ ...formDataHolder,
10175
+ [componentName]: tableData,
10176
+ [`${componentName}_RowCount`]: rowCount
10177
+ };
10178
+ store2.setFormdata((prev) => {
10179
+ return { ...prev, ...newFormDataHolder };
10172
10180
  });
10173
10181
  }
10174
10182
  } else {
10175
10183
  if (handlerResponse) {
10176
- formDataHolder[componentName] = handlerResponse.data;
10177
- store2.setFormdata((pre) => {
10178
- return { ...pre, ...formDataHolder };
10179
- });
10184
+ console.log("else part >>", handlerResponse);
10185
+ const clonedData = _.cloneDeep(handlerResponse.data);
10186
+ const newFormDataHolder = {
10187
+ ...formDataHolder,
10188
+ [componentName]: clonedData
10189
+ };
10190
+ store2.setFormdata((prev) => ({ ...prev, ...newFormDataHolder }));
10180
10191
  }
10181
10192
  }
10182
10193
  }
@@ -10255,6 +10266,9 @@ function buildApiPayload(compConfig, body, headers, store, dynamicData, userValu
10255
10266
  }
10256
10267
  return promiseChain;
10257
10268
  }
10269
+ function cloneDeep(data) {
10270
+ throw new Error("Function not implemented.");
10271
+ }
10258
10272
  let compType;
10259
10273
  let eventGroups = {};
10260
10274
  const notifyUiSchema = {
@@ -10500,7 +10514,7 @@ var service = (funcParams) => {
10500
10514
  onKeyDown: function() {
10501
10515
  this.callHandler("onKeyDown");
10502
10516
  },
10503
- onFileDelete: function() {
10517
+ onFileDelete: async function() {
10504
10518
  this.callHandler("onFileDelete");
10505
10519
  },
10506
10520
  onMount: function() {