UNPKG

@progress/kendo-angular-treeview

Version:
78 lines (77 loc) 3.09 kB
/**----------------------------------------------------------------------------------------- * Copyright © 2025 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the project root for more information *-------------------------------------------------------------------------------------------*/ import { EventEmitter, OnDestroy, OnChanges, SimpleChanges } from '@angular/core'; import { TreeViewComponent } from '../treeview.component'; import { SelectableSettings } from './selectable-settings'; import { Subscription } from 'rxjs'; import { TreeItem } from '../treeitem.interface'; import { NavigationService } from '../navigation/navigation.service'; import * as i0 from "@angular/core"; /** * Manages the in-memory selection state of TreeView nodes * ([see example](slug:selection_treeview)). * * @example * ```html * <kendo-treeview * ... * kendoTreeViewSelectable * selectBy="id" * [(selectedKeys)]="selectedKeys" * > * </kendo-treeview> * ``` * * @remarks * Applied to: {@link TreeViewComponent} */ export declare class SelectDirective implements OnDestroy, OnChanges { protected treeView: TreeViewComponent; private navigationService; /** * @hidden */ set isSelected(value: (item: object, index: string) => boolean); /** * Sets the item key stored in the `selectedKeys` collection. */ selectKey: string | ((context: TreeItem) => any); /** * Sets the current selection mode * ([see example](slug:selection_treeview#modes)). */ selection: boolean | SelectableSettings | string; /** * Defines the collection that stores the selected keys * ([see example](slug:selection_treeview#toc-modes)). */ selectedKeys: any[]; /** * Emits when the `selectedKeys` collection updates. */ selectedKeysChange: EventEmitter<any[]>; get getAriaMultiselectable(): boolean; protected subscriptions: Subscription; private get options(); private selectActions; /** * Reflects the internal `selectedKeys` state. */ private state; /** * Holds the last emitted `selectedKeys` collection. */ private lastChange; constructor(treeView: TreeViewComponent, navigationService: NavigationService); ngOnChanges(changes: SimpleChanges): void; ngOnDestroy(): void; protected itemKey(e: any): any; protected select(e: any): void; protected selectSingle(node: any): void; protected selectMultiple(node: any): void; private notify; static ɵfac: i0.ɵɵFactoryDeclaration<SelectDirective, never>; 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>; }