@angular/material 8.1.4 → 8.2.3

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 (358) hide show
  1. package/_theming.scss +13 -11
  2. package/autocomplete/typings/autocomplete-trigger.d.ts +5 -2
  3. package/autocomplete/typings/index.metadata.json +1 -1
  4. package/bundles/material-autocomplete.umd.js +48 -20
  5. package/bundles/material-autocomplete.umd.js.map +1 -1
  6. package/bundles/material-autocomplete.umd.min.js +1 -1
  7. package/bundles/material-autocomplete.umd.min.js.map +1 -1
  8. package/bundles/material-button.umd.js +5 -6
  9. package/bundles/material-button.umd.js.map +1 -1
  10. package/bundles/material-button.umd.min.js +1 -1
  11. package/bundles/material-button.umd.min.js.map +1 -1
  12. package/bundles/material-card.umd.js +1 -1
  13. package/bundles/material-card.umd.js.map +1 -1
  14. package/bundles/material-card.umd.min.js +1 -1
  15. package/bundles/material-card.umd.min.js.map +1 -1
  16. package/bundles/material-checkbox.umd.js +1 -1
  17. package/bundles/material-checkbox.umd.js.map +1 -1
  18. package/bundles/material-checkbox.umd.min.js.map +1 -1
  19. package/bundles/material-chips.umd.js +24 -4
  20. package/bundles/material-chips.umd.js.map +1 -1
  21. package/bundles/material-chips.umd.min.js +1 -1
  22. package/bundles/material-chips.umd.min.js.map +1 -1
  23. package/bundles/material-core.umd.js +20 -18
  24. package/bundles/material-core.umd.js.map +1 -1
  25. package/bundles/material-core.umd.min.js +2 -2
  26. package/bundles/material-core.umd.min.js.map +1 -1
  27. package/bundles/material-datepicker.umd.js +22 -2
  28. package/bundles/material-datepicker.umd.js.map +1 -1
  29. package/bundles/material-datepicker.umd.min.js +2 -2
  30. package/bundles/material-datepicker.umd.min.js.map +1 -1
  31. package/bundles/material-dialog.umd.js +28 -5
  32. package/bundles/material-dialog.umd.js.map +1 -1
  33. package/bundles/material-dialog.umd.min.js +1 -1
  34. package/bundles/material-dialog.umd.min.js.map +1 -1
  35. package/bundles/material-form-field.umd.js +15 -2
  36. package/bundles/material-form-field.umd.js.map +1 -1
  37. package/bundles/material-form-field.umd.min.js +1 -1
  38. package/bundles/material-form-field.umd.min.js.map +1 -1
  39. package/bundles/material-grid-list.umd.js +1 -1
  40. package/bundles/material-grid-list.umd.min.js +1 -1
  41. package/bundles/material-icon.umd.js +103 -42
  42. package/bundles/material-icon.umd.js.map +1 -1
  43. package/bundles/material-icon.umd.min.js +1 -1
  44. package/bundles/material-icon.umd.min.js.map +1 -1
  45. package/bundles/material-list.umd.js +4 -1
  46. package/bundles/material-list.umd.js.map +1 -1
  47. package/bundles/material-list.umd.min.js +1 -1
  48. package/bundles/material-list.umd.min.js.map +1 -1
  49. package/bundles/material-menu.umd.js +35 -19
  50. package/bundles/material-menu.umd.js.map +1 -1
  51. package/bundles/material-menu.umd.min.js +1 -1
  52. package/bundles/material-menu.umd.min.js.map +1 -1
  53. package/bundles/material-paginator.umd.js +1 -1
  54. package/bundles/material-paginator.umd.js.map +1 -1
  55. package/bundles/material-paginator.umd.min.js +1 -1
  56. package/bundles/material-paginator.umd.min.js.map +1 -1
  57. package/bundles/material-progress-spinner.umd.js +34 -23
  58. package/bundles/material-progress-spinner.umd.js.map +1 -1
  59. package/bundles/material-progress-spinner.umd.min.js +1 -1
  60. package/bundles/material-progress-spinner.umd.min.js.map +1 -1
  61. package/bundles/material-radio.umd.js +3 -0
  62. package/bundles/material-radio.umd.js.map +1 -1
  63. package/bundles/material-radio.umd.min.js +1 -1
  64. package/bundles/material-radio.umd.min.js.map +1 -1
  65. package/bundles/material-select.umd.js +14 -2
  66. package/bundles/material-select.umd.js.map +1 -1
  67. package/bundles/material-select.umd.min.js +1 -1
  68. package/bundles/material-select.umd.min.js.map +1 -1
  69. package/bundles/material-slide-toggle.umd.js +3 -1
  70. package/bundles/material-slide-toggle.umd.js.map +1 -1
  71. package/bundles/material-slide-toggle.umd.min.js +1 -1
  72. package/bundles/material-slide-toggle.umd.min.js.map +1 -1
  73. package/bundles/material-slider.umd.js +6 -3
  74. package/bundles/material-slider.umd.js.map +1 -1
  75. package/bundles/material-slider.umd.min.js +1 -1
  76. package/bundles/material-slider.umd.min.js.map +1 -1
  77. package/bundles/material-snack-bar.umd.js +7 -8
  78. package/bundles/material-snack-bar.umd.js.map +1 -1
  79. package/bundles/material-snack-bar.umd.min.js +1 -1
  80. package/bundles/material-snack-bar.umd.min.js.map +1 -1
  81. package/bundles/material-sort.umd.js +0 -1
  82. package/bundles/material-sort.umd.js.map +1 -1
  83. package/bundles/material-sort.umd.min.js +1 -1
  84. package/bundles/material-sort.umd.min.js.map +1 -1
  85. package/bundles/material-table.umd.js +14 -4
  86. package/bundles/material-table.umd.js.map +1 -1
  87. package/bundles/material-table.umd.min.js +1 -1
  88. package/bundles/material-table.umd.min.js.map +1 -1
  89. package/bundles/material-tabs.umd.js +1390 -1208
  90. package/bundles/material-tabs.umd.js.map +1 -1
  91. package/bundles/material-tabs.umd.min.js +2 -2
  92. package/bundles/material-tabs.umd.min.js.map +1 -1
  93. package/bundles/material-tooltip.umd.js +16 -1
  94. package/bundles/material-tooltip.umd.js.map +1 -1
  95. package/bundles/material-tooltip.umd.min.js +1 -1
  96. package/bundles/material-tooltip.umd.min.js.map +1 -1
  97. package/bundles/material.umd.js +1767 -1346
  98. package/bundles/material.umd.js.map +1 -1
  99. package/bundles/material.umd.min.js +19 -19
  100. package/bundles/material.umd.min.js.map +1 -1
  101. package/button/typings/button.d.ts +1 -1
  102. package/button/typings/index.metadata.json +1 -1
  103. package/card/typings/index.metadata.json +1 -1
  104. package/chips/typings/chip.d.ts +4 -2
  105. package/chips/typings/index.metadata.json +1 -1
  106. package/core/typings/common-behaviors/common-module.d.ts +2 -2
  107. package/core/typings/datetime/date-adapter.d.ts +1 -1
  108. package/core/typings/datetime/native-date-adapter.d.ts +1 -1
  109. package/core/typings/index.metadata.json +1 -1
  110. package/core/typings/ripple/ripple-renderer.d.ts +2 -2
  111. package/core/typings/ripple/ripple.d.ts +1 -1
  112. package/datepicker/typings/datepicker-intl.d.ts +2 -0
  113. package/datepicker/typings/index.metadata.json +1 -1
  114. package/dialog/typings/dialog-config.d.ts +9 -7
  115. package/dialog/typings/dialog-content-directives.d.ts +2 -0
  116. package/dialog/typings/dialog-ref.d.ts +10 -0
  117. package/dialog/typings/index.metadata.json +1 -1
  118. package/esm2015/autocomplete.js +44 -19
  119. package/esm2015/autocomplete.js.map +1 -1
  120. package/esm2015/button.js +3 -5
  121. package/esm2015/button.js.map +1 -1
  122. package/esm2015/card.js +1 -1
  123. package/esm2015/card.js.map +1 -1
  124. package/esm2015/checkbox.js +1 -1
  125. package/esm2015/checkbox.js.map +1 -1
  126. package/esm2015/chips.js +22 -5
  127. package/esm2015/chips.js.map +1 -1
  128. package/esm2015/core.js +19 -17
  129. package/esm2015/core.js.map +1 -1
  130. package/esm2015/datepicker.js +15 -2
  131. package/esm2015/datepicker.js.map +1 -1
  132. package/esm2015/dialog.js +23 -5
  133. package/esm2015/dialog.js.map +1 -1
  134. package/esm2015/form-field.js +15 -2
  135. package/esm2015/form-field.js.map +1 -1
  136. package/esm2015/grid-list.js +1 -1
  137. package/esm2015/icon.js +93 -40
  138. package/esm2015/icon.js.map +1 -1
  139. package/esm2015/list.js +4 -1
  140. package/esm2015/list.js.map +1 -1
  141. package/esm2015/material.js +3 -3
  142. package/esm2015/menu.js +31 -10
  143. package/esm2015/menu.js.map +1 -1
  144. package/esm2015/paginator.js +1 -1
  145. package/esm2015/paginator.js.map +1 -1
  146. package/esm2015/progress-spinner.js +31 -23
  147. package/esm2015/progress-spinner.js.map +1 -1
  148. package/esm2015/radio.js +3 -0
  149. package/esm2015/radio.js.map +1 -1
  150. package/esm2015/select.js +14 -2
  151. package/esm2015/select.js.map +1 -1
  152. package/esm2015/slide-toggle.js +3 -1
  153. package/esm2015/slide-toggle.js.map +1 -1
  154. package/esm2015/slider.js +6 -2
  155. package/esm2015/slider.js.map +1 -1
  156. package/esm2015/snack-bar.js +7 -8
  157. package/esm2015/snack-bar.js.map +1 -1
  158. package/esm2015/sort.js +0 -1
  159. package/esm2015/sort.js.map +1 -1
  160. package/esm2015/table.js +9 -4
  161. package/esm2015/table.js.map +1 -1
  162. package/esm2015/tabs.js +1094 -890
  163. package/esm2015/tabs.js.map +1 -1
  164. package/esm2015/tooltip.js +15 -1
  165. package/esm2015/tooltip.js.map +1 -1
  166. package/esm5/autocomplete.es5.js +48 -19
  167. package/esm5/autocomplete.es5.js.map +1 -1
  168. package/esm5/button.es5.js +5 -6
  169. package/esm5/button.es5.js.map +1 -1
  170. package/esm5/card.es5.js +1 -1
  171. package/esm5/card.es5.js.map +1 -1
  172. package/esm5/checkbox.es5.js +1 -1
  173. package/esm5/checkbox.es5.js.map +1 -1
  174. package/esm5/chips.es5.js +25 -5
  175. package/esm5/chips.es5.js.map +1 -1
  176. package/esm5/core.es5.js +21 -19
  177. package/esm5/core.es5.js.map +1 -1
  178. package/esm5/datepicker.es5.js +22 -2
  179. package/esm5/datepicker.es5.js.map +1 -1
  180. package/esm5/dialog.es5.js +28 -5
  181. package/esm5/dialog.es5.js.map +1 -1
  182. package/esm5/form-field.es5.js +15 -2
  183. package/esm5/form-field.es5.js.map +1 -1
  184. package/esm5/grid-list.es5.js +1 -1
  185. package/esm5/icon.es5.js +101 -40
  186. package/esm5/icon.es5.js.map +1 -1
  187. package/esm5/list.es5.js +4 -1
  188. package/esm5/list.es5.js.map +1 -1
  189. package/esm5/material.es5.js +3 -3
  190. package/esm5/menu.es5.js +33 -17
  191. package/esm5/menu.es5.js.map +1 -1
  192. package/esm5/paginator.es5.js +1 -1
  193. package/esm5/paginator.es5.js.map +1 -1
  194. package/esm5/progress-spinner.es5.js +34 -23
  195. package/esm5/progress-spinner.es5.js.map +1 -1
  196. package/esm5/radio.es5.js +3 -0
  197. package/esm5/radio.es5.js.map +1 -1
  198. package/esm5/select.es5.js +14 -2
  199. package/esm5/select.es5.js.map +1 -1
  200. package/esm5/slide-toggle.es5.js +3 -1
  201. package/esm5/slide-toggle.es5.js.map +1 -1
  202. package/esm5/slider.es5.js +6 -3
  203. package/esm5/slider.es5.js.map +1 -1
  204. package/esm5/snack-bar.es5.js +7 -8
  205. package/esm5/snack-bar.es5.js.map +1 -1
  206. package/esm5/sort.es5.js +0 -1
  207. package/esm5/sort.es5.js.map +1 -1
  208. package/esm5/table.es5.js +14 -4
  209. package/esm5/table.es5.js.map +1 -1
  210. package/esm5/tabs.es5.js +1384 -1207
  211. package/esm5/tabs.es5.js.map +1 -1
  212. package/esm5/tooltip.es5.js +16 -1
  213. package/esm5/tooltip.es5.js.map +1 -1
  214. package/form-field/typings/form-field.d.ts +2 -0
  215. package/form-field/typings/index.metadata.json +1 -1
  216. package/grid-list/typings/index.d.ts +1 -1
  217. package/grid-list/typings/index.metadata.json +1 -1
  218. package/icon/typings/icon-registry.d.ts +17 -11
  219. package/icon/typings/icon.d.ts +3 -2
  220. package/icon/typings/index.metadata.json +1 -1
  221. package/list/typings/index.metadata.json +1 -1
  222. package/menu/typings/index.d.ts +2 -2
  223. package/menu/typings/index.metadata.json +1 -1
  224. package/menu/typings/menu-trigger.d.ts +2 -5
  225. package/package.json +5 -5
  226. package/prebuilt-themes/deeppurple-amber.css +1 -1
  227. package/prebuilt-themes/indigo-pink.css +1 -1
  228. package/prebuilt-themes/pink-bluegrey.css +1 -1
  229. package/prebuilt-themes/purple-green.css +1 -1
  230. package/progress-spinner/typings/index.metadata.json +1 -1
  231. package/progress-spinner/typings/progress-spinner.d.ts +3 -2
  232. package/radio/typings/index.metadata.json +1 -1
  233. package/schematics/ng-add/setup-project.js +8 -8
  234. package/schematics/ng-add/setup-project.js.map +1 -1
  235. package/schematics/ng-add/theming/theming.js +6 -6
  236. package/schematics/ng-add/theming/theming.js.map +1 -1
  237. package/schematics/ng-update/index.js +2 -2
  238. package/schematics/ng-update/index.js.map +1 -1
  239. package/select/typings/index.metadata.json +1 -1
  240. package/select/typings/select.d.ts +2 -0
  241. package/slide-toggle/typings/index.metadata.json +1 -1
  242. package/slider/typings/index.metadata.json +1 -1
  243. package/slider/typings/slider.d.ts +2 -2
  244. package/snack-bar/typings/index.metadata.json +1 -1
  245. package/sort/typings/index.metadata.json +1 -1
  246. package/table/typings/index.metadata.json +1 -1
  247. package/table/typings/table-data-source.d.ts +5 -0
  248. package/tabs/typings/index.d.ts +2 -2
  249. package/tabs/typings/index.metadata.json +1 -1
  250. package/tabs/typings/paginated-tab-header.d.ts +8 -5
  251. package/tabs/typings/public-api.d.ts +4 -4
  252. package/tabs/typings/tab-body.d.ts +11 -3
  253. package/tabs/typings/tab-group.d.ts +24 -11
  254. package/tabs/typings/tab-header.d.ts +12 -5
  255. package/tabs/typings/tab-nav-bar/tab-nav-bar.d.ts +38 -19
  256. package/tooltip/typings/index.metadata.json +1 -1
  257. package/typings/autocomplete/autocomplete-trigger.d.ts +5 -2
  258. package/typings/autocomplete/index.metadata.json +1 -1
  259. package/typings/button/button.d.ts +1 -1
  260. package/typings/button/index.metadata.json +1 -1
  261. package/typings/card/index.metadata.json +1 -1
  262. package/typings/chips/chip.d.ts +4 -2
  263. package/typings/chips/index.metadata.json +1 -1
  264. package/typings/core/common-behaviors/common-module.d.ts +2 -2
  265. package/typings/core/datetime/date-adapter.d.ts +1 -1
  266. package/typings/core/datetime/native-date-adapter.d.ts +1 -1
  267. package/typings/core/index.metadata.json +1 -1
  268. package/typings/core/ripple/ripple-renderer.d.ts +2 -2
  269. package/typings/core/ripple/ripple.d.ts +1 -1
  270. package/typings/datepicker/datepicker-intl.d.ts +2 -0
  271. package/typings/datepicker/index.metadata.json +1 -1
  272. package/typings/dialog/dialog-config.d.ts +9 -7
  273. package/typings/dialog/dialog-content-directives.d.ts +2 -0
  274. package/typings/dialog/dialog-ref.d.ts +10 -0
  275. package/typings/dialog/index.metadata.json +1 -1
  276. package/typings/esm5/autocomplete/autocomplete-trigger.d.ts +5 -2
  277. package/typings/esm5/autocomplete/index.metadata.json +1 -1
  278. package/typings/esm5/button/button.d.ts +1 -1
  279. package/typings/esm5/button/index.metadata.json +1 -1
  280. package/typings/esm5/card/index.metadata.json +1 -1
  281. package/typings/esm5/chips/chip.d.ts +4 -2
  282. package/typings/esm5/chips/index.metadata.json +1 -1
  283. package/typings/esm5/core/common-behaviors/common-module.d.ts +2 -2
  284. package/typings/esm5/core/datetime/date-adapter.d.ts +1 -1
  285. package/typings/esm5/core/datetime/native-date-adapter.d.ts +1 -1
  286. package/typings/esm5/core/index.metadata.json +1 -1
  287. package/typings/esm5/core/ripple/ripple-renderer.d.ts +2 -2
  288. package/typings/esm5/core/ripple/ripple.d.ts +1 -1
  289. package/typings/esm5/datepicker/datepicker-intl.d.ts +2 -0
  290. package/typings/esm5/datepicker/index.metadata.json +1 -1
  291. package/typings/esm5/dialog/dialog-config.d.ts +9 -7
  292. package/typings/esm5/dialog/dialog-content-directives.d.ts +2 -0
  293. package/typings/esm5/dialog/dialog-ref.d.ts +10 -0
  294. package/typings/esm5/dialog/index.metadata.json +1 -1
  295. package/typings/esm5/form-field/form-field.d.ts +2 -0
  296. package/typings/esm5/form-field/index.metadata.json +1 -1
  297. package/typings/esm5/grid-list/index.d.ts +1 -1
  298. package/typings/esm5/grid-list/index.metadata.json +1 -1
  299. package/typings/esm5/icon/icon-registry.d.ts +17 -11
  300. package/typings/esm5/icon/icon.d.ts +3 -2
  301. package/typings/esm5/icon/index.metadata.json +1 -1
  302. package/typings/esm5/list/index.metadata.json +1 -1
  303. package/typings/esm5/menu/index.d.ts +2 -2
  304. package/typings/esm5/menu/index.metadata.json +1 -1
  305. package/typings/esm5/menu/menu-trigger.d.ts +2 -5
  306. package/typings/esm5/progress-spinner/index.metadata.json +1 -1
  307. package/typings/esm5/progress-spinner/progress-spinner.d.ts +3 -2
  308. package/typings/esm5/radio/index.metadata.json +1 -1
  309. package/typings/esm5/select/index.metadata.json +1 -1
  310. package/typings/esm5/select/select.d.ts +2 -0
  311. package/typings/esm5/slide-toggle/index.metadata.json +1 -1
  312. package/typings/esm5/slider/index.metadata.json +1 -1
  313. package/typings/esm5/slider/slider.d.ts +2 -2
  314. package/typings/esm5/snack-bar/index.metadata.json +1 -1
  315. package/typings/esm5/sort/index.metadata.json +1 -1
  316. package/typings/esm5/table/index.metadata.json +1 -1
  317. package/typings/esm5/table/table-data-source.d.ts +5 -0
  318. package/typings/esm5/tabs/index.d.ts +2 -2
  319. package/typings/esm5/tabs/index.metadata.json +1 -1
  320. package/typings/esm5/tabs/paginated-tab-header.d.ts +8 -5
  321. package/typings/esm5/tabs/public-api.d.ts +4 -4
  322. package/typings/esm5/tabs/tab-body.d.ts +11 -3
  323. package/typings/esm5/tabs/tab-group.d.ts +24 -11
  324. package/typings/esm5/tabs/tab-header.d.ts +12 -5
  325. package/typings/esm5/tabs/tab-nav-bar/tab-nav-bar.d.ts +38 -19
  326. package/typings/esm5/tooltip/index.metadata.json +1 -1
  327. package/typings/form-field/form-field.d.ts +2 -0
  328. package/typings/form-field/index.metadata.json +1 -1
  329. package/typings/grid-list/index.d.ts +1 -1
  330. package/typings/grid-list/index.metadata.json +1 -1
  331. package/typings/icon/icon-registry.d.ts +17 -11
  332. package/typings/icon/icon.d.ts +3 -2
  333. package/typings/icon/index.metadata.json +1 -1
  334. package/typings/list/index.metadata.json +1 -1
  335. package/typings/menu/index.d.ts +2 -2
  336. package/typings/menu/index.metadata.json +1 -1
  337. package/typings/menu/menu-trigger.d.ts +2 -5
  338. package/typings/progress-spinner/index.metadata.json +1 -1
  339. package/typings/progress-spinner/progress-spinner.d.ts +3 -2
  340. package/typings/radio/index.metadata.json +1 -1
  341. package/typings/select/index.metadata.json +1 -1
  342. package/typings/select/select.d.ts +2 -0
  343. package/typings/slide-toggle/index.metadata.json +1 -1
  344. package/typings/slider/index.metadata.json +1 -1
  345. package/typings/slider/slider.d.ts +2 -2
  346. package/typings/snack-bar/index.metadata.json +1 -1
  347. package/typings/sort/index.metadata.json +1 -1
  348. package/typings/table/index.metadata.json +1 -1
  349. package/typings/table/table-data-source.d.ts +5 -0
  350. package/typings/tabs/index.d.ts +2 -2
  351. package/typings/tabs/index.metadata.json +1 -1
  352. package/typings/tabs/paginated-tab-header.d.ts +8 -5
  353. package/typings/tabs/public-api.d.ts +4 -4
  354. package/typings/tabs/tab-body.d.ts +11 -3
  355. package/typings/tabs/tab-group.d.ts +24 -11
  356. package/typings/tabs/tab-header.d.ts +12 -5
  357. package/typings/tabs/tab-nav-bar/tab-nav-bar.d.ts +38 -19
  358. package/typings/tooltip/index.metadata.json +1 -1
package/esm5/icon.es5.js CHANGED
@@ -7,13 +7,13 @@
7
7
  */
8
8
  import { DOCUMENT } from '@angular/common';
9
9
  import { HttpClient } from '@angular/common/http';
10
- import { Inject, Injectable, Optional, SecurityContext, SkipSelf, NgModule, Attribute, ChangeDetectionStrategy, Component, ElementRef, Input, ViewEncapsulation, InjectionToken, inject, ɵɵdefineInjectable, ɵɵinject } from '@angular/core';
10
+ import { ErrorHandler, Inject, Injectable, Optional, SecurityContext, SkipSelf, NgModule, Attribute, ChangeDetectionStrategy, Component, ElementRef, inject, InjectionToken, Input, ViewEncapsulation, ɵɵdefineInjectable, ɵɵinject } from '@angular/core';
11
11
  import { DomSanitizer } from '@angular/platform-browser';
12
12
  import { forkJoin, of, throwError } from 'rxjs';
13
13
  import { catchError, finalize, map, share, tap, take } from 'rxjs/operators';
14
14
  import { __extends } from 'tslib';
15
- import { mixinColor, MatCommonModule } from '@angular/material/core';
16
15
  import { coerceBooleanProperty } from '@angular/cdk/coercion';
16
+ import { mixinColor, MatCommonModule } from '@angular/material/core';
17
17
 
18
18
  /**
19
19
  * @fileoverview added by tsickle
@@ -69,7 +69,8 @@ var /**
69
69
  * \@docs-private
70
70
  */
71
71
  SvgIconConfig = /** @class */ (function () {
72
- function SvgIconConfig(data) {
72
+ function SvgIconConfig(data, options) {
73
+ this.options = options;
73
74
  // Note that we can't use `instanceof SVGElement` here,
74
75
  // because it'll break during server-side rendering.
75
76
  if (!!((/** @type {?} */ (data))).nodeName) {
@@ -89,9 +90,10 @@ SvgIconConfig = /** @class */ (function () {
89
90
  * - Loads icons from URLs and extracts individual icons from icon sets.
90
91
  */
91
92
  var MatIconRegistry = /** @class */ (function () {
92
- function MatIconRegistry(_httpClient, _sanitizer, document) {
93
+ function MatIconRegistry(_httpClient, _sanitizer, document, _errorHandler) {
93
94
  this._httpClient = _httpClient;
94
95
  this._sanitizer = _sanitizer;
96
+ this._errorHandler = _errorHandler;
95
97
  /**
96
98
  * URLs and cached SVG elements for individual icons. Keys are of the format "[namespace]:[icon]".
97
99
  */
@@ -132,6 +134,7 @@ var MatIconRegistry = /** @class */ (function () {
132
134
  * @this {THIS}
133
135
  * @param {?} iconName Name under which the icon should be registered.
134
136
  * @param {?} url
137
+ * @param {?=} options
135
138
  * @return {THIS}
136
139
  */
137
140
  MatIconRegistry.prototype.addSvgIcon = /**
@@ -140,10 +143,11 @@ var MatIconRegistry = /** @class */ (function () {
140
143
  * @this {THIS}
141
144
  * @param {?} iconName Name under which the icon should be registered.
142
145
  * @param {?} url
146
+ * @param {?=} options
143
147
  * @return {THIS}
144
148
  */
145
- function (iconName, url) {
146
- return (/** @type {?} */ (this)).addSvgIconInNamespace('', iconName, url);
149
+ function (iconName, url, options) {
150
+ return (/** @type {?} */ (this)).addSvgIconInNamespace('', iconName, url, options);
147
151
  };
148
152
  /**
149
153
  * Registers an icon using an HTML string in the default namespace.
@@ -156,6 +160,7 @@ var MatIconRegistry = /** @class */ (function () {
156
160
  * @this {THIS}
157
161
  * @param {?} iconName Name under which the icon should be registered.
158
162
  * @param {?} literal SVG source of the icon.
163
+ * @param {?=} options
159
164
  * @return {THIS}
160
165
  */
161
166
  MatIconRegistry.prototype.addSvgIconLiteral = /**
@@ -164,10 +169,11 @@ var MatIconRegistry = /** @class */ (function () {
164
169
  * @this {THIS}
165
170
  * @param {?} iconName Name under which the icon should be registered.
166
171
  * @param {?} literal SVG source of the icon.
172
+ * @param {?=} options
167
173
  * @return {THIS}
168
174
  */
169
- function (iconName, literal) {
170
- return (/** @type {?} */ (this)).addSvgIconLiteralInNamespace('', iconName, literal);
175
+ function (iconName, literal, options) {
176
+ return (/** @type {?} */ (this)).addSvgIconLiteralInNamespace('', iconName, literal, options);
171
177
  };
172
178
  /**
173
179
  * Registers an icon by URL in the specified namespace.
@@ -182,6 +188,7 @@ var MatIconRegistry = /** @class */ (function () {
182
188
  * @param {?} namespace Namespace in which the icon should be registered.
183
189
  * @param {?} iconName Name under which the icon should be registered.
184
190
  * @param {?} url
191
+ * @param {?=} options
185
192
  * @return {THIS}
186
193
  */
187
194
  MatIconRegistry.prototype.addSvgIconInNamespace = /**
@@ -191,10 +198,11 @@ var MatIconRegistry = /** @class */ (function () {
191
198
  * @param {?} namespace Namespace in which the icon should be registered.
192
199
  * @param {?} iconName Name under which the icon should be registered.
193
200
  * @param {?} url
201
+ * @param {?=} options
194
202
  * @return {THIS}
195
203
  */
196
- function (namespace, iconName, url) {
197
- return (/** @type {?} */ (this))._addSvgIconConfig(namespace, iconName, new SvgIconConfig(url));
204
+ function (namespace, iconName, url, options) {
205
+ return (/** @type {?} */ (this))._addSvgIconConfig(namespace, iconName, new SvgIconConfig(url, options));
198
206
  };
199
207
  /**
200
208
  * Registers an icon using an HTML string in the specified namespace.
@@ -209,6 +217,7 @@ var MatIconRegistry = /** @class */ (function () {
209
217
  * @param {?} namespace Namespace in which the icon should be registered.
210
218
  * @param {?} iconName Name under which the icon should be registered.
211
219
  * @param {?} literal SVG source of the icon.
220
+ * @param {?=} options
212
221
  * @return {THIS}
213
222
  */
214
223
  MatIconRegistry.prototype.addSvgIconLiteralInNamespace = /**
@@ -218,17 +227,18 @@ var MatIconRegistry = /** @class */ (function () {
218
227
  * @param {?} namespace Namespace in which the icon should be registered.
219
228
  * @param {?} iconName Name under which the icon should be registered.
220
229
  * @param {?} literal SVG source of the icon.
230
+ * @param {?=} options
221
231
  * @return {THIS}
222
232
  */
223
- function (namespace, iconName, literal) {
233
+ function (namespace, iconName, literal, options) {
224
234
  /** @type {?} */
225
235
  var sanitizedLiteral = (/** @type {?} */ (this))._sanitizer.sanitize(SecurityContext.HTML, literal);
226
236
  if (!sanitizedLiteral) {
227
237
  throw getMatIconFailedToSanitizeLiteralError(literal);
228
238
  }
229
239
  /** @type {?} */
230
- var svgElement = (/** @type {?} */ (this))._createSvgElementForSingleIcon(sanitizedLiteral);
231
- return (/** @type {?} */ (this))._addSvgIconConfig(namespace, iconName, new SvgIconConfig(svgElement));
240
+ var svgElement = (/** @type {?} */ (this))._createSvgElementForSingleIcon(sanitizedLiteral, options);
241
+ return (/** @type {?} */ (this))._addSvgIconConfig(namespace, iconName, new SvgIconConfig(svgElement, options));
232
242
  };
233
243
  /**
234
244
  * Registers an icon set by URL in the default namespace.
@@ -239,6 +249,7 @@ var MatIconRegistry = /** @class */ (function () {
239
249
  * @template THIS
240
250
  * @this {THIS}
241
251
  * @param {?} url
252
+ * @param {?=} options
242
253
  * @return {THIS}
243
254
  */
244
255
  MatIconRegistry.prototype.addSvgIconSet = /**
@@ -246,10 +257,11 @@ var MatIconRegistry = /** @class */ (function () {
246
257
  * @template THIS
247
258
  * @this {THIS}
248
259
  * @param {?} url
260
+ * @param {?=} options
249
261
  * @return {THIS}
250
262
  */
251
- function (url) {
252
- return (/** @type {?} */ (this)).addSvgIconSetInNamespace('', url);
263
+ function (url, options) {
264
+ return (/** @type {?} */ (this)).addSvgIconSetInNamespace('', url, options);
253
265
  };
254
266
  /**
255
267
  * Registers an icon set using an HTML string in the default namespace.
@@ -260,6 +272,7 @@ var MatIconRegistry = /** @class */ (function () {
260
272
  * @template THIS
261
273
  * @this {THIS}
262
274
  * @param {?} literal SVG source of the icon set.
275
+ * @param {?=} options
263
276
  * @return {THIS}
264
277
  */
265
278
  MatIconRegistry.prototype.addSvgIconSetLiteral = /**
@@ -267,10 +280,11 @@ var MatIconRegistry = /** @class */ (function () {
267
280
  * @template THIS
268
281
  * @this {THIS}
269
282
  * @param {?} literal SVG source of the icon set.
283
+ * @param {?=} options
270
284
  * @return {THIS}
271
285
  */
272
- function (literal) {
273
- return (/** @type {?} */ (this)).addSvgIconSetLiteralInNamespace('', literal);
286
+ function (literal, options) {
287
+ return (/** @type {?} */ (this)).addSvgIconSetLiteralInNamespace('', literal, options);
274
288
  };
275
289
  /**
276
290
  * Registers an icon set by URL in the specified namespace.
@@ -283,6 +297,7 @@ var MatIconRegistry = /** @class */ (function () {
283
297
  * @this {THIS}
284
298
  * @param {?} namespace Namespace in which to register the icon set.
285
299
  * @param {?} url
300
+ * @param {?=} options
286
301
  * @return {THIS}
287
302
  */
288
303
  MatIconRegistry.prototype.addSvgIconSetInNamespace = /**
@@ -291,10 +306,11 @@ var MatIconRegistry = /** @class */ (function () {
291
306
  * @this {THIS}
292
307
  * @param {?} namespace Namespace in which to register the icon set.
293
308
  * @param {?} url
309
+ * @param {?=} options
294
310
  * @return {THIS}
295
311
  */
296
- function (namespace, url) {
297
- return (/** @type {?} */ (this))._addSvgIconSetConfig(namespace, new SvgIconConfig(url));
312
+ function (namespace, url, options) {
313
+ return (/** @type {?} */ (this))._addSvgIconSetConfig(namespace, new SvgIconConfig(url, options));
298
314
  };
299
315
  /**
300
316
  * Registers an icon set using an HTML string in the specified namespace.
@@ -307,6 +323,7 @@ var MatIconRegistry = /** @class */ (function () {
307
323
  * @this {THIS}
308
324
  * @param {?} namespace Namespace in which to register the icon set.
309
325
  * @param {?} literal SVG source of the icon set.
326
+ * @param {?=} options
310
327
  * @return {THIS}
311
328
  */
312
329
  MatIconRegistry.prototype.addSvgIconSetLiteralInNamespace = /**
@@ -315,9 +332,10 @@ var MatIconRegistry = /** @class */ (function () {
315
332
  * @this {THIS}
316
333
  * @param {?} namespace Namespace in which to register the icon set.
317
334
  * @param {?} literal SVG source of the icon set.
335
+ * @param {?=} options
318
336
  * @return {THIS}
319
337
  */
320
- function (namespace, literal) {
338
+ function (namespace, literal, options) {
321
339
  /** @type {?} */
322
340
  var sanitizedLiteral = (/** @type {?} */ (this))._sanitizer.sanitize(SecurityContext.HTML, literal);
323
341
  if (!sanitizedLiteral) {
@@ -325,7 +343,7 @@ var MatIconRegistry = /** @class */ (function () {
325
343
  }
326
344
  /** @type {?} */
327
345
  var svgElement = (/** @type {?} */ (this))._svgElementFromString(sanitizedLiteral);
328
- return (/** @type {?} */ (this))._addSvgIconSetConfig(namespace, new SvgIconConfig(svgElement));
346
+ return (/** @type {?} */ (this))._addSvgIconSetConfig(namespace, new SvgIconConfig(svgElement, options));
329
347
  };
330
348
  /**
331
349
  * Defines an alias for a CSS class name to be used for icon fonts. Creating an matIcon
@@ -629,7 +647,15 @@ var MatIconRegistry = /** @class */ (function () {
629
647
  var url = _this._sanitizer.sanitize(SecurityContext.RESOURCE_URL, iconSetConfig.url);
630
648
  // Swallow errors fetching individual URLs so the
631
649
  // combined Observable won't necessarily fail.
632
- console.error("Loading icon set URL: " + url + " failed: " + err.message);
650
+ /** @type {?} */
651
+ var errorMessage = "Loading icon set URL: " + url + " failed: " + err.message;
652
+ // @breaking-change 9.0.0 _errorHandler parameter to be made required
653
+ if (_this._errorHandler) {
654
+ _this._errorHandler.handleError(new Error(errorMessage));
655
+ }
656
+ else {
657
+ console.error(errorMessage);
658
+ }
633
659
  return of(null);
634
660
  })));
635
661
  }));
@@ -677,7 +703,7 @@ var MatIconRegistry = /** @class */ (function () {
677
703
  var config = iconSetConfigs[i];
678
704
  if (config.svgElement) {
679
705
  /** @type {?} */
680
- var foundIcon = this._extractSvgIconFromSet(config.svgElement, iconName);
706
+ var foundIcon = this._extractSvgIconFromSet(config.svgElement, iconName, config.options);
681
707
  if (foundIcon) {
682
708
  return foundIcon;
683
709
  }
@@ -710,7 +736,7 @@ var MatIconRegistry = /** @class */ (function () {
710
736
  * @param {?} svgText
711
737
  * @return {?}
712
738
  */
713
- function (svgText) { return _this._createSvgElementForSingleIcon(svgText); })));
739
+ function (svgText) { return _this._createSvgElementForSingleIcon(svgText, config.options); })));
714
740
  };
715
741
  /**
716
742
  * Loads the content of the icon set URL specified in the SvgIconConfig and creates an SVG element
@@ -756,18 +782,20 @@ var MatIconRegistry = /** @class */ (function () {
756
782
  * Creates a DOM element from the given SVG string, and adds default attributes.
757
783
  * @private
758
784
  * @param {?} responseText
785
+ * @param {?=} options
759
786
  * @return {?}
760
787
  */
761
788
  MatIconRegistry.prototype._createSvgElementForSingleIcon = /**
762
789
  * Creates a DOM element from the given SVG string, and adds default attributes.
763
790
  * @private
764
791
  * @param {?} responseText
792
+ * @param {?=} options
765
793
  * @return {?}
766
794
  */
767
- function (responseText) {
795
+ function (responseText, options) {
768
796
  /** @type {?} */
769
797
  var svg = this._svgElementFromString(responseText);
770
- this._setSvgAttributes(svg);
798
+ this._setSvgAttributes(svg, options);
771
799
  return svg;
772
800
  };
773
801
  /**
@@ -782,6 +810,7 @@ var MatIconRegistry = /** @class */ (function () {
782
810
  * @private
783
811
  * @param {?} iconSet
784
812
  * @param {?} iconName
813
+ * @param {?=} options
785
814
  * @return {?}
786
815
  */
787
816
  MatIconRegistry.prototype._extractSvgIconFromSet = /**
@@ -791,9 +820,10 @@ var MatIconRegistry = /** @class */ (function () {
791
820
  * @private
792
821
  * @param {?} iconSet
793
822
  * @param {?} iconName
823
+ * @param {?=} options
794
824
  * @return {?}
795
825
  */
796
- function (iconSet, iconName) {
826
+ function (iconSet, iconName, options) {
797
827
  // Use the `id="iconName"` syntax in order to escape special
798
828
  // characters in the ID (versus using the #iconName syntax).
799
829
  /** @type {?} */
@@ -809,13 +839,13 @@ var MatIconRegistry = /** @class */ (function () {
809
839
  // If the icon node is itself an <svg> node, clone and return it directly. If not, set it as
810
840
  // the content of a new <svg> node.
811
841
  if (iconElement.nodeName.toLowerCase() === 'svg') {
812
- return this._setSvgAttributes((/** @type {?} */ (iconElement)));
842
+ return this._setSvgAttributes((/** @type {?} */ (iconElement)), options);
813
843
  }
814
844
  // If the node is a <symbol>, it won't be rendered so we have to convert it into <svg>. Note
815
845
  // that the same could be achieved by referring to it via <use href="#id">, however the <use>
816
846
  // tag is problematic on Firefox, because it needs to include the current page path.
817
847
  if (iconElement.nodeName.toLowerCase() === 'symbol') {
818
- return this._setSvgAttributes(this._toSvgElement(iconElement));
848
+ return this._setSvgAttributes(this._toSvgElement(iconElement), options);
819
849
  }
820
850
  // createElement('SVG') doesn't work as expected; the DOM ends up with
821
851
  // the correct nodes, but the SVG content doesn't render. Instead we
@@ -826,7 +856,7 @@ var MatIconRegistry = /** @class */ (function () {
826
856
  var svg = this._svgElementFromString('<svg></svg>');
827
857
  // Clone the node so we don't remove it from the parent icon set element.
828
858
  svg.appendChild(iconElement);
829
- return this._setSvgAttributes(svg);
859
+ return this._setSvgAttributes(svg, options);
830
860
  };
831
861
  /**
832
862
  * Creates a DOM element from the given SVG string.
@@ -872,6 +902,15 @@ var MatIconRegistry = /** @class */ (function () {
872
902
  function (element) {
873
903
  /** @type {?} */
874
904
  var svg = this._svgElementFromString('<svg></svg>');
905
+ /** @type {?} */
906
+ var attributes = element.attributes;
907
+ // Copy over all the attributes from the `symbol` to the new SVG, except the id.
908
+ for (var i = 0; i < attributes.length; i++) {
909
+ var _a = attributes[i], name_1 = _a.name, value = _a.value;
910
+ if (name_1 !== 'id') {
911
+ svg.setAttribute(name_1, value);
912
+ }
913
+ }
875
914
  for (var i = 0; i < element.childNodes.length; i++) {
876
915
  if (element.childNodes[i].nodeType === this._document.ELEMENT_NODE) {
877
916
  svg.appendChild(element.childNodes[i].cloneNode(true));
@@ -886,20 +925,25 @@ var MatIconRegistry = /** @class */ (function () {
886
925
  * Sets the default attributes for an SVG element to be used as an icon.
887
926
  * @private
888
927
  * @param {?} svg
928
+ * @param {?=} options
889
929
  * @return {?}
890
930
  */
891
931
  MatIconRegistry.prototype._setSvgAttributes = /**
892
932
  * Sets the default attributes for an SVG element to be used as an icon.
893
933
  * @private
894
934
  * @param {?} svg
935
+ * @param {?=} options
895
936
  * @return {?}
896
937
  */
897
- function (svg) {
938
+ function (svg, options) {
898
939
  svg.setAttribute('fit', '');
899
940
  svg.setAttribute('height', '100%');
900
941
  svg.setAttribute('width', '100%');
901
942
  svg.setAttribute('preserveAspectRatio', 'xMidYMid meet');
902
943
  svg.setAttribute('focusable', 'false'); // Disable IE11 default behavior to make SVGs focusable.
944
+ if (options && options.viewBox) {
945
+ svg.setAttribute('viewBox', options.viewBox);
946
+ }
903
947
  return svg;
904
948
  };
905
949
  /**
@@ -1022,9 +1066,10 @@ var MatIconRegistry = /** @class */ (function () {
1022
1066
  MatIconRegistry.ctorParameters = function () { return [
1023
1067
  { type: HttpClient, decorators: [{ type: Optional }] },
1024
1068
  { type: DomSanitizer },
1025
- { type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [DOCUMENT,] }] }
1069
+ { type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [DOCUMENT,] }] },
1070
+ { type: ErrorHandler, decorators: [{ type: Optional }] }
1026
1071
  ]; };
1027
- /** @nocollapse */ MatIconRegistry.ngInjectableDef = ɵɵdefineInjectable({ factory: function MatIconRegistry_Factory() { return new MatIconRegistry(ɵɵinject(HttpClient, 8), ɵɵinject(DomSanitizer), ɵɵinject(DOCUMENT, 8)); }, token: MatIconRegistry, providedIn: "root" });
1072
+ /** @nocollapse */ MatIconRegistry.ngInjectableDef = ɵɵdefineInjectable({ factory: function MatIconRegistry_Factory() { return new MatIconRegistry(ɵɵinject(HttpClient, 8), ɵɵinject(DomSanitizer), ɵɵinject(DOCUMENT, 8), ɵɵinject(ErrorHandler, 8)); }, token: MatIconRegistry, providedIn: "root" });
1028
1073
  return MatIconRegistry;
1029
1074
  }());
1030
1075
  /**
@@ -1033,10 +1078,11 @@ var MatIconRegistry = /** @class */ (function () {
1033
1078
  * @param {?} httpClient
1034
1079
  * @param {?} sanitizer
1035
1080
  * @param {?=} document
1081
+ * @param {?=} errorHandler
1036
1082
  * @return {?}
1037
1083
  */
1038
- function ICON_REGISTRY_PROVIDER_FACTORY(parentRegistry, httpClient, sanitizer, document) {
1039
- return parentRegistry || new MatIconRegistry(httpClient, sanitizer, document);
1084
+ function ICON_REGISTRY_PROVIDER_FACTORY(parentRegistry, httpClient, sanitizer, document, errorHandler) {
1085
+ return parentRegistry || new MatIconRegistry(httpClient, sanitizer, document, errorHandler);
1040
1086
  }
1041
1087
  /**
1042
1088
  * \@docs-private
@@ -1049,6 +1095,7 @@ var ICON_REGISTRY_PROVIDER = {
1049
1095
  [new Optional(), new SkipSelf(), MatIconRegistry],
1050
1096
  [new Optional(), HttpClient],
1051
1097
  DomSanitizer,
1098
+ [new Optional(), ErrorHandler],
1052
1099
  [new Optional(), (/** @type {?} */ (DOCUMENT))],
1053
1100
  ],
1054
1101
  useFactory: ICON_REGISTRY_PROVIDER_FACTORY,
@@ -1182,10 +1229,11 @@ var funcIriPattern = /^url\(['"]?#(.*?)['"]?\)$/;
1182
1229
  */
1183
1230
  var MatIcon = /** @class */ (function (_super) {
1184
1231
  __extends(MatIcon, _super);
1185
- function MatIcon(elementRef, _iconRegistry, ariaHidden, _location) {
1232
+ function MatIcon(elementRef, _iconRegistry, ariaHidden, _location, _errorHandler) {
1186
1233
  var _this = _super.call(this, elementRef) || this;
1187
1234
  _this._iconRegistry = _iconRegistry;
1188
1235
  _this._location = _location;
1236
+ _this._errorHandler = _errorHandler;
1189
1237
  _this._inline = false;
1190
1238
  // If the user has not explicitly set aria-hidden, mark the icon as hidden, as this is
1191
1239
  // the right thing to do for the majority of icon use-cases.
@@ -1323,8 +1371,10 @@ var MatIcon = /** @class */ (function (_super) {
1323
1371
  var svgIconChanges = changes['svgIcon'];
1324
1372
  if (svgIconChanges) {
1325
1373
  if (this.svgIcon) {
1326
- var _a = this._splitIconName(this.svgIcon), namespace = _a[0], iconName = _a[1];
1327
- this._iconRegistry.getNamedSvgIcon(iconName, namespace).pipe(take(1)).subscribe((/**
1374
+ var _a = this._splitIconName(this.svgIcon), namespace_1 = _a[0], iconName_1 = _a[1];
1375
+ this._iconRegistry.getNamedSvgIcon(iconName_1, namespace_1)
1376
+ .pipe(take(1))
1377
+ .subscribe((/**
1328
1378
  * @param {?} svg
1329
1379
  * @return {?}
1330
1380
  */
@@ -1332,7 +1382,17 @@ var MatIcon = /** @class */ (function (_super) {
1332
1382
  * @param {?} err
1333
1383
  * @return {?}
1334
1384
  */
1335
- function (err) { return console.log("Error retrieving icon: " + err.message); }));
1385
+ function (err) {
1386
+ /** @type {?} */
1387
+ var errorMessage = "Error retrieving icon " + namespace_1 + ":" + iconName_1 + "! " + err.message;
1388
+ // @breaking-change 9.0.0 _errorHandler parameter to be made required.
1389
+ if (_this._errorHandler) {
1390
+ _this._errorHandler.handleError(new Error(errorMessage));
1391
+ }
1392
+ else {
1393
+ console.error(errorMessage);
1394
+ }
1395
+ }));
1336
1396
  }
1337
1397
  else if (svgIconChanges.previousValue) {
1338
1398
  this._clearSvgElement();
@@ -1634,7 +1694,8 @@ var MatIcon = /** @class */ (function (_super) {
1634
1694
  { type: ElementRef },
1635
1695
  { type: MatIconRegistry },
1636
1696
  { type: String, decorators: [{ type: Attribute, args: ['aria-hidden',] }] },
1637
- { type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [MAT_ICON_LOCATION,] }] }
1697
+ { type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [MAT_ICON_LOCATION,] }] },
1698
+ { type: ErrorHandler, decorators: [{ type: Optional }] }
1638
1699
  ]; };
1639
1700
  MatIcon.propDecorators = {
1640
1701
  inline: [{ type: Input }],