import { ElementRef, EmbeddedViewRef, TrackByFunction, ViewContainerRef } from '@angular/core'; import { Observable } from 'rxjs'; import { RxVirtualForViewContext } from './list-view-context'; import * as i0 from "@angular/core"; export interface ListRange { start: number; end: number; } /** * @Directive RxVirtualScrollStrategy * * @description * Abstract implementation for the actual implementations of the ScrollStrategies * being consumed by `*rxVirtualFor` and `rx-virtual-scroll-viewport`. * * This is one of the core parts for the virtual scrolling implementation. It has * to determine the `ListRange` being rendered to the DOM as well as managing * the layouting task for the `*rxVirtualFor` directive. * * @docsCategory RxVirtualFor * @docsPage RxVirtualFor * @publicApi */ export declare abstract class RxVirtualScrollStrategy { /** Emits when the index of the first element visible in the viewport changes. */ /** @internal */ abstract scrolledIndex$: Observable; /** @internal */ abstract renderedRange$: Observable; /** @internal */ abstract contentSize$: Observable; /** @internal */ private nodeIndex?; /** @internal */ protected getElement(view: EmbeddedViewRef>): HTMLElement; /** * Attaches this scroll strategy to a viewport. * @param viewport The viewport to attach this strategy to. * @param viewRepeater The viewRepeater attached to the viewport. */ abstract attach(viewport: RxVirtualScrollViewport, viewRepeater: RxVirtualViewRepeater): void; /** Detaches this scroll strategy from the currently attached viewport. */ abstract detach(): void; /** * Scroll to the offset for the given index. * @param index The index of the element to scroll to. * @param behavior The ScrollBehavior to use when scrolling. */ abstract scrollToIndex(index: number, behavior?: ScrollBehavior): void; static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵdir: i0.ɵɵDirectiveDeclaration, never, never, {}, {}, never>; } /** @internal */ export declare abstract class RxVirtualScrollViewport { abstract elementScrolled$: Observable; abstract containerRect$: Observable<{ height: number; width: number; }>; abstract getScrollTop(): number; abstract scrollToIndex(index: number, behavior?: ScrollBehavior): void; abstract scrollTo(scrollTo: number, behavior?: ScrollBehavior): void; abstract getScrollElement(): HTMLElement; abstract measureOffset(): number; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } /** @internal */ export declare abstract class RxVirtualViewRepeater { abstract values$: Observable | null | undefined>; abstract viewsRendered$: Observable>[]>; abstract viewContainer: ViewContainerRef; abstract renderingStart$: Observable>; abstract setScrollStrategy(scrollStrategy: RxVirtualScrollStrategy): any; _trackBy: TrackByFunction | null; static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵdir: i0.ɵɵDirectiveDeclaration, never, never, {}, {}, never>; } export declare abstract class RxVirtualScrollElement { abstract elementScrolled$: Observable; abstract getElementRef(): ElementRef; abstract measureOffset(): number; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; }