impaktapps-ui-builder 0.0.382-alpha.316 → 0.0.382-alpha.33
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 +1255 -1681
- package/dist/impaktapps-ui-builder.es.js.map +1 -1
- package/dist/impaktapps-ui-builder.umd.js +12 -12
- 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/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/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/package.json +1 -1
- package/src/impaktapps-ui-builder/builder/build/buildBasicUiSchema.ts +1 -0
- 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/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 +79 -52
- 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 +340 -525
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/PageMaster/uiSchema.ts +328 -582
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/event/uiSchema.ts +391 -437
- package/src/impaktapps-ui-builder/builder/services/component.ts +7 -29
- package/src/impaktapps-ui-builder/builder/services/event.ts +9 -17
- package/src/impaktapps-ui-builder/builder/services/pageMaster.ts +3 -20
- package/src/impaktapps-ui-builder/runtime/services/service.ts +3 -3
|
@@ -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,32 +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
|
-
|
|
110
|
-
const rowId = localStorage.getItem('rowId');
|
|
109
|
+
const rowId = dynamicData.path.split(".")[1];
|
|
111
110
|
store.formData.elements.splice(rowId, 1);
|
|
112
111
|
const response = saveFormdataInLocalStorage(store.ctx.core.data, path)
|
|
113
112
|
const data = path ? _.get(response, path) : response;
|
|
114
113
|
store.setFormdata(data);
|
|
115
|
-
// store.updateDialog("popUpComponent");
|
|
116
|
-
if(shouldUpdateDialog){
|
|
117
|
-
store.updateDialog("popUpComponentSection");
|
|
118
|
-
}
|
|
119
|
-
localStorage.removeItem('rowId');
|
|
120
114
|
},
|
|
121
|
-
deleteEvent: function (
|
|
115
|
+
deleteEvent: function () {
|
|
122
116
|
const path = store.searchParams?.get("path");
|
|
123
|
-
const rowId =
|
|
124
|
-
// const rowId = dynamicData.path.split(".")[1];
|
|
117
|
+
const rowId = dynamicData.path.split(".")[1];
|
|
125
118
|
store.formData.events.splice(rowId, 1);
|
|
126
119
|
const response = saveFormdataInLocalStorage(store.ctx.core.data, path)
|
|
127
120
|
store.setFormdata(_.get(response, path));
|
|
128
|
-
// store.updateDialog("popUpEvent")
|
|
129
|
-
if(shouldUpdateDialog){
|
|
130
|
-
store.updateDialog("popUpEventSection")
|
|
131
|
-
}
|
|
132
|
-
localStorage.removeItem('rowId');
|
|
133
121
|
},
|
|
134
122
|
widgetAddClickHandler: function () {
|
|
135
123
|
if (!Array.isArray(store.formData.elements)) {
|
|
@@ -164,16 +152,6 @@ export default (store: any, dynamicData: any, submitHandler: any, service: any)
|
|
|
164
152
|
backHandler: function () {
|
|
165
153
|
store.navigate(-1)
|
|
166
154
|
},
|
|
167
|
-
deletePopUpComponent: function(){
|
|
168
|
-
const rowId = dynamicData.path.split(".")[1];
|
|
169
|
-
localStorage.setItem('rowId',rowId);
|
|
170
|
-
store.updateDialog("popUpComponentSection");
|
|
171
|
-
},
|
|
172
|
-
deletePopUpEvent: function(){
|
|
173
|
-
const rowId = dynamicData.path.split(".")[1];
|
|
174
|
-
localStorage.setItem('rowId',rowId);
|
|
175
|
-
store.updateDialog("popUpEventSection");
|
|
176
|
-
},
|
|
177
155
|
}
|
|
178
156
|
};
|
|
179
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,23 +73,10 @@ export default (funcParams: funcParamsProps) => {
|
|
|
77
73
|
store.navigate(`/ComponentEvents?path=${finalPath}&id=${id}`)
|
|
78
74
|
},
|
|
79
75
|
deleteEvent: function () {
|
|
80
|
-
const rowId =
|
|
81
|
-
// const rowId = dynamicData.path.split(".")[1];
|
|
76
|
+
const rowId = dynamicData.path.split(".")[1];
|
|
82
77
|
store.formData.events.splice(rowId, 1);
|
|
83
78
|
const response = saveFormdataInLocalStorage(store.ctx.core.data)
|
|
84
79
|
store.setFormdata(response);
|
|
85
|
-
store.updateDialog("popUpPageMasterEvent");
|
|
86
|
-
localStorage.removeItem('rowId');
|
|
87
|
-
},
|
|
88
|
-
deletePopUpComponent: function(){
|
|
89
|
-
const rowId = dynamicData.path.split(".")[1];
|
|
90
|
-
localStorage.setItem('rowId',rowId);
|
|
91
|
-
store.updateDialog("popUpPageMasterComponent");
|
|
92
|
-
},
|
|
93
|
-
deletePopUpEvent: function(){
|
|
94
|
-
const rowId = dynamicData.path.split(".")[1];
|
|
95
|
-
localStorage.setItem('rowId',rowId);
|
|
96
|
-
store.updateDialog("popUpPageMasterEvent");
|
|
97
80
|
},
|
|
98
81
|
}
|
|
99
82
|
};
|
|
@@ -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 () {
|
|
@@ -192,7 +192,7 @@ export default (funcParams: funcParamsProps) => {
|
|
|
192
192
|
}
|
|
193
193
|
},
|
|
194
194
|
downloadFile: downloadFile,
|
|
195
|
-
download:doDownload,
|
|
195
|
+
download: doDownload,
|
|
196
196
|
};
|
|
197
197
|
};
|
|
198
198
|
|