@angular/material 19.2.3 → 20.0.0-next.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 (262) hide show
  1. package/autocomplete/index.d.ts +14 -7
  2. package/autocomplete/testing/index.d.ts +2 -1
  3. package/badge/index.d.ts +7 -98
  4. package/badge/testing/index.d.ts +3 -1
  5. package/badge.d-49a8a74b.d.ts +98 -0
  6. package/bottom-sheet/index.d.ts +2 -2
  7. package/button/index.d.ts +10 -220
  8. package/button-toggle/index.d.ts +10 -257
  9. package/button-toggle/testing/index.d.ts +4 -1
  10. package/button-toggle.d-edc8acff.d.ts +257 -0
  11. package/card/index.d.ts +3 -2
  12. package/checkbox/index.d.ts +7 -38
  13. package/chips/index.d.ts +9 -5
  14. package/common-module.d-0e6515ae.d.ts +43 -0
  15. package/core/index.d.ts +21 -846
  16. package/core/testing/index.d.ts +3 -61
  17. package/date-adapter.d-c6835d41.d.ts +267 -0
  18. package/date-range-input-harness.d-549a9f7e.d.ts +278 -0
  19. package/datepicker/index.d.ts +20 -14
  20. package/datepicker/testing/index.d.ts +5 -277
  21. package/dialog/index.d.ts +12 -360
  22. package/dialog/testing/index.d.ts +6 -1
  23. package/dialog.d-57867441.d.ts +335 -0
  24. package/divider/index.d.ts +3 -2
  25. package/divider/testing/index.d.ts +2 -14
  26. package/divider-harness.d-d34fede4.d.ts +14 -0
  27. package/error-options.d-448d9046.d.ts +17 -0
  28. package/expansion/index.d.ts +3 -2
  29. package/fesm2022/autocomplete/testing.mjs +2 -1
  30. package/fesm2022/autocomplete/testing.mjs.map +1 -1
  31. package/fesm2022/autocomplete.mjs +29 -17
  32. package/fesm2022/autocomplete.mjs.map +1 -1
  33. package/fesm2022/badge/testing.mjs.map +1 -1
  34. package/fesm2022/badge.mjs +12 -11
  35. package/fesm2022/badge.mjs.map +1 -1
  36. package/fesm2022/bottom-sheet.mjs +13 -11
  37. package/fesm2022/bottom-sheet.mjs.map +1 -1
  38. package/fesm2022/button-toggle/testing.mjs.map +1 -1
  39. package/fesm2022/button-toggle.mjs +17 -11
  40. package/fesm2022/button-toggle.mjs.map +1 -1
  41. package/fesm2022/button.mjs +14 -481
  42. package/fesm2022/button.mjs.map +1 -1
  43. package/fesm2022/card.mjs +49 -47
  44. package/fesm2022/card.mjs.map +1 -1
  45. package/fesm2022/checkbox.mjs +27 -68
  46. package/fesm2022/checkbox.mjs.map +1 -1
  47. package/fesm2022/chips.mjs +51 -42
  48. package/fesm2022/chips.mjs.map +1 -1
  49. package/fesm2022/common-module-2d64df09.mjs +42 -0
  50. package/fesm2022/common-module-2d64df09.mjs.map +1 -0
  51. package/fesm2022/core/testing.mjs +3 -76
  52. package/fesm2022/core/testing.mjs.map +1 -1
  53. package/fesm2022/core.mjs +38 -1598
  54. package/fesm2022/core.mjs.map +1 -1
  55. package/fesm2022/date-formats-b618acb8.mjs +190 -0
  56. package/fesm2022/date-formats-b618acb8.mjs.map +1 -0
  57. package/fesm2022/date-range-input-harness-ee47cdb0.mjs +467 -0
  58. package/fesm2022/date-range-input-harness-ee47cdb0.mjs.map +1 -0
  59. package/fesm2022/datepicker/testing.mjs +5 -465
  60. package/fesm2022/datepicker/testing.mjs.map +1 -1
  61. package/fesm2022/datepicker.mjs +119 -112
  62. package/fesm2022/datepicker.mjs.map +1 -1
  63. package/fesm2022/dialog/testing.mjs +12 -1
  64. package/fesm2022/dialog/testing.mjs.map +1 -1
  65. package/fesm2022/dialog.mjs +14 -897
  66. package/fesm2022/dialog.mjs.map +1 -1
  67. package/fesm2022/divider/testing.mjs +2 -17
  68. package/fesm2022/divider/testing.mjs.map +1 -1
  69. package/fesm2022/divider-harness-3394f29a.mjs +18 -0
  70. package/fesm2022/divider-harness-3394f29a.mjs.map +1 -0
  71. package/fesm2022/divider.mjs +10 -8
  72. package/fesm2022/divider.mjs.map +1 -1
  73. package/fesm2022/error-options-4a00765e.mjs +29 -0
  74. package/fesm2022/error-options-4a00765e.mjs.map +1 -0
  75. package/fesm2022/error-state-8f4ce1af.mjs +37 -0
  76. package/fesm2022/error-state-8f4ce1af.mjs.map +1 -0
  77. package/fesm2022/expansion.mjs +28 -26
  78. package/fesm2022/expansion.mjs.map +1 -1
  79. package/fesm2022/form-field/testing/control.mjs +2 -10
  80. package/fesm2022/form-field/testing/control.mjs.map +1 -1
  81. package/fesm2022/form-field/testing.mjs +7 -4
  82. package/fesm2022/form-field/testing.mjs.map +1 -1
  83. package/fesm2022/form-field-6d755764.mjs +1076 -0
  84. package/fesm2022/form-field-6d755764.mjs.map +1 -0
  85. package/fesm2022/form-field-control-harness-af6fd278.mjs +11 -0
  86. package/fesm2022/form-field-control-harness-af6fd278.mjs.map +1 -0
  87. package/fesm2022/form-field.mjs +14 -1106
  88. package/fesm2022/form-field.mjs.map +1 -1
  89. package/fesm2022/grid-list/testing.mjs +1 -1
  90. package/fesm2022/grid-list/testing.mjs.map +1 -1
  91. package/fesm2022/grid-list.mjs +30 -169
  92. package/fesm2022/grid-list.mjs.map +1 -1
  93. package/fesm2022/icon/testing.mjs +12 -8
  94. package/fesm2022/icon/testing.mjs.map +1 -1
  95. package/fesm2022/icon-button-47f1b5d9.mjs +248 -0
  96. package/fesm2022/icon-button-47f1b5d9.mjs.map +1 -0
  97. package/fesm2022/icon-module-3f77a24d.mjs +395 -0
  98. package/fesm2022/icon-module-3f77a24d.mjs.map +1 -0
  99. package/fesm2022/icon-registry-13a3b98e.mjs +639 -0
  100. package/fesm2022/icon-registry-13a3b98e.mjs.map +1 -0
  101. package/fesm2022/icon.mjs +11 -1024
  102. package/fesm2022/icon.mjs.map +1 -1
  103. package/fesm2022/index-1763d3a6.mjs +22 -0
  104. package/fesm2022/index-1763d3a6.mjs.map +1 -0
  105. package/fesm2022/index-4bc1d6d3.mjs +20 -0
  106. package/fesm2022/index-4bc1d6d3.mjs.map +1 -0
  107. package/fesm2022/input/testing.mjs +5 -113
  108. package/fesm2022/input/testing.mjs.map +1 -1
  109. package/fesm2022/input-harness-ed59decc.mjs +115 -0
  110. package/fesm2022/input-harness-ed59decc.mjs.map +1 -0
  111. package/fesm2022/input-value-accessor-8a79a24e.mjs +12 -0
  112. package/fesm2022/input-value-accessor-8a79a24e.mjs.map +1 -0
  113. package/fesm2022/input.mjs +21 -19
  114. package/fesm2022/input.mjs.map +1 -1
  115. package/fesm2022/internal-form-field-434c4039.mjs +27 -0
  116. package/fesm2022/internal-form-field-434c4039.mjs.map +1 -0
  117. package/fesm2022/line-d6afe347.mjs +59 -0
  118. package/fesm2022/line-d6afe347.mjs.map +1 -0
  119. package/fesm2022/list/testing.mjs +1 -1
  120. package/fesm2022/list/testing.mjs.map +1 -1
  121. package/fesm2022/list.mjs +57 -50
  122. package/fesm2022/list.mjs.map +1 -1
  123. package/fesm2022/menu.mjs +23 -19
  124. package/fesm2022/menu.mjs.map +1 -1
  125. package/fesm2022/module-3bf2775f.mjs +1293 -0
  126. package/fesm2022/module-3bf2775f.mjs.map +1 -0
  127. package/fesm2022/module-47e3be58.mjs +970 -0
  128. package/fesm2022/module-47e3be58.mjs.map +1 -0
  129. package/fesm2022/module-a5f9ab72.mjs +875 -0
  130. package/fesm2022/module-a5f9ab72.mjs.map +1 -0
  131. package/fesm2022/module-d757bba0.mjs +38 -0
  132. package/fesm2022/module-d757bba0.mjs.map +1 -0
  133. package/fesm2022/module-df9f7af3.mjs +152 -0
  134. package/fesm2022/module-df9f7af3.mjs.map +1 -0
  135. package/fesm2022/optgroup-harness-5e66b138.mjs +36 -0
  136. package/fesm2022/optgroup-harness-5e66b138.mjs.map +1 -0
  137. package/fesm2022/option-07c3c660.mjs +348 -0
  138. package/fesm2022/option-07c3c660.mjs.map +1 -0
  139. package/fesm2022/option-harness-3b7c1106.mjs +46 -0
  140. package/fesm2022/option-harness-3b7c1106.mjs.map +1 -0
  141. package/fesm2022/paginator/testing.mjs +4 -1
  142. package/fesm2022/paginator/testing.mjs.map +1 -1
  143. package/fesm2022/paginator.mjs +41 -15
  144. package/fesm2022/paginator.mjs.map +1 -1
  145. package/fesm2022/progress-bar.mjs +10 -8
  146. package/fesm2022/progress-bar.mjs.map +1 -1
  147. package/fesm2022/progress-spinner/testing.mjs.map +1 -1
  148. package/fesm2022/progress-spinner.mjs +10 -8
  149. package/fesm2022/progress-spinner.mjs.map +1 -1
  150. package/fesm2022/pseudo-checkbox-af5a4ea4.mjs +52 -0
  151. package/fesm2022/pseudo-checkbox-af5a4ea4.mjs.map +1 -0
  152. package/fesm2022/pseudo-checkbox-module-216fae38.mjs +20 -0
  153. package/fesm2022/pseudo-checkbox-module-216fae38.mjs.map +1 -0
  154. package/fesm2022/public-api-c5ab57f5.mjs +147 -0
  155. package/fesm2022/public-api-c5ab57f5.mjs.map +1 -0
  156. package/fesm2022/radio.mjs +18 -11
  157. package/fesm2022/radio.mjs.map +1 -1
  158. package/fesm2022/ripple-9939d1f5.mjs +639 -0
  159. package/fesm2022/ripple-9939d1f5.mjs.map +1 -0
  160. package/fesm2022/ripple-loader-f2078c66.mjs +165 -0
  161. package/fesm2022/ripple-loader-f2078c66.mjs.map +1 -0
  162. package/fesm2022/select/testing.mjs +5 -121
  163. package/fesm2022/select/testing.mjs.map +1 -1
  164. package/fesm2022/select-harness-8c55824d.mjs +123 -0
  165. package/fesm2022/select-harness-8c55824d.mjs.map +1 -0
  166. package/fesm2022/select.mjs +30 -1315
  167. package/fesm2022/select.mjs.map +1 -1
  168. package/fesm2022/sidenav.mjs +23 -23
  169. package/fesm2022/sidenav.mjs.map +1 -1
  170. package/fesm2022/slide-toggle.mjs +27 -71
  171. package/fesm2022/slide-toggle.mjs.map +1 -1
  172. package/fesm2022/slider.mjs +22 -17
  173. package/fesm2022/slider.mjs.map +1 -1
  174. package/fesm2022/snack-bar.mjs +32 -24
  175. package/fesm2022/snack-bar.mjs.map +1 -1
  176. package/fesm2022/sort/testing.mjs.map +1 -1
  177. package/fesm2022/sort.mjs +16 -14
  178. package/fesm2022/sort.mjs.map +1 -1
  179. package/fesm2022/stepper.mjs +42 -33
  180. package/fesm2022/stepper.mjs.map +1 -1
  181. package/fesm2022/structural-styles-d5ada3b3.mjs +18 -0
  182. package/fesm2022/structural-styles-d5ada3b3.mjs.map +1 -0
  183. package/fesm2022/table.mjs +58 -56
  184. package/fesm2022/table.mjs.map +1 -1
  185. package/fesm2022/tabs.mjs +47 -44
  186. package/fesm2022/tabs.mjs.map +1 -1
  187. package/fesm2022/timepicker/testing.mjs +1 -1
  188. package/fesm2022/timepicker/testing.mjs.map +1 -1
  189. package/fesm2022/timepicker.mjs +31 -20
  190. package/fesm2022/timepicker.mjs.map +1 -1
  191. package/fesm2022/toolbar.mjs +13 -11
  192. package/fesm2022/toolbar.mjs.map +1 -1
  193. package/fesm2022/tooltip.mjs +15 -968
  194. package/fesm2022/tooltip.mjs.map +1 -1
  195. package/fesm2022/tree.mjs +28 -26
  196. package/fesm2022/tree.mjs.map +1 -1
  197. package/form-field/index.d.ts +12 -437
  198. package/form-field/testing/control/index.d.ts +2 -10
  199. package/form-field/testing/index.d.ts +7 -5
  200. package/form-field-control-harness.d-2d91f25a.d.ts +10 -0
  201. package/form-field-control.d-eb86711c.d.ts +62 -0
  202. package/form-field.d-2edbc094.d.ts +367 -0
  203. package/grid-list/index.d.ts +5 -3
  204. package/icon/index.d.ts +9 -449
  205. package/icon/testing/index.d.ts +3 -1
  206. package/icon-module.d-aa3bbba0.d.ts +167 -0
  207. package/icon-registry.d-1dffe9de.d.ts +286 -0
  208. package/index.d-0536b706.d.ts +11 -0
  209. package/index.d-37e31cd3.d.ts +13 -0
  210. package/input/index.d.ts +11 -6
  211. package/input/testing/index.d.ts +4 -59
  212. package/input-harness.d-4eecd1d3.d.ts +60 -0
  213. package/line.d-570a2537.d.ts +25 -0
  214. package/list/index.d.ts +13 -19
  215. package/list/testing/index.d.ts +2 -2
  216. package/list-option-types.d-8739f903.d.ts +15 -0
  217. package/menu/index.d.ts +6 -3
  218. package/module.d-18a67f56.d.ts +206 -0
  219. package/module.d-74a721b9.d.ts +326 -0
  220. package/module.d-ba05faa6.d.ts +448 -0
  221. package/module.d-c17c834e.d.ts +18 -0
  222. package/optgroup-harness.d-7f741f69.d.ts +31 -0
  223. package/option-harness.d-3d33fc9a.d.ts +34 -0
  224. package/option-parent.d-559ad5c5.d.ts +19 -0
  225. package/option.d-6f493d78.d.ts +146 -0
  226. package/package.json +6 -6
  227. package/paginator/index.d.ts +29 -201
  228. package/paginator/testing/index.d.ts +4 -1
  229. package/paginator.d-40b1766e.d.ts +199 -0
  230. package/palette.d-ec4a617c.d.ts +4 -0
  231. package/progress-bar/index.d.ts +4 -3
  232. package/progress-spinner/index.d.ts +7 -96
  233. package/progress-spinner/testing/index.d.ts +3 -1
  234. package/progress-spinner.d-1fc040c5.d.ts +96 -0
  235. package/pseudo-checkbox-module.d-3abc0461.d.ts +44 -0
  236. package/radio/index.d.ts +7 -3
  237. package/ripple-loader.d-8aac2988.d.ts +48 -0
  238. package/ripple.d-2fb57d04.d.ts +255 -0
  239. package/schematics/migration.json +4 -4
  240. package/schematics/ng-add/index.js +2 -2
  241. package/schematics/ng-add/index.mjs +2 -2
  242. package/schematics/ng-update/index_bundled.js +4 -4
  243. package/schematics/ng-update/index_bundled.js.map +1 -1
  244. package/select/index.d.ts +24 -451
  245. package/select/testing/index.d.ts +5 -62
  246. package/select-harness.d-7441a7ac.d.ts +63 -0
  247. package/sidenav/index.d.ts +4 -3
  248. package/slide-toggle/index.d.ts +7 -45
  249. package/slider/index.d.ts +6 -3
  250. package/snack-bar/index.d.ts +8 -3
  251. package/sort/index.d.ts +10 -88
  252. package/sort/testing/index.d.ts +1 -1
  253. package/sort-direction.d-f4ce4649.d.ts +3 -0
  254. package/sort.d-c2b79a45.d.ts +87 -0
  255. package/stepper/index.d.ts +9 -4
  256. package/table/index.d.ts +11 -4
  257. package/tabs/index.d.ts +5 -3
  258. package/timepicker/index.d.ts +7 -4
  259. package/timepicker/testing/index.d.ts +1 -1
  260. package/toolbar/index.d.ts +3 -2
  261. package/tooltip/index.d.ts +10 -325
  262. package/tree/index.d.ts +3 -2
@@ -1,899 +1,16 @@
1
- import * as i0 from '@angular/core';
2
- import { inject, ANIMATION_MODULE_TYPE, EventEmitter, Component, ViewEncapsulation, ChangeDetectionStrategy, InjectionToken, Injectable, ElementRef, Directive, Input, NgModule } from '@angular/core';
3
- import { _IdGenerator } from '@angular/cdk/a11y';
4
- import * as i1 from '@angular/cdk/scrolling';
5
- import { CdkScrollable } from '@angular/cdk/scrolling';
6
- import { Overlay, OverlayModule } from '@angular/cdk/overlay';
7
- import { CdkDialogContainer, Dialog, DialogConfig, DialogModule } from '@angular/cdk/dialog';
8
- import { coerceNumberProperty } from '@angular/cdk/coercion';
9
- import { CdkPortalOutlet, PortalModule } from '@angular/cdk/portal';
10
- import { Subject, merge, defer } from 'rxjs';
11
- import { filter, take, startWith } from 'rxjs/operators';
12
- import { ESCAPE, hasModifierKey } from '@angular/cdk/keycodes';
13
- import { MatCommonModule } from '@angular/material/core';
14
-
15
- /**
16
- * Configuration for opening a modal dialog with the MatDialog service.
17
- */
18
- class MatDialogConfig {
19
- /**
20
- * Where the attached component should live in Angular's *logical* component tree.
21
- * This affects what is available for injection and the change detection order for the
22
- * component instantiated inside of the dialog. This does not affect where the dialog
23
- * content will be rendered.
24
- */
25
- viewContainerRef;
26
- /**
27
- * Injector used for the instantiation of the component to be attached. If provided,
28
- * takes precedence over the injector indirectly provided by `ViewContainerRef`.
29
- */
30
- injector;
31
- /** ID for the dialog. If omitted, a unique one will be generated. */
32
- id;
33
- /** The ARIA role of the dialog element. */
34
- role = 'dialog';
35
- /** Custom class for the overlay pane. */
36
- panelClass = '';
37
- /** Whether the dialog has a backdrop. */
38
- hasBackdrop = true;
39
- /** Custom class for the backdrop. */
40
- backdropClass = '';
41
- /** Whether the user can use escape or clicking on the backdrop to close the modal. */
42
- disableClose = false;
43
- /** Width of the dialog. */
44
- width = '';
45
- /** Height of the dialog. */
46
- height = '';
47
- /** Min-width of the dialog. If a number is provided, assumes pixel units. */
48
- minWidth;
49
- /** Min-height of the dialog. If a number is provided, assumes pixel units. */
50
- minHeight;
51
- /** Max-width of the dialog. If a number is provided, assumes pixel units. Defaults to 80vw. */
52
- maxWidth;
53
- /** Max-height of the dialog. If a number is provided, assumes pixel units. */
54
- maxHeight;
55
- /** Position overrides. */
56
- position;
57
- /** Data being injected into the child component. */
58
- data = null;
59
- /** Layout direction for the dialog's content. */
60
- direction;
61
- /** ID of the element that describes the dialog. */
62
- ariaDescribedBy = null;
63
- /** ID of the element that labels the dialog. */
64
- ariaLabelledBy = null;
65
- /** Aria label to assign to the dialog element. */
66
- ariaLabel = null;
67
- /**
68
- * Whether this is a modal dialog. Used to set the `aria-modal` attribute. Off by default,
69
- * because it can interfere with other overlay-based components (e.g. `mat-select`) and because
70
- * it is redundant since the dialog marks all outside content as `aria-hidden` anyway.
71
- */
72
- ariaModal = false;
73
- /**
74
- * Where the dialog should focus on open.
75
- * @breaking-change 14.0.0 Remove boolean option from autoFocus. Use string or
76
- * AutoFocusTarget instead.
77
- */
78
- autoFocus = 'first-tabbable';
79
- /**
80
- * Whether the dialog should restore focus to the
81
- * previously-focused element, after it's closed.
82
- */
83
- restoreFocus = true;
84
- /** Whether to wait for the opening animation to finish before trapping focus. */
85
- delayFocusTrap = true;
86
- /** Scroll strategy to be used for the dialog. */
87
- scrollStrategy;
88
- /**
89
- * Whether the dialog should close when the user goes backwards/forwards in history.
90
- * Note that this usually doesn't include clicking on links (unless the user is using
91
- * the `HashLocationStrategy`).
92
- */
93
- closeOnNavigation = true;
94
- /**
95
- * Alternate `ComponentFactoryResolver` to use when resolving the associated component.
96
- * @deprecated No longer used. Will be removed.
97
- * @breaking-change 20.0.0
98
- */
99
- componentFactoryResolver;
100
- /**
101
- * Duration of the enter animation in ms.
102
- * Should be a number, string type is deprecated.
103
- * @breaking-change 17.0.0 Remove string signature.
104
- */
105
- enterAnimationDuration;
106
- /**
107
- * Duration of the exit animation in ms.
108
- * Should be a number, string type is deprecated.
109
- * @breaking-change 17.0.0 Remove string signature.
110
- */
111
- exitAnimationDuration;
112
- }
113
-
114
- /** Class added when the dialog is open. */
115
- const OPEN_CLASS = 'mdc-dialog--open';
116
- /** Class added while the dialog is opening. */
117
- const OPENING_CLASS = 'mdc-dialog--opening';
118
- /** Class added while the dialog is closing. */
119
- const CLOSING_CLASS = 'mdc-dialog--closing';
120
- /** Duration of the opening animation in milliseconds. */
121
- const OPEN_ANIMATION_DURATION = 150;
122
- /** Duration of the closing animation in milliseconds. */
123
- const CLOSE_ANIMATION_DURATION = 75;
124
- class MatDialogContainer extends CdkDialogContainer {
125
- _animationMode = inject(ANIMATION_MODULE_TYPE, { optional: true });
126
- /** Emits when an animation state changes. */
127
- _animationStateChanged = new EventEmitter();
128
- /** Whether animations are enabled. */
129
- _animationsEnabled = this._animationMode !== 'NoopAnimations';
130
- /** Number of actions projected in the dialog. */
131
- _actionSectionCount = 0;
132
- /** Host element of the dialog container component. */
133
- _hostElement = this._elementRef.nativeElement;
134
- /** Duration of the dialog open animation. */
135
- _enterAnimationDuration = this._animationsEnabled
136
- ? parseCssTime(this._config.enterAnimationDuration) ?? OPEN_ANIMATION_DURATION
137
- : 0;
138
- /** Duration of the dialog close animation. */
139
- _exitAnimationDuration = this._animationsEnabled
140
- ? parseCssTime(this._config.exitAnimationDuration) ?? CLOSE_ANIMATION_DURATION
141
- : 0;
142
- /** Current timer for dialog animations. */
143
- _animationTimer = null;
144
- _contentAttached() {
145
- // Delegate to the original dialog-container initialization (i.e. saving the
146
- // previous element, setting up the focus trap and moving focus to the container).
147
- super._contentAttached();
148
- // Note: Usually we would be able to use the MDC dialog foundation here to handle
149
- // the dialog animation for us, but there are a few reasons why we just leverage
150
- // their styles and not use the runtime foundation code:
151
- // 1. Foundation does not allow us to disable animations.
152
- // 2. Foundation contains unnecessary features we don't need and aren't
153
- // tree-shakeable. e.g. background scrim, keyboard event handlers for ESC button.
154
- this._startOpenAnimation();
155
- }
156
- /** Starts the dialog open animation if enabled. */
157
- _startOpenAnimation() {
158
- this._animationStateChanged.emit({ state: 'opening', totalTime: this._enterAnimationDuration });
159
- if (this._animationsEnabled) {
160
- this._hostElement.style.setProperty(TRANSITION_DURATION_PROPERTY, `${this._enterAnimationDuration}ms`);
161
- // We need to give the `setProperty` call from above some time to be applied.
162
- // One would expect that the open class is added once the animation finished, but MDC
163
- // uses the open class in combination with the opening class to start the animation.
164
- this._requestAnimationFrame(() => this._hostElement.classList.add(OPENING_CLASS, OPEN_CLASS));
165
- this._waitForAnimationToComplete(this._enterAnimationDuration, this._finishDialogOpen);
166
- }
167
- else {
168
- this._hostElement.classList.add(OPEN_CLASS);
169
- // Note: We could immediately finish the dialog opening here with noop animations,
170
- // but we defer until next tick so that consumers can subscribe to `afterOpened`.
171
- // Executing this immediately would mean that `afterOpened` emits synchronously
172
- // on `dialog.open` before the consumer had a change to subscribe to `afterOpened`.
173
- Promise.resolve().then(() => this._finishDialogOpen());
174
- }
175
- }
176
- /**
177
- * Starts the exit animation of the dialog if enabled. This method is
178
- * called by the dialog ref.
179
- */
180
- _startExitAnimation() {
181
- this._animationStateChanged.emit({ state: 'closing', totalTime: this._exitAnimationDuration });
182
- this._hostElement.classList.remove(OPEN_CLASS);
183
- if (this._animationsEnabled) {
184
- this._hostElement.style.setProperty(TRANSITION_DURATION_PROPERTY, `${this._exitAnimationDuration}ms`);
185
- // We need to give the `setProperty` call from above some time to be applied.
186
- this._requestAnimationFrame(() => this._hostElement.classList.add(CLOSING_CLASS));
187
- this._waitForAnimationToComplete(this._exitAnimationDuration, this._finishDialogClose);
188
- }
189
- else {
190
- // This subscription to the `OverlayRef#backdropClick` observable in the `DialogRef` is
191
- // set up before any user can subscribe to the backdrop click. The subscription triggers
192
- // the dialog close and this method synchronously. If we'd synchronously emit the `CLOSED`
193
- // animation state event if animations are disabled, the overlay would be disposed
194
- // immediately and all other subscriptions to `DialogRef#backdropClick` would be silently
195
- // skipped. We work around this by waiting with the dialog close until the next tick when
196
- // all subscriptions have been fired as expected. This is not an ideal solution, but
197
- // there doesn't seem to be any other good way. Alternatives that have been considered:
198
- // 1. Deferring `DialogRef.close`. This could be a breaking change due to a new microtask.
199
- // Also this issue is specific to the MDC implementation where the dialog could
200
- // technically be closed synchronously. In the non-MDC one, Angular animations are used
201
- // and closing always takes at least a tick.
202
- // 2. Ensuring that user subscriptions to `backdropClick`, `keydownEvents` in the dialog
203
- // ref are first. This would solve the issue, but has the risk of memory leaks and also
204
- // doesn't solve the case where consumers call `DialogRef.close` in their subscriptions.
205
- // Based on the fact that this is specific to the MDC-based implementation of the dialog
206
- // animations, the defer is applied here.
207
- Promise.resolve().then(() => this._finishDialogClose());
208
- }
209
- }
210
- /**
211
- * Updates the number action sections.
212
- * @param delta Increase/decrease in the number of sections.
213
- */
214
- _updateActionSectionCount(delta) {
215
- this._actionSectionCount += delta;
216
- this._changeDetectorRef.markForCheck();
217
- }
218
- /**
219
- * Completes the dialog open by clearing potential animation classes, trapping
220
- * focus and emitting an opened event.
221
- */
222
- _finishDialogOpen = () => {
223
- this._clearAnimationClasses();
224
- this._openAnimationDone(this._enterAnimationDuration);
225
- };
226
- /**
227
- * Completes the dialog close by clearing potential animation classes, restoring
228
- * focus and emitting a closed event.
229
- */
230
- _finishDialogClose = () => {
231
- this._clearAnimationClasses();
232
- this._animationStateChanged.emit({ state: 'closed', totalTime: this._exitAnimationDuration });
233
- };
234
- /** Clears all dialog animation classes. */
235
- _clearAnimationClasses() {
236
- this._hostElement.classList.remove(OPENING_CLASS, CLOSING_CLASS);
237
- }
238
- _waitForAnimationToComplete(duration, callback) {
239
- if (this._animationTimer !== null) {
240
- clearTimeout(this._animationTimer);
241
- }
242
- // Note that we want this timer to run inside the NgZone, because we want
243
- // the related events like `afterClosed` to be inside the zone as well.
244
- this._animationTimer = setTimeout(callback, duration);
245
- }
246
- /** Runs a callback in `requestAnimationFrame`, if available. */
247
- _requestAnimationFrame(callback) {
248
- this._ngZone.runOutsideAngular(() => {
249
- if (typeof requestAnimationFrame === 'function') {
250
- requestAnimationFrame(callback);
251
- }
252
- else {
253
- callback();
254
- }
255
- });
256
- }
257
- _captureInitialFocus() {
258
- if (!this._config.delayFocusTrap) {
259
- this._trapFocus();
260
- }
261
- }
262
- /**
263
- * Callback for when the open dialog animation has finished. Intended to
264
- * be called by sub-classes that use different animation implementations.
265
- */
266
- _openAnimationDone(totalTime) {
267
- if (this._config.delayFocusTrap) {
268
- this._trapFocus();
269
- }
270
- this._animationStateChanged.next({ state: 'opened', totalTime });
271
- }
272
- ngOnDestroy() {
273
- super.ngOnDestroy();
274
- if (this._animationTimer !== null) {
275
- clearTimeout(this._animationTimer);
276
- }
277
- }
278
- attachComponentPortal(portal) {
279
- // When a component is passed into the dialog, the host element interrupts
280
- // the `display:flex` from affecting the dialog title, content, and
281
- // actions. To fix this, we make the component host `display: contents` by
282
- // marking its host with the `mat-mdc-dialog-component-host` class.
283
- //
284
- // Note that this problem does not exist when a template ref is used since
285
- // the title, contents, and actions are then nested directly under the
286
- // dialog surface.
287
- const ref = super.attachComponentPortal(portal);
288
- ref.location.nativeElement.classList.add('mat-mdc-dialog-component-host');
289
- return ref;
290
- }
291
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: MatDialogContainer, deps: null, target: i0.ɵɵFactoryTarget.Component });
292
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.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 });
293
- }
294
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: MatDialogContainer, decorators: [{
295
- type: Component,
296
- args: [{ selector: 'mat-dialog-container', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.Default, imports: [CdkPortalOutlet], host: {
297
- 'class': 'mat-mdc-dialog-container mdc-dialog',
298
- 'tabindex': '-1',
299
- '[attr.aria-modal]': '_config.ariaModal',
300
- '[id]': '_config.id',
301
- '[attr.role]': '_config.role',
302
- '[attr.aria-labelledby]': '_config.ariaLabel ? null : _ariaLabelledByQueue[0]',
303
- '[attr.aria-label]': '_config.ariaLabel',
304
- '[attr.aria-describedby]': '_config.ariaDescribedBy || null',
305
- '[class._mat-animation-noopable]': '!_animationsEnabled',
306
- '[class.mat-mdc-dialog-container-with-actions]': '_actionSectionCount > 0',
307
- }, 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}"] }]
308
- }] });
309
- const TRANSITION_DURATION_PROPERTY = '--mat-dialog-transition-duration';
310
- // TODO(mmalerba): Remove this function after animation durations are required
311
- // to be numbers.
312
- /**
313
- * Converts a CSS time string to a number in ms. If the given time is already a
314
- * number, it is assumed to be in ms.
315
- */
316
- function parseCssTime(time) {
317
- if (time == null) {
318
- return null;
319
- }
320
- if (typeof time === 'number') {
321
- return time;
322
- }
323
- if (time.endsWith('ms')) {
324
- return coerceNumberProperty(time.substring(0, time.length - 2));
325
- }
326
- if (time.endsWith('s')) {
327
- return coerceNumberProperty(time.substring(0, time.length - 1)) * 1000;
328
- }
329
- if (time === '0') {
330
- return 0;
331
- }
332
- return null; // anything else is invalid.
333
- }
334
-
335
- var MatDialogState;
336
- (function (MatDialogState) {
337
- MatDialogState[MatDialogState["OPEN"] = 0] = "OPEN";
338
- MatDialogState[MatDialogState["CLOSING"] = 1] = "CLOSING";
339
- MatDialogState[MatDialogState["CLOSED"] = 2] = "CLOSED";
340
- })(MatDialogState || (MatDialogState = {}));
341
- /**
342
- * Reference to a dialog opened via the MatDialog service.
343
- */
344
- class MatDialogRef {
345
- _ref;
346
- _containerInstance;
347
- /** The instance of component opened into the dialog. */
348
- componentInstance;
349
- /**
350
- * `ComponentRef` of the component opened into the dialog. Will be
351
- * null when the dialog is opened using a `TemplateRef`.
352
- */
353
- componentRef;
354
- /** Whether the user is allowed to close the dialog. */
355
- disableClose;
356
- /** Unique ID for the dialog. */
357
- id;
358
- /** Subject for notifying the user that the dialog has finished opening. */
359
- _afterOpened = new Subject();
360
- /** Subject for notifying the user that the dialog has started closing. */
361
- _beforeClosed = new Subject();
362
- /** Result to be passed to afterClosed. */
363
- _result;
364
- /** Handle to the timeout that's running as a fallback in case the exit animation doesn't fire. */
365
- _closeFallbackTimeout;
366
- /** Current state of the dialog. */
367
- _state = MatDialogState.OPEN;
368
- // TODO(crisbeto): we shouldn't have to declare this property, because `DialogRef.close`
369
- // already has a second `options` parameter that we can use. The problem is that internal tests
370
- // have assertions like `expect(MatDialogRef.close).toHaveBeenCalledWith(foo)` which will break,
371
- // because it'll be called with two arguments by things like `MatDialogClose`.
372
- /** Interaction that caused the dialog to close. */
373
- _closeInteractionType;
374
- constructor(_ref, config, _containerInstance) {
375
- this._ref = _ref;
376
- this._containerInstance = _containerInstance;
377
- this.disableClose = config.disableClose;
378
- this.id = _ref.id;
379
- // Used to target panels specifically tied to dialogs.
380
- _ref.addPanelClass('mat-mdc-dialog-panel');
381
- // Emit when opening animation completes
382
- _containerInstance._animationStateChanged
383
- .pipe(filter(event => event.state === 'opened'), take(1))
384
- .subscribe(() => {
385
- this._afterOpened.next();
386
- this._afterOpened.complete();
387
- });
388
- // Dispose overlay when closing animation is complete
389
- _containerInstance._animationStateChanged
390
- .pipe(filter(event => event.state === 'closed'), take(1))
391
- .subscribe(() => {
392
- clearTimeout(this._closeFallbackTimeout);
393
- this._finishDialogClose();
394
- });
395
- _ref.overlayRef.detachments().subscribe(() => {
396
- this._beforeClosed.next(this._result);
397
- this._beforeClosed.complete();
398
- this._finishDialogClose();
399
- });
400
- merge(this.backdropClick(), this.keydownEvents().pipe(filter(event => event.keyCode === ESCAPE && !this.disableClose && !hasModifierKey(event)))).subscribe(event => {
401
- if (!this.disableClose) {
402
- event.preventDefault();
403
- _closeDialogVia(this, event.type === 'keydown' ? 'keyboard' : 'mouse');
404
- }
405
- });
406
- }
407
- /**
408
- * Close the dialog.
409
- * @param dialogResult Optional result to return to the dialog opener.
410
- */
411
- close(dialogResult) {
412
- this._result = dialogResult;
413
- // Transition the backdrop in parallel to the dialog.
414
- this._containerInstance._animationStateChanged
415
- .pipe(filter(event => event.state === 'closing'), take(1))
416
- .subscribe(event => {
417
- this._beforeClosed.next(dialogResult);
418
- this._beforeClosed.complete();
419
- this._ref.overlayRef.detachBackdrop();
420
- // The logic that disposes of the overlay depends on the exit animation completing, however
421
- // it isn't guaranteed if the parent view is destroyed while it's running. Add a fallback
422
- // timeout which will clean everything up if the animation hasn't fired within the specified
423
- // amount of time plus 100ms. We don't need to run this outside the NgZone, because for the
424
- // vast majority of cases the timeout will have been cleared before it has the chance to fire.
425
- this._closeFallbackTimeout = setTimeout(() => this._finishDialogClose(), event.totalTime + 100);
426
- });
427
- this._state = MatDialogState.CLOSING;
428
- this._containerInstance._startExitAnimation();
429
- }
430
- /**
431
- * Gets an observable that is notified when the dialog is finished opening.
432
- */
433
- afterOpened() {
434
- return this._afterOpened;
435
- }
436
- /**
437
- * Gets an observable that is notified when the dialog is finished closing.
438
- */
439
- afterClosed() {
440
- return this._ref.closed;
441
- }
442
- /**
443
- * Gets an observable that is notified when the dialog has started closing.
444
- */
445
- beforeClosed() {
446
- return this._beforeClosed;
447
- }
448
- /**
449
- * Gets an observable that emits when the overlay's backdrop has been clicked.
450
- */
451
- backdropClick() {
452
- return this._ref.backdropClick;
453
- }
454
- /**
455
- * Gets an observable that emits when keydown events are targeted on the overlay.
456
- */
457
- keydownEvents() {
458
- return this._ref.keydownEvents;
459
- }
460
- /**
461
- * Updates the dialog's position.
462
- * @param position New dialog position.
463
- */
464
- updatePosition(position) {
465
- let strategy = this._ref.config.positionStrategy;
466
- if (position && (position.left || position.right)) {
467
- position.left ? strategy.left(position.left) : strategy.right(position.right);
468
- }
469
- else {
470
- strategy.centerHorizontally();
471
- }
472
- if (position && (position.top || position.bottom)) {
473
- position.top ? strategy.top(position.top) : strategy.bottom(position.bottom);
474
- }
475
- else {
476
- strategy.centerVertically();
477
- }
478
- this._ref.updatePosition();
479
- return this;
480
- }
481
- /**
482
- * Updates the dialog's width and height.
483
- * @param width New width of the dialog.
484
- * @param height New height of the dialog.
485
- */
486
- updateSize(width = '', height = '') {
487
- this._ref.updateSize(width, height);
488
- return this;
489
- }
490
- /** Add a CSS class or an array of classes to the overlay pane. */
491
- addPanelClass(classes) {
492
- this._ref.addPanelClass(classes);
493
- return this;
494
- }
495
- /** Remove a CSS class or an array of classes from the overlay pane. */
496
- removePanelClass(classes) {
497
- this._ref.removePanelClass(classes);
498
- return this;
499
- }
500
- /** Gets the current state of the dialog's lifecycle. */
501
- getState() {
502
- return this._state;
503
- }
504
- /**
505
- * Finishes the dialog close by updating the state of the dialog
506
- * and disposing the overlay.
507
- */
508
- _finishDialogClose() {
509
- this._state = MatDialogState.CLOSED;
510
- this._ref.close(this._result, { focusOrigin: this._closeInteractionType });
511
- this.componentInstance = null;
512
- }
513
- }
514
- /**
515
- * Closes the dialog with the specified interaction type. This is currently not part of
516
- * `MatDialogRef` as that would conflict with custom dialog ref mocks provided in tests.
517
- * More details. See: https://github.com/angular/components/pull/9257#issuecomment-651342226.
518
- */
519
- // TODO: Move this back into `MatDialogRef` when we provide an official mock dialog ref.
520
- function _closeDialogVia(ref, interactionType, result) {
521
- ref._closeInteractionType = interactionType;
522
- return ref.close(result);
523
- }
524
-
525
- /** Injection token that can be used to access the data that was passed in to a dialog. */
526
- const MAT_DIALOG_DATA = new InjectionToken('MatMdcDialogData');
527
- /** Injection token that can be used to specify default dialog options. */
528
- const MAT_DIALOG_DEFAULT_OPTIONS = new InjectionToken('mat-mdc-dialog-default-options');
529
- /** Injection token that determines the scroll handling while the dialog is open. */
530
- const MAT_DIALOG_SCROLL_STRATEGY = new InjectionToken('mat-mdc-dialog-scroll-strategy', {
531
- providedIn: 'root',
532
- factory: () => {
533
- const overlay = inject(Overlay);
534
- return () => overlay.scrollStrategies.block();
535
- },
536
- });
537
- /**
538
- * @docs-private
539
- * @deprecated No longer used. To be removed.
540
- * @breaking-change 19.0.0
541
- */
542
- function MAT_DIALOG_SCROLL_STRATEGY_PROVIDER_FACTORY(overlay) {
543
- return () => overlay.scrollStrategies.block();
544
- }
545
- /**
546
- * @docs-private
547
- * @deprecated No longer used. To be removed.
548
- * @breaking-change 19.0.0
549
- */
550
- const MAT_DIALOG_SCROLL_STRATEGY_PROVIDER = {
551
- provide: MAT_DIALOG_SCROLL_STRATEGY,
552
- deps: [Overlay],
553
- useFactory: MAT_DIALOG_SCROLL_STRATEGY_PROVIDER_FACTORY,
554
- };
555
- /**
556
- * Service to open Material Design modal dialogs.
557
- */
558
- class MatDialog {
559
- _overlay = inject(Overlay);
560
- _defaultOptions = inject(MAT_DIALOG_DEFAULT_OPTIONS, { optional: true });
561
- _scrollStrategy = inject(MAT_DIALOG_SCROLL_STRATEGY);
562
- _parentDialog = inject(MatDialog, { optional: true, skipSelf: true });
563
- _idGenerator = inject(_IdGenerator);
564
- _dialog = inject(Dialog);
565
- _openDialogsAtThisLevel = [];
566
- _afterAllClosedAtThisLevel = new Subject();
567
- _afterOpenedAtThisLevel = new Subject();
568
- dialogConfigClass = MatDialogConfig;
569
- _dialogRefConstructor;
570
- _dialogContainerType;
571
- _dialogDataToken;
572
- /** Keeps track of the currently-open dialogs. */
573
- get openDialogs() {
574
- return this._parentDialog ? this._parentDialog.openDialogs : this._openDialogsAtThisLevel;
575
- }
576
- /** Stream that emits when a dialog has been opened. */
577
- get afterOpened() {
578
- return this._parentDialog ? this._parentDialog.afterOpened : this._afterOpenedAtThisLevel;
579
- }
580
- _getAfterAllClosed() {
581
- const parent = this._parentDialog;
582
- return parent ? parent._getAfterAllClosed() : this._afterAllClosedAtThisLevel;
583
- }
584
- /**
585
- * Stream that emits when all open dialog have finished closing.
586
- * Will emit on subscribe if there are no open dialogs to begin with.
587
- */
588
- afterAllClosed = defer(() => this.openDialogs.length
589
- ? this._getAfterAllClosed()
590
- : this._getAfterAllClosed().pipe(startWith(undefined)));
591
- constructor() {
592
- this._dialogRefConstructor = MatDialogRef;
593
- this._dialogContainerType = MatDialogContainer;
594
- this._dialogDataToken = MAT_DIALOG_DATA;
595
- }
596
- open(componentOrTemplateRef, config) {
597
- let dialogRef;
598
- config = { ...(this._defaultOptions || new MatDialogConfig()), ...config };
599
- config.id = config.id || this._idGenerator.getId('mat-mdc-dialog-');
600
- config.scrollStrategy = config.scrollStrategy || this._scrollStrategy();
601
- const cdkRef = this._dialog.open(componentOrTemplateRef, {
602
- ...config,
603
- positionStrategy: this._overlay.position().global().centerHorizontally().centerVertically(),
604
- // Disable closing since we need to sync it up to the animation ourselves.
605
- disableClose: true,
606
- // Disable closing on destroy, because this service cleans up its open dialogs as well.
607
- // We want to do the cleanup here, rather than the CDK service, because the CDK destroys
608
- // the dialogs immediately whereas we want it to wait for the animations to finish.
609
- closeOnDestroy: false,
610
- // Disable closing on detachments so that we can sync up the animation.
611
- // The Material dialog ref handles this manually.
612
- closeOnOverlayDetachments: false,
613
- container: {
614
- type: this._dialogContainerType,
615
- providers: () => [
616
- // Provide our config as the CDK config as well since it has the same interface as the
617
- // CDK one, but it contains the actual values passed in by the user for things like
618
- // `disableClose` which we disable for the CDK dialog since we handle it ourselves.
619
- { provide: this.dialogConfigClass, useValue: config },
620
- { provide: DialogConfig, useValue: config },
621
- ],
622
- },
623
- templateContext: () => ({ dialogRef }),
624
- providers: (ref, cdkConfig, dialogContainer) => {
625
- dialogRef = new this._dialogRefConstructor(ref, config, dialogContainer);
626
- dialogRef.updatePosition(config?.position);
627
- return [
628
- { provide: this._dialogContainerType, useValue: dialogContainer },
629
- { provide: this._dialogDataToken, useValue: cdkConfig.data },
630
- { provide: this._dialogRefConstructor, useValue: dialogRef },
631
- ];
632
- },
633
- });
634
- // This can't be assigned in the `providers` callback, because
635
- // the instance hasn't been assigned to the CDK ref yet.
636
- dialogRef.componentRef = cdkRef.componentRef;
637
- dialogRef.componentInstance = cdkRef.componentInstance;
638
- this.openDialogs.push(dialogRef);
639
- this.afterOpened.next(dialogRef);
640
- dialogRef.afterClosed().subscribe(() => {
641
- const index = this.openDialogs.indexOf(dialogRef);
642
- if (index > -1) {
643
- this.openDialogs.splice(index, 1);
644
- if (!this.openDialogs.length) {
645
- this._getAfterAllClosed().next();
646
- }
647
- }
648
- });
649
- return dialogRef;
650
- }
651
- /**
652
- * Closes all of the currently-open dialogs.
653
- */
654
- closeAll() {
655
- this._closeDialogs(this.openDialogs);
656
- }
657
- /**
658
- * Finds an open dialog by its id.
659
- * @param id ID to use when looking up the dialog.
660
- */
661
- getDialogById(id) {
662
- return this.openDialogs.find(dialog => dialog.id === id);
663
- }
664
- ngOnDestroy() {
665
- // Only close the dialogs at this level on destroy
666
- // since the parent service may still be active.
667
- this._closeDialogs(this._openDialogsAtThisLevel);
668
- this._afterAllClosedAtThisLevel.complete();
669
- this._afterOpenedAtThisLevel.complete();
670
- }
671
- _closeDialogs(dialogs) {
672
- let i = dialogs.length;
673
- while (i--) {
674
- dialogs[i].close();
675
- }
676
- }
677
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: MatDialog, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
678
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: MatDialog, providedIn: 'root' });
679
- }
680
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: MatDialog, decorators: [{
681
- type: Injectable,
682
- args: [{ providedIn: 'root' }]
683
- }], ctorParameters: () => [] });
684
-
685
- /**
686
- * Button that will close the current dialog.
687
- */
688
- class MatDialogClose {
689
- dialogRef = inject(MatDialogRef, { optional: true });
690
- _elementRef = inject(ElementRef);
691
- _dialog = inject(MatDialog);
692
- /** Screen-reader label for the button. */
693
- ariaLabel;
694
- /** Default to "button" to prevents accidental form submits. */
695
- type = 'button';
696
- /** Dialog close input. */
697
- dialogResult;
698
- _matDialogClose;
699
- constructor() { }
700
- ngOnInit() {
701
- if (!this.dialogRef) {
702
- // When this directive is included in a dialog via TemplateRef (rather than being
703
- // in a Component), the DialogRef isn't available via injection because embedded
704
- // views cannot be given a custom injector. Instead, we look up the DialogRef by
705
- // ID. This must occur in `onInit`, as the ID binding for the dialog container won't
706
- // be resolved at constructor time.
707
- this.dialogRef = getClosestDialog(this._elementRef, this._dialog.openDialogs);
708
- }
709
- }
710
- ngOnChanges(changes) {
711
- const proxiedChange = changes['_matDialogClose'] || changes['_matDialogCloseResult'];
712
- if (proxiedChange) {
713
- this.dialogResult = proxiedChange.currentValue;
714
- }
715
- }
716
- _onButtonClick(event) {
717
- // Determinate the focus origin using the click event, because using the FocusMonitor will
718
- // result in incorrect origins. Most of the time, close buttons will be auto focused in the
719
- // dialog, and therefore clicking the button won't result in a focus change. This means that
720
- // the FocusMonitor won't detect any origin change, and will always output `program`.
721
- _closeDialogVia(this.dialogRef, event.screenX === 0 && event.screenY === 0 ? 'keyboard' : 'mouse', this.dialogResult);
722
- }
723
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: MatDialogClose, deps: [], target: i0.ɵɵFactoryTarget.Directive });
724
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.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 });
725
- }
726
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: MatDialogClose, decorators: [{
727
- type: Directive,
728
- args: [{
729
- selector: '[mat-dialog-close], [matDialogClose]',
730
- exportAs: 'matDialogClose',
731
- host: {
732
- '(click)': '_onButtonClick($event)',
733
- '[attr.aria-label]': 'ariaLabel || null',
734
- '[attr.type]': 'type',
735
- },
736
- }]
737
- }], ctorParameters: () => [], propDecorators: { ariaLabel: [{
738
- type: Input,
739
- args: ['aria-label']
740
- }], type: [{
741
- type: Input
742
- }], dialogResult: [{
743
- type: Input,
744
- args: ['mat-dialog-close']
745
- }], _matDialogClose: [{
746
- type: Input,
747
- args: ['matDialogClose']
748
- }] } });
749
- class MatDialogLayoutSection {
750
- _dialogRef = inject(MatDialogRef, { optional: true });
751
- _elementRef = inject(ElementRef);
752
- _dialog = inject(MatDialog);
753
- constructor() { }
754
- ngOnInit() {
755
- if (!this._dialogRef) {
756
- this._dialogRef = getClosestDialog(this._elementRef, this._dialog.openDialogs);
757
- }
758
- if (this._dialogRef) {
759
- Promise.resolve().then(() => {
760
- this._onAdd();
761
- });
762
- }
763
- }
764
- ngOnDestroy() {
765
- // Note: we null check because there are some internal
766
- // tests that are mocking out `MatDialogRef` incorrectly.
767
- const instance = this._dialogRef?._containerInstance;
768
- if (instance) {
769
- Promise.resolve().then(() => {
770
- this._onRemove();
771
- });
772
- }
773
- }
774
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: MatDialogLayoutSection, deps: [], target: i0.ɵɵFactoryTarget.Directive });
775
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.0", type: MatDialogLayoutSection, isStandalone: true, ngImport: i0 });
776
- }
777
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: MatDialogLayoutSection, decorators: [{
778
- type: Directive
779
- }], ctorParameters: () => [] });
780
- /**
781
- * Title of a dialog element. Stays fixed to the top of the dialog when scrolling.
782
- */
783
- class MatDialogTitle extends MatDialogLayoutSection {
784
- id = inject(_IdGenerator).getId('mat-mdc-dialog-title-');
785
- _onAdd() {
786
- // Note: we null check the queue, because there are some internal
787
- // tests that are mocking out `MatDialogRef` incorrectly.
788
- this._dialogRef._containerInstance?._addAriaLabelledBy?.(this.id);
789
- }
790
- _onRemove() {
791
- this._dialogRef?._containerInstance?._removeAriaLabelledBy?.(this.id);
792
- }
793
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: MatDialogTitle, deps: null, target: i0.ɵɵFactoryTarget.Directive });
794
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.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 });
795
- }
796
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: MatDialogTitle, decorators: [{
797
- type: Directive,
798
- args: [{
799
- selector: '[mat-dialog-title], [matDialogTitle]',
800
- exportAs: 'matDialogTitle',
801
- host: {
802
- 'class': 'mat-mdc-dialog-title mdc-dialog__title',
803
- '[id]': 'id',
804
- },
805
- }]
806
- }], propDecorators: { id: [{
807
- type: Input
808
- }] } });
809
- /**
810
- * Scrollable content container of a dialog.
811
- */
812
- class MatDialogContent {
813
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: MatDialogContent, deps: [], target: i0.ɵɵFactoryTarget.Directive });
814
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.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 });
815
- }
816
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: MatDialogContent, decorators: [{
817
- type: Directive,
818
- args: [{
819
- selector: `[mat-dialog-content], mat-dialog-content, [matDialogContent]`,
820
- host: { 'class': 'mat-mdc-dialog-content mdc-dialog__content' },
821
- hostDirectives: [CdkScrollable],
822
- }]
823
- }] });
824
- /**
825
- * Container for the bottom action buttons in a dialog.
826
- * Stays fixed to the bottom when scrolling.
827
- */
828
- class MatDialogActions extends MatDialogLayoutSection {
829
- /**
830
- * Horizontal alignment of action buttons.
831
- */
832
- align;
833
- _onAdd() {
834
- this._dialogRef._containerInstance?._updateActionSectionCount?.(1);
835
- }
836
- _onRemove() {
837
- this._dialogRef._containerInstance?._updateActionSectionCount?.(-1);
838
- }
839
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: MatDialogActions, deps: null, target: i0.ɵɵFactoryTarget.Directive });
840
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.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 });
841
- }
842
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: MatDialogActions, decorators: [{
843
- type: Directive,
844
- args: [{
845
- selector: `[mat-dialog-actions], mat-dialog-actions, [matDialogActions]`,
846
- host: {
847
- 'class': 'mat-mdc-dialog-actions mdc-dialog__actions',
848
- '[class.mat-mdc-dialog-actions-align-start]': 'align === "start"',
849
- '[class.mat-mdc-dialog-actions-align-center]': 'align === "center"',
850
- '[class.mat-mdc-dialog-actions-align-end]': 'align === "end"',
851
- },
852
- }]
853
- }], propDecorators: { align: [{
854
- type: Input
855
- }] } });
856
- /**
857
- * Finds the closest MatDialogRef to an element by looking at the DOM.
858
- * @param element Element relative to which to look for a dialog.
859
- * @param openDialogs References to the currently-open dialogs.
860
- */
861
- function getClosestDialog(element, openDialogs) {
862
- let parent = element.nativeElement.parentElement;
863
- while (parent && !parent.classList.contains('mat-mdc-dialog-container')) {
864
- parent = parent.parentElement;
865
- }
866
- return parent ? openDialogs.find(dialog => dialog.id === parent.id) : null;
867
- }
868
-
869
- const DIRECTIVES = [
870
- MatDialogContainer,
871
- MatDialogClose,
872
- MatDialogTitle,
873
- MatDialogActions,
874
- MatDialogContent,
875
- ];
876
- class MatDialogModule {
877
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: MatDialogModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
878
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.0", ngImport: i0, type: MatDialogModule, imports: [DialogModule, OverlayModule, PortalModule, MatCommonModule, MatDialogContainer,
879
- MatDialogClose,
880
- MatDialogTitle,
881
- MatDialogActions,
882
- MatDialogContent], exports: [MatCommonModule, MatDialogContainer,
883
- MatDialogClose,
884
- MatDialogTitle,
885
- MatDialogActions,
886
- MatDialogContent] });
887
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: MatDialogModule, providers: [MatDialog], imports: [DialogModule, OverlayModule, PortalModule, MatCommonModule, MatCommonModule] });
888
- }
889
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: MatDialogModule, decorators: [{
890
- type: NgModule,
891
- args: [{
892
- imports: [DialogModule, OverlayModule, PortalModule, MatCommonModule, ...DIRECTIVES],
893
- exports: [MatCommonModule, ...DIRECTIVES],
894
- providers: [MatDialog],
895
- }]
896
- }] });
1
+ export { e as MAT_DIALOG_DATA, f as MAT_DIALOG_DEFAULT_OPTIONS, g as MAT_DIALOG_SCROLL_STRATEGY, h as MatDialog, M as MatDialogActions, a as MatDialogClose, i as MatDialogConfig, d as MatDialogContainer, c as MatDialogContent, l as MatDialogModule, k as MatDialogRef, j as MatDialogState, b as MatDialogTitle, _ as _closeDialogVia } from './module-a5f9ab72.mjs';
2
+ import '@angular/cdk/dialog';
3
+ import '@angular/cdk/overlay';
4
+ import '@angular/cdk/portal';
5
+ import '@angular/core';
6
+ import '@angular/cdk/coercion';
7
+ import 'rxjs';
8
+ import 'rxjs/operators';
9
+ import '@angular/cdk/keycodes';
10
+ import '@angular/cdk/a11y';
11
+ import '@angular/cdk/scrolling';
12
+ import './common-module-2d64df09.mjs';
13
+ import '@angular/cdk/bidi';
897
14
 
898
15
  /**
899
16
  * Default parameters for the animation for backwards compatibility.
@@ -1002,5 +119,5 @@ const matDialogAnimations = {
1002
119
  },
1003
120
  };
1004
121
 
1005
- export { 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 };
122
+ export { _defaultParams, matDialogAnimations };
1006
123
  //# sourceMappingURL=dialog.mjs.map