@angular/material 9.1.3 → 9.2.2

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 (369) hide show
  1. package/autocomplete/index.metadata.json +1 -1
  2. package/autocomplete/testing/autocomplete-harness.d.ts +4 -1
  3. package/badge/index.metadata.json +1 -1
  4. package/bottom-sheet/bottom-sheet.d.ts +2 -1
  5. package/bundles/material-autocomplete-testing.umd.js +55 -8
  6. package/bundles/material-autocomplete-testing.umd.js.map +1 -1
  7. package/bundles/material-autocomplete-testing.umd.min.js +4 -5
  8. package/bundles/material-autocomplete-testing.umd.min.js.map +1 -1
  9. package/bundles/material-autocomplete.umd.js +23 -24
  10. package/bundles/material-autocomplete.umd.js.map +1 -1
  11. package/bundles/material-autocomplete.umd.min.js +5 -5
  12. package/bundles/material-autocomplete.umd.min.js.map +1 -1
  13. package/bundles/material-badge.umd.js +1 -1
  14. package/bundles/material-badge.umd.js.map +1 -1
  15. package/bundles/material-badge.umd.min.js +1 -1
  16. package/bundles/material-badge.umd.min.js.map +1 -1
  17. package/bundles/material-bottom-sheet.umd.js +3 -2
  18. package/bundles/material-bottom-sheet.umd.js.map +1 -1
  19. package/bundles/material-bottom-sheet.umd.min.js +1 -1
  20. package/bundles/material-bottom-sheet.umd.min.js.map +1 -1
  21. package/bundles/material-button-toggle.umd.js +16 -6
  22. package/bundles/material-button-toggle.umd.js.map +1 -1
  23. package/bundles/material-button-toggle.umd.min.js +3 -3
  24. package/bundles/material-button-toggle.umd.min.js.map +1 -1
  25. package/bundles/material-chips.umd.js +3 -0
  26. package/bundles/material-chips.umd.js.map +1 -1
  27. package/bundles/material-chips.umd.min.js +1 -1
  28. package/bundles/material-chips.umd.min.js.map +1 -1
  29. package/bundles/material-core.umd.js +96 -73
  30. package/bundles/material-core.umd.js.map +1 -1
  31. package/bundles/material-core.umd.min.js +10 -10
  32. package/bundles/material-core.umd.min.js.map +1 -1
  33. package/bundles/material-datepicker.umd.js +23 -10
  34. package/bundles/material-datepicker.umd.js.map +1 -1
  35. package/bundles/material-datepicker.umd.min.js +7 -7
  36. package/bundles/material-datepicker.umd.min.js.map +1 -1
  37. package/bundles/material-dialog.umd.js +43 -23
  38. package/bundles/material-dialog.umd.js.map +1 -1
  39. package/bundles/material-dialog.umd.min.js +6 -6
  40. package/bundles/material-dialog.umd.min.js.map +1 -1
  41. package/bundles/material-expansion.umd.js +3 -3
  42. package/bundles/material-expansion.umd.js.map +1 -1
  43. package/bundles/material-expansion.umd.min.js +1 -1
  44. package/bundles/material-expansion.umd.min.js.map +1 -1
  45. package/bundles/material-form-field.umd.js +12 -2
  46. package/bundles/material-form-field.umd.js.map +1 -1
  47. package/bundles/material-form-field.umd.min.js +2 -2
  48. package/bundles/material-form-field.umd.min.js.map +1 -1
  49. package/bundles/material-input.umd.js +14 -4
  50. package/bundles/material-input.umd.js.map +1 -1
  51. package/bundles/material-input.umd.min.js +1 -1
  52. package/bundles/material-input.umd.min.js.map +1 -1
  53. package/bundles/material-list.umd.js +7 -6
  54. package/bundles/material-list.umd.js.map +1 -1
  55. package/bundles/material-list.umd.min.js +2 -2
  56. package/bundles/material-list.umd.min.js.map +1 -1
  57. package/bundles/material-menu.umd.js +5 -5
  58. package/bundles/material-menu.umd.js.map +1 -1
  59. package/bundles/material-menu.umd.min.js +6 -6
  60. package/bundles/material-menu.umd.min.js.map +1 -1
  61. package/bundles/material-radio.umd.js +62 -47
  62. package/bundles/material-radio.umd.js.map +1 -1
  63. package/bundles/material-radio.umd.min.js +10 -2
  64. package/bundles/material-radio.umd.min.js.map +1 -1
  65. package/bundles/material-select-testing.umd.js +45 -10
  66. package/bundles/material-select-testing.umd.js.map +1 -1
  67. package/bundles/material-select-testing.umd.min.js +2 -3
  68. package/bundles/material-select-testing.umd.min.js.map +1 -1
  69. package/bundles/material-select.umd.js +24 -15
  70. package/bundles/material-select.umd.js.map +1 -1
  71. package/bundles/material-select.umd.min.js +3 -3
  72. package/bundles/material-select.umd.min.js.map +1 -1
  73. package/bundles/material-sidenav.umd.js +2 -1
  74. package/bundles/material-sidenav.umd.js.map +1 -1
  75. package/bundles/material-sidenav.umd.min.js +2 -2
  76. package/bundles/material-sidenav.umd.min.js.map +1 -1
  77. package/bundles/material-slider.umd.js +14 -12
  78. package/bundles/material-slider.umd.js.map +1 -1
  79. package/bundles/material-slider.umd.min.js +1 -1
  80. package/bundles/material-slider.umd.min.js.map +1 -1
  81. package/bundles/material-snack-bar-testing.umd.js +24 -2
  82. package/bundles/material-snack-bar-testing.umd.js.map +1 -1
  83. package/bundles/material-snack-bar-testing.umd.min.js +3 -3
  84. package/bundles/material-snack-bar-testing.umd.min.js.map +1 -1
  85. package/bundles/material-snack-bar.umd.js +4 -0
  86. package/bundles/material-snack-bar.umd.js.map +1 -1
  87. package/bundles/material-snack-bar.umd.min.js +2 -2
  88. package/bundles/material-snack-bar.umd.min.js.map +1 -1
  89. package/bundles/material-table.umd.js +5 -2
  90. package/bundles/material-table.umd.js.map +1 -1
  91. package/bundles/material-table.umd.min.js +2 -2
  92. package/bundles/material-table.umd.min.js.map +1 -1
  93. package/bundles/material-tabs.umd.js +5 -4
  94. package/bundles/material-tabs.umd.js.map +1 -1
  95. package/bundles/material-tabs.umd.min.js +1 -1
  96. package/bundles/material-tabs.umd.min.js.map +1 -1
  97. package/bundles/material-tooltip.umd.js +5 -5
  98. package/bundles/material-tooltip.umd.js.map +1 -1
  99. package/bundles/material-tooltip.umd.min.js +3 -3
  100. package/bundles/material-tooltip.umd.min.js.map +1 -1
  101. package/bundles/material-tree.umd.js +1 -1
  102. package/bundles/material-tree.umd.js.map +1 -1
  103. package/bundles/material-tree.umd.min.js +1 -1
  104. package/bundles/material-tree.umd.min.js.map +1 -1
  105. package/button-toggle/index.metadata.json +1 -1
  106. package/core/index.metadata.json +1 -1
  107. package/core/ripple/ripple-renderer.d.ts +10 -3
  108. package/core/ripple/ripple.d.ts +2 -1
  109. package/datepicker/datepicker-input.d.ts +5 -2
  110. package/datepicker/index.metadata.json +1 -1
  111. package/dialog/dialog-container.d.ts +6 -0
  112. package/dialog/dialog-ref.d.ts +5 -0
  113. package/dialog/index.metadata.json +1 -1
  114. package/esm2015/autocomplete/autocomplete-module.js +3 -1
  115. package/esm2015/autocomplete/autocomplete-trigger.js +21 -22
  116. package/esm2015/autocomplete/testing/autocomplete-harness.js +18 -7
  117. package/esm2015/badge/badge-module.js +2 -2
  118. package/esm2015/bottom-sheet/bottom-sheet.js +5 -3
  119. package/esm2015/button-toggle/button-toggle.js +18 -7
  120. package/esm2015/chips/chip-list.js +4 -1
  121. package/esm2015/core/common-behaviors/common-module.js +3 -4
  122. package/esm2015/core/ripple/ripple-renderer.js +140 -119
  123. package/esm2015/core/ripple/ripple.js +10 -7
  124. package/esm2015/core/version.js +1 -1
  125. package/esm2015/datepicker/calendar-body.js +1 -1
  126. package/esm2015/datepicker/calendar.js +3 -3
  127. package/esm2015/datepicker/datepicker-input.js +19 -4
  128. package/esm2015/datepicker/datepicker-module.js +3 -1
  129. package/esm2015/datepicker/datepicker.js +8 -2
  130. package/esm2015/dialog/dialog-container.js +40 -13
  131. package/esm2015/dialog/dialog-ref.js +24 -6
  132. package/esm2015/dialog/dialog.js +1 -12
  133. package/esm2015/expansion/expansion-panel-header.js +3 -3
  134. package/esm2015/expansion/expansion-panel.js +1 -1
  135. package/esm2015/form-field/form-field.js +13 -3
  136. package/esm2015/form-field/public-api.js +2 -2
  137. package/esm2015/input/input.js +16 -6
  138. package/esm2015/list/list.js +2 -2
  139. package/esm2015/list/selection-list.js +9 -6
  140. package/esm2015/menu/menu-module.js +3 -2
  141. package/esm2015/radio/public-api.js +2 -2
  142. package/esm2015/radio/radio.js +70 -59
  143. package/esm2015/select/select-module.js +10 -2
  144. package/esm2015/select/select.js +14 -12
  145. package/esm2015/select/testing/select-harness.js +11 -6
  146. package/esm2015/sidenav/sidenav-module.js +4 -3
  147. package/esm2015/slider/slider.js +17 -15
  148. package/esm2015/snack-bar/snack-bar-container.js +5 -1
  149. package/esm2015/snack-bar/testing/snack-bar-harness.js +18 -3
  150. package/esm2015/table/table-module.js +2 -2
  151. package/esm2015/table/table.js +6 -3
  152. package/esm2015/tabs/paginated-tab-header.js +3 -2
  153. package/esm2015/tabs/tab-header.js +1 -1
  154. package/esm2015/tabs/tab-nav-bar/tab-nav-bar.js +3 -3
  155. package/esm2015/tooltip/tooltip-module.js +3 -2
  156. package/esm2015/tree/tree-module.js +2 -2
  157. package/esm5/autocomplete/autocomplete-module.js +3 -1
  158. package/esm5/autocomplete/autocomplete-trigger.js +20 -22
  159. package/esm5/autocomplete/testing/autocomplete-harness.js +56 -9
  160. package/esm5/badge/badge-module.js +2 -2
  161. package/esm5/bottom-sheet/bottom-sheet.js +4 -3
  162. package/esm5/button-toggle/button-toggle.js +17 -7
  163. package/esm5/chips/chip-list.js +4 -1
  164. package/esm5/core/common-behaviors/common-module.js +3 -4
  165. package/esm5/core/ripple/ripple-renderer.js +91 -65
  166. package/esm5/core/ripple/ripple.js +4 -6
  167. package/esm5/core/version.js +1 -1
  168. package/esm5/datepicker/calendar-body.js +1 -1
  169. package/esm5/datepicker/calendar.js +3 -3
  170. package/esm5/datepicker/datepicker-input.js +10 -4
  171. package/esm5/datepicker/datepicker-module.js +3 -1
  172. package/esm5/datepicker/datepicker.js +8 -2
  173. package/esm5/dialog/dialog-container.js +26 -11
  174. package/esm5/dialog/dialog-ref.js +19 -6
  175. package/esm5/dialog/dialog.js +1 -9
  176. package/esm5/expansion/expansion-panel-header.js +3 -3
  177. package/esm5/expansion/expansion-panel.js +1 -1
  178. package/esm5/form-field/form-field.js +12 -3
  179. package/esm5/input/input.js +16 -6
  180. package/esm5/list/list.js +2 -2
  181. package/esm5/list/selection-list.js +6 -5
  182. package/esm5/menu/menu-module.js +3 -2
  183. package/esm5/radio/radio.js +63 -48
  184. package/esm5/select/select-module.js +10 -2
  185. package/esm5/select/select.js +14 -12
  186. package/esm5/select/testing/select-harness.js +46 -11
  187. package/esm5/sidenav/sidenav-module.js +4 -3
  188. package/esm5/slider/slider.js +15 -13
  189. package/esm5/snack-bar/snack-bar-container.js +5 -1
  190. package/esm5/snack-bar/testing/snack-bar-harness.js +26 -4
  191. package/esm5/table/table-module.js +2 -2
  192. package/esm5/table/table.js +6 -3
  193. package/esm5/tabs/paginated-tab-header.js +3 -2
  194. package/esm5/tabs/tab-header.js +1 -1
  195. package/esm5/tabs/tab-nav-bar/tab-nav-bar.js +3 -3
  196. package/esm5/tooltip/tooltip-module.js +3 -2
  197. package/esm5/tree/tree-module.js +2 -2
  198. package/expansion/index.metadata.json +1 -1
  199. package/fesm2015/autocomplete/testing.js +17 -6
  200. package/fesm2015/autocomplete/testing.js.map +1 -1
  201. package/fesm2015/autocomplete.js +22 -22
  202. package/fesm2015/autocomplete.js.map +1 -1
  203. package/fesm2015/badge.js +1 -1
  204. package/fesm2015/badge.js.map +1 -1
  205. package/fesm2015/bottom-sheet.js +4 -2
  206. package/fesm2015/bottom-sheet.js.map +1 -1
  207. package/fesm2015/button-toggle.js +17 -6
  208. package/fesm2015/button-toggle.js.map +1 -1
  209. package/fesm2015/chips.js +3 -0
  210. package/fesm2015/chips.js.map +1 -1
  211. package/fesm2015/core.js +151 -128
  212. package/fesm2015/core.js.map +1 -1
  213. package/fesm2015/datepicker.js +30 -7
  214. package/fesm2015/datepicker.js.map +1 -1
  215. package/fesm2015/dialog.js +62 -28
  216. package/fesm2015/dialog.js.map +1 -1
  217. package/fesm2015/expansion.js +3 -3
  218. package/fesm2015/expansion.js.map +1 -1
  219. package/fesm2015/form-field.js +13 -3
  220. package/fesm2015/form-field.js.map +1 -1
  221. package/fesm2015/input.js +15 -5
  222. package/fesm2015/input.js.map +1 -1
  223. package/fesm2015/list.js +10 -7
  224. package/fesm2015/list.js.map +1 -1
  225. package/fesm2015/menu.js +2 -1
  226. package/fesm2015/menu.js.map +1 -1
  227. package/fesm2015/radio.js +71 -60
  228. package/fesm2015/radio.js.map +1 -1
  229. package/fesm2015/select/testing.js +10 -5
  230. package/fesm2015/select/testing.js.map +1 -1
  231. package/fesm2015/select.js +23 -14
  232. package/fesm2015/select.js.map +1 -1
  233. package/fesm2015/sidenav.js +3 -2
  234. package/fesm2015/sidenav.js.map +1 -1
  235. package/fesm2015/slider.js +16 -14
  236. package/fesm2015/slider.js.map +1 -1
  237. package/fesm2015/snack-bar/testing.js +17 -2
  238. package/fesm2015/snack-bar/testing.js.map +1 -1
  239. package/fesm2015/snack-bar.js +4 -0
  240. package/fesm2015/snack-bar.js.map +1 -1
  241. package/fesm2015/table.js +6 -3
  242. package/fesm2015/table.js.map +1 -1
  243. package/fesm2015/tabs.js +5 -4
  244. package/fesm2015/tabs.js.map +1 -1
  245. package/fesm2015/tooltip.js +2 -2
  246. package/fesm2015/tooltip.js.map +1 -1
  247. package/fesm2015/tree.js +1 -1
  248. package/fesm2015/tree.js.map +1 -1
  249. package/fesm5/autocomplete/testing.js +55 -8
  250. package/fesm5/autocomplete/testing.js.map +1 -1
  251. package/fesm5/autocomplete.js +21 -22
  252. package/fesm5/autocomplete.js.map +1 -1
  253. package/fesm5/badge.js +1 -1
  254. package/fesm5/badge.js.map +1 -1
  255. package/fesm5/bottom-sheet.js +3 -2
  256. package/fesm5/bottom-sheet.js.map +1 -1
  257. package/fesm5/button-toggle.js +16 -6
  258. package/fesm5/button-toggle.js.map +1 -1
  259. package/fesm5/chips.js +3 -0
  260. package/fesm5/chips.js.map +1 -1
  261. package/fesm5/core.js +96 -73
  262. package/fesm5/core.js.map +1 -1
  263. package/fesm5/datepicker.js +21 -7
  264. package/fesm5/datepicker.js.map +1 -1
  265. package/fesm5/dialog.js +43 -23
  266. package/fesm5/dialog.js.map +1 -1
  267. package/fesm5/expansion.js +3 -3
  268. package/fesm5/expansion.js.map +1 -1
  269. package/fesm5/form-field.js +12 -3
  270. package/fesm5/form-field.js.map +1 -1
  271. package/fesm5/input.js +15 -5
  272. package/fesm5/input.js.map +1 -1
  273. package/fesm5/list.js +7 -6
  274. package/fesm5/list.js.map +1 -1
  275. package/fesm5/menu.js +2 -1
  276. package/fesm5/menu.js.map +1 -1
  277. package/fesm5/radio.js +63 -49
  278. package/fesm5/radio.js.map +1 -1
  279. package/fesm5/select/testing.js +45 -10
  280. package/fesm5/select/testing.js.map +1 -1
  281. package/fesm5/select.js +23 -14
  282. package/fesm5/select.js.map +1 -1
  283. package/fesm5/sidenav.js +3 -2
  284. package/fesm5/sidenav.js.map +1 -1
  285. package/fesm5/slider.js +14 -12
  286. package/fesm5/slider.js.map +1 -1
  287. package/fesm5/snack-bar/testing.js +25 -3
  288. package/fesm5/snack-bar/testing.js.map +1 -1
  289. package/fesm5/snack-bar.js +4 -0
  290. package/fesm5/snack-bar.js.map +1 -1
  291. package/fesm5/table.js +6 -3
  292. package/fesm5/table.js.map +1 -1
  293. package/fesm5/tabs.js +5 -4
  294. package/fesm5/tabs.js.map +1 -1
  295. package/fesm5/tooltip.js +2 -2
  296. package/fesm5/tooltip.js.map +1 -1
  297. package/fesm5/tree.js +1 -1
  298. package/fesm5/tree.js.map +1 -1
  299. package/form-field/form-field.d.ts +6 -0
  300. package/form-field/index.metadata.json +1 -1
  301. package/input/index.metadata.json +1 -1
  302. package/list/index.metadata.json +1 -1
  303. package/menu/index.metadata.json +1 -1
  304. package/package.json +2 -2
  305. package/radio/index.metadata.json +1 -1
  306. package/radio/radio.d.ts +8 -2
  307. package/schematics/collection.json +0 -7
  308. package/schematics/ng-add/index.js +1 -1
  309. package/schematics/ng-update/index.js +23 -23
  310. package/schematics/ng-update/{upgrade-rules → migrations}/hammer-gestures-v9/find-hammer-script-tags.d.ts +1 -1
  311. package/schematics/ng-update/migrations/hammer-gestures-v9/find-hammer-script-tags.js +51 -0
  312. package/schematics/ng-update/{upgrade-rules → migrations}/hammer-gestures-v9/find-main-module.d.ts +1 -1
  313. package/schematics/ng-update/migrations/hammer-gestures-v9/find-main-module.js +41 -0
  314. package/schematics/ng-update/{upgrade-rules → migrations}/hammer-gestures-v9/gesture-config.template +0 -0
  315. package/schematics/ng-update/{upgrade-rules/hammer-gestures-v9/hammer-gestures-rule.d.ts → migrations/hammer-gestures-v9/hammer-gestures-migration.d.ts} +6 -6
  316. package/schematics/ng-update/migrations/hammer-gestures-v9/hammer-gestures-migration.js +784 -0
  317. package/schematics/ng-update/{upgrade-rules → migrations}/hammer-gestures-v9/hammer-template-check.d.ts +1 -1
  318. package/schematics/ng-update/migrations/hammer-gestures-v9/hammer-template-check.js +65 -0
  319. package/schematics/ng-update/{upgrade-rules → migrations}/hammer-gestures-v9/import-manager.d.ts +4 -4
  320. package/schematics/ng-update/migrations/hammer-gestures-v9/import-manager.js +379 -0
  321. package/schematics/ng-update/{upgrade-rules → migrations}/hammer-gestures-v9/remove-array-element.d.ts +1 -1
  322. package/schematics/ng-update/migrations/hammer-gestures-v9/remove-array-element.js +75 -0
  323. package/schematics/ng-update/{upgrade-rules → migrations}/hammer-gestures-v9/remove-element-from-html.d.ts +1 -1
  324. package/schematics/ng-update/migrations/hammer-gestures-v9/remove-element-from-html.js +37 -0
  325. package/schematics/ng-update/migrations/misc-checks/misc-class-inheritance.d.ts +19 -0
  326. package/schematics/ng-update/migrations/misc-checks/misc-class-inheritance.js +57 -0
  327. package/schematics/ng-update/{upgrade-rules/misc-checks/misc-class-names-rule.d.ts → migrations/misc-checks/misc-class-names.d.ts} +5 -5
  328. package/schematics/ng-update/migrations/misc-checks/misc-class-names.js +52 -0
  329. package/schematics/ng-update/{upgrade-rules/misc-checks/misc-imports-rule.d.ts → migrations/misc-checks/misc-imports.d.ts} +5 -5
  330. package/schematics/ng-update/migrations/misc-checks/misc-imports.js +63 -0
  331. package/schematics/ng-update/{upgrade-rules/misc-checks/misc-property-names-rule.d.ts → migrations/misc-checks/misc-property-names.d.ts} +5 -5
  332. package/schematics/ng-update/migrations/misc-checks/misc-property-names.js +56 -0
  333. package/schematics/ng-update/migrations/misc-checks/misc-template.d.ts +17 -0
  334. package/schematics/ng-update/migrations/misc-checks/misc-template.js +69 -0
  335. package/schematics/ng-update/{upgrade-rules/misc-ripples-v7/ripple-speed-factor-rule.d.ts → migrations/misc-ripples-v7/ripple-speed-factor-migration.d.ts} +5 -5
  336. package/schematics/ng-update/migrations/misc-ripples-v7/ripple-speed-factor-migration.js +147 -0
  337. package/schematics/ng-update/{upgrade-rules → migrations}/misc-ripples-v7/ripple-speed-factor.d.ts +1 -1
  338. package/schematics/ng-update/migrations/misc-ripples-v7/ripple-speed-factor.js +39 -0
  339. package/schematics/ng-update/{upgrade-rules → migrations}/package-imports-v8/material-symbols.json +0 -0
  340. package/schematics/ng-update/{upgrade-rules/package-imports-v8/secondary-entry-points-rule.d.ts → migrations/package-imports-v8/secondary-entry-points-migration.d.ts} +5 -5
  341. package/schematics/ng-update/migrations/package-imports-v8/secondary-entry-points-migration.js +177 -0
  342. package/schematics/ng-update/upgrade-data.d.ts +2 -2
  343. package/schematics/ng-update/upgrade-data.js +1 -1
  344. package/select/index.metadata.json +1 -1
  345. package/select/testing/select-harness.d.ts +2 -1
  346. package/sidenav/index.metadata.json +1 -1
  347. package/snack-bar/testing/snack-bar-harness.d.ts +2 -0
  348. package/table/index.metadata.json +1 -1
  349. package/tabs/_tabs-common.scss +5 -3
  350. package/tabs/index.metadata.json +1 -1
  351. package/tooltip/index.metadata.json +1 -1
  352. package/tree/index.metadata.json +1 -1
  353. package/schematics/ng-update/upgrade-rules/hammer-gestures-v9/find-hammer-script-tags.js +0 -51
  354. package/schematics/ng-update/upgrade-rules/hammer-gestures-v9/find-main-module.js +0 -41
  355. package/schematics/ng-update/upgrade-rules/hammer-gestures-v9/hammer-gestures-rule.js +0 -781
  356. package/schematics/ng-update/upgrade-rules/hammer-gestures-v9/hammer-template-check.js +0 -65
  357. package/schematics/ng-update/upgrade-rules/hammer-gestures-v9/import-manager.js +0 -379
  358. package/schematics/ng-update/upgrade-rules/hammer-gestures-v9/remove-array-element.js +0 -75
  359. package/schematics/ng-update/upgrade-rules/hammer-gestures-v9/remove-element-from-html.js +0 -37
  360. package/schematics/ng-update/upgrade-rules/misc-checks/misc-class-inheritance-rule.d.ts +0 -19
  361. package/schematics/ng-update/upgrade-rules/misc-checks/misc-class-inheritance-rule.js +0 -57
  362. package/schematics/ng-update/upgrade-rules/misc-checks/misc-class-names-rule.js +0 -52
  363. package/schematics/ng-update/upgrade-rules/misc-checks/misc-imports-rule.js +0 -63
  364. package/schematics/ng-update/upgrade-rules/misc-checks/misc-property-names-rule.js +0 -56
  365. package/schematics/ng-update/upgrade-rules/misc-checks/misc-template-rule.d.ts +0 -17
  366. package/schematics/ng-update/upgrade-rules/misc-checks/misc-template-rule.js +0 -69
  367. package/schematics/ng-update/upgrade-rules/misc-ripples-v7/ripple-speed-factor-rule.js +0 -147
  368. package/schematics/ng-update/upgrade-rules/misc-ripples-v7/ripple-speed-factor.js +0 -39
  369. package/schematics/ng-update/upgrade-rules/package-imports-v8/secondary-entry-points-rule.js +0 -177
package/fesm2015/radio.js CHANGED
@@ -1,4 +1,4 @@
1
- import { InjectionToken, forwardRef, EventEmitter, Directive, ChangeDetectorRef, Output, ContentChildren, Input, Component, ViewEncapsulation, ChangeDetectionStrategy, Optional, ElementRef, Inject, ViewChild, NgModule } from '@angular/core';
1
+ import { InjectionToken, forwardRef, EventEmitter, Directive, ChangeDetectorRef, Output, ContentChildren, Input, Optional, ElementRef, Inject, ViewChild, Component, ViewEncapsulation, ChangeDetectionStrategy, NgModule } from '@angular/core';
2
2
  import { mixinDisableRipple, mixinTabIndex, MatRippleModule, MatCommonModule } from '@angular/material/core';
3
3
  import { FocusMonitor } from '@angular/cdk/a11y';
4
4
  import { coerceBooleanProperty } from '@angular/cdk/coercion';
@@ -481,9 +481,12 @@ if (false) {
481
481
  /** @type {?} */
482
482
  const _MatRadioButtonMixinBase = mixinDisableRipple(mixinTabIndex(MatRadioButtonBase));
483
483
  /**
484
- * A Material design radio-button. Typically placed inside of `<mat-radio-group>` elements.
484
+ * Base class with all of the `MatRadioButton` functionality.
485
+ * \@docs-private
486
+ * @abstract
485
487
  */
486
- class MatRadioButton extends _MatRadioButtonMixinBase {
488
+ // tslint:disable-next-line:class-name
489
+ class _MatRadioButtonBase extends _MatRadioButtonMixinBase {
487
490
  /**
488
491
  * @param {?} radioGroup
489
492
  * @param {?} elementRef
@@ -770,38 +773,11 @@ class MatRadioButton extends _MatRadioButtonMixinBase {
770
773
  }
771
774
  }
772
775
  }
773
- MatRadioButton.decorators = [
774
- { type: Component, args: [{
775
- selector: 'mat-radio-button',
776
- template: "<!-- TODO(jelbourn): render the radio on either side of the content -->\n<!-- TODO(mtlin): Evaluate trade-offs of using native radio vs. cost of additional bindings. -->\n<label [attr.for]=\"inputId\" class=\"mat-radio-label\" #label>\n <!-- The actual 'radio' part of the control. -->\n <div class=\"mat-radio-container\">\n <div class=\"mat-radio-outer-circle\"></div>\n <div class=\"mat-radio-inner-circle\"></div>\n <input #input class=\"mat-radio-input cdk-visually-hidden\" type=\"radio\"\n [id]=\"inputId\"\n [checked]=\"checked\"\n [disabled]=\"disabled\"\n [tabIndex]=\"tabIndex\"\n [attr.name]=\"name\"\n [attr.value]=\"value\"\n [required]=\"required\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-labelledby]=\"ariaLabelledby\"\n [attr.aria-describedby]=\"ariaDescribedby\"\n (change)=\"_onInputChange($event)\"\n (click)=\"_onInputClick($event)\">\n\n <!-- The ripple comes after the input so that we can target it with a CSS\n sibling selector when the input is focused. -->\n <div mat-ripple class=\"mat-radio-ripple mat-focus-indicator\"\n [matRippleTrigger]=\"label\"\n [matRippleDisabled]=\"_isRippleDisabled()\"\n [matRippleCentered]=\"true\"\n [matRippleRadius]=\"20\"\n [matRippleAnimation]=\"{enterDuration: 150}\">\n\n <div class=\"mat-ripple-element mat-radio-persistent-ripple\"></div>\n </div>\n </div>\n\n <!-- The label content for radio control. -->\n <div class=\"mat-radio-label-content\" [class.mat-radio-label-before]=\"labelPosition == 'before'\">\n <!-- Add an invisible span so JAWS can read the label -->\n <span style=\"display:none\">&nbsp;</span>\n <ng-content></ng-content>\n </div>\n</label>\n",
777
- inputs: ['disableRipple', 'tabIndex'],
778
- encapsulation: ViewEncapsulation.None,
779
- exportAs: 'matRadioButton',
780
- host: {
781
- 'class': 'mat-radio-button',
782
- '[class.mat-radio-checked]': 'checked',
783
- '[class.mat-radio-disabled]': 'disabled',
784
- '[class._mat-animation-noopable]': '_animationMode === "NoopAnimations"',
785
- '[class.mat-primary]': 'color === "primary"',
786
- '[class.mat-accent]': 'color === "accent"',
787
- '[class.mat-warn]': 'color === "warn"',
788
- // Needs to be -1 so the `focus` event still fires.
789
- '[attr.tabindex]': '-1',
790
- '[attr.id]': 'id',
791
- '[attr.aria-label]': 'null',
792
- '[attr.aria-labelledby]': 'null',
793
- '[attr.aria-describedby]': 'null',
794
- // Note: under normal conditions focus shouldn't land on this element, however it may be
795
- // programmatically set, for example inside of a focus trap, in this case we want to forward
796
- // the focus to the native element.
797
- '(focus)': '_inputElement.nativeElement.focus()',
798
- },
799
- changeDetection: ChangeDetectionStrategy.OnPush,
800
- styles: [".mat-radio-button{display:inline-block;-webkit-tap-highlight-color:transparent;outline:0}.mat-radio-label{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;display:inline-flex;align-items:center;white-space:nowrap;vertical-align:middle;width:100%}.mat-radio-container{box-sizing:border-box;display:inline-block;position:relative;width:20px;height:20px;flex-shrink:0}.mat-radio-outer-circle{box-sizing:border-box;height:20px;left:0;position:absolute;top:0;transition:border-color ease 280ms;width:20px;border-width:2px;border-style:solid;border-radius:50%}._mat-animation-noopable .mat-radio-outer-circle{transition:none}.mat-radio-inner-circle{border-radius:50%;box-sizing:border-box;height:20px;left:0;position:absolute;top:0;transition:transform ease 280ms,background-color ease 280ms;width:20px;transform:scale(0.001)}._mat-animation-noopable .mat-radio-inner-circle{transition:none}.mat-radio-checked .mat-radio-inner-circle{transform:scale(0.5)}.cdk-high-contrast-active .mat-radio-checked .mat-radio-inner-circle{border:solid 10px}.mat-radio-label-content{-webkit-user-select:auto;-moz-user-select:auto;-ms-user-select:auto;user-select:auto;display:inline-block;order:0;line-height:inherit;padding-left:8px;padding-right:0}[dir=rtl] .mat-radio-label-content{padding-right:8px;padding-left:0}.mat-radio-label-content.mat-radio-label-before{order:-1;padding-left:0;padding-right:8px}[dir=rtl] .mat-radio-label-content.mat-radio-label-before{padding-right:0;padding-left:8px}.mat-radio-disabled,.mat-radio-disabled .mat-radio-label{cursor:default}.mat-radio-button .mat-radio-ripple{position:absolute;left:calc(50% - 20px);top:calc(50% - 20px);height:40px;width:40px;z-index:1;pointer-events:none}.mat-radio-button .mat-radio-ripple .mat-ripple-element:not(.mat-radio-persistent-ripple){opacity:.16}.mat-radio-persistent-ripple{width:100%;height:100%;transform:none}.mat-radio-container:hover .mat-radio-persistent-ripple{opacity:.04}.mat-radio-button:not(.mat-radio-disabled).cdk-keyboard-focused .mat-radio-persistent-ripple,.mat-radio-button:not(.mat-radio-disabled).cdk-program-focused .mat-radio-persistent-ripple{opacity:.12}.mat-radio-persistent-ripple,.mat-radio-disabled .mat-radio-container:hover .mat-radio-persistent-ripple{opacity:0}@media(hover: none){.mat-radio-container:hover .mat-radio-persistent-ripple{display:none}}.mat-radio-input{bottom:0;left:50%}.cdk-high-contrast-active .mat-radio-disabled{opacity:.5}\n"]
801
- }] }
776
+ _MatRadioButtonBase.decorators = [
777
+ { type: Directive }
802
778
  ];
803
779
  /** @nocollapse */
804
- MatRadioButton.ctorParameters = () => [
780
+ _MatRadioButtonBase.ctorParameters = () => [
805
781
  { type: MatRadioGroup, decorators: [{ type: Optional }] },
806
782
  { type: ElementRef },
807
783
  { type: ChangeDetectorRef },
@@ -810,7 +786,7 @@ MatRadioButton.ctorParameters = () => [
810
786
  { type: String, decorators: [{ type: Optional }, { type: Inject, args: [ANIMATION_MODULE_TYPE,] }] },
811
787
  { type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [MAT_RADIO_DEFAULT_OPTIONS,] }] }
812
788
  ];
813
- MatRadioButton.propDecorators = {
789
+ _MatRadioButtonBase.propDecorators = {
814
790
  id: [{ type: Input }],
815
791
  name: [{ type: Input }],
816
792
  ariaLabel: [{ type: Input, args: ['aria-label',] }],
@@ -827,123 +803,158 @@ MatRadioButton.propDecorators = {
827
803
  };
828
804
  if (false) {
829
805
  /** @type {?} */
830
- MatRadioButton.ngAcceptInputType_checked;
806
+ _MatRadioButtonBase.ngAcceptInputType_checked;
831
807
  /** @type {?} */
832
- MatRadioButton.ngAcceptInputType_disabled;
808
+ _MatRadioButtonBase.ngAcceptInputType_disabled;
833
809
  /** @type {?} */
834
- MatRadioButton.ngAcceptInputType_required;
810
+ _MatRadioButtonBase.ngAcceptInputType_required;
835
811
  /** @type {?} */
836
- MatRadioButton.ngAcceptInputType_disableRipple;
812
+ _MatRadioButtonBase.ngAcceptInputType_disableRipple;
837
813
  /**
838
814
  * @type {?}
839
815
  * @private
840
816
  */
841
- MatRadioButton.prototype._uniqueId;
817
+ _MatRadioButtonBase.prototype._uniqueId;
842
818
  /**
843
819
  * The unique ID for the radio button.
844
820
  * @type {?}
845
821
  */
846
- MatRadioButton.prototype.id;
822
+ _MatRadioButtonBase.prototype.id;
847
823
  /**
848
824
  * Analog to HTML 'name' attribute used to group radios for unique selection.
849
825
  * @type {?}
850
826
  */
851
- MatRadioButton.prototype.name;
827
+ _MatRadioButtonBase.prototype.name;
852
828
  /**
853
829
  * Used to set the 'aria-label' attribute on the underlying input element.
854
830
  * @type {?}
855
831
  */
856
- MatRadioButton.prototype.ariaLabel;
832
+ _MatRadioButtonBase.prototype.ariaLabel;
857
833
  /**
858
834
  * The 'aria-labelledby' attribute takes precedence as the element's text alternative.
859
835
  * @type {?}
860
836
  */
861
- MatRadioButton.prototype.ariaLabelledby;
837
+ _MatRadioButtonBase.prototype.ariaLabelledby;
862
838
  /**
863
839
  * The 'aria-describedby' attribute is read after the element's label and field type.
864
840
  * @type {?}
865
841
  */
866
- MatRadioButton.prototype.ariaDescribedby;
842
+ _MatRadioButtonBase.prototype.ariaDescribedby;
867
843
  /**
868
844
  * @type {?}
869
845
  * @private
870
846
  */
871
- MatRadioButton.prototype._labelPosition;
847
+ _MatRadioButtonBase.prototype._labelPosition;
872
848
  /**
873
849
  * @type {?}
874
850
  * @private
875
851
  */
876
- MatRadioButton.prototype._color;
852
+ _MatRadioButtonBase.prototype._color;
877
853
  /**
878
854
  * Event emitted when the checked state of this radio button changes.
879
855
  * Change events are only emitted when the value changes due to user interaction with
880
856
  * the radio button (the same behavior as `<input type-"radio">`).
881
857
  * @type {?}
882
858
  */
883
- MatRadioButton.prototype.change;
859
+ _MatRadioButtonBase.prototype.change;
884
860
  /**
885
861
  * The parent radio group. May or may not be present.
886
862
  * @type {?}
887
863
  */
888
- MatRadioButton.prototype.radioGroup;
864
+ _MatRadioButtonBase.prototype.radioGroup;
889
865
  /**
890
866
  * Whether this radio is checked.
891
867
  * @type {?}
892
868
  * @private
893
869
  */
894
- MatRadioButton.prototype._checked;
870
+ _MatRadioButtonBase.prototype._checked;
895
871
  /**
896
872
  * Whether this radio is disabled.
897
873
  * @type {?}
898
874
  * @private
899
875
  */
900
- MatRadioButton.prototype._disabled;
876
+ _MatRadioButtonBase.prototype._disabled;
901
877
  /**
902
878
  * Whether this radio is required.
903
879
  * @type {?}
904
880
  * @private
905
881
  */
906
- MatRadioButton.prototype._required;
882
+ _MatRadioButtonBase.prototype._required;
907
883
  /**
908
884
  * Value assigned to this radio.
909
885
  * @type {?}
910
886
  * @private
911
887
  */
912
- MatRadioButton.prototype._value;
888
+ _MatRadioButtonBase.prototype._value;
913
889
  /**
914
890
  * Unregister function for _radioDispatcher
915
891
  * @type {?}
916
892
  * @private
917
893
  */
918
- MatRadioButton.prototype._removeUniqueSelectionListener;
894
+ _MatRadioButtonBase.prototype._removeUniqueSelectionListener;
919
895
  /**
920
896
  * The native `<input type=radio>` element
921
897
  * @type {?}
922
898
  */
923
- MatRadioButton.prototype._inputElement;
899
+ _MatRadioButtonBase.prototype._inputElement;
924
900
  /**
925
901
  * @type {?}
926
902
  * @protected
927
903
  */
928
- MatRadioButton.prototype._changeDetector;
904
+ _MatRadioButtonBase.prototype._changeDetector;
929
905
  /**
930
906
  * @type {?}
931
907
  * @private
932
908
  */
933
- MatRadioButton.prototype._focusMonitor;
909
+ _MatRadioButtonBase.prototype._focusMonitor;
934
910
  /**
935
911
  * @type {?}
936
912
  * @private
937
913
  */
938
- MatRadioButton.prototype._radioDispatcher;
914
+ _MatRadioButtonBase.prototype._radioDispatcher;
939
915
  /** @type {?} */
940
- MatRadioButton.prototype._animationMode;
916
+ _MatRadioButtonBase.prototype._animationMode;
941
917
  /**
942
918
  * @type {?}
943
919
  * @private
944
920
  */
945
- MatRadioButton.prototype._providerOverride;
921
+ _MatRadioButtonBase.prototype._providerOverride;
946
922
  }
923
+ /**
924
+ * A Material design radio-button. Typically placed inside of `<mat-radio-group>` elements.
925
+ */
926
+ class MatRadioButton extends _MatRadioButtonBase {
927
+ }
928
+ MatRadioButton.decorators = [
929
+ { type: Component, args: [{
930
+ selector: 'mat-radio-button',
931
+ template: "<!-- TODO(jelbourn): render the radio on either side of the content -->\n<!-- TODO(mtlin): Evaluate trade-offs of using native radio vs. cost of additional bindings. -->\n<label [attr.for]=\"inputId\" class=\"mat-radio-label\" #label>\n <!-- The actual 'radio' part of the control. -->\n <div class=\"mat-radio-container\">\n <div class=\"mat-radio-outer-circle\"></div>\n <div class=\"mat-radio-inner-circle\"></div>\n <input #input class=\"mat-radio-input cdk-visually-hidden\" type=\"radio\"\n [id]=\"inputId\"\n [checked]=\"checked\"\n [disabled]=\"disabled\"\n [tabIndex]=\"tabIndex\"\n [attr.name]=\"name\"\n [attr.value]=\"value\"\n [required]=\"required\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-labelledby]=\"ariaLabelledby\"\n [attr.aria-describedby]=\"ariaDescribedby\"\n (change)=\"_onInputChange($event)\"\n (click)=\"_onInputClick($event)\">\n\n <!-- The ripple comes after the input so that we can target it with a CSS\n sibling selector when the input is focused. -->\n <div mat-ripple class=\"mat-radio-ripple mat-focus-indicator\"\n [matRippleTrigger]=\"label\"\n [matRippleDisabled]=\"_isRippleDisabled()\"\n [matRippleCentered]=\"true\"\n [matRippleRadius]=\"20\"\n [matRippleAnimation]=\"{enterDuration: 150}\">\n\n <div class=\"mat-ripple-element mat-radio-persistent-ripple\"></div>\n </div>\n </div>\n\n <!-- The label content for radio control. -->\n <div class=\"mat-radio-label-content\" [class.mat-radio-label-before]=\"labelPosition == 'before'\">\n <!-- Add an invisible span so JAWS can read the label -->\n <span style=\"display:none\">&nbsp;</span>\n <ng-content></ng-content>\n </div>\n</label>\n",
932
+ inputs: ['disableRipple', 'tabIndex'],
933
+ encapsulation: ViewEncapsulation.None,
934
+ exportAs: 'matRadioButton',
935
+ host: {
936
+ 'class': 'mat-radio-button',
937
+ '[class.mat-radio-checked]': 'checked',
938
+ '[class.mat-radio-disabled]': 'disabled',
939
+ '[class._mat-animation-noopable]': '_animationMode === "NoopAnimations"',
940
+ '[class.mat-primary]': 'color === "primary"',
941
+ '[class.mat-accent]': 'color === "accent"',
942
+ '[class.mat-warn]': 'color === "warn"',
943
+ // Needs to be -1 so the `focus` event still fires.
944
+ '[attr.tabindex]': '-1',
945
+ '[attr.id]': 'id',
946
+ '[attr.aria-label]': 'null',
947
+ '[attr.aria-labelledby]': 'null',
948
+ '[attr.aria-describedby]': 'null',
949
+ // Note: under normal conditions focus shouldn't land on this element, however it may be
950
+ // programmatically set, for example inside of a focus trap, in this case we want to forward
951
+ // the focus to the native element.
952
+ '(focus)': '_inputElement.nativeElement.focus()',
953
+ },
954
+ changeDetection: ChangeDetectionStrategy.OnPush,
955
+ styles: [".mat-radio-button{display:inline-block;-webkit-tap-highlight-color:transparent;outline:0}.mat-radio-label{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;display:inline-flex;align-items:center;white-space:nowrap;vertical-align:middle;width:100%}.mat-radio-container{box-sizing:border-box;display:inline-block;position:relative;width:20px;height:20px;flex-shrink:0}.mat-radio-outer-circle{box-sizing:border-box;height:20px;left:0;position:absolute;top:0;transition:border-color ease 280ms;width:20px;border-width:2px;border-style:solid;border-radius:50%}._mat-animation-noopable .mat-radio-outer-circle{transition:none}.mat-radio-inner-circle{border-radius:50%;box-sizing:border-box;height:20px;left:0;position:absolute;top:0;transition:transform ease 280ms,background-color ease 280ms;width:20px;transform:scale(0.001)}._mat-animation-noopable .mat-radio-inner-circle{transition:none}.mat-radio-checked .mat-radio-inner-circle{transform:scale(0.5)}.cdk-high-contrast-active .mat-radio-checked .mat-radio-inner-circle{border:solid 10px}.mat-radio-label-content{-webkit-user-select:auto;-moz-user-select:auto;-ms-user-select:auto;user-select:auto;display:inline-block;order:0;line-height:inherit;padding-left:8px;padding-right:0}[dir=rtl] .mat-radio-label-content{padding-right:8px;padding-left:0}.mat-radio-label-content.mat-radio-label-before{order:-1;padding-left:0;padding-right:8px}[dir=rtl] .mat-radio-label-content.mat-radio-label-before{padding-right:0;padding-left:8px}.mat-radio-disabled,.mat-radio-disabled .mat-radio-label{cursor:default}.mat-radio-button .mat-radio-ripple{position:absolute;left:calc(50% - 20px);top:calc(50% - 20px);height:40px;width:40px;z-index:1;pointer-events:none}.mat-radio-button .mat-radio-ripple .mat-ripple-element:not(.mat-radio-persistent-ripple){opacity:.16}.mat-radio-persistent-ripple{width:100%;height:100%;transform:none}.mat-radio-container:hover .mat-radio-persistent-ripple{opacity:.04}.mat-radio-button:not(.mat-radio-disabled).cdk-keyboard-focused .mat-radio-persistent-ripple,.mat-radio-button:not(.mat-radio-disabled).cdk-program-focused .mat-radio-persistent-ripple{opacity:.12}.mat-radio-persistent-ripple,.mat-radio-disabled .mat-radio-container:hover .mat-radio-persistent-ripple{opacity:0}@media(hover: none){.mat-radio-container:hover .mat-radio-persistent-ripple{display:none}}.mat-radio-input{bottom:0;left:50%}.cdk-high-contrast-active .mat-radio-disabled{opacity:.5}\n"]
956
+ }] }
957
+ ];
947
958
 
948
959
  /**
949
960
  * @fileoverview added by tsickle
@@ -970,5 +981,5 @@ MatRadioModule.decorators = [
970
981
  * Generated bundle index. Do not edit.
971
982
  */
972
983
 
973
- export { MAT_RADIO_DEFAULT_OPTIONS, MAT_RADIO_DEFAULT_OPTIONS_FACTORY, MAT_RADIO_GROUP_CONTROL_VALUE_ACCESSOR, MatRadioButton, MatRadioChange, MatRadioGroup, MatRadioModule };
984
+ export { MAT_RADIO_DEFAULT_OPTIONS, MAT_RADIO_DEFAULT_OPTIONS_FACTORY, MAT_RADIO_GROUP_CONTROL_VALUE_ACCESSOR, MatRadioButton, MatRadioChange, MatRadioGroup, MatRadioModule, _MatRadioButtonBase };
974
985
  //# sourceMappingURL=radio.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"radio.js","sources":["../../../../../../src/material/radio/radio.ts","../../../../../../src/material/radio/radio-module.ts","../../../../../../src/material/radio/index.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {FocusMonitor} from '@angular/cdk/a11y';\nimport {BooleanInput, coerceBooleanProperty} from '@angular/cdk/coercion';\nimport {UniqueSelectionDispatcher} from '@angular/cdk/collections';\nimport {\n AfterContentInit,\n AfterViewInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChildren,\n Directive,\n ElementRef,\n EventEmitter,\n forwardRef,\n Inject,\n InjectionToken,\n Input,\n OnDestroy,\n OnInit,\n Optional,\n Output,\n QueryList,\n ViewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport {ControlValueAccessor, NG_VALUE_ACCESSOR} from '@angular/forms';\nimport {\n CanDisableRipple,\n CanDisableRippleCtor,\n HasTabIndex,\n HasTabIndexCtor,\n mixinDisableRipple,\n mixinTabIndex,\n ThemePalette,\n} from '@angular/material/core';\nimport {ANIMATION_MODULE_TYPE} from '@angular/platform-browser/animations';\n\n\nexport interface MatRadioDefaultOptions {\n color: ThemePalette;\n}\n\nexport const MAT_RADIO_DEFAULT_OPTIONS =\n new InjectionToken<MatRadioDefaultOptions>('mat-radio-default-options', {\n providedIn: 'root',\n factory: MAT_RADIO_DEFAULT_OPTIONS_FACTORY\n});\n\nexport function MAT_RADIO_DEFAULT_OPTIONS_FACTORY(): MatRadioDefaultOptions {\n return {\n color: 'accent'\n };\n}\n\n// Increasing integer for generating unique ids for radio components.\nlet nextUniqueId = 0;\n\n/**\n * Provider Expression that allows mat-radio-group to register as a ControlValueAccessor. This\n * allows it to support [(ngModel)] and ngControl.\n * @docs-private\n */\nexport const MAT_RADIO_GROUP_CONTROL_VALUE_ACCESSOR: any = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => MatRadioGroup),\n multi: true\n};\n\n/** Change event object emitted by MatRadio and MatRadioGroup. */\nexport class MatRadioChange {\n constructor(\n /** The MatRadioButton that emits the change event. */\n public source: MatRadioButton,\n /** The value of the MatRadioButton. */\n public value: any) {}\n}\n\n/**\n * A group of radio buttons. May contain one or more `<mat-radio-button>` elements.\n */\n@Directive({\n selector: 'mat-radio-group',\n exportAs: 'matRadioGroup',\n providers: [MAT_RADIO_GROUP_CONTROL_VALUE_ACCESSOR],\n host: {\n 'role': 'radiogroup',\n 'class': 'mat-radio-group',\n },\n})\nexport class MatRadioGroup implements AfterContentInit, ControlValueAccessor {\n /** Selected value for the radio group. */\n private _value: any = null;\n\n /** The HTML name attribute applied to radio buttons in this group. */\n private _name: string = `mat-radio-group-${nextUniqueId++}`;\n\n /** The currently selected radio button. Should match value. */\n private _selected: MatRadioButton | null = null;\n\n /** Whether the `value` has been set to its initial value. */\n private _isInitialized: boolean = false;\n\n /** Whether the labels should appear after or before the radio-buttons. Defaults to 'after' */\n private _labelPosition: 'before' | 'after' = 'after';\n\n /** Whether the radio group is disabled. */\n private _disabled: boolean = false;\n\n /** Whether the radio group is required. */\n private _required: boolean = false;\n\n /** The method to be called in order to update ngModel */\n _controlValueAccessorChangeFn: (value: any) => void = () => {};\n\n /**\n * onTouch function registered via registerOnTouch (ControlValueAccessor).\n * @docs-private\n */\n onTouched: () => any = () => {};\n\n /**\n * Event emitted when the group value changes.\n * Change events are only emitted when the value changes due to user interaction with\n * a radio button (the same behavior as `<input type-\"radio\">`).\n */\n @Output() readonly change: EventEmitter<MatRadioChange> = new EventEmitter<MatRadioChange>();\n\n /** Child radio buttons. */\n @ContentChildren(forwardRef(() => MatRadioButton), { descendants: true })\n _radios: QueryList<MatRadioButton>;\n\n /** Theme color for all of the radio buttons in the group. */\n @Input() color: ThemePalette;\n\n /** Name of the radio button group. All radio buttons inside this group will use this name. */\n @Input()\n get name(): string { return this._name; }\n set name(value: string) {\n this._name = value;\n this._updateRadioButtonNames();\n }\n\n /** Whether the labels should appear after or before the radio-buttons. Defaults to 'after' */\n @Input()\n get labelPosition(): 'before' | 'after' {\n return this._labelPosition;\n }\n set labelPosition(v) {\n this._labelPosition = v === 'before' ? 'before' : 'after';\n this._markRadiosForCheck();\n }\n\n /**\n * Value for the radio-group. Should equal the value of the selected radio button if there is\n * a corresponding radio button with a matching value. If there is not such a corresponding\n * radio button, this value persists to be applied in case a new radio button is added with a\n * matching value.\n */\n @Input()\n get value(): any { return this._value; }\n set value(newValue: any) {\n if (this._value !== newValue) {\n // Set this before proceeding to ensure no circular loop occurs with selection.\n this._value = newValue;\n\n this._updateSelectedRadioFromValue();\n this._checkSelectedRadioButton();\n }\n }\n\n _checkSelectedRadioButton() {\n if (this._selected && !this._selected.checked) {\n this._selected.checked = true;\n }\n }\n\n /**\n * The currently selected radio button. If set to a new radio button, the radio group value\n * will be updated to match the new selected button.\n */\n @Input()\n get selected() { return this._selected; }\n set selected(selected: MatRadioButton | null) {\n this._selected = selected;\n this.value = selected ? selected.value : null;\n this._checkSelectedRadioButton();\n }\n\n /** Whether the radio group is disabled */\n @Input()\n get disabled(): boolean { return this._disabled; }\n set disabled(value) {\n this._disabled = coerceBooleanProperty(value);\n this._markRadiosForCheck();\n }\n\n /** Whether the radio group is required */\n @Input()\n get required(): boolean { return this._required; }\n set required(value: boolean) {\n this._required = coerceBooleanProperty(value);\n this._markRadiosForCheck();\n }\n\n constructor(private _changeDetector: ChangeDetectorRef) { }\n\n /**\n * Initialize properties once content children are available.\n * This allows us to propagate relevant attributes to associated buttons.\n */\n ngAfterContentInit() {\n // Mark this component as initialized in AfterContentInit because the initial value can\n // possibly be set by NgModel on MatRadioGroup, and it is possible that the OnInit of the\n // NgModel occurs *after* the OnInit of the MatRadioGroup.\n this._isInitialized = true;\n }\n\n /**\n * Mark this group as being \"touched\" (for ngModel). Meant to be called by the contained\n * radio buttons upon their blur.\n */\n _touch() {\n if (this.onTouched) {\n this.onTouched();\n }\n }\n\n private _updateRadioButtonNames(): void {\n if (this._radios) {\n this._radios.forEach(radio => {\n radio.name = this.name;\n radio._markForCheck();\n });\n }\n }\n\n /** Updates the `selected` radio button from the internal _value state. */\n private _updateSelectedRadioFromValue(): void {\n // If the value already matches the selected radio, do nothing.\n const isAlreadySelected = this._selected !== null && this._selected.value === this._value;\n\n if (this._radios && !isAlreadySelected) {\n this._selected = null;\n this._radios.forEach(radio => {\n radio.checked = this.value === radio.value;\n if (radio.checked) {\n this._selected = radio;\n }\n });\n }\n }\n\n /** Dispatch change event with current selection and group value. */\n _emitChangeEvent(): void {\n if (this._isInitialized) {\n this.change.emit(new MatRadioChange(this._selected!, this._value));\n }\n }\n\n _markRadiosForCheck() {\n if (this._radios) {\n this._radios.forEach(radio => radio._markForCheck());\n }\n }\n\n /**\n * Sets the model value. Implemented as part of ControlValueAccessor.\n * @param value\n */\n writeValue(value: any) {\n this.value = value;\n this._changeDetector.markForCheck();\n }\n\n /**\n * Registers a callback to be triggered when the model value changes.\n * Implemented as part of ControlValueAccessor.\n * @param fn Callback to be registered.\n */\n registerOnChange(fn: (value: any) => void) {\n this._controlValueAccessorChangeFn = fn;\n }\n\n /**\n * Registers a callback to be triggered when the control is touched.\n * Implemented as part of ControlValueAccessor.\n * @param fn Callback to be registered.\n */\n registerOnTouched(fn: any) {\n this.onTouched = fn;\n }\n\n /**\n * Sets the disabled state of the control. Implemented as a part of ControlValueAccessor.\n * @param isDisabled Whether the control should be disabled.\n */\n setDisabledState(isDisabled: boolean) {\n this.disabled = isDisabled;\n this._changeDetector.markForCheck();\n }\n\n static ngAcceptInputType_disabled: BooleanInput;\n static ngAcceptInputType_required: BooleanInput;\n}\n\n// Boilerplate for applying mixins to MatRadioButton.\n/** @docs-private */\nclass MatRadioButtonBase {\n // Since the disabled property is manually defined for the MatRadioButton and isn't set up in\n // the mixin base class. To be able to use the tabindex mixin, a disabled property must be\n // defined to properly work.\n disabled: boolean;\n\n constructor(public _elementRef: ElementRef) {}\n}\n// As per Material design specifications the selection control radio should use the accent color\n// palette by default. https://material.io/guidelines/components/selection-controls.html\nconst _MatRadioButtonMixinBase:\n CanDisableRippleCtor & HasTabIndexCtor & typeof MatRadioButtonBase =\n mixinDisableRipple(mixinTabIndex(MatRadioButtonBase));\n\n/**\n * A Material design radio-button. Typically placed inside of `<mat-radio-group>` elements.\n */\n@Component({\n selector: 'mat-radio-button',\n templateUrl: 'radio.html',\n styleUrls: ['radio.css'],\n inputs: ['disableRipple', 'tabIndex'],\n encapsulation: ViewEncapsulation.None,\n exportAs: 'matRadioButton',\n host: {\n 'class': 'mat-radio-button',\n '[class.mat-radio-checked]': 'checked',\n '[class.mat-radio-disabled]': 'disabled',\n '[class._mat-animation-noopable]': '_animationMode === \"NoopAnimations\"',\n '[class.mat-primary]': 'color === \"primary\"',\n '[class.mat-accent]': 'color === \"accent\"',\n '[class.mat-warn]': 'color === \"warn\"',\n // Needs to be -1 so the `focus` event still fires.\n '[attr.tabindex]': '-1',\n '[attr.id]': 'id',\n '[attr.aria-label]': 'null',\n '[attr.aria-labelledby]': 'null',\n '[attr.aria-describedby]': 'null',\n // Note: under normal conditions focus shouldn't land on this element, however it may be\n // programmatically set, for example inside of a focus trap, in this case we want to forward\n // the focus to the native element.\n '(focus)': '_inputElement.nativeElement.focus()',\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class MatRadioButton extends _MatRadioButtonMixinBase\n implements OnInit, AfterViewInit, OnDestroy, CanDisableRipple, HasTabIndex {\n\n private _uniqueId: string = `mat-radio-${++nextUniqueId}`;\n\n /** The unique ID for the radio button. */\n @Input() id: string = this._uniqueId;\n\n /** Analog to HTML 'name' attribute used to group radios for unique selection. */\n @Input() name: string;\n\n /** Used to set the 'aria-label' attribute on the underlying input element. */\n @Input('aria-label') ariaLabel: string;\n\n /** The 'aria-labelledby' attribute takes precedence as the element's text alternative. */\n @Input('aria-labelledby') ariaLabelledby: string;\n\n /** The 'aria-describedby' attribute is read after the element's label and field type. */\n @Input('aria-describedby') ariaDescribedby: string;\n\n /** Whether this radio button is checked. */\n @Input()\n get checked(): boolean { return this._checked; }\n set checked(value: boolean) {\n const newCheckedState = coerceBooleanProperty(value);\n if (this._checked !== newCheckedState) {\n this._checked = newCheckedState;\n if (newCheckedState && this.radioGroup && this.radioGroup.value !== this.value) {\n this.radioGroup.selected = this;\n } else if (!newCheckedState && this.radioGroup && this.radioGroup.value === this.value) {\n\n // When unchecking the selected radio button, update the selected radio\n // property on the group.\n this.radioGroup.selected = null;\n }\n\n if (newCheckedState) {\n // Notify all radio buttons with the same name to un-check.\n this._radioDispatcher.notify(this.id, this.name);\n }\n this._changeDetector.markForCheck();\n }\n }\n\n /** The value of this radio button. */\n @Input()\n get value(): any { return this._value; }\n set value(value: any) {\n if (this._value !== value) {\n this._value = value;\n if (this.radioGroup !== null) {\n if (!this.checked) {\n // Update checked when the value changed to match the radio group's value\n this.checked = this.radioGroup.value === value;\n }\n if (this.checked) {\n this.radioGroup.selected = this;\n }\n }\n }\n }\n\n /** Whether the label should appear after or before the radio button. Defaults to 'after' */\n @Input()\n get labelPosition(): 'before' | 'after' {\n return this._labelPosition || (this.radioGroup && this.radioGroup.labelPosition) || 'after';\n }\n set labelPosition(value) {\n this._labelPosition = value;\n }\n private _labelPosition: 'before' | 'after';\n\n /** Whether the radio button is disabled. */\n @Input()\n get disabled(): boolean {\n return this._disabled || (this.radioGroup !== null && this.radioGroup.disabled);\n }\n set disabled(value: boolean) {\n this._setDisabled(coerceBooleanProperty(value));\n }\n\n /** Whether the radio button is required. */\n @Input()\n get required(): boolean {\n return this._required || (this.radioGroup && this.radioGroup.required);\n }\n set required(value: boolean) {\n this._required = coerceBooleanProperty(value);\n }\n\n /** Theme color of the radio button. */\n @Input()\n get color(): ThemePalette {\n return this._color ||\n (this.radioGroup && this.radioGroup.color) ||\n this._providerOverride && this._providerOverride.color || 'accent';\n }\n set color(newValue: ThemePalette) { this._color = newValue; }\n private _color: ThemePalette;\n\n /**\n * Event emitted when the checked state of this radio button changes.\n * Change events are only emitted when the value changes due to user interaction with\n * the radio button (the same behavior as `<input type-\"radio\">`).\n */\n @Output() readonly change: EventEmitter<MatRadioChange> = new EventEmitter<MatRadioChange>();\n\n /** The parent radio group. May or may not be present. */\n radioGroup: MatRadioGroup;\n\n /** ID of the native input element inside `<mat-radio-button>` */\n get inputId(): string { return `${this.id || this._uniqueId}-input`; }\n\n /** Whether this radio is checked. */\n private _checked: boolean = false;\n\n /** Whether this radio is disabled. */\n private _disabled: boolean;\n\n /** Whether this radio is required. */\n private _required: boolean;\n\n /** Value assigned to this radio. */\n private _value: any = null;\n\n /** Unregister function for _radioDispatcher */\n private _removeUniqueSelectionListener: () => void = () => {};\n\n /** The native `<input type=radio>` element */\n @ViewChild('input') _inputElement: ElementRef<HTMLInputElement>;\n\n constructor(@Optional() radioGroup: MatRadioGroup,\n elementRef: ElementRef,\n protected _changeDetector: ChangeDetectorRef,\n private _focusMonitor: FocusMonitor,\n private _radioDispatcher: UniqueSelectionDispatcher,\n @Optional() @Inject(ANIMATION_MODULE_TYPE) public _animationMode?: string,\n @Optional() @Inject(MAT_RADIO_DEFAULT_OPTIONS)\n private _providerOverride?: MatRadioDefaultOptions) {\n super(elementRef);\n\n // Assertions. Ideally these should be stripped out by the compiler.\n // TODO(jelbourn): Assert that there's no name binding AND a parent radio group.\n this.radioGroup = radioGroup;\n\n this._removeUniqueSelectionListener =\n _radioDispatcher.listen((id: string, name: string) => {\n if (id !== this.id && name === this.name) {\n this.checked = false;\n }\n });\n }\n\n /** Focuses the radio button. */\n focus(options?: FocusOptions): void {\n this._focusMonitor.focusVia(this._inputElement, 'keyboard', options);\n }\n\n /**\n * Marks the radio button as needing checking for change detection.\n * This method is exposed because the parent radio group will directly\n * update bound properties of the radio button.\n */\n _markForCheck() {\n // When group value changes, the button will not be notified. Use `markForCheck` to explicit\n // update radio button's status\n this._changeDetector.markForCheck();\n }\n\n ngOnInit() {\n if (this.radioGroup) {\n // If the radio is inside a radio group, determine if it should be checked\n this.checked = this.radioGroup.value === this._value;\n // Copy name from parent radio group\n this.name = this.radioGroup.name;\n }\n }\n\n ngAfterViewInit() {\n this._focusMonitor\n .monitor(this._elementRef, true)\n .subscribe(focusOrigin => {\n if (!focusOrigin && this.radioGroup) {\n this.radioGroup._touch();\n }\n });\n }\n\n ngOnDestroy() {\n this._focusMonitor.stopMonitoring(this._elementRef);\n this._removeUniqueSelectionListener();\n }\n\n /** Dispatch change event with current value. */\n private _emitChangeEvent(): void {\n this.change.emit(new MatRadioChange(this, this._value));\n }\n\n _isRippleDisabled() {\n return this.disableRipple || this.disabled;\n }\n\n _onInputClick(event: Event) {\n // We have to stop propagation for click events on the visual hidden input element.\n // By default, when a user clicks on a label element, a generated click event will be\n // dispatched on the associated input element. Since we are using a label element as our\n // root container, the click event on the `radio-button` will be executed twice.\n // The real click event will bubble up, and the generated click event also tries to bubble up.\n // This will lead to multiple click events.\n // Preventing bubbling for the second event will solve that issue.\n event.stopPropagation();\n }\n\n /**\n * Triggered when the radio button received a click or the input recognized any change.\n * Clicking on a label element, will trigger a change event on the associated input.\n */\n _onInputChange(event: Event) {\n // We always have to stop propagation on the change event.\n // Otherwise the change event, from the input element, will bubble up and\n // emit its event object to the `change` output.\n event.stopPropagation();\n\n const groupValueChanged = this.radioGroup && this.value !== this.radioGroup.value;\n this.checked = true;\n this._emitChangeEvent();\n\n if (this.radioGroup) {\n this.radioGroup._controlValueAccessorChangeFn(this.value);\n if (groupValueChanged) {\n this.radioGroup._emitChangeEvent();\n }\n }\n }\n\n /** Sets the disabled state and marks for check if a change occurred. */\n protected _setDisabled(value: boolean) {\n if (this._disabled !== value) {\n this._disabled = value;\n this._changeDetector.markForCheck();\n }\n }\n\n static ngAcceptInputType_checked: BooleanInput;\n static ngAcceptInputType_disabled: BooleanInput;\n static ngAcceptInputType_required: BooleanInput;\n static ngAcceptInputType_disableRipple: BooleanInput;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {NgModule} from '@angular/core';\nimport {MatCommonModule, MatRippleModule} from '@angular/material/core';\nimport {MatRadioButton, MatRadioGroup} from './radio';\n\n\n@NgModule({\n imports: [MatRippleModule, MatCommonModule],\n exports: [MatRadioGroup, MatRadioButton, MatCommonModule],\n declarations: [MatRadioGroup, MatRadioButton],\n})\nexport class MatRadioModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;AA8CA,qCAEC;;;IADC,uCAAoB;;;AAGtB,MAAa,yBAAyB,GACpC,IAAI,cAAc,CAAyB,2BAA2B,EAAE;IACxE,UAAU,EAAE,MAAM;IAClB,OAAO,EAAE,iCAAiC;CAC3C,CAAC;;;;AAEF,SAAgB,iCAAiC;IAC/C,OAAO;QACL,KAAK,EAAE,QAAQ;KAChB,CAAC;CACH;;;IAGG,YAAY,GAAG,CAAC;;;;;;;AAOpB,MAAa,sCAAsC,GAAQ;IACzD,OAAO,EAAE,iBAAiB;IAC1B,WAAW,EAAE,UAAU;;;IAAC,MAAM,aAAa,EAAC;IAC5C,KAAK,EAAE,IAAI;CACZ;;;;AAGD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GjD,yCAAmD;;;;;IAoDnD,wCAA2C;;;;;IA4B3C,gCAA6B;;;;;;;IAO7B,gCAA6F;;;;;IAG7F,oCAA0B;;;;;;IAM1B,kCAAkC;;;;;;IAGlC,mCAA2B;;;;;;IAG3B,mCAA2B;;;;;;IAG3B,gCAA2B;;;;;;IAG3B,wDAA8D;;;;;IAG9D,uCAAgE;;;;;IAIpD,yCAA4C;;;;;IAC5C,uCAAmC;;;;;IACnC,0CAAmD;;IACnD,wCAAyE;;;;;IACvE,2CACkD;;;;;;;;MCherD,cAAc;;;YAL1B,QAAQ,SAAC;gBACR,OAAO,EAAE,CAAC,eAAe,EAAE,eAAe,CAAC;gBAC3C,OAAO,EAAE,CAAC,aAAa,EAAE,cAAc,EAAE,eAAe,CAAC;gBACzD,YAAY,EAAE,CAAC,aAAa,EAAE,cAAc,CAAC;aAC9C;;;;;;;;;ACjBD;;GAEG;;;;"}
1
+ {"version":3,"file":"radio.js","sources":["../../../../../../src/material/radio/radio.ts","../../../../../../src/material/radio/radio-module.ts","../../../../../../src/material/radio/index.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {FocusMonitor} from '@angular/cdk/a11y';\nimport {BooleanInput, coerceBooleanProperty} from '@angular/cdk/coercion';\nimport {UniqueSelectionDispatcher} from '@angular/cdk/collections';\nimport {\n AfterContentInit,\n AfterViewInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChildren,\n Directive,\n ElementRef,\n EventEmitter,\n forwardRef,\n Inject,\n InjectionToken,\n Input,\n OnDestroy,\n OnInit,\n Optional,\n Output,\n QueryList,\n ViewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport {ControlValueAccessor, NG_VALUE_ACCESSOR} from '@angular/forms';\nimport {\n CanDisableRipple,\n CanDisableRippleCtor,\n HasTabIndex,\n HasTabIndexCtor,\n mixinDisableRipple,\n mixinTabIndex,\n ThemePalette,\n} from '@angular/material/core';\nimport {ANIMATION_MODULE_TYPE} from '@angular/platform-browser/animations';\n\n\nexport interface MatRadioDefaultOptions {\n color: ThemePalette;\n}\n\nexport const MAT_RADIO_DEFAULT_OPTIONS =\n new InjectionToken<MatRadioDefaultOptions>('mat-radio-default-options', {\n providedIn: 'root',\n factory: MAT_RADIO_DEFAULT_OPTIONS_FACTORY\n});\n\nexport function MAT_RADIO_DEFAULT_OPTIONS_FACTORY(): MatRadioDefaultOptions {\n return {\n color: 'accent'\n };\n}\n\n// Increasing integer for generating unique ids for radio components.\nlet nextUniqueId = 0;\n\n/**\n * Provider Expression that allows mat-radio-group to register as a ControlValueAccessor. This\n * allows it to support [(ngModel)] and ngControl.\n * @docs-private\n */\nexport const MAT_RADIO_GROUP_CONTROL_VALUE_ACCESSOR: any = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => MatRadioGroup),\n multi: true\n};\n\n/** Change event object emitted by MatRadio and MatRadioGroup. */\nexport class MatRadioChange {\n constructor(\n /** The MatRadioButton that emits the change event. */\n public source: MatRadioButton,\n /** The value of the MatRadioButton. */\n public value: any) {}\n}\n\n/**\n * A group of radio buttons. May contain one or more `<mat-radio-button>` elements.\n */\n@Directive({\n selector: 'mat-radio-group',\n exportAs: 'matRadioGroup',\n providers: [MAT_RADIO_GROUP_CONTROL_VALUE_ACCESSOR],\n host: {\n 'role': 'radiogroup',\n 'class': 'mat-radio-group',\n },\n})\nexport class MatRadioGroup implements AfterContentInit, ControlValueAccessor {\n /** Selected value for the radio group. */\n private _value: any = null;\n\n /** The HTML name attribute applied to radio buttons in this group. */\n private _name: string = `mat-radio-group-${nextUniqueId++}`;\n\n /** The currently selected radio button. Should match value. */\n private _selected: MatRadioButton | null = null;\n\n /** Whether the `value` has been set to its initial value. */\n private _isInitialized: boolean = false;\n\n /** Whether the labels should appear after or before the radio-buttons. Defaults to 'after' */\n private _labelPosition: 'before' | 'after' = 'after';\n\n /** Whether the radio group is disabled. */\n private _disabled: boolean = false;\n\n /** Whether the radio group is required. */\n private _required: boolean = false;\n\n /** The method to be called in order to update ngModel */\n _controlValueAccessorChangeFn: (value: any) => void = () => {};\n\n /**\n * onTouch function registered via registerOnTouch (ControlValueAccessor).\n * @docs-private\n */\n onTouched: () => any = () => {};\n\n /**\n * Event emitted when the group value changes.\n * Change events are only emitted when the value changes due to user interaction with\n * a radio button (the same behavior as `<input type-\"radio\">`).\n */\n @Output() readonly change: EventEmitter<MatRadioChange> = new EventEmitter<MatRadioChange>();\n\n /** Child radio buttons. */\n @ContentChildren(forwardRef(() => MatRadioButton), { descendants: true })\n _radios: QueryList<MatRadioButton>;\n\n /** Theme color for all of the radio buttons in the group. */\n @Input() color: ThemePalette;\n\n /** Name of the radio button group. All radio buttons inside this group will use this name. */\n @Input()\n get name(): string { return this._name; }\n set name(value: string) {\n this._name = value;\n this._updateRadioButtonNames();\n }\n\n /** Whether the labels should appear after or before the radio-buttons. Defaults to 'after' */\n @Input()\n get labelPosition(): 'before' | 'after' {\n return this._labelPosition;\n }\n set labelPosition(v) {\n this._labelPosition = v === 'before' ? 'before' : 'after';\n this._markRadiosForCheck();\n }\n\n /**\n * Value for the radio-group. Should equal the value of the selected radio button if there is\n * a corresponding radio button with a matching value. If there is not such a corresponding\n * radio button, this value persists to be applied in case a new radio button is added with a\n * matching value.\n */\n @Input()\n get value(): any { return this._value; }\n set value(newValue: any) {\n if (this._value !== newValue) {\n // Set this before proceeding to ensure no circular loop occurs with selection.\n this._value = newValue;\n\n this._updateSelectedRadioFromValue();\n this._checkSelectedRadioButton();\n }\n }\n\n _checkSelectedRadioButton() {\n if (this._selected && !this._selected.checked) {\n this._selected.checked = true;\n }\n }\n\n /**\n * The currently selected radio button. If set to a new radio button, the radio group value\n * will be updated to match the new selected button.\n */\n @Input()\n get selected() { return this._selected; }\n set selected(selected: MatRadioButton | null) {\n this._selected = selected;\n this.value = selected ? selected.value : null;\n this._checkSelectedRadioButton();\n }\n\n /** Whether the radio group is disabled */\n @Input()\n get disabled(): boolean { return this._disabled; }\n set disabled(value) {\n this._disabled = coerceBooleanProperty(value);\n this._markRadiosForCheck();\n }\n\n /** Whether the radio group is required */\n @Input()\n get required(): boolean { return this._required; }\n set required(value: boolean) {\n this._required = coerceBooleanProperty(value);\n this._markRadiosForCheck();\n }\n\n constructor(private _changeDetector: ChangeDetectorRef) { }\n\n /**\n * Initialize properties once content children are available.\n * This allows us to propagate relevant attributes to associated buttons.\n */\n ngAfterContentInit() {\n // Mark this component as initialized in AfterContentInit because the initial value can\n // possibly be set by NgModel on MatRadioGroup, and it is possible that the OnInit of the\n // NgModel occurs *after* the OnInit of the MatRadioGroup.\n this._isInitialized = true;\n }\n\n /**\n * Mark this group as being \"touched\" (for ngModel). Meant to be called by the contained\n * radio buttons upon their blur.\n */\n _touch() {\n if (this.onTouched) {\n this.onTouched();\n }\n }\n\n private _updateRadioButtonNames(): void {\n if (this._radios) {\n this._radios.forEach(radio => {\n radio.name = this.name;\n radio._markForCheck();\n });\n }\n }\n\n /** Updates the `selected` radio button from the internal _value state. */\n private _updateSelectedRadioFromValue(): void {\n // If the value already matches the selected radio, do nothing.\n const isAlreadySelected = this._selected !== null && this._selected.value === this._value;\n\n if (this._radios && !isAlreadySelected) {\n this._selected = null;\n this._radios.forEach(radio => {\n radio.checked = this.value === radio.value;\n if (radio.checked) {\n this._selected = radio;\n }\n });\n }\n }\n\n /** Dispatch change event with current selection and group value. */\n _emitChangeEvent(): void {\n if (this._isInitialized) {\n this.change.emit(new MatRadioChange(this._selected!, this._value));\n }\n }\n\n _markRadiosForCheck() {\n if (this._radios) {\n this._radios.forEach(radio => radio._markForCheck());\n }\n }\n\n /**\n * Sets the model value. Implemented as part of ControlValueAccessor.\n * @param value\n */\n writeValue(value: any) {\n this.value = value;\n this._changeDetector.markForCheck();\n }\n\n /**\n * Registers a callback to be triggered when the model value changes.\n * Implemented as part of ControlValueAccessor.\n * @param fn Callback to be registered.\n */\n registerOnChange(fn: (value: any) => void) {\n this._controlValueAccessorChangeFn = fn;\n }\n\n /**\n * Registers a callback to be triggered when the control is touched.\n * Implemented as part of ControlValueAccessor.\n * @param fn Callback to be registered.\n */\n registerOnTouched(fn: any) {\n this.onTouched = fn;\n }\n\n /**\n * Sets the disabled state of the control. Implemented as a part of ControlValueAccessor.\n * @param isDisabled Whether the control should be disabled.\n */\n setDisabledState(isDisabled: boolean) {\n this.disabled = isDisabled;\n this._changeDetector.markForCheck();\n }\n\n static ngAcceptInputType_disabled: BooleanInput;\n static ngAcceptInputType_required: BooleanInput;\n}\n\n// Boilerplate for applying mixins to MatRadioButton.\n/** @docs-private */\nclass MatRadioButtonBase {\n // Since the disabled property is manually defined for the MatRadioButton and isn't set up in\n // the mixin base class. To be able to use the tabindex mixin, a disabled property must be\n // defined to properly work.\n disabled: boolean;\n\n constructor(public _elementRef: ElementRef) {}\n}\n// As per Material design specifications the selection control radio should use the accent color\n// palette by default. https://material.io/guidelines/components/selection-controls.html\nconst _MatRadioButtonMixinBase:\n CanDisableRippleCtor & HasTabIndexCtor & typeof MatRadioButtonBase =\n mixinDisableRipple(mixinTabIndex(MatRadioButtonBase));\n\n/**\n * Base class with all of the `MatRadioButton` functionality.\n * @docs-private\n */\n@Directive()\n// tslint:disable-next-line:class-name\nexport abstract class _MatRadioButtonBase extends _MatRadioButtonMixinBase implements OnInit,\n AfterViewInit, OnDestroy, CanDisableRipple, HasTabIndex {\n\n private _uniqueId: string = `mat-radio-${++nextUniqueId}`;\n\n /** The unique ID for the radio button. */\n @Input() id: string = this._uniqueId;\n\n /** Analog to HTML 'name' attribute used to group radios for unique selection. */\n @Input() name: string;\n\n /** Used to set the 'aria-label' attribute on the underlying input element. */\n @Input('aria-label') ariaLabel: string;\n\n /** The 'aria-labelledby' attribute takes precedence as the element's text alternative. */\n @Input('aria-labelledby') ariaLabelledby: string;\n\n /** The 'aria-describedby' attribute is read after the element's label and field type. */\n @Input('aria-describedby') ariaDescribedby: string;\n\n /** Whether this radio button is checked. */\n @Input()\n get checked(): boolean { return this._checked; }\n set checked(value: boolean) {\n const newCheckedState = coerceBooleanProperty(value);\n if (this._checked !== newCheckedState) {\n this._checked = newCheckedState;\n if (newCheckedState && this.radioGroup && this.radioGroup.value !== this.value) {\n this.radioGroup.selected = this;\n } else if (!newCheckedState && this.radioGroup && this.radioGroup.value === this.value) {\n\n // When unchecking the selected radio button, update the selected radio\n // property on the group.\n this.radioGroup.selected = null;\n }\n\n if (newCheckedState) {\n // Notify all radio buttons with the same name to un-check.\n this._radioDispatcher.notify(this.id, this.name);\n }\n this._changeDetector.markForCheck();\n }\n }\n\n /** The value of this radio button. */\n @Input()\n get value(): any { return this._value; }\n set value(value: any) {\n if (this._value !== value) {\n this._value = value;\n if (this.radioGroup !== null) {\n if (!this.checked) {\n // Update checked when the value changed to match the radio group's value\n this.checked = this.radioGroup.value === value;\n }\n if (this.checked) {\n this.radioGroup.selected = this;\n }\n }\n }\n }\n\n /** Whether the label should appear after or before the radio button. Defaults to 'after' */\n @Input()\n get labelPosition(): 'before' | 'after' {\n return this._labelPosition || (this.radioGroup && this.radioGroup.labelPosition) || 'after';\n }\n set labelPosition(value) {\n this._labelPosition = value;\n }\n private _labelPosition: 'before' | 'after';\n\n /** Whether the radio button is disabled. */\n @Input()\n get disabled(): boolean {\n return this._disabled || (this.radioGroup !== null && this.radioGroup.disabled);\n }\n set disabled(value: boolean) {\n this._setDisabled(coerceBooleanProperty(value));\n }\n\n /** Whether the radio button is required. */\n @Input()\n get required(): boolean {\n return this._required || (this.radioGroup && this.radioGroup.required);\n }\n set required(value: boolean) {\n this._required = coerceBooleanProperty(value);\n }\n\n /** Theme color of the radio button. */\n @Input()\n get color(): ThemePalette {\n return this._color ||\n (this.radioGroup && this.radioGroup.color) ||\n this._providerOverride && this._providerOverride.color || 'accent';\n }\n set color(newValue: ThemePalette) { this._color = newValue; }\n private _color: ThemePalette;\n\n /**\n * Event emitted when the checked state of this radio button changes.\n * Change events are only emitted when the value changes due to user interaction with\n * the radio button (the same behavior as `<input type-\"radio\">`).\n */\n @Output() readonly change: EventEmitter<MatRadioChange> = new EventEmitter<MatRadioChange>();\n\n /** The parent radio group. May or may not be present. */\n radioGroup: MatRadioGroup;\n\n /** ID of the native input element inside `<mat-radio-button>` */\n get inputId(): string { return `${this.id || this._uniqueId}-input`; }\n\n /** Whether this radio is checked. */\n private _checked: boolean = false;\n\n /** Whether this radio is disabled. */\n private _disabled: boolean;\n\n /** Whether this radio is required. */\n private _required: boolean;\n\n /** Value assigned to this radio. */\n private _value: any = null;\n\n /** Unregister function for _radioDispatcher */\n private _removeUniqueSelectionListener: () => void = () => {};\n\n /** The native `<input type=radio>` element */\n @ViewChild('input') _inputElement: ElementRef<HTMLInputElement>;\n\n constructor(@Optional() radioGroup: MatRadioGroup,\n elementRef: ElementRef,\n protected _changeDetector: ChangeDetectorRef,\n private _focusMonitor: FocusMonitor,\n private _radioDispatcher: UniqueSelectionDispatcher,\n @Optional() @Inject(ANIMATION_MODULE_TYPE) public _animationMode?: string,\n @Optional() @Inject(MAT_RADIO_DEFAULT_OPTIONS)\n private _providerOverride?: MatRadioDefaultOptions) {\n super(elementRef);\n\n // Assertions. Ideally these should be stripped out by the compiler.\n // TODO(jelbourn): Assert that there's no name binding AND a parent radio group.\n this.radioGroup = radioGroup;\n\n this._removeUniqueSelectionListener =\n _radioDispatcher.listen((id: string, name: string) => {\n if (id !== this.id && name === this.name) {\n this.checked = false;\n }\n });\n }\n\n /** Focuses the radio button. */\n focus(options?: FocusOptions): void {\n this._focusMonitor.focusVia(this._inputElement, 'keyboard', options);\n }\n\n /**\n * Marks the radio button as needing checking for change detection.\n * This method is exposed because the parent radio group will directly\n * update bound properties of the radio button.\n */\n _markForCheck() {\n // When group value changes, the button will not be notified. Use `markForCheck` to explicit\n // update radio button's status\n this._changeDetector.markForCheck();\n }\n\n ngOnInit() {\n if (this.radioGroup) {\n // If the radio is inside a radio group, determine if it should be checked\n this.checked = this.radioGroup.value === this._value;\n // Copy name from parent radio group\n this.name = this.radioGroup.name;\n }\n }\n\n ngAfterViewInit() {\n this._focusMonitor\n .monitor(this._elementRef, true)\n .subscribe(focusOrigin => {\n if (!focusOrigin && this.radioGroup) {\n this.radioGroup._touch();\n }\n });\n }\n\n ngOnDestroy() {\n this._focusMonitor.stopMonitoring(this._elementRef);\n this._removeUniqueSelectionListener();\n }\n\n /** Dispatch change event with current value. */\n private _emitChangeEvent(): void {\n this.change.emit(new MatRadioChange(this, this._value));\n }\n\n _isRippleDisabled() {\n return this.disableRipple || this.disabled;\n }\n\n _onInputClick(event: Event) {\n // We have to stop propagation for click events on the visual hidden input element.\n // By default, when a user clicks on a label element, a generated click event will be\n // dispatched on the associated input element. Since we are using a label element as our\n // root container, the click event on the `radio-button` will be executed twice.\n // The real click event will bubble up, and the generated click event also tries to bubble up.\n // This will lead to multiple click events.\n // Preventing bubbling for the second event will solve that issue.\n event.stopPropagation();\n }\n\n /**\n * Triggered when the radio button received a click or the input recognized any change.\n * Clicking on a label element, will trigger a change event on the associated input.\n */\n _onInputChange(event: Event) {\n // We always have to stop propagation on the change event.\n // Otherwise the change event, from the input element, will bubble up and\n // emit its event object to the `change` output.\n event.stopPropagation();\n\n const groupValueChanged = this.radioGroup && this.value !== this.radioGroup.value;\n this.checked = true;\n this._emitChangeEvent();\n\n if (this.radioGroup) {\n this.radioGroup._controlValueAccessorChangeFn(this.value);\n if (groupValueChanged) {\n this.radioGroup._emitChangeEvent();\n }\n }\n }\n\n /** Sets the disabled state and marks for check if a change occurred. */\n protected _setDisabled(value: boolean) {\n if (this._disabled !== value) {\n this._disabled = value;\n this._changeDetector.markForCheck();\n }\n }\n\n static ngAcceptInputType_checked: BooleanInput;\n static ngAcceptInputType_disabled: BooleanInput;\n static ngAcceptInputType_required: BooleanInput;\n static ngAcceptInputType_disableRipple: BooleanInput;\n}\n\n\n/**\n * A Material design radio-button. Typically placed inside of `<mat-radio-group>` elements.\n */\n@Component({\n selector: 'mat-radio-button',\n templateUrl: 'radio.html',\n styleUrls: ['radio.css'],\n inputs: ['disableRipple', 'tabIndex'],\n encapsulation: ViewEncapsulation.None,\n exportAs: 'matRadioButton',\n host: {\n 'class': 'mat-radio-button',\n '[class.mat-radio-checked]': 'checked',\n '[class.mat-radio-disabled]': 'disabled',\n '[class._mat-animation-noopable]': '_animationMode === \"NoopAnimations\"',\n '[class.mat-primary]': 'color === \"primary\"',\n '[class.mat-accent]': 'color === \"accent\"',\n '[class.mat-warn]': 'color === \"warn\"',\n // Needs to be -1 so the `focus` event still fires.\n '[attr.tabindex]': '-1',\n '[attr.id]': 'id',\n '[attr.aria-label]': 'null',\n '[attr.aria-labelledby]': 'null',\n '[attr.aria-describedby]': 'null',\n // Note: under normal conditions focus shouldn't land on this element, however it may be\n // programmatically set, for example inside of a focus trap, in this case we want to forward\n // the focus to the native element.\n '(focus)': '_inputElement.nativeElement.focus()',\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class MatRadioButton extends _MatRadioButtonBase {\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {NgModule} from '@angular/core';\nimport {MatCommonModule, MatRippleModule} from '@angular/material/core';\nimport {MatRadioButton, MatRadioGroup} from './radio';\n\n\n@NgModule({\n imports: [MatRippleModule, MatCommonModule],\n exports: [MatRadioGroup, MatRadioButton, MatCommonModule],\n declarations: [MatRadioGroup, MatRadioButton],\n})\nexport class MatRadioModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;AA8CA,qCAEC;;;IADC,uCAAoB;;;AAGtB,MAAa,yBAAyB,GACpC,IAAI,cAAc,CAAyB,2BAA2B,EAAE;IACxE,UAAU,EAAE,MAAM;IAClB,OAAO,EAAE,iCAAiC;CAC3C,CAAC;;;;AAEF,SAAgB,iCAAiC;IAC/C,OAAO;QACL,K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AAE,kBAAkB;gBAC5B,2xDAAyB;gBAEzB,MAAM,EAAE,CAAC,eAAe,EAAE,UAAU,CAAC;gBACrC,aAAa,EAAE,iBAAiB,CAAC,IAAI;gBACrC,QAAQ,EAAE,gBAAgB;gBAC1B,IAAI,EAAE;oBACJ,OAAO,EAAE,kBAAkB;oBAC3B,2BAA2B,EAAE,SAAS;oBACtC,4BAA4B,EAAE,UAAU;oBACxC,iCAAiC,EAAE,qCAAqC;oBACxE,qBAAqB,EAAE,qBAAqB;oBAC5C,oBAAoB,EAAE,oBAAoB;oBAC1C,kBAAkB,EAAE,kBAAkB;;oBAEtC,iBAAiB,EAAE,IAAI;oBACvB,WAAW,EAAE,IAAI;oBACjB,mBAAmB,EAAE,MAAM;oBAC3B,wBAAwB,EAAE,MAAM;oBAChC,yBAAyB,EAAE,MAAM;;;;oBAIjC,SAAS,EAAE,qCAAqC;iBACjD;gBACD,eAAe,EAAE,uBAAuB,CAAC,MAAM;;aAChD;;;;;;;;MCrlBY,cAAc;;;YAL1B,QAAQ,SAAC;gBACR,OAAO,EAAE,CAAC,eAAe,EAAE,eAAe,CAAC;gBAC3C,OAAO,EAAE,CAAC,aAAa,EAAE,cAAc,EAAE,eAAe,CAAC;gBACzD,YAAY,EAAE,CAAC,aAAa,EAAE,cAAc,CAAC;aAC9C;;;;;;;;;ACjBD;;GAEG;;;;"}
@@ -10,14 +10,12 @@ import { MatOptionHarness, MatOptgroupHarness } from '@angular/material/core/tes
10
10
  * Use of this source code is governed by an MIT-style license that can be
11
11
  * found in the LICENSE file at https://angular.io/license
12
12
  */
13
- const PANEL_SELECTOR = '.mat-select-panel';
14
13
  /** Harness for interacting with a standard mat-select in tests. */
15
14
  class MatSelectHarness extends MatFormFieldControlHarness {
16
15
  constructor() {
17
16
  super(...arguments);
18
17
  this._documentRootLocator = this.documentRootLocatorFactory();
19
18
  this._backdrop = this._documentRootLocator.locatorFor('.cdk-overlay-backdrop');
20
- this._optionalPanel = this._documentRootLocator.locatorForOptional(PANEL_SELECTOR);
21
19
  this._trigger = this.locatorFor('.mat-select-trigger');
22
20
  this._value = this.locatorFor('.mat-select-value');
23
21
  }
@@ -82,19 +80,19 @@ class MatSelectHarness extends MatFormFieldControlHarness {
82
80
  /** Gets the options inside the select panel. */
83
81
  getOptions(filter = {}) {
84
82
  return __awaiter(this, void 0, void 0, function* () {
85
- return this._documentRootLocator.locatorForAll(MatOptionHarness.with(Object.assign(Object.assign({}, filter), { ancestor: PANEL_SELECTOR })))();
83
+ return this._documentRootLocator.locatorForAll(MatOptionHarness.with(Object.assign(Object.assign({}, filter), { ancestor: yield this._getPanelSelector() })))();
86
84
  });
87
85
  }
88
86
  /** Gets the groups of options inside the panel. */
89
87
  getOptionGroups(filter = {}) {
90
88
  return __awaiter(this, void 0, void 0, function* () {
91
- return this._documentRootLocator.locatorForAll(MatOptgroupHarness.with(Object.assign(Object.assign({}, filter), { ancestor: PANEL_SELECTOR })))();
89
+ return this._documentRootLocator.locatorForAll(MatOptgroupHarness.with(Object.assign(Object.assign({}, filter), { ancestor: yield this._getPanelSelector() })))();
92
90
  });
93
91
  }
94
92
  /** Gets whether the select is open. */
95
93
  isOpen() {
96
94
  return __awaiter(this, void 0, void 0, function* () {
97
- return !!(yield this._optionalPanel());
95
+ return !!(yield this._documentRootLocator.locatorForOptional(yield this._getPanelSelector())());
98
96
  });
99
97
  }
100
98
  /** Opens the select's panel. */
@@ -135,6 +133,13 @@ class MatSelectHarness extends MatFormFieldControlHarness {
135
133
  }
136
134
  });
137
135
  }
136
+ /** Gets the selector that should be used to find this select's panel. */
137
+ _getPanelSelector() {
138
+ return __awaiter(this, void 0, void 0, function* () {
139
+ const id = yield (yield this.host()).getAttribute('id');
140
+ return `#${id}-panel`;
141
+ });
142
+ }
138
143
  }
139
144
  MatSelectHarness.hostSelector = '.mat-select';
140
145
 
@@ -1 +1 @@
1
- {"version":3,"file":"select__testing.js","sources":["../../../../../../src/material/select/testing/select-harness.ts","../../../../../../src/material/select/testing/public-api.ts","../../../../../../src/material/select/testing/index.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {HarnessPredicate} from '@angular/cdk/testing';\nimport {MatFormFieldControlHarness} from '@angular/material/form-field/testing/control';\nimport {\n MatOptionHarness,\n MatOptgroupHarness,\n OptionHarnessFilters,\n OptgroupHarnessFilters,\n} from '@angular/material/core/testing';\nimport {SelectHarnessFilters} from './select-harness-filters';\n\nconst PANEL_SELECTOR = '.mat-select-panel';\n\n/** Harness for interacting with a standard mat-select in tests. */\nexport class MatSelectHarness extends MatFormFieldControlHarness {\n private _documentRootLocator = this.documentRootLocatorFactory();\n private _backdrop = this._documentRootLocator.locatorFor('.cdk-overlay-backdrop');\n private _optionalPanel = this._documentRootLocator.locatorForOptional(PANEL_SELECTOR);\n private _trigger = this.locatorFor('.mat-select-trigger');\n private _value = this.locatorFor('.mat-select-value');\n\n static hostSelector = '.mat-select';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a `MatSelectHarness` that meets\n * certain criteria.\n * @param options Options for filtering which select instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(options: SelectHarnessFilters = {}): HarnessPredicate<MatSelectHarness> {\n return new HarnessPredicate(MatSelectHarness, options);\n }\n\n /** Gets a boolean promise indicating if the select is disabled. */\n async isDisabled(): Promise<boolean> {\n return (await this.host()).hasClass('mat-select-disabled');\n }\n\n /** Gets a boolean promise indicating if the select is valid. */\n async isValid(): Promise<boolean> {\n return !(await (await this.host()).hasClass('ng-invalid'));\n }\n\n /** Gets a boolean promise indicating if the select is required. */\n async isRequired(): Promise<boolean> {\n return (await this.host()).hasClass('mat-select-required');\n }\n\n /** Gets a boolean promise indicating if the select is empty (no value is selected). */\n async isEmpty(): Promise<boolean> {\n return (await this.host()).hasClass('mat-select-empty');\n }\n\n /** Gets a boolean promise indicating if the select is in multi-selection mode. */\n async isMultiple(): Promise<boolean> {\n const ariaMultiselectable = (await this.host()).getAttribute('aria-multiselectable');\n return (await ariaMultiselectable) === 'true';\n }\n\n /** Gets a promise for the select's value text. */\n async getValueText(): Promise<string> {\n return (await this._value()).text();\n }\n\n /** Focuses the select and returns a void promise that indicates when the action is complete. */\n async focus(): Promise<void> {\n return (await this.host()).focus();\n }\n\n /** Blurs the select and returns a void promise that indicates when the action is complete. */\n async blur(): Promise<void> {\n return (await this.host()).blur();\n }\n\n /** Gets the options inside the select panel. */\n async getOptions(filter: Omit<OptionHarnessFilters, 'ancestor'> = {}):\n Promise<MatOptionHarness[]> {\n return this._documentRootLocator.locatorForAll(MatOptionHarness.with({\n ...filter,\n ancestor: PANEL_SELECTOR\n }))();\n }\n\n /** Gets the groups of options inside the panel. */\n async getOptionGroups(filter: Omit<OptgroupHarnessFilters, 'ancestor'> = {}):\n Promise<MatOptgroupHarness[]> {\n return this._documentRootLocator.locatorForAll(MatOptgroupHarness.with({\n ...filter,\n ancestor: PANEL_SELECTOR\n }))();\n }\n\n /** Gets whether the select is open. */\n async isOpen(): Promise<boolean> {\n return !!(await this._optionalPanel());\n }\n\n /** Opens the select's panel. */\n async open(): Promise<void> {\n if (!await this.isOpen()) {\n return (await this._trigger()).click();\n }\n }\n\n /**\n * Clicks the options that match the passed-in filter. If the select is in multi-selection\n * mode all options will be clicked, otherwise the harness will pick the first matching option.\n */\n async clickOptions(filter: OptionHarnessFilters = {}): Promise<void> {\n await this.open();\n\n const [isMultiple, options] = await Promise.all([this.isMultiple(), this.getOptions(filter)]);\n\n if (options.length === 0) {\n throw Error('Select does not have options matching the specified filter');\n }\n\n if (isMultiple) {\n await Promise.all(options.map(option => option.click()));\n } else {\n await options[0].click();\n }\n }\n\n /** Closes the select's panel. */\n async close(): Promise<void> {\n if (await this.isOpen()) {\n // This is the most consistent way that works both in both single and multi-select modes,\n // but it assumes that only one overlay is open at a time. We should be able to make it\n // a bit more precise after #16645 where we can dispatch an ESCAPE press to the host instead.\n return (await this._backdrop()).click();\n }\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './select-harness';\nexport * from './select-harness-filters';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;AAAA;;;;;;;AAkBA,MAAM,cAAc,GAAG,mBAAmB,CAAC;;AAG3C,MAAa,gBAAiB,SAAQ,0BAA0B;IAAhE;;QACU,yBAAoB,GAAG,IAAI,CAAC,0BAA0B,EAAE,CAAC;QACzD,cAAS,GAAG,IAAI,CAAC,oBAAoB,CAAC,UAAU,CAAC,uBAAuB,CAAC,CAAC;QAC1E,mBAAc,GAAG,IAAI,CAAC,oBAAoB,CAAC,kBAAkB,CAAC,cAAc,CAAC,CAAC;QAC9E,aAAQ,GAAG,IAAI,CAAC,UAAU,CAAC,qBAAqB,CAAC,CAAC;QAClD,WAAM,GAAG,IAAI,CAAC,UAAU,CAAC,mBAAmB,CAAC,CAAC;KAkHvD;;;;;;;IAxGC,OAAO,IAAI,CAAC,UAAgC,EAAE;QAC5C,OAAO,IAAI,gBAAgB,CAAC,gBAAgB,EAAE,OAAO,CAAC,CAAC;KACxD;;IAGK,UAAU;;YACd,OAAO,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,EAAE,QAAQ,CAAC,qBAAqB,CAAC,CAAC;SAC5D;KAAA;;IAGK,OAAO;;YACX,OAAO,EAAE,MAAM,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,EAAE,QAAQ,CAAC,YAAY,CAAC,CAAC,CAAC;SAC5D;KAAA;;IAGK,UAAU;;YACd,OAAO,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,EAAE,QAAQ,CAAC,qBAAqB,CAAC,CAAC;SAC5D;KAAA;;IAGK,OAAO;;Y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AAI,CAAC,IAAI,EAAE,CAAC;YAElB,MAAM,CAAC,UAAU,EAAE,OAAO,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,UAAU,EAAE,EAAE,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;YAE9F,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE;gBACxB,MAAM,KAAK,CAAC,4DAA4D,CAAC,CAAC;aAC3E;YAED,IAAI,UAAU,EAAE;gBACd,MAAM,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,IAAI,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;aAC1D;iBAAM;gBACL,MAAM,OAAO,CAAC,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC;aAC1B;SACF;KAAA;;IAGK,KAAK;;YACT,IAAI,MAAM,IAAI,CAAC,MAAM,EAAE,EAAE;;;;gBAIvB,OAAO,CAAC,MAAM,IAAI,CAAC,SAAS,EAAE,EAAE,KAAK,EAAE,CAAC;aACzC;SACF;KAAA;;AA/GM,6BAAY,GAAG,aAAa,CAAC;;AC5BtC;;;;;;GAMG;;ACNH;;;;;;GAMG;;;;"}
1
+ {"version":3,"file":"select__testing.js","sources":["../../../../../../src/material/select/testing/select-harness.ts","../../../../../../src/material/select/testing/public-api.ts","../../../../../../src/material/select/testing/index.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {HarnessPredicate} from '@angular/cdk/testing';\nimport {MatFormFieldControlHarness} from '@angular/material/form-field/testing/control';\nimport {\n MatOptionHarness,\n MatOptgroupHarness,\n OptionHarnessFilters,\n OptgroupHarnessFilters,\n} from '@angular/material/core/testing';\nimport {SelectHarnessFilters} from './select-harness-filters';\n\n\n/** Harness for interacting with a standard mat-select in tests. */\nexport class MatSelectHarness extends MatFormFieldControlHarness {\n private _documentRootLocator = this.documentRootLocatorFactory();\n private _backdrop = this._documentRootLocator.locatorFor('.cdk-overlay-backdrop');\n private _trigger = this.locatorFor('.mat-select-trigger');\n private _value = this.locatorFor('.mat-select-value');\n\n static hostSelector = '.mat-select';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a `MatSelectHarness` that meets\n * certain criteria.\n * @param options Options for filtering which select instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(options: SelectHarnessFilters = {}): HarnessPredicate<MatSelectHarness> {\n return new HarnessPredicate(MatSelectHarness, options);\n }\n\n /** Gets a boolean promise indicating if the select is disabled. */\n async isDisabled(): Promise<boolean> {\n return (await this.host()).hasClass('mat-select-disabled');\n }\n\n /** Gets a boolean promise indicating if the select is valid. */\n async isValid(): Promise<boolean> {\n return !(await (await this.host()).hasClass('ng-invalid'));\n }\n\n /** Gets a boolean promise indicating if the select is required. */\n async isRequired(): Promise<boolean> {\n return (await this.host()).hasClass('mat-select-required');\n }\n\n /** Gets a boolean promise indicating if the select is empty (no value is selected). */\n async isEmpty(): Promise<boolean> {\n return (await this.host()).hasClass('mat-select-empty');\n }\n\n /** Gets a boolean promise indicating if the select is in multi-selection mode. */\n async isMultiple(): Promise<boolean> {\n const ariaMultiselectable = (await this.host()).getAttribute('aria-multiselectable');\n return (await ariaMultiselectable) === 'true';\n }\n\n /** Gets a promise for the select's value text. */\n async getValueText(): Promise<string> {\n return (await this._value()).text();\n }\n\n /** Focuses the select and returns a void promise that indicates when the action is complete. */\n async focus(): Promise<void> {\n return (await this.host()).focus();\n }\n\n /** Blurs the select and returns a void promise that indicates when the action is complete. */\n async blur(): Promise<void> {\n return (await this.host()).blur();\n }\n\n /** Gets the options inside the select panel. */\n async getOptions(filter: Omit<OptionHarnessFilters, 'ancestor'> = {}):\n Promise<MatOptionHarness[]> {\n return this._documentRootLocator.locatorForAll(MatOptionHarness.with({\n ...filter,\n ancestor: await this._getPanelSelector()\n }))();\n }\n\n /** Gets the groups of options inside the panel. */\n async getOptionGroups(filter: Omit<OptgroupHarnessFilters, 'ancestor'> = {}):\n Promise<MatOptgroupHarness[]> {\n return this._documentRootLocator.locatorForAll(MatOptgroupHarness.with({\n ...filter,\n ancestor: await this._getPanelSelector()\n }))();\n }\n\n /** Gets whether the select is open. */\n async isOpen(): Promise<boolean> {\n return !!await this._documentRootLocator.locatorForOptional(await this._getPanelSelector())();\n }\n\n /** Opens the select's panel. */\n async open(): Promise<void> {\n if (!await this.isOpen()) {\n return (await this._trigger()).click();\n }\n }\n\n /**\n * Clicks the options that match the passed-in filter. If the select is in multi-selection\n * mode all options will be clicked, otherwise the harness will pick the first matching option.\n */\n async clickOptions(filter: OptionHarnessFilters = {}): Promise<void> {\n await this.open();\n\n const [isMultiple, options] = await Promise.all([this.isMultiple(), this.getOptions(filter)]);\n\n if (options.length === 0) {\n throw Error('Select does not have options matching the specified filter');\n }\n\n if (isMultiple) {\n await Promise.all(options.map(option => option.click()));\n } else {\n await options[0].click();\n }\n }\n\n /** Closes the select's panel. */\n async close(): Promise<void> {\n if (await this.isOpen()) {\n // This is the most consistent way that works both in both single and multi-select modes,\n // but it assumes that only one overlay is open at a time. We should be able to make it\n // a bit more precise after #16645 where we can dispatch an ESCAPE press to the host instead.\n return (await this._backdrop()).click();\n }\n }\n\n /** Gets the selector that should be used to find this select's panel. */\n private async _getPanelSelector(): Promise<string> {\n const id = await (await this.host()).getAttribute('id');\n return `#${id}-panel`;\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './select-harness';\nexport * from './select-harness-filters';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;AAAA;;;;;;;AAmBA;AACA,MAAa,gBAAiB,SAAQ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AAC,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,IAAI,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;aAC1D;iBAAM;gBACL,MAAM,OAAO,CAAC,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC;aAC1B;SACF;KAAA;;IAGK,KAAK;;YACT,IAAI,MAAM,IAAI,CAAC,MAAM,EAAE,EAAE;;;;gBAIvB,OAAO,CAAC,MAAM,IAAI,CAAC,SAAS,EAAE,EAAE,KAAK,EAAE,CAAC;aACzC;SACF;KAAA;;IAGa,iBAAiB;;YAC7B,MAAM,EAAE,GAAG,MAAM,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,EAAE,YAAY,CAAC,IAAI,CAAC,CAAC;YACxD,OAAO,IAAI,EAAE,QAAQ,CAAC;SACvB;KAAA;;AArHM,6BAAY,GAAG,aAAa,CAAC;;AC1BtC;;;;;;GAMG;;ACNH;;;;;;GAMG;;;;"}
@@ -1,14 +1,14 @@
1
1
  import { Overlay, CdkConnectedOverlay, OverlayModule } from '@angular/cdk/overlay';
2
2
  import { CommonModule } from '@angular/common';
3
- import { InjectionToken, Directive, EventEmitter, isDevMode, Component, ViewEncapsulation, ChangeDetectionStrategy, ChangeDetectorRef, NgZone, ElementRef, Optional, Self, Attribute, Inject, ViewChild, ContentChildren, Input, ContentChild, Output, NgModule } from '@angular/core';
3
+ import { InjectionToken, Directive, EventEmitter, isDevMode, Component, ViewEncapsulation, ChangeDetectionStrategy, ChangeDetectorRef, NgZone, ElementRef, Optional, Inject, Self, Attribute, ViewChild, ContentChildren, Input, ContentChild, Output, NgModule } from '@angular/core';
4
4
  import { mixinDisableRipple, mixinTabIndex, mixinDisabled, mixinErrorState, _countGroupLabelsBeforeOption, _getOptionScrollPosition, MAT_OPTION_PARENT_COMPONENT, ErrorStateMatcher, MatOption, MatOptgroup, MatOptionModule, MatCommonModule } from '@angular/material/core';
5
- import { MatFormFieldControl, MatFormField, MatFormFieldModule } from '@angular/material/form-field';
5
+ import { MatFormFieldControl, MatFormField, MAT_FORM_FIELD, MatFormFieldModule } from '@angular/material/form-field';
6
+ import { ViewportRuler, CdkScrollableModule } from '@angular/cdk/scrolling';
6
7
  import { ActiveDescendantKeyManager, LiveAnnouncer } from '@angular/cdk/a11y';
7
8
  import { Directionality } from '@angular/cdk/bidi';
8
9
  import { coerceBooleanProperty, coerceNumberProperty } from '@angular/cdk/coercion';
9
10
  import { SelectionModel } from '@angular/cdk/collections';
10
11
  import { DOWN_ARROW, UP_ARROW, LEFT_ARROW, RIGHT_ARROW, ENTER, SPACE, hasModifierKey, HOME, END, A } from '@angular/cdk/keycodes';
11
- import { ViewportRuler } from '@angular/cdk/scrolling';
12
12
  import { NgForm, FormGroupDirective, NgControl } from '@angular/forms';
13
13
  import { Subject, defer, merge } from 'rxjs';
14
14
  import { startWith, switchMap, take, filter, map, distinctUntilChanged, takeUntil } from 'rxjs/operators';
@@ -1091,15 +1091,17 @@ class MatSelect extends _MatSelectMixinBase {
1091
1091
  * @return {?}
1092
1092
  */
1093
1093
  () => {
1094
- // Select the active item when tabbing away. This is consistent with how the native
1095
- // select behaves. Note that we only want to do this in single selection mode.
1096
- if (!this.multiple && this._keyManager.activeItem) {
1097
- this._keyManager.activeItem._selectViaInteraction();
1094
+ if (this.panelOpen) {
1095
+ // Select the active item when tabbing away. This is consistent with how the native
1096
+ // select behaves. Note that we only want to do this in single selection mode.
1097
+ if (!this.multiple && this._keyManager.activeItem) {
1098
+ this._keyManager.activeItem._selectViaInteraction();
1099
+ }
1100
+ // Restore focus to the trigger before closing. Ensures that the focus
1101
+ // position won't be lost if the user got focus into the overlay.
1102
+ this.focus();
1103
+ this.close();
1098
1104
  }
1099
- // Restore focus to the trigger before closing. Ensures that the focus
1100
- // position won't be lost if the user got focus into the overlay.
1101
- this.focus();
1102
- this.close();
1103
1105
  }));
1104
1106
  this._keyManager.change.pipe(takeUntil(this._destroy)).subscribe((/**
1105
1107
  * @return {?}
@@ -1644,7 +1646,7 @@ MatSelect.decorators = [
1644
1646
  { type: Component, args: [{
1645
1647
  selector: 'mat-select',
1646
1648
  exportAs: 'matSelect',
1647
- template: "<div cdk-overlay-origin\n class=\"mat-select-trigger\"\n aria-hidden=\"true\"\n (click)=\"toggle()\"\n #origin=\"cdkOverlayOrigin\"\n #trigger>\n <div class=\"mat-select-value\" [ngSwitch]=\"empty\">\n <span class=\"mat-select-placeholder\" *ngSwitchCase=\"true\">{{placeholder || '\\u00A0'}}</span>\n <span class=\"mat-select-value-text\" *ngSwitchCase=\"false\" [ngSwitch]=\"!!customTrigger\">\n <span *ngSwitchDefault>{{triggerValue || '\\u00A0'}}</span>\n <ng-content select=\"mat-select-trigger\" *ngSwitchCase=\"true\"></ng-content>\n </span>\n </div>\n\n <div class=\"mat-select-arrow-wrapper\"><div class=\"mat-select-arrow\"></div></div>\n</div>\n\n<ng-template\n cdk-connected-overlay\n cdkConnectedOverlayLockPosition\n cdkConnectedOverlayHasBackdrop\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n [cdkConnectedOverlayScrollStrategy]=\"_scrollStrategy\"\n [cdkConnectedOverlayOrigin]=\"origin\"\n [cdkConnectedOverlayOpen]=\"panelOpen\"\n [cdkConnectedOverlayPositions]=\"_positions\"\n [cdkConnectedOverlayMinWidth]=\"_triggerRect?.width\"\n [cdkConnectedOverlayOffsetY]=\"_offsetY\"\n (backdropClick)=\"close()\"\n (attach)=\"_onAttached()\"\n (detach)=\"close()\">\n <div class=\"mat-select-panel-wrap\" [@transformPanelWrap]>\n <div\n #panel\n class=\"mat-select-panel {{ _getPanelTheme() }}\"\n [ngClass]=\"panelClass\"\n [@transformPanel]=\"multiple ? 'showing-multiple' : 'showing'\"\n (@transformPanel.done)=\"_panelDoneAnimatingStream.next($event.toState)\"\n [style.transformOrigin]=\"_transformOrigin\"\n [style.font-size.px]=\"_triggerFontSize\"\n (keydown)=\"_handleKeydown($event)\">\n <ng-content></ng-content>\n </div>\n </div>\n</ng-template>\n",
1649
+ template: "<div cdk-overlay-origin\n class=\"mat-select-trigger\"\n aria-hidden=\"true\"\n (click)=\"toggle()\"\n #origin=\"cdkOverlayOrigin\"\n #trigger>\n <div class=\"mat-select-value\" [ngSwitch]=\"empty\">\n <span class=\"mat-select-placeholder\" *ngSwitchCase=\"true\">{{placeholder || '\\u00A0'}}</span>\n <span class=\"mat-select-value-text\" *ngSwitchCase=\"false\" [ngSwitch]=\"!!customTrigger\">\n <span *ngSwitchDefault>{{triggerValue || '\\u00A0'}}</span>\n <ng-content select=\"mat-select-trigger\" *ngSwitchCase=\"true\"></ng-content>\n </span>\n </div>\n\n <div class=\"mat-select-arrow-wrapper\"><div class=\"mat-select-arrow\"></div></div>\n</div>\n\n<ng-template\n cdk-connected-overlay\n cdkConnectedOverlayLockPosition\n cdkConnectedOverlayHasBackdrop\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n [cdkConnectedOverlayScrollStrategy]=\"_scrollStrategy\"\n [cdkConnectedOverlayOrigin]=\"origin\"\n [cdkConnectedOverlayOpen]=\"panelOpen\"\n [cdkConnectedOverlayPositions]=\"_positions\"\n [cdkConnectedOverlayMinWidth]=\"_triggerRect?.width\"\n [cdkConnectedOverlayOffsetY]=\"_offsetY\"\n (backdropClick)=\"close()\"\n (attach)=\"_onAttached()\"\n (detach)=\"close()\">\n <div class=\"mat-select-panel-wrap\" [@transformPanelWrap]>\n <div\n #panel\n [attr.id]=\"id + '-panel'\"\n class=\"mat-select-panel {{ _getPanelTheme() }}\"\n [ngClass]=\"panelClass\"\n [@transformPanel]=\"multiple ? 'showing-multiple' : 'showing'\"\n (@transformPanel.done)=\"_panelDoneAnimatingStream.next($event.toState)\"\n [style.transformOrigin]=\"_transformOrigin\"\n [style.font-size.px]=\"_triggerFontSize\"\n (keydown)=\"_handleKeydown($event)\">\n <ng-content></ng-content>\n </div>\n </div>\n</ng-template>\n",
1648
1650
  inputs: ['disabled', 'disableRipple', 'tabIndex'],
1649
1651
  encapsulation: ViewEncapsulation.None,
1650
1652
  changeDetection: ChangeDetectionStrategy.OnPush,
@@ -1691,7 +1693,7 @@ MatSelect.ctorParameters = () => [
1691
1693
  { type: Directionality, decorators: [{ type: Optional }] },
1692
1694
  { type: NgForm, decorators: [{ type: Optional }] },
1693
1695
  { type: FormGroupDirective, decorators: [{ type: Optional }] },
1694
- { type: MatFormField, decorators: [{ type: Optional }] },
1696
+ { type: MatFormField, decorators: [{ type: Optional }, { type: Inject, args: [MAT_FORM_FIELD,] }] },
1695
1697
  { type: NgControl, decorators: [{ type: Self }, { type: Optional }] },
1696
1698
  { type: String, decorators: [{ type: Attribute, args: ['tabindex',] }] },
1697
1699
  { type: undefined, decorators: [{ type: Inject, args: [MAT_SELECT_SCROLL_STRATEGY,] }] },
@@ -2031,7 +2033,14 @@ MatSelectModule.decorators = [
2031
2033
  MatOptionModule,
2032
2034
  MatCommonModule,
2033
2035
  ],
2034
- exports: [MatFormFieldModule, MatSelect, MatSelectTrigger, MatOptionModule, MatCommonModule],
2036
+ exports: [
2037
+ CdkScrollableModule,
2038
+ MatFormFieldModule,
2039
+ MatSelect,
2040
+ MatSelectTrigger,
2041
+ MatOptionModule,
2042
+ MatCommonModule
2043
+ ],
2035
2044
  declarations: [MatSelect, MatSelectTrigger],
2036
2045
  providers: [MAT_SELECT_SCROLL_STRATEGY_PROVIDER]
2037
2046
  },] }