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

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 (48) hide show
  1. package/dist/impaktapps-ui-builder.es.js +1839 -1272
  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 +0 -1
  6. package/dist/src/impaktapps-ui-builder/builder/build/uischema/apiSection.d.ts +2 -35
  7. package/dist/src/impaktapps-ui-builder/builder/build/uischema/card.d.ts +12 -10
  8. package/dist/src/impaktapps-ui-builder/builder/build/uischema/coreSection.d.ts +18 -15
  9. package/dist/src/impaktapps-ui-builder/builder/build/uischema/eventSection.d.ts +121 -70
  10. package/dist/src/impaktapps-ui-builder/builder/build/uischema/graph.d.ts +108 -1
  11. package/dist/src/impaktapps-ui-builder/builder/build/uischema/leaderBoard.d.ts +8 -5
  12. package/dist/src/impaktapps-ui-builder/builder/build/uischema/tableSection.d.ts +102 -53
  13. package/dist/src/impaktapps-ui-builder/builder/build/uischema/validationSections.d.ts +2 -17
  14. package/dist/src/impaktapps-ui-builder/builder/build/uischema/valueTab.d.ts +2 -17
  15. package/dist/src/impaktapps-ui-builder/builder/services/component.d.ts +4 -2
  16. package/dist/src/impaktapps-ui-builder/builder/services/event.d.ts +3 -2
  17. package/dist/src/impaktapps-ui-builder/builder/services/pageMaster.d.ts +3 -1
  18. package/dist/src/impaktapps-ui-builder/runtime/services/service.d.ts +0 -1
  19. package/package.json +1 -1
  20. package/src/impaktapps-ui-builder/builder/build/buildBasicUiSchema.ts +0 -1
  21. package/src/impaktapps-ui-builder/builder/build/buildHorizontalBarGraph.ts +26 -30
  22. package/src/impaktapps-ui-builder/builder/build/buildPieGraph.ts +21 -30
  23. package/src/impaktapps-ui-builder/builder/build/buildStackBarGraph.ts +6 -6
  24. package/src/impaktapps-ui-builder/builder/build/buildWrapperSection.ts +1 -3
  25. package/src/impaktapps-ui-builder/builder/build/uischema/apiSection.ts +27 -50
  26. package/src/impaktapps-ui-builder/builder/build/uischema/buildPropertiesSection.ts +49 -30
  27. package/src/impaktapps-ui-builder/builder/build/uischema/card.ts +10 -9
  28. package/src/impaktapps-ui-builder/builder/build/uischema/coreSection.ts +36 -16
  29. package/src/impaktapps-ui-builder/builder/build/uischema/dateInputField.ts +6 -1
  30. package/src/impaktapps-ui-builder/builder/build/uischema/emptyBox.ts +1 -1
  31. package/src/impaktapps-ui-builder/builder/build/uischema/eventSection.ts +125 -99
  32. package/src/impaktapps-ui-builder/builder/build/uischema/graph.ts +108 -108
  33. package/src/impaktapps-ui-builder/builder/build/uischema/leaderBoard.ts +9 -5
  34. package/src/impaktapps-ui-builder/builder/build/uischema/multiSelect.ts +1 -1
  35. package/src/impaktapps-ui-builder/builder/build/uischema/refresh.ts +12 -2
  36. package/src/impaktapps-ui-builder/builder/build/uischema/selectInputField.ts +6 -1
  37. package/src/impaktapps-ui-builder/builder/build/uischema/tableSection.ts +58 -84
  38. package/src/impaktapps-ui-builder/builder/build/uischema/textInputField.ts +6 -1
  39. package/src/impaktapps-ui-builder/builder/build/uischema/validationSections.ts +12 -12
  40. package/src/impaktapps-ui-builder/builder/build/uischema/valueTab.ts +12 -12
  41. package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/uiSchema.ts +440 -448
  42. package/src/impaktapps-ui-builder/builder/elements/UiSchema/PageMaster/uiSchema.ts +515 -456
  43. package/src/impaktapps-ui-builder/builder/elements/UiSchema/event/uiSchema.ts +367 -520
  44. package/src/impaktapps-ui-builder/builder/services/component.ts +25 -7
  45. package/src/impaktapps-ui-builder/builder/services/event.ts +17 -9
  46. package/src/impaktapps-ui-builder/builder/services/pageMaster.ts +19 -3
  47. package/src/impaktapps-ui-builder/runtime/services/events.ts +4 -14
  48. package/src/impaktapps-ui-builder/runtime/services/service.ts +0 -5
@@ -41,7 +41,7 @@ const sectionLabels = {
41
41
 
42
42
 
43
43
  export const refreshPage = (type:string,store:any) => {
44
- const UiSchema = _.cloneDeep(componentBasicUiSchema(store.theme.myTheme))
44
+ const UiSchema = _.cloneDeep(componentBasicUiSchema)
45
45
  if(type){
46
46
  const sectionUiSchema = {
47
47
  Core: CoreSection,
@@ -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[0].config.main.tabLabels = sectionLabels[type] || ["Core", "style","Event","Validation"];
58
- UiSchema.elements[0].elements = elements || [CoreSection, StyleSection,EventSection,ValidationSection];
57
+ UiSchema.elements[1].config.main.tabLabels = sectionLabels[type] || ["Core", "style","Event","Validation"];
58
+ UiSchema.elements[1].elements = elements || [CoreSection, StyleSection,EventSection,ValidationSection];
59
59
 
60
60
  }
61
61
  store.setUiSchema(UiSchema);
@@ -104,20 +104,28 @@ export default (store: any, dynamicData: any, submitHandler: any, service: any)
104
104
  store.navigate(`/Component?path=${`elements[${rowId}]`}&id=${id}`)
105
105
  }
106
106
  },
107
- deleteComponents: function () {
107
+ deleteComponents: function (shouldUpdateDialog: boolean = true) {
108
108
  const path = store.searchParams?.get("path");
109
- const rowId = dynamicData.path.split(".")[1];
109
+ const rowId = localStorage.getItem('rowId');
110
110
  store.formData.elements.splice(rowId, 1);
111
111
  const response = saveFormdataInLocalStorage(store.ctx.core.data, path)
112
112
  const data = path ? _.get(response, path) : response;
113
113
  store.setFormdata(data);
114
+ if(shouldUpdateDialog){
115
+ store.updateDialog("popUpComponentSection");
116
+ }
117
+ localStorage.removeItem('rowId');
114
118
  },
115
- deleteEvent: function () {
119
+ deleteEvent: function (shouldUpdateDialog: boolean = true) {
116
120
  const path = store.searchParams?.get("path");
117
- const rowId = dynamicData.path.split(".")[1];
121
+ const rowId = localStorage.getItem('rowId');
118
122
  store.formData.events.splice(rowId, 1);
119
123
  const response = saveFormdataInLocalStorage(store.ctx.core.data, path)
120
124
  store.setFormdata(_.get(response, path));
125
+ if(shouldUpdateDialog){
126
+ store.updateDialog("popUpEventSection")
127
+ }
128
+ localStorage.removeItem('rowId');
121
129
  },
122
130
  widgetAddClickHandler: function () {
123
131
  if (!Array.isArray(store.formData.elements)) {
@@ -152,6 +160,16 @@ export default (store: any, dynamicData: any, submitHandler: any, service: any)
152
160
  backHandler: function () {
153
161
  store.navigate(-1)
154
162
  },
163
+ deletePopUpComponent: function(){
164
+ const rowId = dynamicData.path.split(".")[1];
165
+ localStorage.setItem('rowId',rowId);
166
+ store.updateDialog("popUpComponentSection");
167
+ },
168
+ deletePopUpEvent: function(){
169
+ const rowId = dynamicData.path.split(".")[1];
170
+ localStorage.setItem('rowId',rowId);
171
+ store.updateDialog("popUpEventSection");
172
+ },
155
173
  }
156
174
  };
157
175
 
@@ -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(store.theme.myTheme));
25
+ const uiSchema = _.cloneDeep(EventUiSchema);
26
26
  const schema: any = _.cloneDeep(EventSchema)
27
27
  if (handlerType) {
28
28
  if (handlerType === "custom") {
29
- uiSchema.elements[0].elements[0].elements[3] = getTextArea("eventCode", "Write Custom Code", false)
29
+ uiSchema.elements[1].elements[0].elements[2] = getTextArea("eventCode", "Write Custom Code", false)
30
30
  schema.required = ["eventType", "Handler", "eventCode"]
31
31
 
32
32
  } else if (handlerType === "api") {
33
- uiSchema.elements[0].elements[0].elements[3] = APISection;
33
+ uiSchema.elements[1].elements[0].elements[2] = APISection;
34
34
  schema.required = ["eventType", "Handler", "method", "path"]
35
35
  } else if (handlerType === "inBuiltFunction") {
36
- uiSchema.elements[0].elements[0].elements[2] = getSelectField("inBuiltFunctionType", "Function Name", [
36
+ uiSchema.elements[1].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[0].elements[0].elements[3] = getTextArea("funcParametersCode", "Write Custom Code for Functions Parameter", true, 12);
41
+ uiSchema.elements[1].elements[0].elements[3] = getTextArea("funcParametersCode", "Write Custom Code for Functions Parameter", true, { xs: 12, sm: 12, md: 6 });
42
42
  schema.required = ["eventType", "Handler", "inBuiltFunctionType"]
43
43
  } else if (handlerType === "refresh") {
44
- uiSchema.elements[0].elements[0].elements[3] = refreshSectionUiSchema;
44
+ uiSchema.elements[1].elements[0].elements[2] = 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: async function () {
56
- return await EventUiSchema(store.theme.myTheme);
55
+ getUiSchema: function () {
56
+ return EventUiSchema;
57
57
  },
58
58
  getSchema: () => {
59
59
  return EventSchema;
@@ -89,9 +89,17 @@ export default (
89
89
  this.setPage()
90
90
 
91
91
  },
92
- deleteEvent: Component(store, dynamicData, submitHandler, service).deleteEvent,
92
+ deleteEvent: async function () {
93
+ await Component(store, dynamicData, submitHandler, service).deleteEvent(false);
94
+ store.updateDialog("popUpEvent");
95
+ },
93
96
  backHandler: function () {
94
97
  store.navigate(-1)
95
98
  },
99
+ deletePopUpEvent: function(){
100
+ const rowId = dynamicData.path.split(".")[1];
101
+ localStorage.setItem('rowId',rowId);
102
+ store.updateDialog("popUpEvent");
103
+ }
96
104
  }
97
105
  };
@@ -34,7 +34,7 @@ export default (funcParams: funcParamsProps) => {
34
34
  return config
35
35
  },
36
36
  getUiSchema: function () {
37
- return PageMasterUiSchema(store.theme.myTheme);
37
+ return PageMasterUiSchema;
38
38
  },
39
39
  getSchema: () => {
40
40
  return PageMasterSchema;
@@ -55,7 +55,11 @@ export default (funcParams: funcParamsProps) => {
55
55
  },
56
56
  saveHandler: async ()=> await saveHandler(store,service,submitHandler),
57
57
  Edit_Components: Component(store, dynamicData, submitHandler, service).editComponents,
58
- Delete_Components: Component(store, dynamicData, submitHandler, service).deleteComponents,
58
+
59
+ Delete_Components: async function() {
60
+ await Component(store, dynamicData, submitHandler, service).deleteComponents(false);
61
+ store.updateDialog("popUpPageMasterComponent");
62
+ },
59
63
  eventAddHandler: function () {
60
64
  const id = store.searchParams?.get("id");
61
65
  if (!Array.isArray(store.formData.events)) {
@@ -73,10 +77,22 @@ export default (funcParams: funcParamsProps) => {
73
77
  store.navigate(`/ComponentEvents?path=${finalPath}&id=${id}`)
74
78
  },
75
79
  deleteEvent: function () {
76
- const rowId = dynamicData.path.split(".")[1];
80
+ const rowId = localStorage.getItem('rowId');
77
81
  store.formData.events.splice(rowId, 1);
78
82
  const response = saveFormdataInLocalStorage(store.ctx.core.data)
79
83
  store.setFormdata(response);
84
+ store.updateDialog("popUpPageMasterEvent");
85
+ localStorage.removeItem('rowId');
86
+ },
87
+ deletePopUpComponent: function(){
88
+ const rowId = dynamicData.path.split(".")[1];
89
+ localStorage.setItem('rowId',rowId);
90
+ store.updateDialog("popUpPageMasterComponent");
91
+ },
92
+ deletePopUpEvent: function(){
93
+ const rowId = dynamicData.path.split(".")[1];
94
+ localStorage.setItem('rowId',rowId);
95
+ store.updateDialog("popUpPageMasterEvent");
80
96
  },
81
97
  }
82
98
  };
@@ -43,7 +43,6 @@ 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);
47
46
  const result = await mergeFormdata(
48
47
  params.parentEventOutput, params.componentName, params.config, params.store, params.service)
49
48
  return result;
@@ -126,26 +125,17 @@ async function mergeFormdata(handlerResponse: any, componentName: string, eventC
126
125
  })
127
126
  }
128
127
  else if (eventConfig.type === "page") {
129
- console.log("console1 : " , handlerResponse);
130
128
  if (!(_.isEmpty(handlerResponse?.data) && handlerResponse?.data)) {
131
- console.log("console2 : " , handlerResponse);
132
129
  store.setFormdata((pre: any) => { return { ...pre, ...handlerResponse?.data } })
133
130
  }
134
131
  }
135
132
  else {
136
133
  if (handlerResponse) {
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};
134
+ store.setFormdata((pre) => { return { ...pre, [componentName]: eventConfig.lazyLoading ? handlerResponse.data.data : handlerResponse.data } });
135
+ if (!store.newData) {
136
+ store.newData = {}
145
137
  }
146
-
147
- store.setFormdata((pre) => { return { ...pre, [componentName]: eventConfig.lazyLoading ? handlerResponse.data.data : body } });
148
- const demoData = await asyncOperation();
138
+ store.newData[componentName] = handlerResponse.data
149
139
  }
150
140
  }
151
141
  }
@@ -119,7 +119,6 @@ export default (funcParams: funcParamsProps) => {
119
119
  },
120
120
  onChange: async function () {
121
121
  if (eventGroups.onChange) {
122
- funcParams.dynamicData?.setLoading(true);
123
122
  const ChangeEventsKeysArray = Object.keys(eventGroups.onChange);
124
123
  Promise.all(ChangeEventsKeysArray.map(async (componentName: string) => {
125
124
  if (
@@ -135,7 +134,6 @@ export default (funcParams: funcParamsProps) => {
135
134
  }
136
135
  }
137
136
  }))
138
- funcParams.dynamicData?.setLoading(false);
139
137
  }
140
138
  },
141
139
  updateConfigApiBody: async function (paramValue, apiBody) {
@@ -173,9 +171,6 @@ export default (funcParams: funcParamsProps) => {
173
171
  functionParameters?.handleNext()
174
172
  }
175
173
  },
176
- backHandler:()=>{
177
- funcParams.store.navigate(-1)
178
- },
179
174
  onReset: async function (functionParameters) {
180
175
  const path = funcParams.dynamicData?.tableButtonPath || funcParams.dynamicData.path.split(".")[0];
181
176
  await this.callHandler("onReset", functionParameters)