impaktapps-ui-builder 1.0.4 → 1.0.9-4.card.2

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 (80) hide show
  1. package/dist/impaktapps-ui-builder.es.js +704 -684
  2. package/dist/impaktapps-ui-builder.es.js.map +1 -1
  3. package/dist/impaktapps-ui-builder.umd.js +14 -14
  4. package/dist/impaktapps-ui-builder.umd.js.map +1 -1
  5. package/dist/src/impaktapps-ui-builder/builder/build/buildArray.d.ts +1 -11
  6. package/dist/src/impaktapps-ui-builder/builder/build/buildConfig.d.ts +1 -1
  7. package/dist/src/impaktapps-ui-builder/builder/build/buildHorizontalLayout.d.ts +1 -0
  8. package/dist/src/impaktapps-ui-builder/builder/build/buildImage.d.ts +1 -0
  9. package/dist/src/impaktapps-ui-builder/builder/build/uischema/apiSection.d.ts +1 -3
  10. package/dist/src/impaktapps-ui-builder/builder/build/uischema/box.d.ts +9 -2
  11. package/dist/src/impaktapps-ui-builder/builder/build/uischema/button.d.ts +6 -1
  12. package/dist/src/impaktapps-ui-builder/builder/build/uischema/card.d.ts +2 -0
  13. package/dist/src/impaktapps-ui-builder/builder/build/uischema/coreSection.d.ts +82 -72
  14. package/dist/src/impaktapps-ui-builder/builder/build/uischema/eventSection.d.ts +18 -50
  15. package/dist/src/impaktapps-ui-builder/builder/build/uischema/horizontalLayout.d.ts +13 -0
  16. package/dist/src/impaktapps-ui-builder/builder/build/uischema/refresh.d.ts +0 -3
  17. package/dist/src/impaktapps-ui-builder/builder/build/uischema/table.d.ts +1 -0
  18. package/dist/src/impaktapps-ui-builder/builder/build/uischema/tableSection.d.ts +14 -65
  19. package/dist/src/impaktapps-ui-builder/builder/build/uischema/validationSections.d.ts +48 -38
  20. package/dist/src/impaktapps-ui-builder/builder/build/uischema/valueTab.d.ts +0 -3
  21. package/dist/src/impaktapps-ui-builder/builder/build/uischema/wrapperSection.d.ts +1 -0
  22. package/dist/src/impaktapps-ui-builder/runtime/services/service.d.ts +3 -0
  23. package/package.json +1 -1
  24. package/src/impaktapps-ui-builder/builder/build/buildAadharCard.ts +2 -2
  25. package/src/impaktapps-ui-builder/builder/build/buildArray.ts +31 -15
  26. package/src/impaktapps-ui-builder/builder/build/buildButton.ts +1 -1
  27. package/src/impaktapps-ui-builder/builder/build/buildCheckbox.ts +1 -1
  28. package/src/impaktapps-ui-builder/builder/build/buildConfig.ts +20 -16
  29. package/src/impaktapps-ui-builder/builder/build/buildDataGrid.ts +2 -2
  30. package/src/impaktapps-ui-builder/builder/build/buildDate.ts +6 -0
  31. package/src/impaktapps-ui-builder/builder/build/buildDownloadFile.ts +1 -0
  32. package/src/impaktapps-ui-builder/builder/build/buildFileInput.ts +4 -1
  33. package/src/impaktapps-ui-builder/builder/build/buildHorizontalBarGraph.ts +1 -1
  34. package/src/impaktapps-ui-builder/builder/build/buildHorizontalLayout.ts +15 -0
  35. package/src/impaktapps-ui-builder/builder/build/buildImage.ts +35 -0
  36. package/src/impaktapps-ui-builder/builder/build/buildLabel.ts +3 -0
  37. package/src/impaktapps-ui-builder/builder/build/buildLeaderboard.ts +1 -1
  38. package/src/impaktapps-ui-builder/builder/build/buildLineGraph.ts +1 -1
  39. package/src/impaktapps-ui-builder/builder/build/buildMultiSelect.ts +3 -0
  40. package/src/impaktapps-ui-builder/builder/build/buildPieGraph.ts +1 -1
  41. package/src/impaktapps-ui-builder/builder/build/buildPop.ts +2 -2
  42. package/src/impaktapps-ui-builder/builder/build/buildRadio.ts +1 -1
  43. package/src/impaktapps-ui-builder/builder/build/buildSelect.ts +3 -0
  44. package/src/impaktapps-ui-builder/builder/build/buildStackBarGraph.ts +1 -1
  45. package/src/impaktapps-ui-builder/builder/build/buildTabSection.ts +3 -0
  46. package/src/impaktapps-ui-builder/builder/build/buildText.ts +6 -0
  47. package/src/impaktapps-ui-builder/builder/build/buildTextArea.ts +2 -2
  48. package/src/impaktapps-ui-builder/builder/build/buildThoughtOfTheDay.ts +1 -1
  49. package/src/impaktapps-ui-builder/builder/build/buildTreeMap.ts +2 -1
  50. package/src/impaktapps-ui-builder/builder/build/buildUiSchema.ts +27 -14
  51. package/src/impaktapps-ui-builder/builder/build/buildWrapperSection.ts +1 -1
  52. package/src/impaktapps-ui-builder/builder/build/uischema/apiSection.ts +0 -6
  53. package/src/impaktapps-ui-builder/builder/build/uischema/array.ts +1 -1
  54. package/src/impaktapps-ui-builder/builder/build/uischema/box.ts +4 -2
  55. package/src/impaktapps-ui-builder/builder/build/uischema/buildPropertiesSection.ts +146 -130
  56. package/src/impaktapps-ui-builder/builder/build/uischema/button.ts +1 -1
  57. package/src/impaktapps-ui-builder/builder/build/uischema/card.ts +5 -3
  58. package/src/impaktapps-ui-builder/builder/build/uischema/coreSection.ts +58 -119
  59. package/src/impaktapps-ui-builder/builder/build/uischema/dateInputField.ts +2 -2
  60. package/src/impaktapps-ui-builder/builder/build/uischema/emptyBox.ts +1 -1
  61. package/src/impaktapps-ui-builder/builder/build/uischema/eventSection.ts +30 -54
  62. package/src/impaktapps-ui-builder/builder/build/uischema/file.ts +3 -3
  63. package/src/impaktapps-ui-builder/builder/build/uischema/horizontalLayout.ts +11 -0
  64. package/src/impaktapps-ui-builder/builder/build/uischema/multiSelect.ts +2 -2
  65. package/src/impaktapps-ui-builder/builder/build/uischema/refresh.ts +0 -3
  66. package/src/impaktapps-ui-builder/builder/build/uischema/selectInputField.ts +1 -1
  67. package/src/impaktapps-ui-builder/builder/build/uischema/table.ts +1 -0
  68. package/src/impaktapps-ui-builder/builder/build/uischema/tableSection.ts +29 -54
  69. package/src/impaktapps-ui-builder/builder/build/uischema/textInputField.ts +1 -1
  70. package/src/impaktapps-ui-builder/builder/build/uischema/validationSections.ts +58 -113
  71. package/src/impaktapps-ui-builder/builder/build/uischema/valueTab.ts +0 -3
  72. package/src/impaktapps-ui-builder/builder/build/uischema/wrapperSection.ts +1 -0
  73. package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/schema.ts +51 -15
  74. package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/uiSchema.ts +60 -118
  75. package/src/impaktapps-ui-builder/builder/elements/UiSchema/PageMaster/schema.ts +1 -1
  76. package/src/impaktapps-ui-builder/builder/elements/UiSchema/PageMaster/uiSchema.ts +77 -106
  77. package/src/impaktapps-ui-builder/builder/elements/UiSchema/event/schema.ts +9 -4
  78. package/src/impaktapps-ui-builder/builder/elements/UiSchema/event/uiSchema.ts +31 -55
  79. package/src/impaktapps-ui-builder/builder/services/component.ts +10 -4
  80. package/src/impaktapps-ui-builder/runtime/services/service.ts +22 -118
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "impaktapps-ui-builder",
3
- "version": "1.0.4",
3
+ "version": "1.0.94.card.2",
4
4
  "scripts": {
5
5
  "dev": "vite",
6
6
  "build": "tsc && vite build",
@@ -11,7 +11,7 @@ const TextField = {
11
11
  "widget": "InputField"
12
12
  },
13
13
  config:{
14
- layout: { xs: 12, sm: 6, md: 4, lg: 4 },
14
+ layout: { xs: 12, sm: 6, md: 4, lg: 3 },
15
15
  main:{
16
16
  label:"Adhaar Card",
17
17
  formatStrArray:["9","9","9","9"," ","9","9","9","9"," ","X9","X9","X9","X9"],
@@ -43,7 +43,7 @@ const PanField = {
43
43
  "widget": "InputField"
44
44
  },
45
45
  config:{
46
- layout: { xs: 12, sm: 6, md: 4, lg: 4 },
46
+ layout: { xs: 12, sm: 6, md: 4, lg: 3 },
47
47
  main:{
48
48
  label:"Pan Card",
49
49
  placeholder:"AAAAA0000A",
@@ -1,18 +1,34 @@
1
1
  import _ from "lodash";
2
2
 
3
- const ArrayUiSchema = {
4
- type: "Control",
5
- scope: "#/properties/adjustments",
6
- layout: 11.5,
7
- options: {
8
- detail: {
9
- type: "HorizontalLayout",
10
- elements: []
11
- }
12
- }
13
- }
14
- export const buildArray = (config:any,componentScope:string)=>{
15
- const array = _.cloneDeep(ArrayUiSchema);
16
- array.scope = componentScope;
17
- return array;
3
+ const ArrayUiSchema: any = {
4
+ type: "Control",
5
+ scope: "#/properties/adjustments",
6
+ layout: 12,
7
+ elements: [],
8
+ config: {
9
+ main: {}
10
+ }
11
+
12
+ }
13
+ export const buildArray = (config: any, componentScope: string) => {
14
+ const array = _.cloneDeep(ArrayUiSchema);
15
+ if (config.allExpanded) {
16
+ array.config.main.allExpanded = config.allExpanded === "YES" ? true : false
17
+ }
18
+ if(config.disableAddButton ){
19
+ array.config.main.disableAddButton = config.disableAddButton === "YES" ? true : false
20
+ }
21
+ if(config.disableExpandAllButton ){
22
+ array.config.main.disableExpandAllButton = config.disableExpandAllButton === "YES" ? true : false
23
+ }
24
+ if(config.disableRowActions ){
25
+ array.config.main.disableRowActions = config.disableRowActions === "YES" ? true : false
26
+ }
27
+ if (config.style) {
28
+ array.config.style = JSON.parse(config.style)
29
+ }
30
+ array.config.main.childElementLabel = config.childElementLabel;
31
+ array.config.main.label = config.label;
32
+ array.scope = componentScope;
33
+ return array;
18
34
  }
@@ -12,7 +12,7 @@ export const buildButton = (config:any,componentScope:string) =>{
12
12
 
13
13
  }
14
14
  if(config.layout){
15
- button.config.layout = createLayoutFormat(config.layout)
15
+ button.config.layout = createLayoutFormat(config.layout, config.type)
16
16
  }
17
17
  if(config.tooltipMessage){
18
18
  button.config.main.tooltipMessage = config.tooltipMessage
@@ -4,11 +4,11 @@ import { createLayoutFormat } from "./buildConfig";
4
4
  const Checkbox = {
5
5
  "type": "Control",
6
6
  "scope": "#/properties/username1",
7
- "layout": 12,
8
7
  "options": {
9
8
  "widget": "CheckBox"
10
9
  },
11
10
  "config": {
11
+ "layout": { xs: 6, sm: 6, md: 4, lg: 3 },
12
12
  "main": {
13
13
  "label": "Welcome to Hyperform",
14
14
  }
@@ -26,27 +26,31 @@ export default (FormData: any) => {
26
26
  return component;
27
27
  };
28
28
 
29
- export const createLayoutFormat = (config: any[]) => {
30
- if (_.isEmpty(config)) {
31
- return {
32
- xs: 12,
33
- sm: 12,
34
- md: 12,
35
- lg: 12,
29
+ export const createLayoutFormat = (layout: any[], type?: string) => {
30
+ if (_.isEmpty(layout)) {
31
+ const fullLayoutComponents: string[] = ["WrapperSection", "DataGrid", "LeaderBoard", "PopUp", "TextArea", "TreeMap", "Thought", "HorizontalLayout"]
32
+ if(fullLayoutComponents.includes(type)){
33
+ return { xs: 12, sm: 12, md: 12, lg: 12 }
34
+ }
35
+ else if(type === "Graph"){
36
+ return {xs :12,sm:12,md:12,lg:6}
37
+ }
38
+ else if(type === "Button"){
39
+ return { xs: 4, sm: 2.5, md: 2, lg: 1.5 }
40
+ }
41
+ else{
42
+ return { xs: 6, sm: 6, md: 4, lg: 3 }
36
43
  }
37
44
  }
38
- let data: any = {
39
- xs: 12,
40
- sm: 12,
41
- md: 6,
42
- lg: 6,
43
- };
44
- config.map((e: any) => {
45
- data[e.key || "xs"] = +e.value || 5.5
45
+ let data: any = { };
46
+
47
+ layout.map((e: any) => {
48
+ data[e.key || "xs"] = +e.value || 5.5;
49
+
46
50
  })
47
51
  return data;
48
52
  };
49
- export const flatObjectValueInArray = (config: any[]=[]) => {
53
+ export const flatObjectValueInArray = (config: any[] = []) => {
50
54
  if (config.length < 1) {
51
55
  return
52
56
  }
@@ -39,10 +39,10 @@ export const buildDataGrid = (config, componentScope) => {
39
39
  DataGrid.config.main.label = config.label;
40
40
  }
41
41
  if (config.layout) {
42
- DataGrid.config.layout = createLayoutFormat(config.layout)
42
+ DataGrid.config.layout = createLayoutFormat(config.layout, config.type)
43
43
  }
44
44
  if (config.cardLayout) {
45
- DataGrid.config.cardLayout = createLayoutFormat(config.cardLayout)
45
+ DataGrid.config.cardLayout = createLayoutFormat(config.cardLayout, config.type)
46
46
  }
47
47
  if (config.style) {
48
48
  DataGrid.config.style = JSON.parse(config.style)
@@ -10,6 +10,9 @@ export const buildDate = (config:any,componentScope:string)=> {
10
10
  if(config.layout){
11
11
  dateInputField.config.layout = createLayoutFormat(config.layout)
12
12
  }
13
+ if (config.variant) {
14
+ dateInputField.config.main.variant = config.variant;
15
+ }
13
16
  return dateInputField;
14
17
  }
15
18
  export const buildDateTime = (config:any,componentScope:string)=>{
@@ -20,5 +23,8 @@ export const buildDateTime = (config:any,componentScope:string)=>{
20
23
  if(config.layout){
21
24
  dateTimeInputField.config.layout = createLayoutFormat(config.layout)
22
25
  }
26
+ if (config.variant) {
27
+ dateTimeInputField.config.main.variant = config.variant;
28
+ }
23
29
  return dateTimeInputField;
24
30
  }
@@ -5,6 +5,7 @@ import { createLayoutFormat } from "./buildConfig";
5
5
  export const buildDownloadFile = (config,componentScope) => {
6
6
  const DownloadFile: any = _.cloneDeep(downloadFile);
7
7
  DownloadFile.scope = componentScope;
8
+ DownloadFile.config.main.label = config.label;
8
9
  if (config.layout) {
9
10
  DownloadFile.config.layout = config.layout;
10
11
  }
@@ -8,7 +8,7 @@ const FileInput = {
8
8
  widget: "FileInputField",
9
9
  },
10
10
  config: {
11
- layout: { xs: 6, sm: 6, md: 4, lg: 4 },
11
+ layout: { xs: 12, sm: 6, md: 4, lg: 3 },
12
12
  main: {
13
13
  required: false,
14
14
  onUpload: "onFileUpload",
@@ -31,5 +31,8 @@ const FileInput = {
31
31
  if (config.style) {
32
32
  box.config.style = JSON.parse(config.style)
33
33
  }
34
+ if (config.variant) {
35
+ box.config.main.variant = config.variant
36
+ }
34
37
  return box;
35
38
  }
@@ -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;
@@ -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,35 @@
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
+ },
16
+ style: {
17
+ },
18
+ },
19
+ };
20
+
21
+ export const buildImage = (config, componentScope) => {
22
+ const image: any = _.cloneDeep(imageUiSchema);
23
+ image.scope = componentScope;
24
+ image.config.main.url = config.imageUrl;
25
+ if (config.layout) {
26
+ image.config.layout = createLayoutFormat(config.layout);
27
+ }
28
+ if (config.style) {
29
+ image.config.style = JSON.parse(config.style);
30
+ }
31
+ if (config.height) {
32
+ image.config.style.imageStyle = {...image.config.style.imageStyle, height: config.height}
33
+ }
34
+ return image;
35
+ };
@@ -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
  }
@@ -38,7 +38,7 @@ export const buildLeaderBoard = (config) => {
38
38
  LeaderBoard.config.main.scoreKey = config.scoreKey;
39
39
  }
40
40
  if (config.layout) {
41
- LeaderBoard.config.layout = createLayoutFormat(config.layout);
41
+ LeaderBoard.config.layout = createLayoutFormat(config.layout, config.type);
42
42
  }
43
43
  if (config.style) {
44
44
  LeaderBoard.config.style = JSON.parse(config.style)
@@ -5,7 +5,7 @@ import _ from "lodash";
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) {
@@ -15,6 +15,9 @@ 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
  }
@@ -4,7 +4,7 @@ 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;
@@ -34,10 +34,10 @@ export const buildPopUp = (config,componentScope) =>{
34
34
  popup.config.main.fullWidth = config.fullWidth === "YES" ? true : false;
35
35
  popup.config.main.maxWidth = config.maxWidth||false;
36
36
  if (config.layout) {
37
- popup.config.layout = createLayoutFormat(config.layout)
37
+ popup.config.layout = createLayoutFormat(config.layout, config.type)
38
38
  }
39
39
  if (config.style) {
40
- PopUP.config.style = JSON.parse(config.style)
40
+ popup.config.style = JSON.parse(config.style)
41
41
  }
42
42
  return popup;
43
43
  }
@@ -9,7 +9,7 @@ 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
15
  options: ["YES", "NO"],
@@ -14,6 +14,9 @@ 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
  }
@@ -5,7 +5,7 @@ import _ from "lodash";
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;
@@ -14,6 +14,9 @@ export const buildTabSection = (config:any,componentScope:string) => {
14
14
  if (config.sectionLabels) {
15
15
  tab.config.main.tabLabels = config.sectionLabels.map(e => e.label);
16
16
  }
17
+ if (config.style) {
18
+ tab.config.style = JSON.parse(config.style)
19
+ }
17
20
  tab.config.main.id = config.name;
18
21
  return tab
19
22
  }
@@ -11,12 +11,18 @@ export const buildTextField = (config: any, componentScope: string) => {
11
11
  if (config.multiline) {
12
12
  inputField.config.main.multiline = config.multiline === "YES" ? true : false;
13
13
  }
14
+ if (config.keyName) {
15
+ inputField.config.main.keyName = config.keyName;
16
+ }
14
17
  if (config.InputFormatingAndMasking) {
15
18
  inputField.config.main.formatStrArray = config.InputFormatingAndMasking.map(e => e.formatElement);
16
19
  }
17
20
  if (config.placeholder) {
18
21
  inputField.config.main.placeholder = config.placeholder;
19
22
  }
23
+ if (config.variant) {
24
+ inputField.config.main.variant = config.variant;
25
+ }
20
26
  if (config.layout) {
21
27
  inputField.config.layout = createLayoutFormat(config.layout)
22
28
  }
@@ -10,7 +10,7 @@ const TextArea = {
10
10
  widget: "TextArea",
11
11
  },
12
12
  config: {
13
- layout:{xs:12,sm:12,md:5.5,lg:5.5},
13
+ layout:12,
14
14
  style:{
15
15
  containerStyle:{
16
16
  borderRadius:"20px",
@@ -37,7 +37,7 @@ export const buildTextArea = (config:any,componentScope:string) =>{
37
37
  textArea.config.main.heading = config.label;
38
38
 
39
39
  if(config.layout){
40
- textArea.config.layout = createLayoutFormat(config.layout)
40
+ textArea.config.layout = createLayoutFormat(config.layout, config.type)
41
41
  }
42
42
  if (config.style) {
43
43
  textArea.config.style = JSON.parse(config.style)
@@ -10,7 +10,7 @@ export const buildThoughtOfTheDay = (config,componentScope) =>{
10
10
  thought.config.main.thought = `${config.thought}`
11
11
  }
12
12
  if(config.layout){
13
- thought.config.layout = createLayoutFormat(config.layout)
13
+ thought.config.layout = createLayoutFormat(config.layout, config.type)
14
14
  }
15
15
  if(config.label){
16
16
  thought.config.main.label = config.label;
@@ -5,6 +5,7 @@ const TreeMap = {
5
5
  "type": "Control",
6
6
  "scope": "#/properties/TreeMap2",
7
7
  "config": {
8
+ layout: 12,
8
9
  "main": {
9
10
  "layout": "cartsian",
10
11
  orientation: "vertical",
@@ -34,7 +35,7 @@ export const buildTreeMap = (config, componentScope) => {
34
35
  treMap.config.main.header = config.label;
35
36
  }
36
37
  if (config.layout) {
37
- treMap.config.layout = createLayoutFormat(config.layout);
38
+ treMap.config.layout = createLayoutFormat(config.layout, config.type);
38
39
  }
39
40
  if (config.orientation) {
40
41
  treMap.config.main.orientation = config.orientation;
@@ -40,6 +40,8 @@ import { buildDataGrid } from "./buildDataGrid";
40
40
  import { buildInputSlider } from "./buildInputSlider";
41
41
  import { buildTreeMap } from "./buildTreeMap";
42
42
  import { buildThoughtOfTheDay } from "./buildThoughtOfTheDay";
43
+ import { buildHorizontalLayout } from "./buildHorizontalLayout";
44
+ import { buildImage } from "./buildImage";
43
45
  export let schema = {
44
46
  type: "object",
45
47
  properties: {},
@@ -141,7 +143,7 @@ function buildRule(configObj: any, tableName?: string, arrayHolderName?: boolean
141
143
  export const buildSchema = (config: any, tableName?: string, isArrayType?: boolean) => {
142
144
  buildRule(config, tableName, isArrayType);
143
145
  if (config?.elements) {
144
- if (config.type == "Table" || config.type == "Array") {
146
+ if ( config.type == "Array") {
145
147
  if (!schema.properties[config.name]) {
146
148
  schema.properties[config.name] = {
147
149
  type: "array",
@@ -206,6 +208,9 @@ const buildUiSchema = (config: any, store?: any) => {
206
208
  case "WrapperSection":
207
209
  elements = buildWrapperSection(config, componentScope);
208
210
  break;
211
+ case "HorizontalLayout":
212
+ elements = buildHorizontalLayout(config, componentScope);
213
+ break;
209
214
  case "Text":
210
215
  elements = buildTextField(config, componentScope);
211
216
  break;
@@ -307,6 +312,8 @@ const buildUiSchema = (config: any, store?: any) => {
307
312
  case "Thought":
308
313
  elements = buildThoughtOfTheDay(config, componentScope);
309
314
  break;
315
+ case "Image":
316
+ elements = buildImage(config, componentScope);
310
317
  break;
311
318
  default:
312
319
  schema = {
@@ -329,12 +336,25 @@ const buildUiSchema = (config: any, store?: any) => {
329
336
  });
330
337
  }
331
338
  elements.elements = config.elements.map((cellElem, elemInd) => {
332
- return {
339
+ const commonProperties = {
333
340
  accessorKey: cellElem.name,
341
+ type: cellElem.type === "ColumnGroup" ? "ColumnGroup" : cellElem.columnFormat,
334
342
  header: cellElem.label || cellElem.name,
335
343
  size: sizeMap[cellElem.name] || 180,
336
- type: cellElem.columnFormat,
337
- elements: cellElem.type == "ColumnGroup" ? cellElem.elements.map((childCellElem) => buildUiSchema(childCellElem, store)) : []
344
+ enableColumnFilter: cellElem.enableFilter === "No" ? false : true,
345
+ columnFilterModeOptions: cellElem.filteringOptions,
346
+ enableSorting: cellElem.enableSorting === "No" ? false : true,
347
+ columnKey: cellElem.columnKey
348
+ }
349
+ if (cellElem.type) {
350
+ const tableElem = {
351
+ widget: cellElem.type != "ColumnGroup" ? buildUiSchema(cellElem, store) : undefined,
352
+ ...commonProperties,
353
+ ...(cellElem.type === "ColumnGroup" ? buildUiSchema(cellElem, store) : {})
354
+ }
355
+ return tableElem
356
+ } else {
357
+ return { ...commonProperties }
338
358
  }
339
359
  })
340
360
  } else if (config.type == "Table") {
@@ -351,7 +371,7 @@ const buildUiSchema = (config: any, store?: any) => {
351
371
  config.elements.filter((cellElem, elemInd) => {
352
372
  const commonProperties = {
353
373
  accessorKey: cellElem.name,
354
- type: cellElem.columnFormat,
374
+ type: cellElem.type === "ColumnGroup" ? "ColumnGroup" : cellElem.columnFormat,
355
375
  header: cellElem.label || cellElem.name,
356
376
  size: sizeMap[cellElem.name] || 180,
357
377
  enableColumnFilter: cellElem.enableFilter === "No" ? false : true,
@@ -372,9 +392,8 @@ const buildUiSchema = (config: any, store?: any) => {
372
392
  }
373
393
  const tableElem = {
374
394
  widget: cellElem.type != "ColumnGroup" ? buildUiSchema(cellElem, store) : undefined,
375
- elements: cellElem.type == "ColumnGroup" ? cellElem.elements.map((childCellElem) => buildUiSchema(childCellElem, store)) : [],
376
- ...commonProperties
377
-
395
+ ...commonProperties,
396
+ ...(cellElem.type === "ColumnGroup" ? buildUiSchema(cellElem, store) : {})
378
397
  }
379
398
  rowElements.push(tableElem)
380
399
  } else {
@@ -386,12 +405,6 @@ const buildUiSchema = (config: any, store?: any) => {
386
405
  elements.config.action = tableActionElement;
387
406
  elements.config.main.headerIcons.elements = tableHeaderElements;
388
407
  }
389
-
390
- else if (config.type == "Array") {
391
- elements.options.detail.elements = config.elements.map((e: any, elemInd: number) => {
392
- return buildUiSchema(e, store)
393
- });
394
- }
395
408
  else {
396
409
  elements.elements = config.elements.map((e: any, elemInd: number) => {
397
410
  return buildUiSchema(e, store)
@@ -15,7 +15,7 @@ export const buildWrapperSection = (config, componentScope) => {
15
15
  wrapper.config.style = JSON.parse(config.style)
16
16
  }
17
17
  if (config.layout) {
18
- wrapper.config.layout = createLayoutFormat(config.layout)
18
+ wrapper.config.layout = createLayoutFormat(config.layout, config.type)
19
19
  }
20
20
  return wrapper;
21
21
  }
@@ -49,9 +49,6 @@ export const APISection = {
49
49
  {
50
50
  type: "Control",
51
51
  scope: "#/properties/headers",
52
- options: {
53
- widget: "Array",
54
- },
55
52
  config: {
56
53
  layout: 12,
57
54
  main: {
@@ -113,9 +110,6 @@ export const APISection = {
113
110
  {
114
111
  type: "Control",
115
112
  scope: "#/properties/body",
116
- options: {
117
- widget: "Array",
118
- },
119
113
  config: {
120
114
  layout: 12,
121
115
  main: {
@@ -2,7 +2,7 @@ export const ArrayLayout = {
2
2
  "type": "Control",
3
3
  "scope": "#/properties/adjustments",
4
4
  "config": {
5
- "layout": 11.5
5
+ "layout": 12
6
6
  },
7
7
  "options": {
8
8
  "name": "adjustments",
@@ -6,8 +6,10 @@
6
6
  widget: "Box",
7
7
  },
8
8
 
9
- config: { layout: 12,
10
- main: {},
9
+ config: { layout: { xs: 6, sm: 6, md: 4, lg: 3 },
10
+ main: {
11
+ iconName: ""
12
+ },
11
13
  style:{
12
14
  // fontWeight:300
13
15
  }