@progress/kendo-react-treelist 13.3.0-develop.9 → 13.4.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.
- package/ScrollMode.d.ts +8 -0
- package/TreeList.d.ts +145 -0
- package/TreeList.js +1 -1
- package/TreeList.mjs +11 -11
- package/TreeListNoRecords.d.ts +19 -0
- package/TreeListToolbar.d.ts +29 -0
- package/cells/EditCells/TreeListBooleanEditor.d.ts +15 -0
- package/cells/EditCells/TreeListBooleanEditor.js +1 -1
- package/cells/EditCells/TreeListBooleanEditor.mjs +11 -11
- package/cells/EditCells/TreeListDateEditor.d.ts +15 -0
- package/cells/EditCells/TreeListNumericEditor.d.ts +15 -0
- package/cells/EditCells/TreeListTextEditor.d.ts +15 -0
- package/cells/FilterCells/TreeListBooleanFilter.d.ts +17 -0
- package/cells/FilterCells/TreeListDateFilter.d.ts +17 -0
- package/cells/FilterCells/TreeListNumericFilter.d.ts +17 -0
- package/cells/FilterCells/TreeListTextFilter.d.ts +17 -0
- package/cells/FilterCells/utils.d.ts +45 -0
- package/cells/FilterCells/utils.mjs +3 -3
- package/cells/TreeListCell.d.ts +13 -0
- package/cells/TreeListSelectionCell.d.ts +15 -0
- package/cells/TreeListSelectionCell.js +1 -1
- package/cells/TreeListSelectionCell.mjs +1 -1
- package/codemods/utils.js +1 -8
- package/codemods/v11/toolbar-handle.js +1 -8
- package/constants/index.d.ts +13 -0
- package/constants/index.mjs +2 -2
- package/dist/cdn/js/kendo-react-treelist.js +1 -1
- package/header/TreeListHeaderCell.d.ts +10 -0
- package/header/TreeListHeaderSelectionCell.d.ts +18 -0
- package/index.d.mts +33 -1192
- package/index.d.ts +33 -1192
- package/interfaces/DataItemWrapper.d.ts +17 -0
- package/interfaces/TreeListCellProps.d.ts +48 -0
- package/interfaces/TreeListColumnProps.d.ts +48 -0
- package/interfaces/TreeListFilterCellProps.d.ts +13 -0
- package/interfaces/TreeListFilterOperator.d.ts +13 -0
- package/interfaces/TreeListHeaderCellProps.d.ts +13 -0
- package/interfaces/TreeListNoRecordsProps.d.ts +16 -0
- package/interfaces/TreeListProps.d.ts +285 -0
- package/interfaces/TreeListRowProps.d.ts +99 -0
- package/interfaces/TreeListSelectableSettings.d.ts +25 -0
- package/interfaces/TreeListSortSettings.d.ts +16 -0
- package/interfaces/TreeListToolbarProps.d.ts +17 -0
- package/interfaces/events.d.ts +272 -0
- package/messages/index.d.ts +127 -0
- package/package-metadata.d.ts +12 -0
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +10 -16
- package/package.json +9 -9
- package/rows/TreeListDraggableRow.d.ts +39 -0
- package/rows/TreeListDraggableRow.js +1 -1
- package/rows/TreeListDraggableRow.mjs +5 -5
- package/rows/TreeListRow.d.ts +13 -0
- package/utils/index.d.ts +24 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* @hidden
|
|
10
|
+
*/
|
|
11
|
+
export interface DataItemWrapper {
|
|
12
|
+
dataItem: any;
|
|
13
|
+
level: number[];
|
|
14
|
+
height: number;
|
|
15
|
+
offsetTop: number;
|
|
16
|
+
levelCount: number;
|
|
17
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { CellProps } from '@progress/kendo-react-data-tools';
|
|
9
|
+
/**
|
|
10
|
+
* Represents the props of the TreeListCell component.
|
|
11
|
+
*/
|
|
12
|
+
export interface TreeListCellProps extends Omit<CellProps, 'onExpandChange' | 'render' | 'onChange'> {
|
|
13
|
+
/**
|
|
14
|
+
* An array of indexes of each parent and current item in the data tree.
|
|
15
|
+
*/
|
|
16
|
+
level: number[];
|
|
17
|
+
/**
|
|
18
|
+
* Indicates that the data item of the cell has subitems.
|
|
19
|
+
*/
|
|
20
|
+
hasChildren?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* If set to `true`, the cell will render indentation based on its level prop and
|
|
23
|
+
* the icons that are used for expanding and collapsing child rows.
|
|
24
|
+
*/
|
|
25
|
+
expandable?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* The index of the column. Useful for applying `aria-colindex` accessibility attribute.
|
|
28
|
+
*/
|
|
29
|
+
colIndex: number;
|
|
30
|
+
/**
|
|
31
|
+
* The event that is fired when the expand or collapse icon of the cell is clicked.
|
|
32
|
+
*/
|
|
33
|
+
onExpandChange: (event: React.MouseEvent<HTMLSpanElement>, dataItem: any, level: number[]) => void;
|
|
34
|
+
/**
|
|
35
|
+
* A function for overriding the default rendering of the cell.
|
|
36
|
+
*/
|
|
37
|
+
render?: (defaultRendering: React.ReactElement<HTMLTableCellElement> | null, props: TreeListCellProps) => React.ReactElement<HTMLTableCellElement> | null;
|
|
38
|
+
/**
|
|
39
|
+
* The event that is fired when the cell value is changed.
|
|
40
|
+
*/
|
|
41
|
+
onChange?: (event: {
|
|
42
|
+
dataItem: any;
|
|
43
|
+
level: number[];
|
|
44
|
+
syntheticEvent: React.SyntheticEvent<any>;
|
|
45
|
+
field?: string;
|
|
46
|
+
value?: any;
|
|
47
|
+
}) => void;
|
|
48
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { ComponentType } from 'react';
|
|
9
|
+
import { TreeColumnBaseProps } from '@progress/kendo-react-data-tools';
|
|
10
|
+
import { TreeListCellProps } from './TreeListCellProps.js';
|
|
11
|
+
import { TreeListHeaderCellProps } from './TreeListHeaderCellProps.js';
|
|
12
|
+
import { TreeListFilterCellProps } from './TreeListFilterCellProps.js';
|
|
13
|
+
/**
|
|
14
|
+
* The props of the columns of the TreeList component.
|
|
15
|
+
*/
|
|
16
|
+
export interface TreeListColumnProps extends Omit<TreeColumnBaseProps, 'children' | 'cell' | 'editCell' | 'disableReorder'> {
|
|
17
|
+
/**
|
|
18
|
+
* Defines the component that will be rendered as a cell. If not set, a `TreeListCell` will be rendered by default.
|
|
19
|
+
*/
|
|
20
|
+
cell?: ComponentType<TreeListCellProps>;
|
|
21
|
+
/**
|
|
22
|
+
* Defines the component that will be rendered as an edit cell.
|
|
23
|
+
*/
|
|
24
|
+
editCell?: ComponentType<TreeListCellProps>;
|
|
25
|
+
/**
|
|
26
|
+
* Defines the component that will be rendered as a header cell.
|
|
27
|
+
* If not set, a `TreeListHeaderCell` will be rendered by default.
|
|
28
|
+
*/
|
|
29
|
+
headerCell?: ComponentType<TreeListHeaderCellProps>;
|
|
30
|
+
/**
|
|
31
|
+
* **Deprecated**. Use `filterCell` prop instead.
|
|
32
|
+
*/
|
|
33
|
+
filter?: ComponentType<TreeListFilterCellProps>;
|
|
34
|
+
/**
|
|
35
|
+
* Defines the component that will be rendered as a filter cell.
|
|
36
|
+
*/
|
|
37
|
+
filterCell?: ComponentType<TreeListFilterCellProps>;
|
|
38
|
+
/**
|
|
39
|
+
* A collection of child columns.
|
|
40
|
+
*/
|
|
41
|
+
children?: TreeListColumnProps[];
|
|
42
|
+
/**
|
|
43
|
+
* Defines if the column is locked (frozen or sticky).
|
|
44
|
+
* Locked columns are the columns that are visible at all times while the user scrolls the component horizontally.
|
|
45
|
+
* Defaults to `false`.
|
|
46
|
+
*/
|
|
47
|
+
locked?: boolean;
|
|
48
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { FilterCellProps } from '@progress/kendo-react-data-tools';
|
|
9
|
+
/**
|
|
10
|
+
* @hidden
|
|
11
|
+
*/
|
|
12
|
+
export interface TreeListFilterCellProps extends FilterCellProps {
|
|
13
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { FilterOperator } from '@progress/kendo-react-data-tools';
|
|
9
|
+
/**
|
|
10
|
+
* The filter operator for the TreeList filters.
|
|
11
|
+
*/
|
|
12
|
+
export interface TreeListFilterOperator extends FilterOperator {
|
|
13
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { HeaderCellProps } from '@progress/kendo-react-data-tools';
|
|
9
|
+
/**
|
|
10
|
+
* The props of the TreeListHeaderCell component.
|
|
11
|
+
*/
|
|
12
|
+
export interface TreeListHeaderCellProps extends HeaderCellProps {
|
|
13
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* The props of the TreeListNoRecords component.
|
|
10
|
+
*/
|
|
11
|
+
export interface TreeListNoRecordsProps {
|
|
12
|
+
/**
|
|
13
|
+
* The React elements which will be rendered inside the TreeList when no records are available.
|
|
14
|
+
*/
|
|
15
|
+
children?: React.ReactNode;
|
|
16
|
+
}
|
|
@@ -0,0 +1,285 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { SortDescriptor, FilterDescriptor, CompositeFilterDescriptor } from '@progress/kendo-data-query';
|
|
9
|
+
import { TreeListSortChangeEvent, TreeListFilterChangeEvent, TreeListExpandChangeEvent, TreeListSelectionChangeEvent, TreeListHeaderSelectionChangeEvent, TreeListItemChangeEvent, TreeListDataStateChangeEvent, TreeListRowClickEvent, TreeListColumnResizeEvent, TreeListColumnReorderEvent, TreeListPageChangeEvent, TreeListRowDragEvent, TreeListColumnMenuFilterChangeEvent, TreeListRowDoubleClickEvent, TreeListRowContextMenuEvent, TreeListKeyDownEvent } from './events.js';
|
|
10
|
+
import { ScrollMode } from '../ScrollMode.js';
|
|
11
|
+
import { TreeListCellProps } from './TreeListCellProps.js';
|
|
12
|
+
import { SortSettings as TreeListSortSettings, FilterRowProps } from '@progress/kendo-react-data-tools';
|
|
13
|
+
import { TreeListRowProps } from './TreeListRowProps.js';
|
|
14
|
+
import { TreeListHeaderCellProps } from './TreeListHeaderCellProps.js';
|
|
15
|
+
import { TreeListColumnProps } from './TreeListColumnProps.js';
|
|
16
|
+
import { TreeListToolbarProps } from './TreeListToolbarProps.js';
|
|
17
|
+
import { TreeListNoRecordsProps } from './TreeListNoRecordsProps.js';
|
|
18
|
+
import { TreeListSelectableSettings } from './TreeListSelectableSettings.js';
|
|
19
|
+
/**
|
|
20
|
+
* Represents the props of the [KendoReact TreeList component](https://www.telerik.com/kendo-react-ui/components/treelist/get-started).
|
|
21
|
+
*/
|
|
22
|
+
export interface TreeListProps {
|
|
23
|
+
/**
|
|
24
|
+
* Sets the unique key for each row in the TreeList. If not set, the row index is used.
|
|
25
|
+
*
|
|
26
|
+
* Example:
|
|
27
|
+
* ```jsx
|
|
28
|
+
* <TreeList dataItemKey="id" />
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
dataItemKey?: string;
|
|
32
|
+
/**
|
|
33
|
+
* Adds custom CSS classes to the TreeList container element.
|
|
34
|
+
*
|
|
35
|
+
* Example:
|
|
36
|
+
* ```jsx
|
|
37
|
+
* <TreeList className="custom-treelist-class" />
|
|
38
|
+
* ```
|
|
39
|
+
*/
|
|
40
|
+
className?: string;
|
|
41
|
+
/**
|
|
42
|
+
* Specifies the `id` attribute of the TreeList container element.
|
|
43
|
+
*
|
|
44
|
+
* Example:
|
|
45
|
+
* ```jsx
|
|
46
|
+
* <TreeList id="treelist-component" />
|
|
47
|
+
* ```
|
|
48
|
+
*/
|
|
49
|
+
id?: string;
|
|
50
|
+
/**
|
|
51
|
+
* Defines the columns of the TreeList using an array of `TreeListColumnProps`.
|
|
52
|
+
*
|
|
53
|
+
* Example:
|
|
54
|
+
* ```jsx
|
|
55
|
+
* <TreeList columns={[{ field: 'name', title: 'Name' }]} />
|
|
56
|
+
* ```
|
|
57
|
+
*/
|
|
58
|
+
columns?: TreeListColumnProps[];
|
|
59
|
+
/**
|
|
60
|
+
* Enables column virtualization to improve performance by rendering only visible columns.
|
|
61
|
+
*
|
|
62
|
+
* Example:
|
|
63
|
+
* ```jsx
|
|
64
|
+
* <TreeList columnVirtualization={true} />
|
|
65
|
+
* ```
|
|
66
|
+
*/
|
|
67
|
+
columnVirtualization?: boolean;
|
|
68
|
+
/**
|
|
69
|
+
* Provides the data to be displayed in the TreeList.
|
|
70
|
+
*
|
|
71
|
+
* Example:
|
|
72
|
+
* ```jsx
|
|
73
|
+
* <TreeList data={[{ id: 1, name: 'Item 1' }]} />
|
|
74
|
+
* ```
|
|
75
|
+
*/
|
|
76
|
+
data?: any[];
|
|
77
|
+
/**
|
|
78
|
+
* Enables sorting functionality for the TreeList.
|
|
79
|
+
*
|
|
80
|
+
* Example:
|
|
81
|
+
* ```jsx
|
|
82
|
+
* <TreeList sortable={{ mode: 'single', allowUnsort: true }} />
|
|
83
|
+
* ```
|
|
84
|
+
*/
|
|
85
|
+
sortable?: TreeListSortSettings;
|
|
86
|
+
/**
|
|
87
|
+
* Triggered when the sorting state changes. The event must be handled to apply sorting.
|
|
88
|
+
*
|
|
89
|
+
* Example:
|
|
90
|
+
* ```jsx
|
|
91
|
+
* <TreeList onSortChange={(event) => console.log(event.sort)} />
|
|
92
|
+
* ```
|
|
93
|
+
*/
|
|
94
|
+
onSortChange?: (event: TreeListSortChangeEvent) => void;
|
|
95
|
+
/**
|
|
96
|
+
* Specifies the current sorting descriptors for the TreeList.
|
|
97
|
+
*
|
|
98
|
+
* Example:
|
|
99
|
+
* ```jsx
|
|
100
|
+
* <TreeList sort={[{ field: 'name', dir: 'asc' }]} />
|
|
101
|
+
* ```
|
|
102
|
+
*/
|
|
103
|
+
sort?: SortDescriptor[];
|
|
104
|
+
/**
|
|
105
|
+
* If set, it will be rendered instead of the default `FilterRow` TreeList component.
|
|
106
|
+
*/
|
|
107
|
+
filterRow?: React.ComponentType<FilterRowProps>;
|
|
108
|
+
/**
|
|
109
|
+
* If set and when the data item is in edit mode, the `editRow` value will be rendered.
|
|
110
|
+
*/
|
|
111
|
+
editRow?: React.ComponentType<TreeListRowProps>;
|
|
112
|
+
/**
|
|
113
|
+
* Represents the TreeList toolbar component.
|
|
114
|
+
*/
|
|
115
|
+
toolbar?: React.ReactElement<TreeListToolbarProps>;
|
|
116
|
+
/**
|
|
117
|
+
* Represents the component that will be rendered when the `data` property of the TreeList is empty or undefined.
|
|
118
|
+
*/
|
|
119
|
+
noRecords?: React.ReactElement<TreeListNoRecordsProps>;
|
|
120
|
+
/**
|
|
121
|
+
* Specifies the current filter descriptors for the TreeList.
|
|
122
|
+
*/
|
|
123
|
+
filter?: FilterDescriptor[];
|
|
124
|
+
/**
|
|
125
|
+
* Triggered when the filter state changes. The event must be handled to apply filtering.
|
|
126
|
+
*/
|
|
127
|
+
onFilterChange?: (event: TreeListFilterChangeEvent) => void;
|
|
128
|
+
/**
|
|
129
|
+
* Triggered when the user clicks on the expand or collapse icon of a row.
|
|
130
|
+
*/
|
|
131
|
+
onExpandChange?: (event: TreeListExpandChangeEvent) => void;
|
|
132
|
+
/**
|
|
133
|
+
* Specifies the name of the field which will provide a Boolean representation of the expanded state of the item.
|
|
134
|
+
*/
|
|
135
|
+
expandField?: string;
|
|
136
|
+
/**
|
|
137
|
+
* Specifies the name of the field which will provide an array representation of the item subitems.
|
|
138
|
+
*/
|
|
139
|
+
subItemsField?: string;
|
|
140
|
+
/**
|
|
141
|
+
* Configures the selection settings for the TreeList.
|
|
142
|
+
*/
|
|
143
|
+
selectable?: TreeListSelectableSettings;
|
|
144
|
+
/**
|
|
145
|
+
* Specifies the name of the field which will provide a Boolean representation of the selected state of the item.
|
|
146
|
+
*/
|
|
147
|
+
selectedField?: string;
|
|
148
|
+
/**
|
|
149
|
+
* Triggered when the user selects or deselects a row or cell.
|
|
150
|
+
*/
|
|
151
|
+
onSelectionChange?: (event: TreeListSelectionChangeEvent) => void;
|
|
152
|
+
/**
|
|
153
|
+
* Triggered when the user presses a keyboard key.
|
|
154
|
+
*/
|
|
155
|
+
onKeyDown?: (event: TreeListKeyDownEvent) => void;
|
|
156
|
+
/**
|
|
157
|
+
* Triggered when the user clicks the checkbox of a column header whose `field` matches `selectedField`.
|
|
158
|
+
*/
|
|
159
|
+
onHeaderSelectionChange?: (event: TreeListHeaderSelectionChangeEvent) => void;
|
|
160
|
+
/**
|
|
161
|
+
* Triggered when the user changes the values of the item.
|
|
162
|
+
* The event is not debounced and fires on every `onChange` event of the input in the current `EditCell`.
|
|
163
|
+
*/
|
|
164
|
+
onItemChange?: (event: TreeListItemChangeEvent) => void;
|
|
165
|
+
/**
|
|
166
|
+
* Triggered when the user clicks a row.
|
|
167
|
+
*/
|
|
168
|
+
onRowClick?: (event: TreeListRowClickEvent) => void;
|
|
169
|
+
/**
|
|
170
|
+
* Triggered when the user double clicks a row.
|
|
171
|
+
*/
|
|
172
|
+
onRowDoubleClick?: (event: TreeListRowDoubleClickEvent) => void;
|
|
173
|
+
/**
|
|
174
|
+
* Triggered when the user opens the context menu of a row.
|
|
175
|
+
*/
|
|
176
|
+
onRowContextMenu?: (event: TreeListRowContextMenuEvent) => void;
|
|
177
|
+
/**
|
|
178
|
+
* Specifies the name of the field which will provide a Boolean representation of the edit state of the current item.
|
|
179
|
+
*/
|
|
180
|
+
editField?: string;
|
|
181
|
+
/**
|
|
182
|
+
* Defines the scroll mode of the TreeList.
|
|
183
|
+
*
|
|
184
|
+
* The available options are:
|
|
185
|
+
* - `none`—Renders no scrollbar.
|
|
186
|
+
* - `scrollable`—Represents the default scroll mode of the TreeList.
|
|
187
|
+
* Requires you to set the `overflow` and `height` (for vertical scrolling),
|
|
188
|
+
* or `width` (for horizontal scrolling) styles.
|
|
189
|
+
* - `virtual`—Enables the vertical virtual scrolling of the TreeList.
|
|
190
|
+
* Requires you to set the `overflow` and `height` styles and `rowHeight` prop of the TreeList.
|
|
191
|
+
*/
|
|
192
|
+
scrollable?: ScrollMode;
|
|
193
|
+
/**
|
|
194
|
+
* Enables column resizing by dragging the edges of their header cells.
|
|
195
|
+
*/
|
|
196
|
+
resizable?: boolean;
|
|
197
|
+
/**
|
|
198
|
+
* Enables column reordering by dragging their header cells.
|
|
199
|
+
*/
|
|
200
|
+
reorderable?: boolean;
|
|
201
|
+
/**
|
|
202
|
+
* Enables row dragging and dropping.
|
|
203
|
+
*/
|
|
204
|
+
rowDraggable?: boolean;
|
|
205
|
+
/**
|
|
206
|
+
* Specifies the height of each row in the TreeList.
|
|
207
|
+
*/
|
|
208
|
+
rowHeight?: number;
|
|
209
|
+
/**
|
|
210
|
+
* Represents the `style` HTML attribute.
|
|
211
|
+
*/
|
|
212
|
+
style?: React.CSSProperties;
|
|
213
|
+
/**
|
|
214
|
+
* A props object that will be passed to the underlying HTML table.
|
|
215
|
+
*/
|
|
216
|
+
tableProps?: React.DetailedHTMLProps<React.TableHTMLAttributes<HTMLTableElement>, HTMLTableElement>;
|
|
217
|
+
/**
|
|
218
|
+
* Specifies the column menu component to be used by the TreeList.
|
|
219
|
+
*/
|
|
220
|
+
columnMenu?: React.ComponentType<any>;
|
|
221
|
+
/**
|
|
222
|
+
* Specifies the composite filter descriptor for the column menu filter.
|
|
223
|
+
*/
|
|
224
|
+
columnMenuFilter?: CompositeFilterDescriptor[];
|
|
225
|
+
/**
|
|
226
|
+
* Triggered when the column menu filter state changes.
|
|
227
|
+
*/
|
|
228
|
+
onColumnMenuFilterChange?: (event: TreeListColumnMenuFilterChangeEvent) => void;
|
|
229
|
+
/**
|
|
230
|
+
* Specifies the pager component to be used by the TreeList.
|
|
231
|
+
*/
|
|
232
|
+
pager?: React.ComponentType<any>;
|
|
233
|
+
/**
|
|
234
|
+
* Specifies the number of records to be skipped.
|
|
235
|
+
*/
|
|
236
|
+
skip?: number;
|
|
237
|
+
/**
|
|
238
|
+
* Specifies the number of records to be taken.
|
|
239
|
+
*/
|
|
240
|
+
take?: number;
|
|
241
|
+
/**
|
|
242
|
+
* Specifies the row component to be used by the TreeList.
|
|
243
|
+
*/
|
|
244
|
+
row?: React.ComponentType<TreeListRowProps>;
|
|
245
|
+
/**
|
|
246
|
+
* Enables keyboard navigation for the TreeList.
|
|
247
|
+
*/
|
|
248
|
+
navigatable?: boolean;
|
|
249
|
+
/**
|
|
250
|
+
* Triggered when the page state changes. The event must be handled to apply paging.
|
|
251
|
+
*/
|
|
252
|
+
onPageChange?: (event: TreeListPageChangeEvent) => void;
|
|
253
|
+
/**
|
|
254
|
+
* Triggered when the data state changes. The event must be handled to apply the new state.
|
|
255
|
+
*/
|
|
256
|
+
onDataStateChange?: (event: TreeListDataStateChangeEvent) => void;
|
|
257
|
+
/**
|
|
258
|
+
* Triggered when a column is resized.
|
|
259
|
+
*/
|
|
260
|
+
onColumnResize?: (event: TreeListColumnResizeEvent) => void;
|
|
261
|
+
/**
|
|
262
|
+
* Triggered when columns are reordered.
|
|
263
|
+
*/
|
|
264
|
+
onColumnReorder?: (event: TreeListColumnReorderEvent) => void;
|
|
265
|
+
/**
|
|
266
|
+
* Triggered when a row is dragged.
|
|
267
|
+
*/
|
|
268
|
+
onRowDrag?: (event: TreeListRowDragEvent) => void;
|
|
269
|
+
/**
|
|
270
|
+
* Triggered when a row is dragged and dropped.
|
|
271
|
+
*/
|
|
272
|
+
onRowDrop?: (event: TreeListRowDragEvent) => void;
|
|
273
|
+
/**
|
|
274
|
+
* Triggered before a row is rendered. Useful for customizing the row rendering.
|
|
275
|
+
*/
|
|
276
|
+
rowRender?: (row: React.ReactElement<HTMLTableRowElement>, props: TreeListRowProps) => React.ReactNode;
|
|
277
|
+
/**
|
|
278
|
+
* Triggered before a cell is rendered. Useful for customizing the cell rendering.
|
|
279
|
+
*/
|
|
280
|
+
cellRender?: (defaultRendering: React.ReactElement<HTMLTableCellElement> | null, props: TreeListCellProps) => React.ReactElement<HTMLTableCellElement> | null;
|
|
281
|
+
/**
|
|
282
|
+
* Triggered before a header cell is rendered. Useful for customizing the header cell rendering.
|
|
283
|
+
*/
|
|
284
|
+
headerCellRender?: (defaultRendering: React.ReactNode | null, props: TreeListHeaderCellProps) => React.ReactNode;
|
|
285
|
+
}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* The props that the TreeList passes to the TreeListRow component when creating it.
|
|
10
|
+
* Accessible during the `rowRender` callback of the TreeList.
|
|
11
|
+
*/
|
|
12
|
+
export interface TreeListRowProps {
|
|
13
|
+
/**
|
|
14
|
+
* The `data` object that represents the current row.
|
|
15
|
+
*/
|
|
16
|
+
dataItem: any;
|
|
17
|
+
/**
|
|
18
|
+
* The event that is fired when the row is clicked.
|
|
19
|
+
*/
|
|
20
|
+
onClick?: any;
|
|
21
|
+
/**
|
|
22
|
+
* The event that is fired when the row is double clicked.
|
|
23
|
+
*/
|
|
24
|
+
onDoubleClick?: any;
|
|
25
|
+
/**
|
|
26
|
+
* The event that is fired when the row context menu is triggered.
|
|
27
|
+
*/
|
|
28
|
+
onContextMenu?: any;
|
|
29
|
+
/**
|
|
30
|
+
* The name of the field which will provide a Boolean representation of the selected state of the item.
|
|
31
|
+
*/
|
|
32
|
+
selectedField?: string;
|
|
33
|
+
/**
|
|
34
|
+
* Sets the height of the row.
|
|
35
|
+
*/
|
|
36
|
+
rowHeight?: number;
|
|
37
|
+
/**
|
|
38
|
+
* A function for overriding the default rendering of the row.
|
|
39
|
+
*/
|
|
40
|
+
render?: (row: React.ReactElement<HTMLTableRowElement>, props: TreeListRowProps) => React.ReactNode;
|
|
41
|
+
/**
|
|
42
|
+
* An array of indexes of each parent and current item in the data tree.
|
|
43
|
+
*/
|
|
44
|
+
level: number[];
|
|
45
|
+
/**
|
|
46
|
+
* Fires when a row is dragged.
|
|
47
|
+
*/
|
|
48
|
+
onDrag?: (event: {
|
|
49
|
+
nativeEvent: any;
|
|
50
|
+
dragged: number[];
|
|
51
|
+
draggedOver: number[] | null;
|
|
52
|
+
draggedItem: any;
|
|
53
|
+
}) => void;
|
|
54
|
+
/**
|
|
55
|
+
* Fires when a row is dragged and dropped.
|
|
56
|
+
*/
|
|
57
|
+
onDrop?: (event: {
|
|
58
|
+
nativeEvent: any;
|
|
59
|
+
dragged: number[];
|
|
60
|
+
draggedOver: number[] | null;
|
|
61
|
+
draggedItem: any;
|
|
62
|
+
}) => void;
|
|
63
|
+
/**
|
|
64
|
+
* The expanded state of the row. Useful for applying `aria-expanded` accessibility attribute.
|
|
65
|
+
*/
|
|
66
|
+
expanded: boolean;
|
|
67
|
+
/**
|
|
68
|
+
* The index of the row. Useful for applying `aria-rowindex` accessibility attribute.
|
|
69
|
+
*/
|
|
70
|
+
rowIndex: number;
|
|
71
|
+
/**
|
|
72
|
+
* @hidden
|
|
73
|
+
*/
|
|
74
|
+
children: React.ReactNode;
|
|
75
|
+
/**
|
|
76
|
+
* @hidden
|
|
77
|
+
*/
|
|
78
|
+
levels: number[][];
|
|
79
|
+
/**
|
|
80
|
+
* @hidden
|
|
81
|
+
*/
|
|
82
|
+
isAltRow?: boolean;
|
|
83
|
+
/**
|
|
84
|
+
* The index to be applied to the `aria-rowindex` attribute.
|
|
85
|
+
*/
|
|
86
|
+
ariaRowIndex?: number;
|
|
87
|
+
/**
|
|
88
|
+
* The count of items on current level, applied to the `aria-setsize` attribute.
|
|
89
|
+
*/
|
|
90
|
+
ariaSetSize?: number;
|
|
91
|
+
/**
|
|
92
|
+
* The index of the item on current level, applied to the `aria-posinset` attribute.
|
|
93
|
+
*/
|
|
94
|
+
ariaPosInSet?: number;
|
|
95
|
+
/**
|
|
96
|
+
* Indicates if the row is selected.
|
|
97
|
+
*/
|
|
98
|
+
isSelected: boolean;
|
|
99
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { TableSelectableMode, TableSelectableSettings } from '@progress/kendo-react-data-tools';
|
|
9
|
+
/**
|
|
10
|
+
* Represents the available selection modes.
|
|
11
|
+
*/
|
|
12
|
+
export type TreeListSelectableMode = TableSelectableMode;
|
|
13
|
+
/**
|
|
14
|
+
* Represents the TreeList selectable settings.
|
|
15
|
+
*/
|
|
16
|
+
export interface TreeListSelectableSettings extends TableSelectableSettings {
|
|
17
|
+
/**
|
|
18
|
+
* The available values are:
|
|
19
|
+
* * `single`
|
|
20
|
+
* * `multiple`
|
|
21
|
+
*
|
|
22
|
+
* @default "multiple"
|
|
23
|
+
*/
|
|
24
|
+
mode?: TreeListSelectableMode;
|
|
25
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { ColumnSortSettings, SortSettings } from '@progress/kendo-react-data-tools';
|
|
9
|
+
/**
|
|
10
|
+
* The settings for sorting the TreeList columns.
|
|
11
|
+
*/
|
|
12
|
+
export type TreeListColumnSortSettings = ColumnSortSettings;
|
|
13
|
+
/**
|
|
14
|
+
* The settings for sorting the TreeList data.
|
|
15
|
+
*/
|
|
16
|
+
export type TreeListSortSettings = SortSettings;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { ToolbarProps } from '@progress/kendo-react-buttons';
|
|
9
|
+
/**
|
|
10
|
+
* The props of the TreeListToolbar component.
|
|
11
|
+
*/
|
|
12
|
+
export interface TreeListToolbarProps extends ToolbarProps {
|
|
13
|
+
/**
|
|
14
|
+
* The React elements that will be rendered inside the toolbar of the TreeList.
|
|
15
|
+
*/
|
|
16
|
+
children?: React.ReactNode;
|
|
17
|
+
}
|