impaktapps-ui-builder 1.0.64 → 1.0.66-alpha.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "impaktapps-ui-builder",
3
- "version": "1.0.64",
3
+ "version": "1.0.66-alpha.1",
4
4
  "scripts": {
5
5
  "dev": "vite",
6
6
  "build": "tsc && vite build",
@@ -333,12 +333,25 @@ const buildUiSchema = (config: any, store?: any) => {
333
333
  });
334
334
  }
335
335
  elements.elements = config.elements.map((cellElem, elemInd) => {
336
- return {
336
+ const commonProperties = {
337
337
  accessorKey: cellElem.name,
338
+ type: cellElem.type === "ColumnGroup" ? "ColumnGroup" : cellElem.columnFormat,
338
339
  header: cellElem.label || cellElem.name,
339
340
  size: sizeMap[cellElem.name] || 180,
340
- type: cellElem.columnFormat,
341
- elements: cellElem.type == "ColumnGroup" ? cellElem.elements.map((childCellElem) => buildUiSchema(childCellElem, store)) : []
341
+ enableColumnFilter: cellElem.enableFilter === "No" ? false : true,
342
+ columnFilterModeOptions: cellElem.filteringOptions,
343
+ enableSorting: cellElem.enableSorting === "No" ? false : true,
344
+ columnKey: cellElem.columnKey
345
+ }
346
+ if (cellElem.type) {
347
+ const tableElem = {
348
+ widget: cellElem.type != "ColumnGroup" ? buildUiSchema(cellElem, store) : undefined,
349
+ ...commonProperties,
350
+ ...(cellElem.type === "ColumnGroup" ? buildUiSchema(cellElem, store) : {})
351
+ }
352
+ return tableElem
353
+ } else {
354
+ return { ...commonProperties }
342
355
  }
343
356
  })
344
357
  } else if (config.type == "Table") {
@@ -355,7 +368,7 @@ const buildUiSchema = (config: any, store?: any) => {
355
368
  config.elements.filter((cellElem, elemInd) => {
356
369
  const commonProperties = {
357
370
  accessorKey: cellElem.name,
358
- type: cellElem.columnFormat,
371
+ type: cellElem.type === "ColumnGroup" ? "ColumnGroup" : cellElem.columnFormat,
359
372
  header: cellElem.label || cellElem.name,
360
373
  size: sizeMap[cellElem.name] || 180,
361
374
  enableColumnFilter: cellElem.enableFilter === "No" ? false : true,
@@ -376,9 +389,8 @@ const buildUiSchema = (config: any, store?: any) => {
376
389
  }
377
390
  const tableElem = {
378
391
  widget: cellElem.type != "ColumnGroup" ? buildUiSchema(cellElem, store) : undefined,
379
- elements: cellElem.type == "ColumnGroup" ? cellElem.elements.map((childCellElem) => buildUiSchema(childCellElem, store)) : [],
380
- ...commonProperties
381
-
392
+ ...commonProperties,
393
+ ...(cellElem.type === "ColumnGroup" ? buildUiSchema(cellElem, store) : {})
382
394
  }
383
395
  rowElements.push(tableElem)
384
396
  } else {
@@ -337,6 +337,7 @@ export const ComponentSchema: any = {
337
337
  { title: "Error Icon", const: "ErrorIcon" },
338
338
  { title: "Refresh Icon", const: "RefreshIcon" },
339
339
  { title: "Download Icon", const: "DownloadIcon" },
340
+ { title: "Download All Icon", const: "DownloadAllIcon" },
340
341
  { title: "Exception Icon", const: "ExceptionIcon" },
341
342
  { "title": "Alarm Icon", "const": "AlarmIcon" },
342
343
  { "title": "Click Icon", "const": "ClickIcon" },
@@ -70,7 +70,7 @@ export function refreshPage(type: string, store: any) {
70
70
 
71
71
  const parentObj = _.get(currentConfig, parentPath)
72
72
 
73
- if(parentObj?.type === "Table"){
73
+ if(parentObj?.type === "Table" || parentObj?.type === "ColumnGroup"){
74
74
  UiSchema.elements[0].elements[0].elements[4] =
75
75
  {
76
76
  type: "Control",