impaktapps-ui-builder 0.0.382-alpha.553 → 0.0.382-alpha.56
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/dist/impaktapps-ui-builder.es.js +1230 -1821
- package/dist/impaktapps-ui-builder.es.js.map +1 -1
- package/dist/impaktapps-ui-builder.umd.js +15 -15
- package/dist/impaktapps-ui-builder.umd.js.map +1 -1
- package/dist/src/impaktapps-ui-builder/builder/build/buildBasicUiSchema.d.ts +1 -0
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/apiSection.d.ts +35 -2
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/card.d.ts +10 -12
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/coreSection.d.ts +15 -18
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/eventSection.d.ts +70 -121
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/graph.d.ts +1 -115
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/tableSection.d.ts +53 -102
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/validationSections.d.ts +17 -2
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/valueTab.d.ts +17 -2
- package/dist/src/impaktapps-ui-builder/builder/services/component.d.ts +2 -4
- package/dist/src/impaktapps-ui-builder/builder/services/event.d.ts +2 -3
- package/dist/src/impaktapps-ui-builder/builder/services/pageMaster.d.ts +1 -3
- package/dist/src/impaktapps-ui-builder/runtime/services/service.d.ts +1 -0
- package/package.json +1 -1
- package/src/impaktapps-ui-builder/builder/build/buildBasicUiSchema.ts +1 -0
- package/src/impaktapps-ui-builder/builder/build/buildHorizontalBarGraph.ts +30 -26
- package/src/impaktapps-ui-builder/builder/build/buildPieGraph.ts +30 -21
- package/src/impaktapps-ui-builder/builder/build/buildStackBarGraph.ts +6 -6
- package/src/impaktapps-ui-builder/builder/build/buildWrapperSection.ts +3 -1
- package/src/impaktapps-ui-builder/builder/build/uischema/apiSection.ts +50 -27
- package/src/impaktapps-ui-builder/builder/build/uischema/buildPropertiesSection.ts +30 -49
- package/src/impaktapps-ui-builder/builder/build/uischema/card.ts +9 -10
- package/src/impaktapps-ui-builder/builder/build/uischema/coreSection.ts +16 -36
- package/src/impaktapps-ui-builder/builder/build/uischema/dateInputField.ts +1 -6
- package/src/impaktapps-ui-builder/builder/build/uischema/emptyBox.ts +1 -1
- package/src/impaktapps-ui-builder/builder/build/uischema/eventSection.ts +99 -125
- package/src/impaktapps-ui-builder/builder/build/uischema/graph.ts +108 -110
- package/src/impaktapps-ui-builder/builder/build/uischema/multiSelect.ts +1 -1
- package/src/impaktapps-ui-builder/builder/build/uischema/refresh.ts +2 -12
- package/src/impaktapps-ui-builder/builder/build/uischema/selectInputField.ts +1 -6
- package/src/impaktapps-ui-builder/builder/build/uischema/tableSection.ts +84 -58
- package/src/impaktapps-ui-builder/builder/build/uischema/textInputField.ts +1 -6
- package/src/impaktapps-ui-builder/builder/build/uischema/validationSections.ts +12 -12
- package/src/impaktapps-ui-builder/builder/build/uischema/valueTab.ts +12 -12
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/uiSchema.ts +448 -440
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/PageMaster/uiSchema.ts +456 -515
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/event/uiSchema.ts +520 -367
- package/src/impaktapps-ui-builder/builder/services/component.ts +7 -25
- package/src/impaktapps-ui-builder/builder/services/event.ts +9 -17
- package/src/impaktapps-ui-builder/builder/services/pageMaster.ts +3 -19
- package/src/impaktapps-ui-builder/runtime/services/events.ts +3 -0
- package/src/impaktapps-ui-builder/runtime/services/service.ts +4 -14
|
@@ -41,7 +41,7 @@ const sectionLabels = {
|
|
|
41
41
|
|
|
42
42
|
|
|
43
43
|
export const refreshPage = (type:string,store:any) => {
|
|
44
|
-
const UiSchema = _.cloneDeep(componentBasicUiSchema)
|
|
44
|
+
const UiSchema = _.cloneDeep(componentBasicUiSchema(store.theme.myTheme))
|
|
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[
|
|
58
|
-
UiSchema.elements[
|
|
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);
|
|
@@ -104,28 +104,20 @@ 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 () {
|
|
108
108
|
const path = store.searchParams?.get("path");
|
|
109
|
-
const rowId =
|
|
109
|
+
const rowId = dynamicData.path.split(".")[1];
|
|
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');
|
|
118
114
|
},
|
|
119
|
-
deleteEvent: function (
|
|
115
|
+
deleteEvent: function () {
|
|
120
116
|
const path = store.searchParams?.get("path");
|
|
121
|
-
const rowId =
|
|
117
|
+
const rowId = dynamicData.path.split(".")[1];
|
|
122
118
|
store.formData.events.splice(rowId, 1);
|
|
123
119
|
const response = saveFormdataInLocalStorage(store.ctx.core.data, path)
|
|
124
120
|
store.setFormdata(_.get(response, path));
|
|
125
|
-
if(shouldUpdateDialog){
|
|
126
|
-
store.updateDialog("popUpEventSection")
|
|
127
|
-
}
|
|
128
|
-
localStorage.removeItem('rowId');
|
|
129
121
|
},
|
|
130
122
|
widgetAddClickHandler: function () {
|
|
131
123
|
if (!Array.isArray(store.formData.elements)) {
|
|
@@ -160,16 +152,6 @@ export default (store: any, dynamicData: any, submitHandler: any, service: any)
|
|
|
160
152
|
backHandler: function () {
|
|
161
153
|
store.navigate(-1)
|
|
162
154
|
},
|
|
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
|
-
},
|
|
173
155
|
}
|
|
174
156
|
};
|
|
175
157
|
|
|
@@ -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[
|
|
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[
|
|
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[
|
|
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[
|
|
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[
|
|
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;
|
|
@@ -89,17 +89,9 @@ export default (
|
|
|
89
89
|
this.setPage()
|
|
90
90
|
|
|
91
91
|
},
|
|
92
|
-
deleteEvent:
|
|
93
|
-
await Component(store, dynamicData, submitHandler, service).deleteEvent(false);
|
|
94
|
-
store.updateDialog("popUpEvent");
|
|
95
|
-
},
|
|
92
|
+
deleteEvent: Component(store, dynamicData, submitHandler, service).deleteEvent,
|
|
96
93
|
backHandler: function () {
|
|
97
94
|
store.navigate(-1)
|
|
98
95
|
},
|
|
99
|
-
deletePopUpEvent: function(){
|
|
100
|
-
const rowId = dynamicData.path.split(".")[1];
|
|
101
|
-
localStorage.setItem('rowId',rowId);
|
|
102
|
-
store.updateDialog("popUpEvent");
|
|
103
|
-
}
|
|
104
96
|
}
|
|
105
97
|
};
|
|
@@ -34,7 +34,7 @@ export default (funcParams: funcParamsProps) => {
|
|
|
34
34
|
return config
|
|
35
35
|
},
|
|
36
36
|
getUiSchema: function () {
|
|
37
|
-
return PageMasterUiSchema;
|
|
37
|
+
return PageMasterUiSchema(store.theme.myTheme);
|
|
38
38
|
},
|
|
39
39
|
getSchema: () => {
|
|
40
40
|
return PageMasterSchema;
|
|
@@ -55,11 +55,7 @@ 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
|
-
|
|
59
|
-
Delete_Components: async function() {
|
|
60
|
-
await Component(store, dynamicData, submitHandler, service).deleteComponents(false);
|
|
61
|
-
store.updateDialog("popUpPageMasterComponent");
|
|
62
|
-
},
|
|
58
|
+
Delete_Components: Component(store, dynamicData, submitHandler, service).deleteComponents,
|
|
63
59
|
eventAddHandler: function () {
|
|
64
60
|
const id = store.searchParams?.get("id");
|
|
65
61
|
if (!Array.isArray(store.formData.events)) {
|
|
@@ -77,22 +73,10 @@ export default (funcParams: funcParamsProps) => {
|
|
|
77
73
|
store.navigate(`/ComponentEvents?path=${finalPath}&id=${id}`)
|
|
78
74
|
},
|
|
79
75
|
deleteEvent: function () {
|
|
80
|
-
const rowId =
|
|
76
|
+
const rowId = dynamicData.path.split(".")[1];
|
|
81
77
|
store.formData.events.splice(rowId, 1);
|
|
82
78
|
const response = saveFormdataInLocalStorage(store.ctx.core.data)
|
|
83
79
|
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");
|
|
96
80
|
},
|
|
97
81
|
}
|
|
98
82
|
};
|
|
@@ -125,12 +125,15 @@ async function mergeFormdata(handlerResponse: any, componentName: string, eventC
|
|
|
125
125
|
})
|
|
126
126
|
}
|
|
127
127
|
else if (eventConfig.type === "page") {
|
|
128
|
+
console.log("console1 : " , handlerResponse);
|
|
128
129
|
if (!(_.isEmpty(handlerResponse?.data) && handlerResponse?.data)) {
|
|
130
|
+
console.log("console2 : " , handlerResponse);
|
|
129
131
|
store.setFormdata((pre: any) => { return { ...pre, ...handlerResponse?.data } })
|
|
130
132
|
}
|
|
131
133
|
}
|
|
132
134
|
else {
|
|
133
135
|
if (handlerResponse) {
|
|
136
|
+
console.log("console3 : " , handlerResponse);
|
|
134
137
|
store.setFormdata((pre) => { return { ...pre, [componentName]: eventConfig.lazyLoading ? handlerResponse.data.data : handlerResponse.data } });
|
|
135
138
|
const demoData = await asyncOperation();
|
|
136
139
|
}
|
|
@@ -66,9 +66,7 @@ export default (funcParams: funcParamsProps) => {
|
|
|
66
66
|
};
|
|
67
67
|
return {
|
|
68
68
|
setPage: async function () {
|
|
69
|
-
funcParams.store.setFormdata(
|
|
70
|
-
return {}
|
|
71
|
-
});
|
|
69
|
+
funcParams.store.setFormdata({});
|
|
72
70
|
executeEventsParameters = {
|
|
73
71
|
config: {}, componentName: "",
|
|
74
72
|
store: funcParams.store, dynamicData: funcParams.dynamicData, userValue: funcParams.userValue, service: funcParams.service,
|
|
@@ -84,17 +82,6 @@ export default (funcParams: funcParamsProps) => {
|
|
|
84
82
|
)
|
|
85
83
|
funcParams.uiSchema.elements.push(notifyUiSchema);
|
|
86
84
|
funcParams.store.setUiSchema(funcParams.uiSchema);
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
const simulateDelay = async(time) => {
|
|
90
|
-
// return new Promise(resolve => setTimeout(resolve,time));
|
|
91
|
-
return new Promise((resolve) => {
|
|
92
|
-
return setTimeout(resolve,time);
|
|
93
|
-
})
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
await simulateDelay(3000);
|
|
97
|
-
|
|
98
85
|
await executeRefreshHandler({
|
|
99
86
|
config: {}, componentName: "",
|
|
100
87
|
store: funcParams.store, dynamicData: funcParams.dynamicData, userValue: funcParams.userValue, service: funcParams.service,
|
|
@@ -184,6 +171,9 @@ export default (funcParams: funcParamsProps) => {
|
|
|
184
171
|
functionParameters?.handleNext()
|
|
185
172
|
}
|
|
186
173
|
},
|
|
174
|
+
backHandler:()=>{
|
|
175
|
+
funcParams.store.navigate(-1)
|
|
176
|
+
},
|
|
187
177
|
onReset: async function (functionParameters) {
|
|
188
178
|
const path = funcParams.dynamicData?.tableButtonPath || funcParams.dynamicData.path.split(".")[0];
|
|
189
179
|
await this.callHandler("onReset", functionParameters)
|