Skip to content

Latest commit

 

History

History
154 lines (137 loc) · 5.28 KB

File metadata and controls

154 lines (137 loc) · 5.28 KB

API Report File for "@angular/cdk_portal"

Do not edit this file. It is a report generated by API Extractor.

import { ApplicationRef } from '@angular/core';
import { Binding } from '@angular/core';
import { ComponentRef } from '@angular/core';
import { ElementRef } from '@angular/core';
import { EmbeddedViewRef } from '@angular/core';
import { EventEmitter } from '@angular/core';
import * as i0 from '@angular/core';
import { Injector } from '@angular/core';
import { OnDestroy } from '@angular/core';
import { OnInit } from '@angular/core';
import { TemplateRef } from '@angular/core';
import { ViewContainerRef } from '@angular/core';

// @public
export abstract class BasePortalOutlet implements PortalOutlet {
    // (undocumented)
    attach<T>(portal: ComponentPortal<T>): ComponentRef<T>;
    // (undocumented)
    attach<T>(portal: TemplatePortal<T>): EmbeddedViewRef<T>;
    // (undocumented)
    attach(portal: any): any;
    // (undocumented)
    abstract attachComponentPortal<T>(portal: ComponentPortal<T>): ComponentRef<T>;
    // (undocumented)
    readonly attachDomPortal: null | ((portal: DomPortal) => any);
    protected _attachedPortal: Portal<any> | null;
    // (undocumented)
    abstract attachTemplatePortal<C>(portal: TemplatePortal<C>): EmbeddedViewRef<C>;
    detach(): void;
    dispose(): void;
    hasAttached(): boolean;
    setDisposeFn(fn: () => void): void;
}

// @public
export class CdkPortal extends TemplatePortal {
    constructor(...args: unknown[]);
    // (undocumented)
    static ɵdir: i0.ɵɵDirectiveDeclaration<CdkPortal, "[cdkPortal]", ["cdkPortal"], {}, {}, never, never, true, never>;
    // (undocumented)
    static ɵfac: i0.ɵɵFactoryDeclaration<CdkPortal, never>;
}

// @public
export class CdkPortalOutlet extends BasePortalOutlet implements OnInit, OnDestroy {
    constructor(...args: unknown[]);
    attachComponentPortal<T>(portal: ComponentPortal<T>): ComponentRef<T>;
    // @deprecated
    attachDomPortal: (portal: DomPortal) => void;
    readonly attached: EventEmitter<CdkPortalOutletAttachedRef>;
    get attachedRef(): CdkPortalOutletAttachedRef;
    attachTemplatePortal<C>(portal: TemplatePortal<C>): EmbeddedViewRef<C>;
    // (undocumented)
    ngOnDestroy(): void;
    // (undocumented)
    ngOnInit(): void;
    get portal(): Portal<any> | null;
    set portal(portal: Portal<any> | null | undefined | '');
    // (undocumented)
    static ɵdir: i0.ɵɵDirectiveDeclaration<CdkPortalOutlet, "[cdkPortalOutlet]", ["cdkPortalOutlet"], { "portal": { "alias": "cdkPortalOutlet"; "required": false; }; }, { "attached": "attached"; }, never, never, true, never>;
    // (undocumented)
    static ɵfac: i0.ɵɵFactoryDeclaration<CdkPortalOutlet, never>;
}

// @public
export type CdkPortalOutletAttachedRef = ComponentRef<any> | EmbeddedViewRef<any> | null;

// @public
export class ComponentPortal<T> extends Portal<ComponentRef<T>> {
    constructor(component: ComponentType<T>, viewContainerRef?: ViewContainerRef | null, injector?: Injector | null, projectableNodes?: Node[][] | null, bindings?: Binding[]);
    readonly bindings: Binding[] | null;
    component: ComponentType<T>;
    injector?: Injector | null;
    projectableNodes?: Node[][] | null;
    viewContainerRef?: ViewContainerRef | null;
}

// @public @deprecated
export interface ComponentType<T> {
    // (undocumented)
    new (...args: any[]): T;
}

// @public
export class DomPortal<T = HTMLElement> extends Portal<T> {
    constructor(element: T | ElementRef<T>);
    readonly element: T;
}

// @public
export class DomPortalOutlet extends BasePortalOutlet {
    constructor(
    outletElement: Element, _appRef?: ApplicationRef | undefined, _defaultInjector?: Injector | undefined);
    attachComponentPortal<T>(portal: ComponentPortal<T>): ComponentRef<T>;
    // @deprecated
    attachDomPortal: (portal: DomPortal) => void;
    attachTemplatePortal<C>(portal: TemplatePortal<C>): EmbeddedViewRef<C>;
    dispose(): void;
    outletElement: Element;
}

// @public
export abstract class Portal<T> {
    attach(host: PortalOutlet): T;
    detach(): void;
    get isAttached(): boolean;
    setAttachedHost(host: PortalOutlet | null): void;
}

// @public (undocumented)
export class PortalModule {
    // (undocumented)
    static ɵfac: i0.ɵɵFactoryDeclaration<PortalModule, never>;
    // (undocumented)
    static ɵinj: i0.ɵɵInjectorDeclaration<PortalModule>;
    // (undocumented)
    static ɵmod: i0.ɵɵNgModuleDeclaration<PortalModule, never, [typeof CdkPortal, typeof CdkPortalOutlet], [typeof CdkPortal, typeof CdkPortalOutlet]>;
}

// @public
export interface PortalOutlet {
    attach(portal: Portal<any>): any;
    detach(): any;
    dispose(): void;
    hasAttached(): boolean;
}

// @public
export class TemplatePortal<C = any> extends Portal<EmbeddedViewRef<C>> {
    constructor(
    templateRef: TemplateRef<C>,
    viewContainerRef: ViewContainerRef,
    context?: C | undefined,
    injector?: Injector | undefined);
    attach(host: PortalOutlet, context?: C | undefined): EmbeddedViewRef<C>;
    context?: C | undefined;
    // (undocumented)
    detach(): void;
    injector?: Injector | undefined;
    // (undocumented)
    get origin(): ElementRef;
    templateRef: TemplateRef<C>;
    viewContainerRef: ViewContainerRef;
}

// (No @packageDocumentation comment for this package)