@progress/kendo-angular-treeview 24.2.2 → 25.0.0-develop.2
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/fesm2022/progress-kendo-angular-treeview.mjs +114 -114
- package/index.d.ts +2149 -45
- package/package-metadata.mjs +2 -2
- package/package.json +11 -11
- package/schematics/ngAdd/index.js +4 -4
- package/check-mode.d.ts +0 -12
- package/check.directive.d.ts +0 -87
- package/checkable-settings.d.ts +0 -50
- package/checkbox/checked-state.d.ts +0 -8
- package/data-bound-component.d.ts +0 -65
- package/data-change-notification.service.d.ts +0 -12
- package/default-callbacks.d.ts +0 -38
- package/directives.d.ts +0 -37
- package/disable.directive.d.ts +0 -48
- package/drag-and-drop/drag-and-drop-editing.directive.d.ts +0 -47
- package/drag-and-drop/drag-and-drop-utils.d.ts +0 -77
- package/drag-and-drop/drag-and-drop.directive.d.ts +0 -129
- package/drag-and-drop/drag-clue/drag-clue-template.directive.d.ts +0 -33
- package/drag-and-drop/drag-clue/drag-clue.component.d.ts +0 -43
- package/drag-and-drop/drag-clue/drag-clue.service.d.ts +0 -44
- package/drag-and-drop/drop-hint/drop-hint-template.directive.d.ts +0 -32
- package/drag-and-drop/drop-hint/drop-hint.component.d.ts +0 -37
- package/drag-and-drop/drop-hint/drop-hint.service.d.ts +0 -20
- package/drag-and-drop/editing-services/drag-and-drop-asset.service.d.ts +0 -22
- package/drag-and-drop/editing-services/flat-editing.service.d.ts +0 -22
- package/drag-and-drop/editing-services/hierarchy-editing.service.d.ts +0 -19
- package/drag-and-drop/models/drop-action.d.ts +0 -31
- package/drag-and-drop/models/drop-position.d.ts +0 -21
- package/drag-and-drop/models/editing-service.d.ts +0 -21
- package/drag-and-drop/models/preventable-event.d.ts +0 -21
- package/drag-and-drop/models/scroll-direction.d.ts +0 -11
- package/drag-and-drop/models/scroll-settings.d.ts +0 -29
- package/drag-and-drop/models/tree-item-filter-state.d.ts +0 -41
- package/drag-and-drop/models/treeitem-add-remove-args.d.ts +0 -33
- package/drag-and-drop/models/treeitem-drag-event.d.ts +0 -25
- package/drag-and-drop/models/treeitem-drag-start-event.d.ts +0 -26
- package/drag-and-drop/models/treeitem-drop-event.d.ts +0 -52
- package/drag-and-drop/models.d.ts +0 -14
- package/expand-state.service.d.ts +0 -20
- package/expand.directive.d.ts +0 -92
- package/expandable-component.d.ts +0 -35
- package/filter-expand-settings.interface.d.ts +0 -35
- package/filter-state.interface.d.ts +0 -29
- package/filtering-base.d.ts +0 -39
- package/flat-binding.directive.d.ts +0 -74
- package/funcs.d.ts +0 -9
- package/hierarchy-binding.directive.d.ts +0 -70
- package/index-builder.service.d.ts +0 -17
- package/load-more/load-more-button-template.directive.d.ts +0 -30
- package/load-more/load-more-request-args.d.ts +0 -23
- package/load-more/load-more-utils.d.ts +0 -17
- package/load-more/load-more.directive.d.ts +0 -70
- package/load-more/load-more.service.d.ts +0 -36
- package/loading-indicator.directive.d.ts +0 -29
- package/loading-notification.service.d.ts +0 -15
- package/localization/custom-messages.component.d.ts +0 -28
- package/localization/localized-messages.directive.d.ts +0 -16
- package/localization/messages.d.ts +0 -17
- package/navigation/navigation-item.interface.d.ts +0 -16
- package/navigation/navigation-model.d.ts +0 -28
- package/navigation/navigation-state.interface.d.ts +0 -14
- package/navigation/navigation.service.d.ts +0 -68
- package/node-children.service.d.ts +0 -19
- package/node-click-event.interface.d.ts +0 -22
- package/node-template.directive.d.ts +0 -34
- package/package-metadata.d.ts +0 -9
- package/selection/select.directive.d.ts +0 -77
- package/selection/selectable-settings.d.ts +0 -20
- package/selection/selection-mode.d.ts +0 -12
- package/selection/selection.service.d.ts +0 -21
- package/size.d.ts +0 -8
- package/treeitem-lookup.interface.d.ts +0 -41
- package/treeitem.interface.d.ts +0 -19
- package/treeview-filter-settings.d.ts +0 -41
- package/treeview-group.component.d.ts +0 -130
- package/treeview-item-content-wrapper.directive.d.ts +0 -32
- package/treeview-item.directive.d.ts +0 -70
- package/treeview-lookup.service.d.ts +0 -25
- package/treeview.component.d.ts +0 -380
- package/treeview.module.d.ts +0 -43
- package/utils.d.ts +0 -138
package/index.d.ts
CHANGED
|
@@ -2,48 +2,2152 @@
|
|
|
2
2
|
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
5
|
+
import * as i0 from '@angular/core';
|
|
6
|
+
import { EventEmitter, TemplateRef, OnChanges, OnInit, AfterViewInit, OnDestroy, ElementRef, ChangeDetectorRef, ViewContainerRef, TrackByFunction, NgZone, Renderer2, SimpleChanges, ComponentRef, AfterContentInit } from '@angular/core';
|
|
7
|
+
import { LocalizationService, ComponentMessages } from '@progress/kendo-angular-l10n';
|
|
8
|
+
import { Subject, Observable, BehaviorSubject, Subscription } from 'rxjs';
|
|
9
|
+
import { SVGIcon } from '@progress/kendo-svg-icons';
|
|
10
|
+
import { TextBoxComponent } from '@progress/kendo-angular-inputs';
|
|
11
|
+
import { Draggable } from '@progress/kendo-draggable';
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Represents the checked state of the CheckBox component.
|
|
15
|
+
*/
|
|
16
|
+
type CheckedState = 'none' | 'indeterminate' | 'checked';
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* @hidden
|
|
20
|
+
*/
|
|
21
|
+
declare class DataChangeNotificationService {
|
|
22
|
+
readonly changes: EventEmitter<void>;
|
|
23
|
+
notify(): void;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* @hidden
|
|
28
|
+
*/
|
|
29
|
+
declare class ExpandStateService {
|
|
30
|
+
changes: Subject<{
|
|
31
|
+
dataItem: any;
|
|
32
|
+
expand: boolean;
|
|
33
|
+
index: string;
|
|
34
|
+
}>;
|
|
35
|
+
expand(index: any, dataItem: any): void;
|
|
36
|
+
collapse(index: any, dataItem: any): void;
|
|
37
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ExpandStateService, never>;
|
|
38
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ExpandStateService>;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* @hidden
|
|
43
|
+
*/
|
|
44
|
+
interface NavigationItem {
|
|
45
|
+
id: number;
|
|
46
|
+
children: NavigationItem[];
|
|
47
|
+
index: string;
|
|
48
|
+
parent: NavigationItem;
|
|
49
|
+
disabled: boolean;
|
|
50
|
+
visible: boolean;
|
|
51
|
+
loadMoreButton: boolean;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* @hidden
|
|
56
|
+
*/
|
|
57
|
+
declare class NavigationModel {
|
|
58
|
+
private ib;
|
|
59
|
+
private nodes;
|
|
60
|
+
firstVisibleNode(): NavigationItem;
|
|
61
|
+
lastVisibleNode(): NavigationItem;
|
|
62
|
+
closestNode(index: string): NavigationItem;
|
|
63
|
+
firstFocusableNode(): NavigationItem;
|
|
64
|
+
findNode(index: string): NavigationItem;
|
|
65
|
+
findParent(index: string): NavigationItem;
|
|
66
|
+
findVisibleChild(index: string): NavigationItem;
|
|
67
|
+
findVisiblePrev(item: NavigationItem): NavigationItem;
|
|
68
|
+
findVisibleNext(item: NavigationItem): NavigationItem;
|
|
69
|
+
registerItem(id: number, index: string, disabled: boolean, loadMoreButton?: boolean, visible?: boolean): void;
|
|
70
|
+
unregisterItem(id: number, index: string): void;
|
|
71
|
+
private childLevel;
|
|
72
|
+
private container;
|
|
73
|
+
private find;
|
|
74
|
+
private insert;
|
|
75
|
+
private visibleSibling;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* @hidden
|
|
80
|
+
*/
|
|
81
|
+
interface NavigationState {
|
|
82
|
+
expand: boolean;
|
|
83
|
+
isFocused: boolean;
|
|
84
|
+
index: string;
|
|
85
|
+
shouldScroll: boolean;
|
|
86
|
+
shouldFocus: boolean;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Represents the available selection modes of the TreeView component.
|
|
91
|
+
*
|
|
92
|
+
* The possible values are:
|
|
93
|
+
* * `"single"`—Only one item can be selected at a time.
|
|
94
|
+
* * `"multiple"`—Multiple items can be selected.
|
|
95
|
+
*/
|
|
96
|
+
type SelectionMode = "single" | "multiple";
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* @hidden
|
|
100
|
+
*/
|
|
101
|
+
declare class NavigationService {
|
|
102
|
+
private localization;
|
|
103
|
+
readonly expands: Subject<NavigationState>;
|
|
104
|
+
readonly moves: Subject<NavigationState>;
|
|
105
|
+
readonly checks: Subject<string>;
|
|
106
|
+
readonly selects: Subject<string>;
|
|
107
|
+
readonly deselectAllButCurrentItem: Subject<any>;
|
|
108
|
+
readonly loadMore: Subject<string>;
|
|
109
|
+
navigable: boolean;
|
|
110
|
+
selection: SelectionMode;
|
|
111
|
+
isTreeViewActive: boolean;
|
|
112
|
+
get model(): NavigationModel;
|
|
113
|
+
set model(model: NavigationModel);
|
|
114
|
+
actions: {
|
|
115
|
+
[x: string]: Function;
|
|
116
|
+
};
|
|
117
|
+
private activeItem;
|
|
118
|
+
private isFocused;
|
|
119
|
+
private shouldScroll;
|
|
120
|
+
private shouldFocus;
|
|
121
|
+
private _model;
|
|
122
|
+
private get activeIndex();
|
|
123
|
+
private get isActiveExpanded();
|
|
124
|
+
private get isLoadMoreButton();
|
|
125
|
+
get focusableItem(): NavigationItem;
|
|
126
|
+
constructor(localization: LocalizationService);
|
|
127
|
+
activate(item: NavigationItem, shouldScroll?: boolean, shouldFocus?: boolean): void;
|
|
128
|
+
activateParent(index: string, shouldFocus?: boolean): void;
|
|
129
|
+
activateIndex(index: string, shouldFocus?: boolean): void;
|
|
130
|
+
activateClosest(index: string): void;
|
|
131
|
+
activateFocusable(): void;
|
|
132
|
+
setFocusableItem(index: string): void;
|
|
133
|
+
deactivate(): void;
|
|
134
|
+
checkIndex(index: string): void;
|
|
135
|
+
selectIndex(index: string): void;
|
|
136
|
+
notifyLoadMore(index: string): void;
|
|
137
|
+
isActive(index: string): boolean;
|
|
138
|
+
isFocusable(index: string): boolean;
|
|
139
|
+
isDisabled(index: string): boolean;
|
|
140
|
+
registerItem(id: number, index: string, disabled: boolean, loadMoreButton?: boolean, visible?: boolean): void;
|
|
141
|
+
updateItem(index: string, disabled: boolean, visible?: boolean): void;
|
|
142
|
+
unregisterItem(id: number, index: string): void;
|
|
143
|
+
move(e: any): void;
|
|
144
|
+
private expand;
|
|
145
|
+
private moveToParent;
|
|
146
|
+
private moveToFirstVisibleChild;
|
|
147
|
+
private notifyExpand;
|
|
148
|
+
private notifyMove;
|
|
149
|
+
private navigationState;
|
|
150
|
+
private handleEnter;
|
|
151
|
+
private handleSpace;
|
|
152
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NavigationService, never>;
|
|
153
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<NavigationService>;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* Represents a TreeView node.
|
|
158
|
+
*/
|
|
159
|
+
interface TreeItem {
|
|
160
|
+
/**
|
|
161
|
+
* The data item associated with the TreeView node
|
|
162
|
+
* ([see example](https://www.telerik.com/kendo-angular-ui/components/treeview/selection#modifying-the-selection-behavior)).
|
|
163
|
+
*/
|
|
164
|
+
dataItem: any;
|
|
165
|
+
/**
|
|
166
|
+
* The auto-generated hierarchical index of the TreeView node
|
|
167
|
+
* ([see example](https://www.telerik.com/kendo-angular-ui/components/treeview/selection#modifying-the-selection-behavior)).
|
|
168
|
+
*/
|
|
169
|
+
index: string;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* @hidden
|
|
174
|
+
*/
|
|
175
|
+
declare class NodeChildrenService {
|
|
176
|
+
changes: Subject<{
|
|
177
|
+
item: TreeItem;
|
|
178
|
+
children: TreeItem[];
|
|
179
|
+
}>;
|
|
180
|
+
childrenLoaded(item: TreeItem, children: TreeItem[]): void;
|
|
181
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NodeChildrenService, never>;
|
|
182
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<NodeChildrenService>;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* Represents the arguments for the `nodeClick` event.
|
|
187
|
+
*/
|
|
188
|
+
interface NodeClickEvent {
|
|
189
|
+
/**
|
|
190
|
+
* The clicked `TreeItem`.
|
|
191
|
+
*/
|
|
192
|
+
item?: TreeItem;
|
|
193
|
+
/**
|
|
194
|
+
* The DOM event that triggers the node click event.
|
|
195
|
+
*/
|
|
196
|
+
originalEvent?: any;
|
|
197
|
+
/**
|
|
198
|
+
* The type of click event that occurred.
|
|
199
|
+
*/
|
|
200
|
+
type?: 'click' | 'contextmenu';
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* Represents the template for TreeView nodes ([more information and example](https://www.telerik.com/kendo-angular-ui/components/treeview/node-template)).
|
|
205
|
+
*
|
|
206
|
+
* Use this template to customize the content of the nodes. To define the node template, nest an `<ng-template>`
|
|
207
|
+
* tag with the `kendoTreeViewNodeTemplate` directive inside a `<kendo-treeview>` tag.
|
|
208
|
+
*
|
|
209
|
+
* The template context provides the node data item and its hierarchical index as variables:
|
|
210
|
+
*
|
|
211
|
+
* - `let-dataItem`—The data item for the current node.
|
|
212
|
+
* - `let-index="index"`—The hierarchical index of the current node.
|
|
213
|
+
*
|
|
214
|
+
* @example
|
|
215
|
+
* ```html
|
|
216
|
+
* <kendo-treeview>
|
|
217
|
+
* <ng-template kendoTreeViewNodeTemplate let-dataItem let-index="index">
|
|
218
|
+
* <span [style.fontWeight]="dataItem.items ? 'bolder': 'normal' ">
|
|
219
|
+
* {{ index }}: {{ dataItem.text }}
|
|
220
|
+
* </span>
|
|
221
|
+
* </ng-template>
|
|
222
|
+
* </kendo-treeview>
|
|
223
|
+
* ```
|
|
224
|
+
*/
|
|
225
|
+
declare class NodeTemplateDirective {
|
|
226
|
+
templateRef: TemplateRef<any>;
|
|
227
|
+
constructor(templateRef: TemplateRef<any>);
|
|
228
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NodeTemplateDirective, [{ optional: true; }]>;
|
|
229
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<NodeTemplateDirective, "[kendoTreeViewNodeTemplate]", never, {}, {}, never, never, true, never>;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
/**
|
|
233
|
+
* Represents a directive for customizing the load more button in the TreeView.
|
|
234
|
+
*
|
|
235
|
+
* To define the template, nest an `<ng-template>` tag with the `kendoTreeViewLoadMoreButtonTemplate` directive inside a `<kendo-treeview>` tag
|
|
236
|
+
* ([see example](https://www.telerik.com/kendo-angular-ui/components/treeview/load-more-button#button-template)).
|
|
237
|
+
*
|
|
238
|
+
* The template context provides the following variable:
|
|
239
|
+
* - `let-index="index"`—The hierarchical index of the load more button node.
|
|
240
|
+
*
|
|
241
|
+
* @example
|
|
242
|
+
* ```html
|
|
243
|
+
* <kendo-treeview>
|
|
244
|
+
* <ng-template kendoTreeViewLoadMoreButtonTemplate let-index="index">
|
|
245
|
+
* Load more at {{ index }}
|
|
246
|
+
* </ng-template>
|
|
247
|
+
* </kendo-treeview>
|
|
248
|
+
* ```
|
|
249
|
+
*/
|
|
250
|
+
declare class LoadMoreButtonTemplateDirective {
|
|
251
|
+
templateRef: TemplateRef<any>;
|
|
252
|
+
constructor(templateRef: TemplateRef<any>);
|
|
253
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LoadMoreButtonTemplateDirective, [{ optional: true; }]>;
|
|
254
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<LoadMoreButtonTemplateDirective, "[kendoTreeViewLoadMoreButtonTemplate]", never, {}, {}, never, never, true, never>;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
/**
|
|
258
|
+
* Represents the attempted drop action during dragging.
|
|
259
|
+
* Passed as `action` value to the [`kendoTreeViewDragClueTemplate`](https://www.telerik.com/kendo-angular-ui/components/treeview/api/dragcluetemplatedirective) directive.
|
|
260
|
+
* By default, this value defines the rendered icon in the drag clue.
|
|
261
|
+
*/
|
|
262
|
+
declare enum DropAction {
|
|
263
|
+
/**
|
|
264
|
+
* The dragged item is added as a child to the target node.
|
|
265
|
+
*/
|
|
266
|
+
Add = 0,
|
|
267
|
+
/**
|
|
268
|
+
* The dragged item is inserted above the target node at the same level.
|
|
269
|
+
*/
|
|
270
|
+
InsertTop = 1,
|
|
271
|
+
/**
|
|
272
|
+
* The dragged item is inserted below the target node at the same level.
|
|
273
|
+
*/
|
|
274
|
+
InsertBottom = 2,
|
|
275
|
+
/**
|
|
276
|
+
* The dragged item is inserted in the middle position relative to the target node.
|
|
277
|
+
*/
|
|
278
|
+
InsertMiddle = 3,
|
|
279
|
+
/**
|
|
280
|
+
* The drop action is not valid for the current target location.
|
|
281
|
+
*/
|
|
282
|
+
Invalid = 4
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
/**
|
|
286
|
+
* Specifies where a dragged item is dropped relative to the target item.
|
|
287
|
+
*/
|
|
288
|
+
declare enum DropPosition {
|
|
289
|
+
/**
|
|
290
|
+
* The item is dropped over the target item.
|
|
291
|
+
*/
|
|
292
|
+
Over = 0,
|
|
293
|
+
/**
|
|
294
|
+
* The item is dropped before the target item.
|
|
295
|
+
*/
|
|
296
|
+
Before = 1,
|
|
297
|
+
/**
|
|
298
|
+
* The item is dropped after the target item.
|
|
299
|
+
*/
|
|
300
|
+
After = 2
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
/**
|
|
304
|
+
* Defines the auto-scrolling behavior during drag-and-drop operations in the TreeView.
|
|
305
|
+
* When enabled, the first scrollable container above the TreeView will scroll automatically
|
|
306
|
+
* when the dragged item reaches the top or bottom edge of that container.
|
|
307
|
+
*/
|
|
308
|
+
interface DragAndDropScrollSettings {
|
|
309
|
+
/**
|
|
310
|
+
* Determines whether auto-scrolling is enabled during drag-and-drop.
|
|
311
|
+
*
|
|
312
|
+
* @default true
|
|
313
|
+
*/
|
|
314
|
+
enabled?: boolean;
|
|
315
|
+
/**
|
|
316
|
+
* The number of pixels to scroll per step.
|
|
317
|
+
*
|
|
318
|
+
* @default 1
|
|
319
|
+
*/
|
|
320
|
+
step?: number;
|
|
321
|
+
/**
|
|
322
|
+
* The interval in milliseconds between scroll steps.
|
|
323
|
+
*
|
|
324
|
+
* @default 1
|
|
325
|
+
*/
|
|
326
|
+
interval?: number;
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
/**
|
|
330
|
+
* @hidden
|
|
331
|
+
*/
|
|
332
|
+
declare class PreventableEvent {
|
|
333
|
+
private prevented;
|
|
334
|
+
/**
|
|
335
|
+
* Prevents the default action for a specified event.
|
|
336
|
+
* In this way, the source component suppresses the built-in behavior that follows the event.
|
|
337
|
+
*/
|
|
338
|
+
preventDefault(): void;
|
|
339
|
+
/**
|
|
340
|
+
* If the event is prevented by any of its subscribers, returns `true`.
|
|
341
|
+
*
|
|
342
|
+
* @returns `true` if the default action was prevented. Otherwise, returns `false`.
|
|
343
|
+
*/
|
|
344
|
+
isDefaultPrevented(): boolean;
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
/**
|
|
348
|
+
* Represents a node-tree lookup structure that stores information about the current node, its parent, and its children
|
|
349
|
+
* ([see example](https://www.telerik.com/kendo-angular-ui/components/treeview/checkboxes#modifying-the-checked-state)).
|
|
350
|
+
*/
|
|
351
|
+
interface ItemLookup {
|
|
352
|
+
/**
|
|
353
|
+
* The current `TreeItem` instance.
|
|
354
|
+
*/
|
|
355
|
+
item: TreeItem;
|
|
356
|
+
/**
|
|
357
|
+
* The children of the current node.
|
|
358
|
+
*/
|
|
359
|
+
children?: TreeItem[];
|
|
360
|
+
/**
|
|
361
|
+
* The parent of the current node.
|
|
362
|
+
*/
|
|
363
|
+
parent?: ItemLookup;
|
|
364
|
+
}
|
|
365
|
+
/**
|
|
366
|
+
* Represents a node-tree lookup structure that stores information about the current node, its parent, and its children.
|
|
367
|
+
* Used in the [`checkedChange`](https://www.telerik.com/kendo-angular-ui/components/treeview/api/treeviewcomponent#checkedchange) event of the TreeView ([see example](https://www.telerik.com/kendo-angular-ui/components/treeview/checkboxes#modifying-the-checked-state)).
|
|
368
|
+
*/
|
|
369
|
+
interface TreeItemLookup {
|
|
370
|
+
/**
|
|
371
|
+
* The current `TreeItem` instance.
|
|
372
|
+
*/
|
|
373
|
+
item: TreeItem;
|
|
374
|
+
/**
|
|
375
|
+
* The lookup details for the parent of the current TreeView node.
|
|
376
|
+
*/
|
|
377
|
+
parent?: ItemLookup;
|
|
378
|
+
/**
|
|
379
|
+
* The lookup details for the children of the current TreeView node.
|
|
380
|
+
*/
|
|
381
|
+
children?: TreeItemLookup[];
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
/**
|
|
385
|
+
* Provides information for TreeView drag-and-drop [`addItem`](https://www.telerik.com/kendo-angular-ui/components/treeview/api/treeviewcomponent#additem)
|
|
386
|
+
* and [`removeItem`](https://www.telerik.com/kendo-angular-ui/components/treeview/api/treeviewcomponent#removeitem) events.
|
|
387
|
+
*/
|
|
388
|
+
interface TreeItemAddRemoveArgs {
|
|
389
|
+
/**
|
|
390
|
+
* Reference to the TreeView from which the dragged item originates.
|
|
391
|
+
*/
|
|
392
|
+
sourceTree: TreeViewComponent;
|
|
393
|
+
/**
|
|
394
|
+
* Reference to the TreeView onto which the dragged item is dropped.
|
|
395
|
+
*/
|
|
396
|
+
destinationTree: TreeViewComponent;
|
|
397
|
+
/**
|
|
398
|
+
* Lookup information for the dragged item.
|
|
399
|
+
*/
|
|
400
|
+
sourceItem: TreeItemLookup;
|
|
401
|
+
/**
|
|
402
|
+
* Lookup information for the item onto which the dragged item is dropped.
|
|
403
|
+
*/
|
|
404
|
+
destinationItem: TreeItemLookup;
|
|
405
|
+
/**
|
|
406
|
+
* Represents the drop position relative to the target item.
|
|
407
|
+
*/
|
|
408
|
+
dropPosition: DropPosition;
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
/**
|
|
412
|
+
* Arguments for the TreeView [`nodeDrop`](https://www.telerik.com/kendo-angular-ui/components/treeview/api/treeviewcomponent#nodedrop) event.
|
|
413
|
+
*/
|
|
414
|
+
declare class TreeItemDropEvent extends PreventableEvent implements TreeItemAddRemoveArgs {
|
|
415
|
+
/**
|
|
416
|
+
* Reference to the TreeView from which the dragged item originates.
|
|
417
|
+
*/
|
|
418
|
+
sourceTree: TreeViewComponent;
|
|
419
|
+
/**
|
|
420
|
+
* Reference to the TreeView onto which the dragged item is dropped.
|
|
421
|
+
*/
|
|
422
|
+
destinationTree: TreeViewComponent;
|
|
423
|
+
/**
|
|
424
|
+
* Lookup information for the dragged item.
|
|
425
|
+
*/
|
|
426
|
+
sourceItem: TreeItemLookup;
|
|
427
|
+
/**
|
|
428
|
+
* Lookup information for the item onto which the dragged item is dropped.
|
|
429
|
+
*/
|
|
430
|
+
destinationItem: TreeItemLookup;
|
|
431
|
+
/**
|
|
432
|
+
* Represents the drop position relative to the target item.
|
|
433
|
+
*/
|
|
434
|
+
dropPosition: DropPosition;
|
|
435
|
+
/**
|
|
436
|
+
* The original pointer event containing details about the pointer position.
|
|
437
|
+
*/
|
|
438
|
+
originalEvent: PointerEvent;
|
|
439
|
+
/**
|
|
440
|
+
* @hidden
|
|
441
|
+
*/
|
|
442
|
+
isValid: boolean;
|
|
443
|
+
/**
|
|
444
|
+
* @hidden
|
|
445
|
+
*/
|
|
446
|
+
constructor(initializer: TreeItemAddRemoveArgs, originalEvent: PointerEvent);
|
|
447
|
+
/**
|
|
448
|
+
* Sets whether the drop action is valid.
|
|
449
|
+
* If set to `false`, the `addItem` and `removeItem` events will not be fired and the drag clue
|
|
450
|
+
* will animate back to the source item to indicate the action is invalid.
|
|
451
|
+
*/
|
|
452
|
+
setValid(isValid: boolean): void;
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
/**
|
|
456
|
+
* Arguments for the TreeView [`nodeDragStart`](https://www.telerik.com/kendo-angular-ui/components/treeview/api/treeviewcomponent#nodedragstart) event.
|
|
457
|
+
*/
|
|
458
|
+
declare class TreeItemDragStartEvent extends PreventableEvent {
|
|
459
|
+
/**
|
|
460
|
+
* Lookup information for the dragged item.
|
|
461
|
+
*/
|
|
462
|
+
sourceItem: TreeItemLookup;
|
|
463
|
+
/**
|
|
464
|
+
* The original pointer event containing details about the pointer position.
|
|
465
|
+
*/
|
|
466
|
+
originalEvent: PointerEvent;
|
|
467
|
+
/**
|
|
468
|
+
* @hidden
|
|
469
|
+
*/
|
|
470
|
+
constructor(initializer: {
|
|
471
|
+
sourceItem: TreeItemLookup;
|
|
472
|
+
originalEvent: PointerEvent;
|
|
473
|
+
});
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
/**
|
|
477
|
+
* Arguments for the TreeView [`nodeDrag`](https://www.telerik.com/kendo-angular-ui/components/treeview/api/treeviewcomponent#nodedrag) and
|
|
478
|
+
* [`nodeDragEnd`](https://www.telerik.com/kendo-angular-ui/components/treeview/api/treeviewcomponent#nodedragend) events.
|
|
479
|
+
*/
|
|
480
|
+
declare class TreeItemDragEvent {
|
|
481
|
+
/** @hidden */
|
|
482
|
+
constructor();
|
|
483
|
+
/**
|
|
484
|
+
* Lookup information for the dragged item.
|
|
485
|
+
*/
|
|
486
|
+
sourceItem: TreeItemLookup;
|
|
487
|
+
/**
|
|
488
|
+
* Lookup information for the item currently under the dragged node, if any.
|
|
489
|
+
*/
|
|
490
|
+
destinationItem: TreeItemLookup;
|
|
491
|
+
/**
|
|
492
|
+
* The original pointer event containing details about the pointer position.
|
|
493
|
+
*/
|
|
494
|
+
originalEvent: PointerEvent;
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
/**
|
|
498
|
+
* Specifies the handlers called on drag-and-drop [`addItem`](https://www.telerik.com/kendo-angular-ui/components/treeview/api/treeviewcomponent#additem)
|
|
499
|
+
* and [`removeItem`](https://www.telerik.com/kendo-angular-ui/components/treeview/api/treeviewcomponent#removeitem) events.
|
|
500
|
+
*
|
|
501
|
+
* Implement this interface to handle the addition and removal of items during drag-and-drop operations in the TreeView.
|
|
502
|
+
*/
|
|
503
|
+
interface EditService {
|
|
504
|
+
/**
|
|
505
|
+
* Called when an item is added via drag-and-drop. Represents the event handler of the [`addItem`](https://www.telerik.com/kendo-angular-ui/components/treeview/api/treeviewcomponent#additem) event.
|
|
506
|
+
*/
|
|
507
|
+
add: (args: TreeItemAddRemoveArgs) => void;
|
|
508
|
+
/**
|
|
509
|
+
* Called when an item is removed via drag-and-drop. Represents the event handler of the [`removeItem`](https://www.telerik.com/kendo-angular-ui/components/treeview/api/treeviewcomponent#removeitem) event.
|
|
510
|
+
*/
|
|
511
|
+
remove: (args: TreeItemAddRemoveArgs) => void;
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
/**
|
|
515
|
+
* Represents a hierarchical node in the TreeView filter state.
|
|
516
|
+
* Used as a lookup structure to persist information about the current node, its filter state, parent, and child nodes.
|
|
517
|
+
* Utilized in the [`filterStateChange`](https://www.telerik.com/kendo-angular-ui/components/treeview/api/treeviewcomponent#filterstatechange) event.
|
|
518
|
+
*/
|
|
519
|
+
interface TreeItemFilterState {
|
|
520
|
+
/**
|
|
521
|
+
* The data item associated with the node.
|
|
522
|
+
*/
|
|
523
|
+
dataItem: any;
|
|
524
|
+
/**
|
|
525
|
+
* The hierarchical index of the node.
|
|
526
|
+
*/
|
|
527
|
+
index: string;
|
|
528
|
+
/**
|
|
529
|
+
* The parent of the current node.
|
|
530
|
+
*/
|
|
531
|
+
parent: TreeItemFilterState;
|
|
532
|
+
/**
|
|
533
|
+
* The child nodes of the current node.
|
|
534
|
+
*/
|
|
535
|
+
children?: TreeItemFilterState[];
|
|
536
|
+
/**
|
|
537
|
+
* Indicates whether the node matches the current filter.
|
|
538
|
+
*/
|
|
539
|
+
isMatch?: boolean;
|
|
540
|
+
/**
|
|
541
|
+
* Determines whether the node is visible or hidden by the filter.
|
|
542
|
+
* A node can be visible even if it does not directly match the filter.
|
|
543
|
+
* For example, the node is visible if it is a parent of a matching node or a child of a matching node in `"lenient"` filter mode.
|
|
544
|
+
*/
|
|
545
|
+
visible: boolean;
|
|
546
|
+
/**
|
|
547
|
+
* Determines whether any child node matches the filter or contains matching nodes.
|
|
548
|
+
*/
|
|
549
|
+
containsMatches?: boolean;
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
/**
|
|
553
|
+
* Represents the filter settings for the TreeView component.
|
|
554
|
+
*/
|
|
555
|
+
interface TreeViewFilterSettings {
|
|
556
|
+
/**
|
|
557
|
+
* Sets the filter operator for comparing values.
|
|
558
|
+
*
|
|
559
|
+
* You can use a string operator or a custom matcher function.
|
|
560
|
+
*
|
|
561
|
+
*/
|
|
562
|
+
operator?: 'contains' | 'doesnotcontain' | 'startswith' | 'doesnotstartwith' | 'endswith' | 'doesnotendwith' | MatcherFunction;
|
|
563
|
+
/**
|
|
564
|
+
* Specifies if the string comparison ignores case.
|
|
565
|
+
*
|
|
566
|
+
* @default true
|
|
567
|
+
*/
|
|
568
|
+
ignoreCase?: boolean;
|
|
569
|
+
/**
|
|
570
|
+
* Sets the filtering mode. In `"strict"` mode, the TreeView shows only matching nodes without any child nodes. In `"lenient"` mode, the TreeView includes all child nodes of each filter match.
|
|
571
|
+
*
|
|
572
|
+
* @default "lenient"
|
|
573
|
+
*/
|
|
574
|
+
mode?: "strict" | "lenient";
|
|
575
|
+
}
|
|
576
|
+
/**
|
|
577
|
+
* Represents a function that checks if a match is valid based on a source text and a term.
|
|
578
|
+
*
|
|
579
|
+
* @example
|
|
580
|
+
* ```typescript
|
|
581
|
+
* const matcher: MatcherFunction = (dataItem: object, searchTerm: string) => dataItem.firstName.indexOf(searchTerm) >= 0;
|
|
582
|
+
* ```
|
|
583
|
+
*/
|
|
584
|
+
type MatcherFunction = (dataItem: any, term: string, ignoreCase?: boolean) => boolean;
|
|
585
|
+
|
|
586
|
+
/**
|
|
587
|
+
* Represents the current filter state of the TreeView.
|
|
588
|
+
* Emitted by the [`filterStateChange`](https://www.telerik.com/kendo-angular-ui/components/treeview/api/treeviewcomponent#filterstatechange) event.
|
|
589
|
+
*/
|
|
590
|
+
interface FilterState {
|
|
591
|
+
/**
|
|
592
|
+
* The list of TreeView node wrappers containing metadata about the current filtered state.
|
|
593
|
+
* Useful for custom implementations of auto-expanding nodes triggered by filtering.
|
|
594
|
+
*/
|
|
595
|
+
nodes: TreeItemFilterState[];
|
|
596
|
+
/**
|
|
597
|
+
* The number of nodes that match the current filter term.
|
|
598
|
+
*/
|
|
599
|
+
matchCount: number;
|
|
600
|
+
/**
|
|
601
|
+
* The current filter term applied to the TreeView.
|
|
602
|
+
*/
|
|
603
|
+
term: string;
|
|
604
|
+
/**
|
|
605
|
+
* The filter settings used for the current filter operation.
|
|
606
|
+
*/
|
|
607
|
+
filterSettings: TreeViewFilterSettings;
|
|
608
|
+
}
|
|
609
|
+
|
|
610
|
+
/**
|
|
611
|
+
* @hidden
|
|
612
|
+
*
|
|
613
|
+
* An injection token used by the data binding directives to interface with
|
|
614
|
+
* the TreeView or the DropDownTree components.
|
|
615
|
+
*/
|
|
616
|
+
declare abstract class DataBoundComponent {
|
|
617
|
+
/**
|
|
618
|
+
* The nodes which will be displayed by the TreeView.
|
|
619
|
+
*/
|
|
620
|
+
abstract nodes: any[];
|
|
621
|
+
/**
|
|
622
|
+
* A function which determines if a specific node has child nodes.
|
|
623
|
+
*/
|
|
624
|
+
abstract hasChildren: (item: object) => boolean;
|
|
625
|
+
/**
|
|
626
|
+
* A function which provides the child nodes for a given parent node.
|
|
627
|
+
*/
|
|
628
|
+
abstract children: (item: object) => Observable<object[]>;
|
|
629
|
+
/**
|
|
630
|
+
* Specifies the handlers called on TreeView drag-and-drop `addItem` and `removeItem` events.
|
|
631
|
+
*/
|
|
632
|
+
abstract editService?: EditService;
|
|
633
|
+
/**
|
|
634
|
+
* A callback function which accepts the data object for a TreeView node and returns a boolean.
|
|
635
|
+
* If it returns `false`, the node will not be displayed. Used for the component's built-in or custom filtering implementation.
|
|
636
|
+
*/
|
|
637
|
+
abstract isVisible: (item: object, index: string) => boolean;
|
|
638
|
+
/**
|
|
639
|
+
* Sets an initial value of the built-in input element used for filtering.
|
|
640
|
+
*/
|
|
641
|
+
abstract filter: string;
|
|
642
|
+
/**
|
|
643
|
+
* Fires when the value of the built-in filter input element changes.
|
|
644
|
+
*/
|
|
645
|
+
abstract filterChange: EventEmitter<string>;
|
|
646
|
+
/**
|
|
647
|
+
* The fields of the data item that provide the text content of the nodes
|
|
648
|
+
* ([see example](https://www.telerik.com/kendo-angular-ui/components/treeview/data-binding)). If the `textField` input is set
|
|
649
|
+
* to an array, each hierarchical level uses the field that corresponds to the same
|
|
650
|
+
* index in the array, or the last item in the array.
|
|
651
|
+
*/
|
|
652
|
+
abstract textField: string | string[];
|
|
653
|
+
/**
|
|
654
|
+
* Triggers the TreeView nodes preloading mechanism.
|
|
655
|
+
* Should be triggered after the `nodes`, `children` and `hasChildren` props are set.
|
|
656
|
+
*/
|
|
657
|
+
abstract preloadChildNodes?: () => void;
|
|
658
|
+
/**
|
|
659
|
+
* Emits when the built-in filtering mechanism in the data-binding directives updates the filtered state.
|
|
660
|
+
* Used for the built-in auto-expand functionalities of the component and available for custom implementations.
|
|
661
|
+
*/
|
|
662
|
+
abstract filterStateChange?: EventEmitter<FilterState>;
|
|
663
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DataBoundComponent, never>;
|
|
664
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DataBoundComponent>;
|
|
665
|
+
}
|
|
666
|
+
|
|
667
|
+
/**
|
|
668
|
+
* @hidden
|
|
669
|
+
*/
|
|
670
|
+
declare class SelectionService {
|
|
671
|
+
readonly changes: Subject<{
|
|
672
|
+
dataItem: any;
|
|
673
|
+
index: string;
|
|
674
|
+
}>;
|
|
675
|
+
private firstIndex;
|
|
676
|
+
isFirstSelected(index: string): boolean;
|
|
677
|
+
setFirstSelected(index: string, selected: boolean): void;
|
|
678
|
+
select(index: string, dataItem: any): void;
|
|
679
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SelectionService, never>;
|
|
680
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<SelectionService>;
|
|
681
|
+
}
|
|
682
|
+
|
|
683
|
+
/**
|
|
684
|
+
* @hidden
|
|
685
|
+
*/
|
|
686
|
+
declare class TreeViewLookupService {
|
|
687
|
+
private map;
|
|
688
|
+
reset(): void;
|
|
689
|
+
registerItem(item: TreeItem, parent?: TreeItem): void;
|
|
690
|
+
registerChildren(index: string, children: TreeItem[]): void;
|
|
691
|
+
unregisterItem(index: string, dataItem: any): void;
|
|
692
|
+
replaceItem(index: string, item: TreeItem, parent?: TreeItem): void;
|
|
693
|
+
itemLookup(index: string): TreeItemLookup;
|
|
694
|
+
hasItem(index: string): boolean;
|
|
695
|
+
item(index: string): ItemLookup;
|
|
696
|
+
private addToParent;
|
|
697
|
+
private mapChildren;
|
|
698
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TreeViewLookupService, never>;
|
|
699
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<TreeViewLookupService>;
|
|
700
|
+
}
|
|
701
|
+
|
|
702
|
+
/**
|
|
703
|
+
* Represents the arguments that the [`loadMoreNodes`](https://www.telerik.com/kendo-angular-ui/components/treeview/api/loadmoredirective#kendotreeviewloadmore) function receives when the load more button is pressed.
|
|
704
|
+
*/
|
|
705
|
+
interface LoadMoreRequestArgs {
|
|
706
|
+
/**
|
|
707
|
+
* Provides the data item for which you request more child nodes.
|
|
708
|
+
*/
|
|
709
|
+
dataItem: any;
|
|
710
|
+
/**
|
|
711
|
+
* The number of items currently rendered.
|
|
712
|
+
*/
|
|
713
|
+
skip: number;
|
|
714
|
+
/**
|
|
715
|
+
* The recommended number of new items to load.
|
|
716
|
+
* This value matches the [`pageSize`](https://www.telerik.com/kendo-angular-ui/components/treeview/api/loadmoredirective#pagesize) set in the [`kendoTreeViewLoadMore`](https://www.telerik.com/kendo-angular-ui/components/treeview/api/loadmoredirective) directive.
|
|
717
|
+
* You can return any number of items—the page size automatically adjusts based on how many items the [`loadMoreNodes`](https://www.telerik.com/kendo-angular-ui/components/treeview/api/loadmoredirective#kendotreeviewloadmore) function actually returns.
|
|
718
|
+
*/
|
|
719
|
+
take: number;
|
|
720
|
+
}
|
|
721
|
+
|
|
722
|
+
/**
|
|
723
|
+
* @hidden
|
|
724
|
+
*/
|
|
725
|
+
interface LoadMoreService {
|
|
726
|
+
/**
|
|
727
|
+
* Specifies the callback that will be executed when the load more button is clicked.
|
|
728
|
+
* Providing a `loadMoreNodes` function is only required when additional nodes are fetched from the server on demand.
|
|
729
|
+
*/
|
|
730
|
+
loadMoreNodes?: (loadMoreArgs: LoadMoreRequestArgs) => Observable<any[]>;
|
|
731
|
+
/**
|
|
732
|
+
* Specifies the initial number of nodes that will be rendered for the specified data item children group.
|
|
733
|
+
* Every time the load more button is clicked, the data item page size will be incremented with this number.
|
|
734
|
+
*/
|
|
735
|
+
getInitialPageSize: (dataItem: any) => number;
|
|
736
|
+
/**
|
|
737
|
+
* Gets the current page size for the targeted data item children collection.
|
|
738
|
+
*/
|
|
739
|
+
getGroupSize: (dataItem: any) => number;
|
|
740
|
+
/**
|
|
741
|
+
* Sets the current page size for the targeted data item children collection.
|
|
742
|
+
*/
|
|
743
|
+
setGroupSize: (dataItem: any, pageSize: number) => void;
|
|
744
|
+
/**
|
|
745
|
+
* Retrieves the total number of child nodes for the targeted data item.
|
|
746
|
+
*
|
|
747
|
+
* @param dataItem The parent item of the checked group.
|
|
748
|
+
* @param loadedNodesCount The number of already loaded nodes via the `children` function.
|
|
749
|
+
*/
|
|
750
|
+
getTotalNodesCount: (dataItem: any, loadedNodesCount: number) => number;
|
|
751
|
+
}
|
|
752
|
+
|
|
753
|
+
/**
|
|
754
|
+
* Represents the possible size options for the TreeView.
|
|
755
|
+
*/
|
|
756
|
+
type TreeViewSize = 'small' | 'medium' | 'large';
|
|
757
|
+
|
|
758
|
+
/**
|
|
759
|
+
* Represents the [Kendo UI TreeView component for Angular](https://www.telerik.com/kendo-angular-ui/components/treeview).
|
|
760
|
+
*
|
|
761
|
+
* @example
|
|
762
|
+
* ```html
|
|
763
|
+
* <kendo-treeview
|
|
764
|
+
* kendoTreeViewExpandable
|
|
765
|
+
* [nodes]="data"
|
|
766
|
+
* textField="text"
|
|
767
|
+
* [children]="fetchChildren"
|
|
768
|
+
* [hasChildren]="hasChildren">
|
|
769
|
+
* </kendo-treeview>
|
|
770
|
+
* ```
|
|
771
|
+
*
|
|
772
|
+
* @remarks
|
|
773
|
+
* Supported children components are: {@link CustomMessagesComponent}
|
|
774
|
+
*/
|
|
775
|
+
declare class TreeViewComponent implements OnChanges, OnInit, AfterViewInit, OnDestroy, DataBoundComponent {
|
|
776
|
+
element: ElementRef<HTMLElement>;
|
|
777
|
+
changeDetectorRef: ChangeDetectorRef;
|
|
778
|
+
protected expandService: ExpandStateService;
|
|
779
|
+
protected navigationService: NavigationService;
|
|
780
|
+
protected nodeChildrenService: NodeChildrenService;
|
|
781
|
+
protected selectionService: SelectionService;
|
|
782
|
+
protected treeViewLookupService: TreeViewLookupService;
|
|
783
|
+
private ngZone;
|
|
784
|
+
private renderer;
|
|
785
|
+
private dataChangeNotification;
|
|
786
|
+
private localization;
|
|
787
|
+
/**
|
|
788
|
+
* @hidden
|
|
789
|
+
*/
|
|
790
|
+
searchIcon: SVGIcon;
|
|
791
|
+
classNames: boolean;
|
|
792
|
+
/** @hidden */
|
|
793
|
+
get direction(): string;
|
|
794
|
+
/**
|
|
795
|
+
* @hidden
|
|
796
|
+
*/
|
|
797
|
+
assetsContainer: ViewContainerRef;
|
|
798
|
+
/**
|
|
799
|
+
* @hidden
|
|
800
|
+
*/
|
|
801
|
+
searchbox: TextBoxComponent;
|
|
802
|
+
/**
|
|
803
|
+
* Sets the placeholder text for the filter input when the component is empty.
|
|
804
|
+
*/
|
|
805
|
+
filterInputPlaceholder: string;
|
|
806
|
+
/**
|
|
807
|
+
* Allows expanding disabled nodes.
|
|
808
|
+
*
|
|
809
|
+
* @default false
|
|
810
|
+
*/
|
|
811
|
+
expandDisabledNodes: boolean;
|
|
812
|
+
/**
|
|
813
|
+
* Enables or disables content animation.
|
|
814
|
+
*/
|
|
815
|
+
set animate(value: boolean);
|
|
816
|
+
get animate(): boolean;
|
|
817
|
+
/** @hidden */
|
|
818
|
+
fetchNodes: () => BehaviorSubject<any[]>;
|
|
819
|
+
/**
|
|
820
|
+
* Fires when the children of the expanded node are loaded.
|
|
821
|
+
*/
|
|
822
|
+
childrenLoaded: EventEmitter<{
|
|
823
|
+
children: TreeItem[];
|
|
824
|
+
item: TreeItem;
|
|
825
|
+
}>;
|
|
826
|
+
/**
|
|
827
|
+
* Fires when the component loses focus.
|
|
828
|
+
*/
|
|
829
|
+
onBlur: EventEmitter<any>;
|
|
830
|
+
/**
|
|
831
|
+
* Fires when the component receives focus.
|
|
832
|
+
*/
|
|
833
|
+
onFocus: EventEmitter<any>;
|
|
834
|
+
/**
|
|
835
|
+
* Fires when a TreeView node expands.
|
|
836
|
+
*/
|
|
837
|
+
expand: EventEmitter<TreeItem>;
|
|
838
|
+
/**
|
|
839
|
+
* Fires when a TreeView node collapses.
|
|
840
|
+
*/
|
|
841
|
+
collapse: EventEmitter<TreeItem>;
|
|
842
|
+
/**
|
|
843
|
+
* Fires just before node dragging starts ([see example](https://www.telerik.com/kendo-angular-ui/components/treeview/drag-and-drop#setup)). This event is preventable.
|
|
844
|
+
* Prevent the default event to stop drag hint creation and further drag events.
|
|
845
|
+
*/
|
|
846
|
+
nodeDragStart: EventEmitter<TreeItemDragStartEvent>;
|
|
847
|
+
/**
|
|
848
|
+
* Fires when an item is being dragged ([see example](https://www.telerik.com/kendo-angular-ui/components/treeview/drag-and-drop#setup)).
|
|
849
|
+
*/
|
|
850
|
+
nodeDrag: EventEmitter<TreeItemDragEvent>;
|
|
851
|
+
/**
|
|
852
|
+
* Emits when the built-in filtering mechanism updates node visibility.
|
|
853
|
+
* Used for the built-in auto-expand functionalities. Handle this event for custom implementations.
|
|
854
|
+
*/
|
|
855
|
+
filterStateChange: EventEmitter<FilterState>;
|
|
856
|
+
/**
|
|
857
|
+
* Fires on the target TreeView when a dragged item is dropped ([see example](https://www.telerik.com/kendo-angular-ui/components/treeview/drag-and-drop#setup)).
|
|
858
|
+
*
|
|
859
|
+
* Prevent the default event (`event.preventDefault()`) or set the event as invalid (`event.setValid(false)`) to stop the `addItem` and `removeItem` events from triggering.
|
|
860
|
+
*
|
|
861
|
+
* Use `preventDefault` to handle add/remove manually, or `setValid(false)` to indicate an unsuccessful operation. While `setValid(false)` animates the drag clue to its original position, `event.preventDefault()` simply removes the clue.
|
|
862
|
+
*/
|
|
863
|
+
nodeDrop: EventEmitter<TreeItemDropEvent>;
|
|
864
|
+
/**
|
|
865
|
+
* Fires on the source TreeView after the dragged item is dropped ([see example](https://www.telerik.com/kendo-angular-ui/components/treeview/drag-and-drop#setup)).
|
|
866
|
+
*/
|
|
867
|
+
nodeDragEnd: EventEmitter<TreeItemDragEvent>;
|
|
868
|
+
/**
|
|
869
|
+
* Fires after a dragged item is dropped ([see example](https://www.telerik.com/kendo-angular-ui/components/treeview/drag-and-drop#setup)). Called on the TreeView where the item is dropped.
|
|
870
|
+
*/
|
|
871
|
+
addItem: EventEmitter<TreeItemAddRemoveArgs>;
|
|
872
|
+
/**
|
|
873
|
+
* Fires after a dragged item is dropped ([see example](https://www.telerik.com/kendo-angular-ui/components/treeview/drag-and-drop#setup)). Called on the TreeView from where the item is dragged.
|
|
874
|
+
*/
|
|
875
|
+
removeItem: EventEmitter<TreeItemAddRemoveArgs>;
|
|
876
|
+
/**
|
|
877
|
+
* Fires when a TreeView node checkbox is selected ([see example](https://www.telerik.com/kendo-angular-ui/components/treeview/checkboxes#modifying-the-checked-state)).
|
|
878
|
+
*/
|
|
879
|
+
checkedChange: EventEmitter<TreeItemLookup>;
|
|
880
|
+
/**
|
|
881
|
+
* Fires when a TreeView node is selected ([see example](https://www.telerik.com/kendo-angular-ui/components/treeview/selection#modifying-the-selection-behavior)).
|
|
882
|
+
*/
|
|
883
|
+
selectionChange: EventEmitter<TreeItem>;
|
|
884
|
+
/**
|
|
885
|
+
* Fires when the value of the built-in filter input changes.
|
|
886
|
+
*/
|
|
887
|
+
filterChange: EventEmitter<string>;
|
|
888
|
+
/**
|
|
889
|
+
* Fires when a TreeView node is clicked.
|
|
890
|
+
*/
|
|
891
|
+
nodeClick: EventEmitter<NodeClickEvent>;
|
|
892
|
+
/**
|
|
893
|
+
* Fires when a TreeView node is double-clicked.
|
|
894
|
+
*/
|
|
895
|
+
nodeDblClick: EventEmitter<NodeClickEvent>;
|
|
896
|
+
/**
|
|
897
|
+
* @hidden
|
|
898
|
+
*
|
|
899
|
+
* Queries the template for a node template declaration.
|
|
900
|
+
* Ignored if a `[nodeTemplate]` value is explicitly provided.
|
|
901
|
+
*/
|
|
902
|
+
nodeTemplateQuery: NodeTemplateDirective;
|
|
903
|
+
/**
|
|
904
|
+
* @hidden
|
|
905
|
+
*
|
|
906
|
+
* Defines the template for each node.
|
|
907
|
+
* Takes precedence over nested templates in the TreeView tag.
|
|
908
|
+
*/
|
|
909
|
+
set nodeTemplateRef(template: NodeTemplateDirective);
|
|
910
|
+
get nodeTemplateRef(): NodeTemplateDirective;
|
|
911
|
+
/**
|
|
912
|
+
* @hidden
|
|
913
|
+
*
|
|
914
|
+
* Queries the template for a load-more button template declaration.
|
|
915
|
+
* Ignored if a `[loadMoreButtonTemplate]` value is explicitly provided.
|
|
916
|
+
*/
|
|
917
|
+
loadMoreButtonTemplateQuery: LoadMoreButtonTemplateDirective;
|
|
918
|
+
/**
|
|
919
|
+
* @hidden
|
|
920
|
+
*
|
|
921
|
+
* Defines the template for each load-more button.
|
|
922
|
+
* Takes precedence over nested templates in the TreeView tag.
|
|
923
|
+
*/
|
|
924
|
+
set loadMoreButtonTemplateRef(template: LoadMoreButtonTemplateDirective);
|
|
925
|
+
get loadMoreButtonTemplateRef(): LoadMoreButtonTemplateDirective;
|
|
926
|
+
/**
|
|
927
|
+
* A function that defines how to track node changes.
|
|
928
|
+
* By default, the TreeView tracks the nodes by data item object reference.
|
|
929
|
+
*/
|
|
930
|
+
trackBy: TrackByFunction<object>;
|
|
931
|
+
/**
|
|
932
|
+
* The nodes displayed by the TreeView ([see example](https://www.telerik.com/kendo-angular-ui/components/treeview/data-binding)).
|
|
933
|
+
*/
|
|
934
|
+
set nodes(value: any[]);
|
|
935
|
+
get nodes(): any[];
|
|
936
|
+
/**
|
|
937
|
+
* The fields of the data item that provide the text content of the nodes ([see example](https://www.telerik.com/kendo-angular-ui/components/treeview/data-binding)).
|
|
938
|
+
* If set to an array, each level uses the field at the same index or the last item in the array.
|
|
939
|
+
*/
|
|
940
|
+
textField: string | string[];
|
|
941
|
+
/**
|
|
942
|
+
* A function that determines if a node has child nodes ([see example](https://www.telerik.com/kendo-angular-ui/components/treeview/data-binding)).
|
|
943
|
+
*/
|
|
944
|
+
get hasChildren(): (item: object) => boolean;
|
|
945
|
+
set hasChildren(callback: (item: object) => boolean);
|
|
946
|
+
/**
|
|
947
|
+
* A function that determines if a node is checked ([see example](https://www.telerik.com/kendo-angular-ui/components/treeview/checkboxes#modifying-the-checked-state)).
|
|
948
|
+
*/
|
|
949
|
+
get isChecked(): (item: object, index: string) => CheckedState;
|
|
950
|
+
set isChecked(callback: (item: object, index: string) => CheckedState);
|
|
951
|
+
/**
|
|
952
|
+
* A function that determines if a node is disabled.
|
|
953
|
+
*/
|
|
954
|
+
isDisabled: (item: object, index: string) => boolean;
|
|
955
|
+
/**
|
|
956
|
+
* A function that determines if a node has a checkbox. If there is no checkbox, the node is not checkable and is excluded from built-in check functionality.
|
|
957
|
+
*/
|
|
958
|
+
hasCheckbox: (item: object, index: string) => boolean;
|
|
959
|
+
/**
|
|
960
|
+
* A function that determines if a node is expanded.
|
|
961
|
+
*/
|
|
962
|
+
get isExpanded(): (item: object, index: string) => boolean;
|
|
963
|
+
set isExpanded(callback: (item: object, index: string) => boolean);
|
|
964
|
+
/**
|
|
965
|
+
* A function that determines if a node is selected ([see example](https://www.telerik.com/kendo-angular-ui/components/treeview/selection#modifying-the-selection-behavior)).
|
|
966
|
+
*/
|
|
967
|
+
get isSelected(): (item: object, index: string) => boolean;
|
|
968
|
+
set isSelected(callback: (item: object, index: string) => boolean);
|
|
969
|
+
/**
|
|
970
|
+
* A callback that determines whether a TreeView node should be rendered as hidden. Uses the `.k-hidden` utility class. Useful for custom filtering.
|
|
971
|
+
*
|
|
972
|
+
*/
|
|
973
|
+
isVisible: (item: object, index: string) => boolean;
|
|
974
|
+
/**
|
|
975
|
+
* Enables keyboard navigation for the TreeView.
|
|
976
|
+
*
|
|
977
|
+
* @default true
|
|
978
|
+
*
|
|
979
|
+
* @remarks
|
|
980
|
+
* This property is related to accessibility.
|
|
981
|
+
*/
|
|
982
|
+
navigable: boolean;
|
|
983
|
+
/**
|
|
984
|
+
* A function that provides the child nodes for a given parent node ([see example](https://www.telerik.com/kendo-angular-ui/components/treeview/data-binding)).
|
|
985
|
+
*/
|
|
986
|
+
children: (item: object) => Observable<object[]>;
|
|
987
|
+
/**
|
|
988
|
+
* Indicates whether child nodes are fetched on expand or initally prefetched.
|
|
989
|
+
*
|
|
990
|
+
* @default true
|
|
991
|
+
*/
|
|
992
|
+
loadOnDemand: boolean;
|
|
993
|
+
/**
|
|
994
|
+
* Renders the built-in input element for filtering. If `true`, emits the `filterChange` event that can be handled for [manual filtering](https://www.telerik.com/kendo-angular-ui/components/treeview/filtering#manual-filtering).
|
|
995
|
+
* Built-in filtering is available with [`kendoTreeViewHierarchyBinding`](https://www.telerik.com/kendo-angular-ui/components/treeview/api/hierarchybindingdirective) and [`kendoTreeViewFlatDataBinding`](https://www.telerik.com/kendo-angular-ui/components/treeview/api/flatdatabindingdirective) directives.
|
|
996
|
+
*
|
|
997
|
+
* @default false
|
|
998
|
+
*/
|
|
999
|
+
filterable: boolean;
|
|
1000
|
+
/**
|
|
1001
|
+
* Sets the initial value of the built-in filter input.
|
|
1002
|
+
*/
|
|
1003
|
+
filter: string;
|
|
1004
|
+
/**
|
|
1005
|
+
* Sets the size of the component.
|
|
1006
|
+
*
|
|
1007
|
+
* @default undefined
|
|
1008
|
+
*/
|
|
1009
|
+
set size(size: TreeViewSize);
|
|
1010
|
+
get size(): TreeViewSize;
|
|
1011
|
+
get isActive(): boolean;
|
|
1012
|
+
/**
|
|
1013
|
+
* @hidden
|
|
1014
|
+
*/
|
|
1015
|
+
get treeviewId(): string;
|
|
1016
|
+
/**
|
|
1017
|
+
* Indicates whether only parent nodes should be disabled or their child nodes as well.
|
|
1018
|
+
*
|
|
1019
|
+
* @default false
|
|
1020
|
+
*/
|
|
1021
|
+
disableParentNodesOnly: boolean;
|
|
1022
|
+
/**
|
|
1023
|
+
* @hidden
|
|
1024
|
+
*/
|
|
1025
|
+
loadMoreService: LoadMoreService;
|
|
1026
|
+
/**
|
|
1027
|
+
* @hidden
|
|
1028
|
+
*/
|
|
1029
|
+
editService: EditService;
|
|
1030
|
+
checkboxes: boolean;
|
|
1031
|
+
expandIcons: boolean;
|
|
1032
|
+
selectable: boolean;
|
|
1033
|
+
touchActions: boolean;
|
|
1034
|
+
data: BehaviorSubject<any[]>;
|
|
1035
|
+
private _animate;
|
|
1036
|
+
private _isChecked;
|
|
1037
|
+
private _isExpanded;
|
|
1038
|
+
private _isSelected;
|
|
1039
|
+
private _hasChildren;
|
|
1040
|
+
private _nodeTemplateRef;
|
|
1041
|
+
private _loadMoreButtonTemplateRef;
|
|
1042
|
+
private _size;
|
|
1043
|
+
private subscriptions;
|
|
1044
|
+
private domSubscriptions;
|
|
1045
|
+
private _nextId;
|
|
1046
|
+
constructor(element: ElementRef<HTMLElement>, changeDetectorRef: ChangeDetectorRef, expandService: ExpandStateService, navigationService: NavigationService, nodeChildrenService: NodeChildrenService, selectionService: SelectionService, treeViewLookupService: TreeViewLookupService, ngZone: NgZone, renderer: Renderer2, dataChangeNotification: DataChangeNotificationService, localization: LocalizationService);
|
|
1047
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
1048
|
+
ngOnDestroy(): void;
|
|
1049
|
+
ngOnInit(): void;
|
|
1050
|
+
ngAfterViewInit(): void;
|
|
1051
|
+
/**
|
|
1052
|
+
* Blurs the focused TreeView item.
|
|
1053
|
+
*/
|
|
1054
|
+
blur(): void;
|
|
1055
|
+
/**
|
|
1056
|
+
* Focuses the first focusable item in the TreeView if no hierarchical index is provided.
|
|
1057
|
+
*/
|
|
1058
|
+
focus(index?: string): void;
|
|
1059
|
+
/**
|
|
1060
|
+
* Returns the `TreeItemLookup` node for the specified index.
|
|
1061
|
+
*
|
|
1062
|
+
* @param index - The index of the node.
|
|
1063
|
+
* @returns {TreeItemLookup} - The looked up item.
|
|
1064
|
+
*/
|
|
1065
|
+
itemLookup(index: string): TreeItemLookup;
|
|
1066
|
+
/**
|
|
1067
|
+
* Calls the [`children`](https://www.telerik.com/kendo-angular-ui/components/treeview/api/treeviewcomponent#children) function for every expanded node and fetches all rendered child nodes again.
|
|
1068
|
+
*/
|
|
1069
|
+
rebindChildren(): void;
|
|
1070
|
+
/**
|
|
1071
|
+
* Triggers the `expand` event for the provided node and shows its loading indicator.
|
|
1072
|
+
*/
|
|
1073
|
+
expandNode(item: any, index: string): void;
|
|
1074
|
+
/**
|
|
1075
|
+
* Triggers the `collapse` event for the provided node.
|
|
1076
|
+
*/
|
|
1077
|
+
collapseNode(item: any, index: string): void;
|
|
1078
|
+
/**
|
|
1079
|
+
* Gets the current page size of the data item's children collection ([see example](https://www.telerik.com/kendo-angular-ui/components/treeview/load-more-button#managing-page-sizes)).
|
|
1080
|
+
* Pass `null` as `dataItem` to get the root collection's page size.
|
|
1081
|
+
*
|
|
1082
|
+
* @param dataItem {any} - The parent data item of the targeted collection.
|
|
1083
|
+
* @returns {number} - The page size of the data item's children collection.
|
|
1084
|
+
*/
|
|
1085
|
+
getNodePageSize(dataItem: any): number;
|
|
1086
|
+
/**
|
|
1087
|
+
* Sets the page size of the data item's children collection ([see example](https://www.telerik.com/kendo-angular-ui/components/treeview/load-more-button#managing-page-sizes)).
|
|
1088
|
+
* Pass `null` as `dataItem` to set the root collection's page size.
|
|
1089
|
+
*
|
|
1090
|
+
* @param dataItem {any} - The parent data item of the targeted collection.
|
|
1091
|
+
* @param pageSize {number} - The new page size.
|
|
1092
|
+
*/
|
|
1093
|
+
setNodePageSize(dataItem: any, pageSize: number): void;
|
|
1094
|
+
/**
|
|
1095
|
+
* @hidden
|
|
1096
|
+
*
|
|
1097
|
+
* Clears the current TreeViewLookupService node map and re-registers all nodes anew.
|
|
1098
|
+
* Child nodes are acquired through the provided `children` callback.
|
|
1099
|
+
*/
|
|
1100
|
+
preloadChildNodes(): void;
|
|
1101
|
+
private attachDomHandlers;
|
|
1102
|
+
private focusHandler;
|
|
1103
|
+
private blurHandler;
|
|
1104
|
+
private clickHandler;
|
|
1105
|
+
private keydownHandler;
|
|
1106
|
+
private verifyLoadMoreService;
|
|
1107
|
+
private registerLookupItems;
|
|
1108
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TreeViewComponent, never>;
|
|
1109
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TreeViewComponent, "kendo-treeview", ["kendoTreeView"], { "filterInputPlaceholder": { "alias": "filterInputPlaceholder"; "required": false; }; "expandDisabledNodes": { "alias": "expandDisabledNodes"; "required": false; }; "animate": { "alias": "animate"; "required": false; }; "nodeTemplateRef": { "alias": "nodeTemplate"; "required": false; }; "loadMoreButtonTemplateRef": { "alias": "loadMoreButtonTemplate"; "required": false; }; "trackBy": { "alias": "trackBy"; "required": false; }; "nodes": { "alias": "nodes"; "required": false; }; "textField": { "alias": "textField"; "required": false; }; "hasChildren": { "alias": "hasChildren"; "required": false; }; "isChecked": { "alias": "isChecked"; "required": false; }; "isDisabled": { "alias": "isDisabled"; "required": false; }; "hasCheckbox": { "alias": "hasCheckbox"; "required": false; }; "isExpanded": { "alias": "isExpanded"; "required": false; }; "isSelected": { "alias": "isSelected"; "required": false; }; "isVisible": { "alias": "isVisible"; "required": false; }; "navigable": { "alias": "navigable"; "required": false; }; "children": { "alias": "children"; "required": false; }; "loadOnDemand": { "alias": "loadOnDemand"; "required": false; }; "filterable": { "alias": "filterable"; "required": false; }; "filter": { "alias": "filter"; "required": false; }; "size": { "alias": "size"; "required": false; }; "disableParentNodesOnly": { "alias": "disableParentNodesOnly"; "required": false; }; }, { "childrenLoaded": "childrenLoaded"; "onBlur": "blur"; "onFocus": "focus"; "expand": "expand"; "collapse": "collapse"; "nodeDragStart": "nodeDragStart"; "nodeDrag": "nodeDrag"; "filterStateChange": "filterStateChange"; "nodeDrop": "nodeDrop"; "nodeDragEnd": "nodeDragEnd"; "addItem": "addItem"; "removeItem": "removeItem"; "checkedChange": "checkedChange"; "selectionChange": "selectionChange"; "filterChange": "filterChange"; "nodeClick": "nodeClick"; "nodeDblClick": "nodeDblClick"; }, ["nodeTemplateQuery", "loadMoreButtonTemplateQuery"], never, true, never>;
|
|
1110
|
+
}
|
|
1111
|
+
|
|
1112
|
+
/**
|
|
1113
|
+
* Represents the available check modes for the TreeView component ([see example](https://www.telerik.com/kendo-angular-ui/components/treeview/checkboxes)).
|
|
1114
|
+
*
|
|
1115
|
+
* The possible values are:
|
|
1116
|
+
* * `"single"`—Only one item can be checked at a time.
|
|
1117
|
+
* * `"multiple"`—Multiple items can be checked.
|
|
1118
|
+
*/
|
|
1119
|
+
type CheckMode = "single" | "multiple";
|
|
1120
|
+
|
|
1121
|
+
/**
|
|
1122
|
+
* Configures the checkbox selection behavior of the TreeView component ([see example](https://www.telerik.com/kendo-angular-ui/components/treeview/checkboxes)).
|
|
1123
|
+
*
|
|
1124
|
+
*/
|
|
1125
|
+
interface CheckableSettings {
|
|
1126
|
+
/**
|
|
1127
|
+
* Determines if checkbox selection is enabled.
|
|
1128
|
+
* @default true
|
|
1129
|
+
*/
|
|
1130
|
+
enabled?: boolean;
|
|
1131
|
+
/**
|
|
1132
|
+
* Specifies the selection mode.
|
|
1133
|
+
* @default 'multiple'
|
|
1134
|
+
*/
|
|
1135
|
+
mode?: CheckMode;
|
|
1136
|
+
/**
|
|
1137
|
+
* Determines whether checking a parent node automatically checks its children.
|
|
1138
|
+
* Only applicable in multiple selection mode.
|
|
1139
|
+
* @default true
|
|
1140
|
+
*/
|
|
1141
|
+
checkChildren?: boolean;
|
|
1142
|
+
/**
|
|
1143
|
+
* Determines whether parent nodes display an indeterminate state when only some children are checked.
|
|
1144
|
+
* Only applicable in multiple selection mode.
|
|
1145
|
+
* @default true
|
|
1146
|
+
*/
|
|
1147
|
+
checkParents?: boolean;
|
|
1148
|
+
/**
|
|
1149
|
+
* Determines whether clicking a node toggles its checked state.
|
|
1150
|
+
* @default false
|
|
1151
|
+
*/
|
|
1152
|
+
checkOnClick?: boolean;
|
|
1153
|
+
/**
|
|
1154
|
+
* Determines whether disabled children are checked when their parent is checked.
|
|
1155
|
+
* Only applicable in multiple selection mode and when `checkChildren` is `true`.
|
|
1156
|
+
* @default false
|
|
1157
|
+
*/
|
|
1158
|
+
checkDisabledChildren?: boolean;
|
|
1159
|
+
/**
|
|
1160
|
+
* Determines whether collapsed children are unchecked when their parent is unchecked.
|
|
1161
|
+
* Only applicable in multiple selection mode and when [`loadOnDemand`](https://www.telerik.com/kendo-angular-ui/components/treeview/api/treeviewcomponent#loadondemand) is `true`.
|
|
1162
|
+
* @default false
|
|
1163
|
+
*/
|
|
1164
|
+
uncheckCollapsedChildren?: boolean;
|
|
1165
|
+
}
|
|
1166
|
+
|
|
1167
|
+
/**
|
|
1168
|
+
* Represents a directive that manages the in-memory checked state of the TreeView node
|
|
1169
|
+
* ([see example](https://www.telerik.com/kendo-angular-ui/components/treeview/checkboxes)).
|
|
1170
|
+
*
|
|
1171
|
+
* @example
|
|
1172
|
+
* ```html
|
|
1173
|
+
* <kendo-treeview
|
|
1174
|
+
* kendoTreeViewCheckable
|
|
1175
|
+
* checkBy="id"
|
|
1176
|
+
* [(checkedKeys)]="checkedKeys"
|
|
1177
|
+
* [nodes]="data">
|
|
1178
|
+
* </kendo-treeview>
|
|
1179
|
+
* ```
|
|
1180
|
+
*
|
|
1181
|
+
* @remarks
|
|
1182
|
+
* Applied to: {@link TreeViewComponent}
|
|
1183
|
+
*/
|
|
1184
|
+
declare class CheckDirective implements OnChanges, OnDestroy {
|
|
1185
|
+
protected treeView: TreeViewComponent;
|
|
1186
|
+
private zone;
|
|
1187
|
+
/**
|
|
1188
|
+
* @hidden
|
|
1189
|
+
*/
|
|
1190
|
+
set isChecked(value: (item: object, index: string) => CheckedState);
|
|
1191
|
+
/**
|
|
1192
|
+
* Defines the item key stored in the `checkedKeys` collection.
|
|
1193
|
+
*/
|
|
1194
|
+
checkKey: string | ((context: TreeItem) => any);
|
|
1195
|
+
/**
|
|
1196
|
+
* Defines the collection that stores the checked keys
|
|
1197
|
+
* ([see example](https://www.telerik.com/kendo-angular-ui/components/treeview/checkboxes)).
|
|
1198
|
+
*/
|
|
1199
|
+
checkedKeys: any[];
|
|
1200
|
+
/**
|
|
1201
|
+
* Defines the checkable settings
|
|
1202
|
+
* ([see example](https://www.telerik.com/kendo-angular-ui/components/treeview/checkboxes#setup)).
|
|
1203
|
+
* If you do not provide a value, the default [`CheckableSettings`](https://www.telerik.com/kendo-angular-ui/components/treeview/api/checkablesettings) apply.
|
|
1204
|
+
*/
|
|
1205
|
+
checkable: boolean | CheckableSettings | string;
|
|
1206
|
+
/**
|
|
1207
|
+
* Fires when the `checkedKeys` collection updates.
|
|
1208
|
+
*/
|
|
1209
|
+
checkedKeysChange: EventEmitter<any[]>;
|
|
1210
|
+
protected subscriptions: Subscription;
|
|
1211
|
+
private get options();
|
|
1212
|
+
private checkActions;
|
|
1213
|
+
/**
|
|
1214
|
+
* Reflects the internal `checkedKeys` state.
|
|
1215
|
+
*/
|
|
1216
|
+
private state;
|
|
1217
|
+
private clickSubscription;
|
|
1218
|
+
/**
|
|
1219
|
+
* Holds the last emitted `checkedKeys` collection.
|
|
1220
|
+
*/
|
|
1221
|
+
private lastChange;
|
|
1222
|
+
constructor(treeView: TreeViewComponent, zone: NgZone);
|
|
1223
|
+
ngOnChanges(changes: any): void;
|
|
1224
|
+
ngOnDestroy(): void;
|
|
1225
|
+
protected isItemChecked(dataItem: any, index: string): CheckedState;
|
|
1226
|
+
protected isIndexChecked(index: string): CheckedState;
|
|
1227
|
+
protected itemKey(item: TreeItem): any;
|
|
1228
|
+
protected check(e: any): void;
|
|
1229
|
+
protected checkSingle(node: any): void;
|
|
1230
|
+
protected checkMultiple(node: TreeItemLookup): void;
|
|
1231
|
+
protected toggleCheckOnClick(): void;
|
|
1232
|
+
private unsubscribeClick;
|
|
1233
|
+
private checkNode;
|
|
1234
|
+
private uncheckChildren;
|
|
1235
|
+
private checkParents;
|
|
1236
|
+
private allChildrenSelected;
|
|
1237
|
+
private notify;
|
|
1238
|
+
private addCheckedItemsChildren;
|
|
1239
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CheckDirective, never>;
|
|
1240
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<CheckDirective, "[kendoTreeViewCheckable]", never, { "isChecked": { "alias": "isChecked"; "required": false; }; "checkKey": { "alias": "checkBy"; "required": false; }; "checkedKeys": { "alias": "checkedKeys"; "required": false; }; "checkable": { "alias": "kendoTreeViewCheckable"; "required": false; }; }, { "checkedKeysChange": "checkedKeysChange"; }, never, never, true, never>;
|
|
1241
|
+
}
|
|
1242
|
+
|
|
1243
|
+
/**
|
|
1244
|
+
* Represents a directive which manages the disabled in-memory state of the TreeView node
|
|
1245
|
+
* ([see example](https://www.telerik.com/kendo-angular-ui/components/treeview/disabled-state)).
|
|
1246
|
+
*
|
|
1247
|
+
* @example
|
|
1248
|
+
* ```html
|
|
1249
|
+
* <kendo-treeview
|
|
1250
|
+
* [nodes]="data"
|
|
1251
|
+
* textField="text"
|
|
1252
|
+
* [hasChildren]="hasChildren"
|
|
1253
|
+
* [children]="fetchChildren"
|
|
1254
|
+
* kendoTreeViewDisable
|
|
1255
|
+
* [disabledKeys]="disabledKeys">
|
|
1256
|
+
* </kendo-treeview>
|
|
1257
|
+
* ```
|
|
1258
|
+
*
|
|
1259
|
+
* @remarks
|
|
1260
|
+
* Applied to: {@link TreeViewComponent}
|
|
1261
|
+
*/
|
|
1262
|
+
declare class DisableDirective implements OnChanges {
|
|
1263
|
+
protected treeView: TreeViewComponent;
|
|
1264
|
+
protected cdr: ChangeDetectorRef;
|
|
1265
|
+
/**
|
|
1266
|
+
* @hidden
|
|
1267
|
+
*/
|
|
1268
|
+
set isDisabled(value: (item: object, index: string) => boolean);
|
|
1269
|
+
/**
|
|
1270
|
+
* Defines the item key that will be stored in the `disabledKeys` collection.
|
|
1271
|
+
*/
|
|
1272
|
+
disableKey: string | ((context: TreeItem) => any);
|
|
1273
|
+
/**
|
|
1274
|
+
* Defines the collection that will store the disabled keys.
|
|
1275
|
+
*/
|
|
1276
|
+
disabledKeys: any[];
|
|
1277
|
+
constructor(treeView: TreeViewComponent, cdr: ChangeDetectorRef);
|
|
1278
|
+
ngOnChanges(changes?: any): void;
|
|
1279
|
+
protected itemKey(e: any): any;
|
|
1280
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DisableDirective, never>;
|
|
1281
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DisableDirective, "[kendoTreeViewDisable]", never, { "isDisabled": { "alias": "isDisabled"; "required": false; }; "disableKey": { "alias": "kendoTreeViewDisable"; "required": false; }; "disabledKeys": { "alias": "disabledKeys"; "required": false; }; }, {}, never, never, true, never>;
|
|
1282
|
+
}
|
|
1283
|
+
|
|
1284
|
+
/**
|
|
1285
|
+
* @hidden
|
|
1286
|
+
*
|
|
1287
|
+
* An injection token used by the expand-directive to interface with
|
|
1288
|
+
* the TreeView or the DropDownTree components.
|
|
1289
|
+
*/
|
|
1290
|
+
declare abstract class ExpandableComponent {
|
|
1291
|
+
/**
|
|
1292
|
+
* A function which determines if a specific node is expanded.
|
|
1293
|
+
*/
|
|
1294
|
+
abstract isExpanded: (item: object, index: string) => boolean;
|
|
1295
|
+
/**
|
|
1296
|
+
* Fires when the user expands a TreeView node.
|
|
1297
|
+
*/
|
|
1298
|
+
abstract expand: EventEmitter<TreeItem>;
|
|
1299
|
+
/**
|
|
1300
|
+
* Fires when the user collapses a TreeView node.
|
|
1301
|
+
*/
|
|
1302
|
+
abstract collapse: EventEmitter<TreeItem>;
|
|
1303
|
+
/**
|
|
1304
|
+
* Emits when the built-in filtering mechanism in the data-binding directives updates the node visibility.
|
|
1305
|
+
* Used for the built-in auto-expand functionalities of the component and available for custom implementations.
|
|
1306
|
+
*/
|
|
1307
|
+
abstract filterStateChange?: EventEmitter<FilterState>;
|
|
1308
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ExpandableComponent, never>;
|
|
1309
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ExpandableComponent>;
|
|
1310
|
+
}
|
|
1311
|
+
|
|
1312
|
+
/**
|
|
1313
|
+
* Configures the auto-expansion behavior of nodes when filtering the TreeView.
|
|
1314
|
+
*/
|
|
1315
|
+
interface FilterExpandSettings {
|
|
1316
|
+
/**
|
|
1317
|
+
* The maximum number of filter results that will be auto-expanded.
|
|
1318
|
+
* If the number of results exceeds this value, the expanded state will be reverted according to the `expandedOnClear` setting.
|
|
1319
|
+
* The default value of -1 allows any number of results to be auto-expanded.
|
|
1320
|
+
* @default -1
|
|
1321
|
+
*/
|
|
1322
|
+
maxAutoExpandResults?: number;
|
|
1323
|
+
/**
|
|
1324
|
+
* Determines whether matching nodes expand to display their children.
|
|
1325
|
+
* Only applicable in `"lenient"` filter mode.
|
|
1326
|
+
* @default false
|
|
1327
|
+
*/
|
|
1328
|
+
expandMatches?: boolean;
|
|
1329
|
+
/**
|
|
1330
|
+
* Determines which nodes should remain expanded when the filter is cleared. The possible values are:
|
|
1331
|
+
* * `"none"`—Collapse all nodes.
|
|
1332
|
+
* * `"all"`—Expand all nodes.
|
|
1333
|
+
* * `"initial"`—Restore the expanded state from before filtering.
|
|
1334
|
+
* * `"unchanged"`—Leave the expanded state unchanged.
|
|
1335
|
+
* @default "none"
|
|
1336
|
+
*/
|
|
1337
|
+
expandedOnClear?: "all" | "none" | "initial" | "unchanged";
|
|
1338
|
+
/**
|
|
1339
|
+
* @hidden
|
|
1340
|
+
*/
|
|
1341
|
+
enabled?: boolean;
|
|
1342
|
+
}
|
|
1343
|
+
|
|
1344
|
+
/**
|
|
1345
|
+
* @hidden
|
|
1346
|
+
*/
|
|
1347
|
+
interface ExpandTreeItem extends TreeItem {
|
|
1348
|
+
expand: boolean;
|
|
1349
|
+
}
|
|
1350
|
+
/**
|
|
1351
|
+
* Represents a directive that manages the expanded state of the TreeView
|
|
1352
|
+
* ([see example](https://www.telerik.com/kendo-angular-ui/components/treelist/expanded-state)).
|
|
1353
|
+
*
|
|
1354
|
+
* @example
|
|
1355
|
+
* ```html
|
|
1356
|
+
* <kendo-treeview
|
|
1357
|
+
* kendoTreeViewExpandable
|
|
1358
|
+
* expandBy="id"
|
|
1359
|
+
* [(expandedKeys)]="expandedKeys"
|
|
1360
|
+
* [expandOnFilter]="true"
|
|
1361
|
+
* [nodes]="data">
|
|
1362
|
+
* </kendo-treeview>
|
|
1363
|
+
* ```
|
|
1364
|
+
*
|
|
1365
|
+
* @remarks
|
|
1366
|
+
* Applied to: {@link TreeViewComponent}
|
|
1367
|
+
*/
|
|
1368
|
+
declare class ExpandDirective implements OnDestroy, OnChanges {
|
|
1369
|
+
protected component: ExpandableComponent;
|
|
1370
|
+
/**
|
|
1371
|
+
* @hidden
|
|
1372
|
+
*/
|
|
1373
|
+
set isExpanded(value: (item: object, index: string) => boolean);
|
|
1374
|
+
/**
|
|
1375
|
+
* Defines the item key stored in the `expandedKeys` collection.
|
|
1376
|
+
*/
|
|
1377
|
+
expandKey: string | ((context: TreeItem) => any);
|
|
1378
|
+
/**
|
|
1379
|
+
* Specifies whether to auto-expand the nodes leading from the root node to each filter result.
|
|
1380
|
+
* To fine-tune this behavior, pass a [`FilterExpandSettings`](https://www.telerik.com/kendo-angular-ui/components/treeview/api/filterexpandsettings) object to this input.
|
|
1381
|
+
* @default false
|
|
1382
|
+
*/
|
|
1383
|
+
expandOnFilter: boolean | FilterExpandSettings;
|
|
1384
|
+
get filterExpandSettings(): FilterExpandSettings;
|
|
1385
|
+
/**
|
|
1386
|
+
* Fires when the `expandedKeys` collection updates.
|
|
1387
|
+
*/
|
|
1388
|
+
expandedKeysChange: EventEmitter<any[]>;
|
|
1389
|
+
/**
|
|
1390
|
+
* Defines the collection that stores the expanded keys.
|
|
1391
|
+
*/
|
|
1392
|
+
expandedKeys: any[];
|
|
1393
|
+
protected subscriptions: Subscription;
|
|
1394
|
+
/**
|
|
1395
|
+
* Reflects the internal `expandedKeys` state.
|
|
1396
|
+
*/
|
|
1397
|
+
private state;
|
|
1398
|
+
private originalExpandedKeys;
|
|
1399
|
+
private isFiltered;
|
|
1400
|
+
/**
|
|
1401
|
+
* Holds the last emitted `expandedKeys` collection.
|
|
1402
|
+
*/
|
|
1403
|
+
private lastChange;
|
|
1404
|
+
constructor(component: ExpandableComponent);
|
|
1405
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
1406
|
+
ngOnDestroy(): void;
|
|
1407
|
+
/**
|
|
1408
|
+
* @hidden
|
|
1409
|
+
*/
|
|
1410
|
+
itemKey(e: TreeItem): string;
|
|
1411
|
+
protected toggleExpand({ index, dataItem, expand }: ExpandTreeItem): void;
|
|
1412
|
+
private handleAutoExpand;
|
|
1413
|
+
/**
|
|
1414
|
+
* Fills array with the correct expand keys according to wrapper metadata.
|
|
1415
|
+
*/
|
|
1416
|
+
private updateExpandedNodes;
|
|
1417
|
+
/**
|
|
1418
|
+
* Fills array with the expand key of every node.
|
|
1419
|
+
*/
|
|
1420
|
+
private getEveryExpandKey;
|
|
1421
|
+
private notify;
|
|
1422
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ExpandDirective, never>;
|
|
1423
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ExpandDirective, "[kendoTreeViewExpandable]", never, { "isExpanded": { "alias": "isExpanded"; "required": false; }; "expandKey": { "alias": "expandBy"; "required": false; }; "expandOnFilter": { "alias": "expandOnFilter"; "required": false; }; "expandedKeys": { "alias": "expandedKeys"; "required": false; }; }, { "expandedKeysChange": "expandedKeysChange"; }, never, never, true, never>;
|
|
1424
|
+
}
|
|
1425
|
+
|
|
1426
|
+
/**
|
|
1427
|
+
* Represents the selection settings for the TreeView component.
|
|
1428
|
+
*/
|
|
1429
|
+
interface SelectableSettings {
|
|
1430
|
+
/**
|
|
1431
|
+
* Determines whether TreeView nodes can be selected.
|
|
1432
|
+
* @default true
|
|
1433
|
+
*/
|
|
1434
|
+
enabled?: boolean;
|
|
1435
|
+
/**
|
|
1436
|
+
* Specifies whether single or multiple nodes can be selected.
|
|
1437
|
+
* @default 'single'
|
|
1438
|
+
*/
|
|
1439
|
+
mode?: SelectionMode;
|
|
1440
|
+
}
|
|
1441
|
+
|
|
1442
|
+
/**
|
|
1443
|
+
* Manages the in-memory selection state of TreeView nodes
|
|
1444
|
+
* ([see example](https://www.telerik.com/kendo-angular-ui/components/treeview/selection)).
|
|
1445
|
+
*
|
|
1446
|
+
* @example
|
|
1447
|
+
* ```html
|
|
1448
|
+
* <kendo-treeview
|
|
1449
|
+
* ...
|
|
1450
|
+
* kendoTreeViewSelectable
|
|
1451
|
+
* selectBy="id"
|
|
1452
|
+
* [(selectedKeys)]="selectedKeys"
|
|
1453
|
+
* >
|
|
1454
|
+
* </kendo-treeview>
|
|
1455
|
+
* ```
|
|
1456
|
+
*
|
|
1457
|
+
* @remarks
|
|
1458
|
+
* Applied to: {@link TreeViewComponent}
|
|
1459
|
+
*/
|
|
1460
|
+
declare class SelectDirective implements OnDestroy, OnChanges {
|
|
1461
|
+
protected treeView: TreeViewComponent;
|
|
1462
|
+
private navigationService;
|
|
1463
|
+
/**
|
|
1464
|
+
* @hidden
|
|
1465
|
+
*/
|
|
1466
|
+
set isSelected(value: (item: object, index: string) => boolean);
|
|
1467
|
+
/**
|
|
1468
|
+
* Sets the item key stored in the `selectedKeys` collection.
|
|
1469
|
+
*/
|
|
1470
|
+
selectKey: string | ((context: TreeItem) => any);
|
|
1471
|
+
/**
|
|
1472
|
+
* Sets the current selection mode
|
|
1473
|
+
* ([see example](https://www.telerik.com/kendo-angular-ui/components/treeview/selection)).
|
|
1474
|
+
*/
|
|
1475
|
+
selection: boolean | SelectableSettings | string;
|
|
1476
|
+
/**
|
|
1477
|
+
* Defines the collection that stores the selected keys
|
|
1478
|
+
* ([see example](https://www.telerik.com/kendo-angular-ui/components/treeview/selection)).
|
|
1479
|
+
*/
|
|
1480
|
+
selectedKeys: any[];
|
|
1481
|
+
/**
|
|
1482
|
+
* Emits when the `selectedKeys` collection updates.
|
|
1483
|
+
*/
|
|
1484
|
+
selectedKeysChange: EventEmitter<any[]>;
|
|
1485
|
+
get getAriaMultiselectable(): boolean;
|
|
1486
|
+
protected subscriptions: Subscription;
|
|
1487
|
+
private get options();
|
|
1488
|
+
private selectActions;
|
|
1489
|
+
/**
|
|
1490
|
+
* Reflects the internal `selectedKeys` state.
|
|
1491
|
+
*/
|
|
1492
|
+
private state;
|
|
1493
|
+
/**
|
|
1494
|
+
* Holds the last emitted `selectedKeys` collection.
|
|
1495
|
+
*/
|
|
1496
|
+
private lastChange;
|
|
1497
|
+
constructor(treeView: TreeViewComponent, navigationService: NavigationService);
|
|
1498
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
1499
|
+
ngOnDestroy(): void;
|
|
1500
|
+
protected itemKey(e: any): any;
|
|
1501
|
+
protected select(e: any): void;
|
|
1502
|
+
protected selectSingle(node: any): void;
|
|
1503
|
+
protected selectMultiple(node: any): void;
|
|
1504
|
+
private notify;
|
|
1505
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SelectDirective, never>;
|
|
1506
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<SelectDirective, "[kendoTreeViewSelectable]", never, { "isSelected": { "alias": "isSelected"; "required": false; }; "selectKey": { "alias": "selectBy"; "required": false; }; "selection": { "alias": "kendoTreeViewSelectable"; "required": false; }; "selectedKeys": { "alias": "selectedKeys"; "required": false; }; }, { "selectedKeysChange": "selectedKeysChange"; }, never, never, true, never>;
|
|
1507
|
+
}
|
|
1508
|
+
|
|
1509
|
+
/**
|
|
1510
|
+
* @hidden
|
|
1511
|
+
*/
|
|
1512
|
+
declare class DragClueComponent {
|
|
1513
|
+
private cdr;
|
|
1514
|
+
hostClasses: boolean;
|
|
1515
|
+
/**
|
|
1516
|
+
* The text value of the dragged TreeView item.
|
|
1517
|
+
*/
|
|
1518
|
+
text: string;
|
|
1519
|
+
/**
|
|
1520
|
+
* The attempted operation according to the current drop target.
|
|
1521
|
+
*/
|
|
1522
|
+
action: DropAction;
|
|
1523
|
+
/**
|
|
1524
|
+
* The look-up info for the currently dragged item.
|
|
1525
|
+
*/
|
|
1526
|
+
sourceItem: TreeItemLookup;
|
|
1527
|
+
/**
|
|
1528
|
+
* The look-up info for the destination item (if hovering a valid drop target).
|
|
1529
|
+
*/
|
|
1530
|
+
destinationItem: TreeItemLookup;
|
|
1531
|
+
/**
|
|
1532
|
+
* Defines the drag clue content template.
|
|
1533
|
+
*/
|
|
1534
|
+
template: TemplateRef<any>;
|
|
1535
|
+
posistionStyle: string;
|
|
1536
|
+
get statusIconClass(): string;
|
|
1537
|
+
get statusSVGIcon(): SVGIcon;
|
|
1538
|
+
constructor(cdr: ChangeDetectorRef);
|
|
1539
|
+
detectChanges(): void;
|
|
1540
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DragClueComponent, never>;
|
|
1541
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DragClueComponent, "kendo-treeview-drag-clue", never, {}, {}, never, never, true, never>;
|
|
1542
|
+
}
|
|
1543
|
+
|
|
1544
|
+
/**
|
|
1545
|
+
* @hidden
|
|
1546
|
+
*/
|
|
1547
|
+
declare abstract class DragAndDropAssetService<T> implements OnDestroy {
|
|
1548
|
+
protected get componentRef(): ComponentRef<T>;
|
|
1549
|
+
protected set componentRef(componentRef: ComponentRef<T>);
|
|
1550
|
+
protected get element(): HTMLElement;
|
|
1551
|
+
protected _componentRef: ComponentRef<T>;
|
|
1552
|
+
abstract initialize(container: ViewContainerRef, template?: TemplateRef<any>): void;
|
|
1553
|
+
ngOnDestroy(): void;
|
|
1554
|
+
show(): void;
|
|
1555
|
+
hide(): void;
|
|
1556
|
+
move(left: number, top: number, offset?: number): void;
|
|
1557
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DragAndDropAssetService<any>, never>;
|
|
1558
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DragAndDropAssetService<any>>;
|
|
1559
|
+
}
|
|
1560
|
+
|
|
1561
|
+
/**
|
|
1562
|
+
* @hidden
|
|
1563
|
+
*/
|
|
1564
|
+
declare class DragClueService extends DragAndDropAssetService<DragClueComponent> {
|
|
1565
|
+
private returnAnimation;
|
|
1566
|
+
private scrollInterval;
|
|
1567
|
+
constructor();
|
|
1568
|
+
initialize(container: ViewContainerRef, template?: TemplateRef<any>): void;
|
|
1569
|
+
ngOnDestroy(): void;
|
|
1570
|
+
move(left: number, top: number): void;
|
|
1571
|
+
animateDragClueToElementPosition(target: HTMLElement): void;
|
|
1572
|
+
cancelReturnAnimation(): void;
|
|
1573
|
+
updateDragClueData(action: DropAction, sourceItem: TreeItemLookup, destinationItem: TreeItemLookup): void;
|
|
1574
|
+
updateText(text: string): void;
|
|
1575
|
+
/**
|
|
1576
|
+
* Triggers the first scrollable parent to scroll upwards or downwards.
|
|
1577
|
+
* Uses setInterval, so should be called outside the angular zone.
|
|
1578
|
+
*/
|
|
1579
|
+
scrollIntoView({ step, interval }: DragAndDropScrollSettings): void;
|
|
1580
|
+
/**
|
|
1581
|
+
* Cancels out the on-going scroll animation, if present.
|
|
1582
|
+
*/
|
|
1583
|
+
cancelScroll(): void;
|
|
1584
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DragClueService, never>;
|
|
1585
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DragClueService>;
|
|
1586
|
+
}
|
|
1587
|
+
|
|
1588
|
+
/**
|
|
1589
|
+
* @hidden
|
|
1590
|
+
*/
|
|
1591
|
+
declare class DropHintComponent {
|
|
1592
|
+
private changeDetectorRef;
|
|
1593
|
+
hostClass: boolean;
|
|
1594
|
+
/**
|
|
1595
|
+
* Defines the drag hint content template.
|
|
1596
|
+
*/
|
|
1597
|
+
template: TemplateRef<any>;
|
|
1598
|
+
position: string;
|
|
1599
|
+
pointerEvents: string;
|
|
1600
|
+
/**
|
|
1601
|
+
* The attempted operation according to the current drop target.
|
|
1602
|
+
*/
|
|
1603
|
+
action: DropAction;
|
|
1604
|
+
/**
|
|
1605
|
+
* The look-up info for the currently dragged item.
|
|
1606
|
+
*/
|
|
1607
|
+
sourceItem: TreeItemLookup;
|
|
1608
|
+
/**
|
|
1609
|
+
* The look-up info for the destination item.
|
|
1610
|
+
*/
|
|
1611
|
+
destinationItem: TreeItemLookup;
|
|
1612
|
+
constructor(changeDetectorRef: ChangeDetectorRef);
|
|
1613
|
+
detectChanges(): void;
|
|
1614
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DropHintComponent, never>;
|
|
1615
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DropHintComponent, "kendo-treeview-drop-hint", never, {}, {}, never, never, true, never>;
|
|
1616
|
+
}
|
|
1617
|
+
|
|
1618
|
+
/**
|
|
1619
|
+
* @hidden
|
|
1620
|
+
*/
|
|
1621
|
+
declare class DropHintService extends DragAndDropAssetService<DropHintComponent> {
|
|
1622
|
+
constructor();
|
|
1623
|
+
initialize(container: ViewContainerRef, template?: TemplateRef<any>): void;
|
|
1624
|
+
updateDropHintData(action: DropAction, sourceItem: TreeItemLookup, destinationItem: TreeItemLookup): void;
|
|
1625
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DropHintService, never>;
|
|
1626
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DropHintService>;
|
|
1627
|
+
}
|
|
1628
|
+
|
|
1629
|
+
/**
|
|
1630
|
+
* Represents the template for the TreeView drag clue when you drag an item.
|
|
1631
|
+
*
|
|
1632
|
+
* To define the drag clue template, nest an `<ng-template>` tag with the `kendoTreeViewDragClueTemplate` directive inside a `<kendo-treeview>` tag
|
|
1633
|
+
* ([see example](https://www.telerik.com/kendo-angular-ui/components/treeview/drag-and-drop#templates)).
|
|
1634
|
+
*
|
|
1635
|
+
* The template context provides the following variables:
|
|
1636
|
+
* - `let-text="text"` (`string`)—The display text of the item being dragged.
|
|
1637
|
+
* - `let-action="action"` ([`DropAction`](https://www.telerik.com/kendo-angular-ui/components/treeview/api/dropaction))—The type of drop action that will occur.
|
|
1638
|
+
* - `let-sourceItem="sourceItem"` ([`TreeItemLookup`](https://www.telerik.com/kendo-angular-ui/components/treeview/api/treeitemlookup))—The TreeView item that is being dragged from its original position.
|
|
1639
|
+
* - `let-destinationItem="destinationItem"` ([`TreeItemLookup`](https://www.telerik.com/kendo-angular-ui/components/treeview/api/treeitemlookup))—The TreeView item that serves as the target for the drop operation.
|
|
1640
|
+
*
|
|
1641
|
+
* @example
|
|
1642
|
+
* ```html
|
|
1643
|
+
* <kendo-treeview>
|
|
1644
|
+
* <ng-template kendoTreeViewDragClueTemplate let-text="text">
|
|
1645
|
+
* Dragging: {{ text }}
|
|
1646
|
+
* </ng-template>
|
|
1647
|
+
* </kendo-treeview>
|
|
1648
|
+
* ```
|
|
1649
|
+
*/
|
|
1650
|
+
declare class DragClueTemplateDirective {
|
|
1651
|
+
templateRef: TemplateRef<any>;
|
|
1652
|
+
constructor(templateRef: TemplateRef<any>);
|
|
1653
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DragClueTemplateDirective, [{ optional: true; }]>;
|
|
1654
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DragClueTemplateDirective, "[kendoTreeViewDragClueTemplate]", never, {}, {}, never, never, true, never>;
|
|
1655
|
+
}
|
|
1656
|
+
|
|
1657
|
+
/**
|
|
1658
|
+
* Represents the template for the TreeView drop hint when you drag an item.
|
|
1659
|
+
*
|
|
1660
|
+
* To define the hint template, nest an `<ng-template>` tag with the `kendoTreeViewDropHintTemplate` directive inside a `<kendo-treeview>` tag
|
|
1661
|
+
* ([see example](https://www.telerik.com/kendo-angular-ui/components/treeview/drag-and-drop#templates)).
|
|
1662
|
+
*
|
|
1663
|
+
* The template context provides the following variables:
|
|
1664
|
+
* - `let-action="action"` ([`DropAction`](https://www.telerik.com/kendo-angular-ui/components/treeview/api/dropaction))—The drop action being performed.
|
|
1665
|
+
* - `let-sourceItem="sourceItem"` ([`TreeItemLookup`](https://www.telerik.com/kendo-angular-ui/components/treeview/api/treeitemlookup))—The item being dragged.
|
|
1666
|
+
* - `let-destinationItem="destinationItem"` ([`TreeItemLookup`](https://www.telerik.com/kendo-angular-ui/components/treeview/api/treeitemlookup))—The target item for the drop operation.
|
|
1667
|
+
*
|
|
1668
|
+
* @example
|
|
1669
|
+
* ```html
|
|
1670
|
+
* <kendo-treeview>
|
|
1671
|
+
* <ng-template kendoTreeViewDropHintTemplate let-action="action">
|
|
1672
|
+
* Drop action: {{ action }}
|
|
1673
|
+
* </ng-template>
|
|
1674
|
+
* </kendo-treeview>
|
|
1675
|
+
* ```
|
|
1676
|
+
*/
|
|
1677
|
+
declare class DropHintTemplateDirective {
|
|
1678
|
+
templateRef: TemplateRef<any>;
|
|
1679
|
+
constructor(templateRef: TemplateRef<any>);
|
|
1680
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DropHintTemplateDirective, [{ optional: true; }]>;
|
|
1681
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DropHintTemplateDirective, "[kendoTreeViewDropHintTemplate]", never, {}, {}, never, never, true, never>;
|
|
1682
|
+
}
|
|
1683
|
+
|
|
1684
|
+
/**
|
|
1685
|
+
* Represents the directive that enables you to drag and drop items inside the current TreeView or between multiple linked TreeView component instances
|
|
1686
|
+
* ([see example](https://www.telerik.com/kendo-angular-ui/components/treeview/drag-and-drop)).
|
|
1687
|
+
*
|
|
1688
|
+
* Triggers the [`nodeDragStart`](https://www.telerik.com/kendo-angular-ui/components/treeview/api/treeviewcomponent#nodedragstart),
|
|
1689
|
+
* [`nodeDrag`](https://www.telerik.com/kendo-angular-ui/components/treeview/api/treeviewcomponent#nodedrag),
|
|
1690
|
+
* [`nodeDrop`](https://www.telerik.com/kendo-angular-ui/components/treeview/api/treeviewcomponent#nodedrop),
|
|
1691
|
+
* [`nodeDragEnd`](https://www.telerik.com/kendo-angular-ui/components/treeview/api/treeviewcomponent#nodedragend),
|
|
1692
|
+
* [`addItem`](https://www.telerik.com/kendo-angular-ui/components/treeview/api/treeviewcomponent#additem) and
|
|
1693
|
+
* [`removeItem`](https://www.telerik.com/kendo-angular-ui/components/treeview/api/treeviewcomponent#removeitem)
|
|
1694
|
+
* events when you perform the corresponding actions.
|
|
1695
|
+
*
|
|
1696
|
+
* @example
|
|
1697
|
+
* ```html
|
|
1698
|
+
* <kendo-treeview
|
|
1699
|
+
* kendoTreeViewDragAndDrop
|
|
1700
|
+
* [dropZoneTreeViews]="treeView"
|
|
1701
|
+
* >
|
|
1702
|
+
* </kendo-treeview>
|
|
1703
|
+
* ```
|
|
1704
|
+
*
|
|
1705
|
+
* @remarks
|
|
1706
|
+
* Applied to: {@link TreeViewComponent}
|
|
1707
|
+
*/
|
|
1708
|
+
declare class DragAndDropDirective implements AfterContentInit, OnDestroy {
|
|
1709
|
+
private element;
|
|
1710
|
+
private zone;
|
|
1711
|
+
private treeview;
|
|
1712
|
+
private dragClueService;
|
|
1713
|
+
private dropHintService;
|
|
1714
|
+
/**
|
|
1715
|
+
* Specifies whether the `removeItem` event fires after the user drops an item while pressing the `ctrl` key.
|
|
1716
|
+
* If enabled, the `removeItem` event does not fire on the source TreeView
|
|
1717
|
+
* ([see example](https://www.telerik.com/kendo-angular-ui/components/treeview/drag-and-drop#multiple-treeviews)).
|
|
1718
|
+
*
|
|
1719
|
+
* @default false
|
|
1720
|
+
*/
|
|
1721
|
+
allowCopy: boolean;
|
|
1722
|
+
/**
|
|
1723
|
+
* Specifies the `TreeViewComponent` instances into which the user can drop dragged items from the current `TreeViewComponent`
|
|
1724
|
+
* ([see example](https://www.telerik.com/kendo-angular-ui/components/treeview/drag-and-drop#multiple-treeviews)).
|
|
1725
|
+
*/
|
|
1726
|
+
dropZoneTreeViews: TreeViewComponent[];
|
|
1727
|
+
/**
|
|
1728
|
+
* Specifies the distance in pixels from the initial item `pointerdown` event before dragging starts.
|
|
1729
|
+
* The `nodeDragStart` and all subsequent TreeView drag events do not fire until dragging begins.
|
|
1730
|
+
*
|
|
1731
|
+
* @default 5
|
|
1732
|
+
*/
|
|
1733
|
+
startDragAfter: number;
|
|
1734
|
+
/**
|
|
1735
|
+
* Controls the auto-scrolling behavior during drag-and-drop ([see example](https://www.telerik.com/kendo-angular-ui/components/treeview/drag-and-drop#auto-scrolling)).
|
|
1736
|
+
* Enabled by default. To turn off auto-scrolling, set this property to `false`.
|
|
1737
|
+
*
|
|
1738
|
+
* By default, scrolling occurs by 1 pixel every 1 millisecond when the dragged item reaches the top or bottom of the scrollable container.
|
|
1739
|
+
* You can override the `step` and `interval` by providing a `DragAndDropScrollSettings` object.
|
|
1740
|
+
*
|
|
1741
|
+
* @default true
|
|
1742
|
+
*/
|
|
1743
|
+
autoScroll: boolean | DragAndDropScrollSettings;
|
|
1744
|
+
/**
|
|
1745
|
+
* @hidden
|
|
1746
|
+
*/
|
|
1747
|
+
dragClueTemplate: DragClueTemplateDirective;
|
|
1748
|
+
/**
|
|
1749
|
+
* @hidden
|
|
1750
|
+
*/
|
|
1751
|
+
dropHintTemplate: DropHintTemplateDirective;
|
|
1752
|
+
/**
|
|
1753
|
+
* @hidden
|
|
1754
|
+
*/
|
|
1755
|
+
userSelectStyle: string;
|
|
1756
|
+
protected draggable: Draggable;
|
|
1757
|
+
protected draggedItem: HTMLElement;
|
|
1758
|
+
/**
|
|
1759
|
+
* The pointer event of the last successful item pointerdown event (the draggable `press` event).
|
|
1760
|
+
* Used for determining whether the `startDragAfter` distance is covered and for the `nodeDragStart` event args.
|
|
1761
|
+
* Used also as a flag for whether a drag attempt is pending. Should be set to `null` once the dragging begins.
|
|
1762
|
+
*/
|
|
1763
|
+
protected pendingDragStartEvent: PointerEvent;
|
|
1764
|
+
private get scrollSettings();
|
|
1765
|
+
/**
|
|
1766
|
+
* Describes the offset of the parent element if the latter has the `transform` CSS prop applied.
|
|
1767
|
+
* Transformed parents create new stacking context and the fixed children must be position based on the transformed parent.
|
|
1768
|
+
* https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Positioning/Understanding_z_index/The_stacking_context
|
|
1769
|
+
*/
|
|
1770
|
+
private containerOffset;
|
|
1771
|
+
constructor(element: ElementRef<HTMLElement>, zone: NgZone, treeview: TreeViewComponent, dragClueService: DragClueService, dropHintService: DropHintService);
|
|
1772
|
+
ngAfterContentInit(): void;
|
|
1773
|
+
ngOnDestroy(): void;
|
|
1774
|
+
/**
|
|
1775
|
+
* @hidden
|
|
1776
|
+
*/
|
|
1777
|
+
handlePress({ originalEvent }: any): void;
|
|
1778
|
+
/**
|
|
1779
|
+
* @hidden
|
|
1780
|
+
*/
|
|
1781
|
+
handleDrag({ originalEvent, clientX, clientY }: any): void;
|
|
1782
|
+
/**
|
|
1783
|
+
* @hidden
|
|
1784
|
+
*/
|
|
1785
|
+
handleRelease({ originalEvent, clientY }: any): void;
|
|
1786
|
+
private updateDropHintState;
|
|
1787
|
+
private updateDragClueState;
|
|
1788
|
+
private initalizeDraggable;
|
|
1789
|
+
private notifyDragStart;
|
|
1790
|
+
private notifyDrag;
|
|
1791
|
+
private notifyDrop;
|
|
1792
|
+
private notifyDragEnd;
|
|
1793
|
+
private getTargetTreeView;
|
|
1794
|
+
private disableAnimationsForNextTick;
|
|
1795
|
+
private shouldInitiateDragStart;
|
|
1796
|
+
private initiateDragStart;
|
|
1797
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DragAndDropDirective, never>;
|
|
1798
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DragAndDropDirective, "[kendoTreeViewDragAndDrop]", never, { "allowCopy": { "alias": "allowCopy"; "required": false; }; "dropZoneTreeViews": { "alias": "dropZoneTreeViews"; "required": false; }; "startDragAfter": { "alias": "startDragAfter"; "required": false; }; "autoScroll": { "alias": "autoScroll"; "required": false; }; }, {}, ["dragClueTemplate", "dropHintTemplate"], never, true, never>;
|
|
1799
|
+
}
|
|
1800
|
+
|
|
1801
|
+
/**
|
|
1802
|
+
* @hidden
|
|
1803
|
+
*/
|
|
1804
|
+
declare abstract class FilteringBase {
|
|
1805
|
+
protected component: DataBoundComponent;
|
|
1806
|
+
/**
|
|
1807
|
+
* Stores the unfiltered nodes
|
|
1808
|
+
*/
|
|
1809
|
+
protected filterData: TreeItemFilterState[];
|
|
1810
|
+
protected visibleNodes: Set<any>;
|
|
1811
|
+
protected currentFilterTerm: string;
|
|
1812
|
+
/**
|
|
1813
|
+
* The settings which are applied when performing a filter on the component's data.
|
|
1814
|
+
*/
|
|
1815
|
+
set filterSettings(settings: TreeViewFilterSettings);
|
|
1816
|
+
get filterSettings(): TreeViewFilterSettings;
|
|
1817
|
+
private _filterSettings;
|
|
1818
|
+
/**
|
|
1819
|
+
* Applies a filter and changes the visibility of the component's nodes accordingly.
|
|
1820
|
+
*/
|
|
1821
|
+
set filter(term: string);
|
|
1822
|
+
constructor(component: DataBoundComponent);
|
|
1823
|
+
/**
|
|
1824
|
+
* @hidden
|
|
1825
|
+
*/
|
|
1826
|
+
handleFilterChange(term: string): void;
|
|
1827
|
+
protected updateVisibleNodes(items: TreeItemFilterState[]): void;
|
|
1828
|
+
protected resetNodesVisibility(items: TreeItemFilterState[]): void;
|
|
1829
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FilteringBase, never>;
|
|
1830
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<FilteringBase, never, never, { "filterSettings": { "alias": "filterSettings"; "required": false; }; "filter": { "alias": "filter"; "required": false; }; }, {}, never, never, true, never>;
|
|
1831
|
+
}
|
|
1832
|
+
|
|
1833
|
+
/**
|
|
1834
|
+
* Represents a directive that handles hierarchical data binding and provides built-in filtering functionality for the TreeView.
|
|
1835
|
+
*
|
|
1836
|
+
* Use this directive to bind hierarchical data where child nodes are nested within parent nodes.
|
|
1837
|
+
* The directive also enables the built-in filter input and automatic filter handling when used with the `filterable` property.
|
|
1838
|
+
*
|
|
1839
|
+
* @example
|
|
1840
|
+
* ```html
|
|
1841
|
+
* <kendo-treeview
|
|
1842
|
+
* kendoTreeViewHierarchyBinding
|
|
1843
|
+
* childrenField="items"
|
|
1844
|
+
* textField="text"
|
|
1845
|
+
* [nodes]="data"
|
|
1846
|
+
* [filterable]="true">
|
|
1847
|
+
* </kendo-treeview>
|
|
1848
|
+
* ```
|
|
1849
|
+
*
|
|
1850
|
+
* @remarks
|
|
1851
|
+
* Applied to: {@link TreeViewComponent}
|
|
1852
|
+
*/
|
|
1853
|
+
declare class HierarchyBindingDirective extends FilteringBase implements OnInit {
|
|
1854
|
+
protected component: DataBoundComponent;
|
|
1855
|
+
private dragAndDropDirective?;
|
|
1856
|
+
/**
|
|
1857
|
+
* Specifies the field name of the parent node that holds the child data items.
|
|
1858
|
+
*/
|
|
1859
|
+
set childrenField(value: string);
|
|
1860
|
+
/**
|
|
1861
|
+
* Specifies the field name of the parent node that holds the child data items.
|
|
1862
|
+
*/
|
|
1863
|
+
get childrenField(): string;
|
|
1864
|
+
/**
|
|
1865
|
+
* Specifies the hierarchical data displayed by the TreeView.
|
|
1866
|
+
*/
|
|
1867
|
+
set nodes(nodes: any[]);
|
|
1868
|
+
get nodes(): any[];
|
|
1869
|
+
protected _nodes: any[];
|
|
1870
|
+
/**
|
|
1871
|
+
* @hidden
|
|
1872
|
+
* A callback which determines whether a TreeView node should be rendered as hidden.
|
|
1873
|
+
*/
|
|
1874
|
+
set isVisible(fn: (item: object, index: string) => boolean);
|
|
1875
|
+
/**
|
|
1876
|
+
* @hidden
|
|
1877
|
+
*/
|
|
1878
|
+
loadOnDemand: boolean;
|
|
1879
|
+
/**
|
|
1880
|
+
* @hidden
|
|
1881
|
+
*/
|
|
1882
|
+
originalData: any[];
|
|
1883
|
+
private _childrenField;
|
|
1884
|
+
constructor(component: DataBoundComponent, dragAndDropDirective?: DragAndDropDirective);
|
|
1885
|
+
ngOnInit(): void;
|
|
1886
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
1887
|
+
/**
|
|
1888
|
+
* @hidden
|
|
1889
|
+
*/
|
|
1890
|
+
updateNodes(values: any[]): void;
|
|
1891
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<HierarchyBindingDirective, [null, { optional: true; host: true; }]>;
|
|
1892
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<HierarchyBindingDirective, "[kendoTreeViewHierarchyBinding]", never, { "childrenField": { "alias": "childrenField"; "required": false; }; "nodes": { "alias": "nodes"; "required": false; }; "isVisible": { "alias": "isVisible"; "required": false; }; "loadOnDemand": { "alias": "loadOnDemand"; "required": false; }; }, {}, never, never, true, never>;
|
|
1893
|
+
}
|
|
1894
|
+
|
|
1895
|
+
/**
|
|
1896
|
+
* Represents a directive that handles flat data binding and provides built-in filtering functionality for the TreeView.
|
|
1897
|
+
*
|
|
1898
|
+
* Use this directive to bind flat data where parent-child relationships are defined by ID fields.
|
|
1899
|
+
* The directive also enables the built-in filter input and automatic filter handling when used with the `filterable` property.
|
|
1900
|
+
*
|
|
1901
|
+
* @example
|
|
1902
|
+
* ```html
|
|
1903
|
+
* <kendo-treeview
|
|
1904
|
+
* kendoTreeViewFlatDataBinding
|
|
1905
|
+
* idField="id"
|
|
1906
|
+
* parentIdField="parentId"
|
|
1907
|
+
* textField="text"
|
|
1908
|
+
* [nodes]="data"
|
|
1909
|
+
* [filterable]="true">
|
|
1910
|
+
* </kendo-treeview>
|
|
1911
|
+
* ```
|
|
1912
|
+
*
|
|
1913
|
+
* @remarks
|
|
1914
|
+
* Applied to: {@link TreeViewComponent}
|
|
1915
|
+
*/
|
|
1916
|
+
declare class FlatDataBindingDirective extends FilteringBase implements OnInit, OnChanges {
|
|
1917
|
+
protected component: DataBoundComponent;
|
|
1918
|
+
/**
|
|
1919
|
+
* Specifies the flat data collection that renders as nodes in the TreeView.
|
|
1920
|
+
*/
|
|
1921
|
+
set nodes(nodes: any[]);
|
|
1922
|
+
get nodes(): any[];
|
|
1923
|
+
protected _nodes: any[];
|
|
1924
|
+
/**
|
|
1925
|
+
* Specifies the field name that contains the parent node identifier.
|
|
1926
|
+
*/
|
|
1927
|
+
parentIdField: string;
|
|
1928
|
+
/**
|
|
1929
|
+
* Specifies the field name that contains the unique node identifier.
|
|
1930
|
+
*/
|
|
1931
|
+
idField: string;
|
|
1932
|
+
/**
|
|
1933
|
+
* @hidden
|
|
1934
|
+
*/
|
|
1935
|
+
loadOnDemand: boolean;
|
|
1936
|
+
/**
|
|
1937
|
+
* @hidden
|
|
1938
|
+
* A callback which determines whether a TreeView node should be rendered as hidden.
|
|
1939
|
+
*/
|
|
1940
|
+
set isVisible(fn: (item: object, index: string) => boolean);
|
|
1941
|
+
/**
|
|
1942
|
+
* @hidden
|
|
1943
|
+
*/
|
|
1944
|
+
originalData: any[];
|
|
1945
|
+
constructor(component: DataBoundComponent);
|
|
1946
|
+
/**
|
|
1947
|
+
* @hidden
|
|
1948
|
+
*/
|
|
1949
|
+
ngOnInit(): void;
|
|
1950
|
+
/**
|
|
1951
|
+
* @hidden
|
|
1952
|
+
*/
|
|
1953
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
1954
|
+
/**
|
|
1955
|
+
* @hidden
|
|
1956
|
+
*/
|
|
1957
|
+
updateNodes(values: any[]): void;
|
|
1958
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FlatDataBindingDirective, never>;
|
|
1959
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<FlatDataBindingDirective, "[kendoTreeViewFlatDataBinding]", never, { "nodes": { "alias": "nodes"; "required": false; }; "parentIdField": { "alias": "parentIdField"; "required": false; }; "idField": { "alias": "idField"; "required": false; }; "loadOnDemand": { "alias": "loadOnDemand"; "required": false; }; "isVisible": { "alias": "isVisible"; "required": false; }; }, {}, never, never, true, never>;
|
|
1960
|
+
}
|
|
1961
|
+
|
|
1962
|
+
/**
|
|
1963
|
+
* Represents the directive that enables you to update the initially provided data array during drag-and-drop.
|
|
1964
|
+
*
|
|
1965
|
+
* Use this directive with one of the data-binding directives ([`kendoTreeViewHierarchyBinding`](https://www.telerik.com/kendo-angular-ui/components/treeview/api/hierarchybindingdirective)
|
|
1966
|
+
* or [`kendoTreeViewFlatDataBinding`](https://www.telerik.com/kendo-angular-ui/components/treeview/api/flatdatabindingdirective)), which set their own edit handlers, or provide
|
|
1967
|
+
* your own [`editService`](https://www.telerik.com/kendo-angular-ui/components/treeview/api/editservice) to this directive.
|
|
1968
|
+
*
|
|
1969
|
+
* Providing a custom `editService` allows you to handle the
|
|
1970
|
+
* [`addItem`](https://www.telerik.com/kendo-angular-ui/components/treeview/api/treeviewcomponent#additem) and [`removeItem`](https://www.telerik.com/kendo-angular-ui/components/treeview/api/treeviewcomponent#removeitem)
|
|
1971
|
+
* events when they are triggered by the TreeView component.
|
|
1972
|
+
*
|
|
1973
|
+
* @example
|
|
1974
|
+
* ```html
|
|
1975
|
+
* <kendo-treeview
|
|
1976
|
+
* kendoTreeViewDragAndDrop
|
|
1977
|
+
* kendoTreeViewDragAndDropEditing
|
|
1978
|
+
* [nodes]="nodes"
|
|
1979
|
+
* textField="text">
|
|
1980
|
+
* </kendo-treeview>
|
|
1981
|
+
* ```
|
|
1982
|
+
*
|
|
1983
|
+
* @remarks
|
|
1984
|
+
* Applied to: {@link TreeViewComponent}
|
|
1985
|
+
*/
|
|
1986
|
+
declare class DragAndDropEditingDirective implements OnDestroy {
|
|
1987
|
+
private treeview;
|
|
1988
|
+
/**
|
|
1989
|
+
* Specifies the handlers called on drag-and-drop [`addItem`](https://www.telerik.com/kendo-angular-ui/components/treeview/api/treeviewcomponent#additem)
|
|
1990
|
+
* and [`removeItem`](https://www.telerik.com/kendo-angular-ui/components/treeview/api/treeviewcomponent#removeitem) events.
|
|
1991
|
+
*/
|
|
1992
|
+
set editService(service: EditService);
|
|
1993
|
+
private subscriptions;
|
|
1994
|
+
constructor(treeview: TreeViewComponent);
|
|
1995
|
+
ngOnDestroy(): void;
|
|
1996
|
+
private handleAdd;
|
|
1997
|
+
private handleRemove;
|
|
1998
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DragAndDropEditingDirective, never>;
|
|
1999
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DragAndDropEditingDirective, "[kendoTreeViewDragAndDropEditing]", never, { "editService": { "alias": "editService"; "required": false; }; }, {}, never, never, true, never>;
|
|
2000
|
+
}
|
|
2001
|
+
|
|
2002
|
+
/**
|
|
2003
|
+
* Represents the directive that enables you to display only a limited number of nodes per level
|
|
2004
|
+
* ([see example](https://www.telerik.com/kendo-angular-ui/components/treeview/load-more-button)).
|
|
2005
|
+
*
|
|
2006
|
+
* @example
|
|
2007
|
+
* ```html
|
|
2008
|
+
* <kendo-treeview
|
|
2009
|
+
* ...
|
|
2010
|
+
* kendoTreeViewLoadMore
|
|
2011
|
+
* [pageSize]="10"
|
|
2012
|
+
* [totalRootNodes]="100"
|
|
2013
|
+
* totalField="totalChildren">
|
|
2014
|
+
* </kendo-treeview>
|
|
2015
|
+
* ```
|
|
2016
|
+
*
|
|
2017
|
+
* @remarks
|
|
2018
|
+
* Applied to: {@link TreeViewComponent}
|
|
2019
|
+
*/
|
|
2020
|
+
declare class LoadMoreDirective {
|
|
2021
|
+
private treeview;
|
|
2022
|
+
/**
|
|
2023
|
+
* Sets the callback function that runs when the load more button is clicked.
|
|
2024
|
+
* Provide a function when you fetch additional nodes on demand
|
|
2025
|
+
* ([see example](https://www.telerik.com/kendo-angular-ui/components/treeview/load-more-button#remote-data)).
|
|
2026
|
+
*
|
|
2027
|
+
*/
|
|
2028
|
+
set loadMoreNodes(loadMoreNodes: ((loadMoreArgs: LoadMoreRequestArgs) => Observable<any[]>) | string);
|
|
2029
|
+
/**
|
|
2030
|
+
* Sets the initial number of nodes to render on each level.
|
|
2031
|
+
* Each time the load more button is clicked, the page size increases by this number.
|
|
2032
|
+
*/
|
|
2033
|
+
pageSize: number;
|
|
2034
|
+
/**
|
|
2035
|
+
* Sets the total number of root nodes.
|
|
2036
|
+
* Use this property when you fetch additional nodes on demand
|
|
2037
|
+
* ([see example](https://www.telerik.com/kendo-angular-ui/components/treeview/load-more-button#remote-data)).
|
|
2038
|
+
*/
|
|
2039
|
+
totalRootNodes: number;
|
|
2040
|
+
/**
|
|
2041
|
+
* Sets the field that contains the total number of child nodes for the data item.
|
|
2042
|
+
* Use this property when you fetch additional nodes on demand
|
|
2043
|
+
* ([see example](https://www.telerik.com/kendo-angular-ui/components/treeview/load-more-button#remote-data)).
|
|
2044
|
+
*/
|
|
2045
|
+
totalField: string;
|
|
2046
|
+
/**
|
|
2047
|
+
* Keeps track of the current page size of each node over expand/collapse cycles.
|
|
2048
|
+
*/
|
|
2049
|
+
private pageSizes;
|
|
2050
|
+
/**
|
|
2051
|
+
* Used as an identifier for the root page size as the root collection of nodes is not associated with a data item.
|
|
2052
|
+
*/
|
|
2053
|
+
private rootLevelId;
|
|
2054
|
+
constructor(treeview: TreeViewComponent);
|
|
2055
|
+
ngOnChanges(): void;
|
|
2056
|
+
private verifySettings;
|
|
2057
|
+
private getGroupSize;
|
|
2058
|
+
private setGroupSize;
|
|
2059
|
+
private getTotalNodesCount;
|
|
2060
|
+
private getInitalPageSize;
|
|
2061
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LoadMoreDirective, never>;
|
|
2062
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<LoadMoreDirective, "[kendoTreeViewLoadMore]", never, { "loadMoreNodes": { "alias": "kendoTreeViewLoadMore"; "required": false; }; "pageSize": { "alias": "pageSize"; "required": false; }; "totalRootNodes": { "alias": "totalRootNodes"; "required": false; }; "totalField": { "alias": "totalField"; "required": false; }; }, {}, never, never, true, never>;
|
|
2063
|
+
}
|
|
2064
|
+
|
|
2065
|
+
/**
|
|
2066
|
+
* @hidden
|
|
2067
|
+
*/
|
|
2068
|
+
declare class TreeViewMessages extends ComponentMessages {
|
|
2069
|
+
/**
|
|
2070
|
+
* Sets the text for the `Load More` button title.
|
|
2071
|
+
*/
|
|
2072
|
+
loadMore: string;
|
|
2073
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TreeViewMessages, never>;
|
|
2074
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<TreeViewMessages, "kendo-treeview-messages-base", never, { "loadMore": { "alias": "loadMore"; "required": false; }; }, {}, never, never, true, never>;
|
|
2075
|
+
}
|
|
2076
|
+
|
|
2077
|
+
/**
|
|
2078
|
+
* Represents the custom messages component of the TreeView.
|
|
2079
|
+
*
|
|
2080
|
+
* Use this component to override default messages for the TreeView.
|
|
2081
|
+
*
|
|
2082
|
+
* @example
|
|
2083
|
+
* ```html
|
|
2084
|
+
* <kendo-treeview>
|
|
2085
|
+
* <kendo-treeview-messages
|
|
2086
|
+
* loadMore="Load more items">
|
|
2087
|
+
* </kendo-treeview-messages>
|
|
2088
|
+
* </kendo-treeview>
|
|
2089
|
+
* ```
|
|
2090
|
+
*/
|
|
2091
|
+
declare class CustomMessagesComponent extends TreeViewMessages {
|
|
2092
|
+
protected service: LocalizationService;
|
|
2093
|
+
constructor(service: LocalizationService);
|
|
2094
|
+
protected get override(): boolean;
|
|
2095
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CustomMessagesComponent, never>;
|
|
2096
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CustomMessagesComponent, "kendo-treeview-messages", never, {}, {}, never, never, true, never>;
|
|
2097
|
+
}
|
|
2098
|
+
|
|
2099
|
+
/**
|
|
2100
|
+
* Represents the [NgModule](link:site.data.urls.angular['ngmoduleapi']) definition for the TreeView component.
|
|
2101
|
+
*
|
|
2102
|
+
* @example
|
|
2103
|
+
* ```ts
|
|
2104
|
+
* import { NgModule } from '@angular/core';
|
|
2105
|
+
* import { BrowserModule } from '@angular/platform-browser';
|
|
2106
|
+
* import { TreeViewModule } from '@progress/kendo-angular-treeview';
|
|
2107
|
+
* import { AppComponent } from './app.component';
|
|
2108
|
+
*
|
|
2109
|
+
* @NgModule({
|
|
2110
|
+
* imports: [BrowserModule, TreeViewModule],
|
|
2111
|
+
* declarations: [AppComponent],
|
|
2112
|
+
* bootstrap: [AppComponent]
|
|
2113
|
+
* })
|
|
2114
|
+
* export class AppModule {}
|
|
2115
|
+
* ```
|
|
2116
|
+
*/
|
|
2117
|
+
declare class TreeViewModule {
|
|
2118
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TreeViewModule, never>;
|
|
2119
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<TreeViewModule, never, [typeof TreeViewComponent, typeof NodeTemplateDirective, typeof CheckDirective, typeof DisableDirective, typeof ExpandDirective, typeof SelectDirective, typeof HierarchyBindingDirective, typeof FlatDataBindingDirective, typeof DragAndDropDirective, typeof DragClueTemplateDirective, typeof DropHintTemplateDirective, typeof DragAndDropEditingDirective, typeof LoadMoreDirective, typeof LoadMoreButtonTemplateDirective, typeof CustomMessagesComponent], [typeof TreeViewComponent, typeof NodeTemplateDirective, typeof CheckDirective, typeof DisableDirective, typeof ExpandDirective, typeof SelectDirective, typeof HierarchyBindingDirective, typeof FlatDataBindingDirective, typeof DragAndDropDirective, typeof DragClueTemplateDirective, typeof DropHintTemplateDirective, typeof DragAndDropEditingDirective, typeof LoadMoreDirective, typeof LoadMoreButtonTemplateDirective, typeof CustomMessagesComponent]>;
|
|
2120
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<TreeViewModule>;
|
|
2121
|
+
}
|
|
2122
|
+
|
|
2123
|
+
/**
|
|
2124
|
+
* @hidden
|
|
2125
|
+
*/
|
|
2126
|
+
declare class LocalizedMessagesDirective extends TreeViewMessages {
|
|
2127
|
+
protected service: LocalizationService;
|
|
2128
|
+
constructor(service: LocalizationService);
|
|
2129
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LocalizedMessagesDirective, never>;
|
|
2130
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<LocalizedMessagesDirective, "[kendoTreeViewLocalizedMessages]", never, {}, {}, never, never, true, never>;
|
|
2131
|
+
}
|
|
2132
|
+
|
|
2133
|
+
/**
|
|
2134
|
+
* Use the `KENDO_TREEVIEW` utility array to add all `@progress/kendo-angular-treeview`-related components and directives to a standalone Angular component.
|
|
2135
|
+
*
|
|
2136
|
+
* @example
|
|
2137
|
+
* ```typescript
|
|
2138
|
+
* import { Component } from '@angular/core';
|
|
2139
|
+
* import { KENDO_TREEVIEW } from '@progress/kendo-angular-treeview';
|
|
2140
|
+
*
|
|
2141
|
+
* @Component({
|
|
2142
|
+
* selector: 'my-app',
|
|
2143
|
+
* standalone: true,
|
|
2144
|
+
* imports: [KENDO_TREEVIEW],
|
|
2145
|
+
* template: `<kendo-treeview></kendo-treeview>`
|
|
2146
|
+
* })
|
|
2147
|
+
* export class AppComponent {}
|
|
2148
|
+
* ```
|
|
2149
|
+
*/
|
|
2150
|
+
declare const KENDO_TREEVIEW: readonly [typeof TreeViewComponent, typeof NodeTemplateDirective, typeof CheckDirective, typeof DisableDirective, typeof ExpandDirective, typeof SelectDirective, typeof HierarchyBindingDirective, typeof FlatDataBindingDirective, typeof DragAndDropDirective, typeof DragClueTemplateDirective, typeof DropHintTemplateDirective, typeof DragAndDropEditingDirective, typeof LoadMoreDirective, typeof LoadMoreButtonTemplateDirective, typeof CustomMessagesComponent];
|
|
2151
|
+
|
|
2152
|
+
export { CheckDirective, CustomMessagesComponent, DataBoundComponent, DisableDirective, DragAndDropDirective, DragAndDropEditingDirective, DragClueService, DragClueTemplateDirective, DropAction, DropHintService, DropHintTemplateDirective, DropPosition, ExpandDirective, ExpandableComponent, FlatDataBindingDirective, HierarchyBindingDirective, KENDO_TREEVIEW, LoadMoreButtonTemplateDirective, LoadMoreDirective, LocalizedMessagesDirective, NodeTemplateDirective, SelectDirective, TreeItemDragEvent, TreeItemDragStartEvent, TreeItemDropEvent, TreeViewComponent, TreeViewModule };
|
|
2153
|
+
export type { CheckMode, CheckableSettings, CheckedState, DragAndDropScrollSettings, EditService, FilterExpandSettings, FilterState, ItemLookup, LoadMoreRequestArgs, MatcherFunction, NodeClickEvent, SelectableSettings, SelectionMode, TreeItem, TreeItemAddRemoveArgs, TreeItemFilterState, TreeItemLookup, TreeViewFilterSettings, TreeViewSize };
|