impaktapps-ui-builder 1.0.174 → 1.0.180
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 +746 -80
- 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/buildAreaGraph.d.ts +2 -0
- package/dist/src/impaktapps-ui-builder/builder/build/buildConfig.d.ts +1 -0
- package/dist/src/impaktapps-ui-builder/builder/build/buildGroupButton.d.ts +1 -0
- package/dist/src/impaktapps-ui-builder/builder/build/buildMetricCard.d.ts +1 -0
- package/dist/src/impaktapps-ui-builder/builder/build/buildOTP_inputs.d.ts +1 -0
- package/dist/src/impaktapps-ui-builder/builder/build/buildPdfViewer.d.ts +1 -0
- package/dist/src/impaktapps-ui-builder/builder/build/buildPopover.d.ts +1 -0
- package/dist/src/impaktapps-ui-builder/builder/build/buildStackBarLineGraph.d.ts +2 -0
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/box.d.ts +1 -0
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/buttonGroup.d.ts +22 -0
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/graph.d.ts +50 -4
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/metricCard.d.ts +17 -0
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/multiSelect.d.ts +1 -0
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/pdfViewer.d.ts +19 -0
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/selectInputField.d.ts +1 -0
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/tableSection.d.ts +1 -1
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/wrapperSection.d.ts +3 -1
- package/dist/src/impaktapps-ui-builder/runtime/services/service.d.ts +2 -0
- package/package.json +1 -1
- package/src/impaktapps-ui-builder/builder/build/buildAreaGraph.ts +66 -0
- package/src/impaktapps-ui-builder/builder/build/buildArray.ts +10 -6
- package/src/impaktapps-ui-builder/builder/build/buildCamera.ts +1 -1
- package/src/impaktapps-ui-builder/builder/build/buildConfig.ts +19 -7
- package/src/impaktapps-ui-builder/builder/build/buildDate.ts +26 -22
- package/src/impaktapps-ui-builder/builder/build/buildFileInput.ts +42 -49
- package/src/impaktapps-ui-builder/builder/build/buildGroupButton.ts +24 -0
- package/src/impaktapps-ui-builder/builder/build/buildHorizontalBarGraph.ts +3 -3
- package/src/impaktapps-ui-builder/builder/build/buildImage.ts +6 -3
- package/src/impaktapps-ui-builder/builder/build/buildLineGraph.ts +3 -3
- package/src/impaktapps-ui-builder/builder/build/buildMetricCard.tsx +37 -0
- package/src/impaktapps-ui-builder/builder/build/buildMultiSelect.ts +3 -0
- package/src/impaktapps-ui-builder/builder/build/buildOTP_inputs.ts +44 -0
- package/src/impaktapps-ui-builder/builder/build/buildPdfViewer.ts +16 -0
- package/src/impaktapps-ui-builder/builder/build/buildPieGraph.ts +3 -3
- package/src/impaktapps-ui-builder/builder/build/buildPop.ts +1 -0
- package/src/impaktapps-ui-builder/builder/build/buildPopover.ts +40 -0
- package/src/impaktapps-ui-builder/builder/build/buildSelect.ts +3 -0
- package/src/impaktapps-ui-builder/builder/build/buildStackBarGraph.ts +3 -3
- package/src/impaktapps-ui-builder/builder/build/buildStackBarLineGraph.ts +72 -0
- package/src/impaktapps-ui-builder/builder/build/buildTabSection.ts +2 -0
- package/src/impaktapps-ui-builder/builder/build/buildTable.ts +0 -3
- package/src/impaktapps-ui-builder/builder/build/buildText.ts +3 -0
- package/src/impaktapps-ui-builder/builder/build/buildUiSchema.ts +33 -0
- package/src/impaktapps-ui-builder/builder/build/buildWrapperSection.ts +7 -3
- package/src/impaktapps-ui-builder/builder/build/uischema/box.ts +2 -1
- package/src/impaktapps-ui-builder/builder/build/uischema/buildPropertiesSection.ts +172 -16
- package/src/impaktapps-ui-builder/builder/build/uischema/buttonGroup.ts +17 -0
- package/src/impaktapps-ui-builder/builder/build/uischema/coreSection.ts +0 -1
- package/src/impaktapps-ui-builder/builder/build/uischema/graph.ts +37 -4
- package/src/impaktapps-ui-builder/builder/build/uischema/metricCard.ts +13 -0
- package/src/impaktapps-ui-builder/builder/build/uischema/multiSelect.ts +2 -0
- package/src/impaktapps-ui-builder/builder/build/uischema/pdfViewer.ts +18 -0
- package/src/impaktapps-ui-builder/builder/build/uischema/selectInputField.ts +2 -0
- package/src/impaktapps-ui-builder/builder/build/uischema/tableSection.ts +5 -6
- package/src/impaktapps-ui-builder/builder/build/uischema/wrapperSection.ts +3 -1
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/schema.ts +80 -1
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/PageMaster/uiSchema.ts +17 -0
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/event/schema.ts +2 -3
- package/src/impaktapps-ui-builder/builder/services/component.ts +143 -108
- package/src/impaktapps-ui-builder/runtime/services/service.ts +26 -4
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import MetricCard from "./uischema/metricCard";
|
|
2
|
+
import _ from "lodash";
|
|
3
|
+
import { createLayoutFormat } from "./buildConfig";
|
|
4
|
+
|
|
5
|
+
export const buildMetricCard = (config,componentScope,store) =>{
|
|
6
|
+
const card: any = _.cloneDeep(MetricCard);
|
|
7
|
+
|
|
8
|
+
card.scope = componentScope;
|
|
9
|
+
|
|
10
|
+
if (config.style) {
|
|
11
|
+
card.config.style = JSON.parse(config.style)
|
|
12
|
+
}
|
|
13
|
+
if(config.layout){
|
|
14
|
+
card.config.layout = createLayoutFormat(config.layout)
|
|
15
|
+
}
|
|
16
|
+
if(config.label){
|
|
17
|
+
card.config.main.label = config.label;
|
|
18
|
+
}
|
|
19
|
+
if(config.url){
|
|
20
|
+
card.config.main.url = config.url;
|
|
21
|
+
}
|
|
22
|
+
if(config.description){
|
|
23
|
+
card.config.main.description = config.description;
|
|
24
|
+
}
|
|
25
|
+
if(config.cardValue){
|
|
26
|
+
card.config.main.cardValue = config.cardValue;
|
|
27
|
+
}
|
|
28
|
+
if (config.growthRate) {
|
|
29
|
+
card.config.main.growthRate = config.growthRate;
|
|
30
|
+
}
|
|
31
|
+
if (config.color) {
|
|
32
|
+
card.config.main.color = config.color
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
return card;
|
|
36
|
+
}
|
|
37
|
+
|
|
@@ -27,6 +27,9 @@ export const buildMultiSelect = (config, componentScope) => {
|
|
|
27
27
|
if (config.toolTipPosition) {
|
|
28
28
|
multipleSelect.config.main.toolTipPosition = config.toolTipPosition;
|
|
29
29
|
}
|
|
30
|
+
if (config.style) {
|
|
31
|
+
multipleSelect.config.style = JSON.parse(config.style);
|
|
32
|
+
}
|
|
30
33
|
|
|
31
34
|
|
|
32
35
|
return multipleSelect;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import _ from "lodash";
|
|
2
|
+
import { createLayoutFormat } from "./buildConfig";
|
|
3
|
+
|
|
4
|
+
const OTPSchema = {
|
|
5
|
+
type: "Control",
|
|
6
|
+
scope: "#/properties/OTPInput",
|
|
7
|
+
|
|
8
|
+
options: {
|
|
9
|
+
widget: "OTPInput",
|
|
10
|
+
},
|
|
11
|
+
config: {
|
|
12
|
+
layout: { xs: 12, sm: 12, md: 3, lg: 3 },
|
|
13
|
+
main: {
|
|
14
|
+
seperator: "",
|
|
15
|
+
length: 4,
|
|
16
|
+
type: "number",
|
|
17
|
+
masking:true
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export const buildOTP_Input = (config, componentScope) => {
|
|
23
|
+
const OTP: any = _.cloneDeep(OTPSchema);
|
|
24
|
+
OTP.scope = componentScope;
|
|
25
|
+
|
|
26
|
+
if (config.layout) {
|
|
27
|
+
OTP.config.layout = createLayoutFormat(config.layout)
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
if (config.style) {
|
|
31
|
+
OTP.config.style = JSON.parse(config.style)
|
|
32
|
+
}
|
|
33
|
+
if (config.errorMessage) {
|
|
34
|
+
OTP.config.main.errorMessage = config.errorMessage
|
|
35
|
+
}
|
|
36
|
+
if (config.toolTip) {
|
|
37
|
+
OTP.config.main.toolTip = config.toolTip;
|
|
38
|
+
}
|
|
39
|
+
OTP.config.main.masking = config.masking === "YES" ? true : false;
|
|
40
|
+
OTP.config.main.type = config.OTP_Format;
|
|
41
|
+
OTP.config.main.seperator = config.seperator;
|
|
42
|
+
OTP.config.main.length = +config.length;
|
|
43
|
+
return OTP;
|
|
44
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import pdfViewer from "./uischema/pdfViewer";
|
|
2
|
+
import _ from "lodash";
|
|
3
|
+
import { createLayoutFormat } from "./buildConfig";
|
|
4
|
+
|
|
5
|
+
export const buildPdfViewer = (config, componentScope: string) => {
|
|
6
|
+
const PdfViewer: any = _.cloneDeep(pdfViewer)
|
|
7
|
+
PdfViewer.scope = componentScope;
|
|
8
|
+
PdfViewer.config.main.scale = config.scale;
|
|
9
|
+
if (config.layout) {
|
|
10
|
+
PdfViewer.config.layout = createLayoutFormat(config.layout);
|
|
11
|
+
}
|
|
12
|
+
if (config.style) {
|
|
13
|
+
PdfViewer.config.style = JSON.parse(config.style)
|
|
14
|
+
}
|
|
15
|
+
return PdfViewer
|
|
16
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createLayoutFormat,
|
|
1
|
+
import { createLayoutFormat, createKeyValueMap } from "./buildConfig";
|
|
2
2
|
import { PieGraph } from "./uischema/graph";
|
|
3
3
|
import _ from "lodash";
|
|
4
4
|
export const buildPieGraph = (config, componentScope) => {
|
|
@@ -19,13 +19,13 @@ export const buildPieGraph = (config, componentScope) => {
|
|
|
19
19
|
pieGraph.config.main.header = config.heading;
|
|
20
20
|
|
|
21
21
|
if (config.legendLabels) {
|
|
22
|
-
pieGraph.config.main.legendLabels =
|
|
22
|
+
pieGraph.config.main.legendLabels = createKeyValueMap(config.legendLabels);
|
|
23
23
|
}
|
|
24
24
|
if (config.xAxisValue) {
|
|
25
25
|
pieGraph.config.main.xAxisValue = config.xAxisValue;
|
|
26
26
|
}
|
|
27
27
|
if (config.pieArcColors) {
|
|
28
|
-
pieGraph.config.style.
|
|
28
|
+
pieGraph.config.style.colorMap = createKeyValueMap(config.pieArcColors);
|
|
29
29
|
}
|
|
30
30
|
return pieGraph;
|
|
31
31
|
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { createLayoutFormat } from "./buildConfig";
|
|
2
|
+
import _ from "lodash";
|
|
3
|
+
|
|
4
|
+
const PopOver = {
|
|
5
|
+
type: "Control",
|
|
6
|
+
scope: "#/properties/text",
|
|
7
|
+
options: {
|
|
8
|
+
widget: "Popover",
|
|
9
|
+
},
|
|
10
|
+
config: {
|
|
11
|
+
layout: {
|
|
12
|
+
xs: 12,
|
|
13
|
+
sm: 12,
|
|
14
|
+
md: 12,
|
|
15
|
+
lg: 12,
|
|
16
|
+
},
|
|
17
|
+
main: {
|
|
18
|
+
label: "PopOver"
|
|
19
|
+
},
|
|
20
|
+
style:{}
|
|
21
|
+
},
|
|
22
|
+
}
|
|
23
|
+
export const buildPopOver = (config,componentScope) =>{
|
|
24
|
+
const popOver: any = _.cloneDeep(PopOver);
|
|
25
|
+
popOver.scope = componentScope;
|
|
26
|
+
popOver.config.main.positionVertical = config.positionVertical;
|
|
27
|
+
popOver.config.main.positionHorizontal = config.positionHorizontal;
|
|
28
|
+
popOver.config.main.contentVertical = config.contentVertical;
|
|
29
|
+
popOver.config.main.contentHorizontal = config.contentHorizontal;
|
|
30
|
+
popOver.config.main.width = config.width;
|
|
31
|
+
popOver.config.main.gap = config.gap;
|
|
32
|
+
|
|
33
|
+
if (config.layout) {
|
|
34
|
+
popOver.config.layout = createLayoutFormat(config.layout, config.type)
|
|
35
|
+
}
|
|
36
|
+
if (config.style) {
|
|
37
|
+
popOver.config.style = JSON.parse(config.style)
|
|
38
|
+
}
|
|
39
|
+
return popOver;
|
|
40
|
+
}
|
|
@@ -26,6 +26,9 @@ export const buildSelect = (config: any, componentScope: string) => {
|
|
|
26
26
|
if (config.toolTipPosition) {
|
|
27
27
|
selectInputField.config.main.toolTipPosition = config.toolTipPosition;
|
|
28
28
|
}
|
|
29
|
+
if (config.style) {
|
|
30
|
+
selectInputField.config.style = JSON.parse(config.style);
|
|
31
|
+
}
|
|
29
32
|
selectInputField.scope = componentScope;
|
|
30
33
|
return selectInputField;
|
|
31
34
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createLayoutFormat,
|
|
1
|
+
import { createLayoutFormat, createKeyValueMap } from "./buildConfig";
|
|
2
2
|
import { BarGraph } from "./uischema/graph";
|
|
3
3
|
import _ from "lodash";
|
|
4
4
|
|
|
@@ -20,10 +20,10 @@ export const buildStackbarGraph = (config:any,componentScope:string) => {
|
|
|
20
20
|
barGraph.config.main.type = config?.graphType ?? "BarGraph";
|
|
21
21
|
barGraph.config.main.header = config.heading;
|
|
22
22
|
if (config.legendLabels) {
|
|
23
|
-
barGraph.config.main.legendLabels =
|
|
23
|
+
barGraph.config.main.legendLabels = createKeyValueMap(config.legendLabels);
|
|
24
24
|
}
|
|
25
25
|
if (config.pieArcColors) {
|
|
26
|
-
barGraph.config.style.
|
|
26
|
+
barGraph.config.style.colorMap = createKeyValueMap(config.pieArcColors);
|
|
27
27
|
}
|
|
28
28
|
if (config.xAxisValue) {
|
|
29
29
|
barGraph.config.main.xAxisValue = config.xAxisValue;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { createLayoutFormat, createKeyValueMap } from "./buildConfig";
|
|
2
|
+
import { StackBarLineG } from "./uischema/graph";
|
|
3
|
+
import _ from "lodash";
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
const buildStackBarLineGraph = (config:any,componentScope:string) => {
|
|
7
|
+
const StackBarLineGraph: any = _.cloneDeep(StackBarLineG);
|
|
8
|
+
StackBarLineGraph.scope = componentScope;
|
|
9
|
+
if (config.layout) {
|
|
10
|
+
StackBarLineGraph.config.layout = createLayoutFormat(config.layout, config.type);
|
|
11
|
+
}
|
|
12
|
+
StackBarLineGraph.config.main.type = config.graphType;
|
|
13
|
+
StackBarLineGraph.scope = componentScope;
|
|
14
|
+
StackBarLineGraph.config.main.header = config.heading;
|
|
15
|
+
StackBarLineGraph.config.main.subHeader = config.subHeader;
|
|
16
|
+
if (config.legendHide) {
|
|
17
|
+
StackBarLineGraph.config.main.legendAvailable = config.legendHide==="YES"?false:true;
|
|
18
|
+
}
|
|
19
|
+
if (config.bottomAxisAngle) {
|
|
20
|
+
StackBarLineGraph.config.main.bottomAxisAngle = config.bottomAxisAngle==="YES"?true:false;
|
|
21
|
+
}
|
|
22
|
+
if (config.legendLabels) {
|
|
23
|
+
StackBarLineGraph.config.main.legendLabels = createKeyValueMap(config.legendLabels);
|
|
24
|
+
}
|
|
25
|
+
if(config.legendDirection){
|
|
26
|
+
StackBarLineGraph.config.main.legendDirection = config.legendDirection === "Row" ? "row" : "column";
|
|
27
|
+
}
|
|
28
|
+
if (config.height) {
|
|
29
|
+
StackBarLineGraph.config.style.containerStyle.height = config.height;
|
|
30
|
+
}
|
|
31
|
+
if (config.pieArcColors) {
|
|
32
|
+
StackBarLineGraph.config.style.colorMap = createKeyValueMap(config.pieArcColors);
|
|
33
|
+
}
|
|
34
|
+
if(config.yAxisTickCount){
|
|
35
|
+
StackBarLineGraph.config.main.yAxisTickCount = config.yAxisTickCount
|
|
36
|
+
}
|
|
37
|
+
if(config.xAxisTickCount){
|
|
38
|
+
StackBarLineGraph.config.main.xAxisTickCount = config.xAxisTickCount
|
|
39
|
+
}
|
|
40
|
+
if (config.xAxisValue) {
|
|
41
|
+
StackBarLineGraph.config.main.xAxisValue = config.xAxisValue;
|
|
42
|
+
}
|
|
43
|
+
if(config.xAxisType) {
|
|
44
|
+
StackBarLineGraph.config.main.xAxisType = config.xAxisType;
|
|
45
|
+
}
|
|
46
|
+
if (config.bottomLabel) {
|
|
47
|
+
StackBarLineGraph.config.main.bottomLabel = config.bottomLabel;
|
|
48
|
+
}
|
|
49
|
+
if (config.leftLabel) {
|
|
50
|
+
StackBarLineGraph.config.main.leftLabel = config.leftLabel;
|
|
51
|
+
}
|
|
52
|
+
if (config.rightLabel) {
|
|
53
|
+
StackBarLineGraph.config.main.rightLabel = config.rightLabel;
|
|
54
|
+
}
|
|
55
|
+
if (config.disableLeftLabel) {
|
|
56
|
+
StackBarLineGraph.config.main.disableLeftLabel = config.disableLeftLabel==="YES"? true: false;
|
|
57
|
+
}
|
|
58
|
+
if (config.growthRateKey) {
|
|
59
|
+
StackBarLineGraph.config.main.growthRateKey = config.growthRateKey;
|
|
60
|
+
}
|
|
61
|
+
if (config.tooltipUnit) {
|
|
62
|
+
StackBarLineGraph.config.main.tooltipUnit = config.tooltipUnit;
|
|
63
|
+
}
|
|
64
|
+
if (config.leftMargin) {
|
|
65
|
+
StackBarLineGraph.config.style.labelStyle.margin ={
|
|
66
|
+
left: config.leftMargin
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
return StackBarLineGraph
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export default buildStackBarLineGraph;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { flatObjectValueInArray } from "./buildConfig";
|
|
1
2
|
import Tabsection from "./uischema/tabsection";
|
|
2
3
|
import _ from "lodash";
|
|
3
4
|
|
|
@@ -13,6 +14,7 @@ export const buildTabSection = (config:any,componentScope:string) => {
|
|
|
13
14
|
}
|
|
14
15
|
if (config.sectionLabels) {
|
|
15
16
|
tab.config.main.tabLabels = config.sectionLabels.map(e => e.label);
|
|
17
|
+
tab.config.main.tabIcons = config.sectionLabels.map(e => e.icon);
|
|
16
18
|
}
|
|
17
19
|
if (config.style) {
|
|
18
20
|
tab.config.style = JSON.parse(config.style)
|
|
@@ -30,9 +30,6 @@ export const buildTable = (config: any, componentScope: string) => {
|
|
|
30
30
|
if (config.paginateExpandedRows) {
|
|
31
31
|
table.config.main.paginateExpandedRows = config.paginateExpandedRows === "YES" ? true : false;
|
|
32
32
|
}
|
|
33
|
-
if (config.treeStructure) {
|
|
34
|
-
table.config.main.treeStructure = config.treeStructure === "YES" ? "flatTreeMap" : false;
|
|
35
|
-
}
|
|
36
33
|
if (config.SelectionAvailable) {
|
|
37
34
|
table.config.main.Selection = config.SelectionAvailable === "YES" ? true : false
|
|
38
35
|
};
|
|
@@ -32,6 +32,9 @@ export const buildTextField = (config: any, componentScope: string) => {
|
|
|
32
32
|
if (config.toolTipPosition) {
|
|
33
33
|
inputField.config.main.toolTipPosition = config.toolTipPosition;
|
|
34
34
|
}
|
|
35
|
+
if(config.iconName){
|
|
36
|
+
inputField.config.main.startIcon = config.iconName;
|
|
37
|
+
}
|
|
35
38
|
inputField.config.main.errorMessage = `${config.name} is empty or invalid`;
|
|
36
39
|
inputField.scope = componentScope;
|
|
37
40
|
return inputField;
|
|
@@ -17,6 +17,7 @@ import { buildLabel } from "./buildLabel";
|
|
|
17
17
|
import { buildUploadFile } from "./buildUplaodFile";
|
|
18
18
|
import { buildDownloadFile } from "./buildDownloadFile";
|
|
19
19
|
import { buildCard } from "./buildCard";
|
|
20
|
+
import { buildMetricCard } from "./buildMetricCard";
|
|
20
21
|
import { buildDate, buildDateTime } from "./buildDate";
|
|
21
22
|
import { buildRankCard } from "./buildRankCard";
|
|
22
23
|
import { buildRollAndDice } from "./buildRollAndDice";
|
|
@@ -40,7 +41,13 @@ import { buildTreeMap } from "./buildTreeMap";
|
|
|
40
41
|
import { buildThoughtOfTheDay } from "./buildThoughtOfTheDay";
|
|
41
42
|
import { buildHorizontalLayout } from "./buildHorizontalLayout";
|
|
42
43
|
import { buildImage } from "./buildImage";
|
|
44
|
+
import buildAreaGraph from "./buildAreaGraph";
|
|
45
|
+
import buildStackBarLineGraph from "./buildStackBarLineGraph";
|
|
43
46
|
import { buildCamera } from "./buildCamera";
|
|
47
|
+
import { buildButtonGroup } from "./buildGroupButton";
|
|
48
|
+
import { buildPopOver } from "./buildPopover";
|
|
49
|
+
import { buildOTP_Input } from "./buildOTP_inputs";
|
|
50
|
+
import { buildPdfViewer } from "./buildPdfViewer";
|
|
44
51
|
export let schema = {
|
|
45
52
|
type: "object",
|
|
46
53
|
properties: {},
|
|
@@ -121,6 +128,9 @@ const buildUiSchema = (config: any, store?: any) => {
|
|
|
121
128
|
let elements: any = {};
|
|
122
129
|
const componentScope = `#/properties/${config.name}`;
|
|
123
130
|
switch (config.type) {
|
|
131
|
+
case "OTP_Input":
|
|
132
|
+
elements = buildOTP_Input(config, componentScope);
|
|
133
|
+
break;
|
|
124
134
|
case "TreeMap":
|
|
125
135
|
elements = buildTreeMap(config, componentScope)
|
|
126
136
|
break;
|
|
@@ -139,6 +149,9 @@ const buildUiSchema = (config: any, store?: any) => {
|
|
|
139
149
|
case "PopUp":
|
|
140
150
|
elements = buildPopUp(config, componentScope);
|
|
141
151
|
break;
|
|
152
|
+
case "PopOver":
|
|
153
|
+
elements = buildPopOver(config, componentScope);
|
|
154
|
+
break;
|
|
142
155
|
case "FileInput":
|
|
143
156
|
elements = buildFileInput(config, componentScope);
|
|
144
157
|
break;
|
|
@@ -179,6 +192,9 @@ const buildUiSchema = (config: any, store?: any) => {
|
|
|
179
192
|
|
|
180
193
|
elements = buildButton(config, componentScope);
|
|
181
194
|
break;
|
|
195
|
+
case "ButtonGroup":
|
|
196
|
+
elements = buildButtonGroup(config, componentScope);
|
|
197
|
+
break;
|
|
182
198
|
case "Table":
|
|
183
199
|
elements = buildTable(config, componentScope);
|
|
184
200
|
break;
|
|
@@ -203,6 +219,9 @@ const buildUiSchema = (config: any, store?: any) => {
|
|
|
203
219
|
case "card":
|
|
204
220
|
elements = buildCard(config, componentScope, store);
|
|
205
221
|
break;
|
|
222
|
+
case "MetricCard":
|
|
223
|
+
elements = buildMetricCard(config, componentScope, store);
|
|
224
|
+
break;
|
|
206
225
|
case "Graph":
|
|
207
226
|
switch (config.graphType) {
|
|
208
227
|
case "BarGraph":
|
|
@@ -219,6 +238,12 @@ const buildUiSchema = (config: any, store?: any) => {
|
|
|
219
238
|
case "HorizontalStackBarGraph":
|
|
220
239
|
elements = buildHorizontalBarGraph(config, componentScope);
|
|
221
240
|
break;
|
|
241
|
+
case "AreaGraph":
|
|
242
|
+
elements = buildAreaGraph(config, componentScope);
|
|
243
|
+
break;
|
|
244
|
+
case "StackBarLineGraph":
|
|
245
|
+
elements = buildStackBarLineGraph(config, componentScope);
|
|
246
|
+
break;
|
|
222
247
|
default:
|
|
223
248
|
elements = buildStackbarGraph(config, componentScope);
|
|
224
249
|
break;
|
|
@@ -267,6 +292,9 @@ const buildUiSchema = (config: any, store?: any) => {
|
|
|
267
292
|
case "Camera":
|
|
268
293
|
elements = buildCamera(config, componentScope)
|
|
269
294
|
break;
|
|
295
|
+
case "PdfViewer":
|
|
296
|
+
elements = buildPdfViewer(config, componentScope);
|
|
297
|
+
break;
|
|
270
298
|
default:
|
|
271
299
|
schema = {
|
|
272
300
|
type: "object",
|
|
@@ -375,6 +403,11 @@ const buildUiSchema = (config: any, store?: any) => {
|
|
|
375
403
|
});
|
|
376
404
|
}
|
|
377
405
|
}
|
|
406
|
+
if (config.tabLabelElements) {
|
|
407
|
+
elements.tabLabelElements = config.tabLabelElements.map((e: any, elemInd: number) => {
|
|
408
|
+
return buildUiSchema(e, store)
|
|
409
|
+
});
|
|
410
|
+
}
|
|
378
411
|
return elements;
|
|
379
412
|
}
|
|
380
413
|
|
|
@@ -8,9 +8,13 @@ export const buildWrapperSection = (config, componentScope) => {
|
|
|
8
8
|
wrapper.config.main.label = config.label;
|
|
9
9
|
wrapper.config.main.divider = config.divider === "YES" ? true : false;
|
|
10
10
|
wrapper.config.main.isAccordion = config.isAccordion === "No" ? false : true;
|
|
11
|
-
wrapper.config.main.defaultClosed = config.defaultClosed === "YES"?true:false;
|
|
12
|
-
|
|
13
|
-
wrapper.config.
|
|
11
|
+
wrapper.config.main.defaultClosed = config.defaultClosed === "YES" ? true : false;
|
|
12
|
+
wrapper.config.main.icon = config.iconUrl;
|
|
13
|
+
wrapper.config.main.rowSpacing = Number(config.rowSpacing);
|
|
14
|
+
wrapper.config.main.columnSpacing = Number(config.columnSpacing);
|
|
15
|
+
wrapper.config.main.spacing = Number(config.spacing);
|
|
16
|
+
if (config.defaultStyle) {
|
|
17
|
+
wrapper.config.defaultStyle = config.defaultStyle === "YES" ? true : false;
|
|
14
18
|
}
|
|
15
19
|
if (config.style) {
|
|
16
20
|
wrapper.config.style = JSON.parse(config.style)
|