impaktapps-ui-builder 0.0.383 → 0.0.382456
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 +395 -55
- 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/builder/build/buildDataGrid.d.ts +1 -0
- package/dist/src/impaktapps-ui-builder/builder/build/buildPop.d.ts +1 -0
- package/dist/src/impaktapps-ui-builder/builder/build/buildStepper.d.ts +1 -0
- package/dist/src/impaktapps-ui-builder/runtime/services/downloadFile.d.ts +1 -0
- package/dist/src/impaktapps-ui-builder/runtime/services/service.d.ts +5 -0
- package/package.json +1 -1
- package/src/impaktapps-ui-builder/builder/build/buildButton.ts +2 -0
- package/src/impaktapps-ui-builder/builder/build/buildDataGrid.ts +51 -0
- package/src/impaktapps-ui-builder/builder/build/buildFileInput.ts +1 -1
- package/src/impaktapps-ui-builder/builder/build/buildPop.ts +43 -0
- package/src/impaktapps-ui-builder/builder/build/buildRadio.ts +1 -1
- package/src/impaktapps-ui-builder/builder/build/buildStepper.ts +45 -0
- package/src/impaktapps-ui-builder/builder/build/buildTable.ts +1 -1
- package/src/impaktapps-ui-builder/builder/build/buildUiSchema.ts +28 -8
- package/src/impaktapps-ui-builder/builder/build/buildWrapperSection.ts +7 -0
- package/src/impaktapps-ui-builder/builder/build/uischema/buildPropertiesSection.ts +109 -1
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/schema.ts +43 -0
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/event/schema.ts +7 -3
- package/src/impaktapps-ui-builder/builder/services/component.ts +3 -0
- package/src/impaktapps-ui-builder/builder/services/event.ts +1 -0
- package/src/impaktapps-ui-builder/builder/services/utils.ts +1 -1
- package/src/impaktapps-ui-builder/runtime/services/downloadFile.ts +22 -7
- package/src/impaktapps-ui-builder/runtime/services/events.ts +26 -5
- package/src/impaktapps-ui-builder/runtime/services/service.ts +52 -35
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const buildDataGrid: (config: any, componentScope: any) => any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const buildPopUp: (config: any, componentScope: any) => any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const buildStepper: (config: any, componentScope: any) => any;
|
|
@@ -17,6 +17,11 @@ declare const _default: (funcParams: funcParamsProps) => {
|
|
|
17
17
|
getSelectOptions: (param: any) => Promise<any>;
|
|
18
18
|
onChange: () => Promise<void>;
|
|
19
19
|
updateConfigApiBody: (paramValue: any, apiBody: any) => Promise<any>;
|
|
20
|
+
onBack: (functionParameters: any) => Promise<void>;
|
|
21
|
+
onNext: (functionParameters: any) => Promise<void>;
|
|
22
|
+
onReset: (functionParameters: any) => Promise<void>;
|
|
23
|
+
callHandler: (eventType: string, functionParameters?: any) => Promise<void>;
|
|
20
24
|
downloadFile: (obj: any) => void;
|
|
25
|
+
download: (response: any, service: any) => void;
|
|
21
26
|
};
|
|
22
27
|
export default _default;
|
package/package.json
CHANGED
|
@@ -3,6 +3,8 @@ import _ from "lodash";
|
|
|
3
3
|
import { createLayoutFormat } from "./buildConfig";
|
|
4
4
|
|
|
5
5
|
export const buildButton = (config:any,componentScope:string) =>{
|
|
6
|
+
console.log("config : " , config);
|
|
7
|
+
console.log("componentScope : ", componentScope);
|
|
6
8
|
const button:any = _.cloneDeep(Button);
|
|
7
9
|
if (config.buttonType) {
|
|
8
10
|
button.options.widget = config.buttonType === "IconButton" ? "IconButton" : "Button";
|
|
@@ -0,0 +1,51 @@
|
|
|
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
|
+
}
|
|
@@ -24,7 +24,7 @@ const FileInput = {
|
|
|
24
24
|
export const buildFileInput = (config,componentScope) => {
|
|
25
25
|
const box: any = _.cloneDeep(FileInput);
|
|
26
26
|
box.scope = componentScope;
|
|
27
|
-
box.config.main.
|
|
27
|
+
box.config.main.label = config.label
|
|
28
28
|
if(config.layout){
|
|
29
29
|
box.config.layout = createLayoutFormat(config.layout)
|
|
30
30
|
}
|
|
@@ -0,0 +1,43 @@
|
|
|
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
|
+
}
|
|
@@ -21,7 +21,7 @@ const RadioUiSchema = {
|
|
|
21
21
|
export const buildRadio = (config,componentScope) => {
|
|
22
22
|
const Radio: any = _.cloneDeep(RadioUiSchema);
|
|
23
23
|
Radio.scope = componentScope;
|
|
24
|
-
Radio.config.main.
|
|
24
|
+
Radio.config.main.label = config.label
|
|
25
25
|
if(config.layout){
|
|
26
26
|
Radio.config.layout = createLayoutFormat(config.layout)
|
|
27
27
|
}
|
|
@@ -0,0 +1,45 @@
|
|
|
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
|
+
}
|
|
@@ -16,7 +16,7 @@ export const buildTable = (config: any, componentScope: string) => {
|
|
|
16
16
|
table.config.main.Selection = config.SelectionAvailable === "YES" ? true : false
|
|
17
17
|
};
|
|
18
18
|
if (config.ColumnResizingAvailable) {
|
|
19
|
-
table.config.main.disableColumnResizing = config.ColumnResizingAvailable === "YES" ?
|
|
19
|
+
table.config.main.disableColumnResizing = config.ColumnResizingAvailable === "YES" ? false : true
|
|
20
20
|
};
|
|
21
21
|
if (config.DragAvailable) {
|
|
22
22
|
table.config.main.enableDrag = config.DragAvailable === "YES" ? true : false
|
|
@@ -34,6 +34,9 @@ import { buildEmptyBox } from "./buildEmptyBox";
|
|
|
34
34
|
import { buildArray } from "./buildArray";
|
|
35
35
|
import { buildAdhaarField, buildPanField } from "./buildAadharCard";
|
|
36
36
|
import { buildFileInput } from "./buildFileInput";
|
|
37
|
+
import { buildStepper } from "./buildStepper";
|
|
38
|
+
import { buildPopUp } from "./buildPop";
|
|
39
|
+
import { buildDataGrid } from "./buildDataGrid";
|
|
37
40
|
export let schema = {
|
|
38
41
|
type: "object",
|
|
39
42
|
properties: {},
|
|
@@ -64,14 +67,14 @@ function buildRule(configObj: any, tableName?: string, arrayHolderName?: boolean
|
|
|
64
67
|
}
|
|
65
68
|
}
|
|
66
69
|
} else if ((configObj.type === "Select" || configObj.type === "MultipleSelect") && configObj.value?.length > 0) {
|
|
67
|
-
if (configObj.type === "Select"
|
|
70
|
+
if (configObj.type === "Select") {
|
|
68
71
|
schema.properties[configObj.name] = {
|
|
69
72
|
oneOf: configObj.value.map((e) => {
|
|
70
73
|
return { const: e.value, title: e.label }
|
|
71
74
|
})
|
|
72
75
|
}
|
|
73
76
|
}
|
|
74
|
-
else if (configObj.type === "MultipleSelect"
|
|
77
|
+
else if (configObj.type === "MultipleSelect") {
|
|
75
78
|
schema.properties[configObj.name] = {
|
|
76
79
|
items: {
|
|
77
80
|
oneOf: configObj.value.map((e) => {
|
|
@@ -164,21 +167,30 @@ const buildUiSchema = (config: any) => {
|
|
|
164
167
|
let elements: any = {};
|
|
165
168
|
const componentScope = `#/properties/${config.name}`;
|
|
166
169
|
switch (config.type) {
|
|
170
|
+
case "DataGrid":
|
|
171
|
+
elements = buildDataGrid(config, componentScope);
|
|
172
|
+
break;
|
|
173
|
+
case "Stepper":
|
|
174
|
+
elements = buildStepper(config, componentScope);
|
|
175
|
+
break;
|
|
176
|
+
case "PopUp":
|
|
177
|
+
elements = buildPopUp(config, componentScope);
|
|
178
|
+
break;
|
|
167
179
|
case "FileInput":
|
|
168
180
|
elements = buildFileInput(config, componentScope);
|
|
169
181
|
break;
|
|
170
182
|
case "AadharcardText":
|
|
171
183
|
elements = buildAdhaarField(config, componentScope);
|
|
172
184
|
break;
|
|
173
|
-
|
|
185
|
+
case "PanCardText":
|
|
174
186
|
elements = buildPanField(config, componentScope);
|
|
175
187
|
break;
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
188
|
+
case "TabSection":
|
|
189
|
+
elements = buildTabSection(config, componentScope);
|
|
190
|
+
break;
|
|
179
191
|
case "RunnerBoyProgressBar":
|
|
180
192
|
elements = RunnerBoyProgressbar(config, componentScope);
|
|
181
|
-
|
|
193
|
+
break;
|
|
182
194
|
case "WrapperSection":
|
|
183
195
|
elements = buildWrapperSection(config, componentScope);
|
|
184
196
|
break;
|
|
@@ -287,17 +299,25 @@ const buildUiSchema = (config: any) => {
|
|
|
287
299
|
return elements;
|
|
288
300
|
}
|
|
289
301
|
else if (config.type == "Table") {
|
|
302
|
+
const sizeMap = {}
|
|
303
|
+
if (config.sizeHolder) {
|
|
304
|
+
config.sizeHolder.map((e, i) => {
|
|
305
|
+
sizeMap[e.keyName] = e.value
|
|
306
|
+
});
|
|
307
|
+
}
|
|
290
308
|
elements.elements = config.elements.map((e, elemInd) => {
|
|
291
309
|
if (e.type) {
|
|
292
310
|
return {
|
|
293
311
|
accessorKey: e.name,
|
|
294
312
|
header: e.label || e.name,
|
|
313
|
+
size: sizeMap[e.name]|| 180,
|
|
295
314
|
widget: buildUiSchema(e)
|
|
296
315
|
}
|
|
297
316
|
}
|
|
298
317
|
return {
|
|
299
318
|
accessorKey: e.name,
|
|
300
|
-
header: e.label || e.name
|
|
319
|
+
header: e.label || e.name,
|
|
320
|
+
size: sizeMap[e.name]|| 180
|
|
301
321
|
}
|
|
302
322
|
})
|
|
303
323
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { createLayoutFormat } from "./buildConfig";
|
|
1
2
|
import WrapperSection from "./uischema/wrapperSection";
|
|
2
3
|
import _ from "lodash";
|
|
3
4
|
|
|
@@ -5,5 +6,11 @@ export const buildWrapperSection = (config,componentScope) =>{
|
|
|
5
6
|
const wrapper: any = _.cloneDeep(WrapperSection);
|
|
6
7
|
wrapper.config.main.label = config.label;
|
|
7
8
|
wrapper.config.main.divider = config.divider === "YES" ? true : false;
|
|
9
|
+
if (config.style) {
|
|
10
|
+
wrapper.config.style = JSON.parse(config.style)
|
|
11
|
+
}
|
|
12
|
+
if (config.layout) {
|
|
13
|
+
wrapper.config.layout = createLayoutFormat(config.layout)
|
|
14
|
+
}
|
|
8
15
|
return wrapper;
|
|
9
16
|
}
|
|
@@ -19,6 +19,61 @@ const EmptyBox = {
|
|
|
19
19
|
},
|
|
20
20
|
},
|
|
21
21
|
};
|
|
22
|
+
const cardLayout = {
|
|
23
|
+
type: "Control",
|
|
24
|
+
scope: "#/properties/cardLayout",
|
|
25
|
+
layout: 11.5,
|
|
26
|
+
options: {
|
|
27
|
+
detail: {
|
|
28
|
+
type: "HorizontalLayout",
|
|
29
|
+
elements: [
|
|
30
|
+
{
|
|
31
|
+
type: "Control",
|
|
32
|
+
scope: "#/properties/key",
|
|
33
|
+
options: {
|
|
34
|
+
widget: "SelectInputField",
|
|
35
|
+
},
|
|
36
|
+
config: {
|
|
37
|
+
layout: {
|
|
38
|
+
xs: 11,
|
|
39
|
+
sm: 11,
|
|
40
|
+
md: 5.5,
|
|
41
|
+
lg: 5.5,
|
|
42
|
+
},
|
|
43
|
+
main: {
|
|
44
|
+
label: "Screen Size",
|
|
45
|
+
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
type: "Control",
|
|
51
|
+
scope: "#/properties/value",
|
|
52
|
+
|
|
53
|
+
options: {
|
|
54
|
+
widget: "InputField",
|
|
55
|
+
},
|
|
56
|
+
config: {
|
|
57
|
+
layout: {
|
|
58
|
+
xs: 11,
|
|
59
|
+
sm: 11,
|
|
60
|
+
md: 5.5,
|
|
61
|
+
lg: 5.5,
|
|
62
|
+
},
|
|
63
|
+
main: {
|
|
64
|
+
label: "Value",
|
|
65
|
+
type:"number",
|
|
66
|
+
// freeSolo:true,
|
|
67
|
+
helperText:'Number should be in range of 0 to 12',
|
|
68
|
+
errorMessage:"Number Can't be greater than 12 and can't be less than 0.",
|
|
69
|
+
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
],
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
};
|
|
22
77
|
const getArrayControl = (parentScope: string, childScope: string, childLabel?: string,) => {
|
|
23
78
|
return {
|
|
24
79
|
type: "Control",
|
|
@@ -53,7 +108,27 @@ const getArrayControl = (parentScope: string, childScope: string, childLabel?: s
|
|
|
53
108
|
},
|
|
54
109
|
},
|
|
55
110
|
}
|
|
56
|
-
}
|
|
111
|
+
};
|
|
112
|
+
const sizeHolder = getArrayControl("sizeHolder", "keyName", "Component Name");
|
|
113
|
+
sizeHolder.options.detail.elements[1] = {
|
|
114
|
+
type: "Control",
|
|
115
|
+
scope: `#/properties/value`,
|
|
116
|
+
|
|
117
|
+
options: {
|
|
118
|
+
widget: "InputField",
|
|
119
|
+
},
|
|
120
|
+
config: {
|
|
121
|
+
layout: {
|
|
122
|
+
xs: 11,
|
|
123
|
+
sm: 11,
|
|
124
|
+
md: 5.5,
|
|
125
|
+
lg: 5.5,
|
|
126
|
+
},
|
|
127
|
+
main: {
|
|
128
|
+
label: "Size",
|
|
129
|
+
},
|
|
130
|
+
},
|
|
131
|
+
};
|
|
57
132
|
const getInputField = (scope: String, label: String) => {
|
|
58
133
|
return {
|
|
59
134
|
type: "Control",
|
|
@@ -160,6 +235,38 @@ const GraphSection = {
|
|
|
160
235
|
export const buildPropertiesSection = function (type: String) {
|
|
161
236
|
let uiSchema = _.cloneDeep(GraphSection);
|
|
162
237
|
switch (type) {
|
|
238
|
+
case "DataGrid":
|
|
239
|
+
uiSchema.elements = [
|
|
240
|
+
getRadioInputField("divider", "Use Header divider", ["YES", "NO"]),
|
|
241
|
+
getInputField("elevation", "Card Elevation"),
|
|
242
|
+
getInputField("height", "Grid height"),
|
|
243
|
+
getInputField("justifyContent", "justifyContent"),
|
|
244
|
+
cardLayout,
|
|
245
|
+
]
|
|
246
|
+
break;
|
|
247
|
+
case "Stepper":
|
|
248
|
+
uiSchema.elements = [
|
|
249
|
+
getRadioInputField("resetButton", "Reset Button", ["YES", "NO"]),
|
|
250
|
+
getRadioInputField("defaultButtonAvailable", "Use Default Buttons ", ["YES", "NO"]),
|
|
251
|
+
getInputField("resetText", "Reset Text"),
|
|
252
|
+
getInputField("completeText", "Complete Text"),
|
|
253
|
+
getSelectField("orientation", "Orientation Type", [
|
|
254
|
+
{ label: "Horizontal", value: "horizontal" },
|
|
255
|
+
{ label: "Vertical", value: "vertical" },
|
|
256
|
+
]),
|
|
257
|
+
|
|
258
|
+
getArrayControl("sectionLabels", "label")
|
|
259
|
+
|
|
260
|
+
]
|
|
261
|
+
break;
|
|
262
|
+
case "PopUp":
|
|
263
|
+
uiSchema.elements = [
|
|
264
|
+
getRadioInputField("fullScreen", "FullScreen", ["YES", "NO"]),
|
|
265
|
+
getRadioInputField("fullWidth", "FullWidth", ["YES", "NO"]),
|
|
266
|
+
getInputField("maxWidth", "Max. Width"),
|
|
267
|
+
EmptyBox
|
|
268
|
+
]
|
|
269
|
+
break;
|
|
163
270
|
case "Text":
|
|
164
271
|
uiSchema.elements = [
|
|
165
272
|
getInputField("placeholder", "Placeholder"),
|
|
@@ -269,6 +376,7 @@ export const buildPropertiesSection = function (type: String) {
|
|
|
269
376
|
getRadioInputField("downloadAllData", "Download All Data", ["YES", "NO"]),
|
|
270
377
|
getInputField("selectKey", "Selection Key"),
|
|
271
378
|
getArrayControl("Table_Download_Keys_Name", "KeyName", "Table Key Name"),
|
|
379
|
+
sizeHolder
|
|
272
380
|
]
|
|
273
381
|
break;
|
|
274
382
|
case "Radio":
|
|
@@ -10,6 +10,7 @@ export const ComponentSchema: any = {
|
|
|
10
10
|
{ title: "Card", const: "card" },
|
|
11
11
|
{ title: "CheckBox", const: "CheckBox" },
|
|
12
12
|
{ title: "Container", const: "WrapperSection" },
|
|
13
|
+
{ title: "DataGrid", const: "DataGrid" },
|
|
13
14
|
{ title: "Date", const: "Date" },
|
|
14
15
|
{ title: "Download File", const: "DownloadFile" },
|
|
15
16
|
{ title: "Empty Box", const: "EmptyBox" },
|
|
@@ -19,11 +20,13 @@ export const ComponentSchema: any = {
|
|
|
19
20
|
{ title: "LeaderBoard", const: "LeaderBoard" },
|
|
20
21
|
{ title: "MultipleSelect", const: "MultipleSelect" },
|
|
21
22
|
{ title: "PanCardText", const: "PanCardText" },
|
|
23
|
+
{ title: "Popup Container", const: "PopUp" },
|
|
22
24
|
{ title: "ProgressBar", const: "ProgressBar" },
|
|
23
25
|
{ title: "ProgressBar Card", const: "ProgressBarCard" },
|
|
24
26
|
{ title: "Select", const: "Select" },
|
|
25
27
|
{ title: "Slider", const: "Slider" },
|
|
26
28
|
{ title: "SpeedoMeter", const: "SpeedoMeter" },
|
|
29
|
+
{ title: "Stepper Container", const: "Stepper" },
|
|
27
30
|
{ title: "Radio", const: "Radio" },
|
|
28
31
|
{ title: "Rank", const: "Rank" },
|
|
29
32
|
{ title: "Rank Card", const: "RankCard" },
|
|
@@ -35,6 +38,11 @@ export const ComponentSchema: any = {
|
|
|
35
38
|
{ title: "Timer", const: "Timer" },
|
|
36
39
|
{ title: "Upload File", const: "UploadFile" },]
|
|
37
40
|
},
|
|
41
|
+
orientation:{
|
|
42
|
+
oneOf: [
|
|
43
|
+
{ title: "Horizontal", const: "horizontal" },
|
|
44
|
+
{ title: "Vertical", const: "vertical" },
|
|
45
|
+
]},
|
|
38
46
|
method: {
|
|
39
47
|
type: "string",
|
|
40
48
|
oneOf: [
|
|
@@ -65,6 +73,27 @@ export const ComponentSchema: any = {
|
|
|
65
73
|
},
|
|
66
74
|
},
|
|
67
75
|
},
|
|
76
|
+
cardLayout: {
|
|
77
|
+
type: "array",
|
|
78
|
+
items: {
|
|
79
|
+
type: "object",
|
|
80
|
+
properties: {
|
|
81
|
+
key: {
|
|
82
|
+
type: "string",
|
|
83
|
+
oneOf: [
|
|
84
|
+
{ title: "Extra Small", const: "xs" },
|
|
85
|
+
{ title: "Small", const: "sm" },
|
|
86
|
+
{ title: "Medium", const: "md" },
|
|
87
|
+
{ title: "Large", const: "lg" },
|
|
88
|
+
],
|
|
89
|
+
},
|
|
90
|
+
value: {
|
|
91
|
+
// type: "string",
|
|
92
|
+
|
|
93
|
+
},
|
|
94
|
+
},
|
|
95
|
+
},
|
|
96
|
+
},
|
|
68
97
|
value: {
|
|
69
98
|
type: "array",
|
|
70
99
|
items: {
|
|
@@ -134,6 +163,20 @@ export const ComponentSchema: any = {
|
|
|
134
163
|
},
|
|
135
164
|
},
|
|
136
165
|
},
|
|
166
|
+
sizeHolder: {
|
|
167
|
+
type: "array",
|
|
168
|
+
items: {
|
|
169
|
+
type: "object",
|
|
170
|
+
properties: {
|
|
171
|
+
keyName: {
|
|
172
|
+
type: "string",
|
|
173
|
+
},
|
|
174
|
+
value:{
|
|
175
|
+
type:"string"
|
|
176
|
+
}
|
|
177
|
+
},
|
|
178
|
+
},
|
|
179
|
+
},
|
|
137
180
|
legendLabels: {
|
|
138
181
|
type: "array",
|
|
139
182
|
items: {
|
|
@@ -39,12 +39,15 @@ export const EventSchema = {
|
|
|
39
39
|
type: "string",
|
|
40
40
|
oneOf: [
|
|
41
41
|
{ title: "Click Event", const: "onClick" },
|
|
42
|
-
{ title: "onStart", const: "onStart" },
|
|
43
42
|
{ title: "Load Event", const: "onLoad" },
|
|
44
|
-
{ title: "File Upload Event", const: "onUpload" },
|
|
45
|
-
{ title: "File Download Event", const: "onDownload" },
|
|
46
43
|
{ title: "Change Event", const: "onChange" },
|
|
47
44
|
{ title: "Success", const: "Success" },
|
|
45
|
+
{ title: "onStart", const: "onStart" },
|
|
46
|
+
|
|
47
|
+
{ title: "File Upload Event", const: "onUpload" },
|
|
48
|
+
{ title: "Back Event", const: "onBack" },
|
|
49
|
+
{ title: "Next Event", const: "onNext" },
|
|
50
|
+
{ title: "File Download Event", const: "onDownload" },
|
|
48
51
|
{ title: "Fail", const: "Fail" }
|
|
49
52
|
]
|
|
50
53
|
},
|
|
@@ -62,6 +65,7 @@ export const EventSchema = {
|
|
|
62
65
|
oneOf: [
|
|
63
66
|
{ title: "RankProvider", const: "RankProvider" },
|
|
64
67
|
{ title: "Download File", const: "downloadFile" },
|
|
68
|
+
{ title: "Download", const: "download" },
|
|
65
69
|
]
|
|
66
70
|
},
|
|
67
71
|
body: {
|
|
@@ -33,6 +33,9 @@ const sectionLabels = {
|
|
|
33
33
|
Radio:["Core", "Properties", "style", "Event","Validation"],
|
|
34
34
|
Text:["Core","Properties","style", "Event","Validation"],
|
|
35
35
|
TextArea:["Core","Properties","style", "Event","Validation"],
|
|
36
|
+
PopUp: ["Core", "Components","Properties", "style"],
|
|
37
|
+
Stepper: ["Core", "Components","Properties","Event", "style"],
|
|
38
|
+
DataGrid: ["Core", "Components","Properties","Event", "style"],
|
|
36
39
|
}
|
|
37
40
|
|
|
38
41
|
|
|
@@ -36,6 +36,7 @@ export default (
|
|
|
36
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
|
+
{ label: "Download Blob File", value: "downloadBlobFile" }
|
|
39
40
|
])
|
|
40
41
|
uiSchema.elements[1].elements[0].elements[3] = getTextArea("funcParametersCode", "Write Custom Code for Functions Parameter", true, { xs: 12, sm: 12, md: 6 });
|
|
41
42
|
schema.required = ["eventType", "Handler", "inBuiltFunctionType"]
|
|
@@ -65,7 +65,7 @@ export async function saveHandler(store, service, submitHandler, pageName?: stri
|
|
|
65
65
|
if (_.isEmpty(store.ctx.core.errors)) {
|
|
66
66
|
try {
|
|
67
67
|
const saveReturn = await submitHandler(store, service, config);
|
|
68
|
-
navigateHandler(store, true, pageName ? `/${pageName}?id=${
|
|
68
|
+
navigateHandler(store, true, pageName ? `/${pageName}?id=${id}` : "/PageMasterRecords")
|
|
69
69
|
} catch (err) {
|
|
70
70
|
navigateHandler(store, false)
|
|
71
71
|
}
|
|
@@ -1,17 +1,32 @@
|
|
|
1
|
-
export
|
|
1
|
+
export const downloadFile = (obj: any) => {
|
|
2
2
|
const typeArr = obj.name.split(".");
|
|
3
3
|
const data = obj.data;
|
|
4
4
|
const finalData = window.atob(data);
|
|
5
|
-
let file
|
|
6
|
-
file = new File([finalData],
|
|
7
|
-
|
|
5
|
+
let file;
|
|
6
|
+
file = new File([finalData], typeArr[typeArr.length - 1]);
|
|
7
|
+
|
|
8
8
|
const url = URL.createObjectURL(file);
|
|
9
9
|
const link = document.createElement("a");
|
|
10
|
-
link.href = typeArr[typeArr.length - 1] === 'pdf' ?'data:application/octet-stream;base64,' + data: url;
|
|
10
|
+
link.href = typeArr[typeArr.length - 1] === 'pdf' ? 'data:application/octet-stream;base64,' + data : url;
|
|
11
11
|
link.download = `${obj.name}`;
|
|
12
12
|
document.body.appendChild(link);
|
|
13
13
|
link.click();
|
|
14
|
-
|
|
14
|
+
|
|
15
15
|
URL.revokeObjectURL(url);
|
|
16
16
|
document.body.removeChild(link);
|
|
17
|
-
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export const doDownload = (response: any, service) => {
|
|
20
|
+
let url = `${service.defaults.baseURL}/${response.path}`;
|
|
21
|
+
if (response?.params) {
|
|
22
|
+
const keysArray = Object.keys(response?.params);
|
|
23
|
+
keysArray.map((e, i) => {
|
|
24
|
+
url = url + `${i === 0?"?":"&"}${e}=${response?.params[e]}`
|
|
25
|
+
})
|
|
26
|
+
}
|
|
27
|
+
const link = document.createElement('a');
|
|
28
|
+
link.href = url;
|
|
29
|
+
document.body.appendChild(link);
|
|
30
|
+
link.click();
|
|
31
|
+
link.parentNode.removeChild(link);
|
|
32
|
+
};
|