impaktapps-ui-builder 1.0.4 → 1.0.6

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.
Files changed (122) hide show
  1. package/dist/impaktapps-ui-builder.es.js +2268 -1162
  2. package/dist/impaktapps-ui-builder.es.js.map +1 -1
  3. package/dist/impaktapps-ui-builder.umd.js +15 -15
  4. package/dist/impaktapps-ui-builder.umd.js.map +1 -1
  5. package/dist/src/impaktapps-ui-builder/builder/build/buildAreaGraph.d.ts +2 -0
  6. package/dist/src/impaktapps-ui-builder/builder/build/buildArray.d.ts +1 -11
  7. package/dist/src/impaktapps-ui-builder/builder/build/buildCamera.d.ts +1 -0
  8. package/dist/src/impaktapps-ui-builder/builder/build/buildConfig.d.ts +2 -1
  9. package/dist/src/impaktapps-ui-builder/builder/build/buildGroupButton.d.ts +1 -0
  10. package/dist/src/impaktapps-ui-builder/builder/build/buildHorizontalLayout.d.ts +1 -0
  11. package/dist/src/impaktapps-ui-builder/builder/build/buildImage.d.ts +1 -0
  12. package/dist/src/impaktapps-ui-builder/builder/build/buildMetricCard.d.ts +1 -0
  13. package/dist/src/impaktapps-ui-builder/builder/build/buildOTP_inputs.d.ts +1 -0
  14. package/dist/src/impaktapps-ui-builder/builder/build/buildPdfViewer.d.ts +1 -0
  15. package/dist/src/impaktapps-ui-builder/builder/build/buildPopover.d.ts +1 -0
  16. package/dist/src/impaktapps-ui-builder/builder/build/buildStackBarLineGraph.d.ts +2 -0
  17. package/dist/src/impaktapps-ui-builder/builder/build/buildUiSchema.d.ts +2 -1
  18. package/dist/src/impaktapps-ui-builder/builder/build/uischema/apiSection.d.ts +1 -3
  19. package/dist/src/impaktapps-ui-builder/builder/build/uischema/box.d.ts +10 -2
  20. package/dist/src/impaktapps-ui-builder/builder/build/uischema/buildPropertiesSection.d.ts +1 -1
  21. package/dist/src/impaktapps-ui-builder/builder/build/uischema/button.d.ts +6 -1
  22. package/dist/src/impaktapps-ui-builder/builder/build/uischema/buttonGroup.d.ts +22 -0
  23. package/dist/src/impaktapps-ui-builder/builder/build/uischema/card.d.ts +173 -171
  24. package/dist/src/impaktapps-ui-builder/builder/build/uischema/coreSection.d.ts +82 -72
  25. package/dist/src/impaktapps-ui-builder/builder/build/uischema/eventSection.d.ts +18 -50
  26. package/dist/src/impaktapps-ui-builder/builder/build/uischema/graph.d.ts +50 -4
  27. package/dist/src/impaktapps-ui-builder/builder/build/uischema/horizontalLayout.d.ts +13 -0
  28. package/dist/src/impaktapps-ui-builder/builder/build/uischema/metricCard.d.ts +17 -0
  29. package/dist/src/impaktapps-ui-builder/builder/build/uischema/multiSelect.d.ts +1 -0
  30. package/dist/src/impaktapps-ui-builder/builder/build/uischema/pdfViewer.d.ts +19 -0
  31. package/dist/src/impaktapps-ui-builder/builder/build/uischema/refresh.d.ts +0 -3
  32. package/dist/src/impaktapps-ui-builder/builder/build/uischema/selectInputField.d.ts +1 -0
  33. package/dist/src/impaktapps-ui-builder/builder/build/uischema/table.d.ts +1 -0
  34. package/dist/src/impaktapps-ui-builder/builder/build/uischema/tableSection.d.ts +15 -66
  35. package/dist/src/impaktapps-ui-builder/builder/build/uischema/validationSections.d.ts +48 -38
  36. package/dist/src/impaktapps-ui-builder/builder/build/uischema/valueTab.d.ts +0 -3
  37. package/dist/src/impaktapps-ui-builder/builder/build/uischema/wrapperSection.d.ts +4 -1
  38. package/dist/src/impaktapps-ui-builder/builder/services/utils.d.ts +2 -1
  39. package/dist/src/impaktapps-ui-builder/lib/index.d.ts +1 -0
  40. package/dist/src/impaktapps-ui-builder/runtime/services/downloadFile.d.ts +5 -2
  41. package/dist/src/impaktapps-ui-builder/runtime/services/service.d.ts +10 -4
  42. package/package.json +1 -1
  43. package/src/impaktapps-ui-builder/builder/build/buildAadharCard.ts +2 -2
  44. package/src/impaktapps-ui-builder/builder/build/buildAreaGraph.ts +66 -0
  45. package/src/impaktapps-ui-builder/builder/build/buildArray.ts +35 -15
  46. package/src/impaktapps-ui-builder/builder/build/buildButton.ts +1 -1
  47. package/src/impaktapps-ui-builder/builder/build/buildCamera.ts +50 -0
  48. package/src/impaktapps-ui-builder/builder/build/buildCard.ts +10 -10
  49. package/src/impaktapps-ui-builder/builder/build/buildCheckbox.ts +1 -1
  50. package/src/impaktapps-ui-builder/builder/build/buildConfig.ts +34 -16
  51. package/src/impaktapps-ui-builder/builder/build/buildDataGrid.ts +2 -2
  52. package/src/impaktapps-ui-builder/builder/build/buildDate.ts +35 -13
  53. package/src/impaktapps-ui-builder/builder/build/buildDownloadFile.ts +7 -0
  54. package/src/impaktapps-ui-builder/builder/build/buildEmptyBox.ts +1 -0
  55. package/src/impaktapps-ui-builder/builder/build/buildFileInput.ts +42 -28
  56. package/src/impaktapps-ui-builder/builder/build/buildGroupButton.ts +24 -0
  57. package/src/impaktapps-ui-builder/builder/build/buildHorizontalBarGraph.ts +10 -4
  58. package/src/impaktapps-ui-builder/builder/build/buildHorizontalLayout.ts +15 -0
  59. package/src/impaktapps-ui-builder/builder/build/buildImage.ts +38 -0
  60. package/src/impaktapps-ui-builder/builder/build/buildLabel.ts +3 -0
  61. package/src/impaktapps-ui-builder/builder/build/buildLeaderboard.ts +4 -1
  62. package/src/impaktapps-ui-builder/builder/build/buildLineGraph.ts +10 -4
  63. package/src/impaktapps-ui-builder/builder/build/buildMetricCard.tsx +37 -0
  64. package/src/impaktapps-ui-builder/builder/build/buildMultiSelect.ts +12 -0
  65. package/src/impaktapps-ui-builder/builder/build/buildOTP_inputs.ts +44 -0
  66. package/src/impaktapps-ui-builder/builder/build/buildPdfViewer.ts +16 -0
  67. package/src/impaktapps-ui-builder/builder/build/buildPieGraph.ts +7 -4
  68. package/src/impaktapps-ui-builder/builder/build/buildPop.ts +3 -2
  69. package/src/impaktapps-ui-builder/builder/build/buildPopover.ts +40 -0
  70. package/src/impaktapps-ui-builder/builder/build/buildProgressBar.ts +31 -21
  71. package/src/impaktapps-ui-builder/builder/build/buildRadio.ts +11 -3
  72. package/src/impaktapps-ui-builder/builder/build/buildSelect.ts +12 -0
  73. package/src/impaktapps-ui-builder/builder/build/buildStackBarGraph.ts +10 -4
  74. package/src/impaktapps-ui-builder/builder/build/buildStackBarLineGraph.ts +72 -0
  75. package/src/impaktapps-ui-builder/builder/build/buildTabSection.ts +5 -0
  76. package/src/impaktapps-ui-builder/builder/build/buildTable.ts +21 -11
  77. package/src/impaktapps-ui-builder/builder/build/buildText.ts +12 -0
  78. package/src/impaktapps-ui-builder/builder/build/buildTextArea.ts +2 -2
  79. package/src/impaktapps-ui-builder/builder/build/buildThoughtOfTheDay.ts +1 -1
  80. package/src/impaktapps-ui-builder/builder/build/buildTreeMap.ts +2 -1
  81. package/src/impaktapps-ui-builder/builder/build/buildUiSchema.ts +140 -130
  82. package/src/impaktapps-ui-builder/builder/build/buildUplaodFile.ts +6 -0
  83. package/src/impaktapps-ui-builder/builder/build/buildWrapperSection.ts +8 -3
  84. package/src/impaktapps-ui-builder/builder/build/uischema/apiSection.ts +0 -6
  85. package/src/impaktapps-ui-builder/builder/build/uischema/array.ts +1 -1
  86. package/src/impaktapps-ui-builder/builder/build/uischema/box.ts +5 -2
  87. package/src/impaktapps-ui-builder/builder/build/uischema/buildPropertiesSection.ts +396 -142
  88. package/src/impaktapps-ui-builder/builder/build/uischema/button.ts +1 -1
  89. package/src/impaktapps-ui-builder/builder/build/uischema/buttonGroup.ts +17 -0
  90. package/src/impaktapps-ui-builder/builder/build/uischema/card.ts +142 -169
  91. package/src/impaktapps-ui-builder/builder/build/uischema/coreSection.ts +127 -133
  92. package/src/impaktapps-ui-builder/builder/build/uischema/dateInputField.ts +2 -2
  93. package/src/impaktapps-ui-builder/builder/build/uischema/emptyBox.ts +1 -1
  94. package/src/impaktapps-ui-builder/builder/build/uischema/eventSection.ts +30 -54
  95. package/src/impaktapps-ui-builder/builder/build/uischema/file.ts +3 -3
  96. package/src/impaktapps-ui-builder/builder/build/uischema/graph.ts +37 -4
  97. package/src/impaktapps-ui-builder/builder/build/uischema/horizontalLayout.ts +11 -0
  98. package/src/impaktapps-ui-builder/builder/build/uischema/metricCard.ts +13 -0
  99. package/src/impaktapps-ui-builder/builder/build/uischema/multiSelect.ts +4 -2
  100. package/src/impaktapps-ui-builder/builder/build/uischema/pdfViewer.ts +18 -0
  101. package/src/impaktapps-ui-builder/builder/build/uischema/refresh.ts +0 -3
  102. package/src/impaktapps-ui-builder/builder/build/uischema/selectInputField.ts +3 -1
  103. package/src/impaktapps-ui-builder/builder/build/uischema/table.ts +1 -0
  104. package/src/impaktapps-ui-builder/builder/build/uischema/tableSection.ts +34 -60
  105. package/src/impaktapps-ui-builder/builder/build/uischema/textInputField.ts +1 -1
  106. package/src/impaktapps-ui-builder/builder/build/uischema/validationSections.ts +58 -113
  107. package/src/impaktapps-ui-builder/builder/build/uischema/valueTab.ts +0 -3
  108. package/src/impaktapps-ui-builder/builder/build/uischema/wrapperSection.ts +4 -1
  109. package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/schema.ts +228 -59
  110. package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/uiSchema.ts +121 -119
  111. package/src/impaktapps-ui-builder/builder/elements/UiSchema/PageMaster/schema.ts +1 -1
  112. package/src/impaktapps-ui-builder/builder/elements/UiSchema/PageMaster/uiSchema.ts +94 -106
  113. package/src/impaktapps-ui-builder/builder/elements/UiSchema/event/schema.ts +11 -5
  114. package/src/impaktapps-ui-builder/builder/elements/UiSchema/event/uiSchema.ts +31 -55
  115. package/src/impaktapps-ui-builder/builder/services/component.ts +173 -86
  116. package/src/impaktapps-ui-builder/builder/services/event.ts +3 -0
  117. package/src/impaktapps-ui-builder/builder/services/pageMaster.ts +18 -15
  118. package/src/impaktapps-ui-builder/builder/services/utils.ts +15 -3
  119. package/src/impaktapps-ui-builder/lib/index.ts +10 -9
  120. package/src/impaktapps-ui-builder/runtime/services/downloadFile.ts +33 -18
  121. package/src/impaktapps-ui-builder/runtime/services/events.ts +9 -11
  122. package/src/impaktapps-ui-builder/runtime/services/service.ts +121 -162
@@ -1,5 +1,5 @@
1
1
  import _, { isEmpty } from "lodash";
2
- import { doDownload, downloadFile } from "./downloadFile";
2
+ import { downloadFileFromUrl, downloadFile } from "./downloadFile";
3
3
  import { executeEvents, executeRefreshHandler } from "./events";
4
4
  import { handlersProps } from "./interface";
5
5
  let compType: string;
@@ -19,7 +19,8 @@ interface funcParamsProps {
19
19
  service: any,
20
20
  userValue: any,
21
21
  pageDataProvider: any,
22
- functionsProvider?: Record<string, any>
22
+ functionsProvider?: Record<string, any>,
23
+ initFormData?: any
23
24
  }
24
25
  let pageData: any = false;
25
26
  export const extractEvents = (eventConfig: any) => {
@@ -61,17 +62,17 @@ export const extractEvents = (eventConfig: any) => {
61
62
  return eventGroups;
62
63
  };
63
64
  export default (funcParams: funcParamsProps) => {
64
- const formDataHolder = {}
65
+ const formDataHolder = {};
65
66
  let executeEventsParameters: handlersProps = {
66
67
  config: {}, componentName: "",
67
68
  store: funcParams.store, dynamicData: funcParams.dynamicData, userValue: funcParams.userValue, service: funcParams.service,
68
- serviceHolder: { downloadFile, download: doDownload, ...funcParams.functionsProvider }, eventGroups,
69
+ serviceHolder: { downloadFile, download: downloadFileFromUrl, ...funcParams.functionsProvider }, eventGroups,
69
70
  functionsProvider: funcParams.functionsProvider, formDataHolder
70
71
  };
71
72
  return {
72
73
  setPage: async function () {
73
74
  funcParams.store.setAdditionalErrors([]);
74
- funcParams.store.setFormdata({});
75
+ funcParams.store.setFormdata(funcParams?.initFormData() || {});
75
76
  funcParams.store.setSchema({ type: "object", properties: {} });
76
77
  funcParams.store.newData = {};
77
78
  eventGroups = {};
@@ -79,129 +80,19 @@ export default (funcParams: funcParamsProps) => {
79
80
  const config = pageData?.config;
80
81
  const uiSchema = pageData?.uiSchema;
81
82
  const event = new CustomEvent('pageNameChanged', {
82
- detail: { pageName: config.label }
83
+ detail: { pageName: config.label, pageIconUrl: config.pageIconUrl, hasBackIcon: config.hasBackIcon === "NO" ? false : true }
83
84
  });
84
85
  window.dispatchEvent(event)
85
86
  const theme = funcParams?.store?.theme?.myTheme;
86
- uiSchema.elements.push(
87
- {
88
- type: "HorizontalLayout",
89
- config: {
90
- main: {
91
- direction: "row",
92
- },
93
- style: {
94
- flexDirection: "row",
95
- position: "absolute",
96
- bottom: 0,
97
- height: "fit-content",
98
- overflow: "hidden",
99
- zIndex: 1000,
100
- width: "inherit",
101
- },
102
- },
103
- elements: [
104
- {
105
- type: "Control",
106
- scope: "#/properties/FooterText",
107
- options: {
108
- widget: "Box",
109
- },
110
- config: {
111
- main: {
112
- heading: "Copywriter@ACT21.IO",
113
- },
114
- style: {
115
- color: theme?.palette?.text?.disabled || "#AFAFAF",
116
- fontSize: "11px",
117
- textAlign: "center",
118
- lineHeight: 2,
119
- width: "fit-content",
120
- left: "50%",
121
- position: "relative",
122
- margin: 0,
123
- flexGrow: 1,
124
- height: 0,
125
- transform: "translate(-50%, 0%)",
126
- },
127
- },
128
- },
129
- {
130
- type: "Control",
131
- scope: "#/properties/FooterBackIcon",
132
- options: {
133
- widget: "Box",
134
- },
135
- config: {
136
- main: {
137
- iconName: "PrevIcon",
138
- onClick: "backHandler",
139
- width: "fit-content",
140
- },
141
- style: {
142
- fill: theme?.palette?.primary?.main,
143
- width: 20,
144
- height: 0,
145
- top: 0,
146
- right: { xs: "12px", sm: "84px" },
147
- position: "absolute",
148
- fontSize: "12px",
149
- cursor: "pointer",
150
- ":hover": {
151
- fill: theme?.palette?.primary?.dark,
152
- },
153
- marginRight: "20px",
154
- },
155
- },
156
- },
157
- {
158
- type: "Control",
159
- scope: "#/properties/FooterBackHandlerText",
160
- options: {
161
- widget: "Box",
162
- },
163
- config: {
164
- main: {
165
- heading: "Previous Page",
166
- onClick: "backHandler",
167
- },
168
- style: {
169
- display: { xs: "none", sm: "flex" },
170
- textAlign: "left",
171
- lineHeight: 1,
172
- height: 0,
173
- width: "fit-content",
174
- color: theme?.palette?.primary?.main,
175
- fontSize: "12px",
176
- cursor: "pointer",
177
- marginLeft: "2px",
178
-
179
- top: 3,
180
- right: "12px",
181
- position: "absolute",
182
- ":hover": {
183
- color: theme?.palette?.primary?.dark,
184
- },
185
- marginRight: "4px",
186
- },
187
- },
188
- },
189
- ],
190
- }
191
- );
192
87
  const schema = pageData?.schema ?? { type: "object", properties: {} };
193
88
  eventGroups = extractEvents(config);
194
89
  executeEventsParameters = {
195
90
  config: {}, componentName: "",
196
91
  store: funcParams.store, dynamicData: funcParams.dynamicData, userValue: funcParams.userValue, service: funcParams.service,
197
92
  functionsProvider: funcParams.functionsProvider,
198
- serviceHolder: this, eventGroups, formDataHolder
93
+ serviceHolder: this, eventGroups, formDataHolder,
199
94
  }
200
- await executeRefreshHandler({
201
- config: {}, componentName: "",
202
- store: funcParams.store, dynamicData: funcParams.dynamicData, userValue: funcParams.userValue, service: funcParams.service,
203
- serviceHolder: this, eventGroups, formDataHolder: {}
204
- })
95
+
205
96
  funcParams.store.setSchema(
206
97
  (pre: any) => {
207
98
  return {
@@ -210,29 +101,66 @@ export default (funcParams: funcParamsProps) => {
210
101
  }
211
102
  }
212
103
  )
213
- uiSchema.elements.push(notifyUiSchema);
214
- funcParams.store.setUiSchema(uiSchema);
104
+
105
+ executeRefreshHandler({
106
+ config: {}, componentName: "",
107
+ store: funcParams.store, dynamicData: funcParams.dynamicData, userValue: funcParams.userValue, service: funcParams.service,
108
+ serviceHolder: this, eventGroups, formDataHolder: formDataHolder
109
+ }).then((e) => {
110
+ funcParams.store.setFormdata((pre) => ({ ...pre, ...formDataHolder }))
111
+ uiSchema.elements.push(notifyUiSchema);
112
+ funcParams.store.setUiSchema(uiSchema);
113
+ });
114
+ },
115
+ getStyle: () => {
116
+ const cloneEventGroup = _.cloneDeep(eventGroups)
117
+ if (cloneEventGroup.setStyle) {
118
+ let finalResponse = {};
119
+ const path = funcParams.dynamicData?.tableButtonPath || funcParams?.dynamicData.path?.split(".").pop();
120
+ if (cloneEventGroup?.setStyle?.[path]) {
121
+ for (const eventConfig of cloneEventGroup?.setStyle?.[path]) {
122
+ finalResponse = executeEvents({
123
+ ...executeEventsParameters,
124
+ config: eventConfig,
125
+ componentName: path
126
+ })
127
+ }
128
+ return finalResponse
129
+ }
130
+ }
131
+ return {}
215
132
  },
216
133
  onCellRenderer: (cellParams) => {
217
- if (eventGroups.onCellRenderer) {
134
+ const cloneEventGroup = _.cloneDeep(eventGroups)
135
+ if (cloneEventGroup.onCellRenderer) {
218
136
  let finalResponse = {};
219
137
  const path = funcParams.dynamicData?.tableButtonPath || funcParams?.dynamicData?.path?.split(".")[0];
220
-
221
- for (const eventConfig of eventGroups?.onCellRenderer?.[path]) {
222
- executeEventsParameters.store.functionParameters = cellParams
223
- finalResponse = executeEvents({
224
- ...executeEventsParameters,
225
- config: eventConfig,
226
- componentName: path
227
- })
138
+ if (cloneEventGroup?.onCellRenderer?.[path]) {
139
+ for (const eventConfig of cloneEventGroup?.onCellRenderer?.[path]) {
140
+ executeEventsParameters.store.functionParameters = cellParams
141
+ finalResponse = executeEvents({
142
+ ...executeEventsParameters,
143
+ config: eventConfig,
144
+ componentName: path
145
+ })
146
+ }
147
+ return finalResponse
228
148
  }
229
- return finalResponse
230
149
  }
231
150
  return {}
232
151
  },
233
152
  onClick: function () {
234
153
  this.callHandler("onClick")
235
154
  },
155
+ onKeyDown: function () {
156
+ this.callHandler("onKeyDown")
157
+ },
158
+ onFileDelete: async function () {
159
+ this.callHandler("onFileDelete")
160
+ },
161
+ onClose: function () {
162
+ this.callHandler("onClose")
163
+ },
236
164
  onMount: function () {
237
165
  this.callHandler("onMount")
238
166
  },
@@ -261,7 +189,8 @@ export default (funcParams: funcParamsProps) => {
261
189
  { key: "pageIndex", value: paginationValues.pagination.pageIndex },
262
190
  { key: "sorting", value: paginationValues.sorting || [] },
263
191
  { key: "filters", value: paginationValues.tableColumnConfig || [] },
264
- { key: "globalFilter", value: paginationValues.globalFilter ?? '' }
192
+ { key: "globalFilter", value: paginationValues.globalFilter ?? '' },
193
+ { key: "expandedRowIds", value: paginationValues.expandedRowIds ?? [] }
265
194
  ]
266
195
  const response = await this.callExecuteEvents(paginationValues, apiBody, "onLoad");
267
196
  return response?.data;
@@ -276,29 +205,43 @@ export default (funcParams: funcParamsProps) => {
276
205
  return response?.data;
277
206
  }
278
207
  },
279
- onChange: async function () {
280
- if (eventGroups.onChange) {
281
- const ChangeEventsKeysArray = Object.keys(eventGroups.onChange);
282
- Promise.all(ChangeEventsKeysArray.map(async (componentName: string) => {
283
- if (
284
- funcParams.store?.formData[componentName] !== funcParams.store.newData[componentName] &&
285
- funcParams.store?.newData[componentName] !== undefined
286
- ) {
287
- for (const eventConfig of eventGroups.onChange[componentName]) {
288
- await executeEvents({
289
- ...executeEventsParameters,
290
- config: eventConfig,
291
- componentName
292
- })
208
+ onChange: function () {
209
+ if (!eventGroups.onChange) return;
210
+
211
+ const ChangeEventsKeysArray = Object.keys(eventGroups.onChange);
212
+
213
+ const promises = ChangeEventsKeysArray.flatMap((componentName: string) => {
214
+ if (
215
+ funcParams.store?.formData[componentName] === funcParams.store.newData[componentName]
216
+ ) {
217
+ return [];
218
+ }
219
+
220
+ return eventGroups.onChange[componentName].map(eventConfig =>
221
+ Promise.resolve(
222
+ executeEvents({
223
+ ...executeEventsParameters,
224
+ config: eventConfig,
225
+ componentName,
226
+ formDataHolder
227
+ })
228
+ ).then(() => {
229
+ if (!isEmpty(formDataHolder)) {
230
+ funcParams.store.setFormdata(pre => ({
231
+ ...pre,
232
+ ...formDataHolder
233
+ }));
293
234
  }
294
- }
295
- }))
296
- }
235
+ })
236
+ );
237
+ });
238
+
239
+ Promise.allSettled(promises);
297
240
  },
298
241
  callExecuteEvents: async function (paramValue, apiBody, eventType: string) {
299
242
  let LastCallResponse = undefined;
300
- const eventsGroupClone = _.cloneDeep(eventGroups)
301
- for (const eventConfig of eventsGroupClone?.[eventType]?.[paramValue.path]) {
243
+ const cloneEventGroup = _.cloneDeep(eventGroups)
244
+ for (const eventConfig of cloneEventGroup?.[eventType]?.[paramValue.path]) {
302
245
  if (eventConfig.body) {
303
246
  eventConfig.body = [
304
247
  ...eventConfig.body,
@@ -319,40 +262,56 @@ export default (funcParams: funcParamsProps) => {
319
262
  },
320
263
  onBack: async function (functionParameters) {
321
264
  const path = funcParams.dynamicData?.tableButtonPath || funcParams.dynamicData.path.split(".")[0];
322
- await this.callHandler("onBack", functionParameters)
265
+ this.callHandler("onBack", functionParameters)
323
266
  if (eventGroups?.["onBack"]?.[path] === undefined) {
324
267
  functionParameters?.handleBack()
325
268
  }
326
269
  },
327
270
  onNext: async function (functionParameters) {
328
271
  const path = funcParams.dynamicData?.tableButtonPath || funcParams.dynamicData.path.split(".")[0];
329
- await this.callHandler("onNext", functionParameters)
272
+ this.callHandler("onNext", functionParameters)
330
273
  if (eventGroups?.["onNext"]?.[path] === undefined) {
331
274
  functionParameters?.handleNext()
332
275
  }
333
276
  },
334
277
  onReset: async function (functionParameters) {
335
278
  const path = funcParams.dynamicData?.tableButtonPath || funcParams.dynamicData.path.split(".")[0];
336
- await this.callHandler("onReset", functionParameters)
279
+ this.callHandler("onReset", functionParameters)
337
280
  if (eventGroups?.["onReset"]?.[path] === undefined) {
338
281
  functionParameters?.handleReset()
339
282
  }
340
283
  },
341
- callHandler: async function (eventType: string, functionParameters?: any) {
342
- const path = funcParams.dynamicData?.tableButtonPath || funcParams.dynamicData.path.split(".")[0];
343
- if (eventGroups?.[eventType]?.[path] !== undefined) {
344
- Promise.all(eventGroups?.[eventType]?.[path].map((eventConfig) => {
345
- executeEventsParameters.store.functionParameters = functionParameters
284
+ callHandler: function (eventType: string, functionParameters?: any) {
285
+ const path =
286
+ funcParams.dynamicData?.tableButtonPath ||
287
+ funcParams.dynamicData.path.split(".").pop();
288
+
289
+ if (!eventGroups?.[eventType]?.[path]) return;
290
+
291
+ const promises = eventGroups[eventType][path].map(eventConfig => {
292
+ executeEventsParameters.store.functionParameters = functionParameters;
293
+
294
+ return Promise.resolve(
346
295
  executeEvents({
347
296
  ...executeEventsParameters,
348
297
  config: eventConfig,
349
- componentName: path
298
+ componentName: path,
299
+ formDataHolder
350
300
  })
351
- }))
352
- }
301
+ ).then(() => {
302
+ if (!isEmpty(formDataHolder)) {
303
+ funcParams.store.setFormdata(pre => ({
304
+ ...pre,
305
+ ...formDataHolder
306
+ }));
307
+ }
308
+ });
309
+ });
310
+
311
+ Promise.allSettled(promises);
353
312
  },
354
313
  downloadFile: downloadFile,
355
- download: doDownload,
314
+ downloadFileFromUrl: downloadFileFromUrl,
356
315
  ...funcParams.functionsProvider
357
316
  };
358
317
  };