import { PblDataSourceTriggerChangedEvent } from '@pebula/ngrid'; import { CacheBlock } from './caching'; import { PblInfiniteScrollDSContext } from './infinite-scroll-datasource.context'; import { PblInfiniteScrollDsOptions, PblInfiniteScrollTriggerChangedEvent } from './infinite-scroll-datasource.types'; export declare function normalizeOptions(rawOptions: PblInfiniteScrollDsOptions): PblInfiniteScrollDsOptions; export declare function shouldTriggerInvisibleScroll(context: PblInfiniteScrollDSContext): boolean; export declare function tryAddVirtualRowsBlock(source: T[], event: PblInfiniteScrollTriggerChangedEvent, blockSize: number): boolean; export declare function upgradeChangeEventToInfinite(totalLength: number, event: PblDataSourceTriggerChangedEvent, blockMatch: CacheBlock): PblInfiniteScrollTriggerChangedEvent; /** * Update the cache with new block information to reflect the last triggered event and * also update the datasource with the new values, removing values that are purged due to cache logic. * Returns the new datasource, or the original datasource editing in-place. * * For example, if the cache was empty the values provided are returned * Otherwise, the original datasource is edited and returned. */ export declare function updateCacheAndDataSource(context: PblInfiniteScrollDSContext, event: PblInfiniteScrollTriggerChangedEvent, values: T[]): T[];