impaktapps-ui-builder 0.0.382-alpha.330 → 0.0.382-alpha.332

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "impaktapps-ui-builder",
3
- "version": "0.0.382-alpha.330",
3
+ "version": "0.0.382-alpha.332",
4
4
  "scripts": {
5
5
  "dev": "vite",
6
6
  "build": "tsc && vite build",
@@ -31,21 +31,29 @@ export const executeEvents = async (
31
31
 
32
32
  async function executeEventsHandler(params: handlersProps) {
33
33
  if (params.config.Handler === "api") {
34
- return await executeApiEventHandler(params)
34
+ const res = await executeApiEventHandler(params)
35
+ const demoData = await asyncOperation();
36
+ return res;
35
37
  }
36
38
  else if (params.config.Handler === "inBuiltFunction") {
37
39
  return await executeInBuiltFunctionHandler(params)
38
40
  }
39
41
  else if (params.config.Handler === "custom") {
40
- return await executeCustomHandler(params)
42
+ const res = await executeCustomHandler(params)
43
+ const demoData = await asyncOperation();
44
+ return res;
41
45
  }
42
46
  else if (params.config.Handler === "refresh") {
43
- return await executeRefreshHandler(params)
47
+ const res = await executeRefreshHandler(params)
48
+ const demoData = await asyncOperation();
49
+ return res;
44
50
  }
45
51
  else if (params.config.Handler === "mergeFormdata") {
46
52
  const result = await mergeFormdata(
47
53
  params.parentEventOutput, params.componentName, params.config, params.store, params.service)
48
- return result;
54
+ const res = result;
55
+ const demoData = await asyncOperation();
56
+ return res;
49
57
  }
50
58
  else if (params.config.Handler === "onBackHandler") {
51
59
  return params.store.functionParameters?.handleBack()
@@ -127,6 +135,7 @@ async function mergeFormdata(handlerResponse: any, componentName: string, eventC
127
135
  else if (eventConfig.type === "page") {
128
136
  if (!(_.isEmpty(handlerResponse?.data) && handlerResponse?.data)) {
129
137
  store.setFormdata((pre: any) => { return { ...pre, ...handlerResponse?.data } })
138
+ const demoData = await asyncOperation();
130
139
  }
131
140
  }
132
141
  else {
@@ -221,6 +230,6 @@ function asyncOperation() {
221
230
  resolve("Operation completed successfully!");
222
231
  reject(new Error("Operation failed!"));
223
232
  }
224
- }, 50);
233
+ }, 400);
225
234
  });
226
235
  }
@@ -88,14 +88,14 @@ export default (funcParams: funcParamsProps) => {
88
88
  eventGroups,
89
89
  };
90
90
 
91
- // Create a debounced version of executeEvents
91
+
92
92
  const debouncedExecuteEvents = debounce(async (eventConfig: any, componentName: string) => {
93
93
  await executeEvents({
94
94
  ...executeEventsParameters,
95
95
  config: eventConfig,
96
96
  componentName,
97
97
  });
98
- }, 300); // Adjust the debounce delay (300ms) as needed
98
+ }, 3000);
99
99
 
100
100
  return {
101
101
  setPage: async function () {