impaktapps-ui-builder 0.0.276 → 0.0.277
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 +2472 -2351
- package/dist/impaktapps-ui-builder.es.js.map +1 -1
- package/dist/impaktapps-ui-builder.umd.js +9 -9
- package/dist/impaktapps-ui-builder.umd.js.map +1 -1
- package/dist/src/impaktapps-ui-builder/builder/build/buildButton.d.ts +1 -0
- package/dist/src/impaktapps-ui-builder/builder/build/buildEmptyBox.d.ts +1 -0
- package/dist/src/impaktapps-ui-builder/builder/build/buildUiSchema.d.ts +5 -0
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/apiSection.d.ts +3 -0
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/button.d.ts +1 -0
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/coreSection.d.ts +6 -20
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/graph.d.ts +1 -0
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/validationSections.d.ts +25 -2
- package/dist/src/impaktapps-ui-builder/lib/index.d.ts +1 -0
- package/dist/src/impaktapps-ui-builder/runtime/services/events.d.ts +4 -1
- package/package.json +1 -1
- package/src/impaktapps-ui-builder/builder/build/buildButton.ts +6 -1
- package/src/impaktapps-ui-builder/builder/build/buildEmptyBox.ts +11 -0
- package/src/impaktapps-ui-builder/builder/build/buildLineGraph.ts +2 -2
- package/src/impaktapps-ui-builder/builder/build/buildSchema.ts +1 -3
- package/src/impaktapps-ui-builder/builder/build/buildUiSchema.ts +43 -34
- package/src/impaktapps-ui-builder/builder/build/uischema/apiSection.ts +2 -0
- package/src/impaktapps-ui-builder/builder/build/uischema/buildPropertiesSection.ts +27 -1
- package/src/impaktapps-ui-builder/builder/build/uischema/button.ts +2 -1
- package/src/impaktapps-ui-builder/builder/build/uischema/coreSection.ts +10 -2
- package/src/impaktapps-ui-builder/builder/build/uischema/graph.ts +1 -0
- package/src/impaktapps-ui-builder/builder/build/uischema/speedoMeter.ts +1 -1
- package/src/impaktapps-ui-builder/builder/build/uischema/validationSections.ts +52 -39
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/uiSchema.ts +7 -1
- package/src/impaktapps-ui-builder/builder/services/pageMaster.ts +2 -0
- package/src/impaktapps-ui-builder/lib/index.ts +1 -0
- package/src/impaktapps-ui-builder/runtime/services/events.ts +34 -87
- package/src/impaktapps-ui-builder/runtime/services/service.ts +18 -11
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const buildEmptyBox: (config: any, componentScope: any) => any;
|
|
@@ -29,6 +29,7 @@ export declare const APISection: {
|
|
|
29
29
|
scope: string;
|
|
30
30
|
options: {
|
|
31
31
|
widget: string;
|
|
32
|
+
elementLabelProp?: undefined;
|
|
32
33
|
detail?: undefined;
|
|
33
34
|
};
|
|
34
35
|
config: {
|
|
@@ -54,6 +55,7 @@ export declare const APISection: {
|
|
|
54
55
|
scope: string;
|
|
55
56
|
options: {
|
|
56
57
|
widget: string;
|
|
58
|
+
elementLabelProp?: undefined;
|
|
57
59
|
detail?: undefined;
|
|
58
60
|
};
|
|
59
61
|
config: {
|
|
@@ -76,6 +78,7 @@ export declare const APISection: {
|
|
|
76
78
|
scope: string;
|
|
77
79
|
layout: number;
|
|
78
80
|
options: {
|
|
81
|
+
elementLabelProp: string;
|
|
79
82
|
detail: {
|
|
80
83
|
type: string;
|
|
81
84
|
elements: {
|
|
@@ -5,6 +5,7 @@ export declare const CoreSection: {
|
|
|
5
5
|
scope: string;
|
|
6
6
|
options: {
|
|
7
7
|
widget: string;
|
|
8
|
+
elementLabelProp?: undefined;
|
|
8
9
|
detail?: undefined;
|
|
9
10
|
};
|
|
10
11
|
config: {
|
|
@@ -29,6 +30,7 @@ export declare const CoreSection: {
|
|
|
29
30
|
scope: string;
|
|
30
31
|
options: {
|
|
31
32
|
widget: string;
|
|
33
|
+
elementLabelProp?: undefined;
|
|
32
34
|
detail?: undefined;
|
|
33
35
|
};
|
|
34
36
|
config: {
|
|
@@ -59,6 +61,7 @@ export declare const CoreSection: {
|
|
|
59
61
|
};
|
|
60
62
|
options: {
|
|
61
63
|
widget: string;
|
|
64
|
+
elementLabelProp?: undefined;
|
|
62
65
|
detail?: undefined;
|
|
63
66
|
};
|
|
64
67
|
layout?: undefined;
|
|
@@ -67,9 +70,10 @@ export declare const CoreSection: {
|
|
|
67
70
|
scope: string;
|
|
68
71
|
layout: number;
|
|
69
72
|
options: {
|
|
73
|
+
elementLabelProp: string;
|
|
70
74
|
detail: {
|
|
71
75
|
type: string;
|
|
72
|
-
elements:
|
|
76
|
+
elements: {
|
|
73
77
|
type: string;
|
|
74
78
|
scope: string;
|
|
75
79
|
options: {
|
|
@@ -90,25 +94,7 @@ export declare const CoreSection: {
|
|
|
90
94
|
}[];
|
|
91
95
|
};
|
|
92
96
|
};
|
|
93
|
-
}
|
|
94
|
-
type: string;
|
|
95
|
-
scope: string;
|
|
96
|
-
options: {
|
|
97
|
-
widget: string;
|
|
98
|
-
};
|
|
99
|
-
config: {
|
|
100
|
-
layout: {
|
|
101
|
-
xs: number;
|
|
102
|
-
sm: number;
|
|
103
|
-
md: number;
|
|
104
|
-
lg: number;
|
|
105
|
-
};
|
|
106
|
-
main: {
|
|
107
|
-
label: string;
|
|
108
|
-
options?: undefined;
|
|
109
|
-
};
|
|
110
|
-
};
|
|
111
|
-
})[];
|
|
97
|
+
}[];
|
|
112
98
|
};
|
|
113
99
|
widget?: undefined;
|
|
114
100
|
};
|
|
@@ -5,9 +5,10 @@ export declare const ValidationSection: {
|
|
|
5
5
|
scope: string;
|
|
6
6
|
layout: number;
|
|
7
7
|
options: {
|
|
8
|
+
elementLabelProp: string;
|
|
8
9
|
detail: {
|
|
9
10
|
type: string;
|
|
10
|
-
elements: {
|
|
11
|
+
elements: ({
|
|
11
12
|
type: string;
|
|
12
13
|
scope: string;
|
|
13
14
|
options: {
|
|
@@ -22,9 +23,31 @@ export declare const ValidationSection: {
|
|
|
22
23
|
};
|
|
23
24
|
main: {
|
|
24
25
|
label: string;
|
|
26
|
+
options: {
|
|
27
|
+
value: string;
|
|
28
|
+
label: string;
|
|
29
|
+
}[];
|
|
25
30
|
};
|
|
26
31
|
};
|
|
27
|
-
}
|
|
32
|
+
} | {
|
|
33
|
+
type: string;
|
|
34
|
+
scope: string;
|
|
35
|
+
options: {
|
|
36
|
+
widget: string;
|
|
37
|
+
};
|
|
38
|
+
config: {
|
|
39
|
+
layout: {
|
|
40
|
+
xs: number;
|
|
41
|
+
sm: number;
|
|
42
|
+
md: number;
|
|
43
|
+
lg: number;
|
|
44
|
+
};
|
|
45
|
+
main: {
|
|
46
|
+
label: string;
|
|
47
|
+
options?: undefined;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
})[];
|
|
28
51
|
};
|
|
29
52
|
};
|
|
30
53
|
}[];
|
|
@@ -2,6 +2,7 @@ export { default as pageMaster } from "../builder/services/pageMaster";
|
|
|
2
2
|
export { default as pageMasterEvents } from "../builder/services/event";
|
|
3
3
|
export { default as pageMasterComponents } from "../builder/services/component";
|
|
4
4
|
export { default as pageService } from "../runtime/services/service";
|
|
5
|
+
export { schema } from "../builder/build/buildUiSchema";
|
|
5
6
|
export { default as buildConfig } from "../builder/build/buildConfig";
|
|
6
7
|
export { default as buildUiSchema } from "../builder/build/buildUiSchema";
|
|
7
8
|
export { default as buildSchema } from "../builder/build/buildSchema";
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
export declare const executeEvents: (config: any, componentName: string, store: any, dynamicData: any, userValue: any, service: any, serviceHolder: any, eventGroups?: any, parentEventOutput?: any) => Promise<
|
|
1
|
+
export declare const executeEvents: (config: any, componentName: string, store: any, dynamicData: any, userValue: any, service: any, serviceHolder: any, eventGroups?: any, parentEventOutput?: any) => Promise<{
|
|
2
|
+
response: any;
|
|
3
|
+
events: any;
|
|
4
|
+
}>;
|
|
2
5
|
export declare function buildApiPayload(compConfig: any, body: any, headers: any, store: any, dynamicData: any, userValue: any, service: any): Promise<{
|
|
3
6
|
body: any;
|
|
4
7
|
headers: any;
|
package/package.json
CHANGED
|
@@ -14,6 +14,9 @@ export const buildButton = (config:any,componentScope:string) =>{
|
|
|
14
14
|
if(config.layout){
|
|
15
15
|
button.config.layout = createLayoutFormat(config.layout)
|
|
16
16
|
}
|
|
17
|
+
if(config.defaultStyle){
|
|
18
|
+
button.config.main.styleDefault = config.defaultStyle==="true"?true:false;
|
|
19
|
+
}
|
|
17
20
|
button.scope = componentScope;
|
|
18
21
|
if (config.style) {
|
|
19
22
|
button.config.style = JSON.parse(config.style)
|
|
@@ -22,8 +25,10 @@ export const buildButton = (config:any,componentScope:string) =>{
|
|
|
22
25
|
button.config.main.size = config.size
|
|
23
26
|
}
|
|
24
27
|
if (config.color) {
|
|
25
|
-
button.config.main.
|
|
28
|
+
button.config.main.color = config.color
|
|
26
29
|
}
|
|
30
|
+
if(config.label){
|
|
27
31
|
button.config.main.name = config.label;
|
|
32
|
+
}
|
|
28
33
|
return button;
|
|
29
34
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import _ from "lodash";
|
|
2
|
+
import { createLayoutFormat } from "./buildConfig";
|
|
3
|
+
import emptyBox from "./uischema/emptyBox";
|
|
4
|
+
|
|
5
|
+
export const buildEmptyBox = (config,componentScope) =>{
|
|
6
|
+
const EmptyBox: any = _.cloneDeep(emptyBox);
|
|
7
|
+
if (config.layout) {
|
|
8
|
+
EmptyBox.config.layout = createLayoutFormat(config.layout);
|
|
9
|
+
}
|
|
10
|
+
return EmptyBox;
|
|
11
|
+
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { flatObjectValueInArray } from "./buildConfig";
|
|
1
|
+
import { createLayoutFormat, flatObjectValueInArray } from "./buildConfig";
|
|
2
2
|
import { LineGraph } from "./uischema/graph";
|
|
3
3
|
import _ from "lodash";
|
|
4
4
|
|
|
5
5
|
export const buildLineGraph = (config, componentScope) => {
|
|
6
6
|
const lineGraph: any = _.cloneDeep(LineGraph);
|
|
7
7
|
if (config.layout) {
|
|
8
|
-
lineGraph.config.layout = config.layout;
|
|
8
|
+
lineGraph.config.layout = createLayoutFormat(config.layout);
|
|
9
9
|
}
|
|
10
10
|
lineGraph.config.main.header = config.heading;
|
|
11
11
|
if (config.height) {
|
|
@@ -22,11 +22,9 @@ export const buildSchema = (config: any) => {
|
|
|
22
22
|
}
|
|
23
23
|
});
|
|
24
24
|
}
|
|
25
|
+
|
|
25
26
|
}
|
|
26
27
|
buildRule(config)
|
|
27
|
-
if (config?.elements) {
|
|
28
|
-
config.elements.forEach(buildRule);
|
|
29
|
-
}
|
|
30
28
|
console.log(schema)
|
|
31
29
|
window.localStorage.setItem("schemaDemo",JSON.stringify(schema))
|
|
32
30
|
return schema;
|
|
@@ -33,7 +33,30 @@ import { buildSlider } from "./buildSlider";
|
|
|
33
33
|
import { buildCheckbox } from "./buildCheckbox";
|
|
34
34
|
import { buildLineGraph } from "./buildLineGraph";
|
|
35
35
|
import { buildRadio } from "./buildRadio";
|
|
36
|
+
import { buildEmptyBox } from "./buildEmptyBox";
|
|
37
|
+
export let schema = {
|
|
38
|
+
type: "object",
|
|
39
|
+
properties: {},
|
|
40
|
+
required: []
|
|
41
|
+
};
|
|
42
|
+
function buildRule(configObj: any) {
|
|
43
|
+
if (configObj.validation) {
|
|
44
|
+
configObj.validation.forEach((rule: any) => {
|
|
45
|
+
if (!schema.properties[configObj.name]) {
|
|
46
|
+
schema.properties[configObj.name] = {};
|
|
47
|
+
}
|
|
48
|
+
if (rule.validationType === "required") {
|
|
49
|
+
schema.required.push(configObj.name)
|
|
50
|
+
} else {
|
|
51
|
+
schema.properties[configObj.name]["type"] = "string"
|
|
52
|
+
schema.properties[configObj.name][rule.validationType] =
|
|
53
|
+
isNaN(rule.validationValue) ?
|
|
54
|
+
rule.validationValue : Number(rule.validationValue)
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
}
|
|
36
58
|
|
|
59
|
+
}
|
|
37
60
|
|
|
38
61
|
|
|
39
62
|
const buildUiSchema = (config: any) => {
|
|
@@ -42,6 +65,7 @@ const buildUiSchema = (config: any) => {
|
|
|
42
65
|
switch (config.type) {
|
|
43
66
|
case "RunnerBoyProgressBar":
|
|
44
67
|
elements = RunnerBoyProgressbar(config, componentScope);
|
|
68
|
+
|
|
45
69
|
break;
|
|
46
70
|
case "TabSection":
|
|
47
71
|
elements = buildTabSection(config, componentScope);
|
|
@@ -51,45 +75,51 @@ const buildUiSchema = (config: any) => {
|
|
|
51
75
|
break;
|
|
52
76
|
case "Text":
|
|
53
77
|
elements = buildTextField(config, componentScope);
|
|
78
|
+
buildRule(config);
|
|
54
79
|
break;
|
|
55
80
|
case "TextArea":
|
|
56
81
|
elements = buildTextArea(config, componentScope)
|
|
82
|
+
buildRule(config);
|
|
57
83
|
break;
|
|
58
84
|
case "Date":
|
|
59
85
|
elements = buildDate(config, componentScope);
|
|
86
|
+
buildRule(config);
|
|
60
87
|
break;
|
|
61
88
|
case "Select":
|
|
62
89
|
elements = buildSelect(config, componentScope);
|
|
90
|
+
buildRule(config);
|
|
63
91
|
break;
|
|
64
92
|
case "Radio":
|
|
65
93
|
elements = buildRadio(config, componentScope);
|
|
94
|
+
buildRule(config);
|
|
66
95
|
break;
|
|
67
96
|
case "Button":
|
|
68
97
|
|
|
69
98
|
elements = buildButton(config, componentScope);
|
|
99
|
+
buildRule(config);
|
|
70
100
|
break;
|
|
71
101
|
case "Table":
|
|
72
102
|
elements = buildTable(config, componentScope);
|
|
73
|
-
|
|
103
|
+
buildRule(config);
|
|
74
104
|
break;
|
|
75
105
|
case "Box":
|
|
76
106
|
elements = buildLabel(config, componentScope);
|
|
107
|
+
buildRule(config);
|
|
77
108
|
break;
|
|
78
109
|
case "CheckBox":
|
|
79
110
|
elements = buildCheckbox(config, componentScope);
|
|
111
|
+
buildRule(config);
|
|
80
112
|
break;
|
|
81
113
|
case "UploadFile":
|
|
82
114
|
elements = buildUploadFile(config, componentScope);
|
|
115
|
+
buildRule(config);
|
|
83
116
|
break;
|
|
84
117
|
case "DownloadFile":
|
|
85
118
|
elements = buildDownloadFile(config, componentScope);
|
|
119
|
+
buildRule(config);
|
|
86
120
|
break;
|
|
87
121
|
case "EmptyBox":
|
|
88
|
-
|
|
89
|
-
if (config.layout) {
|
|
90
|
-
EmptyBox.config.layout = config.layout;
|
|
91
|
-
}
|
|
92
|
-
elements = EmptyBox;
|
|
122
|
+
elements = buildEmptyBox(config, componentScope);
|
|
93
123
|
break;
|
|
94
124
|
case "card":
|
|
95
125
|
elements = buildCard(config, componentScope);
|
|
@@ -135,11 +165,17 @@ const buildUiSchema = (config: any) => {
|
|
|
135
165
|
|
|
136
166
|
case "MultipleSelect":
|
|
137
167
|
elements = buildMultiSelect(config, componentScope);
|
|
168
|
+
buildRule(config);
|
|
138
169
|
break;
|
|
139
170
|
case "LeaderBoard":
|
|
140
171
|
elements = buildLeaderBoard(config);
|
|
141
172
|
break;
|
|
142
173
|
default:
|
|
174
|
+
schema = {
|
|
175
|
+
type: "object",
|
|
176
|
+
properties: {},
|
|
177
|
+
required: []
|
|
178
|
+
};
|
|
143
179
|
elements = buildBasicUiSchema(config)
|
|
144
180
|
}
|
|
145
181
|
|
|
@@ -168,6 +204,7 @@ const buildUiSchema = (config: any) => {
|
|
|
168
204
|
});
|
|
169
205
|
}
|
|
170
206
|
}
|
|
207
|
+
localStorage.setItem("libSchema", JSON.stringify(schema || {}))
|
|
171
208
|
return elements;
|
|
172
209
|
}
|
|
173
210
|
|
|
@@ -176,34 +213,6 @@ export default buildUiSchema;
|
|
|
176
213
|
|
|
177
214
|
|
|
178
215
|
|
|
179
|
-
// export const buildSchema = (config: any) => {
|
|
180
|
-
// const properties = buildProperties(config)
|
|
181
|
-
// return { properties }
|
|
182
|
-
// }
|
|
183
|
-
// export const buildProperties = (config: any) => {
|
|
184
|
-
// let properties = {}
|
|
185
|
-
// switch (config.type) {
|
|
186
|
-
// case "Array":
|
|
187
|
-
// properties[config.name] = buildArraySchema(config);
|
|
188
|
-
// if (config?.elements) {
|
|
189
|
-
// config.elements.map((e: any, elemInd: number) => {
|
|
190
|
-
// properties[config.name].items.properties[e.name] = buildProperties(e)
|
|
191
|
-
// });
|
|
192
|
-
// }
|
|
193
|
-
// break;
|
|
194
|
-
// default:
|
|
195
|
-
// properties = { "type": "string" }
|
|
196
|
-
// }
|
|
197
|
-
// if (config.elements && config.type !== "Array") {
|
|
198
|
-
// config.elements.map((e) => {
|
|
199
|
-
// properties = buildProperties(e)
|
|
200
|
-
// })
|
|
201
|
-
// }
|
|
202
|
-
// return properties
|
|
203
|
-
// }
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
216
|
|
|
208
217
|
|
|
209
218
|
|
|
@@ -46,6 +46,7 @@ export const APISection = {
|
|
|
46
46
|
scope: "#/properties/headers",
|
|
47
47
|
layout: 11.5,
|
|
48
48
|
options: {
|
|
49
|
+
"elementLabelProp": "key",
|
|
49
50
|
detail: {
|
|
50
51
|
type: "HorizontalLayout",
|
|
51
52
|
elements: [
|
|
@@ -95,6 +96,7 @@ export const APISection = {
|
|
|
95
96
|
scope: "#/properties/body",
|
|
96
97
|
layout: 11.5,
|
|
97
98
|
options: {
|
|
99
|
+
"elementLabelProp": "key",
|
|
98
100
|
detail: {
|
|
99
101
|
type: "HorizontalLayout",
|
|
100
102
|
elements: [
|
|
@@ -1,10 +1,31 @@
|
|
|
1
|
+
|
|
1
2
|
import _ from "lodash";
|
|
3
|
+
const EmptyBox = {
|
|
4
|
+
type: "Control",
|
|
5
|
+
scope: `#/properties/empty`,
|
|
6
|
+
|
|
7
|
+
options: {
|
|
8
|
+
widget: "EmptyBox",
|
|
9
|
+
},
|
|
10
|
+
config: {
|
|
11
|
+
layout: {
|
|
12
|
+
xs: 11,
|
|
13
|
+
sm: 11,
|
|
14
|
+
md: 5.5,
|
|
15
|
+
lg: 5.5,
|
|
16
|
+
},
|
|
17
|
+
main: {
|
|
18
|
+
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
};
|
|
2
22
|
const getArrayControl = (parentScope:string,childScope:string,childLabel?:string,) =>{
|
|
3
23
|
return {
|
|
4
24
|
type: "Control",
|
|
5
25
|
scope: `#/properties/${parentScope}`,
|
|
6
26
|
layout: 11.5,
|
|
7
27
|
options: {
|
|
28
|
+
"elementLabelProp": childScope,
|
|
8
29
|
detail: {
|
|
9
30
|
type: "HorizontalLayout",
|
|
10
31
|
elements: [
|
|
@@ -187,7 +208,12 @@ if(type === "SpeedoMeter" ){
|
|
|
187
208
|
{ label: "Button With Text", value: "Button" },
|
|
188
209
|
{ label: "Button With Icon", value: "IconButton" },
|
|
189
210
|
{ label: "Button With Icon and Text", value: "ButtonWithIconAndText" },
|
|
190
|
-
]), iconName,size,caption
|
|
211
|
+
]), iconName,size,caption,
|
|
212
|
+
getSelectField("defaultStyle","Default Style",[
|
|
213
|
+
{ label: "Apply Default Style", value: "true" },
|
|
214
|
+
{ label: "No Style", value: "false" },
|
|
215
|
+
]),
|
|
216
|
+
JSON.parse(JSON.stringify(EmptyBox))
|
|
191
217
|
];
|
|
192
218
|
} else if (type === "Graph") {
|
|
193
219
|
const height = getInputField("height", "Height");
|
|
@@ -97,14 +97,16 @@ export const CoreSection = {
|
|
|
97
97
|
scope: "#/properties/layout",
|
|
98
98
|
layout: 11.5,
|
|
99
99
|
options: {
|
|
100
|
+
"elementLabelProp": "key",
|
|
100
101
|
detail: {
|
|
101
102
|
type: "HorizontalLayout",
|
|
103
|
+
|
|
102
104
|
elements: [
|
|
103
105
|
{
|
|
104
106
|
type: "Control",
|
|
105
107
|
scope: "#/properties/key",
|
|
106
108
|
options: {
|
|
107
|
-
widget: "
|
|
109
|
+
widget: "SelectInputField",
|
|
108
110
|
},
|
|
109
111
|
config: {
|
|
110
112
|
layout: {
|
|
@@ -129,7 +131,7 @@ export const CoreSection = {
|
|
|
129
131
|
scope: "#/properties/value",
|
|
130
132
|
|
|
131
133
|
options: {
|
|
132
|
-
widget: "
|
|
134
|
+
widget: "MultipleSelect",
|
|
133
135
|
},
|
|
134
136
|
config: {
|
|
135
137
|
layout: {
|
|
@@ -140,6 +142,12 @@ export const CoreSection = {
|
|
|
140
142
|
},
|
|
141
143
|
main: {
|
|
142
144
|
label: "Value",
|
|
145
|
+
options: [
|
|
146
|
+
{ label: "3", value: "3" },
|
|
147
|
+
{ label: "5.5", value: "5.5" },
|
|
148
|
+
{ label: "8", value: "8" },
|
|
149
|
+
{ label: "12", value: "12" },
|
|
150
|
+
],
|
|
143
151
|
},
|
|
144
152
|
},
|
|
145
153
|
},
|
|
@@ -1,11 +1,37 @@
|
|
|
1
1
|
export const ValidationSection = {
|
|
2
2
|
type: "HorizontalLayout",
|
|
3
3
|
elements: [
|
|
4
|
+
// {
|
|
5
|
+
// type: "Control",
|
|
6
|
+
// scope: "#/properties/validationType",
|
|
7
|
+
|
|
8
|
+
// options: {
|
|
9
|
+
// widget: "SelectInputField",
|
|
10
|
+
// },
|
|
11
|
+
// config: {
|
|
12
|
+
// layout: {
|
|
13
|
+
// xs: 11,
|
|
14
|
+
// sm: 11,
|
|
15
|
+
// md: 5.5,
|
|
16
|
+
// lg: 5.5,
|
|
17
|
+
// },
|
|
18
|
+
// main: {
|
|
19
|
+
// label: "Validation Type",
|
|
20
|
+
// options: [
|
|
21
|
+
// { value: "String", label: "string" },
|
|
22
|
+
// { value: "minLength", label: "Minimum Length" },
|
|
23
|
+
// { value: "maxLength", label: "Maximum Length" },
|
|
24
|
+
// { value: "pattern", label: "Pattern" },
|
|
25
|
+
// ]
|
|
26
|
+
// },
|
|
27
|
+
// },
|
|
28
|
+
// },
|
|
4
29
|
{
|
|
5
30
|
type: "Control",
|
|
6
31
|
scope: "#/properties/validation",
|
|
7
32
|
layout: 11.5,
|
|
8
33
|
options: {
|
|
34
|
+
"elementLabelProp": "validationType",
|
|
9
35
|
detail: {
|
|
10
36
|
type: "HorizontalLayout",
|
|
11
37
|
elements: [
|
|
@@ -14,7 +40,7 @@ export const ValidationSection = {
|
|
|
14
40
|
scope: "#/properties/validationType",
|
|
15
41
|
|
|
16
42
|
options: {
|
|
17
|
-
widget: "
|
|
43
|
+
widget: "SelectInputField",
|
|
18
44
|
},
|
|
19
45
|
config: {
|
|
20
46
|
layout: {
|
|
@@ -25,51 +51,38 @@ export const ValidationSection = {
|
|
|
25
51
|
},
|
|
26
52
|
main: {
|
|
27
53
|
label: "Validation Type",
|
|
54
|
+
options: [
|
|
55
|
+
{ value: "required", label: "Required" },
|
|
56
|
+
{ value: "minLength", label: "Minimum Length" },
|
|
57
|
+
{ value: "maxLength", label: "Maximum Length" },
|
|
58
|
+
{ value: "pattern", label: "Pattern" },
|
|
59
|
+
]
|
|
28
60
|
},
|
|
29
61
|
},
|
|
30
62
|
},
|
|
31
63
|
{
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
64
|
+
type: "Control",
|
|
65
|
+
scope: "#/properties/validationValue",
|
|
66
|
+
|
|
67
|
+
options: {
|
|
68
|
+
widget: "InputField",
|
|
69
|
+
},
|
|
70
|
+
config: {
|
|
71
|
+
layout: {
|
|
72
|
+
xs: 11,
|
|
73
|
+
sm: 11,
|
|
74
|
+
md: 5.5,
|
|
75
|
+
lg: 5.5,
|
|
37
76
|
},
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
xs: 11,
|
|
41
|
-
sm: 11,
|
|
42
|
-
md: 5.5,
|
|
43
|
-
lg: 5.5,
|
|
44
|
-
},
|
|
45
|
-
main: {
|
|
46
|
-
label: "Validation Value",
|
|
47
|
-
},
|
|
77
|
+
main: {
|
|
78
|
+
label: "Validation Value",
|
|
48
79
|
},
|
|
49
|
-
}
|
|
80
|
+
},
|
|
81
|
+
}
|
|
50
82
|
],
|
|
51
83
|
},
|
|
52
84
|
},
|
|
53
|
-
|
|
54
|
-
},
|
|
55
|
-
]};
|
|
56
85
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
// items: {
|
|
61
|
-
// type: "object",
|
|
62
|
-
// properties: {
|
|
63
|
-
// componentName: {
|
|
64
|
-
// type: "string",
|
|
65
|
-
// },
|
|
66
|
-
// validationType:{
|
|
67
|
-
// type: "string",
|
|
68
|
-
// },
|
|
69
|
-
// validationValue: {
|
|
70
|
-
// type: "string",
|
|
71
|
-
// },
|
|
72
|
-
// },
|
|
73
|
-
// },
|
|
74
|
-
// },
|
|
75
|
-
// };
|
|
86
|
+
},
|
|
87
|
+
]
|
|
88
|
+
};
|