impaktapps-ui-builder 0.0.382 → 0.0.383
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 +56 -394
- package/dist/impaktapps-ui-builder.es.js.map +1 -1
- package/dist/impaktapps-ui-builder.umd.js +14 -14
- package/dist/impaktapps-ui-builder.umd.js.map +1 -1
- package/dist/src/impaktapps-ui-builder/runtime/services/downloadFile.d.ts +0 -1
- package/dist/src/impaktapps-ui-builder/runtime/services/service.d.ts +0 -5
- package/package.json +1 -1
- package/src/impaktapps-ui-builder/builder/build/buildFileInput.ts +1 -1
- package/src/impaktapps-ui-builder/builder/build/buildRadio.ts +1 -1
- package/src/impaktapps-ui-builder/builder/build/buildTable.ts +1 -1
- package/src/impaktapps-ui-builder/builder/build/buildUiSchema.ts +8 -28
- package/src/impaktapps-ui-builder/builder/build/buildWrapperSection.ts +0 -7
- package/src/impaktapps-ui-builder/builder/build/uischema/buildPropertiesSection.ts +1 -109
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/schema.ts +0 -43
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/event/schema.ts +3 -7
- package/src/impaktapps-ui-builder/builder/services/component.ts +0 -3
- package/src/impaktapps-ui-builder/builder/services/event.ts +0 -1
- package/src/impaktapps-ui-builder/builder/services/utils.ts +1 -1
- package/src/impaktapps-ui-builder/runtime/services/downloadFile.ts +7 -22
- package/src/impaktapps-ui-builder/runtime/services/events.ts +6 -27
- package/src/impaktapps-ui-builder/runtime/services/service.ts +35 -52
- package/dist/src/impaktapps-ui-builder/builder/build/buildDataGrid.d.ts +0 -1
- package/dist/src/impaktapps-ui-builder/builder/build/buildPop.d.ts +0 -1
- package/dist/src/impaktapps-ui-builder/builder/build/buildStepper.d.ts +0 -1
- package/src/impaktapps-ui-builder/builder/build/buildDataGrid.ts +0 -51
- package/src/impaktapps-ui-builder/builder/build/buildPop.ts +0 -43
- package/src/impaktapps-ui-builder/builder/build/buildStepper.ts +0 -45
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import _
|
|
2
|
-
import {
|
|
1
|
+
import _ from "lodash";
|
|
2
|
+
import { downloadFile } from "./downloadFile";
|
|
3
3
|
import { executeEvents, executeRefreshHandler } from "./events";
|
|
4
4
|
import { handlersProps } from "./interface";
|
|
5
5
|
let compType: string;
|
|
@@ -30,10 +30,7 @@ export const extractEvents = (eventConfig: any) => {
|
|
|
30
30
|
return elem.eventType === "Success"
|
|
31
31
|
})
|
|
32
32
|
if (!(!!SuccessEvent) && event.eventType === "onLoad") {
|
|
33
|
-
event.events.push({ Handler: "mergeFormdata", eventType: "Success", type: compType,
|
|
34
|
-
}
|
|
35
|
-
if (!(!!SuccessEvent) && (event.eventType === "onBack" || event.eventType === "onNext"|| event.eventType === "onReset")) {
|
|
36
|
-
event.events.push({ Handler: `${event.eventType}Handler`, eventType: "Success", type: compType, lazyLoading: eventConfig.lazyLoading === "YES" ? true : false })
|
|
33
|
+
event.events.push({ Handler: "mergeFormdata", eventType: "Success", type: compType,lazyLoading:eventConfig.lazyLoading==="YES"?true:false })
|
|
37
34
|
}
|
|
38
35
|
eventGroups[event.eventType][eventConfigObj.name].push({ ...event, type: compType })
|
|
39
36
|
});
|
|
@@ -62,7 +59,7 @@ export default (funcParams: funcParamsProps) => {
|
|
|
62
59
|
let executeEventsParameters: handlersProps = {
|
|
63
60
|
config: {}, componentName: "",
|
|
64
61
|
store: funcParams.store, dynamicData: funcParams.dynamicData, userValue: funcParams.userValue, service: funcParams.service,
|
|
65
|
-
serviceHolder: {
|
|
62
|
+
serviceHolder: {downloadFile}, eventGroups
|
|
66
63
|
};
|
|
67
64
|
return {
|
|
68
65
|
setPage: async function () {
|
|
@@ -79,33 +76,54 @@ export default (funcParams: funcParamsProps) => {
|
|
|
79
76
|
{ ...funcParams.schema.properties, ...pre.properties, }
|
|
80
77
|
}
|
|
81
78
|
}
|
|
82
|
-
|
|
79
|
+
)
|
|
83
80
|
funcParams.uiSchema.elements.push(notifyUiSchema);
|
|
84
81
|
funcParams.store.setUiSchema(funcParams.uiSchema);
|
|
85
|
-
await executeRefreshHandler({
|
|
82
|
+
await executeRefreshHandler( {
|
|
86
83
|
config: {}, componentName: "",
|
|
87
84
|
store: funcParams.store, dynamicData: funcParams.dynamicData, userValue: funcParams.userValue, service: funcParams.service,
|
|
88
85
|
serviceHolder: this, eventGroups
|
|
89
86
|
})
|
|
90
87
|
},
|
|
91
88
|
onClick: async function () {
|
|
92
|
-
|
|
89
|
+
const path = funcParams.dynamicData?.tableButtonPath || funcParams.dynamicData.path.split(".")[0];
|
|
90
|
+
for (const eventConfig of eventGroups?.onClick[path]) {
|
|
91
|
+
await executeEvents({
|
|
92
|
+
...executeEventsParameters,
|
|
93
|
+
config: eventConfig,
|
|
94
|
+
componentName: path
|
|
95
|
+
})
|
|
96
|
+
}
|
|
93
97
|
},
|
|
94
|
-
onFileDownload:
|
|
95
|
-
|
|
98
|
+
onFileDownload:async () =>{
|
|
99
|
+
const path = funcParams.dynamicData?.tableButtonPath || funcParams.dynamicData.path.split(".")[0];
|
|
100
|
+
for (const eventConfig of eventGroups?.onDownload[path]) {
|
|
101
|
+
await executeEvents({
|
|
102
|
+
...executeEventsParameters,
|
|
103
|
+
config: eventConfig,
|
|
104
|
+
componentName: path
|
|
105
|
+
})
|
|
106
|
+
}
|
|
96
107
|
},
|
|
97
|
-
onFileUpload:
|
|
98
|
-
|
|
108
|
+
onFileUpload:async () =>{
|
|
109
|
+
const path = funcParams.dynamicData?.tableButtonPath || funcParams.dynamicData.path.split(".")[0];
|
|
110
|
+
for (const eventConfig of eventGroups?.onUpload[path]) {
|
|
111
|
+
await executeEvents({
|
|
112
|
+
...executeEventsParameters,
|
|
113
|
+
config: eventConfig,
|
|
114
|
+
componentName: path
|
|
115
|
+
})
|
|
116
|
+
}
|
|
99
117
|
},
|
|
100
118
|
onPaginationChange: async function (paginationValues) {
|
|
101
119
|
const apiBody = [
|
|
102
120
|
{ key: "size", value: paginationValues.pagination.pageSize },
|
|
103
|
-
{ key: "pageIndex", value: paginationValues.pagination.pageIndex
|
|
121
|
+
{ key: "pageIndex", value: paginationValues.pagination.pageIndex },
|
|
104
122
|
{ key: "sorting", value: paginationValues.sorting || [] },
|
|
105
123
|
{ key: "filters", value: paginationValues.columnFilters || [] },
|
|
106
124
|
{ key: "globalFilter", value: paginationValues.globalFilter ?? '' }
|
|
107
125
|
]
|
|
108
|
-
const response =
|
|
126
|
+
const response = await this.updateConfigApiBody(paginationValues, apiBody);
|
|
109
127
|
return response?.data;
|
|
110
128
|
},
|
|
111
129
|
getSelectOptions: async function (param) {
|
|
@@ -157,42 +175,7 @@ export default (funcParams: funcParamsProps) => {
|
|
|
157
175
|
}
|
|
158
176
|
return LastCallResponse
|
|
159
177
|
},
|
|
160
|
-
|
|
161
|
-
const path = funcParams.dynamicData?.tableButtonPath || funcParams.dynamicData.path.split(".")[0];
|
|
162
|
-
await this.callHandler("onBack", functionParameters)
|
|
163
|
-
if (eventGroups?.["onBack"]?.[path] === undefined) {
|
|
164
|
-
functionParameters?.handleBack()
|
|
165
|
-
}
|
|
166
|
-
},
|
|
167
|
-
onNext: async function (functionParameters) {
|
|
168
|
-
const path = funcParams.dynamicData?.tableButtonPath || funcParams.dynamicData.path.split(".")[0];
|
|
169
|
-
await this.callHandler("onNext", functionParameters)
|
|
170
|
-
if (eventGroups?.["onNext"]?.[path] === undefined) {
|
|
171
|
-
functionParameters?.handleNext()
|
|
172
|
-
}
|
|
173
|
-
},
|
|
174
|
-
onReset: async function (functionParameters) {
|
|
175
|
-
const path = funcParams.dynamicData?.tableButtonPath || funcParams.dynamicData.path.split(".")[0];
|
|
176
|
-
await this.callHandler("onReset", functionParameters)
|
|
177
|
-
if (eventGroups?.["onReset"]?.[path] === undefined) {
|
|
178
|
-
functionParameters?.handleReset()
|
|
179
|
-
}
|
|
180
|
-
},
|
|
181
|
-
callHandler: async function (eventType: string, functionParameters?: any) {
|
|
182
|
-
const path = funcParams.dynamicData?.tableButtonPath || funcParams.dynamicData.path.split(".")[0];
|
|
183
|
-
if (eventGroups?.[eventType]?.[path] !== undefined) {
|
|
184
|
-
for (const eventConfig of eventGroups?.[eventType]?.[path]) {
|
|
185
|
-
executeEventsParameters.store.functionParameters = functionParameters
|
|
186
|
-
await executeEvents({
|
|
187
|
-
...executeEventsParameters,
|
|
188
|
-
config: eventConfig,
|
|
189
|
-
componentName: path
|
|
190
|
-
})
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
},
|
|
194
|
-
downloadFile: downloadFile,
|
|
195
|
-
download:doDownload,
|
|
178
|
+
downloadFile: downloadFile
|
|
196
179
|
};
|
|
197
180
|
};
|
|
198
181
|
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const buildDataGrid: (config: any, componentScope: any) => any;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const buildPopUp: (config: any, componentScope: any) => any;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const buildStepper: (config: any, componentScope: any) => any;
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import _ from "lodash";
|
|
2
|
-
import { createLayoutFormat } from "./buildConfig";
|
|
3
|
-
|
|
4
|
-
const dataGrid = {
|
|
5
|
-
"type": "Control",
|
|
6
|
-
"scope": "#/properties/dataGrid",
|
|
7
|
-
"layout": 12,
|
|
8
|
-
"options": {
|
|
9
|
-
"widget": "DataGrid"
|
|
10
|
-
},
|
|
11
|
-
elements: [
|
|
12
|
-
],
|
|
13
|
-
"config": {
|
|
14
|
-
"main": {
|
|
15
|
-
// "label": "Data Grid",
|
|
16
|
-
elevation: 0,
|
|
17
|
-
useWrapper: false
|
|
18
|
-
},
|
|
19
|
-
style: {
|
|
20
|
-
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
export const buildDataGrid = (config, componentScope) => {
|
|
26
|
-
const DataGrid: any = _.cloneDeep(dataGrid);
|
|
27
|
-
DataGrid.scope = componentScope;
|
|
28
|
-
if (config.elevation) {
|
|
29
|
-
DataGrid.config.main.elevation = +config.elevation;
|
|
30
|
-
}
|
|
31
|
-
DataGrid.config.main.divider = config.divider === "NO" ? false : true;
|
|
32
|
-
if (config.height) {
|
|
33
|
-
DataGrid.config.main.height = `${config.height}px`;
|
|
34
|
-
}
|
|
35
|
-
if (config.justifyContent) {
|
|
36
|
-
DataGrid.config.main.justifyContent = config.justifyContent;
|
|
37
|
-
}
|
|
38
|
-
if (config.label) {
|
|
39
|
-
DataGrid.config.main.label = config.label;
|
|
40
|
-
}
|
|
41
|
-
if (config.layout) {
|
|
42
|
-
DataGrid.config.layout = createLayoutFormat(config.layout)
|
|
43
|
-
}
|
|
44
|
-
if (config.cardLayout) {
|
|
45
|
-
DataGrid.config.cardLayout = createLayoutFormat(config.cardLayout)
|
|
46
|
-
}
|
|
47
|
-
if (config.style) {
|
|
48
|
-
DataGrid.config.style = JSON.parse(config.style)
|
|
49
|
-
}
|
|
50
|
-
return DataGrid;
|
|
51
|
-
}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { createLayoutFormat } from "./buildConfig";
|
|
2
|
-
import WrapperSection from "./uischema/wrapperSection";
|
|
3
|
-
import _ from "lodash";
|
|
4
|
-
|
|
5
|
-
const PopUP = {
|
|
6
|
-
type: "Control",
|
|
7
|
-
scope: "#/properties/text",
|
|
8
|
-
options: {
|
|
9
|
-
widget: "PopUp",
|
|
10
|
-
},
|
|
11
|
-
config: {
|
|
12
|
-
layout: {
|
|
13
|
-
xs: 12,
|
|
14
|
-
sm: 12,
|
|
15
|
-
md: 12,
|
|
16
|
-
lg: 12,
|
|
17
|
-
},
|
|
18
|
-
main: {
|
|
19
|
-
label: "PopUp",
|
|
20
|
-
fullScreen:false,
|
|
21
|
-
fullWidth:false,
|
|
22
|
-
maxWidth:false,
|
|
23
|
-
alignItems:false,
|
|
24
|
-
spacing:2
|
|
25
|
-
},
|
|
26
|
-
style:{}
|
|
27
|
-
},
|
|
28
|
-
}
|
|
29
|
-
export const buildPopUp = (config,componentScope) =>{
|
|
30
|
-
const popup: any = _.cloneDeep(PopUP);
|
|
31
|
-
popup.scope = componentScope;
|
|
32
|
-
popup.config.main.title = config.label;
|
|
33
|
-
popup.config.main.fullScreen = config.fullScreen === "YES" ? true : false;
|
|
34
|
-
popup.config.main.fullWidth = config.fullWidth === "YES" ? true : false;
|
|
35
|
-
popup.config.main.maxWidth = config.maxWidth||false;
|
|
36
|
-
if (config.layout) {
|
|
37
|
-
popup.config.layout = createLayoutFormat(config.layout)
|
|
38
|
-
}
|
|
39
|
-
if (config.style) {
|
|
40
|
-
PopUP.config.style = JSON.parse(config.style)
|
|
41
|
-
}
|
|
42
|
-
return popup;
|
|
43
|
-
}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import _ from "lodash";
|
|
2
|
-
import { createLayoutFormat } from "./buildConfig";
|
|
3
|
-
|
|
4
|
-
const Stepper = {
|
|
5
|
-
type: "Control",
|
|
6
|
-
scope: "#/properties/Stepper",
|
|
7
|
-
options: {
|
|
8
|
-
widget: "Stepper",
|
|
9
|
-
},
|
|
10
|
-
|
|
11
|
-
config: {
|
|
12
|
-
main: {
|
|
13
|
-
steps: [{ label: "First" }, { label: "Second" }, { label: "Third" }],
|
|
14
|
-
resetButton: false,
|
|
15
|
-
resetText: "Reset",
|
|
16
|
-
orientation: "vertical"
|
|
17
|
-
},
|
|
18
|
-
},
|
|
19
|
-
"elements":
|
|
20
|
-
[],
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
export const buildStepper = (config, componentScope) => {
|
|
24
|
-
const stepper: any = _.cloneDeep(Stepper);
|
|
25
|
-
stepper.scope = componentScope;
|
|
26
|
-
stepper.config.main.resetButton = config.resetButton === "YES" ? true : false;
|
|
27
|
-
if (config.defaultButtonAvailable) {
|
|
28
|
-
stepper.config.main.defaultButtonAvailable = config.defaultButtonAvailable === "YES" ? true : false;
|
|
29
|
-
}
|
|
30
|
-
stepper.config.main.resetText = config.resetText || "ResetData";
|
|
31
|
-
stepper.config.main.completeText = config.completeText || "Complete Text";
|
|
32
|
-
stepper.config.main.orientation = config.orientation || "horizontal";
|
|
33
|
-
if (config.sectionLabels) {
|
|
34
|
-
stepper.config.main.steps = config.sectionLabels.map((e, i: number) => {
|
|
35
|
-
return { label: e.label, id: i }
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
if (config.layout) {
|
|
39
|
-
stepper.config.layout = createLayoutFormat(config.layout)
|
|
40
|
-
}
|
|
41
|
-
if (config.style) {
|
|
42
|
-
stepper.config.style = JSON.parse(config.style)
|
|
43
|
-
}
|
|
44
|
-
return stepper;
|
|
45
|
-
}
|