impaktapps-ui-builder 0.0.1051 → 0.0.1052

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": "0.0.1051",
3
+ "version": "0.0.1052",
4
4
  "scripts": {
5
5
  "dev": "vite",
6
6
  "build": "tsc && vite build",
@@ -351,27 +351,25 @@ const buildUiSchema = (config: any, store?: any) => {
351
351
  })
352
352
  }
353
353
  elements.elements = config.elements.map((cellElem, elemInd) => {
354
+ const commonProperties = {
355
+ accessorKey: cellElem.name,
356
+ type: cellElem.columnFormat,
357
+ header: cellElem.label || cellElem.name,
358
+ size: sizeMap[cellElem.name] || 180,
359
+ enableColumnFilter: Object.keys(filterMap).length === 0 ? true : filterMap[cellElem.name] ?? false,
360
+ columnFilterModeOptions: config.filteringOptions,
361
+ enableSorting: config.enableSorting === "No" ? false : true,
362
+ columnKey: config.columnKey
363
+ }
354
364
  if (cellElem.type) {
355
365
  return {
356
- accessorKey: cellElem.name,
357
- header: cellElem.label || cellElem.name,
358
- size: sizeMap[cellElem.name] || 180,
359
- type: cellElem.columnFormat,
360
366
  widget: cellElem.type != "ColumnGroup" ? buildUiSchema(cellElem, store) : undefined,
361
367
  elements: cellElem.type == "ColumnGroup" ? cellElem.elements.map((childCellElem) => buildUiSchema(childCellElem, store)) : [],
362
- enableColumnFilter: Object.keys(filterMap).length === 0 ? true : filterMap[cellElem.name] ?? false,
363
- columnFilterModeOptions: config.filteringOptions,
364
- enableSorting: config.enableSorting === "No" ? false : true
368
+ ...commonProperties
369
+
365
370
  }
366
371
  } else {
367
- return {
368
- accessorKey: cellElem.name,
369
- type: cellElem.columnFormat,
370
- header: cellElem.label || cellElem.name,
371
- size: sizeMap[cellElem.name] || 180,
372
- enableColumnFilter: Object.keys(filterMap).length === 0 ? true : filterMap[cellElem.name] ?? false,
373
- columnFilterModeOptions: config.filteringOptions
374
- }
372
+ return commonProperties
375
373
  }
376
374
 
377
375
  })
@@ -113,7 +113,7 @@ export function refreshPage(type: string, store: any) {
113
113
  },
114
114
  };
115
115
 
116
- UiSchema.elements[0].elements[0].elements[6] =
116
+ UiSchema.elements[1].elements[0].elements[6] =
117
117
  {
118
118
  type: "Control",
119
119
  scope: "#/properties/enableSorting",
@@ -128,7 +128,7 @@ export function refreshPage(type: string, store: any) {
128
128
  },
129
129
  },
130
130
  },
131
- UiSchema.elements[0].elements[0].elements[7] =
131
+ UiSchema.elements[1].elements[0].elements[7] =
132
132
  {
133
133
  type: "Control",
134
134
  scope: "#/properties/columnKey",