ng-virtual-list
Version:
🚀 High-performance virtual scrolling for Angular apps. Render 100,000+ items in Angular without breaking a sweat. Smooth, customizable, and developer-friendly.
55 lines (54 loc) • 2.58 kB
TypeScript
import { TrackBox } from './utils/trackBox';
import { IRenderVirtualListItem } from './models';
import { IRenderVirtualListCollection } from './models/render-collection.model';
import { MethodsForSelectingTypes } from './enums/method-for-selecting-types';
import { FocusAlignment, Id } from './types';
import * as i0 from "@angular/core";
export declare class NgVirtualListService {
private _nextComponentId;
private _$itemClick;
$itemClick: import("rxjs").Observable<IRenderVirtualListItem<any> | undefined>;
private _$selectedIds;
$selectedIds: import("rxjs").Observable<Id | Id[] | undefined>;
private _$collapsedIds;
$collapsedIds: import("rxjs").Observable<Id[]>;
private _$methodOfSelecting;
$methodOfSelecting: import("rxjs").Observable<MethodsForSelectingTypes>;
set methodOfSelecting(v: MethodsForSelectingTypes);
private _trackBox;
private _$focusedId;
$focusedId: import("rxjs").Observable<Id | null>;
get focusedId(): Id | null;
selectByClick: boolean;
collapseByClick: boolean;
listElement: HTMLDivElement | null;
private _$displayItems;
readonly $displayItems: import("rxjs").Observable<IRenderVirtualListCollection>;
private _collection;
set collection(v: IRenderVirtualListCollection);
get collection(): IRenderVirtualListCollection;
constructor();
setSelectedIds(ids: Array<Id> | Id | undefined): void;
setCollapsedIds(ids: Array<Id>): void;
itemClick(data: IRenderVirtualListItem | undefined): void;
update(): void;
/**
* Selects a list item
* @param data
* @param selected - If the value is undefined, then the toggle method is executed, if false or true, then the selection/deselection is performed.
*/
select(data: IRenderVirtualListItem | undefined, selected?: boolean | undefined): void;
/**
* Collapse list items
* @param data
* @param collapsed - If the value is undefined, then the toggle method is executed, if false or true, then the collapse/expand is performed.
*/
collapse(data: IRenderVirtualListItem | undefined, collapsed?: boolean | undefined): void;
initialize(trackBox: TrackBox): void;
itemToFocus: ((element: HTMLElement, position: number, align: FocusAlignment) => void) | undefined;
focus(element: HTMLElement, align?: FocusAlignment): void;
areaFocus(id: Id | null): void;
generateComponentId(): number;
static ɵfac: i0.ɵɵFactoryDeclaration<NgVirtualListService, never>;
static ɵprov: i0.ɵɵInjectableDeclaration<NgVirtualListService>;
}