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

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