@progress/kendo-react-grid 9.4.0-develop.9 → 9.4.0

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 (39) hide show
  1. package/GridClientWrapper.js +1 -1
  2. package/GridClientWrapper.mjs +463 -374
  3. package/GridComponent.js +1 -1
  4. package/GridComponent.mjs +337 -307
  5. package/GridSearchBox.js +8 -0
  6. package/GridSearchBox.mjs +35 -0
  7. package/GridState.js +1 -1
  8. package/GridState.mjs +79 -67
  9. package/NOTICE.txt +40 -51
  10. package/cells/GridCell.js +1 -1
  11. package/cells/GridCell.mjs +24 -20
  12. package/cells/client/GridRowReorderContainer.js +1 -1
  13. package/cells/client/GridRowReorderContainer.mjs +15 -9
  14. package/columnMenu/GridColumnMenuCheckboxFilter.js +1 -1
  15. package/columnMenu/GridColumnMenuCheckboxFilter.mjs +56 -55
  16. package/columnMenu/GridColumnMenuColumnsChooser.js +9 -0
  17. package/columnMenu/GridColumnMenuColumnsChooser.mjs +82 -0
  18. package/columnMenu/GridColumnMenuFilter.js +1 -1
  19. package/columnMenu/GridColumnMenuFilter.mjs +19 -19
  20. package/columnMenu/GridColumnMenuSort.js +1 -1
  21. package/columnMenu/GridColumnMenuSort.mjs +1 -1
  22. package/dist/cdn/js/kendo-react-grid.js +1 -1
  23. package/header/client/GridHeaderCellContainer.js +1 -1
  24. package/header/client/GridHeaderCellContainer.mjs +20 -18
  25. package/index.d.mts +289 -36
  26. package/index.d.ts +289 -36
  27. package/index.js +1 -1
  28. package/index.mjs +76 -72
  29. package/messages/index.js +1 -1
  30. package/messages/index.mjs +38 -36
  31. package/package-metadata.js +1 -1
  32. package/package-metadata.mjs +2 -2
  33. package/package.json +14 -14
  34. package/rows/GridRow.js +1 -1
  35. package/rows/GridRow.mjs +45 -45
  36. package/utils/index.js +1 -1
  37. package/utils/index.mjs +156 -146
  38. /package/{interfaces/GridSortSettings.js → sortCommon.js} +0 -0
  39. /package/{interfaces/GridSortSettings.mjs → sortCommon.mjs} +0 -0
package/index.d.ts CHANGED
@@ -7,7 +7,6 @@
7
7
  */
8
8
  import { BaseEvent } from '@progress/kendo-react-common';
9
9
  import { CellProps } from '@progress/kendo-react-data-tools';
10
- import { ClipboardDataEvent } from '@progress/kendo-react-data-tools';
11
10
  import { ClipboardSettings } from '@progress/kendo-react-data-tools';
12
11
  import { ColumnBaseProps } from '@progress/kendo-react-data-tools';
13
12
  import { ColumnSortSettings } from '@progress/kendo-react-data-tools';
@@ -22,6 +21,7 @@ import { FilterOperator } from '@progress/kendo-react-data-tools';
22
21
  import { getSelectedState } from '@progress/kendo-react-data-tools';
23
22
  import { getSelectedStateFromKeyDown } from '@progress/kendo-react-data-tools';
24
23
  import { GridClassStructure } from '@progress/kendo-react-common';
24
+ import { GridClipboardEvent } from '@progress/kendo-react-data-tools';
25
25
  import { GroupDescriptor } from '@progress/kendo-data-query';
26
26
  import { GroupExpandDescriptor } from '@progress/kendo-react-data-tools';
27
27
  import { GroupState } from '@progress/kendo-react-data-tools';
@@ -40,6 +40,7 @@ import { PagerProps } from '@progress/kendo-react-data-tools';
40
40
  import { PagerTargetEvent } from '@progress/kendo-react-data-tools';
41
41
  import * as React_2 from 'react';
42
42
  import { ReactElement } from 'react';
43
+ import { SearchField } from '@progress/kendo-react-data-tools';
43
44
  import { SelectDescriptor } from '@progress/kendo-react-data-tools';
44
45
  import { setSelectedState } from '@progress/kendo-react-data-tools';
45
46
  import { SortDescriptor } from '@progress/kendo-data-query';
@@ -55,6 +56,8 @@ import { TableKeyDownEvent } from '@progress/kendo-react-data-tools';
55
56
  import { TableSelectableMode } from '@progress/kendo-react-data-tools';
56
57
  import { TableSelectableSettings } from '@progress/kendo-react-data-tools';
57
58
  import { TableSelectionChangeEvent } from '@progress/kendo-react-data-tools';
59
+ import { TextBoxChangeEvent } from '@progress/kendo-react-inputs';
60
+ import { TextBoxProps } from '@progress/kendo-react-inputs';
58
61
 
59
62
  /**
60
63
  * The value of the filter operators displayed in the boolean filter menu.
@@ -225,10 +228,6 @@ export declare const contextMenuItemsMap: {
225
228
  };
226
229
  };
227
230
 
228
- export { DetailExpandDescriptor }
229
-
230
- export { EditDescriptor }
231
-
232
231
  /**
233
232
  * @hidden
234
233
  */
@@ -249,6 +248,7 @@ declare interface ExtendedColumnProps extends GridColumnProps {
249
248
  isAccessible: boolean;
250
249
  /** @hidden _internal usage only */
251
250
  _type?: 'edit' | 'expand';
251
+ rowSpannable?: Required<GridRowSpannableSettings>;
252
252
  }
253
253
 
254
254
  /**
@@ -302,7 +302,7 @@ export declare const GRID_PREVENT_SELECTION_ELEMENT = "data-prevent-selection";
302
302
  /** The attribute required by the Grid selection on Grid `tr` elements. */
303
303
  export declare const GRID_ROW_INDEX_ATTRIBUTE = "data-grid-row-index";
304
304
 
305
- export declare const GridCell: (props: GridCellProps) => JSX_2.Element;
305
+ export declare const GridCell: (props: GridCellProps) => JSX_2.Element | null;
306
306
 
307
307
  /**
308
308
  * Represents the `GridCellBaseOptions` object that are passed to the handler.
@@ -407,6 +407,11 @@ export declare interface GridCellProps extends Omit<CellProps, 'onChange' | 'ren
407
407
  localization?: LocalizationService;
408
408
  /** @hidden */
409
409
  intl?: IntlService;
410
+ /** @hidden */
411
+ _rowSpan?: {
412
+ count: number | null;
413
+ value: any;
414
+ };
410
415
  }
411
416
 
412
417
  /**
@@ -550,6 +555,31 @@ export declare interface GridColumnMenuColumnProps {
550
555
  id?: string;
551
556
  }
552
557
 
558
+ /**
559
+ * Represents the KendoReact GridColumnMenuColumnsChooser component.
560
+ */
561
+ export declare const GridColumnMenuColumnsChooser: React_2.FunctionComponent<GridColumnMenuColumnsChooserProps>;
562
+
563
+ /**
564
+ * The props passed to the ColumnMenu ColumnsChooser component.
565
+ */
566
+ declare interface GridColumnMenuColumnsChooserBaseProps extends GridColumnMenuBaseProps {
567
+ /**
568
+ * The columns state of the KendoReact GridColumnMenuColumnsChooser component.
569
+ */
570
+ columnsState?: GridColumnState[];
571
+ /**
572
+ * The method that will be called when the new columns state is applied.
573
+ */
574
+ onColumnsStateChange?: Function;
575
+ }
576
+
577
+ /**
578
+ * The props of the GridColumnMenuColumnsChooser component.
579
+ */
580
+ export declare interface GridColumnMenuColumnsChooserProps extends GridColumnMenuColumnsChooserBaseProps {
581
+ }
582
+
553
583
  /**
554
584
  * Represents the KendoReact GridColumnMenuColumnsList component.
555
585
  */
@@ -877,7 +907,7 @@ declare interface GridColumnMenuItemProps {
877
907
  /**
878
908
  * The props which the ColumnMenu passes to its children.
879
909
  */
880
- export declare interface GridColumnMenuProps extends GridColumnMenuFilterBaseProps, GridColumnMenuSortBaseProps, GridColumnMenuGroupBaseProps {
910
+ export declare interface GridColumnMenuProps extends GridColumnMenuFilterBaseProps, GridColumnMenuSortBaseProps, GridColumnMenuGroupBaseProps, GridColumnMenuColumnsChooserBaseProps {
881
911
  navigatable?: boolean;
882
912
  show?: boolean;
883
913
  }
@@ -1059,6 +1089,8 @@ export declare interface GridColumnProps extends Omit<ColumnBaseProps, 'cell'> {
1059
1089
  media?: string;
1060
1090
  /**
1061
1091
  * Defines the component that will be rendered as a cell. If not set, a `GridCell` will be rendered by default.
1092
+ *
1093
+ * @deprecated This prop is deprecated in favor of the ([cells]({% slug api_grid_gridcolumnprops %}#toc-cells)) prop. We’re removing this prop in version 11.0.0.
1062
1094
  */
1063
1095
  cell?: ComponentType<GridCellProps>;
1064
1096
  /**
@@ -1067,10 +1099,14 @@ export declare interface GridColumnProps extends Omit<ColumnBaseProps, 'cell'> {
1067
1099
  cells?: GridCellsSettings;
1068
1100
  /**
1069
1101
  * Defines the component that will be rendered as a filter cell. If not set, a `GridFilterCell` will be rendered by default.
1102
+ *
1103
+ * @deprecated This prop is deprecated in favor of the ([cells]({% slug api_grid_gridcolumnprops %}#toc-cells)) prop. We’re removing this prop in version 11.0.0.
1070
1104
  */
1071
1105
  filterCell?: ComponentType<GridFilterCellProps>;
1072
1106
  /**
1073
1107
  * Defines the component that will be rendered as a header cell. If not set, a `GridHeaderCell` will be rendered by default.
1108
+ *
1109
+ * @deprecated This prop is deprecated in favor of the ([cells]({% slug api_grid_gridcolumnprops %}#toc-cells)) prop. We’re removing this prop in version 11.0.0.
1074
1110
  */
1075
1111
  headerCell?: ComponentType<GridHeaderCellProps>;
1076
1112
  /**
@@ -1085,6 +1121,8 @@ export declare interface GridColumnProps extends Omit<ColumnBaseProps, 'cell'> {
1085
1121
  * )}
1086
1122
  * />
1087
1123
  * ```
1124
+ *
1125
+ * @deprecated This prop is deprecated in favor of the ([cells]({% slug api_grid_gridcolumnprops %}#toc-cells)) prop. We’re removing this prop in version 11.0.0.
1088
1126
  */
1089
1127
  footerCell?: ComponentType<GridFooterCellProps>;
1090
1128
  /**
@@ -1093,6 +1131,10 @@ export declare interface GridColumnProps extends Omit<ColumnBaseProps, 'cell'> {
1093
1131
  * @default "data"
1094
1132
  */
1095
1133
  columnType?: GridColumnType;
1134
+ /**
1135
+ * Defines if the cells of the column should be spanned when their values are the same.
1136
+ */
1137
+ rowSpannable?: boolean | GridRowSpannableSettings;
1096
1138
  }
1097
1139
 
1098
1140
  /**
@@ -1166,6 +1208,46 @@ export declare interface GridColumnResizeEvent {
1166
1208
  declare interface GridColumnSortSettings extends ColumnSortSettings {
1167
1209
  }
1168
1210
 
1211
+ /**
1212
+ * Represents the object of the `onColumnsStateChange` Grid event.
1213
+ */
1214
+ export declare interface GridColumnsStateChangeEvent {
1215
+ /**
1216
+ * An event target.
1217
+ */
1218
+ target: GridHandle;
1219
+ /**
1220
+ * The columns state collection.
1221
+ */
1222
+ columnsState: GridColumnState[];
1223
+ }
1224
+
1225
+ /**
1226
+ * The state of the GridColumn
1227
+ */
1228
+ export declare interface GridColumnState {
1229
+ /**
1230
+ * The id of the column.
1231
+ */
1232
+ id: string;
1233
+ /**
1234
+ * The field of the column.
1235
+ */
1236
+ field?: string;
1237
+ /**
1238
+ * The title of the column.
1239
+ */
1240
+ title?: string;
1241
+ /**
1242
+ * The value indicating whether a column is visible or not.
1243
+ */
1244
+ hidden?: boolean;
1245
+ /**
1246
+ * A collection of child states.
1247
+ */
1248
+ children?: GridColumnState[];
1249
+ }
1250
+
1169
1251
  /**
1170
1252
  * Sets the column type.
1171
1253
  *
@@ -1395,6 +1477,20 @@ export declare interface GridCustomHeaderCellProps extends GridHeaderCellProps {
1395
1477
  index?: number;
1396
1478
  }
1397
1479
 
1480
+ /**
1481
+ * The properties of the default Grid Row.
1482
+ */
1483
+ export declare interface GridCustomRowProps extends GridRowProps {
1484
+ /**
1485
+ * The props and attributes that are applied to the tr element by default.
1486
+ */
1487
+ trProps?: React.HTMLAttributes<HTMLTableRowElement> | null;
1488
+ /**
1489
+ * The default children of the table row.
1490
+ */
1491
+ children?: React.ReactNode | React.ReactNode[];
1492
+ }
1493
+
1398
1494
  /**
1399
1495
  * Represents the object of the `onDataStateChange` Grid event.
1400
1496
  */
@@ -1470,10 +1566,10 @@ export declare interface GridDragSelectionReleaseEvent extends TableDragSelectio
1470
1566
  }
1471
1567
 
1472
1568
  /**
1473
- * TODO: uncomment
1474
- * Represents the Grid editable settings.
1569
+ * Represents the Grid editable settings:
1570
+ * - `enabled` &mdash; Determines if the editing is enabled.
1571
+ * - `mode` &mdash; Determines the editing mode.
1475
1572
  *
1476
- * @hidden
1477
1573
  */
1478
1574
  declare interface GridEditableSettings extends TableEditableSettings {
1479
1575
  }
@@ -1697,7 +1793,9 @@ export declare interface GridGroupChangeEvent extends GridEvent {
1697
1793
  group: GroupDescriptor[];
1698
1794
  }
1699
1795
 
1700
- /** @hidden */
1796
+ /**
1797
+ * Represents the Grid group expandable settings.
1798
+ */
1701
1799
  declare type GridGroupExpandableSettings = TableGroupExpandableSettings;
1702
1800
 
1703
1801
  /** @hidden */
@@ -1910,6 +2008,7 @@ export declare const gridMessages: {
1910
2008
  "grid.pagerOf": string;
1911
2009
  "grid.pagerTotalPages": string;
1912
2010
  "grid.searchPlaceholder": string;
2011
+ "grid.searchboxPlaceholder": string;
1913
2012
  "grid.filterCheckAll": string;
1914
2013
  "grid.filterChooseOperator": string;
1915
2014
  "grid.filterSelectedItems": string;
@@ -2068,9 +2167,15 @@ declare type GridPagerType = 'numeric' | 'input';
2068
2167
  * Represents the props of the [KendoReact Grid component]({% slug overview_grid %}).
2069
2168
  */
2070
2169
  export declare interface GridProps extends KendoReactComponentBaseProps {
2071
- /** @hidden */
2170
+ /**
2171
+ * Enables data-processing inside the GridComponent based on it's state.
2172
+ * Provides an easy, built-in way to handle data operations like sorting, filtering, grouping, and paging.
2173
+ *
2174
+ * @default false
2175
+ */
2072
2176
  autoProcessData?: boolean | {
2073
2177
  filter?: boolean;
2178
+ search?: boolean;
2074
2179
  sort?: boolean;
2075
2180
  group?: boolean;
2076
2181
  page?: boolean;
@@ -2088,6 +2193,10 @@ export declare interface GridProps extends KendoReactComponentBaseProps {
2088
2193
  * Sets a set of custom components that the Grid will render instead of the built-in cell.
2089
2194
  */
2090
2195
  cells?: GridCellsSettings;
2196
+ /**
2197
+ * Sets a set of custom components that the Grid will render instead of the built-in row.
2198
+ */
2199
+ rows?: GridRowsSettings;
2091
2200
  /**
2092
2201
  * 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. It takes values of type null, any or [DataResult]({% slug api_kendo-data-query_dataresult%})
2093
2202
  */
@@ -2101,9 +2210,9 @@ export declare interface GridProps extends KendoReactComponentBaseProps {
2101
2210
  */
2102
2211
  clipboard?: ClipboardSettings | boolean;
2103
2212
  /**
2104
- * Fires when clipboard support is enabled and the one of the actions 'copy'. The event accepts type [ClipboardDataEvent]({% slug api_data-tools_clipboarddataevent %}). Only fired when the Grid is run as a client component.
2213
+ * Fires when clipboard support is enabled and the one of the actions 'copy'. The event accepts type [GridClipboardEvent]({% slug api_data-tools_gridclipboardevent %}). Only fired when the Grid is run as a client component.
2105
2214
  */
2106
- onClipboard?: (event: ClipboardDataEvent) => void;
2215
+ onClipboard?: (event: GridClipboardEvent) => void;
2107
2216
  /**
2108
2217
  * 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.
2109
2218
  */
@@ -2112,7 +2221,9 @@ export declare interface GridProps extends KendoReactComponentBaseProps {
2112
2221
  * The ([descriptors]({% slug api_kendo-data-query_sortdescriptor %})) by which the data is sorted. Applies the sorting styles and buttons to the affected columns.
2113
2222
  */
2114
2223
  sort?: SortDescriptor[];
2115
- /** @hidden */
2224
+ /**
2225
+ * The default `sort` state that will be applied to the Grid when using uncontrolled mode.
2226
+ */
2116
2227
  defaultSort?: SortDescriptor[];
2117
2228
  /**
2118
2229
  * Enables the filtering of the columns with their `field` option set ([more information and examples]({% slug filtering_grid %})).
@@ -2122,7 +2233,9 @@ export declare interface GridProps extends KendoReactComponentBaseProps {
2122
2233
  * The [descriptor]({% slug api_kendo-data-query_compositefilterdescriptor %}) 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.
2123
2234
  */
2124
2235
  filter?: CompositeFilterDescriptor;
2125
- /** @hidden */
2236
+ /**
2237
+ * The default `filter` state that will be applied to the Grid when using uncontrolled mode.
2238
+ */
2126
2239
  defaultFilter?: CompositeFilterDescriptor;
2127
2240
  /**
2128
2241
  * The filter operators for the Grid filters.
@@ -2161,7 +2274,9 @@ export declare interface GridProps extends KendoReactComponentBaseProps {
2161
2274
  * ([more information and examples]({% slug groupingbasics_grid %})).
2162
2275
  */
2163
2276
  group?: GroupDescriptor[];
2164
- /** @hidden */
2277
+ /**
2278
+ * The default `group` state that will be applied to the Grid when using uncontrolled mode.
2279
+ */
2165
2280
  defaultGroup?: GroupDescriptor[];
2166
2281
  /**
2167
2282
  * Fires when the grouping of the Grid is changed. You have to handle the event yourself and group the data
@@ -2192,7 +2307,9 @@ export declare interface GridProps extends KendoReactComponentBaseProps {
2192
2307
  * Alias of `pageSize` property. If `take` is set, `pageSize` will be ignored.
2193
2308
  */
2194
2309
  take?: number;
2195
- /** @hidden */
2310
+ /**
2311
+ * The default `take` state that will be applied to the Grid when using uncontrolled mode.
2312
+ */
2196
2313
  defaultTake?: number;
2197
2314
  /**
2198
2315
  * 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.
@@ -2206,36 +2323,60 @@ export declare interface GridProps extends KendoReactComponentBaseProps {
2206
2323
  * Defines the number of records that will be skipped by the pager ([see example]({% slug paging_grid %})). Required by the paging functionality.
2207
2324
  */
2208
2325
  skip?: number;
2209
- /** @hidden */
2326
+ /**
2327
+ * The default `skip` state that will be applied to the Grid when using uncontrolled mode.
2328
+ */
2210
2329
  defaultSkip?: number;
2211
2330
  /**
2212
2331
  * Determines if the scroll position will be updated after data change. If set to `true` the scroll will remain on the same position.
2213
2332
  */
2214
2333
  fixedScroll?: boolean;
2215
- /** @hidden */
2334
+ /**
2335
+ * The [descriptor]({% slug api_data-tools_detailexpanddescriptor %}) by which the detail-row is expanded.
2336
+ */
2216
2337
  detailExpand?: DetailExpandDescriptor;
2217
- /** @hidden */
2338
+ /**
2339
+ * The default `detailExpand` state that will be applied to the Grid when using uncontrolled mode.
2340
+ */
2218
2341
  defaultDetailExpand?: DetailExpandDescriptor;
2219
- /** @hidden */
2220
- /** @hidden */
2342
+ /**
2343
+ * Fires when the user expand or collapse a detail-row.
2344
+ */
2221
2345
  onDetailExpandChange?: (event: GridDetailExpandChangeEvent) => void;
2222
- /** @hidden */
2346
+ /**
2347
+ * The [descriptor]({% slug api_data-tools_groupexpanddescriptor %}) by which the group is expanded.
2348
+ */
2223
2349
  groupExpand?: GroupExpandDescriptor[];
2224
- /** @hidden */
2350
+ /**
2351
+ * The default `groupExpand` state that will be applied to the Grid when using uncontrolled mode.
2352
+ */
2225
2353
  defaultGroupExpand?: GroupExpandDescriptor[];
2226
- /** @hidden */
2354
+ /**
2355
+ * Fires when the user expands or collapse a group.
2356
+ */
2227
2357
  onGroupExpandChange?: (event: GridGroupExpandChangeEvent) => void;
2228
2358
  /**
2229
2359
  * Fires when the user tries to expand or collapse a row.
2360
+ *
2361
+ * @deprecated This prop is deprecated in favor of the [onDetailExpandChange]({% slug api_grid_gridprops %}#toc-ondetailexpandchange) and [onGroupExpandChange]({% slug api_grid_gridprops %}#toc-ongroupexpandchange) props.
2362
+ * We’re removing this prop in version 11.0.0.
2230
2363
  */
2231
2364
  onExpandChange?: (event: GridExpandChangeEvent) => void;
2232
2365
  /**
2233
2366
  * Specifies the name of the field which will provide a Boolean representation of the expanded state of the item ([see example]({% slug detailrow_grid %})).
2367
+ *
2368
+ * @deprecated This prop is deprecated in favor of the ([detailExpand]({% slug api_grid_gridprops %}#toc-detailexpand)) and ([groupExpand]({% slug api_grid_gridprops %}#toc-groupexpand)) props.
2369
+ * We’re removing this prop in version 11.0.0.
2234
2370
  */
2235
2371
  expandField?: string;
2236
- /** @hidden */
2372
+ /**
2373
+ * The [descriptor]({% slug api_data-tools_selectdescriptor %}) by which the selected state of an item is defined.
2374
+ * Passing a boolean value will select the whole row, while passing an array of strings will select individual.
2375
+ */
2237
2376
  select?: SelectDescriptor;
2238
- /** @hidden */
2377
+ /**
2378
+ * The default `select` state that will be applied to the Grid when using uncontrolled mode.
2379
+ */
2239
2380
  defaultSelect?: SelectDescriptor;
2240
2381
  /**
2241
2382
  * The Grid selectable settings.
@@ -2245,6 +2386,9 @@ export declare interface GridProps extends KendoReactComponentBaseProps {
2245
2386
  * Specifies the name of the field which will provide a:
2246
2387
  * - Boolean representation of the selected state of the item ([see example]({% slug selection_grid %})) for row selection
2247
2388
  * - String array of the selected columns of the item for cell selection
2389
+ *
2390
+ * @deprecated This prop is deprecated in favor of the ([select]({% slug api_grid_gridprops %}#toc-select)) prop.
2391
+ * We’re removing this prop in version 11.0.0.
2248
2392
  */
2249
2393
  selectedField?: string;
2250
2394
  /**
@@ -2267,16 +2411,27 @@ export declare interface GridProps extends KendoReactComponentBaseProps {
2267
2411
  * 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 %})).
2268
2412
  */
2269
2413
  onItemChange?: (event: GridItemChangeEvent) => void;
2270
- /** @hidden */
2414
+ /**
2415
+ * The [descriptor]({% slug api_data-tools_editdescriptor %}) by which the in-edit mode of an item is defined.
2416
+ */
2271
2417
  edit?: EditDescriptor;
2272
- /** @hidden */
2418
+ /**
2419
+ * The default `edit` state that will be applied to the Grid when using uncontrolled mode.
2420
+ */
2273
2421
  defaultEdit?: EditDescriptor;
2274
- /** @hidden */
2422
+ /**
2423
+ * The Grid editable settings.
2424
+ */
2275
2425
  editable?: boolean | GridEditableSettings;
2276
- /** @hidden */
2426
+ /**
2427
+ * Fires when the user enters or exits an in-edit mode of a row or cell.
2428
+ */
2277
2429
  onEditChange?: (event: GridEditChangeEvent) => void;
2278
2430
  /**
2279
2431
  * 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 %})).
2432
+ *
2433
+ * @deprecated This prop is deprecated in favor of the ([edit]({% slug api_grid_gridprops %}#toc-edit)) prop.
2434
+ * We’re removing this prop in version 11.0.0.
2280
2435
  */
2281
2436
  editField?: string;
2282
2437
  /**
@@ -2300,6 +2455,22 @@ export declare interface GridProps extends KendoReactComponentBaseProps {
2300
2455
  * 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`.
2301
2456
  */
2302
2457
  detail?: null | ComponentType<GridDetailRowProps>;
2458
+ /**
2459
+ * The [descriptor]({% slug api_kendo-data-query_compositefilterdescriptor %}) by which the data is searched. Its first FilterDescriptor populates the GridSearchBox.
2460
+ */
2461
+ search?: CompositeFilterDescriptor;
2462
+ /**
2463
+ * The [descriptor]({% slug api_kendo-data-query_compositefilterdescriptor %}) by which the data is searched by default. Its first FilterDescriptor populates the GridSearchBox.
2464
+ */
2465
+ defaultSearch?: CompositeFilterDescriptor;
2466
+ /**
2467
+ * Defines the fields of the data that are filtered by the GridSearchBox.
2468
+ */
2469
+ searchFields?: (string | SearchField)[];
2470
+ /**
2471
+ * Fires when the search value of the GridSearchBox is changed.
2472
+ */
2473
+ onSearchChange?: (event: GridSearchChangeEvent) => void;
2303
2474
  /**
2304
2475
  * Represents the `style` HTML attribute.
2305
2476
  */
@@ -2336,18 +2507,26 @@ export declare interface GridProps extends KendoReactComponentBaseProps {
2336
2507
  onColumnReorder?: (event: GridColumnReorderEvent) => void;
2337
2508
  /**
2338
2509
  * Fires when a row is about to be rendered. Overrides the default appearance of the row.
2510
+ *
2511
+ * @deprecated This prop is deprecated in favor of the ([rows]({% slug api_grid_gridprops %}#toc-rows)) prop. We’re removing this prop in version 11.0.0.
2339
2512
  */
2340
2513
  rowRender?: (row: React.ReactElement<HTMLTableRowElement>, props: GridRowProps) => React.ReactNode;
2341
2514
  /**
2342
2515
  * Fires when a cell is about to be rendered. Used to override the default appearance of the cell ([see example]({% slug groupingaggregates_grid %})).
2516
+ *
2517
+ * @deprecated This prop is deprecated in favor of the ([cells]({% slug api_grid_gridprops %}#toc-cells)) prop. We’re removing this prop in version 11.0.0.
2343
2518
  */
2344
2519
  cellRender?: (defaultRendering: React.ReactElement<HTMLTableCellElement> | null, props: GridCellProps) => React.ReactElement<HTMLTableCellElement> | React.ReactElement<HTMLTableCellElement>[] | null;
2345
2520
  /**
2346
2521
  * Fires when a filter cell is about to be rendered. Overrides the default appearance of the filter cell.
2522
+ *
2523
+ * @deprecated This prop is deprecated in favor of the ([cells]({% slug api_grid_gridprops %}#toc-cells)) prop. We’re removing this prop in version 11.0.0.
2347
2524
  */
2348
2525
  filterCellRender?: (defaultRendering: React.ReactElement<any> | null, props: GridFilterCellProps) => React.ReactElement<any> | null;
2349
2526
  /**
2350
2527
  * Fires when a header cell is about to be rendered. Overrides the default appearance of the header cell.
2528
+ *
2529
+ * @deprecated This prop is deprecated in favor of the ([cells]({% slug api_grid_gridprops %}#toc-cells)) prop. We’re removing this prop in version 11.0.0.
2351
2530
  */
2352
2531
  headerCellRender?: (defaultRendering: React.ReactNode | null, props: GridHeaderCellProps) => React.ReactNode;
2353
2532
  /**
@@ -2412,6 +2591,22 @@ export declare interface GridProps extends KendoReactComponentBaseProps {
2412
2591
  * @hidden
2413
2592
  */
2414
2593
  unstyled?: GridClassStructure;
2594
+ /**
2595
+ * @hidden
2596
+ */
2597
+ rowSpannable?: boolean | GridRowSpannableSettings;
2598
+ /**
2599
+ * @hidden
2600
+ */
2601
+ columnsState?: GridColumnState[];
2602
+ /**
2603
+ * @hidden
2604
+ */
2605
+ defaultColumnsState?: GridColumnState[];
2606
+ /**
2607
+ * Fires when the columns state of the Grid is changed.
2608
+ */
2609
+ onColumnsStateChange?: (event: GridColumnsStateChangeEvent) => void;
2415
2610
  }
2416
2611
 
2417
2612
  /**
@@ -2488,6 +2683,10 @@ export declare interface GridRowProps extends KendoReactComponentBaseProps {
2488
2683
  * A function for overriding the default rendering of the row.
2489
2684
  */
2490
2685
  render?: (row: React.ReactElement<HTMLTableRowElement>, props: GridRowProps) => React.ReactNode;
2686
+ /**
2687
+ * Sets a set of rows components that the Grid will render instead of the built-in row.
2688
+ */
2689
+ rows?: GridRowsSettings;
2491
2690
  /**
2492
2691
  * The index to be applied to the `aria-rowindex` attribute.
2493
2692
  */
@@ -2559,6 +2758,42 @@ export declare type GridRowReorderSettings = {
2559
2758
  dragClue?: string | ((dataItem: any) => React.ReactNode);
2560
2759
  };
2561
2760
 
2761
+ /**
2762
+ * Represents the settings for the row-spanning functionality of the Grid.
2763
+ *
2764
+ * @example
2765
+ *
2766
+ * ```tsx
2767
+ * <Grid
2768
+ * data={data}
2769
+ * rowSpannable={{
2770
+ * enabled: true,
2771
+ * valueGetter: (dataItem, field) => `${dataItem['id']} - ${dataItem[field]}`,
2772
+ * }}
2773
+ * />
2774
+ * ```
2775
+ */
2776
+ export declare type GridRowSpannableSettings = {
2777
+ /**
2778
+ * Determines if the row-spanning functionality is enabled or disabled
2779
+ */
2780
+ enabled?: boolean;
2781
+ /**
2782
+ * A function that returns the value of the cell that should span the row.
2783
+ * The value could be combined from multiple fields of the dataItem to create a unique identifier and prevent the cell from being row-spanned.
2784
+ */
2785
+ valueGetter?: (dataItem: any, field: string) => any;
2786
+ };
2787
+
2788
+ /**
2789
+ * The settings of the rows prop options.
2790
+ */
2791
+ export declare interface GridRowsSettings {
2792
+ groupHeader?: ComponentType<GridCustomRowProps>;
2793
+ data?: ComponentType<GridCustomRowProps>;
2794
+ groupFooter?: ComponentType<GridCustomRowProps>;
2795
+ }
2796
+
2562
2797
  /**
2563
2798
  * The type of the GridRow component.
2564
2799
  *
@@ -2569,6 +2804,28 @@ export declare type GridRowReorderSettings = {
2569
2804
  */
2570
2805
  export declare type GridRowType = 'groupFooter' | 'groupHeader' | 'data';
2571
2806
 
2807
+ /**
2808
+ * Represents the properties of the KendoReact GridSearchBox component.
2809
+ */
2810
+ export declare const GridSearchBox: (props: GridSearchBoxProps) => JSX_2.Element;
2811
+
2812
+ export declare interface GridSearchBoxChangeEvent extends TextBoxChangeEvent {
2813
+ }
2814
+
2815
+ export declare interface GridSearchBoxProps extends TextBoxProps {
2816
+ onChange?: (event: GridSearchBoxChangeEvent) => void;
2817
+ }
2818
+
2819
+ /**
2820
+ * Represents the object of the `onSearchChange` Grid event.
2821
+ */
2822
+ export declare interface GridSearchChangeEvent extends GridEvent {
2823
+ /**
2824
+ * The new search based on the user action.
2825
+ */
2826
+ search: CompositeFilterDescriptor;
2827
+ }
2828
+
2572
2829
  /**
2573
2830
  * Represents the available selection modes.
2574
2831
  */
@@ -2718,8 +2975,6 @@ export declare interface GridToolbarProps {
2718
2975
  ariaControls?: string;
2719
2976
  }
2720
2977
 
2721
- export { GroupExpandDescriptor }
2722
-
2723
2978
  /**
2724
2979
  * @hidden
2725
2980
  */
@@ -2796,8 +3051,6 @@ export declare const rootFilterOrDefault: (rootFilter: CompositeFilterDescriptor
2796
3051
 
2797
3052
  declare type ScrollMode = 'none' | 'scrollable' | 'virtual';
2798
3053
 
2799
- export { SelectDescriptor }
2800
-
2801
3054
  /**
2802
3055
  * Represents a server counterpart of every Grid event. It strips out all arguments from the event that are not serializable to the server.
2803
3056
  */
package/index.js CHANGED
@@ -5,4 +5,4 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const G=require("./Grid.js"),C=require("./GridColumn.js"),a=require("./columnMenu/GridColumnMenuWrapper.js"),m=require("./columnMenu/GridColumnMenuGroup.js"),l=require("./columnMenu/GridColumnMenuSort.js"),t=require("./columnMenu/GridColumnMenuFilter.js"),s=require("./columnMenu/GridColumnMenuFilterUI.js"),c=require("./columnMenu/GridColumnMenuFilterCell.js"),M=require("./columnMenu/GridColumnMenuCheckboxFilter.js"),g=require("./columnMenu/GridColumnMenuColumnsList.js"),p=require("./cells/GridCell.js"),I=require("./cells/GridEditCell.js"),q=require("./cells/GridGroupCell.js"),S=require("./cells/GridHierarchyCell.js"),F=require("./cells/GridFilterCell.js"),D=require("./header/GridHeaderCell.js"),E=require("./cells/GridSelectionCell.js"),R=require("./rows/GridDetailRow.js"),T=require("./rows/GridRow.js"),P=require("./GridToolbar.js"),_=require("./components/noRecords/GridNoRecords.js"),N=require("./columnMenu/GridColumnMenuItem.js"),b=require("./columnMenu/GridColumnMenuItemContent.js"),x=require("./columnMenu/GridColumnMenuItemGroup.js"),o=require("./constants/index.js"),i=require("@progress/kendo-react-data-tools"),h=require("./drag/CommonDragLogic.js"),r=require("./filterCommon.js"),e=require("./messages/index.js"),n=require("./StatusBar.js"),u=require("./contextMenu/GridContextMenu.js"),d=require("./contextMenu/enums.js");exports.Grid=G.Grid;exports.GridColumn=C.GridColumn;exports.GridColumnMenuWrapper=a.GridColumnMenuWrapper;exports.GridColumnMenuGroup=m.GridColumnMenuGroup;exports.GridColumnMenuSort=l.GridColumnMenuSort;exports.isColumnMenuSortActive=l.isColumnMenuSortActive;exports.GridColumnMenuFilter=t.GridColumnMenuFilter;exports.filterGroupByField=t.filterGroupByField;exports.isColumnMenuFilterActive=t.isColumnMenuFilterActive;exports.rootFilterOrDefault=t.rootFilterOrDefault;exports.GridColumnMenuFilterUI=s.GridColumnMenuFilterUI;exports.GridColumnMenuFilterCell=c.GridColumnMenuFilterCell;exports.GridColumnMenuCheckboxFilter=M.GridColumnMenuCheckboxFilter;exports.GridColumnMenuColumnsList=g.GridColumnMenuColumnsList;exports.GridCell=p.GridCell;exports.GridEditCell=I.GridEditCell;exports.GridGroupCell=q.GridGroupCell;exports.GridHierarchyCell=S.GridHierarchyCell;exports.GridFilterCell=F.GridFilterCell;exports.GridHeaderCell=D.GridHeaderCell;exports.GridSelectionCell=E.GridSelectionCell;exports.GridDetailRow=R.GridDetailRow;exports.GridRow=T.GridRow;exports.GridToolbar=P.GridToolbar;exports.GridNoRecords=_.GridNoRecords;exports.GridColumnMenuItem=N.GridColumnMenuItem;exports.GridColumnMenuItemContent=b.GridColumnMenuItemContent;exports.GridColumnMenuItemGroup=x.GridColumnMenuItemGroup;exports.GRID_COL_INDEX_ATTRIBUTE=o.GRID_COL_INDEX_ATTRIBUTE;exports.GRID_PREVENT_SELECTION_ELEMENT=o.GRID_PREVENT_SELECTION_ELEMENT;exports.GRID_ROW_INDEX_ATTRIBUTE=o.GRID_ROW_INDEX_ATTRIBUTE;Object.defineProperty(exports,"getSelectedState",{enumerable:!0,get:()=>i.getSelectedState});Object.defineProperty(exports,"getSelectedStateFromKeyDown",{enumerable:!0,get:()=>i.getSelectedStateFromKeyDown});Object.defineProperty(exports,"setSelectedState",{enumerable:!0,get:()=>i.setSelectedState});exports.GridCommonDragLogic=h.CommonDragLogic;exports.booleanFilterValues=r.booleanFilterValues;exports.cellBoolDropdownChange=r.cellBoolDropdownChange;exports.cellInputChange=r.cellInputChange;exports.cellOperatorChange=r.cellOperatorChange;exports.operators=r.operators;exports.gridMessages=e.messages;exports.pagerFirstPage=e.pagerFirstPage;exports.pagerInfo=e.pagerInfo;exports.pagerItemPerPage=e.pagerItemPerPage;exports.pagerLastPage=e.pagerLastPage;exports.pagerNextPage=e.pagerNextPage;exports.pagerPreviousPage=e.pagerPreviousPage;exports.StatusBar=n.StatusBar;exports.getStatusData=n.getStatusData;exports.leafColumns=n.leafColumns;exports.GridContextMenu=u.GridContextMenu;exports.contextMenuItemsMap=u.contextMenuItemsMap;exports.GridContextMenuAnchorPart=d.GridContextMenuAnchorPart;exports.GridContextMenuItemNames=d.GridContextMenuItemNames;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("./Grid.js"),G=require("./GridColumn.js"),a=require("./columnMenu/GridColumnMenuWrapper.js"),s=require("./columnMenu/GridColumnMenuGroup.js"),l=require("./columnMenu/GridColumnMenuSort.js"),o=require("./columnMenu/GridColumnMenuFilter.js"),m=require("./columnMenu/GridColumnMenuFilterUI.js"),c=require("./columnMenu/GridColumnMenuFilterCell.js"),M=require("./columnMenu/GridColumnMenuCheckboxFilter.js"),g=require("./columnMenu/GridColumnMenuColumnsList.js"),p=require("./columnMenu/GridColumnMenuColumnsChooser.js"),I=require("./cells/GridCell.js"),q=require("./cells/GridEditCell.js"),S=require("./cells/GridGroupCell.js"),F=require("./cells/GridHierarchyCell.js"),D=require("./cells/GridFilterCell.js"),E=require("./header/GridHeaderCell.js"),R=require("./cells/GridSelectionCell.js"),T=require("./rows/GridDetailRow.js"),P=require("./rows/GridRow.js"),h=require("./GridToolbar.js"),x=require("./components/noRecords/GridNoRecords.js"),_=require("./columnMenu/GridColumnMenuItem.js"),N=require("./columnMenu/GridColumnMenuItemContent.js"),b=require("./columnMenu/GridColumnMenuItemGroup.js"),t=require("./constants/index.js"),n=require("@progress/kendo-react-data-tools"),B=require("./drag/CommonDragLogic.js"),r=require("./filterCommon.js"),e=require("./messages/index.js"),i=require("./StatusBar.js"),u=require("./contextMenu/GridContextMenu.js"),d=require("./contextMenu/enums.js"),L=require("./GridSearchBox.js");exports.Grid=C.Grid;exports.GridColumn=G.GridColumn;exports.GridColumnMenuWrapper=a.GridColumnMenuWrapper;exports.GridColumnMenuGroup=s.GridColumnMenuGroup;exports.GridColumnMenuSort=l.GridColumnMenuSort;exports.isColumnMenuSortActive=l.isColumnMenuSortActive;exports.GridColumnMenuFilter=o.GridColumnMenuFilter;exports.filterGroupByField=o.filterGroupByField;exports.isColumnMenuFilterActive=o.isColumnMenuFilterActive;exports.rootFilterOrDefault=o.rootFilterOrDefault;exports.GridColumnMenuFilterUI=m.GridColumnMenuFilterUI;exports.GridColumnMenuFilterCell=c.GridColumnMenuFilterCell;exports.GridColumnMenuCheckboxFilter=M.GridColumnMenuCheckboxFilter;exports.GridColumnMenuColumnsList=g.GridColumnMenuColumnsList;exports.GridColumnMenuColumnsChooser=p.GridColumnMenuColumnsChooser;exports.GridCell=I.GridCell;exports.GridEditCell=q.GridEditCell;exports.GridGroupCell=S.GridGroupCell;exports.GridHierarchyCell=F.GridHierarchyCell;exports.GridFilterCell=D.GridFilterCell;exports.GridHeaderCell=E.GridHeaderCell;exports.GridSelectionCell=R.GridSelectionCell;exports.GridDetailRow=T.GridDetailRow;exports.GridRow=P.GridRow;exports.GridToolbar=h.GridToolbar;exports.GridNoRecords=x.GridNoRecords;exports.GridColumnMenuItem=_.GridColumnMenuItem;exports.GridColumnMenuItemContent=N.GridColumnMenuItemContent;exports.GridColumnMenuItemGroup=b.GridColumnMenuItemGroup;exports.GRID_COL_INDEX_ATTRIBUTE=t.GRID_COL_INDEX_ATTRIBUTE;exports.GRID_PREVENT_SELECTION_ELEMENT=t.GRID_PREVENT_SELECTION_ELEMENT;exports.GRID_ROW_INDEX_ATTRIBUTE=t.GRID_ROW_INDEX_ATTRIBUTE;Object.defineProperty(exports,"getSelectedState",{enumerable:!0,get:()=>n.getSelectedState});Object.defineProperty(exports,"getSelectedStateFromKeyDown",{enumerable:!0,get:()=>n.getSelectedStateFromKeyDown});Object.defineProperty(exports,"setSelectedState",{enumerable:!0,get:()=>n.setSelectedState});exports.GridCommonDragLogic=B.CommonDragLogic;exports.booleanFilterValues=r.booleanFilterValues;exports.cellBoolDropdownChange=r.cellBoolDropdownChange;exports.cellInputChange=r.cellInputChange;exports.cellOperatorChange=r.cellOperatorChange;exports.operators=r.operators;exports.gridMessages=e.messages;exports.pagerFirstPage=e.pagerFirstPage;exports.pagerInfo=e.pagerInfo;exports.pagerItemPerPage=e.pagerItemPerPage;exports.pagerLastPage=e.pagerLastPage;exports.pagerNextPage=e.pagerNextPage;exports.pagerPreviousPage=e.pagerPreviousPage;exports.StatusBar=i.StatusBar;exports.getStatusData=i.getStatusData;exports.leafColumns=i.leafColumns;exports.GridContextMenu=u.GridContextMenu;exports.contextMenuItemsMap=u.contextMenuItemsMap;exports.GridContextMenuAnchorPart=d.GridContextMenuAnchorPart;exports.GridContextMenuItemNames=d.GridContextMenuItemNames;exports.GridSearchBox=L.GridSearchBox;