impaktapps-ui-builder 1.0.64-alpha.112 → 1.0.64-alpha.113

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-alpha.112",
3
+ "version": "1.0.64-alpha.113",
4
4
  "scripts": {
5
5
  "dev": "vite",
6
6
  "build": "tsc && vite build",
@@ -333,6 +333,7 @@ const buildUiSchema = (config: any, store?: any) => {
333
333
  });
334
334
  }
335
335
  elements.elements = config.elements.map((cellElem, elemInd) => {
336
+
336
337
  const commonProperties = {
337
338
  accessorKey: cellElem.name,
338
339
  type: cellElem.type === "ColumnGroup" ? "ColumnGroup" : cellElem.columnFormat,
@@ -343,15 +344,12 @@ const buildUiSchema = (config: any, store?: any) => {
343
344
  enableSorting: cellElem.enableSorting === "No" ? false : true,
344
345
  columnKey: cellElem.columnKey
345
346
  }
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 }
347
+ return {
348
+ accessorKey: cellElem.name,
349
+ header: cellElem.label || cellElem.name,
350
+ size: sizeMap[cellElem.name] || 180,
351
+ type: cellElem.columnFormat,
352
+ elements: cellElem.type == "ColumnGroup" ? cellElem.elements.map((childCellElem) => commonProperties) : []
355
353
  }
356
354
  })
357
355
  } else if (config.type == "Table") {
@@ -389,8 +387,9 @@ const buildUiSchema = (config: any, store?: any) => {
389
387
  }
390
388
  const tableElem = {
391
389
  widget: cellElem.type != "ColumnGroup" ? buildUiSchema(cellElem, store) : undefined,
392
- ...commonProperties,
393
- ...(cellElem.type === "ColumnGroup" ? buildUiSchema(cellElem, store) : {})
390
+ elements: cellElem.type == "ColumnGroup" ? cellElem.elements.map((childCellElem) => commonProperties) : [],
391
+ ...commonProperties
392
+
394
393
  }
395
394
  rowElements.push(tableElem)
396
395
  } else {