impaktapps-ui-builder 0.0.961 → 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.961",
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
  };
@@ -101,22 +101,20 @@ export default (funcParams: funcParamsProps) => {
101
101
  type: "HorizontalLayout",
102
102
  config: {
103
103
  main: {
104
- direction: 'row'
104
+ direction: "row",
105
105
  },
106
106
  style: {
107
107
  flexDirection: "row",
108
108
  position: "absolute",
109
109
  bottom: 0,
110
- marginBottom: '-8px',
111
- height: 'fit-content',
112
- overflow: 'hidden',
110
+ height: "fit-content",
111
+ overflow: "hidden",
113
112
  zIndex: 1000,
114
- width: 'inherit'
115
- }
113
+ width: "inherit",
114
+ },
116
115
  },
117
116
  elements: [
118
117
  {
119
-
120
118
  type: "Control",
121
119
  scope: "#/properties/FooterText",
122
120
  options: {
@@ -124,83 +122,85 @@ export default (funcParams: funcParamsProps) => {
124
122
  },
125
123
  config: {
126
124
  main: {
127
- heading: "Copywriter@ACT21.IO"
125
+ heading: "Copywriter@ACT21.IO",
128
126
  },
129
127
  style: {
130
- color: theme?.palette?.text.disabled || "#AFAFAF",
131
- fontSize: '12px',
132
- textAlign: 'center',
133
- lineHeight: 1,
134
- width: 'fit-content',
135
- left: '50%',
136
- position: 'relative',
128
+ color: theme?.palette?.text?.disabled || "#AFAFAF",
129
+ fontSize: "12px",
130
+ textAlign: "center",
131
+ lineHeight: 2,
132
+ width: "fit-content",
133
+ left: "50%",
134
+ position: "relative",
137
135
  margin: 0,
138
136
  flexGrow: 1,
139
- height: 0
140
- }
137
+ height: 0,
138
+ transform: "translate(-50%, 0%)",
139
+ },
141
140
  },
142
141
  },
143
142
  {
144
143
  type: "Control",
145
- scope: "#/properties/backIcon",
144
+ scope: "#/properties/FooterBackIcon",
146
145
  options: {
147
146
  widget: "Box",
148
147
  },
149
148
  config: {
150
149
  main: {
151
- iconName: 'PrevIcon',
150
+ iconName: "PrevIcon",
152
151
  onClick: "backHandler",
153
- width: 'fit-content',
152
+ width: "fit-content",
154
153
  },
155
154
  style: {
156
- fill: theme.palette.primary.main,
155
+ fill: theme?.palette?.primary?.main,
157
156
  width: 20,
158
157
  height: 0,
159
- margin: 0,
158
+ // margin: 0,
160
159
  top: 0,
161
- right: {xs: '12px', sm: '84px'},
162
- position: 'absolute',
163
- fontSize: '12px',
164
- cursor: 'pointer',
165
- ':hover': {
166
- fill: theme.palette.primary.dark,
167
- }
168
- }
169
- }
160
+ right: { xs: "12px", sm: "84px" },
161
+ position: "absolute",
162
+ fontSize: "12px",
163
+ cursor: "pointer",
164
+ ":hover": {
165
+ fill: theme?.palette?.primary?.dark,
166
+ },
167
+ marginRight: "13px",
168
+ },
169
+ },
170
170
  },
171
171
  {
172
172
  type: "Control",
173
- scope: "#/properties/text",
174
-
173
+ scope: "#/properties/FooterBackHandlerText",
175
174
  options: {
176
175
  widget: "Box",
177
176
  },
178
177
  config: {
179
178
  main: {
180
179
  heading: "Previous Page",
181
- onClick: "backHandler"
180
+ onClick: "backHandler",
182
181
  },
183
182
  style: {
184
- display: {xs: 'none', sm: "flex"},
185
- textAlign: 'left',
183
+ display: { xs: "none", sm: "flex" },
184
+ textAlign: "left",
186
185
  lineHeight: 1,
187
186
  height: 0,
188
- width: 'fit-content',
189
- color: theme.palette.primary.main,
190
- fontSize: "12px",
191
- cursor: 'pointer',
192
- marginLeft: '2px',
193
- marginRight: 0,
187
+ width: "fit-content",
188
+ color: theme?.palette?.primary?.main,
189
+ fontSize: "14px",
190
+ cursor: "pointer",
191
+ marginLeft: "2px",
192
+
194
193
  top: 3,
195
- right: '12px',
196
- position: 'absolute',
197
- ':hover': {
198
- color: theme.palette.primary.dark,
199
- }
200
- }
194
+ right: "12px",
195
+ position: "absolute",
196
+ ":hover": {
197
+ color: theme?.palette?.primary?.dark,
198
+ },
199
+ marginRight: "4px",
200
+ },
201
201
  },
202
202
  },
203
- ]
203
+ ],
204
204
  }
205
205
  );
206
206
  const schema = pageData?.schema ?? { type: "object", properties: {} };