impaktapps-ui-builder 1.0.148 → 1.0.150
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 +170 -185
- package/dist/impaktapps-ui-builder.es.js.map +1 -1
- package/dist/impaktapps-ui-builder.umd.js +3 -3
- package/dist/impaktapps-ui-builder.umd.js.map +1 -1
- package/dist/src/impaktapps-ui-builder/builder/build/buildSegmentChart.d.ts +1 -0
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/card.d.ts +173 -198
- package/package.json +1 -1
- package/src/impaktapps-ui-builder/builder/build/buildProgressBar.ts +28 -21
- package/src/impaktapps-ui-builder/builder/build/buildSegmentChart.ts +34 -0
- package/src/impaktapps-ui-builder/builder/build/buildUiSchema.ts +4 -0
- package/src/impaktapps-ui-builder/builder/build/uischema/buildPropertiesSection.ts +6 -1
- package/src/impaktapps-ui-builder/builder/build/uischema/card.ts +140 -187
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/schema.ts +2 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const buildSegmentChart: (config: any, componentScope: any) => any;
|
|
@@ -2,28 +2,30 @@ export default function Card(theme: any): {
|
|
|
2
2
|
type: string;
|
|
3
3
|
config: {
|
|
4
4
|
main: {};
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
height: string;
|
|
21
|
-
alignItems: string;
|
|
22
|
-
marginLeft: string;
|
|
23
|
-
"&: hover": {
|
|
5
|
+
style: {
|
|
6
|
+
wrapperStyle: {
|
|
7
|
+
position: string;
|
|
8
|
+
top: string;
|
|
9
|
+
transform: string;
|
|
10
|
+
marginBottom: number;
|
|
11
|
+
borderRadius: string;
|
|
12
|
+
fontFamily: string;
|
|
13
|
+
};
|
|
14
|
+
componentsBoxStyle: {
|
|
15
|
+
boxShadow: string;
|
|
16
|
+
flexDirection: string;
|
|
17
|
+
overflow: string;
|
|
18
|
+
flexWrap: string;
|
|
19
|
+
width: string;
|
|
24
20
|
background: string;
|
|
25
|
-
|
|
26
|
-
|
|
21
|
+
borderRadius: string;
|
|
22
|
+
padding: string;
|
|
23
|
+
height: string;
|
|
24
|
+
minHeight: string;
|
|
25
|
+
position: string;
|
|
26
|
+
marginLeft: string;
|
|
27
|
+
"&: hover": {
|
|
28
|
+
background: string;
|
|
27
29
|
color: string;
|
|
28
30
|
};
|
|
29
31
|
};
|
|
@@ -37,205 +39,178 @@ export default function Card(theme: any): {
|
|
|
37
39
|
};
|
|
38
40
|
elements: ({
|
|
39
41
|
type: string;
|
|
42
|
+
scope: string;
|
|
40
43
|
config: {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
marginBottom: number;
|
|
44
|
+
main: {
|
|
45
|
+
url: string;
|
|
46
|
+
heading?: undefined;
|
|
47
|
+
};
|
|
48
|
+
style: {
|
|
49
|
+
containerStyle: {
|
|
50
|
+
position: string;
|
|
51
|
+
color: string;
|
|
52
|
+
top: string;
|
|
53
|
+
right: string;
|
|
54
|
+
display: string;
|
|
55
|
+
justifyContent: string;
|
|
56
|
+
alignItems: string;
|
|
55
57
|
};
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
flexWrap: string;
|
|
58
|
+
imageStyle: {
|
|
59
|
+
color: string;
|
|
59
60
|
width: string;
|
|
60
61
|
height: string;
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
paddingRight: number;
|
|
62
|
+
padding: string;
|
|
63
|
+
margin: string;
|
|
64
64
|
};
|
|
65
|
-
|
|
65
|
+
color?: undefined;
|
|
66
|
+
fontSize?: undefined;
|
|
67
|
+
fontWeight?: undefined;
|
|
68
|
+
fontFamily?: undefined;
|
|
69
|
+
justifyContent?: undefined;
|
|
70
|
+
background?: undefined;
|
|
71
|
+
position?: undefined;
|
|
72
|
+
top?: undefined;
|
|
73
|
+
left?: undefined;
|
|
74
|
+
display?: undefined;
|
|
75
|
+
maxWidth?: undefined;
|
|
76
|
+
whiteSpace?: undefined;
|
|
77
|
+
overflowX?: undefined;
|
|
78
|
+
scrollbarWidth?: undefined;
|
|
79
|
+
"&::-webkit-scrollbar"?: undefined;
|
|
80
|
+
width?: undefined;
|
|
81
|
+
margin?: undefined;
|
|
82
|
+
marginBottom?: undefined;
|
|
83
|
+
marginTop?: undefined;
|
|
84
|
+
lineHeight?: undefined;
|
|
85
|
+
overflowY?: undefined;
|
|
86
|
+
paddingLeft?: undefined;
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
options: {
|
|
90
|
+
widget: string;
|
|
91
|
+
};
|
|
92
|
+
} | {
|
|
93
|
+
type: string;
|
|
94
|
+
scope: string;
|
|
95
|
+
config: {
|
|
96
|
+
main: {
|
|
97
|
+
heading: string;
|
|
98
|
+
url?: undefined;
|
|
66
99
|
};
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
background: string;
|
|
85
|
-
borderRadius: string;
|
|
86
|
-
marginLeft: string;
|
|
87
|
-
marginTop: string;
|
|
88
|
-
justifyContent: string;
|
|
89
|
-
position: string;
|
|
90
|
-
};
|
|
91
|
-
layout: number;
|
|
92
|
-
style?: undefined;
|
|
100
|
+
style: {
|
|
101
|
+
color: string;
|
|
102
|
+
fontSize: string;
|
|
103
|
+
fontWeight: number;
|
|
104
|
+
fontFamily: string;
|
|
105
|
+
justifyContent: string;
|
|
106
|
+
background: string;
|
|
107
|
+
position: string;
|
|
108
|
+
top: string;
|
|
109
|
+
left: string;
|
|
110
|
+
display: string;
|
|
111
|
+
maxWidth: string;
|
|
112
|
+
whiteSpace: string;
|
|
113
|
+
overflowX: string;
|
|
114
|
+
scrollbarWidth: string;
|
|
115
|
+
"&::-webkit-scrollbar": {
|
|
116
|
+
display: string;
|
|
93
117
|
};
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
msOverflowStyle?: undefined;
|
|
123
|
-
maxWidth?: undefined;
|
|
124
|
-
"&::-webkit-scrollbar"?: undefined;
|
|
125
|
-
};
|
|
126
|
-
};
|
|
127
|
-
options: {
|
|
128
|
-
widget: string;
|
|
129
|
-
};
|
|
130
|
-
} | {
|
|
131
|
-
type: string;
|
|
132
|
-
scope: string;
|
|
133
|
-
config: {
|
|
134
|
-
main: {
|
|
135
|
-
heading: string;
|
|
136
|
-
};
|
|
137
|
-
style: {
|
|
138
|
-
color: string;
|
|
139
|
-
display: string;
|
|
140
|
-
fontSize: {
|
|
141
|
-
xs: string;
|
|
142
|
-
md: string;
|
|
143
|
-
};
|
|
144
|
-
fontWeight: string;
|
|
145
|
-
background: string;
|
|
146
|
-
justifyContent: string;
|
|
147
|
-
width: string;
|
|
148
|
-
margin: string;
|
|
149
|
-
marginTop: string;
|
|
150
|
-
position: string;
|
|
151
|
-
left: string;
|
|
152
|
-
whiteSpace: string;
|
|
153
|
-
overflowX: string;
|
|
154
|
-
overflowY: string;
|
|
155
|
-
scrollbarWidth: string;
|
|
156
|
-
msOverflowStyle: string;
|
|
157
|
-
maxWidth: string;
|
|
158
|
-
"&::-webkit-scrollbar": {
|
|
159
|
-
display: string;
|
|
160
|
-
};
|
|
161
|
-
marginLeft?: undefined;
|
|
162
|
-
height?: undefined;
|
|
163
|
-
};
|
|
164
|
-
};
|
|
165
|
-
options: {
|
|
166
|
-
widget: string;
|
|
167
|
-
};
|
|
168
|
-
})[];
|
|
169
|
-
scope?: undefined;
|
|
170
|
-
options?: undefined;
|
|
171
|
-
} | {
|
|
172
|
-
type: string;
|
|
173
|
-
scope: string;
|
|
174
|
-
config: {
|
|
175
|
-
main: {
|
|
176
|
-
heading: string;
|
|
177
|
-
columnSpacing?: undefined;
|
|
178
|
-
gap?: undefined;
|
|
179
|
-
};
|
|
180
|
-
style: {
|
|
181
|
-
color: string;
|
|
182
|
-
fontSize: string;
|
|
183
|
-
fontWeight: string;
|
|
184
|
-
justifyContent: string;
|
|
185
|
-
whiteSpace: string;
|
|
186
|
-
overflowX: string;
|
|
187
|
-
overflowY: string;
|
|
188
|
-
scrollbarWidth: string;
|
|
189
|
-
msOverflowStyle: string;
|
|
190
|
-
background: string;
|
|
191
|
-
width: string;
|
|
192
|
-
margin: string;
|
|
193
|
-
marginTop: {
|
|
194
|
-
xs: string;
|
|
195
|
-
md: string;
|
|
196
|
-
};
|
|
197
|
-
"&::-webkit-scrollbar": {
|
|
198
|
-
display: string;
|
|
199
|
-
};
|
|
200
|
-
};
|
|
201
|
-
layout: number;
|
|
202
|
-
wrapperStyle?: undefined;
|
|
203
|
-
componentsBoxStyle?: undefined;
|
|
118
|
+
containerStyle?: undefined;
|
|
119
|
+
imageStyle?: undefined;
|
|
120
|
+
width?: undefined;
|
|
121
|
+
margin?: undefined;
|
|
122
|
+
marginBottom?: undefined;
|
|
123
|
+
marginTop?: undefined;
|
|
124
|
+
lineHeight?: undefined;
|
|
125
|
+
overflowY?: undefined;
|
|
126
|
+
paddingLeft?: undefined;
|
|
127
|
+
};
|
|
128
|
+
};
|
|
129
|
+
options: {
|
|
130
|
+
widget: string;
|
|
131
|
+
};
|
|
132
|
+
} | {
|
|
133
|
+
type: string;
|
|
134
|
+
scope: string;
|
|
135
|
+
config: {
|
|
136
|
+
main: {
|
|
137
|
+
heading: string;
|
|
138
|
+
url?: undefined;
|
|
139
|
+
};
|
|
140
|
+
style: {
|
|
141
|
+
color: string;
|
|
142
|
+
display: string;
|
|
143
|
+
fontSize: {
|
|
144
|
+
xs: string;
|
|
145
|
+
md: string;
|
|
204
146
|
};
|
|
205
|
-
|
|
206
|
-
|
|
147
|
+
fontWeight: number;
|
|
148
|
+
background: string;
|
|
149
|
+
justifyContent: string;
|
|
150
|
+
width: string;
|
|
151
|
+
margin: string;
|
|
152
|
+
marginBottom: string;
|
|
153
|
+
marginTop: string;
|
|
154
|
+
lineHeight: string;
|
|
155
|
+
maxWidth: string;
|
|
156
|
+
whiteSpace: string;
|
|
157
|
+
overflowX: string;
|
|
158
|
+
overflowY: string;
|
|
159
|
+
scrollbarWidth: string;
|
|
160
|
+
"&::-webkit-scrollbar": {
|
|
161
|
+
display: string;
|
|
207
162
|
};
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
163
|
+
containerStyle?: undefined;
|
|
164
|
+
imageStyle?: undefined;
|
|
165
|
+
fontFamily?: undefined;
|
|
166
|
+
position?: undefined;
|
|
167
|
+
top?: undefined;
|
|
168
|
+
left?: undefined;
|
|
169
|
+
paddingLeft?: undefined;
|
|
170
|
+
};
|
|
171
|
+
};
|
|
172
|
+
options: {
|
|
173
|
+
widget: string;
|
|
174
|
+
};
|
|
213
175
|
} | {
|
|
214
176
|
type: string;
|
|
215
177
|
scope: string;
|
|
216
178
|
config: {
|
|
217
179
|
main: {
|
|
218
|
-
|
|
180
|
+
heading: string;
|
|
181
|
+
url?: undefined;
|
|
219
182
|
};
|
|
220
183
|
style: {
|
|
221
|
-
|
|
222
|
-
|
|
184
|
+
color: string;
|
|
185
|
+
fontSize: string;
|
|
186
|
+
fontWeight: string;
|
|
187
|
+
justifyContent: string;
|
|
188
|
+
background: string;
|
|
189
|
+
margin: string;
|
|
190
|
+
paddingLeft: string;
|
|
191
|
+
marginBottom: string;
|
|
192
|
+
maxWidth: string;
|
|
193
|
+
whiteSpace: string;
|
|
194
|
+
overflowX: string;
|
|
195
|
+
scrollbarWidth: string;
|
|
196
|
+
"&::-webkit-scrollbar": {
|
|
223
197
|
display: string;
|
|
224
|
-
justifyContent: string;
|
|
225
|
-
};
|
|
226
|
-
imageStyle: {
|
|
227
|
-
width: string;
|
|
228
|
-
fontSize: string;
|
|
229
|
-
padding: string;
|
|
230
|
-
margin: string;
|
|
231
|
-
height: string;
|
|
232
198
|
};
|
|
199
|
+
containerStyle?: undefined;
|
|
200
|
+
imageStyle?: undefined;
|
|
201
|
+
fontFamily?: undefined;
|
|
202
|
+
position?: undefined;
|
|
203
|
+
top?: undefined;
|
|
204
|
+
left?: undefined;
|
|
205
|
+
display?: undefined;
|
|
206
|
+
width?: undefined;
|
|
207
|
+
marginTop?: undefined;
|
|
208
|
+
lineHeight?: undefined;
|
|
209
|
+
overflowY?: undefined;
|
|
233
210
|
};
|
|
234
|
-
layout: number;
|
|
235
211
|
};
|
|
236
212
|
options: {
|
|
237
213
|
widget: string;
|
|
238
214
|
};
|
|
239
|
-
elements?: undefined;
|
|
240
215
|
})[];
|
|
241
216
|
};
|
package/package.json
CHANGED
|
@@ -1,26 +1,33 @@
|
|
|
1
1
|
import progressBar from "./uischema/progressBar";
|
|
2
2
|
import _ from "lodash";
|
|
3
|
-
import { createLayoutFormat } from "./buildConfig";
|
|
3
|
+
import { createLayoutFormat, flatObjectValueInArray } from "./buildConfig";
|
|
4
4
|
|
|
5
|
-
export const buildProgressBar = (config:any,componentScope:any) =>{
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
5
|
+
export const buildProgressBar = (config: any, componentScope: any) => {
|
|
6
|
+
const ProgressBar: any = _.cloneDeep(progressBar);
|
|
7
|
+
ProgressBar.scope = componentScope;
|
|
8
|
+
if (config.layout) {
|
|
9
|
+
ProgressBar.config.layout = config.layout;
|
|
10
|
+
}
|
|
11
|
+
ProgressBar.config.main.variant = config.variant;
|
|
12
|
+
ProgressBar.config.main.heading = config.label;
|
|
13
|
+
if (config.pieArcColors) {
|
|
14
|
+
ProgressBar.config.main.colorRange = flatObjectValueInArray(config.pieArcColors);
|
|
15
|
+
}
|
|
16
|
+
if (config.size) {
|
|
17
|
+
ProgressBar.config.main.size = Number(config.size);
|
|
18
|
+
}
|
|
19
|
+
if (config.bottomLabel_3) {
|
|
20
|
+
ProgressBar.config.main.bottomLabel_3 = config.bottomLabel_3;
|
|
21
|
+
}
|
|
22
|
+
if (config.layout) {
|
|
23
|
+
ProgressBar.config.layout = createLayoutFormat(config.layout)
|
|
24
|
+
}
|
|
25
|
+
if (config.bottomLabel_2) {
|
|
26
|
+
ProgressBar.config.main.bottomLabel_2 = config.bottomLabel_2;
|
|
27
|
+
}
|
|
28
|
+
if (config.bottomLabel_1) {
|
|
29
|
+
ProgressBar.config.main.bottomLabel_1 = config.bottomLabel_1;
|
|
30
|
+
}
|
|
31
|
+
return ProgressBar;
|
|
25
32
|
|
|
26
33
|
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import _ from "lodash";
|
|
2
|
+
import { createLayoutFormat, flatObjectValueInArray } from "./buildConfig";
|
|
3
|
+
const segmentUISchema = {
|
|
4
|
+
type: "Control",
|
|
5
|
+
scope: "#/properties/SegmentChart",
|
|
6
|
+
options: {
|
|
7
|
+
widget: "SegmentChart",
|
|
8
|
+
},
|
|
9
|
+
|
|
10
|
+
config: {
|
|
11
|
+
layout: { xs: 12, sm: 12, md: 12, lg: 12 },
|
|
12
|
+
main: {
|
|
13
|
+
//colorRange
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
export const buildSegmentChart = (config,componentScope) => {
|
|
21
|
+
const segment: any = _.cloneDeep(segmentUISchema);
|
|
22
|
+
segment.scope = componentScope;
|
|
23
|
+
|
|
24
|
+
if(config.layout){
|
|
25
|
+
segment.config.layout = createLayoutFormat(config.layout)
|
|
26
|
+
}
|
|
27
|
+
if (config.pieArcColors) {
|
|
28
|
+
segment.config.main.colorRange = flatObjectValueInArray(config.pieArcColors);
|
|
29
|
+
}
|
|
30
|
+
if (config.style) {
|
|
31
|
+
segment.config.style = JSON.parse(config.style)
|
|
32
|
+
}
|
|
33
|
+
return segment;
|
|
34
|
+
};
|
|
@@ -40,6 +40,7 @@ import { buildTreeMap } from "./buildTreeMap";
|
|
|
40
40
|
import { buildThoughtOfTheDay } from "./buildThoughtOfTheDay";
|
|
41
41
|
import { buildHorizontalLayout } from "./buildHorizontalLayout";
|
|
42
42
|
import { buildImage } from "./buildImage";
|
|
43
|
+
import { buildSegmentChart } from "./buildSegmentChart";
|
|
43
44
|
export let schema = {
|
|
44
45
|
type: "object",
|
|
45
46
|
properties: {},
|
|
@@ -263,6 +264,9 @@ const buildUiSchema = (config: any, store?: any) => {
|
|
|
263
264
|
case "Image":
|
|
264
265
|
elements = buildImage(config, componentScope);
|
|
265
266
|
break;
|
|
267
|
+
case "SegmentChart":
|
|
268
|
+
elements = buildSegmentChart(config, componentScope);
|
|
269
|
+
break;
|
|
266
270
|
default:
|
|
267
271
|
schema = {
|
|
268
272
|
type: "object",
|
|
@@ -389,7 +389,12 @@ export const buildPropertiesSection = function (type: String) {
|
|
|
389
389
|
getInputField("bottomLabel_1", "First BottomLabel"),
|
|
390
390
|
getInputField("bottomLabel_2", "Second BottomLabel"),
|
|
391
391
|
getInputField("bottomLabel_3", "Third BottomLabel"),
|
|
392
|
-
|
|
392
|
+
getInputField("size", "Size"),
|
|
393
|
+
getSelectField("variant", "Variant", [
|
|
394
|
+
{ label: "Circular", value: "circular" },
|
|
395
|
+
{ label: "Horizontal", value: "horizontal" },
|
|
396
|
+
]),
|
|
397
|
+
getArrayControl("pieArcColors", "color","Color"),
|
|
393
398
|
];
|
|
394
399
|
break;
|
|
395
400
|
case "card":
|