@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
@@ -82,22 +82,19 @@ const matExpansionAnimations = {
82
82
  * Expansion panel content that will be rendered lazily
83
83
  * after the panel is opened for the first time.
84
84
  */
85
- let MatExpansionPanelContent = /** @class */ (() => {
86
- class MatExpansionPanelContent {
87
- constructor(_template) {
88
- this._template = _template;
89
- }
85
+ class MatExpansionPanelContent {
86
+ constructor(_template) {
87
+ this._template = _template;
90
88
  }
91
- MatExpansionPanelContent.decorators = [
92
- { type: Directive, args: [{
93
- selector: 'ng-template[matExpansionPanelContent]'
94
- },] }
95
- ];
96
- MatExpansionPanelContent.ctorParameters = () => [
97
- { type: TemplateRef }
98
- ];
99
- return MatExpansionPanelContent;
100
- })();
89
+ }
90
+ MatExpansionPanelContent.decorators = [
91
+ { type: Directive, args: [{
92
+ selector: 'ng-template[matExpansionPanelContent]'
93
+ },] }
94
+ ];
95
+ MatExpansionPanelContent.ctorParameters = () => [
96
+ { type: TemplateRef }
97
+ ];
101
98
 
102
99
  /**
103
100
  * @license
@@ -120,162 +117,156 @@ const ɵ0 = undefined;
120
117
  * This component can be used as a single element to show expandable content, or as one of
121
118
  * multiple children of an element with the MatAccordion directive attached.
122
119
  */
123
- let MatExpansionPanel = /** @class */ (() => {
124
- class MatExpansionPanel extends CdkAccordionItem {
125
- constructor(accordion, _changeDetectorRef, _uniqueSelectionDispatcher, _viewContainerRef, _document, _animationMode, defaultOptions) {
126
- super(accordion, _changeDetectorRef, _uniqueSelectionDispatcher);
127
- this._viewContainerRef = _viewContainerRef;
128
- this._animationMode = _animationMode;
129
- this._hideToggle = false;
130
- /** An event emitted after the body's expansion animation happens. */
131
- this.afterExpand = new EventEmitter();
132
- /** An event emitted after the body's collapse animation happens. */
133
- this.afterCollapse = new EventEmitter();
134
- /** Stream that emits for changes in `@Input` properties. */
135
- this._inputChanges = new Subject();
136
- /** ID for the associated header element. Used for a11y labelling. */
137
- this._headerId = `mat-expansion-panel-header-${uniqueId++}`;
138
- /** Stream of body animation done events. */
139
- this._bodyAnimationDone = new Subject();
140
- this.accordion = accordion;
141
- this._document = _document;
142
- // We need a Subject with distinctUntilChanged, because the `done` event
143
- // fires twice on some browsers. See https://github.com/angular/angular/issues/24084
144
- this._bodyAnimationDone.pipe(distinctUntilChanged((x, y) => {
145
- return x.fromState === y.fromState && x.toState === y.toState;
146
- })).subscribe(event => {
147
- if (event.fromState !== 'void') {
148
- if (event.toState === 'expanded') {
149
- this.afterExpand.emit();
150
- }
151
- else if (event.toState === 'collapsed') {
152
- this.afterCollapse.emit();
153
- }
120
+ class MatExpansionPanel extends CdkAccordionItem {
121
+ constructor(accordion, _changeDetectorRef, _uniqueSelectionDispatcher, _viewContainerRef, _document, _animationMode, defaultOptions) {
122
+ super(accordion, _changeDetectorRef, _uniqueSelectionDispatcher);
123
+ this._viewContainerRef = _viewContainerRef;
124
+ this._animationMode = _animationMode;
125
+ this._hideToggle = false;
126
+ /** An event emitted after the body's expansion animation happens. */
127
+ this.afterExpand = new EventEmitter();
128
+ /** An event emitted after the body's collapse animation happens. */
129
+ this.afterCollapse = new EventEmitter();
130
+ /** Stream that emits for changes in `@Input` properties. */
131
+ this._inputChanges = new Subject();
132
+ /** ID for the associated header element. Used for a11y labelling. */
133
+ this._headerId = `mat-expansion-panel-header-${uniqueId++}`;
134
+ /** Stream of body animation done events. */
135
+ this._bodyAnimationDone = new Subject();
136
+ this.accordion = accordion;
137
+ this._document = _document;
138
+ // We need a Subject with distinctUntilChanged, because the `done` event
139
+ // fires twice on some browsers. See https://github.com/angular/angular/issues/24084
140
+ this._bodyAnimationDone.pipe(distinctUntilChanged((x, y) => {
141
+ return x.fromState === y.fromState && x.toState === y.toState;
142
+ })).subscribe(event => {
143
+ if (event.fromState !== 'void') {
144
+ if (event.toState === 'expanded') {
145
+ this.afterExpand.emit();
146
+ }
147
+ else if (event.toState === 'collapsed') {
148
+ this.afterCollapse.emit();
154
149
  }
155
- });
156
- if (defaultOptions) {
157
- this.hideToggle = defaultOptions.hideToggle;
158
- }
159
- }
160
- /** Whether the toggle indicator should be hidden. */
161
- get hideToggle() {
162
- return this._hideToggle || (this.accordion && this.accordion.hideToggle);
163
- }
164
- set hideToggle(value) {
165
- this._hideToggle = coerceBooleanProperty(value);
166
- }
167
- /** The position of the expansion indicator. */
168
- get togglePosition() {
169
- return this._togglePosition || (this.accordion && this.accordion.togglePosition);
170
- }
171
- set togglePosition(value) {
172
- this._togglePosition = value;
173
- }
174
- /** Determines whether the expansion panel should have spacing between it and its siblings. */
175
- _hasSpacing() {
176
- if (this.accordion) {
177
- return this.expanded && this.accordion.displayMode === 'default';
178
- }
179
- return false;
180
- }
181
- /** Gets the expanded state string. */
182
- _getExpandedState() {
183
- return this.expanded ? 'expanded' : 'collapsed';
184
- }
185
- /** Toggles the expanded state of the expansion panel. */
186
- toggle() {
187
- this.expanded = !this.expanded;
188
- }
189
- /** Sets the expanded state of the expansion panel to false. */
190
- close() {
191
- this.expanded = false;
192
- }
193
- /** Sets the expanded state of the expansion panel to true. */
194
- open() {
195
- this.expanded = true;
196
- }
197
- ngAfterContentInit() {
198
- if (this._lazyContent) {
199
- // Render the content as soon as the panel becomes open.
200
- this.opened.pipe(startWith(null), filter(() => this.expanded && !this._portal), take(1)).subscribe(() => {
201
- this._portal = new TemplatePortal(this._lazyContent._template, this._viewContainerRef);
202
- });
203
150
  }
151
+ });
152
+ if (defaultOptions) {
153
+ this.hideToggle = defaultOptions.hideToggle;
204
154
  }
205
- ngOnChanges(changes) {
206
- this._inputChanges.next(changes);
207
- }
208
- ngOnDestroy() {
209
- super.ngOnDestroy();
210
- this._bodyAnimationDone.complete();
211
- this._inputChanges.complete();
155
+ }
156
+ /** Whether the toggle indicator should be hidden. */
157
+ get hideToggle() {
158
+ return this._hideToggle || (this.accordion && this.accordion.hideToggle);
159
+ }
160
+ set hideToggle(value) {
161
+ this._hideToggle = coerceBooleanProperty(value);
162
+ }
163
+ /** The position of the expansion indicator. */
164
+ get togglePosition() {
165
+ return this._togglePosition || (this.accordion && this.accordion.togglePosition);
166
+ }
167
+ set togglePosition(value) {
168
+ this._togglePosition = value;
169
+ }
170
+ /** Determines whether the expansion panel should have spacing between it and its siblings. */
171
+ _hasSpacing() {
172
+ if (this.accordion) {
173
+ return this.expanded && this.accordion.displayMode === 'default';
212
174
  }
213
- /** Checks whether the expansion panel's content contains the currently-focused element. */
214
- _containsFocus() {
215
- if (this._body) {
216
- const focusedElement = this._document.activeElement;
217
- const bodyElement = this._body.nativeElement;
218
- return focusedElement === bodyElement || bodyElement.contains(focusedElement);
219
- }
220
- return false;
175
+ return false;
176
+ }
177
+ /** Gets the expanded state string. */
178
+ _getExpandedState() {
179
+ return this.expanded ? 'expanded' : 'collapsed';
180
+ }
181
+ /** Toggles the expanded state of the expansion panel. */
182
+ toggle() {
183
+ this.expanded = !this.expanded;
184
+ }
185
+ /** Sets the expanded state of the expansion panel to false. */
186
+ close() {
187
+ this.expanded = false;
188
+ }
189
+ /** Sets the expanded state of the expansion panel to true. */
190
+ open() {
191
+ this.expanded = true;
192
+ }
193
+ ngAfterContentInit() {
194
+ if (this._lazyContent) {
195
+ // Render the content as soon as the panel becomes open.
196
+ this.opened.pipe(startWith(null), filter(() => this.expanded && !this._portal), take(1)).subscribe(() => {
197
+ this._portal = new TemplatePortal(this._lazyContent._template, this._viewContainerRef);
198
+ });
221
199
  }
222
200
  }
223
- MatExpansionPanel.decorators = [
224
- { type: Component, args: [{
225
- selector: 'mat-expansion-panel',
226
- exportAs: 'matExpansionPanel',
227
- template: "<ng-content select=\"mat-expansion-panel-header\"></ng-content>\n<div class=\"mat-expansion-panel-content\"\n role=\"region\"\n [@bodyExpansion]=\"_getExpandedState()\"\n (@bodyExpansion.done)=\"_bodyAnimationDone.next($event)\"\n [attr.aria-labelledby]=\"_headerId\"\n [id]=\"id\"\n #body>\n <div class=\"mat-expansion-panel-body\">\n <ng-content></ng-content>\n <ng-template [cdkPortalOutlet]=\"_portal\"></ng-template>\n </div>\n <ng-content select=\"mat-action-row\"></ng-content>\n</div>\n",
228
- encapsulation: ViewEncapsulation.None,
229
- changeDetection: ChangeDetectionStrategy.OnPush,
230
- inputs: ['disabled', 'expanded'],
231
- outputs: ['opened', 'closed', 'expandedChange'],
232
- animations: [matExpansionAnimations.bodyExpansion],
233
- providers: [
234
- // Provide MatAccordion as undefined to prevent nested expansion panels from registering
235
- // to the same accordion.
236
- { provide: MAT_ACCORDION, useValue: ɵ0 },
237
- ],
238
- host: {
239
- 'class': 'mat-expansion-panel',
240
- '[class.mat-expanded]': 'expanded',
241
- '[class._mat-animation-noopable]': '_animationMode === "NoopAnimations"',
242
- '[class.mat-expansion-panel-spacing]': '_hasSpacing()',
243
- },
244
- styles: [".mat-expansion-panel{box-sizing:content-box;display:block;margin:0;border-radius:4px;overflow:hidden;transition:margin 225ms cubic-bezier(0.4, 0, 0.2, 1),box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);position:relative}.mat-accordion .mat-expansion-panel:not(.mat-expanded),.mat-accordion .mat-expansion-panel:not(.mat-expansion-panel-spacing){border-radius:0}.mat-accordion .mat-expansion-panel:first-of-type{border-top-right-radius:4px;border-top-left-radius:4px}.mat-accordion .mat-expansion-panel:last-of-type{border-bottom-right-radius:4px;border-bottom-left-radius:4px}.cdk-high-contrast-active .mat-expansion-panel{outline:solid 1px}.mat-expansion-panel.ng-animate-disabled,.ng-animate-disabled .mat-expansion-panel,.mat-expansion-panel._mat-animation-noopable{transition:none}.mat-expansion-panel-content{display:flex;flex-direction:column;overflow:visible}.mat-expansion-panel-body{padding:0 24px 16px}.mat-expansion-panel-spacing{margin:16px 0}.mat-accordion>.mat-expansion-panel-spacing:first-child,.mat-accordion>*:first-child:not(.mat-expansion-panel) .mat-expansion-panel-spacing{margin-top:0}.mat-accordion>.mat-expansion-panel-spacing:last-child,.mat-accordion>*:last-child:not(.mat-expansion-panel) .mat-expansion-panel-spacing{margin-bottom:0}.mat-action-row{border-top-style:solid;border-top-width:1px;display:flex;flex-direction:row;justify-content:flex-end;padding:16px 8px 16px 24px}.mat-action-row button.mat-button-base,.mat-action-row button.mat-mdc-button-base{margin-left:8px}[dir=rtl] .mat-action-row button.mat-button-base,[dir=rtl] .mat-action-row button.mat-mdc-button-base{margin-left:0;margin-right:8px}\n"]
245
- },] }
246
- ];
247
- MatExpansionPanel.ctorParameters = () => [
248
- { type: undefined, decorators: [{ type: Optional }, { type: SkipSelf }, { type: Inject, args: [MAT_ACCORDION,] }] },
249
- { type: ChangeDetectorRef },
250
- { type: UniqueSelectionDispatcher },
251
- { type: ViewContainerRef },
252
- { type: undefined, decorators: [{ type: Inject, args: [DOCUMENT,] }] },
253
- { type: String, decorators: [{ type: Optional }, { type: Inject, args: [ANIMATION_MODULE_TYPE,] }] },
254
- { type: undefined, decorators: [{ type: Inject, args: [MAT_EXPANSION_PANEL_DEFAULT_OPTIONS,] }, { type: Optional }] }
255
- ];
256
- MatExpansionPanel.propDecorators = {
257
- hideToggle: [{ type: Input }],
258
- togglePosition: [{ type: Input }],
259
- afterExpand: [{ type: Output }],
260
- afterCollapse: [{ type: Output }],
261
- _lazyContent: [{ type: ContentChild, args: [MatExpansionPanelContent,] }],
262
- _body: [{ type: ViewChild, args: ['body',] }]
263
- };
264
- return MatExpansionPanel;
265
- })();
266
- let MatExpansionPanelActionRow = /** @class */ (() => {
267
- class MatExpansionPanelActionRow {
268
- }
269
- MatExpansionPanelActionRow.decorators = [
270
- { type: Directive, args: [{
271
- selector: 'mat-action-row',
272
- host: {
273
- class: 'mat-action-row'
274
- }
275
- },] }
276
- ];
277
- return MatExpansionPanelActionRow;
278
- })();
201
+ ngOnChanges(changes) {
202
+ this._inputChanges.next(changes);
203
+ }
204
+ ngOnDestroy() {
205
+ super.ngOnDestroy();
206
+ this._bodyAnimationDone.complete();
207
+ this._inputChanges.complete();
208
+ }
209
+ /** Checks whether the expansion panel's content contains the currently-focused element. */
210
+ _containsFocus() {
211
+ if (this._body) {
212
+ const focusedElement = this._document.activeElement;
213
+ const bodyElement = this._body.nativeElement;
214
+ return focusedElement === bodyElement || bodyElement.contains(focusedElement);
215
+ }
216
+ return false;
217
+ }
218
+ }
219
+ MatExpansionPanel.decorators = [
220
+ { type: Component, args: [{
221
+ selector: 'mat-expansion-panel',
222
+ exportAs: 'matExpansionPanel',
223
+ template: "<ng-content select=\"mat-expansion-panel-header\"></ng-content>\n<div class=\"mat-expansion-panel-content\"\n role=\"region\"\n [@bodyExpansion]=\"_getExpandedState()\"\n (@bodyExpansion.done)=\"_bodyAnimationDone.next($event)\"\n [attr.aria-labelledby]=\"_headerId\"\n [id]=\"id\"\n #body>\n <div class=\"mat-expansion-panel-body\">\n <ng-content></ng-content>\n <ng-template [cdkPortalOutlet]=\"_portal\"></ng-template>\n </div>\n <ng-content select=\"mat-action-row\"></ng-content>\n</div>\n",
224
+ encapsulation: ViewEncapsulation.None,
225
+ changeDetection: ChangeDetectionStrategy.OnPush,
226
+ inputs: ['disabled', 'expanded'],
227
+ outputs: ['opened', 'closed', 'expandedChange'],
228
+ animations: [matExpansionAnimations.bodyExpansion],
229
+ providers: [
230
+ // Provide MatAccordion as undefined to prevent nested expansion panels from registering
231
+ // to the same accordion.
232
+ { provide: MAT_ACCORDION, useValue: ɵ0 },
233
+ ],
234
+ host: {
235
+ 'class': 'mat-expansion-panel',
236
+ '[class.mat-expanded]': 'expanded',
237
+ '[class._mat-animation-noopable]': '_animationMode === "NoopAnimations"',
238
+ '[class.mat-expansion-panel-spacing]': '_hasSpacing()',
239
+ },
240
+ styles: [".mat-expansion-panel{box-sizing:content-box;display:block;margin:0;border-radius:4px;overflow:hidden;transition:margin 225ms cubic-bezier(0.4, 0, 0.2, 1),box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);position:relative}.mat-accordion .mat-expansion-panel:not(.mat-expanded),.mat-accordion .mat-expansion-panel:not(.mat-expansion-panel-spacing){border-radius:0}.mat-accordion .mat-expansion-panel:first-of-type{border-top-right-radius:4px;border-top-left-radius:4px}.mat-accordion .mat-expansion-panel:last-of-type{border-bottom-right-radius:4px;border-bottom-left-radius:4px}.cdk-high-contrast-active .mat-expansion-panel{outline:solid 1px}.mat-expansion-panel.ng-animate-disabled,.ng-animate-disabled .mat-expansion-panel,.mat-expansion-panel._mat-animation-noopable{transition:none}.mat-expansion-panel-content{display:flex;flex-direction:column;overflow:visible}.mat-expansion-panel-body{padding:0 24px 16px}.mat-expansion-panel-spacing{margin:16px 0}.mat-accordion>.mat-expansion-panel-spacing:first-child,.mat-accordion>*:first-child:not(.mat-expansion-panel) .mat-expansion-panel-spacing{margin-top:0}.mat-accordion>.mat-expansion-panel-spacing:last-child,.mat-accordion>*:last-child:not(.mat-expansion-panel) .mat-expansion-panel-spacing{margin-bottom:0}.mat-action-row{border-top-style:solid;border-top-width:1px;display:flex;flex-direction:row;justify-content:flex-end;padding:16px 8px 16px 24px}.mat-action-row button.mat-button-base,.mat-action-row button.mat-mdc-button-base{margin-left:8px}[dir=rtl] .mat-action-row button.mat-button-base,[dir=rtl] .mat-action-row button.mat-mdc-button-base{margin-left:0;margin-right:8px}\n"]
241
+ },] }
242
+ ];
243
+ MatExpansionPanel.ctorParameters = () => [
244
+ { type: undefined, decorators: [{ type: Optional }, { type: SkipSelf }, { type: Inject, args: [MAT_ACCORDION,] }] },
245
+ { type: ChangeDetectorRef },
246
+ { type: UniqueSelectionDispatcher },
247
+ { type: ViewContainerRef },
248
+ { type: undefined, decorators: [{ type: Inject, args: [DOCUMENT,] }] },
249
+ { type: String, decorators: [{ type: Optional }, { type: Inject, args: [ANIMATION_MODULE_TYPE,] }] },
250
+ { type: undefined, decorators: [{ type: Inject, args: [MAT_EXPANSION_PANEL_DEFAULT_OPTIONS,] }, { type: Optional }] }
251
+ ];
252
+ MatExpansionPanel.propDecorators = {
253
+ hideToggle: [{ type: Input }],
254
+ togglePosition: [{ type: Input }],
255
+ afterExpand: [{ type: Output }],
256
+ afterCollapse: [{ type: Output }],
257
+ _lazyContent: [{ type: ContentChild, args: [MatExpansionPanelContent,] }],
258
+ _body: [{ type: ViewChild, args: ['body',] }]
259
+ };
260
+ class MatExpansionPanelActionRow {
261
+ }
262
+ MatExpansionPanelActionRow.decorators = [
263
+ { type: Directive, args: [{
264
+ selector: 'mat-action-row',
265
+ host: {
266
+ class: 'mat-action-row'
267
+ }
268
+ },] }
269
+ ];
279
270
 
280
271
  /**
281
272
  * @license
@@ -289,199 +280,190 @@ let MatExpansionPanelActionRow = /** @class */ (() => {
289
280
  *
290
281
  * This component corresponds to the header element of an `<mat-expansion-panel>`.
291
282
  */
292
- let MatExpansionPanelHeader = /** @class */ (() => {
293
- class MatExpansionPanelHeader {
294
- constructor(panel, _element, _focusMonitor, _changeDetectorRef, defaultOptions, _animationMode) {
295
- this.panel = panel;
296
- this._element = _element;
297
- this._focusMonitor = _focusMonitor;
298
- this._changeDetectorRef = _changeDetectorRef;
299
- this._animationMode = _animationMode;
300
- this._parentChangeSubscription = Subscription.EMPTY;
301
- const accordionHideToggleChange = panel.accordion ?
302
- panel.accordion._stateChanges.pipe(filter(changes => !!(changes['hideToggle'] || changes['togglePosition']))) :
303
- EMPTY;
304
- // Since the toggle state depends on an @Input on the panel, we
305
- // need to subscribe and trigger change detection manually.
306
- this._parentChangeSubscription =
307
- merge(panel.opened, panel.closed, accordionHideToggleChange, panel._inputChanges.pipe(filter(changes => {
308
- return !!(changes['hideToggle'] ||
309
- changes['disabled'] ||
310
- changes['togglePosition']);
311
- })))
312
- .subscribe(() => this._changeDetectorRef.markForCheck());
313
- // Avoids focus being lost if the panel contained the focused element and was closed.
314
- panel.closed
315
- .pipe(filter(() => panel._containsFocus()))
316
- .subscribe(() => _focusMonitor.focusVia(_element, 'program'));
317
- if (defaultOptions) {
318
- this.expandedHeight = defaultOptions.expandedHeight;
319
- this.collapsedHeight = defaultOptions.collapsedHeight;
320
- }
321
- }
322
- /**
323
- * Whether the associated panel is disabled. Implemented as a part of `FocusableOption`.
324
- * @docs-private
325
- */
326
- get disabled() {
327
- return this.panel.disabled;
328
- }
329
- /** Toggles the expanded state of the panel. */
330
- _toggle() {
331
- if (!this.disabled) {
332
- this.panel.toggle();
333
- }
334
- }
335
- /** Gets whether the panel is expanded. */
336
- _isExpanded() {
337
- return this.panel.expanded;
338
- }
339
- /** Gets the expanded state string of the panel. */
340
- _getExpandedState() {
341
- return this.panel._getExpandedState();
342
- }
343
- /** Gets the panel id. */
344
- _getPanelId() {
345
- return this.panel.id;
346
- }
347
- /** Gets the toggle position for the header. */
348
- _getTogglePosition() {
349
- return this.panel.togglePosition;
350
- }
351
- /** Gets whether the expand indicator should be shown. */
352
- _showToggle() {
353
- return !this.panel.hideToggle && !this.panel.disabled;
354
- }
355
- /**
356
- * Gets the current height of the header. Null if no custom height has been
357
- * specified, and if the default height from the stylesheet should be used.
358
- */
359
- _getHeaderHeight() {
360
- const isExpanded = this._isExpanded();
361
- if (isExpanded && this.expandedHeight) {
362
- return this.expandedHeight;
363
- }
364
- else if (!isExpanded && this.collapsedHeight) {
365
- return this.collapsedHeight;
366
- }
367
- return null;
283
+ class MatExpansionPanelHeader {
284
+ constructor(panel, _element, _focusMonitor, _changeDetectorRef, defaultOptions, _animationMode) {
285
+ this.panel = panel;
286
+ this._element = _element;
287
+ this._focusMonitor = _focusMonitor;
288
+ this._changeDetectorRef = _changeDetectorRef;
289
+ this._animationMode = _animationMode;
290
+ this._parentChangeSubscription = Subscription.EMPTY;
291
+ const accordionHideToggleChange = panel.accordion ?
292
+ panel.accordion._stateChanges.pipe(filter(changes => !!(changes['hideToggle'] || changes['togglePosition']))) :
293
+ EMPTY;
294
+ // Since the toggle state depends on an @Input on the panel, we
295
+ // need to subscribe and trigger change detection manually.
296
+ this._parentChangeSubscription =
297
+ merge(panel.opened, panel.closed, accordionHideToggleChange, panel._inputChanges.pipe(filter(changes => {
298
+ return !!(changes['hideToggle'] ||
299
+ changes['disabled'] ||
300
+ changes['togglePosition']);
301
+ })))
302
+ .subscribe(() => this._changeDetectorRef.markForCheck());
303
+ // Avoids focus being lost if the panel contained the focused element and was closed.
304
+ panel.closed
305
+ .pipe(filter(() => panel._containsFocus()))
306
+ .subscribe(() => _focusMonitor.focusVia(_element, 'program'));
307
+ if (defaultOptions) {
308
+ this.expandedHeight = defaultOptions.expandedHeight;
309
+ this.collapsedHeight = defaultOptions.collapsedHeight;
368
310
  }
369
- /** Handle keydown event calling to toggle() if appropriate. */
370
- _keydown(event) {
371
- switch (event.keyCode) {
372
- // Toggle for space and enter keys.
373
- case SPACE:
374
- case ENTER:
375
- if (!hasModifierKey(event)) {
376
- event.preventDefault();
377
- this._toggle();
378
- }
379
- break;
380
- default:
381
- if (this.panel.accordion) {
382
- this.panel.accordion._handleHeaderKeydown(event);
383
- }
384
- return;
385
- }
386
- }
387
- /**
388
- * Focuses the panel header. Implemented as a part of `FocusableOption`.
389
- * @param origin Origin of the action that triggered the focus.
390
- * @docs-private
391
- */
392
- focus(origin = 'program', options) {
393
- this._focusMonitor.focusVia(this._element, origin, options);
311
+ }
312
+ /**
313
+ * Whether the associated panel is disabled. Implemented as a part of `FocusableOption`.
314
+ * @docs-private
315
+ */
316
+ get disabled() {
317
+ return this.panel.disabled;
318
+ }
319
+ /** Toggles the expanded state of the panel. */
320
+ _toggle() {
321
+ if (!this.disabled) {
322
+ this.panel.toggle();
394
323
  }
395
- ngAfterViewInit() {
396
- this._focusMonitor.monitor(this._element).subscribe(origin => {
397
- if (origin && this.panel.accordion) {
398
- this.panel.accordion._handleHeaderFocus(this);
324
+ }
325
+ /** Gets whether the panel is expanded. */
326
+ _isExpanded() {
327
+ return this.panel.expanded;
328
+ }
329
+ /** Gets the expanded state string of the panel. */
330
+ _getExpandedState() {
331
+ return this.panel._getExpandedState();
332
+ }
333
+ /** Gets the panel id. */
334
+ _getPanelId() {
335
+ return this.panel.id;
336
+ }
337
+ /** Gets the toggle position for the header. */
338
+ _getTogglePosition() {
339
+ return this.panel.togglePosition;
340
+ }
341
+ /** Gets whether the expand indicator should be shown. */
342
+ _showToggle() {
343
+ return !this.panel.hideToggle && !this.panel.disabled;
344
+ }
345
+ /**
346
+ * Gets the current height of the header. Null if no custom height has been
347
+ * specified, and if the default height from the stylesheet should be used.
348
+ */
349
+ _getHeaderHeight() {
350
+ const isExpanded = this._isExpanded();
351
+ if (isExpanded && this.expandedHeight) {
352
+ return this.expandedHeight;
353
+ }
354
+ else if (!isExpanded && this.collapsedHeight) {
355
+ return this.collapsedHeight;
356
+ }
357
+ return null;
358
+ }
359
+ /** Handle keydown event calling to toggle() if appropriate. */
360
+ _keydown(event) {
361
+ switch (event.keyCode) {
362
+ // Toggle for space and enter keys.
363
+ case SPACE:
364
+ case ENTER:
365
+ if (!hasModifierKey(event)) {
366
+ event.preventDefault();
367
+ this._toggle();
399
368
  }
400
- });
401
- }
402
- ngOnDestroy() {
403
- this._parentChangeSubscription.unsubscribe();
404
- this._focusMonitor.stopMonitoring(this._element);
369
+ break;
370
+ default:
371
+ if (this.panel.accordion) {
372
+ this.panel.accordion._handleHeaderKeydown(event);
373
+ }
374
+ return;
405
375
  }
406
376
  }
407
- MatExpansionPanelHeader.decorators = [
408
- { type: Component, args: [{
409
- selector: 'mat-expansion-panel-header',
410
- template: "<span class=\"mat-content\">\n <ng-content select=\"mat-panel-title\"></ng-content>\n <ng-content select=\"mat-panel-description\"></ng-content>\n <ng-content></ng-content>\n</span>\n<span [@indicatorRotate]=\"_getExpandedState()\" *ngIf=\"_showToggle()\"\n class=\"mat-expansion-indicator\"></span>\n",
411
- encapsulation: ViewEncapsulation.None,
412
- changeDetection: ChangeDetectionStrategy.OnPush,
413
- animations: [
414
- matExpansionAnimations.indicatorRotate,
415
- ],
416
- host: {
417
- 'class': 'mat-expansion-panel-header mat-focus-indicator',
418
- 'role': 'button',
419
- '[attr.id]': 'panel._headerId',
420
- '[attr.tabindex]': 'disabled ? -1 : 0',
421
- '[attr.aria-controls]': '_getPanelId()',
422
- '[attr.aria-expanded]': '_isExpanded()',
423
- '[attr.aria-disabled]': 'panel.disabled',
424
- '[class.mat-expanded]': '_isExpanded()',
425
- '[class.mat-expansion-toggle-indicator-after]': `_getTogglePosition() === 'after'`,
426
- '[class.mat-expansion-toggle-indicator-before]': `_getTogglePosition() === 'before'`,
427
- '[class._mat-animation-noopable]': '_animationMode === "NoopAnimations"',
428
- '[style.height]': '_getHeaderHeight()',
429
- '(click)': '_toggle()',
430
- '(keydown)': '_keydown($event)',
431
- },
432
- styles: [".mat-expansion-panel-header{display:flex;flex-direction:row;align-items:center;padding:0 24px;border-radius:inherit;transition:height 225ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-expansion-panel-header._mat-animation-noopable{transition:none}.mat-expansion-panel-header:focus,.mat-expansion-panel-header:hover{outline:none}.mat-expansion-panel-header.mat-expanded:focus,.mat-expansion-panel-header.mat-expanded:hover{background:inherit}.mat-expansion-panel-header:not([aria-disabled=true]){cursor:pointer}.mat-expansion-panel-header.mat-expansion-toggle-indicator-before{flex-direction:row-reverse}.mat-expansion-panel-header.mat-expansion-toggle-indicator-before .mat-expansion-indicator{margin:0 16px 0 0}[dir=rtl] .mat-expansion-panel-header.mat-expansion-toggle-indicator-before .mat-expansion-indicator{margin:0 0 0 16px}.mat-content{display:flex;flex:1;flex-direction:row;overflow:hidden}.mat-expansion-panel-header-title,.mat-expansion-panel-header-description{display:flex;flex-grow:1;margin-right:16px}[dir=rtl] .mat-expansion-panel-header-title,[dir=rtl] .mat-expansion-panel-header-description{margin-right:0;margin-left:16px}.mat-expansion-panel-header-description{flex-grow:2}.mat-expansion-indicator::after{border-style:solid;border-width:0 2px 2px 0;content:\"\";display:inline-block;padding:3px;transform:rotate(45deg);vertical-align:middle}\n"]
433
- },] }
434
- ];
435
- MatExpansionPanelHeader.ctorParameters = () => [
436
- { type: MatExpansionPanel, decorators: [{ type: Host }] },
437
- { type: ElementRef },
438
- { type: FocusMonitor },
439
- { type: ChangeDetectorRef },
440
- { type: undefined, decorators: [{ type: Inject, args: [MAT_EXPANSION_PANEL_DEFAULT_OPTIONS,] }, { type: Optional }] },
441
- { type: String, decorators: [{ type: Optional }, { type: Inject, args: [ANIMATION_MODULE_TYPE,] }] }
442
- ];
443
- MatExpansionPanelHeader.propDecorators = {
444
- expandedHeight: [{ type: Input }],
445
- collapsedHeight: [{ type: Input }]
446
- };
447
- return MatExpansionPanelHeader;
448
- })();
377
+ /**
378
+ * Focuses the panel header. Implemented as a part of `FocusableOption`.
379
+ * @param origin Origin of the action that triggered the focus.
380
+ * @docs-private
381
+ */
382
+ focus(origin = 'program', options) {
383
+ this._focusMonitor.focusVia(this._element, origin, options);
384
+ }
385
+ ngAfterViewInit() {
386
+ this._focusMonitor.monitor(this._element).subscribe(origin => {
387
+ if (origin && this.panel.accordion) {
388
+ this.panel.accordion._handleHeaderFocus(this);
389
+ }
390
+ });
391
+ }
392
+ ngOnDestroy() {
393
+ this._parentChangeSubscription.unsubscribe();
394
+ this._focusMonitor.stopMonitoring(this._element);
395
+ }
396
+ }
397
+ MatExpansionPanelHeader.decorators = [
398
+ { type: Component, args: [{
399
+ selector: 'mat-expansion-panel-header',
400
+ template: "<span class=\"mat-content\">\n <ng-content select=\"mat-panel-title\"></ng-content>\n <ng-content select=\"mat-panel-description\"></ng-content>\n <ng-content></ng-content>\n</span>\n<span [@indicatorRotate]=\"_getExpandedState()\" *ngIf=\"_showToggle()\"\n class=\"mat-expansion-indicator\"></span>\n",
401
+ encapsulation: ViewEncapsulation.None,
402
+ changeDetection: ChangeDetectionStrategy.OnPush,
403
+ animations: [
404
+ matExpansionAnimations.indicatorRotate,
405
+ ],
406
+ host: {
407
+ 'class': 'mat-expansion-panel-header mat-focus-indicator',
408
+ 'role': 'button',
409
+ '[attr.id]': 'panel._headerId',
410
+ '[attr.tabindex]': 'disabled ? -1 : 0',
411
+ '[attr.aria-controls]': '_getPanelId()',
412
+ '[attr.aria-expanded]': '_isExpanded()',
413
+ '[attr.aria-disabled]': 'panel.disabled',
414
+ '[class.mat-expanded]': '_isExpanded()',
415
+ '[class.mat-expansion-toggle-indicator-after]': `_getTogglePosition() === 'after'`,
416
+ '[class.mat-expansion-toggle-indicator-before]': `_getTogglePosition() === 'before'`,
417
+ '[class._mat-animation-noopable]': '_animationMode === "NoopAnimations"',
418
+ '[style.height]': '_getHeaderHeight()',
419
+ '(click)': '_toggle()',
420
+ '(keydown)': '_keydown($event)',
421
+ },
422
+ styles: [".mat-expansion-panel-header{display:flex;flex-direction:row;align-items:center;padding:0 24px;border-radius:inherit;transition:height 225ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-expansion-panel-header._mat-animation-noopable{transition:none}.mat-expansion-panel-header:focus,.mat-expansion-panel-header:hover{outline:none}.mat-expansion-panel-header.mat-expanded:focus,.mat-expansion-panel-header.mat-expanded:hover{background:inherit}.mat-expansion-panel-header:not([aria-disabled=true]){cursor:pointer}.mat-expansion-panel-header.mat-expansion-toggle-indicator-before{flex-direction:row-reverse}.mat-expansion-panel-header.mat-expansion-toggle-indicator-before .mat-expansion-indicator{margin:0 16px 0 0}[dir=rtl] .mat-expansion-panel-header.mat-expansion-toggle-indicator-before .mat-expansion-indicator{margin:0 0 0 16px}.mat-content{display:flex;flex:1;flex-direction:row;overflow:hidden}.mat-expansion-panel-header-title,.mat-expansion-panel-header-description{display:flex;flex-grow:1;margin-right:16px}[dir=rtl] .mat-expansion-panel-header-title,[dir=rtl] .mat-expansion-panel-header-description{margin-right:0;margin-left:16px}.mat-expansion-panel-header-description{flex-grow:2}.mat-expansion-indicator::after{border-style:solid;border-width:0 2px 2px 0;content:\"\";display:inline-block;padding:3px;transform:rotate(45deg);vertical-align:middle}\n"]
423
+ },] }
424
+ ];
425
+ MatExpansionPanelHeader.ctorParameters = () => [
426
+ { type: MatExpansionPanel, decorators: [{ type: Host }] },
427
+ { type: ElementRef },
428
+ { type: FocusMonitor },
429
+ { type: ChangeDetectorRef },
430
+ { type: undefined, decorators: [{ type: Inject, args: [MAT_EXPANSION_PANEL_DEFAULT_OPTIONS,] }, { type: Optional }] },
431
+ { type: String, decorators: [{ type: Optional }, { type: Inject, args: [ANIMATION_MODULE_TYPE,] }] }
432
+ ];
433
+ MatExpansionPanelHeader.propDecorators = {
434
+ expandedHeight: [{ type: Input }],
435
+ collapsedHeight: [{ type: Input }]
436
+ };
449
437
  /**
450
438
  * `<mat-panel-description>`
451
439
  *
452
440
  * This directive is to be used inside of the MatExpansionPanelHeader component.
453
441
  */
454
- let MatExpansionPanelDescription = /** @class */ (() => {
455
- class MatExpansionPanelDescription {
456
- }
457
- MatExpansionPanelDescription.decorators = [
458
- { type: Directive, args: [{
459
- selector: 'mat-panel-description',
460
- host: {
461
- class: 'mat-expansion-panel-header-description'
462
- }
463
- },] }
464
- ];
465
- return MatExpansionPanelDescription;
466
- })();
442
+ class MatExpansionPanelDescription {
443
+ }
444
+ MatExpansionPanelDescription.decorators = [
445
+ { type: Directive, args: [{
446
+ selector: 'mat-panel-description',
447
+ host: {
448
+ class: 'mat-expansion-panel-header-description'
449
+ }
450
+ },] }
451
+ ];
467
452
  /**
468
453
  * `<mat-panel-title>`
469
454
  *
470
455
  * This directive is to be used inside of the MatExpansionPanelHeader component.
471
456
  */
472
- let MatExpansionPanelTitle = /** @class */ (() => {
473
- class MatExpansionPanelTitle {
474
- }
475
- MatExpansionPanelTitle.decorators = [
476
- { type: Directive, args: [{
477
- selector: 'mat-panel-title',
478
- host: {
479
- class: 'mat-expansion-panel-header-title'
480
- }
481
- },] }
482
- ];
483
- return MatExpansionPanelTitle;
484
- })();
457
+ class MatExpansionPanelTitle {
458
+ }
459
+ MatExpansionPanelTitle.decorators = [
460
+ { type: Directive, args: [{
461
+ selector: 'mat-panel-title',
462
+ host: {
463
+ class: 'mat-expansion-panel-header-title'
464
+ }
465
+ },] }
466
+ ];
485
467
 
486
468
  /**
487
469
  * @license
@@ -493,86 +475,83 @@ let MatExpansionPanelTitle = /** @class */ (() => {
493
475
  /**
494
476
  * Directive for a Material Design Accordion.
495
477
  */
496
- let MatAccordion = /** @class */ (() => {
497
- class MatAccordion extends CdkAccordion {
498
- constructor() {
499
- super(...arguments);
500
- /** Headers belonging to this accordion. */
501
- this._ownHeaders = new QueryList();
502
- this._hideToggle = false;
503
- /**
504
- * Display mode used for all expansion panels in the accordion. Currently two display
505
- * modes exist:
506
- * default - a gutter-like spacing is placed around any expanded panel, placing the expanded
507
- * panel at a different elevation from the rest of the accordion.
508
- * flat - no spacing is placed around expanded panels, showing all panels at the same
509
- * elevation.
510
- */
511
- this.displayMode = 'default';
512
- /** The position of the expansion indicator. */
513
- this.togglePosition = 'after';
514
- }
515
- /** Whether the expansion indicator should be hidden. */
516
- get hideToggle() { return this._hideToggle; }
517
- set hideToggle(show) { this._hideToggle = coerceBooleanProperty(show); }
518
- ngAfterContentInit() {
519
- this._headers.changes
520
- .pipe(startWith(this._headers))
521
- .subscribe((headers) => {
522
- this._ownHeaders.reset(headers.filter(header => header.panel.accordion === this));
523
- this._ownHeaders.notifyOnChanges();
524
- });
525
- this._keyManager = new FocusKeyManager(this._ownHeaders).withWrap();
526
- }
527
- /** Handles keyboard events coming in from the panel headers. */
528
- _handleHeaderKeydown(event) {
529
- const { keyCode } = event;
530
- const manager = this._keyManager;
531
- if (keyCode === HOME) {
532
- if (!hasModifierKey(event)) {
533
- manager.setFirstItemActive();
534
- event.preventDefault();
535
- }
536
- }
537
- else if (keyCode === END) {
538
- if (!hasModifierKey(event)) {
539
- manager.setLastItemActive();
540
- event.preventDefault();
541
- }
478
+ class MatAccordion extends CdkAccordion {
479
+ constructor() {
480
+ super(...arguments);
481
+ /** Headers belonging to this accordion. */
482
+ this._ownHeaders = new QueryList();
483
+ this._hideToggle = false;
484
+ /**
485
+ * Display mode used for all expansion panels in the accordion. Currently two display
486
+ * modes exist:
487
+ * default - a gutter-like spacing is placed around any expanded panel, placing the expanded
488
+ * panel at a different elevation from the rest of the accordion.
489
+ * flat - no spacing is placed around expanded panels, showing all panels at the same
490
+ * elevation.
491
+ */
492
+ this.displayMode = 'default';
493
+ /** The position of the expansion indicator. */
494
+ this.togglePosition = 'after';
495
+ }
496
+ /** Whether the expansion indicator should be hidden. */
497
+ get hideToggle() { return this._hideToggle; }
498
+ set hideToggle(show) { this._hideToggle = coerceBooleanProperty(show); }
499
+ ngAfterContentInit() {
500
+ this._headers.changes
501
+ .pipe(startWith(this._headers))
502
+ .subscribe((headers) => {
503
+ this._ownHeaders.reset(headers.filter(header => header.panel.accordion === this));
504
+ this._ownHeaders.notifyOnChanges();
505
+ });
506
+ this._keyManager = new FocusKeyManager(this._ownHeaders).withWrap();
507
+ }
508
+ /** Handles keyboard events coming in from the panel headers. */
509
+ _handleHeaderKeydown(event) {
510
+ const { keyCode } = event;
511
+ const manager = this._keyManager;
512
+ if (keyCode === HOME) {
513
+ if (!hasModifierKey(event)) {
514
+ manager.setFirstItemActive();
515
+ event.preventDefault();
542
516
  }
543
- else {
544
- this._keyManager.onKeydown(event);
517
+ }
518
+ else if (keyCode === END) {
519
+ if (!hasModifierKey(event)) {
520
+ manager.setLastItemActive();
521
+ event.preventDefault();
545
522
  }
546
523
  }
547
- _handleHeaderFocus(header) {
548
- this._keyManager.updateActiveItem(header);
524
+ else {
525
+ this._keyManager.onKeydown(event);
549
526
  }
550
527
  }
551
- MatAccordion.decorators = [
552
- { type: Directive, args: [{
553
- selector: 'mat-accordion',
554
- exportAs: 'matAccordion',
555
- inputs: ['multi'],
556
- providers: [{
557
- provide: MAT_ACCORDION,
558
- useExisting: MatAccordion
559
- }],
560
- host: {
561
- class: 'mat-accordion',
562
- // Class binding which is only used by the test harness as there is no other
563
- // way for the harness to detect if multiple panel support is enabled.
564
- '[class.mat-accordion-multi]': 'this.multi',
565
- }
566
- },] }
567
- ];
568
- MatAccordion.propDecorators = {
569
- _headers: [{ type: ContentChildren, args: [MatExpansionPanelHeader, { descendants: true },] }],
570
- hideToggle: [{ type: Input }],
571
- displayMode: [{ type: Input }],
572
- togglePosition: [{ type: Input }]
573
- };
574
- return MatAccordion;
575
- })();
528
+ _handleHeaderFocus(header) {
529
+ this._keyManager.updateActiveItem(header);
530
+ }
531
+ }
532
+ MatAccordion.decorators = [
533
+ { type: Directive, args: [{
534
+ selector: 'mat-accordion',
535
+ exportAs: 'matAccordion',
536
+ inputs: ['multi'],
537
+ providers: [{
538
+ provide: MAT_ACCORDION,
539
+ useExisting: MatAccordion
540
+ }],
541
+ host: {
542
+ class: 'mat-accordion',
543
+ // Class binding which is only used by the test harness as there is no other
544
+ // way for the harness to detect if multiple panel support is enabled.
545
+ '[class.mat-accordion-multi]': 'this.multi',
546
+ }
547
+ },] }
548
+ ];
549
+ MatAccordion.propDecorators = {
550
+ _headers: [{ type: ContentChildren, args: [MatExpansionPanelHeader, { descendants: true },] }],
551
+ hideToggle: [{ type: Input }],
552
+ displayMode: [{ type: Input }],
553
+ togglePosition: [{ type: Input }]
554
+ };
576
555
 
577
556
  /**
578
557
  * @license
@@ -581,34 +560,31 @@ let MatAccordion = /** @class */ (() => {
581
560
  * Use of this source code is governed by an MIT-style license that can be
582
561
  * found in the LICENSE file at https://angular.io/license
583
562
  */
584
- let MatExpansionModule = /** @class */ (() => {
585
- class MatExpansionModule {
586
- }
587
- MatExpansionModule.decorators = [
588
- { type: NgModule, args: [{
589
- imports: [CommonModule, CdkAccordionModule, PortalModule],
590
- exports: [
591
- MatAccordion,
592
- MatExpansionPanel,
593
- MatExpansionPanelActionRow,
594
- MatExpansionPanelHeader,
595
- MatExpansionPanelTitle,
596
- MatExpansionPanelDescription,
597
- MatExpansionPanelContent,
598
- ],
599
- declarations: [
600
- MatAccordion,
601
- MatExpansionPanel,
602
- MatExpansionPanelActionRow,
603
- MatExpansionPanelHeader,
604
- MatExpansionPanelTitle,
605
- MatExpansionPanelDescription,
606
- MatExpansionPanelContent,
607
- ],
608
- },] }
609
- ];
610
- return MatExpansionModule;
611
- })();
563
+ class MatExpansionModule {
564
+ }
565
+ MatExpansionModule.decorators = [
566
+ { type: NgModule, args: [{
567
+ imports: [CommonModule, CdkAccordionModule, PortalModule],
568
+ exports: [
569
+ MatAccordion,
570
+ MatExpansionPanel,
571
+ MatExpansionPanelActionRow,
572
+ MatExpansionPanelHeader,
573
+ MatExpansionPanelTitle,
574
+ MatExpansionPanelDescription,
575
+ MatExpansionPanelContent,
576
+ ],
577
+ declarations: [
578
+ MatAccordion,
579
+ MatExpansionPanel,
580
+ MatExpansionPanelActionRow,
581
+ MatExpansionPanelHeader,
582
+ MatExpansionPanelTitle,
583
+ MatExpansionPanelDescription,
584
+ MatExpansionPanelContent,
585
+ ],
586
+ },] }
587
+ ];
612
588
 
613
589
  /**
614
590
  * @license