impaktapps-ui-builder 0.0.341 → 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.
@@ -1,4 +1,4 @@
1
- export declare function saveHandler(store: any, service: any, submitHandler: any): Promise<boolean>;
1
+ export declare function saveHandler(store: any, service: any, submitHandler: any, config: any): Promise<boolean>;
2
2
  interface funcParamsProps {
3
3
  store: any;
4
4
  dynamicData: any;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "impaktapps-ui-builder",
3
- "version": "0.0.341",
3
+ "version": "0.0.342",
4
4
  "scripts": {
5
5
  "dev": "vite",
6
6
  "build": "tsc && vite build",
@@ -97,7 +97,9 @@ export default (store: any, dynamicData: any, submitHandler: any, service: any)
97
97
  },
98
98
  savePageHandler: async () => {
99
99
  const id = store.searchParams?.get("id");
100
- const isSubmitted = await saveHandler(store, service, submitHandler);
100
+ saveFormdataInLocalStorage(store.ctx.core.data);
101
+ const config = localStorage.getItem("pageFormdata");
102
+ const isSubmitted = await saveHandler(store, service, submitHandler,config);
101
103
  if (isSubmitted) {
102
104
  localStorage.removeItem("pageFormdata");
103
105
  store.navigate(`/PageMaster?id=${id}`);
@@ -60,7 +60,9 @@ export default (
60
60
  },
61
61
  savePageHandler: async () => {
62
62
  const id = store.searchParams?.get("id");
63
- const isSubmitted = await saveHandler(store, service, submitHandler);
63
+ saveFormdataInLocalStorage(store.ctx.core.data);
64
+ const config = localStorage.getItem("pageFormdata");
65
+ const isSubmitted = await saveHandler(store, service, submitHandler,config);
64
66
  if (isSubmitted) {
65
67
  localStorage.removeItem("pageFormdata");
66
68
  store.navigate(`/PageMaster?id=${id}`);
@@ -5,11 +5,11 @@ import Component from "./component";
5
5
  import { getFormdataFromLocalStorage, saveFormdataInLocalStorage } from "./saveHandler";
6
6
  import { schema } from "../build/buildUiSchema";
7
7
 
8
- export async function saveHandler(store, service, submitHandler) {
8
+ export async function saveHandler(store, service, submitHandler, config) {
9
9
  let isTrue = false;
10
10
  if (_.isEmpty(store.ctx.core.errors)) {
11
11
  try {
12
- const saveReturn = await submitHandler(store, service);
12
+ const saveReturn = await submitHandler(store, service,config);
13
13
  isTrue = true;
14
14
  } catch (err) {
15
15
  isTrue = false;
@@ -66,7 +66,9 @@ export default (funcParams: funcParamsProps) => {
66
66
  );
67
67
  },
68
68
  savePageHandler: async () => {
69
- const isSubmitted = await saveHandler(store, service, submitHandler);
69
+ saveFormdataInLocalStorage(store.ctx.core.data);
70
+ const config = localStorage.getItem("pageFormdata");
71
+ const isSubmitted = await saveHandler(store, service, submitHandler,config);
70
72
  if (isSubmitted) {
71
73
  localStorage.removeItem("pageFormdata");
72
74
  store.navigate('/PageMasterRecords');