import { ComponentFactoryResolver, Type, OnInit, OnDestroy, ComponentRef } from '@angular/core'; import { ViewContainerRef } from '@angular/core'; import { ElementRef, ChangeDetectorRef, Injector } from '@angular/core'; import { OverlayService } from '../../../services/overlay.service'; import { BaseWidgetComponent } from '../../../shared/base.component'; export declare class OverlayContainerComponent extends BaseWidgetComponent implements OnInit, OnDestroy { protected _cfr: ComponentFactoryResolver; protected _cdr: ChangeDetectorRef; protected injector: Injector; ng: ComponentRef; service: OverlayService; event: any; idChange: any; protected cmp_refs: { [name: string]: any; }; protected content: ViewContainerRef; root: ElementRef; constructor(_cfr: ComponentFactoryResolver, _cdr: ChangeDetectorRef, injector: Injector); ngOnInit(): void; ngOnDestroy(): void; /** * Add a component to be rendered to the on the overlay container * @param id ID of the added component * @param cmp Component Class to be rendered on the overlay container * @returns Promise of component instance */ add(id: string, cmp: Type): Promise<{}>; /** * Checks if the component with the given ID exists on the overlay container * @param id ID of the component to check the existance of * @returns Whether the component exists or not */ exists(id: string): boolean; /** * Get the component instance with the given ID * @param cmp_id ID of the component */ get(cmp_id: string): any; /** * Removes the component with the given ID from the container * @param id ID of the component to remove */ remove(id: string): void; /** * Sets the ID of the overlay container * @param id ID to set on the overlay container */ setID(id: string): void; /** * Removes all the components rendered on the overlay container */ clear(): void; /** * Gets the service set for the overlay container * @returns Service or empty object */ protected getService(): any; /** * Renders the specified component on the overlay container * @param id ID of the component to render * @param type Component Class to render * @returns Promise which resolves with the component instance of rejects with the reason of the failure */ protected render(id: string, type: Type, tries?: number): Promise<{}>; }