impaktapps-ui-builder 0.0.87 → 0.0.89-graphTest.1

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.
@@ -5,6 +5,12 @@ export declare const BarGraph: {
5
5
  widget: string;
6
6
  };
7
7
  config: {
8
+ layout: {
9
+ xs: number;
10
+ sm: number;
11
+ md: number;
12
+ lg: number;
13
+ };
8
14
  main: {};
9
15
  style: {
10
16
  containerStyle: {};
@@ -18,6 +24,12 @@ export declare const PieGraph: {
18
24
  widget: string;
19
25
  };
20
26
  config: {
27
+ layout: {
28
+ xs: number;
29
+ sm: number;
30
+ md: number;
31
+ lg: number;
32
+ };
21
33
  main: {
22
34
  type: string;
23
35
  };
@@ -31,7 +43,12 @@ export declare const LineGraph: {
31
43
  widget: string;
32
44
  };
33
45
  config: {
34
- layout: number;
46
+ layout: {
47
+ xs: number;
48
+ sm: number;
49
+ md: number;
50
+ lg: number;
51
+ };
35
52
  main: {
36
53
  type: string;
37
54
  header: string;
@@ -66,6 +83,12 @@ export declare const HorizontalBarGraph: {
66
83
  widget: string;
67
84
  };
68
85
  config: {
86
+ layout: {
87
+ xs: number;
88
+ sm: number;
89
+ md: number;
90
+ lg: number;
91
+ };
69
92
  main: {
70
93
  type: string;
71
94
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "impaktapps-ui-builder",
3
- "version": "0.0.87",
3
+ "version": "0.0.89-graphTest.1",
4
4
  "scripts": {
5
5
  "dev": "vite",
6
6
  "build": "tsc && vite build",
@@ -12,6 +12,12 @@ const buildHorizontalBarGraph = (config:any,componentScope:string) => {
12
12
  horizontalBarGraph.config.main.type = config.graphType;
13
13
  horizontalBarGraph.scope = componentScope;
14
14
  horizontalBarGraph.config.main.header = config.heading;
15
+ if (config.legendHide) {
16
+ horizontalBarGraph.config.main.legendAvailable = config.legendHide==="YES"?false:true;
17
+ }
18
+ if (config.bottomAxisAngle) {
19
+ horizontalBarGraph.config.main.bottomAxisAngle = config.bottomAxisAngle==="YES"?true:false;
20
+ }
15
21
  if (config.barColor) {
16
22
  horizontalBarGraph.config.barStyle.color = config.barColor;
17
23
  }
@@ -26,6 +26,9 @@ export const buildLineGraph = (config, componentScope) => {
26
26
  if (config.legendHide) {
27
27
  lineGraph.config.main.legendAvailabe = config.legendHide==="YES"?false:true;
28
28
  }
29
+ if (config.bottomAxisAngle) {
30
+ lineGraph.config.main.bottomAxisAngle = config.bottomAxisAngle==="YES"?true:false;
31
+ }
29
32
  if (config.legendLabels) {
30
33
  lineGraph.config.main.tooltipDataKey = flatObjectValueInArray(config.legendLabels);
31
34
  }
@@ -9,6 +9,10 @@ export const buildStackbarGraph = (config:any,componentScope:string) => {
9
9
  }
10
10
  if (config.legendHide) {
11
11
  barGraph.config.main.legendAvailable = config.legendHide;
12
+ barGraph.config.main.legendAvailable = config.legendHide==="YES"?false:true;
13
+ }
14
+ if (config.bottomAxisAngle) {
15
+ barGraph.config.main.bottomAxisAngle = config.bottomAxisAngle==="YES"?true:false;
12
16
  }
13
17
  barGraph.config.main.type = config.graphType;
14
18
  barGraph.config.main.header = config.heading;
@@ -172,7 +172,7 @@ export const buildWrapper = (label: string, elements: any[]) => {
172
172
  width: "108%"
173
173
  },
174
174
  componentsBoxStyle: {
175
- marginLeft: "24px",
175
+ marginLeft: "12px",
176
176
  },
177
177
  defaultStyle: true
178
178
  },
@@ -408,7 +408,7 @@ export const buildPropertiesSection = function (type: String) {
408
408
  getRadioInputField("legendHide", "Legend Hide", ["YES", "No"]),
409
409
  getInputField("yAxisValue", "Y-AxisValue"),
410
410
  getInputField("xAxisValue", "X-AxisValue"),
411
- emptyBox("GraphEmpty2"),
411
+ getRadioInputField("bottomAxisAngle", "Bottom Axis Angled", ["YES", "No"]),
412
412
  getArrayControl("legendLabels", "label"),
413
413
  getArrayControl("pieArcColors", "color"),
414
414
  ];
@@ -6,6 +6,7 @@ export const BarGraph = {
6
6
  },
7
7
 
8
8
  config: {
9
+ layout: {xs :12,sm:12,md:12,lg:6},
9
10
  main: {
10
11
  },
11
12
  style: { containerStyle: {} }
@@ -19,6 +20,7 @@ export const PieGraph = {
19
20
  widget: "Graph",
20
21
  },
21
22
  config: {
23
+ layout: {xs :12,sm:12,md:12,lg:6},
22
24
  main: {
23
25
  type: "PieGraph",
24
26
  },
@@ -32,7 +34,7 @@ export const LineGraph = {
32
34
  widget: "Graph",
33
35
  },
34
36
  config: {
35
- layout: 12,
37
+ layout: {xs :12,sm:12,md:12,lg:6},
36
38
  main: {
37
39
  type: "LineGraph",
38
40
  header: "Quartely Incentive in Thousand",
@@ -68,6 +70,7 @@ export const HorizontalBarGraph = {
68
70
  widget: "Graph",
69
71
  },
70
72
  config: {
73
+ layout: {xs :12,sm:12,md:12,lg:6},
71
74
  main: {
72
75
  type: "HorizontalBarGraph",
73
76
  },
@@ -146,7 +146,7 @@ function executeCustomHandler(params: handlersProps) {
146
146
  }
147
147
 
148
148
  function mergeFormdata(handlerResponse: any, componentName: string, eventConfig: any, store: any, service: any, formDataHolder: any) {
149
- if (eventConfig.type === "Select" && !(_.isEmpty(handlerResponse?.data) && handlerResponse?.data)) {
149
+ if (eventConfig.type === "Select" && handlerResponse?.data) {
150
150
  store.setSchema((pre) => {
151
151
  return {
152
152
  ...pre, properties: {
@@ -158,7 +158,7 @@ function mergeFormdata(handlerResponse: any, componentName: string, eventConfig:
158
158
  }
159
159
  })
160
160
  }
161
- else if (eventConfig.type === "MultipleSelect" && !(_.isEmpty(handlerResponse?.data) && handlerResponse?.data)) {
161
+ else if (eventConfig.type === "MultipleSelect" && handlerResponse?.data) {
162
162
  store.setSchema((pre) => {
163
163
  return {
164
164
  ...pre, properties: {
@@ -93,7 +93,7 @@ export default (funcParams: funcParamsProps) => {
93
93
  const event = new CustomEvent('pageNameChanged', {
94
94
  detail: { pageName: config.label }
95
95
  });
96
- window.dispatchEvent(event)
96
+ // window.dispatchEvent(event)
97
97
  const theme = funcParams?.store?.theme?.myTheme;
98
98
  uiSchema.elements.push(
99
99
 
@@ -130,13 +130,14 @@ export default (funcParams: funcParamsProps) => {
130
130
  color: theme?.palette?.text.disabled || "#AFAFAF",
131
131
  fontSize: '12px',
132
132
  textAlign: 'center',
133
- lineHeight: 1,
133
+ lineHeight: 2,
134
134
  width: 'fit-content',
135
135
  left: '50%',
136
136
  position: 'relative',
137
137
  margin: 0,
138
138
  flexGrow: 1,
139
- height: 0
139
+ height: 0,
140
+ transform: "translate(-50%,0%)"
140
141
  }
141
142
  },
142
143
  },
@@ -204,7 +205,6 @@ export default (funcParams: funcParamsProps) => {
204
205
  }
205
206
  );
206
207
  const schema = pageData?.schema ?? { type: "object", properties: {} };
207
- eventGroups = {}
208
208
  eventGroups = extractEvents(config);
209
209
  executeEventsParameters = {
210
210
  config: {}, componentName: "",
@@ -220,7 +220,7 @@ export default (funcParams: funcParamsProps) => {
220
220
  funcParams.store.setSchema(
221
221
  (pre: any) => {
222
222
  return {
223
- ...schema, properties:
223
+ ...schema,...pre, properties:
224
224
  { ...schema.properties, ...pre.properties, }
225
225
  }
226
226
  }