@revolist/revogrid 4.24.1 → 4.24.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.
Files changed (62) hide show
  1. package/dist/cjs/{cell-renderer-DfUCisis.js → cell-renderer-DnOCJ9ge.js} +58 -4
  2. package/dist/cjs/{column.drag.plugin-Cz-T4y3M.js → column.drag.plugin-DSiFObaj.js} +17 -12
  3. package/dist/cjs/{column.service-BNWNiJW3.js → column.service-CD70rNL2.js} +8 -5
  4. package/dist/cjs/{dimension.helpers-B9HgANnM.js → dimension.helpers-CB5sNw5J.js} +2 -1
  5. package/dist/cjs/{edit.utils-pKeiYFLJ.js → edit.utils-DDxnq9lw.js} +1 -1
  6. package/dist/cjs/{header-cell-renderer-DyjOxArm.js → header-cell-renderer-JXYFwayd.js} +1 -1
  7. package/dist/cjs/{index-DxaSE5uZ.js → index-BF6JDcMr.js} +1 -1
  8. package/dist/cjs/index.cjs.js +10 -9
  9. package/dist/cjs/revo-grid.cjs.entry.js +12 -8
  10. package/dist/cjs/revogr-attribution_7.cjs.entry.js +5 -5
  11. package/dist/cjs/revogr-clipboard_3.cjs.entry.js +4 -4
  12. package/dist/cjs/revogr-data_4.cjs.entry.js +6 -4
  13. package/dist/cjs/{text-editor-B4W-m-r-.js → text-editor-CvgloQdG.js} +2 -2
  14. package/dist/cjs/{viewport.store-BscUCiUk.js → viewport.store-Ci8H1bI9.js} +1 -1
  15. package/dist/collection/components/data/revogr-data.js +2 -0
  16. package/dist/collection/components/revoGrid/revo-grid.js +1 -1
  17. package/dist/collection/plugins/groupingRow/grouping.row.plugin.js +12 -7
  18. package/dist/collection/plugins/groupingRow/grouping.row.renderer.js +59 -3
  19. package/dist/collection/plugins/groupingRow/grouping.service.js +7 -4
  20. package/dist/collection/services/data.provider.js +6 -2
  21. package/dist/collection/store/dataSource/data.store.js +2 -1
  22. package/dist/{revo-grid/cell-renderer-CLTRlCa5.js → esm/cell-renderer-BQjko1zB.js} +58 -5
  23. package/dist/esm/{column.drag.plugin-DKkf7Zqb.js → column.drag.plugin-Cf9DYdQj.js} +17 -12
  24. package/dist/esm/{column.service-C6hByxPy.js → column.service-BnFqXqQG.js} +8 -5
  25. package/dist/{revo-grid/dimension.helpers-CGKwSvw6.js → esm/dimension.helpers-CXrsUc6f.js} +2 -1
  26. package/dist/esm/{edit.utils-Dnnbd0xG.js → edit.utils-CXmmCnxE.js} +1 -1
  27. package/dist/{revo-grid/header-cell-renderer-BMmXRsd_.js → esm/header-cell-renderer-B3mYpZD3.js} +1 -1
  28. package/dist/{revo-grid/index-Db3qZoW5.js → esm/index-DBqlJITb.js} +1 -1
  29. package/dist/esm/index.js +10 -10
  30. package/dist/esm/revo-grid.entry.js +12 -8
  31. package/dist/esm/revogr-attribution_7.entry.js +5 -5
  32. package/dist/esm/revogr-clipboard_3.entry.js +4 -4
  33. package/dist/esm/revogr-data_4.entry.js +6 -4
  34. package/dist/{revo-grid/text-editor-C3RUSwH5.js → esm/text-editor-DQtz2Y7B.js} +2 -2
  35. package/dist/{revo-grid/viewport.store-_c579YyM.js → esm/viewport.store-D5jEuhLq.js} +1 -1
  36. package/dist/{esm/cell-renderer-CLTRlCa5.js → revo-grid/cell-renderer-BQjko1zB.js} +58 -5
  37. package/dist/revo-grid/{column.drag.plugin-DKkf7Zqb.js → column.drag.plugin-Cf9DYdQj.js} +17 -12
  38. package/dist/revo-grid/{column.service-C6hByxPy.js → column.service-BnFqXqQG.js} +8 -5
  39. package/dist/{esm/dimension.helpers-CGKwSvw6.js → revo-grid/dimension.helpers-CXrsUc6f.js} +2 -1
  40. package/dist/revo-grid/{edit.utils-Dnnbd0xG.js → edit.utils-CXmmCnxE.js} +1 -1
  41. package/dist/{esm/header-cell-renderer-BMmXRsd_.js → revo-grid/header-cell-renderer-B3mYpZD3.js} +1 -1
  42. package/dist/{esm/index-Db3qZoW5.js → revo-grid/index-DBqlJITb.js} +1 -1
  43. package/dist/revo-grid/index.esm.js +10 -10
  44. package/dist/revo-grid/revo-grid.entry.js +12 -8
  45. package/dist/revo-grid/revogr-attribution_7.entry.js +5 -5
  46. package/dist/revo-grid/revogr-clipboard_3.entry.js +4 -4
  47. package/dist/revo-grid/revogr-data_4.entry.js +6 -4
  48. package/dist/{esm/text-editor-C3RUSwH5.js → revo-grid/text-editor-DQtz2Y7B.js} +2 -2
  49. package/dist/{esm/viewport.store-_c579YyM.js → revo-grid/viewport.store-D5jEuhLq.js} +1 -1
  50. package/dist/types/plugins/groupingRow/grouping.row.renderer.d.ts +6 -1
  51. package/dist/types/plugins/groupingRow/grouping.row.types.d.ts +47 -1
  52. package/dist/types/plugins/groupingRow/grouping.service.d.ts +1 -1
  53. package/dist/types/services/data.provider.d.ts +5 -2
  54. package/dist/types/store/dataSource/data.store.d.ts +3 -1
  55. package/hydrate/index.js +84 -16
  56. package/hydrate/index.mjs +84 -16
  57. package/package.json +1 -1
  58. package/standalone/column.service.js +1 -1
  59. package/standalone/data.store.js +1 -1
  60. package/standalone/index.js +1 -1
  61. package/standalone/revo-grid.js +1 -1
  62. package/standalone/revogr-data2.js +1 -1
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Built by Revolist OU ❤️
3
3
  */
4
- import { Q as toFinite, U as keys, V as isArrayLike, W as baseIteratee, N as isArray, G as GRID_INTERNALS, X as isIterateeCall, a as getVisibleSourceItem, o as DISABLED_CLASS, C as CELL_CLASS, b as getSourceItem } from './dimension.helpers-CGKwSvw6.js';
4
+ import { Q as toFinite, U as keys, V as isArrayLike, W as baseIteratee, N as isArray, G as GRID_INTERNALS, X as isIterateeCall, a as getVisibleSourceItem, o as DISABLED_CLASS, C as CELL_CLASS, b as getSourceItem } from './dimension.helpers-CXrsUc6f.js';
5
5
 
6
6
  /**
7
7
  * Converts `value` to an integer.
@@ -434,8 +434,9 @@ const GROUP_EXPAND_BTN = `group-expand`;
434
434
  const GROUP_EXPAND_EVENT = `groupexpandclick`;
435
435
  const GROUPING_ROW_TYPE = 'rgRow';
436
436
 
437
- function getGroupValueDefault(item, prop) {
438
- return item[prop] || null;
437
+ function getGroupValueDefault(item, prop, emptyGroupValue) {
438
+ var _a;
439
+ return (_a = item[prop]) !== null && _a !== void 0 ? _a : emptyGroupValue;
439
440
  }
440
441
  function isDataRow(item) {
441
442
  return item != null;
@@ -541,13 +542,15 @@ function flattenGroupMaps({ groupedValues, parentIds, isExpanded, itemIndex, exp
541
542
  * @param columnProps - ids of groups
542
543
  * @param expanded - potentially expanded items if present
543
544
  */
544
- function gatherGrouping(array, columnProps, { prevExpanded = {}, expandedAll = false, getGroupValue = getGroupValueDefault, }) {
545
+ function gatherGrouping(array, columnProps, { prevExpanded = {}, expandedAll = false, getGroupValue, emptyGroupValue = '', }) {
545
546
  const groupedItems = new Map();
546
547
  array.forEach((item, originalIndex) => {
547
548
  if (!isDataRow(item)) {
548
549
  return;
549
550
  }
550
- const groupLevelValues = columnProps.map(groupId => getGroupValue(item, groupId));
551
+ const groupLevelValues = columnProps.map(groupId => getGroupValue
552
+ ? getGroupValue(item, groupId)
553
+ : getGroupValueDefault(item, groupId, emptyGroupValue));
551
554
  const lastLevelValue = groupLevelValues.pop();
552
555
  let currentGroupLevel = groupedItems;
553
556
  groupLevelValues.forEach(value => {
@@ -3141,7 +3141,7 @@ class DataStore {
3141
3141
  return this.dataStore;
3142
3142
  }
3143
3143
  constructor(type, storeData) {
3144
- const store = (this.dataStore = createStore(Object.assign({ items: [], proxyItems: [], source: [], groupingDepth: 0, groups: {}, type, trimmed: {}, groupingCustomRenderer: undefined }, storeData)));
3144
+ const store = (this.dataStore = createStore(Object.assign({ items: [], proxyItems: [], source: [], groupingDepth: 0, groups: {}, type, trimmed: {}, groupingCustomRenderer: undefined, groupingCellRenderer: undefined }, storeData)));
3145
3145
  store.use(proxyPlugin(store));
3146
3146
  store.use(trimmedPlugin(store));
3147
3147
  }
@@ -3181,6 +3181,7 @@ class DataStore {
3181
3181
  // if groups are not provided, we will consider that there is only one group with all items
3182
3182
  groups: grouping.groups,
3183
3183
  groupingCustomRenderer: grouping.customRenderer,
3184
+ groupingCellRenderer: grouping.cellRenderer,
3184
3185
  });
3185
3186
  }
3186
3187
  }
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Built by Revolist OU ❤️
3
3
  */
4
- import { O as KeyCodesEnum, P as OsPlatform, I as codesLetter, J as keyValues, E as EDIT_INPUT_WR } from './dimension.helpers-CGKwSvw6.js';
4
+ import { O as KeyCodesEnum, P as OsPlatform, I as codesLetter, J as keyValues, E as EDIT_INPUT_WR } from './dimension.helpers-CXrsUc6f.js';
5
5
 
6
6
  function isMetaKey(code) {
7
7
  const keys = [
@@ -2,7 +2,7 @@
2
2
  * Built by Revolist OU ❤️
3
3
  */
4
4
  import { h } from './index-Chp_81rd.js';
5
- import { Q as doPropMerge } from './column.service-C6hByxPy.js';
5
+ import { Q as doPropMerge } from './column.service-BnFqXqQG.js';
6
6
 
7
7
  /**
8
8
  * Dispatches a custom event to a specified target element.
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Built by Revolist OU ❤️
3
3
  */
4
- import './dimension.helpers-CGKwSvw6.js';
4
+ import './dimension.helpers-CXrsUc6f.js';
5
5
 
6
6
  /* Generate range on size
7
7
  */
@@ -1,17 +1,17 @@
1
1
  /*!
2
2
  * Built by Revolist OU ❤️
3
3
  */
4
- export { o as GROUPING_ROW_TYPE, j as GROUP_COLUMN_PROP, G as GROUP_DEPTH, h as GROUP_EXPANDED, l as GROUP_EXPAND_BTN, m as GROUP_EXPAND_EVENT, k as GROUP_ORIGINAL_INDEX, f as PSEUDO_GROUP_COLUMN, P as PSEUDO_GROUP_ITEM, d as PSEUDO_GROUP_ITEM_ID, e as PSEUDO_GROUP_ITEM_VALUE, c as columnTypes, a as cropCellToMax, H as gatherGroup, s as gatherGrouping, z as getCellData, B as getCellDataParsed, A as getCellRaw, I as getColumnByProp, D as getColumnSizes, C as getColumnType, F as getColumns, q as getExpanded, t as getGroupingName, x as getParsedGroup, g as getRange, p as getSource, E as isColGrouping, u as isGrouping, v as isGroupingColumn, b as isRangeSingleCell, i as isRowType, y as isSameGroup, w as measureEqualDepth, n as nextCell, r as rowTypes } from './column.service-C6hByxPy.js';
5
- import { B as BasePlugin } from './column.drag.plugin-DKkf7Zqb.js';
6
- export { A as AutoSizeColumnPlugin, n as BEFORE_COLUMN_DRAG_END_EVENT, m as COLUMN_DRAG_END_EVENT, l as COLUMN_DRAG_MOVE_EVENT, o as COLUMN_DRAG_START_EVENT, C as ColumnAutoSizeMode, p as ColumnMovePlugin, D as DimensionStore, b as ExportCsv, E as ExportFilePlugin, c as FILTER_CONFIG_CHANGED_EVENT, F as FILTER_TRIMMED_TYPE, d as FILTE_PANEL, e as FilterPlugin, G as GroupingRowPlugin, S as SelectionStore, s as SortingPlugin, a as StretchColumn, w as defaultCellCompare, x as descCellCompare, j as doCollapse, k as doExpand, f as filterCoreFunctionsIndexedByType, h as filterNames, g as filterTypes, r as getColumnDragPosition, z as getComparer, q as getLeftRelative, y as getNextOrder, u as getSortingIndex, t as hasActiveSorting, i as isStretchPlugin, v as sortIndexByItems } from './column.drag.plugin-DKkf7Zqb.js';
7
- export { d as dispatch, a as dispatchByEvent } from './header-cell-renderer-BMmXRsd_.js';
8
- export { C as CellRenderer, G as GroupingRowRenderer, S as SortingSign, e as expandEvent, a as expandSvgIconVNode } from './cell-renderer-CLTRlCa5.js';
9
- export { a as applyMixins, f as findPositionInArray, g as getScrollbarSize, m as mergeSortedArray, p as pushSorted, r as range, s as scaleValue, t as timeout } from './index-Db3qZoW5.js';
10
- export { T as TextEditor } from './text-editor-C3RUSwH5.js';
11
- export { k as isAll, c as isClear, h as isCopy, a as isCtrlKey, b as isCtrlMetaKey, g as isCut, m as isEditInput, n as isEditorCtrConstructible, f as isEnterKeyValue, i as isMetaKey, j as isPaste, l as isShortcutModifier, d as isTab, e as isTabKeyValue } from './edit.utils-Dnnbd0xG.js';
4
+ export { o as GROUPING_ROW_TYPE, j as GROUP_COLUMN_PROP, G as GROUP_DEPTH, h as GROUP_EXPANDED, l as GROUP_EXPAND_BTN, m as GROUP_EXPAND_EVENT, k as GROUP_ORIGINAL_INDEX, f as PSEUDO_GROUP_COLUMN, P as PSEUDO_GROUP_ITEM, d as PSEUDO_GROUP_ITEM_ID, e as PSEUDO_GROUP_ITEM_VALUE, c as columnTypes, a as cropCellToMax, H as gatherGroup, s as gatherGrouping, z as getCellData, B as getCellDataParsed, A as getCellRaw, I as getColumnByProp, D as getColumnSizes, C as getColumnType, F as getColumns, q as getExpanded, t as getGroupingName, x as getParsedGroup, g as getRange, p as getSource, E as isColGrouping, u as isGrouping, v as isGroupingColumn, b as isRangeSingleCell, i as isRowType, y as isSameGroup, w as measureEqualDepth, n as nextCell, r as rowTypes } from './column.service-BnFqXqQG.js';
5
+ import { B as BasePlugin } from './column.drag.plugin-Cf9DYdQj.js';
6
+ export { A as AutoSizeColumnPlugin, n as BEFORE_COLUMN_DRAG_END_EVENT, m as COLUMN_DRAG_END_EVENT, l as COLUMN_DRAG_MOVE_EVENT, o as COLUMN_DRAG_START_EVENT, C as ColumnAutoSizeMode, p as ColumnMovePlugin, D as DimensionStore, b as ExportCsv, E as ExportFilePlugin, c as FILTER_CONFIG_CHANGED_EVENT, F as FILTER_TRIMMED_TYPE, d as FILTE_PANEL, e as FilterPlugin, G as GroupingRowPlugin, S as SelectionStore, s as SortingPlugin, a as StretchColumn, w as defaultCellCompare, x as descCellCompare, j as doCollapse, k as doExpand, f as filterCoreFunctionsIndexedByType, h as filterNames, g as filterTypes, r as getColumnDragPosition, z as getComparer, q as getLeftRelative, y as getNextOrder, u as getSortingIndex, t as hasActiveSorting, i as isStretchPlugin, v as sortIndexByItems } from './column.drag.plugin-Cf9DYdQj.js';
7
+ export { d as dispatch, a as dispatchByEvent } from './header-cell-renderer-B3mYpZD3.js';
8
+ export { C as CellRenderer, G as GroupingRowRenderer, S as SortingSign, e as expandEvent, a as expandSvgIconVNode, r as renderGroupCells } from './cell-renderer-BQjko1zB.js';
9
+ export { a as applyMixins, f as findPositionInArray, g as getScrollbarSize, m as mergeSortedArray, p as pushSorted, r as range, s as scaleValue, t as timeout } from './index-DBqlJITb.js';
10
+ export { T as TextEditor } from './text-editor-DQtz2Y7B.js';
11
+ export { k as isAll, c as isClear, h as isCopy, a as isCtrlKey, b as isCtrlMetaKey, g as isCut, m as isEditInput, n as isEditorCtrConstructible, f as isEnterKeyValue, i as isMetaKey, j as isPaste, l as isShortcutModifier, d as isTab, e as isTabKeyValue } from './edit.utils-CXmmCnxE.js';
12
12
  export { h } from './index-Chp_81rd.js';
13
- export { C as CELL_CLASS, z as CELL_HANDLER_CLASS, m as DATA_COL, n as DATA_ROW, o as DISABLED_CLASS, x as DRAGGABLE_CLASS, A as DRAGG_TEXT, w as DRAG_ICON_CLASS, D as DataStore, E as EDIT_INPUT_WR, F as FOCUS_CLASS, G as GRID_INTERNALS, v as HEADER_ACTUAL_ROW_CLASS, H as HEADER_CLASS, u as HEADER_ROW_CLASS, r as HEADER_SORTABLE_CLASS, M as MIN_COL_SIZE, y as MOBILE_CLASS, R as RESIZE_INTERVAL, B as ROW_FOCUSED_CLASS, q as ROW_HEADER_TYPE, S as SELECTION_BORDER_CLASS, T as TMP_SELECTION_BG_CLASS, i as calculateDimensionData, I as codesLetter, h as gatherTrimmedItems, k as getItemByIndex, j as getItemByPosition, g as getPhysical, b as getSourceItem, f as getSourceItemVirtualIndexByProp, c as getSourcePhysicalIndex, a as getVisibleSourceItem, J as keyValues, p as proxyPlugin, e as setItems, d as setSourceByPhysicalIndex, s as setSourceByVirtualIndex, l as setStore, t as trimmedPlugin } from './dimension.helpers-CGKwSvw6.js';
14
- export { V as ViewportStore, b as addMissingItems, j as calculateRowHeaderSize, c as clampViewportCoordinate, f as getFirstItem, d as getItems, h as getLastItem, a as getUpdatedItemsByPosition, g as getViewportMaxCoordinate, i as isActiveRange, e as isActiveRangeOutsideLastItem, r as recombineByOffset, s as setItemSizes, u as updateMissingAndRange } from './viewport.store-_c579YyM.js';
13
+ export { C as CELL_CLASS, z as CELL_HANDLER_CLASS, m as DATA_COL, n as DATA_ROW, o as DISABLED_CLASS, x as DRAGGABLE_CLASS, A as DRAGG_TEXT, w as DRAG_ICON_CLASS, D as DataStore, E as EDIT_INPUT_WR, F as FOCUS_CLASS, G as GRID_INTERNALS, v as HEADER_ACTUAL_ROW_CLASS, H as HEADER_CLASS, u as HEADER_ROW_CLASS, r as HEADER_SORTABLE_CLASS, M as MIN_COL_SIZE, y as MOBILE_CLASS, R as RESIZE_INTERVAL, B as ROW_FOCUSED_CLASS, q as ROW_HEADER_TYPE, S as SELECTION_BORDER_CLASS, T as TMP_SELECTION_BG_CLASS, i as calculateDimensionData, I as codesLetter, h as gatherTrimmedItems, k as getItemByIndex, j as getItemByPosition, g as getPhysical, b as getSourceItem, f as getSourceItemVirtualIndexByProp, c as getSourcePhysicalIndex, a as getVisibleSourceItem, J as keyValues, p as proxyPlugin, e as setItems, d as setSourceByPhysicalIndex, s as setSourceByVirtualIndex, l as setStore, t as trimmedPlugin } from './dimension.helpers-CXrsUc6f.js';
14
+ export { V as ViewportStore, b as addMissingItems, j as calculateRowHeaderSize, c as clampViewportCoordinate, f as getFirstItem, d as getItems, h as getLastItem, a as getUpdatedItemsByPosition, g as getViewportMaxCoordinate, i as isActiveRange, e as isActiveRangeOutsideLastItem, r as recombineByOffset, s as setItemSizes, u as updateMissingAndRange } from './viewport.store-D5jEuhLq.js';
15
15
  export { A as AND_OR_BUTTON, e as AndOrButton, a as FILTER_BUTTON_ACTIVE, F as FILTER_BUTTON_CLASS, b as FILTER_PROP, c as FilterButton, R as REORDER_BUTTON, f as ReorderButton, T as TRASH_BUTTON, d as TrashButton, i as isFilterBtn } from './filter.button-B-RBiF67.js';
16
16
  import './debounce-PCRWZliA.js';
17
17
 
@@ -2,17 +2,17 @@
2
2
  * Built by Revolist OU ❤️
3
3
  */
4
4
  import { h, r as registerInstance, d as createEvent, e as Host, g as getElement } from './index-Chp_81rd.js';
5
- import { c as columnTypes, J as reduce, C as getColumnType, r as rowTypes, i as isRowType, D as getColumnSizes, a as cropCellToMax, n as nextCell, I as getColumnByProp, F as getColumns } from './column.service-C6hByxPy.js';
6
- import { D as DataStore, b as getSourceItem, f as getSourceItemVirtualIndexByProp, d as setSourceByPhysicalIndex, s as setSourceByVirtualIndex, a as getVisibleSourceItem, h as gatherTrimmedItems, k as getItemByIndex, R as RESIZE_INTERVAL } from './dimension.helpers-CGKwSvw6.js';
5
+ import { c as columnTypes, J as reduce, C as getColumnType, r as rowTypes, i as isRowType, D as getColumnSizes, a as cropCellToMax, n as nextCell, I as getColumnByProp, F as getColumns } from './column.service-BnFqXqQG.js';
6
+ import { D as DataStore, b as getSourceItem, f as getSourceItemVirtualIndexByProp, d as setSourceByPhysicalIndex, s as setSourceByVirtualIndex, a as getVisibleSourceItem, h as gatherTrimmedItems, k as getItemByIndex, R as RESIZE_INTERVAL } from './dimension.helpers-CXrsUc6f.js';
7
7
  import { d as debounce } from './debounce-PCRWZliA.js';
8
8
  import { g as getScrollDimension, v as viewportDataPartition, F as FOOTER_SLOT, C as CONTENT_SLOT, H as HEADER_SLOT, D as DATA_SLOT } from './viewport.helpers-CoCAvmZs.js';
9
- import { D as DimensionStore, S as SelectionStore, B as BasePlugin, G as GroupingRowPlugin, a as StretchColumn, i as isStretchPlugin, A as AutoSizeColumnPlugin, e as FilterPlugin, E as ExportFilePlugin, s as SortingPlugin, p as ColumnMovePlugin } from './column.drag.plugin-DKkf7Zqb.js';
10
- import { V as ViewportStore } from './viewport.store-_c579YyM.js';
9
+ import { D as DimensionStore, S as SelectionStore, B as BasePlugin, G as GroupingRowPlugin, a as StretchColumn, i as isStretchPlugin, A as AutoSizeColumnPlugin, e as FilterPlugin, E as ExportFilePlugin, s as SortingPlugin, p as ColumnMovePlugin } from './column.drag.plugin-Cf9DYdQj.js';
10
+ import { V as ViewportStore } from './viewport.store-D5jEuhLq.js';
11
11
  import { T as ThemeService } from './theme.service-BmnDvr6P.js';
12
- import { t as timeout } from './index-Db3qZoW5.js';
12
+ import { t as timeout } from './index-DBqlJITb.js';
13
13
  import { g as getPropertyFromEvent } from './events-BvSmBueA.js';
14
14
  import './filter.button-B-RBiF67.js';
15
- import './header-cell-renderer-BMmXRsd_.js';
15
+ import './header-cell-renderer-B3mYpZD3.js';
16
16
 
17
17
  class ColumnDataProvider {
18
18
  get stores() {
@@ -217,8 +217,12 @@ class DataProvider {
217
217
  const items = this.stores[type].store.get('items');
218
218
  this.stores[type].setData({ items: [...items] });
219
219
  }
220
- setGrouping({ depth }, type = 'rgRow') {
221
- this.stores[type].setData({ groupingDepth: depth });
220
+ setGrouping({ depth, customRenderer, cellRenderer, }, type = 'rgRow') {
221
+ this.stores[type].setData({
222
+ groupingDepth: depth,
223
+ groupingCustomRenderer: customRenderer,
224
+ groupingCellRenderer: cellRenderer,
225
+ });
222
226
  }
223
227
  setTrimmed(trimmed, type = 'rgRow') {
224
228
  const store = this.stores[type];
@@ -2,13 +2,13 @@
2
2
  * Built by Revolist OU ❤️
3
3
  */
4
4
  import { r as registerInstance, h, e as Host, d as createEvent, g as getElement } from './index-Chp_81rd.js';
5
- import { k as getItemByIndex, b as getSourceItem, j as getItemByPosition, F as FOCUS_CLASS, I as codesLetter, R as RESIZE_INTERVAL, y as MOBILE_CLASS, z as CELL_HANDLER_CLASS, S as SELECTION_BORDER_CLASS, D as DataStore, q as ROW_HEADER_TYPE, T as TMP_SELECTION_BG_CLASS } from './dimension.helpers-CGKwSvw6.js';
5
+ import { k as getItemByIndex, b as getSourceItem, j as getItemByPosition, F as FOCUS_CLASS, I as codesLetter, R as RESIZE_INTERVAL, y as MOBILE_CLASS, z as CELL_HANDLER_CLASS, S as SELECTION_BORDER_CLASS, D as DataStore, q as ROW_HEADER_TYPE, T as TMP_SELECTION_BG_CLASS } from './dimension.helpers-CXrsUc6f.js';
6
6
  import { g as getPropertyFromEvent, v as verifyTouchTarget } from './events-BvSmBueA.js';
7
- import { g as getRange, M as ColumnService, z as getCellData, N as getCellEditor, b as isRangeSingleCell } from './column.service-C6hByxPy.js';
8
- import { l as isShortcutModifier, m as isEditInput, c as isClear, d as isTab, f as isEnterKeyValue, h as isCopy, g as isCut, j as isPaste, k as isAll } from './edit.utils-Dnnbd0xG.js';
9
- import { t as timeout, g as getScrollbarSize } from './index-Db3qZoW5.js';
7
+ import { g as getRange, M as ColumnService, z as getCellData, N as getCellEditor, b as isRangeSingleCell } from './column.service-BnFqXqQG.js';
8
+ import { l as isShortcutModifier, m as isEditInput, c as isClear, d as isTab, f as isEnterKeyValue, h as isCopy, g as isCut, j as isPaste, k as isAll } from './edit.utils-CXmmCnxE.js';
9
+ import { t as timeout, g as getScrollbarSize } from './index-DBqlJITb.js';
10
10
  import { d as debounce } from './debounce-PCRWZliA.js';
11
- import { V as ViewportStore, j as calculateRowHeaderSize } from './viewport.store-_c579YyM.js';
11
+ import { V as ViewportStore, j as calculateRowHeaderSize } from './viewport.store-D5jEuhLq.js';
12
12
  import { H as HEADER_SLOT } from './viewport.helpers-CoCAvmZs.js';
13
13
  import { L as LocalScrollTimer, a as LocalScrollService, g as getContentSize, t as throttle } from './throttle-Cpk1LoGk.js';
14
14
 
@@ -2,11 +2,11 @@
2
2
  * Built by Revolist OU ❤️
3
3
  */
4
4
  import { r as registerInstance, d as createEvent, h, e as Host, g as getElement } from './index-Chp_81rd.js';
5
- import { E as EDIT_INPUT_WR, j as getItemByPosition, b as getSourceItem, A as DRAGG_TEXT } from './dimension.helpers-CGKwSvw6.js';
6
- import { T as TextEditor } from './text-editor-C3RUSwH5.js';
7
- import { n as isEditorCtrConstructible } from './edit.utils-Dnnbd0xG.js';
5
+ import { E as EDIT_INPUT_WR, j as getItemByPosition, b as getSourceItem, A as DRAGG_TEXT } from './dimension.helpers-CXrsUc6f.js';
6
+ import { T as TextEditor } from './text-editor-DQtz2Y7B.js';
7
+ import { n as isEditorCtrConstructible } from './edit.utils-CXmmCnxE.js';
8
8
  import { d as debounce } from './debounce-PCRWZliA.js';
9
- import './index-Db3qZoW5.js';
9
+ import './index-DBqlJITb.js';
10
10
 
11
11
  const Clipboard = class {
12
12
  constructor(hostRef) {
@@ -2,11 +2,11 @@
2
2
  * Built by Revolist OU ❤️
3
3
  */
4
4
  import { r as registerInstance, d as createEvent, h, e as Host, g as getElement } from './index-Chp_81rd.js';
5
- import { M as ColumnService, u as isGrouping } from './column.service-C6hByxPy.js';
6
- import { B as ROW_FOCUSED_CLASS, b as getSourceItem, n as DATA_ROW, m as DATA_COL, M as MIN_COL_SIZE, r as HEADER_SORTABLE_CLASS, H as HEADER_CLASS, F as FOCUS_CLASS, k as getItemByIndex, u as HEADER_ROW_CLASS, v as HEADER_ACTUAL_ROW_CLASS } from './dimension.helpers-CGKwSvw6.js';
7
- import { G as GroupingRowRenderer, C as CellRenderer, R as RowRenderer, P as PADDING_DEPTH, S as SortingSign } from './cell-renderer-CLTRlCa5.js';
5
+ import { M as ColumnService, u as isGrouping } from './column.service-BnFqXqQG.js';
6
+ import { B as ROW_FOCUSED_CLASS, b as getSourceItem, n as DATA_ROW, m as DATA_COL, M as MIN_COL_SIZE, r as HEADER_SORTABLE_CLASS, H as HEADER_CLASS, F as FOCUS_CLASS, k as getItemByIndex, u as HEADER_ROW_CLASS, v as HEADER_ACTUAL_ROW_CLASS } from './dimension.helpers-CXrsUc6f.js';
7
+ import { G as GroupingRowRenderer, C as CellRenderer, R as RowRenderer, P as PADDING_DEPTH, S as SortingSign } from './cell-renderer-BQjko1zB.js';
8
8
  import { c as FilterButton } from './filter.button-B-RBiF67.js';
9
- import { H as HeaderCellRenderer } from './header-cell-renderer-BMmXRsd_.js';
9
+ import { H as HeaderCellRenderer } from './header-cell-renderer-B3mYpZD3.js';
10
10
  import { t as throttle, L as LocalScrollTimer, a as LocalScrollService, g as getContentSize } from './throttle-Cpk1LoGk.js';
11
11
  import { H as HEADER_SLOT, C as CONTENT_SLOT, F as FOOTER_SLOT } from './viewport.helpers-CoCAvmZs.js';
12
12
  import './debounce-PCRWZliA.js';
@@ -167,6 +167,7 @@ const RevogrData = class {
167
167
  const rowsEls = [];
168
168
  const depth = this.dataStore.get('groupingDepth');
169
169
  const groupingCustomRenderer = this.dataStore.get('groupingCustomRenderer');
170
+ const groupingCellRenderer = this.dataStore.get('groupingCellRenderer');
170
171
  const groupDepth = this.columnService.hasGrouping ? depth : 0;
171
172
  const rowRenderOffset = this.viewportRow.get('renderOffset') || 0;
172
173
  const colRenderOffset = this.viewportCol.get('renderOffset') || 0;
@@ -175,6 +176,7 @@ const RevogrData = class {
175
176
  // #region Grouping
176
177
  if (isGrouping(dataItem)) {
177
178
  const gmodel = Object.assign(Object.assign({}, rgRow), { start: rgRow.start - rowRenderOffset, index: rgRow.itemIndex, model: dataItem, groupingCustomRenderer,
179
+ groupingCellRenderer, additionalData: this.additionalData,
178
180
  // Only show expand button if grouping is enabled and not in row headers
179
181
  hasExpand: this.columnService.hasGrouping && this.colType !== 'rowHeaders', columnItems: cols, providers: this.providers });
180
182
  rowsEls.push(h(GroupingRowRenderer, Object.assign({}, gmodel)));
@@ -1,8 +1,8 @@
1
1
  /*!
2
2
  * Built by Revolist OU ❤️
3
3
  */
4
- import { d as isTab, f as isEnterKeyValue } from './edit.utils-Dnnbd0xG.js';
5
- import { t as timeout } from './index-Db3qZoW5.js';
4
+ import { d as isTab, f as isEnterKeyValue } from './edit.utils-CXmmCnxE.js';
5
+ import { t as timeout } from './index-DBqlJITb.js';
6
6
 
7
7
  class TextEditor {
8
8
  constructor(data, saveCallback) {
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Built by Revolist OU ❤️
3
3
  */
4
- import { j as getItemByPosition, K as createStore, l as setStore } from './dimension.helpers-CGKwSvw6.js';
4
+ import { j as getItemByPosition, K as createStore, l as setStore } from './dimension.helpers-CXrsUc6f.js';
5
5
 
6
6
  const LETTER_BLOCK_SIZE = 10;
7
7
  const calculateRowHeaderSize = (itemsLength, rowHeaderColumn, minWidth = 50) => {
@@ -1,6 +1,11 @@
1
1
  import type { RowGroupingProps } from './grouping.row.types';
2
- import type { DataType } from "../../types/index";
2
+ import type { DataType, VNodeResponse } from "../../types/index";
3
3
  export declare function expandEvent(e: MouseEvent, model: DataType, virtualIndex: number): void;
4
+ export declare function renderGroupCells(props: RowGroupingProps, { name, expanded, depth, }: {
5
+ name: string;
6
+ expanded: boolean;
7
+ depth: number;
8
+ }): VNodeResponse[];
4
9
  export declare const GroupingRowRenderer: (props: RowGroupingProps) => any;
5
10
  export declare const expandSvgIconVNode: (expanded?: boolean) => any;
6
11
  export default GroupingRowRenderer;
@@ -1,5 +1,5 @@
1
1
  import type { VNode } from '../../stencil-public-runtime';
2
- import type { HyperFunc, ColumnProp, DimensionRows, DataType, Providers, VirtualPositionItem, PositionItem, DimensionCols } from "../../types/index";
2
+ import type { HyperFunc, ColumnProp, DimensionRows, DataType, Providers, VirtualPositionItem, PositionItem, DimensionCols, CellTemplateProp } from "../../types/index";
3
3
  import type { RowProps } from '../../components/data/row-renderer';
4
4
  import { GROUP_EXPAND_EVENT } from './grouping.const';
5
5
  /**
@@ -47,8 +47,38 @@ export interface GroupRowPros extends RowProps {
47
47
  hasExpand: boolean;
48
48
  providers: Providers;
49
49
  groupingCustomRenderer?: GroupLabelTemplateFunc | null;
50
+ groupingCellRenderer?: GroupCellTemplateFunc | null;
51
+ additionalData?: any;
50
52
  }
51
53
  export type GroupLabelTemplateFunc = (createElement: HyperFunc<VNode>, props: GroupTemplateProp & RowGroupingProps, ...args: any[]) => any;
54
+ export interface GroupCellTemplateProp extends Omit<CellTemplateProp, 'colType'> {
55
+ /**
56
+ * Column viewport type that owns the cell.
57
+ */
58
+ colType: DimensionCols | 'rowHeaders';
59
+ /**
60
+ * Current virtual column position. Only columns rendered by the viewport are
61
+ * passed to the group cell template.
62
+ */
63
+ columnItem: VirtualPositionItem;
64
+ /**
65
+ * Current virtual row position.
66
+ */
67
+ rowItem: VirtualPositionItem;
68
+ /**
69
+ * Semantic information about the synthetic group row.
70
+ */
71
+ group: {
72
+ name: string;
73
+ depth: number;
74
+ expanded: boolean;
75
+ prop: ColumnProp;
76
+ isLabelColumn: boolean;
77
+ canExpand: boolean;
78
+ onExpand(event: MouseEvent): void;
79
+ };
80
+ }
81
+ export type GroupCellTemplateFunc = (createElement: HyperFunc<VNode>, props: GroupCellTemplateProp, additionalData?: any) => any;
52
82
  export type GroupingOptions = {
53
83
  /**
54
84
  * Column props to which grouping will be applied
@@ -63,6 +93,12 @@ export type GroupingOptions = {
63
93
  * Custom group label template
64
94
  */
65
95
  groupLabelTemplate?: GroupLabelTemplateFunc;
96
+ /**
97
+ * Custom template for cells in synthetic group rows.
98
+ * When provided, group rows render only the columns in the current horizontal
99
+ * viewport and this template takes precedence over `groupLabelTemplate`.
100
+ */
101
+ groupCellTemplate?: GroupCellTemplateFunc;
66
102
  } & ExpandedOptions;
67
103
  export type BeforeSourceSetEvent = {
68
104
  type: DimensionRows;
@@ -85,10 +121,20 @@ export type ExpandedOptions = {
85
121
  * Custom group label value parser
86
122
  */
87
123
  getGroupValue?(item: DataType, prop: string | number): any;
124
+ /**
125
+ * Replacement group value for `null` and `undefined` keys.
126
+ * Used by the default group value resolver.
127
+ * @default ''
128
+ */
129
+ emptyGroupValue?: any;
88
130
  /**
89
131
  * Custom group label template
90
132
  */
91
133
  groupLabelTemplate?: GroupLabelTemplateFunc;
134
+ /**
135
+ * Custom template for virtualized cells in synthetic group rows.
136
+ */
137
+ groupCellTemplate?: GroupCellTemplateFunc;
92
138
  };
93
139
  declare global {
94
140
  /**
@@ -14,7 +14,7 @@ export declare function getExpanded(model?: DataType): any;
14
14
  * @param columnProps - ids of groups
15
15
  * @param expanded - potentially expanded items if present
16
16
  */
17
- export declare function gatherGrouping(array: DataType[], columnProps: ColumnProp[], { prevExpanded, expandedAll, getGroupValue, }: ExpandedOptions): {
17
+ export declare function gatherGrouping(array: DataType[], columnProps: ColumnProp[], { prevExpanded, expandedAll, getGroupValue, emptyGroupValue, }: ExpandedOptions): {
18
18
  sourceWithGroups: DataType[];
19
19
  depth: number;
20
20
  trimmed: Record<number, boolean>;
@@ -1,6 +1,6 @@
1
1
  import { DataStore, Groups, Trimmed } from "../store/index";
2
2
  import DimensionProvider from './dimension.provider';
3
- import type { GroupLabelTemplateFunc } from '../plugins/groupingRow/grouping.row.types';
3
+ import type { GroupCellTemplateFunc, GroupLabelTemplateFunc } from '../plugins/groupingRow/grouping.row.types';
4
4
  import type { DataLookup, DimensionRows, DataType, BeforeSaveDataDetails } from "../types/index";
5
5
  export type RowDataSources = {
6
6
  [T in DimensionRows]: DataStore<DataType, DimensionRows>;
@@ -32,6 +32,7 @@ export declare class DataProvider {
32
32
  depth: number;
33
33
  groups?: Groups;
34
34
  customRenderer?: GroupLabelTemplateFunc;
35
+ cellRenderer?: GroupCellTemplateFunc;
35
36
  }, silent?: boolean, preserveTrimmed?: boolean): DataType[];
36
37
  getModel(virtualIndex: number, type?: DimensionRows): DataType;
37
38
  changeOrder({ rowType, from, to }: {
@@ -43,8 +44,10 @@ export declare class DataProvider {
43
44
  setRangeData(data: DataLookup, type: DimensionRows): void;
44
45
  refresh(type?: DimensionRows | 'all'): void;
45
46
  refreshItems(type?: DimensionRows): void;
46
- setGrouping({ depth }: {
47
+ setGrouping({ depth, customRenderer, cellRenderer, }: {
47
48
  depth: number;
49
+ customRenderer?: GroupLabelTemplateFunc;
50
+ cellRenderer?: GroupCellTemplateFunc;
48
51
  }, type?: DimensionRows): void;
49
52
  setTrimmed(trimmed: Trimmed, type?: DimensionRows): void;
50
53
  }
@@ -1,6 +1,6 @@
1
1
  import { Trimmed } from './trimmed.plugin';
2
2
  import { Observable } from '../../utils';
3
- import type { GroupLabelTemplateFunc } from '../../plugins/groupingRow/grouping.row.types';
3
+ import type { GroupCellTemplateFunc, GroupLabelTemplateFunc } from '../../plugins/groupingRow/grouping.row.types';
4
4
  import type { DimensionRows, DimensionCols, ColumnProperties, ColumnGrouping, ColumnRegular, DataType, DataSourceState, ColumnProp } from "../../types/index";
5
5
  export interface Group extends ColumnProperties {
6
6
  name: string;
@@ -12,6 +12,7 @@ export type GDataType = DataType | ColumnRegular;
12
12
  export type GDimension = DimensionRows | DimensionCols;
13
13
  export type DSourceState<T1 extends GDataType, T2 extends GDimension> = DataSourceState<T1, T2> & {
14
14
  groupingCustomRenderer?: GroupLabelTemplateFunc | null;
15
+ groupingCellRenderer?: GroupCellTemplateFunc | null;
15
16
  };
16
17
  /**
17
18
  * Data store
@@ -32,6 +33,7 @@ export declare class DataStore<T extends GDataType, ST extends GDimension> {
32
33
  depth: number;
33
34
  groups?: Groups;
34
35
  customRenderer?: GroupLabelTemplateFunc;
36
+ cellRenderer?: GroupCellTemplateFunc;
35
37
  }, silent?: boolean, preserveTrimmed?: boolean): void;
36
38
  addTrimmed(some: Partial<Trimmed>): void;
37
39
  setSourceData(items: Record<number, any>, mutate?: boolean): void;
package/hydrate/index.js CHANGED
@@ -11556,7 +11556,7 @@ class DataStore {
11556
11556
  return this.dataStore;
11557
11557
  }
11558
11558
  constructor(type, storeData) {
11559
- const store = (this.dataStore = createStore(Object.assign({ items: [], proxyItems: [], source: [], groupingDepth: 0, groups: {}, type, trimmed: {}, groupingCustomRenderer: undefined }, storeData)));
11559
+ const store = (this.dataStore = createStore(Object.assign({ items: [], proxyItems: [], source: [], groupingDepth: 0, groups: {}, type, trimmed: {}, groupingCustomRenderer: undefined, groupingCellRenderer: undefined }, storeData)));
11560
11560
  store.use(proxyPlugin(store));
11561
11561
  store.use(trimmedPlugin$1(store));
11562
11562
  }
@@ -11596,6 +11596,7 @@ class DataStore {
11596
11596
  // if groups are not provided, we will consider that there is only one group with all items
11597
11597
  groups: grouping.groups,
11598
11598
  groupingCustomRenderer: grouping.customRenderer,
11599
+ groupingCellRenderer: grouping.cellRenderer,
11599
11600
  });
11600
11601
  }
11601
11602
  }
@@ -12864,8 +12865,9 @@ const GROUP_EXPAND_BTN = `group-expand`;
12864
12865
  const GROUP_EXPAND_EVENT = `groupexpandclick`;
12865
12866
  const GROUPING_ROW_TYPE = 'rgRow';
12866
12867
 
12867
- function getGroupValueDefault(item, prop) {
12868
- return item[prop] || null;
12868
+ function getGroupValueDefault(item, prop, emptyGroupValue) {
12869
+ var _a;
12870
+ return (_a = item[prop]) !== null && _a !== void 0 ? _a : emptyGroupValue;
12869
12871
  }
12870
12872
  function isDataRow(item) {
12871
12873
  return item != null;
@@ -12971,13 +12973,15 @@ function flattenGroupMaps({ groupedValues, parentIds, isExpanded, itemIndex, exp
12971
12973
  * @param columnProps - ids of groups
12972
12974
  * @param expanded - potentially expanded items if present
12973
12975
  */
12974
- function gatherGrouping(array, columnProps, { prevExpanded = {}, expandedAll = false, getGroupValue = getGroupValueDefault, }) {
12976
+ function gatherGrouping(array, columnProps, { prevExpanded = {}, expandedAll = false, getGroupValue, emptyGroupValue = '', }) {
12975
12977
  const groupedItems = new Map();
12976
12978
  array.forEach((item, originalIndex) => {
12977
12979
  if (!isDataRow(item)) {
12978
12980
  return;
12979
12981
  }
12980
- const groupLevelValues = columnProps.map(groupId => getGroupValue(item, groupId));
12982
+ const groupLevelValues = columnProps.map(groupId => getGroupValue
12983
+ ? getGroupValue(item, groupId)
12984
+ : getGroupValueDefault(item, groupId, emptyGroupValue));
12981
12985
  const lastLevelValue = groupLevelValues.pop();
12982
12986
  let currentGroupLevel = groupedItems;
12983
12987
  groupLevelValues.forEach(value => {
@@ -15006,8 +15010,12 @@ class DataProvider {
15006
15010
  const items = this.stores[type].store.get('items');
15007
15011
  this.stores[type].setData({ items: [...items] });
15008
15012
  }
15009
- setGrouping({ depth }, type = 'rgRow') {
15010
- this.stores[type].setData({ groupingDepth: depth });
15013
+ setGrouping({ depth, customRenderer, cellRenderer, }, type = 'rgRow') {
15014
+ this.stores[type].setData({
15015
+ groupingDepth: depth,
15016
+ groupingCustomRenderer: customRenderer,
15017
+ groupingCellRenderer: cellRenderer,
15018
+ });
15011
15019
  }
15012
15020
  setTrimmed(trimmed, type = 'rgRow') {
15013
15021
  const store = this.stores[type];
@@ -17310,8 +17318,58 @@ function expandEvent(e, model, virtualIndex) {
17310
17318
  });
17311
17319
  (_a = e.target) === null || _a === void 0 ? void 0 : _a.dispatchEvent(event);
17312
17320
  }
17321
+ function renderGroupCells(props, { name, expanded, depth, }) {
17322
+ const { additionalData, columnItems, groupingCellRenderer, hasExpand, itemIndex, model, providers, size, start, end, } = props;
17323
+ if (!groupingCellRenderer) {
17324
+ return [];
17325
+ }
17326
+ const renderOffset = providers.viewport.get('renderOffset') || 0;
17327
+ const data = providers.data.get('source');
17328
+ const rowItem = { itemIndex, size, start, end };
17329
+ const onExpand = (event) => expandEvent(event, model, itemIndex);
17330
+ return columnItems.map(columnItem => {
17331
+ const column = getSourceItem(providers.columns, columnItem.itemIndex);
17332
+ if (!column) {
17333
+ return null;
17334
+ }
17335
+ const isLabelColumn = isGroupingColumn(column);
17336
+ const templateProps = {
17337
+ prop: column.prop,
17338
+ model,
17339
+ data,
17340
+ column,
17341
+ rowIndex: itemIndex,
17342
+ colIndex: columnItem.itemIndex,
17343
+ colType: providers.colType,
17344
+ type: providers.type,
17345
+ value: getCellRaw(model, column),
17346
+ providers,
17347
+ columnItem,
17348
+ rowItem,
17349
+ group: {
17350
+ name,
17351
+ depth,
17352
+ expanded,
17353
+ prop: model[GROUP_COLUMN_PROP],
17354
+ isLabelColumn,
17355
+ canExpand: hasExpand,
17356
+ onExpand,
17357
+ },
17358
+ };
17359
+ return (hAsync("div", { key: columnItem.itemIndex, class: {
17360
+ [CELL_CLASS]: true,
17361
+ groupingCell: true,
17362
+ groupingLabelCell: isLabelColumn,
17363
+ }, [DATA_COL]: columnItem.itemIndex,
17364
+ [DATA_ROW]: itemIndex, style: {
17365
+ width: `${columnItem.size}px`,
17366
+ transform: `translateX(${columnItem.start - renderOffset}px)`,
17367
+ height: size ? `${size}px` : undefined,
17368
+ } }, groupingCellRenderer(hAsync, templateProps, additionalData)));
17369
+ });
17370
+ }
17313
17371
  const GroupingRowRenderer = (props) => {
17314
- const { model, itemIndex, hasExpand, groupingCustomRenderer } = props;
17372
+ const { model, itemIndex, hasExpand, groupingCustomRenderer, groupingCellRenderer, } = props;
17315
17373
  const name = model[PSEUDO_GROUP_ITEM];
17316
17374
  const expanded = model[GROUP_EXPANDED];
17317
17375
  const depth = parseInt(model[GROUP_DEPTH], 10) || 0;
@@ -17320,6 +17378,9 @@ const GroupingRowRenderer = (props) => {
17320
17378
  depth,
17321
17379
  expanded,
17322
17380
  };
17381
+ if (groupingCellRenderer) {
17382
+ return (hAsync(RowRenderer, Object.assign({ index: props.index, size: props.size, start: props.start }, groupRowAttrs), renderGroupCells(props, { name, expanded, depth })));
17383
+ }
17323
17384
  if (groupingCustomRenderer) {
17324
17385
  return (hAsync(RowRenderer, Object.assign({}, props, groupRowAttrs), hAsync("div", { onClick: e => expandEvent(e, model, itemIndex) }, groupingCustomRenderer(hAsync, Object.assign(Object.assign({}, props), { colType: props.providers.colType, name,
17325
17386
  expanded,
@@ -17327,7 +17388,7 @@ const GroupingRowRenderer = (props) => {
17327
17388
  }
17328
17389
  return (hAsync(RowRenderer, Object.assign({}, props, groupRowAttrs), hasExpand && [
17329
17390
  hAsync("button", { class: { [GROUP_EXPAND_BTN]: true }, onClick: e => expandEvent(e, model, itemIndex) }, expandSvgIconVNode(expanded)),
17330
- name,
17391
+ String(name),
17331
17392
  ]));
17332
17393
  };
17333
17394
  const expandSvgIconVNode = (expanded = false) => {
@@ -17446,7 +17507,7 @@ class GroupingRowPlugin extends BasePlugin {
17446
17507
  * Initiated when need to reapply grouping
17447
17508
  */
17448
17509
  doSourceUpdate(options) {
17449
- var _a;
17510
+ var _a, _b;
17450
17511
  /**
17451
17512
  * Get source without grouping
17452
17513
  * @param newOldIndexMap - provides us mapping with new indexes vs old indexes, we would use it for trimmed mapping
@@ -17458,10 +17519,11 @@ class GroupingRowPlugin extends BasePlugin {
17458
17519
  * Group again
17459
17520
  * @param oldNewIndexMap - provides us mapping with new indexes vs old indexes
17460
17521
  */
17461
- const { sourceWithGroups, depth, trimmed, oldNewIndexMap, } = gatherGrouping(source, ((_a = this.options) === null || _a === void 0 ? void 0 : _a.props) || [], expanded);
17522
+ const { sourceWithGroups, depth, trimmed, oldNewIndexMap, } = gatherGrouping(source, (_b = (_a = this.options) === null || _a === void 0 ? void 0 : _a.props) !== null && _b !== void 0 ? _b : [], expanded);
17462
17523
  const customRenderer = options === null || options === void 0 ? void 0 : options.groupLabelTemplate;
17524
+ const cellRenderer = options === null || options === void 0 ? void 0 : options.groupCellTemplate;
17463
17525
  // setup source
17464
- this.providers.data.setData(sourceWithGroups, GROUPING_ROW_TYPE, this.revogrid.disableVirtualY, { depth, customRenderer }, true);
17526
+ this.providers.data.setData(sourceWithGroups, GROUPING_ROW_TYPE, this.revogrid.disableVirtualY, { depth, customRenderer, cellRenderer }, true);
17465
17527
  this.updateTrimmed(trimmed, oldNewIndexes !== null && oldNewIndexes !== void 0 ? oldNewIndexes : {}, oldNewIndexMap, sourceWithGroups);
17466
17528
  }
17467
17529
  /**
@@ -17470,17 +17532,21 @@ class GroupingRowPlugin extends BasePlugin {
17470
17532
  * If source came from other plugin
17471
17533
  */
17472
17534
  onDataSet(data) {
17473
- var _a, _b;
17535
+ var _a, _b, _c;
17474
17536
  let preservedExpanded = {};
17475
17537
  if (((_a = this.options) === null || _a === void 0 ? void 0 : _a.preserveGroupingOnUpdate) !== false) {
17476
17538
  let { prevExpanded } = getSource(this.getStore().get('source'), this.getStore().get('proxyItems'), true);
17477
17539
  preservedExpanded = prevExpanded;
17478
17540
  }
17479
17541
  const source = data.source.filter(s => !isGrouping(s));
17480
- const options = Object.assign(Object.assign({}, (this.revogrid.grouping || {})), { prevExpanded: preservedExpanded });
17481
- const { sourceWithGroups, depth, trimmed, oldNewIndexMap, } = gatherGrouping(source, ((_b = this.options) === null || _b === void 0 ? void 0 : _b.props) || [], options);
17542
+ const options = Object.assign(Object.assign({}, this.options), { prevExpanded: preservedExpanded });
17543
+ const { sourceWithGroups, depth, trimmed, oldNewIndexMap, } = gatherGrouping(source, (_c = (_b = this.options) === null || _b === void 0 ? void 0 : _b.props) !== null && _c !== void 0 ? _c : [], options);
17482
17544
  data.source = sourceWithGroups;
17483
- this.providers.data.setGrouping({ depth });
17545
+ this.providers.data.setGrouping({
17546
+ depth,
17547
+ customRenderer: options.groupLabelTemplate,
17548
+ cellRenderer: options.groupCellTemplate,
17549
+ });
17484
17550
  this.updateTrimmed(trimmed, oldNewIndexMap, undefined, sourceWithGroups);
17485
17551
  }
17486
17552
  /**
@@ -20784,6 +20850,7 @@ class RevogrData {
20784
20850
  const rowsEls = [];
20785
20851
  const depth = this.dataStore.get('groupingDepth');
20786
20852
  const groupingCustomRenderer = this.dataStore.get('groupingCustomRenderer');
20853
+ const groupingCellRenderer = this.dataStore.get('groupingCellRenderer');
20787
20854
  const groupDepth = this.columnService.hasGrouping ? depth : 0;
20788
20855
  const rowRenderOffset = this.viewportRow.get('renderOffset') || 0;
20789
20856
  const colRenderOffset = this.viewportCol.get('renderOffset') || 0;
@@ -20792,6 +20859,7 @@ class RevogrData {
20792
20859
  // #region Grouping
20793
20860
  if (isGrouping(dataItem)) {
20794
20861
  const gmodel = Object.assign(Object.assign({}, rgRow), { start: rgRow.start - rowRenderOffset, index: rgRow.itemIndex, model: dataItem, groupingCustomRenderer,
20862
+ groupingCellRenderer, additionalData: this.additionalData,
20795
20863
  // Only show expand button if grouping is enabled and not in row headers
20796
20864
  hasExpand: this.columnService.hasGrouping && this.colType !== 'rowHeaders', columnItems: cols, providers: this.providers });
20797
20865
  rowsEls.push(hAsync(GroupingRowRenderer, Object.assign({}, gmodel)));