impaktapps-ui-builder 1.0.66-alpha.1 → 1.0.66-alpha.2

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.66-alpha.1",
3
+ "version": "1.0.66-alpha.2",
4
4
  "scripts": {
5
5
  "dev": "vite",
6
6
  "build": "tsc && vite build",
@@ -333,25 +333,12 @@ const buildUiSchema = (config: any, store?: any) => {
333
333
  });
334
334
  }
335
335
  elements.elements = config.elements.map((cellElem, elemInd) => {
336
- const commonProperties = {
336
+ return {
337
337
  accessorKey: cellElem.name,
338
- type: cellElem.type === "ColumnGroup" ? "ColumnGroup" : cellElem.columnFormat,
339
338
  header: cellElem.label || cellElem.name,
340
339
  size: sizeMap[cellElem.name] || 180,
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 }
340
+ type: cellElem.columnFormat,
341
+ elements: cellElem.type == "ColumnGroup" ? cellElem.elements.map((childCellElem) => buildUiSchema(childCellElem, store)) : []
355
342
  }
356
343
  })
357
344
  } else if (config.type == "Table") {
@@ -368,7 +355,7 @@ const buildUiSchema = (config: any, store?: any) => {
368
355
  config.elements.filter((cellElem, elemInd) => {
369
356
  const commonProperties = {
370
357
  accessorKey: cellElem.name,
371
- type: cellElem.type === "ColumnGroup" ? "ColumnGroup" : cellElem.columnFormat,
358
+ type: cellElem.columnFormat,
372
359
  header: cellElem.label || cellElem.name,
373
360
  size: sizeMap[cellElem.name] || 180,
374
361
  enableColumnFilter: cellElem.enableFilter === "No" ? false : true,
@@ -389,8 +376,9 @@ const buildUiSchema = (config: any, store?: any) => {
389
376
  }
390
377
  const tableElem = {
391
378
  widget: cellElem.type != "ColumnGroup" ? buildUiSchema(cellElem, store) : undefined,
392
- ...commonProperties,
393
- ...(cellElem.type === "ColumnGroup" ? buildUiSchema(cellElem, store) : {})
379
+ elements: cellElem.type == "ColumnGroup" ? cellElem.elements.map((childCellElem) => buildUiSchema(childCellElem, store)) : [],
380
+ ...commonProperties
381
+
394
382
  }
395
383
  rowElements.push(tableElem)
396
384
  } else {
@@ -2,7 +2,7 @@ import { EventUiSchema } from "../event/uiSchema"
2
2
  export const PageMasterUiSchema: any = (theme) => {
3
3
  const uiSchema = {
4
4
  type: "HorizontalLayout",
5
- heading: "Page",
5
+ heading: "Page-add",
6
6
  elements: [
7
7
  {
8
8
  type: "WrapperLayout",
@@ -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" || parentObj?.type === "ColumnGroup"){
73
+ if(parentObj?.type === "Table"){
74
74
  UiSchema.elements[0].elements[0].elements[4] =
75
75
  {
76
76
  type: "Control",