impaktapps-ui-builder 0.0.382-alpha.44 → 0.0.382-alpha.550

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 +1701 -1197
  2. package/dist/impaktapps-ui-builder.es.js.map +1 -1
  3. package/dist/impaktapps-ui-builder.umd.js +12 -12
  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 +1 -1
  11. package/dist/src/impaktapps-ui-builder/builder/build/uischema/tableSection.d.ts +102 -53
  12. package/dist/src/impaktapps-ui-builder/builder/build/uischema/validationSections.d.ts +2 -17
  13. package/dist/src/impaktapps-ui-builder/builder/build/uischema/valueTab.d.ts +2 -17
  14. package/dist/src/impaktapps-ui-builder/builder/services/component.d.ts +4 -2
  15. package/dist/src/impaktapps-ui-builder/builder/services/event.d.ts +3 -2
  16. package/dist/src/impaktapps-ui-builder/builder/services/pageMaster.d.ts +3 -1
  17. package/dist/src/impaktapps-ui-builder/runtime/services/service.d.ts +0 -1
  18. package/package.json +1 -1
  19. package/src/impaktapps-ui-builder/builder/build/buildBasicUiSchema.ts +0 -1
  20. package/src/impaktapps-ui-builder/builder/build/buildStackBarGraph.ts +5 -5
  21. package/src/impaktapps-ui-builder/builder/build/buildWrapperSection.ts +1 -3
  22. package/src/impaktapps-ui-builder/builder/build/uischema/apiSection.ts +27 -50
  23. package/src/impaktapps-ui-builder/builder/build/uischema/buildPropertiesSection.ts +49 -30
  24. package/src/impaktapps-ui-builder/builder/build/uischema/card.ts +10 -9
  25. package/src/impaktapps-ui-builder/builder/build/uischema/coreSection.ts +36 -16
  26. package/src/impaktapps-ui-builder/builder/build/uischema/dateInputField.ts +6 -1
  27. package/src/impaktapps-ui-builder/builder/build/uischema/emptyBox.ts +1 -1
  28. package/src/impaktapps-ui-builder/builder/build/uischema/eventSection.ts +125 -99
  29. package/src/impaktapps-ui-builder/builder/build/uischema/graph.ts +1 -1
  30. package/src/impaktapps-ui-builder/builder/build/uischema/multiSelect.ts +1 -1
  31. package/src/impaktapps-ui-builder/builder/build/uischema/refresh.ts +12 -2
  32. package/src/impaktapps-ui-builder/builder/build/uischema/selectInputField.ts +6 -1
  33. package/src/impaktapps-ui-builder/builder/build/uischema/tableSection.ts +58 -84
  34. package/src/impaktapps-ui-builder/builder/build/uischema/textInputField.ts +6 -1
  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 +442 -342
  38. package/src/impaktapps-ui-builder/builder/elements/UiSchema/PageMaster/uiSchema.ts +496 -329
  39. package/src/impaktapps-ui-builder/builder/elements/UiSchema/event/uiSchema.ts +353 -398
  40. package/src/impaktapps-ui-builder/builder/services/component.ts +25 -7
  41. package/src/impaktapps-ui-builder/builder/services/event.ts +17 -9
  42. package/src/impaktapps-ui-builder/builder/services/pageMaster.ts +19 -3
  43. package/src/impaktapps-ui-builder/runtime/services/service.ts +14 -6
@@ -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
  };
@@ -32,7 +32,7 @@ export const extractEvents = (eventConfig: any) => {
32
32
  if (!(!!SuccessEvent) && event.eventType === "onLoad") {
33
33
  event.events.push({ Handler: "mergeFormdata", eventType: "Success", type: compType, lazyLoading: eventConfig.lazyLoading === "YES" ? true : false })
34
34
  }
35
- if (!(!!SuccessEvent) && (event.eventType === "onBack" || event.eventType === "onNext" || event.eventType === "onReset")) {
35
+ if (!(!!SuccessEvent) && (event.eventType === "onBack" || event.eventType === "onNext"|| event.eventType === "onReset")) {
36
36
  event.events.push({ Handler: `${event.eventType}Handler`, eventType: "Success", type: compType, lazyLoading: eventConfig.lazyLoading === "YES" ? true : false })
37
37
  }
38
38
  eventGroups[event.eventType][eventConfigObj.name].push({ ...event, type: compType })
@@ -62,7 +62,7 @@ export default (funcParams: funcParamsProps) => {
62
62
  let executeEventsParameters: handlersProps = {
63
63
  config: {}, componentName: "",
64
64
  store: funcParams.store, dynamicData: funcParams.dynamicData, userValue: funcParams.userValue, service: funcParams.service,
65
- serviceHolder: { downloadFile, download: doDownload }, eventGroups
65
+ serviceHolder: { downloadFile,download:doDownload }, eventGroups
66
66
  };
67
67
  return {
68
68
  setPage: async function () {
@@ -82,6 +82,17 @@ export default (funcParams: funcParamsProps) => {
82
82
  )
83
83
  funcParams.uiSchema.elements.push(notifyUiSchema);
84
84
  funcParams.store.setUiSchema(funcParams.uiSchema);
85
+
86
+
87
+ const simulateDelay = async(time) => {
88
+ // return new Promise(resolve => setTimeout(resolve,time));
89
+ return new Promise((resolve) => {
90
+ return setTimeout(resolve,time);
91
+ })
92
+ }
93
+
94
+ await simulateDelay(3000);
95
+
85
96
  await executeRefreshHandler({
86
97
  config: {}, componentName: "",
87
98
  store: funcParams.store, dynamicData: funcParams.dynamicData, userValue: funcParams.userValue, service: funcParams.service,
@@ -171,9 +182,6 @@ export default (funcParams: funcParamsProps) => {
171
182
  functionParameters?.handleNext()
172
183
  }
173
184
  },
174
- backHandler:()=>{
175
- funcParams.store.navigate(-1)
176
- },
177
185
  onReset: async function (functionParameters) {
178
186
  const path = funcParams.dynamicData?.tableButtonPath || funcParams.dynamicData.path.split(".")[0];
179
187
  await this.callHandler("onReset", functionParameters)
@@ -195,7 +203,7 @@ export default (funcParams: funcParamsProps) => {
195
203
  }
196
204
  },
197
205
  downloadFile: downloadFile,
198
- download: doDownload,
206
+ download:doDownload,
199
207
  };
200
208
  };
201
209