@angular/cdk 20.0.0-next.0 → 20.0.0-next.2

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 (181) hide show
  1. package/a11y/index.d.ts +330 -1234
  2. package/a11y-module.d-7d03e079.d.ts +313 -0
  3. package/accordion/index.d.ts +8 -27
  4. package/activedescendant-key-manager.d-11921e3a.d.ts +31 -0
  5. package/bidi/index.d.ts +3 -62
  6. package/bidi-module.d-f8648621.d.ts +53 -0
  7. package/clipboard/index.d.ts +61 -75
  8. package/coercion/index.d.ts +10 -33
  9. package/coercion/private/index.d.ts +2 -2
  10. package/collections/index.d.ts +13 -291
  11. package/data-source.d-7cab2c9d.d.ts +42 -0
  12. package/dialog/index.d.ts +204 -249
  13. package/drag-drop/index.d.ts +1077 -1157
  14. package/fesm2022/a11y-module-e6996d20.mjs +952 -0
  15. package/fesm2022/a11y-module-e6996d20.mjs.map +1 -0
  16. package/fesm2022/a11y.mjs +47 -2445
  17. package/fesm2022/a11y.mjs.map +1 -1
  18. package/fesm2022/accordion.mjs +12 -16
  19. package/fesm2022/accordion.mjs.map +1 -1
  20. package/fesm2022/activedescendant-key-manager-1351a9d3.mjs +16 -0
  21. package/fesm2022/activedescendant-key-manager-1351a9d3.mjs.map +1 -0
  22. package/fesm2022/array-ee3b4bab.mjs +6 -0
  23. package/fesm2022/array-ee3b4bab.mjs.map +1 -0
  24. package/fesm2022/backwards-compatibility-bcbe473e.mjs +25 -0
  25. package/fesm2022/backwards-compatibility-bcbe473e.mjs.map +1 -0
  26. package/fesm2022/bidi-module-0726b65c.mjs +78 -0
  27. package/fesm2022/bidi-module-0726b65c.mjs.map +1 -0
  28. package/fesm2022/bidi.mjs +4 -143
  29. package/fesm2022/bidi.mjs.map +1 -1
  30. package/fesm2022/breakpoints-observer-d4584b66.mjs +179 -0
  31. package/fesm2022/breakpoints-observer-d4584b66.mjs.map +1 -0
  32. package/fesm2022/cdk.mjs +1 -1
  33. package/fesm2022/cdk.mjs.map +1 -1
  34. package/fesm2022/clipboard.mjs +10 -14
  35. package/fesm2022/clipboard.mjs.map +1 -1
  36. package/fesm2022/coercion/private.mjs +2 -18
  37. package/fesm2022/coercion/private.mjs.map +1 -1
  38. package/fesm2022/coercion.mjs +5 -39
  39. package/fesm2022/coercion.mjs.map +1 -1
  40. package/fesm2022/collections.mjs +7 -476
  41. package/fesm2022/collections.mjs.map +1 -1
  42. package/fesm2022/css-pixel-value-286c9a60.mjs +10 -0
  43. package/fesm2022/css-pixel-value-286c9a60.mjs.map +1 -0
  44. package/fesm2022/data-source-5320b6fd.mjs +15 -0
  45. package/fesm2022/data-source-5320b6fd.mjs.map +1 -0
  46. package/fesm2022/dialog.mjs +37 -39
  47. package/fesm2022/dialog.mjs.map +1 -1
  48. package/fesm2022/directionality-7ea26429.mjs +72 -0
  49. package/fesm2022/directionality-7ea26429.mjs.map +1 -0
  50. package/fesm2022/dispose-view-repeater-strategy-b11b87ea.mjs +44 -0
  51. package/fesm2022/dispose-view-repeater-strategy-b11b87ea.mjs.map +1 -0
  52. package/fesm2022/drag-drop.mjs +48 -50
  53. package/fesm2022/drag-drop.mjs.map +1 -1
  54. package/fesm2022/element-705567fe.mjs +29 -0
  55. package/fesm2022/element-705567fe.mjs.map +1 -0
  56. package/fesm2022/fake-event-detection-7055b1bd.mjs +24 -0
  57. package/fesm2022/fake-event-detection-7055b1bd.mjs.map +1 -0
  58. package/fesm2022/focus-key-manager-58d29acd.mjs +22 -0
  59. package/fesm2022/focus-key-manager-58d29acd.mjs.map +1 -0
  60. package/fesm2022/focus-monitor-cebaa0d1.mjs +629 -0
  61. package/fesm2022/focus-monitor-cebaa0d1.mjs.map +1 -0
  62. package/fesm2022/id-generator-fba495fb.mjs +37 -0
  63. package/fesm2022/id-generator-fba495fb.mjs.map +1 -0
  64. package/fesm2022/keycodes-107cd3e4.mjs +122 -0
  65. package/fesm2022/keycodes-107cd3e4.mjs.map +1 -0
  66. package/fesm2022/keycodes.mjs +2 -136
  67. package/fesm2022/keycodes.mjs.map +1 -1
  68. package/fesm2022/layout.mjs +12 -184
  69. package/fesm2022/layout.mjs.map +1 -1
  70. package/fesm2022/list-key-manager-c7b5cefb.mjs +360 -0
  71. package/fesm2022/list-key-manager-c7b5cefb.mjs.map +1 -0
  72. package/fesm2022/listbox.mjs +21 -20
  73. package/fesm2022/listbox.mjs.map +1 -1
  74. package/fesm2022/menu.mjs +76 -60
  75. package/fesm2022/menu.mjs.map +1 -1
  76. package/fesm2022/modifiers-33a5859e.mjs +13 -0
  77. package/fesm2022/modifiers-33a5859e.mjs.map +1 -0
  78. package/fesm2022/observable-97c0792c.mjs +15 -0
  79. package/fesm2022/observable-97c0792c.mjs.map +1 -0
  80. package/fesm2022/observe-content-d2a6b5a0.mjs +210 -0
  81. package/fesm2022/observe-content-d2a6b5a0.mjs.map +1 -0
  82. package/fesm2022/observers/private.mjs +3 -7
  83. package/fesm2022/observers/private.mjs.map +1 -1
  84. package/fesm2022/observers.mjs +5 -213
  85. package/fesm2022/observers.mjs.map +1 -1
  86. package/fesm2022/overlay-module-863b82c9.mjs +3029 -0
  87. package/fesm2022/overlay-module-863b82c9.mjs.map +1 -0
  88. package/fesm2022/overlay.mjs +28 -3019
  89. package/fesm2022/overlay.mjs.map +1 -1
  90. package/fesm2022/passive-listeners-c0bdc49f.mjs +31 -0
  91. package/fesm2022/passive-listeners-c0bdc49f.mjs.map +1 -0
  92. package/fesm2022/platform-1be098b0.mjs +77 -0
  93. package/fesm2022/platform-1be098b0.mjs.map +1 -0
  94. package/fesm2022/platform.mjs +13 -293
  95. package/fesm2022/platform.mjs.map +1 -1
  96. package/fesm2022/portal-directives-c88fea11.mjs +615 -0
  97. package/fesm2022/portal-directives-c88fea11.mjs.map +1 -0
  98. package/fesm2022/portal.mjs +3 -650
  99. package/fesm2022/portal.mjs.map +1 -1
  100. package/fesm2022/private.mjs +3 -63
  101. package/fesm2022/private.mjs.map +1 -1
  102. package/fesm2022/recycle-view-repeater-strategy-c1712813.mjs +156 -0
  103. package/fesm2022/recycle-view-repeater-strategy-c1712813.mjs.map +1 -0
  104. package/fesm2022/scrolling-61955dd1.mjs +99 -0
  105. package/fesm2022/scrolling-61955dd1.mjs.map +1 -0
  106. package/fesm2022/scrolling-module-aa9eeac5.mjs +1463 -0
  107. package/fesm2022/scrolling-module-aa9eeac5.mjs.map +1 -0
  108. package/fesm2022/scrolling.mjs +12 -1463
  109. package/fesm2022/scrolling.mjs.map +1 -1
  110. package/fesm2022/selection-model-30243dba.mjs +221 -0
  111. package/fesm2022/selection-model-30243dba.mjs.map +1 -0
  112. package/fesm2022/shadow-dom-9f403d00.mjs +49 -0
  113. package/fesm2022/shadow-dom-9f403d00.mjs.map +1 -0
  114. package/fesm2022/stepper.mjs +32 -30
  115. package/fesm2022/stepper.mjs.map +1 -1
  116. package/fesm2022/style-loader-e14dc585.mjs +47 -0
  117. package/fesm2022/style-loader-e14dc585.mjs.map +1 -0
  118. package/fesm2022/table.mjs +88 -132
  119. package/fesm2022/table.mjs.map +1 -1
  120. package/fesm2022/test-environment-34eef1ee.mjs +19 -0
  121. package/fesm2022/test-environment-34eef1ee.mjs.map +1 -0
  122. package/fesm2022/testing/selenium-webdriver.mjs +2 -1
  123. package/fesm2022/testing/selenium-webdriver.mjs.map +1 -1
  124. package/fesm2022/testing/testbed.mjs +33 -74
  125. package/fesm2022/testing/testbed.mjs.map +1 -1
  126. package/fesm2022/testing.mjs +2 -697
  127. package/fesm2022/testing.mjs.map +1 -1
  128. package/fesm2022/text-field.mjs +24 -23
  129. package/fesm2022/text-field.mjs.map +1 -1
  130. package/fesm2022/text-filtering-b60ba8a2.mjs +698 -0
  131. package/fesm2022/text-filtering-b60ba8a2.mjs.map +1 -0
  132. package/fesm2022/tree-key-manager-2f20c79c.mjs +360 -0
  133. package/fesm2022/tree-key-manager-2f20c79c.mjs.map +1 -0
  134. package/fesm2022/tree.mjs +33 -33
  135. package/fesm2022/tree.mjs.map +1 -1
  136. package/fesm2022/typeahead-11ae39bd.mjs +88 -0
  137. package/fesm2022/typeahead-11ae39bd.mjs.map +1 -0
  138. package/fesm2022/unique-selection-dispatcher-1d6f91d8.mjs +49 -0
  139. package/fesm2022/unique-selection-dispatcher-1d6f91d8.mjs.map +1 -0
  140. package/fesm2022/visually-hidden-83aea4a0.mjs +18 -0
  141. package/fesm2022/visually-hidden-83aea4a0.mjs.map +1 -0
  142. package/focus-key-manager.d-415a6958.d.ts +33 -0
  143. package/focus-monitor.d-810a02e6.d.ts +209 -0
  144. package/harness-environment.d-4d615248.d.ts +619 -0
  145. package/index.d.ts +2 -2
  146. package/keycodes/index.d.ts +123 -244
  147. package/layout/index.d.ts +23 -25
  148. package/list-key-manager.d-72e9a2e7.d.ts +164 -0
  149. package/listbox/index.d.ts +91 -107
  150. package/menu/index.d.ts +596 -682
  151. package/number-property.d-ce316715.d.ts +15 -0
  152. package/observe-content.d-c08bc882.d.ts +84 -0
  153. package/observers/index.d.ts +4 -90
  154. package/observers/private/index.d.ts +3 -3
  155. package/overlay/index.d.ts +110 -951
  156. package/overlay-module.d-5d06db8a.d.ts +790 -0
  157. package/package.json +1 -1
  158. package/platform/index.d.ts +45 -86
  159. package/platform.d-0a5b4792.d.ts +33 -0
  160. package/portal/index.d.ts +5 -264
  161. package/portal-directives.d-d345bd53.d.ts +210 -0
  162. package/private/index.d.ts +3 -20
  163. package/schematics/ng-add/index.js +1 -1
  164. package/schematics/ng-add/index.mjs +1 -1
  165. package/schematics/ng-update/html-parsing/angular.js +2 -2
  166. package/schematics/ng-update/html-parsing/angular.mjs +2 -2
  167. package/scrolling/index.d.ts +7 -687
  168. package/scrolling-module.d-a08a462d.d.ts +551 -0
  169. package/selection-model.d-1a70542c.d.ts +111 -0
  170. package/stepper/index.d.ts +74 -124
  171. package/style-loader.d-19baab84.d.ts +21 -0
  172. package/table/index.d.ts +329 -453
  173. package/testing/index.d.ts +32 -675
  174. package/testing/selenium-webdriver/index.d.ts +30 -20
  175. package/testing/testbed/index.d.ts +9 -19
  176. package/text-field/index.d.ts +11 -30
  177. package/tree/index.d.ts +205 -271
  178. package/tree-key-manager-strategy.d-603161dd.d.ts +116 -0
  179. package/unique-selection-dispatcher.d-7993b9f5.d.ts +32 -0
  180. package/view-repeater.d-79039e1f.d.ts +88 -0
  181. package/viewport-ruler.d-f3d3e82f.d.ts +57 -0
package/dialog/index.d.ts CHANGED
@@ -1,43 +1,146 @@
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';
13
1
  import * as i0 from '@angular/core';
14
- 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';
2
+ import { ViewContainerRef, Injector, StaticProvider, Type, OnDestroy, ElementRef, NgZone, ChangeDetectorRef, ComponentRef, EmbeddedViewRef, TemplateRef, InjectionToken } from '@angular/core';
3
+ import { F as FocusOrigin } from '../focus-monitor.d-810a02e6.js';
4
+ import { a as FocusTrapFactory, h as A11yModule } from '../a11y-module.d-7d03e079.js';
5
+ import { B as BasePortalOutlet, C as CdkPortalOutlet, a as ComponentPortal, T as TemplatePortal, D as DomPortal, b as ComponentType, P as PortalModule } from '../portal-directives.d-d345bd53.js';
6
+ import { a as Direction } from '../bidi-module.d-f8648621.js';
7
+ import { P as PositionStrategy, S as ScrollStrategy, O as OverlayRef, a as OverlayModule } from '../overlay-module.d-5d06db8a.js';
8
+ import { Observable, Subject } from 'rxjs';
9
+ import * as _angular_cdk_portal from '@angular/cdk/portal';
10
+ import '../observe-content.d-c08bc882.js';
11
+ import '../number-property.d-ce316715.js';
12
+ import '../scrolling-module.d-a08a462d.js';
13
+ import '../data-source.d-7cab2c9d.js';
14
+ import '@angular/common';
15
+ import '../viewport-ruler.d-f3d3e82f.js';
16
+ import '../platform.d-0a5b4792.js';
17
+ import '../style-loader.d-19baab84.js';
32
18
 
33
19
  /** Options for where to set focus to automatically on dialog open */
34
- export declare type AutoFocusTarget = 'dialog' | 'first-tabbable' | 'first-heading';
20
+ type AutoFocusTarget = 'dialog' | 'first-tabbable' | 'first-heading';
21
+ /** Valid ARIA roles for a dialog. */
22
+ type DialogRole = 'dialog' | 'alertdialog';
23
+ /** Configuration for opening a modal dialog. */
24
+ declare class DialogConfig<D = unknown, R = unknown, C extends BasePortalOutlet = BasePortalOutlet> {
25
+ /**
26
+ * Where the attached component should live in Angular's *logical* component tree.
27
+ * This affects what is available for injection and the change detection order for the
28
+ * component instantiated inside of the dialog. This does not affect where the dialog
29
+ * content will be rendered.
30
+ */
31
+ viewContainerRef?: ViewContainerRef;
32
+ /**
33
+ * Injector used for the instantiation of the component to be attached. If provided,
34
+ * takes precedence over the injector indirectly provided by `ViewContainerRef`.
35
+ */
36
+ injector?: Injector;
37
+ /** ID for the dialog. If omitted, a unique one will be generated. */
38
+ id?: string;
39
+ /** The ARIA role of the dialog element. */
40
+ role?: DialogRole;
41
+ /** Optional CSS class or classes applied to the overlay panel. */
42
+ panelClass?: string | string[];
43
+ /** Whether the dialog has a backdrop. */
44
+ hasBackdrop?: boolean;
45
+ /** Optional CSS class or classes applied to the overlay backdrop. */
46
+ backdropClass?: string | string[];
47
+ /** Whether the dialog closes with the escape key or pointer events outside the panel element. */
48
+ disableClose?: boolean;
49
+ /** Width of the dialog. */
50
+ width?: string;
51
+ /** Height of the dialog. */
52
+ height?: string;
53
+ /** Min-width of the dialog. If a number is provided, assumes pixel units. */
54
+ minWidth?: number | string;
55
+ /** Min-height of the dialog. If a number is provided, assumes pixel units. */
56
+ minHeight?: number | string;
57
+ /** Max-width of the dialog. If a number is provided, assumes pixel units. Defaults to 80vw. */
58
+ maxWidth?: number | string;
59
+ /** Max-height of the dialog. If a number is provided, assumes pixel units. */
60
+ maxHeight?: number | string;
61
+ /** Strategy to use when positioning the dialog. Defaults to centering it on the page. */
62
+ positionStrategy?: PositionStrategy;
63
+ /** Data being injected into the child component. */
64
+ data?: D | null;
65
+ /** Layout direction for the dialog's content. */
66
+ direction?: Direction;
67
+ /** ID of the element that describes the dialog. */
68
+ ariaDescribedBy?: string | null;
69
+ /** ID of the element that labels the dialog. */
70
+ ariaLabelledBy?: string | null;
71
+ /** Dialog label applied via `aria-label` */
72
+ ariaLabel?: string | null;
73
+ /**
74
+ * Whether this is a modal dialog. Used to set the `aria-modal` attribute. Off by default,
75
+ * because it can interfere with other overlay-based components (e.g. `mat-select`) and because
76
+ * it is redundant since the dialog marks all outside content as `aria-hidden` anyway.
77
+ */
78
+ ariaModal?: boolean;
79
+ /**
80
+ * Where the dialog should focus on open.
81
+ * @breaking-change 14.0.0 Remove boolean option from autoFocus. Use string or
82
+ * AutoFocusTarget instead.
83
+ */
84
+ autoFocus?: AutoFocusTarget | string | boolean;
85
+ /**
86
+ * Whether the dialog should restore focus to the previously-focused element upon closing.
87
+ * Has the following behavior based on the type that is passed in:
88
+ * - `boolean` - when true, will return focus to the element that was focused before the dialog
89
+ * was opened, otherwise won't restore focus at all.
90
+ * - `string` - focus will be restored to the first element that matches the CSS selector.
91
+ * - `HTMLElement` - focus will be restored to the specific element.
92
+ */
93
+ restoreFocus?: boolean | string | HTMLElement;
94
+ /**
95
+ * Scroll strategy to be used for the dialog. This determines how
96
+ * the dialog responds to scrolling underneath the panel element.
97
+ */
98
+ scrollStrategy?: ScrollStrategy;
99
+ /**
100
+ * Whether the dialog should close when the user navigates backwards or forwards through browser
101
+ * history. This does not apply to navigation via anchor element unless using URL-hash based
102
+ * routing (`HashLocationStrategy` in the Angular router).
103
+ */
104
+ closeOnNavigation?: boolean;
105
+ /**
106
+ * Whether the dialog should close when the dialog service is destroyed. This is useful if
107
+ * another service is wrapping the dialog and is managing the destruction instead.
108
+ */
109
+ closeOnDestroy?: boolean;
110
+ /**
111
+ * Whether the dialog should close when the underlying overlay is detached. This is useful if
112
+ * another service is wrapping the dialog and is managing the destruction instead. E.g. an
113
+ * external detachment can happen as a result of a scroll strategy triggering it or when the
114
+ * browser location changes.
115
+ */
116
+ closeOnOverlayDetachments?: boolean;
117
+ /**
118
+ * Providers that will be exposed to the contents of the dialog. Can also
119
+ * be provided as a function in order to generate the providers lazily.
120
+ */
121
+ providers?: StaticProvider[] | ((dialogRef: R, config: DialogConfig<D, R, C>, container: C) => StaticProvider[]);
122
+ /**
123
+ * Component into which the dialog content will be rendered. Defaults to `CdkDialogContainer`.
124
+ * A configuration object can be passed in to customize the providers that will be exposed
125
+ * to the dialog container.
126
+ */
127
+ container?: Type<C> | {
128
+ type: Type<C>;
129
+ providers: (config: DialogConfig<D, R, C>) => StaticProvider[];
130
+ };
131
+ /**
132
+ * Context that will be passed to template-based dialogs.
133
+ * A function can be passed in to resolve the context lazily.
134
+ */
135
+ templateContext?: Record<string, any> | (() => Record<string, any>);
136
+ }
35
137
 
138
+ declare function throwDialogContentAlreadyAttachedError(): void;
36
139
  /**
37
140
  * Internal component that wraps user-provided dialog content.
38
141
  * @docs-private
39
142
  */
40
- export declare class CdkDialogContainer<C extends DialogConfig = DialogConfig> extends BasePortalOutlet implements OnDestroy {
143
+ declare class CdkDialogContainer<C extends DialogConfig = DialogConfig> extends BasePortalOutlet implements OnDestroy {
41
144
  protected _elementRef: ElementRef<any>;
42
145
  protected _focusTrapFactory: FocusTrapFactory;
43
146
  readonly _config: C;
@@ -129,10 +232,67 @@ export declare class CdkDialogContainer<C extends DialogConfig = DialogConfig> e
129
232
  static ɵcmp: i0.ɵɵComponentDeclaration<CdkDialogContainer<any>, "cdk-dialog-container", never, {}, {}, never, never, true, never>;
130
233
  }
131
234
 
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>>;
235
+ /** Additional options that can be passed in when closing a dialog. */
236
+ interface DialogCloseOptions {
237
+ /** Focus original to use when restoring focus. */
238
+ focusOrigin?: FocusOrigin;
239
+ }
240
+ /**
241
+ * Reference to a dialog opened via the Dialog service.
242
+ */
243
+ declare class DialogRef<R = unknown, C = unknown> {
244
+ readonly overlayRef: OverlayRef;
245
+ readonly config: DialogConfig<any, DialogRef<R, C>, BasePortalOutlet>;
246
+ /**
247
+ * Instance of component opened into the dialog. Will be
248
+ * null when the dialog is opened using a `TemplateRef`.
249
+ */
250
+ readonly componentInstance: C | null;
251
+ /**
252
+ * `ComponentRef` of the component opened into the dialog. Will be
253
+ * null when the dialog is opened using a `TemplateRef`.
254
+ */
255
+ readonly componentRef: ComponentRef<C> | null;
256
+ /** Instance of the container that is rendering out the dialog content. */
257
+ readonly containerInstance: BasePortalOutlet & {
258
+ _closeInteractionType?: FocusOrigin;
259
+ };
260
+ /** Whether the user is allowed to close the dialog. */
261
+ disableClose: boolean | undefined;
262
+ /** Emits when the dialog has been closed. */
263
+ readonly closed: Observable<R | undefined>;
264
+ /** Emits when the backdrop of the dialog is clicked. */
265
+ readonly backdropClick: Observable<MouseEvent>;
266
+ /** Emits when on keyboard events within the dialog. */
267
+ readonly keydownEvents: Observable<KeyboardEvent>;
268
+ /** Emits on pointer events that happen outside of the dialog. */
269
+ readonly outsidePointerEvents: Observable<MouseEvent>;
270
+ /** Unique ID for the dialog. */
271
+ readonly id: string;
272
+ /** Subscription to external detachments of the dialog. */
273
+ private _detachSubscription;
274
+ constructor(overlayRef: OverlayRef, config: DialogConfig<any, DialogRef<R, C>, BasePortalOutlet>);
275
+ /**
276
+ * Close the dialog.
277
+ * @param result Optional result to return to the dialog opener.
278
+ * @param options Additional options to customize the closing behavior.
279
+ */
280
+ close(result?: R, options?: DialogCloseOptions): void;
281
+ /** Updates the position of the dialog based on the current position strategy. */
282
+ updatePosition(): this;
283
+ /**
284
+ * Updates the dialog's width and height.
285
+ * @param width New width of the dialog.
286
+ * @param height New height of the dialog.
287
+ */
288
+ updateSize(width?: string | number, height?: string | number): this;
289
+ /** Add a CSS class or an array of classes to the overlay pane. */
290
+ addPanelClass(classes: string | string[]): this;
291
+ /** Remove a CSS class or an array of classes from the overlay pane. */
292
+ removePanelClass(classes: string | string[]): this;
293
+ }
134
294
 
135
- export declare class Dialog implements OnDestroy {
295
+ declare class Dialog implements OnDestroy {
136
296
  private _overlay;
137
297
  private _injector;
138
298
  private _defaultOptions;
@@ -225,222 +385,17 @@ export declare class Dialog implements OnDestroy {
225
385
  static ɵprov: i0.ɵɵInjectableDeclaration<Dialog>;
226
386
  }
227
387
 
228
- /** Injection token for the Dialog's Data. */
229
- export declare const DIALOG_DATA: InjectionToken<any>;
230
-
231
- /** Injection token for the Dialog's ScrollStrategy. */
232
- export declare const DIALOG_SCROLL_STRATEGY: InjectionToken<() => ScrollStrategy>;
233
-
234
- /**
235
- * @docs-private
236
- * @deprecated No longer used. To be removed.
237
- * @breaking-change 19.0.0
238
- */
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
-
245
- /**
246
- * @docs-private
247
- * @deprecated No longer used. To be removed.
248
- * @breaking-change 19.0.0
249
- */
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
- * Providers that will be exposed to the contents of the dialog. Can also
354
- * be provided as a function in order to generate the providers lazily.
355
- */
356
- providers?: StaticProvider[] | ((dialogRef: R, config: DialogConfig<D, R, C>, container: C) => StaticProvider[]);
357
- /**
358
- * Component into which the dialog content will be rendered. Defaults to `CdkDialogContainer`.
359
- * A configuration object can be passed in to customize the providers that will be exposed
360
- * to the dialog container.
361
- */
362
- container?: Type<C> | {
363
- type: Type<C>;
364
- providers: (config: DialogConfig<D, R, C>) => StaticProvider[];
365
- };
366
- /**
367
- * Context that will be passed to template-based dialogs.
368
- * A function can be passed in to resolve the context lazily.
369
- */
370
- templateContext?: Record<string, any> | (() => Record<string, any>);
371
- }
372
-
373
- export declare class DialogModule {
388
+ declare class DialogModule {
374
389
  static ɵfac: i0.ɵɵFactoryDeclaration<DialogModule, never>;
375
- static ɵmod: i0.ɵɵNgModuleDeclaration<DialogModule, never, [typeof i1.OverlayModule, typeof i2.PortalModule, typeof i3.A11yModule, typeof i4.CdkDialogContainer], [typeof i2.PortalModule, typeof i4.CdkDialogContainer]>;
390
+ static ɵmod: i0.ɵɵNgModuleDeclaration<DialogModule, never, [typeof OverlayModule, typeof PortalModule, typeof A11yModule, typeof CdkDialogContainer], [typeof PortalModule, typeof CdkDialogContainer]>;
376
391
  static ɵinj: i0.ɵɵInjectorDeclaration<DialogModule>;
377
392
  }
378
393
 
379
- /**
380
- * Reference to a dialog opened via the Dialog service.
381
- */
382
- export declare class DialogRef<R = unknown, C = unknown> {
383
- readonly overlayRef: OverlayRef;
384
- readonly config: DialogConfig<any, DialogRef<R, C>, BasePortalOutlet>;
385
- /**
386
- * Instance of component opened into the dialog. Will be
387
- * null when the dialog is opened using a `TemplateRef`.
388
- */
389
- readonly componentInstance: C | null;
390
- /**
391
- * `ComponentRef` of the component opened into the dialog. Will be
392
- * null when the dialog is opened using a `TemplateRef`.
393
- */
394
- readonly componentRef: ComponentRef<C> | null;
395
- /** Instance of the container that is rendering out the dialog content. */
396
- readonly containerInstance: BasePortalOutlet & {
397
- _closeInteractionType?: FocusOrigin;
398
- };
399
- /** Whether the user is allowed to close the dialog. */
400
- disableClose: boolean | undefined;
401
- /** Emits when the dialog has been closed. */
402
- readonly closed: Observable<R | undefined>;
403
- /** Emits when the backdrop of the dialog is clicked. */
404
- readonly backdropClick: Observable<MouseEvent>;
405
- /** Emits when on keyboard events within the dialog. */
406
- readonly keydownEvents: Observable<KeyboardEvent>;
407
- /** Emits on pointer events that happen outside of the dialog. */
408
- readonly outsidePointerEvents: Observable<MouseEvent>;
409
- /** Unique ID for the dialog. */
410
- readonly id: string;
411
- /** Subscription to external detachments of the dialog. */
412
- private _detachSubscription;
413
- constructor(overlayRef: OverlayRef, config: DialogConfig<any, DialogRef<R, C>, BasePortalOutlet>);
414
- /**
415
- * Close the dialog.
416
- * @param result Optional result to return to the dialog opener.
417
- * @param options Additional options to customize the closing behavior.
418
- */
419
- close(result?: R, options?: DialogCloseOptions): void;
420
- /** Updates the position of the dialog based on the current position strategy. */
421
- updatePosition(): this;
422
- /**
423
- * Updates the dialog's width and height.
424
- * @param width New width of the dialog.
425
- * @param height New height of the dialog.
426
- */
427
- updateSize(width?: string | number, height?: string | number): this;
428
- /** Add a CSS class or an array of classes to the overlay pane. */
429
- addPanelClass(classes: string | string[]): this;
430
- /** Remove a CSS class or an array of classes from the overlay pane. */
431
- removePanelClass(classes: string | string[]): this;
432
- }
433
-
434
- /** Valid ARIA roles for a dialog. */
435
- export declare type DialogRole = 'dialog' | 'alertdialog';
436
-
437
- declare namespace i4 {
438
- export {
439
- throwDialogContentAlreadyAttachedError,
440
- CdkDialogContainer
441
- }
442
- }
443
-
444
- export declare function throwDialogContentAlreadyAttachedError(): void;
394
+ /** Injection token for the Dialog's ScrollStrategy. */
395
+ declare const DIALOG_SCROLL_STRATEGY: InjectionToken<() => ScrollStrategy>;
396
+ /** Injection token for the Dialog's Data. */
397
+ declare const DIALOG_DATA: InjectionToken<any>;
398
+ /** Injection token that can be used to provide default options for the dialog module. */
399
+ declare const DEFAULT_DIALOG_CONFIG: InjectionToken<DialogConfig<unknown, unknown, _angular_cdk_portal.BasePortalOutlet>>;
445
400
 
446
- export { }
401
+ export { type AutoFocusTarget, CdkDialogContainer, DEFAULT_DIALOG_CONFIG, DIALOG_DATA, DIALOG_SCROLL_STRATEGY, Dialog, type DialogCloseOptions, DialogConfig, DialogModule, DialogRef, type DialogRole, throwDialogContentAlreadyAttachedError };