impaktapps-ui-builder 0.0.412-mtreemap.22 → 0.0.412-mtreemap.24

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.
@@ -1,4 +1,4 @@
1
- export declare const EventSection: {
1
+ export declare const EventSection: (theme: any) => {
2
2
  type: string;
3
3
  elements: {
4
4
  type: string;
@@ -59,7 +59,7 @@ export declare const EventSection: {
59
59
  onClick: string;
60
60
  };
61
61
  style: {
62
- color: string;
62
+ color: any;
63
63
  };
64
64
  };
65
65
  accessorKeyName?: undefined;
@@ -1,4 +1,4 @@
1
- export declare const TableSection: {
1
+ export declare const TableSection: (theme: any) => {
2
2
  type: string;
3
3
  elements: {
4
4
  type: string;
@@ -60,6 +60,30 @@ export declare const TableSection: {
60
60
  onClick: string;
61
61
  tooltipMessage: string;
62
62
  };
63
+ style: {
64
+ color: any;
65
+ };
66
+ };
67
+ };
68
+ accessorKey?: undefined;
69
+ } | {
70
+ header: string;
71
+ field: string;
72
+ flex: number;
73
+ widget: {
74
+ type: string;
75
+ scope: string;
76
+ options: {
77
+ widget: string;
78
+ };
79
+ config: {
80
+ main: {
81
+ icon: string;
82
+ color: string;
83
+ onClick: string;
84
+ tooltipMessage: string;
85
+ };
86
+ style?: undefined;
63
87
  };
64
88
  };
65
89
  accessorKey?: undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "impaktapps-ui-builder",
3
- "version": "0.0.412-mtreemap.22",
3
+ "version": "0.0.412-mtreemap.24",
4
4
  "scripts": {
5
5
  "dev": "vite",
6
6
  "build": "tsc && vite build",
@@ -15,10 +15,6 @@ export const buildStackbarGraph = (config:any,componentScope:string) => {
15
15
  if (config.barColor) {
16
16
  barGraph.config.barStyle.color = config.barColor;
17
17
  }
18
- // if (config.containerBackground) {
19
- // barGraph.config.containerStyle.background =
20
- // config.containerBackground;
21
- // }
22
18
  if (config.height) {
23
19
  barGraph.config.style.containerStyle.height = config.height;
24
20
  }
@@ -28,6 +24,6 @@ export const buildStackbarGraph = (config:any,componentScope:string) => {
28
24
  if (config.leftLabel) {
29
25
  barGraph.config.main.leftLabel = config.leftLabel;
30
26
  }
31
- // barGraph.scope = componentScope;
27
+ barGraph.scope = componentScope;
32
28
  return barGraph;
33
29
  }
@@ -1,58 +1,7 @@
1
- export const EventSection = {
1
+ export const EventSection = (theme)=>{
2
+ const uiSchema = {
2
3
  type: "HorizontalLayout",
3
4
  elements: [
4
- // {
5
- // type: "WrapperLayout",
6
- // config: {
7
- // main: {
8
- // // label: "Table Columns",
9
- // divider: true,
10
- // },
11
- // wrapperStyle: {
12
- // border:"1px solid gray"
13
- // },
14
- // },
15
- // elements: [
16
- // {
17
- // type: "Control",
18
- // scope: "#/properties/programType",
19
-
20
- // options: {
21
- // widget: "Box",
22
- // },
23
- // config: {
24
- // layout: 8,
25
- // main: {
26
- // heading: "Event Table",
27
- // },
28
- // style: {
29
- // fontFamily: "Roboto",
30
- // fontWeight: "500",
31
- // paddingLeft:"-10px",
32
- // fontSize: "20px",},
33
- // },
34
- // },
35
- // {
36
- // type: "Control",
37
- // scope: "#/properties/Back_Button",
38
-
39
- // options: {
40
- // widget: "IconButton",
41
- // },
42
- // config: {
43
- // layout: 3,
44
- // main: {
45
- // icon: "AddIcon",
46
- // styleDefault: true,
47
- // size: "small",
48
- // onClick: "eventAddHandler",
49
- // tooltipMessage: "Back",
50
- // },
51
- // style: {
52
- // float: "right",
53
- // },
54
- // },
55
- // },
56
5
  {
57
6
  type: "Control",
58
7
  scope: "#/properties/events",
@@ -123,7 +72,7 @@ export const EventSection = {
123
72
  onClick: "eventEditHandler",
124
73
  },
125
74
  style: {
126
- color: "#3949ab",
75
+ color: theme,
127
76
  },
128
77
  },
129
78
  },
@@ -151,6 +100,8 @@ export const EventSection = {
151
100
  },
152
101
  ]
153
102
  }]}
103
+ return uiSchema
104
+ }
154
105
  // ]}
155
106
 
156
107
  export const EventSectionSchema = {
@@ -7,72 +7,7 @@ export const BarGraph = {
7
7
 
8
8
  config: {
9
9
  main: {
10
- // header: "Bar Graph",
11
- // bottomLabel: "Name of Employe",
12
- // numTicks: 6,
13
- // leftLabel: "Value in lakhs",
14
- // axisLeft: true,
15
- // axisBottom: true,
16
-
17
- // hideTicks: false,
18
- // hideLeftAxisLine: false,
19
- // hideBottomAxisLine: false,
20
- // bottomAxisWidth: "10px",
21
- // legend: {
22
- // labelColor: "green",
23
- // legendTitle: "",
24
- // direction: "row",
25
- // align: "none",
26
-
27
- // },
28
10
  },
29
- // style: {
30
- // containerStyle: {
31
- // // width:"100%",
32
- // // height:"450",
33
-
34
- // },
35
- // headerStyle: {
36
- // // color:"white"
37
- // },
38
- // tooltipStyle: {
39
-
40
-
41
- // },
42
- // // labelStyle: { margin:{left:80,bottom:20},
43
- // // leftLabelOffset: 50,
44
- // // bottomLabelOffset:10
45
- // // },
46
- // barStyle: {
47
- // // color:{
48
- // // firstBarColor:"#6c5efb",
49
- // // secondBarColor:"#3f51b5"
50
- // // "#6c5efb"#3f51b5
51
- // // secondColor:"#3e50b3"
52
- // // }
53
- // },
54
- // legendStyle: {
55
- // legend: {
56
- // // lineHeight: "0.9em",
57
- // // fontSize: "8px",
58
- // // fontFamily: "arial",
59
- // // padding: "10px 10px",
60
- // // width:"30%",
61
- // // display:"flex",
62
- // // justifyContent:"center",
63
- // // border: "1px solid rgba(255, 255, 255, 0.3)",
64
- // // borderRadius: " 8px",
65
- // // marginRight: "auto",
66
-
67
- // },
68
- // legendTitle: {
69
- // // fontSize: "10px",
70
- // // marginBottom: "10px",
71
- // // fontWeight: "100",
72
-
73
- // },
74
- // },
75
- // },
76
11
  },
77
12
  };
78
13
 
@@ -84,39 +19,8 @@ export const PieGraph = {
84
19
  },
85
20
  config: {
86
21
  main: {
87
- // header: "Incentive Branch category wise",
88
22
  type: "PieGraph",
89
- // bottomLabel: "Name of Employe",
90
- // leftLabel: "Value",
91
- // tooltipDataKey: ["HDFC", "SBI", "Kotak","Sbi"],
92
- // axisLeft: true,
93
- // axisBottom: true,
94
- // legendAvailable: true,
95
- // legend: {
96
- // labelColor: "green",
97
- // legendTitle: "Branches",
98
- // direction: "row",
99
- // align: "right",
100
- // },
101
23
  },
102
-
103
- // style: {
104
- // containerStyle: {
105
- // height:"340"
106
- // },
107
- // headerStyle: {},
108
- // tooltipStyle: {
109
- // // width: "100%",
110
- // backgroundColor:"black",
111
- // width:"80px"
112
- // },
113
- // labelStyle: {},
114
- // legendStyle: {
115
- // legend: {},
116
- // legendTitle: {},
117
- // },
118
- // pieStyle: {},
119
- // },
120
24
  },
121
25
  };
122
26
  export const LineGraph = {
@@ -164,28 +68,7 @@ export const HorizontalBarGraph = {
164
68
  },
165
69
  config: {
166
70
  main: {
167
- // header: " ",
168
71
  type: "HorizontalBarGraph",
169
- // bottomLabel: " ",
170
- // leftLabel: "Value",
171
- // axisLeft: false,
172
- // axisBottom: true,
173
- // hideBottomTicks: false,
174
- // hideLeftTicks: false,
175
- // hideLeftAxisLine: true,
176
- // hideBottomAxisLine: false,
177
- // bottomAxisWidth: "10px",
178
72
  },
179
- // style: {
180
- // containerStyle: {
181
- // width:"100%"
182
- // },
183
- // headerStyle: {},
184
- // tooltipStyle: {},
185
- // labelStyle: {},
186
- // barStyle: {
187
- // color: "#6c5efb",
188
- // },
189
- // },
190
73
  },
191
74
  };
@@ -1,150 +1,106 @@
1
- export const TableSection = {
2
- type: "HorizontalLayout",
3
- elements: [
4
- // {
5
- // type: "WrapperLayout",
6
- // config: {
7
- // main: {
8
- // // label: "Table Columns",
9
- // // divider: true,
10
- // },
11
- // wrapperStyle: {
12
- // border:"1px solid gray"
13
- // },
14
- // },
15
- // elements: [
16
- // {
17
- // type: "Control",
18
- // scope: "#/properties/programType",
19
-
20
- // options: {
21
- // widget: "Box",
22
- // },
23
- // config: {
24
- // layout: 8,
25
- // main: {
26
- // heading: "Components Table",
27
- // },
28
- // style: {
29
- // fontFamily: "Roboto",
30
- // fontWeight: "500",
31
- // paddingLeft:"-10px",
32
- // fontSize: "20px",},
33
- // },
34
- // },
35
- // {
36
- // type: "Control",
37
- // scope: "#/properties/Back_Button",
38
-
39
- // options: {
40
- // widget: "IconButton",
41
- // },
42
- // config: {
43
- // layout: 3,
44
- // main: {
45
- // icon: "AddIcon",
46
- // styleDefault: true,
47
- // size: "small",
48
- // onClick: "widgetAddClickHandler",
49
- // tooltipMessage: "Add New",
50
- // },
51
- // style: {
52
- // float: "right",
53
- // },
54
- // },
55
- // },
56
- {
57
- type: "Control",
58
- scope: "#/properties/elements",
59
- options: {
60
- widget: "Table",
61
- },
62
- config: {
63
- main: {
64
- headerIcons: {
65
- elements: [
66
- {
67
- widget: {
68
- type: "Control",
69
- scope: "#/properties/New_Record",
1
+ export const TableSection = (theme) => {
2
+ const uiSchema = {
3
+ type: "HorizontalLayout",
4
+ elements: [
5
+ {
6
+ type: "Control",
7
+ scope: "#/properties/elements",
8
+ options: {
9
+ widget: "Table",
10
+ },
11
+ config: {
12
+ main: {
13
+ headerIcons: {
14
+ elements: [
15
+ {
16
+ widget: {
17
+ type: "Control",
18
+ scope: "#/properties/New_Record",
70
19
 
71
- options: {
72
- widget: "IconButton",
73
- },
74
- config: {
75
- main: {
76
- color: "info",
77
- onClick: "widgetAddClickHandler",
78
- size: "small",
79
- icon: "AddIcon",
80
- iconLabel: "Add New",
81
- styleDefault: true,
20
+ options: {
21
+ widget: "IconButton",
82
22
  },
83
- style: {
84
- mt: "6px",
23
+ config: {
24
+ main: {
25
+ color: "info",
26
+ onClick: "widgetAddClickHandler",
27
+ size: "small",
28
+ icon: "AddIcon",
29
+ iconLabel: "Add New",
30
+ styleDefault: true,
31
+ },
32
+ style: {
33
+ mt: "6px",
34
+ },
85
35
  },
86
- },
87
- }
88
- },
89
- ]
90
- },
91
- disableAction: true,
92
- disableSelection: true,
93
- enableDrag: true,
36
+ }
37
+ },
38
+ ]
39
+ },
40
+ disableAction: true,
41
+ disableSelection: true,
42
+ enableDrag: true,
94
43
 
44
+ },
95
45
  },
96
- },
97
- elements: [
98
- {
99
- accessorKey: "name",
100
- header: "Name"
101
- },
102
- {
103
- accessorKey: "type",
104
- header: "Type"
105
- },
106
- {
107
- header: "Edit Record",
108
- field: "Reject_Records",
109
- flex: 1,
110
- widget: {
111
- type: "Control",
112
- scope: "#/properties/RejectButton",
113
- options: {
114
- widget: "IconButton",
115
- },
116
- config: {
117
- main: {
118
- icon: "EditIcon",
119
- color: "primary",
120
- onClick: "editComponents",
121
- tooltipMessage: "Reject This Record",
46
+ elements: [
47
+ {
48
+ accessorKey: "name",
49
+ header: "Name"
50
+ },
51
+ {
52
+ accessorKey: "type",
53
+ header: "Type"
54
+ },
55
+ {
56
+ header: "Edit Record",
57
+ field: "Reject_Records",
58
+ flex: 1,
59
+ widget: {
60
+ type: "Control",
61
+ scope: "#/properties/RejectButton",
62
+ options: {
63
+ widget: "IconButton",
64
+ },
65
+ config: {
66
+ main: {
67
+ icon: "EditIcon",
68
+ color: "primary",
69
+ onClick: "editComponents",
70
+ tooltipMessage: "Reject This Record",
71
+ },
72
+
73
+ style: {
74
+ color: theme.palette.primary.main,
75
+ },
122
76
  },
123
77
  },
124
78
  },
125
- },
126
- {
127
- header: "Delete",
128
- field: "Reject_Records",
129
- flex: 1,
130
- widget: {
131
- type: "Control",
132
- scope: "#/properties/RejectButton",
133
- options: {
134
- widget: "IconButton",
135
- },
136
- config: {
137
- main: {
138
- icon: "RejectIcon",
139
- color: "error",
140
- onClick: "deletePopUpComponent",
141
- tooltipMessage: "Reject This Record",
79
+ {
80
+ header: "Delete",
81
+ field: "Reject_Records",
82
+ flex: 1,
83
+ widget: {
84
+ type: "Control",
85
+ scope: "#/properties/RejectButton",
86
+ options: {
87
+ widget: "IconButton",
88
+ },
89
+ config: {
90
+ main: {
91
+ icon: "RejectIcon",
92
+ color: "error",
93
+ onClick: "deletePopUpComponent",
94
+ tooltipMessage: "Reject This Record",
95
+ },
142
96
  },
143
97
  },
144
- },
145
- }
146
- ]
147
- }]
98
+ }
99
+ ]
100
+ }]
101
+ }
102
+
103
+ return uiSchema
148
104
  }
149
105
  // ]}
150
106
 
@@ -213,6 +213,9 @@ export const PageMasterUiSchema: any = (theme) => {
213
213
  onClick: "Edit_Components",
214
214
  tooltipMessage: "Edit This Record",
215
215
  },
216
+ style: {
217
+ color: theme.palette.primary.main,
218
+ },
216
219
  },
217
220
  },
218
221
  },
@@ -248,7 +248,7 @@ export const EventUiSchema: any = (theme) => {
248
248
  onClick: "editEvent",
249
249
  },
250
250
  style: {
251
- color: "#3949ab",
251
+ color: theme.palette.primary.main,
252
252
  },
253
253
  },
254
254
  },
@@ -50,8 +50,8 @@ export const refreshPage = (type: string, store: any) => {
50
50
  Core: CoreSection,
51
51
  Value: ValueTab,
52
52
  Style: StyleSection,
53
- Event: EventSection,
54
- Components: TableSection,
53
+ Event: EventSection(store.theme.myTheme),
54
+ Components: TableSection(store.theme.myTheme),
55
55
  Properties: buildPropertiesSection(type),
56
56
  Validation: ValidationSection
57
57