impaktapps-ui-builder 0.0.596 → 0.0.751
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 +2208 -1683
- 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/buildCard.d.ts +1 -1
- package/dist/src/impaktapps-ui-builder/builder/build/buildTable.d.ts +0 -1
- package/dist/src/impaktapps-ui-builder/builder/build/buildThoughtOfTheDay.d.ts +1 -0
- package/dist/src/impaktapps-ui-builder/builder/build/buildUiSchema.d.ts +1 -1
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/apiSection.d.ts +1 -0
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/buildPropertiesSection.d.ts +23 -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 +170 -82
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/eventSection.d.ts +55 -2
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/graph.d.ts +52 -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/tableSection.d.ts +50 -2
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/{lazyLoadingTable.d.ts → thoughtOfTheDay.d.ts} +6 -4
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/timer.d.ts +1 -14
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/validationSections.d.ts +1 -1
- package/dist/src/impaktapps-ui-builder/builder/elements/UiSchema/PageMaster/schema.d.ts +3 -0
- package/dist/src/impaktapps-ui-builder/builder/elements/UiSchema/event/schema.d.ts +3 -0
- package/dist/src/impaktapps-ui-builder/builder/services/component.d.ts +8 -2
- package/dist/src/impaktapps-ui-builder/builder/services/event.d.ts +5 -0
- package/dist/src/impaktapps-ui-builder/builder/services/pageMaster.d.ts +5 -0
- package/dist/src/impaktapps-ui-builder/builder/services/utils.d.ts +4 -4
- package/dist/src/impaktapps-ui-builder/lib/index.d.ts +1 -1
- package/package.json +5 -1
- package/src/impaktapps-ui-builder/builder/build/buildCard.ts +11 -7
- package/src/impaktapps-ui-builder/builder/build/buildConfig.ts +1 -1
- package/src/impaktapps-ui-builder/builder/build/buildFileInput.ts +1 -1
- package/src/impaktapps-ui-builder/builder/build/buildHorizontalBarGraph.ts +21 -13
- 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 -2
- package/src/impaktapps-ui-builder/builder/build/buildPieGraph.ts +7 -16
- 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/buildRankCard.ts +4 -10
- package/src/impaktapps-ui-builder/builder/build/buildSchema.ts +1 -1
- package/src/impaktapps-ui-builder/builder/build/buildStackBarGraph.ts +19 -4
- package/src/impaktapps-ui-builder/builder/build/buildTable.ts +23 -29
- package/src/impaktapps-ui-builder/builder/build/buildTextArea.ts +6 -0
- package/src/impaktapps-ui-builder/builder/build/buildThoughtOfTheDay.ts +22 -0
- package/src/impaktapps-ui-builder/builder/build/buildUiSchema.ts +27 -12
- package/src/impaktapps-ui-builder/builder/build/buildUplaodFile.ts +16 -19
- package/src/impaktapps-ui-builder/builder/build/uischema/apiSection.ts +10 -10
- package/src/impaktapps-ui-builder/builder/build/uischema/buildPropertiesSection.ts +111 -56
- package/src/impaktapps-ui-builder/builder/build/uischema/button.ts +1 -2
- package/src/impaktapps-ui-builder/builder/build/uischema/card.ts +188 -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/eventSection.ts +44 -0
- package/src/impaktapps-ui-builder/builder/build/uischema/file.ts +2 -2
- package/src/impaktapps-ui-builder/builder/build/uischema/graph.ts +13 -29
- package/src/impaktapps-ui-builder/builder/build/uischema/leaderBoard.ts +10 -367
- package/src/impaktapps-ui-builder/builder/build/uischema/multiSelect.ts +1 -1
- 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/refresh.ts +3 -3
- package/src/impaktapps-ui-builder/builder/build/uischema/runnerBoyProgressBar.ts +1 -1
- package/src/impaktapps-ui-builder/builder/build/uischema/selectInputField.ts +1 -1
- package/src/impaktapps-ui-builder/builder/build/uischema/tableSection.ts +45 -1
- package/src/impaktapps-ui-builder/builder/build/uischema/textInputField.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/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/schema.ts +37 -2
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/uiSchema.ts +283 -182
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/PageMaster/schema.ts +4 -1
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/PageMaster/uiSchema.ts +344 -130
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/event/schema.ts +4 -1
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/event/uiSchema.ts +194 -80
- package/src/impaktapps-ui-builder/builder/services/component.ts +105 -26
- package/src/impaktapps-ui-builder/builder/services/event.ts +50 -9
- package/src/impaktapps-ui-builder/builder/services/pageMaster.ts +32 -14
- package/src/impaktapps-ui-builder/builder/services/utils.ts +13 -13
- package/src/impaktapps-ui-builder/lib/index.ts +1 -1
- package/src/impaktapps-ui-builder/runtime/services/events.ts +26 -23
- package/src/impaktapps-ui-builder/runtime/services/service.ts +61 -62
- package/src/impaktapps-ui-builder/builder/build/uischema/lazyLoadingTable.ts +0 -15
|
@@ -1,4 +1,4 @@
|
|
|
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
|
|
|
@@ -9,23 +9,31 @@ const buildHorizontalBarGraph = (config:any,componentScope:string) => {
|
|
|
9
9
|
if (config.layout) {
|
|
10
10
|
horizontalBarGraph.config.layout = createLayoutFormat(config.layout);
|
|
11
11
|
}
|
|
12
|
+
horizontalBarGraph.config.main.type = config.graphType;
|
|
12
13
|
horizontalBarGraph.scope = componentScope;
|
|
13
14
|
horizontalBarGraph.config.main.header = config.heading;
|
|
14
|
-
if (config.
|
|
15
|
-
horizontalBarGraph.config.
|
|
15
|
+
if (config.legendHide) {
|
|
16
|
+
horizontalBarGraph.config.main.legendAvailable = config.legendHide==="YES"?false:true;
|
|
16
17
|
}
|
|
17
|
-
if (config.
|
|
18
|
-
horizontalBarGraph.config.
|
|
19
|
-
|
|
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;
|
|
20
29
|
}
|
|
21
30
|
if (config.height) {
|
|
22
|
-
horizontalBarGraph.config.style =
|
|
23
|
-
{
|
|
24
|
-
containerStyle: {
|
|
25
|
-
height: config.height
|
|
26
|
-
}
|
|
31
|
+
horizontalBarGraph.config.style.containerStyle.height = config.height;
|
|
27
32
|
}
|
|
28
|
-
|
|
33
|
+
if (config.leftMargin) {
|
|
34
|
+
horizontalBarGraph.config.style.labelStyle.margin ={
|
|
35
|
+
left: config.leftMargin
|
|
36
|
+
}
|
|
29
37
|
}
|
|
30
38
|
if (config.bottomLabel) {
|
|
31
39
|
horizontalBarGraph.config.main.bottomLabel =
|
|
@@ -37,4 +45,4 @@ const buildHorizontalBarGraph = (config:any,componentScope:string) => {
|
|
|
37
45
|
return horizontalBarGraph
|
|
38
46
|
}
|
|
39
47
|
|
|
40
|
-
export default buildHorizontalBarGraph
|
|
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,10 +29,13 @@ 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) {
|
|
@@ -7,31 +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);
|
|
20
|
+
}
|
|
21
|
+
if (config.xAxisValue) {
|
|
22
|
+
pieGraph.config.main.xAxisValue = config.xAxisValue;
|
|
26
23
|
}
|
|
27
|
-
|
|
28
24
|
if (config.pieArcColors) {
|
|
29
|
-
pieGraph.config.style =
|
|
30
|
-
pieStyle: {
|
|
31
|
-
colorRange: flatObjectValueInArray(config.pieArcColors)
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
|
|
25
|
+
pieGraph.config.style.pieStyle.colorRange = flatObjectValueInArray(config.pieArcColors);
|
|
35
26
|
}
|
|
36
27
|
return pieGraph;
|
|
37
28
|
}
|
|
@@ -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
|
}
|
|
@@ -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)
|
|
@@ -25,7 +25,7 @@ export const buildSchema = (config: any) => {
|
|
|
25
25
|
|
|
26
26
|
}
|
|
27
27
|
buildRule(config)
|
|
28
|
-
window.
|
|
28
|
+
window.sessionStorage.setItem("schemaDemo",JSON.stringify(schema))
|
|
29
29
|
return schema;
|
|
30
30
|
};
|
|
31
31
|
export default buildSchema;
|
|
@@ -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,15 +9,30 @@ 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);
|
|
24
|
+
}
|
|
25
|
+
if (config.xAxisValue) {
|
|
26
|
+
barGraph.config.main.xAxisValue = config.xAxisValue;
|
|
17
27
|
}
|
|
18
28
|
if (config.height) {
|
|
19
29
|
barGraph.config.style.containerStyle.height = config.height;
|
|
20
30
|
}
|
|
31
|
+
if (config.leftMargin) {
|
|
32
|
+
barGraph.config.style.labelStyle.margin ={
|
|
33
|
+
left: config.leftMargin
|
|
34
|
+
}
|
|
35
|
+
}
|
|
21
36
|
if (config.bottomLabel) {
|
|
22
37
|
barGraph.config.main.bottomLabel = config.bottomLabel;
|
|
23
38
|
}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import Table from "./uischema/table";
|
|
2
2
|
import _ from "lodash";
|
|
3
|
-
import buildUiSchema from "./buildUiSchema";
|
|
4
|
-
import lazyLoadingTable from "./uischema/lazyLoadingTable";
|
|
5
3
|
|
|
6
4
|
export const buildTable = (config: any, componentScope: string) => {
|
|
7
5
|
const table: any = _.cloneDeep(Table);
|
|
@@ -40,39 +38,35 @@ export const buildTable = (config: any, componentScope: string) => {
|
|
|
40
38
|
if (config.downloadAllData) {
|
|
41
39
|
table.config.main.downloadAllData = config.downloadAllData === "YES" ? true : false
|
|
42
40
|
}
|
|
43
|
-
if
|
|
44
|
-
table.config.main.
|
|
41
|
+
if(config.disableGlobalSearch){
|
|
42
|
+
table.config.main.disableGlobalSearch = config.disableGlobalSearch === "YES" ? true : false
|
|
45
43
|
}
|
|
46
|
-
if
|
|
47
|
-
table.config.main.
|
|
44
|
+
if(config.disableColumnFilter){
|
|
45
|
+
table.config.main.disableColumnFilter = config.disableColumnFilter === "YES" ? true : false
|
|
48
46
|
}
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
export const buildLazyLoadingTable = (config: any, componentScope: string) => {
|
|
53
|
-
const table: any = _.cloneDeep(lazyLoadingTable);
|
|
54
|
-
table.scope = componentScope;
|
|
55
|
-
if (config.style) {
|
|
56
|
-
table.config.style = JSON.parse(config.style)
|
|
47
|
+
if(config.disableSorting){
|
|
48
|
+
table.config.main.disableSorting = config.disableSorting === "YES" ? true : false
|
|
57
49
|
}
|
|
58
|
-
if
|
|
59
|
-
table.config.main.
|
|
60
|
-
};
|
|
61
|
-
if (config.ColumnResizingAvailable) {
|
|
62
|
-
table.config.main.disableColumnResizing = config.ColumnResizingAvailable === "YES" ? false : true
|
|
63
|
-
};
|
|
64
|
-
if (config.DragAvailable) {
|
|
65
|
-
table.config.main.enableDrag = config.DragAvailable === "YES" ? true : false
|
|
66
|
-
};
|
|
67
|
-
if (config.selectKey) {
|
|
68
|
-
table.config.main.selectKey = config.selectKey
|
|
50
|
+
if(config.disableEditColumn){
|
|
51
|
+
table.config.main.disableEditColumn = config.disableEditColumn === "YES" ? true : false
|
|
69
52
|
}
|
|
70
|
-
if
|
|
71
|
-
table.config.main.
|
|
53
|
+
if(config.disableFullScreenToggle){
|
|
54
|
+
table.config.main.disableFullScreenToggle = config.disableFullScreenToggle === "YES" ? true : false
|
|
55
|
+
}
|
|
56
|
+
if(config.disableDensityToggle){
|
|
57
|
+
table.config.main.disableDensityToggle = config.disableDensityToggle === "YES" ? true : false
|
|
58
|
+
}
|
|
59
|
+
if(config.disableDownloadFile){
|
|
60
|
+
table.config.main.disableDownloadFile = config.disableDownloadFile === "YES" ? true : false
|
|
61
|
+
}
|
|
62
|
+
if(config.disablePagination){
|
|
63
|
+
table.config.main.disablePagination = config.disablePagination === "YES" ? true : false
|
|
72
64
|
}
|
|
73
65
|
if (config.Table_Download_Keys_Name) {
|
|
74
66
|
table.config.main.TableDownloadKeysName = config.Table_Download_Keys_Name.map(e => e.KeyName);
|
|
75
67
|
}
|
|
76
|
-
|
|
68
|
+
if (config.selectKey) {
|
|
69
|
+
table.config.main.selectKey = config.selectKey
|
|
70
|
+
}
|
|
77
71
|
return table;
|
|
78
|
-
}
|
|
72
|
+
};
|
|
@@ -45,6 +45,12 @@ export const buildTextArea = (config:any,componentScope:string) =>{
|
|
|
45
45
|
if (config.placeholder) {
|
|
46
46
|
textArea.config.main.placeholder = config.placeholder;
|
|
47
47
|
}
|
|
48
|
+
if(config.enableCodeEditor){
|
|
49
|
+
textArea.config.main.enableCodeEditor = config.enableCodeEditor === "YES" ? true : false
|
|
50
|
+
}
|
|
51
|
+
if(config.codeEditorLanguage){
|
|
52
|
+
textArea.config.main.codeEditorLanguage = config.codeEditorLanguage;
|
|
53
|
+
}
|
|
48
54
|
textArea.scope = componentScope;
|
|
49
55
|
return textArea;
|
|
50
56
|
}
|
|
@@ -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: {},
|
|
@@ -165,7 +166,7 @@ export const buildSchema = (config: any, tableName?: string, isArrayType?: boole
|
|
|
165
166
|
}
|
|
166
167
|
|
|
167
168
|
|
|
168
|
-
const buildUiSchema = (config: any) => {
|
|
169
|
+
const buildUiSchema = (config: any, store?: any) => {
|
|
169
170
|
let elements: any = {};
|
|
170
171
|
const componentScope = `#/properties/${config.name}`;
|
|
171
172
|
switch (config.type) {
|
|
@@ -230,9 +231,6 @@ const buildUiSchema = (config: any) => {
|
|
|
230
231
|
case "Array":
|
|
231
232
|
elements = buildArray(config, componentScope);
|
|
232
233
|
break;
|
|
233
|
-
case "LazyLoadingTable":
|
|
234
|
-
elements = buildLazyLoadingTable(config, componentScope)
|
|
235
|
-
break;
|
|
236
234
|
case "Box":
|
|
237
235
|
elements = buildLabel(config, componentScope);
|
|
238
236
|
break;
|
|
@@ -249,7 +247,7 @@ const buildUiSchema = (config: any) => {
|
|
|
249
247
|
elements = buildEmptyBox(config, componentScope);
|
|
250
248
|
break;
|
|
251
249
|
case "card":
|
|
252
|
-
elements = buildCard(config, componentScope);
|
|
250
|
+
elements = buildCard(config, componentScope, store);
|
|
253
251
|
break;
|
|
254
252
|
case "Graph":
|
|
255
253
|
switch (config.graphType) {
|
|
@@ -264,8 +262,12 @@ const buildUiSchema = (config: any) => {
|
|
|
264
262
|
elements = buildPieGraph(config, componentScope);
|
|
265
263
|
break;
|
|
266
264
|
case "HorizontalBarGraph":
|
|
265
|
+
case "HorizontalStackBarGraph":
|
|
267
266
|
elements = buildHorizontalBarGraph(config, componentScope);
|
|
268
267
|
break;
|
|
268
|
+
default:
|
|
269
|
+
elements = buildStackbarGraph(config, componentScope);
|
|
270
|
+
break;
|
|
269
271
|
}
|
|
270
272
|
break;
|
|
271
273
|
case "ProgressBar":
|
|
@@ -302,6 +304,9 @@ const buildUiSchema = (config: any) => {
|
|
|
302
304
|
case "LeaderBoard":
|
|
303
305
|
elements = buildLeaderBoard(config);
|
|
304
306
|
break;
|
|
307
|
+
case "Thought":
|
|
308
|
+
elements = buildThoughtOfTheDay(config, componentScope);
|
|
309
|
+
break;
|
|
305
310
|
default:
|
|
306
311
|
schema = {
|
|
307
312
|
type: "object",
|
|
@@ -328,17 +333,23 @@ const buildUiSchema = (config: any) => {
|
|
|
328
333
|
header: cellElem.label || cellElem.name,
|
|
329
334
|
size: sizeMap[cellElem.name] || 180,
|
|
330
335
|
type: cellElem.columnFormat,
|
|
331
|
-
elements: cellElem.type == "ColumnGroup" ? cellElem.elements.map((childCellElem) => buildUiSchema(childCellElem)) : []
|
|
336
|
+
elements: cellElem.type == "ColumnGroup" ? cellElem.elements.map((childCellElem) => buildUiSchema(childCellElem, store)) : []
|
|
332
337
|
}
|
|
333
338
|
})
|
|
334
339
|
}
|
|
335
340
|
else if (config.type == "Table") {
|
|
336
341
|
const sizeMap = {}
|
|
342
|
+
const filterMap = {}
|
|
337
343
|
if (config.sizeHolder) {
|
|
338
344
|
config.sizeHolder.map((e, i) => {
|
|
339
345
|
sizeMap[e.keyName] = e.value
|
|
340
346
|
});
|
|
341
347
|
}
|
|
348
|
+
if(config.enableColumnFilter){
|
|
349
|
+
config.enableColumnFilter.map((e)=>{
|
|
350
|
+
filterMap[e.keyName] = true
|
|
351
|
+
})
|
|
352
|
+
}
|
|
342
353
|
elements.elements = config.elements.map((cellElem, elemInd) => {
|
|
343
354
|
if (cellElem.type) {
|
|
344
355
|
return {
|
|
@@ -346,15 +357,19 @@ const buildUiSchema = (config: any) => {
|
|
|
346
357
|
header: cellElem.label || cellElem.name,
|
|
347
358
|
size: sizeMap[cellElem.name] || 180,
|
|
348
359
|
type: cellElem.columnFormat,
|
|
349
|
-
widget: cellElem.type != "ColumnGroup" ? buildUiSchema(cellElem) : undefined,
|
|
350
|
-
elements: cellElem.type == "ColumnGroup" ? cellElem.elements.map((childCellElem) => buildUiSchema(childCellElem)) : []
|
|
360
|
+
widget: cellElem.type != "ColumnGroup" ? buildUiSchema(cellElem, store) : undefined,
|
|
361
|
+
elements: cellElem.type == "ColumnGroup" ? cellElem.elements.map((childCellElem) => buildUiSchema(childCellElem, store)) : [],
|
|
362
|
+
enableColumnFilter: Object.keys(filterMap).length === 0 ? true : filterMap[cellElem.name] ?? false,
|
|
363
|
+
columnFilterModeOptions: config.filteringOptions
|
|
351
364
|
}
|
|
352
365
|
} else {
|
|
353
366
|
return {
|
|
354
367
|
accessorKey: cellElem.name,
|
|
355
368
|
type: cellElem.columnFormat,
|
|
356
369
|
header: cellElem.label || cellElem.name,
|
|
357
|
-
size: sizeMap[cellElem.name] || 180
|
|
370
|
+
size: sizeMap[cellElem.name] || 180,
|
|
371
|
+
enableColumnFilter: Object.keys(filterMap).length === 0 ? true : filterMap[cellElem.name] ?? false,
|
|
372
|
+
columnFilterModeOptions: config.filteringOptions
|
|
358
373
|
}
|
|
359
374
|
}
|
|
360
375
|
|
|
@@ -362,12 +377,12 @@ const buildUiSchema = (config: any) => {
|
|
|
362
377
|
}
|
|
363
378
|
else if (config.type == "Array") {
|
|
364
379
|
elements.options.detail.elements = config.elements.map((e: any, elemInd: number) => {
|
|
365
|
-
return buildUiSchema(e)
|
|
380
|
+
return buildUiSchema(e,store)
|
|
366
381
|
});
|
|
367
382
|
}
|
|
368
383
|
else {
|
|
369
384
|
elements.elements = config.elements.map((e: any, elemInd: number) => {
|
|
370
|
-
return buildUiSchema(e)
|
|
385
|
+
return buildUiSchema(e,store)
|
|
371
386
|
});
|
|
372
387
|
}
|
|
373
388
|
}
|
|
@@ -2,23 +2,20 @@ import { uploadFile } from "./uischema/file";
|
|
|
2
2
|
import _ from "lodash";
|
|
3
3
|
import { createLayoutFormat } from "./buildConfig";
|
|
4
4
|
|
|
5
|
-
export const buildUploadFile = (config,componentScope)=>{
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
22
|
-
UploadFile.config.main.errorMessage = config.errorMessage;
|
|
23
|
-
return UploadFile;
|
|
5
|
+
export const buildUploadFile = (config, componentScope) => {
|
|
6
|
+
const UploadFile: any = _.cloneDeep(uploadFile);
|
|
7
|
+
|
|
8
|
+
UploadFile.scope = componentScope;
|
|
9
|
+
UploadFile.config.main.label = config.label;
|
|
10
|
+
if (config.layout) {
|
|
11
|
+
UploadFile.config.layout = createLayoutFormat(config.layout)
|
|
12
|
+
}
|
|
13
|
+
if (config.style) {
|
|
14
|
+
UploadFile.config.style = config.style;
|
|
15
|
+
}
|
|
16
|
+
if (config.required) {
|
|
17
|
+
UploadFile.config.main.required = true;
|
|
18
|
+
}
|
|
19
|
+
UploadFile.config.main.errorMessage = config.errorMessage;
|
|
20
|
+
return UploadFile;
|
|
24
21
|
}
|
|
@@ -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
|
],
|