@angular/cdk 19.2.1 → 19.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (85) hide show
  1. package/a11y/index.d.ts +926 -999
  2. package/accordion/index.d.ts +8 -27
  3. package/bidi/index.d.ts +38 -48
  4. package/clipboard/index.d.ts +61 -75
  5. package/coercion/index.d.ts +22 -32
  6. package/coercion/private/index.d.ts +2 -2
  7. package/collections/index.d.ts +139 -158
  8. package/dialog/index.d.ts +210 -246
  9. package/drag-drop/index.d.ts +1084 -1160
  10. package/fesm2022/a11y.mjs +62 -54
  11. package/fesm2022/a11y.mjs.map +1 -1
  12. package/fesm2022/accordion.mjs +10 -14
  13. package/fesm2022/accordion.mjs.map +1 -1
  14. package/fesm2022/bidi.mjs +15 -15
  15. package/fesm2022/bidi.mjs.map +1 -1
  16. package/fesm2022/cdk.mjs +1 -1
  17. package/fesm2022/cdk.mjs.map +1 -1
  18. package/fesm2022/clipboard.mjs +10 -14
  19. package/fesm2022/clipboard.mjs.map +1 -1
  20. package/fesm2022/coercion/private.mjs +0 -4
  21. package/fesm2022/coercion/private.mjs.map +1 -1
  22. package/fesm2022/coercion.mjs.map +1 -1
  23. package/fesm2022/collections.mjs +4 -8
  24. package/fesm2022/collections.mjs.map +1 -1
  25. package/fesm2022/dialog.mjs +10 -14
  26. package/fesm2022/dialog.mjs.map +1 -1
  27. package/fesm2022/drag-drop.mjs +31 -35
  28. package/fesm2022/drag-drop.mjs.map +1 -1
  29. package/fesm2022/keycodes.mjs +0 -4
  30. package/fesm2022/keycodes.mjs.map +1 -1
  31. package/fesm2022/layout.mjs +10 -14
  32. package/fesm2022/layout.mjs.map +1 -1
  33. package/fesm2022/listbox.mjs +10 -14
  34. package/fesm2022/listbox.mjs.map +1 -1
  35. package/fesm2022/menu.mjs +49 -53
  36. package/fesm2022/menu.mjs.map +1 -1
  37. package/fesm2022/observers/private.mjs +3 -7
  38. package/fesm2022/observers/private.mjs.map +1 -1
  39. package/fesm2022/observers.mjs +13 -17
  40. package/fesm2022/observers.mjs.map +1 -1
  41. package/fesm2022/overlay.mjs +54 -50
  42. package/fesm2022/overlay.mjs.map +1 -1
  43. package/fesm2022/platform.mjs +7 -11
  44. package/fesm2022/platform.mjs.map +1 -1
  45. package/fesm2022/portal.mjs +25 -26
  46. package/fesm2022/portal.mjs.map +1 -1
  47. package/fesm2022/private.mjs +6 -10
  48. package/fesm2022/private.mjs.map +1 -1
  49. package/fesm2022/scrolling.mjs +36 -40
  50. package/fesm2022/scrolling.mjs.map +1 -1
  51. package/fesm2022/stepper.mjs +29 -32
  52. package/fesm2022/stepper.mjs.map +1 -1
  53. package/fesm2022/table.mjs +78 -88
  54. package/fesm2022/table.mjs.map +1 -1
  55. package/fesm2022/testing/selenium-webdriver.mjs.map +1 -1
  56. package/fesm2022/testing/testbed.mjs +1 -41
  57. package/fesm2022/testing/testbed.mjs.map +1 -1
  58. package/fesm2022/testing.mjs.map +1 -1
  59. package/fesm2022/text-field.mjs +16 -20
  60. package/fesm2022/text-field.mjs.map +1 -1
  61. package/fesm2022/tree.mjs +25 -29
  62. package/fesm2022/tree.mjs.map +1 -1
  63. package/index.d.ts +2 -2
  64. package/keycodes/index.d.ts +123 -244
  65. package/layout/index.d.ts +23 -25
  66. package/listbox/index.d.ts +90 -107
  67. package/menu/index.d.ts +593 -687
  68. package/observers/index.d.ts +38 -44
  69. package/observers/private/index.d.ts +3 -3
  70. package/overlay/index.d.ts +921 -986
  71. package/package.json +1 -1
  72. package/platform/index.d.ts +50 -62
  73. package/portal/index.d.ts +172 -195
  74. package/private/index.d.ts +3 -3
  75. package/schematics/ng-add/index.js +1 -1
  76. package/schematics/ng-add/index.mjs +1 -1
  77. package/schematics/ng-generate/drag-drop/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.spec.ts.template +1 -1
  78. package/scrolling/index.d.ts +268 -351
  79. package/stepper/index.d.ts +72 -124
  80. package/table/index.d.ts +336 -449
  81. package/testing/index.d.ts +490 -517
  82. package/testing/selenium-webdriver/index.d.ts +30 -20
  83. package/testing/testbed/index.d.ts +9 -19
  84. package/text-field/index.d.ts +9 -30
  85. package/tree/index.d.ts +204 -271
package/dialog/index.d.ts CHANGED
@@ -1,43 +1,145 @@
1
- import { BasePortalOutlet } from '@angular/cdk/portal';
2
- import { CdkPortalOutlet } from '@angular/cdk/portal';
3
- import { ChangeDetectorRef } from '@angular/core';
4
- import { ComponentPortal } from '@angular/cdk/portal';
5
- import { ComponentRef } from '@angular/core';
6
- import { ComponentType } from '@angular/cdk/overlay';
7
- import { Direction } from '@angular/cdk/bidi';
8
- import { DomPortal } from '@angular/cdk/portal';
9
- import { ElementRef } from '@angular/core';
10
- import { EmbeddedViewRef } from '@angular/core';
11
- import { FocusOrigin } from '@angular/cdk/a11y';
12
- import { FocusTrapFactory } from '@angular/cdk/a11y';
1
+ import * as i3 from '@angular/cdk/a11y';
2
+ import { FocusTrapFactory, FocusOrigin } from '@angular/cdk/a11y';
3
+ import * as i2 from '@angular/cdk/portal';
4
+ import { BasePortalOutlet, CdkPortalOutlet, ComponentPortal, TemplatePortal, DomPortal } from '@angular/cdk/portal';
13
5
  import * as i0 from '@angular/core';
6
+ import { ViewContainerRef, Injector, StaticProvider, Type, OnDestroy, ElementRef, NgZone, ChangeDetectorRef, ComponentRef, EmbeddedViewRef, TemplateRef, InjectionToken } from '@angular/core';
7
+ import { Direction } from '@angular/cdk/bidi';
14
8
  import * as i1 from '@angular/cdk/overlay';
15
- import * as i2 from '@angular/cdk/portal';
16
- import * as i3 from '@angular/cdk/a11y';
17
- import { InjectionToken } from '@angular/core';
18
- import { Injector } from '@angular/core';
19
- import { NgZone } from '@angular/core';
20
- import { Observable } from 'rxjs';
21
- import { OnDestroy } from '@angular/core';
22
- import { Overlay } from '@angular/cdk/overlay';
23
- import { OverlayRef } from '@angular/cdk/overlay';
24
- import { PositionStrategy } from '@angular/cdk/overlay';
25
- import { ScrollStrategy } from '@angular/cdk/overlay';
26
- import { StaticProvider } from '@angular/core';
27
- import { Subject } from 'rxjs';
28
- import { TemplatePortal } from '@angular/cdk/portal';
29
- import { TemplateRef } from '@angular/core';
30
- import { Type } from '@angular/core';
31
- import { ViewContainerRef } from '@angular/core';
9
+ import { PositionStrategy, ScrollStrategy, OverlayRef, ComponentType, Overlay } from '@angular/cdk/overlay';
10
+ import { Observable, Subject } from 'rxjs';
32
11
 
33
12
  /** Options for where to set focus to automatically on dialog open */
34
- export declare type AutoFocusTarget = 'dialog' | 'first-tabbable' | 'first-heading';
13
+ type AutoFocusTarget = 'dialog' | 'first-tabbable' | 'first-heading';
14
+ /** Valid ARIA roles for a dialog. */
15
+ type DialogRole = 'dialog' | 'alertdialog';
16
+ /** Configuration for opening a modal dialog. */
17
+ declare class DialogConfig<D = unknown, R = unknown, C extends BasePortalOutlet = BasePortalOutlet> {
18
+ /**
19
+ * Where the attached component should live in Angular's *logical* component tree.
20
+ * This affects what is available for injection and the change detection order for the
21
+ * component instantiated inside of the dialog. This does not affect where the dialog
22
+ * content will be rendered.
23
+ */
24
+ viewContainerRef?: ViewContainerRef;
25
+ /**
26
+ * Injector used for the instantiation of the component to be attached. If provided,
27
+ * takes precedence over the injector indirectly provided by `ViewContainerRef`.
28
+ */
29
+ injector?: Injector;
30
+ /** ID for the dialog. If omitted, a unique one will be generated. */
31
+ id?: string;
32
+ /** The ARIA role of the dialog element. */
33
+ role?: DialogRole;
34
+ /** Optional CSS class or classes applied to the overlay panel. */
35
+ panelClass?: string | string[];
36
+ /** Whether the dialog has a backdrop. */
37
+ hasBackdrop?: boolean;
38
+ /** Optional CSS class or classes applied to the overlay backdrop. */
39
+ backdropClass?: string | string[];
40
+ /** Whether the dialog closes with the escape key or pointer events outside the panel element. */
41
+ disableClose?: boolean;
42
+ /** Width of the dialog. */
43
+ width?: string;
44
+ /** Height of the dialog. */
45
+ height?: string;
46
+ /** Min-width of the dialog. If a number is provided, assumes pixel units. */
47
+ minWidth?: number | string;
48
+ /** Min-height of the dialog. If a number is provided, assumes pixel units. */
49
+ minHeight?: number | string;
50
+ /** Max-width of the dialog. If a number is provided, assumes pixel units. Defaults to 80vw. */
51
+ maxWidth?: number | string;
52
+ /** Max-height of the dialog. If a number is provided, assumes pixel units. */
53
+ maxHeight?: number | string;
54
+ /** Strategy to use when positioning the dialog. Defaults to centering it on the page. */
55
+ positionStrategy?: PositionStrategy;
56
+ /** Data being injected into the child component. */
57
+ data?: D | null;
58
+ /** Layout direction for the dialog's content. */
59
+ direction?: Direction;
60
+ /** ID of the element that describes the dialog. */
61
+ ariaDescribedBy?: string | null;
62
+ /** ID of the element that labels the dialog. */
63
+ ariaLabelledBy?: string | null;
64
+ /** Dialog label applied via `aria-label` */
65
+ ariaLabel?: string | null;
66
+ /**
67
+ * Whether this is a modal dialog. Used to set the `aria-modal` attribute. Off by default,
68
+ * because it can interfere with other overlay-based components (e.g. `mat-select`) and because
69
+ * it is redundant since the dialog marks all outside content as `aria-hidden` anyway.
70
+ */
71
+ ariaModal?: boolean;
72
+ /**
73
+ * Where the dialog should focus on open.
74
+ * @breaking-change 14.0.0 Remove boolean option from autoFocus. Use string or
75
+ * AutoFocusTarget instead.
76
+ */
77
+ autoFocus?: AutoFocusTarget | string | boolean;
78
+ /**
79
+ * Whether the dialog should restore focus to the previously-focused element upon closing.
80
+ * Has the following behavior based on the type that is passed in:
81
+ * - `boolean` - when true, will return focus to the element that was focused before the dialog
82
+ * was opened, otherwise won't restore focus at all.
83
+ * - `string` - focus will be restored to the first element that matches the CSS selector.
84
+ * - `HTMLElement` - focus will be restored to the specific element.
85
+ */
86
+ restoreFocus?: boolean | string | HTMLElement;
87
+ /**
88
+ * Scroll strategy to be used for the dialog. This determines how
89
+ * the dialog responds to scrolling underneath the panel element.
90
+ */
91
+ scrollStrategy?: ScrollStrategy;
92
+ /**
93
+ * Whether the dialog should close when the user navigates backwards or forwards through browser
94
+ * history. This does not apply to navigation via anchor element unless using URL-hash based
95
+ * routing (`HashLocationStrategy` in the Angular router).
96
+ */
97
+ closeOnNavigation?: boolean;
98
+ /**
99
+ * Whether the dialog should close when the dialog service is destroyed. This is useful if
100
+ * another service is wrapping the dialog and is managing the destruction instead.
101
+ */
102
+ closeOnDestroy?: boolean;
103
+ /**
104
+ * Whether the dialog should close when the underlying overlay is detached. This is useful if
105
+ * another service is wrapping the dialog and is managing the destruction instead. E.g. an
106
+ * external detachment can happen as a result of a scroll strategy triggering it or when the
107
+ * browser location changes.
108
+ */
109
+ closeOnOverlayDetachments?: boolean;
110
+ /**
111
+ * Alternate `ComponentFactoryResolver` to use when resolving the associated component.
112
+ * @deprecated No longer used. Will be removed.
113
+ * @breaking-change 20.0.0
114
+ */
115
+ componentFactoryResolver?: unknown;
116
+ /**
117
+ * Providers that will be exposed to the contents of the dialog. Can also
118
+ * be provided as a function in order to generate the providers lazily.
119
+ */
120
+ providers?: StaticProvider[] | ((dialogRef: R, config: DialogConfig<D, R, C>, container: C) => StaticProvider[]);
121
+ /**
122
+ * Component into which the dialog content will be rendered. Defaults to `CdkDialogContainer`.
123
+ * A configuration object can be passed in to customize the providers that will be exposed
124
+ * to the dialog container.
125
+ */
126
+ container?: Type<C> | {
127
+ type: Type<C>;
128
+ providers: (config: DialogConfig<D, R, C>) => StaticProvider[];
129
+ };
130
+ /**
131
+ * Context that will be passed to template-based dialogs.
132
+ * A function can be passed in to resolve the context lazily.
133
+ */
134
+ templateContext?: Record<string, any> | (() => Record<string, any>);
135
+ }
35
136
 
137
+ declare function throwDialogContentAlreadyAttachedError(): void;
36
138
  /**
37
139
  * Internal component that wraps user-provided dialog content.
38
140
  * @docs-private
39
141
  */
40
- export declare class CdkDialogContainer<C extends DialogConfig = DialogConfig> extends BasePortalOutlet implements OnDestroy {
142
+ declare class CdkDialogContainer<C extends DialogConfig = DialogConfig> extends BasePortalOutlet implements OnDestroy {
41
143
  protected _elementRef: ElementRef<any>;
42
144
  protected _focusTrapFactory: FocusTrapFactory;
43
145
  readonly _config: C;
@@ -129,10 +231,67 @@ export declare class CdkDialogContainer<C extends DialogConfig = DialogConfig> e
129
231
  static ɵcmp: i0.ɵɵComponentDeclaration<CdkDialogContainer<any>, "cdk-dialog-container", never, {}, {}, never, never, true, never>;
130
232
  }
131
233
 
132
- /** Injection token that can be used to provide default options for the dialog module. */
133
- export declare const DEFAULT_DIALOG_CONFIG: InjectionToken<DialogConfig<unknown, unknown, BasePortalOutlet>>;
234
+ /** Additional options that can be passed in when closing a dialog. */
235
+ interface DialogCloseOptions {
236
+ /** Focus original to use when restoring focus. */
237
+ focusOrigin?: FocusOrigin;
238
+ }
239
+ /**
240
+ * Reference to a dialog opened via the Dialog service.
241
+ */
242
+ declare class DialogRef<R = unknown, C = unknown> {
243
+ readonly overlayRef: OverlayRef;
244
+ readonly config: DialogConfig<any, DialogRef<R, C>, BasePortalOutlet>;
245
+ /**
246
+ * Instance of component opened into the dialog. Will be
247
+ * null when the dialog is opened using a `TemplateRef`.
248
+ */
249
+ readonly componentInstance: C | null;
250
+ /**
251
+ * `ComponentRef` of the component opened into the dialog. Will be
252
+ * null when the dialog is opened using a `TemplateRef`.
253
+ */
254
+ readonly componentRef: ComponentRef<C> | null;
255
+ /** Instance of the container that is rendering out the dialog content. */
256
+ readonly containerInstance: BasePortalOutlet & {
257
+ _closeInteractionType?: FocusOrigin;
258
+ };
259
+ /** Whether the user is allowed to close the dialog. */
260
+ disableClose: boolean | undefined;
261
+ /** Emits when the dialog has been closed. */
262
+ readonly closed: Observable<R | undefined>;
263
+ /** Emits when the backdrop of the dialog is clicked. */
264
+ readonly backdropClick: Observable<MouseEvent>;
265
+ /** Emits when on keyboard events within the dialog. */
266
+ readonly keydownEvents: Observable<KeyboardEvent>;
267
+ /** Emits on pointer events that happen outside of the dialog. */
268
+ readonly outsidePointerEvents: Observable<MouseEvent>;
269
+ /** Unique ID for the dialog. */
270
+ readonly id: string;
271
+ /** Subscription to external detachments of the dialog. */
272
+ private _detachSubscription;
273
+ constructor(overlayRef: OverlayRef, config: DialogConfig<any, DialogRef<R, C>, BasePortalOutlet>);
274
+ /**
275
+ * Close the dialog.
276
+ * @param result Optional result to return to the dialog opener.
277
+ * @param options Additional options to customize the closing behavior.
278
+ */
279
+ close(result?: R, options?: DialogCloseOptions): void;
280
+ /** Updates the position of the dialog based on the current position strategy. */
281
+ updatePosition(): this;
282
+ /**
283
+ * Updates the dialog's width and height.
284
+ * @param width New width of the dialog.
285
+ * @param height New height of the dialog.
286
+ */
287
+ updateSize(width?: string | number, height?: string | number): this;
288
+ /** Add a CSS class or an array of classes to the overlay pane. */
289
+ addPanelClass(classes: string | string[]): this;
290
+ /** Remove a CSS class or an array of classes from the overlay pane. */
291
+ removePanelClass(classes: string | string[]): this;
292
+ }
134
293
 
135
- export declare class Dialog implements OnDestroy {
294
+ declare class Dialog implements OnDestroy {
136
295
  private _overlay;
137
296
  private _injector;
138
297
  private _defaultOptions;
@@ -225,228 +384,33 @@ export declare class Dialog implements OnDestroy {
225
384
  static ɵprov: i0.ɵɵInjectableDeclaration<Dialog>;
226
385
  }
227
386
 
228
- /** Injection token for the Dialog's Data. */
229
- export declare const DIALOG_DATA: InjectionToken<any>;
387
+ declare class DialogModule {
388
+ static ɵfac: i0.ɵɵFactoryDeclaration<DialogModule, never>;
389
+ static ɵmod: i0.ɵɵNgModuleDeclaration<DialogModule, never, [typeof i1.OverlayModule, typeof i2.PortalModule, typeof i3.A11yModule, typeof CdkDialogContainer], [typeof i2.PortalModule, typeof CdkDialogContainer]>;
390
+ static ɵinj: i0.ɵɵInjectorDeclaration<DialogModule>;
391
+ }
230
392
 
231
393
  /** Injection token for the Dialog's ScrollStrategy. */
232
- export declare const DIALOG_SCROLL_STRATEGY: InjectionToken<() => ScrollStrategy>;
233
-
394
+ declare const DIALOG_SCROLL_STRATEGY: InjectionToken<() => ScrollStrategy>;
395
+ /** Injection token for the Dialog's Data. */
396
+ declare const DIALOG_DATA: InjectionToken<any>;
397
+ /** Injection token that can be used to provide default options for the dialog module. */
398
+ declare const DEFAULT_DIALOG_CONFIG: InjectionToken<DialogConfig<unknown, unknown, i2.BasePortalOutlet>>;
234
399
  /**
235
400
  * @docs-private
236
401
  * @deprecated No longer used. To be removed.
237
402
  * @breaking-change 19.0.0
238
403
  */
239
- export declare const DIALOG_SCROLL_STRATEGY_PROVIDER: {
240
- provide: InjectionToken<() => ScrollStrategy>;
241
- deps: (typeof Overlay)[];
242
- useFactory: typeof DIALOG_SCROLL_STRATEGY_PROVIDER_FACTORY;
243
- };
244
-
404
+ declare function DIALOG_SCROLL_STRATEGY_PROVIDER_FACTORY(overlay: Overlay): () => ScrollStrategy;
245
405
  /**
246
406
  * @docs-private
247
407
  * @deprecated No longer used. To be removed.
248
408
  * @breaking-change 19.0.0
249
409
  */
250
- export declare function DIALOG_SCROLL_STRATEGY_PROVIDER_FACTORY(overlay: Overlay): () => ScrollStrategy;
251
-
252
- /** Additional options that can be passed in when closing a dialog. */
253
- export declare interface DialogCloseOptions {
254
- /** Focus original to use when restoring focus. */
255
- focusOrigin?: FocusOrigin;
256
- }
257
-
258
- /** Configuration for opening a modal dialog. */
259
- export declare class DialogConfig<D = unknown, R = unknown, C extends BasePortalOutlet = BasePortalOutlet> {
260
- /**
261
- * Where the attached component should live in Angular's *logical* component tree.
262
- * This affects what is available for injection and the change detection order for the
263
- * component instantiated inside of the dialog. This does not affect where the dialog
264
- * content will be rendered.
265
- */
266
- viewContainerRef?: ViewContainerRef;
267
- /**
268
- * Injector used for the instantiation of the component to be attached. If provided,
269
- * takes precedence over the injector indirectly provided by `ViewContainerRef`.
270
- */
271
- injector?: Injector;
272
- /** ID for the dialog. If omitted, a unique one will be generated. */
273
- id?: string;
274
- /** The ARIA role of the dialog element. */
275
- role?: DialogRole;
276
- /** Optional CSS class or classes applied to the overlay panel. */
277
- panelClass?: string | string[];
278
- /** Whether the dialog has a backdrop. */
279
- hasBackdrop?: boolean;
280
- /** Optional CSS class or classes applied to the overlay backdrop. */
281
- backdropClass?: string | string[];
282
- /** Whether the dialog closes with the escape key or pointer events outside the panel element. */
283
- disableClose?: boolean;
284
- /** Width of the dialog. */
285
- width?: string;
286
- /** Height of the dialog. */
287
- height?: string;
288
- /** Min-width of the dialog. If a number is provided, assumes pixel units. */
289
- minWidth?: number | string;
290
- /** Min-height of the dialog. If a number is provided, assumes pixel units. */
291
- minHeight?: number | string;
292
- /** Max-width of the dialog. If a number is provided, assumes pixel units. Defaults to 80vw. */
293
- maxWidth?: number | string;
294
- /** Max-height of the dialog. If a number is provided, assumes pixel units. */
295
- maxHeight?: number | string;
296
- /** Strategy to use when positioning the dialog. Defaults to centering it on the page. */
297
- positionStrategy?: PositionStrategy;
298
- /** Data being injected into the child component. */
299
- data?: D | null;
300
- /** Layout direction for the dialog's content. */
301
- direction?: Direction;
302
- /** ID of the element that describes the dialog. */
303
- ariaDescribedBy?: string | null;
304
- /** ID of the element that labels the dialog. */
305
- ariaLabelledBy?: string | null;
306
- /** Dialog label applied via `aria-label` */
307
- ariaLabel?: string | null;
308
- /**
309
- * Whether this is a modal dialog. Used to set the `aria-modal` attribute. Off by default,
310
- * because it can interfere with other overlay-based components (e.g. `mat-select`) and because
311
- * it is redundant since the dialog marks all outside content as `aria-hidden` anyway.
312
- */
313
- ariaModal?: boolean;
314
- /**
315
- * Where the dialog should focus on open.
316
- * @breaking-change 14.0.0 Remove boolean option from autoFocus. Use string or
317
- * AutoFocusTarget instead.
318
- */
319
- autoFocus?: AutoFocusTarget | string | boolean;
320
- /**
321
- * Whether the dialog should restore focus to the previously-focused element upon closing.
322
- * Has the following behavior based on the type that is passed in:
323
- * - `boolean` - when true, will return focus to the element that was focused before the dialog
324
- * was opened, otherwise won't restore focus at all.
325
- * - `string` - focus will be restored to the first element that matches the CSS selector.
326
- * - `HTMLElement` - focus will be restored to the specific element.
327
- */
328
- restoreFocus?: boolean | string | HTMLElement;
329
- /**
330
- * Scroll strategy to be used for the dialog. This determines how
331
- * the dialog responds to scrolling underneath the panel element.
332
- */
333
- scrollStrategy?: ScrollStrategy;
334
- /**
335
- * Whether the dialog should close when the user navigates backwards or forwards through browser
336
- * history. This does not apply to navigation via anchor element unless using URL-hash based
337
- * routing (`HashLocationStrategy` in the Angular router).
338
- */
339
- closeOnNavigation?: boolean;
340
- /**
341
- * Whether the dialog should close when the dialog service is destroyed. This is useful if
342
- * another service is wrapping the dialog and is managing the destruction instead.
343
- */
344
- closeOnDestroy?: boolean;
345
- /**
346
- * Whether the dialog should close when the underlying overlay is detached. This is useful if
347
- * another service is wrapping the dialog and is managing the destruction instead. E.g. an
348
- * external detachment can happen as a result of a scroll strategy triggering it or when the
349
- * browser location changes.
350
- */
351
- closeOnOverlayDetachments?: boolean;
352
- /**
353
- * Alternate `ComponentFactoryResolver` to use when resolving the associated component.
354
- * @deprecated No longer used. Will be removed.
355
- * @breaking-change 20.0.0
356
- */
357
- componentFactoryResolver?: unknown;
358
- /**
359
- * Providers that will be exposed to the contents of the dialog. Can also
360
- * be provided as a function in order to generate the providers lazily.
361
- */
362
- providers?: StaticProvider[] | ((dialogRef: R, config: DialogConfig<D, R, C>, container: C) => StaticProvider[]);
363
- /**
364
- * Component into which the dialog content will be rendered. Defaults to `CdkDialogContainer`.
365
- * A configuration object can be passed in to customize the providers that will be exposed
366
- * to the dialog container.
367
- */
368
- container?: Type<C> | {
369
- type: Type<C>;
370
- providers: (config: DialogConfig<D, R, C>) => StaticProvider[];
371
- };
372
- /**
373
- * Context that will be passed to template-based dialogs.
374
- * A function can be passed in to resolve the context lazily.
375
- */
376
- templateContext?: Record<string, any> | (() => Record<string, any>);
377
- }
378
-
379
- export declare class DialogModule {
380
- static ɵfac: i0.ɵɵFactoryDeclaration<DialogModule, never>;
381
- static ɵmod: i0.ɵɵNgModuleDeclaration<DialogModule, never, [typeof i1.OverlayModule, typeof i2.PortalModule, typeof i3.A11yModule, typeof i4.CdkDialogContainer], [typeof i2.PortalModule, typeof i4.CdkDialogContainer]>;
382
- static ɵinj: i0.ɵɵInjectorDeclaration<DialogModule>;
383
- }
384
-
385
- /**
386
- * Reference to a dialog opened via the Dialog service.
387
- */
388
- export declare class DialogRef<R = unknown, C = unknown> {
389
- readonly overlayRef: OverlayRef;
390
- readonly config: DialogConfig<any, DialogRef<R, C>, BasePortalOutlet>;
391
- /**
392
- * Instance of component opened into the dialog. Will be
393
- * null when the dialog is opened using a `TemplateRef`.
394
- */
395
- readonly componentInstance: C | null;
396
- /**
397
- * `ComponentRef` of the component opened into the dialog. Will be
398
- * null when the dialog is opened using a `TemplateRef`.
399
- */
400
- readonly componentRef: ComponentRef<C> | null;
401
- /** Instance of the container that is rendering out the dialog content. */
402
- readonly containerInstance: BasePortalOutlet & {
403
- _closeInteractionType?: FocusOrigin;
404
- };
405
- /** Whether the user is allowed to close the dialog. */
406
- disableClose: boolean | undefined;
407
- /** Emits when the dialog has been closed. */
408
- readonly closed: Observable<R | undefined>;
409
- /** Emits when the backdrop of the dialog is clicked. */
410
- readonly backdropClick: Observable<MouseEvent>;
411
- /** Emits when on keyboard events within the dialog. */
412
- readonly keydownEvents: Observable<KeyboardEvent>;
413
- /** Emits on pointer events that happen outside of the dialog. */
414
- readonly outsidePointerEvents: Observable<MouseEvent>;
415
- /** Unique ID for the dialog. */
416
- readonly id: string;
417
- /** Subscription to external detachments of the dialog. */
418
- private _detachSubscription;
419
- constructor(overlayRef: OverlayRef, config: DialogConfig<any, DialogRef<R, C>, BasePortalOutlet>);
420
- /**
421
- * Close the dialog.
422
- * @param result Optional result to return to the dialog opener.
423
- * @param options Additional options to customize the closing behavior.
424
- */
425
- close(result?: R, options?: DialogCloseOptions): void;
426
- /** Updates the position of the dialog based on the current position strategy. */
427
- updatePosition(): this;
428
- /**
429
- * Updates the dialog's width and height.
430
- * @param width New width of the dialog.
431
- * @param height New height of the dialog.
432
- */
433
- updateSize(width?: string | number, height?: string | number): this;
434
- /** Add a CSS class or an array of classes to the overlay pane. */
435
- addPanelClass(classes: string | string[]): this;
436
- /** Remove a CSS class or an array of classes from the overlay pane. */
437
- removePanelClass(classes: string | string[]): this;
438
- }
439
-
440
- /** Valid ARIA roles for a dialog. */
441
- export declare type DialogRole = 'dialog' | 'alertdialog';
442
-
443
- declare namespace i4 {
444
- export {
445
- throwDialogContentAlreadyAttachedError,
446
- CdkDialogContainer
447
- }
448
- }
449
-
450
- export declare function throwDialogContentAlreadyAttachedError(): void;
410
+ declare const DIALOG_SCROLL_STRATEGY_PROVIDER: {
411
+ provide: InjectionToken<() => ScrollStrategy>;
412
+ deps: (typeof Overlay)[];
413
+ useFactory: typeof DIALOG_SCROLL_STRATEGY_PROVIDER_FACTORY;
414
+ };
451
415
 
452
- export { }
416
+ export { type AutoFocusTarget, CdkDialogContainer, DEFAULT_DIALOG_CONFIG, DIALOG_DATA, DIALOG_SCROLL_STRATEGY, DIALOG_SCROLL_STRATEGY_PROVIDER, DIALOG_SCROLL_STRATEGY_PROVIDER_FACTORY, Dialog, type DialogCloseOptions, DialogConfig, DialogModule, DialogRef, type DialogRole, throwDialogContentAlreadyAttachedError };