@progress/kendo-react-treeview 7.2.4-develop.3 → 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.
Files changed (40) hide show
  1. package/TreeView.js +8 -0
  2. package/TreeView.mjs +256 -0
  3. package/TreeViewDragAnalyzer.js +8 -0
  4. package/TreeViewDragAnalyzer.mjs +66 -0
  5. package/TreeViewDragClue.js +8 -0
  6. package/TreeViewDragClue.mjs +58 -0
  7. package/TreeViewItem.js +8 -0
  8. package/TreeViewItem.mjs +203 -0
  9. package/dist/cdn/js/kendo-react-treeview.js +8 -5
  10. package/handleTreeViewCheckChange.js +8 -0
  11. package/handleTreeViewCheckChange.mjs +63 -0
  12. package/index.d.mts +1141 -5
  13. package/index.d.ts +1141 -20
  14. package/index.js +8 -5
  15. package/index.mjs +29 -752
  16. package/moveTreeViewItem.js +8 -0
  17. package/moveTreeViewItem.mjs +48 -0
  18. package/package-metadata.js +8 -0
  19. package/package-metadata.mjs +19 -0
  20. package/package.json +3 -3
  21. package/processTreeViewItems.js +8 -0
  22. package/processTreeViewItems.mjs +84 -0
  23. package/utils/consts.js +8 -0
  24. package/utils/consts.mjs +21 -0
  25. package/utils/getItemIdUponKeyboardNavigation.js +8 -0
  26. package/utils/getItemIdUponKeyboardNavigation.mjs +57 -0
  27. package/ItemRenderProps.d.ts +0 -17
  28. package/TreeView.d.ts +0 -133
  29. package/TreeViewDragAnalyzer.d.ts +0 -139
  30. package/TreeViewDragClue.d.ts +0 -148
  31. package/TreeViewItem.d.ts +0 -106
  32. package/TreeViewOperationDescriptors.d.ts +0 -80
  33. package/TreeViewProps.d.ts +0 -149
  34. package/events.d.ts +0 -162
  35. package/handleTreeViewCheckChange.d.ts +0 -73
  36. package/moveTreeViewItem.d.ts +0 -113
  37. package/package-metadata.d.ts +0 -9
  38. package/processTreeViewItems.d.ts +0 -55
  39. package/utils/consts.d.ts +0 -44
  40. package/utils/getItemIdUponKeyboardNavigation.d.ts +0 -9
@@ -1,148 +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
- /**
7
- * Represents the props of the KendoReact TreeViewDragClue component.
8
- */
9
- export interface TreeViewDragClueProps {
10
- /**
11
- * Sets custom CSS styles to the component.
12
- * When specified, the default CSS styles are removed.
13
- */
14
- style?: React.CSSProperties;
15
- }
16
- /**
17
- * @hidden
18
- */
19
- export interface TreeViewDragClueState {
20
- visible?: boolean;
21
- top?: number;
22
- left?: number;
23
- text?: string;
24
- operationClassName?: string;
25
- }
26
- /**
27
- * Represents the KendoReact TreeViewDragClue component which renders a clue when an item is dragged.
28
- *
29
- * @example
30
- * ```jsx
31
- * class App extends React.Component {
32
- * dragClue;
33
- * state = { tree };
34
- *
35
- * render() {
36
- * return (
37
- * <div>
38
- * <TreeView data={this.state.tree} draggable={true}
39
- * onItemDragOver={this.onItemDragOver} onItemDragEnd={this.onItemDragEnd} />
40
- * <TreeViewDragClue ref={dragClue => this.dragClue = dragClue} />
41
- * </div>
42
- * );
43
- * }
44
- *
45
- * onItemDragOver = (event) => {
46
- * this.dragClue.show(event.pageY + 10, event.pageX, event.item.text, this.getClueClassName(event));
47
- * }
48
- * onItemDragEnd = (event) => {
49
- * this.dragClue.hide();
50
- * const eventAnalyzer = new TreeViewDragAnalyzer(event).init();
51
- *
52
- * if (eventAnalyzer.isDropAllowed) {
53
- * const updatedTree = moveTreeViewItem(
54
- * event.itemHierarchicalIndex,
55
- * this.state.tree,
56
- * eventAnalyzer.getDropOperation(),
57
- * eventAnalyzer.destinationMeta.itemHierarchicalIndex,
58
- * );
59
- *
60
- * this.setState({ tree: updatedTree });
61
- * }
62
- * }
63
- * getClueClassName(event) {
64
- * const eventAnalyzer = new TreeViewDragAnalyzer(event).init();
65
- * const itemIndex = eventAnalyzer.destinationMeta.itemHierarchicalIndex;
66
- *
67
- * if (eventAnalyzer.isDropAllowed) {
68
- * switch (eventAnalyzer.getDropOperation()) {
69
- * case 'child':
70
- * return 'k-i-plus';
71
- * case 'before':
72
- * return itemIndex === '0' || itemIndex.endsWith(`${SEPARATOR}0`) ?
73
- * 'k-i-insert-up' : 'k-i-insert-middle';
74
- * case 'after':
75
- * const siblings = getSiblings(itemIndex, this.state.tree);
76
- * const lastIndex = Number(itemIndex.split(SEPARATOR).pop());
77
- *
78
- * return lastIndex < siblings.length - 1 ? 'k-i-insert-middle' : 'k-i-insert-down';
79
- * default:
80
- * break;
81
- * }
82
- * }
83
- *
84
- * return 'k-i-cancel';
85
- * }
86
- * }
87
- *
88
- * function getSiblings(itemIndex, data) {
89
- * let result = data;
90
- *
91
- * const indices = itemIndex.split(SEPARATOR).map(index => Number(index));
92
- * for (let i = 0; i < indices.length - 1; i++) {
93
- * result = result[indices[i]].items;
94
- * }
95
- *
96
- * return result;
97
- * }
98
- *
99
- * const SEPARATOR = '_';
100
- * const tree = [{
101
- * text: 'Furniture', expanded: true, items: [
102
- * { text: 'Tables & Chairs', expanded: true },
103
- * { text: 'Sofas', expanded: true },
104
- * { text: 'Occasional Furniture', expanded: true }]
105
- * }, {
106
- * text: 'Decor', expanded: true, items: [
107
- * { text: 'Bed Linen', expanded: true },
108
- * { text: 'Curtains & Blinds', expanded: true },
109
- * { text: 'Carpets', expanded: true }]
110
- * }];
111
- *
112
- * ReactDOM.render(<App />, document.querySelector('my-app'));
113
- * ```
114
- */
115
- export declare class TreeViewDragClue extends React.PureComponent<TreeViewDragClueProps, TreeViewDragClueState> {
116
- /**
117
- * @hidden
118
- */
119
- static defaultProps: {
120
- style: {
121
- display: string;
122
- position: string;
123
- zIndex: number;
124
- padding: string;
125
- };
126
- };
127
- /**
128
- * @hidden
129
- */
130
- readonly state: TreeViewDragClueState;
131
- /**
132
- * @hidden
133
- */
134
- render(): false | import("react/jsx-runtime").JSX.Element | undefined;
135
- /**
136
- * Displays the TreeViewDragClue component.
137
- *
138
- * @param top - The `top` CSS position of the component.
139
- * @param left - The `left` CSS position of the component.
140
- * @param text - The text of the component.
141
- * @param operationClassName - The CSS class name which is related to the specific drop operation.
142
- */
143
- show(top: number, left: number, text: string, operationClassName: string): void;
144
- /**
145
- * Hides the TreeViewDragClue component.
146
- */
147
- hide(): void;
148
- }
package/TreeViewItem.d.ts DELETED
@@ -1,106 +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 { TreeFieldsService } from '@progress/kendo-react-common';
7
- /**
8
- * @hidden
9
- */
10
- export declare const TreeViewItemPropsContext: React.Context<(props: TreeViewItemProps) => TreeViewItemProps>;
11
- /**
12
- * @hidden
13
- */
14
- export interface TreeViewItemProps {
15
- item: any;
16
- itemId: string;
17
- treeGuid: string;
18
- animate: boolean;
19
- focusedItemId?: string;
20
- tabbableItemId: string;
21
- fieldsService: TreeFieldsService;
22
- itemUI?: React.ComponentType<{
23
- item: any;
24
- itemHierarchicalIndex: string;
25
- }>;
26
- ariaMultiSelectable: boolean;
27
- onItemClick: any;
28
- expandIcons?: boolean;
29
- onExpandChange: any;
30
- onCheckChange: any;
31
- checkboxes?: boolean;
32
- onFocusDomElNeeded: any;
33
- draggable?: boolean;
34
- onPress: any;
35
- onDrag: any;
36
- onRelease: any;
37
- size?: null | 'small' | 'medium' | 'large';
38
- /**
39
- * @hidden
40
- *
41
- * Internal usage!!!
42
- */
43
- position?: 'top' | 'mid' | 'bot';
44
- /**
45
- * Currently for internal usage only! Replicates the current behavior which disables all children
46
- * if the parent is disabled, which was previously achieved only though the kendo-themes,
47
- * but due to rendering changes had to be replicated programmatically!
48
- *
49
- * @hidden
50
- */
51
- disabled?: boolean;
52
- /**
53
- * @hidden
54
- */
55
- isRtl?: boolean;
56
- /**
57
- * @hidden
58
- */
59
- onContextMenu: (event: React.MouseEvent<HTMLElement>, item: any, itemId: string) => void;
60
- /**
61
- * @hidden
62
- * This prop comes from the `TreeView`component.
63
- * It replaces the previously used guid() function and is used to generate unique `id` for
64
- * the checkbox and label in the TreeViewItem.
65
- */
66
- id?: string;
67
- }
68
- /**
69
- * @hidden
70
- */
71
- declare class TreeViewItemWithoutContext extends React.Component<TreeViewItemProps> {
72
- private itemElement;
73
- private checkboxElement;
74
- static defaultProps: {
75
- position: string;
76
- };
77
- render(): import("react/jsx-runtime").JSX.Element;
78
- componentDidMount(): void;
79
- componentDidUpdate(prevProps: TreeViewItemProps): void;
80
- private renderCheckbox;
81
- private renderExpandIcon;
82
- private renderSubitemsIfApplicable;
83
- private renderItemInPart;
84
- private onCheckChange;
85
- private onExpandChange;
86
- private onItemClick;
87
- private onPress;
88
- private onDrag;
89
- private onRelease;
90
- private onContextMenu;
91
- private get fieldsSvc();
92
- private get itemId();
93
- private get item();
94
- private get tabIndex();
95
- private get ariaExpanded();
96
- private get disabled();
97
- private get ariaChecked();
98
- private get ariaSelected();
99
- private getIconProps;
100
- private assignDraggableMeta;
101
- }
102
- /**
103
- * @hidden
104
- */
105
- export declare const TreeViewItem: React.ForwardRefExoticComponent<Omit<TreeViewItemProps & React.RefAttributes<TreeViewItemWithoutContext>, "ref"> & React.RefAttributes<any>>;
106
- export {};
@@ -1,80 +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 descriptors of the data operations which are applied to the TreeView component.
7
- */
8
- export interface TreeViewOperationDescriptors {
9
- /**
10
- * The hierarchical indices of the items to which the expand operation will be applied, or the descriptor of the operation.
11
- */
12
- expand?: string[] | TreeViewOperationDescriptor;
13
- /**
14
- * The hierarchical indices of the items to which the select operation will be applied, or the descriptor of the operation.
15
- */
16
- select?: string[] | TreeViewOperationDescriptor;
17
- /**
18
- * The hierarchical indices of the items to which the check operation will be applied, or the descriptor of the operation.
19
- */
20
- check?: string[] | TreeViewCheckDescriptor;
21
- /**
22
- * When the operations are applied, the corresponding items and their parents are cloned.
23
- * For performance reasons, TreeView items are cloned only once.
24
- * The name of the field which provides a Boolean representation of whether an item is already cloned.
25
- * Defaults to `cloned`.
26
- */
27
- cloneField?: string;
28
- /**
29
- * The expand field of the item.
30
- */
31
- expandField?: string;
32
- /**
33
- * The select field of the item.
34
- */
35
- selectField?: string;
36
- /**
37
- * The check field of the item.
38
- */
39
- checkField?: string;
40
- /**
41
- * The children field of the item.
42
- */
43
- childrenField?: string;
44
- }
45
- /**
46
- * The descriptor which is used for expanding, selecting, and checking.
47
- */
48
- export interface TreeViewOperationDescriptor {
49
- /**
50
- * The IDs of the items to which the operation will be applied. By default, the TreeView applies the hierarchical indices of the items. These indices are zero-based. The first root item has a `0` (zero) index. If the first root item has children, the first child acquires a `0_0` index and the second acquires a `0_1` index.
51
- */
52
- ids?: any[];
53
- /**
54
- * The name of the field which will provide a Boolean representation for the operation state of the item.
55
- *
56
- * The default fields are:
57
- * * `expanded`&mdash;Indicates that an item is expanded.
58
- * * `selected`&mdash;Indicates that an item is selected.
59
- * * `checked`&mdash;Indicates that an item is checked.
60
- */
61
- operationField?: string;
62
- /**
63
- * The name of the field which will uniquely describe an item as an alternative to its hierarchical index.
64
- */
65
- idField?: string;
66
- }
67
- /**
68
- * The descriptor which is used for checking.
69
- */
70
- export interface TreeViewCheckDescriptor extends TreeViewOperationDescriptor {
71
- /**
72
- * Determines if a parent item will have an indeterminate state when not all its children are checked.
73
- */
74
- applyCheckIndeterminate?: boolean;
75
- /**
76
- * The name of the field which will provide a Boolean representation for the indeterminate state of a parent item.
77
- * Defaults to `checkIndeterminate`.
78
- */
79
- checkIndeterminateField?: string;
80
- }
@@ -1,149 +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 { CSSProperties, ComponentType } from 'react';
6
- import * as events from './events';
7
- import { ItemRenderProps } from './ItemRenderProps';
8
- import { TreeViewContextMenuEvent } from './events';
9
- /**
10
- * Represents the props of the [KendoReact TreeView component]({% slug overview_treeview %}).
11
- */
12
- export interface TreeViewProps {
13
- /**
14
- * Sets a class of the TreeView DOM element.
15
- */
16
- className?: string;
17
- /**
18
- * Sets an `id` of the TreeView DOM element.
19
- */
20
- id?: string;
21
- /**
22
- * Sets the `style`attribute of the TreeView DOM element.
23
- */
24
- style?: CSSProperties;
25
- /**
26
- * Sets the data of the TreeView ([more information and examples]({% slug databinding_treeview %})).
27
- */
28
- data?: any[] | null;
29
- /**
30
- * Controls the animation. By default, the expand and collapse animations are enabled.
31
- */
32
- animate?: boolean;
33
- /**
34
- * Sets a tabIndex of the TreeView DOM element.
35
- */
36
- tabIndex?: number;
37
- /**
38
- * The TreeView has a built-in implementation of focusing and keyboard navigation. By default, the component uses hierarchical indices to uniquely match the focused item. You can use the `focusIdField` prop for specifying the name of the field which will uniquely describe an item as an alternative to its hierarchical index ([see example]({% slug datareload_treeview %}#toc-using-item-ids)).
39
- */
40
- focusIdField?: string;
41
- /**
42
- * When `focusIdField` is set, the TreeView executes a depth-first search on the data to find the currently focused item. The `getFocusHierarchicalIndex` prop specifies the function that will be used as an alternative to the default search algorithm.
43
- */
44
- getFocusHierarchicalIndex?: (itemId: any) => string | undefined;
45
- /**
46
- * Controls the rendering of the expand (collapse) icons. By default, the icons are not rendered ([see example]({% slug expansion_ways_treeview %})).
47
- */
48
- expandIcons?: boolean;
49
- /**
50
- * Fires when the expanding or collapsing of an item is requested ([see example]({% slug expansion_ways_treeview %})).
51
- */
52
- onExpandChange?: (event: events.TreeViewExpandChangeEvent) => void;
53
- /**
54
- * Fires when an item is clicked or when `Enter` is pressed on a focused item ([see example]({% slug selection_ways_treeview %})).
55
- */
56
- onItemClick?: (event: events.TreeViewItemClickEvent) => void;
57
- /**
58
- * Specifies the name of the field which will provide a Boolean representation for the expanded state of the item. Defaults to `expanded`.
59
- */
60
- expandField?: string;
61
- /**
62
- * Specifies the name of the field which will provide a Boolean representation for the selected state of the item. Defaults to `selected`.
63
- */
64
- selectField?: string;
65
- /**
66
- * Specifies the name of the field which indicates to the TreeView that an item has children even if the children are not initially passed. Used for implementing the load-on-demand feature ([see example]({% slug databinding_treeview %}#toc-loading-data-on-demand)). Defaults to `hasChildren`.
67
- */
68
- hasChildrenField?: string;
69
- /**
70
- * Specifies the name of the field which will provide an array representation of the item children.
71
- */
72
- childrenField?: string;
73
- /**
74
- * Specifies the name of the field which will provide a text representation for the item. Defaults to `text`.
75
- */
76
- textField?: string;
77
- /**
78
- * Specifies the name of the field which will provide a Boolean representation for the disabled state of the item. Defaults to `disabled`.
79
- */
80
- disableField?: string;
81
- /**
82
- * Defines the component that will be used for rendering each of the TreeView items ([see example]({% slug rendering_treeview %})).
83
- */
84
- item?: ComponentType<ItemRenderProps>;
85
- /**
86
- * Indicates that the user can select more than one TreeView items. If the TreeView is in a multiple selection mode, set the `aria-multiselectable` prop to `true` ([more on accessibility by the TreeView]({% slug accessibility_treeview %})).
87
- */
88
- 'aria-multiselectable'?: boolean | 'false' | 'true';
89
- /**
90
- * Defines a string value that labels the TreeView ([more on accessibility by the TreeView]({% slug accessibility_treeview %})).
91
- */
92
- 'aria-label'?: string;
93
- /**
94
- * Identifies the element or elements which will label the TreeView ([more on accessibility by the TreeView]({% slug accessibility_treeview %})).
95
- */
96
- 'aria-labelledby'?: string;
97
- /**
98
- * Controls the rendering of checkboxes. By default, the checkboxes are not rendered ([see example]({% slug check_items_directly_treeview %})).
99
- */
100
- checkboxes?: boolean;
101
- /**
102
- * Specifies the name of the field which will provide a Boolean representation for the checked state of the item. Defaults to `checked`.
103
- */
104
- checkField?: string;
105
- /**
106
- * Specifies the name of the field which will provide a Boolean representation for the check indeterminate state of the item. Defaults to `checkIndeterminate`.
107
- */
108
- checkIndeterminateField?: string;
109
- /**
110
- * Fires when a checkbox is clicked or when `Space` is pressed on a focused item ([see example]({% slug check_items_directly_treeview %})).
111
- */
112
- onCheckChange?: (event: events.TreeViewCheckChangeEvent) => void;
113
- /**
114
- * Controls the dispatching of the `drag` events. By default, the `drag` events are not dispatched ([see example]({% slug dragdrop_treeview %})).
115
- */
116
- draggable?: boolean;
117
- /**
118
- * Fires when the dragging of an item has started.
119
- */
120
- onItemDragStart?: (event: events.TreeViewItemDragStartEvent) => void;
121
- /**
122
- * Fires when a dragged item changes its position ([see example]({% slug dragdrop_treeview %})).
123
- */
124
- onItemDragOver?: (event: events.TreeViewItemDragOverEvent) => void;
125
- /**
126
- * Fires when a dragged item is dropped ([see example]({% slug dragdrop_treeview %})).
127
- */
128
- onItemDragEnd?: (event: events.TreeViewItemDragEndEvent) => void;
129
- /**
130
- * Configures the `size` of the TreeView.
131
- *
132
- * The available options are:
133
- * - small
134
- * - medium
135
- * - large
136
- * - null&mdash;Does not set a size `className`.
137
- *
138
- * @default `medium`
139
- */
140
- size?: null | 'small' | 'medium' | 'large';
141
- /**
142
- * Sets the direction of the component.
143
- */
144
- dir?: string;
145
- /**
146
- * The event that is fired when the ContextMenu is activated.
147
- */
148
- onContextMenu?: (event: TreeViewContextMenuEvent) => void;
149
- }
package/events.d.ts DELETED
@@ -1,162 +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 { BaseEvent } from '@progress/kendo-react-common';
6
- import { TreeView } from './TreeView';
7
- /**
8
- * Represents the object of the `onExpandChange` event ([see example]({% slug overview_treeview %}#toc-basic-usage)).
9
- */
10
- export interface TreeViewExpandChangeEvent extends BaseEvent<TreeView> {
11
- /**
12
- * The item that is expanded or collapsed.
13
- */
14
- item: any;
15
- /**
16
- * The hierarchical index of the item. The indices are zero-based. The first root item has a `0` (zero) index. If the first root item has children, the first child acquires a `0_0` index and the second acquires a `0_1` index.
17
- */
18
- itemHierarchicalIndex: string;
19
- }
20
- /**
21
- * Represents the object of the `onItemClick` event ([see example]({% slug overview_treeview %}#toc-basic-usage)).
22
- */
23
- export interface TreeViewItemClickEvent extends BaseEvent<TreeView> {
24
- /**
25
- * The item that is clicked.
26
- */
27
- item: any;
28
- /**
29
- * The hierarchical index of the item. The indices are zero-based.
30
- * The first root item has a `0` (zero) index. If the first root item has children, the first child acquires a `0_0` index and the second acquires a `0_1` index.
31
- */
32
- itemHierarchicalIndex: string;
33
- }
34
- /**
35
- * Represents the object of the `onCheckChange` event ([see example]({% slug check_helper_funcs_treeview %})).
36
- */
37
- export interface TreeViewCheckChangeEvent extends BaseEvent<TreeView> {
38
- /**
39
- * The item that is selected or deselected.
40
- */
41
- item: any;
42
- /**
43
- * The hierarchical index of the item. The indices are zero-based.
44
- * The first root item has a `0` (zero) index. If the first root item has children, the first child acquires a `0_0` index and the second acquires a `0_1` index.
45
- */
46
- itemHierarchicalIndex: string;
47
- }
48
- /**
49
- * Represents the object of the `onContextMenu` event ([see example]({% slug overview_treeview %}#toc-basic-usage)).
50
- */
51
- export interface TreeViewContextMenuEvent extends BaseEvent<TreeView> {
52
- /**
53
- * An event target.
54
- */
55
- target: TreeView;
56
- /**
57
- * The data object that represents the current item.
58
- */
59
- item: any;
60
- /**
61
- * The ID of the current item.
62
- */
63
- itemID: string;
64
- /**
65
- * A React Synthetic Event.
66
- */
67
- syntheticEvent: React.MouseEvent<any>;
68
- }
69
- /**
70
- * Represents the object of the `onItemDragStart` event.
71
- */
72
- export interface TreeViewItemDragStartEvent {
73
- /**
74
- * An event target.
75
- */
76
- target: TreeView;
77
- /**
78
- * The item that is dragged.
79
- */
80
- item: any;
81
- /**
82
- * The hierarchical index of the dragged item. The indices are zero-based.
83
- * The first root item has a `0` (zero) index. If the first root item has children, the first child acquires a `0_0` index and the second acquires a `0_1` index.
84
- */
85
- itemHierarchicalIndex: string;
86
- }
87
- /**
88
- * Represents the object of the `onItemDragOver` event ([see example]({% slug dragdrop_treeview %})).
89
- */
90
- export interface TreeViewItemDragOverEvent {
91
- /**
92
- * The target that is associated with the dragged item.
93
- */
94
- target: TreeView;
95
- /**
96
- * The item that is dragged.
97
- */
98
- item: any;
99
- /**
100
- * The hierarchical index of the dragged item. The indices are zero-based.
101
- * The first root item has a `0` (zero) index. If the first root item has children, the first child acquires a `0_0` index and the second acquires a `0_1` index.
102
- */
103
- itemHierarchicalIndex: string;
104
- /**
105
- * The X (horizontal) coordinate (in pixels) at which the event occurred that is relative to the left edge of the entire document.
106
- * Includes any portion of the document which is not currently visible.
107
- */
108
- pageX: number;
109
- /**
110
- * The Y (vertical) coordinate (in pixels) at which the event occurred that is relative to the whole document.
111
- * `pageY` observes any vertical scrolling of the page.
112
- */
113
- pageY: number;
114
- /**
115
- * Provides the horizontal coordinate within the client area of the application at which the event occurred
116
- * (as opposed to the coordinate within the page).
117
- */
118
- clientX: number;
119
- /**
120
- * Provides the vertical coordinate within the client area of the application at which the event occurred
121
- * (as opposed to the coordinate within the page).
122
- */
123
- clientY: number;
124
- }
125
- /**
126
- * Represents the object of the `onItemDragEnd` event ([see example]({% slug dragdrop_treeview %})).
127
- */
128
- export interface TreeViewItemDragEndEvent {
129
- /**
130
- * The target that is associated with the dragged item.
131
- */
132
- target: TreeView;
133
- /**
134
- * The item that is dragged.
135
- */
136
- item: any;
137
- /**
138
- * The hierarchical index of the dragged item. The indices are zero-based.
139
- * The first root item has a `0` (zero) index. If the first root item has children, the first child acquires a `0_0` index and the second acquires a `0_1` index.
140
- */
141
- itemHierarchicalIndex: string;
142
- /**
143
- * The X (horizontal) coordinate (in pixels) at which the event occured that is relative to the left edge of the entire document.
144
- * `pageX` includes any portion of the document that is not currently visible.
145
- */
146
- pageX: number;
147
- /**
148
- * The Y (vertical) coordinate (in pixels) at which the event occured that is relative to the whole document.
149
- * `pageY` observes any vertical scrolling of the page.
150
- */
151
- pageY: number;
152
- /**
153
- * Provides the horizontal coordinate within the client area of the application at which the event occurred
154
- * (as opposed to the coordinate within the page).
155
- */
156
- clientX: number;
157
- /**
158
- * Provides the vertical coordinate within the client area of the application at which the event occurred
159
- * (as opposed to the coordinate within the page).
160
- */
161
- clientY: number;
162
- }