@angular/material 10.0.0-rc.3 → 10.1.0

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 (627) hide show
  1. package/_theming.scss +17 -17
  2. package/autocomplete/index.metadata.json +1 -1
  3. package/autocomplete/testing/autocomplete-harness.d.ts +2 -0
  4. package/bundles/material-autocomplete-testing.umd.js +11 -0
  5. package/bundles/material-autocomplete-testing.umd.js.map +1 -1
  6. package/bundles/material-autocomplete-testing.umd.min.js +2 -2
  7. package/bundles/material-autocomplete-testing.umd.min.js.map +1 -1
  8. package/bundles/material-autocomplete.umd.js +3 -1
  9. package/bundles/material-autocomplete.umd.js.map +1 -1
  10. package/bundles/material-autocomplete.umd.min.js +5 -5
  11. package/bundles/material-autocomplete.umd.min.js.map +1 -1
  12. package/bundles/material-badge-testing.umd.min.js +1 -1
  13. package/bundles/material-badge-testing.umd.min.js.map +1 -1
  14. package/bundles/material-bottom-sheet-testing.umd.min.js +1 -1
  15. package/bundles/material-bottom-sheet-testing.umd.min.js.map +1 -1
  16. package/bundles/material-button-testing.umd.js +11 -0
  17. package/bundles/material-button-testing.umd.js.map +1 -1
  18. package/bundles/material-button-testing.umd.min.js +2 -2
  19. package/bundles/material-button-testing.umd.min.js.map +1 -1
  20. package/bundles/material-button-toggle-testing.umd.js +11 -0
  21. package/bundles/material-button-toggle-testing.umd.js.map +1 -1
  22. package/bundles/material-button-toggle-testing.umd.min.js +3 -3
  23. package/bundles/material-button-toggle-testing.umd.min.js.map +1 -1
  24. package/bundles/material-button-toggle.umd.js +12 -3
  25. package/bundles/material-button-toggle.umd.js.map +1 -1
  26. package/bundles/material-button-toggle.umd.min.js +2 -2
  27. package/bundles/material-button-toggle.umd.min.js.map +1 -1
  28. package/bundles/material-button.umd.js +7 -2
  29. package/bundles/material-button.umd.js.map +1 -1
  30. package/bundles/material-button.umd.min.js +4 -4
  31. package/bundles/material-button.umd.min.js.map +1 -1
  32. package/bundles/material-card-testing.umd.js +335 -0
  33. package/bundles/material-card-testing.umd.js.map +1 -0
  34. package/bundles/material-card-testing.umd.min.js +44 -0
  35. package/bundles/material-card-testing.umd.min.js.map +1 -0
  36. package/bundles/material-checkbox-testing.umd.js +11 -0
  37. package/bundles/material-checkbox-testing.umd.js.map +1 -1
  38. package/bundles/material-checkbox-testing.umd.min.js +3 -3
  39. package/bundles/material-checkbox-testing.umd.min.js.map +1 -1
  40. package/bundles/material-checkbox.umd.js.map +1 -1
  41. package/bundles/material-chips.umd.js +36 -12
  42. package/bundles/material-chips.umd.js.map +1 -1
  43. package/bundles/material-chips.umd.min.js +4 -4
  44. package/bundles/material-chips.umd.min.js.map +1 -1
  45. package/bundles/material-core-testing.umd.min.js +1 -1
  46. package/bundles/material-core-testing.umd.min.js.map +1 -1
  47. package/bundles/material-core.umd.js +11 -3
  48. package/bundles/material-core.umd.js.map +1 -1
  49. package/bundles/material-core.umd.min.js +11 -11
  50. package/bundles/material-core.umd.min.js.map +1 -1
  51. package/bundles/material-datepicker.umd.js +20 -11
  52. package/bundles/material-datepicker.umd.js.map +1 -1
  53. package/bundles/material-datepicker.umd.min.js +5 -5
  54. package/bundles/material-datepicker.umd.min.js.map +1 -1
  55. package/bundles/material-dialog-testing.umd.min.js +1 -1
  56. package/bundles/material-dialog-testing.umd.min.js.map +1 -1
  57. package/bundles/material-dialog.umd.js +45 -8
  58. package/bundles/material-dialog.umd.js.map +1 -1
  59. package/bundles/material-dialog.umd.min.js +14 -7
  60. package/bundles/material-dialog.umd.min.js.map +1 -1
  61. package/bundles/material-divider-testing.umd.min.js +1 -1
  62. package/bundles/material-divider-testing.umd.min.js.map +1 -1
  63. package/bundles/material-expansion-testing.umd.js +11 -0
  64. package/bundles/material-expansion-testing.umd.js.map +1 -1
  65. package/bundles/material-expansion-testing.umd.min.js +3 -3
  66. package/bundles/material-expansion-testing.umd.min.js.map +1 -1
  67. package/bundles/material-form-field-testing.umd.js +32 -0
  68. package/bundles/material-form-field-testing.umd.js.map +1 -1
  69. package/bundles/material-form-field-testing.umd.min.js +4 -4
  70. package/bundles/material-form-field-testing.umd.min.js.map +1 -1
  71. package/bundles/material-form-field.umd.js +47 -21
  72. package/bundles/material-form-field.umd.js.map +1 -1
  73. package/bundles/material-form-field.umd.min.js +5 -5
  74. package/bundles/material-form-field.umd.min.js.map +1 -1
  75. package/bundles/material-grid-list-testing.umd.min.js +1 -1
  76. package/bundles/material-grid-list-testing.umd.min.js.map +1 -1
  77. package/bundles/material-grid-list.umd.js +2 -2
  78. package/bundles/material-grid-list.umd.js.map +1 -1
  79. package/bundles/material-grid-list.umd.min.js +2 -2
  80. package/bundles/material-grid-list.umd.min.js.map +1 -1
  81. package/bundles/material-input-testing.umd.js +23 -6
  82. package/bundles/material-input-testing.umd.js.map +1 -1
  83. package/bundles/material-input-testing.umd.min.js +3 -3
  84. package/bundles/material-input-testing.umd.min.js.map +1 -1
  85. package/bundles/material-input.umd.js +28 -3
  86. package/bundles/material-input.umd.js.map +1 -1
  87. package/bundles/material-input.umd.min.js +3 -3
  88. package/bundles/material-input.umd.min.js.map +1 -1
  89. package/bundles/material-list-testing.umd.js +33 -0
  90. package/bundles/material-list-testing.umd.js.map +1 -1
  91. package/bundles/material-list-testing.umd.min.js +2 -2
  92. package/bundles/material-list-testing.umd.min.js.map +1 -1
  93. package/bundles/material-list.umd.js +3 -3
  94. package/bundles/material-list.umd.min.js +1 -1
  95. package/bundles/material-list.umd.min.js.map +1 -1
  96. package/bundles/material-menu-testing.umd.js +22 -0
  97. package/bundles/material-menu-testing.umd.js.map +1 -1
  98. package/bundles/material-menu-testing.umd.min.js +2 -2
  99. package/bundles/material-menu-testing.umd.min.js.map +1 -1
  100. package/bundles/material-menu.umd.js +13 -2
  101. package/bundles/material-menu.umd.js.map +1 -1
  102. package/bundles/material-menu.umd.min.js +4 -4
  103. package/bundles/material-menu.umd.min.js.map +1 -1
  104. package/bundles/material-paginator-testing.umd.min.js +1 -1
  105. package/bundles/material-paginator-testing.umd.min.js.map +1 -1
  106. package/bundles/material-progress-bar-testing.umd.min.js +1 -1
  107. package/bundles/material-progress-bar-testing.umd.min.js.map +1 -1
  108. package/bundles/material-progress-spinner-testing.umd.js +1 -1
  109. package/bundles/material-progress-spinner-testing.umd.js.map +1 -1
  110. package/bundles/material-progress-spinner-testing.umd.min.js +2 -2
  111. package/bundles/material-progress-spinner-testing.umd.min.js.map +1 -1
  112. package/bundles/material-progress-spinner.umd.js +2 -2
  113. package/bundles/material-progress-spinner.umd.min.js +3 -3
  114. package/bundles/material-progress-spinner.umd.min.js.map +1 -1
  115. package/bundles/material-radio-testing.umd.js +11 -0
  116. package/bundles/material-radio-testing.umd.js.map +1 -1
  117. package/bundles/material-radio-testing.umd.min.js +3 -3
  118. package/bundles/material-radio-testing.umd.min.js.map +1 -1
  119. package/bundles/material-radio.umd.js +15 -5
  120. package/bundles/material-radio.umd.js.map +1 -1
  121. package/bundles/material-radio.umd.min.js +2 -2
  122. package/bundles/material-radio.umd.min.js.map +1 -1
  123. package/bundles/material-select-testing.umd.js +11 -0
  124. package/bundles/material-select-testing.umd.js.map +1 -1
  125. package/bundles/material-select-testing.umd.min.js +2 -2
  126. package/bundles/material-select-testing.umd.min.js.map +1 -1
  127. package/bundles/material-select.umd.js +11 -3
  128. package/bundles/material-select.umd.js.map +1 -1
  129. package/bundles/material-select.umd.min.js +4 -4
  130. package/bundles/material-select.umd.min.js.map +1 -1
  131. package/bundles/material-sidenav-testing.umd.min.js +1 -1
  132. package/bundles/material-sidenav-testing.umd.min.js.map +1 -1
  133. package/bundles/material-sidenav.umd.js +41 -17
  134. package/bundles/material-sidenav.umd.js.map +1 -1
  135. package/bundles/material-sidenav.umd.min.js +2 -2
  136. package/bundles/material-sidenav.umd.min.js.map +1 -1
  137. package/bundles/material-slide-toggle-testing.umd.js +11 -0
  138. package/bundles/material-slide-toggle-testing.umd.js.map +1 -1
  139. package/bundles/material-slide-toggle-testing.umd.min.js +2 -2
  140. package/bundles/material-slide-toggle-testing.umd.min.js.map +1 -1
  141. package/bundles/material-slide-toggle.umd.js.map +1 -1
  142. package/bundles/material-slider-testing.umd.js +11 -0
  143. package/bundles/material-slider-testing.umd.js.map +1 -1
  144. package/bundles/material-slider-testing.umd.min.js +2 -2
  145. package/bundles/material-slider-testing.umd.min.js.map +1 -1
  146. package/bundles/material-snack-bar-testing.umd.min.js +1 -1
  147. package/bundles/material-snack-bar-testing.umd.min.js.map +1 -1
  148. package/bundles/material-snack-bar.umd.js +47 -39
  149. package/bundles/material-snack-bar.umd.js.map +1 -1
  150. package/bundles/material-snack-bar.umd.min.js +2 -2
  151. package/bundles/material-snack-bar.umd.min.js.map +1 -1
  152. package/bundles/material-sort-testing.umd.js +10 -10
  153. package/bundles/material-sort-testing.umd.js.map +1 -1
  154. package/bundles/material-sort-testing.umd.min.js +3 -3
  155. package/bundles/material-sort-testing.umd.min.js.map +1 -1
  156. package/bundles/material-sort.umd.js +25 -12
  157. package/bundles/material-sort.umd.js.map +1 -1
  158. package/bundles/material-sort.umd.min.js +5 -5
  159. package/bundles/material-sort.umd.min.js.map +1 -1
  160. package/bundles/material-table-testing.umd.min.js +1 -1
  161. package/bundles/material-table-testing.umd.min.js.map +1 -1
  162. package/bundles/material-table.umd.min.js +2 -2
  163. package/bundles/material-table.umd.min.js.map +1 -1
  164. package/bundles/material-tabs-testing.umd.min.js +1 -1
  165. package/bundles/material-tabs-testing.umd.min.js.map +1 -1
  166. package/bundles/material-tabs.umd.js +23 -4
  167. package/bundles/material-tabs.umd.js.map +1 -1
  168. package/bundles/material-tabs.umd.min.js +5 -12
  169. package/bundles/material-tabs.umd.min.js.map +1 -1
  170. package/bundles/material-toolbar-testing.umd.js +330 -0
  171. package/bundles/material-toolbar-testing.umd.js.map +1 -0
  172. package/bundles/material-toolbar-testing.umd.min.js +44 -0
  173. package/bundles/material-toolbar-testing.umd.min.js.map +1 -0
  174. package/bundles/material-tooltip-testing.umd.min.js +1 -1
  175. package/bundles/material-tooltip-testing.umd.min.js.map +1 -1
  176. package/bundles/material-tooltip.umd.js +14 -1
  177. package/bundles/material-tooltip.umd.js.map +1 -1
  178. package/bundles/material-tooltip.umd.min.js +3 -3
  179. package/bundles/material-tooltip.umd.min.js.map +1 -1
  180. package/bundles/material-tree.umd.js.map +1 -1
  181. package/button/_button-base.scss +1 -1
  182. package/button/_button-theme.scss +8 -8
  183. package/button/index.metadata.json +1 -1
  184. package/button/testing/button-harness.d.ts +2 -0
  185. package/button-toggle/button-toggle.d.ts +10 -3
  186. package/button-toggle/index.metadata.json +1 -1
  187. package/button-toggle/testing/button-toggle-harness.d.ts +2 -0
  188. package/card/testing/card-harness-filters.d.ts +17 -0
  189. package/card/testing/card-harness.d.ts +36 -0
  190. package/card/testing/index.d.ts +8 -0
  191. package/card/testing/package.json +9 -0
  192. package/card/testing/public-api.d.ts +9 -0
  193. package/checkbox/index.metadata.json +1 -1
  194. package/checkbox/testing/checkbox-harness.d.ts +2 -0
  195. package/chips/chip.d.ts +19 -1
  196. package/chips/index.metadata.json +1 -1
  197. package/core/focus-indicators/_focus-indicators.scss +6 -6
  198. package/core/index.metadata.json +1 -1
  199. package/core/option/optgroup.d.ts +7 -0
  200. package/core/ripple/ripple-ref.d.ts +21 -2
  201. package/core/ripple/ripple-renderer.d.ts +1 -19
  202. package/core/ripple/ripple.d.ts +2 -2
  203. package/core/style/_list-common.scss +1 -1
  204. package/datepicker/date-range-input-parts.d.ts +2 -4
  205. package/datepicker/date-range-input.d.ts +4 -4
  206. package/datepicker/date-range-picker.d.ts +10 -3
  207. package/datepicker/datepicker.d.ts +2 -3
  208. package/datepicker/index.metadata.json +1 -1
  209. package/datepicker/public-api.d.ts +1 -1
  210. package/dialog/dialog-container.d.ts +9 -2
  211. package/dialog/dialog-content-directives.d.ts +1 -0
  212. package/dialog/dialog-ref.d.ts +7 -0
  213. package/dialog/index.metadata.json +1 -1
  214. package/esm2015/autocomplete/autocomplete-module.js +18 -22
  215. package/esm2015/autocomplete/autocomplete-origin.js +16 -20
  216. package/esm2015/autocomplete/autocomplete-trigger.js +519 -521
  217. package/esm2015/autocomplete/autocomplete.js +126 -130
  218. package/esm2015/autocomplete/testing/autocomplete-harness.js +99 -97
  219. package/esm2015/badge/badge-module.js +13 -17
  220. package/esm2015/badge/badge.js +184 -188
  221. package/esm2015/badge/testing/badge-harness.js +74 -78
  222. package/esm2015/bottom-sheet/bottom-sheet-container.js +161 -165
  223. package/esm2015/bottom-sheet/bottom-sheet-module.js +15 -19
  224. package/esm2015/bottom-sheet/bottom-sheet.js +124 -128
  225. package/esm2015/bottom-sheet/testing/bottom-sheet-harness.js +29 -33
  226. package/esm2015/button/button-module.js +20 -24
  227. package/esm2015/button/button.js +111 -114
  228. package/esm2015/button/testing/button-harness.js +60 -58
  229. package/esm2015/button-toggle/button-toggle-module.js +10 -14
  230. package/esm2015/button-toggle/button-toggle.js +368 -368
  231. package/esm2015/button-toggle/testing/button-toggle-group-harness.js +42 -46
  232. package/esm2015/button-toggle/testing/button-toggle-harness.js +113 -111
  233. package/esm2015/card/card-module.js +30 -34
  234. package/esm2015/card/card.js +147 -203
  235. package/esm2015/card/testing/card-harness-filters.js +8 -0
  236. package/esm2015/card/testing/card-harness.js +52 -0
  237. package/esm2015/card/testing/index.js +9 -0
  238. package/esm2015/card/testing/public-api.js +10 -0
  239. package/esm2015/card/testing/testing.externs.js +0 -0
  240. package/esm2015/checkbox/checkbox-module.js +21 -29
  241. package/esm2015/checkbox/checkbox-required-validator.js +9 -13
  242. package/esm2015/checkbox/checkbox.js +315 -319
  243. package/esm2015/checkbox/testing/checkbox-harness.js +150 -148
  244. package/esm2015/chips/chip-input.js +119 -123
  245. package/esm2015/chips/chip-list.js +572 -576
  246. package/esm2015/chips/chip.js +333 -328
  247. package/esm2015/chips/chips-module.js +16 -20
  248. package/esm2015/core/animation/animation.js +12 -20
  249. package/esm2015/core/common-behaviors/common-module.js +91 -95
  250. package/esm2015/core/datetime/index.js +19 -27
  251. package/esm2015/core/datetime/native-date-adapter.js +202 -206
  252. package/esm2015/core/error/error-options.js +16 -24
  253. package/esm2015/core/line/line.js +18 -26
  254. package/esm2015/core/option/index.js +10 -14
  255. package/esm2015/core/option/optgroup.js +36 -33
  256. package/esm2015/core/option/option.js +181 -185
  257. package/esm2015/core/ripple/index.js +10 -14
  258. package/esm2015/core/ripple/ripple-ref.js +1 -1
  259. package/esm2015/core/ripple/ripple-renderer.js +1 -1
  260. package/esm2015/core/ripple/ripple.js +102 -106
  261. package/esm2015/core/selection/index.js +9 -13
  262. package/esm2015/core/selection/pseudo-checkbox/pseudo-checkbox.js +32 -36
  263. package/esm2015/core/testing/optgroup-harness.js +39 -43
  264. package/esm2015/core/testing/option-harness.js +51 -55
  265. package/esm2015/core/version.js +1 -1
  266. package/esm2015/datepicker/calendar-body.js +214 -218
  267. package/esm2015/datepicker/calendar.js +295 -303
  268. package/esm2015/datepicker/date-range-input-parts.js +214 -229
  269. package/esm2015/datepicker/date-range-input.js +244 -242
  270. package/esm2015/datepicker/date-range-picker.js +19 -23
  271. package/esm2015/datepicker/date-range-selection-strategy.js +31 -35
  272. package/esm2015/datepicker/date-selection-model.js +110 -122
  273. package/esm2015/datepicker/datepicker-base.js +418 -426
  274. package/esm2015/datepicker/datepicker-input-base.js +227 -224
  275. package/esm2015/datepicker/datepicker-input.js +111 -115
  276. package/esm2015/datepicker/datepicker-intl.js +37 -41
  277. package/esm2015/datepicker/datepicker-module.js +62 -66
  278. package/esm2015/datepicker/datepicker-toggle.js +81 -89
  279. package/esm2015/datepicker/datepicker.js +13 -17
  280. package/esm2015/datepicker/month-view.js +283 -287
  281. package/esm2015/datepicker/multi-year-view.js +198 -202
  282. package/esm2015/datepicker/public-api.js +2 -2
  283. package/esm2015/datepicker/year-view.js +220 -224
  284. package/esm2015/dialog/dialog-container.js +175 -164
  285. package/esm2015/dialog/dialog-content-directives.js +105 -114
  286. package/esm2015/dialog/dialog-module.js +32 -36
  287. package/esm2015/dialog/dialog-ref.js +17 -3
  288. package/esm2015/dialog/dialog.js +236 -240
  289. package/esm2015/dialog/testing/dialog-harness.js +58 -62
  290. package/esm2015/divider/divider-module.js +10 -14
  291. package/esm2015/divider/divider.js +33 -37
  292. package/esm2015/divider/testing/divider-harness.js +16 -20
  293. package/esm2015/expansion/accordion.js +73 -77
  294. package/esm2015/expansion/expansion-module.js +26 -30
  295. package/esm2015/expansion/expansion-panel-content.js +13 -17
  296. package/esm2015/expansion/expansion-panel-header.js +168 -180
  297. package/esm2015/expansion/expansion-panel.js +144 -152
  298. package/esm2015/expansion/testing/accordion-harness.js +24 -28
  299. package/esm2015/expansion/testing/expansion-harness.js +136 -134
  300. package/esm2015/form-field/error.js +26 -23
  301. package/esm2015/form-field/form-field-control.js +6 -10
  302. package/esm2015/form-field/form-field-module.js +31 -35
  303. package/esm2015/form-field/form-field.js +407 -409
  304. package/esm2015/form-field/hint.js +35 -29
  305. package/esm2015/form-field/label.js +8 -12
  306. package/esm2015/form-field/placeholder.js +8 -12
  307. package/esm2015/form-field/prefix.js +16 -13
  308. package/esm2015/form-field/suffix.js +16 -13
  309. package/esm2015/form-field/testing/form-field-harness.js +220 -206
  310. package/esm2015/grid-list/grid-list-module.js +26 -30
  311. package/esm2015/grid-list/grid-list.js +108 -112
  312. package/esm2015/grid-list/grid-tile.js +91 -111
  313. package/esm2015/grid-list/testing/grid-list-harness.js +62 -66
  314. package/esm2015/grid-list/testing/grid-tile-harness.js +69 -73
  315. package/esm2015/grid-list/tile-styler.js +1 -1
  316. package/esm2015/icon/icon-module.js +10 -14
  317. package/esm2015/icon/icon-registry.js +406 -410
  318. package/esm2015/icon/icon.js +228 -232
  319. package/esm2015/icon/testing/fake-icon-registry.js +66 -74
  320. package/esm2015/input/autosize.js +30 -34
  321. package/esm2015/input/input-module.js +21 -25
  322. package/esm2015/input/input.js +305 -284
  323. package/esm2015/input/testing/input-harness.js +129 -123
  324. package/esm2015/list/list-module.js +32 -36
  325. package/esm2015/list/list.js +165 -189
  326. package/esm2015/list/selection-list.js +503 -511
  327. package/esm2015/list/testing/action-list-harness.js +55 -57
  328. package/esm2015/list/testing/list-harness.js +31 -39
  329. package/esm2015/list/testing/list-item-harness-base.js +13 -17
  330. package/esm2015/list/testing/nav-list-harness.js +62 -64
  331. package/esm2015/list/testing/selection-list-harness.js +136 -138
  332. package/esm2015/menu/menu-content.js +74 -71
  333. package/esm2015/menu/menu-item.js +119 -123
  334. package/esm2015/menu/menu-module.js +29 -37
  335. package/esm2015/menu/menu-panel.js +1 -1
  336. package/esm2015/menu/menu-trigger.js +402 -405
  337. package/esm2015/menu/menu.js +329 -339
  338. package/esm2015/menu/testing/menu-harness.js +193 -189
  339. package/esm2015/paginator/paginator-intl.js +36 -40
  340. package/esm2015/paginator/paginator-module.js +16 -20
  341. package/esm2015/paginator/paginator.js +205 -209
  342. package/esm2015/paginator/testing/paginator-harness.js +91 -95
  343. package/esm2015/progress-bar/progress-bar-module.js +10 -14
  344. package/esm2015/progress-bar/progress-bar.js +114 -118
  345. package/esm2015/progress-bar/testing/progress-bar-harness.js +27 -31
  346. package/esm2015/progress-spinner/progress-spinner-module.js +17 -21
  347. package/esm2015/progress-spinner/progress-spinner.js +181 -189
  348. package/esm2015/progress-spinner/testing/progress-spinner-harness.js +28 -32
  349. package/esm2015/radio/radio-module.js +10 -14
  350. package/esm2015/radio/radio.js +437 -444
  351. package/esm2015/radio/testing/radio-harness.js +241 -243
  352. package/esm2015/select/select-module.js +23 -27
  353. package/esm2015/select/select.js +917 -918
  354. package/esm2015/select/testing/select-harness.js +138 -136
  355. package/esm2015/sidenav/drawer.js +632 -620
  356. package/esm2015/sidenav/sidenav-module.js +31 -35
  357. package/esm2015/sidenav/sidenav.js +104 -116
  358. package/esm2015/sidenav/testing/drawer-harness.js +40 -44
  359. package/esm2015/sidenav/testing/sidenav-harness.js +20 -24
  360. package/esm2015/slide-toggle/slide-toggle-module.js +27 -35
  361. package/esm2015/slide-toggle/slide-toggle-required-validator.js +9 -13
  362. package/esm2015/slide-toggle/slide-toggle.js +184 -188
  363. package/esm2015/slide-toggle/testing/slide-toggle-harness.js +123 -121
  364. package/esm2015/slider/slider-module.js +10 -14
  365. package/esm2015/slider/slider.js +640 -644
  366. package/esm2015/slider/testing/slider-harness.js +129 -127
  367. package/esm2015/snack-bar/simple-snack-bar.js +32 -36
  368. package/esm2015/snack-bar/snack-bar-container.js +144 -148
  369. package/esm2015/snack-bar/snack-bar-module.js +17 -21
  370. package/esm2015/snack-bar/snack-bar-ref.js +1 -1
  371. package/esm2015/snack-bar/snack-bar.js +208 -205
  372. package/esm2015/snack-bar/testing/snack-bar-harness.js +112 -116
  373. package/esm2015/sort/sort-header-intl.js +21 -21
  374. package/esm2015/sort/sort-header.js +200 -194
  375. package/esm2015/sort/sort-module.js +11 -15
  376. package/esm2015/sort/sort.js +92 -96
  377. package/esm2015/sort/testing/sort-harness.js +28 -32
  378. package/esm2015/sort/testing/sort-header-harness.js +66 -67
  379. package/esm2015/stepper/step-header.js +78 -82
  380. package/esm2015/stepper/step-label.js +8 -12
  381. package/esm2015/stepper/stepper-button.js +23 -31
  382. package/esm2015/stepper/stepper-icon.js +16 -20
  383. package/esm2015/stepper/stepper-intl.js +15 -19
  384. package/esm2015/stepper/stepper-module.js +40 -44
  385. package/esm2015/stepper/stepper.js +139 -155
  386. package/esm2015/table/cell.js +94 -122
  387. package/esm2015/table/row.js +90 -118
  388. package/esm2015/table/table-module.js +13 -17
  389. package/esm2015/table/table.js +26 -30
  390. package/esm2015/table/testing/cell-harness.js +56 -68
  391. package/esm2015/table/testing/row-harness.js +90 -102
  392. package/esm2015/table/testing/table-harness.js +65 -69
  393. package/esm2015/table/text-column.js +17 -21
  394. package/esm2015/tabs/index.js +4 -2
  395. package/esm2015/tabs/ink-bar.js +55 -59
  396. package/esm2015/tabs/paginated-tab-header.js +415 -419
  397. package/esm2015/tabs/tab-body.js +179 -191
  398. package/esm2015/tabs/tab-content.js +21 -16
  399. package/esm2015/tabs/tab-group.js +263 -271
  400. package/esm2015/tabs/tab-header.js +69 -77
  401. package/esm2015/tabs/tab-label-wrapper.js +29 -33
  402. package/esm2015/tabs/tab-label.js +16 -13
  403. package/esm2015/tabs/tab-nav-bar/tab-nav-bar.js +199 -215
  404. package/esm2015/tabs/tab.js +80 -83
  405. package/esm2015/tabs/tabs-module.js +38 -42
  406. package/esm2015/tabs/testing/tab-group-harness.js +52 -56
  407. package/esm2015/tabs/testing/tab-harness.js +78 -82
  408. package/esm2015/toolbar/testing/index.js +9 -0
  409. package/esm2015/toolbar/testing/public-api.js +10 -0
  410. package/esm2015/toolbar/testing/testing.externs.js +0 -0
  411. package/esm2015/toolbar/testing/toolbar-harness-filters.js +8 -0
  412. package/esm2015/toolbar/testing/toolbar-harness.js +47 -0
  413. package/esm2015/toolbar/toolbar-module.js +10 -14
  414. package/esm2015/toolbar/toolbar.js +61 -69
  415. package/esm2015/tooltip/testing/tooltip-harness.js +43 -47
  416. package/esm2015/tooltip/tooltip-module.js +17 -21
  417. package/esm2015/tooltip/tooltip.js +502 -497
  418. package/esm2015/tree/data-source/flat-data-source.js +1 -1
  419. package/esm2015/tree/node.js +99 -111
  420. package/esm2015/tree/outlet.js +19 -23
  421. package/esm2015/tree/padding.js +13 -17
  422. package/esm2015/tree/toggle.js +15 -19
  423. package/esm2015/tree/tree-module.js +10 -14
  424. package/esm2015/tree/tree.js +23 -27
  425. package/expansion/testing/expansion-harness.d.ts +2 -0
  426. package/fesm2015/autocomplete/testing.js +98 -95
  427. package/fesm2015/autocomplete/testing.js.map +1 -1
  428. package/fesm2015/autocomplete.js +677 -687
  429. package/fesm2015/autocomplete.js.map +1 -1
  430. package/fesm2015/badge/testing.js +73 -76
  431. package/fesm2015/badge/testing.js.map +1 -1
  432. package/fesm2015/badge.js +195 -201
  433. package/fesm2015/badge.js.map +1 -1
  434. package/fesm2015/bottom-sheet/testing.js +28 -31
  435. package/fesm2015/bottom-sheet/testing.js.map +1 -1
  436. package/fesm2015/bottom-sheet.js +297 -306
  437. package/fesm2015/bottom-sheet.js.map +1 -1
  438. package/fesm2015/button/testing.js +59 -56
  439. package/fesm2015/button/testing.js.map +1 -1
  440. package/fesm2015/button-toggle/testing.js +155 -155
  441. package/fesm2015/button-toggle/testing.js.map +1 -1
  442. package/fesm2015/button-toggle.js +377 -378
  443. package/fesm2015/button-toggle.js.map +1 -1
  444. package/fesm2015/button.js +129 -133
  445. package/fesm2015/button.js.map +1 -1
  446. package/fesm2015/card/testing.js +79 -0
  447. package/fesm2015/card/testing.js.map +1 -0
  448. package/fesm2015/card.js +175 -220
  449. package/fesm2015/card.js.map +1 -1
  450. package/fesm2015/checkbox/testing.js +149 -146
  451. package/fesm2015/checkbox/testing.js.map +1 -1
  452. package/fesm2015/checkbox.js +342 -354
  453. package/fesm2015/checkbox.js.map +1 -1
  454. package/fesm2015/chips.js +1039 -1039
  455. package/fesm2015/chips.js.map +1 -1
  456. package/fesm2015/core/testing.js +88 -94
  457. package/fesm2015/core/testing.js.map +1 -1
  458. package/fesm2015/core.js +729 -773
  459. package/fesm2015/core.js.map +1 -1
  460. package/fesm2015/datepicker.js +2821 -2884
  461. package/fesm2015/datepicker.js.map +1 -1
  462. package/fesm2015/dialog/testing.js +57 -60
  463. package/fesm2015/dialog/testing.js.map +1 -1
  464. package/fesm2015/dialog.js +564 -549
  465. package/fesm2015/dialog.js.map +1 -1
  466. package/fesm2015/divider/testing.js +15 -18
  467. package/fesm2015/divider/testing.js.map +1 -1
  468. package/fesm2015/divider.js +41 -47
  469. package/fesm2015/divider.js.map +1 -1
  470. package/fesm2015/expansion/testing.js +159 -159
  471. package/fesm2015/expansion/testing.js.map +1 -1
  472. package/fesm2015/expansion.js +422 -446
  473. package/fesm2015/expansion.js.map +1 -1
  474. package/fesm2015/form-field/testing.js +219 -204
  475. package/fesm2015/form-field/testing.js.map +1 -1
  476. package/fesm2015/form-field.js +538 -532
  477. package/fesm2015/form-field.js.map +1 -1
  478. package/fesm2015/grid-list/testing.js +129 -135
  479. package/fesm2015/grid-list/testing.js.map +1 -1
  480. package/fesm2015/grid-list.js +221 -242
  481. package/fesm2015/grid-list.js.map +1 -1
  482. package/fesm2015/icon/testing.js +65 -71
  483. package/fesm2015/icon/testing.js.map +1 -1
  484. package/fesm2015/icon.js +660 -669
  485. package/fesm2015/icon.js.map +1 -1
  486. package/fesm2015/input/testing.js +128 -121
  487. package/fesm2015/input/testing.js.map +1 -1
  488. package/fesm2015/input.js +353 -337
  489. package/fesm2015/input.js.map +1 -1
  490. package/fesm2015/list/testing.js +298 -307
  491. package/fesm2015/list/testing.js.map +1 -1
  492. package/fesm2015/list.js +698 -725
  493. package/fesm2015/list.js.map +1 -1
  494. package/fesm2015/menu/testing.js +192 -186
  495. package/fesm2015/menu/testing.js.map +1 -1
  496. package/fesm2015/menu.js +948 -962
  497. package/fesm2015/menu.js.map +1 -1
  498. package/fesm2015/paginator/testing.js +90 -93
  499. package/fesm2015/paginator/testing.js.map +1 -1
  500. package/fesm2015/paginator.js +247 -256
  501. package/fesm2015/paginator.js.map +1 -1
  502. package/fesm2015/progress-bar/testing.js +26 -29
  503. package/fesm2015/progress-bar/testing.js.map +1 -1
  504. package/fesm2015/progress-bar.js +122 -128
  505. package/fesm2015/progress-bar.js.map +1 -1
  506. package/fesm2015/progress-spinner/testing.js +27 -30
  507. package/fesm2015/progress-spinner/testing.js.map +1 -1
  508. package/fesm2015/progress-spinner.js +196 -205
  509. package/fesm2015/progress-spinner.js.map +1 -1
  510. package/fesm2015/radio/testing.js +240 -240
  511. package/fesm2015/radio/testing.js.map +1 -1
  512. package/fesm2015/radio.js +447 -453
  513. package/fesm2015/radio.js.map +1 -1
  514. package/fesm2015/select/testing.js +137 -134
  515. package/fesm2015/select/testing.js.map +1 -1
  516. package/fesm2015/select.js +939 -941
  517. package/fesm2015/select.js.map +1 -1
  518. package/fesm2015/sidenav/testing.js +58 -64
  519. package/fesm2015/sidenav/testing.js.map +1 -1
  520. package/fesm2015/sidenav.js +765 -762
  521. package/fesm2015/sidenav.js.map +1 -1
  522. package/fesm2015/slide-toggle/testing.js +122 -119
  523. package/fesm2015/slide-toggle/testing.js.map +1 -1
  524. package/fesm2015/slide-toggle.js +217 -229
  525. package/fesm2015/slide-toggle.js.map +1 -1
  526. package/fesm2015/slider/testing.js +128 -125
  527. package/fesm2015/slider/testing.js.map +1 -1
  528. package/fesm2015/slider.js +648 -654
  529. package/fesm2015/slider.js.map +1 -1
  530. package/fesm2015/snack-bar/testing.js +111 -114
  531. package/fesm2015/snack-bar/testing.js.map +1 -1
  532. package/fesm2015/snack-bar.js +426 -431
  533. package/fesm2015/snack-bar.js.map +1 -1
  534. package/fesm2015/sort/testing.js +92 -95
  535. package/fesm2015/sort/testing.js.map +1 -1
  536. package/fesm2015/sort.js +320 -318
  537. package/fesm2015/sort.js.map +1 -1
  538. package/fesm2015/stepper.js +312 -345
  539. package/fesm2015/stepper.js.map +1 -1
  540. package/fesm2015/table/testing.js +208 -229
  541. package/fesm2015/table/testing.js.map +1 -1
  542. package/fesm2015/table.js +235 -286
  543. package/fesm2015/table.js.map +1 -1
  544. package/fesm2015/tabs/testing.js +128 -134
  545. package/fesm2015/tabs/testing.js.map +1 -1
  546. package/fesm2015/tabs.js +1362 -1399
  547. package/fesm2015/tabs.js.map +1 -1
  548. package/fesm2015/toolbar/testing.js +74 -0
  549. package/fesm2015/toolbar/testing.js.map +1 -0
  550. package/fesm2015/toolbar.js +69 -78
  551. package/fesm2015/toolbar.js.map +1 -1
  552. package/fesm2015/tooltip/testing.js +42 -45
  553. package/fesm2015/tooltip/testing.js.map +1 -1
  554. package/fesm2015/tooltip.js +517 -513
  555. package/fesm2015/tooltip.js.map +1 -1
  556. package/fesm2015/tree.js +173 -197
  557. package/fesm2015/tree.js.map +1 -1
  558. package/form-field/error.d.ts +7 -0
  559. package/form-field/hint.d.ts +10 -0
  560. package/form-field/index.metadata.json +1 -1
  561. package/form-field/prefix.d.ts +7 -0
  562. package/form-field/suffix.d.ts +7 -0
  563. package/form-field/testing/form-field-harness.d.ts +8 -0
  564. package/grid-list/grid-list.d.ts +2 -1
  565. package/grid-list/index.metadata.json +1 -1
  566. package/grid-list/tile-styler.d.ts +10 -5
  567. package/input/_input-theme.scss +2 -2
  568. package/input/index.metadata.json +1 -1
  569. package/input/input.d.ts +6 -2
  570. package/input/testing/input-harness.d.ts +2 -0
  571. package/list/index.metadata.json +1 -1
  572. package/list/testing/action-list-harness.d.ts +2 -0
  573. package/list/testing/nav-list-harness.d.ts +2 -0
  574. package/list/testing/selection-list-harness.d.ts +2 -0
  575. package/menu/index.metadata.json +1 -1
  576. package/menu/menu-content.d.ts +7 -1
  577. package/menu/menu-panel.d.ts +1 -0
  578. package/menu/menu.d.ts +4 -0
  579. package/menu/testing/menu-harness.d.ts +4 -0
  580. package/package.json +6 -6
  581. package/prebuilt-themes/deeppurple-amber.css +1 -1
  582. package/prebuilt-themes/indigo-pink.css +1 -1
  583. package/prebuilt-themes/pink-bluegrey.css +1 -1
  584. package/prebuilt-themes/purple-green.css +1 -1
  585. package/progress-spinner/index.metadata.json +1 -1
  586. package/radio/index.metadata.json +1 -1
  587. package/radio/radio.d.ts +6 -0
  588. package/radio/testing/radio-harness.d.ts +2 -0
  589. package/schematics/migration.json +5 -0
  590. package/schematics/ng-add/index.js +2 -2
  591. package/schematics/ng-generate/navigation/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.html.template +3 -3
  592. package/schematics/ng-generate/navigation/schema.json +5 -0
  593. package/schematics/ng-update/data/index.js +1 -1
  594. package/schematics/ng-update/index.d.ts +2 -0
  595. package/schematics/ng-update/index.js +7 -2
  596. package/schematics/ng-update/migrations/hammer-gestures-v9/hammer-gestures-migration.js +639 -639
  597. package/schematics/ng-update/migrations/misc-ripples-v7/ripple-speed-factor-migration.js +1 -1
  598. package/select/index.metadata.json +1 -1
  599. package/select/select.d.ts +6 -0
  600. package/select/testing/select-harness.d.ts +2 -0
  601. package/sidenav/drawer.d.ts +15 -3
  602. package/sidenav/index.metadata.json +1 -1
  603. package/slide-toggle/index.metadata.json +1 -1
  604. package/slide-toggle/testing/slide-toggle-harness.d.ts +2 -0
  605. package/slider/testing/slider-harness.d.ts +2 -0
  606. package/snack-bar/index.metadata.json +1 -1
  607. package/snack-bar/simple-snack-bar.d.ts +13 -1
  608. package/snack-bar/snack-bar-container.d.ts +16 -3
  609. package/snack-bar/snack-bar-ref.d.ts +3 -3
  610. package/snack-bar/snack-bar.d.ts +10 -3
  611. package/sort/index.metadata.json +1 -1
  612. package/sort/sort-header-intl.d.ts +5 -1
  613. package/sort/sort-header.d.ts +3 -1
  614. package/sort/testing/sort-header-harness.d.ts +6 -2
  615. package/tabs/index.d.ts +3 -1
  616. package/tabs/index.metadata.json +1 -1
  617. package/tabs/tab-content.d.ts +7 -1
  618. package/tabs/tab-label.d.ts +7 -0
  619. package/toolbar/testing/index.d.ts +8 -0
  620. package/toolbar/testing/package.json +9 -0
  621. package/toolbar/testing/public-api.d.ts +9 -0
  622. package/toolbar/testing/toolbar-harness-filters.d.ts +13 -0
  623. package/toolbar/testing/toolbar-harness.d.ts +31 -0
  624. package/tooltip/index.metadata.json +1 -1
  625. package/tooltip/tooltip.d.ts +1 -0
  626. package/tree/data-source/flat-data-source.d.ts +4 -4
  627. package/tree/index.metadata.json +1 -1
@@ -65,672 +65,687 @@ const MAT_DRAWER_CONTAINER = new InjectionToken('MAT_DRAWER_CONTAINER');
65
65
  function MAT_DRAWER_DEFAULT_AUTOSIZE_FACTORY() {
66
66
  return false;
67
67
  }
68
- let MatDrawerContent = /** @class */ (() => {
69
- class MatDrawerContent extends CdkScrollable {
70
- constructor(_changeDetectorRef, _container, elementRef, scrollDispatcher, ngZone) {
71
- super(elementRef, scrollDispatcher, ngZone);
72
- this._changeDetectorRef = _changeDetectorRef;
73
- this._container = _container;
74
- }
75
- ngAfterContentInit() {
76
- this._container._contentMarginChanges.subscribe(() => {
77
- this._changeDetectorRef.markForCheck();
78
- });
79
- }
68
+ class MatDrawerContent extends CdkScrollable {
69
+ constructor(_changeDetectorRef, _container, elementRef, scrollDispatcher, ngZone) {
70
+ super(elementRef, scrollDispatcher, ngZone);
71
+ this._changeDetectorRef = _changeDetectorRef;
72
+ this._container = _container;
73
+ }
74
+ ngAfterContentInit() {
75
+ this._container._contentMarginChanges.subscribe(() => {
76
+ this._changeDetectorRef.markForCheck();
77
+ });
80
78
  }
81
- MatDrawerContent.decorators = [
82
- { type: Component, args: [{
83
- selector: 'mat-drawer-content',
84
- template: '<ng-content></ng-content>',
85
- host: {
86
- 'class': 'mat-drawer-content',
87
- '[style.margin-left.px]': '_container._contentMargins.left',
88
- '[style.margin-right.px]': '_container._contentMargins.right',
89
- },
90
- changeDetection: ChangeDetectionStrategy.OnPush,
91
- encapsulation: ViewEncapsulation.None
92
- },] }
93
- ];
94
- MatDrawerContent.ctorParameters = () => [
95
- { type: ChangeDetectorRef },
96
- { type: MatDrawerContainer, decorators: [{ type: Inject, args: [forwardRef(() => MatDrawerContainer),] }] },
97
- { type: ElementRef },
98
- { type: ScrollDispatcher },
99
- { type: NgZone }
100
- ];
101
- return MatDrawerContent;
102
- })();
79
+ }
80
+ MatDrawerContent.decorators = [
81
+ { type: Component, args: [{
82
+ selector: 'mat-drawer-content',
83
+ template: '<ng-content></ng-content>',
84
+ host: {
85
+ 'class': 'mat-drawer-content',
86
+ '[style.margin-left.px]': '_container._contentMargins.left',
87
+ '[style.margin-right.px]': '_container._contentMargins.right',
88
+ },
89
+ changeDetection: ChangeDetectionStrategy.OnPush,
90
+ encapsulation: ViewEncapsulation.None
91
+ },] }
92
+ ];
93
+ MatDrawerContent.ctorParameters = () => [
94
+ { type: ChangeDetectorRef },
95
+ { type: MatDrawerContainer, decorators: [{ type: Inject, args: [forwardRef(() => MatDrawerContainer),] }] },
96
+ { type: ElementRef },
97
+ { type: ScrollDispatcher },
98
+ { type: NgZone }
99
+ ];
103
100
  /**
104
101
  * This component corresponds to a drawer that can be opened on the drawer container.
105
102
  */
106
- let MatDrawer = /** @class */ (() => {
107
- class MatDrawer {
108
- constructor(_elementRef, _focusTrapFactory, _focusMonitor, _platform, _ngZone, _doc,
103
+ class MatDrawer {
104
+ constructor(_elementRef, _focusTrapFactory, _focusMonitor, _platform, _ngZone, _doc,
105
+ /**
106
+ * @deprecated `_container` parameter to be made required.
107
+ * @breaking-change 10.0.0
108
+ */
109
+ _container) {
110
+ this._elementRef = _elementRef;
111
+ this._focusTrapFactory = _focusTrapFactory;
112
+ this._focusMonitor = _focusMonitor;
113
+ this._platform = _platform;
114
+ this._ngZone = _ngZone;
115
+ this._doc = _doc;
116
+ this._container = _container;
117
+ this._elementFocusedBeforeDrawerWasOpened = null;
118
+ /** Whether the drawer is initialized. Used for disabling the initial animation. */
119
+ this._enableAnimations = false;
120
+ this._position = 'start';
121
+ this._mode = 'over';
122
+ this._disableClose = false;
123
+ this._opened = false;
124
+ /** Emits whenever the drawer has started animating. */
125
+ this._animationStarted = new Subject();
126
+ /** Emits whenever the drawer is done animating. */
127
+ this._animationEnd = new Subject();
128
+ /** Current state of the sidenav animation. */
129
+ // @HostBinding is used in the class as it is expected to be extended. Since @Component decorator
130
+ // metadata is not inherited by child classes, instead the host binding data is defined in a way
131
+ // that can be inherited.
132
+ // tslint:disable:no-host-decorator-in-concrete
133
+ this._animationState = 'void';
134
+ /** Event emitted when the drawer open state is changed. */
135
+ this.openedChange =
136
+ // Note this has to be async in order to avoid some issues with two-bindings (see #8872).
137
+ new EventEmitter(/* isAsync */ true);
138
+ /** Emits when the component is destroyed. */
139
+ this._destroyed = new Subject();
140
+ /** Event emitted when the drawer's position changes. */
141
+ // tslint:disable-next-line:no-output-on-prefix
142
+ this.onPositionChanged = new EventEmitter();
109
143
  /**
110
- * @deprecated `_container` parameter to be made required.
111
- * @breaking-change 10.0.0
144
+ * An observable that emits when the drawer mode changes. This is used by the drawer container to
145
+ * to know when to when the mode changes so it can adapt the margins on the content.
112
146
  */
113
- _container) {
114
- this._elementRef = _elementRef;
115
- this._focusTrapFactory = _focusTrapFactory;
116
- this._focusMonitor = _focusMonitor;
117
- this._platform = _platform;
118
- this._ngZone = _ngZone;
119
- this._doc = _doc;
120
- this._container = _container;
121
- this._elementFocusedBeforeDrawerWasOpened = null;
122
- /** Whether the drawer is initialized. Used for disabling the initial animation. */
123
- this._enableAnimations = false;
124
- this._position = 'start';
125
- this._mode = 'over';
126
- this._disableClose = false;
127
- this._opened = false;
128
- /** Emits whenever the drawer has started animating. */
129
- this._animationStarted = new Subject();
130
- /** Emits whenever the drawer is done animating. */
131
- this._animationEnd = new Subject();
132
- /** Current state of the sidenav animation. */
133
- // @HostBinding is used in the class as it is expected to be extended. Since @Component decorator
134
- // metadata is not inherited by child classes, instead the host binding data is defined in a way
135
- // that can be inherited.
136
- // tslint:disable:no-host-decorator-in-concrete
137
- this._animationState = 'void';
138
- /** Event emitted when the drawer open state is changed. */
139
- this.openedChange =
140
- // Note this has to be async in order to avoid some issues with two-bindings (see #8872).
141
- new EventEmitter(/* isAsync */ true);
142
- /** Emits when the component is destroyed. */
143
- this._destroyed = new Subject();
144
- /** Event emitted when the drawer's position changes. */
145
- // tslint:disable-next-line:no-output-on-prefix
146
- this.onPositionChanged = new EventEmitter();
147
- /**
148
- * An observable that emits when the drawer mode changes. This is used by the drawer container to
149
- * to know when to when the mode changes so it can adapt the margins on the content.
150
- */
151
- this._modeChanged = new Subject();
152
- this.openedChange.subscribe((opened) => {
153
- if (opened) {
154
- if (this._doc) {
155
- this._elementFocusedBeforeDrawerWasOpened = this._doc.activeElement;
156
- }
157
- this._takeFocus();
158
- }
159
- else {
160
- this._restoreFocus();
161
- }
162
- });
163
- /**
164
- * Listen to `keydown` events outside the zone so that change detection is not run every
165
- * time a key is pressed. Instead we re-enter the zone only if the `ESC` key is pressed
166
- * and we don't have close disabled.
167
- */
168
- this._ngZone.runOutsideAngular(() => {
169
- fromEvent(this._elementRef.nativeElement, 'keydown').pipe(filter(event => {
170
- return event.keyCode === ESCAPE && !this.disableClose && !hasModifierKey(event);
171
- }), takeUntil(this._destroyed)).subscribe(event => this._ngZone.run(() => {
172
- this.close();
173
- event.stopPropagation();
174
- event.preventDefault();
175
- }));
176
- });
177
- // We need a Subject with distinctUntilChanged, because the `done` event
178
- // fires twice on some browsers. See https://github.com/angular/angular/issues/24084
179
- this._animationEnd.pipe(distinctUntilChanged((x, y) => {
180
- return x.fromState === y.fromState && x.toState === y.toState;
181
- })).subscribe((event) => {
182
- const { fromState, toState } = event;
183
- if ((toState.indexOf('open') === 0 && fromState === 'void') ||
184
- (toState === 'void' && fromState.indexOf('open') === 0)) {
185
- this.openedChange.emit(this._opened);
147
+ this._modeChanged = new Subject();
148
+ this.openedChange.subscribe((opened) => {
149
+ if (opened) {
150
+ if (this._doc) {
151
+ this._elementFocusedBeforeDrawerWasOpened = this._doc.activeElement;
186
152
  }
187
- });
188
- }
189
- /** The side that the drawer is attached to. */
190
- get position() { return this._position; }
191
- set position(value) {
192
- // Make sure we have a valid value.
193
- value = value === 'end' ? 'end' : 'start';
194
- if (value != this._position) {
195
- this._position = value;
196
- this.onPositionChanged.emit();
153
+ this._takeFocus();
197
154
  }
198
- }
199
- /** Mode of the drawer; one of 'over', 'push' or 'side'. */
200
- get mode() { return this._mode; }
201
- set mode(value) {
202
- this._mode = value;
203
- this._updateFocusTrapState();
204
- this._modeChanged.next();
205
- }
206
- /** Whether the drawer can be closed with the escape key or by clicking on the backdrop. */
207
- get disableClose() { return this._disableClose; }
208
- set disableClose(value) { this._disableClose = coerceBooleanProperty(value); }
209
- /**
210
- * Whether the drawer should focus the first focusable element automatically when opened.
211
- * Defaults to false in when `mode` is set to `side`, otherwise defaults to `true`. If explicitly
212
- * enabled, focus will be moved into the sidenav in `side` mode as well.
213
- */
214
- get autoFocus() {
215
- const value = this._autoFocus;
216
- // Note that usually we disable auto focusing in `side` mode, because we don't know how the
217
- // sidenav is being used, but in some cases it still makes sense to do it. If the consumer
218
- // explicitly enabled `autoFocus`, we take it as them always wanting to enable it.
219
- return value == null ? this.mode !== 'side' : value;
220
- }
221
- set autoFocus(value) { this._autoFocus = coerceBooleanProperty(value); }
222
- /**
223
- * Whether the drawer is opened. We overload this because we trigger an event when it
224
- * starts or end.
225
- */
226
- get opened() { return this._opened; }
227
- set opened(value) { this.toggle(coerceBooleanProperty(value)); }
228
- /** Event emitted when the drawer has been opened. */
229
- get _openedStream() {
230
- return this.openedChange.pipe(filter(o => o), map(() => { }));
231
- }
232
- /** Event emitted when the drawer has started opening. */
233
- get openedStart() {
234
- return this._animationStarted.pipe(filter(e => e.fromState !== e.toState && e.toState.indexOf('open') === 0), map(() => { }));
235
- }
236
- /** Event emitted when the drawer has been closed. */
237
- get _closedStream() {
238
- return this.openedChange.pipe(filter(o => !o), map(() => { }));
239
- }
240
- /** Event emitted when the drawer has started closing. */
241
- get closedStart() {
242
- return this._animationStarted.pipe(filter(e => e.fromState !== e.toState && e.toState === 'void'), map(() => { }));
243
- }
244
- /**
245
- * Moves focus into the drawer. Note that this works even if
246
- * the focus trap is disabled in `side` mode.
247
- */
248
- _takeFocus() {
249
- if (!this.autoFocus || !this._focusTrap) {
250
- return;
155
+ else if (this._isFocusWithinDrawer()) {
156
+ this._restoreFocus();
251
157
  }
252
- this._focusTrap.focusInitialElementWhenReady().then(hasMovedFocus => {
253
- // If there were no focusable elements, focus the sidenav itself so the keyboard navigation
254
- // still works. We need to check that `focus` is a function due to Universal.
255
- if (!hasMovedFocus && typeof this._elementRef.nativeElement.focus === 'function') {
256
- this._elementRef.nativeElement.focus();
257
- }
258
- });
259
- }
158
+ });
260
159
  /**
261
- * If focus is currently inside the drawer, restores it to where it was before the drawer
262
- * opened.
160
+ * Listen to `keydown` events outside the zone so that change detection is not run every
161
+ * time a key is pressed. Instead we re-enter the zone only if the `ESC` key is pressed
162
+ * and we don't have close disabled.
263
163
  */
264
- _restoreFocus() {
265
- if (!this.autoFocus) {
266
- return;
267
- }
268
- const activeEl = this._doc && this._doc.activeElement;
269
- if (activeEl && this._elementRef.nativeElement.contains(activeEl)) {
270
- // Note that we don't check via `instanceof HTMLElement` so that we can cover SVGs as well.
271
- if (this._elementFocusedBeforeDrawerWasOpened) {
272
- this._focusMonitor.focusVia(this._elementFocusedBeforeDrawerWasOpened, this._openedVia);
273
- }
274
- else {
275
- this._elementRef.nativeElement.blur();
276
- }
277
- }
278
- this._elementFocusedBeforeDrawerWasOpened = null;
279
- this._openedVia = null;
280
- }
281
- ngAfterContentInit() {
282
- this._focusTrap = this._focusTrapFactory.create(this._elementRef.nativeElement);
283
- this._updateFocusTrapState();
284
- }
285
- ngAfterContentChecked() {
286
- // Enable the animations after the lifecycle hooks have run, in order to avoid animating
287
- // drawers that are open by default. When we're on the server, we shouldn't enable the
288
- // animations, because we don't want the drawer to animate the first time the user sees
289
- // the page.
290
- if (this._platform.isBrowser) {
291
- this._enableAnimations = true;
164
+ this._ngZone.runOutsideAngular(() => {
165
+ fromEvent(this._elementRef.nativeElement, 'keydown').pipe(filter(event => {
166
+ return event.keyCode === ESCAPE && !this.disableClose && !hasModifierKey(event);
167
+ }), takeUntil(this._destroyed)).subscribe(event => this._ngZone.run(() => {
168
+ this.close();
169
+ event.stopPropagation();
170
+ event.preventDefault();
171
+ }));
172
+ });
173
+ // We need a Subject with distinctUntilChanged, because the `done` event
174
+ // fires twice on some browsers. See https://github.com/angular/angular/issues/24084
175
+ this._animationEnd.pipe(distinctUntilChanged((x, y) => {
176
+ return x.fromState === y.fromState && x.toState === y.toState;
177
+ })).subscribe((event) => {
178
+ const { fromState, toState } = event;
179
+ if ((toState.indexOf('open') === 0 && fromState === 'void') ||
180
+ (toState === 'void' && fromState.indexOf('open') === 0)) {
181
+ this.openedChange.emit(this._opened);
292
182
  }
183
+ });
184
+ }
185
+ /** The side that the drawer is attached to. */
186
+ get position() { return this._position; }
187
+ set position(value) {
188
+ // Make sure we have a valid value.
189
+ value = value === 'end' ? 'end' : 'start';
190
+ if (value != this._position) {
191
+ this._position = value;
192
+ this.onPositionChanged.emit();
293
193
  }
294
- ngOnDestroy() {
295
- if (this._focusTrap) {
296
- this._focusTrap.destroy();
194
+ }
195
+ /** Mode of the drawer; one of 'over', 'push' or 'side'. */
196
+ get mode() { return this._mode; }
197
+ set mode(value) {
198
+ this._mode = value;
199
+ this._updateFocusTrapState();
200
+ this._modeChanged.next();
201
+ }
202
+ /** Whether the drawer can be closed with the escape key or by clicking on the backdrop. */
203
+ get disableClose() { return this._disableClose; }
204
+ set disableClose(value) { this._disableClose = coerceBooleanProperty(value); }
205
+ /**
206
+ * Whether the drawer should focus the first focusable element automatically when opened.
207
+ * Defaults to false in when `mode` is set to `side`, otherwise defaults to `true`. If explicitly
208
+ * enabled, focus will be moved into the sidenav in `side` mode as well.
209
+ */
210
+ get autoFocus() {
211
+ const value = this._autoFocus;
212
+ // Note that usually we disable auto focusing in `side` mode, because we don't know how the
213
+ // sidenav is being used, but in some cases it still makes sense to do it. If the consumer
214
+ // explicitly enabled `autoFocus`, we take it as them always wanting to enable it.
215
+ return value == null ? this.mode !== 'side' : value;
216
+ }
217
+ set autoFocus(value) { this._autoFocus = coerceBooleanProperty(value); }
218
+ /**
219
+ * Whether the drawer is opened. We overload this because we trigger an event when it
220
+ * starts or end.
221
+ */
222
+ get opened() { return this._opened; }
223
+ set opened(value) { this.toggle(coerceBooleanProperty(value)); }
224
+ /** Event emitted when the drawer has been opened. */
225
+ get _openedStream() {
226
+ return this.openedChange.pipe(filter(o => o), map(() => { }));
227
+ }
228
+ /** Event emitted when the drawer has started opening. */
229
+ get openedStart() {
230
+ return this._animationStarted.pipe(filter(e => e.fromState !== e.toState && e.toState.indexOf('open') === 0), map(() => { }));
231
+ }
232
+ /** Event emitted when the drawer has been closed. */
233
+ get _closedStream() {
234
+ return this.openedChange.pipe(filter(o => !o), map(() => { }));
235
+ }
236
+ /** Event emitted when the drawer has started closing. */
237
+ get closedStart() {
238
+ return this._animationStarted.pipe(filter(e => e.fromState !== e.toState && e.toState === 'void'), map(() => { }));
239
+ }
240
+ /**
241
+ * Moves focus into the drawer. Note that this works even if
242
+ * the focus trap is disabled in `side` mode.
243
+ */
244
+ _takeFocus() {
245
+ if (!this.autoFocus || !this._focusTrap) {
246
+ return;
247
+ }
248
+ this._focusTrap.focusInitialElementWhenReady().then(hasMovedFocus => {
249
+ // If there were no focusable elements, focus the sidenav itself so the keyboard navigation
250
+ // still works. We need to check that `focus` is a function due to Universal.
251
+ if (!hasMovedFocus && typeof this._elementRef.nativeElement.focus === 'function') {
252
+ this._elementRef.nativeElement.focus();
297
253
  }
298
- this._animationStarted.complete();
299
- this._animationEnd.complete();
300
- this._modeChanged.complete();
301
- this._destroyed.next();
302
- this._destroyed.complete();
303
- }
304
- /**
305
- * Open the drawer.
306
- * @param openedVia Whether the drawer was opened by a key press, mouse click or programmatically.
307
- * Used for focus management after the sidenav is closed.
308
- */
309
- open(openedVia) {
310
- return this.toggle(true, openedVia);
311
- }
312
- /** Close the drawer. */
313
- close() {
314
- return this.toggle(false);
254
+ });
255
+ }
256
+ /**
257
+ * Restores focus to the element that was originally focused when the drawer opened.
258
+ * If no element was focused at that time, the focus will be restored to the drawer.
259
+ */
260
+ _restoreFocus() {
261
+ if (!this.autoFocus) {
262
+ return;
263
+ }
264
+ // Note that we don't check via `instanceof HTMLElement` so that we can cover SVGs as well.
265
+ if (this._elementFocusedBeforeDrawerWasOpened) {
266
+ this._focusMonitor.focusVia(this._elementFocusedBeforeDrawerWasOpened, this._openedVia);
267
+ }
268
+ else {
269
+ this._elementRef.nativeElement.blur();
270
+ }
271
+ this._elementFocusedBeforeDrawerWasOpened = null;
272
+ this._openedVia = null;
273
+ }
274
+ /** Whether focus is currently within the drawer. */
275
+ _isFocusWithinDrawer() {
276
+ var _a;
277
+ const activeEl = (_a = this._doc) === null || _a === void 0 ? void 0 : _a.activeElement;
278
+ return !!activeEl && this._elementRef.nativeElement.contains(activeEl);
279
+ }
280
+ ngAfterContentInit() {
281
+ this._focusTrap = this._focusTrapFactory.create(this._elementRef.nativeElement);
282
+ this._updateFocusTrapState();
283
+ }
284
+ ngAfterContentChecked() {
285
+ // Enable the animations after the lifecycle hooks have run, in order to avoid animating
286
+ // drawers that are open by default. When we're on the server, we shouldn't enable the
287
+ // animations, because we don't want the drawer to animate the first time the user sees
288
+ // the page.
289
+ if (this._platform.isBrowser) {
290
+ this._enableAnimations = true;
315
291
  }
316
- /**
317
- * Toggle this drawer.
318
- * @param isOpen Whether the drawer should be open.
319
- * @param openedVia Whether the drawer was opened by a key press, mouse click or programmatically.
320
- * Used for focus management after the sidenav is closed.
321
- */
322
- toggle(isOpen = !this.opened, openedVia = 'program') {
323
- this._opened = isOpen;
324
- if (isOpen) {
325
- this._animationState = this._enableAnimations ? 'open' : 'open-instant';
326
- this._openedVia = openedVia;
327
- }
328
- else {
329
- this._animationState = 'void';
292
+ }
293
+ ngOnDestroy() {
294
+ if (this._focusTrap) {
295
+ this._focusTrap.destroy();
296
+ }
297
+ this._animationStarted.complete();
298
+ this._animationEnd.complete();
299
+ this._modeChanged.complete();
300
+ this._destroyed.next();
301
+ this._destroyed.complete();
302
+ }
303
+ /**
304
+ * Open the drawer.
305
+ * @param openedVia Whether the drawer was opened by a key press, mouse click or programmatically.
306
+ * Used for focus management after the sidenav is closed.
307
+ */
308
+ open(openedVia) {
309
+ return this.toggle(true, openedVia);
310
+ }
311
+ /** Close the drawer. */
312
+ close() {
313
+ return this.toggle(false);
314
+ }
315
+ /** Closes the drawer with context that the backdrop was clicked. */
316
+ _closeViaBackdropClick() {
317
+ // If the drawer is closed upon a backdrop click, we always want to restore focus. We
318
+ // don't need to check whether focus is currently in the drawer, as clicking on the
319
+ // backdrop causes blurring of the active element.
320
+ return this._setOpen(/* isOpen */ false, /* restoreFocus */ true);
321
+ }
322
+ /**
323
+ * Toggle this drawer.
324
+ * @param isOpen Whether the drawer should be open.
325
+ * @param openedVia Whether the drawer was opened by a key press, mouse click or programmatically.
326
+ * Used for focus management after the sidenav is closed.
327
+ */
328
+ toggle(isOpen = !this.opened, openedVia) {
329
+ // If the focus is currently inside the drawer content and we are closing the drawer,
330
+ // restore the focus to the initially focused element (when the drawer opened).
331
+ return this._setOpen(isOpen, /* restoreFocus */ !isOpen && this._isFocusWithinDrawer(), openedVia);
332
+ }
333
+ /**
334
+ * Toggles the opened state of the drawer.
335
+ * @param isOpen Whether the drawer should open or close.
336
+ * @param restoreFocus Whether focus should be restored on close.
337
+ * @param openedVia Focus origin that can be optionally set when opening a drawer. The
338
+ * origin will be used later when focus is restored on drawer close.
339
+ */
340
+ _setOpen(isOpen, restoreFocus, openedVia = 'program') {
341
+ this._opened = isOpen;
342
+ if (isOpen) {
343
+ this._animationState = this._enableAnimations ? 'open' : 'open-instant';
344
+ this._openedVia = openedVia;
345
+ }
346
+ else {
347
+ this._animationState = 'void';
348
+ if (restoreFocus) {
330
349
  this._restoreFocus();
331
350
  }
332
- this._updateFocusTrapState();
333
- return new Promise(resolve => {
334
- this.openedChange.pipe(take(1)).subscribe(open => resolve(open ? 'open' : 'close'));
335
- });
336
- }
337
- get _width() {
338
- return this._elementRef.nativeElement ? (this._elementRef.nativeElement.offsetWidth || 0) : 0;
339
- }
340
- /** Updates the enabled state of the focus trap. */
341
- _updateFocusTrapState() {
342
- if (this._focusTrap) {
343
- // The focus trap is only enabled when the drawer is open in any mode other than side.
344
- this._focusTrap.enabled = this.opened && this.mode !== 'side';
345
- }
346
- }
347
- // We have to use a `HostListener` here in order to support both Ivy and ViewEngine.
348
- // In Ivy the `host` bindings will be merged when this class is extended, whereas in
349
- // ViewEngine they're overwritten.
350
- // TODO(crisbeto): we move this back into `host` once Ivy is turned on by default.
351
- // tslint:disable-next-line:no-host-decorator-in-concrete
352
- _animationStartListener(event) {
353
- this._animationStarted.next(event);
354
351
  }
355
- // We have to use a `HostListener` here in order to support both Ivy and ViewEngine.
356
- // In Ivy the `host` bindings will be merged when this class is extended, whereas in
357
- // ViewEngine they're overwritten.
358
- // TODO(crisbeto): we move this back into `host` once Ivy is turned on by default.
359
- // tslint:disable-next-line:no-host-decorator-in-concrete
360
- _animationDoneListener(event) {
361
- this._animationEnd.next(event);
352
+ this._updateFocusTrapState();
353
+ return new Promise(resolve => {
354
+ this.openedChange.pipe(take(1)).subscribe(open => resolve(open ? 'open' : 'close'));
355
+ });
356
+ }
357
+ get _width() {
358
+ return this._elementRef.nativeElement ? (this._elementRef.nativeElement.offsetWidth || 0) : 0;
359
+ }
360
+ /** Updates the enabled state of the focus trap. */
361
+ _updateFocusTrapState() {
362
+ if (this._focusTrap) {
363
+ // The focus trap is only enabled when the drawer is open in any mode other than side.
364
+ this._focusTrap.enabled = this.opened && this.mode !== 'side';
362
365
  }
363
366
  }
364
- MatDrawer.decorators = [
365
- { type: Component, args: [{
366
- selector: 'mat-drawer',
367
- exportAs: 'matDrawer',
368
- template: "<div class=\"mat-drawer-inner-container\">\r\n <ng-content></ng-content>\r\n</div>\r\n",
369
- animations: [matDrawerAnimations.transformDrawer],
370
- host: {
371
- 'class': 'mat-drawer',
372
- // must prevent the browser from aligning text based on value
373
- '[attr.align]': 'null',
374
- '[class.mat-drawer-end]': 'position === "end"',
375
- '[class.mat-drawer-over]': 'mode === "over"',
376
- '[class.mat-drawer-push]': 'mode === "push"',
377
- '[class.mat-drawer-side]': 'mode === "side"',
378
- '[class.mat-drawer-opened]': 'opened',
379
- 'tabIndex': '-1',
380
- },
381
- changeDetection: ChangeDetectionStrategy.OnPush,
382
- encapsulation: ViewEncapsulation.None
383
- },] }
384
- ];
385
- MatDrawer.ctorParameters = () => [
386
- { type: ElementRef },
387
- { type: FocusTrapFactory },
388
- { type: FocusMonitor },
389
- { type: Platform },
390
- { type: NgZone },
391
- { type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [DOCUMENT,] }] },
392
- { type: MatDrawerContainer, decorators: [{ type: Optional }, { type: Inject, args: [MAT_DRAWER_CONTAINER,] }] }
393
- ];
394
- MatDrawer.propDecorators = {
395
- position: [{ type: Input }],
396
- mode: [{ type: Input }],
397
- disableClose: [{ type: Input }],
398
- autoFocus: [{ type: Input }],
399
- opened: [{ type: Input }],
400
- _animationState: [{ type: HostBinding, args: ['@transform',] }],
401
- openedChange: [{ type: Output }],
402
- _openedStream: [{ type: Output, args: ['opened',] }],
403
- openedStart: [{ type: Output }],
404
- _closedStream: [{ type: Output, args: ['closed',] }],
405
- closedStart: [{ type: Output }],
406
- onPositionChanged: [{ type: Output, args: ['positionChanged',] }],
407
- _animationStartListener: [{ type: HostListener, args: ['@transform.start', ['$event'],] }],
408
- _animationDoneListener: [{ type: HostListener, args: ['@transform.done', ['$event'],] }]
409
- };
410
- return MatDrawer;
411
- })();
367
+ // We have to use a `HostListener` here in order to support both Ivy and ViewEngine.
368
+ // In Ivy the `host` bindings will be merged when this class is extended, whereas in
369
+ // ViewEngine they're overwritten.
370
+ // TODO(crisbeto): we move this back into `host` once Ivy is turned on by default.
371
+ // tslint:disable-next-line:no-host-decorator-in-concrete
372
+ _animationStartListener(event) {
373
+ this._animationStarted.next(event);
374
+ }
375
+ // We have to use a `HostListener` here in order to support both Ivy and ViewEngine.
376
+ // In Ivy the `host` bindings will be merged when this class is extended, whereas in
377
+ // ViewEngine they're overwritten.
378
+ // TODO(crisbeto): we move this back into `host` once Ivy is turned on by default.
379
+ // tslint:disable-next-line:no-host-decorator-in-concrete
380
+ _animationDoneListener(event) {
381
+ this._animationEnd.next(event);
382
+ }
383
+ }
384
+ MatDrawer.decorators = [
385
+ { type: Component, args: [{
386
+ selector: 'mat-drawer',
387
+ exportAs: 'matDrawer',
388
+ template: "<div class=\"mat-drawer-inner-container\">\r\n <ng-content></ng-content>\r\n</div>\r\n",
389
+ animations: [matDrawerAnimations.transformDrawer],
390
+ host: {
391
+ 'class': 'mat-drawer',
392
+ // must prevent the browser from aligning text based on value
393
+ '[attr.align]': 'null',
394
+ '[class.mat-drawer-end]': 'position === "end"',
395
+ '[class.mat-drawer-over]': 'mode === "over"',
396
+ '[class.mat-drawer-push]': 'mode === "push"',
397
+ '[class.mat-drawer-side]': 'mode === "side"',
398
+ '[class.mat-drawer-opened]': 'opened',
399
+ 'tabIndex': '-1',
400
+ },
401
+ changeDetection: ChangeDetectionStrategy.OnPush,
402
+ encapsulation: ViewEncapsulation.None
403
+ },] }
404
+ ];
405
+ MatDrawer.ctorParameters = () => [
406
+ { type: ElementRef },
407
+ { type: FocusTrapFactory },
408
+ { type: FocusMonitor },
409
+ { type: Platform },
410
+ { type: NgZone },
411
+ { type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [DOCUMENT,] }] },
412
+ { type: MatDrawerContainer, decorators: [{ type: Optional }, { type: Inject, args: [MAT_DRAWER_CONTAINER,] }] }
413
+ ];
414
+ MatDrawer.propDecorators = {
415
+ position: [{ type: Input }],
416
+ mode: [{ type: Input }],
417
+ disableClose: [{ type: Input }],
418
+ autoFocus: [{ type: Input }],
419
+ opened: [{ type: Input }],
420
+ _animationState: [{ type: HostBinding, args: ['@transform',] }],
421
+ openedChange: [{ type: Output }],
422
+ _openedStream: [{ type: Output, args: ['opened',] }],
423
+ openedStart: [{ type: Output }],
424
+ _closedStream: [{ type: Output, args: ['closed',] }],
425
+ closedStart: [{ type: Output }],
426
+ onPositionChanged: [{ type: Output, args: ['positionChanged',] }],
427
+ _animationStartListener: [{ type: HostListener, args: ['@transform.start', ['$event'],] }],
428
+ _animationDoneListener: [{ type: HostListener, args: ['@transform.done', ['$event'],] }]
429
+ };
412
430
  /**
413
431
  * `<mat-drawer-container>` component.
414
432
  *
415
433
  * This is the parent component to one or two `<mat-drawer>`s that validates the state internally
416
434
  * and coordinates the backdrop and content styling.
417
435
  */
418
- let MatDrawerContainer = /** @class */ (() => {
419
- class MatDrawerContainer {
420
- constructor(_dir, _element, _ngZone, _changeDetectorRef, viewportRuler, defaultAutosize = false, _animationMode) {
421
- this._dir = _dir;
422
- this._element = _element;
423
- this._ngZone = _ngZone;
424
- this._changeDetectorRef = _changeDetectorRef;
425
- this._animationMode = _animationMode;
426
- /** Drawers that belong to this container. */
427
- this._drawers = new QueryList();
428
- /** Event emitted when the drawer backdrop is clicked. */
429
- this.backdropClick = new EventEmitter();
430
- /** Emits when the component is destroyed. */
431
- this._destroyed = new Subject();
432
- /** Emits on every ngDoCheck. Used for debouncing reflows. */
433
- this._doCheckSubject = new Subject();
434
- /**
435
- * Margins to be applied to the content. These are used to push / shrink the drawer content when a
436
- * drawer is open. We use margin rather than transform even for push mode because transform breaks
437
- * fixed position elements inside of the transformed element.
438
- */
439
- this._contentMargins = { left: null, right: null };
440
- this._contentMarginChanges = new Subject();
441
- // If a `Dir` directive exists up the tree, listen direction changes
442
- // and update the left/right properties to point to the proper start/end.
443
- if (_dir) {
444
- _dir.change.pipe(takeUntil(this._destroyed)).subscribe(() => {
445
- this._validateDrawers();
446
- this.updateContentMargins();
447
- });
448
- }
449
- // Since the minimum width of the sidenav depends on the viewport width,
450
- // we need to recompute the margins if the viewport changes.
451
- viewportRuler.change()
452
- .pipe(takeUntil(this._destroyed))
453
- .subscribe(() => this.updateContentMargins());
454
- this._autosize = defaultAutosize;
455
- }
456
- /** The drawer child with the `start` position. */
457
- get start() { return this._start; }
458
- /** The drawer child with the `end` position. */
459
- get end() { return this._end; }
460
- /**
461
- * Whether to automatically resize the container whenever
462
- * the size of any of its drawers changes.
463
- *
464
- * **Use at your own risk!** Enabling this option can cause layout thrashing by measuring
465
- * the drawers on every change detection cycle. Can be configured globally via the
466
- * `MAT_DRAWER_DEFAULT_AUTOSIZE` token.
467
- */
468
- get autosize() { return this._autosize; }
469
- set autosize(value) { this._autosize = coerceBooleanProperty(value); }
436
+ class MatDrawerContainer {
437
+ constructor(_dir, _element, _ngZone, _changeDetectorRef, viewportRuler, defaultAutosize = false, _animationMode) {
438
+ this._dir = _dir;
439
+ this._element = _element;
440
+ this._ngZone = _ngZone;
441
+ this._changeDetectorRef = _changeDetectorRef;
442
+ this._animationMode = _animationMode;
443
+ /** Drawers that belong to this container. */
444
+ this._drawers = new QueryList();
445
+ /** Event emitted when the drawer backdrop is clicked. */
446
+ this.backdropClick = new EventEmitter();
447
+ /** Emits when the component is destroyed. */
448
+ this._destroyed = new Subject();
449
+ /** Emits on every ngDoCheck. Used for debouncing reflows. */
450
+ this._doCheckSubject = new Subject();
470
451
  /**
471
- * Whether the drawer container should have a backdrop while one of the sidenavs is open.
472
- * If explicitly set to `true`, the backdrop will be enabled for drawers in the `side`
473
- * mode as well.
452
+ * Margins to be applied to the content. These are used to push / shrink the drawer content when a
453
+ * drawer is open. We use margin rather than transform even for push mode because transform breaks
454
+ * fixed position elements inside of the transformed element.
474
455
  */
475
- get hasBackdrop() {
476
- if (this._backdropOverride == null) {
477
- return !this._start || this._start.mode !== 'side' || !this._end || this._end.mode !== 'side';
478
- }
479
- return this._backdropOverride;
480
- }
481
- set hasBackdrop(value) {
482
- this._backdropOverride = value == null ? null : coerceBooleanProperty(value);
483
- }
484
- /** Reference to the CdkScrollable instance that wraps the scrollable content. */
485
- get scrollable() {
486
- return this._userContent || this._content;
487
- }
488
- ngAfterContentInit() {
489
- this._allDrawers.changes
490
- .pipe(startWith(this._allDrawers), takeUntil(this._destroyed))
491
- .subscribe((drawer) => {
492
- // @breaking-change 10.0.0 Remove `_container` check once container parameter is required.
493
- this._drawers.reset(drawer.filter(item => !item._container || item._container === this));
494
- this._drawers.notifyOnChanges();
495
- });
496
- this._drawers.changes.pipe(startWith(null)).subscribe(() => {
456
+ this._contentMargins = { left: null, right: null };
457
+ this._contentMarginChanges = new Subject();
458
+ // If a `Dir` directive exists up the tree, listen direction changes
459
+ // and update the left/right properties to point to the proper start/end.
460
+ if (_dir) {
461
+ _dir.change.pipe(takeUntil(this._destroyed)).subscribe(() => {
497
462
  this._validateDrawers();
498
- this._drawers.forEach((drawer) => {
499
- this._watchDrawerToggle(drawer);
500
- this._watchDrawerPosition(drawer);
501
- this._watchDrawerMode(drawer);
502
- });
503
- if (!this._drawers.length ||
504
- this._isDrawerOpen(this._start) ||
505
- this._isDrawerOpen(this._end)) {
506
- this.updateContentMargins();
507
- }
508
- this._changeDetectorRef.markForCheck();
463
+ this.updateContentMargins();
509
464
  });
510
- this._doCheckSubject.pipe(debounceTime(10), // Arbitrary debounce time, less than a frame at 60fps
511
- takeUntil(this._destroyed)).subscribe(() => this.updateContentMargins());
512
- }
513
- ngOnDestroy() {
514
- this._contentMarginChanges.complete();
515
- this._doCheckSubject.complete();
516
- this._drawers.destroy();
517
- this._destroyed.next();
518
- this._destroyed.complete();
519
- }
520
- /** Calls `open` of both start and end drawers */
521
- open() {
522
- this._drawers.forEach(drawer => drawer.open());
523
465
  }
524
- /** Calls `close` of both start and end drawers */
525
- close() {
526
- this._drawers.forEach(drawer => drawer.close());
527
- }
528
- /**
529
- * Recalculates and updates the inline styles for the content. Note that this should be used
530
- * sparingly, because it causes a reflow.
531
- */
532
- updateContentMargins() {
533
- // 1. For drawers in `over` mode, they don't affect the content.
534
- // 2. For drawers in `side` mode they should shrink the content. We do this by adding to the
535
- // left margin (for left drawer) or right margin (for right the drawer).
536
- // 3. For drawers in `push` mode the should shift the content without resizing it. We do this by
537
- // adding to the left or right margin and simultaneously subtracting the same amount of
538
- // margin from the other side.
539
- let left = 0;
540
- let right = 0;
541
- if (this._left && this._left.opened) {
542
- if (this._left.mode == 'side') {
543
- left += this._left._width;
544
- }
545
- else if (this._left.mode == 'push') {
546
- const width = this._left._width;
547
- left += width;
548
- right -= width;
549
- }
466
+ // Since the minimum width of the sidenav depends on the viewport width,
467
+ // we need to recompute the margins if the viewport changes.
468
+ viewportRuler.change()
469
+ .pipe(takeUntil(this._destroyed))
470
+ .subscribe(() => this.updateContentMargins());
471
+ this._autosize = defaultAutosize;
472
+ }
473
+ /** The drawer child with the `start` position. */
474
+ get start() { return this._start; }
475
+ /** The drawer child with the `end` position. */
476
+ get end() { return this._end; }
477
+ /**
478
+ * Whether to automatically resize the container whenever
479
+ * the size of any of its drawers changes.
480
+ *
481
+ * **Use at your own risk!** Enabling this option can cause layout thrashing by measuring
482
+ * the drawers on every change detection cycle. Can be configured globally via the
483
+ * `MAT_DRAWER_DEFAULT_AUTOSIZE` token.
484
+ */
485
+ get autosize() { return this._autosize; }
486
+ set autosize(value) { this._autosize = coerceBooleanProperty(value); }
487
+ /**
488
+ * Whether the drawer container should have a backdrop while one of the sidenavs is open.
489
+ * If explicitly set to `true`, the backdrop will be enabled for drawers in the `side`
490
+ * mode as well.
491
+ */
492
+ get hasBackdrop() {
493
+ if (this._backdropOverride == null) {
494
+ return !this._start || this._start.mode !== 'side' || !this._end || this._end.mode !== 'side';
495
+ }
496
+ return this._backdropOverride;
497
+ }
498
+ set hasBackdrop(value) {
499
+ this._backdropOverride = value == null ? null : coerceBooleanProperty(value);
500
+ }
501
+ /** Reference to the CdkScrollable instance that wraps the scrollable content. */
502
+ get scrollable() {
503
+ return this._userContent || this._content;
504
+ }
505
+ ngAfterContentInit() {
506
+ this._allDrawers.changes
507
+ .pipe(startWith(this._allDrawers), takeUntil(this._destroyed))
508
+ .subscribe((drawer) => {
509
+ // @breaking-change 10.0.0 Remove `_container` check once container parameter is required.
510
+ this._drawers.reset(drawer.filter(item => !item._container || item._container === this));
511
+ this._drawers.notifyOnChanges();
512
+ });
513
+ this._drawers.changes.pipe(startWith(null)).subscribe(() => {
514
+ this._validateDrawers();
515
+ this._drawers.forEach((drawer) => {
516
+ this._watchDrawerToggle(drawer);
517
+ this._watchDrawerPosition(drawer);
518
+ this._watchDrawerMode(drawer);
519
+ });
520
+ if (!this._drawers.length ||
521
+ this._isDrawerOpen(this._start) ||
522
+ this._isDrawerOpen(this._end)) {
523
+ this.updateContentMargins();
550
524
  }
551
- if (this._right && this._right.opened) {
552
- if (this._right.mode == 'side') {
553
- right += this._right._width;
554
- }
555
- else if (this._right.mode == 'push') {
556
- const width = this._right._width;
557
- right += width;
558
- left -= width;
559
- }
525
+ this._changeDetectorRef.markForCheck();
526
+ });
527
+ this._doCheckSubject.pipe(debounceTime(10), // Arbitrary debounce time, less than a frame at 60fps
528
+ takeUntil(this._destroyed)).subscribe(() => this.updateContentMargins());
529
+ }
530
+ ngOnDestroy() {
531
+ this._contentMarginChanges.complete();
532
+ this._doCheckSubject.complete();
533
+ this._drawers.destroy();
534
+ this._destroyed.next();
535
+ this._destroyed.complete();
536
+ }
537
+ /** Calls `open` of both start and end drawers */
538
+ open() {
539
+ this._drawers.forEach(drawer => drawer.open());
540
+ }
541
+ /** Calls `close` of both start and end drawers */
542
+ close() {
543
+ this._drawers.forEach(drawer => drawer.close());
544
+ }
545
+ /**
546
+ * Recalculates and updates the inline styles for the content. Note that this should be used
547
+ * sparingly, because it causes a reflow.
548
+ */
549
+ updateContentMargins() {
550
+ // 1. For drawers in `over` mode, they don't affect the content.
551
+ // 2. For drawers in `side` mode they should shrink the content. We do this by adding to the
552
+ // left margin (for left drawer) or right margin (for right the drawer).
553
+ // 3. For drawers in `push` mode the should shift the content without resizing it. We do this by
554
+ // adding to the left or right margin and simultaneously subtracting the same amount of
555
+ // margin from the other side.
556
+ let left = 0;
557
+ let right = 0;
558
+ if (this._left && this._left.opened) {
559
+ if (this._left.mode == 'side') {
560
+ left += this._left._width;
560
561
  }
561
- // If either `right` or `left` is zero, don't set a style to the element. This
562
- // allows users to specify a custom size via CSS class in SSR scenarios where the
563
- // measured widths will always be zero. Note that we reset to `null` here, rather
564
- // than below, in order to ensure that the types in the `if` below are consistent.
565
- left = left || null;
566
- right = right || null;
567
- if (left !== this._contentMargins.left || right !== this._contentMargins.right) {
568
- this._contentMargins = { left, right };
569
- // Pull back into the NgZone since in some cases we could be outside. We need to be careful
570
- // to do it only when something changed, otherwise we can end up hitting the zone too often.
571
- this._ngZone.run(() => this._contentMarginChanges.next(this._contentMargins));
562
+ else if (this._left.mode == 'push') {
563
+ const width = this._left._width;
564
+ left += width;
565
+ right -= width;
572
566
  }
573
567
  }
574
- ngDoCheck() {
575
- // If users opted into autosizing, do a check every change detection cycle.
576
- if (this._autosize && this._isPushed()) {
577
- // Run outside the NgZone, otherwise the debouncer will throw us into an infinite loop.
578
- this._ngZone.runOutsideAngular(() => this._doCheckSubject.next());
568
+ if (this._right && this._right.opened) {
569
+ if (this._right.mode == 'side') {
570
+ right += this._right._width;
579
571
  }
580
- }
581
- /**
582
- * Subscribes to drawer events in order to set a class on the main container element when the
583
- * drawer is open and the backdrop is visible. This ensures any overflow on the container element
584
- * is properly hidden.
585
- */
586
- _watchDrawerToggle(drawer) {
587
- drawer._animationStarted.pipe(filter((event) => event.fromState !== event.toState), takeUntil(this._drawers.changes))
588
- .subscribe((event) => {
589
- // Set the transition class on the container so that the animations occur. This should not
590
- // be set initially because animations should only be triggered via a change in state.
591
- if (event.toState !== 'open-instant' && this._animationMode !== 'NoopAnimations') {
592
- this._element.nativeElement.classList.add('mat-drawer-transition');
593
- }
594
- this.updateContentMargins();
595
- this._changeDetectorRef.markForCheck();
596
- });
597
- if (drawer.mode !== 'side') {
598
- drawer.openedChange.pipe(takeUntil(this._drawers.changes)).subscribe(() => this._setContainerClass(drawer.opened));
572
+ else if (this._right.mode == 'push') {
573
+ const width = this._right._width;
574
+ right += width;
575
+ left -= width;
599
576
  }
600
577
  }
601
- /**
602
- * Subscribes to drawer onPositionChanged event in order to
603
- * re-validate drawers when the position changes.
604
- */
605
- _watchDrawerPosition(drawer) {
606
- if (!drawer) {
607
- return;
578
+ // If either `right` or `left` is zero, don't set a style to the element. This
579
+ // allows users to specify a custom size via CSS class in SSR scenarios where the
580
+ // measured widths will always be zero. Note that we reset to `null` here, rather
581
+ // than below, in order to ensure that the types in the `if` below are consistent.
582
+ left = left || null;
583
+ right = right || null;
584
+ if (left !== this._contentMargins.left || right !== this._contentMargins.right) {
585
+ this._contentMargins = { left, right };
586
+ // Pull back into the NgZone since in some cases we could be outside. We need to be careful
587
+ // to do it only when something changed, otherwise we can end up hitting the zone too often.
588
+ this._ngZone.run(() => this._contentMarginChanges.next(this._contentMargins));
589
+ }
590
+ }
591
+ ngDoCheck() {
592
+ // If users opted into autosizing, do a check every change detection cycle.
593
+ if (this._autosize && this._isPushed()) {
594
+ // Run outside the NgZone, otherwise the debouncer will throw us into an infinite loop.
595
+ this._ngZone.runOutsideAngular(() => this._doCheckSubject.next());
596
+ }
597
+ }
598
+ /**
599
+ * Subscribes to drawer events in order to set a class on the main container element when the
600
+ * drawer is open and the backdrop is visible. This ensures any overflow on the container element
601
+ * is properly hidden.
602
+ */
603
+ _watchDrawerToggle(drawer) {
604
+ drawer._animationStarted.pipe(filter((event) => event.fromState !== event.toState), takeUntil(this._drawers.changes))
605
+ .subscribe((event) => {
606
+ // Set the transition class on the container so that the animations occur. This should not
607
+ // be set initially because animations should only be triggered via a change in state.
608
+ if (event.toState !== 'open-instant' && this._animationMode !== 'NoopAnimations') {
609
+ this._element.nativeElement.classList.add('mat-drawer-transition');
608
610
  }
609
- // NOTE: We need to wait for the microtask queue to be empty before validating,
610
- // since both drawers may be swapping positions at the same time.
611
- drawer.onPositionChanged.pipe(takeUntil(this._drawers.changes)).subscribe(() => {
612
- this._ngZone.onMicrotaskEmpty.asObservable().pipe(take(1)).subscribe(() => {
613
- this._validateDrawers();
614
- });
611
+ this.updateContentMargins();
612
+ this._changeDetectorRef.markForCheck();
613
+ });
614
+ if (drawer.mode !== 'side') {
615
+ drawer.openedChange.pipe(takeUntil(this._drawers.changes)).subscribe(() => this._setContainerClass(drawer.opened));
616
+ }
617
+ }
618
+ /**
619
+ * Subscribes to drawer onPositionChanged event in order to
620
+ * re-validate drawers when the position changes.
621
+ */
622
+ _watchDrawerPosition(drawer) {
623
+ if (!drawer) {
624
+ return;
625
+ }
626
+ // NOTE: We need to wait for the microtask queue to be empty before validating,
627
+ // since both drawers may be swapping positions at the same time.
628
+ drawer.onPositionChanged.pipe(takeUntil(this._drawers.changes)).subscribe(() => {
629
+ this._ngZone.onMicrotaskEmpty.asObservable().pipe(take(1)).subscribe(() => {
630
+ this._validateDrawers();
631
+ });
632
+ });
633
+ }
634
+ /** Subscribes to changes in drawer mode so we can run change detection. */
635
+ _watchDrawerMode(drawer) {
636
+ if (drawer) {
637
+ drawer._modeChanged.pipe(takeUntil(merge(this._drawers.changes, this._destroyed)))
638
+ .subscribe(() => {
639
+ this.updateContentMargins();
640
+ this._changeDetectorRef.markForCheck();
615
641
  });
616
642
  }
617
- /** Subscribes to changes in drawer mode so we can run change detection. */
618
- _watchDrawerMode(drawer) {
619
- if (drawer) {
620
- drawer._modeChanged.pipe(takeUntil(merge(this._drawers.changes, this._destroyed)))
621
- .subscribe(() => {
622
- this.updateContentMargins();
623
- this._changeDetectorRef.markForCheck();
624
- });
625
- }
643
+ }
644
+ /** Toggles the 'mat-drawer-opened' class on the main 'mat-drawer-container' element. */
645
+ _setContainerClass(isAdd) {
646
+ const classList = this._element.nativeElement.classList;
647
+ const className = 'mat-drawer-container-has-open';
648
+ if (isAdd) {
649
+ classList.add(className);
626
650
  }
627
- /** Toggles the 'mat-drawer-opened' class on the main 'mat-drawer-container' element. */
628
- _setContainerClass(isAdd) {
629
- const classList = this._element.nativeElement.classList;
630
- const className = 'mat-drawer-container-has-open';
631
- if (isAdd) {
632
- classList.add(className);
633
- }
634
- else {
635
- classList.remove(className);
636
- }
651
+ else {
652
+ classList.remove(className);
637
653
  }
638
- /** Validate the state of the drawer children components. */
639
- _validateDrawers() {
640
- this._start = this._end = null;
641
- // Ensure that we have at most one start and one end drawer.
642
- this._drawers.forEach(drawer => {
643
- if (drawer.position == 'end') {
644
- if (this._end != null) {
645
- throwMatDuplicatedDrawerError('end');
646
- }
647
- this._end = drawer;
648
- }
649
- else {
650
- if (this._start != null) {
651
- throwMatDuplicatedDrawerError('start');
652
- }
653
- this._start = drawer;
654
+ }
655
+ /** Validate the state of the drawer children components. */
656
+ _validateDrawers() {
657
+ this._start = this._end = null;
658
+ // Ensure that we have at most one start and one end drawer.
659
+ this._drawers.forEach(drawer => {
660
+ if (drawer.position == 'end') {
661
+ if (this._end != null) {
662
+ throwMatDuplicatedDrawerError('end');
654
663
  }
655
- });
656
- this._right = this._left = null;
657
- // Detect if we're LTR or RTL.
658
- if (this._dir && this._dir.value === 'rtl') {
659
- this._left = this._end;
660
- this._right = this._start;
664
+ this._end = drawer;
661
665
  }
662
666
  else {
663
- this._left = this._start;
664
- this._right = this._end;
667
+ if (this._start != null) {
668
+ throwMatDuplicatedDrawerError('start');
669
+ }
670
+ this._start = drawer;
665
671
  }
672
+ });
673
+ this._right = this._left = null;
674
+ // Detect if we're LTR or RTL.
675
+ if (this._dir && this._dir.value === 'rtl') {
676
+ this._left = this._end;
677
+ this._right = this._start;
666
678
  }
667
- /** Whether the container is being pushed to the side by one of the drawers. */
668
- _isPushed() {
669
- return (this._isDrawerOpen(this._start) && this._start.mode != 'over') ||
670
- (this._isDrawerOpen(this._end) && this._end.mode != 'over');
671
- }
672
- _onBackdropClicked() {
673
- this.backdropClick.emit();
674
- this._closeModalDrawer();
675
- }
676
- _closeModalDrawer() {
677
- // Close all open drawers where closing is not disabled and the mode is not `side`.
678
- [this._start, this._end]
679
- .filter(drawer => drawer && !drawer.disableClose && this._canHaveBackdrop(drawer))
680
- .forEach(drawer => drawer.close());
681
- }
682
- _isShowingBackdrop() {
683
- return (this._isDrawerOpen(this._start) && this._canHaveBackdrop(this._start)) ||
684
- (this._isDrawerOpen(this._end) && this._canHaveBackdrop(this._end));
685
- }
686
- _canHaveBackdrop(drawer) {
687
- return drawer.mode !== 'side' || !!this._backdropOverride;
688
- }
689
- _isDrawerOpen(drawer) {
690
- return drawer != null && drawer.opened;
679
+ else {
680
+ this._left = this._start;
681
+ this._right = this._end;
691
682
  }
692
683
  }
693
- MatDrawerContainer.decorators = [
694
- { type: Component, args: [{
695
- selector: 'mat-drawer-container',
696
- exportAs: 'matDrawerContainer',
697
- template: "<div class=\"mat-drawer-backdrop\" (click)=\"_onBackdropClicked()\" *ngIf=\"hasBackdrop\"\n [class.mat-drawer-shown]=\"_isShowingBackdrop()\"></div>\n\n<ng-content select=\"mat-drawer\"></ng-content>\n\n<ng-content select=\"mat-drawer-content\">\n</ng-content>\n<mat-drawer-content *ngIf=\"!_content\">\n <ng-content></ng-content>\n</mat-drawer-content>\n",
698
- host: {
699
- 'class': 'mat-drawer-container',
700
- '[class.mat-drawer-container-explicit-backdrop]': '_backdropOverride',
701
- },
702
- changeDetection: ChangeDetectionStrategy.OnPush,
703
- encapsulation: ViewEncapsulation.None,
704
- providers: [{
705
- provide: MAT_DRAWER_CONTAINER,
706
- useExisting: MatDrawerContainer
707
- }],
708
- styles: [".mat-drawer-container{position:relative;z-index:1;box-sizing:border-box;-webkit-overflow-scrolling:touch;display:block;overflow:hidden}.mat-drawer-container[fullscreen]{top:0;left:0;right:0;bottom:0;position:absolute}.mat-drawer-container[fullscreen].mat-drawer-container-has-open{overflow:hidden}.mat-drawer-container.mat-drawer-container-explicit-backdrop .mat-drawer-side{z-index:3}.mat-drawer-container.ng-animate-disabled .mat-drawer-backdrop,.mat-drawer-container.ng-animate-disabled .mat-drawer-content,.ng-animate-disabled .mat-drawer-container .mat-drawer-backdrop,.ng-animate-disabled .mat-drawer-container .mat-drawer-content{transition:none}.mat-drawer-backdrop{top:0;left:0;right:0;bottom:0;position:absolute;display:block;z-index:3;visibility:hidden}.mat-drawer-backdrop.mat-drawer-shown{visibility:visible}.mat-drawer-transition .mat-drawer-backdrop{transition-duration:400ms;transition-timing-function:cubic-bezier(0.25, 0.8, 0.25, 1);transition-property:background-color,visibility}.cdk-high-contrast-active .mat-drawer-backdrop{opacity:.5}.mat-drawer-content{position:relative;z-index:1;display:block;height:100%;overflow:auto}.mat-drawer-transition .mat-drawer-content{transition-duration:400ms;transition-timing-function:cubic-bezier(0.25, 0.8, 0.25, 1);transition-property:transform,margin-left,margin-right}.mat-drawer{position:relative;z-index:4;display:block;position:absolute;top:0;bottom:0;z-index:3;outline:0;box-sizing:border-box;overflow-y:auto;transform:translate3d(-100%, 0, 0)}.cdk-high-contrast-active .mat-drawer,.cdk-high-contrast-active [dir=rtl] .mat-drawer.mat-drawer-end{border-right:solid 1px currentColor}.cdk-high-contrast-active [dir=rtl] .mat-drawer,.cdk-high-contrast-active .mat-drawer.mat-drawer-end{border-left:solid 1px currentColor;border-right:none}.mat-drawer.mat-drawer-side{z-index:2}.mat-drawer.mat-drawer-end{right:0;transform:translate3d(100%, 0, 0)}[dir=rtl] .mat-drawer{transform:translate3d(100%, 0, 0)}[dir=rtl] .mat-drawer.mat-drawer-end{left:0;right:auto;transform:translate3d(-100%, 0, 0)}.mat-drawer-inner-container{width:100%;height:100%;overflow:auto;-webkit-overflow-scrolling:touch}.mat-sidenav-fixed{position:fixed}\n"]
709
- },] }
710
- ];
711
- MatDrawerContainer.ctorParameters = () => [
712
- { type: Directionality, decorators: [{ type: Optional }] },
713
- { type: ElementRef },
714
- { type: NgZone },
715
- { type: ChangeDetectorRef },
716
- { type: ViewportRuler },
717
- { type: undefined, decorators: [{ type: Inject, args: [MAT_DRAWER_DEFAULT_AUTOSIZE,] }] },
718
- { type: String, decorators: [{ type: Optional }, { type: Inject, args: [ANIMATION_MODULE_TYPE,] }] }
719
- ];
720
- MatDrawerContainer.propDecorators = {
721
- _allDrawers: [{ type: ContentChildren, args: [MatDrawer, {
722
- // We need to use `descendants: true`, because Ivy will no longer match
723
- // indirect descendants if it's left as false.
724
- descendants: true
725
- },] }],
726
- _content: [{ type: ContentChild, args: [MatDrawerContent,] }],
727
- _userContent: [{ type: ViewChild, args: [MatDrawerContent,] }],
728
- autosize: [{ type: Input }],
729
- hasBackdrop: [{ type: Input }],
730
- backdropClick: [{ type: Output }]
731
- };
732
- return MatDrawerContainer;
733
- })();
684
+ /** Whether the container is being pushed to the side by one of the drawers. */
685
+ _isPushed() {
686
+ return (this._isDrawerOpen(this._start) && this._start.mode != 'over') ||
687
+ (this._isDrawerOpen(this._end) && this._end.mode != 'over');
688
+ }
689
+ _onBackdropClicked() {
690
+ this.backdropClick.emit();
691
+ this._closeModalDrawersViaBackdrop();
692
+ }
693
+ _closeModalDrawersViaBackdrop() {
694
+ // Close all open drawers where closing is not disabled and the mode is not `side`.
695
+ [this._start, this._end]
696
+ .filter(drawer => drawer && !drawer.disableClose && this._canHaveBackdrop(drawer))
697
+ .forEach(drawer => drawer._closeViaBackdropClick());
698
+ }
699
+ _isShowingBackdrop() {
700
+ return (this._isDrawerOpen(this._start) && this._canHaveBackdrop(this._start)) ||
701
+ (this._isDrawerOpen(this._end) && this._canHaveBackdrop(this._end));
702
+ }
703
+ _canHaveBackdrop(drawer) {
704
+ return drawer.mode !== 'side' || !!this._backdropOverride;
705
+ }
706
+ _isDrawerOpen(drawer) {
707
+ return drawer != null && drawer.opened;
708
+ }
709
+ }
710
+ MatDrawerContainer.decorators = [
711
+ { type: Component, args: [{
712
+ selector: 'mat-drawer-container',
713
+ exportAs: 'matDrawerContainer',
714
+ template: "<div class=\"mat-drawer-backdrop\" (click)=\"_onBackdropClicked()\" *ngIf=\"hasBackdrop\"\n [class.mat-drawer-shown]=\"_isShowingBackdrop()\"></div>\n\n<ng-content select=\"mat-drawer\"></ng-content>\n\n<ng-content select=\"mat-drawer-content\">\n</ng-content>\n<mat-drawer-content *ngIf=\"!_content\">\n <ng-content></ng-content>\n</mat-drawer-content>\n",
715
+ host: {
716
+ 'class': 'mat-drawer-container',
717
+ '[class.mat-drawer-container-explicit-backdrop]': '_backdropOverride',
718
+ },
719
+ changeDetection: ChangeDetectionStrategy.OnPush,
720
+ encapsulation: ViewEncapsulation.None,
721
+ providers: [{
722
+ provide: MAT_DRAWER_CONTAINER,
723
+ useExisting: MatDrawerContainer
724
+ }],
725
+ styles: [".mat-drawer-container{position:relative;z-index:1;box-sizing:border-box;-webkit-overflow-scrolling:touch;display:block;overflow:hidden}.mat-drawer-container[fullscreen]{top:0;left:0;right:0;bottom:0;position:absolute}.mat-drawer-container[fullscreen].mat-drawer-container-has-open{overflow:hidden}.mat-drawer-container.mat-drawer-container-explicit-backdrop .mat-drawer-side{z-index:3}.mat-drawer-container.ng-animate-disabled .mat-drawer-backdrop,.mat-drawer-container.ng-animate-disabled .mat-drawer-content,.ng-animate-disabled .mat-drawer-container .mat-drawer-backdrop,.ng-animate-disabled .mat-drawer-container .mat-drawer-content{transition:none}.mat-drawer-backdrop{top:0;left:0;right:0;bottom:0;position:absolute;display:block;z-index:3;visibility:hidden}.mat-drawer-backdrop.mat-drawer-shown{visibility:visible}.mat-drawer-transition .mat-drawer-backdrop{transition-duration:400ms;transition-timing-function:cubic-bezier(0.25, 0.8, 0.25, 1);transition-property:background-color,visibility}.cdk-high-contrast-active .mat-drawer-backdrop{opacity:.5}.mat-drawer-content{position:relative;z-index:1;display:block;height:100%;overflow:auto}.mat-drawer-transition .mat-drawer-content{transition-duration:400ms;transition-timing-function:cubic-bezier(0.25, 0.8, 0.25, 1);transition-property:transform,margin-left,margin-right}.mat-drawer{position:relative;z-index:4;display:block;position:absolute;top:0;bottom:0;z-index:3;outline:0;box-sizing:border-box;overflow-y:auto;transform:translate3d(-100%, 0, 0)}.cdk-high-contrast-active .mat-drawer,.cdk-high-contrast-active [dir=rtl] .mat-drawer.mat-drawer-end{border-right:solid 1px currentColor}.cdk-high-contrast-active [dir=rtl] .mat-drawer,.cdk-high-contrast-active .mat-drawer.mat-drawer-end{border-left:solid 1px currentColor;border-right:none}.mat-drawer.mat-drawer-side{z-index:2}.mat-drawer.mat-drawer-end{right:0;transform:translate3d(100%, 0, 0)}[dir=rtl] .mat-drawer{transform:translate3d(100%, 0, 0)}[dir=rtl] .mat-drawer.mat-drawer-end{left:0;right:auto;transform:translate3d(-100%, 0, 0)}.mat-drawer-inner-container{width:100%;height:100%;overflow:auto;-webkit-overflow-scrolling:touch}.mat-sidenav-fixed{position:fixed}\n"]
726
+ },] }
727
+ ];
728
+ MatDrawerContainer.ctorParameters = () => [
729
+ { type: Directionality, decorators: [{ type: Optional }] },
730
+ { type: ElementRef },
731
+ { type: NgZone },
732
+ { type: ChangeDetectorRef },
733
+ { type: ViewportRuler },
734
+ { type: undefined, decorators: [{ type: Inject, args: [MAT_DRAWER_DEFAULT_AUTOSIZE,] }] },
735
+ { type: String, decorators: [{ type: Optional }, { type: Inject, args: [ANIMATION_MODULE_TYPE,] }] }
736
+ ];
737
+ MatDrawerContainer.propDecorators = {
738
+ _allDrawers: [{ type: ContentChildren, args: [MatDrawer, {
739
+ // We need to use `descendants: true`, because Ivy will no longer match
740
+ // indirect descendants if it's left as false.
741
+ descendants: true
742
+ },] }],
743
+ _content: [{ type: ContentChild, args: [MatDrawerContent,] }],
744
+ _userContent: [{ type: ViewChild, args: [MatDrawerContent,] }],
745
+ autosize: [{ type: Input }],
746
+ hasBackdrop: [{ type: Input }],
747
+ backdropClick: [{ type: Output }]
748
+ };
734
749
 
735
750
  /**
736
751
  * @license
@@ -739,120 +754,111 @@ let MatDrawerContainer = /** @class */ (() => {
739
754
  * Use of this source code is governed by an MIT-style license that can be
740
755
  * found in the LICENSE file at https://angular.io/license
741
756
  */
742
- let MatSidenavContent = /** @class */ (() => {
743
- class MatSidenavContent extends MatDrawerContent {
744
- constructor(changeDetectorRef, container, elementRef, scrollDispatcher, ngZone) {
745
- super(changeDetectorRef, container, elementRef, scrollDispatcher, ngZone);
746
- }
757
+ class MatSidenavContent extends MatDrawerContent {
758
+ constructor(changeDetectorRef, container, elementRef, scrollDispatcher, ngZone) {
759
+ super(changeDetectorRef, container, elementRef, scrollDispatcher, ngZone);
747
760
  }
748
- MatSidenavContent.decorators = [
749
- { type: Component, args: [{
750
- selector: 'mat-sidenav-content',
751
- template: '<ng-content></ng-content>',
752
- host: {
753
- 'class': 'mat-drawer-content mat-sidenav-content',
754
- '[style.margin-left.px]': '_container._contentMargins.left',
755
- '[style.margin-right.px]': '_container._contentMargins.right',
756
- },
757
- changeDetection: ChangeDetectionStrategy.OnPush,
758
- encapsulation: ViewEncapsulation.None
759
- },] }
760
- ];
761
- MatSidenavContent.ctorParameters = () => [
762
- { type: ChangeDetectorRef },
763
- { type: MatSidenavContainer, decorators: [{ type: Inject, args: [forwardRef(() => MatSidenavContainer),] }] },
764
- { type: ElementRef },
765
- { type: ScrollDispatcher },
766
- { type: NgZone }
767
- ];
768
- return MatSidenavContent;
769
- })();
770
- let MatSidenav = /** @class */ (() => {
771
- class MatSidenav extends MatDrawer {
772
- constructor() {
773
- super(...arguments);
774
- this._fixedInViewport = false;
775
- this._fixedTopGap = 0;
776
- this._fixedBottomGap = 0;
777
- }
778
- /** Whether the sidenav is fixed in the viewport. */
779
- get fixedInViewport() { return this._fixedInViewport; }
780
- set fixedInViewport(value) { this._fixedInViewport = coerceBooleanProperty(value); }
781
- /**
782
- * The gap between the top of the sidenav and the top of the viewport when the sidenav is in fixed
783
- * mode.
784
- */
785
- get fixedTopGap() { return this._fixedTopGap; }
786
- set fixedTopGap(value) { this._fixedTopGap = coerceNumberProperty(value); }
787
- /**
788
- * The gap between the bottom of the sidenav and the bottom of the viewport when the sidenav is in
789
- * fixed mode.
790
- */
791
- get fixedBottomGap() { return this._fixedBottomGap; }
792
- set fixedBottomGap(value) { this._fixedBottomGap = coerceNumberProperty(value); }
793
- }
794
- MatSidenav.decorators = [
795
- { type: Component, args: [{
796
- selector: 'mat-sidenav',
797
- exportAs: 'matSidenav',
798
- template: "<div class=\"mat-drawer-inner-container\">\r\n <ng-content></ng-content>\r\n</div>\r\n",
799
- animations: [matDrawerAnimations.transformDrawer],
800
- host: {
801
- 'class': 'mat-drawer mat-sidenav',
802
- 'tabIndex': '-1',
803
- // must prevent the browser from aligning text based on value
804
- '[attr.align]': 'null',
805
- '[class.mat-drawer-end]': 'position === "end"',
806
- '[class.mat-drawer-over]': 'mode === "over"',
807
- '[class.mat-drawer-push]': 'mode === "push"',
808
- '[class.mat-drawer-side]': 'mode === "side"',
809
- '[class.mat-drawer-opened]': 'opened',
810
- '[class.mat-sidenav-fixed]': 'fixedInViewport',
811
- '[style.top.px]': 'fixedInViewport ? fixedTopGap : null',
812
- '[style.bottom.px]': 'fixedInViewport ? fixedBottomGap : null',
813
- },
814
- changeDetection: ChangeDetectionStrategy.OnPush,
815
- encapsulation: ViewEncapsulation.None
816
- },] }
817
- ];
818
- MatSidenav.propDecorators = {
819
- fixedInViewport: [{ type: Input }],
820
- fixedTopGap: [{ type: Input }],
821
- fixedBottomGap: [{ type: Input }]
822
- };
823
- return MatSidenav;
824
- })();
825
- let MatSidenavContainer = /** @class */ (() => {
826
- class MatSidenavContainer extends MatDrawerContainer {
827
- }
828
- MatSidenavContainer.decorators = [
829
- { type: Component, args: [{
830
- selector: 'mat-sidenav-container',
831
- exportAs: 'matSidenavContainer',
832
- template: "<div class=\"mat-drawer-backdrop\" (click)=\"_onBackdropClicked()\" *ngIf=\"hasBackdrop\"\n [class.mat-drawer-shown]=\"_isShowingBackdrop()\"></div>\n\n<ng-content select=\"mat-sidenav\"></ng-content>\n\n<ng-content select=\"mat-sidenav-content\">\n</ng-content>\n<mat-sidenav-content *ngIf=\"!_content\" cdkScrollable>\n <ng-content></ng-content>\n</mat-sidenav-content>\n",
833
- host: {
834
- 'class': 'mat-drawer-container mat-sidenav-container',
835
- '[class.mat-drawer-container-explicit-backdrop]': '_backdropOverride',
836
- },
837
- changeDetection: ChangeDetectionStrategy.OnPush,
838
- encapsulation: ViewEncapsulation.None,
839
- providers: [{
840
- provide: MAT_DRAWER_CONTAINER,
841
- useExisting: MatSidenavContainer
842
- }],
843
- styles: [".mat-drawer-container{position:relative;z-index:1;box-sizing:border-box;-webkit-overflow-scrolling:touch;display:block;overflow:hidden}.mat-drawer-container[fullscreen]{top:0;left:0;right:0;bottom:0;position:absolute}.mat-drawer-container[fullscreen].mat-drawer-container-has-open{overflow:hidden}.mat-drawer-container.mat-drawer-container-explicit-backdrop .mat-drawer-side{z-index:3}.mat-drawer-container.ng-animate-disabled .mat-drawer-backdrop,.mat-drawer-container.ng-animate-disabled .mat-drawer-content,.ng-animate-disabled .mat-drawer-container .mat-drawer-backdrop,.ng-animate-disabled .mat-drawer-container .mat-drawer-content{transition:none}.mat-drawer-backdrop{top:0;left:0;right:0;bottom:0;position:absolute;display:block;z-index:3;visibility:hidden}.mat-drawer-backdrop.mat-drawer-shown{visibility:visible}.mat-drawer-transition .mat-drawer-backdrop{transition-duration:400ms;transition-timing-function:cubic-bezier(0.25, 0.8, 0.25, 1);transition-property:background-color,visibility}.cdk-high-contrast-active .mat-drawer-backdrop{opacity:.5}.mat-drawer-content{position:relative;z-index:1;display:block;height:100%;overflow:auto}.mat-drawer-transition .mat-drawer-content{transition-duration:400ms;transition-timing-function:cubic-bezier(0.25, 0.8, 0.25, 1);transition-property:transform,margin-left,margin-right}.mat-drawer{position:relative;z-index:4;display:block;position:absolute;top:0;bottom:0;z-index:3;outline:0;box-sizing:border-box;overflow-y:auto;transform:translate3d(-100%, 0, 0)}.cdk-high-contrast-active .mat-drawer,.cdk-high-contrast-active [dir=rtl] .mat-drawer.mat-drawer-end{border-right:solid 1px currentColor}.cdk-high-contrast-active [dir=rtl] .mat-drawer,.cdk-high-contrast-active .mat-drawer.mat-drawer-end{border-left:solid 1px currentColor;border-right:none}.mat-drawer.mat-drawer-side{z-index:2}.mat-drawer.mat-drawer-end{right:0;transform:translate3d(100%, 0, 0)}[dir=rtl] .mat-drawer{transform:translate3d(100%, 0, 0)}[dir=rtl] .mat-drawer.mat-drawer-end{left:0;right:auto;transform:translate3d(-100%, 0, 0)}.mat-drawer-inner-container{width:100%;height:100%;overflow:auto;-webkit-overflow-scrolling:touch}.mat-sidenav-fixed{position:fixed}\n"]
844
- },] }
845
- ];
846
- MatSidenavContainer.propDecorators = {
847
- _allDrawers: [{ type: ContentChildren, args: [MatSidenav, {
848
- // We need to use `descendants: true`, because Ivy will no longer match
849
- // indirect descendants if it's left as false.
850
- descendants: true
851
- },] }],
852
- _content: [{ type: ContentChild, args: [MatSidenavContent,] }]
853
- };
854
- return MatSidenavContainer;
855
- })();
761
+ }
762
+ MatSidenavContent.decorators = [
763
+ { type: Component, args: [{
764
+ selector: 'mat-sidenav-content',
765
+ template: '<ng-content></ng-content>',
766
+ host: {
767
+ 'class': 'mat-drawer-content mat-sidenav-content',
768
+ '[style.margin-left.px]': '_container._contentMargins.left',
769
+ '[style.margin-right.px]': '_container._contentMargins.right',
770
+ },
771
+ changeDetection: ChangeDetectionStrategy.OnPush,
772
+ encapsulation: ViewEncapsulation.None
773
+ },] }
774
+ ];
775
+ MatSidenavContent.ctorParameters = () => [
776
+ { type: ChangeDetectorRef },
777
+ { type: MatSidenavContainer, decorators: [{ type: Inject, args: [forwardRef(() => MatSidenavContainer),] }] },
778
+ { type: ElementRef },
779
+ { type: ScrollDispatcher },
780
+ { type: NgZone }
781
+ ];
782
+ class MatSidenav extends MatDrawer {
783
+ constructor() {
784
+ super(...arguments);
785
+ this._fixedInViewport = false;
786
+ this._fixedTopGap = 0;
787
+ this._fixedBottomGap = 0;
788
+ }
789
+ /** Whether the sidenav is fixed in the viewport. */
790
+ get fixedInViewport() { return this._fixedInViewport; }
791
+ set fixedInViewport(value) { this._fixedInViewport = coerceBooleanProperty(value); }
792
+ /**
793
+ * The gap between the top of the sidenav and the top of the viewport when the sidenav is in fixed
794
+ * mode.
795
+ */
796
+ get fixedTopGap() { return this._fixedTopGap; }
797
+ set fixedTopGap(value) { this._fixedTopGap = coerceNumberProperty(value); }
798
+ /**
799
+ * The gap between the bottom of the sidenav and the bottom of the viewport when the sidenav is in
800
+ * fixed mode.
801
+ */
802
+ get fixedBottomGap() { return this._fixedBottomGap; }
803
+ set fixedBottomGap(value) { this._fixedBottomGap = coerceNumberProperty(value); }
804
+ }
805
+ MatSidenav.decorators = [
806
+ { type: Component, args: [{
807
+ selector: 'mat-sidenav',
808
+ exportAs: 'matSidenav',
809
+ template: "<div class=\"mat-drawer-inner-container\">\r\n <ng-content></ng-content>\r\n</div>\r\n",
810
+ animations: [matDrawerAnimations.transformDrawer],
811
+ host: {
812
+ 'class': 'mat-drawer mat-sidenav',
813
+ 'tabIndex': '-1',
814
+ // must prevent the browser from aligning text based on value
815
+ '[attr.align]': 'null',
816
+ '[class.mat-drawer-end]': 'position === "end"',
817
+ '[class.mat-drawer-over]': 'mode === "over"',
818
+ '[class.mat-drawer-push]': 'mode === "push"',
819
+ '[class.mat-drawer-side]': 'mode === "side"',
820
+ '[class.mat-drawer-opened]': 'opened',
821
+ '[class.mat-sidenav-fixed]': 'fixedInViewport',
822
+ '[style.top.px]': 'fixedInViewport ? fixedTopGap : null',
823
+ '[style.bottom.px]': 'fixedInViewport ? fixedBottomGap : null',
824
+ },
825
+ changeDetection: ChangeDetectionStrategy.OnPush,
826
+ encapsulation: ViewEncapsulation.None
827
+ },] }
828
+ ];
829
+ MatSidenav.propDecorators = {
830
+ fixedInViewport: [{ type: Input }],
831
+ fixedTopGap: [{ type: Input }],
832
+ fixedBottomGap: [{ type: Input }]
833
+ };
834
+ class MatSidenavContainer extends MatDrawerContainer {
835
+ }
836
+ MatSidenavContainer.decorators = [
837
+ { type: Component, args: [{
838
+ selector: 'mat-sidenav-container',
839
+ exportAs: 'matSidenavContainer',
840
+ template: "<div class=\"mat-drawer-backdrop\" (click)=\"_onBackdropClicked()\" *ngIf=\"hasBackdrop\"\n [class.mat-drawer-shown]=\"_isShowingBackdrop()\"></div>\n\n<ng-content select=\"mat-sidenav\"></ng-content>\n\n<ng-content select=\"mat-sidenav-content\">\n</ng-content>\n<mat-sidenav-content *ngIf=\"!_content\" cdkScrollable>\n <ng-content></ng-content>\n</mat-sidenav-content>\n",
841
+ host: {
842
+ 'class': 'mat-drawer-container mat-sidenav-container',
843
+ '[class.mat-drawer-container-explicit-backdrop]': '_backdropOverride',
844
+ },
845
+ changeDetection: ChangeDetectionStrategy.OnPush,
846
+ encapsulation: ViewEncapsulation.None,
847
+ providers: [{
848
+ provide: MAT_DRAWER_CONTAINER,
849
+ useExisting: MatSidenavContainer
850
+ }],
851
+ styles: [".mat-drawer-container{position:relative;z-index:1;box-sizing:border-box;-webkit-overflow-scrolling:touch;display:block;overflow:hidden}.mat-drawer-container[fullscreen]{top:0;left:0;right:0;bottom:0;position:absolute}.mat-drawer-container[fullscreen].mat-drawer-container-has-open{overflow:hidden}.mat-drawer-container.mat-drawer-container-explicit-backdrop .mat-drawer-side{z-index:3}.mat-drawer-container.ng-animate-disabled .mat-drawer-backdrop,.mat-drawer-container.ng-animate-disabled .mat-drawer-content,.ng-animate-disabled .mat-drawer-container .mat-drawer-backdrop,.ng-animate-disabled .mat-drawer-container .mat-drawer-content{transition:none}.mat-drawer-backdrop{top:0;left:0;right:0;bottom:0;position:absolute;display:block;z-index:3;visibility:hidden}.mat-drawer-backdrop.mat-drawer-shown{visibility:visible}.mat-drawer-transition .mat-drawer-backdrop{transition-duration:400ms;transition-timing-function:cubic-bezier(0.25, 0.8, 0.25, 1);transition-property:background-color,visibility}.cdk-high-contrast-active .mat-drawer-backdrop{opacity:.5}.mat-drawer-content{position:relative;z-index:1;display:block;height:100%;overflow:auto}.mat-drawer-transition .mat-drawer-content{transition-duration:400ms;transition-timing-function:cubic-bezier(0.25, 0.8, 0.25, 1);transition-property:transform,margin-left,margin-right}.mat-drawer{position:relative;z-index:4;display:block;position:absolute;top:0;bottom:0;z-index:3;outline:0;box-sizing:border-box;overflow-y:auto;transform:translate3d(-100%, 0, 0)}.cdk-high-contrast-active .mat-drawer,.cdk-high-contrast-active [dir=rtl] .mat-drawer.mat-drawer-end{border-right:solid 1px currentColor}.cdk-high-contrast-active [dir=rtl] .mat-drawer,.cdk-high-contrast-active .mat-drawer.mat-drawer-end{border-left:solid 1px currentColor;border-right:none}.mat-drawer.mat-drawer-side{z-index:2}.mat-drawer.mat-drawer-end{right:0;transform:translate3d(100%, 0, 0)}[dir=rtl] .mat-drawer{transform:translate3d(100%, 0, 0)}[dir=rtl] .mat-drawer.mat-drawer-end{left:0;right:auto;transform:translate3d(-100%, 0, 0)}.mat-drawer-inner-container{width:100%;height:100%;overflow:auto;-webkit-overflow-scrolling:touch}.mat-sidenav-fixed{position:fixed}\n"]
852
+ },] }
853
+ ];
854
+ MatSidenavContainer.propDecorators = {
855
+ _allDrawers: [{ type: ContentChildren, args: [MatSidenav, {
856
+ // We need to use `descendants: true`, because Ivy will no longer match
857
+ // indirect descendants if it's left as false.
858
+ descendants: true
859
+ },] }],
860
+ _content: [{ type: ContentChild, args: [MatSidenavContent,] }]
861
+ };
856
862
 
857
863
  /**
858
864
  * @license
@@ -861,39 +867,36 @@ let MatSidenavContainer = /** @class */ (() => {
861
867
  * Use of this source code is governed by an MIT-style license that can be
862
868
  * found in the LICENSE file at https://angular.io/license
863
869
  */
864
- let MatSidenavModule = /** @class */ (() => {
865
- class MatSidenavModule {
866
- }
867
- MatSidenavModule.decorators = [
868
- { type: NgModule, args: [{
869
- imports: [
870
- CommonModule,
871
- MatCommonModule,
872
- PlatformModule,
873
- CdkScrollableModule,
874
- ],
875
- exports: [
876
- CdkScrollableModule,
877
- MatCommonModule,
878
- MatDrawer,
879
- MatDrawerContainer,
880
- MatDrawerContent,
881
- MatSidenav,
882
- MatSidenavContainer,
883
- MatSidenavContent,
884
- ],
885
- declarations: [
886
- MatDrawer,
887
- MatDrawerContainer,
888
- MatDrawerContent,
889
- MatSidenav,
890
- MatSidenavContainer,
891
- MatSidenavContent,
892
- ],
893
- },] }
894
- ];
895
- return MatSidenavModule;
896
- })();
870
+ class MatSidenavModule {
871
+ }
872
+ MatSidenavModule.decorators = [
873
+ { type: NgModule, args: [{
874
+ imports: [
875
+ CommonModule,
876
+ MatCommonModule,
877
+ PlatformModule,
878
+ CdkScrollableModule,
879
+ ],
880
+ exports: [
881
+ CdkScrollableModule,
882
+ MatCommonModule,
883
+ MatDrawer,
884
+ MatDrawerContainer,
885
+ MatDrawerContent,
886
+ MatSidenav,
887
+ MatSidenavContainer,
888
+ MatSidenavContent,
889
+ ],
890
+ declarations: [
891
+ MatDrawer,
892
+ MatDrawerContainer,
893
+ MatDrawerContent,
894
+ MatSidenav,
895
+ MatSidenavContainer,
896
+ MatSidenavContent,
897
+ ],
898
+ },] }
899
+ ];
897
900
 
898
901
  /**
899
902
  * @license