UNPKG

@rx-angular/cdk

Version:

@rx-angular/cdk is a Component Development Kit for ergonomic and highly performant angular applications. It helps to to build Large scale applications, UI libs, state management, rendering systems and much more. Furthermore the unique way of mixing reacti

47 lines (46 loc) 2.05 kB
import { EmbeddedViewRef, NgZone, TemplateRef, ViewContainerRef } from '@angular/core'; import { RxStrategyNames, RxStrategyProvider } from '@rx-angular/cdk/render-strategies'; import { LiveCollection } from './list-reconciliation'; import { RxDefaultListViewContext, RxListViewComputedContext } from './list-view-context'; type View<T = unknown> = EmbeddedViewRef<RxDefaultListViewContext<T>> & { _tempView?: boolean; }; export declare class RxLiveCollection<T> extends LiveCollection<View<T>, T> { private viewContainer; private templateRef; private strategyProvider; private createViewContext; private updateViewContext; /** Property indicating if indexes in the repeater context need to be updated following the live collection changes. Index updates are necessary if and only if views are inserted / removed in the middle of LContainer. Adds and removals at the end don't require index updates. */ private needsIndexUpdate; private _needHostUpdate; private set needHostUpdate(value); get needHostUpdate(): boolean; private lastCount; private workQueue; private _virtualViews; constructor(viewContainer: ViewContainerRef, templateRef: TemplateRef<{ $implicit: unknown; index: number; }>, strategyProvider: RxStrategyProvider, createViewContext: (item: T, context: RxListViewComputedContext) => RxDefaultListViewContext<T>, updateViewContext: (item: T, view: View<T>, context: RxListViewComputedContext) => void); flushQueue(strategy: RxStrategyNames, ngZone?: NgZone): import("rxjs").Observable<any[]>; get length(): number; at(index: number): T; attach(index: number, view: View<T>): void; private attachView; detach(index: number): View<T>; private detachView; create(index: number, value: T): View<T>; destroy(view: View<T>): void; private destroyView; updateValue(index: number, value: T): void; private updateView; reset(): void; updateIndexes(): void; private getView; } export {};