@angular/material 19.2.2 → 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 (194) hide show
  1. package/autocomplete/index.d.ts +83 -124
  2. package/autocomplete/testing/index.d.ts +5 -11
  3. package/badge/index.d.ts +17 -30
  4. package/badge/testing/index.d.ts +5 -8
  5. package/bottom-sheet/index.d.ts +88 -103
  6. package/bottom-sheet/testing/index.d.ts +4 -6
  7. package/button/index.d.ts +109 -148
  8. package/button/testing/index.d.ts +6 -10
  9. package/button-toggle/index.d.ts +116 -142
  10. package/button-toggle/testing/index.d.ts +34 -36
  11. package/card/index.d.ts +79 -117
  12. package/card/testing/index.d.ts +11 -15
  13. package/checkbox/index.d.ts +55 -85
  14. package/checkbox/testing/index.d.ts +6 -10
  15. package/chips/index.d.ts +592 -690
  16. package/chips/testing/index.d.ts +78 -93
  17. package/core/index.d.ts +565 -669
  18. package/core/testing/index.d.ts +28 -32
  19. package/datepicker/index.d.ts +1323 -1479
  20. package/datepicker/testing/index.d.ts +109 -119
  21. package/dialog/index.d.ts +194 -246
  22. package/dialog/testing/index.d.ts +17 -26
  23. package/divider/index.d.ts +4 -10
  24. package/divider/testing/index.d.ts +4 -6
  25. package/expansion/index.d.ts +137 -189
  26. package/expansion/testing/index.d.ts +25 -31
  27. package/fesm2022/autocomplete/testing.mjs.map +1 -1
  28. package/fesm2022/autocomplete.mjs +26 -17
  29. package/fesm2022/autocomplete.mjs.map +1 -1
  30. package/fesm2022/badge/testing.mjs.map +1 -1
  31. package/fesm2022/badge.mjs +3 -7
  32. package/fesm2022/badge.mjs.map +1 -1
  33. package/fesm2022/bottom-sheet/testing.mjs.map +1 -1
  34. package/fesm2022/bottom-sheet.mjs +0 -4
  35. package/fesm2022/bottom-sheet.mjs.map +1 -1
  36. package/fesm2022/button/testing.mjs.map +1 -1
  37. package/fesm2022/button-toggle/testing.mjs.map +1 -1
  38. package/fesm2022/button-toggle.mjs +5 -4
  39. package/fesm2022/button-toggle.mjs.map +1 -1
  40. package/fesm2022/button.mjs +6 -6
  41. package/fesm2022/button.mjs.map +1 -1
  42. package/fesm2022/card/testing.mjs.map +1 -1
  43. package/fesm2022/card.mjs +0 -4
  44. package/fesm2022/card.mjs.map +1 -1
  45. package/fesm2022/checkbox/testing.mjs.map +1 -1
  46. package/fesm2022/checkbox.mjs +5 -5
  47. package/fesm2022/checkbox.mjs.map +1 -1
  48. package/fesm2022/chips/testing.mjs.map +1 -1
  49. package/fesm2022/chips.mjs +0 -4
  50. package/fesm2022/chips.mjs.map +1 -1
  51. package/fesm2022/core/testing.mjs.map +1 -1
  52. package/fesm2022/core.mjs +7 -7
  53. package/fesm2022/core.mjs.map +1 -1
  54. package/fesm2022/datepicker/testing.mjs.map +1 -1
  55. package/fesm2022/datepicker.mjs +42 -18
  56. package/fesm2022/datepicker.mjs.map +1 -1
  57. package/fesm2022/dialog/testing.mjs.map +1 -1
  58. package/fesm2022/dialog.mjs +4 -8
  59. package/fesm2022/dialog.mjs.map +1 -1
  60. package/fesm2022/divider/testing.mjs.map +1 -1
  61. package/fesm2022/divider.mjs +0 -4
  62. package/fesm2022/divider.mjs.map +1 -1
  63. package/fesm2022/expansion/testing.mjs.map +1 -1
  64. package/fesm2022/expansion.mjs +2 -6
  65. package/fesm2022/expansion.mjs.map +1 -1
  66. package/fesm2022/form-field/testing.mjs +0 -2
  67. package/fesm2022/form-field/testing.mjs.map +1 -1
  68. package/fesm2022/form-field.mjs +0 -4
  69. package/fesm2022/form-field.mjs.map +1 -1
  70. package/fesm2022/grid-list/testing.mjs.map +1 -1
  71. package/fesm2022/grid-list.mjs +0 -4
  72. package/fesm2022/grid-list.mjs.map +1 -1
  73. package/fesm2022/icon/testing.mjs +0 -4
  74. package/fesm2022/icon/testing.mjs.map +1 -1
  75. package/fesm2022/icon.mjs +15 -7
  76. package/fesm2022/icon.mjs.map +1 -1
  77. package/fesm2022/input/testing.mjs.map +1 -1
  78. package/fesm2022/input.mjs +0 -4
  79. package/fesm2022/input.mjs.map +1 -1
  80. package/fesm2022/list/testing.mjs +1 -1
  81. package/fesm2022/list/testing.mjs.map +1 -1
  82. package/fesm2022/list.mjs +2 -6
  83. package/fesm2022/list.mjs.map +1 -1
  84. package/fesm2022/menu/testing.mjs.map +1 -1
  85. package/fesm2022/menu.mjs +15 -7
  86. package/fesm2022/menu.mjs.map +1 -1
  87. package/fesm2022/paginator/testing.mjs.map +1 -1
  88. package/fesm2022/paginator.mjs +10 -6
  89. package/fesm2022/paginator.mjs.map +1 -1
  90. package/fesm2022/progress-bar/testing.mjs +0 -4
  91. package/fesm2022/progress-bar/testing.mjs.map +1 -1
  92. package/fesm2022/progress-bar.mjs +5 -5
  93. package/fesm2022/progress-bar.mjs.map +1 -1
  94. package/fesm2022/progress-spinner/testing.mjs +0 -4
  95. package/fesm2022/progress-spinner/testing.mjs.map +1 -1
  96. package/fesm2022/progress-spinner.mjs +5 -5
  97. package/fesm2022/progress-spinner.mjs.map +1 -1
  98. package/fesm2022/radio/testing.mjs.map +1 -1
  99. package/fesm2022/radio.mjs +5 -4
  100. package/fesm2022/radio.mjs.map +1 -1
  101. package/fesm2022/select/testing.mjs.map +1 -1
  102. package/fesm2022/select.mjs +14 -10
  103. package/fesm2022/select.mjs.map +1 -1
  104. package/fesm2022/sidenav/testing.mjs +1 -1
  105. package/fesm2022/sidenav/testing.mjs.map +1 -1
  106. package/fesm2022/sidenav.mjs +9 -9
  107. package/fesm2022/sidenav.mjs.map +1 -1
  108. package/fesm2022/slide-toggle/testing.mjs.map +1 -1
  109. package/fesm2022/slide-toggle.mjs +0 -4
  110. package/fesm2022/slide-toggle.mjs.map +1 -1
  111. package/fesm2022/slider/testing.mjs.map +1 -1
  112. package/fesm2022/slider.mjs +0 -4
  113. package/fesm2022/slider.mjs.map +1 -1
  114. package/fesm2022/snack-bar/testing.mjs.map +1 -1
  115. package/fesm2022/snack-bar.mjs +5 -5
  116. package/fesm2022/snack-bar.mjs.map +1 -1
  117. package/fesm2022/sort/testing.mjs.map +1 -1
  118. package/fesm2022/sort.mjs +10 -6
  119. package/fesm2022/sort.mjs.map +1 -1
  120. package/fesm2022/stepper/testing.mjs.map +1 -1
  121. package/fesm2022/stepper.mjs +10 -6
  122. package/fesm2022/stepper.mjs.map +1 -1
  123. package/fesm2022/table/testing.mjs.map +1 -1
  124. package/fesm2022/table.mjs +0 -4
  125. package/fesm2022/table.mjs.map +1 -1
  126. package/fesm2022/tabs/testing.mjs.map +1 -1
  127. package/fesm2022/tabs.mjs +8 -15
  128. package/fesm2022/tabs.mjs.map +1 -1
  129. package/fesm2022/timepicker/testing.mjs.map +1 -1
  130. package/fesm2022/timepicker.mjs +1 -5
  131. package/fesm2022/timepicker.mjs.map +1 -1
  132. package/fesm2022/toolbar/testing.mjs.map +1 -1
  133. package/fesm2022/toolbar.mjs +0 -4
  134. package/fesm2022/toolbar.mjs.map +1 -1
  135. package/fesm2022/tooltip/testing.mjs.map +1 -1
  136. package/fesm2022/tooltip.mjs +15 -7
  137. package/fesm2022/tooltip.mjs.map +1 -1
  138. package/fesm2022/tree/testing.mjs.map +1 -1
  139. package/fesm2022/tree.mjs +0 -4
  140. package/fesm2022/tree.mjs.map +1 -1
  141. package/form-field/index.d.ts +251 -318
  142. package/form-field/testing/control/index.d.ts +2 -2
  143. package/form-field/testing/index.d.ts +14 -21
  144. package/grid-list/index.d.ts +124 -150
  145. package/grid-list/testing/index.d.ts +39 -44
  146. package/icon/index.d.ts +87 -108
  147. package/icon/testing/index.d.ts +38 -43
  148. package/index.d.ts +2 -3
  149. package/input/index.d.ts +27 -61
  150. package/input/testing/index.d.ts +16 -19
  151. package/list/index.d.ts +158 -241
  152. package/list/testing/index.d.ts +157 -179
  153. package/menu/index.d.ts +180 -231
  154. package/menu/testing/index.d.ts +17 -23
  155. package/package.json +2 -2
  156. package/paginator/index.d.ts +84 -97
  157. package/paginator/testing/index.d.ts +10 -14
  158. package/progress-bar/index.d.ts +38 -58
  159. package/progress-bar/testing/index.d.ts +7 -10
  160. package/progress-spinner/index.d.ts +38 -51
  161. package/progress-spinner/testing/index.d.ts +7 -10
  162. package/radio/index.d.ts +145 -168
  163. package/radio/testing/index.d.ts +61 -67
  164. package/schematics/ng-add/index.js +1 -1
  165. package/schematics/ng-add/index.mjs +1 -1
  166. package/schematics/ng-generate/theme-color/index_bundled.js +2 -2
  167. package/schematics/ng-generate/theme-color/schema.json +10 -0
  168. package/schematics/ng-update/index_bundled.js +31 -31
  169. package/select/index.d.ts +77 -130
  170. package/select/testing/index.d.ts +10 -15
  171. package/sidenav/index.d.ts +47 -91
  172. package/sidenav/testing/index.d.ts +58 -63
  173. package/slide-toggle/index.d.ts +51 -84
  174. package/slide-toggle/testing/index.d.ts +17 -21
  175. package/slider/index.d.ts +277 -327
  176. package/slider/testing/index.d.ts +42 -47
  177. package/snack-bar/index.d.ts +147 -185
  178. package/snack-bar/testing/index.d.ts +7 -9
  179. package/sort/index.d.ts +94 -124
  180. package/sort/testing/index.d.ts +21 -24
  181. package/stepper/index.d.ts +108 -165
  182. package/stepper/testing/index.d.ts +43 -52
  183. package/table/index.d.ts +87 -153
  184. package/table/testing/index.d.ts +64 -78
  185. package/tabs/index.d.ts +306 -382
  186. package/tabs/testing/index.d.ts +67 -76
  187. package/timepicker/index.d.ts +123 -159
  188. package/timepicker/testing/index.d.ts +20 -26
  189. package/toolbar/index.d.ts +13 -25
  190. package/toolbar/testing/index.d.ts +13 -16
  191. package/tooltip/index.d.ts +88 -117
  192. package/tooltip/testing/index.d.ts +7 -10
  193. package/tree/index.d.ts +116 -163
  194. package/tree/testing/index.d.ts +52 -58
package/dialog/index.d.ts CHANGED
@@ -1,59 +1,23 @@
1
- import { CdkDialogContainer } from '@angular/cdk/dialog';
2
- import { ComponentPortal } from '@angular/cdk/portal';
3
- import { ComponentRef } from '@angular/core';
4
- import { ComponentType } from '@angular/cdk/overlay';
5
- import { Dialog } from '@angular/cdk/dialog';
6
- import { DialogRef } from '@angular/cdk/dialog';
1
+ import * as i2$1 from '@angular/cdk/overlay';
2
+ import { ScrollStrategy, Overlay, ComponentType } from '@angular/cdk/overlay';
3
+ import * as i0 from '@angular/core';
4
+ import { ViewContainerRef, Injector, OnDestroy, EventEmitter, ComponentRef, InjectionToken, TemplateRef, OnInit, OnChanges, SimpleChanges } from '@angular/core';
7
5
  import { Direction } from '@angular/cdk/bidi';
8
- import { EventEmitter } from '@angular/core';
9
6
  import { FocusOrigin } from '@angular/cdk/a11y';
10
- import * as i0 from '@angular/core';
11
- import * as i1 from '@angular/cdk/scrolling';
12
- import * as i1_2 from '@angular/cdk/dialog';
13
- import * as i2 from '@angular/cdk/overlay';
7
+ import { Observable, Subject } from 'rxjs';
8
+ import * as i1 from '@angular/cdk/dialog';
9
+ import { CdkDialogContainer, DialogRef, Dialog } from '@angular/cdk/dialog';
14
10
  import * as i3 from '@angular/cdk/portal';
15
- import * as i4 from '@angular/material/core';
16
- import { InjectionToken } from '@angular/core';
17
- import { Injector } from '@angular/core';
18
- import { Observable } from 'rxjs';
19
- import { OnChanges } from '@angular/core';
20
- import { OnDestroy } from '@angular/core';
21
- import { OnInit } from '@angular/core';
22
- import { Overlay } from '@angular/cdk/overlay';
23
- import { ScrollStrategy } from '@angular/cdk/overlay';
24
- import { SimpleChanges } from '@angular/core';
25
- import { Subject } from 'rxjs';
26
- import { TemplateRef } from '@angular/core';
27
- import { ViewContainerRef } from '@angular/core';
11
+ import { ComponentPortal } from '@angular/cdk/portal';
12
+ import * as i2 from '@angular/cdk/scrolling';
13
+ import * as i1$1 from '@angular/material/core';
28
14
 
29
15
  /** Options for where to set focus to automatically on dialog open */
30
- export declare type AutoFocusTarget = 'dialog' | 'first-tabbable' | 'first-heading';
31
-
32
- /** Duration of the closing animation in milliseconds. */
33
- declare const CLOSE_ANIMATION_DURATION = 75;
34
-
35
- /**
36
- * Closes the dialog with the specified interaction type. This is currently not part of
37
- * `MatDialogRef` as that would conflict with custom dialog ref mocks provided in tests.
38
- * More details. See: https://github.com/angular/components/pull/9257#issuecomment-651342226.
39
- */
40
- export declare function _closeDialogVia<R>(ref: MatDialogRef<R>, interactionType: FocusOrigin, result?: R): void;
41
-
42
- /**
43
- * Default parameters for the animation for backwards compatibility.
44
- * @docs-private
45
- * @deprecated Will stop being exported.
46
- * @breaking-change 21.0.0
47
- */
48
- export declare const _defaultParams: {
49
- params: {
50
- enterAnimationDuration: string;
51
- exitAnimationDuration: string;
52
- };
53
- };
54
-
16
+ type AutoFocusTarget = 'dialog' | 'first-tabbable' | 'first-heading';
17
+ /** Valid ARIA roles for a dialog element. */
18
+ type DialogRole = 'dialog' | 'alertdialog';
55
19
  /** Possible overrides for a dialog's position. */
56
- export declare interface DialogPosition {
20
+ interface DialogPosition {
57
21
  /** Override for the dialog's top position. */
58
22
  top?: string;
59
23
  /** Override for the dialog's bottom position. */
@@ -63,170 +27,10 @@ export declare interface DialogPosition {
63
27
  /** Override for the dialog's right position. */
64
28
  right?: string;
65
29
  }
66
-
67
- /** Valid ARIA roles for a dialog element. */
68
- export declare type DialogRole = 'dialog' | 'alertdialog';
69
-
70
- declare namespace i5 {
71
- export {
72
- OPEN_ANIMATION_DURATION,
73
- CLOSE_ANIMATION_DURATION,
74
- MatDialogContainer
75
- }
76
- }
77
-
78
- declare namespace i6 {
79
- export {
80
- MatDialogClose,
81
- MatDialogLayoutSection,
82
- MatDialogTitle,
83
- MatDialogContent,
84
- MatDialogActions
85
- }
86
- }
87
-
88
- /** Event that captures the state of dialog container animations. */
89
- declare interface LegacyDialogAnimationEvent {
90
- state: 'opened' | 'opening' | 'closing' | 'closed';
91
- totalTime: number;
92
- }
93
-
94
- /** Injection token that can be used to access the data that was passed in to a dialog. */
95
- export declare const MAT_DIALOG_DATA: InjectionToken<any>;
96
-
97
- /** Injection token that can be used to specify default dialog options. */
98
- export declare const MAT_DIALOG_DEFAULT_OPTIONS: InjectionToken<MatDialogConfig<any>>;
99
-
100
- /** Injection token that determines the scroll handling while the dialog is open. */
101
- export declare const MAT_DIALOG_SCROLL_STRATEGY: InjectionToken<() => ScrollStrategy>;
102
-
103
- /**
104
- * @docs-private
105
- * @deprecated No longer used. To be removed.
106
- * @breaking-change 19.0.0
107
- */
108
- export declare const MAT_DIALOG_SCROLL_STRATEGY_PROVIDER: {
109
- provide: InjectionToken<() => ScrollStrategy>;
110
- deps: (typeof Overlay)[];
111
- useFactory: typeof MAT_DIALOG_SCROLL_STRATEGY_PROVIDER_FACTORY;
112
- };
113
-
114
- /**
115
- * @docs-private
116
- * @deprecated No longer used. To be removed.
117
- * @breaking-change 19.0.0
118
- */
119
- export declare function MAT_DIALOG_SCROLL_STRATEGY_PROVIDER_FACTORY(overlay: Overlay): () => ScrollStrategy;
120
-
121
- /**
122
- * Service to open Material Design modal dialogs.
123
- */
124
- export declare class MatDialog implements OnDestroy {
125
- private _overlay;
126
- private _defaultOptions;
127
- private _scrollStrategy;
128
- private _parentDialog;
129
- private _idGenerator;
130
- protected _dialog: Dialog;
131
- private readonly _openDialogsAtThisLevel;
132
- private readonly _afterAllClosedAtThisLevel;
133
- private readonly _afterOpenedAtThisLevel;
134
- protected dialogConfigClass: typeof MatDialogConfig;
135
- private readonly _dialogRefConstructor;
136
- private readonly _dialogContainerType;
137
- private readonly _dialogDataToken;
138
- /** Keeps track of the currently-open dialogs. */
139
- get openDialogs(): MatDialogRef<any>[];
140
- /** Stream that emits when a dialog has been opened. */
141
- get afterOpened(): Subject<MatDialogRef<any>>;
142
- private _getAfterAllClosed;
143
- /**
144
- * Stream that emits when all open dialog have finished closing.
145
- * Will emit on subscribe if there are no open dialogs to begin with.
146
- */
147
- readonly afterAllClosed: Observable<void>;
148
- constructor(...args: unknown[]);
149
- /**
150
- * Opens a modal dialog containing the given component.
151
- * @param component Type of the component to load into the dialog.
152
- * @param config Extra configuration options.
153
- * @returns Reference to the newly-opened dialog.
154
- */
155
- open<T, D = any, R = any>(component: ComponentType<T>, config?: MatDialogConfig<D>): MatDialogRef<T, R>;
156
- /**
157
- * Opens a modal dialog containing the given template.
158
- * @param template TemplateRef to instantiate as the dialog content.
159
- * @param config Extra configuration options.
160
- * @returns Reference to the newly-opened dialog.
161
- */
162
- open<T, D = any, R = any>(template: TemplateRef<T>, config?: MatDialogConfig<D>): MatDialogRef<T, R>;
163
- open<T, D = any, R = any>(template: ComponentType<T> | TemplateRef<T>, config?: MatDialogConfig<D>): MatDialogRef<T, R>;
164
- /**
165
- * Closes all of the currently-open dialogs.
166
- */
167
- closeAll(): void;
168
- /**
169
- * Finds an open dialog by its id.
170
- * @param id ID to use when looking up the dialog.
171
- */
172
- getDialogById(id: string): MatDialogRef<any> | undefined;
173
- ngOnDestroy(): void;
174
- private _closeDialogs;
175
- static ɵfac: i0.ɵɵFactoryDeclaration<MatDialog, never>;
176
- static ɵprov: i0.ɵɵInjectableDeclaration<MatDialog>;
177
- }
178
-
179
- /**
180
- * Container for the bottom action buttons in a dialog.
181
- * Stays fixed to the bottom when scrolling.
182
- */
183
- export declare class MatDialogActions extends MatDialogLayoutSection {
184
- /**
185
- * Horizontal alignment of action buttons.
186
- */
187
- align?: 'start' | 'center' | 'end';
188
- protected _onAdd(): void;
189
- protected _onRemove(): void;
190
- static ɵfac: i0.ɵɵFactoryDeclaration<MatDialogActions, never>;
191
- static ɵdir: i0.ɵɵDirectiveDeclaration<MatDialogActions, "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", never, { "align": { "alias": "align"; "required": false; }; }, {}, never, never, true, never>;
192
- }
193
-
194
- /**
195
- * Animations used by MatDialog.
196
- * @docs-private
197
- * @deprecated No longer used, will be removed.
198
- * @breaking-change 21.0.0
199
- */
200
- export declare const matDialogAnimations: {
201
- readonly dialogContainer: any;
202
- };
203
-
204
- /**
205
- * Button that will close the current dialog.
206
- */
207
- export declare class MatDialogClose implements OnInit, OnChanges {
208
- dialogRef: MatDialogRef<any, any>;
209
- private _elementRef;
210
- private _dialog;
211
- /** Screen-reader label for the button. */
212
- ariaLabel: string;
213
- /** Default to "button" to prevents accidental form submits. */
214
- type: 'submit' | 'button' | 'reset';
215
- /** Dialog close input. */
216
- dialogResult: any;
217
- _matDialogClose: any;
218
- constructor(...args: unknown[]);
219
- ngOnInit(): void;
220
- ngOnChanges(changes: SimpleChanges): void;
221
- _onButtonClick(event: MouseEvent): void;
222
- static ɵfac: i0.ɵɵFactoryDeclaration<MatDialogClose, never>;
223
- 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, true, never>;
224
- }
225
-
226
30
  /**
227
31
  * Configuration for opening a modal dialog with the MatDialog service.
228
32
  */
229
- export declare class MatDialogConfig<D = any> {
33
+ declare class MatDialogConfig<D = any> {
230
34
  /**
231
35
  * Where the attached component should live in Angular's *logical* component tree.
232
36
  * This affects what is available for injection and the change detection order for the
@@ -322,7 +126,12 @@ export declare class MatDialogConfig<D = any> {
322
126
  exitAnimationDuration?: string | number;
323
127
  }
324
128
 
325
- export declare class MatDialogContainer extends CdkDialogContainer<MatDialogConfig> implements OnDestroy {
129
+ /** Event that captures the state of dialog container animations. */
130
+ interface LegacyDialogAnimationEvent {
131
+ state: 'opened' | 'opening' | 'closing' | 'closed';
132
+ totalTime: number;
133
+ }
134
+ declare class MatDialogContainer extends CdkDialogContainer<MatDialogConfig> implements OnDestroy {
326
135
  private _animationMode;
327
136
  /** Emits when an animation state changes. */
328
137
  _animationStateChanged: EventEmitter<LegacyDialogAnimationEvent>;
@@ -378,37 +187,17 @@ export declare class MatDialogContainer extends CdkDialogContainer<MatDialogConf
378
187
  static ɵcmp: i0.ɵɵComponentDeclaration<MatDialogContainer, "mat-dialog-container", never, {}, {}, never, never, true, never>;
379
188
  }
380
189
 
381
- /**
382
- * Scrollable content container of a dialog.
383
- */
384
- export declare class MatDialogContent {
385
- static ɵfac: i0.ɵɵFactoryDeclaration<MatDialogContent, never>;
386
- static ɵdir: i0.ɵɵDirectiveDeclaration<MatDialogContent, "[mat-dialog-content], mat-dialog-content, [matDialogContent]", never, {}, {}, never, never, true, [{ directive: typeof i1.CdkScrollable; inputs: {}; outputs: {}; }]>;
387
- }
190
+ /** Possible states of the lifecycle of a dialog. */
388
191
 
389
- declare abstract class MatDialogLayoutSection implements OnInit, OnDestroy {
390
- protected _dialogRef: MatDialogRef<any, any>;
391
- private _elementRef;
392
- private _dialog;
393
- constructor(...args: unknown[]);
394
- protected abstract _onAdd(): void;
395
- protected abstract _onRemove(): void;
396
- ngOnInit(): void;
397
- ngOnDestroy(): void;
398
- static ɵfac: i0.ɵɵFactoryDeclaration<MatDialogLayoutSection, never>;
399
- static ɵdir: i0.ɵɵDirectiveDeclaration<MatDialogLayoutSection, never, never, {}, {}, never, never, true, never>;
400
- }
401
-
402
- export declare class MatDialogModule {
403
- static ɵfac: i0.ɵɵFactoryDeclaration<MatDialogModule, never>;
404
- static ɵmod: i0.ɵɵNgModuleDeclaration<MatDialogModule, never, [typeof i1_2.DialogModule, typeof i2.OverlayModule, typeof i3.PortalModule, typeof i4.MatCommonModule, typeof i5.MatDialogContainer, typeof i6.MatDialogClose, typeof i6.MatDialogTitle, typeof i6.MatDialogActions, typeof i6.MatDialogContent], [typeof i4.MatCommonModule, typeof i5.MatDialogContainer, typeof i6.MatDialogClose, typeof i6.MatDialogTitle, typeof i6.MatDialogActions, typeof i6.MatDialogContent]>;
405
- static ɵinj: i0.ɵɵInjectorDeclaration<MatDialogModule>;
192
+ declare enum MatDialogState {
193
+ OPEN = 0,
194
+ CLOSING = 1,
195
+ CLOSED = 2
406
196
  }
407
-
408
197
  /**
409
198
  * Reference to a dialog opened via the MatDialog service.
410
199
  */
411
- export declare class MatDialogRef<T, R = any> {
200
+ declare class MatDialogRef<T, R = any> {
412
201
  private _ref;
413
202
  _containerInstance: MatDialogContainer;
414
203
  /** The instance of component opened into the dialog. */
@@ -483,25 +272,184 @@ export declare class MatDialogRef<T, R = any> {
483
272
  */
484
273
  private _finishDialogClose;
485
274
  }
275
+ /**
276
+ * Closes the dialog with the specified interaction type. This is currently not part of
277
+ * `MatDialogRef` as that would conflict with custom dialog ref mocks provided in tests.
278
+ * More details. See: https://github.com/angular/components/pull/9257#issuecomment-651342226.
279
+ */
280
+ declare function _closeDialogVia<R>(ref: MatDialogRef<R>, interactionType: FocusOrigin, result?: R): void;
486
281
 
487
- export declare enum MatDialogState {
488
- OPEN = 0,
489
- CLOSING = 1,
490
- CLOSED = 2
282
+ /** Injection token that can be used to access the data that was passed in to a dialog. */
283
+ declare const MAT_DIALOG_DATA: InjectionToken<any>;
284
+ /** Injection token that can be used to specify default dialog options. */
285
+ declare const MAT_DIALOG_DEFAULT_OPTIONS: InjectionToken<MatDialogConfig<any>>;
286
+ /** Injection token that determines the scroll handling while the dialog is open. */
287
+ declare const MAT_DIALOG_SCROLL_STRATEGY: InjectionToken<() => ScrollStrategy>;
288
+ /**
289
+ * @docs-private
290
+ * @deprecated No longer used. To be removed.
291
+ * @breaking-change 19.0.0
292
+ */
293
+ declare function MAT_DIALOG_SCROLL_STRATEGY_PROVIDER_FACTORY(overlay: Overlay): () => ScrollStrategy;
294
+ /**
295
+ * @docs-private
296
+ * @deprecated No longer used. To be removed.
297
+ * @breaking-change 19.0.0
298
+ */
299
+ declare const MAT_DIALOG_SCROLL_STRATEGY_PROVIDER: {
300
+ provide: InjectionToken<() => ScrollStrategy>;
301
+ deps: (typeof Overlay)[];
302
+ useFactory: typeof MAT_DIALOG_SCROLL_STRATEGY_PROVIDER_FACTORY;
303
+ };
304
+ /**
305
+ * Service to open Material Design modal dialogs.
306
+ */
307
+ declare class MatDialog implements OnDestroy {
308
+ private _overlay;
309
+ private _defaultOptions;
310
+ private _scrollStrategy;
311
+ private _parentDialog;
312
+ private _idGenerator;
313
+ protected _dialog: Dialog;
314
+ private readonly _openDialogsAtThisLevel;
315
+ private readonly _afterAllClosedAtThisLevel;
316
+ private readonly _afterOpenedAtThisLevel;
317
+ protected dialogConfigClass: typeof MatDialogConfig;
318
+ private readonly _dialogRefConstructor;
319
+ private readonly _dialogContainerType;
320
+ private readonly _dialogDataToken;
321
+ /** Keeps track of the currently-open dialogs. */
322
+ get openDialogs(): MatDialogRef<any>[];
323
+ /** Stream that emits when a dialog has been opened. */
324
+ get afterOpened(): Subject<MatDialogRef<any>>;
325
+ private _getAfterAllClosed;
326
+ /**
327
+ * Stream that emits when all open dialog have finished closing.
328
+ * Will emit on subscribe if there are no open dialogs to begin with.
329
+ */
330
+ readonly afterAllClosed: Observable<void>;
331
+ constructor(...args: unknown[]);
332
+ /**
333
+ * Opens a modal dialog containing the given component.
334
+ * @param component Type of the component to load into the dialog.
335
+ * @param config Extra configuration options.
336
+ * @returns Reference to the newly-opened dialog.
337
+ */
338
+ open<T, D = any, R = any>(component: ComponentType<T>, config?: MatDialogConfig<D>): MatDialogRef<T, R>;
339
+ /**
340
+ * Opens a modal dialog containing the given template.
341
+ * @param template TemplateRef to instantiate as the dialog content.
342
+ * @param config Extra configuration options.
343
+ * @returns Reference to the newly-opened dialog.
344
+ */
345
+ open<T, D = any, R = any>(template: TemplateRef<T>, config?: MatDialogConfig<D>): MatDialogRef<T, R>;
346
+ open<T, D = any, R = any>(template: ComponentType<T> | TemplateRef<T>, config?: MatDialogConfig<D>): MatDialogRef<T, R>;
347
+ /**
348
+ * Closes all of the currently-open dialogs.
349
+ */
350
+ closeAll(): void;
351
+ /**
352
+ * Finds an open dialog by its id.
353
+ * @param id ID to use when looking up the dialog.
354
+ */
355
+ getDialogById(id: string): MatDialogRef<any> | undefined;
356
+ ngOnDestroy(): void;
357
+ private _closeDialogs;
358
+ static ɵfac: i0.ɵɵFactoryDeclaration<MatDialog, never>;
359
+ static ɵprov: i0.ɵɵInjectableDeclaration<MatDialog>;
491
360
  }
492
361
 
362
+ /**
363
+ * Button that will close the current dialog.
364
+ */
365
+ declare class MatDialogClose implements OnInit, OnChanges {
366
+ dialogRef: MatDialogRef<any, any>;
367
+ private _elementRef;
368
+ private _dialog;
369
+ /** Screen-reader label for the button. */
370
+ ariaLabel: string;
371
+ /** Default to "button" to prevents accidental form submits. */
372
+ type: 'submit' | 'button' | 'reset';
373
+ /** Dialog close input. */
374
+ dialogResult: any;
375
+ _matDialogClose: any;
376
+ constructor(...args: unknown[]);
377
+ ngOnInit(): void;
378
+ ngOnChanges(changes: SimpleChanges): void;
379
+ _onButtonClick(event: MouseEvent): void;
380
+ static ɵfac: i0.ɵɵFactoryDeclaration<MatDialogClose, never>;
381
+ 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, true, never>;
382
+ }
383
+ declare abstract class MatDialogLayoutSection implements OnInit, OnDestroy {
384
+ protected _dialogRef: MatDialogRef<any, any>;
385
+ private _elementRef;
386
+ private _dialog;
387
+ constructor(...args: unknown[]);
388
+ protected abstract _onAdd(): void;
389
+ protected abstract _onRemove(): void;
390
+ ngOnInit(): void;
391
+ ngOnDestroy(): void;
392
+ static ɵfac: i0.ɵɵFactoryDeclaration<MatDialogLayoutSection, never>;
393
+ static ɵdir: i0.ɵɵDirectiveDeclaration<MatDialogLayoutSection, never, never, {}, {}, never, never, true, never>;
394
+ }
493
395
  /**
494
396
  * Title of a dialog element. Stays fixed to the top of the dialog when scrolling.
495
397
  */
496
- export declare class MatDialogTitle extends MatDialogLayoutSection {
398
+ declare class MatDialogTitle extends MatDialogLayoutSection {
497
399
  id: string;
498
400
  protected _onAdd(): void;
499
401
  protected _onRemove(): void;
500
402
  static ɵfac: i0.ɵɵFactoryDeclaration<MatDialogTitle, never>;
501
403
  static ɵdir: i0.ɵɵDirectiveDeclaration<MatDialogTitle, "[mat-dialog-title], [matDialogTitle]", ["matDialogTitle"], { "id": { "alias": "id"; "required": false; }; }, {}, never, never, true, never>;
502
404
  }
405
+ /**
406
+ * Scrollable content container of a dialog.
407
+ */
408
+ declare class MatDialogContent {
409
+ static ɵfac: i0.ɵɵFactoryDeclaration<MatDialogContent, never>;
410
+ static ɵdir: i0.ɵɵDirectiveDeclaration<MatDialogContent, "[mat-dialog-content], mat-dialog-content, [matDialogContent]", never, {}, {}, never, never, true, [{ directive: typeof i2.CdkScrollable; inputs: {}; outputs: {}; }]>;
411
+ }
412
+ /**
413
+ * Container for the bottom action buttons in a dialog.
414
+ * Stays fixed to the bottom when scrolling.
415
+ */
416
+ declare class MatDialogActions extends MatDialogLayoutSection {
417
+ /**
418
+ * Horizontal alignment of action buttons.
419
+ */
420
+ align?: 'start' | 'center' | 'end';
421
+ protected _onAdd(): void;
422
+ protected _onRemove(): void;
423
+ static ɵfac: i0.ɵɵFactoryDeclaration<MatDialogActions, never>;
424
+ static ɵdir: i0.ɵɵDirectiveDeclaration<MatDialogActions, "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", never, { "align": { "alias": "align"; "required": false; }; }, {}, never, never, true, never>;
425
+ }
426
+
427
+ declare class MatDialogModule {
428
+ static ɵfac: i0.ɵɵFactoryDeclaration<MatDialogModule, never>;
429
+ static ɵmod: i0.ɵɵNgModuleDeclaration<MatDialogModule, never, [typeof i1.DialogModule, typeof i2$1.OverlayModule, typeof i3.PortalModule, typeof i1$1.MatCommonModule, typeof MatDialogContainer, typeof MatDialogClose, typeof MatDialogTitle, typeof MatDialogActions, typeof MatDialogContent], [typeof i1$1.MatCommonModule, typeof MatDialogContainer, typeof MatDialogClose, typeof MatDialogTitle, typeof MatDialogActions, typeof MatDialogContent]>;
430
+ static ɵinj: i0.ɵɵInjectorDeclaration<MatDialogModule>;
431
+ }
503
432
 
504
- /** Duration of the opening animation in milliseconds. */
505
- declare const OPEN_ANIMATION_DURATION = 150;
433
+ /**
434
+ * Default parameters for the animation for backwards compatibility.
435
+ * @docs-private
436
+ * @deprecated Will stop being exported.
437
+ * @breaking-change 21.0.0
438
+ */
439
+ declare const _defaultParams: {
440
+ params: {
441
+ enterAnimationDuration: string;
442
+ exitAnimationDuration: string;
443
+ };
444
+ };
445
+ /**
446
+ * Animations used by MatDialog.
447
+ * @docs-private
448
+ * @deprecated No longer used, will be removed.
449
+ * @breaking-change 21.0.0
450
+ */
451
+ declare const matDialogAnimations: {
452
+ readonly dialogContainer: any;
453
+ };
506
454
 
507
- export { }
455
+ export { type AutoFocusTarget, type DialogPosition, type DialogRole, MAT_DIALOG_DATA, MAT_DIALOG_DEFAULT_OPTIONS, MAT_DIALOG_SCROLL_STRATEGY, MAT_DIALOG_SCROLL_STRATEGY_PROVIDER, MAT_DIALOG_SCROLL_STRATEGY_PROVIDER_FACTORY, MatDialog, MatDialogActions, MatDialogClose, MatDialogConfig, MatDialogContainer, MatDialogContent, MatDialogModule, MatDialogRef, MatDialogState, MatDialogTitle, _closeDialogVia, _defaultParams, matDialogAnimations };
@@ -1,22 +1,21 @@
1
- import { AsyncFactoryFn } from '@angular/cdk/testing';
2
- import { BaseHarnessFilters } from '@angular/cdk/testing';
3
- import { ComponentHarnessConstructor } from '@angular/cdk/testing';
1
+ import * as _angular_cdk_testing from '@angular/cdk/testing';
2
+ import { BaseHarnessFilters, ContentContainerComponentHarness, ComponentHarnessConstructor, HarnessPredicate } from '@angular/cdk/testing';
3
+ import { DialogRole, MatDialog, MatDialogConfig, MatDialogRef } from '@angular/material/dialog';
4
4
  import { ComponentType } from '@angular/cdk/overlay';
5
- import { ContentContainerComponentHarness } from '@angular/cdk/testing';
6
- import { DialogRole } from '@angular/material/dialog';
7
- import { HarnessPredicate } from '@angular/cdk/testing';
8
- import { MatDialog } from '@angular/material/dialog';
9
- import { MatDialogConfig } from '@angular/material/dialog';
10
- import { MatDialogRef } from '@angular/material/dialog';
11
5
  import { OnDestroy } from '@angular/core';
12
- import { TestElement } from '@angular/cdk/testing';
13
6
 
14
7
  /** A set of criteria that can be used to filter a list of `MatDialogHarness` instances. */
15
- export declare interface DialogHarnessFilters extends BaseHarnessFilters {
8
+ interface DialogHarnessFilters extends BaseHarnessFilters {
16
9
  }
17
10
 
11
+ /** Selectors for different sections of the mat-dialog that can contain user content. */
12
+ declare enum MatDialogSection {
13
+ TITLE = ".mat-mdc-dialog-title",
14
+ CONTENT = ".mat-mdc-dialog-content",
15
+ ACTIONS = ".mat-mdc-dialog-actions"
16
+ }
18
17
  /** Harness for interacting with a standard `MatDialog` in tests. */
19
- export declare class MatDialogHarness extends ContentContainerComponentHarness<MatDialogSection | string> {
18
+ declare class MatDialogHarness extends ContentContainerComponentHarness<MatDialogSection | string> {
20
19
  /** The selector for the host element of a `MatDialog` instance. */
21
20
  static hostSelector: string;
22
21
  /**
@@ -25,9 +24,9 @@ export declare class MatDialogHarness extends ContentContainerComponentHarness<M
25
24
  * @return a `HarnessPredicate` configured with the given options.
26
25
  */
27
26
  static with<T extends MatDialogHarness>(this: ComponentHarnessConstructor<T>, options?: DialogHarnessFilters): HarnessPredicate<T>;
28
- protected _title: AsyncFactoryFn<TestElement | null>;
29
- protected _content: AsyncFactoryFn<TestElement | null>;
30
- protected _actions: AsyncFactoryFn<TestElement | null>;
27
+ protected _title: _angular_cdk_testing.AsyncFactoryFn<_angular_cdk_testing.TestElement | null>;
28
+ protected _content: _angular_cdk_testing.AsyncFactoryFn<_angular_cdk_testing.TestElement | null>;
29
+ protected _actions: _angular_cdk_testing.AsyncFactoryFn<_angular_cdk_testing.TestElement | null>;
31
30
  /** Gets the id of the dialog. */
32
31
  getId(): Promise<string | null>;
33
32
  /** Gets the role of the dialog. */
@@ -54,15 +53,8 @@ export declare class MatDialogHarness extends ContentContainerComponentHarness<M
54
53
  getActionsText(): Promise<string>;
55
54
  }
56
55
 
57
- /** Selectors for different sections of the mat-dialog that can contain user content. */
58
- export declare enum MatDialogSection {
59
- TITLE = ".mat-mdc-dialog-title",
60
- CONTENT = ".mat-mdc-dialog-content",
61
- ACTIONS = ".mat-mdc-dialog-actions"
62
- }
63
-
64
56
  /** Test component that immediately opens a dialog when bootstrapped. */
65
- export declare class MatTestDialogOpener<T = unknown, R = unknown> implements OnDestroy {
57
+ declare class MatTestDialogOpener<T = unknown, R = unknown> implements OnDestroy {
66
58
  dialog: MatDialog;
67
59
  /** Component that should be opened with the MatDialog `open` method. */
68
60
  protected static component: ComponentType<unknown> | undefined;
@@ -79,8 +71,7 @@ export declare class MatTestDialogOpener<T = unknown, R = unknown> implements On
79
71
  constructor(...args: unknown[]);
80
72
  ngOnDestroy(): void;
81
73
  }
82
-
83
- export declare class MatTestDialogOpenerModule {
74
+ declare class MatTestDialogOpenerModule {
84
75
  }
85
76
 
86
- export { }
77
+ export { type DialogHarnessFilters, MatDialogHarness, MatDialogSection, MatTestDialogOpener, MatTestDialogOpenerModule };
@@ -2,13 +2,7 @@ import { BooleanInput } from '@angular/cdk/coercion';
2
2
  import * as i0 from '@angular/core';
3
3
  import * as i1 from '@angular/material/core';
4
4
 
5
- declare namespace i2 {
6
- export {
7
- MatDivider
8
- }
9
- }
10
-
11
- export declare class MatDivider {
5
+ declare class MatDivider {
12
6
  /** Whether the divider is vertically aligned. */
13
7
  get vertical(): boolean;
14
8
  set vertical(value: BooleanInput);
@@ -21,10 +15,10 @@ export declare class MatDivider {
21
15
  static ɵcmp: i0.ɵɵComponentDeclaration<MatDivider, "mat-divider", never, { "vertical": { "alias": "vertical"; "required": false; }; "inset": { "alias": "inset"; "required": false; }; }, {}, never, never, true, never>;
22
16
  }
23
17
 
24
- export declare class MatDividerModule {
18
+ declare class MatDividerModule {
25
19
  static ɵfac: i0.ɵɵFactoryDeclaration<MatDividerModule, never>;
26
- static ɵmod: i0.ɵɵNgModuleDeclaration<MatDividerModule, never, [typeof i1.MatCommonModule, typeof i2.MatDivider], [typeof i2.MatDivider, typeof i1.MatCommonModule]>;
20
+ static ɵmod: i0.ɵɵNgModuleDeclaration<MatDividerModule, never, [typeof i1.MatCommonModule, typeof MatDivider], [typeof MatDivider, typeof i1.MatCommonModule]>;
27
21
  static ɵinj: i0.ɵɵInjectorDeclaration<MatDividerModule>;
28
22
  }
29
23
 
30
- export { }
24
+ export { MatDivider, MatDividerModule };
@@ -1,16 +1,14 @@
1
- import { BaseHarnessFilters } from '@angular/cdk/testing';
2
- import { ComponentHarness } from '@angular/cdk/testing';
3
- import { HarnessPredicate } from '@angular/cdk/testing';
1
+ import { BaseHarnessFilters, ComponentHarness, HarnessPredicate } from '@angular/cdk/testing';
4
2
 
5
- export declare interface DividerHarnessFilters extends BaseHarnessFilters {
3
+ interface DividerHarnessFilters extends BaseHarnessFilters {
6
4
  }
7
5
 
8
6
  /** Harness for interacting with a `mat-divider`. */
9
- export declare class MatDividerHarness extends ComponentHarness {
7
+ declare class MatDividerHarness extends ComponentHarness {
10
8
  static hostSelector: string;
11
9
  static with(options?: DividerHarnessFilters): HarnessPredicate<MatDividerHarness>;
12
10
  getOrientation(): Promise<'horizontal' | 'vertical'>;
13
11
  isInset(): Promise<boolean>;
14
12
  }
15
13
 
16
- export { }
14
+ export { type DividerHarnessFilters, MatDividerHarness };