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.
- package/dist/impaktapps-ui-builder.es.js +890 -1032
- 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 -108
- 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/event.d.ts +1 -1
- 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 -108
- 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 -56
- 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 +294 -143
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/PageMaster/uiSchema.ts +399 -294
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/event/uiSchema.ts +522 -283
- package/src/impaktapps-ui-builder/builder/services/component.ts +2 -2
- package/src/impaktapps-ui-builder/builder/services/event.ts +8 -8
- package/src/impaktapps-ui-builder/runtime/services/events.ts +14 -1
- 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[
|
|
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);
|
|
@@ -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;
|
|
@@ -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
|
-
|
|
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)
|