@angular/material 9.2.0 → 9.2.4

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 (365) hide show
  1. package/_theming.scss +19 -4
  2. package/autocomplete/index.metadata.json +1 -1
  3. package/autocomplete/testing/autocomplete-harness.d.ts +4 -1
  4. package/badge/index.metadata.json +1 -1
  5. package/bottom-sheet/bottom-sheet.d.ts +2 -1
  6. package/bundles/material-autocomplete-testing.umd.js +55 -8
  7. package/bundles/material-autocomplete-testing.umd.js.map +1 -1
  8. package/bundles/material-autocomplete-testing.umd.min.js +4 -5
  9. package/bundles/material-autocomplete-testing.umd.min.js.map +1 -1
  10. package/bundles/material-autocomplete.umd.js +28 -27
  11. package/bundles/material-autocomplete.umd.js.map +1 -1
  12. package/bundles/material-autocomplete.umd.min.js +5 -5
  13. package/bundles/material-autocomplete.umd.min.js.map +1 -1
  14. package/bundles/material-badge.umd.js +1 -1
  15. package/bundles/material-badge.umd.js.map +1 -1
  16. package/bundles/material-badge.umd.min.js +1 -1
  17. package/bundles/material-badge.umd.min.js.map +1 -1
  18. package/bundles/material-bottom-sheet.umd.js +3 -2
  19. package/bundles/material-bottom-sheet.umd.js.map +1 -1
  20. package/bundles/material-bottom-sheet.umd.min.js +1 -1
  21. package/bundles/material-bottom-sheet.umd.min.js.map +1 -1
  22. package/bundles/material-button-toggle.umd.js +16 -6
  23. package/bundles/material-button-toggle.umd.js.map +1 -1
  24. package/bundles/material-button-toggle.umd.min.js +3 -3
  25. package/bundles/material-button-toggle.umd.min.js.map +1 -1
  26. package/bundles/material-chips.umd.js +19 -3
  27. package/bundles/material-chips.umd.js.map +1 -1
  28. package/bundles/material-chips.umd.min.js +4 -4
  29. package/bundles/material-chips.umd.min.js.map +1 -1
  30. package/bundles/material-core.umd.js +95 -71
  31. package/bundles/material-core.umd.js.map +1 -1
  32. package/bundles/material-core.umd.min.js +9 -9
  33. package/bundles/material-core.umd.min.js.map +1 -1
  34. package/bundles/material-datepicker.umd.js +23 -10
  35. package/bundles/material-datepicker.umd.js.map +1 -1
  36. package/bundles/material-datepicker.umd.min.js +7 -7
  37. package/bundles/material-datepicker.umd.min.js.map +1 -1
  38. package/bundles/material-dialog.umd.js +46 -27
  39. package/bundles/material-dialog.umd.js.map +1 -1
  40. package/bundles/material-dialog.umd.min.js +6 -6
  41. package/bundles/material-dialog.umd.min.js.map +1 -1
  42. package/bundles/material-expansion.umd.js +3 -3
  43. package/bundles/material-expansion.umd.js.map +1 -1
  44. package/bundles/material-expansion.umd.min.js +1 -1
  45. package/bundles/material-expansion.umd.min.js.map +1 -1
  46. package/bundles/material-form-field.umd.js +6 -4
  47. package/bundles/material-form-field.umd.js.map +1 -1
  48. package/bundles/material-form-field.umd.min.js +3 -3
  49. package/bundles/material-form-field.umd.min.js.map +1 -1
  50. package/bundles/material-icon.umd.js +9 -5
  51. package/bundles/material-icon.umd.js.map +1 -1
  52. package/bundles/material-icon.umd.min.js +3 -3
  53. package/bundles/material-icon.umd.min.js.map +1 -1
  54. package/bundles/material-input.umd.js +18 -14
  55. package/bundles/material-input.umd.js.map +1 -1
  56. package/bundles/material-input.umd.min.js +1 -1
  57. package/bundles/material-input.umd.min.js.map +1 -1
  58. package/bundles/material-list.umd.js +4 -4
  59. package/bundles/material-list.umd.js.map +1 -1
  60. package/bundles/material-list.umd.min.js +2 -2
  61. package/bundles/material-list.umd.min.js.map +1 -1
  62. package/bundles/material-menu.umd.js +5 -5
  63. package/bundles/material-menu.umd.js.map +1 -1
  64. package/bundles/material-menu.umd.min.js +6 -6
  65. package/bundles/material-menu.umd.min.js.map +1 -1
  66. package/bundles/material-radio.umd.js +62 -47
  67. package/bundles/material-radio.umd.js.map +1 -1
  68. package/bundles/material-radio.umd.min.js +10 -2
  69. package/bundles/material-radio.umd.min.js.map +1 -1
  70. package/bundles/material-select-testing.umd.js +45 -10
  71. package/bundles/material-select-testing.umd.js.map +1 -1
  72. package/bundles/material-select-testing.umd.min.js +2 -3
  73. package/bundles/material-select-testing.umd.min.js.map +1 -1
  74. package/bundles/material-select.umd.js +23 -14
  75. package/bundles/material-select.umd.js.map +1 -1
  76. package/bundles/material-select.umd.min.js +3 -3
  77. package/bundles/material-select.umd.min.js.map +1 -1
  78. package/bundles/material-sidenav.umd.js +2 -1
  79. package/bundles/material-sidenav.umd.js.map +1 -1
  80. package/bundles/material-sidenav.umd.min.js +2 -2
  81. package/bundles/material-sidenav.umd.min.js.map +1 -1
  82. package/bundles/material-slider.umd.js +14 -12
  83. package/bundles/material-slider.umd.js.map +1 -1
  84. package/bundles/material-slider.umd.min.js +1 -1
  85. package/bundles/material-slider.umd.min.js.map +1 -1
  86. package/bundles/material-table.umd.js +1 -1
  87. package/bundles/material-table.umd.js.map +1 -1
  88. package/bundles/material-table.umd.min.js +1 -1
  89. package/bundles/material-table.umd.min.js.map +1 -1
  90. package/bundles/material-tabs.umd.js +9 -6
  91. package/bundles/material-tabs.umd.js.map +1 -1
  92. package/bundles/material-tabs.umd.min.js +1 -1
  93. package/bundles/material-tabs.umd.min.js.map +1 -1
  94. package/bundles/material-tooltip.umd.js +5 -5
  95. package/bundles/material-tooltip.umd.js.map +1 -1
  96. package/bundles/material-tooltip.umd.min.js +3 -3
  97. package/bundles/material-tooltip.umd.min.js.map +1 -1
  98. package/bundles/material-tree.umd.js +1 -1
  99. package/bundles/material-tree.umd.js.map +1 -1
  100. package/bundles/material-tree.umd.min.js +1 -1
  101. package/bundles/material-tree.umd.min.js.map +1 -1
  102. package/button-toggle/index.metadata.json +1 -1
  103. package/chips/chip.d.ts +10 -3
  104. package/chips/index.metadata.json +1 -1
  105. package/core/index.metadata.json +1 -1
  106. package/core/ripple/ripple-renderer.d.ts +10 -3
  107. package/core/ripple/ripple.d.ts +2 -1
  108. package/datepicker/datepicker-input.d.ts +5 -2
  109. package/datepicker/index.metadata.json +1 -1
  110. package/dialog/dialog-container.d.ts +9 -2
  111. package/dialog/dialog-ref.d.ts +5 -0
  112. package/dialog/index.metadata.json +1 -1
  113. package/esm2015/autocomplete/autocomplete-module.js +3 -1
  114. package/esm2015/autocomplete/autocomplete-trigger.js +25 -24
  115. package/esm2015/autocomplete/testing/autocomplete-harness.js +18 -7
  116. package/esm2015/badge/badge-module.js +2 -2
  117. package/esm2015/bottom-sheet/bottom-sheet.js +5 -3
  118. package/esm2015/button-toggle/button-toggle.js +18 -7
  119. package/esm2015/chips/chip-list.js +5 -2
  120. package/esm2015/chips/chip.js +34 -4
  121. package/esm2015/core/common-behaviors/common-module.js +1 -1
  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 +3 -3
  126. package/esm2015/datepicker/calendar.js +3 -3
  127. package/esm2015/datepicker/datepicker-input.js +17 -2
  128. package/esm2015/datepicker/datepicker-module.js +3 -1
  129. package/esm2015/datepicker/datepicker.js +8 -2
  130. package/esm2015/dialog/dialog-container.js +37 -17
  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-module.js +5 -2
  136. package/esm2015/icon/icon.js +15 -2
  137. package/esm2015/input/input.js +26 -23
  138. package/esm2015/list/selection-list.js +8 -6
  139. package/esm2015/menu/menu-module.js +3 -2
  140. package/esm2015/radio/public-api.js +2 -2
  141. package/esm2015/radio/radio.js +70 -59
  142. package/esm2015/select/select-module.js +10 -2
  143. package/esm2015/select/select.js +12 -10
  144. package/esm2015/select/testing/select-harness.js +11 -6
  145. package/esm2015/sidenav/sidenav-module.js +4 -3
  146. package/esm2015/slider/slider.js +17 -15
  147. package/esm2015/snack-bar/snack-bar.js +1 -1
  148. package/esm2015/table/table-module.js +2 -2
  149. package/esm2015/tabs/paginated-tab-header.js +7 -4
  150. package/esm2015/tabs/tab-header.js +1 -1
  151. package/esm2015/tabs/tab-nav-bar/tab-nav-bar.js +3 -3
  152. package/esm2015/tooltip/tooltip-module.js +3 -2
  153. package/esm2015/tree/tree-module.js +2 -2
  154. package/esm5/autocomplete/autocomplete-module.js +3 -1
  155. package/esm5/autocomplete/autocomplete-trigger.js +24 -24
  156. package/esm5/autocomplete/testing/autocomplete-harness.js +56 -9
  157. package/esm5/badge/badge-module.js +2 -2
  158. package/esm5/bottom-sheet/bottom-sheet.js +4 -3
  159. package/esm5/button-toggle/button-toggle.js +17 -7
  160. package/esm5/chips/chip-list.js +5 -2
  161. package/esm5/chips/chip.js +17 -4
  162. package/esm5/core/common-behaviors/common-module.js +1 -1
  163. package/esm5/core/ripple/ripple-renderer.js +91 -65
  164. package/esm5/core/ripple/ripple.js +4 -6
  165. package/esm5/core/version.js +1 -1
  166. package/esm5/datepicker/calendar-body.js +3 -3
  167. package/esm5/datepicker/calendar.js +3 -3
  168. package/esm5/datepicker/datepicker-input.js +8 -2
  169. package/esm5/datepicker/datepicker-module.js +3 -1
  170. package/esm5/datepicker/datepicker.js +8 -2
  171. package/esm5/dialog/dialog-container.js +29 -15
  172. package/esm5/dialog/dialog-ref.js +19 -6
  173. package/esm5/dialog/dialog.js +1 -9
  174. package/esm5/expansion/expansion-panel-header.js +3 -3
  175. package/esm5/expansion/expansion-panel.js +1 -1
  176. package/esm5/form-field/form-field-module.js +5 -2
  177. package/esm5/icon/icon.js +7 -2
  178. package/esm5/input/input.js +20 -16
  179. package/esm5/list/selection-list.js +5 -5
  180. package/esm5/menu/menu-module.js +3 -2
  181. package/esm5/radio/radio.js +63 -48
  182. package/esm5/select/select-module.js +10 -2
  183. package/esm5/select/select.js +12 -10
  184. package/esm5/select/testing/select-harness.js +46 -11
  185. package/esm5/sidenav/sidenav-module.js +4 -3
  186. package/esm5/slider/slider.js +15 -13
  187. package/esm5/table/table-module.js +2 -2
  188. package/esm5/tabs/paginated-tab-header.js +7 -4
  189. package/esm5/tabs/tab-header.js +1 -1
  190. package/esm5/tabs/tab-nav-bar/tab-nav-bar.js +3 -3
  191. package/esm5/tooltip/tooltip-module.js +3 -2
  192. package/esm5/tree/tree-module.js +2 -2
  193. package/expansion/index.metadata.json +1 -1
  194. package/fesm2015/autocomplete/testing.js +17 -6
  195. package/fesm2015/autocomplete/testing.js.map +1 -1
  196. package/fesm2015/autocomplete.js +26 -24
  197. package/fesm2015/autocomplete.js.map +1 -1
  198. package/fesm2015/badge.js +1 -1
  199. package/fesm2015/badge.js.map +1 -1
  200. package/fesm2015/bottom-sheet.js +4 -2
  201. package/fesm2015/bottom-sheet.js.map +1 -1
  202. package/fesm2015/button-toggle.js +17 -6
  203. package/fesm2015/button-toggle.js.map +1 -1
  204. package/fesm2015/chips.js +37 -4
  205. package/fesm2015/chips.js.map +1 -1
  206. package/fesm2015/core.js +150 -126
  207. package/fesm2015/core.js.map +1 -1
  208. package/fesm2015/datepicker.js +29 -6
  209. package/fesm2015/datepicker.js.map +1 -1
  210. package/fesm2015/dialog.js +59 -32
  211. package/fesm2015/dialog.js.map +1 -1
  212. package/fesm2015/expansion.js +3 -3
  213. package/fesm2015/expansion.js.map +1 -1
  214. package/fesm2015/form-field.js +4 -2
  215. package/fesm2015/form-field.js.map +1 -1
  216. package/fesm2015/icon.js +14 -2
  217. package/fesm2015/icon.js.map +1 -1
  218. package/fesm2015/input.js +25 -22
  219. package/fesm2015/input.js.map +1 -1
  220. package/fesm2015/list.js +7 -5
  221. package/fesm2015/list.js.map +1 -1
  222. package/fesm2015/menu.js +2 -1
  223. package/fesm2015/menu.js.map +1 -1
  224. package/fesm2015/radio.js +71 -60
  225. package/fesm2015/radio.js.map +1 -1
  226. package/fesm2015/select/testing.js +10 -5
  227. package/fesm2015/select/testing.js.map +1 -1
  228. package/fesm2015/select.js +20 -11
  229. package/fesm2015/select.js.map +1 -1
  230. package/fesm2015/sidenav.js +3 -2
  231. package/fesm2015/sidenav.js.map +1 -1
  232. package/fesm2015/slider.js +16 -14
  233. package/fesm2015/slider.js.map +1 -1
  234. package/fesm2015/table.js +1 -1
  235. package/fesm2015/table.js.map +1 -1
  236. package/fesm2015/tabs.js +9 -6
  237. package/fesm2015/tabs.js.map +1 -1
  238. package/fesm2015/tooltip.js +2 -2
  239. package/fesm2015/tooltip.js.map +1 -1
  240. package/fesm2015/tree.js +1 -1
  241. package/fesm2015/tree.js.map +1 -1
  242. package/fesm5/autocomplete/testing.js +55 -8
  243. package/fesm5/autocomplete/testing.js.map +1 -1
  244. package/fesm5/autocomplete.js +25 -24
  245. package/fesm5/autocomplete.js.map +1 -1
  246. package/fesm5/badge.js +1 -1
  247. package/fesm5/badge.js.map +1 -1
  248. package/fesm5/bottom-sheet.js +3 -2
  249. package/fesm5/bottom-sheet.js.map +1 -1
  250. package/fesm5/button-toggle.js +16 -6
  251. package/fesm5/button-toggle.js.map +1 -1
  252. package/fesm5/chips.js +20 -4
  253. package/fesm5/chips.js.map +1 -1
  254. package/fesm5/core.js +95 -71
  255. package/fesm5/core.js.map +1 -1
  256. package/fesm5/datepicker.js +20 -6
  257. package/fesm5/datepicker.js.map +1 -1
  258. package/fesm5/dialog.js +46 -27
  259. package/fesm5/dialog.js.map +1 -1
  260. package/fesm5/expansion.js +3 -3
  261. package/fesm5/expansion.js.map +1 -1
  262. package/fesm5/form-field.js +4 -2
  263. package/fesm5/form-field.js.map +1 -1
  264. package/fesm5/icon.js +6 -2
  265. package/fesm5/icon.js.map +1 -1
  266. package/fesm5/input.js +19 -15
  267. package/fesm5/input.js.map +1 -1
  268. package/fesm5/list.js +4 -4
  269. package/fesm5/list.js.map +1 -1
  270. package/fesm5/menu.js +2 -1
  271. package/fesm5/menu.js.map +1 -1
  272. package/fesm5/radio.js +63 -49
  273. package/fesm5/radio.js.map +1 -1
  274. package/fesm5/select/testing.js +45 -10
  275. package/fesm5/select/testing.js.map +1 -1
  276. package/fesm5/select.js +20 -11
  277. package/fesm5/select.js.map +1 -1
  278. package/fesm5/sidenav.js +3 -2
  279. package/fesm5/sidenav.js.map +1 -1
  280. package/fesm5/slider.js +14 -12
  281. package/fesm5/slider.js.map +1 -1
  282. package/fesm5/table.js +1 -1
  283. package/fesm5/table.js.map +1 -1
  284. package/fesm5/tabs.js +9 -6
  285. package/fesm5/tabs.js.map +1 -1
  286. package/fesm5/tooltip.js +2 -2
  287. package/fesm5/tooltip.js.map +1 -1
  288. package/fesm5/tree.js +1 -1
  289. package/fesm5/tree.js.map +1 -1
  290. package/form-field/index.metadata.json +1 -1
  291. package/icon/icon.d.ts +2 -0
  292. package/icon/index.metadata.json +1 -1
  293. package/input/index.metadata.json +1 -1
  294. package/input/input.d.ts +4 -4
  295. package/list/index.metadata.json +1 -1
  296. package/menu/index.metadata.json +1 -1
  297. package/package.json +2 -2
  298. package/prebuilt-themes/deeppurple-amber.css +1 -1
  299. package/prebuilt-themes/indigo-pink.css +1 -1
  300. package/prebuilt-themes/pink-bluegrey.css +1 -1
  301. package/prebuilt-themes/purple-green.css +1 -1
  302. package/radio/index.metadata.json +1 -1
  303. package/radio/radio.d.ts +8 -2
  304. package/schematics/collection.json +0 -7
  305. package/schematics/ng-add/index.js +1 -1
  306. package/schematics/ng-update/index.js +23 -23
  307. package/schematics/ng-update/{upgrade-rules → migrations}/hammer-gestures-v9/find-hammer-script-tags.d.ts +1 -1
  308. package/schematics/ng-update/migrations/hammer-gestures-v9/find-hammer-script-tags.js +51 -0
  309. package/schematics/ng-update/{upgrade-rules → migrations}/hammer-gestures-v9/find-main-module.d.ts +1 -1
  310. package/schematics/ng-update/migrations/hammer-gestures-v9/find-main-module.js +41 -0
  311. package/schematics/ng-update/{upgrade-rules → migrations}/hammer-gestures-v9/gesture-config.template +0 -0
  312. 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
  313. package/schematics/ng-update/migrations/hammer-gestures-v9/hammer-gestures-migration.js +784 -0
  314. package/schematics/ng-update/{upgrade-rules → migrations}/hammer-gestures-v9/hammer-template-check.d.ts +1 -1
  315. package/schematics/ng-update/migrations/hammer-gestures-v9/hammer-template-check.js +65 -0
  316. package/schematics/ng-update/{upgrade-rules → migrations}/hammer-gestures-v9/import-manager.d.ts +4 -4
  317. package/schematics/ng-update/migrations/hammer-gestures-v9/import-manager.js +379 -0
  318. package/schematics/ng-update/{upgrade-rules → migrations}/hammer-gestures-v9/remove-array-element.d.ts +1 -1
  319. package/schematics/ng-update/migrations/hammer-gestures-v9/remove-array-element.js +75 -0
  320. package/schematics/ng-update/{upgrade-rules → migrations}/hammer-gestures-v9/remove-element-from-html.d.ts +1 -1
  321. package/schematics/ng-update/migrations/hammer-gestures-v9/remove-element-from-html.js +37 -0
  322. package/schematics/ng-update/migrations/misc-checks/misc-class-inheritance.d.ts +19 -0
  323. package/schematics/ng-update/migrations/misc-checks/misc-class-inheritance.js +57 -0
  324. package/schematics/ng-update/{upgrade-rules/misc-checks/misc-class-names-rule.d.ts → migrations/misc-checks/misc-class-names.d.ts} +5 -5
  325. package/schematics/ng-update/migrations/misc-checks/misc-class-names.js +52 -0
  326. package/schematics/ng-update/{upgrade-rules/misc-checks/misc-imports-rule.d.ts → migrations/misc-checks/misc-imports.d.ts} +5 -5
  327. package/schematics/ng-update/migrations/misc-checks/misc-imports.js +63 -0
  328. package/schematics/ng-update/{upgrade-rules/misc-checks/misc-property-names-rule.d.ts → migrations/misc-checks/misc-property-names.d.ts} +5 -5
  329. package/schematics/ng-update/migrations/misc-checks/misc-property-names.js +56 -0
  330. package/schematics/ng-update/migrations/misc-checks/misc-template.d.ts +17 -0
  331. package/schematics/ng-update/migrations/misc-checks/misc-template.js +69 -0
  332. 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
  333. package/schematics/ng-update/migrations/misc-ripples-v7/ripple-speed-factor-migration.js +147 -0
  334. package/schematics/ng-update/{upgrade-rules → migrations}/misc-ripples-v7/ripple-speed-factor.d.ts +1 -1
  335. package/schematics/ng-update/migrations/misc-ripples-v7/ripple-speed-factor.js +39 -0
  336. package/schematics/ng-update/{upgrade-rules → migrations}/package-imports-v8/material-symbols.json +0 -0
  337. 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
  338. package/schematics/ng-update/migrations/package-imports-v8/secondary-entry-points-migration.js +177 -0
  339. package/schematics/ng-update/upgrade-data.d.ts +2 -2
  340. package/schematics/ng-update/upgrade-data.js +1 -1
  341. package/select/index.metadata.json +1 -1
  342. package/select/testing/select-harness.d.ts +2 -1
  343. package/sidenav/index.metadata.json +1 -1
  344. package/table/index.metadata.json +1 -1
  345. package/tabs/_tabs-common.scss +5 -3
  346. package/tabs/index.metadata.json +1 -1
  347. package/tooltip/index.metadata.json +1 -1
  348. package/tree/index.metadata.json +1 -1
  349. package/schematics/ng-update/upgrade-rules/hammer-gestures-v9/find-hammer-script-tags.js +0 -51
  350. package/schematics/ng-update/upgrade-rules/hammer-gestures-v9/find-main-module.js +0 -41
  351. package/schematics/ng-update/upgrade-rules/hammer-gestures-v9/hammer-gestures-rule.js +0 -781
  352. package/schematics/ng-update/upgrade-rules/hammer-gestures-v9/hammer-template-check.js +0 -65
  353. package/schematics/ng-update/upgrade-rules/hammer-gestures-v9/import-manager.js +0 -379
  354. package/schematics/ng-update/upgrade-rules/hammer-gestures-v9/remove-array-element.js +0 -75
  355. package/schematics/ng-update/upgrade-rules/hammer-gestures-v9/remove-element-from-html.js +0 -37
  356. package/schematics/ng-update/upgrade-rules/misc-checks/misc-class-inheritance-rule.d.ts +0 -19
  357. package/schematics/ng-update/upgrade-rules/misc-checks/misc-class-inheritance-rule.js +0 -57
  358. package/schematics/ng-update/upgrade-rules/misc-checks/misc-class-names-rule.js +0 -52
  359. package/schematics/ng-update/upgrade-rules/misc-checks/misc-imports-rule.js +0 -63
  360. package/schematics/ng-update/upgrade-rules/misc-checks/misc-property-names-rule.js +0 -56
  361. package/schematics/ng-update/upgrade-rules/misc-checks/misc-template-rule.d.ts +0 -17
  362. package/schematics/ng-update/upgrade-rules/misc-checks/misc-template-rule.js +0 -69
  363. package/schematics/ng-update/upgrade-rules/misc-ripples-v7/ripple-speed-factor-rule.js +0 -147
  364. package/schematics/ng-update/upgrade-rules/misc-ripples-v7/ripple-speed-factor.js +0 -39
  365. package/schematics/ng-update/upgrade-rules/package-imports-v8/secondary-entry-points-rule.js +0 -177
package/fesm5/icon.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"icon.js","sources":["../../../../../../src/material/icon/icon-registry.ts","../../../../../../src/material/icon/icon.ts","../../../../../../src/material/icon/icon-module.ts","../../../../../../src/material/icon/public-api.ts","../../../../../../src/material/icon/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 {DOCUMENT} from '@angular/common';\nimport {HttpClient, HttpErrorResponse} from '@angular/common/http';\nimport {\n ErrorHandler,\n Inject,\n Injectable,\n InjectionToken,\n Optional,\n SecurityContext,\n SkipSelf,\n OnDestroy,\n} from '@angular/core';\nimport {DomSanitizer, SafeResourceUrl, SafeHtml} from '@angular/platform-browser';\nimport {forkJoin, Observable, of as observableOf, throwError as observableThrow} from 'rxjs';\nimport {catchError, finalize, map, share, tap} from 'rxjs/operators';\n\n\n/**\n * Returns an exception to be thrown in the case when attempting to\n * load an icon with a name that cannot be found.\n * @docs-private\n */\nexport function getMatIconNameNotFoundError(iconName: string): Error {\n return Error(`Unable to find icon with the name \"${iconName}\"`);\n}\n\n\n/**\n * Returns an exception to be thrown when the consumer attempts to use\n * `<mat-icon>` without including @angular/common/http.\n * @docs-private\n */\nexport function getMatIconNoHttpProviderError(): Error {\n return Error('Could not find HttpClient provider for use with Angular Material icons. ' +\n 'Please include the HttpClientModule from @angular/common/http in your ' +\n 'app imports.');\n}\n\n\n/**\n * Returns an exception to be thrown when a URL couldn't be sanitized.\n * @param url URL that was attempted to be sanitized.\n * @docs-private\n */\nexport function getMatIconFailedToSanitizeUrlError(url: SafeResourceUrl): Error {\n return Error(`The URL provided to MatIconRegistry was not trusted as a resource URL ` +\n `via Angular's DomSanitizer. Attempted URL was \"${url}\".`);\n}\n\n/**\n * Returns an exception to be thrown when a HTML string couldn't be sanitized.\n * @param literal HTML that was attempted to be sanitized.\n * @docs-private\n */\nexport function getMatIconFailedToSanitizeLiteralError(literal: SafeHtml): Error {\n return Error(`The literal provided to MatIconRegistry was not trusted as safe HTML by ` +\n `Angular's DomSanitizer. Attempted literal was \"${literal}\".`);\n}\n\n/** Options that can be used to configure how an icon or the icons in an icon set are presented. */\nexport interface IconOptions {\n /** View box to set on the icon. */\n viewBox?: string;\n}\n\n/**\n * Configuration for an icon, including the URL and possibly the cached SVG element.\n * @docs-private\n */\nclass SvgIconConfig {\n url: SafeResourceUrl | null;\n svgElement: SVGElement | null;\n\n constructor(url: SafeResourceUrl, options?: IconOptions);\n constructor(svgElement: SVGElement, options?: IconOptions);\n constructor(data: SafeResourceUrl | SVGElement, public options?: IconOptions) {\n // Note that we can't use `instanceof SVGElement` here,\n // because it'll break during server-side rendering.\n if (!!(data as any).nodeName) {\n this.svgElement = data as SVGElement;\n } else {\n this.url = data as SafeResourceUrl;\n }\n }\n}\n\n/**\n * Service to register and display icons used by the `<mat-icon>` component.\n * - Registers icon URLs by namespace and name.\n * - Registers icon set URLs by namespace.\n * - Registers aliases for CSS classes, for use with icon fonts.\n * - Loads icons from URLs and extracts individual icons from icon sets.\n */\n@Injectable({providedIn: 'root'})\nexport class MatIconRegistry implements OnDestroy {\n private _document: Document;\n\n /**\n * URLs and cached SVG elements for individual icons. Keys are of the format \"[namespace]:[icon]\".\n */\n private _svgIconConfigs = new Map<string, SvgIconConfig>();\n\n /**\n * SvgIconConfig objects and cached SVG elements for icon sets, keyed by namespace.\n * Multiple icon sets can be registered under the same namespace.\n */\n private _iconSetConfigs = new Map<string, SvgIconConfig[]>();\n\n /** Cache for icons loaded by direct URLs. */\n private _cachedIconsByUrl = new Map<string, SVGElement>();\n\n /** In-progress icon fetches. Used to coalesce multiple requests to the same URL. */\n private _inProgressUrlFetches = new Map<string, Observable<string>>();\n\n /** Map from font identifiers to their CSS class names. Used for icon fonts. */\n private _fontCssClassesByAlias = new Map<string, string>();\n\n /**\n * The CSS class to apply when an `<mat-icon>` component has no icon name, url, or font specified.\n * The default 'material-icons' value assumes that the material icon font has been loaded as\n * described at http://google.github.io/material-design-icons/#icon-font-for-the-web\n */\n private _defaultFontSetClass = 'material-icons';\n\n constructor(\n @Optional() private _httpClient: HttpClient,\n private _sanitizer: DomSanitizer,\n @Optional() @Inject(DOCUMENT) document: any,\n // @breaking-change 9.0.0 _errorHandler parameter to be made required\n @Optional() private readonly _errorHandler?: ErrorHandler) {\n this._document = document;\n }\n\n /**\n * Registers an icon by URL in the default namespace.\n * @param iconName Name under which the icon should be registered.\n * @param url\n */\n addSvgIcon(iconName: string, url: SafeResourceUrl, options?: IconOptions): this {\n return this.addSvgIconInNamespace('', iconName, url, options);\n }\n\n /**\n * Registers an icon using an HTML string in the default namespace.\n * @param iconName Name under which the icon should be registered.\n * @param literal SVG source of the icon.\n */\n addSvgIconLiteral(iconName: string, literal: SafeHtml, options?: IconOptions): this {\n return this.addSvgIconLiteralInNamespace('', iconName, literal, options);\n }\n\n /**\n * Registers an icon by URL in the specified namespace.\n * @param namespace Namespace in which the icon should be registered.\n * @param iconName Name under which the icon should be registered.\n * @param url\n */\n addSvgIconInNamespace(namespace: string, iconName: string, url: SafeResourceUrl,\n options?: IconOptions): this {\n return this._addSvgIconConfig(namespace, iconName, new SvgIconConfig(url, options));\n }\n\n /**\n * Registers an icon using an HTML string in the specified namespace.\n * @param namespace Namespace in which the icon should be registered.\n * @param iconName Name under which the icon should be registered.\n * @param literal SVG source of the icon.\n */\n addSvgIconLiteralInNamespace(namespace: string, iconName: string, literal: SafeHtml,\n options?: IconOptions): this {\n const sanitizedLiteral = this._sanitizer.sanitize(SecurityContext.HTML, literal);\n\n if (!sanitizedLiteral) {\n throw getMatIconFailedToSanitizeLiteralError(literal);\n }\n\n const svgElement = this._createSvgElementForSingleIcon(sanitizedLiteral, options);\n return this._addSvgIconConfig(namespace, iconName, new SvgIconConfig(svgElement, options));\n }\n\n /**\n * Registers an icon set by URL in the default namespace.\n * @param url\n */\n addSvgIconSet(url: SafeResourceUrl, options?: IconOptions): this {\n return this.addSvgIconSetInNamespace('', url, options);\n }\n\n /**\n * Registers an icon set using an HTML string in the default namespace.\n * @param literal SVG source of the icon set.\n */\n addSvgIconSetLiteral(literal: SafeHtml, options?: IconOptions): this {\n return this.addSvgIconSetLiteralInNamespace('', literal, options);\n }\n\n /**\n * Registers an icon set by URL in the specified namespace.\n * @param namespace Namespace in which to register the icon set.\n * @param url\n */\n addSvgIconSetInNamespace(namespace: string, url: SafeResourceUrl, options?: IconOptions): this {\n return this._addSvgIconSetConfig(namespace, new SvgIconConfig(url, options));\n }\n\n /**\n * Registers an icon set using an HTML string in the specified namespace.\n * @param namespace Namespace in which to register the icon set.\n * @param literal SVG source of the icon set.\n */\n addSvgIconSetLiteralInNamespace(namespace: string, literal: SafeHtml,\n options?: IconOptions): this {\n const sanitizedLiteral = this._sanitizer.sanitize(SecurityContext.HTML, literal);\n\n if (!sanitizedLiteral) {\n throw getMatIconFailedToSanitizeLiteralError(literal);\n }\n\n const svgElement = this._svgElementFromString(sanitizedLiteral);\n return this._addSvgIconSetConfig(namespace, new SvgIconConfig(svgElement, options));\n }\n\n /**\n * Defines an alias for a CSS class name to be used for icon fonts. Creating an matIcon\n * component with the alias as the fontSet input will cause the class name to be applied\n * to the `<mat-icon>` element.\n *\n * @param alias Alias for the font.\n * @param className Class name override to be used instead of the alias.\n */\n registerFontClassAlias(alias: string, className: string = alias): this {\n this._fontCssClassesByAlias.set(alias, className);\n return this;\n }\n\n /**\n * Returns the CSS class name associated with the alias by a previous call to\n * registerFontClassAlias. If no CSS class has been associated, returns the alias unmodified.\n */\n classNameForFontAlias(alias: string): string {\n return this._fontCssClassesByAlias.get(alias) || alias;\n }\n\n /**\n * Sets the CSS class name to be used for icon fonts when an `<mat-icon>` component does not\n * have a fontSet input value, and is not loading an icon by name or URL.\n *\n * @param className\n */\n setDefaultFontSetClass(className: string): this {\n this._defaultFontSetClass = className;\n return this;\n }\n\n /**\n * Returns the CSS class name to be used for icon fonts when an `<mat-icon>` component does not\n * have a fontSet input value, and is not loading an icon by name or URL.\n */\n getDefaultFontSetClass(): string {\n return this._defaultFontSetClass;\n }\n\n /**\n * Returns an Observable that produces the icon (as an `<svg>` DOM element) from the given URL.\n * The response from the URL may be cached so this will not always cause an HTTP request, but\n * the produced element will always be a new copy of the originally fetched icon. (That is,\n * it will not contain any modifications made to elements previously returned).\n *\n * @param safeUrl URL from which to fetch the SVG icon.\n */\n getSvgIconFromUrl(safeUrl: SafeResourceUrl): Observable<SVGElement> {\n const url = this._sanitizer.sanitize(SecurityContext.RESOURCE_URL, safeUrl);\n\n if (!url) {\n throw getMatIconFailedToSanitizeUrlError(safeUrl);\n }\n\n const cachedIcon = this._cachedIconsByUrl.get(url);\n\n if (cachedIcon) {\n return observableOf(cloneSvg(cachedIcon));\n }\n\n return this._loadSvgIconFromConfig(new SvgIconConfig(safeUrl)).pipe(\n tap(svg => this._cachedIconsByUrl.set(url!, svg)),\n map(svg => cloneSvg(svg)),\n );\n }\n\n /**\n * Returns an Observable that produces the icon (as an `<svg>` DOM element) with the given name\n * and namespace. The icon must have been previously registered with addIcon or addIconSet;\n * if not, the Observable will throw an error.\n *\n * @param name Name of the icon to be retrieved.\n * @param namespace Namespace in which to look for the icon.\n */\n getNamedSvgIcon(name: string, namespace: string = ''): Observable<SVGElement> {\n // Return (copy of) cached icon if possible.\n const key = iconKey(namespace, name);\n const config = this._svgIconConfigs.get(key);\n\n if (config) {\n return this._getSvgFromConfig(config);\n }\n\n // See if we have any icon sets registered for the namespace.\n const iconSetConfigs = this._iconSetConfigs.get(namespace);\n\n if (iconSetConfigs) {\n return this._getSvgFromIconSetConfigs(name, iconSetConfigs);\n }\n\n return observableThrow(getMatIconNameNotFoundError(key));\n }\n\n ngOnDestroy() {\n this._svgIconConfigs.clear();\n this._iconSetConfigs.clear();\n this._cachedIconsByUrl.clear();\n }\n\n /**\n * Returns the cached icon for a SvgIconConfig if available, or fetches it from its URL if not.\n */\n private _getSvgFromConfig(config: SvgIconConfig): Observable<SVGElement> {\n if (config.svgElement) {\n // We already have the SVG element for this icon, return a copy.\n return observableOf(cloneSvg(config.svgElement));\n } else {\n // Fetch the icon from the config's URL, cache it, and return a copy.\n return this._loadSvgIconFromConfig(config).pipe(\n tap(svg => config.svgElement = svg),\n map(svg => cloneSvg(svg)),\n );\n }\n }\n\n /**\n * Attempts to find an icon with the specified name in any of the SVG icon sets.\n * First searches the available cached icons for a nested element with a matching name, and\n * if found copies the element to a new `<svg>` element. If not found, fetches all icon sets\n * that have not been cached, and searches again after all fetches are completed.\n * The returned Observable produces the SVG element if possible, and throws\n * an error if no icon with the specified name can be found.\n */\n private _getSvgFromIconSetConfigs(name: string, iconSetConfigs: SvgIconConfig[]):\n Observable<SVGElement> {\n // For all the icon set SVG elements we've fetched, see if any contain an icon with the\n // requested name.\n const namedIcon = this._extractIconWithNameFromAnySet(name, iconSetConfigs);\n\n if (namedIcon) {\n // We could cache namedIcon in _svgIconConfigs, but since we have to make a copy every\n // time anyway, there's probably not much advantage compared to just always extracting\n // it from the icon set.\n return observableOf(namedIcon);\n }\n\n // Not found in any cached icon sets. If there are icon sets with URLs that we haven't\n // fetched, fetch them now and look for iconName in the results.\n const iconSetFetchRequests: Observable<SVGElement | null>[] = iconSetConfigs\n .filter(iconSetConfig => !iconSetConfig.svgElement)\n .map(iconSetConfig => {\n return this._loadSvgIconSetFromConfig(iconSetConfig).pipe(\n catchError((err: HttpErrorResponse): Observable<SVGElement | null> => {\n const url = this._sanitizer.sanitize(SecurityContext.RESOURCE_URL, iconSetConfig.url);\n\n // Swallow errors fetching individual URLs so the\n // combined Observable won't necessarily fail.\n const errorMessage = `Loading icon set URL: ${url} failed: ${err.message}`;\n // @breaking-change 9.0.0 _errorHandler parameter to be made required\n if (this._errorHandler) {\n this._errorHandler.handleError(new Error(errorMessage));\n } else {\n console.error(errorMessage);\n }\n return observableOf(null);\n })\n );\n });\n\n // Fetch all the icon set URLs. When the requests complete, every IconSet should have a\n // cached SVG element (unless the request failed), and we can check again for the icon.\n return forkJoin(iconSetFetchRequests).pipe(map(() => {\n const foundIcon = this._extractIconWithNameFromAnySet(name, iconSetConfigs);\n\n if (!foundIcon) {\n throw getMatIconNameNotFoundError(name);\n }\n\n return foundIcon;\n }));\n }\n\n /**\n * Searches the cached SVG elements for the given icon sets for a nested icon element whose \"id\"\n * tag matches the specified name. If found, copies the nested element to a new SVG element and\n * returns it. Returns null if no matching element is found.\n */\n private _extractIconWithNameFromAnySet(iconName: string, iconSetConfigs: SvgIconConfig[]):\n SVGElement | null {\n // Iterate backwards, so icon sets added later have precedence.\n for (let i = iconSetConfigs.length - 1; i >= 0; i--) {\n const config = iconSetConfigs[i];\n if (config.svgElement) {\n const foundIcon = this._extractSvgIconFromSet(config.svgElement, iconName, config.options);\n if (foundIcon) {\n return foundIcon;\n }\n }\n }\n return null;\n }\n\n /**\n * Loads the content of the icon URL specified in the SvgIconConfig and creates an SVG element\n * from it.\n */\n private _loadSvgIconFromConfig(config: SvgIconConfig): Observable<SVGElement> {\n return this._fetchUrl(config.url)\n .pipe(map(svgText => this._createSvgElementForSingleIcon(svgText, config.options)));\n }\n\n /**\n * Loads the content of the icon set URL specified in the SvgIconConfig and creates an SVG element\n * from it.\n */\n private _loadSvgIconSetFromConfig(config: SvgIconConfig): Observable<SVGElement> {\n // If the SVG for this icon set has already been parsed, do nothing.\n if (config.svgElement) {\n return observableOf(config.svgElement);\n }\n\n return this._fetchUrl(config.url).pipe(map(svgText => {\n // It is possible that the icon set was parsed and cached by an earlier request, so parsing\n // only needs to occur if the cache is yet unset.\n if (!config.svgElement) {\n config.svgElement = this._svgElementFromString(svgText);\n }\n\n return config.svgElement;\n }));\n }\n\n /**\n * Creates a DOM element from the given SVG string, and adds default attributes.\n */\n private _createSvgElementForSingleIcon(responseText: string, options?: IconOptions): SVGElement {\n const svg = this._svgElementFromString(responseText);\n this._setSvgAttributes(svg, options);\n return svg;\n }\n\n /**\n * Searches the cached element of the given SvgIconConfig for a nested icon element whose \"id\"\n * tag matches the specified name. If found, copies the nested element to a new SVG element and\n * returns it. Returns null if no matching element is found.\n */\n private _extractSvgIconFromSet(iconSet: SVGElement, iconName: string,\n options?: IconOptions): SVGElement | null {\n // Use the `id=\"iconName\"` syntax in order to escape special\n // characters in the ID (versus using the #iconName syntax).\n const iconSource = iconSet.querySelector(`[id=\"${iconName}\"]`);\n\n if (!iconSource) {\n return null;\n }\n\n // Clone the element and remove the ID to prevent multiple elements from being added\n // to the page with the same ID.\n const iconElement = iconSource.cloneNode(true) as Element;\n iconElement.removeAttribute('id');\n\n // If the icon node is itself an <svg> node, clone and return it directly. If not, set it as\n // the content of a new <svg> node.\n if (iconElement.nodeName.toLowerCase() === 'svg') {\n return this._setSvgAttributes(iconElement as SVGElement, options);\n }\n\n // If the node is a <symbol>, it won't be rendered so we have to convert it into <svg>. Note\n // that the same could be achieved by referring to it via <use href=\"#id\">, however the <use>\n // tag is problematic on Firefox, because it needs to include the current page path.\n if (iconElement.nodeName.toLowerCase() === 'symbol') {\n return this._setSvgAttributes(this._toSvgElement(iconElement), options);\n }\n\n // createElement('SVG') doesn't work as expected; the DOM ends up with\n // the correct nodes, but the SVG content doesn't render. Instead we\n // have to create an empty SVG node using innerHTML and append its content.\n // Elements created using DOMParser.parseFromString have the same problem.\n // http://stackoverflow.com/questions/23003278/svg-innerhtml-in-firefox-can-not-display\n const svg = this._svgElementFromString('<svg></svg>');\n // Clone the node so we don't remove it from the parent icon set element.\n svg.appendChild(iconElement);\n\n return this._setSvgAttributes(svg, options);\n }\n\n /**\n * Creates a DOM element from the given SVG string.\n */\n private _svgElementFromString(str: string): SVGElement {\n const div = this._document.createElement('DIV');\n div.innerHTML = str;\n const svg = div.querySelector('svg') as SVGElement;\n\n if (!svg) {\n throw Error('<svg> tag not found');\n }\n\n return svg;\n }\n\n /**\n * Converts an element into an SVG node by cloning all of its children.\n */\n private _toSvgElement(element: Element): SVGElement {\n const svg = this._svgElementFromString('<svg></svg>');\n const attributes = element.attributes;\n\n // Copy over all the attributes from the `symbol` to the new SVG, except the id.\n for (let i = 0; i < attributes.length; i++) {\n const {name, value} = attributes[i];\n\n if (name !== 'id') {\n svg.setAttribute(name, value);\n }\n }\n\n for (let i = 0; i < element.childNodes.length; i++) {\n if (element.childNodes[i].nodeType === this._document.ELEMENT_NODE) {\n svg.appendChild(element.childNodes[i].cloneNode(true));\n }\n }\n\n return svg;\n }\n\n /**\n * Sets the default attributes for an SVG element to be used as an icon.\n */\n private _setSvgAttributes(svg: SVGElement, options?: IconOptions): SVGElement {\n svg.setAttribute('fit', '');\n svg.setAttribute('height', '100%');\n svg.setAttribute('width', '100%');\n svg.setAttribute('preserveAspectRatio', 'xMidYMid meet');\n svg.setAttribute('focusable', 'false'); // Disable IE11 default behavior to make SVGs focusable.\n\n if (options && options.viewBox) {\n svg.setAttribute('viewBox', options.viewBox);\n }\n\n return svg;\n }\n\n /**\n * Returns an Observable which produces the string contents of the given URL. Results may be\n * cached, so future calls with the same URL may not cause another HTTP request.\n */\n private _fetchUrl(safeUrl: SafeResourceUrl | null): Observable<string> {\n if (!this._httpClient) {\n throw getMatIconNoHttpProviderError();\n }\n\n if (safeUrl == null) {\n throw Error(`Cannot fetch icon from URL \"${safeUrl}\".`);\n }\n\n const url = this._sanitizer.sanitize(SecurityContext.RESOURCE_URL, safeUrl);\n\n if (!url) {\n throw getMatIconFailedToSanitizeUrlError(safeUrl);\n }\n\n // Store in-progress fetches to avoid sending a duplicate request for a URL when there is\n // already a request in progress for that URL. It's necessary to call share() on the\n // Observable returned by http.get() so that multiple subscribers don't cause multiple XHRs.\n const inProgressFetch = this._inProgressUrlFetches.get(url);\n\n if (inProgressFetch) {\n return inProgressFetch;\n }\n\n // TODO(jelbourn): for some reason, the `finalize` operator \"loses\" the generic type on the\n // Observable. Figure out why and fix it.\n const req = this._httpClient.get(url, {responseType: 'text'}).pipe(\n finalize(() => this._inProgressUrlFetches.delete(url)),\n share(),\n );\n\n this._inProgressUrlFetches.set(url, req);\n return req;\n }\n\n /**\n * Registers an icon config by name in the specified namespace.\n * @param namespace Namespace in which to register the icon config.\n * @param iconName Name under which to register the config.\n * @param config Config to be registered.\n */\n private _addSvgIconConfig(namespace: string, iconName: string, config: SvgIconConfig): this {\n this._svgIconConfigs.set(iconKey(namespace, iconName), config);\n return this;\n }\n\n /**\n * Registers an icon set config in the specified namespace.\n * @param namespace Namespace in which to register the icon config.\n * @param config Config to be registered.\n */\n private _addSvgIconSetConfig(namespace: string, config: SvgIconConfig): this {\n const configNamespace = this._iconSetConfigs.get(namespace);\n\n if (configNamespace) {\n configNamespace.push(config);\n } else {\n this._iconSetConfigs.set(namespace, [config]);\n }\n\n return this;\n }\n}\n\n/** @docs-private */\nexport function ICON_REGISTRY_PROVIDER_FACTORY(\n parentRegistry: MatIconRegistry,\n httpClient: HttpClient,\n sanitizer: DomSanitizer,\n document?: any,\n errorHandler?: ErrorHandler) {\n return parentRegistry || new MatIconRegistry(httpClient, sanitizer, document, errorHandler);\n}\n\n/** @docs-private */\nexport const ICON_REGISTRY_PROVIDER = {\n // If there is already an MatIconRegistry available, use that. Otherwise, provide a new one.\n provide: MatIconRegistry,\n deps: [\n [new Optional(), new SkipSelf(), MatIconRegistry],\n [new Optional(), HttpClient],\n DomSanitizer,\n [new Optional(), ErrorHandler],\n [new Optional(), DOCUMENT as InjectionToken<any>],\n ],\n useFactory: ICON_REGISTRY_PROVIDER_FACTORY,\n};\n\n/** Clones an SVGElement while preserving type information. */\nfunction cloneSvg(svg: SVGElement): SVGElement {\n return svg.cloneNode(true) as SVGElement;\n}\n\n/** Returns the cache key to use for an icon namespace and name. */\nfunction iconKey(namespace: string, name: string) {\n return namespace + ':' + name;\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 {BooleanInput, coerceBooleanProperty} from '@angular/cdk/coercion';\nimport {DOCUMENT} from '@angular/common';\nimport {\n AfterViewChecked,\n Attribute,\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n ErrorHandler,\n inject,\n Inject,\n InjectionToken,\n Input,\n OnChanges,\n OnDestroy,\n OnInit,\n Optional,\n SimpleChanges,\n ViewEncapsulation,\n} from '@angular/core';\nimport {CanColor, CanColorCtor, mixinColor} from '@angular/material/core';\nimport {take} from 'rxjs/operators';\n\nimport {MatIconRegistry} from './icon-registry';\n\n\n// Boilerplate for applying mixins to MatIcon.\n/** @docs-private */\nclass MatIconBase {\n constructor(public _elementRef: ElementRef) {}\n}\nconst _MatIconMixinBase: CanColorCtor & typeof MatIconBase = mixinColor(MatIconBase);\n\n/**\n * Injection token used to provide the current location to `MatIcon`.\n * Used to handle server-side rendering and to stub out during unit tests.\n * @docs-private\n */\nexport const MAT_ICON_LOCATION = new InjectionToken<MatIconLocation>('mat-icon-location', {\n providedIn: 'root',\n factory: MAT_ICON_LOCATION_FACTORY\n});\n\n/**\n * Stubbed out location for `MatIcon`.\n * @docs-private\n */\nexport interface MatIconLocation {\n getPathname: () => string;\n}\n\n/** @docs-private */\nexport function MAT_ICON_LOCATION_FACTORY(): MatIconLocation {\n const _document = inject(DOCUMENT);\n const _location = _document ? _document.location : null;\n\n return {\n // Note that this needs to be a function, rather than a property, because Angular\n // will only resolve it once, but we want the current path on each call.\n getPathname: () => _location ? (_location.pathname + _location.search) : ''\n };\n}\n\n\n/** SVG attributes that accept a FuncIRI (e.g. `url(<something>)`). */\nconst funcIriAttributes = [\n 'clip-path',\n 'color-profile',\n 'src',\n 'cursor',\n 'fill',\n 'filter',\n 'marker',\n 'marker-start',\n 'marker-mid',\n 'marker-end',\n 'mask',\n 'stroke'\n];\n\n/** Selector that can be used to find all elements that are using a `FuncIRI`. */\nconst funcIriAttributeSelector = funcIriAttributes.map(attr => `[${attr}]`).join(', ');\n\n/** Regex that can be used to extract the id out of a FuncIRI. */\nconst funcIriPattern = /^url\\(['\"]?#(.*?)['\"]?\\)$/;\n\n/**\n * Component to display an icon. It can be used in the following ways:\n *\n * - Specify the svgIcon input to load an SVG icon from a URL previously registered with the\n * addSvgIcon, addSvgIconInNamespace, addSvgIconSet, or addSvgIconSetInNamespace methods of\n * MatIconRegistry. If the svgIcon value contains a colon it is assumed to be in the format\n * \"[namespace]:[name]\", if not the value will be the name of an icon in the default namespace.\n * Examples:\n * `<mat-icon svgIcon=\"left-arrow\"></mat-icon>\n * <mat-icon svgIcon=\"animals:cat\"></mat-icon>`\n *\n * - Use a font ligature as an icon by putting the ligature text in the content of the `<mat-icon>`\n * component. By default the Material icons font is used as described at\n * http://google.github.io/material-design-icons/#icon-font-for-the-web. You can specify an\n * alternate font by setting the fontSet input to either the CSS class to apply to use the\n * desired font, or to an alias previously registered with MatIconRegistry.registerFontClassAlias.\n * Examples:\n * `<mat-icon>home</mat-icon>\n * <mat-icon fontSet=\"myfont\">sun</mat-icon>`\n *\n * - Specify a font glyph to be included via CSS rules by setting the fontSet input to specify the\n * font, and the fontIcon input to specify the icon. Typically the fontIcon will specify a\n * CSS class which causes the glyph to be displayed via a :before selector, as in\n * https://fortawesome.github.io/Font-Awesome/examples/\n * Example:\n * `<mat-icon fontSet=\"fa\" fontIcon=\"alarm\"></mat-icon>`\n */\n@Component({\n template: '<ng-content></ng-content>',\n selector: 'mat-icon',\n exportAs: 'matIcon',\n styleUrls: ['icon.css'],\n inputs: ['color'],\n host: {\n 'role': 'img',\n 'class': 'mat-icon notranslate',\n '[class.mat-icon-inline]': 'inline',\n '[class.mat-icon-no-color]': 'color !== \"primary\" && color !== \"accent\" && color !== \"warn\"',\n },\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class MatIcon extends _MatIconMixinBase implements OnChanges, OnInit, AfterViewChecked,\n CanColor, OnDestroy {\n\n /**\n * Whether the icon should be inlined, automatically sizing the icon to match the font size of\n * the element the icon is contained in.\n */\n @Input()\n get inline(): boolean {\n return this._inline;\n }\n set inline(inline: boolean) {\n this._inline = coerceBooleanProperty(inline);\n }\n private _inline: boolean = false;\n\n /** Name of the icon in the SVG icon set. */\n @Input() svgIcon: string;\n\n /** Font set that the icon is a part of. */\n @Input()\n get fontSet(): string { return this._fontSet; }\n set fontSet(value: string) {\n this._fontSet = this._cleanupFontValue(value);\n }\n private _fontSet: string;\n\n /** Name of an icon within a font set. */\n @Input()\n get fontIcon(): string { return this._fontIcon; }\n set fontIcon(value: string) {\n this._fontIcon = this._cleanupFontValue(value);\n }\n private _fontIcon: string;\n\n private _previousFontSetClass: string;\n private _previousFontIconClass: string;\n\n /** Keeps track of the current page path. */\n private _previousPath?: string;\n\n /** Keeps track of the elements and attributes that we've prefixed with the current path. */\n private _elementsWithExternalReferences?: Map<Element, {name: string, value: string}[]>;\n\n constructor(\n elementRef: ElementRef<HTMLElement>, private _iconRegistry: MatIconRegistry,\n @Attribute('aria-hidden') ariaHidden: string,\n /**\n * @deprecated `location` parameter to be made required.\n * @breaking-change 8.0.0\n */\n @Optional() @Inject(MAT_ICON_LOCATION) private _location?: MatIconLocation,\n // @breaking-change 9.0.0 _errorHandler parameter to be made required\n @Optional() private readonly _errorHandler?: ErrorHandler) {\n super(elementRef);\n\n // If the user has not explicitly set aria-hidden, mark the icon as hidden, as this is\n // the right thing to do for the majority of icon use-cases.\n if (!ariaHidden) {\n elementRef.nativeElement.setAttribute('aria-hidden', 'true');\n }\n }\n\n /**\n * Splits an svgIcon binding value into its icon set and icon name components.\n * Returns a 2-element array of [(icon set), (icon name)].\n * The separator for the two fields is ':'. If there is no separator, an empty\n * string is returned for the icon set and the entire value is returned for\n * the icon name. If the argument is falsy, returns an array of two empty strings.\n * Throws an error if the name contains two or more ':' separators.\n * Examples:\n * `'social:cake' -> ['social', 'cake']\n * 'penguin' -> ['', 'penguin']\n * null -> ['', '']\n * 'a:b:c' -> (throws Error)`\n */\n private _splitIconName(iconName: string): [string, string] {\n if (!iconName) {\n return ['', ''];\n }\n const parts = iconName.split(':');\n switch (parts.length) {\n case 1: return ['', parts[0]]; // Use default namespace.\n case 2: return <[string, string]>parts;\n default: throw Error(`Invalid icon name: \"${iconName}\"`);\n }\n }\n\n ngOnChanges(changes: SimpleChanges) {\n // Only update the inline SVG icon if the inputs changed, to avoid unnecessary DOM operations.\n const svgIconChanges = changes['svgIcon'];\n\n if (svgIconChanges) {\n if (this.svgIcon) {\n const [namespace, iconName] = this._splitIconName(this.svgIcon);\n\n this._iconRegistry.getNamedSvgIcon(iconName, namespace)\n .pipe(take(1))\n .subscribe(svg => this._setSvgElement(svg), (err: Error) => {\n const errorMessage = `Error retrieving icon ${namespace}:${iconName}! ${err.message}`;\n // @breaking-change 9.0.0 _errorHandler parameter to be made required.\n if (this._errorHandler) {\n this._errorHandler.handleError(new Error(errorMessage));\n } else {\n console.error(errorMessage);\n }\n });\n } else if (svgIconChanges.previousValue) {\n this._clearSvgElement();\n }\n }\n\n if (this._usingFontIcon()) {\n this._updateFontIconClasses();\n }\n }\n\n ngOnInit() {\n // Update font classes because ngOnChanges won't be called if none of the inputs are present,\n // e.g. <mat-icon>arrow</mat-icon> In this case we need to add a CSS class for the default font.\n if (this._usingFontIcon()) {\n this._updateFontIconClasses();\n }\n }\n\n ngAfterViewChecked() {\n const cachedElements = this._elementsWithExternalReferences;\n\n if (cachedElements && this._location && cachedElements.size) {\n const newPath = this._location.getPathname();\n\n // We need to check whether the URL has changed on each change detection since\n // the browser doesn't have an API that will let us react on link clicks and\n // we can't depend on the Angular router. The references need to be updated,\n // because while most browsers don't care whether the URL is correct after\n // the first render, Safari will break if the user navigates to a different\n // page and the SVG isn't re-rendered.\n if (newPath !== this._previousPath) {\n this._previousPath = newPath;\n this._prependPathToReferences(newPath);\n }\n }\n }\n\n ngOnDestroy() {\n if (this._elementsWithExternalReferences) {\n this._elementsWithExternalReferences.clear();\n }\n }\n\n private _usingFontIcon(): boolean {\n return !this.svgIcon;\n }\n\n private _setSvgElement(svg: SVGElement) {\n this._clearSvgElement();\n\n // Workaround for IE11 and Edge ignoring `style` tags inside dynamically-created SVGs.\n // See: https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/10898469/\n // Do this before inserting the element into the DOM, in order to avoid a style recalculation.\n const styleTags = svg.querySelectorAll('style') as NodeListOf<HTMLStyleElement>;\n\n for (let i = 0; i < styleTags.length; i++) {\n styleTags[i].textContent += ' ';\n }\n\n // Note: we do this fix here, rather than the icon registry, because the\n // references have to point to the URL at the time that the icon was created.\n if (this._location) {\n const path = this._location.getPathname();\n this._previousPath = path;\n this._cacheChildrenWithExternalReferences(svg);\n this._prependPathToReferences(path);\n }\n\n this._elementRef.nativeElement.appendChild(svg);\n }\n\n private _clearSvgElement() {\n const layoutElement: HTMLElement = this._elementRef.nativeElement;\n let childCount = layoutElement.childNodes.length;\n\n if (this._elementsWithExternalReferences) {\n this._elementsWithExternalReferences.clear();\n }\n\n // Remove existing non-element child nodes and SVGs, and add the new SVG element. Note that\n // we can't use innerHTML, because IE will throw if the element has a data binding.\n while (childCount--) {\n const child = layoutElement.childNodes[childCount];\n\n // 1 corresponds to Node.ELEMENT_NODE. We remove all non-element nodes in order to get rid\n // of any loose text nodes, as well as any SVG elements in order to remove any old icons.\n if (child.nodeType !== 1 || child.nodeName.toLowerCase() === 'svg') {\n layoutElement.removeChild(child);\n }\n }\n }\n\n private _updateFontIconClasses() {\n if (!this._usingFontIcon()) {\n return;\n }\n\n const elem: HTMLElement = this._elementRef.nativeElement;\n const fontSetClass = this.fontSet ?\n this._iconRegistry.classNameForFontAlias(this.fontSet) :\n this._iconRegistry.getDefaultFontSetClass();\n\n if (fontSetClass != this._previousFontSetClass) {\n if (this._previousFontSetClass) {\n elem.classList.remove(this._previousFontSetClass);\n }\n if (fontSetClass) {\n elem.classList.add(fontSetClass);\n }\n this._previousFontSetClass = fontSetClass;\n }\n\n if (this.fontIcon != this._previousFontIconClass) {\n if (this._previousFontIconClass) {\n elem.classList.remove(this._previousFontIconClass);\n }\n if (this.fontIcon) {\n elem.classList.add(this.fontIcon);\n }\n this._previousFontIconClass = this.fontIcon;\n }\n }\n\n /**\n * Cleans up a value to be used as a fontIcon or fontSet.\n * Since the value ends up being assigned as a CSS class, we\n * have to trim the value and omit space-separated values.\n */\n private _cleanupFontValue(value: string) {\n return typeof value === 'string' ? value.trim().split(' ')[0] : value;\n }\n\n /**\n * Prepends the current path to all elements that have an attribute pointing to a `FuncIRI`\n * reference. This is required because WebKit browsers require references to be prefixed with\n * the current path, if the page has a `base` tag.\n */\n private _prependPathToReferences(path: string) {\n const elements = this._elementsWithExternalReferences;\n\n if (elements) {\n elements.forEach((attrs, element) => {\n attrs.forEach(attr => {\n element.setAttribute(attr.name, `url('${path}#${attr.value}')`);\n });\n });\n }\n }\n\n /**\n * Caches the children of an SVG element that have `url()`\n * references that we need to prefix with the current path.\n */\n private _cacheChildrenWithExternalReferences(element: SVGElement) {\n const elementsWithFuncIri = element.querySelectorAll(funcIriAttributeSelector);\n const elements = this._elementsWithExternalReferences =\n this._elementsWithExternalReferences || new Map();\n\n for (let i = 0; i < elementsWithFuncIri.length; i++) {\n funcIriAttributes.forEach(attr => {\n const elementWithReference = elementsWithFuncIri[i];\n const value = elementWithReference.getAttribute(attr);\n const match = value ? value.match(funcIriPattern) : null;\n\n if (match) {\n let attributes = elements.get(elementWithReference);\n\n if (!attributes) {\n attributes = [];\n elements.set(elementWithReference, attributes);\n }\n\n attributes!.push({name: attr, value: match[1]});\n }\n });\n }\n }\n\n static ngAcceptInputType_inline: 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} from '@angular/material/core';\nimport {MatIcon} from './icon';\n\n\n@NgModule({\n imports: [MatCommonModule],\n exports: [MatIcon, MatCommonModule],\n declarations: [MatIcon],\n})\nexport class MatIconModule {}\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 './icon-module';\nexport * from './icon';\nexport * from './icon-registry';\n\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["observableOf","observableThrow"],"mappings":";;;;;;;;;;AAAA;;;;;;;AAQA,AAiBA;;;;;AAKA,SAAgB,2BAA2B,CAAC,QAAgB;IAC1D,OAAO,KAAK,CAAC,yCAAsC,QAAQ,OAAG,CAAC,CAAC;CACjE;;;;;;AAQD,SAAgB,6BAA6B;IAC3C,OAAO,KAAK,CAAC,0EAA0E;QAC1E,wEAAwE;QACxE,cAAc,CAAC,CAAC;CAC9B;;;;;;AAQD,SAAgB,kCAAkC,CAAC,GAAoB;IACrE,OAAO,KAAK,CAAC,wEAAwE;SACxE,qDAAkD,GAAG,QAAI,CAAA,CAAC,CAAC;CACzE;;;;;;AAOD,SAAgB,sCAAsC,CAAC,OAAiB;IACtE,OAAO,KAAK,CAAC,0EAA0E;SAC1E,qDAAkD,OAAO,QAAI,CAAA,CAAC,CAAC;CAC7E;;;;;AAYD;IAME,uBAAY,IAAkC,EAAS,OAAqB;QAArB,YAAO,GAAP,OAAO,CAAc;;;QAG1E,IAAI,CAAC,CAAE,IAAY,CAAC,QAAQ,EAAE;YAC5B,IAAI,CAAC,UAAU,GAAG,IAAkB,CAAC;SACtC;aAAM;YACL,IAAI,CAAC,GAAG,GAAG,IAAuB,CAAC;SACpC;KACF;IACH,oBAAC;CAAA,IAAA;;;;;;;;AASD;IA+BE,yBAC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EAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,EAAC,CAAC,CAAC;iBACjD;aACF,CAAC,CAAC;;QAhBL,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,mBAAmB,CAAC,MAAM,EAAE,CAAC,EAAE;oBAA1C,CAAC;SAiBT;KACF;;gBA1SF,SAAS,SAAC;oBACT,QAAQ,EAAE,2BAA2B;oBACrC,QAAQ,EAAE,UAAU;oBACpB,QAAQ,EAAE,SAAS;oBAEnB,MAAM,EAAE,CAAC,OAAO,CAAC;oBACjB,IAAI,EAAE;wBACJ,MAAM,EAAE,KAAK;wBACb,OAAO,EAAE,sBAAsB;wBAC/B,yBAAyB,EAAE,QAAQ;wBACnC,2BAA2B,EAAE,+DAA+D;qBAC7F;oBACD,aAAa,EAAE,iBAAiB,CAAC,IAAI;oBACrC,eAAe,EAAE,uBAAuB,CAAC,MAAM;;iBAChD;;;;gBAxHC,UAAU;gBAgBJ,eAAe;6CAuJhB,SAAS,SAAC,aAAa;gDAKvB,QAAQ,YAAI,MAAM,SAAC,iBAAiB;gBA3KzC,YAAY,uBA6KP,QAAQ;;;yBA9CZ,KAAK;0BAUL,KAAK;0BAGL,KAAK;2BAQL,KAAK;;IAkQR,cAAC;CAAA,CA9R4B,iBAAiB;;ACxI9C;;;;;;;AAQA;IAKA;KAK6B;;gBAL5B,QAAQ,SAAC;oBACR,OAAO,EAAE,CAAC,eAAe,CAAC;oBAC1B,OAAO,EAAE,CAAC,OAAO,EAAE,eAAe,CAAC;oBACnC,YAAY,EAAE,CAAC,OAAO,CAAC;iBACxB;;IAC2B,oBAAC;CAL7B;;ACbA;;;;;;GAMG;;ACNH;;GAEG;;;;"}
1
+ {"version":3,"file":"icon.js","sources":["../../../../../../src/material/icon/icon-registry.ts","../../../../../../src/material/icon/icon.ts","../../../../../../src/material/icon/icon-module.ts","../../../../../../src/material/icon/public-api.ts","../../../../../../src/material/icon/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 {DOCUMENT} from '@angular/common';\nimport {HttpClient, HttpErrorResponse} from '@angular/common/http';\nimport {\n ErrorHandler,\n Inject,\n Injectable,\n InjectionToken,\n Optional,\n SecurityContext,\n SkipSelf,\n OnDestroy,\n} from '@angular/core';\nimport {DomSanitizer, SafeResourceUrl, SafeHtml} from '@angular/platform-browser';\nimport {forkJoin, Observable, of as observableOf, throwError as observableThrow} from 'rxjs';\nimport {catchError, finalize, map, share, tap} from 'rxjs/operators';\n\n\n/**\n * Returns an exception to be thrown in the case when attempting to\n * load an icon with a name that cannot be found.\n * @docs-private\n */\nexport function getMatIconNameNotFoundError(iconName: string): Error {\n return Error(`Unable to find icon with the name \"${iconName}\"`);\n}\n\n\n/**\n * Returns an exception to be thrown when the consumer attempts to use\n * `<mat-icon>` without including @angular/common/http.\n * @docs-private\n */\nexport function getMatIconNoHttpProviderError(): Error {\n return Error('Could not find HttpClient provider for use with Angular Material icons. ' +\n 'Please include the HttpClientModule from @angular/common/http in your ' +\n 'app imports.');\n}\n\n\n/**\n * Returns an exception to be thrown when a URL couldn't be sanitized.\n * @param url URL that was attempted to be sanitized.\n * @docs-private\n */\nexport function getMatIconFailedToSanitizeUrlError(url: SafeResourceUrl): Error {\n return Error(`The URL provided to MatIconRegistry was not trusted as a resource URL ` +\n `via Angular's DomSanitizer. Attempted URL was \"${url}\".`);\n}\n\n/**\n * Returns an exception to be thrown when a HTML string couldn't be sanitized.\n * @param literal HTML that was attempted to be sanitized.\n * @docs-private\n */\nexport function getMatIconFailedToSanitizeLiteralError(literal: SafeHtml): Error {\n return Error(`The literal provided to MatIconRegistry was not trusted as safe HTML by ` +\n `Angular's DomSanitizer. Attempted literal was \"${literal}\".`);\n}\n\n/** Options that can be used to configure how an icon or the icons in an icon set are presented. */\nexport interface IconOptions {\n /** View box to set on the icon. */\n viewBox?: string;\n}\n\n/**\n * Configuration for an icon, including the URL and possibly the cached SVG element.\n * @docs-private\n */\nclass SvgIconConfig {\n url: SafeResourceUrl | null;\n svgElement: SVGElement | null;\n\n constructor(url: SafeResourceUrl, options?: IconOptions);\n constructor(svgElement: SVGElement, options?: IconOptions);\n constructor(data: SafeResourceUrl | SVGElement, public options?: IconOptions) {\n // Note that we can't use `instanceof SVGElement` here,\n // because it'll break during server-side rendering.\n if (!!(data as any).nodeName) {\n this.svgElement = data as SVGElement;\n } else {\n this.url = data as SafeResourceUrl;\n }\n }\n}\n\n/**\n * Service to register and display icons used by the `<mat-icon>` component.\n * - Registers icon URLs by namespace and name.\n * - Registers icon set URLs by namespace.\n * - Registers aliases for CSS classes, for use with icon fonts.\n * - Loads icons from URLs and extracts individual icons from icon sets.\n */\n@Injectable({providedIn: 'root'})\nexport class MatIconRegistry implements OnDestroy {\n private _document: Document;\n\n /**\n * URLs and cached SVG elements for individual icons. Keys are of the format \"[namespace]:[icon]\".\n */\n private _svgIconConfigs = new Map<string, SvgIconConfig>();\n\n /**\n * SvgIconConfig objects and cached SVG elements for icon sets, keyed by namespace.\n * Multiple icon sets can be registered under the same namespace.\n */\n private _iconSetConfigs = new Map<string, SvgIconConfig[]>();\n\n /** Cache for icons loaded by direct URLs. */\n private _cachedIconsByUrl = new Map<string, SVGElement>();\n\n /** In-progress icon fetches. Used to coalesce multiple requests to the same URL. */\n private _inProgressUrlFetches = new Map<string, Observable<string>>();\n\n /** Map from font identifiers to their CSS class names. Used for icon fonts. */\n private _fontCssClassesByAlias = new Map<string, string>();\n\n /**\n * The CSS class to apply when an `<mat-icon>` component has no icon name, url, or font specified.\n * The default 'material-icons' value assumes that the material icon font has been loaded as\n * described at http://google.github.io/material-design-icons/#icon-font-for-the-web\n */\n private _defaultFontSetClass = 'material-icons';\n\n constructor(\n @Optional() private _httpClient: HttpClient,\n private _sanitizer: DomSanitizer,\n @Optional() @Inject(DOCUMENT) document: any,\n // @breaking-change 9.0.0 _errorHandler parameter to be made required\n @Optional() private readonly _errorHandler?: ErrorHandler) {\n this._document = document;\n }\n\n /**\n * Registers an icon by URL in the default namespace.\n * @param iconName Name under which the icon should be registered.\n * @param url\n */\n addSvgIcon(iconName: string, url: SafeResourceUrl, options?: IconOptions): this {\n return this.addSvgIconInNamespace('', iconName, url, options);\n }\n\n /**\n * Registers an icon using an HTML string in the default namespace.\n * @param iconName Name under which the icon should be registered.\n * @param literal SVG source of the icon.\n */\n addSvgIconLiteral(iconName: string, literal: SafeHtml, options?: IconOptions): this {\n return this.addSvgIconLiteralInNamespace('', iconName, literal, options);\n }\n\n /**\n * Registers an icon by URL in the specified namespace.\n * @param namespace Namespace in which the icon should be registered.\n * @param iconName Name under which the icon should be registered.\n * @param url\n */\n addSvgIconInNamespace(namespace: string, iconName: string, url: SafeResourceUrl,\n options?: IconOptions): this {\n return this._addSvgIconConfig(namespace, iconName, new SvgIconConfig(url, options));\n }\n\n /**\n * Registers an icon using an HTML string in the specified namespace.\n * @param namespace Namespace in which the icon should be registered.\n * @param iconName Name under which the icon should be registered.\n * @param literal SVG source of the icon.\n */\n addSvgIconLiteralInNamespace(namespace: string, iconName: string, literal: SafeHtml,\n options?: IconOptions): this {\n const sanitizedLiteral = this._sanitizer.sanitize(SecurityContext.HTML, literal);\n\n if (!sanitizedLiteral) {\n throw getMatIconFailedToSanitizeLiteralError(literal);\n }\n\n const svgElement = this._createSvgElementForSingleIcon(sanitizedLiteral, options);\n return this._addSvgIconConfig(namespace, iconName, new SvgIconConfig(svgElement, options));\n }\n\n /**\n * Registers an icon set by URL in the default namespace.\n * @param url\n */\n addSvgIconSet(url: SafeResourceUrl, options?: IconOptions): this {\n return this.addSvgIconSetInNamespace('', url, options);\n }\n\n /**\n * Registers an icon set using an HTML string in the default namespace.\n * @param literal SVG source of the icon set.\n */\n addSvgIconSetLiteral(literal: SafeHtml, options?: IconOptions): this {\n return this.addSvgIconSetLiteralInNamespace('', literal, options);\n }\n\n /**\n * Registers an icon set by URL in the specified namespace.\n * @param namespace Namespace in which to register the icon set.\n * @param url\n */\n addSvgIconSetInNamespace(namespace: string, url: SafeResourceUrl, options?: IconOptions): this {\n return this._addSvgIconSetConfig(namespace, new SvgIconConfig(url, options));\n }\n\n /**\n * Registers an icon set using an HTML string in the specified namespace.\n * @param namespace Namespace in which to register the icon set.\n * @param literal SVG source of the icon set.\n */\n addSvgIconSetLiteralInNamespace(namespace: string, literal: SafeHtml,\n options?: IconOptions): this {\n const sanitizedLiteral = this._sanitizer.sanitize(SecurityContext.HTML, literal);\n\n if (!sanitizedLiteral) {\n throw getMatIconFailedToSanitizeLiteralError(literal);\n }\n\n const svgElement = this._svgElementFromString(sanitizedLiteral);\n return this._addSvgIconSetConfig(namespace, new SvgIconConfig(svgElement, options));\n }\n\n /**\n * Defines an alias for a CSS class name to be used for icon fonts. Creating an matIcon\n * component with the alias as the fontSet input will cause the class name to be applied\n * to the `<mat-icon>` element.\n *\n * @param alias Alias for the font.\n * @param className Class name override to be used instead of the alias.\n */\n registerFontClassAlias(alias: string, className: string = alias): this {\n this._fontCssClassesByAlias.set(alias, className);\n return this;\n }\n\n /**\n * Returns the CSS class name associated with the alias by a previous call to\n * registerFontClassAlias. If no CSS class has been associated, returns the alias unmodified.\n */\n classNameForFontAlias(alias: string): string {\n return this._fontCssClassesByAlias.get(alias) || alias;\n }\n\n /**\n * Sets the CSS class name to be used for icon fonts when an `<mat-icon>` component does not\n * have a fontSet input value, and is not loading an icon by name or URL.\n *\n * @param className\n */\n setDefaultFontSetClass(className: string): this {\n this._defaultFontSetClass = className;\n return this;\n }\n\n /**\n * Returns the CSS class name to be used for icon fonts when an `<mat-icon>` component does not\n * have a fontSet input value, and is not loading an icon by name or URL.\n */\n getDefaultFontSetClass(): string {\n return this._defaultFontSetClass;\n }\n\n /**\n * Returns an Observable that produces the icon (as an `<svg>` DOM element) from the given URL.\n * The response from the URL may be cached so this will not always cause an HTTP request, but\n * the produced element will always be a new copy of the originally fetched icon. (That is,\n * it will not contain any modifications made to elements previously returned).\n *\n * @param safeUrl URL from which to fetch the SVG icon.\n */\n getSvgIconFromUrl(safeUrl: SafeResourceUrl): Observable<SVGElement> {\n const url = this._sanitizer.sanitize(SecurityContext.RESOURCE_URL, safeUrl);\n\n if (!url) {\n throw getMatIconFailedToSanitizeUrlError(safeUrl);\n }\n\n const cachedIcon = this._cachedIconsByUrl.get(url);\n\n if (cachedIcon) {\n return observableOf(cloneSvg(cachedIcon));\n }\n\n return this._loadSvgIconFromConfig(new SvgIconConfig(safeUrl)).pipe(\n tap(svg => this._cachedIconsByUrl.set(url!, svg)),\n map(svg => cloneSvg(svg)),\n );\n }\n\n /**\n * Returns an Observable that produces the icon (as an `<svg>` DOM element) with the given name\n * and namespace. The icon must have been previously registered with addIcon or addIconSet;\n * if not, the Observable will throw an error.\n *\n * @param name Name of the icon to be retrieved.\n * @param namespace Namespace in which to look for the icon.\n */\n getNamedSvgIcon(name: string, namespace: string = ''): Observable<SVGElement> {\n // Return (copy of) cached icon if possible.\n const key = iconKey(namespace, name);\n const config = this._svgIconConfigs.get(key);\n\n if (config) {\n return this._getSvgFromConfig(config);\n }\n\n // See if we have any icon sets registered for the namespace.\n const iconSetConfigs = this._iconSetConfigs.get(namespace);\n\n if (iconSetConfigs) {\n return this._getSvgFromIconSetConfigs(name, iconSetConfigs);\n }\n\n return observableThrow(getMatIconNameNotFoundError(key));\n }\n\n ngOnDestroy() {\n this._svgIconConfigs.clear();\n this._iconSetConfigs.clear();\n this._cachedIconsByUrl.clear();\n }\n\n /**\n * Returns the cached icon for a SvgIconConfig if available, or fetches it from its URL if not.\n */\n private _getSvgFromConfig(config: SvgIconConfig): Observable<SVGElement> {\n if (config.svgElement) {\n // We already have the SVG element for this icon, return a copy.\n return observableOf(cloneSvg(config.svgElement));\n } else {\n // Fetch the icon from the config's URL, cache it, and return a copy.\n return this._loadSvgIconFromConfig(config).pipe(\n tap(svg => config.svgElement = svg),\n map(svg => cloneSvg(svg)),\n );\n }\n }\n\n /**\n * Attempts to find an icon with the specified name in any of the SVG icon sets.\n * First searches the available cached icons for a nested element with a matching name, and\n * if found copies the element to a new `<svg>` element. If not found, fetches all icon sets\n * that have not been cached, and searches again after all fetches are completed.\n * The returned Observable produces the SVG element if possible, and throws\n * an error if no icon with the specified name can be found.\n */\n private _getSvgFromIconSetConfigs(name: string, iconSetConfigs: SvgIconConfig[]):\n Observable<SVGElement> {\n // For all the icon set SVG elements we've fetched, see if any contain an icon with the\n // requested name.\n const namedIcon = this._extractIconWithNameFromAnySet(name, iconSetConfigs);\n\n if (namedIcon) {\n // We could cache namedIcon in _svgIconConfigs, but since we have to make a copy every\n // time anyway, there's probably not much advantage compared to just always extracting\n // it from the icon set.\n return observableOf(namedIcon);\n }\n\n // Not found in any cached icon sets. If there are icon sets with URLs that we haven't\n // fetched, fetch them now and look for iconName in the results.\n const iconSetFetchRequests: Observable<SVGElement | null>[] = iconSetConfigs\n .filter(iconSetConfig => !iconSetConfig.svgElement)\n .map(iconSetConfig => {\n return this._loadSvgIconSetFromConfig(iconSetConfig).pipe(\n catchError((err: HttpErrorResponse): Observable<SVGElement | null> => {\n const url = this._sanitizer.sanitize(SecurityContext.RESOURCE_URL, iconSetConfig.url);\n\n // Swallow errors fetching individual URLs so the\n // combined Observable won't necessarily fail.\n const errorMessage = `Loading icon set URL: ${url} failed: ${err.message}`;\n // @breaking-change 9.0.0 _errorHandler parameter to be made required\n if (this._errorHandler) {\n this._errorHandler.handleError(new Error(errorMessage));\n } else {\n console.error(errorMessage);\n }\n return observableOf(null);\n })\n );\n });\n\n // Fetch all the icon set URLs. When the requests complete, every IconSet should have a\n // cached SVG element (unless the request failed), and we can check again for the icon.\n return forkJoin(iconSetFetchRequests).pipe(map(() => {\n const foundIcon = this._extractIconWithNameFromAnySet(name, iconSetConfigs);\n\n if (!foundIcon) {\n throw getMatIconNameNotFoundError(name);\n }\n\n return foundIcon;\n }));\n }\n\n /**\n * Searches the cached SVG elements for the given icon sets for a nested icon element whose \"id\"\n * tag matches the specified name. If found, copies the nested element to a new SVG element and\n * returns it. Returns null if no matching element is found.\n */\n private _extractIconWithNameFromAnySet(iconName: string, iconSetConfigs: SvgIconConfig[]):\n SVGElement | null {\n // Iterate backwards, so icon sets added later have precedence.\n for (let i = iconSetConfigs.length - 1; i >= 0; i--) {\n const config = iconSetConfigs[i];\n if (config.svgElement) {\n const foundIcon = this._extractSvgIconFromSet(config.svgElement, iconName, config.options);\n if (foundIcon) {\n return foundIcon;\n }\n }\n }\n return null;\n }\n\n /**\n * Loads the content of the icon URL specified in the SvgIconConfig and creates an SVG element\n * from it.\n */\n private _loadSvgIconFromConfig(config: SvgIconConfig): Observable<SVGElement> {\n return this._fetchUrl(config.url)\n .pipe(map(svgText => this._createSvgElementForSingleIcon(svgText, config.options)));\n }\n\n /**\n * Loads the content of the icon set URL specified in the SvgIconConfig and creates an SVG element\n * from it.\n */\n private _loadSvgIconSetFromConfig(config: SvgIconConfig): Observable<SVGElement> {\n // If the SVG for this icon set has already been parsed, do nothing.\n if (config.svgElement) {\n return observableOf(config.svgElement);\n }\n\n return this._fetchUrl(config.url).pipe(map(svgText => {\n // It is possible that the icon set was parsed and cached by an earlier request, so parsing\n // only needs to occur if the cache is yet unset.\n if (!config.svgElement) {\n config.svgElement = this._svgElementFromString(svgText);\n }\n\n return config.svgElement;\n }));\n }\n\n /**\n * Creates a DOM element from the given SVG string, and adds default attributes.\n */\n private _createSvgElementForSingleIcon(responseText: string, options?: IconOptions): SVGElement {\n const svg = this._svgElementFromString(responseText);\n this._setSvgAttributes(svg, options);\n return svg;\n }\n\n /**\n * Searches the cached element of the given SvgIconConfig for a nested icon element whose \"id\"\n * tag matches the specified name. If found, copies the nested element to a new SVG element and\n * returns it. Returns null if no matching element is found.\n */\n private _extractSvgIconFromSet(iconSet: SVGElement, iconName: string,\n options?: IconOptions): SVGElement | null {\n // Use the `id=\"iconName\"` syntax in order to escape special\n // characters in the ID (versus using the #iconName syntax).\n const iconSource = iconSet.querySelector(`[id=\"${iconName}\"]`);\n\n if (!iconSource) {\n return null;\n }\n\n // Clone the element and remove the ID to prevent multiple elements from being added\n // to the page with the same ID.\n const iconElement = iconSource.cloneNode(true) as Element;\n iconElement.removeAttribute('id');\n\n // If the icon node is itself an <svg> node, clone and return it directly. If not, set it as\n // the content of a new <svg> node.\n if (iconElement.nodeName.toLowerCase() === 'svg') {\n return this._setSvgAttributes(iconElement as SVGElement, options);\n }\n\n // If the node is a <symbol>, it won't be rendered so we have to convert it into <svg>. Note\n // that the same could be achieved by referring to it via <use href=\"#id\">, however the <use>\n // tag is problematic on Firefox, because it needs to include the current page path.\n if (iconElement.nodeName.toLowerCase() === 'symbol') {\n return this._setSvgAttributes(this._toSvgElement(iconElement), options);\n }\n\n // createElement('SVG') doesn't work as expected; the DOM ends up with\n // the correct nodes, but the SVG content doesn't render. Instead we\n // have to create an empty SVG node using innerHTML and append its content.\n // Elements created using DOMParser.parseFromString have the same problem.\n // http://stackoverflow.com/questions/23003278/svg-innerhtml-in-firefox-can-not-display\n const svg = this._svgElementFromString('<svg></svg>');\n // Clone the node so we don't remove it from the parent icon set element.\n svg.appendChild(iconElement);\n\n return this._setSvgAttributes(svg, options);\n }\n\n /**\n * Creates a DOM element from the given SVG string.\n */\n private _svgElementFromString(str: string): SVGElement {\n const div = this._document.createElement('DIV');\n div.innerHTML = str;\n const svg = div.querySelector('svg') as SVGElement;\n\n if (!svg) {\n throw Error('<svg> tag not found');\n }\n\n return svg;\n }\n\n /**\n * Converts an element into an SVG node by cloning all of its children.\n */\n private _toSvgElement(element: Element): SVGElement {\n const svg = this._svgElementFromString('<svg></svg>');\n const attributes = element.attributes;\n\n // Copy over all the attributes from the `symbol` to the new SVG, except the id.\n for (let i = 0; i < attributes.length; i++) {\n const {name, value} = attributes[i];\n\n if (name !== 'id') {\n svg.setAttribute(name, value);\n }\n }\n\n for (let i = 0; i < element.childNodes.length; i++) {\n if (element.childNodes[i].nodeType === this._document.ELEMENT_NODE) {\n svg.appendChild(element.childNodes[i].cloneNode(true));\n }\n }\n\n return svg;\n }\n\n /**\n * Sets the default attributes for an SVG element to be used as an icon.\n */\n private _setSvgAttributes(svg: SVGElement, options?: IconOptions): SVGElement {\n svg.setAttribute('fit', '');\n svg.setAttribute('height', '100%');\n svg.setAttribute('width', '100%');\n svg.setAttribute('preserveAspectRatio', 'xMidYMid meet');\n svg.setAttribute('focusable', 'false'); // Disable IE11 default behavior to make SVGs focusable.\n\n if (options && options.viewBox) {\n svg.setAttribute('viewBox', options.viewBox);\n }\n\n return svg;\n }\n\n /**\n * Returns an Observable which produces the string contents of the given URL. Results may be\n * cached, so future calls with the same URL may not cause another HTTP request.\n */\n private _fetchUrl(safeUrl: SafeResourceUrl | null): Observable<string> {\n if (!this._httpClient) {\n throw getMatIconNoHttpProviderError();\n }\n\n if (safeUrl == null) {\n throw Error(`Cannot fetch icon from URL \"${safeUrl}\".`);\n }\n\n const url = this._sanitizer.sanitize(SecurityContext.RESOURCE_URL, safeUrl);\n\n if (!url) {\n throw getMatIconFailedToSanitizeUrlError(safeUrl);\n }\n\n // Store in-progress fetches to avoid sending a duplicate request for a URL when there is\n // already a request in progress for that URL. It's necessary to call share() on the\n // Observable returned by http.get() so that multiple subscribers don't cause multiple XHRs.\n const inProgressFetch = this._inProgressUrlFetches.get(url);\n\n if (inProgressFetch) {\n return inProgressFetch;\n }\n\n // TODO(jelbourn): for some reason, the `finalize` operator \"loses\" the generic type on the\n // Observable. Figure out why and fix it.\n const req = this._httpClient.get(url, {responseType: 'text'}).pipe(\n finalize(() => this._inProgressUrlFetches.delete(url)),\n share(),\n );\n\n this._inProgressUrlFetches.set(url, req);\n return req;\n }\n\n /**\n * Registers an icon config by name in the specified namespace.\n * @param namespace Namespace in which to register the icon config.\n * @param iconName Name under which to register the config.\n * @param config Config to be registered.\n */\n private _addSvgIconConfig(namespace: string, iconName: string, config: SvgIconConfig): this {\n this._svgIconConfigs.set(iconKey(namespace, iconName), config);\n return this;\n }\n\n /**\n * Registers an icon set config in the specified namespace.\n * @param namespace Namespace in which to register the icon config.\n * @param config Config to be registered.\n */\n private _addSvgIconSetConfig(namespace: string, config: SvgIconConfig): this {\n const configNamespace = this._iconSetConfigs.get(namespace);\n\n if (configNamespace) {\n configNamespace.push(config);\n } else {\n this._iconSetConfigs.set(namespace, [config]);\n }\n\n return this;\n }\n}\n\n/** @docs-private */\nexport function ICON_REGISTRY_PROVIDER_FACTORY(\n parentRegistry: MatIconRegistry,\n httpClient: HttpClient,\n sanitizer: DomSanitizer,\n document?: any,\n errorHandler?: ErrorHandler) {\n return parentRegistry || new MatIconRegistry(httpClient, sanitizer, document, errorHandler);\n}\n\n/** @docs-private */\nexport const ICON_REGISTRY_PROVIDER = {\n // If there is already an MatIconRegistry available, use that. Otherwise, provide a new one.\n provide: MatIconRegistry,\n deps: [\n [new Optional(), new SkipSelf(), MatIconRegistry],\n [new Optional(), HttpClient],\n DomSanitizer,\n [new Optional(), ErrorHandler],\n [new Optional(), DOCUMENT as InjectionToken<any>],\n ],\n useFactory: ICON_REGISTRY_PROVIDER_FACTORY,\n};\n\n/** Clones an SVGElement while preserving type information. */\nfunction cloneSvg(svg: SVGElement): SVGElement {\n return svg.cloneNode(true) as SVGElement;\n}\n\n/** Returns the cache key to use for an icon namespace and name. */\nfunction iconKey(namespace: string, name: string) {\n return namespace + ':' + name;\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 {BooleanInput, coerceBooleanProperty} from '@angular/cdk/coercion';\nimport {DOCUMENT} from '@angular/common';\nimport {\n AfterViewChecked,\n Attribute,\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n ErrorHandler,\n inject,\n Inject,\n InjectionToken,\n Input,\n OnChanges,\n OnDestroy,\n OnInit,\n Optional,\n SimpleChanges,\n ViewEncapsulation,\n} from '@angular/core';\nimport {CanColor, CanColorCtor, mixinColor} from '@angular/material/core';\nimport {Subscription} from 'rxjs';\nimport {take} from 'rxjs/operators';\n\nimport {MatIconRegistry} from './icon-registry';\n\n\n// Boilerplate for applying mixins to MatIcon.\n/** @docs-private */\nclass MatIconBase {\n constructor(public _elementRef: ElementRef) {}\n}\nconst _MatIconMixinBase: CanColorCtor & typeof MatIconBase = mixinColor(MatIconBase);\n\n/**\n * Injection token used to provide the current location to `MatIcon`.\n * Used to handle server-side rendering and to stub out during unit tests.\n * @docs-private\n */\nexport const MAT_ICON_LOCATION = new InjectionToken<MatIconLocation>('mat-icon-location', {\n providedIn: 'root',\n factory: MAT_ICON_LOCATION_FACTORY\n});\n\n/**\n * Stubbed out location for `MatIcon`.\n * @docs-private\n */\nexport interface MatIconLocation {\n getPathname: () => string;\n}\n\n/** @docs-private */\nexport function MAT_ICON_LOCATION_FACTORY(): MatIconLocation {\n const _document = inject(DOCUMENT);\n const _location = _document ? _document.location : null;\n\n return {\n // Note that this needs to be a function, rather than a property, because Angular\n // will only resolve it once, but we want the current path on each call.\n getPathname: () => _location ? (_location.pathname + _location.search) : ''\n };\n}\n\n\n/** SVG attributes that accept a FuncIRI (e.g. `url(<something>)`). */\nconst funcIriAttributes = [\n 'clip-path',\n 'color-profile',\n 'src',\n 'cursor',\n 'fill',\n 'filter',\n 'marker',\n 'marker-start',\n 'marker-mid',\n 'marker-end',\n 'mask',\n 'stroke'\n];\n\n/** Selector that can be used to find all elements that are using a `FuncIRI`. */\nconst funcIriAttributeSelector = funcIriAttributes.map(attr => `[${attr}]`).join(', ');\n\n/** Regex that can be used to extract the id out of a FuncIRI. */\nconst funcIriPattern = /^url\\(['\"]?#(.*?)['\"]?\\)$/;\n\n/**\n * Component to display an icon. It can be used in the following ways:\n *\n * - Specify the svgIcon input to load an SVG icon from a URL previously registered with the\n * addSvgIcon, addSvgIconInNamespace, addSvgIconSet, or addSvgIconSetInNamespace methods of\n * MatIconRegistry. If the svgIcon value contains a colon it is assumed to be in the format\n * \"[namespace]:[name]\", if not the value will be the name of an icon in the default namespace.\n * Examples:\n * `<mat-icon svgIcon=\"left-arrow\"></mat-icon>\n * <mat-icon svgIcon=\"animals:cat\"></mat-icon>`\n *\n * - Use a font ligature as an icon by putting the ligature text in the content of the `<mat-icon>`\n * component. By default the Material icons font is used as described at\n * http://google.github.io/material-design-icons/#icon-font-for-the-web. You can specify an\n * alternate font by setting the fontSet input to either the CSS class to apply to use the\n * desired font, or to an alias previously registered with MatIconRegistry.registerFontClassAlias.\n * Examples:\n * `<mat-icon>home</mat-icon>\n * <mat-icon fontSet=\"myfont\">sun</mat-icon>`\n *\n * - Specify a font glyph to be included via CSS rules by setting the fontSet input to specify the\n * font, and the fontIcon input to specify the icon. Typically the fontIcon will specify a\n * CSS class which causes the glyph to be displayed via a :before selector, as in\n * https://fortawesome.github.io/Font-Awesome/examples/\n * Example:\n * `<mat-icon fontSet=\"fa\" fontIcon=\"alarm\"></mat-icon>`\n */\n@Component({\n template: '<ng-content></ng-content>',\n selector: 'mat-icon',\n exportAs: 'matIcon',\n styleUrls: ['icon.css'],\n inputs: ['color'],\n host: {\n 'role': 'img',\n 'class': 'mat-icon notranslate',\n '[class.mat-icon-inline]': 'inline',\n '[class.mat-icon-no-color]': 'color !== \"primary\" && color !== \"accent\" && color !== \"warn\"',\n },\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class MatIcon extends _MatIconMixinBase implements OnChanges, OnInit, AfterViewChecked,\n CanColor, OnDestroy {\n\n /**\n * Whether the icon should be inlined, automatically sizing the icon to match the font size of\n * the element the icon is contained in.\n */\n @Input()\n get inline(): boolean {\n return this._inline;\n }\n set inline(inline: boolean) {\n this._inline = coerceBooleanProperty(inline);\n }\n private _inline: boolean = false;\n\n /** Name of the icon in the SVG icon set. */\n @Input() svgIcon: string;\n\n /** Font set that the icon is a part of. */\n @Input()\n get fontSet(): string { return this._fontSet; }\n set fontSet(value: string) {\n this._fontSet = this._cleanupFontValue(value);\n }\n private _fontSet: string;\n\n /** Name of an icon within a font set. */\n @Input()\n get fontIcon(): string { return this._fontIcon; }\n set fontIcon(value: string) {\n this._fontIcon = this._cleanupFontValue(value);\n }\n private _fontIcon: string;\n\n private _previousFontSetClass: string;\n private _previousFontIconClass: string;\n\n /** Keeps track of the current page path. */\n private _previousPath?: string;\n\n /** Keeps track of the elements and attributes that we've prefixed with the current path. */\n private _elementsWithExternalReferences?: Map<Element, {name: string, value: string}[]>;\n\n /** Subscription to the current in-progress SVG icon request. */\n private _currentIconFetch = Subscription.EMPTY;\n\n constructor(\n elementRef: ElementRef<HTMLElement>, private _iconRegistry: MatIconRegistry,\n @Attribute('aria-hidden') ariaHidden: string,\n /**\n * @deprecated `location` parameter to be made required.\n * @breaking-change 8.0.0\n */\n @Optional() @Inject(MAT_ICON_LOCATION) private _location?: MatIconLocation,\n // @breaking-change 9.0.0 _errorHandler parameter to be made required\n @Optional() private readonly _errorHandler?: ErrorHandler) {\n super(elementRef);\n\n // If the user has not explicitly set aria-hidden, mark the icon as hidden, as this is\n // the right thing to do for the majority of icon use-cases.\n if (!ariaHidden) {\n elementRef.nativeElement.setAttribute('aria-hidden', 'true');\n }\n }\n\n /**\n * Splits an svgIcon binding value into its icon set and icon name components.\n * Returns a 2-element array of [(icon set), (icon name)].\n * The separator for the two fields is ':'. If there is no separator, an empty\n * string is returned for the icon set and the entire value is returned for\n * the icon name. If the argument is falsy, returns an array of two empty strings.\n * Throws an error if the name contains two or more ':' separators.\n * Examples:\n * `'social:cake' -> ['social', 'cake']\n * 'penguin' -> ['', 'penguin']\n * null -> ['', '']\n * 'a:b:c' -> (throws Error)`\n */\n private _splitIconName(iconName: string): [string, string] {\n if (!iconName) {\n return ['', ''];\n }\n const parts = iconName.split(':');\n switch (parts.length) {\n case 1: return ['', parts[0]]; // Use default namespace.\n case 2: return <[string, string]>parts;\n default: throw Error(`Invalid icon name: \"${iconName}\"`);\n }\n }\n\n ngOnChanges(changes: SimpleChanges) {\n // Only update the inline SVG icon if the inputs changed, to avoid unnecessary DOM operations.\n const svgIconChanges = changes['svgIcon'];\n\n if (svgIconChanges) {\n this._currentIconFetch.unsubscribe();\n\n if (this.svgIcon) {\n const [namespace, iconName] = this._splitIconName(this.svgIcon);\n\n this._currentIconFetch = this._iconRegistry.getNamedSvgIcon(iconName, namespace)\n .pipe(take(1))\n .subscribe(svg => this._setSvgElement(svg), (err: Error) => {\n const errorMessage = `Error retrieving icon ${namespace}:${iconName}! ${err.message}`;\n // @breaking-change 9.0.0 _errorHandler parameter to be made required.\n if (this._errorHandler) {\n this._errorHandler.handleError(new Error(errorMessage));\n } else {\n console.error(errorMessage);\n }\n });\n } else if (svgIconChanges.previousValue) {\n this._clearSvgElement();\n }\n }\n\n if (this._usingFontIcon()) {\n this._updateFontIconClasses();\n }\n }\n\n ngOnInit() {\n // Update font classes because ngOnChanges won't be called if none of the inputs are present,\n // e.g. <mat-icon>arrow</mat-icon> In this case we need to add a CSS class for the default font.\n if (this._usingFontIcon()) {\n this._updateFontIconClasses();\n }\n }\n\n ngAfterViewChecked() {\n const cachedElements = this._elementsWithExternalReferences;\n\n if (cachedElements && this._location && cachedElements.size) {\n const newPath = this._location.getPathname();\n\n // We need to check whether the URL has changed on each change detection since\n // the browser doesn't have an API that will let us react on link clicks and\n // we can't depend on the Angular router. The references need to be updated,\n // because while most browsers don't care whether the URL is correct after\n // the first render, Safari will break if the user navigates to a different\n // page and the SVG isn't re-rendered.\n if (newPath !== this._previousPath) {\n this._previousPath = newPath;\n this._prependPathToReferences(newPath);\n }\n }\n }\n\n ngOnDestroy() {\n this._currentIconFetch.unsubscribe();\n\n if (this._elementsWithExternalReferences) {\n this._elementsWithExternalReferences.clear();\n }\n }\n\n private _usingFontIcon(): boolean {\n return !this.svgIcon;\n }\n\n private _setSvgElement(svg: SVGElement) {\n this._clearSvgElement();\n\n // Workaround for IE11 and Edge ignoring `style` tags inside dynamically-created SVGs.\n // See: https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/10898469/\n // Do this before inserting the element into the DOM, in order to avoid a style recalculation.\n const styleTags = svg.querySelectorAll('style') as NodeListOf<HTMLStyleElement>;\n\n for (let i = 0; i < styleTags.length; i++) {\n styleTags[i].textContent += ' ';\n }\n\n // Note: we do this fix here, rather than the icon registry, because the\n // references have to point to the URL at the time that the icon was created.\n if (this._location) {\n const path = this._location.getPathname();\n this._previousPath = path;\n this._cacheChildrenWithExternalReferences(svg);\n this._prependPathToReferences(path);\n }\n\n this._elementRef.nativeElement.appendChild(svg);\n }\n\n private _clearSvgElement() {\n const layoutElement: HTMLElement = this._elementRef.nativeElement;\n let childCount = layoutElement.childNodes.length;\n\n if (this._elementsWithExternalReferences) {\n this._elementsWithExternalReferences.clear();\n }\n\n // Remove existing non-element child nodes and SVGs, and add the new SVG element. Note that\n // we can't use innerHTML, because IE will throw if the element has a data binding.\n while (childCount--) {\n const child = layoutElement.childNodes[childCount];\n\n // 1 corresponds to Node.ELEMENT_NODE. We remove all non-element nodes in order to get rid\n // of any loose text nodes, as well as any SVG elements in order to remove any old icons.\n if (child.nodeType !== 1 || child.nodeName.toLowerCase() === 'svg') {\n layoutElement.removeChild(child);\n }\n }\n }\n\n private _updateFontIconClasses() {\n if (!this._usingFontIcon()) {\n return;\n }\n\n const elem: HTMLElement = this._elementRef.nativeElement;\n const fontSetClass = this.fontSet ?\n this._iconRegistry.classNameForFontAlias(this.fontSet) :\n this._iconRegistry.getDefaultFontSetClass();\n\n if (fontSetClass != this._previousFontSetClass) {\n if (this._previousFontSetClass) {\n elem.classList.remove(this._previousFontSetClass);\n }\n if (fontSetClass) {\n elem.classList.add(fontSetClass);\n }\n this._previousFontSetClass = fontSetClass;\n }\n\n if (this.fontIcon != this._previousFontIconClass) {\n if (this._previousFontIconClass) {\n elem.classList.remove(this._previousFontIconClass);\n }\n if (this.fontIcon) {\n elem.classList.add(this.fontIcon);\n }\n this._previousFontIconClass = this.fontIcon;\n }\n }\n\n /**\n * Cleans up a value to be used as a fontIcon or fontSet.\n * Since the value ends up being assigned as a CSS class, we\n * have to trim the value and omit space-separated values.\n */\n private _cleanupFontValue(value: string) {\n return typeof value === 'string' ? value.trim().split(' ')[0] : value;\n }\n\n /**\n * Prepends the current path to all elements that have an attribute pointing to a `FuncIRI`\n * reference. This is required because WebKit browsers require references to be prefixed with\n * the current path, if the page has a `base` tag.\n */\n private _prependPathToReferences(path: string) {\n const elements = this._elementsWithExternalReferences;\n\n if (elements) {\n elements.forEach((attrs, element) => {\n attrs.forEach(attr => {\n element.setAttribute(attr.name, `url('${path}#${attr.value}')`);\n });\n });\n }\n }\n\n /**\n * Caches the children of an SVG element that have `url()`\n * references that we need to prefix with the current path.\n */\n private _cacheChildrenWithExternalReferences(element: SVGElement) {\n const elementsWithFuncIri = element.querySelectorAll(funcIriAttributeSelector);\n const elements = this._elementsWithExternalReferences =\n this._elementsWithExternalReferences || new Map();\n\n for (let i = 0; i < elementsWithFuncIri.length; i++) {\n funcIriAttributes.forEach(attr => {\n const elementWithReference = elementsWithFuncIri[i];\n const value = elementWithReference.getAttribute(attr);\n const match = value ? value.match(funcIriPattern) : null;\n\n if (match) {\n let attributes = elements.get(elementWithReference);\n\n if (!attributes) {\n attributes = [];\n elements.set(elementWithReference, attributes);\n }\n\n attributes!.push({name: attr, value: match[1]});\n }\n });\n }\n }\n\n static ngAcceptInputType_inline: 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} from '@angular/material/core';\nimport {MatIcon} from './icon';\n\n\n@NgModule({\n imports: [MatCommonModule],\n exports: [MatIcon, MatCommonModule],\n declarations: [MatIcon],\n})\nexport class MatIconModule {}\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 './icon-module';\nexport * from './icon';\nexport * from './icon-registry';\n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AC,EAAE;oBAA1C,CAAC;SAiBT;KACF;;gBAjTF,SAAS,SAAC;oBACT,QAAQ,EAAE,2BAA2B;oBACrC,QAAQ,EAAE,UAAU;oBACpB,QAAQ,EAAE,SAAS;oBAEnB,MAAM,EAAE,CAAC,OAAO,CAAC;oBACjB,IAAI,EAAE;wBACJ,MAAM,EAAE,KAAK;wBACb,OAAO,EAAE,sBAAsB;wBAC/B,yBAAyB,EAAE,QAAQ;wBACnC,2BAA2B,EAAE,+DAA+D;qBAC7F;oBACD,aAAa,EAAE,iBAAiB,CAAC,IAAI;oBACrC,eAAe,EAAE,uBAAuB,CAAC,MAAM;;iBAChD;;;;gBAzHC,UAAU;gBAiBJ,eAAe;6CA0JhB,SAAS,SAAC,aAAa;gDAKvB,QAAQ,YAAI,MAAM,SAAC,iBAAiB;gBA/KzC,YAAY,uBAiLP,QAAQ;;;yBAjDZ,KAAK;0BAUL,KAAK;0BAGL,KAAK;2BAQL,KAAK;;IAyQR,cAAC;CAAA,CArS4B,iBAAiB;;ACzI9C;;;;;;;AAQA;IAKA;KAK6B;;gBAL5B,QAAQ,SAAC;oBACR,OAAO,EAAE,CAAC,eAAe,CAAC;oBAC1B,OAAO,EAAE,CAAC,OAAO,EAAE,eAAe,CAAC;oBACnC,YAAY,EAAE,CAAC,OAAO,CAAC;iBACxB;;IAC2B,oBAAC;CAL7B;;ACbA;;;;;;GAMG;;ACNH;;GAEG;;;;"}
package/fesm5/input.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { __extends } from 'tslib';
2
2
  import { CdkTextareaAutosize, AutofillMonitor, TextFieldModule } from '@angular/cdk/text-field';
3
- import { Directive, Input, InjectionToken, ElementRef, Optional, Self, Inject, NgZone, NgModule } from '@angular/core';
3
+ import { Directive, Input, InjectionToken, ElementRef, Optional, Self, Inject, NgZone, HostListener, NgModule } from '@angular/core';
4
4
  import { coerceBooleanProperty } from '@angular/cdk/coercion';
5
5
  import { getSupportedInputTypes, Platform } from '@angular/cdk/platform';
6
6
  import { NgControl, NgForm, FormGroupDirective } from '@angular/forms';
@@ -144,10 +144,6 @@ var MatInput = /** @class */ (function (_super) {
144
144
  _this.ngControl = ngControl;
145
145
  _this._autofillMonitor = _autofillMonitor;
146
146
  _this._uid = "mat-input-" + nextUniqueId++;
147
- /** Whether the component is being rendered on the server. */
148
- _this._isServer = false;
149
- /** Whether the component is a native html select. */
150
- _this._isNativeSelect = false;
151
147
  /**
152
148
  * Implemented as part of MatFormFieldControl.
153
149
  * @docs-private
@@ -181,6 +177,7 @@ var MatInput = /** @class */ (function (_super) {
181
177
  'week'
182
178
  ].filter(function (t) { return getSupportedInputTypes().has(t); });
183
179
  var element = _this._elementRef.nativeElement;
180
+ var nodeName = element.nodeName.toLowerCase();
184
181
  // If no input value accessor was explicitly specified, use the element as the input value
185
182
  // accessor.
186
183
  _this._inputValueAccessor = inputValueAccessor || element;
@@ -206,7 +203,8 @@ var MatInput = /** @class */ (function (_super) {
206
203
  });
207
204
  }
208
205
  _this._isServer = !_this._platform.isBrowser;
209
- _this._isNativeSelect = element.nodeName.toLowerCase() === 'select';
206
+ _this._isNativeSelect = nodeName === 'select';
207
+ _this._isTextarea = nodeName === 'textarea';
210
208
  if (_this._isNativeSelect) {
211
209
  _this.controlType = element.multiple ? 'mat-native-select-multiple' :
212
210
  'mat-native-select';
@@ -265,7 +263,7 @@ var MatInput = /** @class */ (function (_super) {
265
263
  // When using Angular inputs, developers are no longer able to set the properties on the native
266
264
  // input element. To ensure that bindings for `type` work, we need to sync the setter
267
265
  // with the native property. Textarea elements don't support the type property or attribute.
268
- if (!this._isTextarea() && getSupportedInputTypes().has(this._type)) {
266
+ if (!this._isTextarea && getSupportedInputTypes().has(this._type)) {
269
267
  this._elementRef.nativeElement.type = this._type;
270
268
  }
271
269
  },
@@ -328,13 +326,24 @@ var MatInput = /** @class */ (function (_super) {
328
326
  MatInput.prototype.focus = function (options) {
329
327
  this._elementRef.nativeElement.focus(options);
330
328
  };
329
+ // We have to use a `HostListener` here in order to support both Ivy and ViewEngine.
330
+ // In Ivy the `host` bindings will be merged when this class is extended, whereas in
331
+ // ViewEngine they're overwritten.
332
+ // TODO(crisbeto): we move this back into `host` once Ivy is turned on by default.
331
333
  /** Callback for the cases where the focused state of the input changes. */
334
+ // tslint:disable:no-host-decorator-in-concrete
335
+ // tslint:enable:no-host-decorator-in-concrete
332
336
  MatInput.prototype._focusChanged = function (isFocused) {
333
337
  if (isFocused !== this.focused && (!this.readonly || !isFocused)) {
334
338
  this.focused = isFocused;
335
339
  this.stateChanges.next();
336
340
  }
337
341
  };
342
+ // We have to use a `HostListener` here in order to support both Ivy and ViewEngine.
343
+ // In Ivy the `host` bindings will be merged when this class is extended, whereas in
344
+ // ViewEngine they're overwritten.
345
+ // TODO(crisbeto): we move this back into `host` once Ivy is turned on by default.
346
+ // tslint:disable-next-line:no-host-decorator-in-concrete
338
347
  MatInput.prototype._onInput = function () {
339
348
  // This is a noop function and is used to let Angular know whenever the value changes.
340
349
  // Angular will run a new change detection each time the `input` event has been dispatched.
@@ -344,10 +353,6 @@ var MatInput = /** @class */ (function (_super) {
344
353
  // Listening to the input event wouldn't be necessary when the input is using the
345
354
  // FormsModule or ReactiveFormsModule, because Angular forms also listens to input events.
346
355
  };
347
- /** Determines if the component host is a textarea. */
348
- MatInput.prototype._isTextarea = function () {
349
- return this._elementRef.nativeElement.nodeName.toLowerCase() === 'textarea';
350
- };
351
356
  /** Does some manual dirty checking on the native input `value` property. */
352
357
  MatInput.prototype._dirtyCheckNativeValue = function () {
353
358
  var newValue = this._elementRef.nativeElement.value;
@@ -447,9 +452,6 @@ var MatInput = /** @class */ (function (_super) {
447
452
  '[attr.aria-describedby]': '_ariaDescribedby || null',
448
453
  '[attr.aria-invalid]': 'errorState',
449
454
  '[attr.aria-required]': 'required.toString()',
450
- '(blur)': '_focusChanged(false)',
451
- '(focus)': '_focusChanged(true)',
452
- '(input)': '_onInput()',
453
455
  },
454
456
  providers: [{ provide: MatFormFieldControl, useExisting: MatInput }],
455
457
  },] }
@@ -474,7 +476,9 @@ var MatInput = /** @class */ (function (_super) {
474
476
  type: [{ type: Input }],
475
477
  errorStateMatcher: [{ type: Input }],
476
478
  value: [{ type: Input }],
477
- readonly: [{ type: Input }]
479
+ readonly: [{ type: Input }],
480
+ _focusChanged: [{ type: HostListener, args: ['focus', ['true'],] }, { type: HostListener, args: ['blur', ['false'],] }],
481
+ _onInput: [{ type: HostListener, args: ['input',] }]
478
482
  };
479
483
  return MatInput;
480
484
  }(_MatInputMixinBase));
@@ -1 +1 @@
1
- {"version":3,"file":"input.js","sources":["../../../../../../src/material/input/autosize.ts","../../../../../../src/material/input/input-errors.ts","../../../../../../src/material/input/input-value-accessor.ts","../../../../../../src/material/input/input.ts","../../../../../../src/material/input/input-module.ts","../../../../../../src/material/input/public-api.ts","../../../../../../src/material/input/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 {CdkTextareaAutosize} from '@angular/cdk/text-field';\nimport {Directive, Input} from '@angular/core';\n\n/**\n * Directive to automatically resize a textarea to fit its content.\n * @deprecated Use `cdkTextareaAutosize` from `@angular/cdk/text-field` instead.\n * @breaking-change 8.0.0\n */\n@Directive({\n selector: 'textarea[mat-autosize], textarea[matTextareaAutosize]',\n exportAs: 'matTextareaAutosize',\n inputs: ['cdkAutosizeMinRows', 'cdkAutosizeMaxRows'],\n host: {\n 'class': 'cdk-textarea-autosize mat-autosize',\n // Textarea elements that have the directive applied should have a single row by default.\n // Browsers normally show two rows by default and therefore this limits the minRows binding.\n 'rows': '1',\n },\n})\nexport class MatTextareaAutosize extends CdkTextareaAutosize {\n @Input()\n get matAutosizeMinRows(): number { return this.minRows; }\n set matAutosizeMinRows(value: number) { this.minRows = value; }\n\n @Input()\n get matAutosizeMaxRows(): number { return this.maxRows; }\n set matAutosizeMaxRows(value: number) { this.maxRows = value; }\n\n @Input('mat-autosize')\n get matAutosize(): boolean { return this.enabled; }\n set matAutosize(value: boolean) { this.enabled = value; }\n\n @Input()\n get matTextareaAutosize(): boolean { return this.enabled; }\n set matTextareaAutosize(value: boolean) { this.enabled = value; }\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\n/** @docs-private */\nexport function getMatInputUnsupportedTypeError(type: string): Error {\n return Error(`Input type \"${type}\" isn't supported by matInput.`);\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 {InjectionToken} from '@angular/core';\n\n\n/**\n * This token is used to inject the object whose value should be set into `MatInput`. If none is\n * provided, the native `HTMLInputElement` is used. Directives like `MatDatepickerInput` can provide\n * themselves for this token, in order to make `MatInput` delegate the getting and setting of the\n * value to them.\n */\nexport const MAT_INPUT_VALUE_ACCESSOR =\n new InjectionToken<{value: any}>('MAT_INPUT_VALUE_ACCESSOR');\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 {BooleanInput, coerceBooleanProperty} from '@angular/cdk/coercion';\nimport {getSupportedInputTypes, Platform} from '@angular/cdk/platform';\nimport {AutofillMonitor} from '@angular/cdk/text-field';\nimport {\n Directive,\n DoCheck,\n ElementRef,\n Inject,\n Input,\n NgZone,\n OnChanges,\n OnDestroy,\n OnInit,\n Optional,\n Self,\n} from '@angular/core';\nimport {FormGroupDirective, NgControl, NgForm} from '@angular/forms';\nimport {\n CanUpdateErrorState,\n CanUpdateErrorStateCtor,\n ErrorStateMatcher,\n mixinErrorState,\n} from '@angular/material/core';\nimport {MatFormFieldControl} from '@angular/material/form-field';\nimport {Subject} from 'rxjs';\nimport {getMatInputUnsupportedTypeError} from './input-errors';\nimport {MAT_INPUT_VALUE_ACCESSOR} from './input-value-accessor';\n\n\n// Invalid input type. Using one of these will throw an MatInputUnsupportedTypeError.\nconst MAT_INPUT_INVALID_TYPES = [\n 'button',\n 'checkbox',\n 'file',\n 'hidden',\n 'image',\n 'radio',\n 'range',\n 'reset',\n 'submit'\n];\n\nlet nextUniqueId = 0;\n\n// Boilerplate for applying mixins to MatInput.\n/** @docs-private */\nclass MatInputBase {\n constructor(public _defaultErrorStateMatcher: ErrorStateMatcher,\n public _parentForm: NgForm,\n public _parentFormGroup: FormGroupDirective,\n /** @docs-private */\n public ngControl: NgControl) {}\n}\nconst _MatInputMixinBase: CanUpdateErrorStateCtor & typeof MatInputBase =\n mixinErrorState(MatInputBase);\n\n/** Directive that allows a native input to work inside a `MatFormField`. */\n@Directive({\n selector: `input[matInput], textarea[matInput], select[matNativeControl],\n input[matNativeControl], textarea[matNativeControl]`,\n exportAs: 'matInput',\n host: {\n /**\n * @breaking-change 8.0.0 remove .mat-form-field-autofill-control in favor of AutofillMonitor.\n */\n 'class': 'mat-input-element mat-form-field-autofill-control',\n '[class.mat-input-server]': '_isServer',\n // Native input properties that are overwritten by Angular inputs need to be synced with\n // the native input element. Otherwise property bindings for those don't work.\n '[attr.id]': 'id',\n '[attr.placeholder]': 'placeholder',\n '[disabled]': 'disabled',\n '[required]': 'required',\n '[attr.readonly]': 'readonly && !_isNativeSelect || null',\n '[attr.aria-describedby]': '_ariaDescribedby || null',\n '[attr.aria-invalid]': 'errorState',\n '[attr.aria-required]': 'required.toString()',\n '(blur)': '_focusChanged(false)',\n '(focus)': '_focusChanged(true)',\n '(input)': '_onInput()',\n },\n providers: [{provide: MatFormFieldControl, useExisting: MatInput}],\n})\nexport class MatInput extends _MatInputMixinBase implements MatFormFieldControl<any>, OnChanges,\n OnDestroy, OnInit, DoCheck, CanUpdateErrorState {\n protected _uid = `mat-input-${nextUniqueId++}`;\n protected _previousNativeValue: any;\n private _inputValueAccessor: {value: any};\n /** The aria-describedby attribute on the input for improved a11y. */\n _ariaDescribedby: string;\n\n /** Whether the component is being rendered on the server. */\n _isServer = false;\n\n /** Whether the component is a native html select. */\n _isNativeSelect = false;\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n focused: boolean = false;\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n readonly stateChanges: Subject<void> = new Subject<void>();\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n controlType: string = 'mat-input';\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n autofilled = false;\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n @Input()\n get disabled(): boolean {\n if (this.ngControl && this.ngControl.disabled !== null) {\n return this.ngControl.disabled;\n }\n return this._disabled;\n }\n set disabled(value: boolean) {\n this._disabled = coerceBooleanProperty(value);\n\n // Browsers may not fire the blur event if the input is disabled too quickly.\n // Reset from here to ensure that the element doesn't become stuck.\n if (this.focused) {\n this.focused = false;\n this.stateChanges.next();\n }\n }\n protected _disabled = false;\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n @Input()\n get id(): string { return this._id; }\n set id(value: string) { this._id = value || this._uid; }\n protected _id: string;\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n @Input() placeholder: string;\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n @Input()\n get required(): boolean { return this._required; }\n set required(value: boolean) { this._required = coerceBooleanProperty(value); }\n protected _required = false;\n\n /** Input type of the element. */\n @Input()\n get type(): string { return this._type; }\n set type(value: string) {\n this._type = value || 'text';\n this._validateType();\n\n // When using Angular inputs, developers are no longer able to set the properties on the native\n // input element. To ensure that bindings for `type` work, we need to sync the setter\n // with the native property. Textarea elements don't support the type property or attribute.\n if (!this._isTextarea() && getSupportedInputTypes().has(this._type)) {\n (this._elementRef.nativeElement as HTMLInputElement).type = this._type;\n }\n }\n protected _type = 'text';\n\n /** An object used to control when error messages are shown. */\n @Input() errorStateMatcher: ErrorStateMatcher;\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n @Input()\n get value(): string { return this._inputValueAccessor.value; }\n set value(value: string) {\n if (value !== this.value) {\n this._inputValueAccessor.value = value;\n this.stateChanges.next();\n }\n }\n\n /** Whether the element is readonly. */\n @Input()\n get readonly(): boolean { return this._readonly; }\n set readonly(value: boolean) { this._readonly = coerceBooleanProperty(value); }\n private _readonly = false;\n\n protected _neverEmptyInputTypes = [\n 'date',\n 'datetime',\n 'datetime-local',\n 'month',\n 'time',\n 'week'\n ].filter(t => getSupportedInputTypes().has(t));\n\n constructor(\n protected _elementRef: ElementRef<HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement>,\n protected _platform: Platform,\n /** @docs-private */\n @Optional() @Self() public ngControl: NgControl,\n @Optional() _parentForm: NgForm,\n @Optional() _parentFormGroup: FormGroupDirective,\n _defaultErrorStateMatcher: ErrorStateMatcher,\n @Optional() @Self() @Inject(MAT_INPUT_VALUE_ACCESSOR) inputValueAccessor: any,\n private _autofillMonitor: AutofillMonitor,\n ngZone: NgZone) {\n\n super(_defaultErrorStateMatcher, _parentForm, _parentFormGroup, ngControl);\n\n const element = this._elementRef.nativeElement;\n\n // If no input value accessor was explicitly specified, use the element as the input value\n // accessor.\n this._inputValueAccessor = inputValueAccessor || element;\n\n this._previousNativeValue = this.value;\n\n // Force setter to be called in case id was not specified.\n this.id = this.id;\n\n // On some versions of iOS the caret gets stuck in the wrong place when holding down the delete\n // key. In order to get around this we need to \"jiggle\" the caret loose. Since this bug only\n // exists on iOS, we only bother to install the listener on iOS.\n if (_platform.IOS) {\n ngZone.runOutsideAngular(() => {\n _elementRef.nativeElement.addEventListener('keyup', (event: Event) => {\n let el = event.target as HTMLInputElement;\n if (!el.value && !el.selectionStart && !el.selectionEnd) {\n // Note: Just setting `0, 0` doesn't fix the issue. Setting\n // `1, 1` fixes it for the first time that you type text and\n // then hold delete. Toggling to `1, 1` and then back to\n // `0, 0` seems to completely fix it.\n el.setSelectionRange(1, 1);\n el.setSelectionRange(0, 0);\n }\n });\n });\n }\n\n this._isServer = !this._platform.isBrowser;\n this._isNativeSelect = element.nodeName.toLowerCase() === 'select';\n\n if (this._isNativeSelect) {\n this.controlType = (element as HTMLSelectElement).multiple ? 'mat-native-select-multiple' :\n 'mat-native-select';\n }\n }\n\n ngOnInit() {\n if (this._platform.isBrowser) {\n this._autofillMonitor.monitor(this._elementRef.nativeElement).subscribe(event => {\n this.autofilled = event.isAutofilled;\n this.stateChanges.next();\n });\n }\n }\n\n ngOnChanges() {\n this.stateChanges.next();\n }\n\n ngOnDestroy() {\n this.stateChanges.complete();\n\n if (this._platform.isBrowser) {\n this._autofillMonitor.stopMonitoring(this._elementRef.nativeElement);\n }\n }\n\n ngDoCheck() {\n if (this.ngControl) {\n // We need to re-evaluate this on every change detection cycle, because there are some\n // error triggers that we can't subscribe to (e.g. parent form submissions). This means\n // that whatever logic is in here has to be super lean or we risk destroying the performance.\n this.updateErrorState();\n }\n\n // We need to dirty-check the native element's value, because there are some cases where\n // we won't be notified when it changes (e.g. the consumer isn't using forms or they're\n // updating the value using `emitEvent: false`).\n this._dirtyCheckNativeValue();\n }\n\n /** Focuses the input. */\n focus(options?: FocusOptions): void {\n this._elementRef.nativeElement.focus(options);\n }\n\n /** Callback for the cases where the focused state of the input changes. */\n _focusChanged(isFocused: boolean) {\n if (isFocused !== this.focused && (!this.readonly || !isFocused)) {\n this.focused = isFocused;\n this.stateChanges.next();\n }\n }\n\n _onInput() {\n // This is a noop function and is used to let Angular know whenever the value changes.\n // Angular will run a new change detection each time the `input` event has been dispatched.\n // It's necessary that Angular recognizes the value change, because when floatingLabel\n // is set to false and Angular forms aren't used, the placeholder won't recognize the\n // value changes and will not disappear.\n // Listening to the input event wouldn't be necessary when the input is using the\n // FormsModule or ReactiveFormsModule, because Angular forms also listens to input events.\n }\n\n /** Determines if the component host is a textarea. */\n _isTextarea() {\n return this._elementRef.nativeElement.nodeName.toLowerCase() === 'textarea';\n }\n\n /** Does some manual dirty checking on the native input `value` property. */\n protected _dirtyCheckNativeValue() {\n const newValue = this._elementRef.nativeElement.value;\n\n if (this._previousNativeValue !== newValue) {\n this._previousNativeValue = newValue;\n this.stateChanges.next();\n }\n }\n\n /** Make sure the input is a supported type. */\n protected _validateType() {\n if (MAT_INPUT_INVALID_TYPES.indexOf(this._type) > -1) {\n throw getMatInputUnsupportedTypeError(this._type);\n }\n }\n\n /** Checks whether the input type is one of the types that are never empty. */\n protected _isNeverEmpty() {\n return this._neverEmptyInputTypes.indexOf(this._type) > -1;\n }\n\n /** Checks whether the input is invalid based on the native validation. */\n protected _isBadInput() {\n // The `validity` property won't be present on platform-server.\n let validity = (this._elementRef.nativeElement as HTMLInputElement).validity;\n return validity && validity.badInput;\n }\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n get empty(): boolean {\n return !this._isNeverEmpty() && !this._elementRef.nativeElement.value && !this._isBadInput() &&\n !this.autofilled;\n }\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n get shouldLabelFloat(): boolean {\n if (this._isNativeSelect) {\n // For a single-selection `<select>`, the label should float when the selected option has\n // a non-empty display value. For a `<select multiple>`, the label *always* floats to avoid\n // overlapping the label with the options.\n const selectElement = this._elementRef.nativeElement as HTMLSelectElement;\n const firstOption: HTMLOptionElement | undefined = selectElement.options[0];\n\n // On most browsers the `selectedIndex` will always be 0, however on IE and Edge it'll be\n // -1 if the `value` is set to something, that isn't in the list of options, at a later point.\n return this.focused || selectElement.multiple || !this.empty ||\n !!(selectElement.selectedIndex > -1 && firstOption && firstOption.label);\n } else {\n return this.focused || !this.empty;\n }\n }\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n setDescribedByIds(ids: string[]) {\n this._ariaDescribedby = ids.join(' ');\n }\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n onContainerClick() {\n // Do not re-focus the input element if the element is already focused. Otherwise it can happen\n // that someone clicks on a time input and the cursor resets to the \"hours\" field while the\n // \"minutes\" field was actually clicked. See: https://github.com/angular/components/issues/12849\n if (!this.focused) {\n this.focus();\n }\n }\n\n static ngAcceptInputType_disabled: BooleanInput;\n static ngAcceptInputType_readonly: BooleanInput;\n static ngAcceptInputType_required: BooleanInput;\n\n // Accept `any` to avoid conflicts with other directives on `<input>` that may\n // accept different types.\n static ngAcceptInputType_value: any;\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 {TextFieldModule} from '@angular/cdk/text-field';\nimport {NgModule} from '@angular/core';\nimport {ErrorStateMatcher} from '@angular/material/core';\nimport {MatFormFieldModule} from '@angular/material/form-field';\nimport {MatTextareaAutosize} from './autosize';\nimport {MatInput} from './input';\n\n@NgModule({\n declarations: [MatInput, MatTextareaAutosize],\n imports: [\n TextFieldModule,\n MatFormFieldModule,\n ],\n exports: [\n TextFieldModule,\n // We re-export the `MatFormFieldModule` since `MatInput` will almost always\n // be used together with `MatFormField`.\n MatFormFieldModule,\n MatInput,\n MatTextareaAutosize,\n ],\n providers: [ErrorStateMatcher],\n})\nexport class MatInputModule {}\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 './autosize';\nexport * from './input';\nexport * from './input-errors';\nexport * from './input-module';\nexport * from './input-value-accessor';\n\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;AAAA;;;;;;;AAWA;;;;;AAKA;IAWyC,uCAAmB;IAX5D;;KA2BC;IAfC,sBACI,mDAAkB;aADtB,cACmC,OAAO,IAAI,CAAC,OAAO,CAAC,EAAE;aACzD,UAAuB,KAAa,IAAI,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,EAAE;;;OADN;IAGzD,sBACI,mDAAkB;aADtB,cACm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BA2MhC,QAAQ,YAAI,IAAI;gBA3MkB,MAAM,uBA4MxC,QAAQ;gBA5ML,kBAAkB,uBA6MrB,QAAQ;gBAzMX,iBAAiB;gDA2Md,QAAQ,YAAI,IAAI,YAAI,MAAM,SAAC,wBAAwB;gBA7NhD,eAAe;gBAOrB,MAAM;;;2BAoHL,KAAK;qBAuBL,KAAK;8BASL,KAAK;2BAML,KAAK;uBAML,KAAK;oCAgBL,KAAK;wBAML,KAAK;2BAUL,KAAK;;IAyNR,eAAC;CAAA,CA/U6B,kBAAkB;;AC3FhD;;;;;;;AAQA;IAOA;KAgB8B;;gBAhB7B,QAAQ,SAAC;oBACR,YAAY,EAAE,CAAC,QAAQ,EAAE,mBAAmB,CAAC;oBAC7C,OAAO,EAAE;wBACP,eAAe;wBACf,kBAAkB;qBACnB;oBACD,OAAO,EAAE;wBACP,eAAe;;;wBAGf,kBAAkB;wBAClB,QAAQ;wBACR,mBAAmB;qBACpB;oBACD,SAAS,EAAE,CAAC,iBAAiB,CAAC;iBAC/B;;IAC4B,qBAAC;CAhB9B;;ACfA;;;;;;GAMG;;ACNH;;GAEG;;;;"}
1
+ {"version":3,"file":"input.js","sources":["../../../../../../src/material/input/autosize.ts","../../../../../../src/material/input/input-errors.ts","../../../../../../src/material/input/input-value-accessor.ts","../../../../../../src/material/input/input.ts","../../../../../../src/material/input/input-module.ts","../../../../../../src/material/input/public-api.ts","../../../../../../src/material/input/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 {CdkTextareaAutosize} from '@angular/cdk/text-field';\nimport {Directive, Input} from '@angular/core';\n\n/**\n * Directive to automatically resize a textarea to fit its content.\n * @deprecated Use `cdkTextareaAutosize` from `@angular/cdk/text-field` instead.\n * @breaking-change 8.0.0\n */\n@Directive({\n selector: 'textarea[mat-autosize], textarea[matTextareaAutosize]',\n exportAs: 'matTextareaAutosize',\n inputs: ['cdkAutosizeMinRows', 'cdkAutosizeMaxRows'],\n host: {\n 'class': 'cdk-textarea-autosize mat-autosize',\n // Textarea elements that have the directive applied should have a single row by default.\n // Browsers normally show two rows by default and therefore this limits the minRows binding.\n 'rows': '1',\n },\n})\nexport class MatTextareaAutosize extends CdkTextareaAutosize {\n @Input()\n get matAutosizeMinRows(): number { return this.minRows; }\n set matAutosizeMinRows(value: number) { this.minRows = value; }\n\n @Input()\n get matAutosizeMaxRows(): number { return this.maxRows; }\n set matAutosizeMaxRows(value: number) { this.maxRows = value; }\n\n @Input('mat-autosize')\n get matAutosize(): boolean { return this.enabled; }\n set matAutosize(value: boolean) { this.enabled = value; }\n\n @Input()\n get matTextareaAutosize(): boolean { return this.enabled; }\n set matTextareaAutosize(value: boolean) { this.enabled = value; }\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\n/** @docs-private */\nexport function getMatInputUnsupportedTypeError(type: string): Error {\n return Error(`Input type \"${type}\" isn't supported by matInput.`);\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 {InjectionToken} from '@angular/core';\n\n\n/**\n * This token is used to inject the object whose value should be set into `MatInput`. If none is\n * provided, the native `HTMLInputElement` is used. Directives like `MatDatepickerInput` can provide\n * themselves for this token, in order to make `MatInput` delegate the getting and setting of the\n * value to them.\n */\nexport const MAT_INPUT_VALUE_ACCESSOR =\n new InjectionToken<{value: any}>('MAT_INPUT_VALUE_ACCESSOR');\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 {BooleanInput, coerceBooleanProperty} from '@angular/cdk/coercion';\nimport {getSupportedInputTypes, Platform} from '@angular/cdk/platform';\nimport {AutofillMonitor} from '@angular/cdk/text-field';\nimport {\n Directive,\n DoCheck,\n ElementRef,\n Inject,\n Input,\n NgZone,\n OnChanges,\n OnDestroy,\n OnInit,\n Optional,\n Self,\n HostListener,\n} from '@angular/core';\nimport {FormGroupDirective, NgControl, NgForm} from '@angular/forms';\nimport {\n CanUpdateErrorState,\n CanUpdateErrorStateCtor,\n ErrorStateMatcher,\n mixinErrorState,\n} from '@angular/material/core';\nimport {MatFormFieldControl} from '@angular/material/form-field';\nimport {Subject} from 'rxjs';\nimport {getMatInputUnsupportedTypeError} from './input-errors';\nimport {MAT_INPUT_VALUE_ACCESSOR} from './input-value-accessor';\n\n\n// Invalid input type. Using one of these will throw an MatInputUnsupportedTypeError.\nconst MAT_INPUT_INVALID_TYPES = [\n 'button',\n 'checkbox',\n 'file',\n 'hidden',\n 'image',\n 'radio',\n 'range',\n 'reset',\n 'submit'\n];\n\nlet nextUniqueId = 0;\n\n// Boilerplate for applying mixins to MatInput.\n/** @docs-private */\nclass MatInputBase {\n constructor(public _defaultErrorStateMatcher: ErrorStateMatcher,\n public _parentForm: NgForm,\n public _parentFormGroup: FormGroupDirective,\n /** @docs-private */\n public ngControl: NgControl) {}\n}\nconst _MatInputMixinBase: CanUpdateErrorStateCtor & typeof MatInputBase =\n mixinErrorState(MatInputBase);\n\n/** Directive that allows a native input to work inside a `MatFormField`. */\n@Directive({\n selector: `input[matInput], textarea[matInput], select[matNativeControl],\n input[matNativeControl], textarea[matNativeControl]`,\n exportAs: 'matInput',\n host: {\n /**\n * @breaking-change 8.0.0 remove .mat-form-field-autofill-control in favor of AutofillMonitor.\n */\n 'class': 'mat-input-element mat-form-field-autofill-control',\n '[class.mat-input-server]': '_isServer',\n // Native input properties that are overwritten by Angular inputs need to be synced with\n // the native input element. Otherwise property bindings for those don't work.\n '[attr.id]': 'id',\n '[attr.placeholder]': 'placeholder',\n '[disabled]': 'disabled',\n '[required]': 'required',\n '[attr.readonly]': 'readonly && !_isNativeSelect || null',\n '[attr.aria-describedby]': '_ariaDescribedby || null',\n '[attr.aria-invalid]': 'errorState',\n '[attr.aria-required]': 'required.toString()',\n },\n providers: [{provide: MatFormFieldControl, useExisting: MatInput}],\n})\nexport class MatInput extends _MatInputMixinBase implements MatFormFieldControl<any>, OnChanges,\n OnDestroy, OnInit, DoCheck, CanUpdateErrorState {\n protected _uid = `mat-input-${nextUniqueId++}`;\n protected _previousNativeValue: any;\n private _inputValueAccessor: {value: any};\n /** The aria-describedby attribute on the input for improved a11y. */\n _ariaDescribedby: string;\n\n /** Whether the component is being rendered on the server. */\n readonly _isServer: boolean;\n\n /** Whether the component is a native html select. */\n readonly _isNativeSelect: boolean;\n\n /** Whether the component is a textarea. */\n readonly _isTextarea: boolean;\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n focused: boolean = false;\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n readonly stateChanges: Subject<void> = new Subject<void>();\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n controlType: string = 'mat-input';\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n autofilled = false;\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n @Input()\n get disabled(): boolean {\n if (this.ngControl && this.ngControl.disabled !== null) {\n return this.ngControl.disabled;\n }\n return this._disabled;\n }\n set disabled(value: boolean) {\n this._disabled = coerceBooleanProperty(value);\n\n // Browsers may not fire the blur event if the input is disabled too quickly.\n // Reset from here to ensure that the element doesn't become stuck.\n if (this.focused) {\n this.focused = false;\n this.stateChanges.next();\n }\n }\n protected _disabled = false;\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n @Input()\n get id(): string { return this._id; }\n set id(value: string) { this._id = value || this._uid; }\n protected _id: string;\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n @Input() placeholder: string;\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n @Input()\n get required(): boolean { return this._required; }\n set required(value: boolean) { this._required = coerceBooleanProperty(value); }\n protected _required = false;\n\n /** Input type of the element. */\n @Input()\n get type(): string { return this._type; }\n set type(value: string) {\n this._type = value || 'text';\n this._validateType();\n\n // When using Angular inputs, developers are no longer able to set the properties on the native\n // input element. To ensure that bindings for `type` work, we need to sync the setter\n // with the native property. Textarea elements don't support the type property or attribute.\n if (!this._isTextarea && getSupportedInputTypes().has(this._type)) {\n (this._elementRef.nativeElement as HTMLInputElement).type = this._type;\n }\n }\n protected _type = 'text';\n\n /** An object used to control when error messages are shown. */\n @Input() errorStateMatcher: ErrorStateMatcher;\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n @Input()\n get value(): string { return this._inputValueAccessor.value; }\n set value(value: string) {\n if (value !== this.value) {\n this._inputValueAccessor.value = value;\n this.stateChanges.next();\n }\n }\n\n /** Whether the element is readonly. */\n @Input()\n get readonly(): boolean { return this._readonly; }\n set readonly(value: boolean) { this._readonly = coerceBooleanProperty(value); }\n private _readonly = false;\n\n protected _neverEmptyInputTypes = [\n 'date',\n 'datetime',\n 'datetime-local',\n 'month',\n 'time',\n 'week'\n ].filter(t => getSupportedInputTypes().has(t));\n\n constructor(\n protected _elementRef: ElementRef<HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement>,\n protected _platform: Platform,\n /** @docs-private */\n @Optional() @Self() public ngControl: NgControl,\n @Optional() _parentForm: NgForm,\n @Optional() _parentFormGroup: FormGroupDirective,\n _defaultErrorStateMatcher: ErrorStateMatcher,\n @Optional() @Self() @Inject(MAT_INPUT_VALUE_ACCESSOR) inputValueAccessor: any,\n private _autofillMonitor: AutofillMonitor,\n ngZone: NgZone) {\n\n super(_defaultErrorStateMatcher, _parentForm, _parentFormGroup, ngControl);\n\n const element = this._elementRef.nativeElement;\n const nodeName = element.nodeName.toLowerCase();\n\n // If no input value accessor was explicitly specified, use the element as the input value\n // accessor.\n this._inputValueAccessor = inputValueAccessor || element;\n\n this._previousNativeValue = this.value;\n\n // Force setter to be called in case id was not specified.\n this.id = this.id;\n\n // On some versions of iOS the caret gets stuck in the wrong place when holding down the delete\n // key. In order to get around this we need to \"jiggle\" the caret loose. Since this bug only\n // exists on iOS, we only bother to install the listener on iOS.\n if (_platform.IOS) {\n ngZone.runOutsideAngular(() => {\n _elementRef.nativeElement.addEventListener('keyup', (event: Event) => {\n let el = event.target as HTMLInputElement;\n if (!el.value && !el.selectionStart && !el.selectionEnd) {\n // Note: Just setting `0, 0` doesn't fix the issue. Setting\n // `1, 1` fixes it for the first time that you type text and\n // then hold delete. Toggling to `1, 1` and then back to\n // `0, 0` seems to completely fix it.\n el.setSelectionRange(1, 1);\n el.setSelectionRange(0, 0);\n }\n });\n });\n }\n\n this._isServer = !this._platform.isBrowser;\n this._isNativeSelect = nodeName === 'select';\n this._isTextarea = nodeName === 'textarea';\n\n if (this._isNativeSelect) {\n this.controlType = (element as HTMLSelectElement).multiple ? 'mat-native-select-multiple' :\n 'mat-native-select';\n }\n }\n\n ngOnInit() {\n if (this._platform.isBrowser) {\n this._autofillMonitor.monitor(this._elementRef.nativeElement).subscribe(event => {\n this.autofilled = event.isAutofilled;\n this.stateChanges.next();\n });\n }\n }\n\n ngOnChanges() {\n this.stateChanges.next();\n }\n\n ngOnDestroy() {\n this.stateChanges.complete();\n\n if (this._platform.isBrowser) {\n this._autofillMonitor.stopMonitoring(this._elementRef.nativeElement);\n }\n }\n\n ngDoCheck() {\n if (this.ngControl) {\n // We need to re-evaluate this on every change detection cycle, because there are some\n // error triggers that we can't subscribe to (e.g. parent form submissions). This means\n // that whatever logic is in here has to be super lean or we risk destroying the performance.\n this.updateErrorState();\n }\n\n // We need to dirty-check the native element's value, because there are some cases where\n // we won't be notified when it changes (e.g. the consumer isn't using forms or they're\n // updating the value using `emitEvent: false`).\n this._dirtyCheckNativeValue();\n }\n\n /** Focuses the input. */\n focus(options?: FocusOptions): void {\n this._elementRef.nativeElement.focus(options);\n }\n\n // We have to use a `HostListener` here in order to support both Ivy and ViewEngine.\n // In Ivy the `host` bindings will be merged when this class is extended, whereas in\n // ViewEngine they're overwritten.\n // TODO(crisbeto): we move this back into `host` once Ivy is turned on by default.\n /** Callback for the cases where the focused state of the input changes. */\n // tslint:disable:no-host-decorator-in-concrete\n @HostListener('focus', ['true'])\n @HostListener('blur', ['false'])\n // tslint:enable:no-host-decorator-in-concrete\n _focusChanged(isFocused: boolean) {\n if (isFocused !== this.focused && (!this.readonly || !isFocused)) {\n this.focused = isFocused;\n this.stateChanges.next();\n }\n }\n\n // We have to use a `HostListener` here in order to support both Ivy and ViewEngine.\n // In Ivy the `host` bindings will be merged when this class is extended, whereas in\n // ViewEngine they're overwritten.\n // TODO(crisbeto): we move this back into `host` once Ivy is turned on by default.\n // tslint:disable-next-line:no-host-decorator-in-concrete\n @HostListener('input')\n _onInput() {\n // This is a noop function and is used to let Angular know whenever the value changes.\n // Angular will run a new change detection each time the `input` event has been dispatched.\n // It's necessary that Angular recognizes the value change, because when floatingLabel\n // is set to false and Angular forms aren't used, the placeholder won't recognize the\n // value changes and will not disappear.\n // Listening to the input event wouldn't be necessary when the input is using the\n // FormsModule or ReactiveFormsModule, because Angular forms also listens to input events.\n }\n\n /** Does some manual dirty checking on the native input `value` property. */\n protected _dirtyCheckNativeValue() {\n const newValue = this._elementRef.nativeElement.value;\n\n if (this._previousNativeValue !== newValue) {\n this._previousNativeValue = newValue;\n this.stateChanges.next();\n }\n }\n\n /** Make sure the input is a supported type. */\n protected _validateType() {\n if (MAT_INPUT_INVALID_TYPES.indexOf(this._type) > -1) {\n throw getMatInputUnsupportedTypeError(this._type);\n }\n }\n\n /** Checks whether the input type is one of the types that are never empty. */\n protected _isNeverEmpty() {\n return this._neverEmptyInputTypes.indexOf(this._type) > -1;\n }\n\n /** Checks whether the input is invalid based on the native validation. */\n protected _isBadInput() {\n // The `validity` property won't be present on platform-server.\n let validity = (this._elementRef.nativeElement as HTMLInputElement).validity;\n return validity && validity.badInput;\n }\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n get empty(): boolean {\n return !this._isNeverEmpty() && !this._elementRef.nativeElement.value && !this._isBadInput() &&\n !this.autofilled;\n }\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n get shouldLabelFloat(): boolean {\n if (this._isNativeSelect) {\n // For a single-selection `<select>`, the label should float when the selected option has\n // a non-empty display value. For a `<select multiple>`, the label *always* floats to avoid\n // overlapping the label with the options.\n const selectElement = this._elementRef.nativeElement as HTMLSelectElement;\n const firstOption: HTMLOptionElement | undefined = selectElement.options[0];\n\n // On most browsers the `selectedIndex` will always be 0, however on IE and Edge it'll be\n // -1 if the `value` is set to something, that isn't in the list of options, at a later point.\n return this.focused || selectElement.multiple || !this.empty ||\n !!(selectElement.selectedIndex > -1 && firstOption && firstOption.label);\n } else {\n return this.focused || !this.empty;\n }\n }\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n setDescribedByIds(ids: string[]) {\n this._ariaDescribedby = ids.join(' ');\n }\n\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n onContainerClick() {\n // Do not re-focus the input element if the element is already focused. Otherwise it can happen\n // that someone clicks on a time input and the cursor resets to the \"hours\" field while the\n // \"minutes\" field was actually clicked. See: https://github.com/angular/components/issues/12849\n if (!this.focused) {\n this.focus();\n }\n }\n\n static ngAcceptInputType_disabled: BooleanInput;\n static ngAcceptInputType_readonly: BooleanInput;\n static ngAcceptInputType_required: BooleanInput;\n\n // Accept `any` to avoid conflicts with other directives on `<input>` that may\n // accept different types.\n static ngAcceptInputType_value: any;\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 {TextFieldModule} from '@angular/cdk/text-field';\nimport {NgModule} from '@angular/core';\nimport {ErrorStateMatcher} from '@angular/material/core';\nimport {MatFormFieldModule} from '@angular/material/form-field';\nimport {MatTextareaAutosize} from './autosize';\nimport {MatInput} from './input';\n\n@NgModule({\n declarations: [MatInput, MatTextareaAutosize],\n imports: [\n TextFieldModule,\n MatFormFieldModule,\n ],\n exports: [\n TextFieldModule,\n // We re-export the `MatFormFieldModule` since `MatInput` will almost always\n // be used together with `MatFormField`.\n MatFormFieldModule,\n MatInput,\n MatTextareaAutosize,\n ],\n providers: [ErrorStateMatcher],\n})\nexport class MatInputModule {}\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 './autosize';\nexport * from './input';\nexport * from './input-errors';\nexport * from './input-module';\nexport * from './input-value-accessor';\n\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;AAAA;;;;;;;AAWA;;;;;AAKA;IAWyC,uCAAmB;IAX5D;;KA2BC;IAfC,sBACI,mDAAkB;aADtB,cACmC,OAAO,IAAI,CAAC,OAAO,CAAC,EAAE;aACzD,UAAuB,KAAa,IAAI,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,EAAE;;;OADN;IAGzD,sBACI,mDAAkB;aADtB,cACmC,OAAO,IAAI,CAAC,OAAO,CAAC,EAAE;aACzD,UAAuB,KAAa,IAAI,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,EAAE;;;OADN;IAGzD,sBACI,4CAAW;aADf,cAC6B,OAAO,IAAI,CAAC,OAAO,CAAC,EAAE;aACnD,UAAgB,KAAc,IAAI,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,EAAE;;;OADN;IAGnD,sBACI,oDAAmB;aADvB,cACqC,OAAO,IAAI,CAAC,OAAO,CAAC,EAAE;aAC3D,UAAwB,KAAc,IAAI,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,EAAE;;;OADN;;gBAzB5D,SAAS,SAAC;oBACT,QAAQ,EAAE,uDAAuD;oBACjE,QAAQ,EAAE,qBAAqB;oBAC/B,MAAM,EAAE,CAAC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AGf,kBAAkB;wBAClB,QAAQ;wBACR,mBAAmB;qBACpB;oBACD,SAAS,EAAE,CAAC,iBAAiB,CAAC;iBAC/B;;IAC4B,qBAAC;CAhB9B;;ACfA;;;;;;GAMG;;ACNH;;GAEG;;;;"}
package/fesm5/list.js CHANGED
@@ -701,7 +701,8 @@ var MatSelectionList = /** @class */ (function (_super) {
701
701
  // The "A" key gets special treatment, because it's used for the "select all" functionality.
702
702
  if (keyCode === A && this.multiple && hasModifierKey(event, 'ctrlKey') &&
703
703
  !manager.isTyping()) {
704
- this.options.find(function (option) { return !option.selected; }) ? this.selectAll() : this.deselectAll();
704
+ var shouldSelect = this.options.some(function (option) { return !option.disabled && !option.selected; });
705
+ this._setAllOptionsSelected(shouldSelect, true);
705
706
  event.preventDefault();
706
707
  }
707
708
  else {
@@ -798,12 +799,12 @@ var MatSelectionList = /** @class */ (function (_super) {
798
799
  * Sets the selected state on all of the options
799
800
  * and emits an event if anything changed.
800
801
  */
801
- MatSelectionList.prototype._setAllOptionsSelected = function (isSelected) {
802
+ MatSelectionList.prototype._setAllOptionsSelected = function (isSelected, skipDisabled) {
802
803
  // Keep track of whether anything changed, because we only want to
803
804
  // emit the changed event when something actually changed.
804
805
  var hasChanged = false;
805
806
  this.options.forEach(function (option) {
806
- if (option._setSelected(isSelected)) {
807
+ if ((!skipDisabled || !option.disabled) && option._setSelected(isSelected)) {
807
808
  hasChanged = true;
808
809
  }
809
810
  });
@@ -855,7 +856,6 @@ var MatSelectionList = /** @class */ (function (_super) {
855
856
  'role': 'listbox',
856
857
  'class': 'mat-selection-list mat-list-base',
857
858
  '(focus)': '_onFocus()',
858
- '(blur)': '_onTouched()',
859
859
  '(keydown)': '_keydown($event)',
860
860
  '[attr.aria-multiselectable]': 'multiple',
861
861
  '[attr.aria-disabled]': 'disabled.toString()',