@progress/kendo-react-treelist 7.2.4-develop.2 → 7.2.4-develop.4
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/TreeList.js +8 -0
- package/TreeList.mjs +580 -0
- package/TreeListNoRecords.js +8 -0
- package/TreeListNoRecords.mjs +23 -0
- package/TreeListToolbar.js +8 -0
- package/TreeListToolbar.mjs +26 -0
- package/cells/EditCells/TreeListBooleanEditor.js +8 -0
- package/cells/EditCells/TreeListBooleanEditor.mjs +55 -0
- package/cells/EditCells/TreeListDateEditor.js +8 -0
- package/cells/EditCells/TreeListDateEditor.mjs +54 -0
- package/cells/EditCells/TreeListNumericEditor.js +8 -0
- package/cells/EditCells/TreeListNumericEditor.mjs +53 -0
- package/cells/EditCells/TreeListTextEditor.js +8 -0
- package/cells/EditCells/TreeListTextEditor.mjs +53 -0
- package/cells/FilterCells/TreeListBooleanFilter.js +8 -0
- package/cells/FilterCells/TreeListBooleanFilter.mjs +26 -0
- package/cells/FilterCells/TreeListDateFilter.js +8 -0
- package/cells/FilterCells/TreeListDateFilter.mjs +26 -0
- package/cells/FilterCells/TreeListNumericFilter.js +8 -0
- package/cells/FilterCells/TreeListNumericFilter.mjs +26 -0
- package/cells/FilterCells/TreeListTextFilter.js +8 -0
- package/cells/FilterCells/TreeListTextFilter.mjs +26 -0
- package/cells/FilterCells/utils.js +8 -0
- package/cells/FilterCells/utils.mjs +59 -0
- package/cells/TreeListCell.js +8 -0
- package/cells/TreeListCell.mjs +71 -0
- package/cells/TreeListSelectionCell.js +8 -0
- package/cells/TreeListSelectionCell.mjs +47 -0
- package/constants/index.js +8 -0
- package/constants/index.mjs +15 -0
- package/dist/cdn/js/kendo-react-treelist.js +8 -5
- package/header/TreeListHeaderCell.js +8 -0
- package/header/TreeListHeaderCell.mjs +14 -0
- package/header/TreeListHeaderSelectionCell.js +8 -0
- package/header/TreeListHeaderSelectionCell.mjs +25 -0
- package/index.d.mts +1139 -5
- package/index.d.ts +1139 -38
- package/index.js +8 -5
- package/index.mjs +66 -1184
- package/messages/index.js +8 -0
- package/messages/index.mjs +59 -0
- package/package-metadata.js +8 -0
- package/package-metadata.mjs +19 -0
- package/package.json +8 -8
- package/rows/TreeListDraggableRow.js +8 -0
- package/rows/TreeListDraggableRow.mjs +130 -0
- package/rows/TreeListRow.js +8 -0
- package/rows/TreeListRow.mjs +47 -0
- package/utils/index.js +8 -0
- package/utils/index.mjs +46 -0
- package/ScrollMode.d.ts +0 -5
- package/TreeList.d.ts +0 -137
- package/TreeListNoRecords.d.ts +0 -16
- package/TreeListToolbar.d.ts +0 -15
- package/cells/EditCells/TreeListBooleanEditor.d.ts +0 -11
- package/cells/EditCells/TreeListDateEditor.d.ts +0 -11
- package/cells/EditCells/TreeListNumericEditor.d.ts +0 -12
- package/cells/EditCells/TreeListTextEditor.d.ts +0 -11
- package/cells/FilterCells/TreeListBooleanFilter.d.ts +0 -14
- package/cells/FilterCells/TreeListDateFilter.d.ts +0 -14
- package/cells/FilterCells/TreeListNumericFilter.d.ts +0 -14
- package/cells/FilterCells/TreeListTextFilter.d.ts +0 -14
- package/cells/FilterCells/utils.d.ts +0 -42
- package/cells/TreeListCell.d.ts +0 -9
- package/cells/TreeListSelectionCell.d.ts +0 -11
- package/constants/index.d.ts +0 -10
- package/header/TreeListHeaderCell.d.ts +0 -7
- package/header/TreeListHeaderSelectionCell.d.ts +0 -15
- package/interfaces/DataItemWrapper.d.ts +0 -14
- package/interfaces/TreeListCellProps.d.ts +0 -45
- package/interfaces/TreeListColumnProps.d.ts +0 -45
- package/interfaces/TreeListFilterCellProps.d.ts +0 -10
- package/interfaces/TreeListFilterOperator.d.ts +0 -10
- package/interfaces/TreeListHeaderCellProps.d.ts +0 -10
- package/interfaces/TreeListNoRecordsProps.d.ts +0 -13
- package/interfaces/TreeListProps.d.ts +0 -241
- package/interfaces/TreeListRowProps.d.ts +0 -96
- package/interfaces/TreeListSelectableSettings.d.ts +0 -22
- package/interfaces/TreeListSortSettings.d.ts +0 -13
- package/interfaces/TreeListToolbarProps.d.ts +0 -13
- package/interfaces/events.d.ts +0 -269
- package/messages/index.d.ts +0 -124
- package/package-metadata.d.ts +0 -9
- package/rows/TreeListDraggableRow.d.ts +0 -36
- package/rows/TreeListRow.d.ts +0 -10
- package/utils/index.d.ts +0 -21
|
@@ -1,14 +0,0 @@
|
|
|
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
|
-
import * as React from 'react';
|
|
6
|
-
import { FilterComponentProps } from '@progress/kendo-react-data-tools';
|
|
7
|
-
import { TreeListFilterOperator } from '../../interfaces/TreeListFilterOperator';
|
|
8
|
-
export interface TreeListNumericFilterProps extends FilterComponentProps {
|
|
9
|
-
/**
|
|
10
|
-
* The list of the operators.
|
|
11
|
-
*/
|
|
12
|
-
operators?: TreeListFilterOperator[];
|
|
13
|
-
}
|
|
14
|
-
export declare const TreeListNumericFilter: React.FunctionComponent<TreeListNumericFilterProps>;
|
|
@@ -1,14 +0,0 @@
|
|
|
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
|
-
import * as React from 'react';
|
|
6
|
-
import { FilterComponentProps } from '@progress/kendo-react-data-tools';
|
|
7
|
-
import { TreeListFilterOperator } from '../../interfaces/TreeListFilterOperator';
|
|
8
|
-
export interface TreeListTextFilterProps extends FilterComponentProps {
|
|
9
|
-
/**
|
|
10
|
-
* The list of the operators.
|
|
11
|
-
*/
|
|
12
|
-
operators?: TreeListFilterOperator[];
|
|
13
|
-
}
|
|
14
|
-
export declare const TreeListTextFilter: React.FunctionComponent<TreeListTextFilterProps>;
|
|
@@ -1,42 +0,0 @@
|
|
|
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
|
-
import { LocalizationService } from '@progress/kendo-react-intl';
|
|
6
|
-
import { TreeListFilterOperator } from '../../interfaces/TreeListFilterOperator';
|
|
7
|
-
/**
|
|
8
|
-
* @hidden
|
|
9
|
-
*/
|
|
10
|
-
export declare const textFilterOperators: TreeListFilterOperator[];
|
|
11
|
-
/**
|
|
12
|
-
* @hidden
|
|
13
|
-
*/
|
|
14
|
-
export declare const numericFilterOperators: TreeListFilterOperator[];
|
|
15
|
-
/**
|
|
16
|
-
* @hidden
|
|
17
|
-
*/
|
|
18
|
-
export declare const dateFilterOperators: TreeListFilterOperator[];
|
|
19
|
-
/**
|
|
20
|
-
* @hidden
|
|
21
|
-
*/
|
|
22
|
-
export declare const booleanOperator: string;
|
|
23
|
-
/**
|
|
24
|
-
* @hidden
|
|
25
|
-
*/
|
|
26
|
-
export declare const booleanFilterValues: ({
|
|
27
|
-
text: string;
|
|
28
|
-
operator: string;
|
|
29
|
-
} | {
|
|
30
|
-
text: string;
|
|
31
|
-
operator: boolean;
|
|
32
|
-
})[];
|
|
33
|
-
/**
|
|
34
|
-
* @hidden
|
|
35
|
-
*/
|
|
36
|
-
export declare function localizeFilter(localization: LocalizationService, operators: TreeListFilterOperator[]): {
|
|
37
|
-
clearButtonTitle: string;
|
|
38
|
-
operators: {
|
|
39
|
-
text: string;
|
|
40
|
-
operator: any;
|
|
41
|
-
}[];
|
|
42
|
-
};
|
package/cells/TreeListCell.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
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
|
-
import { TreeListCellProps } from '../interfaces/TreeListCellProps';
|
|
6
|
-
export declare const TreeListCell: {
|
|
7
|
-
(props: TreeListCellProps): import("react/jsx-runtime").JSX.Element | null;
|
|
8
|
-
displayName: string;
|
|
9
|
-
};
|
|
@@ -1,11 +0,0 @@
|
|
|
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
|
-
import { TreeListCellProps } from '../interfaces/TreeListCellProps';
|
|
6
|
-
export interface TreeListSelectionCellProps extends TreeListCellProps {
|
|
7
|
-
}
|
|
8
|
-
export declare const TreeListSelectionCell: {
|
|
9
|
-
(props: TreeListSelectionCellProps): import("react/jsx-runtime").JSX.Element | null;
|
|
10
|
-
displayName: string;
|
|
11
|
-
};
|
package/constants/index.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
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
|
-
/** The attribute required by the TreeList selection on TreeList `tr` elements. */
|
|
6
|
-
export declare const TREELIST_ROW_INDEX_ATTRIBUTE = "data-grid-row-index";
|
|
7
|
-
/** The attribute required by the TreeList selection on TreeList `td` elements. */
|
|
8
|
-
export declare const TREELIST_COL_INDEX_ATTRIBUTE = "data-grid-col-index";
|
|
9
|
-
/** Attribute which disable selection start from this element. */
|
|
10
|
-
export declare const TREELIST_PREVENT_SELECTION_ELEMENT = "data-prevent-selection";
|
|
@@ -1,7 +0,0 @@
|
|
|
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
|
-
import * as React from 'react';
|
|
6
|
-
import { TreeListHeaderCellProps } from '../interfaces/TreeListHeaderCellProps';
|
|
7
|
-
export declare const TreeListHeaderCell: React.FunctionComponent<TreeListHeaderCellProps>;
|
|
@@ -1,15 +0,0 @@
|
|
|
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
|
-
import * as React from 'react';
|
|
6
|
-
import { HeaderCellProps } from '@progress/kendo-react-data-tools';
|
|
7
|
-
export interface TreeListHeaderSelectionCellProps extends HeaderCellProps {
|
|
8
|
-
}
|
|
9
|
-
export declare class TreeListHeaderSelectionCell extends React.Component<TreeListHeaderSelectionCellProps> {
|
|
10
|
-
private _inputId;
|
|
11
|
-
/**
|
|
12
|
-
* @hidden
|
|
13
|
-
*/
|
|
14
|
-
render(): import("react/jsx-runtime").JSX.Element;
|
|
15
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
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
|
-
/**
|
|
6
|
-
* @hidden
|
|
7
|
-
*/
|
|
8
|
-
export interface DataItemWrapper {
|
|
9
|
-
dataItem: any;
|
|
10
|
-
level: number[];
|
|
11
|
-
height: number;
|
|
12
|
-
offsetTop: number;
|
|
13
|
-
levelCount: number;
|
|
14
|
-
}
|
|
@@ -1,45 +0,0 @@
|
|
|
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
|
-
import { CellProps } from '@progress/kendo-react-data-tools';
|
|
6
|
-
/**
|
|
7
|
-
* Represents the props of the TreeListCell component.
|
|
8
|
-
*/
|
|
9
|
-
export interface TreeListCellProps extends Omit<CellProps, 'onExpandChange' | 'render' | 'onChange'> {
|
|
10
|
-
/**
|
|
11
|
-
* An array of indexes of each parent and current item in the data tree.
|
|
12
|
-
*/
|
|
13
|
-
level: number[];
|
|
14
|
-
/**
|
|
15
|
-
* Indicates that the data item of the cell has subitems.
|
|
16
|
-
*/
|
|
17
|
-
hasChildren?: boolean;
|
|
18
|
-
/**
|
|
19
|
-
* If set to `true`, the cell will render indentation based on its level prop and
|
|
20
|
-
* the icons that are used for expanding and collapsing child rows.
|
|
21
|
-
*/
|
|
22
|
-
expandable?: boolean;
|
|
23
|
-
/**
|
|
24
|
-
* The index of the column. Useful for applying `aria-colindex` accessibility attribute.
|
|
25
|
-
*/
|
|
26
|
-
colIndex: number;
|
|
27
|
-
/**
|
|
28
|
-
* The event that is fired when the expand or collapse icon of the cell is clicked.
|
|
29
|
-
*/
|
|
30
|
-
onExpandChange: (event: React.MouseEvent<HTMLSpanElement>, dataItem: any, level: number[]) => void;
|
|
31
|
-
/**
|
|
32
|
-
* A function for overriding the default rendering of the cell.
|
|
33
|
-
*/
|
|
34
|
-
render?: (defaultRendering: React.ReactElement<HTMLTableCellElement> | null, props: TreeListCellProps) => React.ReactElement<HTMLTableCellElement> | null;
|
|
35
|
-
/**
|
|
36
|
-
* The event that is fired when the cell value is changed.
|
|
37
|
-
*/
|
|
38
|
-
onChange?: (event: {
|
|
39
|
-
dataItem: any;
|
|
40
|
-
level: number[];
|
|
41
|
-
syntheticEvent: React.SyntheticEvent<any>;
|
|
42
|
-
field?: string;
|
|
43
|
-
value?: any;
|
|
44
|
-
}) => void;
|
|
45
|
-
}
|
|
@@ -1,45 +0,0 @@
|
|
|
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
|
-
import { ComponentType } from 'react';
|
|
6
|
-
import { TreeColumnBaseProps } from '@progress/kendo-react-data-tools';
|
|
7
|
-
import { TreeListCellProps } from './TreeListCellProps';
|
|
8
|
-
import { TreeListHeaderCellProps } from './TreeListHeaderCellProps';
|
|
9
|
-
import { TreeListFilterCellProps } from './TreeListFilterCellProps';
|
|
10
|
-
/**
|
|
11
|
-
* The props of the columns of the TreeList component.
|
|
12
|
-
*/
|
|
13
|
-
export interface TreeListColumnProps extends Omit<TreeColumnBaseProps, 'children' | 'cell' | 'editCell'> {
|
|
14
|
-
/**
|
|
15
|
-
* Defines the component that will be rendered as a cell. If not set, a `TreeListCell` will be rendered by default.
|
|
16
|
-
*/
|
|
17
|
-
cell?: ComponentType<TreeListCellProps>;
|
|
18
|
-
/**
|
|
19
|
-
* Defines the component that will be rendered as an edit cell.
|
|
20
|
-
*/
|
|
21
|
-
editCell?: ComponentType<TreeListCellProps>;
|
|
22
|
-
/**
|
|
23
|
-
* Defines the component that will be rendered as a header cell.
|
|
24
|
-
* If not set, a `TreeListHeaderCell` will be rendered by default.
|
|
25
|
-
*/
|
|
26
|
-
headerCell?: ComponentType<TreeListHeaderCellProps>;
|
|
27
|
-
/**
|
|
28
|
-
* **Deprecated**. Use `filterCell` prop instead.
|
|
29
|
-
*/
|
|
30
|
-
filter?: ComponentType<TreeListFilterCellProps>;
|
|
31
|
-
/**
|
|
32
|
-
* Defines the component that will be rendered as a filter cell.
|
|
33
|
-
*/
|
|
34
|
-
filterCell?: ComponentType<TreeListFilterCellProps>;
|
|
35
|
-
/**
|
|
36
|
-
* A collection of child columns.
|
|
37
|
-
*/
|
|
38
|
-
children?: TreeListColumnProps[];
|
|
39
|
-
/**
|
|
40
|
-
* Defines if the column is locked (frozen or sticky).
|
|
41
|
-
* Locked columns are the columns that are visible at all times while the user scrolls the component horizontally.
|
|
42
|
-
* Defaults to `false`.
|
|
43
|
-
*/
|
|
44
|
-
locked?: boolean;
|
|
45
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
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
|
-
import { FilterCellProps } from '@progress/kendo-react-data-tools';
|
|
6
|
-
/**
|
|
7
|
-
* @hidden
|
|
8
|
-
*/
|
|
9
|
-
export interface TreeListFilterCellProps extends FilterCellProps {
|
|
10
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
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
|
-
import { FilterOperator } from '@progress/kendo-react-data-tools';
|
|
6
|
-
/**
|
|
7
|
-
* The filter operator for the TreeList filters.
|
|
8
|
-
*/
|
|
9
|
-
export interface TreeListFilterOperator extends FilterOperator {
|
|
10
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
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
|
-
import { HeaderCellProps } from '@progress/kendo-react-data-tools';
|
|
6
|
-
/**
|
|
7
|
-
* The props of the TreeListHeaderCell component.
|
|
8
|
-
*/
|
|
9
|
-
export interface TreeListHeaderCellProps extends HeaderCellProps {
|
|
10
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
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
|
-
/**
|
|
6
|
-
* The props of the TreeListNoRecords component.
|
|
7
|
-
*/
|
|
8
|
-
export interface TreeListNoRecordsProps {
|
|
9
|
-
/**
|
|
10
|
-
* The React elements which will be rendered inside the TreeList when no records are available.
|
|
11
|
-
*/
|
|
12
|
-
children?: React.ReactNode;
|
|
13
|
-
}
|
|
@@ -1,241 +0,0 @@
|
|
|
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
|
-
import { SortDescriptor, FilterDescriptor, CompositeFilterDescriptor } from '@progress/kendo-data-query';
|
|
6
|
-
import { TreeListSortChangeEvent, TreeListFilterChangeEvent, TreeListExpandChangeEvent, TreeListSelectionChangeEvent, TreeListHeaderSelectionChangeEvent, TreeListItemChangeEvent, TreeListDataStateChangeEvent, TreeListRowClickEvent, TreeListColumnResizeEvent, TreeListColumnReorderEvent, TreeListPageChangeEvent, TreeListRowDragEvent, TreeListColumnMenuFilterChangeEvent, TreeListRowDoubleClickEvent, TreeListRowContextMenuEvent, TreeListKeyDownEvent } from './events';
|
|
7
|
-
import { ScrollMode } from '../ScrollMode';
|
|
8
|
-
import { TreeListCellProps } from './TreeListCellProps';
|
|
9
|
-
import { SortSettings as TreeListSortSettings, FilterRowProps } from '@progress/kendo-react-data-tools';
|
|
10
|
-
import { TreeListRowProps } from './TreeListRowProps';
|
|
11
|
-
import { TreeListHeaderCellProps } from './TreeListHeaderCellProps';
|
|
12
|
-
import { TreeListColumnProps } from './TreeListColumnProps';
|
|
13
|
-
import { TreeListToolbarProps } from './TreeListToolbarProps';
|
|
14
|
-
import { TreeListNoRecordsProps } from './TreeListNoRecordsProps';
|
|
15
|
-
import { TreeListSelectableSettings } from './TreeListSelectableSettings';
|
|
16
|
-
/**
|
|
17
|
-
* Represents the props of the [KendoReact TreeList component]({% slug getstarted_treelist %}).
|
|
18
|
-
*/
|
|
19
|
-
export interface TreeListProps {
|
|
20
|
-
/**
|
|
21
|
-
* Sets the TreeList row key prop to the value of this field in the dataItem.
|
|
22
|
-
* If not set, the dataItem index will be used for the row key, which might lead to row not updated during paging or scrolling.
|
|
23
|
-
*/
|
|
24
|
-
dataItemKey?: string;
|
|
25
|
-
/**
|
|
26
|
-
* Sets custom CSS classes to the TreeList DOM element.
|
|
27
|
-
*/
|
|
28
|
-
className?: string;
|
|
29
|
-
/**
|
|
30
|
-
* Sets `id` to the TreeList DOM element.
|
|
31
|
-
*/
|
|
32
|
-
id?: string;
|
|
33
|
-
/**
|
|
34
|
-
* A collection of `TreeListColumnProps` for creating columns.
|
|
35
|
-
*/
|
|
36
|
-
columns?: TreeListColumnProps[];
|
|
37
|
-
/**
|
|
38
|
-
* Enables the virtualization of the columns
|
|
39
|
-
* ([see example]({% slug virtual_columns_treelist %})).
|
|
40
|
-
* If enabled, the columns outside the viewport are not rendered.
|
|
41
|
-
*/
|
|
42
|
-
columnVirtualization?: boolean;
|
|
43
|
-
/**
|
|
44
|
-
* Sets the data of the TreeList.
|
|
45
|
-
*/
|
|
46
|
-
data?: any[];
|
|
47
|
-
/**
|
|
48
|
-
* Enables sorting ([see example]({% slug sorting_treelist %})).
|
|
49
|
-
*/
|
|
50
|
-
sortable?: TreeListSortSettings;
|
|
51
|
-
/**
|
|
52
|
-
* Fires when the sorting of the TreeList is changed ([see example]({% slug sorting_treelist %})).
|
|
53
|
-
* You have to handle the event yourself and sort the data.
|
|
54
|
-
*/
|
|
55
|
-
onSortChange?: (event: TreeListSortChangeEvent) => void;
|
|
56
|
-
/**
|
|
57
|
-
* The descriptors by which the data is sorted. Applies the sorting styles and buttons to the affected columns.
|
|
58
|
-
*/
|
|
59
|
-
sort?: SortDescriptor[];
|
|
60
|
-
/**
|
|
61
|
-
* If set, it will be rendered instead of the default `FilterRow` TreeList component.
|
|
62
|
-
*/
|
|
63
|
-
filterRow?: React.ComponentType<FilterRowProps>;
|
|
64
|
-
/**
|
|
65
|
-
* If set and when the data item is in edit mode, the `editRow` value will be rendered.
|
|
66
|
-
*/
|
|
67
|
-
editRow?: React.ComponentType<TreeListRowProps>;
|
|
68
|
-
/**
|
|
69
|
-
* Represents the TreeList toolbar component.
|
|
70
|
-
*/
|
|
71
|
-
toolbar?: React.ReactElement<TreeListToolbarProps>;
|
|
72
|
-
/**
|
|
73
|
-
* Represents the component that will be rendered when the `data` property of the TreeList is empty or undefined.
|
|
74
|
-
*/
|
|
75
|
-
noRecords?: React.ReactElement<TreeListNoRecordsProps>;
|
|
76
|
-
/**
|
|
77
|
-
* The descriptors by which the data is filtered ([more information and examples]({% slug filtering_treelist %})).
|
|
78
|
-
* This affects the values and buttons in the `FilterRow` of the TreeList.
|
|
79
|
-
*/
|
|
80
|
-
filter?: FilterDescriptor[];
|
|
81
|
-
/**
|
|
82
|
-
* Fires when the TreeList filter is modified through the UI
|
|
83
|
-
* ([more information and examples]({% slug filtering_treelist %})).
|
|
84
|
-
* You have to handle the event yourself and filter the data.
|
|
85
|
-
*/
|
|
86
|
-
onFilterChange?: (event: TreeListFilterChangeEvent) => void;
|
|
87
|
-
/**
|
|
88
|
-
* Fires when the user clicks on the expand or collapse icon of a row.
|
|
89
|
-
*/
|
|
90
|
-
onExpandChange?: (event: TreeListExpandChangeEvent) => void;
|
|
91
|
-
/**
|
|
92
|
-
* Specifies the name of the field which will provide a Boolean representation of the expanded state of the item.
|
|
93
|
-
*/
|
|
94
|
-
expandField?: string;
|
|
95
|
-
/**
|
|
96
|
-
* Specifies the name of the field which will provide an array representation of the item subitems.
|
|
97
|
-
*/
|
|
98
|
-
subItemsField?: string;
|
|
99
|
-
/**
|
|
100
|
-
* The TreeList selectable settings.
|
|
101
|
-
*/
|
|
102
|
-
selectable?: TreeListSelectableSettings;
|
|
103
|
-
/**
|
|
104
|
-
* Specifies the name of the field which will provide a Boolean representation of the selected state of the item
|
|
105
|
-
* ([see example]({% slug selection_treelist %})).
|
|
106
|
-
*/
|
|
107
|
-
selectedField?: string;
|
|
108
|
-
/**
|
|
109
|
-
* Fires when the user tries to select or deselect a row or cell.
|
|
110
|
-
* ([more information and example]({% slug selection_treelist %})).
|
|
111
|
-
*/
|
|
112
|
-
onSelectionChange?: (event: TreeListSelectionChangeEvent) => void;
|
|
113
|
-
/**
|
|
114
|
-
* Fires when the user press keyboard key.
|
|
115
|
-
*/
|
|
116
|
-
onKeyDown?: (event: TreeListKeyDownEvent) => void;
|
|
117
|
-
/**
|
|
118
|
-
* Fires when the user clicks the checkbox of a column header whose `field` matches `selectedField`
|
|
119
|
-
* ([more information and example]({% slug selection_treelist %})).
|
|
120
|
-
*/
|
|
121
|
-
onHeaderSelectionChange?: (event: TreeListHeaderSelectionChangeEvent) => void;
|
|
122
|
-
/**
|
|
123
|
-
* Fires when the user changes the values of the item.
|
|
124
|
-
* The event is not debounced and fires on every `onChange` event of the input in the current `EditCell`
|
|
125
|
-
* ([more information and examples]({% slug editing_inline_treelist %})).
|
|
126
|
-
*/
|
|
127
|
-
onItemChange?: (event: TreeListItemChangeEvent) => void;
|
|
128
|
-
/**
|
|
129
|
-
* Fires when the user clicks a row.
|
|
130
|
-
*/
|
|
131
|
-
onRowClick?: (event: TreeListRowClickEvent) => void;
|
|
132
|
-
/**
|
|
133
|
-
* Fires when the user double clicks a row.
|
|
134
|
-
*/
|
|
135
|
-
onRowDoubleClick?: (event: TreeListRowDoubleClickEvent) => void;
|
|
136
|
-
/**
|
|
137
|
-
* Fires when the user trigger the context menu of row.
|
|
138
|
-
*/
|
|
139
|
-
onRowContextMenu?: (event: TreeListRowContextMenuEvent) => void;
|
|
140
|
-
/**
|
|
141
|
-
* Specifies the name of the field which will provide a Boolean representation of the edit state of the current item
|
|
142
|
-
* ([more information and examples]({% slug editing_inline_treelist %})).
|
|
143
|
-
*/
|
|
144
|
-
editField?: string;
|
|
145
|
-
/**
|
|
146
|
-
* Defines the scroll mode of the TreeList.
|
|
147
|
-
*
|
|
148
|
-
* The available options are:
|
|
149
|
-
* - `none`—Renders no scrollbar.
|
|
150
|
-
* - `scrollable`—Represents the default scroll mode of the TreeList.
|
|
151
|
-
* Requires you to set the `overflow` and `height` (for vertical scrolling),
|
|
152
|
-
* or `width` (for horizontal scrolling) styles.
|
|
153
|
-
* - `virtual`—Enables the vertical virtual scrolling of the TreeList.
|
|
154
|
-
* Requires you to set the `overflow` and `height` styles and `rowHeight` prop of the TreeList.
|
|
155
|
-
*/
|
|
156
|
-
scrollable?: ScrollMode;
|
|
157
|
-
/**
|
|
158
|
-
* If set to `true`, the user can resize columns by dragging the edges (resize handles) of their header cells.
|
|
159
|
-
*/
|
|
160
|
-
resizable?: boolean;
|
|
161
|
-
/**
|
|
162
|
-
* If set to `true`, the user can reorder columns by dragging their header cells.
|
|
163
|
-
*/
|
|
164
|
-
reorderable?: boolean;
|
|
165
|
-
/**
|
|
166
|
-
* If set to `true`, the user can drag and drop rows.
|
|
167
|
-
*/
|
|
168
|
-
rowDraggable?: boolean;
|
|
169
|
-
/**
|
|
170
|
-
* Defines the row height and implements equal heights for all rows.
|
|
171
|
-
*/
|
|
172
|
-
rowHeight?: number;
|
|
173
|
-
/**
|
|
174
|
-
* Represents the `style` HTML attribute.
|
|
175
|
-
*/
|
|
176
|
-
style?: React.CSSProperties;
|
|
177
|
-
/**
|
|
178
|
-
* A props object that will be passed to the underlying HTML table.
|
|
179
|
-
*/
|
|
180
|
-
tableProps?: React.DetailedHTMLProps<React.TableHTMLAttributes<HTMLTableElement>, HTMLTableElement>;
|
|
181
|
-
columnMenu?: React.ComponentType<any>;
|
|
182
|
-
columnMenuFilter?: CompositeFilterDescriptor[];
|
|
183
|
-
onColumnMenuFilterChange?: (event: TreeListColumnMenuFilterChangeEvent) => void;
|
|
184
|
-
/**
|
|
185
|
-
* The pager component that the TreeList will render.
|
|
186
|
-
*/
|
|
187
|
-
pager?: React.ComponentType<any>;
|
|
188
|
-
/**
|
|
189
|
-
* The number of records that will be skipped.
|
|
190
|
-
*/
|
|
191
|
-
skip?: number;
|
|
192
|
-
/**
|
|
193
|
-
* The number of records that will be taken.
|
|
194
|
-
*/
|
|
195
|
-
take?: number;
|
|
196
|
-
/**
|
|
197
|
-
* The TreeList row component.
|
|
198
|
-
*/
|
|
199
|
-
row?: React.ComponentType<TreeListRowProps>;
|
|
200
|
-
/**
|
|
201
|
-
* If set to `true`, the user can use dedicated shortcuts to interact with the TreeList.
|
|
202
|
-
* By default, navigation is disabled and the TreeList content is accessible in the normal tab sequence.
|
|
203
|
-
*/
|
|
204
|
-
navigatable?: boolean;
|
|
205
|
-
/**
|
|
206
|
-
* Fires when the page of the TreeList is changed.
|
|
207
|
-
*/
|
|
208
|
-
onPageChange?: (event: TreeListPageChangeEvent) => void;
|
|
209
|
-
/**
|
|
210
|
-
* Fires when the data state of the TreeList is changed.
|
|
211
|
-
*/
|
|
212
|
-
onDataStateChange?: (event: TreeListDataStateChangeEvent) => void;
|
|
213
|
-
/**
|
|
214
|
-
* Fires when a column is resized.
|
|
215
|
-
*/
|
|
216
|
-
onColumnResize?: (event: TreeListColumnResizeEvent) => void;
|
|
217
|
-
/**
|
|
218
|
-
* Fires when the columns are reordered.
|
|
219
|
-
*/
|
|
220
|
-
onColumnReorder?: (event: TreeListColumnReorderEvent) => void;
|
|
221
|
-
/**
|
|
222
|
-
* Fires when a row is dragged.
|
|
223
|
-
*/
|
|
224
|
-
onRowDrag?: (event: TreeListRowDragEvent) => void;
|
|
225
|
-
/**
|
|
226
|
-
* Fires when a row is dragged and dropped.
|
|
227
|
-
*/
|
|
228
|
-
onRowDrop?: (event: TreeListRowDragEvent) => void;
|
|
229
|
-
/**
|
|
230
|
-
* Fires when a row is about to be rendered. Useful for overriding the default rendering of the row.
|
|
231
|
-
*/
|
|
232
|
-
rowRender?: (row: React.ReactElement<HTMLTableRowElement>, props: TreeListRowProps) => React.ReactNode;
|
|
233
|
-
/**
|
|
234
|
-
* Fires when a cell is about to be rendered. Useful for overriding the default rendering of the cell.
|
|
235
|
-
*/
|
|
236
|
-
cellRender?: (defaultRendering: React.ReactElement<HTMLTableCellElement> | null, props: TreeListCellProps) => React.ReactElement<HTMLTableCellElement> | null;
|
|
237
|
-
/**
|
|
238
|
-
* Fires when a header cell is about to be rendered. Useful for overriding the default rendering of the header cell.
|
|
239
|
-
*/
|
|
240
|
-
headerCellRender?: (defaultRendering: React.ReactNode | null, props: TreeListHeaderCellProps) => React.ReactNode;
|
|
241
|
-
}
|
|
@@ -1,96 +0,0 @@
|
|
|
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
|
-
/**
|
|
6
|
-
* The props that the TreeList passes to the TreeListRow component when creating it.
|
|
7
|
-
* Accessible during the `rowRender` callback of the TreeList.
|
|
8
|
-
*/
|
|
9
|
-
export interface TreeListRowProps {
|
|
10
|
-
/**
|
|
11
|
-
* The `data` object that represents the current row.
|
|
12
|
-
*/
|
|
13
|
-
dataItem: any;
|
|
14
|
-
/**
|
|
15
|
-
* The event that is fired when the row is clicked.
|
|
16
|
-
*/
|
|
17
|
-
onClick?: any;
|
|
18
|
-
/**
|
|
19
|
-
* The event that is fired when the row is double clicked.
|
|
20
|
-
*/
|
|
21
|
-
onDoubleClick?: any;
|
|
22
|
-
/**
|
|
23
|
-
* The event that is fired when the row context menu is triggered.
|
|
24
|
-
*/
|
|
25
|
-
onContextMenu?: any;
|
|
26
|
-
/**
|
|
27
|
-
* The name of the field which will provide a Boolean representation of the selected state of the item.
|
|
28
|
-
*/
|
|
29
|
-
selectedField?: string;
|
|
30
|
-
/**
|
|
31
|
-
* Sets the height of the row.
|
|
32
|
-
*/
|
|
33
|
-
rowHeight?: number;
|
|
34
|
-
/**
|
|
35
|
-
* A function for overriding the default rendering of the row.
|
|
36
|
-
*/
|
|
37
|
-
render?: (row: React.ReactElement<HTMLTableRowElement>, props: TreeListRowProps) => React.ReactNode;
|
|
38
|
-
/**
|
|
39
|
-
* An array of indexes of each parent and current item in the data tree.
|
|
40
|
-
*/
|
|
41
|
-
level: number[];
|
|
42
|
-
/**
|
|
43
|
-
* Fires when a row is dragged.
|
|
44
|
-
*/
|
|
45
|
-
onDrag?: (event: {
|
|
46
|
-
nativeEvent: any;
|
|
47
|
-
dragged: number[];
|
|
48
|
-
draggedOver: number[] | null;
|
|
49
|
-
draggedItem: any;
|
|
50
|
-
}) => void;
|
|
51
|
-
/**
|
|
52
|
-
* Fires when a row is dragged and dropped.
|
|
53
|
-
*/
|
|
54
|
-
onDrop?: (event: {
|
|
55
|
-
nativeEvent: any;
|
|
56
|
-
dragged: number[];
|
|
57
|
-
draggedOver: number[] | null;
|
|
58
|
-
draggedItem: any;
|
|
59
|
-
}) => void;
|
|
60
|
-
/**
|
|
61
|
-
* The expanded state of the row. Useful for applying `aria-expanded` accessibility attribute.
|
|
62
|
-
*/
|
|
63
|
-
expanded: boolean;
|
|
64
|
-
/**
|
|
65
|
-
* The index of the row. Useful for applying `aria-rowindex` accessibility attribute.
|
|
66
|
-
*/
|
|
67
|
-
rowIndex: number;
|
|
68
|
-
/**
|
|
69
|
-
* @hidden
|
|
70
|
-
*/
|
|
71
|
-
children: React.ReactNode;
|
|
72
|
-
/**
|
|
73
|
-
* @hidden
|
|
74
|
-
*/
|
|
75
|
-
levels: number[][];
|
|
76
|
-
/**
|
|
77
|
-
* @hidden
|
|
78
|
-
*/
|
|
79
|
-
isAltRow?: boolean;
|
|
80
|
-
/**
|
|
81
|
-
* The index to be applied to the `aria-rowindex` attribute.
|
|
82
|
-
*/
|
|
83
|
-
ariaRowIndex?: number;
|
|
84
|
-
/**
|
|
85
|
-
* The count of items on current level, applied to the `aria-setsize` attribute.
|
|
86
|
-
*/
|
|
87
|
-
ariaSetSize?: number;
|
|
88
|
-
/**
|
|
89
|
-
* The index of the item on current level, applied to the `aria-posinset` attribute.
|
|
90
|
-
*/
|
|
91
|
-
ariaPosInSet?: number;
|
|
92
|
-
/**
|
|
93
|
-
* Indicates if the row is selected.
|
|
94
|
-
*/
|
|
95
|
-
isSelected: boolean;
|
|
96
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
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
|
-
import { TableSelectableMode, TableSelectableSettings } from '@progress/kendo-react-data-tools';
|
|
6
|
-
/**
|
|
7
|
-
* Represents the available selection modes.
|
|
8
|
-
*/
|
|
9
|
-
export type TreeListSelectableMode = TableSelectableMode;
|
|
10
|
-
/**
|
|
11
|
-
* Represents the TreeList selectable settings.
|
|
12
|
-
*/
|
|
13
|
-
export interface TreeListSelectableSettings extends TableSelectableSettings {
|
|
14
|
-
/**
|
|
15
|
-
* The available values are:
|
|
16
|
-
* * `single`
|
|
17
|
-
* * `multiple`
|
|
18
|
-
*
|
|
19
|
-
* @default "multiple"
|
|
20
|
-
*/
|
|
21
|
-
mode?: TreeListSelectableMode;
|
|
22
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
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
|
-
import { ColumnSortSettings, SortSettings } from '@progress/kendo-react-data-tools';
|
|
6
|
-
/**
|
|
7
|
-
* The settings for sorting the TreeList columns.
|
|
8
|
-
*/
|
|
9
|
-
export type TreeListColumnSortSettings = ColumnSortSettings;
|
|
10
|
-
/**
|
|
11
|
-
* The settings for sorting the TreeList data.
|
|
12
|
-
*/
|
|
13
|
-
export type TreeListSortSettings = SortSettings;
|