import { ListRange } from '@angular/cdk/collections'; import { CdkVirtualScrollViewport } from '@angular/cdk/scrolling'; import { EventEmitter, OnDestroy, OnInit } from '@angular/core'; import * as i0 from "@angular/core"; /** * Used for marking the loading state of items * within a lazily loaded collection * * @export */ export declare enum VirtualScrollItemStatus { /** * Initial status of an item within the collection, * a placeholder with no content */ initial = "initial", /** * Item marked as pending to be loaded, a request was sent out, * but still no content, item data was not yet received */ pending = "pending", /** * Item with content, data of item has been loaded */ loaded = "loaded" } /** * Item with loading state to be used * if lazily loading results to reduce events emitted * and intervals emitted within events on `rangeLoad` Output * * @export */ export interface VirtualScrollItem { loading?: VirtualScrollItemStatus; } /** * A directive that is designed to work alongside CdkVirtualScrollViewport * which can be used to lazy load in chunks depending on what is in view * * @export */ export declare class UiVirtualScrollRangeLoaderDirective implements OnInit, OnDestroy { private readonly _viewport; /** * Used to extend the ListRange interval emmited by rangeLoad Output * this will expand at both ends with the specified number, * taking into account the status of the loading items * available * */ buffer: number; /** * Flag used to indicate the direction of items * set to `false` if virtual scroll events indexes need to be reversed */ isDown: boolean; /** * Output of `ListRange` events based on renderedRangeStream from * CdkVirtualScrollViewport which takes into account * direction of list (`isDown`), `buffer` * and reduces interval to untouched indexes (items with `loading: "initial"`) * */ rangeLoad: EventEmitter; private readonly _cdkVirtualForOf; private readonly _destroyed$; /** * @ignore */ constructor(_viewport: CdkVirtualScrollViewport); /** * @ignore */ ngOnInit(): void; /** * @ignore */ ngOnDestroy(): void; private _filterTouchedRange; private _isValidRange; private _reverseIndex; private _adjustLoadingRange; private _addSafeBuffer; private _trimInterval; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; }