impaktapps-ui-builder 1.0.4 → 1.0.6

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.
Files changed (122) hide show
  1. package/dist/impaktapps-ui-builder.es.js +2268 -1162
  2. package/dist/impaktapps-ui-builder.es.js.map +1 -1
  3. package/dist/impaktapps-ui-builder.umd.js +15 -15
  4. package/dist/impaktapps-ui-builder.umd.js.map +1 -1
  5. package/dist/src/impaktapps-ui-builder/builder/build/buildAreaGraph.d.ts +2 -0
  6. package/dist/src/impaktapps-ui-builder/builder/build/buildArray.d.ts +1 -11
  7. package/dist/src/impaktapps-ui-builder/builder/build/buildCamera.d.ts +1 -0
  8. package/dist/src/impaktapps-ui-builder/builder/build/buildConfig.d.ts +2 -1
  9. package/dist/src/impaktapps-ui-builder/builder/build/buildGroupButton.d.ts +1 -0
  10. package/dist/src/impaktapps-ui-builder/builder/build/buildHorizontalLayout.d.ts +1 -0
  11. package/dist/src/impaktapps-ui-builder/builder/build/buildImage.d.ts +1 -0
  12. package/dist/src/impaktapps-ui-builder/builder/build/buildMetricCard.d.ts +1 -0
  13. package/dist/src/impaktapps-ui-builder/builder/build/buildOTP_inputs.d.ts +1 -0
  14. package/dist/src/impaktapps-ui-builder/builder/build/buildPdfViewer.d.ts +1 -0
  15. package/dist/src/impaktapps-ui-builder/builder/build/buildPopover.d.ts +1 -0
  16. package/dist/src/impaktapps-ui-builder/builder/build/buildStackBarLineGraph.d.ts +2 -0
  17. package/dist/src/impaktapps-ui-builder/builder/build/buildUiSchema.d.ts +2 -1
  18. package/dist/src/impaktapps-ui-builder/builder/build/uischema/apiSection.d.ts +1 -3
  19. package/dist/src/impaktapps-ui-builder/builder/build/uischema/box.d.ts +10 -2
  20. package/dist/src/impaktapps-ui-builder/builder/build/uischema/buildPropertiesSection.d.ts +1 -1
  21. package/dist/src/impaktapps-ui-builder/builder/build/uischema/button.d.ts +6 -1
  22. package/dist/src/impaktapps-ui-builder/builder/build/uischema/buttonGroup.d.ts +22 -0
  23. package/dist/src/impaktapps-ui-builder/builder/build/uischema/card.d.ts +173 -171
  24. package/dist/src/impaktapps-ui-builder/builder/build/uischema/coreSection.d.ts +82 -72
  25. package/dist/src/impaktapps-ui-builder/builder/build/uischema/eventSection.d.ts +18 -50
  26. package/dist/src/impaktapps-ui-builder/builder/build/uischema/graph.d.ts +50 -4
  27. package/dist/src/impaktapps-ui-builder/builder/build/uischema/horizontalLayout.d.ts +13 -0
  28. package/dist/src/impaktapps-ui-builder/builder/build/uischema/metricCard.d.ts +17 -0
  29. package/dist/src/impaktapps-ui-builder/builder/build/uischema/multiSelect.d.ts +1 -0
  30. package/dist/src/impaktapps-ui-builder/builder/build/uischema/pdfViewer.d.ts +19 -0
  31. package/dist/src/impaktapps-ui-builder/builder/build/uischema/refresh.d.ts +0 -3
  32. package/dist/src/impaktapps-ui-builder/builder/build/uischema/selectInputField.d.ts +1 -0
  33. package/dist/src/impaktapps-ui-builder/builder/build/uischema/table.d.ts +1 -0
  34. package/dist/src/impaktapps-ui-builder/builder/build/uischema/tableSection.d.ts +15 -66
  35. package/dist/src/impaktapps-ui-builder/builder/build/uischema/validationSections.d.ts +48 -38
  36. package/dist/src/impaktapps-ui-builder/builder/build/uischema/valueTab.d.ts +0 -3
  37. package/dist/src/impaktapps-ui-builder/builder/build/uischema/wrapperSection.d.ts +4 -1
  38. package/dist/src/impaktapps-ui-builder/builder/services/utils.d.ts +2 -1
  39. package/dist/src/impaktapps-ui-builder/lib/index.d.ts +1 -0
  40. package/dist/src/impaktapps-ui-builder/runtime/services/downloadFile.d.ts +5 -2
  41. package/dist/src/impaktapps-ui-builder/runtime/services/service.d.ts +10 -4
  42. package/package.json +1 -1
  43. package/src/impaktapps-ui-builder/builder/build/buildAadharCard.ts +2 -2
  44. package/src/impaktapps-ui-builder/builder/build/buildAreaGraph.ts +66 -0
  45. package/src/impaktapps-ui-builder/builder/build/buildArray.ts +35 -15
  46. package/src/impaktapps-ui-builder/builder/build/buildButton.ts +1 -1
  47. package/src/impaktapps-ui-builder/builder/build/buildCamera.ts +50 -0
  48. package/src/impaktapps-ui-builder/builder/build/buildCard.ts +10 -10
  49. package/src/impaktapps-ui-builder/builder/build/buildCheckbox.ts +1 -1
  50. package/src/impaktapps-ui-builder/builder/build/buildConfig.ts +34 -16
  51. package/src/impaktapps-ui-builder/builder/build/buildDataGrid.ts +2 -2
  52. package/src/impaktapps-ui-builder/builder/build/buildDate.ts +35 -13
  53. package/src/impaktapps-ui-builder/builder/build/buildDownloadFile.ts +7 -0
  54. package/src/impaktapps-ui-builder/builder/build/buildEmptyBox.ts +1 -0
  55. package/src/impaktapps-ui-builder/builder/build/buildFileInput.ts +42 -28
  56. package/src/impaktapps-ui-builder/builder/build/buildGroupButton.ts +24 -0
  57. package/src/impaktapps-ui-builder/builder/build/buildHorizontalBarGraph.ts +10 -4
  58. package/src/impaktapps-ui-builder/builder/build/buildHorizontalLayout.ts +15 -0
  59. package/src/impaktapps-ui-builder/builder/build/buildImage.ts +38 -0
  60. package/src/impaktapps-ui-builder/builder/build/buildLabel.ts +3 -0
  61. package/src/impaktapps-ui-builder/builder/build/buildLeaderboard.ts +4 -1
  62. package/src/impaktapps-ui-builder/builder/build/buildLineGraph.ts +10 -4
  63. package/src/impaktapps-ui-builder/builder/build/buildMetricCard.tsx +37 -0
  64. package/src/impaktapps-ui-builder/builder/build/buildMultiSelect.ts +12 -0
  65. package/src/impaktapps-ui-builder/builder/build/buildOTP_inputs.ts +44 -0
  66. package/src/impaktapps-ui-builder/builder/build/buildPdfViewer.ts +16 -0
  67. package/src/impaktapps-ui-builder/builder/build/buildPieGraph.ts +7 -4
  68. package/src/impaktapps-ui-builder/builder/build/buildPop.ts +3 -2
  69. package/src/impaktapps-ui-builder/builder/build/buildPopover.ts +40 -0
  70. package/src/impaktapps-ui-builder/builder/build/buildProgressBar.ts +31 -21
  71. package/src/impaktapps-ui-builder/builder/build/buildRadio.ts +11 -3
  72. package/src/impaktapps-ui-builder/builder/build/buildSelect.ts +12 -0
  73. package/src/impaktapps-ui-builder/builder/build/buildStackBarGraph.ts +10 -4
  74. package/src/impaktapps-ui-builder/builder/build/buildStackBarLineGraph.ts +72 -0
  75. package/src/impaktapps-ui-builder/builder/build/buildTabSection.ts +5 -0
  76. package/src/impaktapps-ui-builder/builder/build/buildTable.ts +21 -11
  77. package/src/impaktapps-ui-builder/builder/build/buildText.ts +12 -0
  78. package/src/impaktapps-ui-builder/builder/build/buildTextArea.ts +2 -2
  79. package/src/impaktapps-ui-builder/builder/build/buildThoughtOfTheDay.ts +1 -1
  80. package/src/impaktapps-ui-builder/builder/build/buildTreeMap.ts +2 -1
  81. package/src/impaktapps-ui-builder/builder/build/buildUiSchema.ts +140 -130
  82. package/src/impaktapps-ui-builder/builder/build/buildUplaodFile.ts +6 -0
  83. package/src/impaktapps-ui-builder/builder/build/buildWrapperSection.ts +8 -3
  84. package/src/impaktapps-ui-builder/builder/build/uischema/apiSection.ts +0 -6
  85. package/src/impaktapps-ui-builder/builder/build/uischema/array.ts +1 -1
  86. package/src/impaktapps-ui-builder/builder/build/uischema/box.ts +5 -2
  87. package/src/impaktapps-ui-builder/builder/build/uischema/buildPropertiesSection.ts +396 -142
  88. package/src/impaktapps-ui-builder/builder/build/uischema/button.ts +1 -1
  89. package/src/impaktapps-ui-builder/builder/build/uischema/buttonGroup.ts +17 -0
  90. package/src/impaktapps-ui-builder/builder/build/uischema/card.ts +142 -169
  91. package/src/impaktapps-ui-builder/builder/build/uischema/coreSection.ts +127 -133
  92. package/src/impaktapps-ui-builder/builder/build/uischema/dateInputField.ts +2 -2
  93. package/src/impaktapps-ui-builder/builder/build/uischema/emptyBox.ts +1 -1
  94. package/src/impaktapps-ui-builder/builder/build/uischema/eventSection.ts +30 -54
  95. package/src/impaktapps-ui-builder/builder/build/uischema/file.ts +3 -3
  96. package/src/impaktapps-ui-builder/builder/build/uischema/graph.ts +37 -4
  97. package/src/impaktapps-ui-builder/builder/build/uischema/horizontalLayout.ts +11 -0
  98. package/src/impaktapps-ui-builder/builder/build/uischema/metricCard.ts +13 -0
  99. package/src/impaktapps-ui-builder/builder/build/uischema/multiSelect.ts +4 -2
  100. package/src/impaktapps-ui-builder/builder/build/uischema/pdfViewer.ts +18 -0
  101. package/src/impaktapps-ui-builder/builder/build/uischema/refresh.ts +0 -3
  102. package/src/impaktapps-ui-builder/builder/build/uischema/selectInputField.ts +3 -1
  103. package/src/impaktapps-ui-builder/builder/build/uischema/table.ts +1 -0
  104. package/src/impaktapps-ui-builder/builder/build/uischema/tableSection.ts +34 -60
  105. package/src/impaktapps-ui-builder/builder/build/uischema/textInputField.ts +1 -1
  106. package/src/impaktapps-ui-builder/builder/build/uischema/validationSections.ts +58 -113
  107. package/src/impaktapps-ui-builder/builder/build/uischema/valueTab.ts +0 -3
  108. package/src/impaktapps-ui-builder/builder/build/uischema/wrapperSection.ts +4 -1
  109. package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/schema.ts +228 -59
  110. package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/uiSchema.ts +121 -119
  111. package/src/impaktapps-ui-builder/builder/elements/UiSchema/PageMaster/schema.ts +1 -1
  112. package/src/impaktapps-ui-builder/builder/elements/UiSchema/PageMaster/uiSchema.ts +94 -106
  113. package/src/impaktapps-ui-builder/builder/elements/UiSchema/event/schema.ts +11 -5
  114. package/src/impaktapps-ui-builder/builder/elements/UiSchema/event/uiSchema.ts +31 -55
  115. package/src/impaktapps-ui-builder/builder/services/component.ts +173 -86
  116. package/src/impaktapps-ui-builder/builder/services/event.ts +3 -0
  117. package/src/impaktapps-ui-builder/builder/services/pageMaster.ts +18 -15
  118. package/src/impaktapps-ui-builder/builder/services/utils.ts +15 -3
  119. package/src/impaktapps-ui-builder/lib/index.ts +10 -9
  120. package/src/impaktapps-ui-builder/runtime/services/downloadFile.ts +33 -18
  121. package/src/impaktapps-ui-builder/runtime/services/events.ts +9 -11
  122. package/src/impaktapps-ui-builder/runtime/services/service.ts +121 -162
@@ -1,4 +1,4 @@
1
- import { createLayoutFormat, flatObjectValueInArray } from "./buildConfig";
1
+ import { createLayoutFormat, createKeyValueMap } from "./buildConfig";
2
2
  import { HorizontalBarGraph } from "./uischema/graph";
3
3
  import _ from "lodash";
4
4
 
@@ -7,7 +7,7 @@ const buildHorizontalBarGraph = (config:any,componentScope:string) => {
7
7
  const horizontalBarGraph: any = _.cloneDeep(HorizontalBarGraph);
8
8
  horizontalBarGraph.scope = componentScope;
9
9
  if (config.layout) {
10
- horizontalBarGraph.config.layout = createLayoutFormat(config.layout);
10
+ horizontalBarGraph.config.layout = createLayoutFormat(config.layout, config.type);
11
11
  }
12
12
  horizontalBarGraph.config.main.type = config.graphType;
13
13
  horizontalBarGraph.scope = componentScope;
@@ -19,10 +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 = flatObjectValueInArray(config.legendLabels);
22
+ horizontalBarGraph.config.main.legendLabels = createKeyValueMap(config.legendLabels);
23
+ }
24
+ if(config.legendDirection){
25
+ horizontalBarGraph.config.main.legendDirection = config.legendDirection === "Row" ? "row" : "column";
23
26
  }
24
27
  if (config.pieArcColors) {
25
- horizontalBarGraph.config.style.barStyle.colorRange = flatObjectValueInArray(config.pieArcColors);
28
+ horizontalBarGraph.config.style.colorMap = createKeyValueMap(config.pieArcColors);
26
29
  }
27
30
  if (config.xAxisValue) {
28
31
  horizontalBarGraph.config.main.xAxisValue = config.xAxisValue;
@@ -42,6 +45,9 @@ const buildHorizontalBarGraph = (config:any,componentScope:string) => {
42
45
  if (config.leftLabel) {
43
46
  horizontalBarGraph.config.main.leftLabel = config.leftLabel;
44
47
  }
48
+ if (config.disableLeftLabel) {
49
+ horizontalBarGraph.config.main.disableLeftLabel = config.disableLeftLabel==="YES"? true: false;
50
+ }
45
51
  return horizontalBarGraph
46
52
  }
47
53
 
@@ -0,0 +1,15 @@
1
+ import { createLayoutFormat } from "./buildConfig";
2
+ import horizontalLayout from "./uischema/horizontalLayout";
3
+ import _ from "lodash";
4
+
5
+ export const buildHorizontalLayout = (config, componentScope) => {
6
+ const horizontal: any = _.cloneDeep(horizontalLayout);
7
+ horizontal.scope = componentScope;
8
+ if (config.style) {
9
+ horizontal.config.style = JSON.parse(config.style)
10
+ }
11
+ if (config.layout) {
12
+ horizontal.config.layout = createLayoutFormat(config.layout, config.type)
13
+ }
14
+ return horizontal;
15
+ }
@@ -0,0 +1,38 @@
1
+ import _ from "lodash";
2
+ import { createLayoutFormat } from "./buildConfig";
3
+
4
+ const imageUiSchema = {
5
+ type: "Control",
6
+ scope: "#/properties/Logo",
7
+
8
+ options: {
9
+ widget: "Image",
10
+ },
11
+ config: {
12
+ layout: 3,
13
+ main: {
14
+ url: "",
15
+ onClick: "onClick",
16
+ },
17
+ style: {
18
+ },
19
+ },
20
+ };
21
+
22
+ export const buildImage = (config, componentScope) => {
23
+ const image: any = _.cloneDeep(imageUiSchema);
24
+ image.scope = componentScope;
25
+ image.config.main.url = config.imageUrl;
26
+ if (config.layout) {
27
+ image.config.layout = createLayoutFormat(config.layout);
28
+ }
29
+ if (config.style) {
30
+ image.config.style = JSON.parse(config.style);
31
+ }
32
+ if (config.height) {
33
+ image.config.style.imageStyle = { ...image.config.style.imageStyle, height: config.height }
34
+ }
35
+ image.config.main.toolTip = config.toolTip;
36
+ image.config.main.toolTipPosition = config.toolTipPosition;
37
+ return image;
38
+ };
@@ -9,6 +9,9 @@ export const buildLabel = (config,componentScope) => {
9
9
  if(config.layout){
10
10
  box.config.layout = createLayoutFormat(config.layout)
11
11
  }
12
+ if(config.iconName){
13
+ box.config.main.iconName = config.iconName
14
+ }
12
15
  if (config.style) {
13
16
  box.config.style = JSON.parse(config.style)
14
17
  }
@@ -37,8 +37,11 @@ export const buildLeaderBoard = (config) => {
37
37
  if (config.scoreKey) {
38
38
  LeaderBoard.config.main.scoreKey = config.scoreKey;
39
39
  }
40
+ if(config.isScoreAmount){
41
+ LeaderBoard.config.main.isScoreAmount = config.isScoreAmount === "YES" ? true : false;
42
+ }
40
43
  if (config.layout) {
41
- LeaderBoard.config.layout = createLayoutFormat(config.layout);
44
+ LeaderBoard.config.layout = createLayoutFormat(config.layout, config.type);
42
45
  }
43
46
  if (config.style) {
44
47
  LeaderBoard.config.style = JSON.parse(config.style)
@@ -1,11 +1,11 @@
1
- import { createLayoutFormat, flatObjectValueInArray } from "./buildConfig";
1
+ import { createLayoutFormat, createKeyValueMap } from "./buildConfig";
2
2
  import { LineGraph } from "./uischema/graph";
3
3
  import _ from "lodash";
4
4
 
5
5
  export const buildLineGraph = (config, componentScope) => {
6
6
  const lineGraph: any = _.cloneDeep(LineGraph);
7
7
  if (config.layout) {
8
- lineGraph.config.layout = createLayoutFormat(config.layout);
8
+ lineGraph.config.layout = createLayoutFormat(config.layout, config.type);
9
9
  }
10
10
  lineGraph.config.main.header = config.heading;
11
11
  if (config.height) {
@@ -28,18 +28,24 @@ export const buildLineGraph = (config, componentScope) => {
28
28
  if (config.leftLabel) {
29
29
  lineGraph.config.main.leftLabel = config.leftLabel;
30
30
  }
31
+ if (config.disableLeftLabel) {
32
+ lineGraph.config.main.disableLeftLabel = config.disableLeftLabel==="YES"? true: false;
33
+ }
31
34
  if (config.legendHide) {
32
35
  lineGraph.config.main.legendAvailable = config.legendHide==="YES"?false:true;
33
36
  }
37
+ if(config.legendDirection){
38
+ lineGraph.config.main.legendDirection = config.legendDirection === "Row" ? "row" : "column";
39
+ }
34
40
  if (config.bottomAxisAngle) {
35
41
  lineGraph.config.main.bottomAxisAngle = config.bottomAxisAngle==="YES"?true:false;
36
42
  }
37
43
  if (config.legendLabels) {
38
- lineGraph.config.main.legendLabels = flatObjectValueInArray(config.legendLabels);
44
+ lineGraph.config.main.legendLabels = createKeyValueMap(config.legendLabels);
39
45
  }
40
46
 
41
47
  if (config.pieArcColors) {
42
- lineGraph.config.style.lineStyle.colorRange = flatObjectValueInArray(config.pieArcColors);
48
+ lineGraph.config.style.colorMap = createKeyValueMap(config.pieArcColors);
43
49
  }
44
50
  lineGraph.scope = componentScope;
45
51
  return lineGraph;
@@ -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
+
@@ -15,9 +15,21 @@ export const buildMultiSelect = (config, componentScope) => {
15
15
  if (config.value) {
16
16
  multipleSelect.config.main.options = config.value;
17
17
  }
18
+ if (config.variant) {
19
+ multipleSelect.config.main.variant = config.variant;
20
+ }
18
21
  if (config.lazyLoading) {
19
22
  multipleSelect.config.main.lazyLoading = config.lazyLoading === "YES" ? true : false;
20
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
+ }
21
33
 
22
34
 
23
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,10 +1,10 @@
1
- import { createLayoutFormat, flatObjectValueInArray } from "./buildConfig";
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) => {
5
5
  const pieGraph: any = _.cloneDeep(PieGraph);
6
6
  if (config.layout) {
7
- pieGraph.config.layout = createLayoutFormat(config.layout);
7
+ pieGraph.config.layout = createLayoutFormat(config.layout, config.type);
8
8
  }
9
9
  if (config.height) {
10
10
  pieGraph.config.style.containerStyle.height = config.height;
@@ -12,17 +12,20 @@ export const buildPieGraph = (config, componentScope) => {
12
12
  if (config.legendHide) {
13
13
  pieGraph.config.main.legendAvailable = config.legendHide === "YES" ? false : true;
14
14
  }
15
+ if(config.legendDirection){
16
+ pieGraph.config.main.legendDirection = config.legendDirection === "Row" ? "row" : "column";
17
+ }
15
18
  pieGraph.scope = componentScope;
16
19
  pieGraph.config.main.header = config.heading;
17
20
 
18
21
  if (config.legendLabels) {
19
- pieGraph.config.main.legendLabels = flatObjectValueInArray(config.legendLabels);
22
+ pieGraph.config.main.legendLabels = createKeyValueMap(config.legendLabels);
20
23
  }
21
24
  if (config.xAxisValue) {
22
25
  pieGraph.config.main.xAxisValue = config.xAxisValue;
23
26
  }
24
27
  if (config.pieArcColors) {
25
- pieGraph.config.style.pieStyle.colorRange = flatObjectValueInArray(config.pieArcColors);
28
+ pieGraph.config.style.colorMap = createKeyValueMap(config.pieArcColors);
26
29
  }
27
30
  return pieGraph;
28
31
  }
@@ -17,6 +17,7 @@ const PopUP = {
17
17
  },
18
18
  main: {
19
19
  label: "PopUp",
20
+ onClose:"onClose",
20
21
  fullScreen:false,
21
22
  fullWidth:false,
22
23
  maxWidth:false,
@@ -34,10 +35,10 @@ export const buildPopUp = (config,componentScope) =>{
34
35
  popup.config.main.fullWidth = config.fullWidth === "YES" ? true : false;
35
36
  popup.config.main.maxWidth = config.maxWidth||false;
36
37
  if (config.layout) {
37
- popup.config.layout = createLayoutFormat(config.layout)
38
+ popup.config.layout = createLayoutFormat(config.layout, config.type)
38
39
  }
39
40
  if (config.style) {
40
- PopUP.config.style = JSON.parse(config.style)
41
+ popup.config.style = JSON.parse(config.style)
41
42
  }
42
43
  return popup;
43
44
  }
@@ -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
+ }
@@ -1,26 +1,36 @@
1
1
  import progressBar from "./uischema/progressBar";
2
2
  import _ from "lodash";
3
- import { createLayoutFormat } from "./buildConfig";
3
+ import { createLayoutFormat, flatObjectValueInArray } from "./buildConfig";
4
4
 
5
- export const buildProgressBar = (config:any,componentScope:any) =>{
6
- const ProgressBar: any = _.cloneDeep(progressBar);
7
- ProgressBar.scope = componentScope;
8
- if (config.layout) {
9
- ProgressBar.config.layout = config.layout;
10
- }
11
- ProgressBar.config.main.heading = config.label;
12
- if (config.bottomLabel_3) {
13
- ProgressBar.config.main.bottomLabel_3 = config.bottomLabel_3;
14
- }
15
- if(config.layout){
16
- ProgressBar.config.layout = createLayoutFormat(config.layout)
17
- }
18
- if (config.bottomLabel_2) {
19
- ProgressBar.config.main.bottomLabel_2 = config.bottomLabel_2;
20
- }
21
- if (config.bottomLabel_1) {
22
- ProgressBar.config.main.bottomLabel_1 = config.bottomLabel_1;
23
- }
24
- return ProgressBar;
5
+ export const buildProgressBar = (config: any, componentScope: any) => {
6
+ const ProgressBar: any = _.cloneDeep(progressBar);
7
+ ProgressBar.scope = componentScope;
8
+ if (config.layout) {
9
+ ProgressBar.config.layout = config.layout;
10
+ }
11
+
12
+ ProgressBar.config.main.heading = config.label;
13
+ if(config.variant){
14
+ ProgressBar.config.main.variant = config.variant
15
+ }
16
+ if (config.pieArcColors) {
17
+ ProgressBar.config.main.colorRange = flatObjectValueInArray(config.pieArcColors);
18
+ }
19
+ if (config.size) {
20
+ ProgressBar.config.main.size = Number(config.size);
21
+ }
22
+ if (config.bottomLabel_3) {
23
+ ProgressBar.config.main.bottomLabel_3 = config.bottomLabel_3;
24
+ }
25
+ if (config.layout) {
26
+ ProgressBar.config.layout = createLayoutFormat(config.layout)
27
+ }
28
+ if (config.bottomLabel_2) {
29
+ ProgressBar.config.main.bottomLabel_2 = config.bottomLabel_2;
30
+ }
31
+ if (config.bottomLabel_1) {
32
+ ProgressBar.config.main.bottomLabel_1 = config.bottomLabel_1;
33
+ }
34
+ return ProgressBar;
25
35
 
26
36
  }
@@ -9,11 +9,10 @@ const RadioUiSchema = {
9
9
  widget: "RadioInputField",
10
10
  },
11
11
  config: {
12
- layout: { xs: 12, sm: 6, md: 4, lg: 4 },
12
+ layout: { xs: 12, sm: 6, md: 4, lg: 3 },
13
13
  main: {
14
14
  label: "Enabled",
15
- options: ["YES", "NO"],
16
- errorMessage: "Enabled is not marked as YES or NO",
15
+ options: ["YES", "NO"]
17
16
  },
18
17
  },
19
18
  };
@@ -31,5 +30,14 @@ const RadioUiSchema = {
31
30
  if (config.style) {
32
31
  Radio.config.style = JSON.parse(config.style)
33
32
  }
33
+ if (config.errorMessage) {
34
+ Radio.config.main.errorMessage = config.errorMessage
35
+ }
36
+ if (config.toolTip) {
37
+ Radio.config.main.toolTip = config.toolTip;
38
+ }
39
+ if (config.toolTipPosition) {
40
+ Radio.config.main.toolTipPosition = config.toolTipPosition;
41
+ }
34
42
  return Radio;
35
43
  }
@@ -14,9 +14,21 @@ export const buildSelect = (config: any, componentScope: string) => {
14
14
  if (config.lazyLoading) {
15
15
  selectInputField.config.main.lazyLoading = config.lazyLoading === "YES" ? true : false;
16
16
  }
17
+ if (config.variant) {
18
+ selectInputField.config.main.variant = config.variant;
19
+ }
17
20
  if (config.layout) {
18
21
  selectInputField.config.layout = createLayoutFormat(config.layout)
19
22
  }
23
+ if (config.toolTip) {
24
+ selectInputField.config.main.toolTip = config.toolTip;
25
+ }
26
+ if (config.toolTipPosition) {
27
+ selectInputField.config.main.toolTipPosition = config.toolTipPosition;
28
+ }
29
+ if (config.style) {
30
+ selectInputField.config.style = JSON.parse(config.style);
31
+ }
20
32
  selectInputField.scope = componentScope;
21
33
  return selectInputField;
22
34
  }
@@ -1,26 +1,29 @@
1
- import { createLayoutFormat, flatObjectValueInArray } from "./buildConfig";
1
+ import { createLayoutFormat, createKeyValueMap } from "./buildConfig";
2
2
  import { BarGraph } from "./uischema/graph";
3
3
  import _ from "lodash";
4
4
 
5
5
  export const buildStackbarGraph = (config:any,componentScope:string) => {
6
6
  const barGraph: any = _.cloneDeep(BarGraph);
7
7
  if (config.layout) {
8
- barGraph.config.layout = createLayoutFormat(config.layout);
8
+ barGraph.config.layout = createLayoutFormat(config.layout, config.type);
9
9
  }
10
10
  if (config.legendHide) {
11
11
  barGraph.config.main.legendAvailable = config.legendHide;
12
12
  barGraph.config.main.legendAvailable = config.legendHide==="YES"?false:true;
13
13
  }
14
+ if(config.legendDirection){
15
+ barGraph.config.main.legendDirection = config.legendDirection === "Row" ? "row" : "column";
16
+ }
14
17
  if (config.bottomAxisAngle) {
15
18
  barGraph.config.main.bottomAxisAngle = config.bottomAxisAngle==="YES"?true:false;
16
19
  }
17
20
  barGraph.config.main.type = config?.graphType ?? "BarGraph";
18
21
  barGraph.config.main.header = config.heading;
19
22
  if (config.legendLabels) {
20
- barGraph.config.main.legendLabels = flatObjectValueInArray(config.legendLabels);
23
+ barGraph.config.main.legendLabels = createKeyValueMap(config.legendLabels);
21
24
  }
22
25
  if (config.pieArcColors) {
23
- barGraph.config.style.barStyle.colorRange = flatObjectValueInArray(config.pieArcColors);
26
+ barGraph.config.style.colorMap = createKeyValueMap(config.pieArcColors);
24
27
  }
25
28
  if (config.xAxisValue) {
26
29
  barGraph.config.main.xAxisValue = config.xAxisValue;
@@ -39,6 +42,9 @@ export const buildStackbarGraph = (config:any,componentScope:string) => {
39
42
  if (config.leftLabel) {
40
43
  barGraph.config.main.leftLabel = config.leftLabel;
41
44
  }
45
+ if (config.disableLeftLabel) {
46
+ barGraph.config.main.disableLeftLabel = config.disableLeftLabel==="YES"? true: false;
47
+ }
42
48
  barGraph.scope = componentScope;
43
49
  return barGraph;
44
50
  }
@@ -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,10 @@ 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);
18
+ }
19
+ if (config.style) {
20
+ tab.config.style = JSON.parse(config.style)
16
21
  }
17
22
  tab.config.main.id = config.name;
18
23
  return tab