@progress/kendo-react-grid 15.2.0-develop.7 → 15.2.0-develop.8
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/GridClientWrapper.d.ts +1 -0
- package/GridClientWrapper.js +1 -1
- package/GridClientWrapper.mjs +478 -450
- package/GridColumn.d.ts +18 -1
- package/GridComponent.js +1 -1
- package/GridComponent.mjs +509 -433
- package/cells/groupcell/GridGroupCell.js +1 -1
- package/cells/groupcell/GridGroupCell.mjs +60 -10
- package/cells/groupcell/GridGroupCellServer.js +1 -1
- package/cells/groupcell/GridGroupCellServer.mjs +31 -18
- package/cells/groupcell/utils.d.ts +19 -4
- package/cells/groupcell/utils.js +1 -1
- package/cells/groupcell/utils.mjs +255 -33
- package/cells/selectioncell/GridSelectionCellInput.d.ts +1 -0
- package/cells/selectioncell/GridSelectionCellInput.js +1 -1
- package/cells/selectioncell/GridSelectionCellInput.mjs +19 -14
- package/components/StickyGroupTable.d.ts +2 -0
- package/components/StickyGroupTable.js +1 -1
- package/components/StickyGroupTable.mjs +29 -27
- package/dist/cdn/js/kendo-react-grid.js +1 -1
- package/drag/GroupingIndicator.d.ts +1 -0
- package/drag/GroupingIndicator.js +1 -1
- package/drag/GroupingIndicator.mjs +33 -30
- package/getRowContents.d.ts +5 -0
- package/getRowContents.js +1 -1
- package/getRowContents.mjs +77 -67
- package/header/GridHeaderCell.js +1 -1
- package/header/GridHeaderCell.mjs +17 -8
- package/header/GroupPanel.d.ts +3 -0
- package/header/GroupPanel.js +1 -1
- package/header/GroupPanel.mjs +35 -33
- package/header/HeaderRow.js +1 -1
- package/header/HeaderRow.mjs +48 -47
- package/index.d.mts +4 -2
- package/index.d.ts +4 -2
- package/interfaces/GridCellProps.d.ts +21 -0
- package/interfaces/GridCellsSettings.d.ts +60 -0
- package/interfaces/GridGroupColumnSettings.d.ts +170 -0
- package/interfaces/GridGroupableSettings.d.ts +66 -0
- package/interfaces/GridHeaderCellProps.d.ts +4 -0
- package/messages/index.d.ts +5 -0
- package/messages/index.js +2 -2
- package/messages/index.mjs +149 -147
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +17 -17
- package/rows/GridRowRenderer.d.ts +2 -0
- package/rows/GridRowRenderer.js +1 -1
- package/rows/GridRowRenderer.mjs +21 -19
- package/stacked/StackedModeRow.d.ts +2 -0
- package/stacked/StackedModeRow.js +1 -1
- package/stacked/StackedModeRow.mjs +97 -85
- package/utils/index.d.ts +7 -1
- package/utils/index.js +1 -1
- package/utils/index.mjs +67 -62
package/header/HeaderRow.mjs
CHANGED
|
@@ -6,71 +6,72 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
import * as t from "react";
|
|
9
|
-
import { GridHeaderCell as
|
|
10
|
-
import { uGrid as
|
|
11
|
-
import { HeaderThElement as
|
|
12
|
-
import { sortAriaLabel as y, messages as
|
|
13
|
-
import { sortAscSmallIcon as
|
|
14
|
-
import { clientColumn as P, isClientReference as
|
|
15
|
-
import { GridHeaderCellContainer as
|
|
16
|
-
import { HeaderRowDraggable as
|
|
17
|
-
import { GridHeaderRowContainer as
|
|
18
|
-
import { GridHeaderCellElementContainer as
|
|
19
|
-
import { HeaderCellResizer as
|
|
20
|
-
const
|
|
9
|
+
import { GridHeaderCell as j } from "./GridHeaderCell.mjs";
|
|
10
|
+
import { uGrid as q, classNames as r, IconWrap as J } from "@progress/kendo-react-common";
|
|
11
|
+
import { HeaderThElement as K } from "@progress/kendo-react-data-tools";
|
|
12
|
+
import { sortAriaLabel as y, messages as Q } from "../messages/index.mjs";
|
|
13
|
+
import { sortAscSmallIcon as U, sortDescSmallIcon as X } from "@progress/kendo-svg-icons";
|
|
14
|
+
import { clientColumn as P, isClientReference as N, resolveCells as Y } from "../utils/index.mjs";
|
|
15
|
+
import { GridHeaderCellContainer as R } from "./client/GridHeaderCellContainer.mjs";
|
|
16
|
+
import { HeaderRowDraggable as Z } from "./client/HeaderRowDraggable.mjs";
|
|
17
|
+
import { GridHeaderRowContainer as _ } from "./client/GridHeaderRowContainer.mjs";
|
|
18
|
+
import { GridHeaderCellElementContainer as $ } from "./client/GridHeaderCellElementContainer.mjs";
|
|
19
|
+
import { HeaderCellResizer as p } from "./client/HeaderCellResizer.mjs";
|
|
20
|
+
const ee = {
|
|
21
21
|
none: "none",
|
|
22
22
|
asc: "ascending",
|
|
23
23
|
desc: "descending"
|
|
24
|
-
},
|
|
25
|
-
const
|
|
26
|
-
let
|
|
27
|
-
const
|
|
24
|
+
}, ue = (e) => {
|
|
25
|
+
const w = e.columnsState || [], c = e.unstyled, s = c && c.uGrid ? c.uGrid : q;
|
|
26
|
+
let x = 0, A = -1;
|
|
27
|
+
const D = (a) => {
|
|
28
28
|
if (!e.sort)
|
|
29
29
|
return null;
|
|
30
|
-
const n =
|
|
30
|
+
const n = r(s.sortIcon({}));
|
|
31
31
|
return a >= 0 && [
|
|
32
32
|
/* @__PURE__ */ t.createElement("span", { key: 1, className: n }, /* @__PURE__ */ t.createElement(
|
|
33
|
-
|
|
33
|
+
J,
|
|
34
34
|
{
|
|
35
35
|
name: "sort-" + e.sort[a].dir + "-small",
|
|
36
|
-
icon: e.sort[a].dir === "asc" ?
|
|
36
|
+
icon: e.sort[a].dir === "asc" ? U : X
|
|
37
37
|
}
|
|
38
38
|
)),
|
|
39
|
-
e.sort.length > 1 && /* @__PURE__ */ t.createElement("span", { key: 2, className: n }, /* @__PURE__ */ t.createElement("span", { className:
|
|
39
|
+
e.sort.length > 1 && /* @__PURE__ */ t.createElement("span", { key: 2, className: n }, /* @__PURE__ */ t.createElement("span", { className: r(s.sortOrder({})) }, a + 1))
|
|
40
40
|
];
|
|
41
|
-
},
|
|
42
|
-
var I, M, v;
|
|
43
|
-
const l = e.columns[n], i =
|
|
44
|
-
|
|
41
|
+
}, L = (a) => a.map((n) => {
|
|
42
|
+
var I, M, v, G;
|
|
43
|
+
const l = e.columns[n], i = w[n], m = (M = (I = l.locked) != null ? I : i == null ? void 0 : i.locked) != null ? M : !1, d = e.sortable && l.sortable, u = e.sort ? e.sort.findIndex((o) => o.field === l.field) : -1, O = u >= 0 && e.sort[u].dir || "none", f = l.disableColumnMenu ? null : l.columnMenu || e.columnMenu, T = l.menuIcon || e.columnMenuIcon, V = r(
|
|
44
|
+
r(
|
|
45
45
|
s.headerTh({
|
|
46
46
|
first: l.kFirst,
|
|
47
47
|
filterable: !!f,
|
|
48
48
|
locked: m,
|
|
49
|
-
sorted: e.sort && e.sort.some((
|
|
49
|
+
sorted: e.sort && e.sort.some((o) => o.field === l.field),
|
|
50
50
|
sortable: d
|
|
51
51
|
})
|
|
52
52
|
),
|
|
53
53
|
l.headerClassName
|
|
54
54
|
);
|
|
55
55
|
m === !1 && (l.left = 0);
|
|
56
|
-
const
|
|
57
|
-
ariaSort:
|
|
56
|
+
const z = e.localization.toLanguageString(y, Q[y]), F = l.isAccessible ? {
|
|
57
|
+
ariaSort: ee[O],
|
|
58
58
|
role: "columnheader",
|
|
59
59
|
ariaColumnIndex: l.ariaColumnIndex,
|
|
60
60
|
ariaSelected: !1,
|
|
61
|
-
ariaDescription: d ?
|
|
61
|
+
ariaDescription: d ? z : "",
|
|
62
62
|
ariaHasPopup: f ? "dialog" : void 0
|
|
63
63
|
} : {
|
|
64
64
|
role: "presentation"
|
|
65
|
-
}, E = l.declarationIndex >= 0 ? ++
|
|
65
|
+
}, E = l.declarationIndex >= 0 ? ++A : --x, C = {
|
|
66
66
|
field: l.field,
|
|
67
67
|
title: l.title,
|
|
68
|
+
isGroupColumn: l.isGroupColumn,
|
|
68
69
|
selectionValue: (v = l.headerSelectionValue) != null ? v : e.headerSelectionValue,
|
|
69
|
-
children:
|
|
70
|
+
children: D(u),
|
|
70
71
|
selectionChange: null,
|
|
71
72
|
columnMenuWrapperProps: {
|
|
72
73
|
column: {
|
|
73
|
-
field: l.field,
|
|
74
|
+
field: (G = l.groupField) != null ? G : l.field,
|
|
74
75
|
title: l.title,
|
|
75
76
|
locked: m,
|
|
76
77
|
filter: l.filter,
|
|
@@ -85,13 +86,13 @@ const p = {
|
|
|
85
86
|
group: e.group,
|
|
86
87
|
groupable: e.groupable,
|
|
87
88
|
columnMenu: f,
|
|
88
|
-
columnMenuIcon:
|
|
89
|
+
columnMenuIcon: T
|
|
89
90
|
}
|
|
90
91
|
}, b = {
|
|
91
|
-
...
|
|
92
|
+
...F,
|
|
92
93
|
colSpan: l.headerColSpan,
|
|
93
94
|
rowSpan: l.rowSpan,
|
|
94
|
-
className:
|
|
95
|
+
className: V,
|
|
95
96
|
columnId: l.id,
|
|
96
97
|
navigatable: l.navigatable,
|
|
97
98
|
role: "columnheader"
|
|
@@ -100,14 +101,14 @@ const p = {
|
|
|
100
101
|
sortable: e.sortable,
|
|
101
102
|
sort: e.sort,
|
|
102
103
|
columnMenuWrapperProps: C.columnMenuWrapperProps
|
|
103
|
-
}, k = l.defaultHeaderCell ? l.defaultHeaderCell :
|
|
104
|
-
/* @__PURE__ */ t.createElement(
|
|
105
|
-
/* @__PURE__ */ t.createElement(
|
|
106
|
-
], h =
|
|
104
|
+
}, k = l.defaultHeaderCell ? l.defaultHeaderCell : j, H = [
|
|
105
|
+
/* @__PURE__ */ t.createElement(R, { key: 1, ...S, isClient: N(k) }, /* @__PURE__ */ t.createElement(k, { ...C })),
|
|
106
|
+
/* @__PURE__ */ t.createElement(p, { key: 2, column: g })
|
|
107
|
+
], h = Y(e.cells, l.cells);
|
|
107
108
|
if (h && h.headerCell) {
|
|
108
|
-
const
|
|
109
|
+
const o = h.headerCell, B = N(o);
|
|
109
110
|
return /* @__PURE__ */ t.createElement(
|
|
110
|
-
|
|
111
|
+
R,
|
|
111
112
|
{
|
|
112
113
|
key: E,
|
|
113
114
|
...S,
|
|
@@ -115,23 +116,23 @@ const p = {
|
|
|
115
116
|
isCustom: !0,
|
|
116
117
|
isClient: B
|
|
117
118
|
},
|
|
118
|
-
/* @__PURE__ */ t.createElement(
|
|
119
|
+
/* @__PURE__ */ t.createElement(o, { ...C, thProps: b, index: n }, H)
|
|
119
120
|
);
|
|
120
121
|
}
|
|
121
|
-
return /* @__PURE__ */ t.createElement(
|
|
122
|
-
}),
|
|
122
|
+
return /* @__PURE__ */ t.createElement($, { key: E, column: g }, /* @__PURE__ */ t.createElement(K, { ...b }, H));
|
|
123
|
+
}), W = e.columns.map(P);
|
|
123
124
|
return /* @__PURE__ */ t.createElement(
|
|
124
|
-
|
|
125
|
+
_,
|
|
125
126
|
{
|
|
126
127
|
sortable: e.sortable,
|
|
127
128
|
sort: e.sort,
|
|
128
129
|
navigatable: e.navigatable,
|
|
129
130
|
groupable: e.groupable,
|
|
130
|
-
columns:
|
|
131
|
+
columns: W
|
|
131
132
|
},
|
|
132
|
-
e.columnsMap.map((a, n) => /* @__PURE__ */ t.createElement(
|
|
133
|
+
e.columnsMap.map((a, n) => /* @__PURE__ */ t.createElement(Z, { key: n, className: r(s.simpleTr({})), ariaRowIndex: n + 1 }, L(a)))
|
|
133
134
|
);
|
|
134
135
|
};
|
|
135
136
|
export {
|
|
136
|
-
|
|
137
|
+
ue as HeaderRow
|
|
137
138
|
};
|
package/index.d.mts
CHANGED
|
@@ -65,7 +65,9 @@ import { GridNoRecordsProps } from './interfaces/GridNoRecordsProps';
|
|
|
65
65
|
import { GridSortSettings } from './interfaces/GridSortSettings';
|
|
66
66
|
import { GridScrollableSettings } from './interfaces/GridScrollableSettings';
|
|
67
67
|
import { GridPagerSettings } from './paging/GridPagerSettings.js';
|
|
68
|
-
import { GridGroupableSettings } from './interfaces/GridGroupableSettings';
|
|
68
|
+
import { GridGroupableSettings, GridGroupingMode } from './interfaces/GridGroupableSettings';
|
|
69
|
+
import { GridGroupColumnFn, GridGroupColumnSettings } from './interfaces/GridGroupColumnSettings';
|
|
70
|
+
import { GridColumnMenuGroupBaseProps } from './interfaces/GridColumnMenuGroupBaseProps';
|
|
69
71
|
import { GridColumnMenuItem } from './columnMenu/GridColumnMenuItem.js';
|
|
70
72
|
import { GridColumnMenuItemContent } from './columnMenu/GridColumnMenuItemContent.js';
|
|
71
73
|
import { GridColumnMenuItemGroup } from './columnMenu/GridColumnMenuItemGroup.js';
|
|
@@ -95,6 +97,6 @@ export * from './GridSearchBox.js';
|
|
|
95
97
|
export * from './GridPdfExportButton.js';
|
|
96
98
|
export * from './GridCsvExportButton.js';
|
|
97
99
|
export * from './toolbar-tools/smartbox/index.js';
|
|
98
|
-
export { CompositeHighlightDescriptor, Grid, GridHandle, GridHighlightDescriptor, GridProps, GridColumn, GridColumnProps, GridColSpanProps, GridEditDialogProps, GridColumnChildrenProps, GridCellProps, GridColumnType, GridRowReorderEvent, GridDataType, GridRowReorderSettings, GridCell, GridEditCell, GridGroupCell, GridHierarchyCell, GridDetailRow, GridDetailRowProps, GridRow, GridRowProps, GridFilterCell, GridFilterCellProps, GridHeaderCell, GridHeaderCellProps, GridSelectionCell, GridColumnMenuProps, GridReorderDropPosition, GridColumnMenuSort, GridColumnMenuFilter, GridColumnMenuGroup, GridColumnMenuItem, GridColumnMenuItemContent, GridColumnMenuItemGroup, GridColumnMenuFilterUI, GridColumnMenuFilterUIProps, GridColumnMenuFilterCell, GridColumnMenuFilterCellProps, GridColumnMenuCheckboxFilter, GridColumnMenuCheckboxFilterProps, GridColumnMenuColumnsList, GridColumnMenuColumnsListProps, GridColumnMenuColumnsChooser, GridColumnMenuColumnsChooserProps, GridColumnMenuColumnProps, GridColumnState, GridRowType, GridToolbar, GridToolbarProps, GridToolbarAIAssistant, GridToolbarAIAssistantHandle, GridToolbarAIAssistantProps, GridToolbarAIAssistantRequestData, GridAIAssistantCommand, GridAICommands, GridAIPrompt, GridAIPromptProps, GridToolbarSpacer, GridToolbarSpacerProps, GridToolbarSeparator, GridToolbarSeparatorProps, GridToolbarCheckboxFilter, GridToolbarCheckboxFilterProps, GridToolbarColumnsChooser, GridToolbarColumnsChooserProps, GridToolbarFilter, GridToolbarFilterProps, GridToolbarSort, GridToolbarSortProps, GridToolbarGroup, GridToolbarGroupProps, GridNoRecords, GridNoRecordsProps, GridSortSettings, GridScrollableSettings, GridPagerSettings, GridGroupableSettings, GridFooterCellProps, GridSelectableMode, GridSelectableSettings, GridFilterOperators, GridFilterOperator, GridColumnMenuWrapper, GridColumnMenuWrapperProps, getSelectedState, setSelectedState, getSelectedStateFromKeyDown, GRID_COL_INDEX_ATTRIBUTE, GRID_ROW_INDEX_ATTRIBUTE, GRID_PREVENT_SELECTION_ELEMENT, GridCommonDragLogic, rootFilterOrDefault, filterGroupByField, isColumnMenuSortActive, isColumnMenuFilterActive, GridColumnMenuFilterProps, cellBoolDropdownChange, cellInputChange, cellOperatorChange, booleanFilterValues, operators, combineSmartFilters, parseFilterDates, GridRowSpannableSettings, handleAIResponse, GridAIState, GridAIResponseResult, GridCSVExportOptions, useGridAIRequest, GridAIRequestData, UseGridAIRequestOptions, UseGridAIRequestReturn, GridRowPinChangeEvent, GridWebMcpProps, GridWebMcpToolsCallback, GridWebMcpToolsHelpers, McpToolOption, GridAIRequestConfig, GridAIResponse, GridAIHttpClient, createAxiosAIClient };
|
|
100
|
+
export { CompositeHighlightDescriptor, Grid, GridHandle, GridHighlightDescriptor, GridProps, GridColumn, GridColumnProps, GridColSpanProps, GridEditDialogProps, GridColumnChildrenProps, GridCellProps, GridColumnType, GridRowReorderEvent, GridDataType, GridRowReorderSettings, GridCell, GridEditCell, GridGroupCell, GridHierarchyCell, GridDetailRow, GridDetailRowProps, GridRow, GridRowProps, GridFilterCell, GridFilterCellProps, GridHeaderCell, GridHeaderCellProps, GridSelectionCell, GridColumnMenuProps, GridReorderDropPosition, GridColumnMenuSort, GridColumnMenuFilter, GridColumnMenuGroup, GridColumnMenuItem, GridColumnMenuItemContent, GridColumnMenuItemGroup, GridColumnMenuFilterUI, GridColumnMenuFilterUIProps, GridColumnMenuFilterCell, GridColumnMenuFilterCellProps, GridColumnMenuCheckboxFilter, GridColumnMenuCheckboxFilterProps, GridColumnMenuColumnsList, GridColumnMenuColumnsListProps, GridColumnMenuColumnsChooser, GridColumnMenuColumnsChooserProps, GridColumnMenuColumnProps, GridColumnState, GridRowType, GridToolbar, GridToolbarProps, GridToolbarAIAssistant, GridToolbarAIAssistantHandle, GridToolbarAIAssistantProps, GridToolbarAIAssistantRequestData, GridAIAssistantCommand, GridAICommands, GridAIPrompt, GridAIPromptProps, GridToolbarSpacer, GridToolbarSpacerProps, GridToolbarSeparator, GridToolbarSeparatorProps, GridToolbarCheckboxFilter, GridToolbarCheckboxFilterProps, GridToolbarColumnsChooser, GridToolbarColumnsChooserProps, GridToolbarFilter, GridToolbarFilterProps, GridToolbarSort, GridToolbarSortProps, GridToolbarGroup, GridToolbarGroupProps, GridNoRecords, GridNoRecordsProps, GridSortSettings, GridScrollableSettings, GridPagerSettings, GridGroupableSettings, GridGroupingMode, GridGroupColumnFn, GridGroupColumnSettings, GridColumnMenuGroupBaseProps, GridFooterCellProps, GridSelectableMode, GridSelectableSettings, GridFilterOperators, GridFilterOperator, GridColumnMenuWrapper, GridColumnMenuWrapperProps, getSelectedState, setSelectedState, getSelectedStateFromKeyDown, GRID_COL_INDEX_ATTRIBUTE, GRID_ROW_INDEX_ATTRIBUTE, GRID_PREVENT_SELECTION_ELEMENT, GridCommonDragLogic, rootFilterOrDefault, filterGroupByField, isColumnMenuSortActive, isColumnMenuFilterActive, GridColumnMenuFilterProps, cellBoolDropdownChange, cellInputChange, cellOperatorChange, booleanFilterValues, operators, combineSmartFilters, parseFilterDates, GridRowSpannableSettings, handleAIResponse, GridAIState, GridAIResponseResult, GridCSVExportOptions, useGridAIRequest, GridAIRequestData, UseGridAIRequestOptions, UseGridAIRequestReturn, GridRowPinChangeEvent, GridWebMcpProps, GridWebMcpToolsCallback, GridWebMcpToolsHelpers, McpToolOption, GridAIRequestConfig, GridAIResponse, GridAIHttpClient, createAxiosAIClient };
|
|
99
101
|
export { GridPinCell, GridHeaderPinCell };
|
|
100
102
|
export * from './interfaces/GridStackedLayoutSettings';
|
package/index.d.ts
CHANGED
|
@@ -65,7 +65,9 @@ import { GridNoRecordsProps } from './interfaces/GridNoRecordsProps';
|
|
|
65
65
|
import { GridSortSettings } from './interfaces/GridSortSettings';
|
|
66
66
|
import { GridScrollableSettings } from './interfaces/GridScrollableSettings';
|
|
67
67
|
import { GridPagerSettings } from './paging/GridPagerSettings.js';
|
|
68
|
-
import { GridGroupableSettings } from './interfaces/GridGroupableSettings';
|
|
68
|
+
import { GridGroupableSettings, GridGroupingMode } from './interfaces/GridGroupableSettings';
|
|
69
|
+
import { GridGroupColumnFn, GridGroupColumnSettings } from './interfaces/GridGroupColumnSettings';
|
|
70
|
+
import { GridColumnMenuGroupBaseProps } from './interfaces/GridColumnMenuGroupBaseProps';
|
|
69
71
|
import { GridColumnMenuItem } from './columnMenu/GridColumnMenuItem.js';
|
|
70
72
|
import { GridColumnMenuItemContent } from './columnMenu/GridColumnMenuItemContent.js';
|
|
71
73
|
import { GridColumnMenuItemGroup } from './columnMenu/GridColumnMenuItemGroup.js';
|
|
@@ -95,6 +97,6 @@ export * from './GridSearchBox.js';
|
|
|
95
97
|
export * from './GridPdfExportButton.js';
|
|
96
98
|
export * from './GridCsvExportButton.js';
|
|
97
99
|
export * from './toolbar-tools/smartbox/index.js';
|
|
98
|
-
export { CompositeHighlightDescriptor, Grid, GridHandle, GridHighlightDescriptor, GridProps, GridColumn, GridColumnProps, GridColSpanProps, GridEditDialogProps, GridColumnChildrenProps, GridCellProps, GridColumnType, GridRowReorderEvent, GridDataType, GridRowReorderSettings, GridCell, GridEditCell, GridGroupCell, GridHierarchyCell, GridDetailRow, GridDetailRowProps, GridRow, GridRowProps, GridFilterCell, GridFilterCellProps, GridHeaderCell, GridHeaderCellProps, GridSelectionCell, GridColumnMenuProps, GridReorderDropPosition, GridColumnMenuSort, GridColumnMenuFilter, GridColumnMenuGroup, GridColumnMenuItem, GridColumnMenuItemContent, GridColumnMenuItemGroup, GridColumnMenuFilterUI, GridColumnMenuFilterUIProps, GridColumnMenuFilterCell, GridColumnMenuFilterCellProps, GridColumnMenuCheckboxFilter, GridColumnMenuCheckboxFilterProps, GridColumnMenuColumnsList, GridColumnMenuColumnsListProps, GridColumnMenuColumnsChooser, GridColumnMenuColumnsChooserProps, GridColumnMenuColumnProps, GridColumnState, GridRowType, GridToolbar, GridToolbarProps, GridToolbarAIAssistant, GridToolbarAIAssistantHandle, GridToolbarAIAssistantProps, GridToolbarAIAssistantRequestData, GridAIAssistantCommand, GridAICommands, GridAIPrompt, GridAIPromptProps, GridToolbarSpacer, GridToolbarSpacerProps, GridToolbarSeparator, GridToolbarSeparatorProps, GridToolbarCheckboxFilter, GridToolbarCheckboxFilterProps, GridToolbarColumnsChooser, GridToolbarColumnsChooserProps, GridToolbarFilter, GridToolbarFilterProps, GridToolbarSort, GridToolbarSortProps, GridToolbarGroup, GridToolbarGroupProps, GridNoRecords, GridNoRecordsProps, GridSortSettings, GridScrollableSettings, GridPagerSettings, GridGroupableSettings, GridFooterCellProps, GridSelectableMode, GridSelectableSettings, GridFilterOperators, GridFilterOperator, GridColumnMenuWrapper, GridColumnMenuWrapperProps, getSelectedState, setSelectedState, getSelectedStateFromKeyDown, GRID_COL_INDEX_ATTRIBUTE, GRID_ROW_INDEX_ATTRIBUTE, GRID_PREVENT_SELECTION_ELEMENT, GridCommonDragLogic, rootFilterOrDefault, filterGroupByField, isColumnMenuSortActive, isColumnMenuFilterActive, GridColumnMenuFilterProps, cellBoolDropdownChange, cellInputChange, cellOperatorChange, booleanFilterValues, operators, combineSmartFilters, parseFilterDates, GridRowSpannableSettings, handleAIResponse, GridAIState, GridAIResponseResult, GridCSVExportOptions, useGridAIRequest, GridAIRequestData, UseGridAIRequestOptions, UseGridAIRequestReturn, GridRowPinChangeEvent, GridWebMcpProps, GridWebMcpToolsCallback, GridWebMcpToolsHelpers, McpToolOption, GridAIRequestConfig, GridAIResponse, GridAIHttpClient, createAxiosAIClient };
|
|
100
|
+
export { CompositeHighlightDescriptor, Grid, GridHandle, GridHighlightDescriptor, GridProps, GridColumn, GridColumnProps, GridColSpanProps, GridEditDialogProps, GridColumnChildrenProps, GridCellProps, GridColumnType, GridRowReorderEvent, GridDataType, GridRowReorderSettings, GridCell, GridEditCell, GridGroupCell, GridHierarchyCell, GridDetailRow, GridDetailRowProps, GridRow, GridRowProps, GridFilterCell, GridFilterCellProps, GridHeaderCell, GridHeaderCellProps, GridSelectionCell, GridColumnMenuProps, GridReorderDropPosition, GridColumnMenuSort, GridColumnMenuFilter, GridColumnMenuGroup, GridColumnMenuItem, GridColumnMenuItemContent, GridColumnMenuItemGroup, GridColumnMenuFilterUI, GridColumnMenuFilterUIProps, GridColumnMenuFilterCell, GridColumnMenuFilterCellProps, GridColumnMenuCheckboxFilter, GridColumnMenuCheckboxFilterProps, GridColumnMenuColumnsList, GridColumnMenuColumnsListProps, GridColumnMenuColumnsChooser, GridColumnMenuColumnsChooserProps, GridColumnMenuColumnProps, GridColumnState, GridRowType, GridToolbar, GridToolbarProps, GridToolbarAIAssistant, GridToolbarAIAssistantHandle, GridToolbarAIAssistantProps, GridToolbarAIAssistantRequestData, GridAIAssistantCommand, GridAICommands, GridAIPrompt, GridAIPromptProps, GridToolbarSpacer, GridToolbarSpacerProps, GridToolbarSeparator, GridToolbarSeparatorProps, GridToolbarCheckboxFilter, GridToolbarCheckboxFilterProps, GridToolbarColumnsChooser, GridToolbarColumnsChooserProps, GridToolbarFilter, GridToolbarFilterProps, GridToolbarSort, GridToolbarSortProps, GridToolbarGroup, GridToolbarGroupProps, GridNoRecords, GridNoRecordsProps, GridSortSettings, GridScrollableSettings, GridPagerSettings, GridGroupableSettings, GridGroupingMode, GridGroupColumnFn, GridGroupColumnSettings, GridColumnMenuGroupBaseProps, GridFooterCellProps, GridSelectableMode, GridSelectableSettings, GridFilterOperators, GridFilterOperator, GridColumnMenuWrapper, GridColumnMenuWrapperProps, getSelectedState, setSelectedState, getSelectedStateFromKeyDown, GRID_COL_INDEX_ATTRIBUTE, GRID_ROW_INDEX_ATTRIBUTE, GRID_PREVENT_SELECTION_ELEMENT, GridCommonDragLogic, rootFilterOrDefault, filterGroupByField, isColumnMenuSortActive, isColumnMenuFilterActive, GridColumnMenuFilterProps, cellBoolDropdownChange, cellInputChange, cellOperatorChange, booleanFilterValues, operators, combineSmartFilters, parseFilterDates, GridRowSpannableSettings, handleAIResponse, GridAIState, GridAIResponseResult, GridCSVExportOptions, useGridAIRequest, GridAIRequestData, UseGridAIRequestOptions, UseGridAIRequestReturn, GridRowPinChangeEvent, GridWebMcpProps, GridWebMcpToolsCallback, GridWebMcpToolsHelpers, McpToolOption, GridAIRequestConfig, GridAIResponse, GridAIHttpClient, createAxiosAIClient };
|
|
99
101
|
export { GridPinCell, GridHeaderPinCell };
|
|
100
102
|
export * from './interfaces/GridStackedLayoutSettings';
|
|
@@ -11,6 +11,7 @@ import { GridRowType } from './GridRowType';
|
|
|
11
11
|
import { CellProps, GroupState } from '@progress/kendo-react-data-tools';
|
|
12
12
|
import { GridColumnType } from './ColumnType';
|
|
13
13
|
import { IntlService, LocalizationService } from '@progress/kendo-react-intl';
|
|
14
|
+
import { GridGroupingMode } from './GridGroupableSettings';
|
|
14
15
|
/**
|
|
15
16
|
* Represents the props of the GridCell component
|
|
16
17
|
* ([more information](https://www.telerik.com/kendo-react-ui/components/grid/cells#toc-grid-cells)).
|
|
@@ -28,6 +29,22 @@ export interface GridCellProps extends Omit<CellProps, 'onChange' | 'render'> {
|
|
|
28
29
|
* The total number of rendered columns in the Grid. Optional.
|
|
29
30
|
*/
|
|
30
31
|
columnsCount?: number;
|
|
32
|
+
/**
|
|
33
|
+
* @hidden
|
|
34
|
+
*/
|
|
35
|
+
columnFields?: (string | undefined)[];
|
|
36
|
+
/**
|
|
37
|
+
* @hidden
|
|
38
|
+
*/
|
|
39
|
+
columnTitles?: (string | undefined)[];
|
|
40
|
+
/**
|
|
41
|
+
* @hidden
|
|
42
|
+
*/
|
|
43
|
+
columnGroupFields?: (string | undefined)[];
|
|
44
|
+
/**
|
|
45
|
+
* @hidden
|
|
46
|
+
*/
|
|
47
|
+
hiddenColumnTitleByField?: Record<string, string | undefined>;
|
|
31
48
|
/**
|
|
32
49
|
* Defines a set of custom cell components that the Grid will render instead of the default cell.
|
|
33
50
|
*/
|
|
@@ -105,6 +122,10 @@ export interface GridCellProps extends Omit<CellProps, 'onChange' | 'render'> {
|
|
|
105
122
|
/** @hidden */
|
|
106
123
|
intl?: IntlService;
|
|
107
124
|
/** @hidden */
|
|
125
|
+
groupingMode?: GridGroupingMode;
|
|
126
|
+
/** @hidden */
|
|
127
|
+
hasCheckboxColumn?: boolean;
|
|
128
|
+
/** @hidden */
|
|
108
129
|
_rowSpan?: {
|
|
109
130
|
count: number | null;
|
|
110
131
|
value: any;
|
|
@@ -59,6 +59,66 @@ export interface GridCustomCellProps extends GridCellProps {
|
|
|
59
59
|
* The default children of the table cell.
|
|
60
60
|
*/
|
|
61
61
|
children?: React.ReactNode | React.ReactNode[];
|
|
62
|
+
/**
|
|
63
|
+
* Indicates that this invocation of the custom `groupColumn.cells.groupHeader` /
|
|
64
|
+
* `groupColumn.cells.groupFooter` component is for a "filler" cell position that
|
|
65
|
+
* carries no content of its own, rather than the level's real toggle/value content
|
|
66
|
+
* cell — ancestor-level spacer columns when `groupable.displayMode` is
|
|
67
|
+
* `'multipleColumns'`, or (when `displayMode` is `'default'`) ancestor-level indent
|
|
68
|
+
* cells on the group-header row and every cell on the group-footer row. Check this
|
|
69
|
+
* flag to render simplified/blank content for such positions instead of the level's
|
|
70
|
+
* normal group header/footer content.
|
|
71
|
+
*
|
|
72
|
+
* @default false
|
|
73
|
+
*/
|
|
74
|
+
isSpacerCell?: boolean;
|
|
75
|
+
/**
|
|
76
|
+
* Pre-calculated column span for ancestor-level group columns (columns before this group level).
|
|
77
|
+
* Applicable only when `groupable.displayMode` is `'multipleColumns'` or `'singleColumn'` and `rowType` is `'groupFooter'` or `'groupHeader'`.
|
|
78
|
+
* Use this in the `colSpan` attribute of ancestor-level spacer cells.
|
|
79
|
+
*
|
|
80
|
+
* @default undefined
|
|
81
|
+
*/
|
|
82
|
+
leadingGroupColumnSpan?: number;
|
|
83
|
+
/**
|
|
84
|
+
* Pre-calculated column span for the content cell of this group column.
|
|
85
|
+
* Applicable only when `groupable.displayMode` is `'multipleColumns'` or `'singleColumn'` and `rowType` is `'groupFooter'` or `'groupHeader'`.
|
|
86
|
+
* Use this in the `colSpan` attribute of the cell containing the main group content.
|
|
87
|
+
*
|
|
88
|
+
* @default undefined
|
|
89
|
+
*/
|
|
90
|
+
contentColumnSpan?: number;
|
|
91
|
+
/**
|
|
92
|
+
* Pre-calculated column span for descendant-level group columns (columns after this group level).
|
|
93
|
+
* Applicable only when `groupable.displayMode` is `'multipleColumns'` or `'singleColumn'` and `rowType` is `'groupFooter'` or `'groupHeader'`.
|
|
94
|
+
* Use this in the `colSpan` attribute of descendant-level spacer cells.
|
|
95
|
+
*
|
|
96
|
+
* @default undefined
|
|
97
|
+
*/
|
|
98
|
+
trailingGroupColumnSpan?: number;
|
|
99
|
+
/**
|
|
100
|
+
* Looks up the rendered column index of a leaf column by its `field`, among the columns
|
|
101
|
+
* that come after this group column's own cell (the same columns covered by
|
|
102
|
+
* `trailingGroupColumnSpan`). Use this to align filler/aggregate cells rendered by a
|
|
103
|
+
* custom `groupColumn.cells.groupHeader` / `groupColumn.cells.groupFooter` template with
|
|
104
|
+
* a specific data column, without hardcoding column counts or positions.
|
|
105
|
+
* Applicable only when `groupable.displayMode` is `'multipleColumns'` or `'singleColumn'`
|
|
106
|
+
* and `rowType` is `'groupFooter'` or `'groupHeader'`. Returns `undefined` if the
|
|
107
|
+
* specified `field` is not among the rendered columns.
|
|
108
|
+
*
|
|
109
|
+
* @default undefined
|
|
110
|
+
*/
|
|
111
|
+
getColumnIndexForField?: (field: string) => number | undefined;
|
|
112
|
+
/**
|
|
113
|
+
* The built-in group-level selection checkbox, when the Grid has a checkbox selection
|
|
114
|
+
* column configured. Render this wherever you want the checkbox to appear inside a
|
|
115
|
+
* custom `groupColumn.cells.groupHeader` component instead of reimplementing the
|
|
116
|
+
* selection state and toggle handling yourself. `undefined` when there is no checkbox
|
|
117
|
+
* selection column, or for `groupFooter` cells (which never render a checkbox).
|
|
118
|
+
*
|
|
119
|
+
* @default undefined
|
|
120
|
+
*/
|
|
121
|
+
groupSelectionCheckbox?: React.ReactNode;
|
|
62
122
|
}
|
|
63
123
|
/**
|
|
64
124
|
* The properties of the footer Grid Cell.
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { ComponentType } from 'react';
|
|
9
|
+
import { GroupDescriptor } from '@progress/kendo-data-query';
|
|
10
|
+
import { GridColumnMenuGroupBaseProps } from './GridColumnMenuGroupBaseProps';
|
|
11
|
+
import { GridCustomCellProps } from './GridCellsSettings';
|
|
12
|
+
/**
|
|
13
|
+
* A callback invoked once per synthesized group column, receiving a `GroupDescriptor`,
|
|
14
|
+
* and returning the settings to apply to that column.
|
|
15
|
+
*
|
|
16
|
+
* In `'multipleColumns'` mode there is one synthesized column per active group level, so
|
|
17
|
+
* the callback runs once per level, each time receiving that level's own `GroupDescriptor`.
|
|
18
|
+
* In `'singleColumn'` mode there is only ever one synthesized column for all levels, so the
|
|
19
|
+
* callback runs exactly once, receiving the first group level's `GroupDescriptor` — deeper
|
|
20
|
+
* levels aren't passed to it even though the same column renders their header/footer rows.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```tsx
|
|
24
|
+
* const groupColumnFn: GridGroupColumnFn = (groupDescriptor) => ({
|
|
25
|
+
* title: groupDescriptor.field,
|
|
26
|
+
* width: 200,
|
|
27
|
+
* });
|
|
28
|
+
*
|
|
29
|
+
* <Grid groupable={{ displayMode: 'multipleColumns', groupColumn: groupColumnFn }} />
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
export type GridGroupColumnFn = (context: GroupDescriptor) => GridGroupColumnSettings;
|
|
33
|
+
/**
|
|
34
|
+
* The settings for a synthesized group column produced by every `displayMode`. Most
|
|
35
|
+
* properties (`title`, `width`, `columnMenu`, etc.) only take effect for `'singleColumn'`
|
|
36
|
+
* and `'multipleColumns'` — the two modes that render the group column as a real, visible
|
|
37
|
+
* column — see each property's own doc for its exact scope. `cells` is the exception:
|
|
38
|
+
* it applies universally, including `'default'` and `'compact'` (see its doc below).
|
|
39
|
+
* Pass as the `groupColumn` property of `GridGroupableSettings` either as a static
|
|
40
|
+
* object (same settings for every group column) or via a `GridGroupColumnFn` callback (per-level
|
|
41
|
+
* customization).
|
|
42
|
+
*/
|
|
43
|
+
export interface GridGroupColumnSettings {
|
|
44
|
+
/**
|
|
45
|
+
* The column header text.
|
|
46
|
+
*
|
|
47
|
+
* @example
|
|
48
|
+
* ```tsx
|
|
49
|
+
* <Grid groupable={{ displayMode: 'singleColumn', groupColumn: { title: 'Group' } }} />
|
|
50
|
+
* ```
|
|
51
|
+
*/
|
|
52
|
+
title?: string;
|
|
53
|
+
/**
|
|
54
|
+
* The initial width of the group column in pixels.
|
|
55
|
+
*
|
|
56
|
+
* @example
|
|
57
|
+
* ```tsx
|
|
58
|
+
* <Grid groupable={{ displayMode: 'multipleColumns', groupColumn: { width: 200 } }} />
|
|
59
|
+
* ```
|
|
60
|
+
*/
|
|
61
|
+
width?: number;
|
|
62
|
+
/**
|
|
63
|
+
* Locks (freezes) the group column so it remains visible while the Grid is scrolled horizontally.
|
|
64
|
+
* Equivalent to the existing per-column `locked` behavior.
|
|
65
|
+
* When set, overrides `props.lockGroups` for this specific group level.
|
|
66
|
+
*
|
|
67
|
+
* @default false
|
|
68
|
+
*
|
|
69
|
+
* @example
|
|
70
|
+
* ```tsx
|
|
71
|
+
* <Grid groupable={{ displayMode: 'multipleColumns', groupColumn: { locked: true } }} />
|
|
72
|
+
* ```
|
|
73
|
+
*/
|
|
74
|
+
locked?: boolean;
|
|
75
|
+
/**
|
|
76
|
+
* Allows the group column to be resized by the user.
|
|
77
|
+
*
|
|
78
|
+
* @default true
|
|
79
|
+
*
|
|
80
|
+
* @example
|
|
81
|
+
* ```tsx
|
|
82
|
+
* <Grid groupable={{ displayMode: 'singleColumn', groupColumn: { resizable: false } }} />
|
|
83
|
+
* ```
|
|
84
|
+
*/
|
|
85
|
+
resizable?: boolean;
|
|
86
|
+
/**
|
|
87
|
+
* The minimum width of the group column in pixels that the user can resize it to.
|
|
88
|
+
*
|
|
89
|
+
* @example
|
|
90
|
+
* ```tsx
|
|
91
|
+
* <Grid groupable={{ displayMode: 'multipleColumns', groupColumn: { minWidth: 80 } }} />
|
|
92
|
+
* ```
|
|
93
|
+
*/
|
|
94
|
+
minWidth?: number;
|
|
95
|
+
/**
|
|
96
|
+
* The maximum width of the group column in pixels that the user can resize it to.
|
|
97
|
+
*
|
|
98
|
+
* @example
|
|
99
|
+
* ```tsx
|
|
100
|
+
* <Grid groupable={{ displayMode: 'multipleColumns', groupColumn: { maxWidth: 400 } }} />
|
|
101
|
+
* ```
|
|
102
|
+
*/
|
|
103
|
+
maxWidth?: number;
|
|
104
|
+
/**
|
|
105
|
+
* Allows the group column to be reordered by the user via drag and drop.
|
|
106
|
+
*
|
|
107
|
+
* @default true
|
|
108
|
+
*
|
|
109
|
+
* @example
|
|
110
|
+
* ```tsx
|
|
111
|
+
* <Grid groupable={{ displayMode: 'multipleColumns', groupColumn: { reorderable: false } }} />
|
|
112
|
+
* ```
|
|
113
|
+
*/
|
|
114
|
+
reorderable?: boolean;
|
|
115
|
+
/**
|
|
116
|
+
* A custom column menu component rendered in the group column header.
|
|
117
|
+
* The component receives `GridColumnMenuGroupBaseProps`.
|
|
118
|
+
* Has no effect when `displayMode` is `'default'` or `'compact'`.
|
|
119
|
+
*
|
|
120
|
+
* @example
|
|
121
|
+
* ```tsx
|
|
122
|
+
* import { GridColumnMenuGroupBaseProps } from '@progress/kendo-react-grid';
|
|
123
|
+
*
|
|
124
|
+
* const MyGroupColumnMenu = (props: GridColumnMenuGroupBaseProps) => <div>...</div>;
|
|
125
|
+
*
|
|
126
|
+
* <Grid groupable={{ displayMode: 'multipleColumns', groupColumn: { columnMenu: MyGroupColumnMenu } }} />
|
|
127
|
+
* ```
|
|
128
|
+
*/
|
|
129
|
+
columnMenu?: ComponentType<GridColumnMenuGroupBaseProps>;
|
|
130
|
+
/**
|
|
131
|
+
* Custom cell components for the group column. Unlike the other `groupColumn`
|
|
132
|
+
* settings (`title`, `width`, `columnMenu`, etc. — which only apply to `'singleColumn'`
|
|
133
|
+
* and `'multipleColumns'`, since only those modes render a real, visible group column),
|
|
134
|
+
* `cells` applies in **every** `displayMode`, including `'default'` and `'compact'` —
|
|
135
|
+
* the synthesized group column always exists internally and is always rendered through
|
|
136
|
+
* these templates, even when it has zero width or is split into per-level indent cells.
|
|
137
|
+
*
|
|
138
|
+
* - `groupHeader` — Replaces the default `"fieldLabel: value"` content area of the group header cell.
|
|
139
|
+
* The expand/collapse toggle button is rendered before this component and is not affected.
|
|
140
|
+
* - `groupFooter` — Replaces the footer cell content of the group column.
|
|
141
|
+
*
|
|
142
|
+
* Both templates may be invoked for "filler" cell positions that carry no content of
|
|
143
|
+
* their own — ancestor-level spacer columns in `'multipleColumns'` mode, per-level
|
|
144
|
+
* indent cells in `'default'` mode, and the entire group-footer row in `'default'` mode
|
|
145
|
+
* (which renders its aggregates through the data columns instead, see
|
|
146
|
+
* `GridCellsSettings.groupFooter`). These positions are flagged via `isSpacerCell` on
|
|
147
|
+
* `GridCustomCellProps` so the template can render them distinctly (e.g. blank or
|
|
148
|
+
* differently styled) from the real toggle/value content cell.
|
|
149
|
+
*
|
|
150
|
+
* @example
|
|
151
|
+
* ```tsx
|
|
152
|
+
* import { GridCustomCellProps } from '@progress/kendo-react-grid';
|
|
153
|
+
*
|
|
154
|
+
* const MyGroupHeader = (props: GridCustomCellProps) =>
|
|
155
|
+
* props.isSpacerCell ? <td {...props.tdProps} /> : <span>{props.dataItem}</span>;
|
|
156
|
+
*
|
|
157
|
+
* <Grid groupable={{ displayMode: 'singleColumn', groupColumn: { cells: { groupHeader: MyGroupHeader } } }} />
|
|
158
|
+
* ```
|
|
159
|
+
*/
|
|
160
|
+
cells?: {
|
|
161
|
+
/**
|
|
162
|
+
* Custom component for the group header cell content.
|
|
163
|
+
*/
|
|
164
|
+
groupHeader?: ComponentType<GridCustomCellProps>;
|
|
165
|
+
/**
|
|
166
|
+
* Custom component for the group footer cell content.
|
|
167
|
+
*/
|
|
168
|
+
groupFooter?: ComponentType<GridCustomCellProps>;
|
|
169
|
+
};
|
|
170
|
+
}
|
|
@@ -6,6 +6,17 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
import { GridGroupExpandableSettings } from './GridGroupExpandableSettings';
|
|
9
|
+
import { GridGroupColumnFn, GridGroupColumnSettings } from './GridGroupColumnSettings';
|
|
10
|
+
/**
|
|
11
|
+
* Specifies the visualization mode for grouped data in the Grid.
|
|
12
|
+
*
|
|
13
|
+
* The available options are:
|
|
14
|
+
* - `'default'` — Renders the legacy indent-cell grouping layout.
|
|
15
|
+
* - `'compact'` — Removes the empty indent cells and renders group headers across the full row width.
|
|
16
|
+
* - `'singleColumn'` — Renders a single dedicated group column for all group levels.
|
|
17
|
+
* - `'multipleColumns'` — Renders one dedicated group column per group level.
|
|
18
|
+
*/
|
|
19
|
+
export type GridGroupingMode = 'default' | 'compact' | 'singleColumn' | 'multipleColumns';
|
|
9
20
|
/**
|
|
10
21
|
* The settings for grouping the data of the Grid ([see example](https://www.telerik.com/kendo-react-ui/components/grid/grouping/grouping)).
|
|
11
22
|
*/
|
|
@@ -45,4 +56,59 @@ export interface GridGroupableSettings {
|
|
|
45
56
|
* @default false
|
|
46
57
|
*/
|
|
47
58
|
stickyFooters?: boolean;
|
|
59
|
+
/**
|
|
60
|
+
* Sets the visualization mode for grouped data.
|
|
61
|
+
*
|
|
62
|
+
* The available options are:
|
|
63
|
+
* - `'default'` — Renders the legacy indent-cell grouping layout (default behavior).
|
|
64
|
+
* - `'compact'` — Removes the empty indent cells; group headers span the full row width.
|
|
65
|
+
* - `'singleColumn'` — Renders a single dedicated group column for all group levels.
|
|
66
|
+
* - `'multipleColumns'` — Renders one dedicated group column per group level.
|
|
67
|
+
*
|
|
68
|
+
* @default 'default'
|
|
69
|
+
*
|
|
70
|
+
* @example
|
|
71
|
+
* ```tsx
|
|
72
|
+
* <Grid groupable={{ displayMode: 'singleColumn' }} />
|
|
73
|
+
* ```
|
|
74
|
+
*/
|
|
75
|
+
displayMode?: GridGroupingMode;
|
|
76
|
+
/**
|
|
77
|
+
* Hides the data column for each field the Grid is grouped by.
|
|
78
|
+
* Only applies when `displayMode` is `'singleColumn'` or `'multipleColumns'` — the
|
|
79
|
+
* synthesized group column already displays the grouped field's value, so the
|
|
80
|
+
* original data column can be hidden to avoid duplication. Has no effect in `'default'` or
|
|
81
|
+
* `'compact'` modes.
|
|
82
|
+
*
|
|
83
|
+
* @default false
|
|
84
|
+
*
|
|
85
|
+
* @example
|
|
86
|
+
* ```tsx
|
|
87
|
+
* // Opt in to hide the original data column alongside the group column.
|
|
88
|
+
* <Grid groupable={{ displayMode: 'multipleColumns', hideGroupedColumns: true }} />
|
|
89
|
+
* ```
|
|
90
|
+
*/
|
|
91
|
+
hideGroupedColumns?: boolean;
|
|
92
|
+
/**
|
|
93
|
+
* Customizes the synthesized group column(s). Accepts either a settings object
|
|
94
|
+
* (applied uniformly to every group column) or a `GridGroupColumnFn` callback invoked
|
|
95
|
+
* once per synthesized column (for per-level customization) — see `GridGroupColumnFn`
|
|
96
|
+
* for how invocation differs between `'singleColumn'` and `'multipleColumns'`.
|
|
97
|
+
*
|
|
98
|
+
* Most settings (`title`, `width`, `columnMenu`, etc.) only take effect for
|
|
99
|
+
* `'singleColumn'` and `'multipleColumns'` — the two modes that render the group
|
|
100
|
+
* column as a real, visible column. `cells` (custom `groupHeader`/`groupFooter`
|
|
101
|
+
* templates) is the exception and applies in every `displayMode`, including
|
|
102
|
+
* `'default'` and `'compact'` — see `GridGroupColumnSettings.cells`.
|
|
103
|
+
*
|
|
104
|
+
* @example
|
|
105
|
+
* ```tsx
|
|
106
|
+
* // Object form — same settings applied to every group column
|
|
107
|
+
* <Grid groupable={{ displayMode: 'multipleColumns', groupColumn: { width: 200 } }} />
|
|
108
|
+
*
|
|
109
|
+
* // Callback form — per-level customization
|
|
110
|
+
* <Grid groupable={{ displayMode: 'multipleColumns', groupColumn: (groupDescriptor) => ({ title: groupDescriptor.field }) }} />
|
|
111
|
+
* ```
|
|
112
|
+
*/
|
|
113
|
+
groupColumn?: GridGroupColumnFn | GridGroupColumnSettings;
|
|
48
114
|
}
|
package/messages/index.d.ts
CHANGED
|
@@ -73,6 +73,10 @@ export declare const groupColumn = "grid.groupColumn";
|
|
|
73
73
|
* @hidden
|
|
74
74
|
*/
|
|
75
75
|
export declare const ungroupColumn = "grid.ungroupColumn";
|
|
76
|
+
/**
|
|
77
|
+
* @hidden
|
|
78
|
+
*/
|
|
79
|
+
export declare const groupColumnTitle = "grid.groupColumnTitle";
|
|
76
80
|
/**
|
|
77
81
|
* @hidden
|
|
78
82
|
*/
|
|
@@ -401,6 +405,7 @@ export declare const messages: {
|
|
|
401
405
|
"grid.toolbarCheckboxFilter": string;
|
|
402
406
|
"grid.groupColumn": string;
|
|
403
407
|
"grid.ungroupColumn": string;
|
|
408
|
+
"grid.groupColumnTitle": string;
|
|
404
409
|
"grid.columnMenu": string;
|
|
405
410
|
"grid.pagerItemsPerPage": string;
|
|
406
411
|
"grid.pagerInfo": string;
|