impaktapps-ui-builder 0.0.962 → 0.0.963

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.
@@ -8,6 +8,7 @@ export declare const BarGraph: {
8
8
  main: {};
9
9
  style: {
10
10
  containerStyle: {};
11
+ labelStyle: {};
11
12
  };
12
13
  };
13
14
  };
@@ -69,6 +70,8 @@ export declare const HorizontalBarGraph: {
69
70
  main: {
70
71
  type: string;
71
72
  };
72
- style: {};
73
+ style: {
74
+ labelStyle: {};
75
+ };
73
76
  };
74
77
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "impaktapps-ui-builder",
3
- "version": "0.0.962",
3
+ "version": "0.0.963",
4
4
  "scripts": {
5
5
  "dev": "vite",
6
6
  "build": "tsc && vite build",
@@ -2,43 +2,48 @@ import { createLayoutFormat } from "./buildConfig";
2
2
  import { HorizontalBarGraph } from "./uischema/graph";
3
3
  import _ from "lodash";
4
4
 
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);
11
- }
12
- horizontalBarGraph.config.main.type = config.graphType;
13
- horizontalBarGraph.scope = componentScope;
14
- horizontalBarGraph.config.main.header = config.heading;
15
- if (config.barColor) {
16
- horizontalBarGraph.config.barStyle.color = config.barColor;
17
- }
18
- if (config.xAxisValue) {
19
- horizontalBarGraph.config.main.xAxisValue = config.xAxisValue;
20
- }
21
- if (config.containerBackground) {
22
- horizontalBarGraph.config.containerStyle.background =
23
- config.containerBackground;
24
- }
25
- if (config.height) {
26
- horizontalBarGraph.config.style =
27
- {
5
+ const buildHorizontalBarGraph = (config: any, componentScope: string) => {
6
+ const horizontalBarGraph: any = _.cloneDeep(HorizontalBarGraph);
7
+ horizontalBarGraph.scope = componentScope;
8
+ if (config.layout) {
9
+ horizontalBarGraph.config.layout = createLayoutFormat(config.layout);
10
+ }
11
+ horizontalBarGraph.config.main.type = config.graphType;
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.xAxisValue) {
18
+ horizontalBarGraph.config.main.xAxisValue = config.xAxisValue;
19
+ }
20
+ if (config.containerBackground) {
21
+ horizontalBarGraph.config.containerStyle.background =
22
+ config.containerBackground;
23
+ }
24
+ if (config.height) {
25
+ horizontalBarGraph.config.style = {
28
26
  containerStyle: {
29
- height: config.height
30
- }
31
- }
32
-
33
- }
34
- if (config.bottomLabel) {
35
- horizontalBarGraph.config.main.bottomLabel =
36
- config.bottomLabel;
37
- }
38
- if (config.leftLabel) {
39
- horizontalBarGraph.config.main.leftLabel = config.leftLabel;
40
- }
41
- return horizontalBarGraph
42
- }
27
+ height: config.height,
28
+ },
29
+ };
30
+ }
31
+ if (config.bottomLabel) {
32
+ horizontalBarGraph.config.main.bottomLabel = config.bottomLabel;
33
+ }
34
+ if (config.leftLabel) {
35
+ horizontalBarGraph.config.main.leftLabel = config.leftLabel;
36
+ }
37
+ if (config.leftLabelMargin) {
38
+ horizontalBarGraph.config.style.labelStyle.margin = {
39
+ left: config.leftLabelMargin,
40
+ };
41
+ }
42
+ if (config.leftLabelOffset) {
43
+ horizontalBarGraph.config.style.labelStyle.leftLabelOffset =
44
+ config.leftLabelOffset;
45
+ }
46
+ return horizontalBarGraph;
47
+ };
43
48
 
44
- export default buildHorizontalBarGraph
49
+ export default buildHorizontalBarGraph;
@@ -33,6 +33,15 @@ export const buildLineGraph = (config, componentScope) => {
33
33
  if (config.pieArcColors) {
34
34
  lineGraph.config.style.lineStyle.colorRange = flatObjectValueInArray(config.pieArcColors);
35
35
  }
36
+ if (config.leftLabelMargin) {
37
+ lineGraph.config.style.labelStyle.margin = {
38
+ left: config.leftLabelMargin,
39
+ };
40
+ }
41
+ if (config.leftLabelOffset) {
42
+ lineGraph.config.style.labelStyle.leftLabelOffset =
43
+ config.leftLabelOffset;
44
+ }
36
45
  lineGraph.scope = componentScope;
37
46
  return lineGraph;
38
47
  }
@@ -27,6 +27,15 @@ export const buildStackbarGraph = (config:any,componentScope:string) => {
27
27
  if (config.leftLabel) {
28
28
  barGraph.config.main.leftLabel = config.leftLabel;
29
29
  }
30
+ if (config.leftLabelMargin) {
31
+ barGraph.config.style.labelStyle.margin = {
32
+ left: config.leftLabelMargin,
33
+ };
34
+ }
35
+ if (config.leftLabelOffset) {
36
+ barGraph.config.style.labelStyle.leftLabelOffset =
37
+ config.leftLabelOffset;
38
+ }
30
39
  barGraph.scope = componentScope;
31
40
  return barGraph;
32
41
  }
@@ -407,6 +407,8 @@ export const buildPropertiesSection = function (type: String) {
407
407
  ]),
408
408
  getInputField("leftLabel", "Left Label"),
409
409
  getInputField("bottomLabel", "Bottom Label"),
410
+ getInputField("leftLabelMargin", "Left Label Margin"),
411
+ getInputField("leftLabelOffset", "Left Label Offset"),
410
412
  emptyBox("GraphEmpty1", {xs: 6, sm: 0, md: 0, lg: 0 }),
411
413
  getRadioInputField("legendHide", "Legend Hide", ["YES", "No"]),
412
414
  getInputField("yAxisValue", "Y-AxisValue"),
@@ -8,7 +8,7 @@ export const BarGraph = {
8
8
  config: {
9
9
  main: {
10
10
  },
11
- style: { containerStyle: {} }
11
+ style: { containerStyle: {},labelStyle:{} }
12
12
  },
13
13
  };
14
14
 
@@ -72,7 +72,7 @@ export const HorizontalBarGraph = {
72
72
  type: "HorizontalBarGraph",
73
73
  },
74
74
  style:{
75
-
75
+ labelStyle:{}
76
76
  }
77
77
  },
78
78
  };