@angular/material 19.0.0-next.9 → 19.0.0-rc.1

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 (232) hide show
  1. package/autocomplete/_autocomplete-theme.scss +8 -4
  2. package/autocomplete/index.d.ts +5 -6
  3. package/badge/_badge-theme.scss +10 -6
  4. package/badge/index.d.ts +1 -2
  5. package/bottom-sheet/_bottom-sheet-theme.scss +8 -4
  6. package/button/_button-theme.scss +10 -6
  7. package/button/_fab-theme.scss +10 -6
  8. package/button/_icon-button-theme.scss +8 -4
  9. package/button/index.d.ts +1 -1
  10. package/button-toggle/_button-toggle-theme.scss +11 -6
  11. package/button-toggle/index.d.ts +2 -1
  12. package/card/_card-theme.scss +8 -4
  13. package/card/index.d.ts +2 -3
  14. package/checkbox/_checkbox-theme.scss +10 -6
  15. package/chips/_chips-theme.scss +10 -6
  16. package/core/_core-theme.scss +4 -7
  17. package/core/_core.scss +2 -5
  18. package/core/m2/_theming.scss +2 -1
  19. package/core/option/_optgroup-theme.scss +8 -4
  20. package/core/option/_option-theme.scss +10 -6
  21. package/core/ripple/_ripple-theme.scss +8 -4
  22. package/core/selection/pseudo-checkbox/_pseudo-checkbox-theme.scss +10 -6
  23. package/core/theming/_config-validation.scss +4 -4
  24. package/core/theming/_definition.scss +12 -2
  25. package/core/theming/_theming.scss +2 -1
  26. package/core/tokens/_m3-system.scss +55 -39
  27. package/core/tokens/_m3-tokens.scss +3 -3
  28. package/core/tokens/_token-definition.scss +4 -3
  29. package/core/tokens/m2/mat/_badge.scss +1 -1
  30. package/core/tokens/m2/mat/_datepicker.scss +1 -1
  31. package/core/tokens/m2/mat/_menu.scss +5 -3
  32. package/core/tokens/m2/mat/_sort.scss +1 -1
  33. package/core/tokens/m3/mat/_menu.scss +6 -3
  34. package/core/tokens/m3/mdc/_filled-text-field.scss +9 -11
  35. package/datepicker/_datepicker-theme.scss +10 -6
  36. package/datepicker/index.d.ts +36 -37
  37. package/dialog/_dialog-theme.scss +8 -4
  38. package/dialog/index.d.ts +1 -0
  39. package/divider/_divider-theme.scss +8 -4
  40. package/expansion/_expansion-theme.scss +8 -4
  41. package/fesm2022/autocomplete/testing.mjs +2 -5
  42. package/fesm2022/autocomplete/testing.mjs.map +1 -1
  43. package/fesm2022/autocomplete.mjs +225 -151
  44. package/fesm2022/autocomplete.mjs.map +1 -1
  45. package/fesm2022/badge/testing.mjs +2 -5
  46. package/fesm2022/badge/testing.mjs.map +1 -1
  47. package/fesm2022/badge.mjs +45 -36
  48. package/fesm2022/badge.mjs.map +1 -1
  49. package/fesm2022/bottom-sheet/testing.mjs +1 -1
  50. package/fesm2022/bottom-sheet/testing.mjs.map +1 -1
  51. package/fesm2022/bottom-sheet.mjs +79 -57
  52. package/fesm2022/bottom-sheet.mjs.map +1 -1
  53. package/fesm2022/button/testing.mjs +2 -2
  54. package/fesm2022/button/testing.mjs.map +1 -1
  55. package/fesm2022/button-toggle/testing.mjs +4 -7
  56. package/fesm2022/button-toggle/testing.mjs.map +1 -1
  57. package/fesm2022/button-toggle.mjs +84 -47
  58. package/fesm2022/button-toggle.mjs.map +1 -1
  59. package/fesm2022/button.mjs +98 -71
  60. package/fesm2022/button.mjs.map +1 -1
  61. package/fesm2022/card/testing.mjs +3 -6
  62. package/fesm2022/card/testing.mjs.map +1 -1
  63. package/fesm2022/card.mjs +53 -55
  64. package/fesm2022/card.mjs.map +1 -1
  65. package/fesm2022/checkbox/testing.mjs +4 -7
  66. package/fesm2022/checkbox/testing.mjs.map +1 -1
  67. package/fesm2022/checkbox.mjs +105 -63
  68. package/fesm2022/checkbox.mjs.map +1 -1
  69. package/fesm2022/chips/testing.mjs +11 -14
  70. package/fesm2022/chips/testing.mjs.map +1 -1
  71. package/fesm2022/chips.mjs +317 -268
  72. package/fesm2022/chips.mjs.map +1 -1
  73. package/fesm2022/core/testing.mjs +5 -11
  74. package/fesm2022/core/testing.mjs.map +1 -1
  75. package/fesm2022/core.mjs +237 -187
  76. package/fesm2022/core.mjs.map +1 -1
  77. package/fesm2022/datepicker/testing.mjs +13 -22
  78. package/fesm2022/datepicker/testing.mjs.map +1 -1
  79. package/fesm2022/datepicker.mjs +821 -568
  80. package/fesm2022/datepicker.mjs.map +1 -1
  81. package/fesm2022/dialog/testing.mjs +15 -9
  82. package/fesm2022/dialog/testing.mjs.map +1 -1
  83. package/fesm2022/dialog.mjs +221 -153
  84. package/fesm2022/dialog.mjs.map +1 -1
  85. package/fesm2022/divider/testing.mjs +1 -1
  86. package/fesm2022/divider/testing.mjs.map +1 -1
  87. package/fesm2022/divider.mjs +9 -11
  88. package/fesm2022/divider.mjs.map +1 -1
  89. package/fesm2022/expansion/testing.mjs +7 -10
  90. package/fesm2022/expansion/testing.mjs.map +1 -1
  91. package/fesm2022/expansion.mjs +85 -76
  92. package/fesm2022/expansion.mjs.map +1 -1
  93. package/fesm2022/form-field/testing.mjs +12 -15
  94. package/fesm2022/form-field/testing.mjs.map +1 -1
  95. package/fesm2022/form-field.mjs +179 -126
  96. package/fesm2022/form-field.mjs.map +1 -1
  97. package/fesm2022/grid-list/testing.mjs +11 -17
  98. package/fesm2022/grid-list/testing.mjs.map +1 -1
  99. package/fesm2022/grid-list.mjs +72 -50
  100. package/fesm2022/grid-list.mjs.map +1 -1
  101. package/fesm2022/icon/testing.mjs +8 -8
  102. package/fesm2022/icon/testing.mjs.map +1 -1
  103. package/fesm2022/icon.mjs +65 -45
  104. package/fesm2022/icon.mjs.map +1 -1
  105. package/fesm2022/input/testing.mjs +3 -3
  106. package/fesm2022/input/testing.mjs.map +1 -1
  107. package/fesm2022/input.mjs +104 -72
  108. package/fesm2022/input.mjs.map +1 -1
  109. package/fesm2022/list/testing.mjs +21 -38
  110. package/fesm2022/list/testing.mjs.map +1 -1
  111. package/fesm2022/list.mjs +191 -180
  112. package/fesm2022/list.mjs.map +1 -1
  113. package/fesm2022/menu/testing.mjs +3 -6
  114. package/fesm2022/menu/testing.mjs.map +1 -1
  115. package/fesm2022/menu.mjs +178 -168
  116. package/fesm2022/menu.mjs.map +1 -1
  117. package/fesm2022/paginator/testing.mjs +10 -13
  118. package/fesm2022/paginator/testing.mjs.map +1 -1
  119. package/fesm2022/paginator.mjs +84 -59
  120. package/fesm2022/paginator.mjs.map +1 -1
  121. package/fesm2022/progress-bar/testing.mjs +1 -1
  122. package/fesm2022/progress-bar/testing.mjs.map +1 -1
  123. package/fesm2022/progress-bar.mjs +35 -34
  124. package/fesm2022/progress-bar.mjs.map +1 -1
  125. package/fesm2022/progress-spinner/testing.mjs +1 -1
  126. package/fesm2022/progress-spinner/testing.mjs.map +1 -1
  127. package/fesm2022/progress-spinner.mjs +27 -13
  128. package/fesm2022/progress-spinner.mjs.map +1 -1
  129. package/fesm2022/radio/testing.mjs +6 -12
  130. package/fesm2022/radio/testing.mjs.map +1 -1
  131. package/fesm2022/radio.mjs +123 -88
  132. package/fesm2022/radio.mjs.map +1 -1
  133. package/fesm2022/select/testing.mjs +6 -9
  134. package/fesm2022/select/testing.mjs.map +1 -1
  135. package/fesm2022/select.mjs +220 -182
  136. package/fesm2022/select.mjs.map +1 -1
  137. package/fesm2022/sidenav/testing.mjs +6 -6
  138. package/fesm2022/sidenav/testing.mjs.map +1 -1
  139. package/fesm2022/sidenav.mjs +132 -119
  140. package/fesm2022/sidenav.mjs.map +1 -1
  141. package/fesm2022/slide-toggle/testing.mjs +3 -6
  142. package/fesm2022/slide-toggle/testing.mjs.map +1 -1
  143. package/fesm2022/slide-toggle.mjs +78 -49
  144. package/fesm2022/slide-toggle.mjs.map +1 -1
  145. package/fesm2022/slider/testing.mjs +2 -2
  146. package/fesm2022/slider/testing.mjs.map +1 -1
  147. package/fesm2022/slider.mjs +260 -190
  148. package/fesm2022/slider.mjs.map +1 -1
  149. package/fesm2022/snack-bar/testing.mjs +4 -7
  150. package/fesm2022/snack-bar/testing.mjs.map +1 -1
  151. package/fesm2022/snack-bar.mjs +141 -107
  152. package/fesm2022/snack-bar.mjs.map +1 -1
  153. package/fesm2022/sort/testing.mjs +3 -6
  154. package/fesm2022/sort/testing.mjs.map +1 -1
  155. package/fesm2022/sort.mjs +93 -72
  156. package/fesm2022/sort.mjs.map +1 -1
  157. package/fesm2022/stepper/testing.mjs +4 -4
  158. package/fesm2022/stepper/testing.mjs.map +1 -1
  159. package/fesm2022/stepper.mjs +143 -105
  160. package/fesm2022/stepper.mjs.map +1 -1
  161. package/fesm2022/table/testing.mjs +13 -25
  162. package/fesm2022/table/testing.mjs.map +1 -1
  163. package/fesm2022/table.mjs +182 -177
  164. package/fesm2022/table.mjs.map +1 -1
  165. package/fesm2022/tabs/testing.mjs +5 -5
  166. package/fesm2022/tabs/testing.mjs.map +1 -1
  167. package/fesm2022/tabs.mjs +326 -247
  168. package/fesm2022/tabs.mjs.map +1 -1
  169. package/fesm2022/timepicker/testing.mjs +7 -16
  170. package/fesm2022/timepicker/testing.mjs.map +1 -1
  171. package/fesm2022/timepicker.mjs +157 -153
  172. package/fesm2022/timepicker.mjs.map +1 -1
  173. package/fesm2022/toolbar/testing.mjs +2 -5
  174. package/fesm2022/toolbar/testing.mjs.map +1 -1
  175. package/fesm2022/toolbar.mjs +25 -15
  176. package/fesm2022/toolbar.mjs.map +1 -1
  177. package/fesm2022/tooltip/testing.mjs +6 -9
  178. package/fesm2022/tooltip/testing.mjs.map +1 -1
  179. package/fesm2022/tooltip.mjs +96 -72
  180. package/fesm2022/tooltip.mjs.map +1 -1
  181. package/fesm2022/tree/testing.mjs +3 -6
  182. package/fesm2022/tree/testing.mjs.map +1 -1
  183. package/fesm2022/tree.mjs +56 -54
  184. package/fesm2022/tree.mjs.map +1 -1
  185. package/form-field/_form-field-theme.scss +9 -5
  186. package/form-field/index.d.ts +9 -9
  187. package/grid-list/_grid-list-theme.scss +8 -4
  188. package/icon/_icon-theme.scss +10 -6
  189. package/input/_input-theme.scss +8 -4
  190. package/list/_list-theme.scss +8 -4
  191. package/list/index.d.ts +20 -21
  192. package/menu/_menu-theme.scss +8 -4
  193. package/menu/index.d.ts +15 -17
  194. package/package.json +2 -2
  195. package/paginator/_paginator-theme.scss +8 -4
  196. package/prebuilt-themes/azure-blue.css +1 -1
  197. package/prebuilt-themes/cyan-orange.css +1 -1
  198. package/prebuilt-themes/deeppurple-amber.css +1 -1
  199. package/prebuilt-themes/indigo-pink.css +1 -1
  200. package/prebuilt-themes/magenta-violet.css +1 -1
  201. package/prebuilt-themes/pink-bluegrey.css +1 -1
  202. package/prebuilt-themes/purple-green.css +1 -1
  203. package/prebuilt-themes/rose-red.css +1 -1
  204. package/progress-bar/_progress-bar-theme.scss +11 -9
  205. package/progress-spinner/_progress-spinner-theme.scss +11 -9
  206. package/progress-spinner/index.d.ts +3 -4
  207. package/radio/_radio-theme.scss +10 -6
  208. package/radio/index.d.ts +2 -3
  209. package/schematics/ng-add/index.js +1 -1
  210. package/schematics/ng-add/index.mjs +1 -1
  211. package/schematics/ng-add/theming/create-custom-theme.js +1 -6
  212. package/schematics/ng-add/theming/create-custom-theme.mjs +1 -6
  213. package/schematics/ng-generate/theme-color/index_bundled.js +35 -9
  214. package/schematics/ng-generate/theme-color/index_bundled.js.map +2 -2
  215. package/schematics/ng-update/index_bundled.js +6 -1
  216. package/schematics/ng-update/index_bundled.js.map +1 -1
  217. package/select/_select-theme.scss +10 -6
  218. package/select/index.d.ts +7 -7
  219. package/sidenav/_sidenav-theme.scss +8 -4
  220. package/slide-toggle/_slide-toggle-theme.scss +10 -6
  221. package/slider/_slider-theme.scss +10 -6
  222. package/snack-bar/_snack-bar-theme.scss +10 -6
  223. package/sort/_sort-theme.scss +8 -4
  224. package/stepper/_stepper-theme.scss +10 -6
  225. package/stepper/index.d.ts +14 -15
  226. package/table/_table-theme.scss +8 -4
  227. package/tabs/_tabs-theme.scss +10 -6
  228. package/timepicker/_timepicker-theme.scss +10 -6
  229. package/toolbar/_toolbar-theme.scss +10 -6
  230. package/tooltip/_tooltip-theme.scss +8 -4
  231. package/tooltip/index.d.ts +5 -6
  232. package/tree/_tree-theme.scss +8 -4
@@ -7,6 +7,7 @@ import { CdkPortalOutlet, PortalModule } from '@angular/cdk/portal';
7
7
  import { Subject, merge, defer } from 'rxjs';
8
8
  import { filter, take, startWith } from 'rxjs/operators';
9
9
  import { ESCAPE, hasModifierKey } from '@angular/cdk/keycodes';
10
+ import { _IdGenerator } from '@angular/cdk/a11y';
10
11
  import * as i1 from '@angular/cdk/scrolling';
11
12
  import { CdkScrollable } from '@angular/cdk/scrolling';
12
13
  import { MatCommonModule } from '@angular/material/core';
@@ -16,52 +17,95 @@ import { trigger, state, style, transition, group, animate, query, animateChild
16
17
  * Configuration for opening a modal dialog with the MatDialog service.
17
18
  */
18
19
  class MatDialogConfig {
19
- constructor() {
20
- /** The ARIA role of the dialog element. */
21
- this.role = 'dialog';
22
- /** Custom class for the overlay pane. */
23
- this.panelClass = '';
24
- /** Whether the dialog has a backdrop. */
25
- this.hasBackdrop = true;
26
- /** Custom class for the backdrop. */
27
- this.backdropClass = '';
28
- /** Whether the user can use escape or clicking on the backdrop to close the modal. */
29
- this.disableClose = false;
30
- /** Width of the dialog. */
31
- this.width = '';
32
- /** Height of the dialog. */
33
- this.height = '';
34
- /** Data being injected into the child component. */
35
- this.data = null;
36
- /** ID of the element that describes the dialog. */
37
- this.ariaDescribedBy = null;
38
- /** ID of the element that labels the dialog. */
39
- this.ariaLabelledBy = null;
40
- /** Aria label to assign to the dialog element. */
41
- this.ariaLabel = null;
42
- /** Whether this is a modal dialog. Used to set the `aria-modal` attribute. */
43
- this.ariaModal = true;
44
- /**
45
- * Where the dialog should focus on open.
46
- * @breaking-change 14.0.0 Remove boolean option from autoFocus. Use string or
47
- * AutoFocusTarget instead.
48
- */
49
- this.autoFocus = 'first-tabbable';
50
- /**
51
- * Whether the dialog should restore focus to the
52
- * previously-focused element, after it's closed.
53
- */
54
- this.restoreFocus = true;
55
- /** Whether to wait for the opening animation to finish before trapping focus. */
56
- this.delayFocusTrap = true;
57
- /**
58
- * Whether the dialog should close when the user goes backwards/forwards in history.
59
- * Note that this usually doesn't include clicking on links (unless the user is using
60
- * the `HashLocationStrategy`).
61
- */
62
- this.closeOnNavigation = true;
63
- // TODO(jelbourn): add configuration for lifecycle hooks, ARIA labelling.
64
- }
20
+ /**
21
+ * Where the attached component should live in Angular's *logical* component tree.
22
+ * This affects what is available for injection and the change detection order for the
23
+ * component instantiated inside of the dialog. This does not affect where the dialog
24
+ * content will be rendered.
25
+ */
26
+ viewContainerRef;
27
+ /**
28
+ * Injector used for the instantiation of the component to be attached. If provided,
29
+ * takes precedence over the injector indirectly provided by `ViewContainerRef`.
30
+ */
31
+ injector;
32
+ /** ID for the dialog. If omitted, a unique one will be generated. */
33
+ id;
34
+ /** The ARIA role of the dialog element. */
35
+ role = 'dialog';
36
+ /** Custom class for the overlay pane. */
37
+ panelClass = '';
38
+ /** Whether the dialog has a backdrop. */
39
+ hasBackdrop = true;
40
+ /** Custom class for the backdrop. */
41
+ backdropClass = '';
42
+ /** Whether the user can use escape or clicking on the backdrop to close the modal. */
43
+ disableClose = false;
44
+ /** Width of the dialog. */
45
+ width = '';
46
+ /** Height of the dialog. */
47
+ height = '';
48
+ /** Min-width of the dialog. If a number is provided, assumes pixel units. */
49
+ minWidth;
50
+ /** Min-height of the dialog. If a number is provided, assumes pixel units. */
51
+ minHeight;
52
+ /** Max-width of the dialog. If a number is provided, assumes pixel units. Defaults to 80vw. */
53
+ maxWidth;
54
+ /** Max-height of the dialog. If a number is provided, assumes pixel units. */
55
+ maxHeight;
56
+ /** Position overrides. */
57
+ position;
58
+ /** Data being injected into the child component. */
59
+ data = null;
60
+ /** Layout direction for the dialog's content. */
61
+ direction;
62
+ /** ID of the element that describes the dialog. */
63
+ ariaDescribedBy = null;
64
+ /** ID of the element that labels the dialog. */
65
+ ariaLabelledBy = null;
66
+ /** Aria label to assign to the dialog element. */
67
+ ariaLabel = null;
68
+ /** Whether this is a modal dialog. Used to set the `aria-modal` attribute. */
69
+ ariaModal = true;
70
+ /**
71
+ * Where the dialog should focus on open.
72
+ * @breaking-change 14.0.0 Remove boolean option from autoFocus. Use string or
73
+ * AutoFocusTarget instead.
74
+ */
75
+ autoFocus = 'first-tabbable';
76
+ /**
77
+ * Whether the dialog should restore focus to the
78
+ * previously-focused element, after it's closed.
79
+ */
80
+ restoreFocus = true;
81
+ /** Whether to wait for the opening animation to finish before trapping focus. */
82
+ delayFocusTrap = true;
83
+ /** Scroll strategy to be used for the dialog. */
84
+ scrollStrategy;
85
+ /**
86
+ * Whether the dialog should close when the user goes backwards/forwards in history.
87
+ * Note that this usually doesn't include clicking on links (unless the user is using
88
+ * the `HashLocationStrategy`).
89
+ */
90
+ closeOnNavigation = true;
91
+ /**
92
+ * Alternate `ComponentFactoryResolver` to use when resolving the associated component.
93
+ * @deprecated No longer used. Will be removed.
94
+ * @breaking-change 20.0.0
95
+ */
96
+ componentFactoryResolver;
97
+ /**
98
+ * Duration of the enter animation in ms.
99
+ * Should be a number, string type is deprecated.
100
+ * @breaking-change 17.0.0 Remove string signature.
101
+ */
102
+ enterAnimationDuration;
103
+ /**
104
+ * Duration of the exit animation in ms.
105
+ * Should be a number, string type is deprecated.
106
+ * @breaking-change 17.0.0 Remove string signature.
107
+ */
108
+ exitAnimationDuration;
65
109
  }
66
110
 
67
111
  /** Class added when the dialog is open. */
@@ -75,44 +119,25 @@ const OPEN_ANIMATION_DURATION = 150;
75
119
  /** Duration of the closing animation in milliseconds. */
76
120
  const CLOSE_ANIMATION_DURATION = 75;
77
121
  class MatDialogContainer extends CdkDialogContainer {
78
- constructor() {
79
- super(...arguments);
80
- this._animationMode = inject(ANIMATION_MODULE_TYPE, { optional: true });
81
- /** Emits when an animation state changes. */
82
- this._animationStateChanged = new EventEmitter();
83
- /** Whether animations are enabled. */
84
- this._animationsEnabled = this._animationMode !== 'NoopAnimations';
85
- /** Number of actions projected in the dialog. */
86
- this._actionSectionCount = 0;
87
- /** Host element of the dialog container component. */
88
- this._hostElement = this._elementRef.nativeElement;
89
- /** Duration of the dialog open animation. */
90
- this._enterAnimationDuration = this._animationsEnabled
91
- ? parseCssTime(this._config.enterAnimationDuration) ?? OPEN_ANIMATION_DURATION
92
- : 0;
93
- /** Duration of the dialog close animation. */
94
- this._exitAnimationDuration = this._animationsEnabled
95
- ? parseCssTime(this._config.exitAnimationDuration) ?? CLOSE_ANIMATION_DURATION
96
- : 0;
97
- /** Current timer for dialog animations. */
98
- this._animationTimer = null;
99
- /**
100
- * Completes the dialog open by clearing potential animation classes, trapping
101
- * focus and emitting an opened event.
102
- */
103
- this._finishDialogOpen = () => {
104
- this._clearAnimationClasses();
105
- this._openAnimationDone(this._enterAnimationDuration);
106
- };
107
- /**
108
- * Completes the dialog close by clearing potential animation classes, restoring
109
- * focus and emitting a closed event.
110
- */
111
- this._finishDialogClose = () => {
112
- this._clearAnimationClasses();
113
- this._animationStateChanged.emit({ state: 'closed', totalTime: this._exitAnimationDuration });
114
- };
115
- }
122
+ _animationMode = inject(ANIMATION_MODULE_TYPE, { optional: true });
123
+ /** Emits when an animation state changes. */
124
+ _animationStateChanged = new EventEmitter();
125
+ /** Whether animations are enabled. */
126
+ _animationsEnabled = this._animationMode !== 'NoopAnimations';
127
+ /** Number of actions projected in the dialog. */
128
+ _actionSectionCount = 0;
129
+ /** Host element of the dialog container component. */
130
+ _hostElement = this._elementRef.nativeElement;
131
+ /** Duration of the dialog open animation. */
132
+ _enterAnimationDuration = this._animationsEnabled
133
+ ? parseCssTime(this._config.enterAnimationDuration) ?? OPEN_ANIMATION_DURATION
134
+ : 0;
135
+ /** Duration of the dialog close animation. */
136
+ _exitAnimationDuration = this._animationsEnabled
137
+ ? parseCssTime(this._config.exitAnimationDuration) ?? CLOSE_ANIMATION_DURATION
138
+ : 0;
139
+ /** Current timer for dialog animations. */
140
+ _animationTimer = null;
116
141
  _contentAttached() {
117
142
  // Delegate to the original dialog-container initialization (i.e. saving the
118
143
  // previous element, setting up the focus trap and moving focus to the container).
@@ -187,6 +212,22 @@ class MatDialogContainer extends CdkDialogContainer {
187
212
  this._actionSectionCount += delta;
188
213
  this._changeDetectorRef.markForCheck();
189
214
  }
215
+ /**
216
+ * Completes the dialog open by clearing potential animation classes, trapping
217
+ * focus and emitting an opened event.
218
+ */
219
+ _finishDialogOpen = () => {
220
+ this._clearAnimationClasses();
221
+ this._openAnimationDone(this._enterAnimationDuration);
222
+ };
223
+ /**
224
+ * Completes the dialog close by clearing potential animation classes, restoring
225
+ * focus and emitting a closed event.
226
+ */
227
+ _finishDialogClose = () => {
228
+ this._clearAnimationClasses();
229
+ this._animationStateChanged.emit({ state: 'closed', totalTime: this._exitAnimationDuration });
230
+ };
190
231
  /** Clears all dialog animation classes. */
191
232
  _clearAnimationClasses() {
192
233
  this._hostElement.classList.remove(OPENING_CLASS, CLOSING_CLASS);
@@ -244,10 +285,10 @@ class MatDialogContainer extends CdkDialogContainer {
244
285
  ref.location.nativeElement.classList.add('mat-mdc-dialog-component-host');
245
286
  return ref;
246
287
  }
247
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: MatDialogContainer, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
248
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.0-next.10", type: MatDialogContainer, isStandalone: true, selector: "mat-dialog-container", host: { attributes: { "tabindex": "-1" }, properties: { "attr.aria-modal": "_config.ariaModal", "id": "_config.id", "attr.role": "_config.role", "attr.aria-labelledby": "_config.ariaLabel ? null : _ariaLabelledByQueue[0]", "attr.aria-label": "_config.ariaLabel", "attr.aria-describedby": "_config.ariaDescribedBy || null", "class._mat-animation-noopable": "!_animationsEnabled", "class.mat-mdc-dialog-container-with-actions": "_actionSectionCount > 0" }, classAttribute: "mat-mdc-dialog-container mdc-dialog" }, usesInheritance: true, ngImport: i0, template: "<div class=\"mat-mdc-dialog-inner-container mdc-dialog__container\">\n <div class=\"mat-mdc-dialog-surface mdc-dialog__surface\">\n <ng-template cdkPortalOutlet />\n </div>\n</div>\n", styles: [".mat-mdc-dialog-container{width:100%;height:100%;display:block;box-sizing:border-box;max-height:inherit;min-height:inherit;min-width:inherit;max-width:inherit;outline:0}.cdk-overlay-pane.mat-mdc-dialog-panel{max-width:var(--mat-dialog-container-max-width, 560px);min-width:var(--mat-dialog-container-min-width, 280px)}@media(max-width: 599px){.cdk-overlay-pane.mat-mdc-dialog-panel{max-width:var(--mat-dialog-container-small-max-width, calc(100vw - 32px))}}.mat-mdc-dialog-inner-container{display:flex;flex-direction:row;align-items:center;justify-content:space-around;box-sizing:border-box;height:100%;opacity:0;transition:opacity linear var(--mat-dialog-transition-duration, 0ms);max-height:inherit;min-height:inherit;min-width:inherit;max-width:inherit}.mdc-dialog--closing .mat-mdc-dialog-inner-container{transition:opacity 75ms linear;transform:none}.mdc-dialog--open .mat-mdc-dialog-inner-container{opacity:1}._mat-animation-noopable .mat-mdc-dialog-inner-container{transition:none}.mat-mdc-dialog-surface{display:flex;flex-direction:column;flex-grow:0;flex-shrink:0;box-sizing:border-box;width:100%;height:100%;position:relative;overflow-y:auto;outline:0;transform:scale(0.8);transition:transform var(--mat-dialog-transition-duration, 0ms) cubic-bezier(0, 0, 0.2, 1);max-height:inherit;min-height:inherit;min-width:inherit;max-width:inherit;box-shadow:var(--mat-dialog-container-elevation-shadow, none);border-radius:var(--mdc-dialog-container-shape, var(--mat-sys-corner-extra-large, 4px));background-color:var(--mdc-dialog-container-color, var(--mat-sys-surface, white))}[dir=rtl] .mat-mdc-dialog-surface{text-align:right}.mdc-dialog--open .mat-mdc-dialog-surface,.mdc-dialog--closing .mat-mdc-dialog-surface{transform:none}._mat-animation-noopable .mat-mdc-dialog-surface{transition:none}.mat-mdc-dialog-surface::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:2px solid rgba(0,0,0,0);border-radius:inherit;content:\"\";pointer-events:none}.mat-mdc-dialog-title{display:block;position:relative;flex-shrink:0;box-sizing:border-box;margin:0 0 1px;padding:var(--mat-dialog-headline-padding, 6px 24px 13px)}.mat-mdc-dialog-title::before{display:inline-block;width:0;height:40px;content:\"\";vertical-align:0}[dir=rtl] .mat-mdc-dialog-title{text-align:right}.mat-mdc-dialog-container .mat-mdc-dialog-title{color:var(--mdc-dialog-subhead-color, var(--mat-sys-on-surface, rgba(0, 0, 0, 0.87)));font-family:var(--mdc-dialog-subhead-font, var(--mat-sys-headline-small-font, inherit));line-height:var(--mdc-dialog-subhead-line-height, var(--mat-sys-headline-small-line-height, 1.5rem));font-size:var(--mdc-dialog-subhead-size, var(--mat-sys-headline-small-size, 1rem));font-weight:var(--mdc-dialog-subhead-weight, var(--mat-sys-headline-small-weight, 400));letter-spacing:var(--mdc-dialog-subhead-tracking, var(--mat-sys-headline-small-tracking, 0.03125em))}.mat-mdc-dialog-content{display:block;flex-grow:1;box-sizing:border-box;margin:0;overflow:auto;max-height:65vh}.mat-mdc-dialog-content>:first-child{margin-top:0}.mat-mdc-dialog-content>:last-child{margin-bottom:0}.mat-mdc-dialog-container .mat-mdc-dialog-content{color:var(--mdc-dialog-supporting-text-color, var(--mat-sys-on-surface-variant, rgba(0, 0, 0, 0.6)));font-family:var(--mdc-dialog-supporting-text-font, var(--mat-sys-body-medium-font, inherit));line-height:var(--mdc-dialog-supporting-text-line-height, var(--mat-sys-body-medium-line-height, 1.5rem));font-size:var(--mdc-dialog-supporting-text-size, var(--mat-sys-body-medium-size, 1rem));font-weight:var(--mdc-dialog-supporting-text-weight, var(--mat-sys-body-medium-weight, 400));letter-spacing:var(--mdc-dialog-supporting-text-tracking, var(--mat-sys-body-medium-tracking, 0.03125em))}.mat-mdc-dialog-container .mat-mdc-dialog-content{padding:var(--mat-dialog-content-padding, 20px 24px)}.mat-mdc-dialog-container-with-actions .mat-mdc-dialog-content{padding:var(--mat-dialog-with-actions-content-padding, 20px 24px 0)}.mat-mdc-dialog-container .mat-mdc-dialog-title+.mat-mdc-dialog-content{padding-top:0}.mat-mdc-dialog-actions{display:flex;position:relative;flex-shrink:0;flex-wrap:wrap;align-items:center;justify-content:flex-end;box-sizing:border-box;min-height:52px;margin:0;padding:8px;border-top:1px solid rgba(0,0,0,0);padding:var(--mat-dialog-actions-padding, 16px 24px);justify-content:var(--mat-dialog-actions-alignment, flex-end)}@media(forced-colors: active){.mat-mdc-dialog-actions{border-top-color:CanvasText}}.mat-mdc-dialog-actions.mat-mdc-dialog-actions-align-start,.mat-mdc-dialog-actions[align=start]{justify-content:start}.mat-mdc-dialog-actions.mat-mdc-dialog-actions-align-center,.mat-mdc-dialog-actions[align=center]{justify-content:center}.mat-mdc-dialog-actions.mat-mdc-dialog-actions-align-end,.mat-mdc-dialog-actions[align=end]{justify-content:flex-end}.mat-mdc-dialog-actions .mat-button-base+.mat-button-base,.mat-mdc-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:8px}[dir=rtl] .mat-mdc-dialog-actions .mat-button-base+.mat-button-base,[dir=rtl] .mat-mdc-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:0;margin-right:8px}.mat-mdc-dialog-component-host{display:contents}"], dependencies: [{ kind: "directive", type: CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None }); }
288
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-rc.0", ngImport: i0, type: MatDialogContainer, deps: null, target: i0.ɵɵFactoryTarget.Component });
289
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.0-rc.0", type: MatDialogContainer, isStandalone: true, selector: "mat-dialog-container", host: { attributes: { "tabindex": "-1" }, properties: { "attr.aria-modal": "_config.ariaModal", "id": "_config.id", "attr.role": "_config.role", "attr.aria-labelledby": "_config.ariaLabel ? null : _ariaLabelledByQueue[0]", "attr.aria-label": "_config.ariaLabel", "attr.aria-describedby": "_config.ariaDescribedBy || null", "class._mat-animation-noopable": "!_animationsEnabled", "class.mat-mdc-dialog-container-with-actions": "_actionSectionCount > 0" }, classAttribute: "mat-mdc-dialog-container mdc-dialog" }, usesInheritance: true, ngImport: i0, template: "<div class=\"mat-mdc-dialog-inner-container mdc-dialog__container\">\n <div class=\"mat-mdc-dialog-surface mdc-dialog__surface\">\n <ng-template cdkPortalOutlet />\n </div>\n</div>\n", styles: [".mat-mdc-dialog-container{width:100%;height:100%;display:block;box-sizing:border-box;max-height:inherit;min-height:inherit;min-width:inherit;max-width:inherit;outline:0}.cdk-overlay-pane.mat-mdc-dialog-panel{max-width:var(--mat-dialog-container-max-width, 560px);min-width:var(--mat-dialog-container-min-width, 280px)}@media(max-width: 599px){.cdk-overlay-pane.mat-mdc-dialog-panel{max-width:var(--mat-dialog-container-small-max-width, calc(100vw - 32px))}}.mat-mdc-dialog-inner-container{display:flex;flex-direction:row;align-items:center;justify-content:space-around;box-sizing:border-box;height:100%;opacity:0;transition:opacity linear var(--mat-dialog-transition-duration, 0ms);max-height:inherit;min-height:inherit;min-width:inherit;max-width:inherit}.mdc-dialog--closing .mat-mdc-dialog-inner-container{transition:opacity 75ms linear;transform:none}.mdc-dialog--open .mat-mdc-dialog-inner-container{opacity:1}._mat-animation-noopable .mat-mdc-dialog-inner-container{transition:none}.mat-mdc-dialog-surface{display:flex;flex-direction:column;flex-grow:0;flex-shrink:0;box-sizing:border-box;width:100%;height:100%;position:relative;overflow-y:auto;outline:0;transform:scale(0.8);transition:transform var(--mat-dialog-transition-duration, 0ms) cubic-bezier(0, 0, 0.2, 1);max-height:inherit;min-height:inherit;min-width:inherit;max-width:inherit;box-shadow:var(--mat-dialog-container-elevation-shadow, none);border-radius:var(--mdc-dialog-container-shape, var(--mat-sys-corner-extra-large, 4px));background-color:var(--mdc-dialog-container-color, var(--mat-sys-surface, white))}[dir=rtl] .mat-mdc-dialog-surface{text-align:right}.mdc-dialog--open .mat-mdc-dialog-surface,.mdc-dialog--closing .mat-mdc-dialog-surface{transform:none}._mat-animation-noopable .mat-mdc-dialog-surface{transition:none}.mat-mdc-dialog-surface::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:2px solid rgba(0,0,0,0);border-radius:inherit;content:\"\";pointer-events:none}.mat-mdc-dialog-title{display:block;position:relative;flex-shrink:0;box-sizing:border-box;margin:0 0 1px;padding:var(--mat-dialog-headline-padding, 6px 24px 13px)}.mat-mdc-dialog-title::before{display:inline-block;width:0;height:40px;content:\"\";vertical-align:0}[dir=rtl] .mat-mdc-dialog-title{text-align:right}.mat-mdc-dialog-container .mat-mdc-dialog-title{color:var(--mdc-dialog-subhead-color, var(--mat-sys-on-surface, rgba(0, 0, 0, 0.87)));font-family:var(--mdc-dialog-subhead-font, var(--mat-sys-headline-small-font, inherit));line-height:var(--mdc-dialog-subhead-line-height, var(--mat-sys-headline-small-line-height, 1.5rem));font-size:var(--mdc-dialog-subhead-size, var(--mat-sys-headline-small-size, 1rem));font-weight:var(--mdc-dialog-subhead-weight, var(--mat-sys-headline-small-weight, 400));letter-spacing:var(--mdc-dialog-subhead-tracking, var(--mat-sys-headline-small-tracking, 0.03125em))}.mat-mdc-dialog-content{display:block;flex-grow:1;box-sizing:border-box;margin:0;overflow:auto;max-height:65vh}.mat-mdc-dialog-content>:first-child{margin-top:0}.mat-mdc-dialog-content>:last-child{margin-bottom:0}.mat-mdc-dialog-container .mat-mdc-dialog-content{color:var(--mdc-dialog-supporting-text-color, var(--mat-sys-on-surface-variant, rgba(0, 0, 0, 0.6)));font-family:var(--mdc-dialog-supporting-text-font, var(--mat-sys-body-medium-font, inherit));line-height:var(--mdc-dialog-supporting-text-line-height, var(--mat-sys-body-medium-line-height, 1.5rem));font-size:var(--mdc-dialog-supporting-text-size, var(--mat-sys-body-medium-size, 1rem));font-weight:var(--mdc-dialog-supporting-text-weight, var(--mat-sys-body-medium-weight, 400));letter-spacing:var(--mdc-dialog-supporting-text-tracking, var(--mat-sys-body-medium-tracking, 0.03125em))}.mat-mdc-dialog-container .mat-mdc-dialog-content{padding:var(--mat-dialog-content-padding, 20px 24px)}.mat-mdc-dialog-container-with-actions .mat-mdc-dialog-content{padding:var(--mat-dialog-with-actions-content-padding, 20px 24px 0)}.mat-mdc-dialog-container .mat-mdc-dialog-title+.mat-mdc-dialog-content{padding-top:0}.mat-mdc-dialog-actions{display:flex;position:relative;flex-shrink:0;flex-wrap:wrap;align-items:center;justify-content:flex-end;box-sizing:border-box;min-height:52px;margin:0;padding:8px;border-top:1px solid rgba(0,0,0,0);padding:var(--mat-dialog-actions-padding, 16px 24px);justify-content:var(--mat-dialog-actions-alignment, flex-end)}@media(forced-colors: active){.mat-mdc-dialog-actions{border-top-color:CanvasText}}.mat-mdc-dialog-actions.mat-mdc-dialog-actions-align-start,.mat-mdc-dialog-actions[align=start]{justify-content:start}.mat-mdc-dialog-actions.mat-mdc-dialog-actions-align-center,.mat-mdc-dialog-actions[align=center]{justify-content:center}.mat-mdc-dialog-actions.mat-mdc-dialog-actions-align-end,.mat-mdc-dialog-actions[align=end]{justify-content:flex-end}.mat-mdc-dialog-actions .mat-button-base+.mat-button-base,.mat-mdc-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:8px}[dir=rtl] .mat-mdc-dialog-actions .mat-button-base+.mat-button-base,[dir=rtl] .mat-mdc-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:0;margin-right:8px}.mat-mdc-dialog-component-host{display:contents}"], dependencies: [{ kind: "directive", type: CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None });
249
290
  }
250
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: MatDialogContainer, decorators: [{
291
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-rc.0", ngImport: i0, type: MatDialogContainer, decorators: [{
251
292
  type: Component,
252
293
  args: [{ selector: 'mat-dialog-container', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.Default, imports: [CdkPortalOutlet], host: {
253
294
  'class': 'mat-mdc-dialog-container mdc-dialog',
@@ -298,15 +339,38 @@ var MatDialogState;
298
339
  * Reference to a dialog opened via the MatDialog service.
299
340
  */
300
341
  class MatDialogRef {
342
+ _ref;
343
+ _containerInstance;
344
+ /** The instance of component opened into the dialog. */
345
+ componentInstance;
346
+ /**
347
+ * `ComponentRef` of the component opened into the dialog. Will be
348
+ * null when the dialog is opened using a `TemplateRef`.
349
+ */
350
+ componentRef;
351
+ /** Whether the user is allowed to close the dialog. */
352
+ disableClose;
353
+ /** Unique ID for the dialog. */
354
+ id;
355
+ /** Subject for notifying the user that the dialog has finished opening. */
356
+ _afterOpened = new Subject();
357
+ /** Subject for notifying the user that the dialog has started closing. */
358
+ _beforeClosed = new Subject();
359
+ /** Result to be passed to afterClosed. */
360
+ _result;
361
+ /** Handle to the timeout that's running as a fallback in case the exit animation doesn't fire. */
362
+ _closeFallbackTimeout;
363
+ /** Current state of the dialog. */
364
+ _state = MatDialogState.OPEN;
365
+ // TODO(crisbeto): we shouldn't have to declare this property, because `DialogRef.close`
366
+ // already has a second `options` parameter that we can use. The problem is that internal tests
367
+ // have assertions like `expect(MatDialogRef.close).toHaveBeenCalledWith(foo)` which will break,
368
+ // because it'll be called with two arguments by things like `MatDialogClose`.
369
+ /** Interaction that caused the dialog to close. */
370
+ _closeInteractionType;
301
371
  constructor(_ref, config, _containerInstance) {
302
372
  this._ref = _ref;
303
373
  this._containerInstance = _containerInstance;
304
- /** Subject for notifying the user that the dialog has finished opening. */
305
- this._afterOpened = new Subject();
306
- /** Subject for notifying the user that the dialog has started closing. */
307
- this._beforeClosed = new Subject();
308
- /** Current state of the dialog. */
309
- this._state = MatDialogState.OPEN;
310
374
  this.disableClose = config.disableClose;
311
375
  this.id = _ref.id;
312
376
  // Used to target panels specifically tied to dialogs.
@@ -485,12 +549,23 @@ const MAT_DIALOG_SCROLL_STRATEGY_PROVIDER = {
485
549
  deps: [Overlay],
486
550
  useFactory: MAT_DIALOG_SCROLL_STRATEGY_PROVIDER_FACTORY,
487
551
  };
488
- // Counter for unique dialog ids.
489
- let uniqueId = 0;
490
552
  /**
491
553
  * Service to open Material Design modal dialogs.
492
554
  */
493
555
  class MatDialog {
556
+ _overlay = inject(Overlay);
557
+ _defaultOptions = inject(MAT_DIALOG_DEFAULT_OPTIONS, { optional: true });
558
+ _scrollStrategy = inject(MAT_DIALOG_SCROLL_STRATEGY);
559
+ _parentDialog = inject(MatDialog, { optional: true, skipSelf: true });
560
+ _idGenerator = inject(_IdGenerator);
561
+ _dialog = inject(Dialog);
562
+ _openDialogsAtThisLevel = [];
563
+ _afterAllClosedAtThisLevel = new Subject();
564
+ _afterOpenedAtThisLevel = new Subject();
565
+ dialogConfigClass = MatDialogConfig;
566
+ _dialogRefConstructor;
567
+ _dialogContainerType;
568
+ _dialogDataToken;
494
569
  /** Keeps track of the currently-open dialogs. */
495
570
  get openDialogs() {
496
571
  return this._parentDialog ? this._parentDialog.openDialogs : this._openDialogsAtThisLevel;
@@ -503,23 +578,14 @@ class MatDialog {
503
578
  const parent = this._parentDialog;
504
579
  return parent ? parent._getAfterAllClosed() : this._afterAllClosedAtThisLevel;
505
580
  }
581
+ /**
582
+ * Stream that emits when all open dialog have finished closing.
583
+ * Will emit on subscribe if there are no open dialogs to begin with.
584
+ */
585
+ afterAllClosed = defer(() => this.openDialogs.length
586
+ ? this._getAfterAllClosed()
587
+ : this._getAfterAllClosed().pipe(startWith(undefined)));
506
588
  constructor() {
507
- this._overlay = inject(Overlay);
508
- this._defaultOptions = inject(MAT_DIALOG_DEFAULT_OPTIONS, { optional: true });
509
- this._scrollStrategy = inject(MAT_DIALOG_SCROLL_STRATEGY);
510
- this._parentDialog = inject(MatDialog, { optional: true, skipSelf: true });
511
- this._dialog = inject(Dialog);
512
- this._openDialogsAtThisLevel = [];
513
- this._afterAllClosedAtThisLevel = new Subject();
514
- this._afterOpenedAtThisLevel = new Subject();
515
- this.dialogConfigClass = MatDialogConfig;
516
- /**
517
- * Stream that emits when all open dialog have finished closing.
518
- * Will emit on subscribe if there are no open dialogs to begin with.
519
- */
520
- this.afterAllClosed = defer(() => this.openDialogs.length
521
- ? this._getAfterAllClosed()
522
- : this._getAfterAllClosed().pipe(startWith(undefined)));
523
589
  this._dialogRefConstructor = MatDialogRef;
524
590
  this._dialogContainerType = MatDialogContainer;
525
591
  this._dialogDataToken = MAT_DIALOG_DATA;
@@ -527,7 +593,7 @@ class MatDialog {
527
593
  open(componentOrTemplateRef, config) {
528
594
  let dialogRef;
529
595
  config = { ...(this._defaultOptions || new MatDialogConfig()), ...config };
530
- config.id = config.id || `mat-mdc-dialog-${uniqueId++}`;
596
+ config.id = config.id || this._idGenerator.getId('mat-mdc-dialog-');
531
597
  config.scrollStrategy = config.scrollStrategy || this._scrollStrategy();
532
598
  const cdkRef = this._dialog.open(componentOrTemplateRef, {
533
599
  ...config,
@@ -605,27 +671,29 @@ class MatDialog {
605
671
  dialogs[i].close();
606
672
  }
607
673
  }
608
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: MatDialog, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
609
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: MatDialog, providedIn: 'root' }); }
674
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-rc.0", ngImport: i0, type: MatDialog, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
675
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.0-rc.0", ngImport: i0, type: MatDialog, providedIn: 'root' });
610
676
  }
611
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: MatDialog, decorators: [{
677
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-rc.0", ngImport: i0, type: MatDialog, decorators: [{
612
678
  type: Injectable,
613
679
  args: [{ providedIn: 'root' }]
614
680
  }], ctorParameters: () => [] });
615
681
 
616
- /** Counter used to generate unique IDs for dialog elements. */
617
- let dialogElementUid = 0;
618
682
  /**
619
683
  * Button that will close the current dialog.
620
684
  */
621
685
  class MatDialogClose {
622
- constructor() {
623
- this.dialogRef = inject(MatDialogRef, { optional: true });
624
- this._elementRef = inject(ElementRef);
625
- this._dialog = inject(MatDialog);
626
- /** Default to "button" to prevents accidental form submits. */
627
- this.type = 'button';
628
- }
686
+ dialogRef = inject(MatDialogRef, { optional: true });
687
+ _elementRef = inject(ElementRef);
688
+ _dialog = inject(MatDialog);
689
+ /** Screen-reader label for the button. */
690
+ ariaLabel;
691
+ /** Default to "button" to prevents accidental form submits. */
692
+ type = 'button';
693
+ /** Dialog close input. */
694
+ dialogResult;
695
+ _matDialogClose;
696
+ constructor() { }
629
697
  ngOnInit() {
630
698
  if (!this.dialogRef) {
631
699
  // When this directive is included in a dialog via TemplateRef (rather than being
@@ -649,10 +717,10 @@ class MatDialogClose {
649
717
  // the FocusMonitor won't detect any origin change, and will always output `program`.
650
718
  _closeDialogVia(this.dialogRef, event.screenX === 0 && event.screenY === 0 ? 'keyboard' : 'mouse', this.dialogResult);
651
719
  }
652
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: MatDialogClose, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
653
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.0-next.10", type: MatDialogClose, isStandalone: true, selector: "[mat-dialog-close], [matDialogClose]", inputs: { ariaLabel: ["aria-label", "ariaLabel"], type: "type", dialogResult: ["mat-dialog-close", "dialogResult"], _matDialogClose: ["matDialogClose", "_matDialogClose"] }, host: { listeners: { "click": "_onButtonClick($event)" }, properties: { "attr.aria-label": "ariaLabel || null", "attr.type": "type" } }, exportAs: ["matDialogClose"], usesOnChanges: true, ngImport: i0 }); }
720
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-rc.0", ngImport: i0, type: MatDialogClose, deps: [], target: i0.ɵɵFactoryTarget.Directive });
721
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.0-rc.0", type: MatDialogClose, isStandalone: true, selector: "[mat-dialog-close], [matDialogClose]", inputs: { ariaLabel: ["aria-label", "ariaLabel"], type: "type", dialogResult: ["mat-dialog-close", "dialogResult"], _matDialogClose: ["matDialogClose", "_matDialogClose"] }, host: { listeners: { "click": "_onButtonClick($event)" }, properties: { "attr.aria-label": "ariaLabel || null", "attr.type": "type" } }, exportAs: ["matDialogClose"], usesOnChanges: true, ngImport: i0 });
654
722
  }
655
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: MatDialogClose, decorators: [{
723
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-rc.0", ngImport: i0, type: MatDialogClose, decorators: [{
656
724
  type: Directive,
657
725
  args: [{
658
726
  selector: '[mat-dialog-close], [matDialogClose]',
@@ -676,11 +744,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.10",
676
744
  args: ['matDialogClose']
677
745
  }] } });
678
746
  class MatDialogLayoutSection {
679
- constructor() {
680
- this._dialogRef = inject(MatDialogRef, { optional: true });
681
- this._elementRef = inject(ElementRef);
682
- this._dialog = inject(MatDialog);
683
- }
747
+ _dialogRef = inject(MatDialogRef, { optional: true });
748
+ _elementRef = inject(ElementRef);
749
+ _dialog = inject(MatDialog);
750
+ constructor() { }
684
751
  ngOnInit() {
685
752
  if (!this._dialogRef) {
686
753
  this._dialogRef = getClosestDialog(this._elementRef, this._dialog.openDialogs);
@@ -701,20 +768,17 @@ class MatDialogLayoutSection {
701
768
  });
702
769
  }
703
770
  }
704
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: MatDialogLayoutSection, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
705
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.0-next.10", type: MatDialogLayoutSection, isStandalone: true, ngImport: i0 }); }
771
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-rc.0", ngImport: i0, type: MatDialogLayoutSection, deps: [], target: i0.ɵɵFactoryTarget.Directive });
772
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.0-rc.0", type: MatDialogLayoutSection, isStandalone: true, ngImport: i0 });
706
773
  }
707
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: MatDialogLayoutSection, decorators: [{
774
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-rc.0", ngImport: i0, type: MatDialogLayoutSection, decorators: [{
708
775
  type: Directive
709
776
  }], ctorParameters: () => [] });
710
777
  /**
711
778
  * Title of a dialog element. Stays fixed to the top of the dialog when scrolling.
712
779
  */
713
780
  class MatDialogTitle extends MatDialogLayoutSection {
714
- constructor() {
715
- super(...arguments);
716
- this.id = `mat-mdc-dialog-title-${dialogElementUid++}`;
717
- }
781
+ id = inject(_IdGenerator).getId('mat-mdc-dialog-title-');
718
782
  _onAdd() {
719
783
  // Note: we null check the queue, because there are some internal
720
784
  // tests that are mocking out `MatDialogRef` incorrectly.
@@ -723,10 +787,10 @@ class MatDialogTitle extends MatDialogLayoutSection {
723
787
  _onRemove() {
724
788
  this._dialogRef?._containerInstance?._removeAriaLabelledBy?.(this.id);
725
789
  }
726
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: MatDialogTitle, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
727
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.0-next.10", type: MatDialogTitle, isStandalone: true, selector: "[mat-dialog-title], [matDialogTitle]", inputs: { id: "id" }, host: { properties: { "id": "id" }, classAttribute: "mat-mdc-dialog-title mdc-dialog__title" }, exportAs: ["matDialogTitle"], usesInheritance: true, ngImport: i0 }); }
790
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-rc.0", ngImport: i0, type: MatDialogTitle, deps: null, target: i0.ɵɵFactoryTarget.Directive });
791
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.0-rc.0", type: MatDialogTitle, isStandalone: true, selector: "[mat-dialog-title], [matDialogTitle]", inputs: { id: "id" }, host: { properties: { "id": "id" }, classAttribute: "mat-mdc-dialog-title mdc-dialog__title" }, exportAs: ["matDialogTitle"], usesInheritance: true, ngImport: i0 });
728
792
  }
729
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: MatDialogTitle, decorators: [{
793
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-rc.0", ngImport: i0, type: MatDialogTitle, decorators: [{
730
794
  type: Directive,
731
795
  args: [{
732
796
  selector: '[mat-dialog-title], [matDialogTitle]',
@@ -743,10 +807,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.10",
743
807
  * Scrollable content container of a dialog.
744
808
  */
745
809
  class MatDialogContent {
746
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: MatDialogContent, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
747
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.0-next.10", type: MatDialogContent, isStandalone: true, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]", host: { classAttribute: "mat-mdc-dialog-content mdc-dialog__content" }, hostDirectives: [{ directive: i1.CdkScrollable }], ngImport: i0 }); }
810
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-rc.0", ngImport: i0, type: MatDialogContent, deps: [], target: i0.ɵɵFactoryTarget.Directive });
811
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.0-rc.0", type: MatDialogContent, isStandalone: true, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]", host: { classAttribute: "mat-mdc-dialog-content mdc-dialog__content" }, hostDirectives: [{ directive: i1.CdkScrollable }], ngImport: i0 });
748
812
  }
749
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: MatDialogContent, decorators: [{
813
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-rc.0", ngImport: i0, type: MatDialogContent, decorators: [{
750
814
  type: Directive,
751
815
  args: [{
752
816
  selector: `[mat-dialog-content], mat-dialog-content, [matDialogContent]`,
@@ -759,16 +823,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.10",
759
823
  * Stays fixed to the bottom when scrolling.
760
824
  */
761
825
  class MatDialogActions extends MatDialogLayoutSection {
826
+ /**
827
+ * Horizontal alignment of action buttons.
828
+ */
829
+ align;
762
830
  _onAdd() {
763
831
  this._dialogRef._containerInstance?._updateActionSectionCount?.(1);
764
832
  }
765
833
  _onRemove() {
766
834
  this._dialogRef._containerInstance?._updateActionSectionCount?.(-1);
767
835
  }
768
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: MatDialogActions, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
769
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.0-next.10", type: MatDialogActions, isStandalone: true, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: { align: "align" }, host: { properties: { "class.mat-mdc-dialog-actions-align-start": "align === \"start\"", "class.mat-mdc-dialog-actions-align-center": "align === \"center\"", "class.mat-mdc-dialog-actions-align-end": "align === \"end\"" }, classAttribute: "mat-mdc-dialog-actions mdc-dialog__actions" }, usesInheritance: true, ngImport: i0 }); }
836
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-rc.0", ngImport: i0, type: MatDialogActions, deps: null, target: i0.ɵɵFactoryTarget.Directive });
837
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.0-rc.0", type: MatDialogActions, isStandalone: true, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: { align: "align" }, host: { properties: { "class.mat-mdc-dialog-actions-align-start": "align === \"start\"", "class.mat-mdc-dialog-actions-align-center": "align === \"center\"", "class.mat-mdc-dialog-actions-align-end": "align === \"end\"" }, classAttribute: "mat-mdc-dialog-actions mdc-dialog__actions" }, usesInheritance: true, ngImport: i0 });
770
838
  }
771
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: MatDialogActions, decorators: [{
839
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-rc.0", ngImport: i0, type: MatDialogActions, decorators: [{
772
840
  type: Directive,
773
841
  args: [{
774
842
  selector: `[mat-dialog-actions], mat-dialog-actions, [matDialogActions]`,
@@ -803,8 +871,8 @@ const DIRECTIVES = [
803
871
  MatDialogContent,
804
872
  ];
805
873
  class MatDialogModule {
806
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: MatDialogModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
807
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.0-next.10", ngImport: i0, type: MatDialogModule, imports: [DialogModule, OverlayModule, PortalModule, MatCommonModule, MatDialogContainer,
874
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-rc.0", ngImport: i0, type: MatDialogModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
875
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.0-rc.0", ngImport: i0, type: MatDialogModule, imports: [DialogModule, OverlayModule, PortalModule, MatCommonModule, MatDialogContainer,
808
876
  MatDialogClose,
809
877
  MatDialogTitle,
810
878
  MatDialogActions,
@@ -812,10 +880,10 @@ class MatDialogModule {
812
880
  MatDialogClose,
813
881
  MatDialogTitle,
814
882
  MatDialogActions,
815
- MatDialogContent] }); }
816
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: MatDialogModule, providers: [MatDialog], imports: [DialogModule, OverlayModule, PortalModule, MatCommonModule, MatCommonModule] }); }
883
+ MatDialogContent] });
884
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.0-rc.0", ngImport: i0, type: MatDialogModule, providers: [MatDialog], imports: [DialogModule, OverlayModule, PortalModule, MatCommonModule, MatCommonModule] });
817
885
  }
818
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: MatDialogModule, decorators: [{
886
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-rc.0", ngImport: i0, type: MatDialogModule, decorators: [{
819
887
  type: NgModule,
820
888
  args: [{
821
889
  imports: [DialogModule, OverlayModule, PortalModule, MatCommonModule, ...DIRECTIVES],