impaktapps-ui-builder 0.0.101-alpha.276 → 0.0.101-alpha.277

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.101-alpha.276",
3
+ "version": "0.0.101-alpha.277",
4
4
  "scripts": {
5
5
  "dev": "vite",
6
6
  "build": "tsc && vite build",
@@ -65,14 +65,14 @@ export default (funcParams: funcParamsProps) => {
65
65
  const formDataHolder = {}
66
66
  if (pageData) {
67
67
  if ((!isEmpty(pageData)) && typeof pageData === "object") {
68
-
68
+
69
69
  // eventGroups = extractEvents(pageData?.config)
70
70
  }
71
71
  }
72
72
  let executeEventsParameters: handlersProps = {
73
73
  config: {}, componentName: "",
74
74
  store: funcParams.store, dynamicData: funcParams.dynamicData, userValue: funcParams.userValue, service: funcParams.service,
75
- serviceHolder: { downloadFile, download: doDownload, ...funcParams.functionsProvider }, eventGroups,
75
+ serviceHolder: { downloadFile, download: doDownload, ...funcParams.functionsProvider },
76
76
  functionsProvider: funcParams.functionsProvider, formDataHolder
77
77
  };
78
78
  return {
@@ -85,11 +85,11 @@ export default (funcParams: funcParamsProps) => {
85
85
  // if (pageBasicDetailString) {
86
86
  // pageData = JSON.parse(pageBasicDetailString)
87
87
  // } else {
88
- pageData = await funcParams.pageDataProvider();
89
-
88
+ const newPageData = await funcParams.pageDataProvider();
89
+ pageData = newPageData
90
90
  // }
91
- const config = pageData?.config;
92
- const uiSchema = pageData?.uiSchema;
91
+ const config = newPageData?.config;
92
+ const uiSchema = newPageData?.uiSchema;
93
93
  // const event = new CustomEvent('pageNameChanged', {
94
94
  // detail: { pageName: config.label }
95
95
  // });
@@ -202,17 +202,19 @@ export default (funcParams: funcParamsProps) => {
202
202
  }
203
203
  );
204
204
  const schema = pageData?.schema ?? { type: "object", properties: {} };
205
- eventGroups = extractEvents(config);
205
+ const neweventGroups = extractEvents(config);
206
+ eventGroups = neweventGroups
206
207
  executeEventsParameters = {
207
208
  config: {}, componentName: "",
208
209
  store: funcParams.store, dynamicData: funcParams.dynamicData, userValue: funcParams.userValue, service: funcParams.service,
209
210
  functionsProvider: funcParams.functionsProvider,
210
- serviceHolder: this, eventGroups, formDataHolder
211
+ serviceHolder: this, eventGroups: neweventGroups, formDataHolder
211
212
  }
213
+ console.log("neweventGroups >> ", neweventGroups, eventGroups)
212
214
  await executeRefreshHandler({
213
215
  config: {}, componentName: "",
214
216
  store: funcParams.store, dynamicData: funcParams.dynamicData, userValue: funcParams.userValue, service: funcParams.service,
215
- serviceHolder: this, eventGroups, formDataHolder: {}
217
+ serviceHolder: this, eventGroups: neweventGroups, formDataHolder: {}
216
218
  })
217
219
  funcParams.store.setSchema(
218
220
  (pre: any) => {
@@ -247,9 +249,11 @@ export default (funcParams: funcParamsProps) => {
247
249
  return {}
248
250
  },
249
251
  onClick: function () {
252
+ console.log("clicked button")
250
253
  this.callHandler("onClick")
251
254
  },
252
255
  onMount: function () {
256
+ console.log("omMount")
253
257
  this.callHandler("onMount")
254
258
  },
255
259
  onFileDownload: function () {
@@ -272,6 +276,7 @@ export default (funcParams: funcParamsProps) => {
272
276
  return response?.data;
273
277
  },
274
278
  onPaginationChange: async function (paginationValues) {
279
+ console.log("onPaginationChange")
275
280
  const apiBody = [
276
281
  { key: "size", value: paginationValues.pagination.pageSize },
277
282
  { key: "pageIndex", value: paginationValues.pagination.pageIndex },
@@ -283,6 +288,7 @@ export default (funcParams: funcParamsProps) => {
283
288
  return response?.data;
284
289
  },
285
290
  getSelectOptions: async function (param) {
291
+ console.log("getSelectOptions")
286
292
  if (param.serachValue !== "" && param.serachValue !== undefined) {
287
293
  const apiBody = [
288
294
  { key: "searchValue", value: param.serachValue },
@@ -293,6 +299,7 @@ export default (funcParams: funcParamsProps) => {
293
299
  }
294
300
  },
295
301
  onChange: async function () {
302
+ console.log("onChange")
296
303
  if (eventGroups.onChange) {
297
304
  const ChangeEventsKeysArray = Object.keys(eventGroups.onChange);
298
305
  Promise.all(ChangeEventsKeysArray.map(async (componentName: string) => {