impaktapps-ui-builder 0.0.591 → 0.0.592-alpha.1
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 +325 -252
- package/dist/impaktapps-ui-builder.es.js.map +1 -1
- package/dist/impaktapps-ui-builder.umd.js +8 -8
- package/dist/impaktapps-ui-builder.umd.js.map +1 -1
- package/dist/src/impaktapps-ui-builder/builder/build/buildCard.d.ts +1 -1
- package/dist/src/impaktapps-ui-builder/builder/build/buildUiSchema.d.ts +1 -1
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/buildPropertiesSection.d.ts +2 -0
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/card.d.ts +104 -83
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/validationSections.d.ts +1 -1
- package/package.json +1 -1
- package/src/impaktapps-ui-builder/builder/build/buildCard.ts +6 -6
- package/src/impaktapps-ui-builder/builder/build/buildFileInput.ts +1 -1
- package/src/impaktapps-ui-builder/builder/build/buildProgressBar.ts +1 -1
- package/src/impaktapps-ui-builder/builder/build/buildRadio.ts +1 -1
- package/src/impaktapps-ui-builder/builder/build/buildUiSchema.ts +7 -7
- package/src/impaktapps-ui-builder/builder/build/uischema/apiSection.ts +10 -10
- package/src/impaktapps-ui-builder/builder/build/uischema/buildPropertiesSection.ts +64 -47
- package/src/impaktapps-ui-builder/builder/build/uischema/card.ts +132 -90
- package/src/impaktapps-ui-builder/builder/build/uischema/coreSection.ts +11 -11
- package/src/impaktapps-ui-builder/builder/build/uischema/dateInputField.ts +3 -3
- package/src/impaktapps-ui-builder/builder/build/uischema/file.ts +2 -2
- package/src/impaktapps-ui-builder/builder/build/uischema/leaderBoard.ts +6 -7
- package/src/impaktapps-ui-builder/builder/build/uischema/multiSelect.ts +1 -1
- package/src/impaktapps-ui-builder/builder/build/uischema/refresh.ts +3 -3
- package/src/impaktapps-ui-builder/builder/build/uischema/selectInputField.ts +1 -1
- package/src/impaktapps-ui-builder/builder/build/uischema/textInputField.ts +1 -1
- package/src/impaktapps-ui-builder/builder/build/uischema/validationSections.ts +3 -3
- package/src/impaktapps-ui-builder/builder/build/uischema/valueTab.ts +3 -3
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/uiSchema.ts +15 -31
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/PageMaster/uiSchema.ts +18 -11
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/event/uiSchema.ts +7 -16
- package/src/impaktapps-ui-builder/builder/services/event.ts +29 -3
- package/src/impaktapps-ui-builder/runtime/services/service.ts +3 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const buildCard: (config: any, componentScope: any) => any;
|
|
1
|
+
export declare const buildCard: (config: any, componentScope: any, store: any) => any;
|
|
@@ -8,5 +8,5 @@ export declare const buildSchema: (config: any, tableName?: string, isArrayType?
|
|
|
8
8
|
properties: {};
|
|
9
9
|
required: any[];
|
|
10
10
|
};
|
|
11
|
-
declare const buildUiSchema: (config: any) => any;
|
|
11
|
+
declare const buildUiSchema: (config: any, store?: any) => any;
|
|
12
12
|
export default buildUiSchema;
|
|
@@ -1,20 +1,23 @@
|
|
|
1
|
-
|
|
1
|
+
export default function Card(theme: any): {
|
|
2
2
|
type: string;
|
|
3
3
|
config: {
|
|
4
|
-
main: {
|
|
5
|
-
|
|
6
|
-
};
|
|
4
|
+
main: {};
|
|
5
|
+
wrapperStyle: {};
|
|
7
6
|
componentsBoxStyle: {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
height: {
|
|
11
|
-
xs: string;
|
|
12
|
-
md: string;
|
|
13
|
-
};
|
|
7
|
+
flexDirection: string;
|
|
8
|
+
flexWrap: string;
|
|
14
9
|
width: string;
|
|
15
|
-
textAlign: string;
|
|
16
10
|
background: string;
|
|
11
|
+
border: string;
|
|
17
12
|
borderRadius: string;
|
|
13
|
+
padding: string;
|
|
14
|
+
"&: hover": {
|
|
15
|
+
background: string;
|
|
16
|
+
border: string;
|
|
17
|
+
"& p": {
|
|
18
|
+
color: string;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
18
21
|
};
|
|
19
22
|
layout: {
|
|
20
23
|
xs: number;
|
|
@@ -25,94 +28,112 @@ declare const _default: {
|
|
|
25
28
|
};
|
|
26
29
|
elements: ({
|
|
27
30
|
type: string;
|
|
28
|
-
scope: string;
|
|
29
31
|
config: {
|
|
30
|
-
main: {
|
|
31
|
-
heading: string;
|
|
32
|
-
url?: undefined;
|
|
33
|
-
};
|
|
34
|
-
style: {
|
|
35
|
-
position: string;
|
|
36
|
-
left: string;
|
|
37
|
-
top: string;
|
|
38
|
-
color: string;
|
|
39
|
-
height: string;
|
|
40
|
-
display: string;
|
|
41
|
-
fontSize: {
|
|
42
|
-
xs: string;
|
|
43
|
-
md: string;
|
|
44
|
-
};
|
|
45
|
-
alignItems: string;
|
|
46
|
-
background: string;
|
|
47
|
-
justifyContent: string;
|
|
48
|
-
objectFit?: undefined;
|
|
49
|
-
right?: undefined;
|
|
50
|
-
width?: undefined;
|
|
51
|
-
padding?: undefined;
|
|
52
|
-
};
|
|
53
32
|
layout: number;
|
|
33
|
+
main?: undefined;
|
|
34
|
+
style?: undefined;
|
|
54
35
|
};
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
fontSize: string;
|
|
76
|
-
alignItems: string;
|
|
77
|
-
background: string;
|
|
78
|
-
padding: string;
|
|
79
|
-
justifyContent: string;
|
|
80
|
-
left?: undefined;
|
|
36
|
+
elements: {
|
|
37
|
+
type: string;
|
|
38
|
+
config: {
|
|
39
|
+
main: {
|
|
40
|
+
columnSpacing: number;
|
|
41
|
+
gap: number;
|
|
42
|
+
};
|
|
43
|
+
wrapperStyle: {
|
|
44
|
+
marginTop: string;
|
|
45
|
+
background: string;
|
|
46
|
+
};
|
|
47
|
+
componentsBoxStyle: {
|
|
48
|
+
flexDirection: string;
|
|
49
|
+
flexWrap: string;
|
|
50
|
+
width: string;
|
|
51
|
+
height: string;
|
|
52
|
+
background: string;
|
|
53
|
+
borderRadius: string;
|
|
54
|
+
};
|
|
55
|
+
layout: number;
|
|
81
56
|
};
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
57
|
+
elements: ({
|
|
58
|
+
type: string;
|
|
59
|
+
scope: string;
|
|
60
|
+
config: {
|
|
61
|
+
main: {
|
|
62
|
+
heading: string;
|
|
63
|
+
};
|
|
64
|
+
style: {
|
|
65
|
+
color: string;
|
|
66
|
+
display: string;
|
|
67
|
+
fontSize: {
|
|
68
|
+
xs: string;
|
|
69
|
+
md: string;
|
|
70
|
+
};
|
|
71
|
+
fontWeight: string;
|
|
72
|
+
background: string;
|
|
73
|
+
justifyContent: string;
|
|
74
|
+
width: string;
|
|
75
|
+
margin: string;
|
|
76
|
+
textWrap?: undefined;
|
|
77
|
+
lineHeight?: undefined;
|
|
78
|
+
};
|
|
79
|
+
layout: number;
|
|
80
|
+
};
|
|
81
|
+
options: {
|
|
82
|
+
widget: string;
|
|
83
|
+
};
|
|
84
|
+
} | {
|
|
85
|
+
type: string;
|
|
86
|
+
scope: string;
|
|
87
|
+
config: {
|
|
88
|
+
main: {
|
|
89
|
+
heading: string;
|
|
90
|
+
};
|
|
91
|
+
style: {
|
|
92
|
+
color: string;
|
|
93
|
+
fontSize: string;
|
|
94
|
+
justifyContent: string;
|
|
95
|
+
textWrap: string;
|
|
96
|
+
background: string;
|
|
97
|
+
width: string;
|
|
98
|
+
margin: string;
|
|
99
|
+
lineHeight: string;
|
|
100
|
+
display?: undefined;
|
|
101
|
+
fontWeight?: undefined;
|
|
102
|
+
};
|
|
103
|
+
layout: number;
|
|
104
|
+
};
|
|
105
|
+
options: {
|
|
106
|
+
widget: string;
|
|
107
|
+
};
|
|
108
|
+
})[];
|
|
109
|
+
}[];
|
|
110
|
+
scope?: undefined;
|
|
111
|
+
options?: undefined;
|
|
87
112
|
} | {
|
|
88
113
|
type: string;
|
|
89
114
|
scope: string;
|
|
90
115
|
config: {
|
|
91
116
|
main: {
|
|
92
|
-
|
|
93
|
-
url?: undefined;
|
|
117
|
+
url: string;
|
|
94
118
|
};
|
|
95
119
|
style: {
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
right?: undefined;
|
|
108
|
-
width?: undefined;
|
|
109
|
-
padding?: undefined;
|
|
120
|
+
containerStyle: {
|
|
121
|
+
height: string;
|
|
122
|
+
display: string;
|
|
123
|
+
justifyContent: string;
|
|
124
|
+
};
|
|
125
|
+
imageStyle: {
|
|
126
|
+
height: string;
|
|
127
|
+
fontSize: string;
|
|
128
|
+
padding: string;
|
|
129
|
+
marginLeft: string;
|
|
130
|
+
};
|
|
110
131
|
};
|
|
111
132
|
layout: number;
|
|
112
133
|
};
|
|
113
134
|
options: {
|
|
114
135
|
widget: string;
|
|
115
136
|
};
|
|
137
|
+
elements?: undefined;
|
|
116
138
|
})[];
|
|
117
139
|
};
|
|
118
|
-
export default _default;
|
package/package.json
CHANGED
|
@@ -2,25 +2,25 @@ import Card from "./uischema/card";
|
|
|
2
2
|
import _ from "lodash";
|
|
3
3
|
import { createLayoutFormat } from "./buildConfig";
|
|
4
4
|
|
|
5
|
-
export const buildCard = (config,componentScope) =>{
|
|
6
|
-
const card: any = _.cloneDeep(Card);
|
|
5
|
+
export const buildCard = (config,componentScope,store) =>{
|
|
6
|
+
const card: any = _.cloneDeep(Card(store.theme.myTheme));
|
|
7
7
|
if (config.style) {
|
|
8
8
|
card.config.style = JSON.parse(config.style)
|
|
9
9
|
}
|
|
10
|
-
card.elements[0].scope = `#/properties/${config.name}/properties/value`
|
|
10
|
+
card.elements[0].elements[0].elements[0].scope = `#/properties/${config.name}/properties/value`
|
|
11
11
|
card.elements[1].scope = `#/properties/${config.name}/properties/url`
|
|
12
|
-
card.elements[
|
|
12
|
+
card.elements[0].elements[0].elements[1].scope = `#/properties/${config.name}/properties/description`
|
|
13
13
|
if(config.layout){
|
|
14
14
|
card.config.layout = createLayoutFormat(config.layout)
|
|
15
15
|
}
|
|
16
16
|
if(config.label){
|
|
17
|
-
card.elements[0].config.main.heading = config.label;
|
|
17
|
+
card.elements[0].elements[0].elements[0].config.main.heading = config.label;
|
|
18
18
|
}
|
|
19
19
|
if(config.url){
|
|
20
20
|
card.elements[1].config.main.url = config.url;
|
|
21
21
|
}
|
|
22
22
|
if(config.description){
|
|
23
|
-
card.elements[
|
|
23
|
+
card.elements[0].elements[0].elements[1].config.main.heading = config.description;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
|
|
@@ -8,7 +8,7 @@ export const buildProgressBar = (config:any,componentScope:any) =>{
|
|
|
8
8
|
if (config.layout) {
|
|
9
9
|
ProgressBar.config.layout = config.layout;
|
|
10
10
|
}
|
|
11
|
-
ProgressBar.config.main.heading = config.
|
|
11
|
+
ProgressBar.config.main.heading = config.label;
|
|
12
12
|
if (config.bottomLabel_3) {
|
|
13
13
|
ProgressBar.config.main.bottomLabel_3 = config.bottomLabel_3;
|
|
14
14
|
}
|
|
@@ -165,7 +165,7 @@ export const buildSchema = (config: any, tableName?: string, isArrayType?: boole
|
|
|
165
165
|
}
|
|
166
166
|
|
|
167
167
|
|
|
168
|
-
const buildUiSchema = (config: any) => {
|
|
168
|
+
const buildUiSchema = (config: any, store?: any) => {
|
|
169
169
|
let elements: any = {};
|
|
170
170
|
const componentScope = `#/properties/${config.name}`;
|
|
171
171
|
switch (config.type) {
|
|
@@ -249,7 +249,7 @@ const buildUiSchema = (config: any) => {
|
|
|
249
249
|
elements = buildEmptyBox(config, componentScope);
|
|
250
250
|
break;
|
|
251
251
|
case "card":
|
|
252
|
-
elements = buildCard(config, componentScope);
|
|
252
|
+
elements = buildCard(config, componentScope, store);
|
|
253
253
|
break;
|
|
254
254
|
case "Graph":
|
|
255
255
|
switch (config.graphType) {
|
|
@@ -328,7 +328,7 @@ const buildUiSchema = (config: any) => {
|
|
|
328
328
|
header: cellElem.label || cellElem.name,
|
|
329
329
|
size: sizeMap[cellElem.name] || 180,
|
|
330
330
|
type: cellElem.columnFormat,
|
|
331
|
-
elements: cellElem.type == "ColumnGroup" ? cellElem.elements.map((childCellElem) => buildUiSchema(childCellElem)) : []
|
|
331
|
+
elements: cellElem.type == "ColumnGroup" ? cellElem.elements.map((childCellElem) => buildUiSchema(childCellElem, store)) : []
|
|
332
332
|
}
|
|
333
333
|
})
|
|
334
334
|
}
|
|
@@ -346,8 +346,8 @@ const buildUiSchema = (config: any) => {
|
|
|
346
346
|
header: cellElem.label || cellElem.name,
|
|
347
347
|
size: sizeMap[cellElem.name] || 180,
|
|
348
348
|
type: cellElem.columnFormat,
|
|
349
|
-
widget: cellElem.type != "ColumnGroup" ? buildUiSchema(cellElem) : undefined,
|
|
350
|
-
elements: cellElem.type == "ColumnGroup" ? cellElem.elements.map((childCellElem) => buildUiSchema(childCellElem)) : []
|
|
349
|
+
widget: cellElem.type != "ColumnGroup" ? buildUiSchema(cellElem, store) : undefined,
|
|
350
|
+
elements: cellElem.type == "ColumnGroup" ? cellElem.elements.map((childCellElem) => buildUiSchema(childCellElem, store)) : []
|
|
351
351
|
}
|
|
352
352
|
} else {
|
|
353
353
|
return {
|
|
@@ -362,12 +362,12 @@ const buildUiSchema = (config: any) => {
|
|
|
362
362
|
}
|
|
363
363
|
else if (config.type == "Array") {
|
|
364
364
|
elements.options.detail.elements = config.elements.map((e: any, elemInd: number) => {
|
|
365
|
-
return buildUiSchema(e)
|
|
365
|
+
return buildUiSchema(e,store)
|
|
366
366
|
});
|
|
367
367
|
}
|
|
368
368
|
else {
|
|
369
369
|
elements.elements = config.elements.map((e: any, elemInd: number) => {
|
|
370
|
-
return buildUiSchema(e)
|
|
370
|
+
return buildUiSchema(e,store)
|
|
371
371
|
});
|
|
372
372
|
}
|
|
373
373
|
}
|
|
@@ -11,7 +11,7 @@ export const APISection = {
|
|
|
11
11
|
widget: "SelectInputField",
|
|
12
12
|
},
|
|
13
13
|
config: {
|
|
14
|
-
layout: { xs:
|
|
14
|
+
layout: { xs: 6, sm: 6, md: 4, lg: 4 },
|
|
15
15
|
main: {
|
|
16
16
|
label: "Method",
|
|
17
17
|
type: "text",
|
|
@@ -26,7 +26,7 @@ export const APISection = {
|
|
|
26
26
|
widget: "InputField",
|
|
27
27
|
},
|
|
28
28
|
config: {
|
|
29
|
-
layout: { xs:
|
|
29
|
+
layout: { xs: 6, sm: 6, md: 4, lg: 4 },
|
|
30
30
|
main: {
|
|
31
31
|
label: "Path",
|
|
32
32
|
type: "text",
|
|
@@ -43,7 +43,7 @@ export const APISection = {
|
|
|
43
43
|
widget: "EmptyBox",
|
|
44
44
|
},
|
|
45
45
|
config: {
|
|
46
|
-
layout: { xs: 0, sm:
|
|
46
|
+
layout: { xs: 0, sm: 0, md: 4, lg: 4 },
|
|
47
47
|
},
|
|
48
48
|
},
|
|
49
49
|
{
|
|
@@ -54,7 +54,7 @@ export const APISection = {
|
|
|
54
54
|
widget: "EmptyBox",
|
|
55
55
|
},
|
|
56
56
|
config: {
|
|
57
|
-
layout: { xs: 0, sm:
|
|
57
|
+
layout: { xs: 0, sm: 0, md: 4, lg: 4 },
|
|
58
58
|
},
|
|
59
59
|
},
|
|
60
60
|
{
|
|
@@ -73,7 +73,7 @@ export const APISection = {
|
|
|
73
73
|
widget: "InputField",
|
|
74
74
|
},
|
|
75
75
|
config: {
|
|
76
|
-
layout: { xs:
|
|
76
|
+
layout: { xs: 6, sm: 6, md: 4, lg: 4 },
|
|
77
77
|
main: {
|
|
78
78
|
label: "Key",
|
|
79
79
|
},
|
|
@@ -87,7 +87,7 @@ export const APISection = {
|
|
|
87
87
|
widget: "InputField",
|
|
88
88
|
},
|
|
89
89
|
config: {
|
|
90
|
-
layout: { xs:
|
|
90
|
+
layout: { xs: 6, sm: 6, md: 4, lg: 4 },
|
|
91
91
|
main: {
|
|
92
92
|
label: "Value",
|
|
93
93
|
},
|
|
@@ -101,7 +101,7 @@ export const APISection = {
|
|
|
101
101
|
widget: "EmptyBox",
|
|
102
102
|
},
|
|
103
103
|
config: {
|
|
104
|
-
layout: { xs: 0, sm:
|
|
104
|
+
layout: { xs: 0, sm: 0, md: 4, lg: 4 },
|
|
105
105
|
},
|
|
106
106
|
},
|
|
107
107
|
],
|
|
@@ -124,7 +124,7 @@ export const APISection = {
|
|
|
124
124
|
widget: "InputField",
|
|
125
125
|
},
|
|
126
126
|
config: {
|
|
127
|
-
layout: { xs:
|
|
127
|
+
layout: { xs: 6, sm: 6, md: 4, lg: 4 },
|
|
128
128
|
main: {
|
|
129
129
|
label: "Key",
|
|
130
130
|
},
|
|
@@ -138,7 +138,7 @@ export const APISection = {
|
|
|
138
138
|
widget: "InputField",
|
|
139
139
|
},
|
|
140
140
|
config: {
|
|
141
|
-
layout: { xs:
|
|
141
|
+
layout: { xs: 6, sm: 6, md: 4, lg: 4 },
|
|
142
142
|
main: {
|
|
143
143
|
label: "Value",
|
|
144
144
|
},
|
|
@@ -152,7 +152,7 @@ export const APISection = {
|
|
|
152
152
|
widget: "EmptyBox",
|
|
153
153
|
},
|
|
154
154
|
config: {
|
|
155
|
-
layout: { xs: 0, sm:
|
|
155
|
+
layout: { xs: 0, sm: 0, md: 4, lg: 4 },
|
|
156
156
|
},
|
|
157
157
|
},
|
|
158
158
|
],
|