index.d.ts 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524
  1. import { AnimationTriggerMetadata } from '@angular/animations';
  2. import { CdkDialogContainer } from '@angular/cdk/dialog';
  3. import { ComponentFactoryResolver } from '@angular/core';
  4. import { ComponentType } from '@angular/cdk/overlay';
  5. import { DialogRef } from '@angular/cdk/dialog';
  6. import { Direction } from '@angular/cdk/bidi';
  7. import { ElementRef } from '@angular/core';
  8. import { EventEmitter } from '@angular/core';
  9. import { FocusMonitor } from '@angular/cdk/a11y';
  10. import { FocusOrigin } from '@angular/cdk/a11y';
  11. import { FocusTrapFactory } from '@angular/cdk/a11y';
  12. import * as i0 from '@angular/core';
  13. import * as i3 from '@angular/cdk/dialog';
  14. import * as i4 from '@angular/cdk/overlay';
  15. import * as i5 from '@angular/cdk/portal';
  16. import * as i6 from '@angular/material/core';
  17. import { InjectionToken } from '@angular/core';
  18. import { Injector } from '@angular/core';
  19. import { InteractivityChecker } from '@angular/cdk/a11y';
  20. import { Location as Location_2 } from '@angular/common';
  21. import { NgZone } from '@angular/core';
  22. import { Observable } from 'rxjs';
  23. import { OnChanges } from '@angular/core';
  24. import { OnDestroy } from '@angular/core';
  25. import { OnInit } from '@angular/core';
  26. import { Overlay } from '@angular/cdk/overlay';
  27. import { OverlayContainer } from '@angular/cdk/overlay';
  28. import { OverlayRef } from '@angular/cdk/overlay';
  29. import { ScrollStrategy } from '@angular/cdk/overlay';
  30. import { SimpleChanges } from '@angular/core';
  31. import { Subject } from 'rxjs';
  32. import { TemplateRef } from '@angular/core';
  33. import { Type } from '@angular/core';
  34. import { ViewContainerRef } from '@angular/core';
  35. /** Options for where to set focus to automatically on dialog open */
  36. export declare type AutoFocusTarget = 'dialog' | 'first-tabbable' | 'first-heading';
  37. /** Duration of the closing animation in milliseconds. */
  38. declare const CLOSE_ANIMATION_DURATION = 75;
  39. /**
  40. * Closes the dialog with the specified interaction type. This is currently not part of
  41. * `MatDialogRef` as that would conflict with custom dialog ref mocks provided in tests.
  42. * More details. See: https://github.com/angular/components/pull/9257#issuecomment-651342226.
  43. */
  44. export declare function _closeDialogVia<R>(ref: MatDialogRef<R>, interactionType: FocusOrigin, result?: R): void;
  45. /**
  46. * Default parameters for the animation for backwards compatibility.
  47. * @docs-private
  48. */
  49. export declare const _defaultParams: {
  50. params: {
  51. enterAnimationDuration: string;
  52. exitAnimationDuration: string;
  53. };
  54. };
  55. /** Possible overrides for a dialog's position. */
  56. export declare interface DialogPosition {
  57. /** Override for the dialog's top position. */
  58. top?: string;
  59. /** Override for the dialog's bottom position. */
  60. bottom?: string;
  61. /** Override for the dialog's left position. */
  62. left?: string;
  63. /** Override for the dialog's right position. */
  64. right?: string;
  65. }
  66. /** Valid ARIA roles for a dialog element. */
  67. export declare type DialogRole = 'dialog' | 'alertdialog';
  68. declare namespace i1 {
  69. export {
  70. OPEN_ANIMATION_DURATION,
  71. CLOSE_ANIMATION_DURATION,
  72. _MatDialogContainerBase,
  73. MatDialogContainer
  74. }
  75. }
  76. declare namespace i2 {
  77. export {
  78. MatDialogClose,
  79. MatDialogTitle,
  80. MatDialogContent,
  81. MatDialogActions
  82. }
  83. }
  84. /** Event that captures the state of dialog container animations. */
  85. declare interface LegacyDialogAnimationEvent {
  86. state: 'opened' | 'opening' | 'closing' | 'closed';
  87. totalTime: number;
  88. }
  89. /** Injection token that can be used to access the data that was passed in to a dialog. */
  90. export declare const MAT_DIALOG_DATA: InjectionToken<any>;
  91. /** Injection token that can be used to specify default dialog options. */
  92. export declare const MAT_DIALOG_DEFAULT_OPTIONS: InjectionToken<MatDialogConfig<any>>;
  93. /** Injection token that determines the scroll handling while the dialog is open. */
  94. export declare const MAT_DIALOG_SCROLL_STRATEGY: InjectionToken<() => ScrollStrategy>;
  95. /** @docs-private */
  96. export declare function MAT_DIALOG_SCROLL_STRATEGY_FACTORY(overlay: Overlay): () => ScrollStrategy;
  97. /** @docs-private */
  98. export declare const MAT_DIALOG_SCROLL_STRATEGY_PROVIDER: {
  99. provide: InjectionToken<() => ScrollStrategy>;
  100. deps: (typeof Overlay)[];
  101. useFactory: typeof MAT_DIALOG_SCROLL_STRATEGY_PROVIDER_FACTORY;
  102. };
  103. /** @docs-private */
  104. export declare function MAT_DIALOG_SCROLL_STRATEGY_PROVIDER_FACTORY(overlay: Overlay): () => ScrollStrategy;
  105. /**
  106. * Service to open Material Design modal dialogs.
  107. */
  108. export declare class MatDialog extends _MatDialogBase<MatDialogContainer> {
  109. constructor(overlay: Overlay, injector: Injector,
  110. /**
  111. * @deprecated `_location` parameter to be removed.
  112. * @breaking-change 10.0.0
  113. */
  114. location: Location_2, defaultOptions: MatDialogConfig, scrollStrategy: any, parentDialog: MatDialog,
  115. /**
  116. * @deprecated No longer used. To be removed.
  117. * @breaking-change 15.0.0
  118. */
  119. overlayContainer: OverlayContainer,
  120. /**
  121. * @deprecated No longer used. To be removed.
  122. * @breaking-change 14.0.0
  123. */
  124. animationMode?: 'NoopAnimations' | 'BrowserAnimations');
  125. static ɵfac: i0.ɵɵFactoryDeclaration<MatDialog, [null, null, { optional: true; }, { optional: true; }, null, { optional: true; skipSelf: true; }, null, { optional: true; }]>;
  126. static ɵprov: i0.ɵɵInjectableDeclaration<MatDialog>;
  127. }
  128. /**
  129. * Container for the bottom action buttons in a dialog.
  130. * Stays fixed to the bottom when scrolling.
  131. */
  132. export declare class MatDialogActions {
  133. /**
  134. * Horizontal alignment of action buttons.
  135. */
  136. align?: 'start' | 'center' | 'end';
  137. static ɵfac: i0.ɵɵFactoryDeclaration<MatDialogActions, never>;
  138. static ɵdir: i0.ɵɵDirectiveDeclaration<MatDialogActions, "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", never, { "align": { "alias": "align"; "required": false; }; }, {}, never, never, false, never>;
  139. }
  140. /**
  141. * Animations used by MatDialog.
  142. * @docs-private
  143. */
  144. export declare const matDialogAnimations: {
  145. readonly dialogContainer: AnimationTriggerMetadata;
  146. };
  147. /**
  148. * Base class for dialog services. The base dialog service allows
  149. * for arbitrary dialog refs and dialog container components.
  150. */
  151. export declare abstract class _MatDialogBase<C extends _MatDialogContainerBase> implements OnDestroy {
  152. private _overlay;
  153. private _defaultOptions;
  154. private _parentDialog;
  155. private _dialogRefConstructor;
  156. private _dialogContainerType;
  157. private _dialogDataToken;
  158. private readonly _openDialogsAtThisLevel;
  159. private readonly _afterAllClosedAtThisLevel;
  160. private readonly _afterOpenedAtThisLevel;
  161. private _scrollStrategy;
  162. protected _idPrefix: string;
  163. private _dialog;
  164. protected dialogConfigClass: typeof MatDialogConfig;
  165. /** Keeps track of the currently-open dialogs. */
  166. get openDialogs(): MatDialogRef<any>[];
  167. /** Stream that emits when a dialog has been opened. */
  168. get afterOpened(): Subject<MatDialogRef<any>>;
  169. private _getAfterAllClosed;
  170. /**
  171. * Stream that emits when all open dialog have finished closing.
  172. * Will emit on subscribe if there are no open dialogs to begin with.
  173. */
  174. readonly afterAllClosed: Observable<void>;
  175. constructor(_overlay: Overlay, injector: Injector, _defaultOptions: MatDialogConfig | undefined, _parentDialog: _MatDialogBase<C> | undefined,
  176. /**
  177. * @deprecated No longer used. To be removed.
  178. * @breaking-change 15.0.0
  179. */
  180. _overlayContainer: OverlayContainer, scrollStrategy: any, _dialogRefConstructor: Type<MatDialogRef<any>>, _dialogContainerType: Type<C>, _dialogDataToken: InjectionToken<any>,
  181. /**
  182. * @deprecated No longer used. To be removed.
  183. * @breaking-change 14.0.0
  184. */
  185. _animationMode?: 'NoopAnimations' | 'BrowserAnimations');
  186. /**
  187. * Opens a modal dialog containing the given component.
  188. * @param component Type of the component to load into the dialog.
  189. * @param config Extra configuration options.
  190. * @returns Reference to the newly-opened dialog.
  191. */
  192. open<T, D = any, R = any>(component: ComponentType<T>, config?: MatDialogConfig<D>): MatDialogRef<T, R>;
  193. /**
  194. * Opens a modal dialog containing the given template.
  195. * @param template TemplateRef to instantiate as the dialog content.
  196. * @param config Extra configuration options.
  197. * @returns Reference to the newly-opened dialog.
  198. */
  199. open<T, D = any, R = any>(template: TemplateRef<T>, config?: MatDialogConfig<D>): MatDialogRef<T, R>;
  200. open<T, D = any, R = any>(template: ComponentType<T> | TemplateRef<T>, config?: MatDialogConfig<D>): MatDialogRef<T, R>;
  201. /**
  202. * Closes all of the currently-open dialogs.
  203. */
  204. closeAll(): void;
  205. /**
  206. * Finds an open dialog by its id.
  207. * @param id ID to use when looking up the dialog.
  208. */
  209. getDialogById(id: string): MatDialogRef<any> | undefined;
  210. ngOnDestroy(): void;
  211. private _closeDialogs;
  212. static ɵfac: i0.ɵɵFactoryDeclaration<_MatDialogBase<any>, never>;
  213. static ɵprov: i0.ɵɵInjectableDeclaration<_MatDialogBase<any>>;
  214. }
  215. /**
  216. * Button that will close the current dialog.
  217. */
  218. export declare class MatDialogClose implements OnInit, OnChanges {
  219. dialogRef: MatDialogRef<any>;
  220. private _elementRef;
  221. private _dialog;
  222. /** Screen-reader label for the button. */
  223. ariaLabel: string;
  224. /** Default to "button" to prevents accidental form submits. */
  225. type: 'submit' | 'button' | 'reset';
  226. /** Dialog close input. */
  227. dialogResult: any;
  228. _matDialogClose: any;
  229. constructor(dialogRef: MatDialogRef<any>, _elementRef: ElementRef<HTMLElement>, _dialog: MatDialog);
  230. ngOnInit(): void;
  231. ngOnChanges(changes: SimpleChanges): void;
  232. _onButtonClick(event: MouseEvent): void;
  233. static ɵfac: i0.ɵɵFactoryDeclaration<MatDialogClose, [{ optional: true; }, null, null]>;
  234. static ɵdir: i0.ɵɵDirectiveDeclaration<MatDialogClose, "[mat-dialog-close], [matDialogClose]", ["matDialogClose"], { "ariaLabel": { "alias": "aria-label"; "required": false; }; "type": { "alias": "type"; "required": false; }; "dialogResult": { "alias": "mat-dialog-close"; "required": false; }; "_matDialogClose": { "alias": "matDialogClose"; "required": false; }; }, {}, never, never, false, never>;
  235. }
  236. /**
  237. * Configuration for opening a modal dialog with the MatDialog service.
  238. */
  239. export declare class MatDialogConfig<D = any> {
  240. /**
  241. * Where the attached component should live in Angular's *logical* component tree.
  242. * This affects what is available for injection and the change detection order for the
  243. * component instantiated inside of the dialog. This does not affect where the dialog
  244. * content will be rendered.
  245. */
  246. viewContainerRef?: ViewContainerRef;
  247. /**
  248. * Injector used for the instantiation of the component to be attached. If provided,
  249. * takes precedence over the injector indirectly provided by `ViewContainerRef`.
  250. */
  251. injector?: Injector;
  252. /** ID for the dialog. If omitted, a unique one will be generated. */
  253. id?: string;
  254. /** The ARIA role of the dialog element. */
  255. role?: DialogRole;
  256. /** Custom class for the overlay pane. */
  257. panelClass?: string | string[];
  258. /** Whether the dialog has a backdrop. */
  259. hasBackdrop?: boolean;
  260. /** Custom class for the backdrop. */
  261. backdropClass?: string | string[];
  262. /** Whether the user can use escape or clicking on the backdrop to close the modal. */
  263. disableClose?: boolean;
  264. /** Width of the dialog. */
  265. width?: string;
  266. /** Height of the dialog. */
  267. height?: string;
  268. /** Min-width of the dialog. If a number is provided, assumes pixel units. */
  269. minWidth?: number | string;
  270. /** Min-height of the dialog. If a number is provided, assumes pixel units. */
  271. minHeight?: number | string;
  272. /** Max-width of the dialog. If a number is provided, assumes pixel units. Defaults to 80vw. */
  273. maxWidth?: number | string;
  274. /** Max-height of the dialog. If a number is provided, assumes pixel units. */
  275. maxHeight?: number | string;
  276. /** Position overrides. */
  277. position?: DialogPosition;
  278. /** Data being injected into the child component. */
  279. data?: D | null;
  280. /** Layout direction for the dialog's content. */
  281. direction?: Direction;
  282. /** ID of the element that describes the dialog. */
  283. ariaDescribedBy?: string | null;
  284. /** ID of the element that labels the dialog. */
  285. ariaLabelledBy?: string | null;
  286. /** Aria label to assign to the dialog element. */
  287. ariaLabel?: string | null;
  288. /** Whether this is a modal dialog. Used to set the `aria-modal` attribute. */
  289. ariaModal?: boolean;
  290. /**
  291. * Where the dialog should focus on open.
  292. * @breaking-change 14.0.0 Remove boolean option from autoFocus. Use string or
  293. * AutoFocusTarget instead.
  294. */
  295. autoFocus?: AutoFocusTarget | string | boolean;
  296. /**
  297. * Whether the dialog should restore focus to the
  298. * previously-focused element, after it's closed.
  299. */
  300. restoreFocus?: boolean;
  301. /** Whether to wait for the opening animation to finish before trapping focus. */
  302. delayFocusTrap?: boolean;
  303. /** Scroll strategy to be used for the dialog. */
  304. scrollStrategy?: ScrollStrategy;
  305. /**
  306. * Whether the dialog should close when the user goes backwards/forwards in history.
  307. * Note that this usually doesn't include clicking on links (unless the user is using
  308. * the `HashLocationStrategy`).
  309. */
  310. closeOnNavigation?: boolean;
  311. /** Alternate `ComponentFactoryResolver` to use when resolving the associated component. */
  312. componentFactoryResolver?: ComponentFactoryResolver;
  313. /**
  314. * Duration of the enter animation in ms.
  315. * Should be a number, string type is deprecated.
  316. * @breaking-change 17.0.0 Remove string signature.
  317. */
  318. enterAnimationDuration?: string | number;
  319. /**
  320. * Duration of the exit animation in ms.
  321. * Should be a number, string type is deprecated.
  322. * @breaking-change 17.0.0 Remove string signature.
  323. */
  324. exitAnimationDuration?: string | number;
  325. }
  326. /**
  327. * Internal component that wraps user-provided dialog content in a MDC dialog.
  328. * @docs-private
  329. */
  330. export declare class MatDialogContainer extends _MatDialogContainerBase implements OnDestroy {
  331. private _animationMode?;
  332. /** Whether animations are enabled. */
  333. _animationsEnabled: boolean;
  334. /** Host element of the dialog container component. */
  335. private _hostElement;
  336. /** Duration of the dialog open animation. */
  337. private _openAnimationDuration;
  338. /** Duration of the dialog close animation. */
  339. private _closeAnimationDuration;
  340. /** Current timer for dialog animations. */
  341. private _animationTimer;
  342. constructor(elementRef: ElementRef, focusTrapFactory: FocusTrapFactory, document: any, dialogConfig: MatDialogConfig, checker: InteractivityChecker, ngZone: NgZone, overlayRef: OverlayRef, _animationMode?: string | undefined, focusMonitor?: FocusMonitor);
  343. protected _contentAttached(): void;
  344. ngOnDestroy(): void;
  345. /** Starts the dialog open animation if enabled. */
  346. private _startOpenAnimation;
  347. /**
  348. * Starts the exit animation of the dialog if enabled. This method is
  349. * called by the dialog ref.
  350. */
  351. _startExitAnimation(): void;
  352. /**
  353. * Completes the dialog open by clearing potential animation classes, trapping
  354. * focus and emitting an opened event.
  355. */
  356. private _finishDialogOpen;
  357. /**
  358. * Completes the dialog close by clearing potential animation classes, restoring
  359. * focus and emitting a closed event.
  360. */
  361. private _finishDialogClose;
  362. /** Clears all dialog animation classes. */
  363. private _clearAnimationClasses;
  364. private _waitForAnimationToComplete;
  365. /** Runs a callback in `requestAnimationFrame`, if available. */
  366. private _requestAnimationFrame;
  367. static ɵfac: i0.ɵɵFactoryDeclaration<MatDialogContainer, [null, null, { optional: true; }, null, null, null, null, { optional: true; }, null]>;
  368. static ɵcmp: i0.ɵɵComponentDeclaration<MatDialogContainer, "mat-dialog-container", never, {}, {}, never, never, false, never>;
  369. }
  370. /**
  371. * Base class for the `MatDialogContainer`. The base class does not implement
  372. * animations as these are left to implementers of the dialog container.
  373. */
  374. export declare abstract class _MatDialogContainerBase extends CdkDialogContainer<MatDialogConfig> {
  375. /** Emits when an animation state changes. */
  376. _animationStateChanged: EventEmitter<LegacyDialogAnimationEvent>;
  377. constructor(elementRef: ElementRef, focusTrapFactory: FocusTrapFactory, _document: any, dialogConfig: MatDialogConfig, interactivityChecker: InteractivityChecker, ngZone: NgZone, overlayRef: OverlayRef, focusMonitor?: FocusMonitor);
  378. /** Starts the dialog exit animation. */
  379. abstract _startExitAnimation(): void;
  380. protected _captureInitialFocus(): void;
  381. /**
  382. * Callback for when the open dialog animation has finished. Intended to
  383. * be called by sub-classes that use different animation implementations.
  384. */
  385. protected _openAnimationDone(totalTime: number): void;
  386. static ɵfac: i0.ɵɵFactoryDeclaration<_MatDialogContainerBase, [null, null, { optional: true; }, null, null, null, null, null]>;
  387. static ɵcmp: i0.ɵɵComponentDeclaration<_MatDialogContainerBase, "ng-component", never, {}, {}, never, never, false, never>;
  388. }
  389. /**
  390. * Scrollable content container of a dialog.
  391. */
  392. export declare class MatDialogContent {
  393. static ɵfac: i0.ɵɵFactoryDeclaration<MatDialogContent, never>;
  394. static ɵdir: i0.ɵɵDirectiveDeclaration<MatDialogContent, "[mat-dialog-content], mat-dialog-content, [matDialogContent]", never, {}, {}, never, never, false, never>;
  395. }
  396. export declare class MatDialogModule {
  397. static ɵfac: i0.ɵɵFactoryDeclaration<MatDialogModule, never>;
  398. static ɵmod: i0.ɵɵNgModuleDeclaration<MatDialogModule, [typeof i1.MatDialogContainer, typeof i2.MatDialogClose, typeof i2.MatDialogTitle, typeof i2.MatDialogActions, typeof i2.MatDialogContent], [typeof i3.DialogModule, typeof i4.OverlayModule, typeof i5.PortalModule, typeof i6.MatCommonModule], [typeof i1.MatDialogContainer, typeof i2.MatDialogClose, typeof i2.MatDialogTitle, typeof i2.MatDialogContent, typeof i2.MatDialogActions, typeof i6.MatCommonModule]>;
  399. static ɵinj: i0.ɵɵInjectorDeclaration<MatDialogModule>;
  400. }
  401. /**
  402. * Reference to a dialog opened via the MatDialog service.
  403. */
  404. export declare class MatDialogRef<T, R = any> {
  405. private _ref;
  406. _containerInstance: _MatDialogContainerBase;
  407. /** The instance of component opened into the dialog. */
  408. componentInstance: T;
  409. /** Whether the user is allowed to close the dialog. */
  410. disableClose: boolean | undefined;
  411. /** Unique ID for the dialog. */
  412. id: string;
  413. /** Subject for notifying the user that the dialog has finished opening. */
  414. private readonly _afterOpened;
  415. /** Subject for notifying the user that the dialog has started closing. */
  416. private readonly _beforeClosed;
  417. /** Result to be passed to afterClosed. */
  418. private _result;
  419. /** Handle to the timeout that's running as a fallback in case the exit animation doesn't fire. */
  420. private _closeFallbackTimeout;
  421. /** Current state of the dialog. */
  422. private _state;
  423. /** Interaction that caused the dialog to close. */
  424. private _closeInteractionType;
  425. constructor(_ref: DialogRef<R, T>, config: MatDialogConfig, _containerInstance: _MatDialogContainerBase);
  426. /**
  427. * Close the dialog.
  428. * @param dialogResult Optional result to return to the dialog opener.
  429. */
  430. close(dialogResult?: R): void;
  431. /**
  432. * Gets an observable that is notified when the dialog is finished opening.
  433. */
  434. afterOpened(): Observable<void>;
  435. /**
  436. * Gets an observable that is notified when the dialog is finished closing.
  437. */
  438. afterClosed(): Observable<R | undefined>;
  439. /**
  440. * Gets an observable that is notified when the dialog has started closing.
  441. */
  442. beforeClosed(): Observable<R | undefined>;
  443. /**
  444. * Gets an observable that emits when the overlay's backdrop has been clicked.
  445. */
  446. backdropClick(): Observable<MouseEvent>;
  447. /**
  448. * Gets an observable that emits when keydown events are targeted on the overlay.
  449. */
  450. keydownEvents(): Observable<KeyboardEvent>;
  451. /**
  452. * Updates the dialog's position.
  453. * @param position New dialog position.
  454. */
  455. updatePosition(position?: DialogPosition): this;
  456. /**
  457. * Updates the dialog's width and height.
  458. * @param width New width of the dialog.
  459. * @param height New height of the dialog.
  460. */
  461. updateSize(width?: string, height?: string): this;
  462. /** Add a CSS class or an array of classes to the overlay pane. */
  463. addPanelClass(classes: string | string[]): this;
  464. /** Remove a CSS class or an array of classes from the overlay pane. */
  465. removePanelClass(classes: string | string[]): this;
  466. /** Gets the current state of the dialog's lifecycle. */
  467. getState(): MatDialogState;
  468. /**
  469. * Finishes the dialog close by updating the state of the dialog
  470. * and disposing the overlay.
  471. */
  472. private _finishDialogClose;
  473. }
  474. export declare const enum MatDialogState {
  475. OPEN = 0,
  476. CLOSING = 1,
  477. CLOSED = 2
  478. }
  479. /**
  480. * Title of a dialog element. Stays fixed to the top of the dialog when scrolling.
  481. */
  482. export declare class MatDialogTitle implements OnInit {
  483. private _dialogRef;
  484. private _elementRef;
  485. private _dialog;
  486. id: string;
  487. constructor(_dialogRef: MatDialogRef<any>, _elementRef: ElementRef<HTMLElement>, _dialog: MatDialog);
  488. ngOnInit(): void;
  489. static ɵfac: i0.ɵɵFactoryDeclaration<MatDialogTitle, [{ optional: true; }, null, null]>;
  490. static ɵdir: i0.ɵɵDirectiveDeclaration<MatDialogTitle, "[mat-dialog-title], [matDialogTitle]", ["matDialogTitle"], { "id": { "alias": "id"; "required": false; }; }, {}, never, never, false, never>;
  491. }
  492. /** Duration of the opening animation in milliseconds. */
  493. declare const OPEN_ANIMATION_DURATION = 150;
  494. export { }