impaktapps-ui-builder 1.0.174 → 1.0.181-test

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 (69) hide show
  1. package/dist/impaktapps-ui-builder.es.js +816 -84
  2. package/dist/impaktapps-ui-builder.es.js.map +1 -1
  3. package/dist/impaktapps-ui-builder.umd.js +10 -10
  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/buildConfig.d.ts +1 -0
  7. package/dist/src/impaktapps-ui-builder/builder/build/buildGroupButton.d.ts +1 -0
  8. package/dist/src/impaktapps-ui-builder/builder/build/buildMetricCard.d.ts +1 -0
  9. package/dist/src/impaktapps-ui-builder/builder/build/buildOTP_inputs.d.ts +1 -0
  10. package/dist/src/impaktapps-ui-builder/builder/build/buildPdfViewer.d.ts +1 -0
  11. package/dist/src/impaktapps-ui-builder/builder/build/buildPopover.d.ts +1 -0
  12. package/dist/src/impaktapps-ui-builder/builder/build/buildStackBarLineGraph.d.ts +2 -0
  13. package/dist/src/impaktapps-ui-builder/builder/build/uischema/box.d.ts +1 -0
  14. package/dist/src/impaktapps-ui-builder/builder/build/uischema/buttonGroup.d.ts +22 -0
  15. package/dist/src/impaktapps-ui-builder/builder/build/uischema/graph.d.ts +50 -4
  16. package/dist/src/impaktapps-ui-builder/builder/build/uischema/metricCard.d.ts +17 -0
  17. package/dist/src/impaktapps-ui-builder/builder/build/uischema/multiSelect.d.ts +1 -0
  18. package/dist/src/impaktapps-ui-builder/builder/build/uischema/pdfViewer.d.ts +19 -0
  19. package/dist/src/impaktapps-ui-builder/builder/build/uischema/selectInputField.d.ts +1 -0
  20. package/dist/src/impaktapps-ui-builder/builder/build/uischema/tableSection.d.ts +1 -1
  21. package/dist/src/impaktapps-ui-builder/builder/build/uischema/wrapperSection.d.ts +3 -1
  22. package/dist/src/impaktapps-ui-builder/runtime/services/downloadFile.d.ts +1 -0
  23. package/dist/src/impaktapps-ui-builder/runtime/services/interface.d.ts +1 -0
  24. package/dist/src/impaktapps-ui-builder/runtime/services/service.d.ts +4 -0
  25. package/package.json +1 -1
  26. package/src/impaktapps-ui-builder/builder/build/buildAreaGraph.ts +66 -0
  27. package/src/impaktapps-ui-builder/builder/build/buildArray.ts +10 -6
  28. package/src/impaktapps-ui-builder/builder/build/buildCamera.ts +1 -1
  29. package/src/impaktapps-ui-builder/builder/build/buildConfig.ts +19 -7
  30. package/src/impaktapps-ui-builder/builder/build/buildDate.ts +26 -22
  31. package/src/impaktapps-ui-builder/builder/build/buildFileInput.ts +42 -49
  32. package/src/impaktapps-ui-builder/builder/build/buildGroupButton.ts +24 -0
  33. package/src/impaktapps-ui-builder/builder/build/buildHorizontalBarGraph.ts +3 -3
  34. package/src/impaktapps-ui-builder/builder/build/buildImage.ts +6 -3
  35. package/src/impaktapps-ui-builder/builder/build/buildLineGraph.ts +3 -3
  36. package/src/impaktapps-ui-builder/builder/build/buildMetricCard.tsx +37 -0
  37. package/src/impaktapps-ui-builder/builder/build/buildMultiSelect.ts +3 -0
  38. package/src/impaktapps-ui-builder/builder/build/buildOTP_inputs.ts +44 -0
  39. package/src/impaktapps-ui-builder/builder/build/buildPdfViewer.ts +16 -0
  40. package/src/impaktapps-ui-builder/builder/build/buildPieGraph.ts +3 -3
  41. package/src/impaktapps-ui-builder/builder/build/buildPop.ts +1 -0
  42. package/src/impaktapps-ui-builder/builder/build/buildPopover.ts +40 -0
  43. package/src/impaktapps-ui-builder/builder/build/buildSelect.ts +3 -0
  44. package/src/impaktapps-ui-builder/builder/build/buildStackBarGraph.ts +3 -3
  45. package/src/impaktapps-ui-builder/builder/build/buildStackBarLineGraph.ts +72 -0
  46. package/src/impaktapps-ui-builder/builder/build/buildTabSection.ts +2 -0
  47. package/src/impaktapps-ui-builder/builder/build/buildTable.ts +0 -3
  48. package/src/impaktapps-ui-builder/builder/build/buildText.ts +3 -0
  49. package/src/impaktapps-ui-builder/builder/build/buildUiSchema.ts +33 -0
  50. package/src/impaktapps-ui-builder/builder/build/buildWrapperSection.ts +7 -3
  51. package/src/impaktapps-ui-builder/builder/build/uischema/box.ts +2 -1
  52. package/src/impaktapps-ui-builder/builder/build/uischema/buildPropertiesSection.ts +172 -16
  53. package/src/impaktapps-ui-builder/builder/build/uischema/buttonGroup.ts +17 -0
  54. package/src/impaktapps-ui-builder/builder/build/uischema/coreSection.ts +0 -1
  55. package/src/impaktapps-ui-builder/builder/build/uischema/graph.ts +37 -4
  56. package/src/impaktapps-ui-builder/builder/build/uischema/metricCard.ts +13 -0
  57. package/src/impaktapps-ui-builder/builder/build/uischema/multiSelect.ts +2 -0
  58. package/src/impaktapps-ui-builder/builder/build/uischema/pdfViewer.ts +18 -0
  59. package/src/impaktapps-ui-builder/builder/build/uischema/selectInputField.ts +2 -0
  60. package/src/impaktapps-ui-builder/builder/build/uischema/tableSection.ts +5 -6
  61. package/src/impaktapps-ui-builder/builder/build/uischema/wrapperSection.ts +3 -1
  62. package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/schema.ts +80 -1
  63. package/src/impaktapps-ui-builder/builder/elements/UiSchema/PageMaster/uiSchema.ts +17 -0
  64. package/src/impaktapps-ui-builder/builder/elements/UiSchema/event/schema.ts +3 -3
  65. package/src/impaktapps-ui-builder/builder/services/component.ts +143 -108
  66. package/src/impaktapps-ui-builder/runtime/services/downloadFile.ts +80 -0
  67. package/src/impaktapps-ui-builder/runtime/services/events.ts +6 -3
  68. package/src/impaktapps-ui-builder/runtime/services/interface.ts +1 -0
  69. package/src/impaktapps-ui-builder/runtime/services/service.ts +31 -7
@@ -0,0 +1,2 @@
1
+ declare const buildAreaGraph: (config: any, componentScope: string) => any;
2
+ export default buildAreaGraph;
@@ -2,3 +2,4 @@ declare const _default: (FormData: any) => any;
2
2
  export default _default;
3
3
  export declare const createLayoutFormat: (layout: any[], type?: string) => any;
4
4
  export declare const flatObjectValueInArray: (config?: any[]) => any[];
5
+ export declare const createKeyValueMap: (config?: any[]) => any;
@@ -0,0 +1 @@
1
+ export declare const buildButtonGroup: (config: any, componentScope: string) => any;
@@ -0,0 +1 @@
1
+ export declare const buildMetricCard: (config: any, componentScope: any, store: any) => any;
@@ -0,0 +1 @@
1
+ export declare const buildOTP_Input: (config: any, componentScope: any) => any;
@@ -0,0 +1 @@
1
+ export declare const buildPdfViewer: (config: any, componentScope: string) => any;
@@ -0,0 +1 @@
1
+ export declare const buildPopOver: (config: any, componentScope: any) => any;
@@ -0,0 +1,2 @@
1
+ declare const buildStackBarLineGraph: (config: any, componentScope: string) => any;
2
+ export default buildStackBarLineGraph;
@@ -13,6 +13,7 @@ declare const Box: {
13
13
  };
14
14
  main: {
15
15
  iconName: string;
16
+ onClick: string;
16
17
  };
17
18
  style: {};
18
19
  };
@@ -0,0 +1,22 @@
1
+ declare const _default: {
2
+ type: string;
3
+ scope: string;
4
+ options: {
5
+ widget: string;
6
+ };
7
+ config: {
8
+ layout: {
9
+ xs: number;
10
+ sm: number;
11
+ md: number;
12
+ lg: number;
13
+ };
14
+ main: {
15
+ variant: string;
16
+ styleDefault: boolean;
17
+ size: string;
18
+ };
19
+ style: {};
20
+ };
21
+ };
22
+ export default _default;
@@ -20,7 +20,6 @@ export declare const BarGraph: {
20
20
  labelStyle: {
21
21
  margin: {};
22
22
  };
23
- barStyle: {};
24
23
  };
25
24
  };
26
25
  };
@@ -46,7 +45,6 @@ export declare const PieGraph: {
46
45
  labelStyle: {
47
46
  margin: {};
48
47
  };
49
- pieStyle: {};
50
48
  };
51
49
  };
52
50
  };
@@ -72,7 +70,6 @@ export declare const LineGraph: {
72
70
  labelStyle: {
73
71
  margin: {};
74
72
  };
75
- lineStyle: {};
76
73
  };
77
74
  };
78
75
  };
@@ -98,7 +95,56 @@ export declare const HorizontalBarGraph: {
98
95
  labelStyle: {
99
96
  margin: {};
100
97
  };
101
- barStyle: {};
98
+ };
99
+ };
100
+ };
101
+ export declare const AreaBarGraph: {
102
+ type: string;
103
+ scope: string;
104
+ options: {
105
+ widget: string;
106
+ };
107
+ config: {
108
+ layout: {
109
+ xs: number;
110
+ sm: number;
111
+ md: number;
112
+ lg: number;
113
+ };
114
+ main: {
115
+ type: string;
116
+ legendLabels: any;
117
+ };
118
+ style: {
119
+ containerStyle: {};
120
+ labelStyle: {
121
+ margin: {};
122
+ };
123
+ };
124
+ };
125
+ };
126
+ export declare const StackBarLineG: {
127
+ type: string;
128
+ scope: string;
129
+ options: {
130
+ widget: string;
131
+ };
132
+ config: {
133
+ layout: {
134
+ xs: number;
135
+ sm: number;
136
+ md: number;
137
+ lg: number;
138
+ };
139
+ main: {
140
+ type: string;
141
+ legendLabels: any;
142
+ };
143
+ style: {
144
+ containerStyle: {};
145
+ labelStyle: {
146
+ margin: {};
147
+ };
102
148
  };
103
149
  };
104
150
  };
@@ -0,0 +1,17 @@
1
+ declare const _default: {
2
+ type: string;
3
+ scope: string;
4
+ options: {
5
+ widget: string;
6
+ };
7
+ config: {
8
+ layout: {
9
+ xs: number;
10
+ sm: number;
11
+ md: number;
12
+ lg: number;
13
+ };
14
+ main: {};
15
+ };
16
+ };
17
+ export default _default;
@@ -18,6 +18,7 @@ declare const _default: {
18
18
  variant: string;
19
19
  options: any[];
20
20
  };
21
+ style: {};
21
22
  };
22
23
  };
23
24
  export default _default;
@@ -0,0 +1,19 @@
1
+ declare const _default: {
2
+ type: string;
3
+ scope: string;
4
+ options: {
5
+ widget: string;
6
+ };
7
+ config: {
8
+ layout: {
9
+ xs: number;
10
+ sm: number;
11
+ md: number;
12
+ lg: number;
13
+ };
14
+ main: {
15
+ title: string;
16
+ };
17
+ };
18
+ };
19
+ export default _default;
@@ -16,6 +16,7 @@ declare const _default: {
16
16
  type: string;
17
17
  freeSole: boolean;
18
18
  };
19
+ style: {};
19
20
  };
20
21
  };
21
22
  export default _default;
@@ -1,4 +1,4 @@
1
- export declare const TableSection: (theme: any) => {
1
+ export declare const TableSection: (theme: any, scopeName?: string) => {
2
2
  type: string;
3
3
  elements: {
4
4
  type: string;
@@ -3,9 +3,11 @@ declare const _default: {
3
3
  config: {
4
4
  layout: number;
5
5
  main: {
6
- rowSpacing: number;
7
6
  divider: boolean;
8
7
  label: string;
8
+ rowSpacing: number;
9
+ columnSpacing: number;
10
+ spacing: number;
9
11
  };
10
12
  defaultStyle: boolean;
11
13
  };
@@ -3,3 +3,4 @@ export declare function downloadFile({ data, name }: {
3
3
  name: string;
4
4
  }): void;
5
5
  export declare const downloadFileFromUrl: (response: any, service: any) => void;
6
+ export declare const downloadFileStream: (params: any) => Promise<void>;
@@ -5,6 +5,7 @@ export interface handlersProps {
5
5
  dynamicData: any;
6
6
  userValue: any;
7
7
  service: any;
8
+ fetchservice?: any;
8
9
  serviceHolder: any;
9
10
  eventGroups?: any;
10
11
  parentEventOutput?: any;
@@ -3,6 +3,7 @@ interface funcParamsProps {
3
3
  store: any;
4
4
  dynamicData: any;
5
5
  service: any;
6
+ fetchservice: any;
6
7
  userValue: any;
7
8
  pageDataProvider: any;
8
9
  functionsProvider?: Record<string, any>;
@@ -11,10 +12,12 @@ interface funcParamsProps {
11
12
  export declare const extractEvents: (eventConfig: any) => any;
12
13
  declare const _default: (funcParams: funcParamsProps) => {
13
14
  setPage: () => Promise<void>;
15
+ getStyle: () => {};
14
16
  onCellRenderer: (cellParams: any) => {};
15
17
  onClick: () => void;
16
18
  onKeyDown: () => void;
17
19
  onFileDelete: () => Promise<void>;
20
+ onClose: () => void;
18
21
  onMount: () => void;
19
22
  onFileDownload: () => void;
20
23
  onFileUpload: () => void;
@@ -30,5 +33,6 @@ declare const _default: (funcParams: funcParamsProps) => {
30
33
  callHandler: (eventType: string, functionParameters?: any) => void;
31
34
  downloadFile: typeof downloadFile;
32
35
  downloadFileFromUrl: (response: any, service: any) => void;
36
+ downloadFileStream: (params: any) => Promise<void>;
33
37
  };
34
38
  export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "impaktapps-ui-builder",
3
- "version": "1.0.174",
3
+ "version": "1.0.181-test",
4
4
  "scripts": {
5
5
  "dev": "vite",
6
6
  "build": "tsc && vite build",
@@ -0,0 +1,66 @@
1
+ import { createLayoutFormat, createKeyValueMap } from "./buildConfig";
2
+ import { AreaBarGraph } from "./uischema/graph";
3
+ import _ from "lodash";
4
+
5
+
6
+ const buildAreaGraph = (config:any,componentScope:string) => {
7
+ const AreaGraph: any = _.cloneDeep(AreaBarGraph);
8
+ AreaGraph.scope = componentScope;
9
+ if (config.layout) {
10
+ AreaGraph.config.layout = createLayoutFormat(config.layout, config.type);
11
+ }
12
+ AreaGraph.config.main.type = config.graphType;
13
+ AreaGraph.scope = componentScope;
14
+ AreaGraph.config.main.header = config.heading;
15
+ AreaGraph.config.main.subHeader = config.subHeader;
16
+ if (config.legendHide) {
17
+ AreaGraph.config.main.legendAvailable = config.legendHide==="YES"?false:true;
18
+ }
19
+ if (config.bottomAxisAngle) {
20
+ AreaGraph.config.main.bottomAxisAngle = config.bottomAxisAngle==="YES"?true:false;
21
+ }
22
+ if (config.legendLabels) {
23
+ AreaGraph.config.main.legendLabels = createKeyValueMap(config.legendLabels);
24
+ }
25
+ if(config.legendDirection){
26
+ AreaGraph.config.main.legendDirection = config.legendDirection === "Row" ? "row" : "column";
27
+ }
28
+ if (config.height) {
29
+ AreaGraph.config.style.containerStyle.height = config.height;
30
+ }
31
+ if (config.pieArcColors) {
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
42
+ }
43
+ if (config.xAxisValue) {
44
+ AreaGraph.config.main.xAxisValue = config.xAxisValue;
45
+ }
46
+ if(config.xAxisType) {
47
+ AreaGraph.config.main.xAxisType = config.xAxisType;
48
+ }
49
+ if (config.bottomLabel) {
50
+ AreaGraph.config.main.bottomLabel = config.bottomLabel;
51
+ }
52
+ if (config.leftLabel) {
53
+ AreaGraph.config.main.leftLabel = config.leftLabel;
54
+ }
55
+ if (config.disableLeftLabel) {
56
+ AreaGraph.config.main.disableLeftLabel = config.disableLeftLabel==="YES"? true: false;
57
+ }
58
+ if (config.leftMargin) {
59
+ AreaGraph.config.style.labelStyle.margin ={
60
+ left: config.leftMargin
61
+ }
62
+ }
63
+ return AreaGraph
64
+ }
65
+
66
+ export default buildAreaGraph;
@@ -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 = config.disableAddButton === "YES" ? true : false
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 = config.disableExpandAllButton === "YES" ? true : false
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 = config.disableRowActions === "YES" ? true : false
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;
@@ -44,7 +44,7 @@ export const buildCamera = (config: any, componentScope: string) => {
44
44
  camera.config.main.color = config.color
45
45
  }
46
46
  if (config.label) {
47
- camera.config.main.name = config.label;
47
+ camera.config.main.label = config.label;
48
48
  }
49
49
  return camera;
50
50
  }
@@ -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","Table"]
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 :12,sm:12,md:12,lg:6}
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,33 +2,34 @@ 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
- const dateInputField: any = _.cloneDeep(DateInputField);
7
- dateInputField.config.main.label = config.label;
8
- dateInputField.config.main.errorMessage = `${config.name} is empty or invalid`;
9
- dateInputField.scope = componentScope;
10
- if(config.layout){
11
- dateInputField.config.layout = createLayoutFormat(config.layout)
12
- }
13
- if (config.variant) {
14
- dateInputField.config.main.variant = config.variant;
15
- }
16
- if (config.toolTip) {
17
- dateInputField.config.main.toolTip = config.toolTip;
18
- }
19
- if (config.toolTipPosition) {
20
- dateInputField.config.main.toolTipPosition = config.toolTipPosition;
21
- }
22
- return dateInputField;
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;
23
25
  }
24
- export const buildDateTime = (config:any,componentScope:string)=>{
26
+ export const buildDateTime = (config: any, componentScope: string) => {
25
27
  const dateTimeInputField: any = _.cloneDeep(DateTime);
26
28
  dateTimeInputField.config.main.label = config.label;
27
- dateTimeInputField.config.main.errorMessage = `${config.name} is empty or invalid`;
28
29
  dateTimeInputField.scope = componentScope;
29
- if(config.layout){
30
+ if (config.layout) {
30
31
  dateTimeInputField.config.layout = createLayoutFormat(config.layout)
31
- }
32
+ }
32
33
  if (config.variant) {
33
34
  dateTimeInputField.config.main.variant = config.variant;
34
35
  }
@@ -38,5 +39,8 @@ export const buildDateTime = (config:any,componentScope:string)=>{
38
39
  if (config.toolTipPosition) {
39
40
  dateTimeInputField.config.main.toolTipPosition = config.toolTipPosition;
40
41
  }
42
+ if (config.style) {
43
+ dateTimeInputField.config.style = JSON.parse(config.style)
44
+ }
41
45
  return dateTimeInputField;
42
46
  }
@@ -2,55 +2,48 @@ import _ from "lodash";
2
2
  import { createLayoutFormat } from "./buildConfig";
3
3
 
4
4
  const FileInput = {
5
- type: "Control",
6
- scope: "#/properties/docAggrementCopy",
7
- options: {
8
- widget: "FileInputField",
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
- 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
- // iconStyleDefault:true,
18
- },
19
- style: {
20
- backgroundColor: "none",
21
- },
20
+ style: {
21
+ backgroundColor: "none",
22
22
  },
23
- };
24
- export const buildFileInput = (config,componentScope) => {
25
- const box: any = _.cloneDeep(FileInput);
26
- box.scope = componentScope;
27
- box.config.main.label = config.label
28
- if(config.layout){
29
- box.config.layout = createLayoutFormat(config.layout)
30
- }
31
- if (config.style) {
32
- box.config.style = JSON.parse(config.style)
33
- }
34
- if (config.variant) {
35
- box.config.main.variant = config.variant
36
- }
37
- if (config.disableUpload) {
38
- box.config.main.disableUpload = config.disableUpload === "YES" ? true : false;
39
- }
40
- if (config.disableDownload) {
41
- box.config.main.disableDownload = config.disableDownload === "YES" ? true : false;
42
- }
43
- if (config.disableDelete) {
44
- box.config.main.disableDelete = config.disableDelete === "YES" ? true : false;
45
- }
46
- if(config.description){
47
- box.config.main.description = config.description;
48
- }
49
- if(config.toolTip){
50
- box.config.main.toolTip = config.toolTip;
51
- }
52
- if (config.toolTipPosition) {
53
- box.config.main.toolTipPosition = config.toolTipPosition;
54
- }
55
- 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;
56
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
+ }
@@ -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
 
@@ -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 = flatObjectValueInArray(config.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.barStyle.colorRange = flatObjectValueInArray(config.pieArcColors);
28
+ horizontalBarGraph.config.style.colorMap = createKeyValueMap(config.pieArcColors);
29
29
  }
30
30
  if (config.xAxisValue) {
31
31
  horizontalBarGraph.config.main.xAxisValue = config.xAxisValue;