impaktapps-ui-builder 1.0.124 → 1.0.125-testL.10

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.
@@ -112,8 +112,16 @@ export default function Card(theme: any): {
112
112
  margin: string;
113
113
  marginLeft: string;
114
114
  height: number;
115
+ marginTop?: undefined;
115
116
  position?: undefined;
116
117
  left?: undefined;
118
+ whiteSpace?: undefined;
119
+ overflowX?: undefined;
120
+ overflowY?: undefined;
121
+ scrollbarWidth?: undefined;
122
+ msOverflowStyle?: undefined;
123
+ maxWidth?: undefined;
124
+ "&::-webkit-scrollbar"?: undefined;
117
125
  };
118
126
  };
119
127
  options: {
@@ -138,8 +146,18 @@ export default function Card(theme: any): {
138
146
  justifyContent: string;
139
147
  width: string;
140
148
  margin: string;
149
+ marginTop: string;
141
150
  position: string;
142
151
  left: string;
152
+ whiteSpace: string;
153
+ overflowX: string;
154
+ overflowY: string;
155
+ scrollbarWidth: string;
156
+ msOverflowStyle: string;
157
+ maxWidth: string;
158
+ "&::-webkit-scrollbar": {
159
+ display: string;
160
+ };
143
161
  marginLeft?: undefined;
144
162
  height?: undefined;
145
163
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "impaktapps-ui-builder",
3
- "version": "1.0.124",
3
+ "version": "1.0.125-testL.10",
4
4
  "scripts": {
5
5
  "dev": "vite",
6
6
  "build": "tsc && vite build",
@@ -77,5 +77,8 @@ export const buildTable = (config: any, componentScope: string) => {
77
77
  if (config.maxPageSize) {
78
78
  table.config.main.maxPageSize = config.maxPageSize
79
79
  }
80
+ if(config.initialDensity){
81
+ table.config.main.initialDensity = config.initialDensity
82
+ }
80
83
  return table;
81
84
  };
@@ -274,7 +274,17 @@ const buildUiSchema = (config: any, store?: any) => {
274
274
 
275
275
  if (config?.elements) {
276
276
  if (config?.type === "LeaderBoard") {
277
- return elements;
277
+ const rowElements = []
278
+ config.elements.filter((cellElem, elemInd) => {
279
+ const commonProperties = {
280
+ accessorKey: cellElem.name,
281
+ type: cellElem.type === "ColumnGroup" ? "ColumnGroup" : cellElem.columnFormat,
282
+ header: cellElem.label || cellElem.name,
283
+ columnKey: cellElem.columnKey
284
+ }
285
+ rowElements.push({ ...commonProperties })
286
+ })
287
+ elements.elements = rowElements;
278
288
  }
279
289
  else if (config.type == "ColumnGroup") {
280
290
  const sizeMap = {}
@@ -487,6 +487,11 @@ export const buildPropertiesSection = function (type: String) {
487
487
  { label: "100", value: 100 },
488
488
  { label: "500", value: 500 }
489
489
  ]),
490
+ getSelectField("initialDensity", "Initial Toggle Density", [
491
+ { label: "Compact", value: "compact" },
492
+ { label: "Comfortable", value: "comfortable" },
493
+ { label: "Spacious", value: "spacious" }
494
+ ]),
490
495
  buildWrapper("Tree Table Properties", [
491
496
  getRadioInputField("enableRowMovement", "Row Rearrangement", ["YES", "NO"]),
492
497
  getRadioInputField("enableExpanding", "Row Expanding", ["YES", "NO"]),
@@ -123,14 +123,24 @@ export default function Card(theme){
123
123
  style: {
124
124
  color: "black",
125
125
  display: "flex",
126
- fontSize: { xs: "24px", md: "28px" },
126
+ fontSize: { xs: "24px", md: "25px" },
127
127
  fontWeight: "bold",
128
128
  background: "inherit",
129
129
  justifyContent: "flex-start",
130
130
  width: "auto",
131
131
  margin: "-8px",
132
+ marginTop: "-6px",
132
133
  position: "absolute",
133
- left: "24px"
134
+ left: "7px",
135
+ whiteSpace: "nowrap",
136
+ overflowX: "auto",
137
+ overflowY: "hidden",
138
+ scrollbarWidth: "none",
139
+ msOverflowStyle: "none",
140
+ maxWidth: "calc(100% + 20px)",
141
+ "&::-webkit-scrollbar": {
142
+ display: "none",
143
+ }
134
144
  },
135
145
  // layout: 11,
136
146
  },
@@ -94,6 +94,14 @@ export const ComponentSchema: any = {
94
94
  { title: "500", const: 500 }
95
95
  ]
96
96
  },
97
+ initialDensity:{
98
+ type: "string",
99
+ oneOf: [
100
+ { title: "Compact", const: "compact" },
101
+ { title: "Comfortable", const: "comfortable" },
102
+ { title: "Spacious", const: "spacious" }
103
+ ]
104
+ },
97
105
  layout: {
98
106
  type: "array",
99
107
  items: {
@@ -163,6 +163,22 @@ export function refreshPage(type: string, store: any) {
163
163
  },
164
164
  }
165
165
  }
166
+ if(parentObj?.type === "LeaderBoard"){
167
+ UiSchema.elements[0].elements[0].elements[4] =
168
+ {
169
+ type: "Control",
170
+ scope: "#/properties/columnFormat",
171
+ options: {
172
+ widget: "SelectInputField",
173
+ },
174
+ config: {
175
+ layout: { xs: 6, sm: 6, md: 4, lg: 3 },
176
+ main: {
177
+ label: "Column Format",
178
+ },
179
+ },
180
+ };
181
+ }
166
182
 
167
183
  if (sessionStorage.getItem("copiedConfig") ) {
168
184
  this.ElementPathSetter(UiSchema);
@@ -196,11 +196,11 @@ export default (funcParams: funcParamsProps) => {
196
196
  ...executeEventsParameters,
197
197
  config: eventConfig,
198
198
  componentName,
199
- formDataHolder:formDataHolder
199
+ formDataHolder
200
200
  })
201
- }
202
- if (!isEmpty(formDataHolder)) {
203
- funcParams.store.setFormdata((pre) => ({ ...pre, ...formDataHolder }));
201
+ if (eventConfig.Handler === "refresh") {
202
+ funcParams.store.setFormdata((pre) => ({ ...pre, ...formDataHolder }));
203
+ }
204
204
  }
205
205
  }
206
206
  }))
@@ -252,16 +252,23 @@ export default (funcParams: funcParamsProps) => {
252
252
  callHandler: function (eventType: string, functionParameters?: any) {
253
253
  const path = funcParams.dynamicData?.tableButtonPath || funcParams.dynamicData.path.split(".")[funcParams.dynamicData.path.split(".").length - 1];
254
254
  if (eventGroups?.[eventType]?.[path] !== undefined) {
255
- (eventGroups?.[eventType]?.[path].map(async (eventConfig) => {
255
+ (eventGroups?.[eventType]?.[path].map((eventConfig) => {
256
256
  executeEventsParameters.store.functionParameters = functionParameters
257
- await executeEvents({
258
- ...executeEventsParameters,
259
- config: eventConfig,
260
- componentName: path,
261
- formDataHolder: formDataHolder
262
- })
263
- if (!isEmpty(formDataHolder)) {
264
- funcParams.store.setFormdata((pre) => ({ ...pre, ...formDataHolder }));
257
+ if (eventConfig.Handler === "refresh") {
258
+ executeEvents({
259
+ ...executeEventsParameters,
260
+ config: eventConfig,
261
+ componentName: path,
262
+ formDataHolder: formDataHolder
263
+ }).then((res) => {
264
+ funcParams.store.setFormdata((pre) => ({ ...pre, ...formDataHolder }));
265
+ });
266
+ } else {
267
+ executeEvents({
268
+ ...executeEventsParameters,
269
+ config: eventConfig,
270
+ componentName: path
271
+ })
265
272
  }
266
273
  }))
267
274
  }