import { AfterViewInit, ChangeDetectorRef, ComponentRef, ElementRef, EventEmitter, Renderer2, TemplateRef, ViewContainerRef } from '@angular/core'; import { DynamicComponentService } from '../../ngui-utils/src/dynamic-component.service'; import { NguiInviewPageComponent } from './ngui-inview-page.component'; import * as i0 from "@angular/core"; /** * Virtual List * * The `` inserts into * `
` when it is in viewport * When it's inserted, it will be pushed down, which makes it out of viewport. * User scrolls down to see the bottom of the list, * then it will insert another `` again. * * listens to (nguiInview) and (nguiOutview) events, * when is out of view port, it empties out the contents. * and it restores back the contents when it is in viewport again. ### Example ```html
Loading
  • row number: {{ num }}
  • ``` */ export declare class NguiVirtualListComponent implements AfterViewInit { renderer: Renderer2; element: ElementRef; dynamicComponentService: DynamicComponentService; cdr: ChangeDetectorRef; /** the container NguiInviewPage will be inserted */ pagesRef: ViewContainerRef; /** Template of NguiInviewPage. Allow users to define their own template */ template: TemplateRef; /** Fired when child `` is selected */ selected: EventEmitter; /** Fired when `ESC` key is pressed from `` */ escaped: EventEmitter; /** * Event fired when bottom of the virtual list is in view * The handler of this event must call `$event.addItems(items: Array)` to fill contents * If not, only the first page is loaded, and rest of the pages won't be loaded; ### Example ```html
  • row number: {{ num }}
  • Loading
    ``` */ bottomInview: EventEmitter; /** The last NguiInviewPageComponent being inserted */ inviewPage: ComponentRef; _focused: boolean; /** Indicates if a page is still loading */ isListLoading: boolean; inviewPages: Array>; constructor(renderer: Renderer2, element: ElementRef, dynamicComponentService: DynamicComponentService, cdr: ChangeDetectorRef); /** Check if necessary input and output is provided */ ngAfterViewInit(): void; /** * When the bottom is inview port, this function is called * It will insert a dynamicall created NguiInviewPageComponent with the given template. * It will also fires (bottomInview) event, so that user can fill up items for the page. */ addAnInviewPageToPages(): void; addList(items: Array): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; }