UNPKG

igniteui-webcomponents

Version:

Ignite UI for Web Components is a complete library of UI components, giving you the ability to build modern web applications using encapsulation and the concept of reusable components in a dependency-free approach.

42 lines (41 loc) 1.84 kB
import type IgcTreeItemComponent from './tree-item.js'; import type IgcTreeComponent from './tree.js'; import type { IgcTreeSelectionService } from './tree.selection.js'; export declare const NAVIGATION_KEYS: Set<string>; export declare class IgcTreeNavigationService { private tree; private selectionService; private _focusedItem; private _lastFocusedItem; private _activeItem; private _visibleChildren; private _invisibleChildren; private _disabledChildren; constructor(tree: IgcTreeComponent, selectionService: IgcTreeSelectionService); updateVisChild(): void; get focusedItem(): IgcTreeItemComponent | null; focusItem(value: IgcTreeItemComponent | null, shouldFocus?: boolean): void; get activeItem(): IgcTreeItemComponent | null; setActiveItem(value: IgcTreeItemComponent | null, shouldEmit?: boolean): void; get visibleChildren(): IgcTreeItemComponent[]; update_disabled_cache(item: IgcTreeItemComponent): void; delete_item(item: IgcTreeItemComponent): void; update_visible_cache(item: IgcTreeItemComponent, expanded: boolean, shouldUpdateNestedChildren?: boolean, shouldUpdate?: boolean): void; /** * Sets the item as focused (and active) * * @param item target item * @param isActive if true, sets the item as active */ setFocusedAndActiveItem(item: IgcTreeItemComponent, isActive?: boolean, shouldFocus?: boolean): void; /** Handler for keydown events. Used in tree.component.ts */ handleKeydown(event: KeyboardEvent): void; private handleNavigation; private handleArrowLeft; private handleArrowRight; private handleUpDownArrow; private handleAsterisk; private handleSpace; /** Gets the next visible item in the given direction - 1 -> next, -1 -> previous */ private getVisibleItem; }