impaktapps-ui-builder 0.0.382-alpha.6 → 0.0.382-alpha.60

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 (43) hide show
  1. package/dist/impaktapps-ui-builder.es.js +890 -1032
  2. package/dist/impaktapps-ui-builder.es.js.map +1 -1
  3. package/dist/impaktapps-ui-builder.umd.js +15 -15
  4. package/dist/impaktapps-ui-builder.umd.js.map +1 -1
  5. package/dist/src/impaktapps-ui-builder/builder/build/buildBasicUiSchema.d.ts +1 -0
  6. package/dist/src/impaktapps-ui-builder/builder/build/uischema/apiSection.d.ts +35 -2
  7. package/dist/src/impaktapps-ui-builder/builder/build/uischema/card.d.ts +10 -12
  8. package/dist/src/impaktapps-ui-builder/builder/build/uischema/coreSection.d.ts +15 -18
  9. package/dist/src/impaktapps-ui-builder/builder/build/uischema/eventSection.d.ts +70 -121
  10. package/dist/src/impaktapps-ui-builder/builder/build/uischema/graph.d.ts +1 -108
  11. package/dist/src/impaktapps-ui-builder/builder/build/uischema/tableSection.d.ts +53 -102
  12. package/dist/src/impaktapps-ui-builder/builder/build/uischema/validationSections.d.ts +17 -2
  13. package/dist/src/impaktapps-ui-builder/builder/build/uischema/valueTab.d.ts +17 -2
  14. package/dist/src/impaktapps-ui-builder/builder/services/event.d.ts +1 -1
  15. package/dist/src/impaktapps-ui-builder/runtime/services/service.d.ts +1 -0
  16. package/package.json +1 -1
  17. package/src/impaktapps-ui-builder/builder/build/buildBasicUiSchema.ts +1 -0
  18. package/src/impaktapps-ui-builder/builder/build/buildHorizontalBarGraph.ts +30 -26
  19. package/src/impaktapps-ui-builder/builder/build/buildPieGraph.ts +30 -21
  20. package/src/impaktapps-ui-builder/builder/build/buildStackBarGraph.ts +6 -6
  21. package/src/impaktapps-ui-builder/builder/build/buildWrapperSection.ts +3 -1
  22. package/src/impaktapps-ui-builder/builder/build/uischema/apiSection.ts +50 -27
  23. package/src/impaktapps-ui-builder/builder/build/uischema/buildPropertiesSection.ts +30 -49
  24. package/src/impaktapps-ui-builder/builder/build/uischema/card.ts +9 -10
  25. package/src/impaktapps-ui-builder/builder/build/uischema/coreSection.ts +16 -36
  26. package/src/impaktapps-ui-builder/builder/build/uischema/dateInputField.ts +1 -6
  27. package/src/impaktapps-ui-builder/builder/build/uischema/emptyBox.ts +1 -1
  28. package/src/impaktapps-ui-builder/builder/build/uischema/eventSection.ts +99 -125
  29. package/src/impaktapps-ui-builder/builder/build/uischema/graph.ts +108 -108
  30. package/src/impaktapps-ui-builder/builder/build/uischema/multiSelect.ts +1 -1
  31. package/src/impaktapps-ui-builder/builder/build/uischema/refresh.ts +2 -12
  32. package/src/impaktapps-ui-builder/builder/build/uischema/selectInputField.ts +1 -6
  33. package/src/impaktapps-ui-builder/builder/build/uischema/tableSection.ts +84 -56
  34. package/src/impaktapps-ui-builder/builder/build/uischema/textInputField.ts +1 -6
  35. package/src/impaktapps-ui-builder/builder/build/uischema/validationSections.ts +12 -12
  36. package/src/impaktapps-ui-builder/builder/build/uischema/valueTab.ts +12 -12
  37. package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/uiSchema.ts +294 -143
  38. package/src/impaktapps-ui-builder/builder/elements/UiSchema/PageMaster/uiSchema.ts +399 -294
  39. package/src/impaktapps-ui-builder/builder/elements/UiSchema/event/uiSchema.ts +522 -283
  40. package/src/impaktapps-ui-builder/builder/services/component.ts +2 -2
  41. package/src/impaktapps-ui-builder/builder/services/event.ts +8 -8
  42. package/src/impaktapps-ui-builder/runtime/services/events.ts +14 -1
  43. package/src/impaktapps-ui-builder/runtime/services/service.ts +5 -0
@@ -54,8 +54,8 @@ export const refreshPage = (type:string,store:any) => {
54
54
 
55
55
  }
56
56
  const elements = sectionLabels[type]?.map(e => sectionUiSchema[e]);
57
- UiSchema.elements[1].config.main.tabLabels = sectionLabels[type] || ["Core", "style","Event","Validation"];
58
- UiSchema.elements[1].elements = elements || [CoreSection, StyleSection,EventSection,ValidationSection];
57
+ UiSchema.elements[0].config.main.tabLabels = sectionLabels[type] || ["Core", "style","Event","Validation"];
58
+ UiSchema.elements[0].elements = elements || [CoreSection, StyleSection,EventSection,ValidationSection];
59
59
 
60
60
  }
61
61
  store.setUiSchema(UiSchema);
@@ -22,26 +22,26 @@ export default (
22
22
  this.refreshPage(formdata.Handler, store)
23
23
  },
24
24
  refreshPage: (handlerType: any, store: any) => {
25
- const uiSchema = _.cloneDeep(EventUiSchema);
25
+ const uiSchema = _.cloneDeep(EventUiSchema(store.theme.myTheme));
26
26
  const schema: any = _.cloneDeep(EventSchema)
27
27
  if (handlerType) {
28
28
  if (handlerType === "custom") {
29
- uiSchema.elements[1].elements[0].elements[2] = getTextArea("eventCode", "Write Custom Code", false)
29
+ uiSchema.elements[0].elements[0].elements[3] = getTextArea("eventCode", "Write Custom Code", false)
30
30
  schema.required = ["eventType", "Handler", "eventCode"]
31
31
 
32
32
  } else if (handlerType === "api") {
33
- uiSchema.elements[1].elements[0].elements[2] = APISection;
33
+ uiSchema.elements[0].elements[0].elements[3] = APISection;
34
34
  schema.required = ["eventType", "Handler", "method", "path"]
35
35
  } else if (handlerType === "inBuiltFunction") {
36
- uiSchema.elements[1].elements[0].elements[2] = getSelectField("inBuiltFunctionType", "Function Name", [
36
+ uiSchema.elements[0].elements[0].elements[2] = getSelectField("inBuiltFunctionType", "Function Name", [
37
37
  { label: "RankProvider", value: "RankProvider" },
38
38
  { label: "Download File", value: "downloadFile" },
39
39
  { label: "Download Blob File", value: "downloadBlobFile" }
40
40
  ])
41
- uiSchema.elements[1].elements[0].elements[3] = getTextArea("funcParametersCode", "Write Custom Code for Functions Parameter", true, { xs: 12, sm: 12, md: 6 });
41
+ uiSchema.elements[0].elements[0].elements[3] = getTextArea("funcParametersCode", "Write Custom Code for Functions Parameter", true, 12);
42
42
  schema.required = ["eventType", "Handler", "inBuiltFunctionType"]
43
43
  } else if (handlerType === "refresh") {
44
- uiSchema.elements[1].elements[0].elements[2] = refreshSectionUiSchema;
44
+ uiSchema.elements[0].elements[0].elements[3] = refreshSectionUiSchema;
45
45
  schema.properties.refreshElements.required = ["value"]
46
46
  schema.properties.refreshElements.items.required = ["value"]
47
47
  schema.required = ["eventType", "Handler", "refreshElements"]
@@ -52,8 +52,8 @@ export default (
52
52
  },
53
53
 
54
54
  getFormData: Component(store, dynamicData, submitHandler, service).getFormdata,
55
- getUiSchema: function () {
56
- return EventUiSchema;
55
+ getUiSchema: async function () {
56
+ return await EventUiSchema(store.theme.myTheme);
57
57
  },
58
58
  getSchema: () => {
59
59
  return EventSchema;
@@ -43,6 +43,7 @@ async function executeEventsHandler(params: handlersProps) {
43
43
  return await executeRefreshHandler(params)
44
44
  }
45
45
  else if (params.config.Handler === "mergeFormdata") {
46
+ console.log("params : " , params);
46
47
  const result = await mergeFormdata(
47
48
  params.parentEventOutput, params.componentName, params.config, params.store, params.service)
48
49
  return result;
@@ -125,13 +126,25 @@ async function mergeFormdata(handlerResponse: any, componentName: string, eventC
125
126
  })
126
127
  }
127
128
  else if (eventConfig.type === "page") {
129
+ console.log("console1 : " , handlerResponse);
128
130
  if (!(_.isEmpty(handlerResponse?.data) && handlerResponse?.data)) {
131
+ console.log("console2 : " , handlerResponse);
129
132
  store.setFormdata((pre: any) => { return { ...pre, ...handlerResponse?.data } })
130
133
  }
131
134
  }
132
135
  else {
133
136
  if (handlerResponse) {
134
- store.setFormdata((pre) => { return { ...pre, [componentName]: eventConfig.lazyLoading ? handlerResponse.data.data : handlerResponse.data } });
137
+ console.log("console3 : " , handlerResponse);
138
+
139
+ let body;
140
+
141
+ if(handlerResponse.data instanceof Array){
142
+ body = [...handlerResponse.data]
143
+ }else if(handlerResponse.data instanceof Object){
144
+ body = {...handlerResponse.data};
145
+ }
146
+
147
+ store.setFormdata((pre) => { return { ...pre, [componentName]: eventConfig.lazyLoading ? handlerResponse.data.data : body } });
135
148
  const demoData = await asyncOperation();
136
149
  }
137
150
  }
@@ -119,6 +119,7 @@ export default (funcParams: funcParamsProps) => {
119
119
  },
120
120
  onChange: async function () {
121
121
  if (eventGroups.onChange) {
122
+ funcParams.dynamicData?.setLoading(true);
122
123
  const ChangeEventsKeysArray = Object.keys(eventGroups.onChange);
123
124
  Promise.all(ChangeEventsKeysArray.map(async (componentName: string) => {
124
125
  if (
@@ -134,6 +135,7 @@ export default (funcParams: funcParamsProps) => {
134
135
  }
135
136
  }
136
137
  }))
138
+ funcParams.dynamicData?.setLoading(false);
137
139
  }
138
140
  },
139
141
  updateConfigApiBody: async function (paramValue, apiBody) {
@@ -171,6 +173,9 @@ export default (funcParams: funcParamsProps) => {
171
173
  functionParameters?.handleNext()
172
174
  }
173
175
  },
176
+ backHandler:()=>{
177
+ funcParams.store.navigate(-1)
178
+ },
174
179
  onReset: async function (functionParameters) {
175
180
  const path = funcParams.dynamicData?.tableButtonPath || funcParams.dynamicData.path.split(".")[0];
176
181
  await this.callHandler("onReset", functionParameters)