/** * @license * Copyright UIUX Engineering Corporation All Rights Reserved. */ import { ElementRef, ComponentRef, EmbeddedViewRef, ChangeDetectorRef } from '@angular/core'; import { AnimationEvent } from '@angular/animations'; import { BasePortalOutlet, PortalHostDirective, ComponentPortal, TemplatePortal } from '@angular/cdk/portal'; import { FocusTrapFactory } from '@angular/cdk/a11y'; import { DialogConfig } from './dialog-config'; import { Subject } from 'rxjs/Subject'; export declare function throwDialogContentAlreadyAttachedError(): void; /** * Internal component that wraps user-provided dialog content. * @docs-private */ export declare class CdkDialogContainer extends BasePortalOutlet { private _elementRef; private _focusTrapFactory; private _changeDetectorRef; private _document; /** State of the dialog animation. */ _state: 'void' | 'enter' | 'exit'; /** Element that was focused before the dialog was opened. Save this to restore upon close. */ private _elementFocusedBeforeDialogWasOpened; /** The class that traps and manages focus within the dialog. */ private _focusTrap; readonly _ariaLabel: string | null; readonly _ariaDescribedBy: string | null | undefined; readonly _role: "dialog" | "alertdialog" | null | undefined; readonly _tabindex: number; /** The portal host inside of this container into which the dialog content will be loaded. */ _portalHost: PortalHostDirective; /** A subject emitting before the dialog enters the view. */ _beforeEnter: Subject; /** A subject emitting after the dialog enters the view. */ _afterEnter: Subject; /** A subject emitting before the dialog exits the view. */ _beforeExit: Subject; /** A subject emitting after the dialog exits the view. */ _afterExit: Subject; /** The dialog configuration. */ _config: DialogConfig; constructor(_elementRef: ElementRef, _focusTrapFactory: FocusTrapFactory, _changeDetectorRef: ChangeDetectorRef, _document: any); /** Destroy focus trap to place focus back to the element focused before the dialog opened. */ ngOnDestroy(): void; /** * Attach a ComponentPortal as content to this dialog container. * @param portal Portal to be attached as the dialog content. */ attachComponentPortal(portal: ComponentPortal): ComponentRef; /** * Attach a TemplatePortal as content to this dialog container. * @param portal Portal to be attached as the dialog content. */ attachTemplatePortal(portal: TemplatePortal): EmbeddedViewRef; /** Emit lifecycle events based on animation `start` callback. */ _onAnimationStart(event: AnimationEvent): void; /** Emit lifecycle events based on animation `done` callback. */ _onAnimationDone(event: AnimationEvent): void; /** Starts the dialog exit animation. */ _startExiting(): void; /** Saves a reference to the element that was focused before the dialog was opened. */ private _savePreviouslyFocusedElement(); /** * Autofocus the first tabbable element inside of the dialog, if there is not a tabbable element, * focus the dialog instead. */ private _autoFocusFirstTabbableElement(); /** Returns the focus to the element focused before the dialog was open. */ private _returnFocusAfterDialog(); }