impaktapps-ui-builder 0.0.382-alpha.334 → 0.0.382-alpha.336

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,8 +1,5 @@
1
1
  import { handlersProps } from "./interface";
2
- export declare const executeEvents: (params: handlersProps) => Promise<{
3
- response: any;
4
- events: any;
5
- }>;
2
+ export declare const executeEvents: (params: handlersProps) => Promise<any>;
6
3
  export declare function executeRefreshHandler(params: handlersProps): Promise<void>;
7
4
  export declare function buildApiPayload(compConfig: any, body: any, headers: any, store: any, dynamicData: any, userValue: any, service: any): Promise<{
8
5
  body: any;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "impaktapps-ui-builder",
3
- "version": "0.0.382-alpha.334",
3
+ "version": "0.0.382-alpha.336",
4
4
  "scripts": {
5
5
  "dev": "vite",
6
6
  "build": "tsc && vite build",
@@ -26,34 +26,26 @@ export const executeEvents = async (
26
26
  await executeEvents({ ...params, config: actionConfig, parentEventOutput: finalResponse })
27
27
  }
28
28
  }
29
- finalResponse;
29
+ return finalResponse;
30
30
  }
31
31
 
32
32
  async function executeEventsHandler(params: handlersProps) {
33
33
  if (params.config.Handler === "api") {
34
- const res = await executeApiEventHandler(params)
35
- const demoData = await asyncOperation();
36
- return res;
34
+ return await executeApiEventHandler(params)
37
35
  }
38
36
  else if (params.config.Handler === "inBuiltFunction") {
39
37
  return await executeInBuiltFunctionHandler(params)
40
38
  }
41
39
  else if (params.config.Handler === "custom") {
42
- const res = await executeCustomHandler(params)
43
- const demoData = await asyncOperation();
44
- return res;
40
+ return await executeCustomHandler(params)
45
41
  }
46
42
  else if (params.config.Handler === "refresh") {
47
- const res = await executeRefreshHandler(params)
48
- const demoData = await asyncOperation();
49
- return res;
43
+ return await executeRefreshHandler(params)
50
44
  }
51
45
  else if (params.config.Handler === "mergeFormdata") {
52
46
  const result = await mergeFormdata(
53
47
  params.parentEventOutput, params.componentName, params.config, params.store, params.service)
54
- const res = result;
55
- const demoData = await asyncOperation();
56
- return res;
48
+ return result;
57
49
  }
58
50
  else if (params.config.Handler === "onBackHandler") {
59
51
  return params.store.functionParameters?.handleBack()
@@ -135,7 +127,6 @@ async function mergeFormdata(handlerResponse: any, componentName: string, eventC
135
127
  else if (eventConfig.type === "page") {
136
128
  if (!(_.isEmpty(handlerResponse?.data) && handlerResponse?.data)) {
137
129
  store.setFormdata((pre: any) => { return { ...pre, ...handlerResponse?.data } })
138
- const demoData = await asyncOperation();
139
130
  }
140
131
  }
141
132
  else {
@@ -229,11 +229,12 @@ export default (funcParams: funcParamsProps) => {
229
229
  if (eventGroups?.[eventType]?.[path] !== undefined) {
230
230
  for (const eventConfig of eventGroups?.[eventType]?.[path]) {
231
231
  executeEventsParameters.store.functionParameters = functionParameters
232
- await executeEvents({
232
+ const res = await executeEvents({
233
233
  ...executeEventsParameters,
234
234
  config: eventConfig,
235
235
  componentName: path
236
236
  })
237
+ console.log("valll", res);
237
238
  }
238
239
  }
239
240
  },