impaktapps-ui-builder 0.0.974 → 0.0.1051
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 +1391 -1366
- package/dist/impaktapps-ui-builder.es.js.map +1 -1
- package/dist/impaktapps-ui-builder.umd.js +11 -11
- package/dist/impaktapps-ui-builder.umd.js.map +1 -1
- package/dist/src/impaktapps-ui-builder/builder/build/buildThoughtOfTheDay.d.ts +1 -0
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/button.d.ts +0 -1
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/card.d.ts +90 -23
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/graph.d.ts +50 -23
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/leaderBoard.d.ts +10 -301
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/progressBar.d.ts +6 -1
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/thoughtOfTheDay.d.ts +17 -0
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/timer.d.ts +1 -14
- package/dist/src/impaktapps-ui-builder/builder/services/utils.d.ts +1 -1
- package/package.json +5 -1
- package/src/impaktapps-ui-builder/builder/build/buildCard.ts +7 -3
- package/src/impaktapps-ui-builder/builder/build/buildConfig.ts +1 -1
- package/src/impaktapps-ui-builder/builder/build/buildHorizontalBarGraph.ts +43 -44
- package/src/impaktapps-ui-builder/builder/build/buildInputSlider.ts +1 -1
- package/src/impaktapps-ui-builder/builder/build/buildLeaderboard.ts +18 -13
- package/src/impaktapps-ui-builder/builder/build/buildLineGraph.ts +10 -11
- package/src/impaktapps-ui-builder/builder/build/buildPieGraph.ts +4 -15
- package/src/impaktapps-ui-builder/builder/build/buildRankCard.ts +4 -10
- package/src/impaktapps-ui-builder/builder/build/buildStackBarGraph.ts +16 -13
- package/src/impaktapps-ui-builder/builder/build/buildText.ts +21 -18
- package/src/impaktapps-ui-builder/builder/build/buildThoughtOfTheDay.ts +22 -0
- package/src/impaktapps-ui-builder/builder/build/buildUiSchema.ts +14 -6
- package/src/impaktapps-ui-builder/builder/build/uischema/buildPropertiesSection.ts +18 -13
- package/src/impaktapps-ui-builder/builder/build/uischema/button.ts +0 -1
- package/src/impaktapps-ui-builder/builder/build/uischema/card.ts +102 -46
- package/src/impaktapps-ui-builder/builder/build/uischema/graph.ts +13 -28
- package/src/impaktapps-ui-builder/builder/build/uischema/leaderBoard.ts +10 -366
- package/src/impaktapps-ui-builder/builder/build/uischema/progressBar.ts +1 -1
- package/src/impaktapps-ui-builder/builder/build/uischema/rankCard.ts +1 -1
- package/src/impaktapps-ui-builder/builder/build/uischema/runnerBoyProgressBar.ts +1 -1
- package/src/impaktapps-ui-builder/builder/build/uischema/thoughtOfTheDay.ts +14 -0
- package/src/impaktapps-ui-builder/builder/build/uischema/timer.ts +2 -16
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/schema.ts +1 -0
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/uiSchema.ts +581 -487
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/PageMaster/uiSchema.ts +177 -111
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/event/uiSchema.ts +90 -59
- package/src/impaktapps-ui-builder/builder/services/component.ts +127 -30
- package/src/impaktapps-ui-builder/builder/services/event.ts +1 -1
- package/src/impaktapps-ui-builder/builder/services/utils.ts +2 -2
- package/src/impaktapps-ui-builder/runtime/services/events.ts +32 -21
- package/src/impaktapps-ui-builder/runtime/services/service.ts +5 -4
|
@@ -5,16 +5,20 @@ import { createLayoutFormat } from "./buildConfig";
|
|
|
5
5
|
export const buildCard = (config,componentScope,store) =>{
|
|
6
6
|
const card: any = _.cloneDeep(Card(store.theme.myTheme));
|
|
7
7
|
if (config.style) {
|
|
8
|
-
card.config.
|
|
8
|
+
card.config.wrapperStyle = JSON.parse(config.style)
|
|
9
9
|
}
|
|
10
|
-
card.elements[0].elements[0].elements[0].scope = `#/properties/${config.name}/properties/value`
|
|
10
|
+
card.elements[0].elements[0].elements[0].elements[1].scope = `#/properties/${config.name}/properties/value`
|
|
11
11
|
card.elements[1].scope = `#/properties/${config.name}/properties/url`
|
|
12
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
|
+
if(config?.titleIcon){
|
|
17
|
+
card.elements[0].elements[0].elements[0].elements[0].config.main.heading = eval(`'\\${config.titleIcon}'`);
|
|
18
|
+
card.elements[0].elements[0].elements[0].elements[1].config.style.left = "24px"
|
|
19
|
+
}
|
|
16
20
|
if(config.label){
|
|
17
|
-
card.elements[0].elements[0].elements[0].config.main.heading = config.label;
|
|
21
|
+
card.elements[0].elements[0].elements[0].elements[1].config.main.heading = config.label;
|
|
18
22
|
}
|
|
19
23
|
if(config.url){
|
|
20
24
|
card.elements[1].config.main.url = config.url;
|
|
@@ -42,7 +42,7 @@ export const createLayoutFormat = (config: any[]) => {
|
|
|
42
42
|
return data;
|
|
43
43
|
};
|
|
44
44
|
export const flatObjectValueInArray = (config: any[]=[]) => {
|
|
45
|
-
if (config
|
|
45
|
+
if (config.length < 1) {
|
|
46
46
|
return
|
|
47
47
|
}
|
|
48
48
|
const keyName = Object.keys(config[0])[0]
|
|
@@ -1,49 +1,48 @@
|
|
|
1
|
-
import { createLayoutFormat } from "./buildConfig";
|
|
1
|
+
import { createLayoutFormat, flatObjectValueInArray } from "./buildConfig";
|
|
2
2
|
import { HorizontalBarGraph } from "./uischema/graph";
|
|
3
3
|
import _ from "lodash";
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
config.
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
};
|
|
5
|
+
|
|
6
|
+
const buildHorizontalBarGraph = (config:any,componentScope:string) => {
|
|
7
|
+
const horizontalBarGraph: any = _.cloneDeep(HorizontalBarGraph);
|
|
8
|
+
horizontalBarGraph.scope = componentScope;
|
|
9
|
+
if (config.layout) {
|
|
10
|
+
horizontalBarGraph.config.layout = createLayoutFormat(config.layout);
|
|
11
|
+
}
|
|
12
|
+
horizontalBarGraph.config.main.type = config.graphType;
|
|
13
|
+
horizontalBarGraph.scope = componentScope;
|
|
14
|
+
horizontalBarGraph.config.main.header = config.heading;
|
|
15
|
+
if (config.legendHide) {
|
|
16
|
+
horizontalBarGraph.config.main.legendAvailable = config.legendHide==="YES"?false:true;
|
|
17
|
+
}
|
|
18
|
+
if (config.bottomAxisAngle) {
|
|
19
|
+
horizontalBarGraph.config.main.bottomAxisAngle = config.bottomAxisAngle==="YES"?true:false;
|
|
20
|
+
}
|
|
21
|
+
if (config.legendLabels) {
|
|
22
|
+
horizontalBarGraph.config.main.legendLabels = flatObjectValueInArray(config.legendLabels);
|
|
23
|
+
}
|
|
24
|
+
if (config.pieArcColors) {
|
|
25
|
+
horizontalBarGraph.config.style.barStyle.colorRange = flatObjectValueInArray(config.pieArcColors);
|
|
26
|
+
}
|
|
27
|
+
if (config.xAxisValue) {
|
|
28
|
+
horizontalBarGraph.config.main.xAxisValue = config.xAxisValue;
|
|
29
|
+
}
|
|
30
|
+
if (config.height) {
|
|
31
|
+
horizontalBarGraph.config.style.containerStyle.height = config.height;
|
|
32
|
+
}
|
|
33
|
+
if (config.leftMargin) {
|
|
34
|
+
horizontalBarGraph.config.style.labelStyle.margin ={
|
|
35
|
+
left: config.leftMargin
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
if (config.bottomLabel) {
|
|
39
|
+
horizontalBarGraph.config.main.bottomLabel =
|
|
40
|
+
config.bottomLabel;
|
|
41
|
+
}
|
|
42
|
+
if (config.leftLabel) {
|
|
43
|
+
horizontalBarGraph.config.main.leftLabel = config.leftLabel;
|
|
44
|
+
}
|
|
45
|
+
return horizontalBarGraph
|
|
46
|
+
}
|
|
48
47
|
|
|
49
48
|
export default buildHorizontalBarGraph;
|
|
@@ -3,7 +3,6 @@ import buildUiSchema from "./buildUiSchema";
|
|
|
3
3
|
import _ from "lodash";
|
|
4
4
|
import { createLayoutFormat } from "./buildConfig";
|
|
5
5
|
|
|
6
|
-
|
|
7
6
|
export const buildLeaderBoard = (config) => {
|
|
8
7
|
const LeaderBoard: any = _.cloneDeep(leaderBoard)
|
|
9
8
|
if (config.elements) {
|
|
@@ -14,29 +13,35 @@ export const buildLeaderBoard = (config) => {
|
|
|
14
13
|
const widgetSchema = { widget: buildUiSchema(e), accessorKey: e.name, header: e.label || e.name, };
|
|
15
14
|
return { ...widgetSchema };
|
|
16
15
|
})
|
|
17
|
-
LeaderBoard.elements
|
|
16
|
+
LeaderBoard.elements = modifyColumns;
|
|
18
17
|
}
|
|
19
18
|
LeaderBoard.config.main.label = config.label
|
|
20
19
|
if (config.name) {
|
|
21
|
-
LeaderBoard.
|
|
22
|
-
LeaderBoard.elements[3].scope = `#/properties/${config.name}/properties/firstName`
|
|
23
|
-
LeaderBoard.elements[1].scope = `#/properties/${config.name}/properties/secondImage`;
|
|
24
|
-
LeaderBoard.elements[4].scope = `#/properties/${config.name}/properties/secondName`
|
|
25
|
-
LeaderBoard.elements[2].scope = `#/properties/${config.name}/properties/thirdImage`;
|
|
26
|
-
LeaderBoard.elements[5].scope = `#/properties/${config.name}/properties/thirdName`
|
|
27
|
-
LeaderBoard.elements[9].scope = `#/properties/${config.name}/properties/table`
|
|
20
|
+
LeaderBoard.scope=`#/properties/${config.name}`
|
|
28
21
|
}
|
|
29
22
|
if (config.firstImage) {
|
|
30
|
-
LeaderBoard.
|
|
23
|
+
LeaderBoard.config.main.firstImage = config.firstImage;
|
|
31
24
|
}
|
|
32
25
|
if (config.secondImage) {
|
|
33
|
-
LeaderBoard.
|
|
26
|
+
LeaderBoard.config.main.secondImage = config.secondImage;
|
|
34
27
|
}
|
|
35
|
-
if (config.
|
|
36
|
-
LeaderBoard.
|
|
28
|
+
if (config.thirdImage) {
|
|
29
|
+
LeaderBoard.config.main.thirdImage = config.thirdImage;
|
|
30
|
+
}
|
|
31
|
+
if (config.nameKey) {
|
|
32
|
+
LeaderBoard.config.main.nameKey = config.nameKey;
|
|
33
|
+
}
|
|
34
|
+
if (config.imageKey) {
|
|
35
|
+
LeaderBoard.config.main.imageKey = config.imageKey;
|
|
36
|
+
}
|
|
37
|
+
if (config.scoreKey) {
|
|
38
|
+
LeaderBoard.config.main.scoreKey = config.scoreKey;
|
|
37
39
|
}
|
|
38
40
|
if (config.layout) {
|
|
39
41
|
LeaderBoard.config.layout = createLayoutFormat(config.layout);
|
|
40
42
|
}
|
|
43
|
+
if (config.style) {
|
|
44
|
+
LeaderBoard.config.style = JSON.parse(config.style)
|
|
45
|
+
}
|
|
41
46
|
return LeaderBoard
|
|
42
47
|
}
|
|
@@ -11,6 +11,11 @@ export const buildLineGraph = (config, componentScope) => {
|
|
|
11
11
|
if (config.height) {
|
|
12
12
|
lineGraph.config.style.containerStyle.height = config.height;
|
|
13
13
|
}
|
|
14
|
+
if (config.leftMargin) {
|
|
15
|
+
lineGraph.config.style.labelStyle.margin ={
|
|
16
|
+
left: config.leftMargin
|
|
17
|
+
}
|
|
18
|
+
}
|
|
14
19
|
if (config.bottomLabel) {
|
|
15
20
|
lineGraph.config.main.bottomLabel = config.bottomLabel;
|
|
16
21
|
}
|
|
@@ -24,24 +29,18 @@ export const buildLineGraph = (config, componentScope) => {
|
|
|
24
29
|
lineGraph.config.main.leftLabel = config.leftLabel;
|
|
25
30
|
}
|
|
26
31
|
if (config.legendHide) {
|
|
27
|
-
lineGraph.config.main.
|
|
32
|
+
lineGraph.config.main.legendAvailable = config.legendHide==="YES"?false:true;
|
|
33
|
+
}
|
|
34
|
+
if (config.bottomAxisAngle) {
|
|
35
|
+
lineGraph.config.main.bottomAxisAngle = config.bottomAxisAngle==="YES"?true:false;
|
|
28
36
|
}
|
|
29
37
|
if (config.legendLabels) {
|
|
30
|
-
lineGraph.config.main.
|
|
38
|
+
lineGraph.config.main.legendLabels = flatObjectValueInArray(config.legendLabels);
|
|
31
39
|
}
|
|
32
40
|
|
|
33
41
|
if (config.pieArcColors) {
|
|
34
42
|
lineGraph.config.style.lineStyle.colorRange = flatObjectValueInArray(config.pieArcColors);
|
|
35
43
|
}
|
|
36
|
-
if (config.leftLabelMargin) {
|
|
37
|
-
lineGraph.config.style.labelStyle.margin = {
|
|
38
|
-
left: config.leftLabelMargin,
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
if (config.leftLabelOffset) {
|
|
42
|
-
lineGraph.config.style.labelStyle.leftLabelOffset =
|
|
43
|
-
config.leftLabelOffset;
|
|
44
|
-
}
|
|
45
44
|
lineGraph.scope = componentScope;
|
|
46
45
|
return lineGraph;
|
|
47
46
|
}
|
|
@@ -7,33 +7,22 @@ export const buildPieGraph = (config, componentScope) => {
|
|
|
7
7
|
pieGraph.config.layout = createLayoutFormat(config.layout);
|
|
8
8
|
}
|
|
9
9
|
if (config.height) {
|
|
10
|
-
pieGraph.config.style =
|
|
11
|
-
{
|
|
12
|
-
containerStyle: {
|
|
13
|
-
height: config.height
|
|
14
|
-
}
|
|
15
|
-
};
|
|
16
|
-
|
|
10
|
+
pieGraph.config.style.containerStyle.height = config.height;
|
|
17
11
|
}
|
|
18
12
|
if (config.legendHide) {
|
|
19
|
-
pieGraph.config.main.
|
|
13
|
+
pieGraph.config.main.legendAvailable = config.legendHide === "YES" ? false : true;
|
|
20
14
|
}
|
|
21
15
|
pieGraph.scope = componentScope;
|
|
22
16
|
pieGraph.config.main.header = config.heading;
|
|
23
17
|
|
|
24
18
|
if (config.legendLabels) {
|
|
25
|
-
pieGraph.config.main.
|
|
19
|
+
pieGraph.config.main.legendLabels = flatObjectValueInArray(config.legendLabels);
|
|
26
20
|
}
|
|
27
21
|
if (config.xAxisValue) {
|
|
28
22
|
pieGraph.config.main.xAxisValue = config.xAxisValue;
|
|
29
23
|
}
|
|
30
24
|
if (config.pieArcColors) {
|
|
31
|
-
pieGraph.config.style =
|
|
32
|
-
pieStyle: {
|
|
33
|
-
colorRange: flatObjectValueInArray(config.pieArcColors)
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
|
|
25
|
+
pieGraph.config.style.pieStyle.colorRange = flatObjectValueInArray(config.pieArcColors);
|
|
37
26
|
}
|
|
38
27
|
return pieGraph;
|
|
39
28
|
}
|
|
@@ -6,17 +6,11 @@ export const buildRankCard = (config,componentScope) =>{
|
|
|
6
6
|
const rankCard: any = _.cloneDeep(RankCard);
|
|
7
7
|
rankCard.scope = componentScope;
|
|
8
8
|
|
|
9
|
-
if(config.image){
|
|
10
|
-
rankCard.config.main.url = config.image;
|
|
11
|
-
}
|
|
12
|
-
if(config.title){
|
|
13
|
-
rankCard.config.main.title = config.title
|
|
14
|
-
}
|
|
15
|
-
if(config.description){
|
|
16
|
-
rankCard.config.main.description = config.description
|
|
17
|
-
}
|
|
18
9
|
if(config.rank){
|
|
19
|
-
rankCard.config.main.rank =
|
|
10
|
+
rankCard.config.main.rank = `${config.rank}`
|
|
11
|
+
}
|
|
12
|
+
if(config.height){
|
|
13
|
+
rankCard.config.main.height = `${config.height}px`
|
|
20
14
|
}
|
|
21
15
|
if(config.layout){
|
|
22
16
|
rankCard.config.layout = createLayoutFormat(config.layout)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createLayoutFormat } from "./buildConfig";
|
|
1
|
+
import { createLayoutFormat, flatObjectValueInArray } from "./buildConfig";
|
|
2
2
|
import { BarGraph } from "./uischema/graph";
|
|
3
3
|
import _ from "lodash";
|
|
4
4
|
|
|
@@ -9,11 +9,18 @@ export const buildStackbarGraph = (config:any,componentScope:string) => {
|
|
|
9
9
|
}
|
|
10
10
|
if (config.legendHide) {
|
|
11
11
|
barGraph.config.main.legendAvailable = config.legendHide;
|
|
12
|
+
barGraph.config.main.legendAvailable = config.legendHide==="YES"?false:true;
|
|
12
13
|
}
|
|
13
|
-
|
|
14
|
+
if (config.bottomAxisAngle) {
|
|
15
|
+
barGraph.config.main.bottomAxisAngle = config.bottomAxisAngle==="YES"?true:false;
|
|
16
|
+
}
|
|
17
|
+
barGraph.config.main.type = config?.graphType ?? "BarGraph";
|
|
14
18
|
barGraph.config.main.header = config.heading;
|
|
15
|
-
if (config.
|
|
16
|
-
barGraph.config.
|
|
19
|
+
if (config.legendLabels) {
|
|
20
|
+
barGraph.config.main.legendLabels = flatObjectValueInArray(config.legendLabels);
|
|
21
|
+
}
|
|
22
|
+
if (config.pieArcColors) {
|
|
23
|
+
barGraph.config.style.barStyle.colorRange = flatObjectValueInArray(config.pieArcColors);
|
|
17
24
|
}
|
|
18
25
|
if (config.xAxisValue) {
|
|
19
26
|
barGraph.config.main.xAxisValue = config.xAxisValue;
|
|
@@ -21,21 +28,17 @@ export const buildStackbarGraph = (config:any,componentScope:string) => {
|
|
|
21
28
|
if (config.height) {
|
|
22
29
|
barGraph.config.style.containerStyle.height = config.height;
|
|
23
30
|
}
|
|
31
|
+
if (config.leftMargin) {
|
|
32
|
+
barGraph.config.style.labelStyle.margin ={
|
|
33
|
+
left: config.leftMargin
|
|
34
|
+
}
|
|
35
|
+
}
|
|
24
36
|
if (config.bottomLabel) {
|
|
25
37
|
barGraph.config.main.bottomLabel = config.bottomLabel;
|
|
26
38
|
}
|
|
27
39
|
if (config.leftLabel) {
|
|
28
40
|
barGraph.config.main.leftLabel = config.leftLabel;
|
|
29
41
|
}
|
|
30
|
-
if (config.leftLabelMargin) {
|
|
31
|
-
barGraph.config.style.labelStyle.margin = {
|
|
32
|
-
left: config.leftLabelMargin,
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
if (config.leftLabelOffset) {
|
|
36
|
-
barGraph.config.style.labelStyle.leftLabelOffset =
|
|
37
|
-
config.leftLabelOffset;
|
|
38
|
-
}
|
|
39
42
|
barGraph.scope = componentScope;
|
|
40
43
|
return barGraph;
|
|
41
44
|
}
|
|
@@ -2,22 +2,25 @@ import _ from "lodash";
|
|
|
2
2
|
import TextInputField from "./uischema/textInputField";
|
|
3
3
|
import { createLayoutFormat } from "./buildConfig";
|
|
4
4
|
|
|
5
|
-
export const buildTextField = (config:any,componentScope:string) =>{
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
inputField.
|
|
22
|
-
|
|
5
|
+
export const buildTextField = (config: any, componentScope: string) => {
|
|
6
|
+
const inputField: any = _.cloneDeep(TextInputField);
|
|
7
|
+
inputField.config.main.label = config.label;
|
|
8
|
+
if (config.style) {
|
|
9
|
+
inputField.config.style = JSON.parse(config.style)
|
|
10
|
+
}
|
|
11
|
+
if (config.multiline) {
|
|
12
|
+
inputField.config.main.multiline = config.multiline === "YES" ? true : false;
|
|
13
|
+
}
|
|
14
|
+
if (config.InputFormatingAndMasking) {
|
|
15
|
+
inputField.config.main.formatStrArray = config.InputFormatingAndMasking.map(e => e.formatElement);
|
|
16
|
+
}
|
|
17
|
+
if (config.placeholder) {
|
|
18
|
+
inputField.config.main.placeholder = config.placeholder;
|
|
19
|
+
}
|
|
20
|
+
if (config.layout) {
|
|
21
|
+
inputField.config.layout = createLayoutFormat(config.layout)
|
|
22
|
+
}
|
|
23
|
+
inputField.config.main.errorMessage = `${config.name} is empty or invalid`;
|
|
24
|
+
inputField.scope = componentScope;
|
|
25
|
+
return inputField;
|
|
23
26
|
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import Thought from "./uischema/thoughtOfTheDay";
|
|
2
|
+
import _ from "lodash";
|
|
3
|
+
import { createLayoutFormat } from "./buildConfig";
|
|
4
|
+
|
|
5
|
+
export const buildThoughtOfTheDay = (config,componentScope) =>{
|
|
6
|
+
const thought: any = _.cloneDeep(Thought);
|
|
7
|
+
thought.scope = componentScope;
|
|
8
|
+
|
|
9
|
+
if(config.thought){
|
|
10
|
+
thought.config.main.thought = `${config.thought}`
|
|
11
|
+
}
|
|
12
|
+
if(config.layout){
|
|
13
|
+
thought.config.layout = createLayoutFormat(config.layout)
|
|
14
|
+
}
|
|
15
|
+
if(config.label){
|
|
16
|
+
thought.config.main.label = config.label;
|
|
17
|
+
}
|
|
18
|
+
if (config.style) {
|
|
19
|
+
thought.config.style = JSON.parse(config.style)
|
|
20
|
+
}
|
|
21
|
+
return thought;
|
|
22
|
+
}
|
|
@@ -14,7 +14,7 @@ import { buildWrapperSection } from "./buildWrapperSection";
|
|
|
14
14
|
import { buildTextField } from "./buildText";
|
|
15
15
|
import { buildSelect } from "./buildSelect";
|
|
16
16
|
import { buildButton } from "./buildButton";
|
|
17
|
-
import {
|
|
17
|
+
import { buildTable } from "./buildTable";
|
|
18
18
|
import { buildLabel } from "./buildLabel";
|
|
19
19
|
import { buildUploadFile } from "./buildUplaodFile";
|
|
20
20
|
import { buildDownloadFile } from "./buildDownloadFile";
|
|
@@ -39,6 +39,7 @@ import { buildPopUp } from "./buildPop";
|
|
|
39
39
|
import { buildDataGrid } from "./buildDataGrid";
|
|
40
40
|
import { buildInputSlider } from "./buildInputSlider";
|
|
41
41
|
import { buildTreeMap } from "./buildTreeMap";
|
|
42
|
+
import { buildThoughtOfTheDay } from "./buildThoughtOfTheDay";
|
|
42
43
|
export let schema = {
|
|
43
44
|
type: "object",
|
|
44
45
|
properties: {},
|
|
@@ -264,6 +265,9 @@ const buildUiSchema = (config: any, store?: any) => {
|
|
|
264
265
|
case "HorizontalStackBarGraph":
|
|
265
266
|
elements = buildHorizontalBarGraph(config, componentScope);
|
|
266
267
|
break;
|
|
268
|
+
default:
|
|
269
|
+
elements = buildStackbarGraph(config, componentScope);
|
|
270
|
+
break;
|
|
267
271
|
}
|
|
268
272
|
break;
|
|
269
273
|
case "ProgressBar":
|
|
@@ -300,6 +304,9 @@ const buildUiSchema = (config: any, store?: any) => {
|
|
|
300
304
|
case "LeaderBoard":
|
|
301
305
|
elements = buildLeaderBoard(config);
|
|
302
306
|
break;
|
|
307
|
+
case "Thought":
|
|
308
|
+
elements = buildThoughtOfTheDay(config, componentScope);
|
|
309
|
+
break;
|
|
303
310
|
default:
|
|
304
311
|
schema = {
|
|
305
312
|
type: "object",
|
|
@@ -338,8 +345,8 @@ const buildUiSchema = (config: any, store?: any) => {
|
|
|
338
345
|
sizeMap[e.keyName] = e.value
|
|
339
346
|
});
|
|
340
347
|
}
|
|
341
|
-
if(config.enableColumnFilter){
|
|
342
|
-
config.enableColumnFilter.map((e)=>{
|
|
348
|
+
if (config.enableColumnFilter) {
|
|
349
|
+
config.enableColumnFilter.map((e) => {
|
|
343
350
|
filterMap[e.keyName] = true
|
|
344
351
|
})
|
|
345
352
|
}
|
|
@@ -353,7 +360,8 @@ const buildUiSchema = (config: any, store?: any) => {
|
|
|
353
360
|
widget: cellElem.type != "ColumnGroup" ? buildUiSchema(cellElem, store) : undefined,
|
|
354
361
|
elements: cellElem.type == "ColumnGroup" ? cellElem.elements.map((childCellElem) => buildUiSchema(childCellElem, store)) : [],
|
|
355
362
|
enableColumnFilter: Object.keys(filterMap).length === 0 ? true : filterMap[cellElem.name] ?? false,
|
|
356
|
-
columnFilterModeOptions: config.filteringOptions
|
|
363
|
+
columnFilterModeOptions: config.filteringOptions,
|
|
364
|
+
enableSorting: config.enableSorting === "No" ? false : true
|
|
357
365
|
}
|
|
358
366
|
} else {
|
|
359
367
|
return {
|
|
@@ -370,12 +378,12 @@ const buildUiSchema = (config: any, store?: any) => {
|
|
|
370
378
|
}
|
|
371
379
|
else if (config.type == "Array") {
|
|
372
380
|
elements.options.detail.elements = config.elements.map((e: any, elemInd: number) => {
|
|
373
|
-
return buildUiSchema(e,store)
|
|
381
|
+
return buildUiSchema(e, store)
|
|
374
382
|
});
|
|
375
383
|
}
|
|
376
384
|
else {
|
|
377
385
|
elements.elements = config.elements.map((e: any, elemInd: number) => {
|
|
378
|
-
return buildUiSchema(e,store)
|
|
386
|
+
return buildUiSchema(e, store)
|
|
379
387
|
});
|
|
380
388
|
}
|
|
381
389
|
}
|
|
@@ -172,7 +172,7 @@ export const buildWrapper = (label: string, elements: any[]) => {
|
|
|
172
172
|
width: "108%"
|
|
173
173
|
},
|
|
174
174
|
componentsBoxStyle: {
|
|
175
|
-
marginLeft: "
|
|
175
|
+
marginLeft: "12px",
|
|
176
176
|
},
|
|
177
177
|
defaultStyle: true
|
|
178
178
|
},
|
|
@@ -317,7 +317,7 @@ export const buildPropertiesSection = function (type: String) {
|
|
|
317
317
|
case "Text":
|
|
318
318
|
uiSchema.elements = [
|
|
319
319
|
getInputField("placeholder", "Placeholder"),
|
|
320
|
-
|
|
320
|
+
getRadioInputField("multiline", "Multiline", ["YES", "NO"]),
|
|
321
321
|
emptyBox("TextEmpty1", {xs: 0, sm: 0, md: 4, lg: 4 }),
|
|
322
322
|
getArrayControl("InputFormatingAndMasking", "formatElement", "Format Element")
|
|
323
323
|
]
|
|
@@ -343,19 +343,18 @@ export const buildPropertiesSection = function (type: String) {
|
|
|
343
343
|
case "RankCard":
|
|
344
344
|
uiSchema.elements = [
|
|
345
345
|
getInputField("rank", "Rank"),
|
|
346
|
-
getInputField("
|
|
347
|
-
|
|
348
|
-
getInputField("description", "Card Description"),
|
|
349
|
-
emptyBox("RankCardEmpty1"), emptyBox("RankCardEmpty2")];
|
|
346
|
+
getInputField("height", "Height"),
|
|
347
|
+
emptyBox("RankCardEmpty1", {xs: 0, sm: 0, md: 4, lg: 4 })];
|
|
350
348
|
break;
|
|
351
349
|
case "LeaderBoard":
|
|
352
350
|
uiSchema.elements = [
|
|
353
|
-
getInputField("valueLabel", "Value Label"),
|
|
354
351
|
getInputField("firstImage", "First Image url"),
|
|
355
352
|
getInputField("secondImage", "Second Image url"),
|
|
356
353
|
getInputField("thirdImage", "Third Image url"),
|
|
357
|
-
|
|
358
|
-
|
|
354
|
+
getInputField("nameKey", "Key for Name"),
|
|
355
|
+
getInputField("imageKey", "Key for Image"),
|
|
356
|
+
getInputField("scoreKey", "Key for comparing parameter"),
|
|
357
|
+
emptyBox("LeaderBoardEmpty1", {xs: 6, sm: 6, md: 0, lg: 0 }),
|
|
359
358
|
];
|
|
360
359
|
break;
|
|
361
360
|
case "CardSlider":
|
|
@@ -376,8 +375,9 @@ export const buildPropertiesSection = function (type: String) {
|
|
|
376
375
|
uiSchema.elements = [
|
|
377
376
|
getInputField("url", "Image Url"),
|
|
378
377
|
getInputField("label", "Label"),
|
|
378
|
+
getInputField("titleIcon", "Unicode of Icon for title"),
|
|
379
379
|
getInputField("description", "Description"),
|
|
380
|
-
emptyBox("cardEmpty", {xs:
|
|
380
|
+
emptyBox("cardEmpty", {xs: 0, sm: 0, md: 8, lg: 8 })
|
|
381
381
|
];
|
|
382
382
|
break;
|
|
383
383
|
case "Button":
|
|
@@ -407,13 +407,13 @@ export const buildPropertiesSection = function (type: String) {
|
|
|
407
407
|
]),
|
|
408
408
|
getInputField("leftLabel", "Left Label"),
|
|
409
409
|
getInputField("bottomLabel", "Bottom Label"),
|
|
410
|
-
getInputField("leftLabelMargin", "Left Label Margin"),
|
|
411
|
-
getInputField("leftLabelOffset", "Left Label Offset"),
|
|
412
410
|
emptyBox("GraphEmpty1", {xs: 6, sm: 0, md: 0, lg: 0 }),
|
|
413
411
|
getRadioInputField("legendHide", "Legend Hide", ["YES", "No"]),
|
|
414
412
|
getInputField("yAxisValue", "Y-AxisValue"),
|
|
415
413
|
getInputField("xAxisValue", "X-AxisValue"),
|
|
416
|
-
|
|
414
|
+
getRadioInputField("bottomAxisAngle", "Bottom Axis Angled", ["YES", "No"]),
|
|
415
|
+
getInputField("leftMargin", "Left Margin"),
|
|
416
|
+
emptyBox("GraphEmpty1", {xs: 6, sm: 0, md: 8, lg: 8 }),
|
|
417
417
|
getArrayControl("legendLabels", "label"),
|
|
418
418
|
getArrayControl("pieArcColors", "color"),
|
|
419
419
|
];
|
|
@@ -485,6 +485,11 @@ export const buildPropertiesSection = function (type: String) {
|
|
|
485
485
|
emptyBox("MultipleSelectEmpty2")
|
|
486
486
|
]
|
|
487
487
|
break;
|
|
488
|
+
case "Thought":
|
|
489
|
+
uiSchema.elements = [
|
|
490
|
+
getTextArea("thought", "Today's thought", false),
|
|
491
|
+
]
|
|
492
|
+
break;
|
|
488
493
|
}
|
|
489
494
|
return uiSchema;
|
|
490
495
|
};
|