impaktapps-ui-builder 0.0.296 → 0.0.298

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 (35) hide show
  1. package/dist/impaktapps-ui-builder.es.js +2772 -2728
  2. package/dist/impaktapps-ui-builder.es.js.map +1 -1
  3. package/dist/impaktapps-ui-builder.umd.js +11 -11
  4. package/dist/impaktapps-ui-builder.umd.js.map +1 -1
  5. package/dist/src/impaktapps-ui-builder/builder/build/buildButton.d.ts +1 -27
  6. package/dist/src/impaktapps-ui-builder/builder/build/uischema/buildPropertiesSection.d.ts +0 -4
  7. package/dist/src/impaktapps-ui-builder/builder/build/uischema/coreSection.d.ts +25 -18
  8. package/dist/src/impaktapps-ui-builder/builder/build/uischema/refresh.d.ts +19 -2
  9. package/dist/src/impaktapps-ui-builder/builder/build/uischema/valueTab.d.ts +28 -1
  10. package/dist/src/impaktapps-ui-builder/builder/elements/UiSchema/PageMaster/schema.d.ts +9 -0
  11. package/dist/src/impaktapps-ui-builder/builder/elements/UiSchema/event/schema.d.ts +1 -0
  12. package/dist/src/impaktapps-ui-builder/builder/services/event.d.ts +1 -0
  13. package/dist/src/impaktapps-ui-builder/builder/services/pageMaster.d.ts +9 -0
  14. package/package.json +1 -1
  15. package/src/impaktapps-ui-builder/builder/build/buildButton.ts +11 -2
  16. package/src/impaktapps-ui-builder/builder/build/buildCard.ts +9 -9
  17. package/src/impaktapps-ui-builder/builder/build/buildConfig.ts +9 -1
  18. package/src/impaktapps-ui-builder/builder/build/buildText.ts +1 -1
  19. package/src/impaktapps-ui-builder/builder/build/buildUiSchema.ts +25 -8
  20. package/src/impaktapps-ui-builder/builder/build/buildWrapperSection.ts +1 -2
  21. package/src/impaktapps-ui-builder/builder/build/uischema/buildPropertiesSection.ts +6 -10
  22. package/src/impaktapps-ui-builder/builder/build/uischema/coreSection.ts +9 -19
  23. package/src/impaktapps-ui-builder/builder/build/uischema/refresh.ts +19 -0
  24. package/src/impaktapps-ui-builder/builder/build/uischema/tableSection.ts +1 -1
  25. package/src/impaktapps-ui-builder/builder/build/uischema/valueTab.ts +52 -1
  26. package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/schema.ts +101 -64
  27. package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/uiSchema.ts +5 -36
  28. package/src/impaktapps-ui-builder/builder/elements/UiSchema/PageMaster/schema.ts +11 -1
  29. package/src/impaktapps-ui-builder/builder/elements/UiSchema/PageMaster/uiSchema.ts +5 -31
  30. package/src/impaktapps-ui-builder/builder/elements/UiSchema/event/schema.ts +72 -69
  31. package/src/impaktapps-ui-builder/builder/services/component.ts +12 -5
  32. package/src/impaktapps-ui-builder/builder/services/event.ts +12 -4
  33. package/src/impaktapps-ui-builder/builder/services/pageMaster.ts +23 -15
  34. package/src/impaktapps-ui-builder/runtime/services/events.ts +1 -4
  35. package/src/impaktapps-ui-builder/runtime/services/service.ts +3 -2
@@ -7,13 +7,13 @@ import { schema } from "../build/buildUiSchema";
7
7
 
8
8
  interface funcParamsProps {
9
9
  store: any,
10
- dynamicData: any,
11
- config: any,
12
- submitHandler:any,
13
- service:any
14
- }
15
- export default (funcParams:funcParamsProps) => {
16
- const {store,dynamicData,config,submitHandler} = funcParams
10
+ dynamicData: any,
11
+ config: any,
12
+ submitHandler: any,
13
+ service: any
14
+ }
15
+ export default (funcParams: funcParamsProps) => {
16
+ const { store, dynamicData, config, submitHandler } = funcParams
17
17
  return {
18
18
  setPage: async function () {
19
19
  const formdata = await this.getFormdata();
@@ -26,13 +26,13 @@ export default (funcParams:funcParamsProps) => {
26
26
  getFormdata: async function () {
27
27
  const id = store.searchParams?.get("id");
28
28
  const formData = getFormdataFromLocalStorage()
29
- if(formData){
30
- return formData;
29
+ if (formData) {
30
+ return formData;
31
31
  }
32
32
  saveFormdataInLocalStorage(config)
33
- return config
33
+ return config
34
34
  },
35
- getUiSchema: async function () {
35
+ getUiSchema: async function () {
36
36
  return PageMasterUiSchema;
37
37
  },
38
38
  getSchema: () => {
@@ -53,8 +53,9 @@ export default (funcParams:funcParamsProps) => {
53
53
  );
54
54
  },
55
55
  submitPageHandler: async function () {
56
- console.log(schema)
57
- submitHandler(store,funcParams.service)
56
+ console.log()
57
+ if (_.isEmpty(funcParams.store.ctx.core.errors)) {
58
+ submitHandler(store, funcParams.service)
58
59
  .then((saveReturn: any) => {
59
60
  localStorage.removeItem("pageFormdata")
60
61
  store.navigate(-1)
@@ -63,6 +64,13 @@ export default (funcParams:funcParamsProps) => {
63
64
  Success: true,
64
65
  });
65
66
  })
67
+ } else {
68
+ funcParams.store.setValidation("ValidateAndShow");
69
+ funcParams.store.setNotify({
70
+ Fail:true,
71
+ FailMessage:"Errors on Page"
72
+ })
73
+ }
66
74
  },
67
75
  Edit_Components: Component(store, dynamicData).editComponents,
68
76
  Delete_Components: Component(store, dynamicData).deleteComponents,
@@ -75,14 +83,14 @@ export default (funcParams:funcParamsProps) => {
75
83
  const finalPath = `events[${store.formData.events.length}]`
76
84
  store.navigate(`/ComponentEvents?path=${finalPath}&id=${id}`)
77
85
  },
78
- editEvent:async function () {
86
+ editEvent: async function () {
79
87
  const rowId = dynamicData.path.split(".")[1];
80
88
  const id = store.searchParams?.get("id");
81
89
  saveFormdataInLocalStorage(store.formData)
82
90
  const finalPath = `events[${rowId}]`
83
91
  store.navigate(`/ComponentEvents?path=${finalPath}&id=${id}`)
84
92
  },
85
- deleteEvent:async function () {
93
+ deleteEvent: async function () {
86
94
  const rowId = dynamicData.path.split(".")[1];
87
95
  store.formData.events.splice(rowId, 1);
88
96
  const response = saveFormdataInLocalStorage(store.formData)
@@ -14,9 +14,6 @@ export const executeEvents = async (
14
14
  const response = await executeEventsHandler(params)
15
15
  finalResponse = response;
16
16
  const SuccessEvent = params.config?.events.filter(e => e.eventType === "Success");
17
- if(params.config.returnNeeded){
18
- return finalResponse
19
- }
20
17
  nextEvent = SuccessEvent;
21
18
  } catch (err) {
22
19
  const FailEvent = params.config?.events?.filter(e => e.eventType === "Fail")
@@ -121,7 +118,7 @@ async function mergeFormdata(handlerResponse: any, componentName: string, eventC
121
118
  }
122
119
  else {
123
120
  if (handlerResponse) {
124
- store.setFormdata((pre) => { return { ...pre, [componentName]: handlerResponse.data } });
121
+ store.setFormdata((pre) => { return { ...pre, [componentName]:eventConfig.lazyLoading?handlerResponse.data.data: handlerResponse.data } });
125
122
  }
126
123
  }
127
124
  }
@@ -30,7 +30,7 @@ export const extractEvents = (eventConfig: any) => {
30
30
  return elem.eventType === "Success"
31
31
  })
32
32
  if (!(!!SuccessEvent) && event.eventType === "onLoad") {
33
- event.events.push({ Handler: "mergeFormdata", eventType: "Success", type: compType })
33
+ event.events.push({ Handler: "mergeFormdata", eventType: "Success", type: compType,lazyLoading:eventConfig.lazyLoading==="YES"?true:false })
34
34
  }
35
35
  eventGroups[event.eventType][eventConfigObj.name].push({ ...event, type: compType })
36
36
  });
@@ -98,7 +98,8 @@ export default (funcParams: funcParamsProps) => {
98
98
  { key: "filters", value: paginationValues.columnFilters || [] },
99
99
  { key: "globalFilter", value: paginationValues.globalFilter ?? '' }
100
100
  ]
101
- return await this.updateConfigApiBody(paginationValues, apiBody)
101
+ const response = await this.updateConfigApiBody(paginationValues, apiBody);
102
+ return response?.data;
102
103
  },
103
104
  getSelectOptions: async function (param) {
104
105
  if (param.serachValue !== "" && param.serachValue !== undefined) {