impaktapps-ui-builder 0.0.282 → 0.0.284

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,7 +1,4 @@
1
- export declare const executeEvents: (config: any, componentName: string, store: any, dynamicData: any, userValue: any, service: any, serviceHolder: any, eventGroups?: any, parentEventOutput?: any) => Promise<{
2
- response: any;
3
- events: any;
4
- }>;
1
+ export declare const executeEvents: (config: any, componentName: string, store: any, dynamicData: any, userValue: any, service: any, serviceHolder: any, eventGroups?: any, parentEventOutput?: any) => Promise<any>;
5
2
  export declare function buildApiPayload(compConfig: any, body: any, headers: any, store: any, dynamicData: any, userValue: any, service: any): Promise<{
6
3
  body: any;
7
4
  headers: any;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "impaktapps-ui-builder",
3
- "version": "0.0.282",
3
+ "version": "0.0.284",
4
4
  "scripts": {
5
5
  "dev": "vite",
6
6
  "build": "tsc && vite build",
@@ -18,6 +18,9 @@ export const buildTable = (config: any, componentScope: string) => {
18
18
  if (config.DragAvailable) {
19
19
  table.config.main.enableDrag = config.DragAvailable === "YES" ? true : false
20
20
  };
21
+ if (config.selectKey) {
22
+ table.config.main.selectKey = config.selectKey
23
+ }
21
24
  return table;
22
25
  }
23
26
 
@@ -36,6 +39,9 @@ export const buildLazyLoadingTable = (config: any, componentScope: string) => {
36
39
  if (config.DragAvailable) {
37
40
  table.config.main.enableDrag = config.DragAvailable === "YES" ? true : false
38
41
  };
42
+ if (config.selectKey) {
43
+ table.config.main.selectKey = config.selectKey
44
+ }
39
45
  table.config.main.label = config.label;
40
46
  return table;
41
47
  }
@@ -253,7 +253,7 @@ export const buildPropertiesSection = function (type: String) {
253
253
  getRadioInputField("SelectionAvailable","Selection Available",["YES","NO"]),
254
254
  getRadioInputField("ColumnResizingAvailable","ColumnResizing Available",["YES","NO"]),
255
255
  getRadioInputField("DragAvailable","Drag Available",["YES","NO"]),
256
- EmptyBox
256
+ getInputField("selectKey","Selection Key")
257
257
  ]
258
258
  }
259
259
  else if (type === "Radio") {
@@ -12,6 +12,9 @@ export const executeEvents = async (
12
12
  const { response, events } = await executetOnLoadEvent(config, componentName,
13
13
  store, dynamicData, userValue,
14
14
  service, serviceHolder, eventGroups, parentEventOutput)
15
+ if (config.returnResponse) {
16
+ return response;
17
+ }
15
18
  LoadResponse = response;
16
19
  nextEvent = events;
17
20
  }
@@ -48,6 +51,9 @@ const executetOnLoadEvent = async (
48
51
  const { response } = await executeEventsHandler(config, componentName,
49
52
  store, dynamicData, userValue,
50
53
  service, serviceHolder, eventGroups, parentEventOutput)
54
+ if(config.returnResponse){
55
+ return {response}
56
+ }
51
57
  const SuccessEvent = config?.events.filter(e => e.eventType === "Success")
52
58
  const setEvent = SuccessEvent.length > 0 ? SuccessEvent : [{ Handler: "mergeFormdata", eventType: "Success", type: config.type }]
53
59
  return { response, events: setEvent };
@@ -124,6 +130,9 @@ async function executeApiEventHandler(apiHandlerConfig: any, componentName: stri
124
130
  body,
125
131
  headers && { headers: headers }
126
132
  );
133
+ if(apiHandlerConfig.returnResponse){
134
+ return {response}
135
+ }
127
136
  return { response, events: apiHandlerConfig?.events };;
128
137
  }
129
138
 
@@ -162,9 +171,6 @@ async function mergeFormdata(handlerResponse: any, componentName: string, eventC
162
171
  }
163
172
  })
164
173
  }
165
- else if (eventConfig.type === "LazyLoadingTable") {
166
- store.setFormdata((pre) => { return { ...pre, [`${componentName}Backend`]: handlerResponse } });
167
- }
168
174
  else if (eventConfig.type === "page") {
169
175
  store.setFormdata((pre: any) => { return { ...pre, ...handlerResponse?.data } })
170
176
  }
@@ -85,11 +85,15 @@ export default (funcParams: funcParamsProps) => {
85
85
  {key:"globalFilter",value: paginationValues.globalFilter ?? ''}
86
86
  ]
87
87
  if (eventConfig.body) {
88
+ eventConfig.returnResponse = true
88
89
  eventConfig.body = [
89
90
  ...eventConfig.body,
90
91
  ...bodyValues
91
92
  ]
92
- } else { eventConfig.body = bodyValues; };
93
+ } else {
94
+ eventConfig.returnResponse = true
95
+ eventConfig.body = bodyValues;
96
+ };
93
97
  await executeEvents(
94
98
  eventConfig, paginationValues.path,
95
99
  funcParams.store, funcParams.dynamicData, funcParams.userValue, funcParams.service,