impaktapps-ui-builder 0.0.382457 → 0.0.382460
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 +4233 -2669
- package/dist/impaktapps-ui-builder.es.js.map +1 -1
- package/dist/impaktapps-ui-builder.umd.js +15 -15
- package/dist/impaktapps-ui-builder.umd.js.map +1 -1
- package/dist/src/impaktapps-ui-builder/builder/build/buildBasicUiSchema.d.ts +4 -1
- package/dist/src/impaktapps-ui-builder/builder/build/buildCard.d.ts +1 -1
- package/dist/src/impaktapps-ui-builder/builder/build/buildConfig.d.ts +1 -1
- package/dist/src/impaktapps-ui-builder/builder/build/buildDate.d.ts +1 -0
- package/dist/src/impaktapps-ui-builder/builder/build/buildInputSlider.d.ts +1 -0
- 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/buildTreeMap.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 +36 -2
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/box.d.ts +2 -2
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/buildPropertiesSection.d.ts +60 -0
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/button.d.ts +1 -7
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/card.d.ts +172 -86
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/coreSection.d.ts +15 -0
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/dateInputField.d.ts +19 -0
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/eventSection.d.ts +121 -119
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/file.d.ts +6 -6
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/graph.d.ts +42 -115
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/leaderBoard.d.ts +10 -288
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/progressBar.d.ts +6 -1
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/table.d.ts +2 -0
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/tableSection.d.ts +119 -96
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/{lazyLoadingTable.d.ts → thoughtOfTheDay.d.ts} +6 -3
- 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 +17 -2
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/valueTab.d.ts +17 -2
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/wrapperSection.d.ts +2 -1
- package/dist/src/impaktapps-ui-builder/builder/elements/UiSchema/PageMaster/schema.d.ts +9 -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 +12 -4
- package/dist/src/impaktapps-ui-builder/builder/services/event.d.ts +11 -2
- package/dist/src/impaktapps-ui-builder/builder/services/pageMaster.d.ts +16 -3
- 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/dist/src/impaktapps-ui-builder/runtime/services/events.d.ts +8 -5
- package/dist/src/impaktapps-ui-builder/runtime/services/interface.d.ts +2 -0
- package/dist/src/impaktapps-ui-builder/runtime/services/service.d.ts +11 -8
- package/package.json +5 -1
- package/src/impaktapps-ui-builder/builder/build/buildBasicUiSchema.ts +9 -5
- package/src/impaktapps-ui-builder/builder/build/buildButton.ts +0 -2
- package/src/impaktapps-ui-builder/builder/build/buildCard.ts +11 -7
- package/src/impaktapps-ui-builder/builder/build/buildConfig.ts +15 -19
- package/src/impaktapps-ui-builder/builder/build/buildDate.ts +12 -2
- package/src/impaktapps-ui-builder/builder/build/buildFileInput.ts +1 -1
- package/src/impaktapps-ui-builder/builder/build/buildHorizontalBarGraph.ts +22 -9
- package/src/impaktapps-ui-builder/builder/build/buildInputSlider.ts +46 -0
- package/src/impaktapps-ui-builder/builder/build/buildLeaderboard.ts +26 -19
- package/src/impaktapps-ui-builder/builder/build/buildLineGraph.ts +16 -2
- package/src/impaktapps-ui-builder/builder/build/buildPieGraph.ts +24 -23
- 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 -2
- package/src/impaktapps-ui-builder/builder/build/buildStackBarGraph.ts +19 -8
- package/src/impaktapps-ui-builder/builder/build/buildTabSection.ts +9 -2
- package/src/impaktapps-ui-builder/builder/build/buildTable.ts +39 -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/buildTreeMap.ts +61 -0
- package/src/impaktapps-ui-builder/builder/build/buildUiSchema.ts +77 -57
- package/src/impaktapps-ui-builder/builder/build/buildUplaodFile.ts +16 -19
- package/src/impaktapps-ui-builder/builder/build/buildWrapperSection.ts +16 -13
- package/src/impaktapps-ui-builder/builder/build/uischema/apiSection.ts +50 -27
- package/src/impaktapps-ui-builder/builder/build/uischema/box.ts +3 -2
- package/src/impaktapps-ui-builder/builder/build/uischema/buildPropertiesSection.ts +174 -80
- package/src/impaktapps-ui-builder/builder/build/uischema/button.ts +1 -7
- package/src/impaktapps-ui-builder/builder/build/uischema/card.ts +171 -75
- package/src/impaktapps-ui-builder/builder/build/uischema/coreSection.ts +43 -41
- package/src/impaktapps-ui-builder/builder/build/uischema/dateInputField.ts +17 -7
- package/src/impaktapps-ui-builder/builder/build/uischema/emptyBox.ts +1 -1
- package/src/impaktapps-ui-builder/builder/build/uischema/eventSection.ts +78 -56
- package/src/impaktapps-ui-builder/builder/build/uischema/file.ts +2 -12
- package/src/impaktapps-ui-builder/builder/build/uischema/graph.ts +13 -141
- package/src/impaktapps-ui-builder/builder/build/uischema/leaderBoard.ts +10 -357
- 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 +15 -11
- package/src/impaktapps-ui-builder/builder/build/uischema/runnerBoyProgressBar.ts +1 -1
- package/src/impaktapps-ui-builder/builder/build/uischema/selectInputField.ts +1 -6
- package/src/impaktapps-ui-builder/builder/build/uischema/table.ts +5 -6
- package/src/impaktapps-ui-builder/builder/build/uischema/tableSection.ts +125 -97
- package/src/impaktapps-ui-builder/builder/build/uischema/textInputField.ts +1 -6
- 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 +12 -12
- package/src/impaktapps-ui-builder/builder/build/uischema/valueTab.ts +13 -13
- package/src/impaktapps-ui-builder/builder/build/uischema/wrapperSection.ts +2 -1
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/schema.ts +67 -19
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/uiSchema.ts +525 -166
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/PageMaster/schema.ts +12 -2
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/PageMaster/uiSchema.ts +757 -321
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/event/schema.ts +7 -2
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/event/uiSchema.ts +516 -269
- package/src/impaktapps-ui-builder/builder/services/component.ts +165 -73
- package/src/impaktapps-ui-builder/builder/services/event.ts +74 -13
- package/src/impaktapps-ui-builder/builder/services/pageMaster.ts +61 -20
- package/src/impaktapps-ui-builder/builder/services/utils.ts +13 -14
- package/src/impaktapps-ui-builder/lib/index.ts +1 -1
- package/src/impaktapps-ui-builder/runtime/services/downloadFile.ts +1 -1
- package/src/impaktapps-ui-builder/runtime/services/events.ts +154 -96
- package/src/impaktapps-ui-builder/runtime/services/interface.ts +3 -1
- package/src/impaktapps-ui-builder/runtime/services/service.ts +211 -49
- package/src/impaktapps-ui-builder/builder/build/uischema/lazyLoadingTable.ts +0 -14
|
@@ -1,27 +1,28 @@
|
|
|
1
1
|
import { createLayoutFormat, flatObjectValueInArray } from "./buildConfig";
|
|
2
2
|
import { PieGraph } from "./uischema/graph";
|
|
3
3
|
import _ from "lodash";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
4
|
+
export const buildPieGraph = (config, componentScope) => {
|
|
5
|
+
const pieGraph: any = _.cloneDeep(PieGraph);
|
|
6
|
+
if (config.layout) {
|
|
7
|
+
pieGraph.config.layout = createLayoutFormat(config.layout);
|
|
8
|
+
}
|
|
9
|
+
if (config.height) {
|
|
10
|
+
pieGraph.config.style.containerStyle.height = config.height;
|
|
11
|
+
}
|
|
12
|
+
if (config.legendHide) {
|
|
13
|
+
pieGraph.config.main.legendAvailable = config.legendHide === "YES" ? false : true;
|
|
14
|
+
}
|
|
15
|
+
pieGraph.scope = componentScope;
|
|
16
|
+
pieGraph.config.main.header = config.heading;
|
|
17
|
+
|
|
18
|
+
if (config.legendLabels) {
|
|
19
|
+
pieGraph.config.main.legendLabels = flatObjectValueInArray(config.legendLabels);
|
|
20
|
+
}
|
|
21
|
+
if (config.xAxisValue) {
|
|
22
|
+
pieGraph.config.main.xAxisValue = config.xAxisValue;
|
|
23
|
+
}
|
|
24
|
+
if (config.pieArcColors) {
|
|
25
|
+
pieGraph.config.style.pieStyle.colorRange = flatObjectValueInArray(config.pieArcColors);
|
|
26
|
+
}
|
|
27
|
+
return pieGraph;
|
|
27
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,8 +25,7 @@ export const buildSchema = (config: any) => {
|
|
|
25
25
|
|
|
26
26
|
}
|
|
27
27
|
buildRule(config)
|
|
28
|
-
|
|
29
|
-
window.localStorage.setItem("schemaDemo",JSON.stringify(schema))
|
|
28
|
+
window.sessionStorage.setItem("schemaDemo",JSON.stringify(schema))
|
|
30
29
|
return schema;
|
|
31
30
|
};
|
|
32
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
|
|
|
@@ -8,20 +8,31 @@ export const buildStackbarGraph = (config:any,componentScope:string) => {
|
|
|
8
8
|
barGraph.config.layout = createLayoutFormat(config.layout);
|
|
9
9
|
}
|
|
10
10
|
if (config.legendHide) {
|
|
11
|
-
barGraph.config.main.legendAvailable =
|
|
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
|
-
if (config.
|
|
19
|
-
barGraph.config.
|
|
20
|
-
config.containerBackground;
|
|
25
|
+
if (config.xAxisValue) {
|
|
26
|
+
barGraph.config.main.xAxisValue = config.xAxisValue;
|
|
21
27
|
}
|
|
22
28
|
if (config.height) {
|
|
23
29
|
barGraph.config.style.containerStyle.height = config.height;
|
|
24
30
|
}
|
|
31
|
+
if (config.leftMargin) {
|
|
32
|
+
barGraph.config.style.labelStyle.margin ={
|
|
33
|
+
left: config.leftMargin
|
|
34
|
+
}
|
|
35
|
+
}
|
|
25
36
|
if (config.bottomLabel) {
|
|
26
37
|
barGraph.config.main.bottomLabel = config.bottomLabel;
|
|
27
38
|
}
|
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
import Tabsection from "./uischema/tabsection";
|
|
2
2
|
import _ from "lodash";
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
|
|
5
4
|
export const buildTabSection = (config:any,componentScope:string) => {
|
|
6
5
|
const tab: any = _.cloneDeep(Tabsection);
|
|
6
|
+
tab.scope = componentScope;
|
|
7
|
+
|
|
8
|
+
if(config.lazyLoad){
|
|
9
|
+
tab.config.main.lazyLoad = config.lazyLoad === "YES" ?true:false;
|
|
10
|
+
}
|
|
11
|
+
if(config.orientation){
|
|
12
|
+
tab.config.main.orientation = config.orientation === "YES" ?'vertical':'horizontal';
|
|
13
|
+
}
|
|
7
14
|
if (config.sectionLabels) {
|
|
8
15
|
tab.config.main.tabLabels = config.sectionLabels.map(e => e.label);
|
|
9
16
|
}
|
|
@@ -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);
|
|
@@ -12,6 +10,22 @@ export const buildTable = (config: any, componentScope: string) => {
|
|
|
12
10
|
if (config.lazyLoading) {
|
|
13
11
|
table.config.main.lazyLoading = config.lazyLoading === "YES" ? true : false;
|
|
14
12
|
}
|
|
13
|
+
if (config.enableRowMovement) {
|
|
14
|
+
table.config.main.enableRowMovement = config.enableRowMovement === "YES" ? true : false;
|
|
15
|
+
}
|
|
16
|
+
if (config.enableExpanding) {
|
|
17
|
+
table.config.main.enableExpanding = config.enableExpanding === "YES" ? true : false;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
if (config.enableExpandAll) {
|
|
21
|
+
table.config.main.enableExpandAll = config.enableExpandAll === "YES" ? true : false;
|
|
22
|
+
}
|
|
23
|
+
if (config.paginateExpandedRows) {
|
|
24
|
+
table.config.main.paginateExpandedRows = config.paginateExpandedRows === "YES" ? true : false;
|
|
25
|
+
}
|
|
26
|
+
if (config.treeStructure) {
|
|
27
|
+
table.config.main.treeStructure = config.treeStructure === "YES" ? "flatTreeMap" : false;
|
|
28
|
+
}
|
|
15
29
|
if (config.SelectionAvailable) {
|
|
16
30
|
table.config.main.Selection = config.SelectionAvailable === "YES" ? true : false
|
|
17
31
|
};
|
|
@@ -24,39 +38,35 @@ export const buildTable = (config: any, componentScope: string) => {
|
|
|
24
38
|
if (config.downloadAllData) {
|
|
25
39
|
table.config.main.downloadAllData = config.downloadAllData === "YES" ? true : false
|
|
26
40
|
}
|
|
27
|
-
if
|
|
28
|
-
table.config.main.
|
|
41
|
+
if(config.disableGlobalSearch){
|
|
42
|
+
table.config.main.disableGlobalSearch = config.disableGlobalSearch === "YES" ? true : false
|
|
29
43
|
}
|
|
30
|
-
if
|
|
31
|
-
table.config.main.
|
|
44
|
+
if(config.disableColumnFilter){
|
|
45
|
+
table.config.main.disableColumnFilter = config.disableColumnFilter === "YES" ? true : false
|
|
32
46
|
}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
export const buildLazyLoadingTable = (config: any, componentScope: string) => {
|
|
37
|
-
const table: any = _.cloneDeep(lazyLoadingTable);
|
|
38
|
-
table.scope = componentScope;
|
|
39
|
-
if (config.style) {
|
|
40
|
-
table.config.style = JSON.parse(config.style)
|
|
47
|
+
if(config.disableSorting){
|
|
48
|
+
table.config.main.disableSorting = config.disableSorting === "YES" ? true : false
|
|
41
49
|
}
|
|
42
|
-
if
|
|
43
|
-
table.config.main.
|
|
44
|
-
};
|
|
45
|
-
if (config.ColumnResizingAvailable) {
|
|
46
|
-
table.config.main.disableColumnResizing = config.ColumnResizingAvailable === "YES" ? false : true
|
|
47
|
-
};
|
|
48
|
-
if (config.DragAvailable) {
|
|
49
|
-
table.config.main.enableDrag = config.DragAvailable === "YES" ? true : false
|
|
50
|
-
};
|
|
51
|
-
if (config.selectKey) {
|
|
52
|
-
table.config.main.selectKey = config.selectKey
|
|
50
|
+
if(config.disableEditColumn){
|
|
51
|
+
table.config.main.disableEditColumn = config.disableEditColumn === "YES" ? true : false
|
|
53
52
|
}
|
|
54
|
-
if
|
|
55
|
-
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
|
|
56
64
|
}
|
|
57
65
|
if (config.Table_Download_Keys_Name) {
|
|
58
66
|
table.config.main.TableDownloadKeysName = config.Table_Download_Keys_Name.map(e => e.KeyName);
|
|
59
67
|
}
|
|
60
|
-
|
|
68
|
+
if (config.selectKey) {
|
|
69
|
+
table.config.main.selectKey = config.selectKey
|
|
70
|
+
}
|
|
61
71
|
return table;
|
|
62
|
-
}
|
|
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
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { createLayoutFormat } from "./buildConfig";
|
|
2
|
+
import _ from "lodash";
|
|
3
|
+
|
|
4
|
+
const TreeMap = {
|
|
5
|
+
"type": "Control",
|
|
6
|
+
"scope": "#/properties/TreeMap2",
|
|
7
|
+
"config": {
|
|
8
|
+
"main": {
|
|
9
|
+
"layout": "cartsian",
|
|
10
|
+
orientation: "vertical",
|
|
11
|
+
header: "Territory Hierarchy",
|
|
12
|
+
"linkType": "step",
|
|
13
|
+
graphHeight: "500px",
|
|
14
|
+
},
|
|
15
|
+
"style": {
|
|
16
|
+
BoxStyle: {
|
|
17
|
+
borderRadius: "5px",
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"options": {
|
|
22
|
+
"widget": "TreeMap"
|
|
23
|
+
},
|
|
24
|
+
elements: [
|
|
25
|
+
|
|
26
|
+
]
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
export const buildTreeMap = (config, componentScope) => {
|
|
31
|
+
const treMap: any = _.cloneDeep(TreeMap);
|
|
32
|
+
treMap.scope = componentScope;
|
|
33
|
+
if (config.label) {
|
|
34
|
+
treMap.config.main.header = config.label;
|
|
35
|
+
}
|
|
36
|
+
if (config.layout) {
|
|
37
|
+
treMap.config.layout = createLayoutFormat(config.layout);
|
|
38
|
+
}
|
|
39
|
+
if (config.orientation) {
|
|
40
|
+
treMap.config.main.orientation = config.orientation;
|
|
41
|
+
}
|
|
42
|
+
if (config.linkType) {
|
|
43
|
+
treMap.config.main.linkType = config.linkType;
|
|
44
|
+
}
|
|
45
|
+
if (config.graphHeight) {
|
|
46
|
+
treMap.config.main.graphHeight = config.graphHeight;
|
|
47
|
+
}
|
|
48
|
+
if (config.graphWidth) {
|
|
49
|
+
treMap.config.main.graphWidth = config.graphWidth;
|
|
50
|
+
}
|
|
51
|
+
if (config.graphZoomHeight) {
|
|
52
|
+
treMap.config.main.graphZoomHeight = config.graphZoomHeight;
|
|
53
|
+
}
|
|
54
|
+
if (config.graphZoomWidth) {
|
|
55
|
+
treMap.config.main.graphZoomWidth = config.graphZoomWidth;
|
|
56
|
+
}
|
|
57
|
+
if (config.style) {
|
|
58
|
+
treMap.config.style = JSON.parse(config.style)
|
|
59
|
+
}
|
|
60
|
+
return treMap;
|
|
61
|
+
}
|
|
@@ -14,12 +14,12 @@ 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";
|
|
21
21
|
import { buildCard } from "./buildCard";
|
|
22
|
-
import { buildDate } from "./buildDate";
|
|
22
|
+
import { buildDate, buildDateTime } from "./buildDate";
|
|
23
23
|
import { buildRankCard } from "./buildRankCard";
|
|
24
24
|
import { buildRollAndDice } from "./buildRollAndDice";
|
|
25
25
|
import { buildTimer } from "./buildTimer";
|
|
@@ -37,6 +37,9 @@ import { buildFileInput } from "./buildFileInput";
|
|
|
37
37
|
import { buildStepper } from "./buildStepper";
|
|
38
38
|
import { buildPopUp } from "./buildPop";
|
|
39
39
|
import { buildDataGrid } from "./buildDataGrid";
|
|
40
|
+
import { buildInputSlider } from "./buildInputSlider";
|
|
41
|
+
import { buildTreeMap } from "./buildTreeMap";
|
|
42
|
+
import { buildThoughtOfTheDay } from "./buildThoughtOfTheDay";
|
|
40
43
|
export let schema = {
|
|
41
44
|
type: "object",
|
|
42
45
|
properties: {},
|
|
@@ -163,10 +166,19 @@ export const buildSchema = (config: any, tableName?: string, isArrayType?: boole
|
|
|
163
166
|
}
|
|
164
167
|
|
|
165
168
|
|
|
166
|
-
const buildUiSchema = (config: any) => {
|
|
169
|
+
const buildUiSchema = (config: any, store?: any) => {
|
|
167
170
|
let elements: any = {};
|
|
168
171
|
const componentScope = `#/properties/${config.name}`;
|
|
169
172
|
switch (config.type) {
|
|
173
|
+
case "TreeMap":
|
|
174
|
+
elements = buildTreeMap(config, componentScope)
|
|
175
|
+
break;
|
|
176
|
+
case "DateTime":
|
|
177
|
+
elements = buildDateTime(config, componentScope);
|
|
178
|
+
break;
|
|
179
|
+
case "InputSlider":
|
|
180
|
+
elements = buildInputSlider(config, componentScope);
|
|
181
|
+
break;
|
|
170
182
|
case "DataGrid":
|
|
171
183
|
elements = buildDataGrid(config, componentScope);
|
|
172
184
|
break;
|
|
@@ -219,9 +231,6 @@ const buildUiSchema = (config: any) => {
|
|
|
219
231
|
case "Array":
|
|
220
232
|
elements = buildArray(config, componentScope);
|
|
221
233
|
break;
|
|
222
|
-
case "LazyLoadingTable":
|
|
223
|
-
elements = buildLazyLoadingTable(config, componentScope)
|
|
224
|
-
break;
|
|
225
234
|
case "Box":
|
|
226
235
|
elements = buildLabel(config, componentScope);
|
|
227
236
|
break;
|
|
@@ -238,7 +247,7 @@ const buildUiSchema = (config: any) => {
|
|
|
238
247
|
elements = buildEmptyBox(config, componentScope);
|
|
239
248
|
break;
|
|
240
249
|
case "card":
|
|
241
|
-
elements = buildCard(config, componentScope);
|
|
250
|
+
elements = buildCard(config, componentScope, store);
|
|
242
251
|
break;
|
|
243
252
|
case "Graph":
|
|
244
253
|
switch (config.graphType) {
|
|
@@ -253,8 +262,12 @@ const buildUiSchema = (config: any) => {
|
|
|
253
262
|
elements = buildPieGraph(config, componentScope);
|
|
254
263
|
break;
|
|
255
264
|
case "HorizontalBarGraph":
|
|
265
|
+
case "HorizontalStackBarGraph":
|
|
256
266
|
elements = buildHorizontalBarGraph(config, componentScope);
|
|
257
267
|
break;
|
|
268
|
+
default:
|
|
269
|
+
elements = buildStackbarGraph(config, componentScope);
|
|
270
|
+
break;
|
|
258
271
|
}
|
|
259
272
|
break;
|
|
260
273
|
case "ProgressBar":
|
|
@@ -278,13 +291,22 @@ const buildUiSchema = (config: any) => {
|
|
|
278
291
|
case "Timer":
|
|
279
292
|
elements = buildTimer(config, componentScope);
|
|
280
293
|
break;
|
|
281
|
-
|
|
294
|
+
case "ColumnGroup":
|
|
295
|
+
elements = {
|
|
296
|
+
accessorKey: config.name,
|
|
297
|
+
header: config.label || config.name,
|
|
298
|
+
elements: [],
|
|
299
|
+
}
|
|
300
|
+
break;
|
|
282
301
|
case "MultipleSelect":
|
|
283
302
|
elements = buildMultiSelect(config, componentScope);
|
|
284
303
|
break;
|
|
285
304
|
case "LeaderBoard":
|
|
286
305
|
elements = buildLeaderBoard(config);
|
|
287
306
|
break;
|
|
307
|
+
case "Thought":
|
|
308
|
+
elements = buildThoughtOfTheDay(config, componentScope);
|
|
309
|
+
break;
|
|
288
310
|
default:
|
|
289
311
|
schema = {
|
|
290
312
|
type: "object",
|
|
@@ -298,37 +320,69 @@ const buildUiSchema = (config: any) => {
|
|
|
298
320
|
if (config?.type === "LeaderBoard") {
|
|
299
321
|
return elements;
|
|
300
322
|
}
|
|
323
|
+
else if (config.type == "ColumnGroup") {
|
|
324
|
+
const sizeMap = {}
|
|
325
|
+
if (config.sizeHolder) {
|
|
326
|
+
config.sizeHolder.map((e, i) => {
|
|
327
|
+
sizeMap[e.keyName] = e.value
|
|
328
|
+
});
|
|
329
|
+
}
|
|
330
|
+
elements.elements = config.elements.map((cellElem, elemInd) => {
|
|
331
|
+
return {
|
|
332
|
+
accessorKey: cellElem.name,
|
|
333
|
+
header: cellElem.label || cellElem.name,
|
|
334
|
+
size: sizeMap[cellElem.name] || 180,
|
|
335
|
+
type: cellElem.columnFormat,
|
|
336
|
+
elements: cellElem.type == "ColumnGroup" ? cellElem.elements.map((childCellElem) => buildUiSchema(childCellElem, store)) : []
|
|
337
|
+
}
|
|
338
|
+
})
|
|
339
|
+
}
|
|
301
340
|
else if (config.type == "Table") {
|
|
302
341
|
const sizeMap = {}
|
|
342
|
+
const filterMap = {}
|
|
303
343
|
if (config.sizeHolder) {
|
|
304
|
-
|
|
344
|
+
config.sizeHolder.map((e, i) => {
|
|
305
345
|
sizeMap[e.keyName] = e.value
|
|
306
346
|
});
|
|
307
347
|
}
|
|
308
|
-
|
|
309
|
-
|
|
348
|
+
if(config.enableColumnFilter){
|
|
349
|
+
config.enableColumnFilter.map((e)=>{
|
|
350
|
+
filterMap[e.keyName] = true
|
|
351
|
+
})
|
|
352
|
+
}
|
|
353
|
+
elements.elements = config.elements.map((cellElem, elemInd) => {
|
|
354
|
+
if (cellElem.type) {
|
|
310
355
|
return {
|
|
311
|
-
accessorKey:
|
|
312
|
-
header:
|
|
313
|
-
size: sizeMap[
|
|
314
|
-
|
|
356
|
+
accessorKey: cellElem.name,
|
|
357
|
+
header: cellElem.label || cellElem.name,
|
|
358
|
+
size: sizeMap[cellElem.name] || 180,
|
|
359
|
+
type: cellElem.columnFormat,
|
|
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
|
|
364
|
+
}
|
|
365
|
+
} else {
|
|
366
|
+
return {
|
|
367
|
+
accessorKey: cellElem.name,
|
|
368
|
+
type: cellElem.columnFormat,
|
|
369
|
+
header: cellElem.label || cellElem.name,
|
|
370
|
+
size: sizeMap[cellElem.name] || 180,
|
|
371
|
+
enableColumnFilter: Object.keys(filterMap).length === 0 ? true : filterMap[cellElem.name] ?? false,
|
|
372
|
+
columnFilterModeOptions: config.filteringOptions
|
|
315
373
|
}
|
|
316
374
|
}
|
|
317
|
-
|
|
318
|
-
accessorKey: e.name,
|
|
319
|
-
header: e.label || e.name,
|
|
320
|
-
size: sizeMap[e.name]|| 180
|
|
321
|
-
}
|
|
375
|
+
|
|
322
376
|
})
|
|
323
377
|
}
|
|
324
378
|
else if (config.type == "Array") {
|
|
325
379
|
elements.options.detail.elements = config.elements.map((e: any, elemInd: number) => {
|
|
326
|
-
return buildUiSchema(e)
|
|
380
|
+
return buildUiSchema(e,store)
|
|
327
381
|
});
|
|
328
382
|
}
|
|
329
383
|
else {
|
|
330
384
|
elements.elements = config.elements.map((e: any, elemInd: number) => {
|
|
331
|
-
return buildUiSchema(e)
|
|
385
|
+
return buildUiSchema(e,store)
|
|
332
386
|
});
|
|
333
387
|
}
|
|
334
388
|
}
|
|
@@ -336,38 +390,4 @@ const buildUiSchema = (config: any) => {
|
|
|
336
390
|
}
|
|
337
391
|
|
|
338
392
|
|
|
339
|
-
export default buildUiSchema;
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
393
|
+
export default buildUiSchema;
|
|
@@ -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
|
}
|
|
@@ -2,17 +2,20 @@ import { createLayoutFormat } from "./buildConfig";
|
|
|
2
2
|
import WrapperSection from "./uischema/wrapperSection";
|
|
3
3
|
import _ from "lodash";
|
|
4
4
|
|
|
5
|
-
export const buildWrapperSection = (config,componentScope) =>{
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
5
|
+
export const buildWrapperSection = (config, componentScope) => {
|
|
6
|
+
const wrapper: any = _.cloneDeep(WrapperSection);
|
|
7
|
+
wrapper.scope = componentScope;
|
|
8
|
+
wrapper.config.main.label = config.label;
|
|
9
|
+
wrapper.config.main.divider = config.divider === "YES" ? true : false;
|
|
10
|
+
wrapper.config.main.isAccordion = config.isAccordion === "No" ? false : true;
|
|
11
|
+
if(config.defaultStyle){
|
|
12
|
+
wrapper.config.defaultStyle = config.defaultStyle ==="YES" ? true : false;
|
|
13
|
+
}
|
|
14
|
+
if (config.style) {
|
|
15
|
+
wrapper.config.style = JSON.parse(config.style)
|
|
16
|
+
}
|
|
17
|
+
if (config.layout) {
|
|
18
|
+
wrapper.config.layout = createLayoutFormat(config.layout)
|
|
19
|
+
}
|
|
20
|
+
return wrapper;
|
|
18
21
|
}
|