@angular/material 14.0.0-next.1 → 14.0.0-next.12

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 (603) hide show
  1. package/_index.scss +20 -1
  2. package/autocomplete/autocomplete-origin.d.ts +2 -2
  3. package/autocomplete/autocomplete-trigger.d.ts +16 -5
  4. package/autocomplete/autocomplete.d.ts +8 -2
  5. package/badge/_badge-theme.scss +11 -2
  6. package/badge/badge.d.ts +1 -1
  7. package/bottom-sheet/bottom-sheet-container.d.ts +1 -1
  8. package/button/button.d.ts +2 -2
  9. package/button-toggle/_button-toggle-theme.scss +14 -2
  10. package/button-toggle/button-toggle.d.ts +2 -2
  11. package/card/card.d.ts +14 -14
  12. package/checkbox/_checkbox-theme.scss +1 -1
  13. package/checkbox/checkbox-required-validator.d.ts +1 -1
  14. package/checkbox/checkbox.d.ts +2 -2
  15. package/checkbox/testing/checkbox-harness-filters.d.ts +2 -0
  16. package/chips/chip-input.d.ts +3 -6
  17. package/chips/chip-list.d.ts +21 -6
  18. package/chips/chip.d.ts +7 -7
  19. package/core/_core.scss +5 -7
  20. package/core/common-behaviors/error-state.d.ts +1 -2
  21. package/core/datetime/index.d.ts +1 -2
  22. package/core/line/line.d.ts +1 -1
  23. package/core/option/optgroup.d.ts +2 -2
  24. package/core/option/option.d.ts +2 -2
  25. package/core/ripple/_ripple.scss +2 -2
  26. package/core/ripple/index.d.ts +1 -2
  27. package/core/ripple/ripple-ref.d.ts +2 -1
  28. package/core/ripple/ripple-renderer.d.ts +16 -3
  29. package/core/ripple/ripple.d.ts +1 -1
  30. package/core/selection/pseudo-checkbox/pseudo-checkbox.d.ts +1 -1
  31. package/core/style/_menu-common.scss +3 -2
  32. package/core/style/_vendor-prefixes.scss +1 -17
  33. package/core/theming/_theming.scss +10 -1
  34. package/core/typography/_typography.scss +51 -14
  35. package/datepicker/calendar-body.d.ts +34 -4
  36. package/datepicker/calendar.d.ts +2 -2
  37. package/datepicker/date-range-input-parts.d.ts +7 -4
  38. package/datepicker/date-range-input.d.ts +1 -1
  39. package/datepicker/date-range-picker.d.ts +1 -1
  40. package/datepicker/datepicker-actions.d.ts +3 -3
  41. package/datepicker/datepicker-base.d.ts +4 -2
  42. package/datepicker/datepicker-input-base.d.ts +1 -1
  43. package/datepicker/datepicker-input.d.ts +1 -1
  44. package/datepicker/datepicker-toggle.d.ts +2 -2
  45. package/datepicker/datepicker.d.ts +1 -1
  46. package/datepicker/month-view.d.ts +19 -1
  47. package/datepicker/multi-year-view.d.ts +19 -1
  48. package/datepicker/year-view.d.ts +19 -1
  49. package/dialog/dialog-animations.d.ts +10 -0
  50. package/dialog/dialog-config.d.ts +12 -1
  51. package/dialog/dialog-container.d.ts +14 -6
  52. package/dialog/dialog-content-directives.d.ts +8 -4
  53. package/dialog/dialog.d.ts +13 -7
  54. package/dialog/public-api.d.ts +1 -1
  55. package/dialog/testing/dialog-opener.d.ts +33 -0
  56. package/dialog/testing/public-api.d.ts +1 -0
  57. package/divider/divider.d.ts +1 -1
  58. package/esm2020/autocomplete/autocomplete-module.mjs +5 -5
  59. package/esm2020/autocomplete/autocomplete-origin.mjs +7 -7
  60. package/esm2020/autocomplete/autocomplete-trigger.mjs +102 -50
  61. package/esm2020/autocomplete/autocomplete.mjs +19 -9
  62. package/esm2020/autocomplete/testing/autocomplete-harness.mjs +7 -1
  63. package/esm2020/badge/badge-module.mjs +5 -5
  64. package/esm2020/badge/badge.mjs +4 -4
  65. package/esm2020/bottom-sheet/bottom-sheet-animations.mjs +10 -4
  66. package/esm2020/bottom-sheet/bottom-sheet-container.mjs +12 -7
  67. package/esm2020/bottom-sheet/bottom-sheet-module.mjs +5 -5
  68. package/esm2020/bottom-sheet/bottom-sheet.mjs +4 -4
  69. package/esm2020/button/button-module.mjs +5 -5
  70. package/esm2020/button/button.mjs +10 -10
  71. package/esm2020/button-toggle/button-toggle-module.mjs +5 -5
  72. package/esm2020/button-toggle/button-toggle.mjs +8 -8
  73. package/esm2020/card/card-module.mjs +5 -5
  74. package/esm2020/card/card.mjs +44 -44
  75. package/esm2020/checkbox/checkbox-module.mjs +9 -9
  76. package/esm2020/checkbox/checkbox-required-validator.mjs +4 -4
  77. package/esm2020/checkbox/checkbox.mjs +12 -8
  78. package/esm2020/checkbox/testing/checkbox-harness-filters.mjs +1 -1
  79. package/esm2020/checkbox/testing/checkbox-harness.mjs +3 -2
  80. package/esm2020/chips/chip-input.mjs +4 -4
  81. package/esm2020/chips/chip-list.mjs +34 -9
  82. package/esm2020/chips/chip.mjs +20 -17
  83. package/esm2020/chips/chips-module.mjs +5 -5
  84. package/esm2020/core/common-behaviors/common-module.mjs +5 -5
  85. package/esm2020/core/common-behaviors/error-state.mjs +1 -8
  86. package/esm2020/core/datetime/index.mjs +9 -11
  87. package/esm2020/core/datetime/native-date-adapter.mjs +4 -4
  88. package/esm2020/core/error/error-options.mjs +7 -7
  89. package/esm2020/core/line/line.mjs +8 -8
  90. package/esm2020/core/option/index.mjs +5 -5
  91. package/esm2020/core/option/optgroup.mjs +8 -8
  92. package/esm2020/core/option/option.mjs +10 -10
  93. package/esm2020/core/ripple/index.mjs +6 -7
  94. package/esm2020/core/ripple/ripple-ref.mjs +5 -2
  95. package/esm2020/core/ripple/ripple-renderer.mjs +112 -54
  96. package/esm2020/core/ripple/ripple.mjs +4 -4
  97. package/esm2020/core/selection/pseudo-checkbox/pseudo-checkbox-module.mjs +5 -5
  98. package/esm2020/core/selection/pseudo-checkbox/pseudo-checkbox.mjs +5 -5
  99. package/esm2020/core/version.mjs +1 -1
  100. package/esm2020/datepicker/calendar-body.mjs +57 -12
  101. package/esm2020/datepicker/calendar.mjs +27 -16
  102. package/esm2020/datepicker/date-range-input-parts.mjs +10 -10
  103. package/esm2020/datepicker/date-range-input.mjs +6 -6
  104. package/esm2020/datepicker/date-range-picker.mjs +4 -4
  105. package/esm2020/datepicker/date-range-selection-strategy.mjs +4 -4
  106. package/esm2020/datepicker/date-selection-model.mjs +10 -10
  107. package/esm2020/datepicker/datepicker-actions.mjs +12 -12
  108. package/esm2020/datepicker/datepicker-base.mjs +12 -20
  109. package/esm2020/datepicker/datepicker-input-base.mjs +12 -7
  110. package/esm2020/datepicker/datepicker-input.mjs +4 -4
  111. package/esm2020/datepicker/datepicker-intl.mjs +4 -4
  112. package/esm2020/datepicker/datepicker-module.mjs +5 -5
  113. package/esm2020/datepicker/datepicker-toggle.mjs +10 -10
  114. package/esm2020/datepicker/datepicker.mjs +4 -4
  115. package/esm2020/datepicker/month-view.mjs +38 -11
  116. package/esm2020/datepicker/multi-year-view.mjs +42 -10
  117. package/esm2020/datepicker/year-view.mjs +41 -10
  118. package/esm2020/dialog/dialog-animations.mjs +17 -4
  119. package/esm2020/dialog/dialog-config.mjs +8 -1
  120. package/esm2020/dialog/dialog-container.mjs +44 -26
  121. package/esm2020/dialog/dialog-content-directives.mjs +31 -15
  122. package/esm2020/dialog/dialog-module.mjs +5 -5
  123. package/esm2020/dialog/dialog.mjs +24 -40
  124. package/esm2020/dialog/public-api.mjs +2 -2
  125. package/esm2020/dialog/testing/dialog-opener.mjs +67 -0
  126. package/esm2020/dialog/testing/public-api.mjs +2 -1
  127. package/esm2020/divider/divider-module.mjs +5 -5
  128. package/esm2020/divider/divider.mjs +5 -5
  129. package/esm2020/expansion/accordion.mjs +4 -4
  130. package/esm2020/expansion/expansion-module.mjs +5 -5
  131. package/esm2020/expansion/expansion-panel-base.mjs +14 -0
  132. package/esm2020/expansion/expansion-panel-content.mjs +14 -7
  133. package/esm2020/expansion/expansion-panel-header.mjs +11 -11
  134. package/esm2020/expansion/expansion-panel.mjs +13 -10
  135. package/esm2020/expansion/public-api.mjs +2 -1
  136. package/esm2020/form-field/error.mjs +4 -4
  137. package/esm2020/form-field/form-field-control.mjs +4 -4
  138. package/esm2020/form-field/form-field-module.mjs +5 -5
  139. package/esm2020/form-field/form-field.mjs +22 -14
  140. package/esm2020/form-field/hint.mjs +4 -4
  141. package/esm2020/form-field/label.mjs +4 -4
  142. package/esm2020/form-field/placeholder.mjs +4 -4
  143. package/esm2020/form-field/prefix.mjs +4 -4
  144. package/esm2020/form-field/suffix.mjs +4 -4
  145. package/esm2020/form-field/testing/public-api.mjs +4 -4
  146. package/esm2020/grid-list/grid-list-module.mjs +5 -5
  147. package/esm2020/grid-list/grid-list.mjs +6 -6
  148. package/esm2020/grid-list/grid-tile.mjs +17 -17
  149. package/esm2020/icon/icon-module.mjs +5 -5
  150. package/esm2020/icon/icon-registry.mjs +12 -14
  151. package/esm2020/icon/icon.mjs +31 -28
  152. package/esm2020/icon/testing/fake-icon-registry.mjs +9 -9
  153. package/esm2020/input/input-module.mjs +5 -5
  154. package/esm2020/input/input.mjs +41 -24
  155. package/esm2020/list/list-module.mjs +5 -5
  156. package/esm2020/list/list.mjs +21 -23
  157. package/esm2020/list/selection-list.mjs +15 -38
  158. package/esm2020/list/testing/list-item-harness-base.mjs +1 -9
  159. package/esm2020/menu/menu-content.mjs +7 -7
  160. package/esm2020/menu/menu-errors.mjs +1 -12
  161. package/esm2020/menu/menu-item.mjs +10 -6
  162. package/esm2020/menu/menu-module.mjs +5 -5
  163. package/esm2020/menu/menu-trigger.mjs +73 -66
  164. package/esm2020/menu/menu.mjs +35 -14
  165. package/esm2020/paginator/paginator-intl.mjs +4 -4
  166. package/esm2020/paginator/paginator-module.mjs +5 -5
  167. package/esm2020/paginator/paginator.mjs +17 -13
  168. package/esm2020/paginator/testing/paginator-harness.mjs +11 -1
  169. package/esm2020/progress-bar/progress-bar-module.mjs +5 -5
  170. package/esm2020/progress-bar/progress-bar.mjs +8 -5
  171. package/esm2020/progress-spinner/progress-spinner-module.mjs +8 -8
  172. package/esm2020/progress-spinner/progress-spinner.mjs +14 -51
  173. package/esm2020/progress-spinner/public-api.mjs +10 -2
  174. package/esm2020/radio/radio-module.mjs +5 -5
  175. package/esm2020/radio/radio.mjs +42 -14
  176. package/esm2020/radio/testing/radio-harness-filters.mjs +1 -1
  177. package/esm2020/radio/testing/radio-harness.mjs +3 -2
  178. package/esm2020/select/select-module.mjs +5 -5
  179. package/esm2020/select/select.mjs +68 -30
  180. package/esm2020/sidenav/drawer.mjs +19 -14
  181. package/esm2020/sidenav/sidenav-module.mjs +7 -8
  182. package/esm2020/sidenav/sidenav.mjs +12 -12
  183. package/esm2020/slide-toggle/slide-toggle-module.mjs +9 -9
  184. package/esm2020/slide-toggle/slide-toggle-required-validator.mjs +4 -4
  185. package/esm2020/slide-toggle/slide-toggle.mjs +6 -5
  186. package/esm2020/slide-toggle/testing/slide-toggle-harness-filters.mjs +1 -1
  187. package/esm2020/slide-toggle/testing/slide-toggle-harness.mjs +4 -2
  188. package/esm2020/slider/slider-module.mjs +5 -5
  189. package/esm2020/slider/slider.mjs +5 -5
  190. package/esm2020/snack-bar/simple-snack-bar.mjs +7 -7
  191. package/esm2020/snack-bar/snack-bar-container.mjs +24 -18
  192. package/esm2020/snack-bar/snack-bar-module.mjs +5 -5
  193. package/esm2020/snack-bar/snack-bar.mjs +7 -7
  194. package/esm2020/sort/sort-header-intl.mjs +4 -4
  195. package/esm2020/sort/sort-header.mjs +16 -8
  196. package/esm2020/sort/sort-module.mjs +5 -5
  197. package/esm2020/sort/sort.mjs +4 -4
  198. package/esm2020/stepper/public-api.mjs +2 -2
  199. package/esm2020/stepper/step-content.mjs +4 -4
  200. package/esm2020/stepper/step-header.mjs +8 -8
  201. package/esm2020/stepper/step-label.mjs +4 -4
  202. package/esm2020/stepper/stepper-animations.mjs +9 -3
  203. package/esm2020/stepper/stepper-button.mjs +7 -7
  204. package/esm2020/stepper/stepper-icon.mjs +4 -4
  205. package/esm2020/stepper/stepper-intl.mjs +4 -4
  206. package/esm2020/stepper/stepper-module.mjs +6 -10
  207. package/esm2020/stepper/stepper.mjs +42 -66
  208. package/esm2020/table/cell.mjs +22 -22
  209. package/esm2020/table/row.mjs +22 -22
  210. package/esm2020/table/table-module.mjs +5 -5
  211. package/esm2020/table/table.mjs +9 -9
  212. package/esm2020/table/text-column.mjs +5 -5
  213. package/esm2020/tabs/ink-bar.mjs +11 -22
  214. package/esm2020/tabs/paginated-tab-header.mjs +27 -13
  215. package/esm2020/tabs/tab-body.mjs +11 -11
  216. package/esm2020/tabs/tab-content.mjs +4 -4
  217. package/esm2020/tabs/tab-group.mjs +59 -18
  218. package/esm2020/tabs/tab-header.mjs +8 -8
  219. package/esm2020/tabs/tab-label-wrapper.mjs +4 -4
  220. package/esm2020/tabs/tab-label.mjs +4 -4
  221. package/esm2020/tabs/tab-nav-bar/tab-nav-bar.mjs +18 -18
  222. package/esm2020/tabs/tab.mjs +4 -4
  223. package/esm2020/tabs/tabs-module.mjs +5 -5
  224. package/esm2020/toolbar/toolbar-module.mjs +5 -5
  225. package/esm2020/toolbar/toolbar.mjs +8 -8
  226. package/esm2020/tooltip/testing/tooltip-harness.mjs +12 -7
  227. package/esm2020/tooltip/tooltip-module.mjs +5 -5
  228. package/esm2020/tooltip/tooltip.mjs +126 -51
  229. package/esm2020/tree/node.mjs +10 -10
  230. package/esm2020/tree/outlet.mjs +4 -4
  231. package/esm2020/tree/padding.mjs +4 -4
  232. package/esm2020/tree/toggle.mjs +4 -4
  233. package/esm2020/tree/tree-module.mjs +5 -5
  234. package/esm2020/tree/tree.mjs +5 -5
  235. package/expansion/accordion.d.ts +1 -1
  236. package/expansion/expansion-panel-base.d.ts +22 -0
  237. package/expansion/expansion-panel-content.d.ts +5 -3
  238. package/expansion/expansion-panel-header.d.ts +3 -3
  239. package/expansion/expansion-panel.d.ts +2 -2
  240. package/expansion/public-api.d.ts +1 -0
  241. package/fesm2015/autocomplete/testing.mjs +6 -0
  242. package/fesm2015/autocomplete/testing.mjs.map +1 -1
  243. package/fesm2015/autocomplete.mjs +131 -68
  244. package/fesm2015/autocomplete.mjs.map +1 -1
  245. package/fesm2015/badge/testing.mjs.map +1 -1
  246. package/fesm2015/badge.mjs +7 -7
  247. package/fesm2015/badge.mjs.map +1 -1
  248. package/fesm2015/bottom-sheet/testing.mjs.map +1 -1
  249. package/fesm2015/bottom-sheet.mjs +27 -16
  250. package/fesm2015/bottom-sheet.mjs.map +1 -1
  251. package/fesm2015/button/testing.mjs.map +1 -1
  252. package/fesm2015/button-toggle/testing.mjs.map +1 -1
  253. package/fesm2015/button-toggle.mjs +11 -11
  254. package/fesm2015/button-toggle.mjs.map +1 -1
  255. package/fesm2015/button.mjs +13 -13
  256. package/fesm2015/button.mjs.map +1 -1
  257. package/fesm2015/card/testing.mjs.map +1 -1
  258. package/fesm2015/card.mjs +47 -47
  259. package/fesm2015/card.mjs.map +1 -1
  260. package/fesm2015/checkbox/testing.mjs +2 -1
  261. package/fesm2015/checkbox/testing.mjs.map +1 -1
  262. package/fesm2015/checkbox.mjs +22 -18
  263. package/fesm2015/checkbox.mjs.map +1 -1
  264. package/fesm2015/chips/testing.mjs.map +1 -1
  265. package/fesm2015/chips.mjs +59 -31
  266. package/fesm2015/chips.mjs.map +1 -1
  267. package/fesm2015/core/testing.mjs.map +1 -1
  268. package/fesm2015/core.mjs +181 -126
  269. package/fesm2015/core.mjs.map +1 -1
  270. package/fesm2015/datepicker/testing.mjs.map +1 -1
  271. package/fesm2015/datepicker.mjs +273 -130
  272. package/fesm2015/datepicker.mjs.map +1 -1
  273. package/fesm2015/dialog/testing.mjs +65 -2
  274. package/fesm2015/dialog/testing.mjs.map +1 -1
  275. package/fesm2015/dialog.mjs +144 -106
  276. package/fesm2015/dialog.mjs.map +1 -1
  277. package/fesm2015/divider/testing.mjs.map +1 -1
  278. package/fesm2015/divider.mjs +8 -8
  279. package/fesm2015/divider.mjs.map +1 -1
  280. package/fesm2015/expansion/testing.mjs.map +1 -1
  281. package/fesm2015/expansion.mjs +56 -33
  282. package/fesm2015/expansion.mjs.map +1 -1
  283. package/fesm2015/form-field/testing/control.mjs.map +1 -1
  284. package/fesm2015/form-field/testing.mjs +1 -1
  285. package/fesm2015/form-field/testing.mjs.map +1 -1
  286. package/fesm2015/form-field.mjs +47 -38
  287. package/fesm2015/form-field.mjs.map +1 -1
  288. package/fesm2015/grid-list/testing.mjs.map +1 -1
  289. package/fesm2015/grid-list.mjs +25 -25
  290. package/fesm2015/grid-list.mjs.map +1 -1
  291. package/fesm2015/icon/testing.mjs +8 -8
  292. package/fesm2015/icon/testing.mjs.map +1 -1
  293. package/fesm2015/icon.mjs +45 -44
  294. package/fesm2015/icon.mjs.map +1 -1
  295. package/fesm2015/input/testing.mjs.map +1 -1
  296. package/fesm2015/input.mjs +45 -28
  297. package/fesm2015/input.mjs.map +1 -1
  298. package/fesm2015/list/testing.mjs +0 -10
  299. package/fesm2015/list/testing.mjs.map +1 -1
  300. package/fesm2015/list.mjs +41 -67
  301. package/fesm2015/list.mjs.map +1 -1
  302. package/fesm2015/material.mjs.map +1 -1
  303. package/fesm2015/menu/testing.mjs.map +1 -1
  304. package/fesm2015/menu.mjs +126 -101
  305. package/fesm2015/menu.mjs.map +1 -1
  306. package/fesm2015/paginator/testing.mjs +14 -0
  307. package/fesm2015/paginator/testing.mjs.map +1 -1
  308. package/fesm2015/paginator.mjs +23 -19
  309. package/fesm2015/paginator.mjs.map +1 -1
  310. package/fesm2015/progress-bar/testing.mjs.map +1 -1
  311. package/fesm2015/progress-bar.mjs +11 -8
  312. package/fesm2015/progress-bar.mjs.map +1 -1
  313. package/fesm2015/progress-spinner/testing.mjs.map +1 -1
  314. package/fesm2015/progress-spinner.mjs +31 -63
  315. package/fesm2015/progress-spinner.mjs.map +1 -1
  316. package/fesm2015/radio/testing.mjs +2 -1
  317. package/fesm2015/radio/testing.mjs.map +1 -1
  318. package/fesm2015/radio.mjs +46 -17
  319. package/fesm2015/radio.mjs.map +1 -1
  320. package/fesm2015/select/testing.mjs.map +1 -1
  321. package/fesm2015/select.mjs +72 -34
  322. package/fesm2015/select.mjs.map +1 -1
  323. package/fesm2015/sidenav/testing.mjs.map +1 -1
  324. package/fesm2015/sidenav.mjs +36 -32
  325. package/fesm2015/sidenav.mjs.map +1 -1
  326. package/fesm2015/slide-toggle/testing.mjs +3 -1
  327. package/fesm2015/slide-toggle/testing.mjs.map +1 -1
  328. package/fesm2015/slide-toggle.mjs +16 -15
  329. package/fesm2015/slide-toggle.mjs.map +1 -1
  330. package/fesm2015/slider/testing.mjs.map +1 -1
  331. package/fesm2015/slider.mjs +8 -8
  332. package/fesm2015/slider.mjs.map +1 -1
  333. package/fesm2015/snack-bar/testing.mjs.map +1 -1
  334. package/fesm2015/snack-bar.mjs +39 -33
  335. package/fesm2015/snack-bar.mjs.map +1 -1
  336. package/fesm2015/sort/testing.mjs.map +1 -1
  337. package/fesm2015/sort.mjs +128 -120
  338. package/fesm2015/sort.mjs.map +1 -1
  339. package/fesm2015/stepper/testing.mjs.map +1 -1
  340. package/fesm2015/stepper.mjs +75 -96
  341. package/fesm2015/stepper.mjs.map +1 -1
  342. package/fesm2015/table/testing.mjs.map +1 -1
  343. package/fesm2015/table.mjs +58 -58
  344. package/fesm2015/table.mjs.map +1 -1
  345. package/fesm2015/tabs/testing.mjs.map +1 -1
  346. package/fesm2015/tabs.mjs +139 -95
  347. package/fesm2015/tabs.mjs.map +1 -1
  348. package/fesm2015/toolbar/testing.mjs.map +1 -1
  349. package/fesm2015/toolbar.mjs +11 -11
  350. package/fesm2015/toolbar.mjs.map +1 -1
  351. package/fesm2015/tooltip/testing.mjs +11 -8
  352. package/fesm2015/tooltip/testing.mjs.map +1 -1
  353. package/fesm2015/tooltip.mjs +154 -79
  354. package/fesm2015/tooltip.mjs.map +1 -1
  355. package/fesm2015/tree/testing.mjs.map +1 -1
  356. package/fesm2015/tree.mjs +26 -26
  357. package/fesm2015/tree.mjs.map +1 -1
  358. package/fesm2020/autocomplete/testing.mjs +6 -0
  359. package/fesm2020/autocomplete/testing.mjs.map +1 -1
  360. package/fesm2020/autocomplete.mjs +130 -68
  361. package/fesm2020/autocomplete.mjs.map +1 -1
  362. package/fesm2020/badge/testing.mjs.map +1 -1
  363. package/fesm2020/badge.mjs +7 -7
  364. package/fesm2020/badge.mjs.map +1 -1
  365. package/fesm2020/bottom-sheet/testing.mjs.map +1 -1
  366. package/fesm2020/bottom-sheet.mjs +27 -16
  367. package/fesm2020/bottom-sheet.mjs.map +1 -1
  368. package/fesm2020/button/testing.mjs.map +1 -1
  369. package/fesm2020/button-toggle/testing.mjs.map +1 -1
  370. package/fesm2020/button-toggle.mjs +11 -11
  371. package/fesm2020/button-toggle.mjs.map +1 -1
  372. package/fesm2020/button.mjs +13 -13
  373. package/fesm2020/button.mjs.map +1 -1
  374. package/fesm2020/card/testing.mjs.map +1 -1
  375. package/fesm2020/card.mjs +47 -47
  376. package/fesm2020/card.mjs.map +1 -1
  377. package/fesm2020/checkbox/testing.mjs +2 -1
  378. package/fesm2020/checkbox/testing.mjs.map +1 -1
  379. package/fesm2020/checkbox.mjs +22 -18
  380. package/fesm2020/checkbox.mjs.map +1 -1
  381. package/fesm2020/chips/testing.mjs.map +1 -1
  382. package/fesm2020/chips.mjs +59 -31
  383. package/fesm2020/chips.mjs.map +1 -1
  384. package/fesm2020/core/testing.mjs.map +1 -1
  385. package/fesm2020/core.mjs +180 -126
  386. package/fesm2020/core.mjs.map +1 -1
  387. package/fesm2020/datepicker/testing.mjs.map +1 -1
  388. package/fesm2020/datepicker.mjs +273 -130
  389. package/fesm2020/datepicker.mjs.map +1 -1
  390. package/fesm2020/dialog/testing.mjs +65 -1
  391. package/fesm2020/dialog/testing.mjs.map +1 -1
  392. package/fesm2020/dialog.mjs +143 -106
  393. package/fesm2020/dialog.mjs.map +1 -1
  394. package/fesm2020/divider/testing.mjs.map +1 -1
  395. package/fesm2020/divider.mjs +8 -8
  396. package/fesm2020/divider.mjs.map +1 -1
  397. package/fesm2020/expansion/testing.mjs.map +1 -1
  398. package/fesm2020/expansion.mjs +54 -33
  399. package/fesm2020/expansion.mjs.map +1 -1
  400. package/fesm2020/form-field/testing/control.mjs.map +1 -1
  401. package/fesm2020/form-field/testing.mjs +1 -1
  402. package/fesm2020/form-field/testing.mjs.map +1 -1
  403. package/fesm2020/form-field.mjs +46 -38
  404. package/fesm2020/form-field.mjs.map +1 -1
  405. package/fesm2020/grid-list/testing.mjs.map +1 -1
  406. package/fesm2020/grid-list.mjs +25 -25
  407. package/fesm2020/grid-list.mjs.map +1 -1
  408. package/fesm2020/icon/testing.mjs +8 -8
  409. package/fesm2020/icon/testing.mjs.map +1 -1
  410. package/fesm2020/icon.mjs +45 -44
  411. package/fesm2020/icon.mjs.map +1 -1
  412. package/fesm2020/input/testing.mjs.map +1 -1
  413. package/fesm2020/input.mjs +44 -27
  414. package/fesm2020/input.mjs.map +1 -1
  415. package/fesm2020/list/testing.mjs +0 -8
  416. package/fesm2020/list/testing.mjs.map +1 -1
  417. package/fesm2020/list.mjs +38 -63
  418. package/fesm2020/list.mjs.map +1 -1
  419. package/fesm2020/material.mjs.map +1 -1
  420. package/fesm2020/menu/testing.mjs.map +1 -1
  421. package/fesm2020/menu.mjs +122 -101
  422. package/fesm2020/menu.mjs.map +1 -1
  423. package/fesm2020/paginator/testing.mjs +10 -0
  424. package/fesm2020/paginator/testing.mjs.map +1 -1
  425. package/fesm2020/paginator.mjs +23 -19
  426. package/fesm2020/paginator.mjs.map +1 -1
  427. package/fesm2020/progress-bar/testing.mjs.map +1 -1
  428. package/fesm2020/progress-bar.mjs +11 -8
  429. package/fesm2020/progress-bar.mjs.map +1 -1
  430. package/fesm2020/progress-spinner/testing.mjs.map +1 -1
  431. package/fesm2020/progress-spinner.mjs +31 -61
  432. package/fesm2020/progress-spinner.mjs.map +1 -1
  433. package/fesm2020/radio/testing.mjs +2 -1
  434. package/fesm2020/radio/testing.mjs.map +1 -1
  435. package/fesm2020/radio.mjs +45 -17
  436. package/fesm2020/radio.mjs.map +1 -1
  437. package/fesm2020/select/testing.mjs.map +1 -1
  438. package/fesm2020/select.mjs +72 -34
  439. package/fesm2020/select.mjs.map +1 -1
  440. package/fesm2020/sidenav/testing.mjs.map +1 -1
  441. package/fesm2020/sidenav.mjs +36 -32
  442. package/fesm2020/sidenav.mjs.map +1 -1
  443. package/fesm2020/slide-toggle/testing.mjs +3 -1
  444. package/fesm2020/slide-toggle/testing.mjs.map +1 -1
  445. package/fesm2020/slide-toggle.mjs +16 -15
  446. package/fesm2020/slide-toggle.mjs.map +1 -1
  447. package/fesm2020/slider/testing.mjs.map +1 -1
  448. package/fesm2020/slider.mjs +8 -8
  449. package/fesm2020/slider.mjs.map +1 -1
  450. package/fesm2020/snack-bar/testing.mjs.map +1 -1
  451. package/fesm2020/snack-bar.mjs +39 -33
  452. package/fesm2020/snack-bar.mjs.map +1 -1
  453. package/fesm2020/sort/testing.mjs.map +1 -1
  454. package/fesm2020/sort.mjs +24 -16
  455. package/fesm2020/sort.mjs.map +1 -1
  456. package/fesm2020/stepper/testing.mjs.map +1 -1
  457. package/fesm2020/stepper.mjs +75 -96
  458. package/fesm2020/stepper.mjs.map +1 -1
  459. package/fesm2020/table/testing.mjs.map +1 -1
  460. package/fesm2020/table.mjs +58 -58
  461. package/fesm2020/table.mjs.map +1 -1
  462. package/fesm2020/tabs/testing.mjs.map +1 -1
  463. package/fesm2020/tabs.mjs +138 -95
  464. package/fesm2020/tabs.mjs.map +1 -1
  465. package/fesm2020/toolbar/testing.mjs.map +1 -1
  466. package/fesm2020/toolbar.mjs +11 -11
  467. package/fesm2020/toolbar.mjs.map +1 -1
  468. package/fesm2020/tooltip/testing.mjs +11 -6
  469. package/fesm2020/tooltip/testing.mjs.map +1 -1
  470. package/fesm2020/tooltip.mjs +147 -71
  471. package/fesm2020/tooltip.mjs.map +1 -1
  472. package/fesm2020/tree/testing.mjs.map +1 -1
  473. package/fesm2020/tree.mjs +26 -26
  474. package/fesm2020/tree.mjs.map +1 -1
  475. package/form-field/error.d.ts +1 -1
  476. package/form-field/form-field-control.d.ts +4 -4
  477. package/form-field/form-field.d.ts +16 -9
  478. package/form-field/hint.d.ts +1 -1
  479. package/form-field/label.d.ts +1 -1
  480. package/form-field/placeholder.d.ts +1 -1
  481. package/form-field/prefix.d.ts +1 -1
  482. package/form-field/suffix.d.ts +1 -1
  483. package/form-field/testing/public-api.d.ts +1 -1
  484. package/grid-list/grid-list.d.ts +1 -1
  485. package/grid-list/grid-tile.d.ts +5 -5
  486. package/icon/icon-registry.d.ts +7 -9
  487. package/icon/icon.d.ts +13 -4
  488. package/icon/testing/fake-icon-registry.d.ts +1 -1
  489. package/input/input.d.ts +13 -2
  490. package/list/list.d.ts +6 -6
  491. package/list/selection-list.d.ts +5 -22
  492. package/list/testing/list-item-harness-base.d.ts +1 -7
  493. package/menu/menu-content.d.ts +2 -2
  494. package/menu/menu-errors.d.ts +0 -5
  495. package/menu/menu-item.d.ts +4 -3
  496. package/menu/menu-trigger.d.ts +23 -13
  497. package/menu/menu.d.ts +9 -4
  498. package/package.json +7 -7
  499. package/paginator/paginator.d.ts +13 -2
  500. package/paginator/testing/paginator-harness.d.ts +3 -0
  501. package/prebuilt-themes/deeppurple-amber.css +1 -1
  502. package/prebuilt-themes/indigo-pink.css +1 -1
  503. package/prebuilt-themes/pink-bluegrey.css +1 -1
  504. package/prebuilt-themes/purple-green.css +1 -1
  505. package/progress-bar/progress-bar.d.ts +1 -1
  506. package/progress-spinner/progress-spinner-module.d.ts +1 -1
  507. package/progress-spinner/progress-spinner.d.ts +4 -19
  508. package/progress-spinner/public-api.d.ts +8 -1
  509. package/radio/radio.d.ts +11 -6
  510. package/radio/testing/radio-harness-filters.d.ts +2 -0
  511. package/schematics/collection.json +4 -2
  512. package/schematics/migration.json +5 -0
  513. package/schematics/ng-add/fonts/material-fonts.js +4 -13
  514. package/schematics/ng-add/fonts/material-fonts.mjs +4 -13
  515. package/schematics/ng-add/index.js +2 -2
  516. package/schematics/ng-add/index.mjs +2 -2
  517. package/schematics/ng-add/schema.d.ts +2 -2
  518. package/schematics/ng-add/schema.js +1 -1
  519. package/schematics/ng-add/schema.json +29 -9
  520. package/schematics/ng-add/schema.mjs +1 -1
  521. package/schematics/ng-add/setup-project.js +16 -23
  522. package/schematics/ng-add/setup-project.mjs +16 -23
  523. package/schematics/ng-add/theming/theming.js +28 -39
  524. package/schematics/ng-add/theming/theming.mjs +28 -39
  525. package/schematics/ng-generate/address-form/index.js +5 -14
  526. package/schematics/ng-generate/address-form/index.mjs +5 -14
  527. package/schematics/ng-generate/address-form/schema.json +1 -1
  528. package/schematics/ng-generate/dashboard/index.js +5 -14
  529. package/schematics/ng-generate/dashboard/index.mjs +5 -14
  530. package/schematics/ng-generate/dashboard/schema.json +1 -1
  531. package/schematics/ng-generate/navigation/index.js +5 -14
  532. package/schematics/ng-generate/navigation/index.mjs +5 -14
  533. package/schematics/ng-generate/navigation/schema.json +1 -1
  534. package/schematics/ng-generate/table/index.js +5 -14
  535. package/schematics/ng-generate/table/index.mjs +5 -14
  536. package/schematics/ng-generate/table/schema.json +1 -1
  537. package/schematics/ng-generate/tree/index.js +5 -14
  538. package/schematics/ng-generate/tree/index.mjs +5 -14
  539. package/schematics/ng-generate/tree/schema.json +1 -1
  540. package/schematics/ng-update/data/constructor-checks.js +11 -1
  541. package/schematics/ng-update/data/constructor-checks.mjs +11 -1
  542. package/schematics/ng-update/data/css-selectors.js +7 -1
  543. package/schematics/ng-update/data/css-selectors.mjs +7 -1
  544. package/schematics/ng-update/data/index.js +6 -2
  545. package/schematics/ng-update/data/index.mjs +6 -2
  546. package/schematics/ng-update/index.d.ts +2 -0
  547. package/schematics/ng-update/index.js +7 -2
  548. package/schematics/ng-update/index.mjs +7 -2
  549. package/schematics/ng-update/migrations/hammer-gestures-v9/gesture-config.template +1 -1
  550. package/schematics/ng-update/migrations/hammer-gestures-v9/hammer-gestures-migration.js +8 -8
  551. package/schematics/ng-update/migrations/hammer-gestures-v9/hammer-gestures-migration.mjs +8 -8
  552. package/schematics/ng-update/migrations/hammer-gestures-v9/import-manager.js +14 -23
  553. package/schematics/ng-update/migrations/hammer-gestures-v9/import-manager.mjs +14 -23
  554. package/schematics/ng-update/migrations/package-imports-v8/secondary-entry-points-migration.js +3 -15
  555. package/schematics/ng-update/migrations/package-imports-v8/secondary-entry-points-migration.mjs +3 -15
  556. package/schematics/ng-update/migrations/theming-api-v12/migration.js +5 -5
  557. package/schematics/ng-update/migrations/theming-api-v12/migration.mjs +5 -5
  558. package/schematics/tsconfig.json +1 -4
  559. package/select/select.d.ts +27 -6
  560. package/sidenav/drawer.d.ts +3 -3
  561. package/sidenav/sidenav-module.d.ts +2 -3
  562. package/sidenav/sidenav.d.ts +3 -3
  563. package/slide-toggle/slide-toggle-required-validator.d.ts +1 -1
  564. package/slide-toggle/slide-toggle.d.ts +1 -1
  565. package/slide-toggle/testing/slide-toggle-harness-filters.d.ts +4 -0
  566. package/slider/slider.d.ts +1 -1
  567. package/snack-bar/simple-snack-bar.d.ts +1 -1
  568. package/snack-bar/snack-bar-container.d.ts +1 -1
  569. package/snack-bar/snack-bar.d.ts +1 -1
  570. package/sort/sort-header.d.ts +6 -6
  571. package/sort/sort.d.ts +7 -3
  572. package/stepper/public-api.d.ts +1 -1
  573. package/stepper/step-content.d.ts +1 -1
  574. package/stepper/step-header.d.ts +1 -1
  575. package/stepper/step-label.d.ts +1 -1
  576. package/stepper/stepper-animations.d.ts +2 -0
  577. package/stepper/stepper-button.d.ts +2 -2
  578. package/stepper/stepper-icon.d.ts +1 -1
  579. package/stepper/stepper-module.d.ts +1 -1
  580. package/stepper/stepper.d.ts +16 -39
  581. package/table/cell.d.ts +7 -7
  582. package/table/row.d.ts +7 -7
  583. package/table/table.d.ts +2 -2
  584. package/table/text-column.d.ts +1 -1
  585. package/tabs/_tabs-common.scss +6 -5
  586. package/tabs/ink-bar.d.ts +1 -6
  587. package/tabs/paginated-tab-header.d.ts +5 -3
  588. package/tabs/tab-body.d.ts +3 -3
  589. package/tabs/tab-content.d.ts +1 -1
  590. package/tabs/tab-group.d.ts +11 -5
  591. package/tabs/tab-header.d.ts +2 -2
  592. package/tabs/tab-label-wrapper.d.ts +1 -1
  593. package/tabs/tab-label.d.ts +1 -1
  594. package/tabs/tab-nav-bar/tab-nav-bar.d.ts +5 -5
  595. package/tabs/tab.d.ts +1 -1
  596. package/toolbar/toolbar.d.ts +2 -2
  597. package/tooltip/testing/tooltip-harness.d.ts +6 -0
  598. package/tooltip/tooltip.d.ts +40 -12
  599. package/tree/node.d.ts +3 -3
  600. package/tree/outlet.d.ts +1 -1
  601. package/tree/padding.d.ts +1 -1
  602. package/tree/toggle.d.ts +1 -1
  603. package/tree/tree.d.ts +1 -1
@@ -1,5 +1,8 @@
1
- import { __awaiter } from 'tslib';
1
+ import { __awaiter, __decorate, __metadata } from 'tslib';
2
2
  import { ContentContainerComponentHarness, TestKey, HarnessPredicate } from '@angular/cdk/testing';
3
+ import { Directive, Component, ChangeDetectionStrategy, ViewEncapsulation, NgModule } from '@angular/core';
4
+ import { _MatDialogBase, MatDialog, MatDialogModule } from '@angular/material/dialog';
5
+ import { NoopAnimationsModule } from '@angular/platform-browser/animations';
3
6
 
4
7
  /** Base class for the `MatDialogHarness` implementation. */
5
8
  class _MatDialogHarnessBase
@@ -99,6 +102,66 @@ class MatDialogHarness extends _MatDialogHarnessBase {
99
102
  /** The selector for the host element of a `MatDialog` instance. */
100
103
  MatDialogHarness.hostSelector = '.mat-dialog-container';
101
104
 
105
+ /**
106
+ * @license
107
+ * Copyright Google LLC All Rights Reserved.
108
+ *
109
+ * Use of this source code is governed by an MIT-style license that can be
110
+ * found in the LICENSE file at https://angular.io/license
111
+ */
112
+ var _MatTestDialogOpenerBase_1, MatTestDialogOpener_1;
113
+ /** Base class for a component that immediately opens a dialog when created. */
114
+ let _MatTestDialogOpenerBase = _MatTestDialogOpenerBase_1 = class _MatTestDialogOpenerBase {
115
+ constructor(dialog) {
116
+ this.dialog = dialog;
117
+ if (!_MatTestDialogOpenerBase_1.component) {
118
+ throw new Error(`MatTestDialogOpener does not have a component provided.`);
119
+ }
120
+ this.dialogRef = this.dialog.open(_MatTestDialogOpenerBase_1.component, _MatTestDialogOpenerBase_1.config || {});
121
+ this._afterClosedSubscription = this.dialogRef.afterClosed().subscribe(result => {
122
+ this.closedResult = result;
123
+ });
124
+ }
125
+ ngOnDestroy() {
126
+ this._afterClosedSubscription.unsubscribe();
127
+ _MatTestDialogOpenerBase_1.component = undefined;
128
+ _MatTestDialogOpenerBase_1.config = undefined;
129
+ }
130
+ };
131
+ _MatTestDialogOpenerBase = _MatTestDialogOpenerBase_1 = __decorate([
132
+ Directive(),
133
+ __metadata("design:paramtypes", [_MatDialogBase])
134
+ ], _MatTestDialogOpenerBase);
135
+ /** Test component that immediately opens a dialog when created. */
136
+ let MatTestDialogOpener = MatTestDialogOpener_1 = class MatTestDialogOpener extends _MatTestDialogOpenerBase {
137
+ constructor(dialog) {
138
+ super(dialog);
139
+ }
140
+ /** Static method that prepares this class to open the provided component. */
141
+ static withComponent(component, config) {
142
+ _MatTestDialogOpenerBase.component = component;
143
+ _MatTestDialogOpenerBase.config = config;
144
+ return MatTestDialogOpener_1;
145
+ }
146
+ };
147
+ MatTestDialogOpener = MatTestDialogOpener_1 = __decorate([
148
+ Component({
149
+ selector: 'mat-test-dialog-opener',
150
+ template: '',
151
+ changeDetection: ChangeDetectionStrategy.OnPush,
152
+ encapsulation: ViewEncapsulation.None,
153
+ }),
154
+ __metadata("design:paramtypes", [MatDialog])
155
+ ], MatTestDialogOpener);
156
+ let MatTestDialogOpenerModule = class MatTestDialogOpenerModule {
157
+ };
158
+ MatTestDialogOpenerModule = __decorate([
159
+ NgModule({
160
+ declarations: [MatTestDialogOpener],
161
+ imports: [MatDialogModule, NoopAnimationsModule],
162
+ })
163
+ ], MatTestDialogOpenerModule);
164
+
102
165
  /**
103
166
  * @license
104
167
  * Copyright Google LLC All Rights Reserved.
@@ -115,5 +178,5 @@ MatDialogHarness.hostSelector = '.mat-dialog-container';
115
178
  * found in the LICENSE file at https://angular.io/license
116
179
  */
117
180
 
118
- export { MatDialogHarness, _MatDialogHarnessBase };
181
+ export { MatDialogHarness, MatTestDialogOpener, MatTestDialogOpenerModule, _MatDialogHarnessBase, _MatTestDialogOpenerBase };
119
182
  //# sourceMappingURL=testing.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"testing.mjs","sources":["../../../../../../../src/material/dialog/testing/dialog-harness.ts","../../../../../../../src/material/dialog/testing/public-api.ts","../../../../../../../src/material/dialog/testing/index.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ContentContainerComponentHarness, HarnessPredicate, TestKey} from '@angular/cdk/testing';\nimport {DialogRole} from '@angular/material/dialog';\nimport {DialogHarnessFilters} from './dialog-harness-filters';\n\n/** Selectors for different sections of the mat-dialog that can contain user content. */\nexport const enum MatDialogSection {\n TITLE = '.mat-dialog-title',\n CONTENT = '.mat-dialog-content',\n ACTIONS = '.mat-dialog-actions',\n}\n\n/** Base class for the `MatDialogHarness` implementation. */\nexport class _MatDialogHarnessBase\n // @breaking-change 14.0.0 change generic type to MatDialogSection.\n extends ContentContainerComponentHarness<MatDialogSection | string>\n{\n protected _title = this.locatorForOptional(MatDialogSection.TITLE);\n protected _content = this.locatorForOptional(MatDialogSection.CONTENT);\n protected _actions = this.locatorForOptional(MatDialogSection.ACTIONS);\n\n /** Gets the id of the dialog. */\n async getId(): Promise<string | null> {\n const id = await (await this.host()).getAttribute('id');\n // In case no id has been specified, the \"id\" property always returns\n // an empty string. To make this method more explicit, we return null.\n return id !== '' ? id : null;\n }\n\n /** Gets the role of the dialog. */\n async getRole(): Promise<DialogRole | null> {\n return (await this.host()).getAttribute('role') as Promise<DialogRole | null>;\n }\n\n /** Gets the value of the dialog's \"aria-label\" attribute. */\n async getAriaLabel(): Promise<string | null> {\n return (await this.host()).getAttribute('aria-label');\n }\n\n /** Gets the value of the dialog's \"aria-labelledby\" attribute. */\n async getAriaLabelledby(): Promise<string | null> {\n return (await this.host()).getAttribute('aria-labelledby');\n }\n\n /** Gets the value of the dialog's \"aria-describedby\" attribute. */\n async getAriaDescribedby(): Promise<string | null> {\n return (await this.host()).getAttribute('aria-describedby');\n }\n\n /**\n * Closes the dialog by pressing escape.\n *\n * Note: this method does nothing if `disableClose` has been set to `true` for the dialog.\n */\n async close(): Promise<void> {\n await (await this.host()).sendKeys(TestKey.ESCAPE);\n }\n\n /** Gets te dialog's text. */\n async getText() {\n return (await this.host()).text();\n }\n\n /** Gets the dialog's title text. This only works if the dialog is using mat-dialog-title. */\n async getTitleText() {\n return (await this._title())?.text() ?? '';\n }\n\n /** Gets the dialog's content text. This only works if the dialog is using mat-dialog-content. */\n async getContentText() {\n return (await this._content())?.text() ?? '';\n }\n\n /** Gets the dialog's actions text. This only works if the dialog is using mat-dialog-actions. */\n async getActionsText() {\n return (await this._actions())?.text() ?? '';\n }\n}\n\n/** Harness for interacting with a standard `MatDialog` in tests. */\nexport class MatDialogHarness extends _MatDialogHarnessBase {\n // Developers can provide a custom component or template for the\n // dialog. The canonical dialog parent is the \"MatDialogContainer\".\n /** The selector for the host element of a `MatDialog` instance. */\n static hostSelector = '.mat-dialog-container';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a `MatDialogHarness` that meets\n * certain criteria.\n * @param options Options for filtering which dialog instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(options: DialogHarnessFilters = {}): HarnessPredicate<MatDialogHarness> {\n return new HarnessPredicate(MatDialogHarness, options);\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './dialog-harness';\nexport * from './dialog-harness-filters';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;AAmBA;MACa,qBAAqB;AAChC;SACQ,gCAA2D;IAFrE;;QAIY,WAAM,GAAG,IAAI,CAAC,kBAAkB,iCAAwB,CAAC;QACzD,aAAQ,GAAG,IAAI,CAAC,kBAAkB,qCAA0B,CAAC;QAC7D,aAAQ,GAAG,IAAI,CAAC,kBAAkB,qCAA0B,CAAC;KA0DxE;;IAvDO,KAAK;;YACT,MAAM,EAAE,GAAG,MAAM,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,EAAE,YAAY,CAAC,IAAI,CAAC,CAAC;;;YAGxD,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;SAC9B;KAAA;;IAGK,OAAO;;YACX,OAAO,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,EAAE,YAAY,CAAC,MAAM,CAA+B,CAAC;SAC/E;KAAA;;IAGK,YAAY;;YAChB,OAAO,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,EAAE,YAAY,CAAC,YAAY,CAAC,CAAC;SACvD;KAAA;;IAGK,iBAAiB;;YACrB,OAAO,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,EAAE,YAAY,CAAC,iBAAiB,CAAC,CAAC;SAC5D;KAAA;;IAGK,kBAAkB;;YACtB,OAAO,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,EAAE,YAAY,CAAC,kBAAkB,CAAC,CAAC;SAC7D;KAAA;;;;;;IAOK,KAAK;;YACT,MAAM,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,EAAE,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;SACpD;KAAA;;IAGK,OAAO;;YACX,OAAO,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,EAAE,IAAI,EAAE,CAAC;SACnC;KAAA;;IAGK,YAAY;;;YAChB,OAAO,MAAA,OAAC,MAAM,IAAI,CAAC,MAAM,EAAE,CAAC,0CAAE,IAAI,EAAE,mCAAI,EAAE,CAAC;;KAC5C;;IAGK,cAAc;;;YAClB,OAAO,MAAA,OAAC,MAAM,IAAI,CAAC,QAAQ,EAAE,CAAC,0CAAE,IAAI,EAAE,mCAAI,EAAE,CAAC;;KAC9C;;IAGK,cAAc;;;YAClB,OAAO,MAAA,OAAC,MAAM,IAAI,CAAC,QAAQ,EAAE,CAAC,0CAAE,IAAI,EAAE,mCAAI,EAAE,CAAC;;KAC9C;CACF;AAED;MACa,yBAAyB,qBAAqB;;;;;;;IAYzD,OAAO,IAAI,CAAC,UAAgC,EAAE;QAC5C,OAAO,IAAI,gBAAgB,CAAC,gBAAgB,EAAE,OAAO,CAAC,CAAC;KACxD;;AAbD;AACA;AACA;AACO,6BAAY,GAAG,uBAAuB;;AC3F/C;;;;;;;;ACAA;;;;;;;;;;"}
1
+ {"version":3,"file":"testing.mjs","sources":["../../../../../../../src/material/dialog/testing/dialog-harness.ts","../../../../../../../src/material/dialog/testing/dialog-opener.ts","../../../../../../../src/material/dialog/testing/public-api.ts","../../../../../../../src/material/dialog/testing/index.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ContentContainerComponentHarness, HarnessPredicate, TestKey} from '@angular/cdk/testing';\nimport {DialogRole} from '@angular/material/dialog';\nimport {DialogHarnessFilters} from './dialog-harness-filters';\n\n/** Selectors for different sections of the mat-dialog that can contain user content. */\nexport const enum MatDialogSection {\n TITLE = '.mat-dialog-title',\n CONTENT = '.mat-dialog-content',\n ACTIONS = '.mat-dialog-actions',\n}\n\n/** Base class for the `MatDialogHarness` implementation. */\nexport class _MatDialogHarnessBase\n // @breaking-change 14.0.0 change generic type to MatDialogSection.\n extends ContentContainerComponentHarness<MatDialogSection | string>\n{\n protected _title = this.locatorForOptional(MatDialogSection.TITLE);\n protected _content = this.locatorForOptional(MatDialogSection.CONTENT);\n protected _actions = this.locatorForOptional(MatDialogSection.ACTIONS);\n\n /** Gets the id of the dialog. */\n async getId(): Promise<string | null> {\n const id = await (await this.host()).getAttribute('id');\n // In case no id has been specified, the \"id\" property always returns\n // an empty string. To make this method more explicit, we return null.\n return id !== '' ? id : null;\n }\n\n /** Gets the role of the dialog. */\n async getRole(): Promise<DialogRole | null> {\n return (await this.host()).getAttribute('role') as Promise<DialogRole | null>;\n }\n\n /** Gets the value of the dialog's \"aria-label\" attribute. */\n async getAriaLabel(): Promise<string | null> {\n return (await this.host()).getAttribute('aria-label');\n }\n\n /** Gets the value of the dialog's \"aria-labelledby\" attribute. */\n async getAriaLabelledby(): Promise<string | null> {\n return (await this.host()).getAttribute('aria-labelledby');\n }\n\n /** Gets the value of the dialog's \"aria-describedby\" attribute. */\n async getAriaDescribedby(): Promise<string | null> {\n return (await this.host()).getAttribute('aria-describedby');\n }\n\n /**\n * Closes the dialog by pressing escape.\n *\n * Note: this method does nothing if `disableClose` has been set to `true` for the dialog.\n */\n async close(): Promise<void> {\n await (await this.host()).sendKeys(TestKey.ESCAPE);\n }\n\n /** Gets te dialog's text. */\n async getText() {\n return (await this.host()).text();\n }\n\n /** Gets the dialog's title text. This only works if the dialog is using mat-dialog-title. */\n async getTitleText() {\n return (await this._title())?.text() ?? '';\n }\n\n /** Gets the dialog's content text. This only works if the dialog is using mat-dialog-content. */\n async getContentText() {\n return (await this._content())?.text() ?? '';\n }\n\n /** Gets the dialog's actions text. This only works if the dialog is using mat-dialog-actions. */\n async getActionsText() {\n return (await this._actions())?.text() ?? '';\n }\n}\n\n/** Harness for interacting with a standard `MatDialog` in tests. */\nexport class MatDialogHarness extends _MatDialogHarnessBase {\n // Developers can provide a custom component or template for the\n // dialog. The canonical dialog parent is the \"MatDialogContainer\".\n /** The selector for the host element of a `MatDialog` instance. */\n static hostSelector = '.mat-dialog-container';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a `MatDialogHarness` that meets\n * certain criteria.\n * @param options Options for filtering which dialog instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(options: DialogHarnessFilters = {}): HarnessPredicate<MatDialogHarness> {\n return new HarnessPredicate(MatDialogHarness, options);\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ComponentType} from '@angular/cdk/overlay';\nimport {\n ChangeDetectionStrategy,\n Directive,\n Component,\n NgModule,\n OnDestroy,\n ViewEncapsulation,\n} from '@angular/core';\nimport {\n _MatDialogBase,\n _MatDialogContainerBase,\n MatDialog,\n MatDialogConfig,\n MatDialogContainer,\n MatDialogModule,\n MatDialogRef,\n} from '@angular/material/dialog';\nimport {Subscription} from 'rxjs';\nimport {NoopAnimationsModule} from '@angular/platform-browser/animations';\n\n/** Base class for a component that immediately opens a dialog when created. */\n@Directive()\nexport class _MatTestDialogOpenerBase<C extends _MatDialogContainerBase, T, R>\n implements OnDestroy\n{\n /** Component that should be opened with the MatDialog `open` method. */\n protected static component: ComponentType<unknown> | undefined;\n\n /** Config that should be provided to the MatDialog `open` method. */\n protected static config: MatDialogConfig | undefined;\n\n /** MatDialogRef returned from the MatDialog `open` method. */\n dialogRef: MatDialogRef<T, R>;\n\n /** Data passed to the `MatDialog` close method. */\n closedResult: R | undefined;\n\n private readonly _afterClosedSubscription: Subscription;\n\n constructor(public dialog: _MatDialogBase<C>) {\n if (!_MatTestDialogOpenerBase.component) {\n throw new Error(`MatTestDialogOpener does not have a component provided.`);\n }\n\n this.dialogRef = this.dialog.open<T, R>(\n _MatTestDialogOpenerBase.component as ComponentType<T>,\n _MatTestDialogOpenerBase.config || {},\n );\n this._afterClosedSubscription = this.dialogRef.afterClosed().subscribe(result => {\n this.closedResult = result;\n });\n }\n\n ngOnDestroy() {\n this._afterClosedSubscription.unsubscribe();\n _MatTestDialogOpenerBase.component = undefined;\n _MatTestDialogOpenerBase.config = undefined;\n }\n}\n\n/** Test component that immediately opens a dialog when created. */\n@Component({\n selector: 'mat-test-dialog-opener',\n template: '',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class MatTestDialogOpener<T = unknown, R = unknown> extends _MatTestDialogOpenerBase<\n MatDialogContainer,\n T,\n R\n> {\n constructor(dialog: MatDialog) {\n super(dialog);\n }\n\n /** Static method that prepares this class to open the provided component. */\n static withComponent<T = unknown, R = unknown>(\n component: ComponentType<T>,\n config?: MatDialogConfig,\n ) {\n _MatTestDialogOpenerBase.component = component;\n _MatTestDialogOpenerBase.config = config;\n return MatTestDialogOpener as ComponentType<MatTestDialogOpener<T, R>>;\n }\n}\n\n@NgModule({\n declarations: [MatTestDialogOpener],\n imports: [MatDialogModule, NoopAnimationsModule],\n})\nexport class MatTestDialogOpenerModule {}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './dialog-harness';\nexport * from './dialog-harness-filters';\nexport * from './dialog-opener';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":"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"}
@@ -6,16 +6,53 @@ import * as i0 from '@angular/core';
6
6
  import { EventEmitter, Directive, Optional, Inject, ViewChild, Component, ViewEncapsulation, ChangeDetectionStrategy, InjectionToken, Injector, TemplateRef, InjectFlags, Injectable, SkipSelf, Input, NgModule } from '@angular/core';
7
7
  import { MatCommonModule } from '@angular/material/core';
8
8
  import { Directionality } from '@angular/cdk/bidi';
9
- import { Subject, defer, Subscription, of } from 'rxjs';
9
+ import { Subject, defer, of } from 'rxjs';
10
10
  import { filter, take, startWith } from 'rxjs/operators';
11
+ import { trigger, state, style, transition, group, animate, query, animateChild } from '@angular/animations';
11
12
  import { _getFocusedElementPierceShadowDom } from '@angular/cdk/platform';
12
13
  import * as i2 from '@angular/common';
13
14
  import { DOCUMENT } from '@angular/common';
14
- import { trigger, state, style, transition, animate } from '@angular/animations';
15
15
  import * as i1 from '@angular/cdk/a11y';
16
16
  import { ESCAPE, hasModifierKey } from '@angular/cdk/keycodes';
17
17
  import { ANIMATION_MODULE_TYPE } from '@angular/platform-browser/animations';
18
18
 
19
+ /**
20
+ * @license
21
+ * Copyright Google LLC All Rights Reserved.
22
+ *
23
+ * Use of this source code is governed by an MIT-style license that can be
24
+ * found in the LICENSE file at https://angular.io/license
25
+ */
26
+ /**
27
+ * Default parameters for the animation for backwards compatibility.
28
+ * @docs-private
29
+ */
30
+ const defaultParams = {
31
+ params: { enterAnimationDuration: '150ms', exitAnimationDuration: '75ms' },
32
+ };
33
+ /**
34
+ * Animations used by MatDialog.
35
+ * @docs-private
36
+ */
37
+ const matDialogAnimations = {
38
+ /** Animation that is applied on the dialog container by default. */
39
+ dialogContainer: trigger('dialogContainer', [
40
+ // Note: The `enter` animation transitions to `transform: none`, because for some reason
41
+ // specifying the transform explicitly, causes IE both to blur the dialog content and
42
+ // decimate the animation performance. Leaving it as `none` solves both issues.
43
+ state('void, exit', style({ opacity: 0, transform: 'scale(0.7)' })),
44
+ state('enter', style({ transform: 'none' })),
45
+ transition('* => enter', group([
46
+ animate('{{enterAnimationDuration}} cubic-bezier(0, 0, 0.2, 1)', style({ transform: 'none', opacity: 1 })),
47
+ query('@*', animateChild(), { optional: true }),
48
+ ]), defaultParams),
49
+ transition('* => void, * => exit', group([
50
+ animate('{{exitAnimationDuration}} cubic-bezier(0.4, 0.0, 0.2, 1)', style({ opacity: 0 })),
51
+ query('@*', animateChild(), { optional: true }),
52
+ ]), defaultParams),
53
+ ]),
54
+ };
55
+
19
56
  /**
20
57
  * @license
21
58
  * Copyright Google LLC All Rights Reserved.
@@ -63,40 +100,22 @@ class MatDialogConfig {
63
100
  * previously-focused element, after it's closed.
64
101
  */
65
102
  this.restoreFocus = true;
103
+ /** Whether to wait for the opening animation to finish before trapping focus. */
104
+ this.delayFocusTrap = true;
66
105
  /**
67
106
  * Whether the dialog should close when the user goes backwards/forwards in history.
68
107
  * Note that this usually doesn't include clicking on links (unless the user is using
69
108
  * the `HashLocationStrategy`).
70
109
  */
71
110
  this.closeOnNavigation = true;
111
+ /** Duration of the enter animation. Has to be a valid CSS value (e.g. 100ms). */
112
+ this.enterAnimationDuration = defaultParams.params.enterAnimationDuration;
113
+ /** Duration of the exit animation. Has to be a valid CSS value (e.g. 50ms). */
114
+ this.exitAnimationDuration = defaultParams.params.exitAnimationDuration;
72
115
  // TODO(jelbourn): add configuration for lifecycle hooks, ARIA labelling.
73
116
  }
74
117
  }
75
118
 
76
- /**
77
- * @license
78
- * Copyright Google LLC All Rights Reserved.
79
- *
80
- * Use of this source code is governed by an MIT-style license that can be
81
- * found in the LICENSE file at https://angular.io/license
82
- */
83
- /**
84
- * Animations used by MatDialog.
85
- * @docs-private
86
- */
87
- const matDialogAnimations = {
88
- /** Animation that is applied on the dialog container by default. */
89
- dialogContainer: trigger('dialogContainer', [
90
- // Note: The `enter` animation transitions to `transform: none`, because for some reason
91
- // specifying the transform explicitly, causes IE both to blur the dialog content and
92
- // decimate the animation performance. Leaving it as `none` solves both issues.
93
- state('void, exit', style({ opacity: 0, transform: 'scale(0.7)' })),
94
- state('enter', style({ transform: 'none' })),
95
- transition('* => enter', animate('150ms cubic-bezier(0, 0, 0.2, 1)', style({ transform: 'none', opacity: 1 }))),
96
- transition('* => void, * => exit', animate('75ms cubic-bezier(0.4, 0.0, 0.2, 1)', style({ opacity: 0 }))),
97
- ]),
98
- };
99
-
100
119
  /**
101
120
  * Throws an exception for the case when a ComponentPortal is
102
121
  * attached to a DomPortalOutlet without an origin.
@@ -148,10 +167,15 @@ class _MatDialogContainerBase extends BasePortalOutlet {
148
167
  }
149
168
  /** Initializes the dialog container with the attached content. */
150
169
  _initializeWithAttachedContent() {
151
- this._setupFocusTrap();
170
+ this._focusTrap = this._focusTrapFactory.create(this._elementRef.nativeElement);
152
171
  // Save the previously focused element. This element will be re-focused
153
172
  // when the dialog closes.
154
- this._capturePreviouslyFocusedElement();
173
+ if (this._document) {
174
+ this._elementFocusedBeforeDialogWasOpened = _getFocusedElementPierceShadowDom();
175
+ }
176
+ if (!this._config.delayFocusTrap) {
177
+ this._trapFocus();
178
+ }
155
179
  }
156
180
  /**
157
181
  * Attach a ComponentPortal as content to this dialog container.
@@ -189,8 +213,13 @@ class _MatDialogContainerBase extends BasePortalOutlet {
189
213
  element.tabIndex = -1;
190
214
  // The tabindex attribute should be removed to avoid navigating to that element again
191
215
  this._ngZone.runOutsideAngular(() => {
192
- element.addEventListener('blur', () => element.removeAttribute('tabindex'));
193
- element.addEventListener('mousedown', () => element.removeAttribute('tabindex'));
216
+ const callback = () => {
217
+ element.removeEventListener('blur', callback);
218
+ element.removeEventListener('mousedown', callback);
219
+ element.removeAttribute('tabindex');
220
+ };
221
+ element.addEventListener('blur', callback);
222
+ element.addEventListener('mousedown', callback);
194
223
  });
195
224
  }
196
225
  element.focus(options);
@@ -276,16 +305,6 @@ class _MatDialogContainerBase extends BasePortalOutlet {
276
305
  this._focusTrap.destroy();
277
306
  }
278
307
  }
279
- /** Sets up the focus trap. */
280
- _setupFocusTrap() {
281
- this._focusTrap = this._focusTrapFactory.create(this._elementRef.nativeElement);
282
- }
283
- /** Captures the element that was focused before the dialog was opened. */
284
- _capturePreviouslyFocusedElement() {
285
- if (this._document) {
286
- this._elementFocusedBeforeDialogWasOpened = _getFocusedElementPierceShadowDom();
287
- }
288
- }
289
308
  /** Focuses the dialog container. */
290
309
  _focusDialogContainer() {
291
310
  // Note that there is no focus method when rendering on the server.
@@ -299,10 +318,20 @@ class _MatDialogContainerBase extends BasePortalOutlet {
299
318
  const activeElement = _getFocusedElementPierceShadowDom();
300
319
  return element === activeElement || element.contains(activeElement);
301
320
  }
321
+ /**
322
+ * Callback for when the open dialog animation has finished. Intended to
323
+ * be called by sub-classes that use different animation implementations.
324
+ */
325
+ _openAnimationDone(totalTime) {
326
+ if (this._config.delayFocusTrap) {
327
+ this._trapFocus();
328
+ }
329
+ this._animationStateChanged.next({ state: 'opened', totalTime });
330
+ }
302
331
  }
303
- _MatDialogContainerBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: _MatDialogContainerBase, deps: [{ token: i0.ElementRef }, { token: i1.FocusTrapFactory }, { token: i0.ChangeDetectorRef }, { token: DOCUMENT, optional: true }, { token: MatDialogConfig }, { token: i1.InteractivityChecker }, { token: i0.NgZone }, { token: i1.FocusMonitor }], target: i0.ɵɵFactoryTarget.Directive });
304
- _MatDialogContainerBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.0", type: _MatDialogContainerBase, viewQueries: [{ propertyName: "_portalOutlet", first: true, predicate: CdkPortalOutlet, descendants: true, static: true }], usesInheritance: true, ngImport: i0 });
305
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: _MatDialogContainerBase, decorators: [{
332
+ _MatDialogContainerBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0-next.14", ngImport: i0, type: _MatDialogContainerBase, deps: [{ token: i0.ElementRef }, { token: i1.FocusTrapFactory }, { token: i0.ChangeDetectorRef }, { token: DOCUMENT, optional: true }, { token: MatDialogConfig }, { token: i1.InteractivityChecker }, { token: i0.NgZone }, { token: i1.FocusMonitor }], target: i0.ɵɵFactoryTarget.Directive });
333
+ _MatDialogContainerBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "14.0.0-next.14", type: _MatDialogContainerBase, viewQueries: [{ propertyName: "_portalOutlet", first: true, predicate: CdkPortalOutlet, descendants: true, static: true }], usesInheritance: true, ngImport: i0 });
334
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.14", ngImport: i0, type: _MatDialogContainerBase, decorators: [{
306
335
  type: Directive
307
336
  }], ctorParameters: function () {
308
337
  return [{ type: i0.ElementRef }, { type: i1.FocusTrapFactory }, { type: i0.ChangeDetectorRef }, { type: undefined, decorators: [{
@@ -329,8 +358,7 @@ class MatDialogContainer extends _MatDialogContainerBase {
329
358
  /** Callback, invoked whenever an animation on the host completes. */
330
359
  _onAnimationDone({ toState, totalTime }) {
331
360
  if (toState === 'enter') {
332
- this._trapFocus();
333
- this._animationStateChanged.next({ state: 'opened', totalTime });
361
+ this._openAnimationDone(totalTime);
334
362
  }
335
363
  else if (toState === 'exit') {
336
364
  this._restoreFocus();
@@ -353,10 +381,19 @@ class MatDialogContainer extends _MatDialogContainerBase {
353
381
  // view container is using OnPush change detection.
354
382
  this._changeDetectorRef.markForCheck();
355
383
  }
384
+ _getAnimationState() {
385
+ return {
386
+ value: this._state,
387
+ params: {
388
+ 'enterAnimationDuration': this._config.enterAnimationDuration || defaultParams.params.enterAnimationDuration,
389
+ 'exitAnimationDuration': this._config.exitAnimationDuration || defaultParams.params.exitAnimationDuration,
390
+ },
391
+ };
392
+ }
356
393
  }
357
- MatDialogContainer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: MatDialogContainer, deps: null, target: i0.ɵɵFactoryTarget.Component });
358
- MatDialogContainer.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.0", type: MatDialogContainer, selector: "mat-dialog-container", host: { attributes: { "tabindex": "-1", "aria-modal": "true" }, listeners: { "@dialogContainer.start": "_onAnimationStart($event)", "@dialogContainer.done": "_onAnimationDone($event)" }, properties: { "id": "_id", "attr.role": "_config.role", "attr.aria-labelledby": "_config.ariaLabel ? null : _ariaLabelledBy", "attr.aria-label": "_config.ariaLabel", "attr.aria-describedby": "_config.ariaDescribedBy || null", "@dialogContainer": "_state" }, classAttribute: "mat-dialog-container" }, usesInheritance: true, ngImport: i0, template: "<ng-template cdkPortalOutlet></ng-template>\n", styles: [".mat-dialog-container{display:block;padding:24px;border-radius:4px;box-sizing:border-box;overflow:auto;outline:0;width:100%;height:100%;min-height:inherit;max-height:inherit}.cdk-high-contrast-active .mat-dialog-container{outline:solid 1px}.mat-dialog-content{display:block;margin:0 -24px;padding:0 24px;max-height:65vh;overflow:auto;-webkit-overflow-scrolling:touch}.mat-dialog-title{margin:0 0 20px;display:block}.mat-dialog-actions{padding:8px 0;display:flex;flex-wrap:wrap;min-height:52px;align-items:center;box-sizing:content-box;margin-bottom:-24px}.mat-dialog-actions[align=end]{justify-content:flex-end}.mat-dialog-actions[align=center]{justify-content:center}.mat-dialog-actions .mat-button-base+.mat-button-base,.mat-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:8px}[dir=rtl] .mat-dialog-actions .mat-button-base+.mat-button-base,[dir=rtl] .mat-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:0;margin-right:8px}\n"], directives: [{ type: i3.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }], animations: [matDialogAnimations.dialogContainer], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None });
359
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: MatDialogContainer, decorators: [{
394
+ MatDialogContainer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0-next.14", ngImport: i0, type: MatDialogContainer, deps: null, target: i0.ɵɵFactoryTarget.Component });
395
+ MatDialogContainer.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "14.0.0-next.14", type: MatDialogContainer, selector: "mat-dialog-container", host: { attributes: { "tabindex": "-1", "aria-modal": "true" }, listeners: { "@dialogContainer.start": "_onAnimationStart($event)", "@dialogContainer.done": "_onAnimationDone($event)" }, properties: { "id": "_id", "attr.role": "_config.role", "attr.aria-labelledby": "_config.ariaLabel ? null : _ariaLabelledBy", "attr.aria-label": "_config.ariaLabel", "attr.aria-describedby": "_config.ariaDescribedBy || null", "@dialogContainer": "_getAnimationState()" }, classAttribute: "mat-dialog-container" }, usesInheritance: true, ngImport: i0, template: "<ng-template cdkPortalOutlet></ng-template>\n", styles: [".mat-dialog-container{display:block;padding:24px;border-radius:4px;box-sizing:border-box;overflow:auto;outline:0;width:100%;height:100%;min-height:inherit;max-height:inherit}.cdk-high-contrast-active .mat-dialog-container{outline:solid 1px}.mat-dialog-content{display:block;margin:0 -24px;padding:0 24px;max-height:65vh;overflow:auto;-webkit-overflow-scrolling:touch}.mat-dialog-title{margin:0 0 20px;display:block}.mat-dialog-actions{padding:8px 0;display:flex;flex-wrap:wrap;min-height:52px;align-items:center;box-sizing:content-box;margin-bottom:-24px}.mat-dialog-actions.mat-dialog-actions-align-center,.mat-dialog-actions[align=center]{justify-content:center}.mat-dialog-actions.mat-dialog-actions-align-end,.mat-dialog-actions[align=end]{justify-content:flex-end}.mat-dialog-actions .mat-button-base+.mat-button-base,.mat-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:8px}[dir=rtl] .mat-dialog-actions .mat-button-base+.mat-button-base,[dir=rtl] .mat-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:0;margin-right:8px}"], dependencies: [{ kind: "directive", type: i3.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }], animations: [matDialogAnimations.dialogContainer], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None });
396
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.14", ngImport: i0, type: MatDialogContainer, decorators: [{
360
397
  type: Component,
361
398
  args: [{ selector: 'mat-dialog-container', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.Default, animations: [matDialogAnimations.dialogContainer], host: {
362
399
  'class': 'mat-dialog-container',
@@ -367,10 +404,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImpor
367
404
  '[attr.aria-labelledby]': '_config.ariaLabel ? null : _ariaLabelledBy',
368
405
  '[attr.aria-label]': '_config.ariaLabel',
369
406
  '[attr.aria-describedby]': '_config.ariaDescribedBy || null',
370
- '[@dialogContainer]': '_state',
407
+ '[@dialogContainer]': `_getAnimationState()`,
371
408
  '(@dialogContainer.start)': '_onAnimationStart($event)',
372
409
  '(@dialogContainer.done)': '_onAnimationDone($event)',
373
- }, template: "<ng-template cdkPortalOutlet></ng-template>\n", styles: [".mat-dialog-container{display:block;padding:24px;border-radius:4px;box-sizing:border-box;overflow:auto;outline:0;width:100%;height:100%;min-height:inherit;max-height:inherit}.cdk-high-contrast-active .mat-dialog-container{outline:solid 1px}.mat-dialog-content{display:block;margin:0 -24px;padding:0 24px;max-height:65vh;overflow:auto;-webkit-overflow-scrolling:touch}.mat-dialog-title{margin:0 0 20px;display:block}.mat-dialog-actions{padding:8px 0;display:flex;flex-wrap:wrap;min-height:52px;align-items:center;box-sizing:content-box;margin-bottom:-24px}.mat-dialog-actions[align=end]{justify-content:flex-end}.mat-dialog-actions[align=center]{justify-content:center}.mat-dialog-actions .mat-button-base+.mat-button-base,.mat-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:8px}[dir=rtl] .mat-dialog-actions .mat-button-base+.mat-button-base,[dir=rtl] .mat-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:0;margin-right:8px}\n"] }]
410
+ }, template: "<ng-template cdkPortalOutlet></ng-template>\n", styles: [".mat-dialog-container{display:block;padding:24px;border-radius:4px;box-sizing:border-box;overflow:auto;outline:0;width:100%;height:100%;min-height:inherit;max-height:inherit}.cdk-high-contrast-active .mat-dialog-container{outline:solid 1px}.mat-dialog-content{display:block;margin:0 -24px;padding:0 24px;max-height:65vh;overflow:auto;-webkit-overflow-scrolling:touch}.mat-dialog-title{margin:0 0 20px;display:block}.mat-dialog-actions{padding:8px 0;display:flex;flex-wrap:wrap;min-height:52px;align-items:center;box-sizing:content-box;margin-bottom:-24px}.mat-dialog-actions.mat-dialog-actions-align-center,.mat-dialog-actions[align=center]{justify-content:center}.mat-dialog-actions.mat-dialog-actions-align-end,.mat-dialog-actions[align=end]{justify-content:flex-end}.mat-dialog-actions .mat-button-base+.mat-button-base,.mat-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:8px}[dir=rtl] .mat-dialog-actions .mat-button-base+.mat-button-base,[dir=rtl] .mat-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:0;margin-right:8px}"] }]
374
411
  }] });
375
412
 
376
413
  /**
@@ -603,7 +640,12 @@ const MAT_DIALOG_SCROLL_STRATEGY_PROVIDER = {
603
640
  * for arbitrary dialog refs and dialog container components.
604
641
  */
605
642
  class _MatDialogBase {
606
- constructor(_overlay, _injector, _defaultOptions, _parentDialog, _overlayContainer, scrollStrategy, _dialogRefConstructor, _dialogContainerType, _dialogDataToken, _animationMode) {
643
+ constructor(_overlay, _injector, _defaultOptions, _parentDialog, _overlayContainer, scrollStrategy, _dialogRefConstructor, _dialogContainerType, _dialogDataToken,
644
+ /**
645
+ * @deprecated No longer used. To be removed.
646
+ * @breaking-change 14.0.0
647
+ */
648
+ _animationMode) {
607
649
  this._overlay = _overlay;
608
650
  this._injector = _injector;
609
651
  this._defaultOptions = _defaultOptions;
@@ -612,12 +654,10 @@ class _MatDialogBase {
612
654
  this._dialogRefConstructor = _dialogRefConstructor;
613
655
  this._dialogContainerType = _dialogContainerType;
614
656
  this._dialogDataToken = _dialogDataToken;
615
- this._animationMode = _animationMode;
616
657
  this._openDialogsAtThisLevel = [];
617
658
  this._afterAllClosedAtThisLevel = new Subject();
618
659
  this._afterOpenedAtThisLevel = new Subject();
619
660
  this._ariaHiddenElements = new Map();
620
- this._dialogAnimatingOpen = false;
621
661
  // TODO (jelbourn): tighten the typing right-hand side of this expression.
622
662
  /**
623
663
  * Stream that emits when all open dialog have finished closing.
@@ -647,29 +687,9 @@ class _MatDialogBase {
647
687
  (typeof ngDevMode === 'undefined' || ngDevMode)) {
648
688
  throw Error(`Dialog with id "${config.id}" exists already. The dialog id must be unique.`);
649
689
  }
650
- // If there is a dialog that is currently animating open, return the MatDialogRef of that dialog
651
- if (this._dialogAnimatingOpen) {
652
- return this._lastDialogRef;
653
- }
654
690
  const overlayRef = this._createOverlay(config);
655
691
  const dialogContainer = this._attachDialogContainer(overlayRef, config);
656
- if (this._animationMode !== 'NoopAnimations') {
657
- const animationStateSubscription = dialogContainer._animationStateChanged.subscribe(dialogAnimationEvent => {
658
- if (dialogAnimationEvent.state === 'opening') {
659
- this._dialogAnimatingOpen = true;
660
- }
661
- if (dialogAnimationEvent.state === 'opened') {
662
- this._dialogAnimatingOpen = false;
663
- animationStateSubscription.unsubscribe();
664
- }
665
- });
666
- if (!this._animationStateSubscriptions) {
667
- this._animationStateSubscriptions = new Subscription();
668
- }
669
- this._animationStateSubscriptions.add(animationStateSubscription);
670
- }
671
692
  const dialogRef = this._attachDialogContent(componentOrTemplateRef, dialogContainer, overlayRef, config);
672
- this._lastDialogRef = dialogRef;
673
693
  // If this is the first dialog that we're opening, hide all the non-overlay content.
674
694
  if (!this.openDialogs.length) {
675
695
  this._hideNonDialogContentFromAssistiveTechnology();
@@ -700,10 +720,6 @@ class _MatDialogBase {
700
720
  this._closeDialogs(this._openDialogsAtThisLevel);
701
721
  this._afterAllClosedAtThisLevel.complete();
702
722
  this._afterOpenedAtThisLevel.complete();
703
- // Clean up any subscriptions to dialogs that never finished opening.
704
- if (this._animationStateSubscriptions) {
705
- this._animationStateSubscriptions.unsubscribe();
706
- }
707
723
  }
708
724
  /**
709
725
  * Creates the overlay into which the dialog will be loaded.
@@ -744,7 +760,8 @@ class _MatDialogBase {
744
760
  * @returns A promise resolving to a ComponentRef for the attached container.
745
761
  */
746
762
  _attachDialogContainer(overlay, config) {
747
- const userInjector = config && config.viewContainerRef && config.viewContainerRef.injector;
763
+ var _a, _b;
764
+ const userInjector = (_a = config.injector) !== null && _a !== void 0 ? _a : (_b = config.viewContainerRef) === null || _b === void 0 ? void 0 : _b.injector;
748
765
  const injector = Injector.create({
749
766
  parent: userInjector || this._injector,
750
767
  providers: [{ provide: MatDialogConfig, useValue: config }],
@@ -766,15 +783,15 @@ class _MatDialogBase {
766
783
  // Create a reference to the dialog we're creating in order to give the user a handle
767
784
  // to modify and close it.
768
785
  const dialogRef = new this._dialogRefConstructor(overlayRef, dialogContainer, config.id);
786
+ const injector = this._createInjector(config, dialogRef, dialogContainer);
769
787
  if (componentOrTemplateRef instanceof TemplateRef) {
770
788
  dialogContainer.attachTemplatePortal(new TemplatePortal(componentOrTemplateRef, null, {
771
789
  $implicit: config.data,
772
790
  dialogRef,
773
- }));
791
+ }, injector));
774
792
  }
775
793
  else {
776
- const injector = this._createInjector(config, dialogRef, dialogContainer);
777
- const contentRef = dialogContainer.attachComponentPortal(new ComponentPortal(componentOrTemplateRef, config.viewContainerRef, injector));
794
+ const contentRef = dialogContainer.attachComponentPortal(new ComponentPortal(componentOrTemplateRef, config.viewContainerRef, injector, config.componentFactoryResolver));
778
795
  dialogRef.componentInstance = contentRef.instance;
779
796
  }
780
797
  dialogRef.updateSize(config.width, config.height).updatePosition(config.position);
@@ -865,9 +882,9 @@ class _MatDialogBase {
865
882
  }
866
883
  }
867
884
  }
868
- _MatDialogBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: _MatDialogBase, deps: "invalid", target: i0.ɵɵFactoryTarget.Directive });
869
- _MatDialogBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.0", type: _MatDialogBase, ngImport: i0 });
870
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: _MatDialogBase, decorators: [{
885
+ _MatDialogBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0-next.14", ngImport: i0, type: _MatDialogBase, deps: "invalid", target: i0.ɵɵFactoryTarget.Directive });
886
+ _MatDialogBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "14.0.0-next.14", type: _MatDialogBase, ngImport: i0 });
887
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.14", ngImport: i0, type: _MatDialogBase, decorators: [{
871
888
  type: Directive
872
889
  }], ctorParameters: function () { return [{ type: i1$1.Overlay }, { type: i0.Injector }, { type: undefined }, { type: undefined }, { type: i1$1.OverlayContainer }, { type: undefined }, { type: i0.Type }, { type: i0.Type }, { type: i0.InjectionToken }, { type: undefined }]; } });
873
890
  /**
@@ -879,13 +896,18 @@ class MatDialog extends _MatDialogBase {
879
896
  * @deprecated `_location` parameter to be removed.
880
897
  * @breaking-change 10.0.0
881
898
  */
882
- location, defaultOptions, scrollStrategy, parentDialog, overlayContainer, animationMode) {
899
+ location, defaultOptions, scrollStrategy, parentDialog, overlayContainer,
900
+ /**
901
+ * @deprecated No longer used. To be removed.
902
+ * @breaking-change 14.0.0
903
+ */
904
+ animationMode) {
883
905
  super(overlay, injector, defaultOptions, parentDialog, overlayContainer, scrollStrategy, MatDialogRef, MatDialogContainer, MAT_DIALOG_DATA, animationMode);
884
906
  }
885
907
  }
886
- MatDialog.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: MatDialog, deps: [{ token: i1$1.Overlay }, { token: i0.Injector }, { token: i2.Location, optional: true }, { token: MAT_DIALOG_DEFAULT_OPTIONS, optional: true }, { token: MAT_DIALOG_SCROLL_STRATEGY }, { token: MatDialog, optional: true, skipSelf: true }, { token: i1$1.OverlayContainer }, { token: ANIMATION_MODULE_TYPE, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
887
- MatDialog.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: MatDialog });
888
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: MatDialog, decorators: [{
908
+ MatDialog.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0-next.14", ngImport: i0, type: MatDialog, deps: [{ token: i1$1.Overlay }, { token: i0.Injector }, { token: i2.Location, optional: true }, { token: MAT_DIALOG_DEFAULT_OPTIONS, optional: true }, { token: MAT_DIALOG_SCROLL_STRATEGY }, { token: MatDialog, optional: true, skipSelf: true }, { token: i1$1.OverlayContainer }, { token: ANIMATION_MODULE_TYPE, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
909
+ MatDialog.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.0-next.14", ngImport: i0, type: MatDialog });
910
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.14", ngImport: i0, type: MatDialog, decorators: [{
889
911
  type: Injectable
890
912
  }], ctorParameters: function () {
891
913
  return [{ type: i1$1.Overlay }, { type: i0.Injector }, { type: i2.Location, decorators: [{
@@ -971,9 +993,9 @@ class MatDialogClose {
971
993
  _closeDialogVia(this.dialogRef, event.screenX === 0 && event.screenY === 0 ? 'keyboard' : 'mouse', this.dialogResult);
972
994
  }
973
995
  }
974
- MatDialogClose.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: MatDialogClose, deps: [{ token: MatDialogRef, optional: true }, { token: i0.ElementRef }, { token: MatDialog }], target: i0.ɵɵFactoryTarget.Directive });
975
- MatDialogClose.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.0", type: MatDialogClose, 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 });
976
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: MatDialogClose, decorators: [{
996
+ MatDialogClose.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0-next.14", ngImport: i0, type: MatDialogClose, deps: [{ token: MatDialogRef, optional: true }, { token: i0.ElementRef }, { token: MatDialog }], target: i0.ɵɵFactoryTarget.Directive });
997
+ MatDialogClose.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "14.0.0-next.14", type: MatDialogClose, 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 });
998
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.14", ngImport: i0, type: MatDialogClose, decorators: [{
977
999
  type: Directive,
978
1000
  args: [{
979
1001
  selector: '[mat-dialog-close], [matDialogClose]',
@@ -1028,9 +1050,9 @@ class MatDialogTitle {
1028
1050
  }
1029
1051
  }
1030
1052
  }
1031
- MatDialogTitle.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: MatDialogTitle, deps: [{ token: MatDialogRef, optional: true }, { token: i0.ElementRef }, { token: MatDialog }], target: i0.ɵɵFactoryTarget.Directive });
1032
- MatDialogTitle.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.0", type: MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: { id: "id" }, host: { properties: { "id": "id" }, classAttribute: "mat-dialog-title" }, exportAs: ["matDialogTitle"], ngImport: i0 });
1033
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: MatDialogTitle, decorators: [{
1053
+ MatDialogTitle.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0-next.14", ngImport: i0, type: MatDialogTitle, deps: [{ token: MatDialogRef, optional: true }, { token: i0.ElementRef }, { token: MatDialog }], target: i0.ɵɵFactoryTarget.Directive });
1054
+ MatDialogTitle.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "14.0.0-next.14", type: MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: { id: "id" }, host: { properties: { "id": "id" }, classAttribute: "mat-dialog-title" }, exportAs: ["matDialogTitle"], ngImport: i0 });
1055
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.14", ngImport: i0, type: MatDialogTitle, decorators: [{
1034
1056
  type: Directive,
1035
1057
  args: [{
1036
1058
  selector: '[mat-dialog-title], [matDialogTitle]',
@@ -1052,9 +1074,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImpor
1052
1074
  */
1053
1075
  class MatDialogContent {
1054
1076
  }
1055
- MatDialogContent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: MatDialogContent, deps: [], target: i0.ɵɵFactoryTarget.Directive });
1056
- MatDialogContent.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.0", type: MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]", host: { classAttribute: "mat-dialog-content" }, ngImport: i0 });
1057
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: MatDialogContent, decorators: [{
1077
+ MatDialogContent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0-next.14", ngImport: i0, type: MatDialogContent, deps: [], target: i0.ɵɵFactoryTarget.Directive });
1078
+ MatDialogContent.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "14.0.0-next.14", type: MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]", host: { classAttribute: "mat-dialog-content" }, ngImport: i0 });
1079
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.14", ngImport: i0, type: MatDialogContent, decorators: [{
1058
1080
  type: Directive,
1059
1081
  args: [{
1060
1082
  selector: `[mat-dialog-content], mat-dialog-content, [matDialogContent]`,
@@ -1066,16 +1088,32 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImpor
1066
1088
  * Stays fixed to the bottom when scrolling.
1067
1089
  */
1068
1090
  class MatDialogActions {
1091
+ constructor() {
1092
+ /**
1093
+ * Horizontal alignment of action buttons.
1094
+ */
1095
+ this.align = 'start';
1096
+ }
1069
1097
  }
1070
- MatDialogActions.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: MatDialogActions, deps: [], target: i0.ɵɵFactoryTarget.Directive });
1071
- MatDialogActions.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.0", type: MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", host: { classAttribute: "mat-dialog-actions" }, ngImport: i0 });
1072
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: MatDialogActions, decorators: [{
1098
+ MatDialogActions.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0-next.14", ngImport: i0, type: MatDialogActions, deps: [], target: i0.ɵɵFactoryTarget.Directive });
1099
+ MatDialogActions.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "14.0.0-next.14", type: MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: { align: "align" }, host: { properties: { "class.mat-dialog-actions-align-center": "align === \"center\"", "class.mat-dialog-actions-align-end": "align === \"end\"" }, classAttribute: "mat-dialog-actions" }, ngImport: i0 });
1100
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.14", ngImport: i0, type: MatDialogActions, decorators: [{
1073
1101
  type: Directive,
1074
1102
  args: [{
1075
1103
  selector: `[mat-dialog-actions], mat-dialog-actions, [matDialogActions]`,
1076
- host: { 'class': 'mat-dialog-actions' },
1104
+ host: {
1105
+ 'class': 'mat-dialog-actions',
1106
+ '[class.mat-dialog-actions-align-center]': 'align === "center"',
1107
+ '[class.mat-dialog-actions-align-end]': 'align === "end"',
1108
+ },
1077
1109
  }]
1078
- }] });
1110
+ }], propDecorators: { align: [{
1111
+ type: Input
1112
+ }] } });
1113
+ // TODO(crisbeto): this utility shouldn't be necessary anymore, because the dialog ref is provided
1114
+ // both to component and template dialogs through DI. We need to keep it around, because there are
1115
+ // some internal wrappers around `MatDialog` that happened to work by accident, because we had this
1116
+ // fallback logic in place.
1079
1117
  /**
1080
1118
  * Finds the closest MatDialogRef to an element by looking at the DOM.
1081
1119
  * @param element Element relative to which to look for a dialog.
@@ -1098,8 +1136,8 @@ function getClosestDialog(element, openDialogs) {
1098
1136
  */
1099
1137
  class MatDialogModule {
1100
1138
  }
1101
- MatDialogModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: MatDialogModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1102
- MatDialogModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: MatDialogModule, declarations: [MatDialogContainer,
1139
+ MatDialogModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0-next.14", ngImport: i0, type: MatDialogModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1140
+ MatDialogModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "14.0.0-next.14", ngImport: i0, type: MatDialogModule, declarations: [MatDialogContainer,
1103
1141
  MatDialogClose,
1104
1142
  MatDialogTitle,
1105
1143
  MatDialogActions,
@@ -1109,8 +1147,8 @@ MatDialogModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version
1109
1147
  MatDialogContent,
1110
1148
  MatDialogActions,
1111
1149
  MatCommonModule] });
1112
- MatDialogModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: MatDialogModule, providers: [MatDialog, MAT_DIALOG_SCROLL_STRATEGY_PROVIDER], imports: [[OverlayModule, PortalModule, MatCommonModule], MatCommonModule] });
1113
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: MatDialogModule, decorators: [{
1150
+ MatDialogModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.0-next.14", ngImport: i0, type: MatDialogModule, providers: [MatDialog, MAT_DIALOG_SCROLL_STRATEGY_PROVIDER], imports: [[OverlayModule, PortalModule, MatCommonModule], MatCommonModule] });
1151
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.14", ngImport: i0, type: MatDialogModule, decorators: [{
1114
1152
  type: NgModule,
1115
1153
  args: [{
1116
1154
  imports: [OverlayModule, PortalModule, MatCommonModule],