import { OnDestroy, OnInit, TemplateRef } from '@angular/core'; import { Observable, ReplaySubject, Subject } from 'rxjs'; import { RenderStrategies } from './types/render-strategies'; import { RenderContext } from './types/render-context'; import { ObserveDirectiveContext } from './types/observe-directive-context'; import * as i0 from "@angular/core"; export declare class RxObserveDirective implements OnInit, OnDestroy { private readonly config; private readonly templateRef; private readonly viewContainerRef; private source$$; private refreshEffect$$; private loadingTemplate$$; private renderCallback$$; private renderStrategy$$; private detach; /** * @description * The source of the values to be rendered. * @param source */ set rxObserve(source: Observable); /** * @description * A trigger to refresh the value stream. * @param refreshEffect */ set rxObserveRefreshSignal(refreshEffect: Subject); /** * @description * A template to be rendered while the stream is in a loading state. * @param tpl */ set rxObserveLoadingTemplate(tpl: TemplateRef>); /** * @description * A template to be rendered when the value source emits an error. */ rxObserveErrorTemplate: TemplateRef> | undefined; /** * @description * A template to be rendered when the value source completes. */ rxObserveCompleteTemplate: TemplateRef> | undefined; /** * @description * A trigger which emits every time the view is rendered/updated. * @param cb */ set rxObserveRenderCallback(cb: ReplaySubject>); /** * @description * A render strategy to optimize change detection. * * Default: {@link DefaultRenderStrategy} * @param strategy */ set rxObserveRenderStrategy(strategy: RenderStrategies | Observable); /** * @description * A flag to control whether the last value should still be displayed in the view when the value source * is in a loading state or not. * * Default: false */ rxObserveKeepValueOnLoading: boolean; /** * @description * A flag to control if the view should be created lazily or not. * Lazy does mean that no change detection will be triggered until the value source emits a value. * * Default: false */ rxObserveLazyViewCreation: boolean; private subscription; private embeddedView; private context; readonly renderStrategy$: Observable; readonly isViewPortStrategy$: Observable; readonly renderStrategyOperator$: Observable>; readonly source$: Observable>; /** * todo * when viewport strategy is used and before throttle or debounce was applied, they * are somehow combined. * * when switching to/from viewPort strategy emit a signal and end respective observables */ viewPortObserver$: Observable; visible$: Observable; readonly sourceWithOperator$: Observable; static ngTemplateGuard_rxObserve: 'binding'; static ngTemplateContextGuard(directive: RxObserveDirective, context: unknown): context is ObserveDirectiveContext; ngOnInit(): void; private createInjector; ngOnDestroy(): void; private createEmbeddedView; static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵdir: i0.ɵɵDirectiveDeclaration, "[rxObserve]", never, { "rxObserve": "rxObserve"; "rxObserveRefreshSignal": "rxObserveRefreshSignal"; "rxObserveLoadingTemplate": "rxObserveLoadingTemplate"; "rxObserveErrorTemplate": "rxObserveErrorTemplate"; "rxObserveCompleteTemplate": "rxObserveCompleteTemplate"; "rxObserveRenderCallback": "rxObserveRenderCallback"; "rxObserveRenderStrategy": "rxObserveRenderStrategy"; "rxObserveKeepValueOnLoading": "rxObserveKeepValueOnLoading"; "rxObserveLazyViewCreation": "rxObserveLazyViewCreation"; }, {}, never, never, true>; }