impaktapps-ui-builder 1.0.201 → 1.0.202
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 +1103 -298
- package/dist/impaktapps-ui-builder.es.js.map +1 -1
- package/dist/impaktapps-ui-builder.umd.js +13 -13
- 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/buildCamera.d.ts +1 -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/buildHierarchyChart.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/card.d.ts +173 -197
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/graph.d.ts +25 -5
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/hierarchyChart.d.ts +22 -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/builder/services/utils.d.ts +2 -1
- package/dist/src/impaktapps-ui-builder/runtime/services/service.d.ts +3 -0
- package/package.json +1 -1
- package/src/impaktapps-ui-builder/builder/build/buildAreaGraph.ts +22 -14
- package/src/impaktapps-ui-builder/builder/build/buildArray.ts +10 -6
- package/src/impaktapps-ui-builder/builder/build/buildCamera.ts +50 -0
- package/src/impaktapps-ui-builder/builder/build/buildCard.ts +10 -10
- package/src/impaktapps-ui-builder/builder/build/buildConfig.ts +19 -7
- package/src/impaktapps-ui-builder/builder/build/buildDate.ts +32 -16
- package/src/impaktapps-ui-builder/builder/build/buildDownloadFile.ts +6 -0
- package/src/impaktapps-ui-builder/builder/build/buildEmptyBox.ts +4 -0
- package/src/impaktapps-ui-builder/builder/build/buildFileInput.ts +42 -43
- package/src/impaktapps-ui-builder/builder/build/buildGroupButton.ts +24 -0
- package/src/impaktapps-ui-builder/builder/build/buildHierarchyChart.ts +35 -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 +2 -2
- package/src/impaktapps-ui-builder/builder/build/buildMultiSelect.ts +9 -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/buildProgressBar.ts +31 -21
- package/src/impaktapps-ui-builder/builder/build/buildRadio.ts +6 -0
- package/src/impaktapps-ui-builder/builder/build/buildSelect.ts +9 -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 +4 -3
- package/src/impaktapps-ui-builder/builder/build/buildText.ts +9 -0
- package/src/impaktapps-ui-builder/builder/build/buildUiSchema.ts +37 -0
- package/src/impaktapps-ui-builder/builder/build/buildUplaodFile.ts +6 -0
- package/src/impaktapps-ui-builder/builder/build/buildWrapperSection.ts +7 -2
- package/src/impaktapps-ui-builder/builder/build/uischema/box.ts +2 -1
- package/src/impaktapps-ui-builder/builder/build/uischema/buildPropertiesSection.ts +237 -22
- package/src/impaktapps-ui-builder/builder/build/uischema/buttonGroup.ts +17 -0
- package/src/impaktapps-ui-builder/builder/build/uischema/card.ts +142 -188
- package/src/impaktapps-ui-builder/builder/build/uischema/coreSection.ts +0 -1
- package/src/impaktapps-ui-builder/builder/build/uischema/graph.ts +22 -6
- package/src/impaktapps-ui-builder/builder/build/uischema/hierarchyChart.ts +13 -0
- package/src/impaktapps-ui-builder/builder/build/uischema/metricCard.ts +1 -1
- 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 +89 -2
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/PageMaster/uiSchema.ts +17 -0
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/event/schema.ts +3 -4
- package/src/impaktapps-ui-builder/builder/services/component.ts +149 -107
- package/src/impaktapps-ui-builder/builder/services/event.ts +3 -0
- package/src/impaktapps-ui-builder/builder/services/pageMaster.ts +4 -1
- package/src/impaktapps-ui-builder/builder/services/utils.ts +15 -3
- package/src/impaktapps-ui-builder/runtime/services/downloadFile.ts +6 -7
- package/src/impaktapps-ui-builder/runtime/services/service.ts +34 -5
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createLayoutFormat,
|
|
1
|
+
import { createLayoutFormat, createKeyValueMap } from "./buildConfig";
|
|
2
2
|
import { AreaBarGraph } from "./uischema/graph";
|
|
3
3
|
import _ from "lodash";
|
|
4
4
|
|
|
@@ -20,28 +20,34 @@ const buildAreaGraph = (config:any,componentScope:string) => {
|
|
|
20
20
|
AreaGraph.config.main.bottomAxisAngle = config.bottomAxisAngle==="YES"?true:false;
|
|
21
21
|
}
|
|
22
22
|
if (config.legendLabels) {
|
|
23
|
-
AreaGraph.config.main.legendLabels =
|
|
23
|
+
AreaGraph.config.main.legendLabels = createKeyValueMap(config.legendLabels);
|
|
24
24
|
}
|
|
25
25
|
if(config.legendDirection){
|
|
26
26
|
AreaGraph.config.main.legendDirection = config.legendDirection === "Row" ? "row" : "column";
|
|
27
27
|
}
|
|
28
|
+
if (config.height) {
|
|
29
|
+
AreaGraph.config.style.containerStyle.height = config.height;
|
|
30
|
+
}
|
|
28
31
|
if (config.pieArcColors) {
|
|
29
|
-
AreaGraph.config.style.
|
|
32
|
+
AreaGraph.config.style.colorMap = createKeyValueMap(config.pieArcColors);
|
|
33
|
+
}
|
|
34
|
+
if(config.xAxisFormatType){
|
|
35
|
+
AreaGraph.config.main.xAxisFormatType = config.xAxisFormatType
|
|
36
|
+
}
|
|
37
|
+
if(config.yAxisTickCount){
|
|
38
|
+
AreaGraph.config.main.yAxisTickCount = config.yAxisTickCount
|
|
39
|
+
}
|
|
40
|
+
if(config.xAxisTickCount){
|
|
41
|
+
AreaGraph.config.main.xAxisTickCount = config.xAxisTickCount
|
|
30
42
|
}
|
|
31
43
|
if (config.xAxisValue) {
|
|
32
44
|
AreaGraph.config.main.xAxisValue = config.xAxisValue;
|
|
33
45
|
}
|
|
34
|
-
if
|
|
35
|
-
AreaGraph.config.
|
|
36
|
-
}
|
|
37
|
-
if (config.leftMargin) {
|
|
38
|
-
AreaGraph.config.style.labelStyle.margin ={
|
|
39
|
-
left: config.leftMargin
|
|
40
|
-
}
|
|
46
|
+
if(config.xAxisType) {
|
|
47
|
+
AreaGraph.config.main.xAxisType = config.xAxisType;
|
|
41
48
|
}
|
|
42
49
|
if (config.bottomLabel) {
|
|
43
|
-
AreaGraph.config.main.bottomLabel =
|
|
44
|
-
config.bottomLabel;
|
|
50
|
+
AreaGraph.config.main.bottomLabel = config.bottomLabel;
|
|
45
51
|
}
|
|
46
52
|
if (config.leftLabel) {
|
|
47
53
|
AreaGraph.config.main.leftLabel = config.leftLabel;
|
|
@@ -49,8 +55,10 @@ const buildAreaGraph = (config:any,componentScope:string) => {
|
|
|
49
55
|
if (config.disableLeftLabel) {
|
|
50
56
|
AreaGraph.config.main.disableLeftLabel = config.disableLeftLabel==="YES"? true: false;
|
|
51
57
|
}
|
|
52
|
-
if(config.
|
|
53
|
-
AreaGraph.config.
|
|
58
|
+
if (config.leftMargin) {
|
|
59
|
+
AreaGraph.config.style.labelStyle.margin ={
|
|
60
|
+
left: config.leftMargin
|
|
61
|
+
}
|
|
54
62
|
}
|
|
55
63
|
return AreaGraph
|
|
56
64
|
}
|
|
@@ -15,19 +15,23 @@ export const buildArray = (config: any, componentScope: string) => {
|
|
|
15
15
|
if (config.allExpanded) {
|
|
16
16
|
array.config.main.allExpanded = config.allExpanded === "YES" ? true : false
|
|
17
17
|
}
|
|
18
|
-
if(config.disableAddButton
|
|
19
|
-
array.config.main.disableAddButton
|
|
18
|
+
if (config.disableAddButton) {
|
|
19
|
+
array.config.main.disableAddButton = config.disableAddButton === "YES" ? true : false
|
|
20
20
|
}
|
|
21
|
-
if(config.disableExpandAllButton
|
|
22
|
-
array.config.main.disableExpandAllButton
|
|
21
|
+
if (config.disableExpandAllButton) {
|
|
22
|
+
array.config.main.disableExpandAllButton = config.disableExpandAllButton === "YES" ? true : false
|
|
23
23
|
}
|
|
24
|
-
if(config.disableRowActions
|
|
25
|
-
array.config.main.disableRowActions
|
|
24
|
+
if (config.disableRowActions) {
|
|
25
|
+
array.config.main.disableRowActions = config.disableRowActions === "YES" ? true : false
|
|
26
26
|
}
|
|
27
27
|
if (config.style) {
|
|
28
28
|
array.config.style = JSON.parse(config.style)
|
|
29
29
|
}
|
|
30
|
+
array.config.main.rowSpacing = Number(config.rowSpacing);
|
|
31
|
+
array.config.main.columnSpacing = Number(config.columnSpacing);
|
|
32
|
+
array.config.main.spacing = Number(config.spacing);
|
|
30
33
|
array.config.main.childElementLabel = config.childElementLabel;
|
|
34
|
+
array.config.main.showKeyAsLabel = config.showKeyAsLabel;
|
|
31
35
|
array.config.main.label = config.label;
|
|
32
36
|
array.scope = componentScope;
|
|
33
37
|
return array;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import _ from "lodash";
|
|
2
|
+
import { createLayoutFormat } from "./buildConfig";
|
|
3
|
+
|
|
4
|
+
const cameraUiSchema = {
|
|
5
|
+
type: "Control",
|
|
6
|
+
scope: "#/properties/camera",
|
|
7
|
+
|
|
8
|
+
options: {
|
|
9
|
+
widget: "Camera",
|
|
10
|
+
},
|
|
11
|
+
config: {
|
|
12
|
+
main: {
|
|
13
|
+
label: "Upload Photo",
|
|
14
|
+
multiUplaod: false,
|
|
15
|
+
onUpload: "onFileUpload",
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
export const buildCamera = (config: any, componentScope: string) => {
|
|
20
|
+
const camera: any = _.cloneDeep(cameraUiSchema);
|
|
21
|
+
camera.scope = componentScope;
|
|
22
|
+
if (config.iconName) {
|
|
23
|
+
camera.config.main.startIcon = config.iconName;
|
|
24
|
+
}
|
|
25
|
+
if (config.layout) {
|
|
26
|
+
camera.config.layout = createLayoutFormat(config.layout, config.type);
|
|
27
|
+
}
|
|
28
|
+
if (config.tooltipMessage) {
|
|
29
|
+
camera.config.main.tooltipMessage = config.tooltipMessage;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
camera.config.main.multiUplaod = config.multiUplaod === "YES" ? true : false;
|
|
33
|
+
|
|
34
|
+
if (config.style) {
|
|
35
|
+
camera.config.style = JSON.parse(config.style);
|
|
36
|
+
}
|
|
37
|
+
if (config.size) {
|
|
38
|
+
camera.config.main.size = config.size;
|
|
39
|
+
}
|
|
40
|
+
if (config.variant) {
|
|
41
|
+
camera.config.main.variant = config.variant;
|
|
42
|
+
}
|
|
43
|
+
if (config.color) {
|
|
44
|
+
camera.config.main.color = config.color
|
|
45
|
+
}
|
|
46
|
+
if (config.label) {
|
|
47
|
+
camera.config.main.label = config.label;
|
|
48
|
+
}
|
|
49
|
+
return camera;
|
|
50
|
+
}
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
import Card from "./uischema/card";
|
|
2
2
|
import _ from "lodash";
|
|
3
3
|
import { createLayoutFormat } from "./buildConfig";
|
|
4
|
-
|
|
4
|
+
|
|
5
5
|
export const buildCard = (config,componentScope,store) =>{
|
|
6
6
|
const card: any = _.cloneDeep(Card(store.theme.myTheme));
|
|
7
7
|
if (config.style) {
|
|
8
8
|
card.config.wrapperStyle = JSON.parse(config.style)
|
|
9
|
-
}
|
|
10
|
-
card.elements[0].
|
|
11
|
-
card.elements[1].scope = `#/properties/${config.name}/properties/
|
|
12
|
-
card.elements[
|
|
9
|
+
}
|
|
10
|
+
card.elements[0].scope = `#/properties/${config.name}/properties/url`;
|
|
11
|
+
card.elements[1].scope = `#/properties/${config.name}/properties/label`;
|
|
12
|
+
card.elements[2].scope = `#/properties/${config.name}/properties/value`;
|
|
13
|
+
|
|
14
|
+
card.elements[3].scope = `#/properties/${config.name}/properties/description`;
|
|
13
15
|
if(config.layout){
|
|
14
16
|
card.config.layout = createLayoutFormat(config.layout)
|
|
15
17
|
}
|
|
@@ -18,16 +20,14 @@ export const buildCard = (config,componentScope,store) =>{
|
|
|
18
20
|
card.elements[0].elements[0].elements[0].elements[1].config.style.left = "24px"
|
|
19
21
|
}
|
|
20
22
|
if(config.label){
|
|
21
|
-
card.elements[
|
|
23
|
+
card.elements[1].config.main.heading = config.label;
|
|
22
24
|
}
|
|
23
25
|
if(config.url){
|
|
24
|
-
card.elements[
|
|
26
|
+
card.elements[0].config.main.url = config.url;
|
|
25
27
|
}
|
|
26
28
|
if(config.description){
|
|
27
|
-
card.elements[
|
|
29
|
+
card.elements[3].config.main.heading = config.description;
|
|
28
30
|
}
|
|
29
31
|
|
|
30
|
-
|
|
31
|
-
|
|
32
32
|
return card;
|
|
33
33
|
}
|
|
@@ -22,27 +22,31 @@ export default (FormData: any) => {
|
|
|
22
22
|
if (formData.events) {
|
|
23
23
|
delete formData.events
|
|
24
24
|
}
|
|
25
|
+
if (formData.tabLabelElements) {
|
|
26
|
+
component.tabLabelElements = formData.tabLabelElements || [];
|
|
27
|
+
delete formData.tabLabelElements
|
|
28
|
+
}
|
|
25
29
|
component = { ...formData, ...component };
|
|
26
30
|
return component;
|
|
27
31
|
};
|
|
28
32
|
|
|
29
33
|
export const createLayoutFormat = (layout: any[], type?: string) => {
|
|
30
34
|
if (_.isEmpty(layout)) {
|
|
31
|
-
const fullLayoutComponents: string[] = ["WrapperSection", "DataGrid", "LeaderBoard", "PopUp", "TextArea", "TreeMap", "Thought", "HorizontalLayout"]
|
|
32
|
-
if(fullLayoutComponents.includes(type)){
|
|
35
|
+
const fullLayoutComponents: string[] = ["WrapperSection", "DataGrid", "LeaderBoard", "PopUp", "TextArea", "TreeMap", "Thought", "HorizontalLayout", "Table"]
|
|
36
|
+
if (fullLayoutComponents.includes(type)) {
|
|
33
37
|
return { xs: 12, sm: 12, md: 12, lg: 12 }
|
|
34
38
|
}
|
|
35
|
-
else if(type === "Graph"){
|
|
36
|
-
return {xs
|
|
39
|
+
else if (type === "Graph") {
|
|
40
|
+
return { xs: 12, sm: 12, md: 12, lg: 6 }
|
|
37
41
|
}
|
|
38
|
-
else if(type === "Button"){
|
|
42
|
+
else if (type === "Button") {
|
|
39
43
|
return { xs: 4, sm: 2.5, md: 2, lg: 1.5 }
|
|
40
44
|
}
|
|
41
|
-
else{
|
|
45
|
+
else {
|
|
42
46
|
return { xs: 6, sm: 6, md: 4, lg: 3 }
|
|
43
47
|
}
|
|
44
48
|
}
|
|
45
|
-
let data: any = {
|
|
49
|
+
let data: any = {};
|
|
46
50
|
|
|
47
51
|
layout.map((e: any) => {
|
|
48
52
|
data[e.key || "xs"] =
|
|
@@ -62,3 +66,11 @@ export const flatObjectValueInArray = (config: any[] = []) => {
|
|
|
62
66
|
})
|
|
63
67
|
return data;
|
|
64
68
|
}
|
|
69
|
+
|
|
70
|
+
export const createKeyValueMap = (config: any[] = []) => {
|
|
71
|
+
return config.reduce((acc, item) => {
|
|
72
|
+
if (!item.key) return acc
|
|
73
|
+
acc[item.key] = item.value
|
|
74
|
+
return acc
|
|
75
|
+
}, {})
|
|
76
|
+
}
|
|
@@ -2,29 +2,45 @@ import DateInputField, { DateTime } from "./uischema/dateInputField";
|
|
|
2
2
|
import _ from "lodash";
|
|
3
3
|
import { createLayoutFormat } from "./buildConfig";
|
|
4
4
|
|
|
5
|
-
export const buildDate = (config:any,componentScope:string)=> {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
5
|
+
export const buildDate = (config: any, componentScope: string) => {
|
|
6
|
+
const dateInputField: any = _.cloneDeep(DateInputField);
|
|
7
|
+
dateInputField.config.main.label = config.label;
|
|
8
|
+
dateInputField.scope = componentScope;
|
|
9
|
+
if (config.layout) {
|
|
10
|
+
dateInputField.config.layout = createLayoutFormat(config.layout)
|
|
11
|
+
}
|
|
12
|
+
if (config.variant) {
|
|
13
|
+
dateInputField.config.main.variant = config.variant;
|
|
14
|
+
}
|
|
15
|
+
if (config.toolTip) {
|
|
16
|
+
dateInputField.config.main.toolTip = config.toolTip;
|
|
17
|
+
}
|
|
18
|
+
if (config.toolTipPosition) {
|
|
19
|
+
dateInputField.config.main.toolTipPosition = config.toolTipPosition;
|
|
20
|
+
}
|
|
21
|
+
if (config.style) {
|
|
22
|
+
dateInputField.config.style = JSON.parse(config.style)
|
|
23
|
+
}
|
|
24
|
+
return dateInputField;
|
|
17
25
|
}
|
|
18
|
-
export const buildDateTime = (config:any,componentScope:string)=>{
|
|
26
|
+
export const buildDateTime = (config: any, componentScope: string) => {
|
|
19
27
|
const dateTimeInputField: any = _.cloneDeep(DateTime);
|
|
20
28
|
dateTimeInputField.config.main.label = config.label;
|
|
21
|
-
dateTimeInputField.config.main.errorMessage = `${config.name} is empty or invalid`;
|
|
22
29
|
dateTimeInputField.scope = componentScope;
|
|
23
|
-
if(config.layout){
|
|
30
|
+
if (config.layout) {
|
|
24
31
|
dateTimeInputField.config.layout = createLayoutFormat(config.layout)
|
|
25
|
-
|
|
32
|
+
}
|
|
26
33
|
if (config.variant) {
|
|
27
34
|
dateTimeInputField.config.main.variant = config.variant;
|
|
28
35
|
}
|
|
36
|
+
if (config.toolTip) {
|
|
37
|
+
dateTimeInputField.config.main.toolTip = config.toolTip;
|
|
38
|
+
}
|
|
39
|
+
if (config.toolTipPosition) {
|
|
40
|
+
dateTimeInputField.config.main.toolTipPosition = config.toolTipPosition;
|
|
41
|
+
}
|
|
42
|
+
if (config.style) {
|
|
43
|
+
dateTimeInputField.config.style = JSON.parse(config.style)
|
|
44
|
+
}
|
|
29
45
|
return dateTimeInputField;
|
|
30
46
|
}
|
|
@@ -21,5 +21,11 @@ export const buildDownloadFile = (config,componentScope) => {
|
|
|
21
21
|
if (config.errorMessage) {
|
|
22
22
|
DownloadFile.config.main.errorMessage = config.errorMessage;
|
|
23
23
|
}
|
|
24
|
+
if (config.toolTip) {
|
|
25
|
+
DownloadFile.config.main.toolTip = config.toolTip;
|
|
26
|
+
}
|
|
27
|
+
if (config.toolTipPosition) {
|
|
28
|
+
DownloadFile.config.main.toolTipPosition = config.toolTipPosition;
|
|
29
|
+
}
|
|
24
30
|
return DownloadFile;
|
|
25
31
|
}
|
|
@@ -4,8 +4,12 @@ import emptyBox from "./uischema/emptyBox";
|
|
|
4
4
|
|
|
5
5
|
export const buildEmptyBox = (config,componentScope) =>{
|
|
6
6
|
const EmptyBox: any = _.cloneDeep(emptyBox);
|
|
7
|
+
EmptyBox.scope = componentScope;
|
|
7
8
|
if (config.layout) {
|
|
8
9
|
EmptyBox.config.layout = createLayoutFormat(config.layout);
|
|
9
10
|
}
|
|
11
|
+
if (config.style) {
|
|
12
|
+
EmptyBox.config.style = JSON.parse(config.style)
|
|
13
|
+
}
|
|
10
14
|
return EmptyBox;
|
|
11
15
|
}
|
|
@@ -2,49 +2,48 @@ import _ from "lodash";
|
|
|
2
2
|
import { createLayoutFormat } from "./buildConfig";
|
|
3
3
|
|
|
4
4
|
const FileInput = {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
type: "Control",
|
|
6
|
+
scope: "#/properties/docAggrementCopy",
|
|
7
|
+
options: {
|
|
8
|
+
widget: "FileInputField",
|
|
9
|
+
},
|
|
10
|
+
config: {
|
|
11
|
+
layout: { xs: 12, sm: 6, md: 4, lg: 3 },
|
|
12
|
+
main: {
|
|
13
|
+
required: false,
|
|
14
|
+
onUpload: "onFileUpload",
|
|
15
|
+
onDownload: "onFileDownload",
|
|
16
|
+
label: "Aggrement Copy",
|
|
17
|
+
"onClick": "onClick"
|
|
18
|
+
// iconStyleDefault:true,
|
|
9
19
|
},
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
main: {
|
|
13
|
-
required: false,
|
|
14
|
-
onUpload: "onFileUpload",
|
|
15
|
-
onDownload:"onFileDownload",
|
|
16
|
-
label:"Aggrement Copy"
|
|
17
|
-
// iconStyleDefault:true,
|
|
18
|
-
},
|
|
19
|
-
style: {
|
|
20
|
-
backgroundColor: "none",
|
|
21
|
-
},
|
|
20
|
+
style: {
|
|
21
|
+
backgroundColor: "none",
|
|
22
22
|
},
|
|
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
|
-
|
|
48
|
-
|
|
49
|
-
return box;
|
|
23
|
+
},
|
|
24
|
+
};
|
|
25
|
+
export const buildFileInput = (config, componentScope) => {
|
|
26
|
+
const box: any = _.cloneDeep(FileInput);
|
|
27
|
+
box.scope = componentScope;
|
|
28
|
+
box.config.main.label = config.label
|
|
29
|
+
if (config.layout) {
|
|
30
|
+
box.config.layout = createLayoutFormat(config.layout)
|
|
31
|
+
}
|
|
32
|
+
if (config.style) {
|
|
33
|
+
box.config.style = JSON.parse(config.style)
|
|
34
|
+
}
|
|
35
|
+
box.config.main.variant = config.variant
|
|
36
|
+
box.config.main.disableUpload = config.disableUpload === "YES" ? true : false;
|
|
37
|
+
box.config.main.disableDownload = config.disableDownload === "YES" ? true : false;
|
|
38
|
+
box.config.main.disableDelete = config.disableDelete === "YES" ? true : false;
|
|
39
|
+
box.config.main.useLabel = config.useLabel === "YES" ? true : false;
|
|
40
|
+
box.config.main.description = config.description;
|
|
41
|
+
box.config.main.toolTip = config.toolTip;
|
|
42
|
+
box.config.main.chooseButtonLabel = config.chooseButtonLabel;
|
|
43
|
+
box.config.main.noFileAvailableMessage = config.noFileAvailableMessage;
|
|
44
|
+
if (config.toolTipPosition) {
|
|
45
|
+
box.config.main.toolTipPosition = config.toolTipPosition;
|
|
46
|
+
}
|
|
47
|
+
box.config.main.externalUpload = config.externalUpload === "YES" ? true : false;
|
|
48
|
+
return box;
|
|
50
49
|
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import ButtonGroup from "./uischema/buttonGroup";
|
|
2
|
+
import _ from "lodash";
|
|
3
|
+
import { createLayoutFormat } from "./buildConfig";
|
|
4
|
+
|
|
5
|
+
export const buildButtonGroup = (config:any,componentScope:string) =>{
|
|
6
|
+
const buttonGroup:any = _.cloneDeep(ButtonGroup);
|
|
7
|
+
if(config.layout){
|
|
8
|
+
buttonGroup.config.layout = createLayoutFormat(config.layout, config.type)
|
|
9
|
+
}
|
|
10
|
+
buttonGroup.scope = componentScope;
|
|
11
|
+
if(config.multiSelect){
|
|
12
|
+
buttonGroup.config.main.multiSelect = config.multiSelect === "YES" ? true : false
|
|
13
|
+
}
|
|
14
|
+
if (config.style) {
|
|
15
|
+
buttonGroup.config.style = JSON.parse(config.style)
|
|
16
|
+
}
|
|
17
|
+
if (config.size) {
|
|
18
|
+
buttonGroup.config.main.size = config.size
|
|
19
|
+
}
|
|
20
|
+
if (config.color) {
|
|
21
|
+
buttonGroup.config.main.color = config.color
|
|
22
|
+
}
|
|
23
|
+
return buttonGroup;
|
|
24
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { HierarchyChart } from "./uischema/hierarchyChart";
|
|
2
|
+
import _ from "lodash";
|
|
3
|
+
import { createLayoutFormat } from "./buildConfig";
|
|
4
|
+
|
|
5
|
+
export const buildHierarchyChart = (config, componentScope, store) => {
|
|
6
|
+
const hierarchyChart: any = _.cloneDeep(HierarchyChart);
|
|
7
|
+
|
|
8
|
+
hierarchyChart.scope = componentScope;
|
|
9
|
+
if (config.style) {
|
|
10
|
+
hierarchyChart.config.style = JSON.parse(config.style)
|
|
11
|
+
}
|
|
12
|
+
if (config.layout) {
|
|
13
|
+
hierarchyChart.config.layout = createLayoutFormat(config.layout)
|
|
14
|
+
}
|
|
15
|
+
if (config.linkType) {
|
|
16
|
+
hierarchyChart.config.main.linkType = config.linkType;
|
|
17
|
+
}
|
|
18
|
+
if (config.stepPercent) {
|
|
19
|
+
hierarchyChart.config.main.stepPercent = config.stepPercent;
|
|
20
|
+
}
|
|
21
|
+
if (config.nodeWidth) {
|
|
22
|
+
hierarchyChart.config.main.nodeWidth = config.nodeWidth;
|
|
23
|
+
}
|
|
24
|
+
if (config.nodeHeight) {
|
|
25
|
+
hierarchyChart.config.main.nodeHeight = config.nodeHeight;
|
|
26
|
+
}
|
|
27
|
+
if (config.chartHeight) {
|
|
28
|
+
hierarchyChart.config.main.chartHeight = config.chartHeight;
|
|
29
|
+
}
|
|
30
|
+
if (config.lazyLoading) {
|
|
31
|
+
hierarchyChart.config.main.lazyLoading = config.lazyLoading === "YES" ? true : false;
|
|
32
|
+
}
|
|
33
|
+
return hierarchyChart;
|
|
34
|
+
}
|
|
35
|
+
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createLayoutFormat,
|
|
1
|
+
import { createLayoutFormat, createKeyValueMap } from "./buildConfig";
|
|
2
2
|
import { HorizontalBarGraph } from "./uischema/graph";
|
|
3
3
|
import _ from "lodash";
|
|
4
4
|
|
|
@@ -19,13 +19,13 @@ const buildHorizontalBarGraph = (config:any,componentScope:string) => {
|
|
|
19
19
|
horizontalBarGraph.config.main.bottomAxisAngle = config.bottomAxisAngle==="YES"?true:false;
|
|
20
20
|
}
|
|
21
21
|
if (config.legendLabels) {
|
|
22
|
-
horizontalBarGraph.config.main.legendLabels =
|
|
22
|
+
horizontalBarGraph.config.main.legendLabels = createKeyValueMap(config.legendLabels);
|
|
23
23
|
}
|
|
24
24
|
if(config.legendDirection){
|
|
25
25
|
horizontalBarGraph.config.main.legendDirection = config.legendDirection === "Row" ? "row" : "column";
|
|
26
26
|
}
|
|
27
27
|
if (config.pieArcColors) {
|
|
28
|
-
horizontalBarGraph.config.style.
|
|
28
|
+
horizontalBarGraph.config.style.colorMap = createKeyValueMap(config.pieArcColors);
|
|
29
29
|
}
|
|
30
30
|
if (config.xAxisValue) {
|
|
31
31
|
horizontalBarGraph.config.main.xAxisValue = config.xAxisValue;
|
|
@@ -9,9 +9,10 @@ const imageUiSchema = {
|
|
|
9
9
|
widget: "Image",
|
|
10
10
|
},
|
|
11
11
|
config: {
|
|
12
|
-
|
|
12
|
+
layout: 3,
|
|
13
13
|
main: {
|
|
14
14
|
url: "",
|
|
15
|
+
onClick: "onClick",
|
|
15
16
|
},
|
|
16
17
|
style: {
|
|
17
18
|
},
|
|
@@ -27,9 +28,11 @@ export const buildImage = (config, componentScope) => {
|
|
|
27
28
|
}
|
|
28
29
|
if (config.style) {
|
|
29
30
|
image.config.style = JSON.parse(config.style);
|
|
30
|
-
}
|
|
31
|
+
}
|
|
31
32
|
if (config.height) {
|
|
32
|
-
image.config.style.imageStyle = {...image.config.style.imageStyle, height: config.height}
|
|
33
|
+
image.config.style.imageStyle = { ...image.config.style.imageStyle, height: config.height }
|
|
33
34
|
}
|
|
35
|
+
image.config.main.toolTip = config.toolTip;
|
|
36
|
+
image.config.main.toolTipPosition = config.toolTipPosition;
|
|
34
37
|
return image;
|
|
35
38
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createLayoutFormat,
|
|
1
|
+
import { createLayoutFormat, createKeyValueMap } from "./buildConfig";
|
|
2
2
|
import { LineGraph } from "./uischema/graph";
|
|
3
3
|
import _ from "lodash";
|
|
4
4
|
|
|
@@ -41,11 +41,11 @@ export const buildLineGraph = (config, componentScope) => {
|
|
|
41
41
|
lineGraph.config.main.bottomAxisAngle = config.bottomAxisAngle==="YES"?true:false;
|
|
42
42
|
}
|
|
43
43
|
if (config.legendLabels) {
|
|
44
|
-
lineGraph.config.main.legendLabels =
|
|
44
|
+
lineGraph.config.main.legendLabels = createKeyValueMap(config.legendLabels);
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
if (config.pieArcColors) {
|
|
48
|
-
lineGraph.config.style.
|
|
48
|
+
lineGraph.config.style.colorMap = createKeyValueMap(config.pieArcColors);
|
|
49
49
|
}
|
|
50
50
|
lineGraph.scope = componentScope;
|
|
51
51
|
return lineGraph;
|
|
@@ -22,8 +22,8 @@ export const buildMetricCard = (config,componentScope,store) =>{
|
|
|
22
22
|
if(config.description){
|
|
23
23
|
card.config.main.description = config.description;
|
|
24
24
|
}
|
|
25
|
-
if(config.
|
|
26
|
-
card.config.main.cardValue = config.
|
|
25
|
+
if(config.cardValue){
|
|
26
|
+
card.config.main.cardValue = config.cardValue;
|
|
27
27
|
}
|
|
28
28
|
if (config.growthRate) {
|
|
29
29
|
card.config.main.growthRate = config.growthRate;
|
|
@@ -21,6 +21,15 @@ export const buildMultiSelect = (config, componentScope) => {
|
|
|
21
21
|
if (config.lazyLoading) {
|
|
22
22
|
multipleSelect.config.main.lazyLoading = config.lazyLoading === "YES" ? true : false;
|
|
23
23
|
}
|
|
24
|
+
if (config.toolTip) {
|
|
25
|
+
multipleSelect.config.main.toolTip = config.toolTip;
|
|
26
|
+
}
|
|
27
|
+
if (config.toolTipPosition) {
|
|
28
|
+
multipleSelect.config.main.toolTipPosition = config.toolTipPosition;
|
|
29
|
+
}
|
|
30
|
+
if (config.style) {
|
|
31
|
+
multipleSelect.config.style = JSON.parse(config.style);
|
|
32
|
+
}
|
|
24
33
|
|
|
25
34
|
|
|
26
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
|
+
}
|