@angular/material 7.0.4 → 7.2.1

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 (488) hide show
  1. package/LICENSE +1 -1
  2. package/_theming.scss +61 -44
  3. package/autocomplete/typings/index.d.ts +1 -1
  4. package/autocomplete/typings/index.metadata.json +1 -1
  5. package/badge/typings/index.metadata.json +1 -1
  6. package/bottom-sheet/typings/bottom-sheet-config.d.ts +5 -0
  7. package/bottom-sheet/typings/bottom-sheet-container.d.ts +1 -1
  8. package/bottom-sheet/typings/index.metadata.json +1 -1
  9. package/bundles/material-autocomplete.umd.js +126 -32
  10. package/bundles/material-autocomplete.umd.js.map +1 -1
  11. package/bundles/material-autocomplete.umd.min.js +1 -1
  12. package/bundles/material-autocomplete.umd.min.js.map +1 -1
  13. package/bundles/material-badge.umd.js +38 -5
  14. package/bundles/material-badge.umd.js.map +1 -1
  15. package/bundles/material-badge.umd.min.js +1 -1
  16. package/bundles/material-badge.umd.min.js.map +1 -1
  17. package/bundles/material-bottom-sheet.umd.js +68 -21
  18. package/bundles/material-bottom-sheet.umd.js.map +1 -1
  19. package/bundles/material-bottom-sheet.umd.min.js +1 -1
  20. package/bundles/material-bottom-sheet.umd.min.js.map +1 -1
  21. package/bundles/material-button-toggle.umd.js +36 -13
  22. package/bundles/material-button-toggle.umd.js.map +1 -1
  23. package/bundles/material-button-toggle.umd.min.js +1 -1
  24. package/bundles/material-button-toggle.umd.min.js.map +1 -1
  25. package/bundles/material-button.umd.js +21 -14
  26. package/bundles/material-button.umd.js.map +1 -1
  27. package/bundles/material-button.umd.min.js +1 -1
  28. package/bundles/material-button.umd.min.js.map +1 -1
  29. package/bundles/material-card.umd.js +3 -3
  30. package/bundles/material-card.umd.js.map +1 -1
  31. package/bundles/material-card.umd.min.js +1 -1
  32. package/bundles/material-card.umd.min.js.map +1 -1
  33. package/bundles/material-checkbox.umd.js +56 -15
  34. package/bundles/material-checkbox.umd.js.map +1 -1
  35. package/bundles/material-checkbox.umd.min.js +1 -1
  36. package/bundles/material-checkbox.umd.min.js.map +1 -1
  37. package/bundles/material-chips.umd.js +124 -34
  38. package/bundles/material-chips.umd.js.map +1 -1
  39. package/bundles/material-chips.umd.min.js +1 -1
  40. package/bundles/material-chips.umd.min.js.map +1 -1
  41. package/bundles/material-core.umd.js +189 -126
  42. package/bundles/material-core.umd.js.map +1 -1
  43. package/bundles/material-core.umd.min.js +1 -1
  44. package/bundles/material-core.umd.min.js.map +1 -1
  45. package/bundles/material-datepicker.umd.js +231 -53
  46. package/bundles/material-datepicker.umd.js.map +1 -1
  47. package/bundles/material-datepicker.umd.min.js +2 -2
  48. package/bundles/material-datepicker.umd.min.js.map +1 -1
  49. package/bundles/material-dialog.umd.js +138 -40
  50. package/bundles/material-dialog.umd.js.map +1 -1
  51. package/bundles/material-dialog.umd.min.js +1 -1
  52. package/bundles/material-dialog.umd.min.js.map +1 -1
  53. package/bundles/material-divider.umd.js +2 -2
  54. package/bundles/material-divider.umd.js.map +1 -1
  55. package/bundles/material-divider.umd.min.js.map +1 -1
  56. package/bundles/material-expansion.umd.js +53 -27
  57. package/bundles/material-expansion.umd.js.map +1 -1
  58. package/bundles/material-expansion.umd.min.js +1 -1
  59. package/bundles/material-expansion.umd.min.js.map +1 -1
  60. package/bundles/material-form-field.umd.js +121 -32
  61. package/bundles/material-form-field.umd.js.map +1 -1
  62. package/bundles/material-form-field.umd.min.js +1 -1
  63. package/bundles/material-form-field.umd.min.js.map +1 -1
  64. package/bundles/material-grid-list.umd.js +66 -15
  65. package/bundles/material-grid-list.umd.js.map +1 -1
  66. package/bundles/material-grid-list.umd.min.js +1 -1
  67. package/bundles/material-grid-list.umd.min.js.map +1 -1
  68. package/bundles/material-icon.umd.js +277 -78
  69. package/bundles/material-icon.umd.js.map +1 -1
  70. package/bundles/material-icon.umd.min.js +1 -1
  71. package/bundles/material-icon.umd.min.js.map +1 -1
  72. package/bundles/material-input.umd.js +50 -22
  73. package/bundles/material-input.umd.js.map +1 -1
  74. package/bundles/material-input.umd.min.js +1 -1
  75. package/bundles/material-input.umd.min.js.map +1 -1
  76. package/bundles/material-list.umd.js +69 -21
  77. package/bundles/material-list.umd.js.map +1 -1
  78. package/bundles/material-list.umd.min.js +2 -6
  79. package/bundles/material-list.umd.min.js.map +1 -1
  80. package/bundles/material-menu.umd.js +171 -66
  81. package/bundles/material-menu.umd.js.map +1 -1
  82. package/bundles/material-menu.umd.min.js +1 -1
  83. package/bundles/material-menu.umd.min.js.map +1 -1
  84. package/bundles/material-paginator.umd.js +52 -10
  85. package/bundles/material-paginator.umd.js.map +1 -1
  86. package/bundles/material-paginator.umd.min.js +1 -1
  87. package/bundles/material-paginator.umd.min.js.map +1 -1
  88. package/bundles/material-progress-bar.umd.js +31 -12
  89. package/bundles/material-progress-bar.umd.js.map +1 -1
  90. package/bundles/material-progress-bar.umd.min.js +1 -1
  91. package/bundles/material-progress-bar.umd.min.js.map +1 -1
  92. package/bundles/material-progress-spinner.umd.js +29 -13
  93. package/bundles/material-progress-spinner.umd.js.map +1 -1
  94. package/bundles/material-progress-spinner.umd.min.js.map +1 -1
  95. package/bundles/material-radio.umd.js +38 -40
  96. package/bundles/material-radio.umd.js.map +1 -1
  97. package/bundles/material-radio.umd.min.js +1 -1
  98. package/bundles/material-radio.umd.min.js.map +1 -1
  99. package/bundles/material-select.umd.js +189 -51
  100. package/bundles/material-select.umd.js.map +1 -1
  101. package/bundles/material-select.umd.min.js +1 -1
  102. package/bundles/material-select.umd.min.js.map +1 -1
  103. package/bundles/material-sidenav.umd.js +104 -25
  104. package/bundles/material-sidenav.umd.js.map +1 -1
  105. package/bundles/material-sidenav.umd.min.js +1 -1
  106. package/bundles/material-sidenav.umd.min.js.map +1 -1
  107. package/bundles/material-slide-toggle.umd.js +30 -14
  108. package/bundles/material-slide-toggle.umd.js.map +1 -1
  109. package/bundles/material-slide-toggle.umd.min.js +1 -1
  110. package/bundles/material-slide-toggle.umd.min.js.map +1 -1
  111. package/bundles/material-slider.umd.js +91 -21
  112. package/bundles/material-slider.umd.js.map +1 -1
  113. package/bundles/material-slider.umd.min.js +1 -1
  114. package/bundles/material-slider.umd.min.js.map +1 -1
  115. package/bundles/material-snack-bar.umd.js +71 -19
  116. package/bundles/material-snack-bar.umd.js.map +1 -1
  117. package/bundles/material-snack-bar.umd.min.js +1 -1
  118. package/bundles/material-snack-bar.umd.min.js.map +1 -1
  119. package/bundles/material-sort.umd.js +46 -24
  120. package/bundles/material-sort.umd.js.map +1 -1
  121. package/bundles/material-sort.umd.min.js +1 -1
  122. package/bundles/material-sort.umd.min.js.map +1 -1
  123. package/bundles/material-stepper.umd.js +37 -35
  124. package/bundles/material-stepper.umd.js.map +1 -1
  125. package/bundles/material-stepper.umd.min.js +1 -1
  126. package/bundles/material-stepper.umd.min.js.map +1 -1
  127. package/bundles/material-table.umd.js +29 -9
  128. package/bundles/material-table.umd.js.map +1 -1
  129. package/bundles/material-table.umd.min.js.map +1 -1
  130. package/bundles/material-tabs.umd.js +170 -68
  131. package/bundles/material-tabs.umd.js.map +1 -1
  132. package/bundles/material-tabs.umd.min.js +2 -2
  133. package/bundles/material-tabs.umd.min.js.map +1 -1
  134. package/bundles/material-toolbar.umd.js +14 -4
  135. package/bundles/material-toolbar.umd.js.map +1 -1
  136. package/bundles/material-toolbar.umd.min.js +1 -1
  137. package/bundles/material-toolbar.umd.min.js.map +1 -1
  138. package/bundles/material-tooltip.umd.js +53 -26
  139. package/bundles/material-tooltip.umd.js.map +1 -1
  140. package/bundles/material-tooltip.umd.min.js +1 -1
  141. package/bundles/material-tooltip.umd.min.js.map +1 -1
  142. package/bundles/material-tree.umd.js +25 -16
  143. package/bundles/material-tree.umd.js.map +1 -1
  144. package/bundles/material-tree.umd.min.js +1 -1
  145. package/bundles/material-tree.umd.min.js.map +1 -1
  146. package/bundles/material.umd.js +2853 -1010
  147. package/bundles/material.umd.js.map +1 -1
  148. package/bundles/material.umd.min.js +19 -21
  149. package/bundles/material.umd.min.js.map +1 -1
  150. package/button/typings/button.d.ts +0 -5
  151. package/button/typings/index.metadata.json +1 -1
  152. package/button-toggle/typings/index.metadata.json +1 -1
  153. package/card/typings/index.metadata.json +1 -1
  154. package/checkbox/typings/index.metadata.json +1 -1
  155. package/chips/typings/chip-list.d.ts +1 -1
  156. package/chips/typings/chip.d.ts +2 -2
  157. package/chips/typings/index.metadata.json +1 -1
  158. package/core/typings/index.metadata.json +1 -1
  159. package/core/typings/{testing/month-constants.d.ts → month-constants.d.ts} +2 -0
  160. package/core/typings/public-api.d.ts +1 -1
  161. package/datepicker/typings/calendar-body.d.ts +21 -5
  162. package/datepicker/typings/calendar.d.ts +4 -1
  163. package/datepicker/typings/datepicker.d.ts +3 -0
  164. package/datepicker/typings/index.metadata.json +1 -1
  165. package/datepicker/typings/month-view.d.ts +4 -2
  166. package/dialog/typings/index.metadata.json +1 -1
  167. package/esm2015/autocomplete.js +60 -29
  168. package/esm2015/autocomplete.js.map +1 -1
  169. package/esm2015/badge.js +29 -6
  170. package/esm2015/badge.js.map +1 -1
  171. package/esm2015/bottom-sheet.js +45 -22
  172. package/esm2015/bottom-sheet.js.map +1 -1
  173. package/esm2015/button-toggle.js +20 -11
  174. package/esm2015/button-toggle.js.map +1 -1
  175. package/esm2015/button.js +20 -15
  176. package/esm2015/button.js.map +1 -1
  177. package/esm2015/card.js +5 -5
  178. package/esm2015/card.js.map +1 -1
  179. package/esm2015/checkbox.js +30 -12
  180. package/esm2015/checkbox.js.map +1 -1
  181. package/esm2015/chips.js +64 -28
  182. package/esm2015/chips.js.map +1 -1
  183. package/esm2015/core.js +148 -129
  184. package/esm2015/core.js.map +1 -1
  185. package/esm2015/datepicker.js +124 -41
  186. package/esm2015/datepicker.js.map +1 -1
  187. package/esm2015/dialog.js +77 -40
  188. package/esm2015/dialog.js.map +1 -1
  189. package/esm2015/divider.js +4 -4
  190. package/esm2015/divider.js.map +1 -1
  191. package/esm2015/expansion.js +58 -31
  192. package/esm2015/expansion.js.map +1 -1
  193. package/esm2015/form-field.js +94 -34
  194. package/esm2015/form-field.js.map +1 -1
  195. package/esm2015/grid-list.js +45 -17
  196. package/esm2015/grid-list.js.map +1 -1
  197. package/esm2015/icon.js +136 -67
  198. package/esm2015/icon.js.map +1 -1
  199. package/esm2015/input.js +44 -23
  200. package/esm2015/input.js.map +1 -1
  201. package/esm2015/list.js +47 -22
  202. package/esm2015/list.js.map +1 -1
  203. package/esm2015/material.js +13 -12
  204. package/esm2015/material.js.map +1 -1
  205. package/esm2015/menu.js +109 -63
  206. package/esm2015/menu.js.map +1 -1
  207. package/esm2015/paginator.js +35 -12
  208. package/esm2015/paginator.js.map +1 -1
  209. package/esm2015/progress-bar.js +26 -13
  210. package/esm2015/progress-bar.js.map +1 -1
  211. package/esm2015/progress-spinner.js +24 -14
  212. package/esm2015/progress-spinner.js.map +1 -1
  213. package/esm2015/radio.js +22 -21
  214. package/esm2015/radio.js.map +1 -1
  215. package/esm2015/select.js +116 -53
  216. package/esm2015/select.js.map +1 -1
  217. package/esm2015/sidenav.js +75 -28
  218. package/esm2015/sidenav.js.map +1 -1
  219. package/esm2015/slide-toggle.js +23 -15
  220. package/esm2015/slide-toggle.js.map +1 -1
  221. package/esm2015/slider.js +54 -24
  222. package/esm2015/slider.js.map +1 -1
  223. package/esm2015/snack-bar.js +41 -21
  224. package/esm2015/snack-bar.js.map +1 -1
  225. package/esm2015/sort.js +47 -24
  226. package/esm2015/sort.js.map +1 -1
  227. package/esm2015/stepper.js +35 -32
  228. package/esm2015/stepper.js.map +1 -1
  229. package/esm2015/table.js +31 -11
  230. package/esm2015/table.js.map +1 -1
  231. package/esm2015/tabs.js +113 -53
  232. package/esm2015/tabs.js.map +1 -1
  233. package/esm2015/toolbar.js +9 -5
  234. package/esm2015/toolbar.js.map +1 -1
  235. package/esm2015/tooltip.js +43 -28
  236. package/esm2015/tooltip.js.map +1 -1
  237. package/esm2015/tree.js +22 -17
  238. package/esm2015/tree.js.map +1 -1
  239. package/esm5/autocomplete.es5.js +128 -34
  240. package/esm5/autocomplete.es5.js.map +1 -1
  241. package/esm5/badge.es5.js +40 -7
  242. package/esm5/badge.es5.js.map +1 -1
  243. package/esm5/bottom-sheet.es5.js +70 -23
  244. package/esm5/bottom-sheet.es5.js.map +1 -1
  245. package/esm5/button-toggle.es5.js +38 -15
  246. package/esm5/button-toggle.es5.js.map +1 -1
  247. package/esm5/button.es5.js +23 -16
  248. package/esm5/button.es5.js.map +1 -1
  249. package/esm5/card.es5.js +5 -5
  250. package/esm5/card.es5.js.map +1 -1
  251. package/esm5/checkbox.es5.js +58 -17
  252. package/esm5/checkbox.es5.js.map +1 -1
  253. package/esm5/chips.es5.js +127 -37
  254. package/esm5/chips.es5.js.map +1 -1
  255. package/esm5/core.es5.js +192 -129
  256. package/esm5/core.es5.js.map +1 -1
  257. package/esm5/datepicker.es5.js +233 -55
  258. package/esm5/datepicker.es5.js.map +1 -1
  259. package/esm5/dialog.es5.js +140 -42
  260. package/esm5/dialog.es5.js.map +1 -1
  261. package/esm5/divider.es5.js +4 -4
  262. package/esm5/divider.es5.js.map +1 -1
  263. package/esm5/expansion.es5.js +56 -31
  264. package/esm5/expansion.es5.js.map +1 -1
  265. package/esm5/form-field.es5.js +125 -36
  266. package/esm5/form-field.es5.js.map +1 -1
  267. package/esm5/grid-list.es5.js +68 -17
  268. package/esm5/grid-list.es5.js.map +1 -1
  269. package/esm5/icon.es5.js +279 -80
  270. package/esm5/icon.es5.js.map +1 -1
  271. package/esm5/input.es5.js +52 -24
  272. package/esm5/input.es5.js.map +1 -1
  273. package/esm5/list.es5.js +72 -24
  274. package/esm5/list.es5.js.map +1 -1
  275. package/esm5/material.es5.js +13 -12
  276. package/esm5/material.es5.js.map +1 -1
  277. package/esm5/menu.es5.js +170 -65
  278. package/esm5/menu.es5.js.map +1 -1
  279. package/esm5/paginator.es5.js +55 -13
  280. package/esm5/paginator.es5.js.map +1 -1
  281. package/esm5/progress-bar.es5.js +33 -14
  282. package/esm5/progress-bar.es5.js.map +1 -1
  283. package/esm5/progress-spinner.es5.js +31 -15
  284. package/esm5/progress-spinner.es5.js.map +1 -1
  285. package/esm5/radio.es5.js +42 -42
  286. package/esm5/radio.es5.js.map +1 -1
  287. package/esm5/select.es5.js +193 -55
  288. package/esm5/select.es5.js.map +1 -1
  289. package/esm5/sidenav.es5.js +107 -28
  290. package/esm5/sidenav.es5.js.map +1 -1
  291. package/esm5/slide-toggle.es5.js +32 -16
  292. package/esm5/slide-toggle.es5.js.map +1 -1
  293. package/esm5/slider.es5.js +94 -24
  294. package/esm5/slider.es5.js.map +1 -1
  295. package/esm5/snack-bar.es5.js +73 -21
  296. package/esm5/snack-bar.es5.js.map +1 -1
  297. package/esm5/sort.es5.js +53 -26
  298. package/esm5/sort.es5.js.map +1 -1
  299. package/esm5/stepper.es5.js +40 -38
  300. package/esm5/stepper.es5.js.map +1 -1
  301. package/esm5/table.es5.js +31 -11
  302. package/esm5/table.es5.js.map +1 -1
  303. package/esm5/tabs.es5.js +162 -61
  304. package/esm5/tabs.es5.js.map +1 -1
  305. package/esm5/toolbar.es5.js +16 -6
  306. package/esm5/toolbar.es5.js.map +1 -1
  307. package/esm5/tooltip.es5.js +55 -28
  308. package/esm5/tooltip.es5.js.map +1 -1
  309. package/esm5/tree.es5.js +27 -18
  310. package/esm5/tree.es5.js.map +1 -1
  311. package/expansion/typings/expansion-panel-header.d.ts +2 -2
  312. package/expansion/typings/expansion-panel.d.ts +19 -2
  313. package/expansion/typings/index.metadata.json +1 -1
  314. package/form-field/typings/form-field.d.ts +15 -4
  315. package/form-field/typings/index.metadata.json +1 -1
  316. package/grid-list/typings/index.d.ts +1 -1
  317. package/grid-list/typings/index.metadata.json +1 -1
  318. package/icon/typings/index.metadata.json +1 -1
  319. package/list/typings/index.metadata.json +1 -1
  320. package/material.d.ts +1 -1
  321. package/material.metadata.json +3 -3
  322. package/menu/typings/index.d.ts +4 -4
  323. package/menu/typings/index.metadata.json +1 -1
  324. package/menu/typings/menu-directive.d.ts +1 -0
  325. package/menu/typings/menu-item.d.ts +2 -0
  326. package/package.json +5 -5
  327. package/paginator/typings/index.metadata.json +1 -1
  328. package/paginator/typings/paginator.d.ts +7 -3
  329. package/prebuilt-themes/deeppurple-amber.css +1 -1
  330. package/prebuilt-themes/indigo-pink.css +1 -1
  331. package/prebuilt-themes/pink-bluegrey.css +1 -1
  332. package/prebuilt-themes/purple-green.css +1 -1
  333. package/progress-bar/typings/index.metadata.json +1 -1
  334. package/radio/typings/index.metadata.json +1 -1
  335. package/radio/typings/radio.d.ts +2 -6
  336. package/schematics/ng-add/theming/{custom-theme.d.ts → create-custom-theme.d.ts} +0 -0
  337. package/schematics/ng-add/theming/{custom-theme.js → create-custom-theme.js} +1 -1
  338. package/schematics/ng-add/theming/create-custom-theme.js.map +1 -0
  339. package/schematics/ng-add/theming/theming.js +35 -19
  340. package/schematics/ng-add/theming/theming.js.map +1 -1
  341. package/schematics/ng-generate/address-form/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.ts +2 -2
  342. package/schematics/ng-generate/dashboard/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.ts +2 -2
  343. package/schematics/ng-generate/nav/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.ts +2 -2
  344. package/schematics/ng-generate/table/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.ts +2 -2
  345. package/schematics/ng-generate/tree/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.ts +2 -2
  346. package/select/typings/index.metadata.json +1 -1
  347. package/select/typings/select.d.ts +12 -2
  348. package/sidenav/typings/drawer.d.ts +9 -2
  349. package/sidenav/typings/index.metadata.json +1 -1
  350. package/slide-toggle/typings/index.metadata.json +1 -1
  351. package/slider/typings/index.metadata.json +1 -1
  352. package/snack-bar/typings/index.metadata.json +1 -1
  353. package/sort/typings/index.metadata.json +1 -1
  354. package/stepper/typings/index.metadata.json +1 -1
  355. package/stepper/typings/step-header.d.ts +3 -5
  356. package/tabs/typings/index.d.ts +5 -5
  357. package/tabs/typings/index.metadata.json +1 -1
  358. package/tabs/typings/tab-body.d.ts +2 -0
  359. package/tabs/typings/tab-group.d.ts +11 -2
  360. package/tabs/typings/tab-header.d.ts +9 -3
  361. package/toolbar/typings/index.metadata.json +1 -1
  362. package/tooltip/typings/index.metadata.json +1 -1
  363. package/tree/typings/data-source/flat-data-source.d.ts +2 -2
  364. package/tree/typings/index.metadata.json +1 -1
  365. package/typings/autocomplete/index.d.ts +1 -1
  366. package/typings/autocomplete/index.metadata.json +1 -1
  367. package/typings/badge/index.metadata.json +1 -1
  368. package/typings/bottom-sheet/bottom-sheet-config.d.ts +5 -0
  369. package/typings/bottom-sheet/bottom-sheet-container.d.ts +1 -1
  370. package/typings/bottom-sheet/index.metadata.json +1 -1
  371. package/typings/button/button.d.ts +0 -5
  372. package/typings/button/index.metadata.json +1 -1
  373. package/typings/button-toggle/index.metadata.json +1 -1
  374. package/typings/card/index.metadata.json +1 -1
  375. package/typings/checkbox/index.metadata.json +1 -1
  376. package/typings/chips/chip-list.d.ts +1 -1
  377. package/typings/chips/chip.d.ts +2 -2
  378. package/typings/chips/index.metadata.json +1 -1
  379. package/typings/core/index.metadata.json +1 -1
  380. package/typings/core/{testing/month-constants.d.ts → month-constants.d.ts} +2 -0
  381. package/typings/core/public-api.d.ts +1 -1
  382. package/typings/datepicker/calendar-body.d.ts +21 -5
  383. package/typings/datepicker/calendar.d.ts +4 -1
  384. package/typings/datepicker/datepicker.d.ts +3 -0
  385. package/typings/datepicker/index.metadata.json +1 -1
  386. package/typings/datepicker/month-view.d.ts +4 -2
  387. package/typings/dialog/index.metadata.json +1 -1
  388. package/typings/esm5/autocomplete/index.d.ts +1 -1
  389. package/typings/esm5/autocomplete/index.metadata.json +1 -1
  390. package/typings/esm5/badge/index.metadata.json +1 -1
  391. package/typings/esm5/bottom-sheet/bottom-sheet-config.d.ts +5 -0
  392. package/typings/esm5/bottom-sheet/bottom-sheet-container.d.ts +1 -1
  393. package/typings/esm5/bottom-sheet/index.metadata.json +1 -1
  394. package/typings/esm5/button/button.d.ts +0 -5
  395. package/typings/esm5/button/index.metadata.json +1 -1
  396. package/typings/esm5/button-toggle/index.metadata.json +1 -1
  397. package/typings/esm5/card/index.metadata.json +1 -1
  398. package/typings/esm5/checkbox/index.metadata.json +1 -1
  399. package/typings/esm5/chips/chip-list.d.ts +1 -1
  400. package/typings/esm5/chips/chip.d.ts +2 -2
  401. package/typings/esm5/chips/index.metadata.json +1 -1
  402. package/typings/esm5/core/index.metadata.json +1 -1
  403. package/typings/esm5/core/{testing/month-constants.d.ts → month-constants.d.ts} +2 -0
  404. package/typings/esm5/core/public-api.d.ts +1 -1
  405. package/typings/esm5/datepicker/calendar-body.d.ts +21 -5
  406. package/typings/esm5/datepicker/calendar.d.ts +4 -1
  407. package/typings/esm5/datepicker/datepicker.d.ts +3 -0
  408. package/typings/esm5/datepicker/index.metadata.json +1 -1
  409. package/typings/esm5/datepicker/month-view.d.ts +4 -2
  410. package/typings/esm5/dialog/index.metadata.json +1 -1
  411. package/typings/esm5/expansion/expansion-panel-header.d.ts +2 -2
  412. package/typings/esm5/expansion/expansion-panel.d.ts +19 -2
  413. package/typings/esm5/expansion/index.metadata.json +1 -1
  414. package/typings/esm5/form-field/form-field.d.ts +15 -4
  415. package/typings/esm5/form-field/index.metadata.json +1 -1
  416. package/typings/esm5/grid-list/index.d.ts +1 -1
  417. package/typings/esm5/grid-list/index.metadata.json +1 -1
  418. package/typings/esm5/icon/index.metadata.json +1 -1
  419. package/typings/esm5/index.metadata.json +1 -1
  420. package/typings/esm5/list/index.metadata.json +1 -1
  421. package/typings/esm5/menu/index.d.ts +4 -4
  422. package/typings/esm5/menu/index.metadata.json +1 -1
  423. package/typings/esm5/menu/menu-directive.d.ts +1 -0
  424. package/typings/esm5/menu/menu-item.d.ts +2 -0
  425. package/typings/esm5/paginator/index.metadata.json +1 -1
  426. package/typings/esm5/paginator/paginator.d.ts +7 -3
  427. package/typings/esm5/progress-bar/index.metadata.json +1 -1
  428. package/typings/esm5/radio/index.metadata.json +1 -1
  429. package/typings/esm5/radio/radio.d.ts +2 -6
  430. package/typings/esm5/select/index.metadata.json +1 -1
  431. package/typings/esm5/select/select.d.ts +12 -2
  432. package/typings/esm5/sidenav/drawer.d.ts +9 -2
  433. package/typings/esm5/sidenav/index.metadata.json +1 -1
  434. package/typings/esm5/slide-toggle/index.metadata.json +1 -1
  435. package/typings/esm5/slider/index.metadata.json +1 -1
  436. package/typings/esm5/snack-bar/index.metadata.json +1 -1
  437. package/typings/esm5/sort/index.metadata.json +1 -1
  438. package/typings/esm5/stepper/index.metadata.json +1 -1
  439. package/typings/esm5/stepper/step-header.d.ts +3 -5
  440. package/typings/esm5/tabs/index.d.ts +5 -5
  441. package/typings/esm5/tabs/index.metadata.json +1 -1
  442. package/typings/esm5/tabs/tab-body.d.ts +2 -0
  443. package/typings/esm5/tabs/tab-group.d.ts +11 -2
  444. package/typings/esm5/tabs/tab-header.d.ts +9 -3
  445. package/typings/esm5/toolbar/index.metadata.json +1 -1
  446. package/typings/esm5/tooltip/index.metadata.json +1 -1
  447. package/typings/esm5/tree/data-source/flat-data-source.d.ts +2 -2
  448. package/typings/esm5/tree/index.metadata.json +1 -1
  449. package/typings/expansion/expansion-panel-header.d.ts +2 -2
  450. package/typings/expansion/expansion-panel.d.ts +19 -2
  451. package/typings/expansion/index.metadata.json +1 -1
  452. package/typings/form-field/form-field.d.ts +15 -4
  453. package/typings/form-field/index.metadata.json +1 -1
  454. package/typings/grid-list/index.d.ts +1 -1
  455. package/typings/grid-list/index.metadata.json +1 -1
  456. package/typings/icon/index.metadata.json +1 -1
  457. package/typings/index.metadata.json +1 -1
  458. package/typings/list/index.metadata.json +1 -1
  459. package/typings/menu/index.d.ts +4 -4
  460. package/typings/menu/index.metadata.json +1 -1
  461. package/typings/menu/menu-directive.d.ts +1 -0
  462. package/typings/menu/menu-item.d.ts +2 -0
  463. package/typings/paginator/index.metadata.json +1 -1
  464. package/typings/paginator/paginator.d.ts +7 -3
  465. package/typings/progress-bar/index.metadata.json +1 -1
  466. package/typings/radio/index.metadata.json +1 -1
  467. package/typings/radio/radio.d.ts +2 -6
  468. package/typings/schematics/ng-add/theming/{custom-theme.d.ts → create-custom-theme.d.ts} +0 -0
  469. package/typings/select/index.metadata.json +1 -1
  470. package/typings/select/select.d.ts +12 -2
  471. package/typings/sidenav/drawer.d.ts +9 -2
  472. package/typings/sidenav/index.metadata.json +1 -1
  473. package/typings/slide-toggle/index.metadata.json +1 -1
  474. package/typings/slider/index.metadata.json +1 -1
  475. package/typings/snack-bar/index.metadata.json +1 -1
  476. package/typings/sort/index.metadata.json +1 -1
  477. package/typings/stepper/index.metadata.json +1 -1
  478. package/typings/stepper/step-header.d.ts +3 -5
  479. package/typings/tabs/index.d.ts +5 -5
  480. package/typings/tabs/index.metadata.json +1 -1
  481. package/typings/tabs/tab-body.d.ts +2 -0
  482. package/typings/tabs/tab-group.d.ts +11 -2
  483. package/typings/tabs/tab-header.d.ts +9 -3
  484. package/typings/toolbar/index.metadata.json +1 -1
  485. package/typings/tooltip/index.metadata.json +1 -1
  486. package/typings/tree/data-source/flat-data-source.d.ts +2 -2
  487. package/typings/tree/index.metadata.json +1 -1
  488. package/schematics/ng-add/theming/custom-theme.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"icon.js","sources":["../../../src/lib/icon/icon-module.ts","../../../src/lib/icon/icon.ts","../../../src/lib/icon/icon-registry.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 {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\nimport {take} from 'rxjs/operators';\nimport {\n Attribute,\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n Input,\n OnChanges,\n OnInit,\n SimpleChanges,\n ViewEncapsulation,\n Optional,\n InjectionToken,\n inject,\n Inject,\n OnDestroy,\n AfterViewChecked,\n} from '@angular/core';\nimport {DOCUMENT} from '@angular/common';\nimport {CanColor, CanColorCtor, mixinColor} from '@angular/material/core';\nimport {coerceBooleanProperty} from '@angular/cdk/coercion';\nimport {MatIconRegistry} from './icon-registry';\n\n\n// Boilerplate for applying mixins to MatIcon.\n/** @docs-private */\nexport class MatIconBase {\n constructor(public _elementRef: ElementRef) {}\n}\nexport const _MatIconMixinBase: CanColorCtor & typeof MatIconBase =\n 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 moduleId: module.id,\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',\n '[class.mat-icon-inline]': 'inline',\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>,\n 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 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 if (changes.svgIcon) {\n if (this.svgIcon) {\n const [namespace, iconName] = this._splitIconName(this.svgIcon);\n\n this._iconRegistry.getNamedSvgIcon(iconName, namespace).pipe(take(1)).subscribe(\n svg => this._setSvgElement(svg),\n (err: Error) => console.log(`Error retrieving icon: ${err.message}`)\n );\n } else {\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","/**\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 Inject,\n Injectable,\n InjectionToken,\n Optional,\n SecurityContext,\n SkipSelf,\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/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\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);\n constructor(svgElement: SVGElement);\n constructor(data: SafeResourceUrl | SVGElement) {\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 {\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 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): this {\n return this.addSvgIconInNamespace('', iconName, url);\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): this {\n return this.addSvgIconLiteralInNamespace('', iconName, literal);\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): this {\n return this._addSvgIconConfig(namespace, iconName, new SvgIconConfig(url));\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): 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);\n return this._addSvgIconConfig(namespace, iconName, new SvgIconConfig(svgElement));\n }\n\n /**\n * Registers an icon set by URL in the default namespace.\n * @param url\n */\n addSvgIconSet(url: SafeResourceUrl): this {\n return this.addSvgIconSetInNamespace('', url);\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): this {\n return this.addSvgIconSetLiteralInNamespace('', literal);\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): this {\n return this._addSvgIconSetConfig(namespace, new SvgIconConfig(url));\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): 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));\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 /**\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 console.error(`Loading icon set URL: ${url} failed: ${err.message}`);\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);\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)));\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): SVGElement {\n const svg = this._svgElementFromString(responseText);\n this._setSvgAttributes(svg);\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): SVGElement | null {\n const iconSource = iconSet.querySelector('#' + 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);\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));\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);\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 let svg = this._svgElementFromString('<svg></svg>');\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): 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 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 return parentRegistry || new MatIconRegistry(httpClient, sanitizer, document);\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(), 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"],"names":["observableOf","observableThrow"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AE4BA,AAAA,SAAgB,2BAA2B,CAAC,QAAgB,EAA5D;IACE,OAAO,KAAK,CAAC,CAAf,mCAAA,EAAqD,QAAQ,CAA7D,CAAA,CAAgE,CAAC,CAAC;CACjE;;;;;;;AAQD,AAAA,SAAgB,6BAA6B,GAA7C;IACE,OAAO,KAAK,CAAC,0EAA0E;QAC1E,wEAAwE;QACxE,cAAc,CAAC,CAAC;CAC9B;;;;;;;AAQD,AAAA,SAAgB,kCAAkC,CAAC,GAAoB,EAAvE;IACE,OAAO,KAAK,CAAC,CAAf,sEAAA,CAAuF;QACxE,CAAf,+CAAA,EAAiE,GAAG,CAApE,EAAA,CAAwE,CAAC,CAAC;CACzE;;;;;;;AAOD,AAAA,SAAgB,sCAAsC,CAAC,OAAiB,EAAxE;IACE,OAAO,KAAK,CAAC,CAAf,wEAAA,CAAyF;QAC1E,CA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A,IAAA,EAAA,SAAA,EAAA,IAAA,EAAA,CAAA,aAAA,EAAA,EAAA,CAAA,EAAA;IAgBA,EAAA,IAAA,EAAQ,SAAR,EAAA,UAAA,EAAA,CAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAA,CAAA,iBAAA,EAAA,EAAA,CAAA,EAAA;CAyJA,CAAA;AAKA,OAAA,CAAA,cAAA,GAAA;;;IA7CA,OAAA,EAAA,CAAA,EAAA,IAAA,EAAA,KAAA,EAAA,CAAA;IAUA,QAAA,EAAA,CAAA,EAAA,IAAA,EAAA,KAAA,EAAA,CAAA;CAGA,CAAA;;;;;;ADzIA,MAAa,aAAa,CAA1B;;;IALA,EAAA,IAAA,EAAC,QAAQ,EAAT,IAAA,EAAA,CAAU;gBACR,OAAO,EAAE,CAAC,eAAe,CAAC;gBAC1B,OAAO,EAAE,CAAC,OAAO,EAAE,eAAe,CAAC;gBACnC,YAAY,EAAE,CAAC,OAAO,CAAC;aACxB,EAAD,EAAA;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"icon.js","sources":["../../../src/lib/icon/icon-module.ts","../../../src/lib/icon/icon.ts","../../../src/lib/icon/icon-registry.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 {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\nimport {take} from 'rxjs/operators';\nimport {\n Attribute,\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n Input,\n OnChanges,\n OnInit,\n SimpleChanges,\n ViewEncapsulation,\n Optional,\n InjectionToken,\n inject,\n Inject,\n OnDestroy,\n AfterViewChecked,\n} from '@angular/core';\nimport {DOCUMENT} from '@angular/common';\nimport {CanColor, CanColorCtor, mixinColor} from '@angular/material/core';\nimport {coerceBooleanProperty} from '@angular/cdk/coercion';\nimport {MatIconRegistry} from './icon-registry';\n\n\n// Boilerplate for applying mixins to MatIcon.\n/** @docs-private */\nexport class MatIconBase {\n constructor(public _elementRef: ElementRef) {}\n}\nexport const _MatIconMixinBase: CanColorCtor & typeof MatIconBase =\n 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 moduleId: module.id,\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',\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>,\n 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 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 if (changes.svgIcon) {\n if (this.svgIcon) {\n const [namespace, iconName] = this._splitIconName(this.svgIcon);\n\n this._iconRegistry.getNamedSvgIcon(iconName, namespace).pipe(take(1)).subscribe(\n svg => this._setSvgElement(svg),\n (err: Error) => console.log(`Error retrieving icon: ${err.message}`)\n );\n } else {\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","/**\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 Inject,\n Injectable,\n InjectionToken,\n Optional,\n SecurityContext,\n SkipSelf,\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/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\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);\n constructor(svgElement: SVGElement);\n constructor(data: SafeResourceUrl | SVGElement) {\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 {\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 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): this {\n return this.addSvgIconInNamespace('', iconName, url);\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): this {\n return this.addSvgIconLiteralInNamespace('', iconName, literal);\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): this {\n return this._addSvgIconConfig(namespace, iconName, new SvgIconConfig(url));\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): 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);\n return this._addSvgIconConfig(namespace, iconName, new SvgIconConfig(svgElement));\n }\n\n /**\n * Registers an icon set by URL in the default namespace.\n * @param url\n */\n addSvgIconSet(url: SafeResourceUrl): this {\n return this.addSvgIconSetInNamespace('', url);\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): this {\n return this.addSvgIconSetLiteralInNamespace('', literal);\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): this {\n return this._addSvgIconSetConfig(namespace, new SvgIconConfig(url));\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): 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));\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 /**\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 console.error(`Loading icon set URL: ${url} failed: ${err.message}`);\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);\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)));\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): SVGElement {\n const svg = this._svgElementFromString(responseText);\n this._setSvgAttributes(svg);\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): SVGElement | null {\n const iconSource = iconSet.querySelector('#' + 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);\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));\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);\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 let svg = this._svgElementFromString('<svg></svg>');\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): 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 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 return parentRegistry || new MatIconRegistry(httpClient, sanitizer, document);\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(), 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"],"names":["observableOf","observableThrow"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AE4BA,AAAA,SAAgB,2BAA2B,CAAC,QAAgB,EAA5D;IACE,OAAO,KAAK,CAAC,CAAf,mCAAA,EAAqD,QAAQ,CAA7D,CAAA,CAAgE,CAAC,CAAC;CACjE;;;;;;;AAQD,AAAA,SAAgB,6BAA6B,GAA7C;IACE,OAAO,KAAK,CAAC,0EAA0E;QAC1E,wEAAwE;QACxE,cAAc,CAAC,CAAC;CAC9B;;;;;;;AAQD,AAAA,SAAgB,kCAAkC,CAAC,GAAoB,EAAvE;IACE,OAAO,KAAK,CAAC,CAAf,sEAAA,CAAuF;QACxE,CAAf,+CAAA,EAAiE,GAAG,CAApE,EAAA,CAAwE,CAAC,CAAC;CACzE;;;;;;;AAOD,AAAA,SAAgB,sCAAsC,CAAC,OAAiB,EAAxE;IACE,OAAO,KAAK,CAAC,CAAf,wEAAA,CAAyF;QAC1E,CAAf,+CAAA,EAAiE,OAAO,CAAxE,EAAA,CAA4E,CAAC,CAAC;CAC7E;;;;;AAOD,MA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EAAA,UAAA;oBACI,yBAAJ,EAAA,QAAA;oBACI,2BAAJ,EAAA,+DAAA;iBACA;gBACA,aAAA,EAAA,iBAAA,CAAiC,IAAjC;gBACA,eAAA,EAAA,uBAAA,CAAA,MAAA;aACA,EAAA,EAAA;CACA,CAAA;;;;;IAzHA,EAAA,IAAA,EAAE,MAAF,EAAA,UAAA,EAAA,CAAA,EAAA,IAAA,EAAA,SAAA,EAAA,IAAA,EAAA,CAAA,aAAA,EAAA,EAAA,CAAA,EAAA;IAgBA,EAAA,IAAA,EAAQ,SAAR,EAAA,UAAA,EAAA,CAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAA,CAAA,iBAAA,EAAA,EAAA,CAAA,EAAA;CA0JA,CAAA;AAKA,OAAA,CAAA,cAAA,GAAA;;;IA7CA,OAAA,EAAA,CAAA,EAAA,IAAA,EAAA,KAAA,EAAA,CAAA;IAUA,QAAA,EAAA,CAAA,EAAA,IAAA,EAAA,KAAA,EAAA,CAAA;CAGA,CAAA;;;;;;AD1IA,MAAa,aAAa,CAA1B;;;IALA,EAAA,IAAA,EAAC,QAAQ,EAAT,IAAA,EAAA,CAAU;gBACR,OAAO,EAAE,CAAC,eAAe,CAAC;gBAC1B,OAAO,EAAE,CAAC,OAAO,EAAE,eAAe,CAAC;gBACnC,YAAY,EAAE,CAAC,OAAO,CAAC;aACxB,EAAD,EAAA;;;;;;;;;;;;;;;"}
package/esm2015/input.js CHANGED
@@ -17,7 +17,7 @@ import { CommonModule } from '@angular/common';
17
17
 
18
18
  /**
19
19
  * @fileoverview added by tsickle
20
- * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
20
+ * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
21
21
  */
22
22
  /**
23
23
  * Directive to automatically resize a textarea to fit its content.
@@ -85,7 +85,7 @@ MatTextareaAutosize.propDecorators = {
85
85
 
86
86
  /**
87
87
  * @fileoverview added by tsickle
88
- * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
88
+ * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
89
89
  */
90
90
 
91
91
  /**
@@ -99,20 +99,22 @@ function getMatInputUnsupportedTypeError(type) {
99
99
 
100
100
  /**
101
101
  * @fileoverview added by tsickle
102
- * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
102
+ * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
103
103
  */
104
- /** *
104
+ /**
105
105
  * This token is used to inject the object whose value should be set into `MatInput`. If none is
106
106
  * provided, the native `HTMLInputElement` is used. Directives like `MatDatepickerInput` can provide
107
107
  * themselves for this token, in order to make `MatInput` delegate the getting and setting of the
108
108
  * value to them.
109
- @type {?} */
109
+ * @type {?}
110
+ */
110
111
  const MAT_INPUT_VALUE_ACCESSOR = new InjectionToken('MAT_INPUT_VALUE_ACCESSOR');
111
112
 
112
113
  /**
113
114
  * @fileoverview added by tsickle
114
- * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
115
+ * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
115
116
  */
117
+ // Invalid input type. Using one of these will throw an MatInputUnsupportedTypeError.
116
118
  /** @type {?} */
117
119
  const MAT_INPUT_INVALID_TYPES = [
118
120
  'button',
@@ -127,6 +129,7 @@ const MAT_INPUT_INVALID_TYPES = [
127
129
  ];
128
130
  /** @type {?} */
129
131
  let nextUniqueId = 0;
132
+ // Boilerplate for applying mixins to MatInput.
130
133
  /**
131
134
  * \@docs-private
132
135
  */
@@ -161,8 +164,7 @@ class MatInput extends _MatInputMixinBase {
161
164
  * @param {?} _autofillMonitor
162
165
  * @param {?} ngZone
163
166
  */
164
- constructor(_elementRef, _platform, /** @docs-private */
165
- ngControl, _parentForm, _parentFormGroup, _defaultErrorStateMatcher, inputValueAccessor, _autofillMonitor, ngZone) {
167
+ constructor(_elementRef, _platform, ngControl, _parentForm, _parentFormGroup, _defaultErrorStateMatcher, inputValueAccessor, _autofillMonitor, ngZone) {
166
168
  super(_defaultErrorStateMatcher, _parentForm, _parentFormGroup, ngControl);
167
169
  this._elementRef = _elementRef;
168
170
  this._platform = _platform;
@@ -224,7 +226,7 @@ class MatInput extends _MatInputMixinBase {
224
226
  ngZone.runOutsideAngular(() => {
225
227
  _elementRef.nativeElement.addEventListener('keyup', (event) => {
226
228
  /** @type {?} */
227
- let el = /** @type {?} */ (event.target);
229
+ let el = (/** @type {?} */ (event.target));
228
230
  if (!el.value && !el.selectionStart && !el.selectionEnd) {
229
231
  // Note: Just setting `0, 0` doesn't fix the issue. Setting
230
232
  // `1, 1` fixes it for the first time that you type text and
@@ -239,7 +241,7 @@ class MatInput extends _MatInputMixinBase {
239
241
  this._isServer = !this._platform.isBrowser;
240
242
  this._isNativeSelect = element.nodeName.toLowerCase() === 'select';
241
243
  if (this._isNativeSelect) {
242
- this.controlType = (/** @type {?} */ (element)).multiple ? 'mat-native-select-multiple' :
244
+ this.controlType = ((/** @type {?} */ (element))).multiple ? 'mat-native-select-multiple' :
243
245
  'mat-native-select';
244
246
  }
245
247
  }
@@ -305,7 +307,7 @@ class MatInput extends _MatInputMixinBase {
305
307
  // input element. To ensure that bindings for `type` work, we need to sync the setter
306
308
  // with the native property. Textarea elements don't support the type property or attribute.
307
309
  if (!this._isTextarea() && getSupportedInputTypes().has(this._type)) {
308
- (/** @type {?} */ (this._elementRef.nativeElement)).type = this._type;
310
+ ((/** @type {?} */ (this._elementRef.nativeElement))).type = this._type;
309
311
  }
310
312
  }
311
313
  /**
@@ -379,14 +381,16 @@ class MatInput extends _MatInputMixinBase {
379
381
  * Focuses the input.
380
382
  * @return {?}
381
383
  */
382
- focus() { this._elementRef.nativeElement.focus(); }
384
+ focus() {
385
+ this._elementRef.nativeElement.focus();
386
+ }
383
387
  /**
384
388
  * Callback for the cases where the focused state of the input changes.
385
389
  * @param {?} isFocused
386
390
  * @return {?}
387
391
  */
388
392
  _focusChanged(isFocused) {
389
- if (isFocused !== this.focused && !this.readonly) {
393
+ if (isFocused !== this.focused && (!this.readonly || !isFocused)) {
390
394
  this.focused = isFocused;
391
395
  this.stateChanges.next();
392
396
  }
@@ -405,6 +409,7 @@ class MatInput extends _MatInputMixinBase {
405
409
  }
406
410
  /**
407
411
  * Does some manual dirty checking on the native input `value` property.
412
+ * @protected
408
413
  * @return {?}
409
414
  */
410
415
  _dirtyCheckNativeValue() {
@@ -417,6 +422,7 @@ class MatInput extends _MatInputMixinBase {
417
422
  }
418
423
  /**
419
424
  * Make sure the input is a supported type.
425
+ * @protected
420
426
  * @return {?}
421
427
  */
422
428
  _validateType() {
@@ -426,6 +432,7 @@ class MatInput extends _MatInputMixinBase {
426
432
  }
427
433
  /**
428
434
  * Checks whether the input type is one of the types that are never empty.
435
+ * @protected
429
436
  * @return {?}
430
437
  */
431
438
  _isNeverEmpty() {
@@ -433,15 +440,18 @@ class MatInput extends _MatInputMixinBase {
433
440
  }
434
441
  /**
435
442
  * Checks whether the input is invalid based on the native validation.
443
+ * @protected
436
444
  * @return {?}
437
445
  */
438
446
  _isBadInput() {
447
+ // The `validity` property won't be present on platform-server.
439
448
  /** @type {?} */
440
- let validity = (/** @type {?} */ (this._elementRef.nativeElement)).validity;
449
+ let validity = ((/** @type {?} */ (this._elementRef.nativeElement))).validity;
441
450
  return validity && validity.badInput;
442
451
  }
443
452
  /**
444
453
  * Determines if the component host is a textarea.
454
+ * @protected
445
455
  * @return {?}
446
456
  */
447
457
  _isTextarea() {
@@ -463,10 +473,17 @@ class MatInput extends _MatInputMixinBase {
463
473
  */
464
474
  get shouldLabelFloat() {
465
475
  if (this._isNativeSelect) {
476
+ // For a single-selection `<select>`, the label should float when the selected option has
477
+ // a non-empty display value. For a `<select multiple>`, the label *always* floats to avoid
478
+ // overlapping the label with the options.
466
479
  /** @type {?} */
467
- const selectElement = /** @type {?} */ (this._elementRef.nativeElement);
468
- return selectElement.multiple || !this.empty || !!selectElement.options[0].label ||
469
- this.focused;
480
+ const selectElement = (/** @type {?} */ (this._elementRef.nativeElement));
481
+ /** @type {?} */
482
+ const firstOption = selectElement.options[0];
483
+ // On most browsers the `selectedIndex` will always be 0, however on IE and Edge it'll be
484
+ // -1 if the `value` is set to something, that isn't in the list of options, at a later point.
485
+ return this.focused || selectElement.multiple || !this.empty ||
486
+ !!(selectElement.selectedIndex > -1 && firstOption && firstOption.label);
470
487
  }
471
488
  else {
472
489
  return this.focused || !this.empty;
@@ -478,7 +495,9 @@ class MatInput extends _MatInputMixinBase {
478
495
  * @param {?} ids
479
496
  * @return {?}
480
497
  */
481
- setDescribedByIds(ids) { this._ariaDescribedby = ids.join(' '); }
498
+ setDescribedByIds(ids) {
499
+ this._ariaDescribedby = ids.join(' ');
500
+ }
482
501
  /**
483
502
  * Implemented as part of MatFormFieldControl.
484
503
  * \@docs-private
@@ -500,8 +519,8 @@ MatInput.decorators = [
500
519
  exportAs: 'matInput',
501
520
  host: {
502
521
  /**
503
- * @breaking-change 8.0.0 remove .mat-form-field-autofill-control in favor of AutofillMonitor.
504
- */
522
+ * \@breaking-change 8.0.0 remove .mat-form-field-autofill-control in favor of AutofillMonitor.
523
+ */
505
524
  'class': 'mat-input-element mat-form-field-autofill-control',
506
525
  '[class.mat-input-server]': '_isServer',
507
526
  // Native input properties that are overwritten by Angular inputs need to be synced with
@@ -546,7 +565,7 @@ MatInput.propDecorators = {
546
565
 
547
566
  /**
548
567
  * @fileoverview added by tsickle
549
- * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
568
+ * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
550
569
  */
551
570
  class MatInputModule {
552
571
  }
@@ -560,6 +579,8 @@ MatInputModule.decorators = [
560
579
  ],
561
580
  exports: [
562
581
  TextFieldModule,
582
+ // We re-export the `MatFormFieldModule` since `MatInput` will almost always
583
+ // be used together with `MatFormField`.
563
584
  MatFormFieldModule,
564
585
  MatInput,
565
586
  MatTextareaAutosize,
@@ -570,12 +591,12 @@ MatInputModule.decorators = [
570
591
 
571
592
  /**
572
593
  * @fileoverview added by tsickle
573
- * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
594
+ * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
574
595
  */
575
596
 
576
597
  /**
577
598
  * @fileoverview added by tsickle
578
- * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
599
+ * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
579
600
  */
580
601
 
581
602
  export { MatTextareaAutosize, MatInputBase, _MatInputMixinBase, MatInput, getMatInputUnsupportedTypeError, MatInputModule, MAT_INPUT_VALUE_ACCESSOR };