impaktapps-ui-builder 0.0.382-alpha.50 → 0.0.382-alpha.52

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "impaktapps-ui-builder",
3
- "version": "0.0.382-alpha.50",
3
+ "version": "0.0.382-alpha.52",
4
4
  "scripts": {
5
5
  "dev": "vite",
6
6
  "build": "tsc && vite build",
@@ -3,33 +3,37 @@ import { HorizontalBarGraph } from "./uischema/graph";
3
3
  import _ from "lodash";
4
4
 
5
5
 
6
- const buildHorizontalBarGraph = (config:any,componentScope:string) => {
7
- const horizontalBarGraph: any = _.cloneDeep(HorizontalBarGraph);
8
- horizontalBarGraph.scope = componentScope;
9
- if (config.layout) {
10
- horizontalBarGraph.config.layout = createLayoutFormat(config.layout);
6
+ const buildHorizontalBarGraph = (config: any, componentScope: string) => {
7
+ const horizontalBarGraph: any = _.cloneDeep(HorizontalBarGraph);
8
+ horizontalBarGraph.scope = componentScope;
9
+ if (config.layout) {
10
+ horizontalBarGraph.config.layout = createLayoutFormat(config.layout);
11
+ }
12
+ horizontalBarGraph.scope = componentScope;
13
+ horizontalBarGraph.config.main.header = config.heading;
14
+ if (config.barColor) {
15
+ horizontalBarGraph.config.barStyle.color = config.barColor;
16
+ }
17
+ if (config.containerBackground) {
18
+ horizontalBarGraph.config.containerStyle.background =
19
+ config.containerBackground;
20
+ }
21
+ if (config.height) {
22
+ horizontalBarGraph.config.style =
23
+ {
24
+ containerStyle: {
25
+ height: config.height
26
+ }
11
27
  }
12
- horizontalBarGraph.scope = componentScope;
13
- horizontalBarGraph.config.main.header = config.heading;
14
- if (config.barColor) {
15
- horizontalBarGraph.config.barStyle.color = config.barColor;
16
- }
17
- if (config.containerBackground) {
18
- horizontalBarGraph.config.containerStyle.background =
19
- config.containerBackground;
20
- }
21
- if (config.height) {
22
- horizontalBarGraph.config.style.containerStyle.height =
23
- config.height;
24
- }
25
- if (config.bottomLabel) {
26
- horizontalBarGraph.config.main.bottomLabel =
27
- config.bottomLabel;
28
- }
29
- if (config.leftLabel) {
30
- horizontalBarGraph.config.main.leftLabel = config.leftLabel;
31
- }
32
- return horizontalBarGraph
28
+ }
29
+ if (config.bottomLabel) {
30
+ horizontalBarGraph.config.main.bottomLabel =
31
+ config.bottomLabel;
32
+ }
33
+ if (config.leftLabel) {
34
+ horizontalBarGraph.config.main.leftLabel = config.leftLabel;
35
+ }
36
+ return horizontalBarGraph
33
37
  }
34
38
 
35
39
  export default buildHorizontalBarGraph
@@ -8,7 +8,12 @@ export const buildPieGraph = (config,componentScope) =>{
8
8
  pieGraph.config.layout = createLayoutFormat(config.layout);
9
9
  }
10
10
  if (config.height) {
11
- pieGraph.config.style.containerStyle.height = config.height;
11
+ pieGraph.config.style =
12
+ {
13
+ containerStyle: {
14
+ height: config.height
15
+ }
16
+ };
12
17
  }
13
18
  if (config.legendHide) {
14
19
  pieGraph.config.main.legendAvailabe = config.legendHide==="YES"?false:true;