impaktapps-ui-builder 1.0.109 → 1.0.111

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.
@@ -12,7 +12,7 @@ export declare const extractEvents: (eventConfig: any) => any;
12
12
  declare const _default: (funcParams: funcParamsProps) => {
13
13
  setPage: () => Promise<void>;
14
14
  onCellRenderer: (cellParams: any) => {};
15
- onClick: () => void;
15
+ onClick: () => Promise<void>;
16
16
  onKeyDown: () => void;
17
17
  onFileDelete: () => Promise<void>;
18
18
  onMount: () => void;
@@ -27,7 +27,7 @@ declare const _default: (funcParams: funcParamsProps) => {
27
27
  onBack: (functionParameters: any) => Promise<void>;
28
28
  onNext: (functionParameters: any) => Promise<void>;
29
29
  onReset: (functionParameters: any) => Promise<void>;
30
- callHandler: (eventType: string, functionParameters?: any) => void;
30
+ callHandler: (eventType: string, functionParameters?: any) => Promise<void>;
31
31
  downloadFile: typeof downloadFile;
32
32
  downloadFileFromUrl: (response: any, service: any) => void;
33
33
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "impaktapps-ui-builder",
3
- "version": "1.0.109",
3
+ "version": "1.0.111",
4
4
  "scripts": {
5
5
  "dev": "vite",
6
6
  "build": "tsc && vite build",
@@ -129,8 +129,8 @@ export default (funcParams: funcParamsProps) => {
129
129
  }
130
130
  return {}
131
131
  },
132
- onClick: function () {
133
- this.callHandler("onClick")
132
+ onClick: async function () {
133
+ await this.callHandler("onClick")
134
134
  },
135
135
  onKeyDown: function () {
136
136
  this.callHandler("onKeyDown")
@@ -225,14 +225,14 @@ export default (funcParams: funcParamsProps) => {
225
225
  },
226
226
  onBack: async function (functionParameters) {
227
227
  const path = funcParams.dynamicData?.tableButtonPath || funcParams.dynamicData.path.split(".")[0];
228
- this.callHandler("onBack", functionParameters)
228
+ await this.callHandler("onBack", functionParameters)
229
229
  if (eventGroups?.["onBack"]?.[path] === undefined) {
230
230
  functionParameters?.handleBack()
231
231
  }
232
232
  },
233
233
  onNext: async function (functionParameters) {
234
234
  const path = funcParams.dynamicData?.tableButtonPath || funcParams.dynamicData.path.split(".")[0];
235
- this.callHandler("onNext", functionParameters)
235
+ await this.callHandler("onNext", functionParameters)
236
236
  if (eventGroups?.["onNext"]?.[path] === undefined) {
237
237
  functionParameters?.handleNext()
238
238
  }
@@ -244,20 +244,20 @@ export default (funcParams: funcParamsProps) => {
244
244
  functionParameters?.handleReset()
245
245
  }
246
246
  },
247
- callHandler: function (eventType: string, functionParameters?: any) {
247
+ callHandler: async function (eventType: string, functionParameters?: any) {
248
248
  const path = funcParams.dynamicData?.tableButtonPath || funcParams.dynamicData.path.split(".")[funcParams.dynamicData.path.split(".").length - 1];
249
249
  if (eventGroups?.[eventType]?.[path] !== undefined) {
250
- (eventGroups?.[eventType]?.[path].map((eventConfig) => {
250
+ (eventGroups?.[eventType]?.[path].map(async (eventConfig) => {
251
251
  executeEventsParameters.store.functionParameters = functionParameters
252
252
  if (eventConfig.Handler === "refresh") {
253
- executeEvents({
253
+ await executeRefreshHandler({
254
254
  ...executeEventsParameters,
255
255
  config: eventConfig,
256
256
  componentName: path,
257
257
  formDataHolder: formDataHolder
258
- }).then((res) => {
259
- funcParams.store.setFormdata((pre) => ({ ...pre, ...formDataHolder }));
260
- });
258
+ })
259
+ funcParams.store.setFormdata((pre) => ({ ...pre, ...formDataHolder }));
260
+
261
261
  } else {
262
262
  executeEvents({
263
263
  ...executeEventsParameters,