@progress/kendo-react-grid 7.2.4-develop.3 → 7.3.0-develop.1

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 (174) hide show
  1. package/Grid.js +8 -0
  2. package/Grid.mjs +1111 -0
  3. package/GridColumn.js +8 -0
  4. package/GridColumn.mjs +53 -0
  5. package/GridNoRecords.js +8 -0
  6. package/GridNoRecords.mjs +25 -0
  7. package/GridToolbar.js +8 -0
  8. package/GridToolbar.mjs +39 -0
  9. package/StatusBar.js +8 -0
  10. package/StatusBar.mjs +53 -0
  11. package/VirtualScroll.js +8 -0
  12. package/VirtualScroll.mjs +128 -0
  13. package/VirtualScrollFixed.js +8 -0
  14. package/VirtualScrollFixed.mjs +86 -0
  15. package/cells/GridCell.js +8 -0
  16. package/cells/GridCell.mjs +57 -0
  17. package/cells/GridDetailCell.js +8 -0
  18. package/cells/GridDetailCell.mjs +30 -0
  19. package/cells/GridDetailHierarchyCell.js +8 -0
  20. package/cells/GridDetailHierarchyCell.mjs +17 -0
  21. package/cells/GridEditCell.js +8 -0
  22. package/cells/GridEditCell.mjs +172 -0
  23. package/cells/GridFilterCell.js +8 -0
  24. package/cells/GridFilterCell.mjs +145 -0
  25. package/cells/GridGroupCell.js +8 -0
  26. package/cells/GridGroupCell.mjs +115 -0
  27. package/cells/GridHierarchyCell.js +8 -0
  28. package/cells/GridHierarchyCell.mjs +84 -0
  29. package/cells/GridSelectionCell.js +8 -0
  30. package/cells/GridSelectionCell.mjs +54 -0
  31. package/columnMenu/GridColumnMenuCheckboxFilter.js +8 -0
  32. package/columnMenu/GridColumnMenuCheckboxFilter.mjs +199 -0
  33. package/columnMenu/GridColumnMenuColumnsList.js +8 -0
  34. package/columnMenu/GridColumnMenuColumnsList.mjs +60 -0
  35. package/columnMenu/GridColumnMenuFilter.js +8 -0
  36. package/columnMenu/GridColumnMenuFilter.mjs +188 -0
  37. package/columnMenu/GridColumnMenuFilterCell.js +8 -0
  38. package/columnMenu/GridColumnMenuFilterCell.mjs +96 -0
  39. package/columnMenu/GridColumnMenuFilterUI.js +8 -0
  40. package/columnMenu/GridColumnMenuFilterUI.mjs +36 -0
  41. package/columnMenu/GridColumnMenuGroup.js +8 -0
  42. package/columnMenu/GridColumnMenuGroup.mjs +50 -0
  43. package/columnMenu/GridColumnMenuItem.js +8 -0
  44. package/columnMenu/GridColumnMenuItem.mjs +22 -0
  45. package/columnMenu/GridColumnMenuItemContent.js +8 -0
  46. package/columnMenu/GridColumnMenuItemContent.mjs +30 -0
  47. package/columnMenu/GridColumnMenuItemGroup.js +8 -0
  48. package/columnMenu/GridColumnMenuItemGroup.mjs +30 -0
  49. package/columnMenu/GridColumnMenuSort.js +8 -0
  50. package/columnMenu/GridColumnMenuSort.mjs +75 -0
  51. package/columnMenu/GridColumnMenuWrapper.js +8 -0
  52. package/columnMenu/GridColumnMenuWrapper.mjs +91 -0
  53. package/constants/index.js +8 -0
  54. package/constants/index.mjs +15 -0
  55. package/dist/cdn/js/kendo-react-grid.js +8 -5
  56. package/drag/ColumnDraggable.js +8 -0
  57. package/drag/ColumnDraggable.mjs +43 -0
  58. package/drag/ColumnResize.js +8 -0
  59. package/drag/ColumnResize.mjs +128 -0
  60. package/drag/CommonDragLogic.js +8 -0
  61. package/drag/CommonDragLogic.mjs +104 -0
  62. package/drag/GroupingIndicator.js +8 -0
  63. package/drag/GroupingIndicator.mjs +91 -0
  64. package/filterCommon.js +8 -0
  65. package/filterCommon.mjs +103 -0
  66. package/footer/Footer.js +8 -0
  67. package/footer/Footer.mjs +76 -0
  68. package/footer/FooterRow.js +8 -0
  69. package/footer/FooterRow.mjs +46 -0
  70. package/header/FilterRow.js +8 -0
  71. package/header/FilterRow.mjs +96 -0
  72. package/header/GridHeaderCell.js +8 -0
  73. package/header/GridHeaderCell.mjs +38 -0
  74. package/header/GridHeaderSelectionCell.js +8 -0
  75. package/header/GridHeaderSelectionCell.mjs +44 -0
  76. package/header/GroupPanel.js +8 -0
  77. package/header/GroupPanel.mjs +60 -0
  78. package/header/Header.js +8 -0
  79. package/header/Header.mjs +107 -0
  80. package/header/HeaderRow.js +8 -0
  81. package/header/HeaderRow.mjs +155 -0
  82. package/index.d.mts +2777 -5
  83. package/index.d.ts +2777 -57
  84. package/index.js +8 -5
  85. package/index.mjs +89 -3845
  86. package/interfaces/GridSortSettings.js +8 -0
  87. package/interfaces/GridSortSettings.mjs +12 -0
  88. package/messages/index.js +8 -0
  89. package/messages/index.mjs +107 -0
  90. package/package-metadata.js +8 -0
  91. package/package-metadata.mjs +19 -0
  92. package/package.json +10 -10
  93. package/paging/GridPagerSettings.js +8 -0
  94. package/paging/GridPagerSettings.mjs +28 -0
  95. package/rows/GridDetailRow.js +8 -0
  96. package/rows/GridDetailRow.mjs +20 -0
  97. package/rows/GridRow.js +8 -0
  98. package/rows/GridRow.mjs +51 -0
  99. package/utils/index.js +8 -0
  100. package/utils/index.mjs +180 -0
  101. package/Grid.d.ts +0 -267
  102. package/GridColumn.d.ts +0 -28
  103. package/GridNoRecords.d.ts +0 -40
  104. package/GridToolbar.d.ts +0 -54
  105. package/ScrollMode.d.ts +0 -5
  106. package/StatusBar.d.ts +0 -51
  107. package/VirtualScroll.d.ts +0 -51
  108. package/VirtualScrollFixed.d.ts +0 -53
  109. package/cells/GridCell.d.ts +0 -6
  110. package/cells/GridDetailCell.d.ts +0 -18
  111. package/cells/GridDetailHierarchyCell.d.ts +0 -10
  112. package/cells/GridEditCell.d.ts +0 -9
  113. package/cells/GridFilterCell.d.ts +0 -20
  114. package/cells/GridGroupCell.d.ts +0 -9
  115. package/cells/GridHierarchyCell.d.ts +0 -9
  116. package/cells/GridSelectionCell.d.ts +0 -9
  117. package/columnMenu/GridColumnMenuCheckboxFilter.d.ts +0 -122
  118. package/columnMenu/GridColumnMenuColumnsList.d.ts +0 -31
  119. package/columnMenu/GridColumnMenuFilter.d.ts +0 -165
  120. package/columnMenu/GridColumnMenuFilterCell.d.ts +0 -37
  121. package/columnMenu/GridColumnMenuFilterUI.d.ts +0 -12
  122. package/columnMenu/GridColumnMenuGroup.d.ts +0 -77
  123. package/columnMenu/GridColumnMenuItem.d.ts +0 -40
  124. package/columnMenu/GridColumnMenuItemContent.d.ts +0 -24
  125. package/columnMenu/GridColumnMenuItemGroup.d.ts +0 -20
  126. package/columnMenu/GridColumnMenuSort.d.ts +0 -89
  127. package/columnMenu/GridColumnMenuWrapper.d.ts +0 -49
  128. package/constants/index.d.ts +0 -10
  129. package/drag/ColumnDraggable.d.ts +0 -38
  130. package/drag/ColumnResize.d.ts +0 -37
  131. package/drag/CommonDragLogic.d.ts +0 -44
  132. package/drag/GroupingIndicator.d.ts +0 -41
  133. package/filterCommon.d.ts +0 -73
  134. package/footer/Footer.d.ts +0 -38
  135. package/footer/FooterRow.d.ts +0 -25
  136. package/header/FilterRow.d.ts +0 -38
  137. package/header/GridHeaderCell.d.ts +0 -56
  138. package/header/GridHeaderSelectionCell.d.ts +0 -10
  139. package/header/GroupPanel.d.ts +0 -26
  140. package/header/Header.d.ts +0 -46
  141. package/header/HeaderRow.d.ts +0 -51
  142. package/interfaces/GridCellProps.d.ts +0 -73
  143. package/interfaces/GridCellsSettings.d.ts +0 -115
  144. package/interfaces/GridColumnMenuBaseProps.d.ts +0 -18
  145. package/interfaces/GridColumnMenuColumnProps.d.ts +0 -29
  146. package/interfaces/GridColumnMenuFilterBaseProps.d.ts +0 -28
  147. package/interfaces/GridColumnMenuFilterUIProps.d.ts +0 -35
  148. package/interfaces/GridColumnMenuGroupBaseProps.d.ts +0 -23
  149. package/interfaces/GridColumnMenuProps.d.ts +0 -12
  150. package/interfaces/GridColumnMenuSortBaseProps.d.ts +0 -24
  151. package/interfaces/GridColumnProps.d.ts +0 -92
  152. package/interfaces/GridDetailRowProps.d.ts +0 -17
  153. package/interfaces/GridFilterCellProps.d.ts +0 -68
  154. package/interfaces/GridFilterOperator.d.ts +0 -10
  155. package/interfaces/GridFilterOperators.d.ts +0 -53
  156. package/interfaces/GridFooterCellProps.d.ts +0 -26
  157. package/interfaces/GridGroupableSettings.d.ts +0 -17
  158. package/interfaces/GridHeaderCellProps.d.ts +0 -24
  159. package/interfaces/GridNoRecordsProps.d.ts +0 -13
  160. package/interfaces/GridProps.d.ts +0 -333
  161. package/interfaces/GridRowProps.d.ts +0 -67
  162. package/interfaces/GridRowType.d.ts +0 -13
  163. package/interfaces/GridSelectableSettings.d.ts +0 -22
  164. package/interfaces/GridSortSettings.d.ts +0 -17
  165. package/interfaces/GridToolbarProps.d.ts +0 -37
  166. package/interfaces/VirtualScrollInterface.d.ts +0 -31
  167. package/interfaces/events.d.ts +0 -232
  168. package/messages/index.d.ts +0 -199
  169. package/package-metadata.d.ts +0 -9
  170. package/paging/GridPagerSettings.d.ts +0 -71
  171. package/paging/Page.d.ts +0 -17
  172. package/rows/GridDetailRow.d.ts +0 -55
  173. package/rows/GridRow.d.ts +0 -15
  174. package/utils/index.d.ts +0 -73
package/index.d.mts CHANGED
@@ -1,5 +1,2777 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2024 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the package root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- export * from './index';
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2024 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 { BaseEvent } from '@progress/kendo-react-common';
9
+ import { CellProps } from '@progress/kendo-react-data-tools';
10
+ import { ClipboardDataEvent } from '@progress/kendo-react-data-tools';
11
+ import { ClipboardSettings } from '@progress/kendo-react-data-tools';
12
+ import { ColumnBaseProps } from '@progress/kendo-react-data-tools';
13
+ import { ColumnSortSettings } from '@progress/kendo-react-data-tools';
14
+ import { ComponentType } from 'react';
15
+ import { CompositeFilterDescriptor } from '@progress/kendo-data-query';
16
+ import { DataResult } from '@progress/kendo-data-query';
17
+ import { DragClue } from '@progress/kendo-react-data-tools';
18
+ import { DropClue } from '@progress/kendo-react-data-tools';
19
+ import { FilterOperator } from '@progress/kendo-react-data-tools';
20
+ import { ForwardRefExoticComponent } from 'react';
21
+ import { getSelectedState } from '@progress/kendo-react-data-tools';
22
+ import { getSelectedStateFromKeyDown } from '@progress/kendo-react-data-tools';
23
+ import { GroupDescriptor } from '@progress/kendo-data-query';
24
+ import { HeaderCellBaseProps } from '@progress/kendo-react-data-tools';
25
+ import { JSX as JSX_2 } from 'react/jsx-runtime';
26
+ import { KendoReactComponentBaseProps } from '@progress/kendo-react-common';
27
+ import { PagerProps } from '@progress/kendo-react-data-tools';
28
+ import { PagerTargetEvent } from '@progress/kendo-react-data-tools';
29
+ import PropTypes from 'prop-types';
30
+ import * as React_2 from 'react';
31
+ import { ReactElement } from 'react';
32
+ import { RefAttributes } from 'react';
33
+ import { setSelectedState } from '@progress/kendo-react-data-tools';
34
+ import { SortDescriptor } from '@progress/kendo-data-query';
35
+ import { SortSettings } from '@progress/kendo-react-data-tools';
36
+ import { State } from '@progress/kendo-data-query';
37
+ import { SVGIcon } from '@progress/kendo-react-common';
38
+ import { TABLE_COL_INDEX_ATTRIBUTE } from '@progress/kendo-react-data-tools';
39
+ import { TableDragSelectionReleaseEvent } from '@progress/kendo-react-data-tools';
40
+ import { TableKeyboardNavigationContextType } from '@progress/kendo-react-data-tools';
41
+ import { TableKeyDownEvent } from '@progress/kendo-react-data-tools';
42
+ import { TableSelectableMode } from '@progress/kendo-react-data-tools';
43
+ import { TableSelectableSettings } from '@progress/kendo-react-data-tools';
44
+ import { TableSelectionChangeEvent } from '@progress/kendo-react-data-tools';
45
+
46
+ /**
47
+ * The value of the filter operators displayed in the boolean filter menu.
48
+ */
49
+ export declare const booleanFilterValues: ({
50
+ text: string;
51
+ operator: string;
52
+ } | {
53
+ text: string;
54
+ operator: boolean;
55
+ })[];
56
+
57
+ /**
58
+ * Normalize data for calling onChange.
59
+ */
60
+ export declare const cellBoolDropdownChange: (event: any, onChange: Function) => void;
61
+
62
+ /**
63
+ * Normalize data for calling onChange.
64
+ */
65
+ export declare const cellInputChange: (value: any, e: React_2.SyntheticEvent<any>, props: any) => void;
66
+
67
+ /**
68
+ * Normalize data for calling onChange.
69
+ */
70
+ export declare const cellOperatorChange: (event: any, currentValue: any, onChange: Function) => void;
71
+
72
+ /**
73
+ * @hidden
74
+ */
75
+ declare interface ColumnMenuStateProps {
76
+ show: boolean;
77
+ }
78
+
79
+ /**
80
+ * @hidden
81
+ */
82
+ declare interface ExtendedColumnProps extends GridColumnProps {
83
+ declarationIndex: number;
84
+ parentIndex: number;
85
+ colSpan: number;
86
+ rowSpan: number;
87
+ depth: number;
88
+ kFirst?: boolean;
89
+ index: number;
90
+ children: ExtendedColumnProps[];
91
+ left: number;
92
+ right: number;
93
+ rightBorder: boolean;
94
+ ariaColumnIndex: number;
95
+ isAccessible: boolean;
96
+ }
97
+
98
+ /**
99
+ * @hidden
100
+ */
101
+ export declare const filterGroupByField: (field: string, filter: CompositeFilterDescriptor | undefined) => CompositeFilterDescriptor | null;
102
+
103
+ export { getSelectedState }
104
+
105
+ export { getSelectedStateFromKeyDown }
106
+
107
+ /**
108
+ * Calculates the status data.
109
+ *
110
+ * @param args StatusDataArgs
111
+ * @returns StatusItem[]
112
+ */
113
+ export declare const getStatusData: (args: StatusDataArgs) => StatusItem[];
114
+
115
+ /** @hidden */
116
+ export declare const Grid: ForwardRefExoticComponent<GridProps & RefAttributes<any>>;
117
+
118
+ /** The attribute required by the Grid selection on Grid `td` elements. */
119
+ export declare const GRID_COL_INDEX_ATTRIBUTE = "data-grid-col-index";
120
+
121
+ /** Attribute which disable selection start from this element. */
122
+ export declare const GRID_PREVENT_SELECTION_ELEMENT = "data-prevent-selection";
123
+
124
+ /** The attribute required by the Grid selection on Grid `tr` elements. */
125
+ export declare const GRID_ROW_INDEX_ATTRIBUTE = "data-grid-row-index";
126
+
127
+ export declare const GridCell: (props: GridCellProps) => JSX_2.Element | null;
128
+
129
+ /**
130
+ * Represents the props of the GridCell component
131
+ * ([more information]({% slug cells_grid %}#toc-grid-cells)).
132
+ */
133
+ export declare interface GridCellProps extends Omit<CellProps, 'onChange' | 'render'> {
134
+ /**
135
+ * Zero-based index of the dataItem.
136
+ */
137
+ dataIndex: number;
138
+ /**
139
+ * The index of the column in the rendered columns collection.
140
+ */
141
+ columnIndex?: number;
142
+ /**
143
+ * The number of rendered columns in the Grid.
144
+ */
145
+ columnsCount?: number;
146
+ /**
147
+ * Sets a set of cells components that the Grid will render instead of the built-in cell.
148
+ */
149
+ cells?: GridCellsSettings;
150
+ /**
151
+ * The type of the row.
152
+ */
153
+ rowType?: GridRowType;
154
+ /**
155
+ * @hidden
156
+ */
157
+ level?: number;
158
+ /**
159
+ * The event that is fired when the cell is selected.
160
+ */
161
+ selectionChange?: (event: {
162
+ syntheticEvent: React.SyntheticEvent<any>;
163
+ }) => void;
164
+ /**
165
+ * The event that is fired when the cell value is changed.
166
+ */
167
+ onChange?: (event: {
168
+ dataItem: any;
169
+ dataIndex: number;
170
+ syntheticEvent: React.SyntheticEvent<any>;
171
+ field?: string;
172
+ value?: any;
173
+ }) => void;
174
+ /**
175
+ * The type of the editor which will be used when the cell is in edit mode.
176
+ */
177
+ editor?: 'text' | 'numeric' | 'boolean' | 'date';
178
+ /**
179
+ * A function for overriding the default rendering of the cell.
180
+ */
181
+ render?: (defaultRendering: React.ReactElement<HTMLTableCellElement> | null, props: GridCellProps) => React.ReactElement<HTMLTableCellElement> | null;
182
+ /**
183
+ * @hidden
184
+ */
185
+ locked?: boolean | undefined;
186
+ /**
187
+ * The event that is fired when the ContextMenu is activated.
188
+ */
189
+ onContextMenu?: (event: React.MouseEvent<HTMLElement>, dataItem: any, field?: string) => void;
190
+ /**
191
+ * @hidden
192
+ */
193
+ isRtl?: boolean;
194
+ }
195
+
196
+ /**
197
+ * The settings of the cells prop options.
198
+ */
199
+ export declare interface GridCellsSettings {
200
+ headerCell?: ComponentType<GridCustomHeaderCellProps>;
201
+ filterCell?: ComponentType<GridCustomFilterCellProps>;
202
+ footerCell?: ComponentType<GridCustomFooterCellProps>;
203
+ groupHeader?: ComponentType<GridCustomCellProps>;
204
+ data?: ComponentType<GridCustomCellProps>;
205
+ groupFooter?: ComponentType<GridCustomCellProps>;
206
+ select?: {
207
+ groupHeader?: ComponentType<GridCustomCellProps>;
208
+ data?: ComponentType<GridCustomCellProps>;
209
+ groupFooter?: ComponentType<GridCustomCellProps>;
210
+ };
211
+ hierarchy?: {
212
+ groupHeader?: ComponentType<GridCustomCellProps>;
213
+ data?: ComponentType<GridCustomCellProps>;
214
+ groupFooter?: ComponentType<GridCustomCellProps>;
215
+ };
216
+ group?: {
217
+ groupHeader?: ComponentType<GridCustomCellProps>;
218
+ data?: ComponentType<GridCustomCellProps>;
219
+ groupFooter?: ComponentType<GridCustomCellProps>;
220
+ };
221
+ edit?: {
222
+ text?: ComponentType<GridCustomCellProps>;
223
+ numeric?: ComponentType<GridCustomCellProps>;
224
+ boolean?: ComponentType<GridCustomCellProps>;
225
+ date?: ComponentType<GridCustomCellProps>;
226
+ };
227
+ }
228
+
229
+ /**
230
+ * Represents the [KendoReact Grid component]({% slug overview_grid %}).
231
+ *
232
+ * @example
233
+ * ```jsx
234
+ * class App extends React.Component {
235
+ * constructor(props) {
236
+ * super(props);
237
+ * this.state = {
238
+ * data: [
239
+ * { 'foo': 'A1', 'bar': 'B1' },
240
+ * { 'foo': 'A2', 'bar': 'B2' },
241
+ * { 'foo': 'A3', 'bar': 'B2' }
242
+ * ]
243
+ * };
244
+ * }
245
+ * render() {
246
+ * return (
247
+ * <Grid
248
+ * data={this.state.data}
249
+ * reorderable={true}
250
+ * >
251
+ * <GridColumn field="foo" />
252
+ * <GridColumn field="bar" />
253
+ * </Grid>
254
+ * );
255
+ * }
256
+ * }
257
+ * ReactDOM.render(<App />, document.querySelector('my-app'));
258
+ * ```
259
+ */
260
+ export declare class GridClassComponent extends React_2.Component<GridProps> {
261
+ /**
262
+ * @hidden
263
+ */
264
+ static displayName: string;
265
+ /**
266
+ * @hidden
267
+ */
268
+ static defaultProps: {};
269
+ /**
270
+ * @hidden
271
+ */
272
+ static propTypes: {
273
+ data: PropTypes.Requireable<NonNullable<any[] | PropTypes.InferProps<{
274
+ data: PropTypes.Requireable<any[]>;
275
+ total: PropTypes.Requireable<number>;
276
+ }> | null | undefined>>;
277
+ sortable: PropTypes.Requireable<NonNullable<boolean | PropTypes.InferProps<{
278
+ mode: PropTypes.Requireable<string>;
279
+ allowUnsort: PropTypes.Requireable<boolean>;
280
+ }> | null | undefined>>;
281
+ onSortChange: PropTypes.Requireable<(...args: any[]) => any>;
282
+ sort: PropTypes.Requireable<any[]>;
283
+ filterable: PropTypes.Requireable<boolean>;
284
+ filter: PropTypes.Requireable<any>;
285
+ onFilterChange: PropTypes.Requireable<(...args: any[]) => any>;
286
+ pageable: PropTypes.Requireable<NonNullable<boolean | PropTypes.InferProps<{
287
+ buttonCount: PropTypes.Requireable<number>;
288
+ responsive: PropTypes.Requireable<boolean>;
289
+ info: PropTypes.Requireable<boolean>;
290
+ type: PropTypes.Requireable<string>;
291
+ pageSizes: PropTypes.Requireable<NonNullable<boolean | (NonNullable<string | number | null | undefined> | null | undefined)[] | null | undefined>>;
292
+ previousNext: PropTypes.Requireable<boolean>;
293
+ }> | null | undefined>>;
294
+ pageSize: PropTypes.Requireable<number>;
295
+ onPageChange: PropTypes.Requireable<(...args: any[]) => any>;
296
+ total: PropTypes.Requireable<number>;
297
+ skip: PropTypes.Requireable<number>;
298
+ take: PropTypes.Requireable<number>;
299
+ fixedScroll: PropTypes.Requireable<boolean>;
300
+ onExpandChange: PropTypes.Requireable<(...args: any[]) => any>;
301
+ expandField: PropTypes.Requireable<string>;
302
+ selectedField: PropTypes.Requireable<string>;
303
+ onSelectionChange: PropTypes.Requireable<(...args: any[]) => any>;
304
+ onHeaderSelectionChange: PropTypes.Requireable<(...args: any[]) => any>;
305
+ resizable: PropTypes.Requireable<boolean>;
306
+ reorderable: PropTypes.Requireable<boolean>;
307
+ group: PropTypes.Requireable<any>;
308
+ groupable: PropTypes.Requireable<NonNullable<boolean | PropTypes.InferProps<{
309
+ enabled: PropTypes.Requireable<boolean>;
310
+ footer: PropTypes.Requireable<string>;
311
+ }> | null | undefined>>;
312
+ onGroupChange: PropTypes.Requireable<(...args: any[]) => any>;
313
+ onRowClick: PropTypes.Requireable<(...args: any[]) => any>;
314
+ onRowDoubleClick: PropTypes.Requireable<(...args: any[]) => any>;
315
+ onItemChange: PropTypes.Requireable<(...args: any[]) => any>;
316
+ editField: PropTypes.Requireable<string>;
317
+ scrollable: PropTypes.Requireable<string>;
318
+ rowHeight: PropTypes.Requireable<number>;
319
+ detailRowHeight: PropTypes.Requireable<number>;
320
+ detail: PropTypes.Requireable<any>;
321
+ style: PropTypes.Requireable<object>;
322
+ onDataStateChange: PropTypes.Requireable<(...args: any[]) => any>;
323
+ onColumnResize: PropTypes.Requireable<(...args: any[]) => any>;
324
+ onColumnReorder: PropTypes.Requireable<(...args: any[]) => any>;
325
+ dataItemKey: PropTypes.Requireable<string>;
326
+ navigatable: PropTypes.Requireable<boolean>;
327
+ size: PropTypes.Requireable<string>;
328
+ };
329
+ /** @hidden */
330
+ static contextType: React_2.Context<TableKeyboardNavigationContextType | undefined>;
331
+ protected dragLogic: GridCommonDragLogic;
332
+ private _columns;
333
+ private _columnsMap;
334
+ private _columnsMutations;
335
+ private _resized;
336
+ private _shouldUpdateLeftRight;
337
+ private contextStateRef;
338
+ private navigationStateRef;
339
+ private _data;
340
+ private _slicedData;
341
+ private wrapperScrollTop;
342
+ private showLicenseWatermark;
343
+ /**
344
+ * A getter of the current columns. Gets the current column width or current columns, or any other [`GridColumnProps`]({% slug api_grid_gridcolumnprops %}) for each defined column. Can be used on each Grid instance. To obtain the instance of the rendered Grid, use the `ref` callback. The following example demonstrates how to reorder the columns by dragging their handlers and check the properties afterwards. You can check the result in the browser console.
345
+ *
346
+ * @example
347
+ * ```jsx
348
+ * class App extends React.Component {
349
+ * constructor(props) {
350
+ * super(props);
351
+ * this.state = {
352
+ * data: [
353
+ * { 'foo': 'A1', 'bar': 'B1' },
354
+ * { 'foo': 'A2', 'bar': 'B2' },
355
+ * { 'foo': 'A3', 'bar': 'B2' }
356
+ * ]
357
+ * };
358
+ * this.grid = null;
359
+ * }
360
+ * render() {
361
+ * return (
362
+ * <div>
363
+ * <Grid
364
+ * data={this.state.data}
365
+ * reorderable={true}
366
+ * ref={(g) => { this.grid = g; }}
367
+ * >
368
+ * <GridColumn field="foo" />
369
+ * <GridColumn field="bar" />
370
+ * </Grid>
371
+ * <button onClick={() => console.log(JSON.stringify(this.grid.columns))}>
372
+ * log current properties into browser console.
373
+ * </button>
374
+ * </div>
375
+ * );
376
+ * }
377
+ * }
378
+ * ReactDOM.render(<App />, document.querySelector('my-app'));
379
+ * ```
380
+ */
381
+ get columns(): GridColumnProps[];
382
+ /**
383
+ * Returns the HTML element of the Grid component.
384
+ */
385
+ get element(): HTMLDivElement | null;
386
+ private get document();
387
+ private clipboardService?;
388
+ private headerRef;
389
+ private headerElementRef;
390
+ private _element;
391
+ private tableElement;
392
+ private containerRef;
393
+ private tableBodyRef;
394
+ private vs;
395
+ private columnResize;
396
+ private _footer;
397
+ private forceUpdateTimeout;
398
+ private isRtl;
399
+ private rowIndex;
400
+ private get _header();
401
+ private get _gridId();
402
+ private observer;
403
+ constructor(props: GridProps);
404
+ private handleIntersection;
405
+ private setCurrentOnTop;
406
+ /**
407
+ * Method to allow the scroll to be set to a specific row index when the Grid is scrollable. It is zero based.
408
+ *
409
+ * @param options - Object, containing the rowIndex to which is going to be scrolled.
410
+ */
411
+ scrollIntoView: (options: {
412
+ rowIndex: number;
413
+ }) => void;
414
+ /**
415
+ * Method to fit columns according to their content.
416
+ *
417
+ * @param columnIds - Array of column ids to be fitted.
418
+ */
419
+ fitColumns: (columnIds: string[]) => void;
420
+ /**
421
+ * @hidden
422
+ */
423
+ componentDidMount(): void;
424
+ /**
425
+ * @hidden
426
+ */
427
+ getSnapshotBeforeUpdate(): null;
428
+ /**
429
+ * @hidden
430
+ */
431
+ componentDidUpdate(): void;
432
+ /**
433
+ * @hidden
434
+ */
435
+ componentWillUnmount(): void;
436
+ /**
437
+ * @hidden
438
+ */
439
+ render(): JSX_2.Element;
440
+ private onContextMenu;
441
+ private getVirtualScroll;
442
+ private isAllData;
443
+ private initializeVirtualization;
444
+ private scrollHandler;
445
+ private onKeyDown;
446
+ private onFocus;
447
+ private onNavigationAction;
448
+ private rowClick;
449
+ private rowDblClick;
450
+ private itemChange;
451
+ private selectionChange;
452
+ private onHeaderSelectionChange;
453
+ private selectionRelease;
454
+ private pageChange;
455
+ private pagerPageChange;
456
+ private sortChange;
457
+ private filterChange;
458
+ private groupChange;
459
+ private raiseDataEvent;
460
+ private columnReorder;
461
+ private groupReorder;
462
+ private columnToGroup;
463
+ private resetTableWidth;
464
+ private onClipboard;
465
+ private inActiveElement;
466
+ private onResize;
467
+ private reInitVirtualization;
468
+ private flatData;
469
+ private rowHeightService;
470
+ private childrenToArray;
471
+ private readColumns;
472
+ private mapColumns;
473
+ private initColumns;
474
+ private configureColumns;
475
+ private getHeaderRow;
476
+ private resolveTitle;
477
+ private getDataState;
478
+ private getArguments;
479
+ private getLeafDataItems;
480
+ }
481
+
482
+ /**
483
+ * @hidden
484
+ */
485
+ export declare const GridColumn: React_2.FunctionComponent<GridColumnProps>;
486
+
487
+ /**
488
+ * @hidden
489
+ */
490
+ declare interface GridColumnMenuBaseProps {
491
+ /**
492
+ * The current column options.
493
+ */
494
+ column: GridColumnMenuColumnProps;
495
+ /**
496
+ * The method that will be called to close the column menu.
497
+ */
498
+ onCloseMenu?: Function;
499
+ }
500
+
501
+ export declare class GridColumnMenuCheckboxFilter extends React_2.Component<GridColumnMenuCheckboxFilterProps, GridColumnMenuFilterStateProps_2> {
502
+ /**
503
+ * @hidden
504
+ */
505
+ static defaultProps: {
506
+ uniqueData: boolean;
507
+ };
508
+ /**
509
+ * @hidden
510
+ */
511
+ compositeFilterIndex: number;
512
+ constructor(props: GridColumnMenuCheckboxFilterProps);
513
+ /**
514
+ * @hidden
515
+ */
516
+ componentDidUpdate(): void;
517
+ /**
518
+ * @hidden
519
+ */
520
+ defaultFilter: () => any;
521
+ /**
522
+ * @hidden
523
+ */
524
+ isControlled: () => boolean;
525
+ /**
526
+ * @hidden
527
+ */
528
+ parseData: (originalData: any, isUnique: any) => any;
529
+ /**
530
+ * @hidden
531
+ */
532
+ getFilterIndex: () => any;
533
+ /**
534
+ * @hidden
535
+ */
536
+ onFilterExpand: () => void;
537
+ /**
538
+ * @hidden
539
+ */
540
+ handleSearchChange: (e: any) => void;
541
+ /**
542
+ * @hidden
543
+ */
544
+ handleClear: () => void;
545
+ /**
546
+ * @hidden
547
+ */
548
+ clear: (e: React_2.SyntheticEvent<any>) => void;
549
+ /**
550
+ * @hidden
551
+ */
552
+ submit: (e: React_2.SyntheticEvent<any>) => void;
553
+ /**
554
+ * @hidden
555
+ */
556
+ handleCheckBoxChange: (e: any, value: any) => void;
557
+ /**
558
+ * @hidden
559
+ */
560
+ isAllSelected: () => boolean;
561
+ /**
562
+ * @hidden
563
+ */
564
+ render(): JSX_2.Element;
565
+ }
566
+
567
+ /**
568
+ * The props of the GridColumnMenuFilter component.
569
+ */
570
+ export declare interface GridColumnMenuCheckboxFilterProps extends GridColumnMenuFilterBaseProps {
571
+ /**
572
+ * Controls the expand state of the filter component.
573
+ */
574
+ expanded?: boolean;
575
+ /**
576
+ * Sets the items collection that will be rendered by the GridColumnMenuCheckboxFilter component.
577
+ */
578
+ data: Array<string | object>;
579
+ /**
580
+ * Triggered on each subsequent expand state of the filter component.
581
+ */
582
+ onExpandChange?: (nextExpandState: boolean) => void;
583
+ /**
584
+ * Defines the component that will be rendered as a search box.
585
+ */
586
+ searchBox?: React_2.ComponentType<any>;
587
+ /**
588
+ * Defines the filter operator that will be used to filter the values via the search box.
589
+ * "startswith"
590
+ * "endswith"
591
+ * "contains"
592
+ * "doesnotcontain"
593
+ * "isempty"
594
+ * "isnotempty"
595
+ * "eq" (equal to)
596
+ * "eq" (equal to)
597
+ * "neq" (not equal to)
598
+ * "isnull" (is equal to null)
599
+ * "isnotnull" (is not equal to null)
600
+ */
601
+ searchBoxFilterOperator?: string | Function;
602
+ /**
603
+ * Determines if the data in the component will be unique. By default the property is set to true.
604
+ */
605
+ uniqueData?: boolean;
606
+ }
607
+
608
+ /**
609
+ * The column props passed by the ColumnMenu.
610
+ */
611
+ declare interface GridColumnMenuColumnProps {
612
+ /**
613
+ * The field to which the column is bound.
614
+ */
615
+ field?: string;
616
+ /**
617
+ * Defines the filter type that is displayed inside the filter row. Defaults to `text`.
618
+ */
619
+ filter?: 'text' | 'numeric' | 'boolean' | 'date';
620
+ /**
621
+ * The column locked state.
622
+ */
623
+ locked?: boolean;
624
+ /**
625
+ * @hidden
626
+ */
627
+ title?: string;
628
+ /**
629
+ * The column id.
630
+ */
631
+ id?: string;
632
+ }
633
+
634
+ /**
635
+ * Represents the KendoReact GridColumnMenuColumnsList component.
636
+ */
637
+ export declare const GridColumnMenuColumnsList: React_2.FunctionComponent<GridColumnMenuColumnsListProps>;
638
+
639
+ /**
640
+ * Represents the props of the KendoReact GridColumnMenuColumnsList component.
641
+ */
642
+ export declare interface GridColumnMenuColumnsListProps {
643
+ /**
644
+ * The columns state of the KendoReact GridColumnMenuColumnsList component.
645
+ */
646
+ columnsState: GridColumnProps[];
647
+ /**
648
+ * The initial columns of the KendoReact GridColumnMenuColumnsList component.
649
+ */
650
+ columns: GridColumnProps[];
651
+ /**
652
+ * The onColumnsChange event handler of the KendoReact GridColumnMenuColumnsList component.
653
+ */
654
+ onColumnsChange: (cols: GridColumnProps[]) => void;
655
+ /**
656
+ * The onCloseMenu event handler of the KendoReact GridColumnMenuColumnsList component.
657
+ */
658
+ onCloseMenu: Function;
659
+ }
660
+
661
+ /**
662
+ * @example
663
+ * ```jsx-no-run
664
+ * class TextColumnMenu extends React.Component {
665
+ * render() {
666
+ * return (
667
+ * <div>
668
+ * <GridColumnMenuSort {...this.props} />
669
+ * <GridColumnMenuFilter {...this.props} />
670
+ * </div>);
671
+ * }
672
+ * }
673
+ *
674
+ * class App extends React.PureComponent {
675
+ * constructor(props) {
676
+ * super(props);
677
+ *
678
+ * this.state = this.createAppState({
679
+ * take: 10,
680
+ * skip: 0
681
+ * });
682
+ * }
683
+ *
684
+ * createAppState(dataState) {
685
+ * return {
686
+ * result: process(products.slice(0), dataState),
687
+ * dataState: dataState
688
+ * };
689
+ * }
690
+ *
691
+ * dataStateChange = (event) => {
692
+ * this.setState(this.createAppState(event.dataState));
693
+ * }
694
+ *
695
+ * render() {
696
+ * return (
697
+ * <div>
698
+ * <Grid
699
+ * data={this.state.result}
700
+ * {...this.state.dataState}
701
+ * onDataStateChange={this.dataStateChange}
702
+ * sortable={true}
703
+ * pageable={true}
704
+ * >
705
+ * <Column field="ProductID" title="Product ID" />
706
+ * <Column field="ProductName" columnMenu={TextColumnMenu} />
707
+ * </Grid>
708
+ * <br />
709
+ * </div>
710
+ * );
711
+ * }
712
+ * }
713
+ *
714
+ * ReactDOM.render(<App />, document.querySelector('my-app'));
715
+ * ```
716
+ */
717
+ export declare class GridColumnMenuFilter extends React_2.Component<GridColumnMenuFilterProps, GridColumnMenuFilterStateProps> {
718
+ /**
719
+ * Can be used to check if filtering is applied to a specific field ([see example]({% slug column_menu_grid %}#toc-styling-the-column-menu-icon)). Useful for creating active filter indicators.
720
+ */
721
+ static active: (field: string, filter?: CompositeFilterDescriptor) => boolean;
722
+ constructor(props: GridColumnMenuFilterProps);
723
+ /**
724
+ * @hidden
725
+ */
726
+ removeGroup: (group: CompositeFilterDescriptor, rootFilter: CompositeFilterDescriptor) => CompositeFilterDescriptor;
727
+ /**
728
+ * @hidden
729
+ */
730
+ insertGroup: (group: CompositeFilterDescriptor, rootFilter: CompositeFilterDescriptor) => CompositeFilterDescriptor;
731
+ /**
732
+ * @hidden
733
+ */
734
+ isControlled: () => boolean;
735
+ /**
736
+ * @hidden
737
+ */
738
+ onFilterExpand: () => void;
739
+ /**
740
+ * @hidden
741
+ */
742
+ firstFilterChange: (event: any) => void;
743
+ /**
744
+ * @hidden
745
+ */
746
+ secondFilterChange: (event: any) => void;
747
+ /**
748
+ * @hidden
749
+ */
750
+ filterChange: (filterIndex: number, e: {
751
+ value: number;
752
+ operator: string;
753
+ }) => void;
754
+ /**
755
+ * @hidden
756
+ */
757
+ logicChange: (event: any) => void;
758
+ /**
759
+ * @hidden
760
+ */
761
+ clear: (event: React_2.SyntheticEvent<any>) => void;
762
+ /**
763
+ * @hidden
764
+ */
765
+ currentFilterGroup: () => CompositeFilterDescriptor;
766
+ /**
767
+ * @hidden
768
+ */
769
+ submit: (event: React_2.SyntheticEvent<any>) => void;
770
+ /**
771
+ * @hidden
772
+ */
773
+ render(): JSX_2.Element;
774
+ }
775
+
776
+ /**
777
+ * The props passed to the ColumnMenu filter component.
778
+ */
779
+ declare interface GridColumnMenuFilterBaseProps extends GridColumnMenuBaseProps {
780
+ /**
781
+ * The current filter state of the Grid.
782
+ */
783
+ filter?: CompositeFilterDescriptor;
784
+ /**
785
+ * The filterable option of the column.
786
+ */
787
+ filterable?: boolean | undefined;
788
+ /**
789
+ * The filter operators for the Grid filters.
790
+ */
791
+ filterOperators: GridFilterOperators;
792
+ /**
793
+ * The method that will be called to notify the parent Grid about a filter change.
794
+ */
795
+ onFilterChange?: (filter: CompositeFilterDescriptor | null, syntheticEvent: React.SyntheticEvent<any>) => any;
796
+ }
797
+
798
+ /**
799
+ * @hidden
800
+ */
801
+ export declare class GridColumnMenuFilterCell extends React_2.Component<GridColumnMenuFilterCellProps, {}> {
802
+ constructor(props: GridColumnMenuFilterCellProps);
803
+ /**
804
+ * @hidden
805
+ */
806
+ render(): JSX_2.Element;
807
+ private renderOperatorEditor;
808
+ private inputChange;
809
+ private operatorChange;
810
+ private boolDropdownChange;
811
+ private filterComponent;
812
+ }
813
+
814
+ /**
815
+ * @hidden
816
+ */
817
+ export declare interface GridColumnMenuFilterCellProps {
818
+ field?: string;
819
+ filterType: 'text' | 'numeric' | 'boolean' | 'date';
820
+ value: any;
821
+ operator?: string | Function;
822
+ operators: GridFilterOperator[];
823
+ booleanValues: GridFilterOperator[];
824
+ onChange: (event: {
825
+ value: any;
826
+ operator: string | Function;
827
+ syntheticEvent: React_2.SyntheticEvent<any>;
828
+ }) => void;
829
+ }
830
+
831
+ /**
832
+ * The props of the GridColumnMenuFilter component.
833
+ */
834
+ export declare interface GridColumnMenuFilterProps extends GridColumnMenuFilterBaseProps {
835
+ /**
836
+ * Controls the expand state of the filter component.
837
+ */
838
+ expanded?: boolean;
839
+ /**
840
+ * Triggered on each subsequent expand state of the filter component.
841
+ */
842
+ onExpandChange?: (nextExpandState: boolean) => void;
843
+ /**
844
+ * If set to `false`, the second filter operator and the input will be hidden.
845
+ */
846
+ hideSecondFilter?: boolean;
847
+ /**
848
+ * Specifies a React element that will be cloned and rendered inside the UI of the column-menu filter component
849
+ * ([see example]({% slug column_menu_grid %}#toc-customizing-the-filter-component)).
850
+ */
851
+ filterUI?: ComponentType<GridColumnMenuFilterUIProps>;
852
+ children?: React_2.ReactNode;
853
+ /**
854
+ * If set to `true`, filter expand button will not be rendered and filter menu will be expanded.
855
+ */
856
+ alwaysExpand?: boolean;
857
+ }
858
+
859
+ /**
860
+ * @hidden
861
+ */
862
+ declare interface GridColumnMenuFilterStateProps {
863
+ expanded: boolean;
864
+ filterGroup: CompositeFilterDescriptor;
865
+ }
866
+
867
+ /**
868
+ * @hidden
869
+ */
870
+ declare interface GridColumnMenuFilterStateProps_2 {
871
+ expanded: boolean;
872
+ value: string;
873
+ data: Array<string | object>;
874
+ dataFromProps: Array<string | object>;
875
+ currentFilter: CompositeFilterDescriptor;
876
+ }
877
+
878
+ /**
879
+ * @hidden
880
+ */
881
+ export declare class GridColumnMenuFilterUI extends React_2.Component<GridColumnMenuFilterUIProps, {}> {
882
+ render(): JSX_2.Element;
883
+ }
884
+
885
+ /**
886
+ * The props that will be passed to the UI of the ColumnMenu filter component.
887
+ */
888
+ export declare interface GridColumnMenuFilterUIProps {
889
+ /**
890
+ * The options of the first filter.
891
+ */
892
+ firstFilterProps: GridFilterCellProps;
893
+ /**
894
+ * The options of the second filter.
895
+ */
896
+ secondFilterProps: GridFilterCellProps;
897
+ /**
898
+ * The current value of the filter logic.
899
+ */
900
+ logicValue?: GridFilterOperator;
901
+ /**
902
+ * The list of the filter logic options.
903
+ */
904
+ logicData: GridFilterOperator[];
905
+ /**
906
+ * The method that will be called to notify the parent about a change in the filter logic.
907
+ */
908
+ onLogicChange: (e: any) => void;
909
+ /**
910
+ * Indicates if the second filter will be hidden.
911
+ */
912
+ hideSecondFilter?: boolean;
913
+ }
914
+
915
+ /**
916
+ * @example
917
+ * ```jsx-no-run
918
+ * class TextColumnMenu extends React.Component {
919
+ * render() {
920
+ * return (
921
+ * <div>
922
+ * <GridColumnMenuSort {...this.props} />
923
+ * <GridColumnMenuGroup {...this.props} />
924
+ * </div>);
925
+ * }
926
+ * }
927
+ *
928
+ * class App extends React.PureComponent {
929
+ * constructor(props) {
930
+ * super(props);
931
+ *
932
+ * this.state = this.createAppState({
933
+ * take: 10,
934
+ * skip: 0
935
+ * });
936
+ * }
937
+ *
938
+ * createAppState(dataState) {
939
+ * return {
940
+ * result: process(products.slice(0), dataState),
941
+ * dataState: dataState
942
+ * };
943
+ * }
944
+ *
945
+ * dataStateChange = (event) => {
946
+ * this.setState(this.createAppState(event.dataState));
947
+ * }
948
+ *
949
+ * render() {
950
+ * return (
951
+ * <div>
952
+ * <Grid
953
+ * data={this.state.result}
954
+ * {...this.state.dataState}
955
+ * onDataStateChange={this.dataStateChange}
956
+ * sortable={true}
957
+ * pageable={true}
958
+ * >
959
+ * <Column field="ProductID" title="Product ID" />
960
+ * <Column field="ProductName" columnMenu={TextColumnMenu} />
961
+ * </Grid>
962
+ * <br />
963
+ * </div>
964
+ * );
965
+ * }
966
+ * }
967
+ *
968
+ * ReactDOM.render(<App />, document.querySelector('my-app'));
969
+ * ```
970
+ */
971
+ export declare class GridColumnMenuGroup extends React_2.Component<GridColumnMenuGroupProps, {}> {
972
+ /**
973
+ * @hidden
974
+ */
975
+ onGroupClick: (event: React_2.MouseEvent<HTMLAnchorElement>) => void;
976
+ /**
977
+ * @hidden
978
+ */
979
+ render(): JSX_2.Element;
980
+ }
981
+
982
+ /**
983
+ * The props passed to the ColumnMenu group component.
984
+ */
985
+ declare interface GridColumnMenuGroupBaseProps extends GridColumnMenuBaseProps {
986
+ /**
987
+ * The groupable option of the column.
988
+ */
989
+ groupable?: boolean;
990
+ /**
991
+ * The current group state of the Grid.
992
+ */
993
+ group?: GroupDescriptor[];
994
+ /**
995
+ * The method that will be called to notify the parent Grid about a group change.
996
+ */
997
+ onGroupChange?: (groups: GroupDescriptor[], event: React.MouseEvent<HTMLAnchorElement>) => void;
998
+ }
999
+
1000
+ /**
1001
+ * The props of the GridColumnMenuGroup component.
1002
+ */
1003
+ declare interface GridColumnMenuGroupProps extends GridColumnMenuGroupBaseProps {
1004
+ }
1005
+
1006
+ /**
1007
+ * The GridColumnMenuItem component that is used inside the Grid ColumnMenu.
1008
+ */
1009
+ export declare class GridColumnMenuItem extends React_2.Component<GridColumnMenuItemProps, {}> {
1010
+ /**
1011
+ * @hidden
1012
+ */
1013
+ render(): JSX_2.Element;
1014
+ }
1015
+
1016
+ /**
1017
+ * The GridColumnMenuItemContent that will be used inside the Grid ColumnMenu.
1018
+ */
1019
+ export declare class GridColumnMenuItemContent extends React_2.Component<GridColumnMenuItemContentProps, {}> {
1020
+ /**
1021
+ * @hidden
1022
+ */
1023
+ render(): JSX_2.Element;
1024
+ }
1025
+
1026
+ /**
1027
+ * The props of the GridColumnMenuItemContent component.
1028
+ */
1029
+ declare interface GridColumnMenuItemContentProps extends KendoReactComponentBaseProps {
1030
+ /**
1031
+ * The `show` state of the component. Each change is animated with the Reveal animation.
1032
+ */
1033
+ show: boolean;
1034
+ }
1035
+
1036
+ /**
1037
+ * The GridColumnMenuItemGroup that will be used inside the Grid ColumnMenu.
1038
+ */
1039
+ export declare class GridColumnMenuItemGroup extends React_2.Component<GridColumnMenuItemGroupProps, {}> {
1040
+ /**
1041
+ * @hidden
1042
+ */
1043
+ render(): JSX_2.Element;
1044
+ }
1045
+
1046
+ /**
1047
+ * The props of the GridColumnMenuItemGroup component.
1048
+ */
1049
+ declare interface GridColumnMenuItemGroupProps extends KendoReactComponentBaseProps {
1050
+ }
1051
+
1052
+ /**
1053
+ * The props of the GridColumnMenuItem component.
1054
+ */
1055
+ declare interface GridColumnMenuItemProps {
1056
+ /**
1057
+ * Triggered each time the title is clicked.
1058
+ */
1059
+ onClick: React_2.MouseEventHandler<HTMLElement>;
1060
+ /**
1061
+ * The title of the GridColumnMenuItem component.
1062
+ */
1063
+ title: string;
1064
+ /**
1065
+ * The class of the icon that is rendered next to the title.
1066
+ */
1067
+ iconClass: string;
1068
+ /**
1069
+ * The SVG icon that is rendered next to the title.
1070
+ */
1071
+ svgIcon?: SVGIcon;
1072
+ /**
1073
+ * The selected state of the component.
1074
+ */
1075
+ selected?: boolean;
1076
+ }
1077
+
1078
+ /**
1079
+ * The props which the ColumnMenu passes to its children.
1080
+ */
1081
+ export declare interface GridColumnMenuProps extends GridColumnMenuFilterBaseProps, GridColumnMenuSortBaseProps, GridColumnMenuGroupBaseProps {
1082
+ }
1083
+
1084
+ /**
1085
+ * @example
1086
+ * ```jsx-no-run
1087
+ * class ColumnMenu extends React.Component {
1088
+ * render() {
1089
+ * return (
1090
+ * <div>
1091
+ * <GridColumnMenuSort {...this.props} />
1092
+ * </div>);
1093
+ * }
1094
+ * }
1095
+ *
1096
+ * class App extends React.PureComponent {
1097
+ * constructor(props) {
1098
+ * super(props);
1099
+ *
1100
+ * this.state = this.createAppState({
1101
+ * take: 10,
1102
+ * skip: 0
1103
+ * });
1104
+ * }
1105
+ *
1106
+ * createAppState(dataState) {
1107
+ * return {
1108
+ * result: process(products.slice(0), dataState),
1109
+ * dataState: dataState
1110
+ * };
1111
+ * }
1112
+ *
1113
+ * dataStateChange = (event) => {
1114
+ * this.setState(this.createAppState(event.dataState));
1115
+ * }
1116
+ *
1117
+ * render() {
1118
+ * return (
1119
+ * <div>
1120
+ * <Grid
1121
+ * data={this.state.result}
1122
+ * {...this.state.dataState}
1123
+ * onDataStateChange={this.dataStateChange}
1124
+ * sortable={true}
1125
+ * pageable={true}
1126
+ * >
1127
+ * <Column field="ProductID" title="Product ID" columnMenu={ColumnMenu}/>
1128
+ * <Column field="ProductName" />
1129
+ * </Grid>
1130
+ * <br />
1131
+ * </div>
1132
+ * );
1133
+ * }
1134
+ * }
1135
+ *
1136
+ * ReactDOM.render(<App />, document.querySelector('my-app'));
1137
+ * ```
1138
+ */
1139
+ export declare class GridColumnMenuSort extends React_2.Component<GridColumnMenuSortProps, {}> {
1140
+ /**
1141
+ * Can be used to check if sorting is applied to a specific field ([see example]({% slug column_menu_grid %}#toc-styling-the-column-menu-icon)). Useful for creating active sort indicators.
1142
+ */
1143
+ static active: (field: string, sort?: SortDescriptor[]) => boolean;
1144
+ /**
1145
+ * @hidden
1146
+ */
1147
+ onAscClick: (event: any) => void;
1148
+ /**
1149
+ * @hidden
1150
+ */
1151
+ onDescClick: (event: any) => void;
1152
+ /**
1153
+ * @hidden
1154
+ */
1155
+ onSort: (event: React_2.MouseEvent<HTMLAnchorElement>, selectedDir: 'asc' | 'desc') => void;
1156
+ /**
1157
+ * @hidden
1158
+ */
1159
+ render(): JSX_2.Element;
1160
+ }
1161
+
1162
+ /**
1163
+ * The props passed to the ColumnMenu sort component.
1164
+ */
1165
+ declare interface GridColumnMenuSortBaseProps extends GridColumnMenuBaseProps {
1166
+ /**
1167
+ * The sortable option of the column.
1168
+ */
1169
+ sortable?: GridSortSettings;
1170
+ /**
1171
+ * The current sort state of the Grid.
1172
+ */
1173
+ sort?: SortDescriptor[];
1174
+ /**
1175
+ * The method that will be called to notify the parent Grid about a sort change.
1176
+ */
1177
+ onSortChange?: (descriptors: SortDescriptor[], e: React.SyntheticEvent<any>) => void;
1178
+ }
1179
+
1180
+ /**
1181
+ * The props of the GridColumnMenuSort component.
1182
+ */
1183
+ declare interface GridColumnMenuSortProps extends GridColumnMenuSortBaseProps {
1184
+ }
1185
+
1186
+ /**
1187
+ * The GridColumnMenuWrapper component.
1188
+ */
1189
+ export declare class GridColumnMenuWrapper extends React_2.Component<GridColumnMenuWrapperProps, ColumnMenuStateProps> {
1190
+ /** @hidden */
1191
+ readonly state: ColumnMenuStateProps;
1192
+ /** @hidden */
1193
+ _anchor: HTMLAnchorElement | null;
1194
+ /** @hidden */
1195
+ _content: HTMLDivElement | null;
1196
+ /** @hidden */
1197
+ blurTimeout: any;
1198
+ /** @hidden */
1199
+ willBlur: boolean;
1200
+ /** @hidden */
1201
+ blur: () => void;
1202
+ /** @hidden */
1203
+ focus: () => void;
1204
+ /** @hidden */
1205
+ anchorClick: (event: React_2.MouseEvent<HTMLAnchorElement>) => void;
1206
+ /** @hidden */
1207
+ closeMenu: () => void;
1208
+ /** @hidden */
1209
+ onAnchorMouseDown: (event: React_2.MouseEvent<HTMLAnchorElement>) => void;
1210
+ /** @hidden */
1211
+ onAnchorKeyDown: (event: React_2.KeyboardEvent<HTMLAnchorElement>) => void;
1212
+ render(): JSX_2.Element;
1213
+ }
1214
+
1215
+ /**
1216
+ * The props of the GridColumnMenuWrapper component.
1217
+ */
1218
+ export declare interface GridColumnMenuWrapperProps extends GridColumnMenuProps {
1219
+ /**
1220
+ * The component to be rendered as content of the Grid column menu.
1221
+ */
1222
+ columnMenu?: React_2.ComponentType<GridColumnMenuProps> | null;
1223
+ }
1224
+
1225
+ /**
1226
+ * The props of the GridColumn component.
1227
+ */
1228
+ export declare interface GridColumnProps extends Omit<ColumnBaseProps, 'cell'> {
1229
+ /**
1230
+ * Allows the column headers to be clicked and the `sortChange` event emitted.
1231
+ * You have to handle the `sortChange` event yourself and sort the data.
1232
+ * Defaults to `true`.
1233
+ */
1234
+ sortable?: boolean | GridColumnSortSettings;
1235
+ /**
1236
+ * Defines if the column is locked (frozen or sticky).
1237
+ * Locked columns are the columns that are visible at all times while the user scrolls the component horizontally.
1238
+ * Defaults to `false`.
1239
+ */
1240
+ locked?: boolean;
1241
+ /**
1242
+ * A collection of child columns.
1243
+ */
1244
+ children?: GridColumnProps[] | ReactElement<GridColumnProps>[];
1245
+ /**
1246
+ * Specifies a React element that will be cloned and rendered inside the column menu of the Grid ([see example]({% slug column_menu_grid %}#toc-basic-usage)).
1247
+ */
1248
+ columnMenu?: ComponentType<GridColumnMenuProps>;
1249
+ /**
1250
+ * Determines if the column can be dragged to the group panel. Defaults to `true`.
1251
+ */
1252
+ groupable?: boolean;
1253
+ /**
1254
+ * Defines whether the column is editable ([more information and examples]({% slug editing_inline_grid %})).
1255
+ */
1256
+ editable?: boolean;
1257
+ /**
1258
+ * Defines if a filter UI will be rendered for this column. Defaults to `true`.
1259
+ */
1260
+ filterable?: boolean;
1261
+ /**
1262
+ * Defines the title which will be set to the input element in the filter cell.
1263
+ */
1264
+ filterTitle?: string;
1265
+ /**
1266
+ * Defines the filter type that will be rendered inside the filter row. Defaults to `text`.
1267
+ */
1268
+ filter?: 'text' | 'numeric' | 'boolean' | 'date';
1269
+ /**
1270
+ * Defines the editor type. Used when the column enters the edit mode ([more information and examples]({% slug editing_inline_grid %})). Defaults to `text`.
1271
+ */
1272
+ editor?: 'text' | 'numeric' | 'boolean' | 'date';
1273
+ /**
1274
+ * Defines the component that will be rendered as a cell. If not set, a `GridCell` will be rendered by default.
1275
+ */
1276
+ cell?: ComponentType<GridCellProps>;
1277
+ /**
1278
+ * Sets a set of cells components that the Grid will render instead of the built-in cell.
1279
+ */
1280
+ cells?: GridCellsSettings;
1281
+ /**
1282
+ * Defines the component that will be rendered as a filter cell. If not set, a `GridFilterCell` will be rendered by default.
1283
+ */
1284
+ filterCell?: ComponentType<GridFilterCellProps>;
1285
+ /**
1286
+ * Defines the component that will be rendered as a header cell. If not set, a `GridHeaderCell` will be rendered by default.
1287
+ */
1288
+ headerCell?: ComponentType<GridHeaderCellProps>;
1289
+ /**
1290
+ * Defines the component that will be rendered as a footer cell.
1291
+ * The footer has to render an HTML `<td>` element and applies the `style` and `colspan` values from its props.
1292
+ *
1293
+ * @example
1294
+ * ```jsx-no-run
1295
+ * <GridColumn
1296
+ * footerCell={props => (
1297
+ * <td className='k-table-td' colSpan={props.colSpan} style={props.style} role={'gridcell'}>Sum: 50</td>
1298
+ * )}
1299
+ * />
1300
+ * ```
1301
+ */
1302
+ footerCell?: ComponentType<GridFooterCellProps>;
1303
+ }
1304
+
1305
+ /**
1306
+ * Represents the object of the `onColumnReorder` Grid event.
1307
+ */
1308
+ export declare interface GridColumnReorderEvent {
1309
+ /**
1310
+ * An event target.
1311
+ */
1312
+ target: GridClassComponent;
1313
+ /**
1314
+ * A native DOM event.
1315
+ */
1316
+ nativeEvent: any;
1317
+ /**
1318
+ * The current columns collection.
1319
+ */
1320
+ columns: GridColumnProps[];
1321
+ /**
1322
+ * The id of the dragged column.
1323
+ */
1324
+ columnId?: string;
1325
+ }
1326
+
1327
+ /**
1328
+ * Represents the object of the `onColumnResize` Grid event.
1329
+ */
1330
+ export declare interface GridColumnResizeEvent {
1331
+ /**
1332
+ * An event target.
1333
+ */
1334
+ target: GridClassComponent;
1335
+ /**
1336
+ * A native DOM event.
1337
+ * Can be `null` when the callback source is not user action (e.g.: method call).
1338
+ */
1339
+ nativeEvent: any;
1340
+ /**
1341
+ * The current columns collection.
1342
+ */
1343
+ columns: GridColumnProps[];
1344
+ /**
1345
+ * **Deprecated**. Use `targetColumnId` instead.
1346
+ * The index of the column.
1347
+ */
1348
+ index: number;
1349
+ /**
1350
+ * **Deprecated**.
1351
+ * The new width of the column.
1352
+ */
1353
+ newWidth: number;
1354
+ /**
1355
+ * **Deprecated**.
1356
+ * The actual width of the column prior to resizing.
1357
+ */
1358
+ oldWidth: number;
1359
+ /**
1360
+ * Indicates that resizing is complete and the user has dropped the resize handler.
1361
+ */
1362
+ end: boolean;
1363
+ /**
1364
+ * The id of the clicked/dragged column.
1365
+ * When the callback source is not user action (e.g.: method call), contains only the first column id from the list.
1366
+ */
1367
+ targetColumnId?: string;
1368
+ }
1369
+
1370
+ /**
1371
+ * The settings for sorting the Grid columns.
1372
+ */
1373
+ declare type GridColumnSortSettings = ColumnSortSettings;
1374
+
1375
+ /**
1376
+ * @hidden
1377
+ */
1378
+ export declare class GridCommonDragLogic {
1379
+ refDragElementClue: React_2.RefObject<DragClue>;
1380
+ refDropElementClue: React_2.RefObject<DropClue>;
1381
+ columns: ExtendedColumnProps[];
1382
+ reorderable: boolean;
1383
+ groupable: boolean;
1384
+ private startColumn;
1385
+ private startGroup;
1386
+ private currentColumn;
1387
+ private currentGroup;
1388
+ private columnReorder;
1389
+ private groupReorder;
1390
+ private columnToGroup;
1391
+ private groupPanelDivElement;
1392
+ get dragClueRef(): React_2.RefObject<DragClue | null>;
1393
+ get dropClueRef(): React_2.RefObject<DropClue | null>;
1394
+ private get dragElementClue();
1395
+ private get dropElementClue();
1396
+ constructor(columnReorder: handler, groupReorder: handler, columnToGroup: handler);
1397
+ refGroupPanelDiv: (e: any) => void;
1398
+ pressHandler: (event: any, element: HTMLTableRowElement | HTMLDivElement) => void;
1399
+ dragHandler: (event: any, element: HTMLTableRowElement | HTMLDivElement) => void;
1400
+ releaseHandler: (event: any) => void;
1401
+ private getColumnIndex;
1402
+ private isTargetGroupingContainer;
1403
+ private getGroupIndex;
1404
+ private isValid;
1405
+ private updateDragElementClue;
1406
+ private updateDropElementClue;
1407
+ }
1408
+
1409
+ /**
1410
+ * Represents the object of the `onContextMenu` Grid event.
1411
+ */
1412
+ export declare interface GridContextMenuEvent extends GridEvent {
1413
+ /**
1414
+ * The data object that represents the current row.
1415
+ */
1416
+ dataItem: any;
1417
+ /**
1418
+ * The field to which the cell is bound.
1419
+ */
1420
+ field?: string;
1421
+ /**
1422
+ * A React Synthetic Event.
1423
+ */
1424
+ syntheticEvent: React.MouseEvent<any>;
1425
+ }
1426
+
1427
+ /**
1428
+ * The properties of the default Grid Cell.
1429
+ */
1430
+ export declare interface GridCustomCellProps extends GridCellProps {
1431
+ /**
1432
+ * The props and attributes that are applied to the td element by default.
1433
+ */
1434
+ tdProps?: React.TdHTMLAttributes<HTMLTableCellElement> | null;
1435
+ /**
1436
+ * The props and attributes that are applied to the second td. Such element is
1437
+ * rendered in very rare cases when we have grouping and sticky columns.
1438
+ */
1439
+ td2Props?: React.TdHTMLAttributes<HTMLTableCellElement> | null;
1440
+ /**
1441
+ * The default children of the table cell.
1442
+ */
1443
+ children?: React.ReactNode | React.ReactNode[];
1444
+ }
1445
+
1446
+ /**
1447
+ * The properties of the filter Grid Cell.
1448
+ */
1449
+ export declare interface GridCustomFilterCellProps extends GridFilterCellProps {
1450
+ /**
1451
+ * The props and attributes that are applied to the td element by default.
1452
+ */
1453
+ thProps?: GridThAttributes | null;
1454
+ /**
1455
+ * The default children of the table cell.
1456
+ */
1457
+ children?: React.ReactNode | React.ReactNode[];
1458
+ /**
1459
+ * The index of the column.
1460
+ */
1461
+ index?: number;
1462
+ }
1463
+
1464
+ /**
1465
+ * The properties of the footer Grid Cell.
1466
+ */
1467
+ export declare interface GridCustomFooterCellProps extends GridFooterCellProps {
1468
+ /**
1469
+ * The props and attributes that are applied to the td element by default.
1470
+ */
1471
+ tdProps?: React.TdHTMLAttributes<HTMLTableCellElement> | null;
1472
+ /**
1473
+ * The index of the column that is rendered.
1474
+ */
1475
+ index?: number;
1476
+ }
1477
+
1478
+ /**
1479
+ * The properties of the header Grid Cell.
1480
+ */
1481
+ export declare interface GridCustomHeaderCellProps extends GridHeaderCellProps {
1482
+ /**
1483
+ * The props and attributes that are applied to the td element by default.
1484
+ */
1485
+ thProps?: GridThAttributes | null;
1486
+ /**
1487
+ * The default children of the table cell.
1488
+ */
1489
+ children: React.ReactNode | React.ReactNode[];
1490
+ /**
1491
+ * The index of the column.
1492
+ */
1493
+ index?: number;
1494
+ }
1495
+
1496
+ /**
1497
+ * Represents the object of the `onDataStateChange` Grid event.
1498
+ */
1499
+ export declare interface GridDataStateChangeEvent extends GridEvent {
1500
+ /**
1501
+ * The state of the Grid based on the user action.
1502
+ */
1503
+ dataState: State;
1504
+ targetEvent?: PagerTargetEvent;
1505
+ }
1506
+
1507
+ /**
1508
+ * Represents the detail row class of the KendoReact Grid. Used to define custom details for each row. Can be applied for building the hierarchy. If `expandField` is set, the details for each row will be visible or hidden depending on the current data item and its `expandField` value.
1509
+ *
1510
+ * @example
1511
+ * ```jsx
1512
+ * class CustomGridDetailRow extends GridDetailRow {
1513
+ * render() {
1514
+ * const detailData = this.props.dataItem.MasterField2;
1515
+ * return (
1516
+ * <div>
1517
+ * This is detail template with another grid inside it
1518
+ * <Grid scrollable="none" data={detailData} />
1519
+ * </div>
1520
+ * );
1521
+ * }
1522
+ * }
1523
+ *
1524
+ * class App extends React.Component {
1525
+ * constructor(props) {
1526
+ * super(props);
1527
+ * this.state = {
1528
+ * data: [{MasterField1:'A1', MasterField2: [{DetailField1: 1, DetailField2: 2}]},
1529
+ * {MasterField1:'B1', MasterField2: [{DetailField1: 3, DetailField2: 4}]},
1530
+ * {MasterField1:'C1', MasterField2: [{DetailField1: 5, DetailField2: 6}]}]
1531
+ * };
1532
+ * }
1533
+ * render() {
1534
+ * return (
1535
+ * <Grid
1536
+ * data={this.state.data}
1537
+ * detail={CustomGridDetailRow}
1538
+ * >
1539
+ * <GridColumn field="MasterField1" />
1540
+ * </Grid>
1541
+ * );
1542
+ * }
1543
+ * }
1544
+ * ReactDOM.render(
1545
+ * <App />,
1546
+ * document.querySelector('my-app')
1547
+ * );
1548
+ * ```
1549
+ */
1550
+ export declare class GridDetailRow extends React_2.Component<GridDetailRowProps, {}> {
1551
+ /**
1552
+ * @hidden
1553
+ */
1554
+ render(): JSX.Element | null;
1555
+ }
1556
+
1557
+ /**
1558
+ * The props of the GridDetailRow component ([see example]({% slug detailrow_grid %})).
1559
+ */
1560
+ export declare interface GridDetailRowProps {
1561
+ /**
1562
+ * The data object that represents the current row.
1563
+ */
1564
+ dataItem: any;
1565
+ /**
1566
+ * Zero-based index of the dataItem.
1567
+ */
1568
+ dataIndex: number;
1569
+ }
1570
+
1571
+ /** @hidden */
1572
+ export declare interface GridDragSelectionReleaseEvent extends TableDragSelectionReleaseEvent {
1573
+ }
1574
+
1575
+ /**
1576
+ * @hidden
1577
+ */
1578
+ export declare const GridEditCell: (props: GridCellProps) => JSX_2.Element | null;
1579
+
1580
+ /**
1581
+ * Represents the base event object of the Grid.
1582
+ */
1583
+ export declare interface GridEvent extends BaseEvent<GridClassComponent> {
1584
+ }
1585
+
1586
+ /**
1587
+ * Represents the object of the `onExpandChange` Grid event.
1588
+ */
1589
+ export declare interface GridExpandChangeEvent extends GridEvent {
1590
+ /**
1591
+ * The data item that is expanded or collapsed.
1592
+ */
1593
+ dataItem: any;
1594
+ /**
1595
+ * The available values are:
1596
+ * - `true`&mdash;If the data item is expanded.
1597
+ * - `false`&mdash;If the data item is collapsed.
1598
+ */
1599
+ value: boolean;
1600
+ /**
1601
+ * Zero based index of the data item.
1602
+ */
1603
+ dataIndex: number;
1604
+ }
1605
+
1606
+ export declare class GridFilterCell extends React_2.Component<GridFilterCellProps, {}> {
1607
+ private _inputRef;
1608
+ constructor(props: GridFilterCellProps);
1609
+ /**
1610
+ * @hidden
1611
+ */
1612
+ render(): string | number | boolean | Iterable<React_2.ReactNode> | JSX_2.Element | null | undefined;
1613
+ private renderOperatorEditor;
1614
+ private inputChange;
1615
+ private operatorChange;
1616
+ private boolDropdownChange;
1617
+ private clear;
1618
+ private filterComponent;
1619
+ }
1620
+
1621
+ /**
1622
+ * The props of the GridFilterCell component
1623
+ * ([more information]({% slug cells_grid %}#toc-filter-cells)
1624
+ * and [example]({% slug filtering_grid %}#toc-custom-filter-cells)).
1625
+ */
1626
+ export declare interface GridFilterCellProps {
1627
+ /**
1628
+ * The column field in which the cell is located.
1629
+ */
1630
+ field?: string;
1631
+ /**
1632
+ * The method that will be called if the cell needs to inform its parent Grid about a change.
1633
+ */
1634
+ onChange: (event: {
1635
+ value: any;
1636
+ operator: string | Function;
1637
+ syntheticEvent: React.SyntheticEvent<any>;
1638
+ }) => void;
1639
+ /**
1640
+ * The list of the default operators for the current filter type.
1641
+ */
1642
+ operators: GridFilterOperator[];
1643
+ /**
1644
+ * The title which will be set to the input element in the filter cell.
1645
+ */
1646
+ title?: string;
1647
+ /**
1648
+ * The type of the filter. Determines which editor will be rendered for filtering.
1649
+ */
1650
+ filterType: 'text' | 'numeric' | 'boolean' | 'date';
1651
+ /**
1652
+ * The value of the cell.
1653
+ */
1654
+ value: any;
1655
+ /**
1656
+ * The operator that will be used for the cell filtering.
1657
+ */
1658
+ operator?: string | Function;
1659
+ /**
1660
+ * The list of values for the Boolean filter.
1661
+ */
1662
+ booleanValues: GridFilterOperator[];
1663
+ /**
1664
+ * A function for overriding the default rendering of the filter cell.
1665
+ */
1666
+ render?: (row: React.ReactElement<any>, dataItem: GridFilterCellProps) => React.ReactNode;
1667
+ /**
1668
+ * Accessible label of the filter.
1669
+ */
1670
+ ariaLabel?: string;
1671
+ /**
1672
+ * Configures the `size` of the cell.
1673
+ *
1674
+ * The available options are:
1675
+ * - small
1676
+ * - medium
1677
+ * - large
1678
+ * - null&mdash;Does not set a size `className`.
1679
+ *
1680
+ * @default `medium`
1681
+ */
1682
+ size?: null | 'small' | 'medium' | 'large';
1683
+ }
1684
+
1685
+ /**
1686
+ * Represents the object of the `onFilterChange` Grid event.
1687
+ */
1688
+ export declare interface GridFilterChangeEvent extends GridEvent {
1689
+ /**
1690
+ * The new `CompositeFilterDescriptor` based on the user action.
1691
+ */
1692
+ filter: CompositeFilterDescriptor;
1693
+ }
1694
+
1695
+ /**
1696
+ * The filter operator for the Grid filters.
1697
+ */
1698
+ export declare interface GridFilterOperator extends FilterOperator {
1699
+ }
1700
+
1701
+ /**
1702
+ * The filter operators for the Grid filters.
1703
+ *
1704
+ * @example
1705
+ * ```jsx-no-run
1706
+ * // Default Grid filter operators:
1707
+ * const filterOperators: {
1708
+ * 'text': [
1709
+ * { text: 'grid.filterContainsOperator', operator: 'contains' },
1710
+ * { text: 'grid.filterNotContainsOperator', operator: 'doesnotcontain' },
1711
+ * { text: 'grid.filterEqOperator', operator: 'eq' },
1712
+ * { text: 'grid.filterNotEqOperator', operator: 'neq' },
1713
+ * { text: 'grid.filterStartsWithOperator', operator: 'startswith' },
1714
+ * { text: 'grid.filterEndsWithOperator', operator: 'endswith' },
1715
+ * { text: 'grid.filterIsNullOperator', operator: 'isnull' },
1716
+ * { text: 'grid.filterIsNotNullOperator', operator: 'isnotnull' },
1717
+ * { text: 'grid.filterIsEmptyOperator', operator: 'isempty' },
1718
+ * { text: 'grid.filterIsNotEmptyOperator', operator: 'isnotempty' }
1719
+ * ],
1720
+ * 'numeric': [
1721
+ * { text: 'grid.filterEqOperator', operator: 'eq' },
1722
+ * { text: 'grid.filterNotEqOperator', operator: 'neq' },
1723
+ * { text: 'grid.filterGteOperator', operator: 'gte' },
1724
+ * { text: 'grid.filterGtOperator', operator: 'gt' },
1725
+ * { text: 'grid.filterLteOperator', operator: 'lte' },
1726
+ * { text: 'grid.filterLtOperator', operator: 'lt' },
1727
+ * { text: 'grid.filterIsNullOperator', operator: 'isnull' },
1728
+ * { text: 'grid.filterIsNotNullOperator', operator: 'isnotnull' }
1729
+ * ],
1730
+ * 'date': [
1731
+ * { text: 'grid.filterEqOperator', operator: 'eq' },
1732
+ * { text: 'grid.filterNotEqOperator', operator: 'neq' },
1733
+ * { text: 'grid.filterAfterOrEqualOperator', operator: 'gte' },
1734
+ * { text: 'grid.filterAfterOperator', operator: 'gt' },
1735
+ * { text: 'grid.filterBeforeOperator', operator: 'lt' },
1736
+ * { text: 'grid.filterBeforeOrEqualOperator', operator: 'lte' },
1737
+ * { text: 'grid.filterIsNullOperator', operator: 'isnull' },
1738
+ * { text: 'grid.filterIsNotNullOperator', operator: 'isnotnull' }
1739
+ * ],
1740
+ * 'boolean': [
1741
+ * { text: 'grid.filterEqOperator', operator: 'eq' }
1742
+ * ]
1743
+ * }
1744
+ * ```
1745
+ */
1746
+ export declare interface GridFilterOperators {
1747
+ [type: string]: GridFilterOperator[];
1748
+ }
1749
+
1750
+ /**
1751
+ * The props of the GridFooterCell component
1752
+ * ([see example]({% slug cells_grid %}#toc-footer-cells)).
1753
+ */
1754
+ export declare interface GridFooterCellProps {
1755
+ /**
1756
+ * The field to which the footer cell is bound.
1757
+ */
1758
+ field?: string;
1759
+ /**
1760
+ * The styles of the footer cell.
1761
+ */
1762
+ style?: React.CSSProperties;
1763
+ /**
1764
+ * The `colSpan` of the footer cell.
1765
+ */
1766
+ colSpan?: number;
1767
+ /**
1768
+ * The index to be applied to the `aria-colindex` attribute.
1769
+ */
1770
+ ariaColumnIndex: number;
1771
+ }
1772
+
1773
+ /**
1774
+ * The settings for grouping the data of the Grid ([see example]({% slug groupingaggregates_grid %})).
1775
+ */
1776
+ export declare interface GridGroupableSettings {
1777
+ /**
1778
+ * Determines if grouping by dragging and dropping the column headers is allowed and if the group header is visible.
1779
+ */
1780
+ enabled?: boolean;
1781
+ /**
1782
+ * Determines if the group footer row is visible when the group is collapsed. Defaults to `none`.
1783
+ */
1784
+ footer?: 'always' | 'visible' | 'none';
1785
+ }
1786
+
1787
+ /**
1788
+ * @hidden
1789
+ */
1790
+ export declare const GridGroupCell: (props: GridCellProps) => JSX_2.Element | null;
1791
+
1792
+ /**
1793
+ * Represents the object of the `onGroupChange` Grid event.
1794
+ */
1795
+ export declare interface GridGroupChangeEvent extends GridEvent {
1796
+ /**
1797
+ * An array of `GroupDescriptor` that corresponds to the user action.
1798
+ */
1799
+ group: GroupDescriptor[];
1800
+ }
1801
+
1802
+ /**
1803
+ * Represent the `ref` of the Grid component.
1804
+ */
1805
+ export declare interface GridHandle extends Pick<GridClassComponent, keyof GridClassComponent> {
1806
+ }
1807
+
1808
+ /**
1809
+ * @example
1810
+ * ```jsx
1811
+ * class App extends React.PureComponent {
1812
+ * state = {
1813
+ * details: false,
1814
+ * data: [
1815
+ * { foo: 'A1', bar: 'B1', b1: 1, b2:2 },
1816
+ * { foo: 'A2', bar: 'B2', b1: 3, b2:4 },
1817
+ * { foo: 'A3', bar: 'B2', b1: 5, b2:6 }
1818
+ * ]
1819
+ * };
1820
+ *
1821
+ * CustomHeaderCell = (props) =>
1822
+ * <span>
1823
+ * {props.title || props.field + ' '}
1824
+ * <button onClick={() => this.setState({ barDetails: !this.state.barDetails })}>
1825
+ * {this.state.barDetails ? 'collapse' : 'expand'}
1826
+ * </button>
1827
+ * {props.children}
1828
+ * </span>
1829
+ *
1830
+ * render() {
1831
+ * return (
1832
+ * <Grid
1833
+ * style={{ height: '420px' }}
1834
+ * data={this.state.data}
1835
+ * reorderable={true}
1836
+ * >
1837
+ * <GridColumn field="foo" />
1838
+ * <GridColumn field="bar" headerCell={this.CustomHeaderCell}>
1839
+ * {this.state.barDetails && [
1840
+ * <GridColumn field="b1" />,
1841
+ * <GridColumn field="b2" />
1842
+ * ]}
1843
+ * </GridColumn>
1844
+ * </Grid>
1845
+ * );
1846
+ * }
1847
+ * }
1848
+ *
1849
+ * ReactDOM.render(<App />, document.querySelector('my-app'));
1850
+ * ```
1851
+ */
1852
+ export declare class GridHeaderCell extends React_2.Component<GridHeaderCellProps, {}> {
1853
+ /**
1854
+ * @hidden
1855
+ */
1856
+ render(): string | number | boolean | Iterable<React_2.ReactNode> | JSX_2.Element | null | undefined;
1857
+ }
1858
+
1859
+ /**
1860
+ * The props of the GridHeaderCell component
1861
+ * ([more information]({% slug cells_grid %}#toc-header-cells)).
1862
+ */
1863
+ export declare interface GridHeaderCellProps extends Omit<HeaderCellBaseProps, 'render'> {
1864
+ /**
1865
+ * A function for overriding the default rendering of the header cell.
1866
+ */
1867
+ render?: (defaultRendering: React.ReactNode | null, props: GridHeaderCellProps) => React.ReactNode;
1868
+ /**
1869
+ * The props of the Grid column menu wrapper.
1870
+ */
1871
+ columnMenuWrapperProps: GridColumnMenuWrapperProps;
1872
+ /**
1873
+ * @hidden
1874
+ */
1875
+ id?: string;
1876
+ }
1877
+
1878
+ /**
1879
+ * Represents the object of the `onHeaderSelectionChange` Grid event.
1880
+ */
1881
+ export declare interface GridHeaderSelectionChangeEvent extends GridEvent {
1882
+ /**
1883
+ * The field of the column in which the cell is located.
1884
+ */
1885
+ field?: string;
1886
+ /**
1887
+ * The current Grid leaf data items.
1888
+ */
1889
+ dataItems: any[];
1890
+ /**
1891
+ * The `selectedField` prop of the Grid.
1892
+ */
1893
+ selectedField: string;
1894
+ }
1895
+
1896
+ /**
1897
+ * @hidden
1898
+ */
1899
+ export declare const GridHierarchyCell: (props: GridCellProps) => JSX_2.Element | null;
1900
+
1901
+ /**
1902
+ * Represents the object of the `onItemChange` Grid event.
1903
+ */
1904
+ export declare interface GridItemChangeEvent extends GridEvent {
1905
+ /**
1906
+ * The data object that represents the current row.
1907
+ */
1908
+ dataItem: any;
1909
+ /**
1910
+ * The field to which the cell is bound.
1911
+ */
1912
+ field?: string;
1913
+ /**
1914
+ * The value of the item.
1915
+ */
1916
+ value: any;
1917
+ }
1918
+
1919
+ /**
1920
+ * Represents the object of the `GridKeyDownEvent` Grid event.
1921
+ */
1922
+ export declare interface GridKeyDownEvent extends GridEvent, TableKeyDownEvent<GridClassComponent> {
1923
+ }
1924
+
1925
+ /**
1926
+ * @hidden
1927
+ */
1928
+ export declare const gridMessages: {
1929
+ "grid.detailExpand": string;
1930
+ "grid.detailCollapse": string;
1931
+ "grid.groupExpand": string;
1932
+ "grid.groupCollapse": string;
1933
+ "grid.noRecords": string;
1934
+ "grid.groupPanelEmpty": string;
1935
+ "grid.filterClearButton": string;
1936
+ "grid.filterSubmitButton": string;
1937
+ "grid.filterTitle": string;
1938
+ "grid.sortAscending": string;
1939
+ "grid.sortDescending": string;
1940
+ "grid.sortAriaLabel": string;
1941
+ "grid.groupColumn": string;
1942
+ "grid.ungroupColumn": string;
1943
+ "grid.columnMenu": string;
1944
+ "grid.pagerItemsPerPage": string;
1945
+ "grid.pagerInfo": string;
1946
+ "grid.pagerFirstPage": string;
1947
+ "grid.pagerPreviousPage": string;
1948
+ "grid.pagerNextPage": string;
1949
+ "grid.pagerLastPage": string;
1950
+ "grid.pagerPage": string;
1951
+ "grid.pagerPageSizeAriaLabel": string;
1952
+ "grid.pagerOf": string;
1953
+ "grid.pagerTotalPages": string;
1954
+ "grid.searchPlaceholder": string;
1955
+ "grid.filterCheckAll": string;
1956
+ "grid.filterChooseOperator": string;
1957
+ "grid.filterSelectedItems": string;
1958
+ "grid.filterAriaLabel": string;
1959
+ "grid.groupPanelAriaLabel": string;
1960
+ "grid.gridAriaLabel": string;
1961
+ "grid.selectRow": string;
1962
+ 'grid.filterEqOperator': string;
1963
+ 'grid.filterNotEqOperator': string;
1964
+ 'grid.filterIsNullOperator': string;
1965
+ 'grid.filterIsNotNullOperator': string;
1966
+ 'grid.filterIsEmptyOperator': string;
1967
+ 'grid.filterIsNotEmptyOperator': string;
1968
+ 'grid.filterStartsWithOperator': string;
1969
+ 'grid.filterContainsOperator': string;
1970
+ 'grid.filterNotContainsOperator': string;
1971
+ 'grid.filterEndsWithOperator': string;
1972
+ 'grid.filterGteOperator': string;
1973
+ 'grid.filterGtOperator': string;
1974
+ 'grid.filterLteOperator': string;
1975
+ 'grid.filterLtOperator': string;
1976
+ 'grid.filterIsTrue': string;
1977
+ 'grid.filterIsFalse': string;
1978
+ 'grid.filterBooleanAll': string;
1979
+ 'grid.filterAfterOrEqualOperator': string;
1980
+ 'grid.filterAfterOperator': string;
1981
+ 'grid.filterBeforeOperator': string;
1982
+ 'grid.filterBeforeOrEqualOperator': string;
1983
+ 'grid.filterAndLogic': string;
1984
+ 'grid.filterOrLogic': string;
1985
+ };
1986
+
1987
+ /**
1988
+ * Represents the object of the `GridNavigationActionEvent` Grid event.
1989
+ */
1990
+ export declare interface GridNavigationActionEvent extends GridEvent {
1991
+ /**
1992
+ * The focused element.
1993
+ */
1994
+ focusElement: any;
1995
+ }
1996
+
1997
+ /**
1998
+ * Represents the GridNoRecords component. The component is rendered when the `data` property of the Grid is empty or `null`.
1999
+ *
2000
+ * @example
2001
+ * ```jsx
2002
+ * class App extends React.Component {
2003
+ * render() {
2004
+ * return (
2005
+ * <Grid data={[]}>
2006
+ * <GridNoRecords>
2007
+ * There is no data available
2008
+ * </GridNoRecords>
2009
+ * <GridColumn field="id" />
2010
+ * <GridColumn field="name" />
2011
+ * </Grid>
2012
+ * );
2013
+ * }
2014
+ * }
2015
+ * ReactDOM.render(
2016
+ * <App />,
2017
+ * document.querySelector('my-app')
2018
+ * );
2019
+ * ```
2020
+ */
2021
+ export declare class GridNoRecords extends React_2.Component<GridNoRecordsProps, {}> {
2022
+ /**
2023
+ * @hidden
2024
+ */
2025
+ static displayName: string;
2026
+ /**
2027
+ * @hidden
2028
+ */
2029
+ render(): any;
2030
+ }
2031
+
2032
+ /**
2033
+ * The props of the GridNoRecords component.
2034
+ */
2035
+ export declare interface GridNoRecordsProps {
2036
+ /**
2037
+ * The React elements that will be rendered inside the Grid when no records are available.
2038
+ */
2039
+ children?: React.ReactNode;
2040
+ }
2041
+
2042
+ /**
2043
+ * Represents the object of the `onPageChange` Grid event.
2044
+ */
2045
+ export declare interface GridPageChangeEvent extends GridEvent {
2046
+ page: Page;
2047
+ targetEvent?: PagerTargetEvent;
2048
+ }
2049
+
2050
+ /**
2051
+ * The pager settings of the Grid ([see example]({% slug paging_grid %})).
2052
+ *
2053
+ * @example
2054
+ * ```tsx-no-run
2055
+ *
2056
+ * <Grid
2057
+ * pageable="{{
2058
+ * buttonCount: 2,
2059
+ * info: false
2060
+ * }}">
2061
+ * </Grid>
2062
+ * ```
2063
+ */
2064
+ export declare interface GridPagerSettings {
2065
+ /**
2066
+ * Sets the selected value of the page size Dropdownlist.
2067
+ * It is useful when the selected value could also be a string not only a number.
2068
+ */
2069
+ pageSizeValue?: string | number;
2070
+ /**
2071
+ * Sets the maximum numeric buttons count before the buttons are collapsed.
2072
+ */
2073
+ buttonCount?: number;
2074
+ /**
2075
+ * Toggles the information about the current page and the total number of records.
2076
+ */
2077
+ info?: boolean;
2078
+ /**
2079
+ * Defines the type of the Grid pager.
2080
+ */
2081
+ type?: GridPagerType;
2082
+ /**
2083
+ * Shows a menu for selecting the page size.
2084
+ */
2085
+ pageSizes?: boolean | Array<number> | Array<number | string>;
2086
+ /**
2087
+ * Toggles the **Previous** and **Next** buttons.
2088
+ */
2089
+ previousNext?: boolean;
2090
+ /**
2091
+ * Defines if the pager will be responsive. Defaults to `true`.
2092
+ */
2093
+ responsive?: boolean;
2094
+ }
2095
+
2096
+ /**
2097
+ * The type of the Grid pager.
2098
+ *
2099
+ * The available values are:
2100
+ * * `numeric`&mdash;Buttons with numbers.
2101
+ * * `input`&mdash;Input for typing the page number.
2102
+ *
2103
+ * @example
2104
+ * ```tsx-no-run
2105
+ *
2106
+ * <Grid
2107
+ * pageable="{{
2108
+ * type: 'numeric'
2109
+ * }}">
2110
+ * </Grid>
2111
+ * ```
2112
+ */
2113
+ declare type GridPagerType = 'numeric' | 'input';
2114
+
2115
+ /**
2116
+ * Represents the props of the [KendoReact Grid component]({% slug overview_grid %}).
2117
+ */
2118
+ export declare interface GridProps extends KendoReactComponentBaseProps {
2119
+ /**
2120
+ * Sets the Grid row key prop to the value of this field in the dataItem.
2121
+ * If not set, the dataItem index will be used for the row key, which might lead to row not updated during paging or scrolling.
2122
+ */
2123
+ dataItemKey?: string;
2124
+ /**
2125
+ * Sets a class of the Grid DOM element.
2126
+ */
2127
+ className?: string;
2128
+ /**
2129
+ * Sets a set of custom components that the Grid will render instead of the built-in cell.
2130
+ */
2131
+ cells?: GridCellsSettings;
2132
+ /**
2133
+ * Sets the data of the Grid ([see example]({% slug paging_grid %})). If you use paging, the `data` option has to contain only the items for the current page.
2134
+ */
2135
+ data?: any[] | DataResult | null;
2136
+ /**
2137
+ * Enables the sorting for the columns with their `field` option set ([see example]({% slug sorting_grid %})).
2138
+ */
2139
+ sortable?: GridSortSettings;
2140
+ /**
2141
+ * When set enables the clipboard copy, cut and paste manipulations. It takes values of type [ClipboardSettings]({% slug api_data-tools_clipboardsettings %}) or boolean.
2142
+ */
2143
+ clipboard?: ClipboardSettings | boolean;
2144
+ /**
2145
+ * Fires when clipboard support is enabled and the one of the actions 'copy'. The event accepts type [ClipboardDataEvent]({% slug api_data-tools_clipboarddataevent %}).
2146
+ */
2147
+ onClipboard?: (event: ClipboardDataEvent) => void;
2148
+ /**
2149
+ * Fires when the sorting of the Grid is changed ([see example]({% slug sorting_grid %})). You have to handle the event yourself and sort the data.
2150
+ */
2151
+ onSortChange?: (event: GridSortChangeEvent) => void;
2152
+ /**
2153
+ * The descriptors by which the data is sorted. Applies the sorting styles and buttons to the affected columns.
2154
+ */
2155
+ sort?: SortDescriptor[];
2156
+ /**
2157
+ * Enables the filtering of the columns with their `field` option set ([more information and examples]({% slug filtering_grid %})).
2158
+ */
2159
+ filterable?: boolean;
2160
+ /**
2161
+ * The descriptor by which the data is filtered ([more information and examples]({% slug filtering_grid %})). This affects the values and buttons in the `FilterRow` of the Grid.
2162
+ */
2163
+ filter?: CompositeFilterDescriptor;
2164
+ /**
2165
+ * The filter operators for the Grid filters.
2166
+ *
2167
+ * @example
2168
+ * ```jsx
2169
+ * const customFilterOperators = {
2170
+ * 'text': [
2171
+ * { text: 'grid.filterContainsOperator', operator: 'contains' }
2172
+ * ],
2173
+ * 'numeric': [
2174
+ * { text: 'grid.filterGtOperator', operator: 'gt' }
2175
+ * ],
2176
+ * 'date': [
2177
+ * { text: 'grid.filterAfterOperator', operator: 'gt' }
2178
+ * ]
2179
+ * }
2180
+ *
2181
+ * class App extends React.Component {
2182
+ * constructor(props) {
2183
+ * super(props);
2184
+ * this.state = {
2185
+ * data: [
2186
+ * { 'foo': 'A1', 'bar': 'B1' },
2187
+ * { 'foo': 'A2', 'bar': 'B2' },
2188
+ * { 'foo': 'A3', 'bar': 'B2' }
2189
+ * ]
2190
+ * };
2191
+ * }
2192
+ * render() {
2193
+ * return (
2194
+ * <div>
2195
+ * <Grid
2196
+ * data={this.state.data}
2197
+ * reorderable={true}
2198
+ * filterable
2199
+ * filterOperators={customFilterOperators}
2200
+ * >
2201
+ * <GridColumn field="foo" />
2202
+ * <GridColumn field="bar" />
2203
+ * </Grid>
2204
+ * </div>
2205
+ * );
2206
+ * }
2207
+ * }
2208
+ * ReactDOM.render(<App />, document.querySelector('my-app'));
2209
+ * ```
2210
+ */
2211
+ filterOperators?: GridFilterOperators;
2212
+ /**
2213
+ * Fires when the Grid filter is modified through the UI ([more information and examples]({% slug filtering_grid %})). You have to handle the event yourself and filter the data.
2214
+ */
2215
+ onFilterChange?: (event: GridFilterChangeEvent) => void;
2216
+ /**
2217
+ * Specifies a React element that will be cloned and rendered inside the column menu of the Grid. Can be overridden on column level.
2218
+ */
2219
+ columnMenu?: null | ComponentType<GridColumnMenuProps>;
2220
+ /**
2221
+ * The descriptors by which the data will be grouped
2222
+ * ([more information and examples]({% slug groupingbasics_grid %})).
2223
+ */
2224
+ group?: GroupDescriptor[];
2225
+ /**
2226
+ * Fires when the grouping of the Grid is changed. You have to handle the event yourself and group the data
2227
+ * ([more information and examples]({% slug groupingbasics_grid %})).
2228
+ */
2229
+ onGroupChange?: (event: GridGroupChangeEvent) => void;
2230
+ /**
2231
+ * Configures the pager of the Grid ([see example]({% slug paging_grid %})).
2232
+ *
2233
+ * The available options are:
2234
+ * - `buttonCount: Number`&mdash;Sets the maximum numeric buttons count before the buttons are collapsed.
2235
+ * - `info: Boolean`&mdash;Toggles the information about the current page and the total number of records.
2236
+ * - `type: PagerType`&mdash;Accepts the `numeric` (buttons with numbers) and `input` (input for typing the page number) values.
2237
+ * - `pageSizes: Boolean` or `Array<number>`&mdash;Shows a menu for selecting the page size.
2238
+ * - `previousNext: Boolean`&mdash;Toggles the **Previous** and **Next** buttons.
2239
+ */
2240
+ pageable?: GridPagerSettings | boolean;
2241
+ /**
2242
+ * Defines the page size that is used by the Grid pager ([see example]({% slug paging_grid %})). Required by the paging functionality.
2243
+ */
2244
+ pageSize?: number;
2245
+ /**
2246
+ * The pager component that the Grid will render instead of the built-in pager.
2247
+ */
2248
+ pager?: null | ComponentType<PagerProps>;
2249
+ /**
2250
+ * Alias of `pageSize` property. If `take` is set, `pageSize` will be ignored.
2251
+ */
2252
+ take?: number;
2253
+ /**
2254
+ * Fires when the page of the Grid is changed ([see example]({% slug paging_grid %})). You have to handle the event yourself and page the data.
2255
+ */
2256
+ onPageChange?: (event: GridPageChangeEvent) => void;
2257
+ /**
2258
+ * Defines the total number of data items in all pages ([see example]({% slug paging_grid %})). Required by the paging functionality.
2259
+ */
2260
+ total?: number;
2261
+ /**
2262
+ * Defines the number of records that will be skipped by the pager ([see example]({% slug paging_grid %})). Required by the paging functionality.
2263
+ */
2264
+ skip?: number;
2265
+ /**
2266
+ * Determines if the scroll position will be updated after data change. If set to `true` the scroll will remain on the same position.
2267
+ */
2268
+ fixedScroll?: boolean;
2269
+ /**
2270
+ * Fires when the user tries to expand or collapse a row.
2271
+ */
2272
+ onExpandChange?: (event: GridExpandChangeEvent) => void;
2273
+ /**
2274
+ * Specifies the name of the field which will provide a Boolean representation of the expanded state of the item ([see example]({% slug detailrow_grid %})).
2275
+ */
2276
+ expandField?: string;
2277
+ /**
2278
+ * The Grid selectable settings.
2279
+ */
2280
+ selectable?: GridSelectableSettings;
2281
+ /**
2282
+ * Specifies the name of the field which will provide a:
2283
+ * - Boolean representation of the selected state of the item ([see example]({% slug selection_grid %})) for row selection
2284
+ * - String array of the selected columns of the item for cell selection
2285
+ */
2286
+ selectedField?: string;
2287
+ /**
2288
+ * Fires when the user tries to select or deselect a row or cell.
2289
+ */
2290
+ onSelectionChange?: (event: GridSelectionChangeEvent) => void;
2291
+ /**
2292
+ * Fires when the user clicks the checkbox of a column header whose `field` matches `selectedField` ([more information and example]({% slug selection_grid %})).
2293
+ */
2294
+ onHeaderSelectionChange?: (event: GridHeaderSelectionChangeEvent) => void;
2295
+ /**
2296
+ * Fires when the user clicks a row.
2297
+ */
2298
+ onRowClick?: (event: GridRowClickEvent) => void;
2299
+ /**
2300
+ * Fires when the user double clicks a row.
2301
+ */
2302
+ onRowDoubleClick?: (event: GridRowDoubleClickEvent) => void;
2303
+ /**
2304
+ * Fires when the user changes the values of the item. The event is not debounced and fires on every `onChange` event of the input in the current `EditCell` ([more information and examples]({% slug editing_inline_grid %})).
2305
+ */
2306
+ onItemChange?: (event: GridItemChangeEvent) => void;
2307
+ /**
2308
+ * Specifies the name of the field which will provide a Boolean representation of the edit state of the current item ([more information and examples]({% slug editing_inline_grid %})).
2309
+ */
2310
+ editField?: string;
2311
+ /**
2312
+ * Defines the scroll mode that is used by the Grid ([see example]({% slug scrollmodes_grid %})).
2313
+ *
2314
+ * The available options are:
2315
+ * - `none`&mdash;Renders no scrollbar.
2316
+ * - `scrollable`&mdash;This is the default scroll mode. It requires the setting of the `height` option.
2317
+ * - `virtual`&mdash;Displays no pager and renders a portion of the data (optimized rendering) while the user is scrolling the content.
2318
+ */
2319
+ scrollable?: ScrollMode;
2320
+ /**
2321
+ * Defines the row height and forces an equal height to all rows ([see example]({% slug scrollmodes_grid %})).
2322
+ */
2323
+ rowHeight?: number;
2324
+ /**
2325
+ * Defines the detail row height and forces an equal height to all detail rows.
2326
+ */
2327
+ detailRowHeight?: number;
2328
+ /**
2329
+ * Specifies a React element that will be cloned and rendered inside the detail rows of the currently expanded items ([see example]({% slug hierarchy_grid %})). An item will be rendered as expanded if the value of its `expandField` is `true`.
2330
+ */
2331
+ detail?: null | ComponentType<GridDetailRowProps>;
2332
+ /**
2333
+ * Represents the `style` HTML attribute.
2334
+ */
2335
+ style?: React.CSSProperties;
2336
+ /**
2337
+ * Fires when the data state of the Grid is changed ([more information]({% slug localoperations_grid %}) and [example]({% slug odataserveroperations_grid %})).
2338
+ */
2339
+ onDataStateChange?: (event: GridDataStateChangeEvent) => void;
2340
+ /**
2341
+ * If set to `true`, the user can resize columns by dragging the edges (resize handles) of their header cells ([see example]({% slug resizing_columns_grid %})).
2342
+ */
2343
+ resizable?: boolean;
2344
+ /**
2345
+ * If set to `true`, the user can reorder columns by dragging their header cells ([see example]({% slug reordering_columns_grid %})).
2346
+ */
2347
+ reorderable?: boolean;
2348
+ /**
2349
+ * Determines if grouping by dragging and dropping the column headers is allowed ([more information and examples]({% slug groupingbasics_grid %})).
2350
+ */
2351
+ groupable?: GridGroupableSettings | boolean;
2352
+ /**
2353
+ * Fires when a column is resized.
2354
+ */
2355
+ onColumnResize?: (event: GridColumnResizeEvent) => void;
2356
+ /**
2357
+ * Fires when the columns are reordered.
2358
+ */
2359
+ onColumnReorder?: (event: GridColumnReorderEvent) => void;
2360
+ /**
2361
+ * Fires when a row is about to be rendered. Overrides the default appearance of the row.
2362
+ */
2363
+ rowRender?: (row: React.ReactElement<HTMLTableRowElement>, props: GridRowProps) => React.ReactNode;
2364
+ /**
2365
+ * Fires when a cell is about to be rendered. Used to override the default appearance of the cell ([see example]({% slug groupingaggregates_grid %})).
2366
+ */
2367
+ cellRender?: (defaultRendering: React.ReactElement<HTMLTableCellElement> | null, props: GridCellProps) => React.ReactElement<HTMLTableCellElement> | React.ReactElement<HTMLTableCellElement>[] | null;
2368
+ /**
2369
+ * Fires when a filter cell is about to be rendered. Overrides the default appearance of the filter cell.
2370
+ */
2371
+ filterCellRender?: (defaultRendering: React.ReactElement<any> | null, props: GridFilterCellProps) => React.ReactElement<any> | null;
2372
+ /**
2373
+ * Fires when a header cell is about to be rendered. Overrides the default appearance of the header cell.
2374
+ */
2375
+ headerCellRender?: (defaultRendering: React.ReactNode | null, props: GridHeaderCellProps) => React.ReactNode;
2376
+ /**
2377
+ * Fires when Grid is scrolled.
2378
+ */
2379
+ onScroll?: (event: GridEvent) => void;
2380
+ /**
2381
+ * Enables virtualization of the columns. If virtualization is enabled, the columns outside the view are not rendered.
2382
+ */
2383
+ columnVirtualization?: boolean;
2384
+ /**
2385
+ * If set to `true`, the user can use dedicated shortcuts to interact with the Grid.
2386
+ * By default, navigation is disabled and the Grid content is accessible in the normal tab sequence.
2387
+ */
2388
+ navigatable?: boolean;
2389
+ /**
2390
+ * Fires when Grid keyboard navigation position is changed.
2391
+ */
2392
+ onNavigationAction?: (event: GridNavigationActionEvent) => void;
2393
+ /**
2394
+ * Fires when the user press keyboard key.
2395
+ */
2396
+ onKeyDown?: (event: GridKeyDownEvent) => void;
2397
+ /**
2398
+ * The accessible label of the Grid.
2399
+ */
2400
+ /**
2401
+ * **Deprecated**. The accessible label of the Grid. Use ([messages]({% slug globalization_grid %})) instead.
2402
+ *
2403
+ * @deprecated
2404
+ */
2405
+ ariaLabel?: string;
2406
+ /**
2407
+ * Defines if the group descriptor columns are locked (frozen or sticky).
2408
+ * Locked columns are the columns that are visible at all times while the user scrolls the component horizontally.
2409
+ * Defaults to `false`.
2410
+ */
2411
+ lockGroups?: boolean;
2412
+ /**
2413
+ * Configures the `size` of the Grid.
2414
+ *
2415
+ * The available options are:
2416
+ * - small
2417
+ * - medium
2418
+ *
2419
+ * @default `medium`
2420
+ */
2421
+ size?: 'small' | 'medium';
2422
+ /**
2423
+ * The event that is fired when the ContextMenu is activated.
2424
+ */
2425
+ onContextMenu?: (event: GridContextMenuEvent) => void;
2426
+ /**
2427
+ * Sets the `id` property of the top div element of the component.
2428
+ */
2429
+ id?: string;
2430
+ }
2431
+
2432
+ /**
2433
+ * The component for each of the items in the `data` property which the Grid renders.
2434
+ */
2435
+ export declare class GridRow extends React_2.Component<GridRowProps, {}> {
2436
+ /**
2437
+ * @hidden
2438
+ */
2439
+ render(): string | number | boolean | Iterable<React_2.ReactNode> | JSX_2.Element | null | undefined;
2440
+ }
2441
+
2442
+ /**
2443
+ * Represents the object of the `onRowClick` Grid event.
2444
+ */
2445
+ export declare interface GridRowClickEvent extends GridEvent {
2446
+ /**
2447
+ * The item from the `data` property of the Grid which corresponds to the row that is clicked.
2448
+ */
2449
+ dataItem: any;
2450
+ }
2451
+
2452
+ /**
2453
+ * Represents the object of the `onRowDoubleClick` Grid event.
2454
+ */
2455
+ export declare interface GridRowDoubleClickEvent extends GridEvent {
2456
+ /**
2457
+ * The item from the `data` property of the Grid which corresponds to the row that is clicked.
2458
+ */
2459
+ dataItem: any;
2460
+ }
2461
+
2462
+ /**
2463
+ * The props that the Grid passes to the GridRow component when creating it. Accessible during the `rowRender` callback of the Grid.
2464
+ */
2465
+ export declare interface GridRowProps extends KendoReactComponentBaseProps {
2466
+ /**
2467
+ * The `data` object that represents the current row.
2468
+ */
2469
+ dataItem: any;
2470
+ /**
2471
+ * Indicates whether the row is an alternating row.
2472
+ */
2473
+ isAltRow: boolean;
2474
+ /**
2475
+ * Indicates whether the row has at least one edit cell.
2476
+ */
2477
+ isInEdit: boolean;
2478
+ /**
2479
+ * Indicates if the row is hidden. The hidden row is rendered above the visible area of the Grid. Occurs when the Grid uses virtualization and the row is on the current page. When `rowHeight` is set, `isHidden` is always `true`.
2480
+ */
2481
+ isHidden: boolean;
2482
+ /**
2483
+ * The event that is fired when the row is clicked.
2484
+ */
2485
+ onClick: any;
2486
+ /**
2487
+ * The event that is fired when the row is double clicked.
2488
+ */
2489
+ onDoubleClick: any;
2490
+ /**
2491
+ * The name of the field which will provide a Boolean representation of the selected state of the item.
2492
+ */
2493
+ selectedField?: string;
2494
+ /**
2495
+ * Sets the height of the row.
2496
+ */
2497
+ rowHeight?: number;
2498
+ /**
2499
+ * The type of the row.
2500
+ */
2501
+ rowType: GridRowType;
2502
+ /**
2503
+ * A function for overriding the default rendering of the row.
2504
+ */
2505
+ render?: (row: React.ReactElement<HTMLTableRowElement>, props: GridRowProps) => React.ReactNode;
2506
+ /**
2507
+ * The index to be applied to the `aria-rowindex` attribute.
2508
+ */
2509
+ ariaRowIndex?: number;
2510
+ /**
2511
+ * The index of the leaf dataItem in data. Used by selection.
2512
+ */
2513
+ dataIndex: number;
2514
+ /**
2515
+ * Indicates if the row is selected.
2516
+ */
2517
+ isSelected: boolean;
2518
+ /**
2519
+ * @hidden
2520
+ */
2521
+ absoluteRowIndex: number;
2522
+ }
2523
+
2524
+ /**
2525
+ * The type of the GridRow component.
2526
+ *
2527
+ * The available values are:
2528
+ * - `groupHeader`&mdash;The row is a group header.
2529
+ * - `groupFooter`&mdash;The row is a group footer.
2530
+ * - `data`&mdash;The row corresponds to an item from the `data` collection which is passed to the Grid.
2531
+ */
2532
+ declare type GridRowType = 'groupFooter' | 'groupHeader' | 'data';
2533
+
2534
+ /**
2535
+ * Represents the available selection modes.
2536
+ */
2537
+ export declare type GridSelectableMode = TableSelectableMode;
2538
+
2539
+ /**
2540
+ * Represents the Grid selectable settings.
2541
+ */
2542
+ export declare interface GridSelectableSettings extends TableSelectableSettings {
2543
+ /**
2544
+ * The available values are:
2545
+ * * `single`
2546
+ * * `multiple`
2547
+ *
2548
+ * @default "multiple"
2549
+ */
2550
+ mode?: GridSelectableMode;
2551
+ }
2552
+
2553
+ /**
2554
+ * @hidden
2555
+ */
2556
+ export declare const GridSelectionCell: (props: GridCellProps) => JSX_2.Element | null;
2557
+
2558
+ /**
2559
+ * Represents the object of the `onSelectionChange` Grid event.
2560
+ */
2561
+ export declare interface GridSelectionChangeEvent extends GridEvent, TableSelectionChangeEvent<GridClassComponent> {
2562
+ }
2563
+
2564
+ /**
2565
+ * Represents the object of the `onSortChange` Grid event.
2566
+ */
2567
+ export declare interface GridSortChangeEvent extends GridEvent {
2568
+ /**
2569
+ * The new `SortDescriptor` according to the user action.
2570
+ */
2571
+ sort: SortDescriptor[];
2572
+ }
2573
+
2574
+ /**
2575
+ * The settings for sorting the Grid data.
2576
+ */
2577
+ export declare type GridSortSettings = SortSettings;
2578
+
2579
+ export declare interface GridTdAttributes extends React.TdHTMLAttributes<HTMLTableCellElement> {
2580
+ [TABLE_COL_INDEX_ATTRIBUTE]?: number;
2581
+ key?: string;
2582
+ }
2583
+
2584
+ export declare interface GridThAttributes extends React.ThHTMLAttributes<HTMLTableCellElement> {
2585
+ columnId: string;
2586
+ key?: string;
2587
+ }
2588
+
2589
+ /**
2590
+ * Represents the GridToolbar component.
2591
+ *
2592
+ * @example
2593
+ * ```jsx
2594
+ * class App extends React.Component {
2595
+ * state = {
2596
+ * data: [
2597
+ * {'Column1':'A1', 'Column2':'A2'},
2598
+ * {'Column1':'B1', 'Column2':'B2'},
2599
+ * {'Column1':'C1', 'Column2':'C2'}
2600
+ * ]
2601
+ * }
2602
+ *
2603
+ * customClick = () => {
2604
+ * alert("Custom handler in custom toolbar");
2605
+ * }
2606
+ * render() {
2607
+ * return (
2608
+ * <Grid data={this.state.data}>
2609
+ * <GridToolbar>
2610
+ * <button
2611
+ * title="Click"
2612
+ * className="k-button k-primary"
2613
+ * onClick={this.customClick}
2614
+ * >Click
2615
+ * </button>
2616
+ * </GridToolbar>
2617
+ * </Grid>
2618
+ * );
2619
+ * }
2620
+ * }
2621
+ * ReactDOM.render(
2622
+ * <App />,
2623
+ * document.querySelector('my-app')
2624
+ * );
2625
+ * ```
2626
+ */
2627
+ export declare class GridToolbar extends React_2.Component<GridToolbarProps, {}> {
2628
+ /**
2629
+ * @hidden
2630
+ */
2631
+ static displayName: string;
2632
+ /**
2633
+ * @hidden
2634
+ */
2635
+ render(): JSX_2.Element;
2636
+ }
2637
+
2638
+ /**
2639
+ * The properties of the GridToolbar component.
2640
+ */
2641
+ export declare interface GridToolbarProps {
2642
+ /**
2643
+ * The React elements that will be rendered inside the toolbar of the Grid.
2644
+ */
2645
+ children?: React.ReactNode;
2646
+ /**
2647
+ * Specifies the name of the CSS class which is set to the GridToolbar.
2648
+ */
2649
+ className?: string;
2650
+ /**
2651
+ * Configures the `size` of the Toolbar.
2652
+ *
2653
+ * The available options are:
2654
+ * - small
2655
+ * - medium
2656
+ * - large
2657
+ * - null&mdash;Does not set a size `className`.
2658
+ *
2659
+ * @default `medium`
2660
+ */
2661
+ size?: null | 'small' | 'medium' | 'large';
2662
+ /**
2663
+ * The accessible label of the GridToolbar component.
2664
+ */
2665
+ ariaLabel?: string;
2666
+ /**
2667
+ * @hidden
2668
+ */
2669
+ ariaControls?: string;
2670
+ }
2671
+
2672
+ /**
2673
+ * @hidden
2674
+ */
2675
+ declare type handler = (prevIndex: number, nextIndex: number, nativeEvent: any) => void;
2676
+
2677
+ /**
2678
+ * @hidden
2679
+ */
2680
+ export declare const leafColumns: (columns: GridColumnProps[]) => GridColumnProps[];
2681
+
2682
+ /**
2683
+ * The text of the filter operators displayed in the filter menu.
2684
+ */
2685
+ export declare const operators: GridFilterOperators;
2686
+
2687
+ /**
2688
+ * Represents the `skip` and `take` configurations which are wrapped in the `Page` object.
2689
+ */
2690
+ declare interface Page {
2691
+ /**
2692
+ * The number of records that will be skipped.
2693
+ */
2694
+ skip: number;
2695
+ /**
2696
+ * The number of records that will be taken.
2697
+ */
2698
+ take: number;
2699
+ }
2700
+
2701
+ /**
2702
+ * @hidden
2703
+ */
2704
+ export declare const pagerFirstPage = "grid.pagerFirstPage";
2705
+
2706
+ /**
2707
+ * @hidden
2708
+ */
2709
+ export declare const pagerInfo = "grid.pagerInfo";
2710
+
2711
+ /**
2712
+ * @hidden
2713
+ */
2714
+ export declare const pagerItemPerPage = "grid.pagerItemsPerPage";
2715
+
2716
+ /**
2717
+ * @hidden
2718
+ */
2719
+ export declare const pagerLastPage = "grid.pagerLastPage";
2720
+
2721
+ /**
2722
+ * @hidden
2723
+ */
2724
+ export declare const pagerNextPage = "grid.pagerNextPage";
2725
+
2726
+ /**
2727
+ * @hidden
2728
+ */
2729
+ export declare const pagerPreviousPage = "grid.pagerPreviousPage";
2730
+
2731
+ /**
2732
+ * @hidden
2733
+ */
2734
+ export declare const rootFilterOrDefault: (rootFilter: CompositeFilterDescriptor | undefined) => CompositeFilterDescriptor;
2735
+
2736
+ declare type ScrollMode = 'none' | 'scrollable' | 'virtual';
2737
+
2738
+ export { setSelectedState }
2739
+
2740
+ /**
2741
+ * Represents the KendoReact Grid's StatusBar component.
2742
+ */
2743
+ export declare const StatusBar: React_2.FunctionComponent<StatusBarProps>;
2744
+
2745
+ /**
2746
+ * Represents the props of the KendoReact Grid's StatusBar component.
2747
+ */
2748
+ export declare interface StatusBarProps {
2749
+ data: StatusItem[];
2750
+ }
2751
+
2752
+ /**
2753
+ * Represents the arguments of the getStatusData function.
2754
+ */
2755
+ export declare interface StatusDataArgs extends Pick<GridSelectionChangeEvent, 'selectedField' | 'dataItems' | 'target'> {
2756
+ }
2757
+
2758
+ /**
2759
+ * Represents the KendoReact Grid's StatusItem object.
2760
+ */
2761
+ export declare interface StatusItem {
2762
+ /**
2763
+ * The type of the status item.
2764
+ * Could be `sum`, `min`, `max`, `average`, `count`, `isTrue`, `isFalse`, `earliest` or `latest`.
2765
+ */
2766
+ type: string;
2767
+ /**
2768
+ * The calculated value of the status item.
2769
+ */
2770
+ value: number | boolean | Date;
2771
+ /**
2772
+ * The formatted value of the status item.
2773
+ */
2774
+ formattedValue: string;
2775
+ }
2776
+
2777
+ export { }