@progress/kendo-angular-listview
Version:
Kendo UI Angular listview component
56 lines (55 loc) • 2.42 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 { Subject } from 'rxjs';
import * as i0 from "@angular/core";
/**
* @hidden
*
* Provided per ListView instance. Keeps the availability, active index and focused state of the current ListView.
* Emits `changes` when any of the aforementioned states changes.
*/
export declare class NavigationService {
/**
* Emits every time a change in active index/focus/blur/navigation availability occurs.
*/
changes: Subject<any>;
/**
* Sets or gets if the navigation is enabled.
* When no activeIndex is present, the navigation is inferred as disabled.
* Toggling the service availability clears the current active index or activates the first one.
*/
get isEnabled(): boolean;
set isEnabled(enabled: boolean);
/**
* Specifies if a ListView item currently holds focus.
*/
isFocused: boolean;
/**
* Keeps track of the index of the items that should be the current focus target (tabindex="0").
* When set to `null`/`undefined`, the navigation is disabled and the items should not render a tabindex.
*/
activeIndex: number;
/**
* Shows if the checked index should be the current available focus target (tabindex="0").
*/
isActive(index: number): boolean;
handleKeyDown(event: KeyboardEvent, totalItemsCount: number): void;
handleFocusIn(event: FocusEvent): void;
handleFocusOut(event: FocusEvent): void;
/**
* Sets the `activeIndex` and triggers changes without focusing the corresponding ListView item.
*/
setActiveIndex(index: number): void;
/**
* Focuses item at the targeted index. If no index is passed, the current `activeIndex` is used.
* The passed target index is normalized to fit the min/max available indices bounds.
*/
focusIndex(index: any, totalItemsCount: number): void;
private navigateTo;
private navigateToPrevious;
private navigateToNext;
static ɵfac: i0.ɵɵFactoryDeclaration<NavigationService, never>;
static ɵprov: i0.ɵɵInjectableDeclaration<NavigationService>;
}