impaktapps-ui-builder 0.0.340 → 0.0.342

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.
@@ -7316,7 +7316,7 @@ var Component = (store2, dynamicData2, submitHandler, service2) => {
7316
7316
  const path = (_a = store2.searchParams) == null ? void 0 : _a.get("path");
7317
7317
  console.log(store2.ctx.core.errors);
7318
7318
  if (_.isEmpty(store2.ctx.core.errors)) {
7319
- saveFormdataInLocalStorage(store2.formData, path);
7319
+ saveFormdataInLocalStorage(store2.ctx.core.data, path);
7320
7320
  store2.navigate(-1);
7321
7321
  store2.setNotify({
7322
7322
  SuccessMessage: "Save Successfully",
@@ -7333,7 +7333,9 @@ var Component = (store2, dynamicData2, submitHandler, service2) => {
7333
7333
  savePageHandler: async () => {
7334
7334
  var _a;
7335
7335
  const id = (_a = store2.searchParams) == null ? void 0 : _a.get("id");
7336
- const isSubmitted = await saveHandler(store2, service2, submitHandler);
7336
+ saveFormdataInLocalStorage(store2.ctx.core.data);
7337
+ const config = localStorage.getItem("pageFormdata");
7338
+ const isSubmitted = await saveHandler(store2, service2, submitHandler, config);
7337
7339
  if (isSubmitted) {
7338
7340
  localStorage.removeItem("pageFormdata");
7339
7341
  store2.navigate(`/PageMaster?id=${id}`);
@@ -7360,7 +7362,7 @@ var Component = (store2, dynamicData2, submitHandler, service2) => {
7360
7362
  const rowId = dynamicData2.path.split(".")[1];
7361
7363
  const path = (_a = store2.searchParams) == null ? void 0 : _a.get("path");
7362
7364
  const id = (_b = store2.searchParams) == null ? void 0 : _b.get("id");
7363
- saveFormdataInLocalStorage(store2.formData, path);
7365
+ saveFormdataInLocalStorage(store2.ctx.core.data, path);
7364
7366
  if (path) {
7365
7367
  const path2 = (_c = store2.searchParams) == null ? void 0 : _c.get("path");
7366
7368
  const finalPath = `${path2}.elements[${rowId}]`;
@@ -7376,7 +7378,7 @@ var Component = (store2, dynamicData2, submitHandler, service2) => {
7376
7378
  const path = (_a = store2.searchParams) == null ? void 0 : _a.get("path");
7377
7379
  const rowId = dynamicData2.path.split(".")[1];
7378
7380
  store2.formData.elements.splice(rowId, 1);
7379
- const response2 = saveFormdataInLocalStorage(store2.formData, path);
7381
+ const response2 = saveFormdataInLocalStorage(store2.ctx.core.data, path);
7380
7382
  const data2 = path ? _.get(response2, path) : response2;
7381
7383
  store2.setFormdata(data2);
7382
7384
  },
@@ -7385,7 +7387,7 @@ var Component = (store2, dynamicData2, submitHandler, service2) => {
7385
7387
  const path = (_a = store2.searchParams) == null ? void 0 : _a.get("path");
7386
7388
  const rowId = dynamicData2.path.split(".")[1];
7387
7389
  store2.formData.events.splice(rowId, 1);
7388
- const response2 = saveFormdataInLocalStorage(store2.formData, path);
7390
+ const response2 = saveFormdataInLocalStorage(store2.ctx.core.data, path);
7389
7391
  store2.setFormdata(_.get(response2, path));
7390
7392
  },
7391
7393
  widgetAddClickHandler: async function() {
@@ -7394,7 +7396,7 @@ var Component = (store2, dynamicData2, submitHandler, service2) => {
7394
7396
  store2.formData.elements = [];
7395
7397
  }
7396
7398
  const path = (_a = store2.searchParams) == null ? void 0 : _a.get("path");
7397
- saveFormdataInLocalStorage(store2.formData, path);
7399
+ saveFormdataInLocalStorage(store2.ctx.core.data, path);
7398
7400
  const finalPath = `${path}.elements[${store2.formData.elements.length}]`;
7399
7401
  store2.searchParams.set("path", finalPath);
7400
7402
  store2.setSearchParams(store2.searchParams);
@@ -7405,7 +7407,7 @@ var Component = (store2, dynamicData2, submitHandler, service2) => {
7405
7407
  const rowId = dynamicData2.path.split(".")[1];
7406
7408
  const path = (_a = store2.searchParams) == null ? void 0 : _a.get("path");
7407
7409
  const id = (_b = store2.searchParams) == null ? void 0 : _b.get("id");
7408
- saveFormdataInLocalStorage(store2.formData, path);
7410
+ saveFormdataInLocalStorage(store2.ctx.core.data, path);
7409
7411
  const finalPath = `${path}.events[${rowId}]`;
7410
7412
  store2.navigate(`/ComponentEvents?path=${finalPath}&id=${id}`);
7411
7413
  },
@@ -7416,7 +7418,7 @@ var Component = (store2, dynamicData2, submitHandler, service2) => {
7416
7418
  if (!Array.isArray(store2.formData.events)) {
7417
7419
  store2.formData.events = [];
7418
7420
  }
7419
- saveFormdataInLocalStorage(store2.formData, path);
7421
+ saveFormdataInLocalStorage(store2.ctx.core.data, path);
7420
7422
  const finalPath = `${path}.events[${store2.formData.events.length}]`;
7421
7423
  store2.navigate(`/ComponentEvents?path=${finalPath}&id=${id}`);
7422
7424
  },
@@ -7425,11 +7427,11 @@ var Component = (store2, dynamicData2, submitHandler, service2) => {
7425
7427
  }
7426
7428
  };
7427
7429
  };
7428
- async function saveHandler(store2, service2, submitHandler) {
7430
+ async function saveHandler(store2, service2, submitHandler, config) {
7429
7431
  let isTrue = false;
7430
7432
  if (_.isEmpty(store2.ctx.core.errors)) {
7431
7433
  try {
7432
- const saveReturn = await submitHandler(store2, service2);
7434
+ const saveReturn = await submitHandler(store2, service2, config);
7433
7435
  isTrue = true;
7434
7436
  } catch (err) {
7435
7437
  isTrue = false;
@@ -7474,13 +7476,15 @@ var pageMaster = (funcParams) => {
7474
7476
  if (!Array.isArray(store2.formData.elements)) {
7475
7477
  store2.formData.elements = [];
7476
7478
  }
7477
- const response2 = saveFormdataInLocalStorage(store2.formData);
7479
+ const response2 = saveFormdataInLocalStorage(store2.ctx.core.data);
7478
7480
  store2.navigate(
7479
7481
  `/Component?path=${`elements[${response2 == null ? void 0 : response2.elements.length}]`}&id=${id}`
7480
7482
  );
7481
7483
  },
7482
7484
  savePageHandler: async () => {
7483
- const isSubmitted = await saveHandler(store2, service2, submitHandler);
7485
+ saveFormdataInLocalStorage(store2.ctx.core.data);
7486
+ const config2 = localStorage.getItem("pageFormdata");
7487
+ const isSubmitted = await saveHandler(store2, service2, submitHandler, config2);
7484
7488
  if (isSubmitted) {
7485
7489
  localStorage.removeItem("pageFormdata");
7486
7490
  store2.navigate("/PageMasterRecords");
@@ -7504,7 +7508,7 @@ var pageMaster = (funcParams) => {
7504
7508
  if (!Array.isArray(store2.formData.events)) {
7505
7509
  store2.formData.events = [];
7506
7510
  }
7507
- saveFormdataInLocalStorage(store2.formData);
7511
+ saveFormdataInLocalStorage(store2.ctx.core.data);
7508
7512
  const finalPath = `events[${store2.formData.events.length}]`;
7509
7513
  store2.navigate(`/ComponentEvents?path=${finalPath}&id=${id}`);
7510
7514
  },
@@ -7512,14 +7516,14 @@ var pageMaster = (funcParams) => {
7512
7516
  var _a;
7513
7517
  const rowId = dynamicData2.path.split(".")[1];
7514
7518
  const id = (_a = store2.searchParams) == null ? void 0 : _a.get("id");
7515
- saveFormdataInLocalStorage(store2.formData);
7519
+ saveFormdataInLocalStorage(store2.ctx.core.data);
7516
7520
  const finalPath = `events[${rowId}]`;
7517
7521
  store2.navigate(`/ComponentEvents?path=${finalPath}&id=${id}`);
7518
7522
  },
7519
7523
  deleteEvent: async function() {
7520
7524
  const rowId = dynamicData2.path.split(".")[1];
7521
7525
  store2.formData.events.splice(rowId, 1);
7522
- const response2 = saveFormdataInLocalStorage(store2.formData);
7526
+ const response2 = saveFormdataInLocalStorage(store2.ctx.core.data);
7523
7527
  store2.setFormdata(response2);
7524
7528
  }
7525
7529
  };
@@ -8132,7 +8136,9 @@ var event = (store2, dynamicData2, submitHandler, service2) => {
8132
8136
  savePageHandler: async () => {
8133
8137
  var _a;
8134
8138
  const id = (_a = store2.searchParams) == null ? void 0 : _a.get("id");
8135
- const isSubmitted = await saveHandler(store2, service2, submitHandler);
8139
+ saveFormdataInLocalStorage(store2.ctx.core.data);
8140
+ const config = localStorage.getItem("pageFormdata");
8141
+ const isSubmitted = await saveHandler(store2, service2, submitHandler, config);
8136
8142
  if (isSubmitted) {
8137
8143
  localStorage.removeItem("pageFormdata");
8138
8144
  store2.navigate(`/PageMaster?id=${id}`);
@@ -8161,7 +8167,7 @@ var event = (store2, dynamicData2, submitHandler, service2) => {
8161
8167
  if (!Array.isArray(store2.formData.events)) {
8162
8168
  store2.formData.events = [];
8163
8169
  }
8164
- saveFormdataInLocalStorage(store2.formData, path);
8170
+ saveFormdataInLocalStorage(store2.ctx.core.data, path);
8165
8171
  const finalPath = `${path}.events[${(_c = (_b = store2.formData) == null ? void 0 : _b.events) == null ? void 0 : _c.length}]`;
8166
8172
  store2.searchParams.set("path", finalPath);
8167
8173
  store2.setSearchParams(store2.searchParams);
@@ -8171,7 +8177,7 @@ var event = (store2, dynamicData2, submitHandler, service2) => {
8171
8177
  var _a;
8172
8178
  const rowId = dynamicData2.path.split(".")[1];
8173
8179
  const path = (_a = store2.searchParams) == null ? void 0 : _a.get("path");
8174
- saveFormdataInLocalStorage(store2.formData, path);
8180
+ saveFormdataInLocalStorage(store2.ctx.core.data, path);
8175
8181
  const finalPath = `${path}.events[${rowId}]`;
8176
8182
  store2.searchParams.set("path", finalPath);
8177
8183
  store2.setSearchParams(store2.searchParams);