@progress/kendo-angular-treeview
Version:
Kendo UI TreeView for Angular
66 lines (65 loc) • 2.93 kB
TypeScript
/**-----------------------------------------------------------------------------------------
* Copyright © 2025 Progress Software Corporation. All rights reserved.
* Licensed under commercial license. See LICENSE.md in the project root for more information
*-------------------------------------------------------------------------------------------*/
import { EventEmitter } from '@angular/core';
import { Observable } from 'rxjs';
import { EditService } from './drag-and-drop/models';
import { FilterState } from './filter-state.interface';
import * as i0 from "@angular/core";
/**
* @hidden
*
* An injection token used by the data binding directives to interface with
* the TreeView or the DropDownTree components.
*/
export declare abstract class DataBoundComponent {
/**
* The nodes which will be displayed by the TreeView.
*/
abstract nodes: any[];
/**
* A function which determines if a specific node has child nodes.
*/
abstract hasChildren: (item: object) => boolean;
/**
* A function which provides the child nodes for a given parent node.
*/
abstract children: (item: object) => Observable<object[]>;
/**
* Specifies the handlers called on TreeView drag-and-drop `addItem` and `removeItem` events.
*/
abstract editService?: EditService;
/**
* A callback function which accepts the data object for a TreeView node and returns a boolean.
* If it returns `false`, the node will not be displayed. Used for the component's built-in or custom filtering implementation.
*/
abstract isVisible: (item: object, index: string) => boolean;
/**
* Sets an initial value of the built-in input element used for filtering.
*/
abstract filter: string;
/**
* Fires when the value of the built-in filter input element changes.
*/
abstract filterChange: EventEmitter<string>;
/**
* The fields of the data item that provide the text content of the nodes
* ([see example]({% slug databinding_treeview %})). If the `textField` input is set
* to an array, each hierarchical level uses the field that corresponds to the same
* index in the array, or the last item in the array.
*/
abstract textField: string | string[];
/**
* Triggers the TreeView nodes preloading mechanism.
* Should be triggered after the `nodes`, `children` and `hasChildren` props are set.
*/
abstract preloadChildNodes?: () => void;
/**
* Emits when the built-in filtering mechanism in the data-binding directives updates the filtered state.
* Used for the built-in auto-expand functionalities of the component and available for custom implementations.
*/
abstract filterStateChange?: EventEmitter<FilterState>;
static ɵfac: i0.ɵɵFactoryDeclaration<DataBoundComponent, never>;
static ɵprov: i0.ɵɵInjectableDeclaration<DataBoundComponent>;
}