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

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.278",
3
+ "version": "0.0.101-alpha.279",
4
4
  "scripts": {
5
5
  "dev": "vite",
6
6
  "build": "tsc && vite build",
@@ -61,14 +61,8 @@ export const extractEvents = (eventConfig: any) => {
61
61
  return eventGroups;
62
62
  };
63
63
  export default (funcParams: funcParamsProps) => {
64
- // eventGroups = {}
64
+ eventGroups = {}
65
65
  const formDataHolder = {}
66
- if (pageData) {
67
- if ((!isEmpty(pageData)) && typeof pageData === "object") {
68
-
69
- // eventGroups = extractEvents(pageData?.config)
70
- }
71
- }
72
66
  let executeEventsParameters: handlersProps = {
73
67
  config: {}, componentName: "",
74
68
  store: funcParams.store, dynamicData: funcParams.dynamicData, userValue: funcParams.userValue, service: funcParams.service,
@@ -79,22 +73,16 @@ export default (funcParams: funcParamsProps) => {
79
73
  setPage: async function () {
80
74
  funcParams.store.setAdditionalErrors([]);
81
75
  funcParams.store.setFormdata({});
82
- eventGroups = {}
83
76
  funcParams.store.setSchema({ type: "object", properties: {} });
84
77
  funcParams.store.newData = {};
85
- // const pageBasicDetailString = sessionStorage.getItem("pagemasterMetaData")
86
- // if (pageBasicDetailString) {
87
- // pageData = JSON.parse(pageBasicDetailString)
88
- // } else {
89
- const newPageData = await funcParams.pageDataProvider();
90
- pageData = newPageData
91
- // }
92
- const config = newPageData?.config;
93
- const uiSchema = newPageData?.uiSchema;
94
- // const event = new CustomEvent('pageNameChanged', {
95
- // detail: { pageName: config.label }
96
- // });
97
- // window.dispatchEvent(event)
78
+ eventGroups = {};
79
+ pageData = await funcParams.pageDataProvider();
80
+ const config = pageData?.config;
81
+ const uiSchema = pageData?.uiSchema;
82
+ const event = new CustomEvent('pageNameChanged', {
83
+ detail: { pageName: config.label }
84
+ });
85
+ window.dispatchEvent(event)
98
86
  const theme = funcParams?.store?.theme?.myTheme;
99
87
  uiSchema.elements.push(
100
88
  {
@@ -203,19 +191,18 @@ export default (funcParams: funcParamsProps) => {
203
191
  }
204
192
  );
205
193
  const schema = pageData?.schema ?? { type: "object", properties: {} };
206
- const neweventGroups = extractEvents(config);
207
- eventGroups = neweventGroups
194
+ const newEventGroups = extractEvents(config);
195
+ eventGroups = newEventGroups;
208
196
  executeEventsParameters = {
209
197
  config: {}, componentName: "",
210
198
  store: funcParams.store, dynamicData: funcParams.dynamicData, userValue: funcParams.userValue, service: funcParams.service,
211
199
  functionsProvider: funcParams.functionsProvider,
212
- serviceHolder: this, eventGroups: neweventGroups, formDataHolder
200
+ serviceHolder: this, eventGroups: newEventGroups, formDataHolder
213
201
  }
214
- console.log("neweventGroups >> ", neweventGroups, eventGroups)
215
202
  await executeRefreshHandler({
216
203
  config: {}, componentName: "",
217
204
  store: funcParams.store, dynamicData: funcParams.dynamicData, userValue: funcParams.userValue, service: funcParams.service,
218
- serviceHolder: this, eventGroups: neweventGroups, formDataHolder: {}
205
+ serviceHolder: this, eventGroups: newEventGroups, formDataHolder: {}
219
206
  })
220
207
  funcParams.store.setSchema(
221
208
  (pre: any) => {
@@ -227,10 +214,6 @@ export default (funcParams: funcParamsProps) => {
227
214
  )
228
215
  uiSchema.elements.push(notifyUiSchema);
229
216
  funcParams.store.setUiSchema(uiSchema);
230
- sessionStorage.setItem("pagemasterMetaData", JSON.stringify({
231
- schema: pageData?.schema,
232
- uiSchema: pageData?.uiSchema, config: pageData?.config
233
- }))
234
217
  },
235
218
  onCellRenderer: (cellParams) => {
236
219
  if (eventGroups.onCellRenderer) {
@@ -250,11 +233,9 @@ export default (funcParams: funcParamsProps) => {
250
233
  return {}
251
234
  },
252
235
  onClick: function () {
253
- console.log("clicked button")
254
236
  this.callHandler("onClick")
255
237
  },
256
238
  onMount: function () {
257
- console.log("omMount")
258
239
  this.callHandler("onMount")
259
240
  },
260
241
  onFileDownload: function () {
@@ -277,7 +258,6 @@ export default (funcParams: funcParamsProps) => {
277
258
  return response?.data;
278
259
  },
279
260
  onPaginationChange: async function (paginationValues) {
280
- console.log("onPaginationChange")
281
261
  const apiBody = [
282
262
  { key: "size", value: paginationValues.pagination.pageSize },
283
263
  { key: "pageIndex", value: paginationValues.pagination.pageIndex },
@@ -289,7 +269,6 @@ export default (funcParams: funcParamsProps) => {
289
269
  return response?.data;
290
270
  },
291
271
  getSelectOptions: async function (param) {
292
- console.log("getSelectOptions")
293
272
  if (param.serachValue !== "" && param.serachValue !== undefined) {
294
273
  const apiBody = [
295
274
  { key: "searchValue", value: param.serachValue },
@@ -300,7 +279,6 @@ export default (funcParams: funcParamsProps) => {
300
279
  }
301
280
  },
302
281
  onChange: async function () {
303
- console.log("onChange")
304
282
  if (eventGroups.onChange) {
305
283
  const ChangeEventsKeysArray = Object.keys(eventGroups.onChange);
306
284
  Promise.all(ChangeEventsKeysArray.map(async (componentName: string) => {