@angular/material 6.4.2 → 6.4.7

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 (518) hide show
  1. package/_theming.scss +9 -5
  2. package/autocomplete/typings/autocomplete-trigger.d.ts +12 -1
  3. package/autocomplete/typings/autocomplete.d.ts +1 -1
  4. package/autocomplete/typings/index.d.ts +1 -1
  5. package/autocomplete/typings/index.metadata.json +1 -1
  6. package/badge/typings/badge.d.ts +6 -2
  7. package/badge/typings/index.metadata.json +1 -1
  8. package/bottom-sheet/typings/bottom-sheet-container.d.ts +1 -1
  9. package/bottom-sheet/typings/index.metadata.json +1 -1
  10. package/bundles/material-autocomplete.umd.js +33 -2
  11. package/bundles/material-autocomplete.umd.js.map +1 -1
  12. package/bundles/material-autocomplete.umd.min.js +1 -1
  13. package/bundles/material-autocomplete.umd.min.js.map +1 -1
  14. package/bundles/material-badge.umd.js +6 -2
  15. package/bundles/material-badge.umd.js.map +1 -1
  16. package/bundles/material-badge.umd.min.js +1 -1
  17. package/bundles/material-badge.umd.min.js.map +1 -1
  18. package/bundles/material-bottom-sheet.umd.js.map +1 -1
  19. package/bundles/material-bottom-sheet.umd.min.js.map +1 -1
  20. package/bundles/material-button-toggle.umd.js +12 -3
  21. package/bundles/material-button-toggle.umd.js.map +1 -1
  22. package/bundles/material-button-toggle.umd.min.js +1 -1
  23. package/bundles/material-button-toggle.umd.min.js.map +1 -1
  24. package/bundles/material-button.umd.js +2 -2
  25. package/bundles/material-button.umd.js.map +1 -1
  26. package/bundles/material-button.umd.min.js +1 -1
  27. package/bundles/material-button.umd.min.js.map +1 -1
  28. package/bundles/material-card.umd.js +1 -1
  29. package/bundles/material-card.umd.js.map +1 -1
  30. package/bundles/material-card.umd.min.js +1 -1
  31. package/bundles/material-card.umd.min.js.map +1 -1
  32. package/bundles/material-checkbox.umd.js +7 -1
  33. package/bundles/material-checkbox.umd.js.map +1 -1
  34. package/bundles/material-checkbox.umd.min.js +1 -1
  35. package/bundles/material-checkbox.umd.min.js.map +1 -1
  36. package/bundles/material-chips.umd.js +113 -94
  37. package/bundles/material-chips.umd.js.map +1 -1
  38. package/bundles/material-chips.umd.min.js +1 -1
  39. package/bundles/material-chips.umd.min.js.map +1 -1
  40. package/bundles/material-core.umd.js +13 -16
  41. package/bundles/material-core.umd.js.map +1 -1
  42. package/bundles/material-core.umd.min.js +2 -2
  43. package/bundles/material-core.umd.min.js.map +1 -1
  44. package/bundles/material-datepicker.umd.js +35 -38
  45. package/bundles/material-datepicker.umd.js.map +1 -1
  46. package/bundles/material-datepicker.umd.min.js +2 -2
  47. package/bundles/material-datepicker.umd.min.js.map +1 -1
  48. package/bundles/material-dialog.umd.js.map +1 -1
  49. package/bundles/material-dialog.umd.min.js.map +1 -1
  50. package/bundles/material-expansion.umd.js +200 -74
  51. package/bundles/material-expansion.umd.js.map +1 -1
  52. package/bundles/material-expansion.umd.min.js +1 -1
  53. package/bundles/material-expansion.umd.min.js.map +1 -1
  54. package/bundles/material-form-field.umd.js +62 -51
  55. package/bundles/material-form-field.umd.js.map +1 -1
  56. package/bundles/material-form-field.umd.min.js +1 -1
  57. package/bundles/material-form-field.umd.min.js.map +1 -1
  58. package/bundles/material-grid-list.umd.js +10 -34
  59. package/bundles/material-grid-list.umd.js.map +1 -1
  60. package/bundles/material-grid-list.umd.min.js +1 -1
  61. package/bundles/material-grid-list.umd.min.js.map +1 -1
  62. package/bundles/material-icon.umd.js.map +1 -1
  63. package/bundles/material-icon.umd.min.js.map +1 -1
  64. package/bundles/material-input.umd.js +13 -6
  65. package/bundles/material-input.umd.js.map +1 -1
  66. package/bundles/material-input.umd.min.js +1 -1
  67. package/bundles/material-input.umd.min.js.map +1 -1
  68. package/bundles/material-list.umd.js +12 -14
  69. package/bundles/material-list.umd.js.map +1 -1
  70. package/bundles/material-list.umd.min.js +5 -5
  71. package/bundles/material-list.umd.min.js.map +1 -1
  72. package/bundles/material-menu.umd.js +25 -16
  73. package/bundles/material-menu.umd.js.map +1 -1
  74. package/bundles/material-menu.umd.min.js +1 -1
  75. package/bundles/material-menu.umd.min.js.map +1 -1
  76. package/bundles/material-paginator.umd.js +1 -1
  77. package/bundles/material-paginator.umd.js.map +1 -1
  78. package/bundles/material-paginator.umd.min.js +1 -1
  79. package/bundles/material-paginator.umd.min.js.map +1 -1
  80. package/bundles/material-progress-bar.umd.js +29 -11
  81. package/bundles/material-progress-bar.umd.js.map +1 -1
  82. package/bundles/material-progress-bar.umd.min.js +1 -1
  83. package/bundles/material-progress-bar.umd.min.js.map +1 -1
  84. package/bundles/material-radio.umd.js.map +1 -1
  85. package/bundles/material-radio.umd.min.js.map +1 -1
  86. package/bundles/material-select.umd.js +8 -3
  87. package/bundles/material-select.umd.js.map +1 -1
  88. package/bundles/material-select.umd.min.js +1 -1
  89. package/bundles/material-select.umd.min.js.map +1 -1
  90. package/bundles/material-sidenav.umd.js +5 -1
  91. package/bundles/material-sidenav.umd.js.map +1 -1
  92. package/bundles/material-sidenav.umd.min.js +1 -1
  93. package/bundles/material-sidenav.umd.min.js.map +1 -1
  94. package/bundles/material-slide-toggle.umd.js +8 -2
  95. package/bundles/material-slide-toggle.umd.js.map +1 -1
  96. package/bundles/material-slide-toggle.umd.min.js +1 -1
  97. package/bundles/material-slide-toggle.umd.min.js.map +1 -1
  98. package/bundles/material-slider.umd.js +1 -1
  99. package/bundles/material-slider.umd.js.map +1 -1
  100. package/bundles/material-slider.umd.min.js +1 -1
  101. package/bundles/material-slider.umd.min.js.map +1 -1
  102. package/bundles/material-snack-bar.umd.js +1 -1
  103. package/bundles/material-snack-bar.umd.js.map +1 -1
  104. package/bundles/material-snack-bar.umd.min.js +1 -1
  105. package/bundles/material-snack-bar.umd.min.js.map +1 -1
  106. package/bundles/material-stepper.umd.js +30 -18
  107. package/bundles/material-stepper.umd.js.map +1 -1
  108. package/bundles/material-stepper.umd.min.js +1 -1
  109. package/bundles/material-stepper.umd.min.js.map +1 -1
  110. package/bundles/material-table.umd.js +31 -31
  111. package/bundles/material-table.umd.js.map +1 -1
  112. package/bundles/material-table.umd.min.js +1 -1
  113. package/bundles/material-table.umd.min.js.map +1 -1
  114. package/bundles/material-tabs.umd.js +38 -45
  115. package/bundles/material-tabs.umd.js.map +1 -1
  116. package/bundles/material-tabs.umd.min.js +2 -2
  117. package/bundles/material-tabs.umd.min.js.map +1 -1
  118. package/bundles/material-tooltip.umd.js +11 -11
  119. package/bundles/material-tooltip.umd.js.map +1 -1
  120. package/bundles/material-tooltip.umd.min.js +1 -1
  121. package/bundles/material-tooltip.umd.min.js.map +1 -1
  122. package/bundles/material-tree.umd.js +16 -4
  123. package/bundles/material-tree.umd.js.map +1 -1
  124. package/bundles/material-tree.umd.min.js +1 -1
  125. package/bundles/material-tree.umd.min.js.map +1 -1
  126. package/bundles/material.umd.js +692 -452
  127. package/bundles/material.umd.js.map +1 -1
  128. package/bundles/material.umd.min.js +21 -21
  129. package/bundles/material.umd.min.js.map +1 -1
  130. package/button/typings/index.metadata.json +1 -1
  131. package/button-toggle/typings/button-toggle.d.ts +4 -2
  132. package/button-toggle/typings/index.metadata.json +1 -1
  133. package/card/typings/index.metadata.json +1 -1
  134. package/checkbox/typings/checkbox.d.ts +2 -2
  135. package/checkbox/typings/index.metadata.json +1 -1
  136. package/chips/typings/chip-input.d.ts +9 -9
  137. package/chips/typings/chip-list.d.ts +12 -19
  138. package/chips/typings/chip.d.ts +3 -2
  139. package/chips/typings/index.metadata.json +1 -1
  140. package/core/typings/index.metadata.json +1 -1
  141. package/core/typings/line/line.d.ts +1 -1
  142. package/core/typings/option/option.d.ts +3 -4
  143. package/core/typings/ripple/ripple-renderer.d.ts +1 -1
  144. package/core/typings/ripple/ripple.d.ts +1 -1
  145. package/datepicker/typings/calendar-body.d.ts +1 -1
  146. package/datepicker/typings/datepicker-input.d.ts +3 -5
  147. package/datepicker/typings/datepicker-toggle.d.ts +3 -1
  148. package/datepicker/typings/datepicker.d.ts +1 -1
  149. package/datepicker/typings/index.metadata.json +1 -1
  150. package/dialog/typings/dialog-container.d.ts +1 -1
  151. package/dialog/typings/dialog-content-directives.d.ts +2 -2
  152. package/dialog/typings/index.metadata.json +1 -1
  153. package/esm2015/autocomplete.js +30 -2
  154. package/esm2015/autocomplete.js.map +1 -1
  155. package/esm2015/badge.js +8 -3
  156. package/esm2015/badge.js.map +1 -1
  157. package/esm2015/bottom-sheet.js.map +1 -1
  158. package/esm2015/button-toggle.js +14 -4
  159. package/esm2015/button-toggle.js.map +1 -1
  160. package/esm2015/button.js +2 -2
  161. package/esm2015/button.js.map +1 -1
  162. package/esm2015/card.js +1 -1
  163. package/esm2015/card.js.map +1 -1
  164. package/esm2015/checkbox.js +6 -1
  165. package/esm2015/checkbox.js.map +1 -1
  166. package/esm2015/chips.js +99 -76
  167. package/esm2015/chips.js.map +1 -1
  168. package/esm2015/core.js +10 -7
  169. package/esm2015/core.js.map +1 -1
  170. package/esm2015/datepicker.js +35 -30
  171. package/esm2015/datepicker.js.map +1 -1
  172. package/esm2015/dialog.js.map +1 -1
  173. package/esm2015/expansion.js +158 -66
  174. package/esm2015/expansion.js.map +1 -1
  175. package/esm2015/form-field.js +60 -49
  176. package/esm2015/form-field.js.map +1 -1
  177. package/esm2015/grid-list.js +7 -30
  178. package/esm2015/grid-list.js.map +1 -1
  179. package/esm2015/icon.js.map +1 -1
  180. package/esm2015/input.js +13 -7
  181. package/esm2015/input.js.map +1 -1
  182. package/esm2015/list.js +11 -13
  183. package/esm2015/list.js.map +1 -1
  184. package/esm2015/material.js +10 -10
  185. package/esm2015/material.js.map +1 -1
  186. package/esm2015/menu.js +18 -10
  187. package/esm2015/menu.js.map +1 -1
  188. package/esm2015/paginator.js +1 -1
  189. package/esm2015/paginator.js.map +1 -1
  190. package/esm2015/progress-bar.js +26 -7
  191. package/esm2015/progress-bar.js.map +1 -1
  192. package/esm2015/radio.js.map +1 -1
  193. package/esm2015/select.js +8 -3
  194. package/esm2015/select.js.map +1 -1
  195. package/esm2015/sidenav.js +5 -1
  196. package/esm2015/sidenav.js.map +1 -1
  197. package/esm2015/slide-toggle.js +7 -2
  198. package/esm2015/slide-toggle.js.map +1 -1
  199. package/esm2015/slider.js +1 -1
  200. package/esm2015/slider.js.map +1 -1
  201. package/esm2015/snack-bar.js +1 -1
  202. package/esm2015/snack-bar.js.map +1 -1
  203. package/esm2015/stepper.js +25 -21
  204. package/esm2015/stepper.js.map +1 -1
  205. package/esm2015/table.js +22 -32
  206. package/esm2015/table.js.map +1 -1
  207. package/esm2015/tabs.js +28 -41
  208. package/esm2015/tabs.js.map +1 -1
  209. package/esm2015/tooltip.js +9 -9
  210. package/esm2015/tooltip.js.map +1 -1
  211. package/esm2015/tree.js +13 -5
  212. package/esm2015/tree.js.map +1 -1
  213. package/esm5/autocomplete.es5.js +33 -2
  214. package/esm5/autocomplete.es5.js.map +1 -1
  215. package/esm5/badge.es5.js +7 -3
  216. package/esm5/badge.es5.js.map +1 -1
  217. package/esm5/bottom-sheet.es5.js.map +1 -1
  218. package/esm5/button-toggle.es5.js +13 -4
  219. package/esm5/button-toggle.es5.js.map +1 -1
  220. package/esm5/button.es5.js +2 -2
  221. package/esm5/button.es5.js.map +1 -1
  222. package/esm5/card.es5.js +1 -1
  223. package/esm5/card.es5.js.map +1 -1
  224. package/esm5/checkbox.es5.js +7 -1
  225. package/esm5/checkbox.es5.js.map +1 -1
  226. package/esm5/chips.es5.js +112 -93
  227. package/esm5/chips.es5.js.map +1 -1
  228. package/esm5/core.es5.js +10 -12
  229. package/esm5/core.es5.js.map +1 -1
  230. package/esm5/datepicker.es5.js +36 -39
  231. package/esm5/datepicker.es5.js.map +1 -1
  232. package/esm5/dialog.es5.js.map +1 -1
  233. package/esm5/expansion.es5.js +202 -78
  234. package/esm5/expansion.es5.js.map +1 -1
  235. package/esm5/form-field.es5.js +59 -47
  236. package/esm5/form-field.es5.js.map +1 -1
  237. package/esm5/grid-list.es5.js +7 -30
  238. package/esm5/grid-list.es5.js.map +1 -1
  239. package/esm5/icon.es5.js.map +1 -1
  240. package/esm5/input.es5.js +13 -7
  241. package/esm5/input.es5.js.map +1 -1
  242. package/esm5/list.es5.js +12 -14
  243. package/esm5/list.es5.js.map +1 -1
  244. package/esm5/material.es5.js +10 -10
  245. package/esm5/material.es5.js.map +1 -1
  246. package/esm5/menu.es5.js +17 -8
  247. package/esm5/menu.es5.js.map +1 -1
  248. package/esm5/paginator.es5.js +1 -1
  249. package/esm5/paginator.es5.js.map +1 -1
  250. package/esm5/progress-bar.es5.js +26 -10
  251. package/esm5/progress-bar.es5.js.map +1 -1
  252. package/esm5/radio.es5.js.map +1 -1
  253. package/esm5/select.es5.js +8 -3
  254. package/esm5/select.es5.js.map +1 -1
  255. package/esm5/sidenav.es5.js +5 -1
  256. package/esm5/sidenav.es5.js.map +1 -1
  257. package/esm5/slide-toggle.es5.js +8 -2
  258. package/esm5/slide-toggle.es5.js.map +1 -1
  259. package/esm5/slider.es5.js +1 -1
  260. package/esm5/slider.es5.js.map +1 -1
  261. package/esm5/snack-bar.es5.js +1 -1
  262. package/esm5/snack-bar.es5.js.map +1 -1
  263. package/esm5/stepper.es5.js +25 -17
  264. package/esm5/stepper.es5.js.map +1 -1
  265. package/esm5/table.es5.js +22 -30
  266. package/esm5/table.es5.js.map +1 -1
  267. package/esm5/tabs.es5.js +29 -36
  268. package/esm5/tabs.es5.js.map +1 -1
  269. package/esm5/tooltip.es5.js +11 -11
  270. package/esm5/tooltip.es5.js.map +1 -1
  271. package/esm5/tree.es5.js +13 -5
  272. package/esm5/tree.es5.js.map +1 -1
  273. package/expansion/typings/accordion-base.d.ts +30 -0
  274. package/expansion/typings/accordion.d.ts +18 -4
  275. package/expansion/typings/expansion-panel-header.d.ts +13 -2
  276. package/expansion/typings/expansion-panel.d.ts +10 -6
  277. package/expansion/typings/index.metadata.json +1 -1
  278. package/expansion/typings/public-api.d.ts +1 -0
  279. package/form-field/typings/form-field.d.ts +3 -5
  280. package/form-field/typings/index.metadata.json +1 -1
  281. package/grid-list/typings/grid-list.d.ts +1 -1
  282. package/grid-list/typings/grid-tile.d.ts +2 -2
  283. package/grid-list/typings/index.metadata.json +1 -1
  284. package/icon/typings/icon.d.ts +1 -1
  285. package/icon/typings/index.metadata.json +1 -1
  286. package/input/typings/autosize.d.ts +2 -1
  287. package/input/typings/index.metadata.json +1 -1
  288. package/input/typings/input.d.ts +2 -2
  289. package/list/typings/index.metadata.json +1 -1
  290. package/list/typings/list.d.ts +1 -1
  291. package/list/typings/selection-list.d.ts +4 -4
  292. package/menu/typings/index.d.ts +4 -4
  293. package/menu/typings/index.metadata.json +1 -1
  294. package/menu/typings/menu-content.d.ts +3 -0
  295. package/menu/typings/menu-directive.d.ts +1 -1
  296. package/menu/typings/menu-item.d.ts +1 -1
  297. package/menu/typings/menu-trigger.d.ts +1 -1
  298. package/package.json +7 -5
  299. package/paginator/typings/index.metadata.json +1 -1
  300. package/prebuilt-themes/deeppurple-amber.css +1 -1
  301. package/prebuilt-themes/indigo-pink.css +1 -1
  302. package/prebuilt-themes/pink-bluegrey.css +1 -1
  303. package/prebuilt-themes/purple-green.css +1 -1
  304. package/progress-bar/typings/index.metadata.json +1 -1
  305. package/progress-bar/typings/progress-bar.d.ts +17 -3
  306. package/radio/typings/radio.d.ts +1 -1
  307. package/sidenav/typings/drawer.d.ts +2 -2
  308. package/sidenav/typings/index.metadata.json +1 -1
  309. package/slide-toggle/typings/index.metadata.json +1 -1
  310. package/slide-toggle/typings/slide-toggle.d.ts +3 -3
  311. package/slider/typings/index.metadata.json +1 -1
  312. package/snack-bar/typings/index.metadata.json +1 -1
  313. package/snack-bar/typings/snack-bar-container.d.ts +1 -1
  314. package/stepper/typings/index.metadata.json +1 -1
  315. package/stepper/typings/step-header.d.ts +2 -2
  316. package/stepper/typings/step-label.d.ts +2 -10
  317. package/stepper/typings/stepper-button.d.ts +4 -2
  318. package/stepper/typings/stepper.d.ts +4 -3
  319. package/table/typings/cell.d.ts +8 -5
  320. package/table/typings/index.metadata.json +1 -1
  321. package/table/typings/row.d.ts +6 -3
  322. package/table/typings/table.d.ts +2 -8
  323. package/tabs/typings/index.d.ts +5 -5
  324. package/tabs/typings/index.metadata.json +1 -1
  325. package/tabs/typings/ink-bar.d.ts +1 -1
  326. package/tabs/typings/tab-body.d.ts +1 -1
  327. package/tabs/typings/tab-label.d.ts +2 -10
  328. package/tabs/typings/tab.d.ts +2 -4
  329. package/tooltip/typings/index.metadata.json +1 -1
  330. package/tooltip/typings/tooltip.d.ts +3 -3
  331. package/tree/typings/index.metadata.json +1 -1
  332. package/tree/typings/node.d.ts +6 -5
  333. package/tree/typings/padding.d.ts +2 -1
  334. package/tree/typings/toggle.d.ts +9 -1
  335. package/tree/typings/tree.d.ts +9 -1
  336. package/typings/autocomplete/autocomplete-trigger.d.ts +12 -1
  337. package/typings/autocomplete/autocomplete.d.ts +1 -1
  338. package/typings/autocomplete/index.d.ts +1 -1
  339. package/typings/autocomplete/index.metadata.json +1 -1
  340. package/typings/badge/badge.d.ts +6 -2
  341. package/typings/badge/index.metadata.json +1 -1
  342. package/typings/bottom-sheet/bottom-sheet-container.d.ts +1 -1
  343. package/typings/bottom-sheet/index.metadata.json +1 -1
  344. package/typings/button/index.metadata.json +1 -1
  345. package/typings/button-toggle/button-toggle.d.ts +4 -2
  346. package/typings/button-toggle/index.metadata.json +1 -1
  347. package/typings/card/index.metadata.json +1 -1
  348. package/typings/checkbox/checkbox.d.ts +2 -2
  349. package/typings/checkbox/index.metadata.json +1 -1
  350. package/typings/chips/chip-input.d.ts +9 -9
  351. package/typings/chips/chip-list.d.ts +12 -19
  352. package/typings/chips/chip.d.ts +3 -2
  353. package/typings/chips/index.metadata.json +1 -1
  354. package/typings/core/index.metadata.json +1 -1
  355. package/typings/core/line/line.d.ts +1 -1
  356. package/typings/core/option/option.d.ts +3 -4
  357. package/typings/core/ripple/ripple-renderer.d.ts +1 -1
  358. package/typings/core/ripple/ripple.d.ts +1 -1
  359. package/typings/datepicker/calendar-body.d.ts +1 -1
  360. package/typings/datepicker/datepicker-input.d.ts +3 -5
  361. package/typings/datepicker/datepicker-toggle.d.ts +3 -1
  362. package/typings/datepicker/datepicker.d.ts +1 -1
  363. package/typings/datepicker/index.metadata.json +1 -1
  364. package/typings/dialog/dialog-container.d.ts +1 -1
  365. package/typings/dialog/dialog-content-directives.d.ts +2 -2
  366. package/typings/dialog/index.metadata.json +1 -1
  367. package/typings/esm5/autocomplete/autocomplete-trigger.d.ts +12 -1
  368. package/typings/esm5/autocomplete/autocomplete.d.ts +1 -1
  369. package/typings/esm5/autocomplete/index.d.ts +1 -1
  370. package/typings/esm5/autocomplete/index.metadata.json +1 -1
  371. package/typings/esm5/badge/badge.d.ts +6 -2
  372. package/typings/esm5/badge/index.metadata.json +1 -1
  373. package/typings/esm5/bottom-sheet/bottom-sheet-container.d.ts +1 -1
  374. package/typings/esm5/bottom-sheet/index.metadata.json +1 -1
  375. package/typings/esm5/button/index.metadata.json +1 -1
  376. package/typings/esm5/button-toggle/button-toggle.d.ts +4 -2
  377. package/typings/esm5/button-toggle/index.metadata.json +1 -1
  378. package/typings/esm5/card/index.metadata.json +1 -1
  379. package/typings/esm5/checkbox/checkbox.d.ts +2 -2
  380. package/typings/esm5/checkbox/index.metadata.json +1 -1
  381. package/typings/esm5/chips/chip-input.d.ts +9 -9
  382. package/typings/esm5/chips/chip-list.d.ts +12 -19
  383. package/typings/esm5/chips/chip.d.ts +3 -2
  384. package/typings/esm5/chips/index.metadata.json +1 -1
  385. package/typings/esm5/core/index.metadata.json +1 -1
  386. package/typings/esm5/core/line/line.d.ts +1 -1
  387. package/typings/esm5/core/option/option.d.ts +3 -4
  388. package/typings/esm5/core/ripple/ripple-renderer.d.ts +1 -1
  389. package/typings/esm5/core/ripple/ripple.d.ts +1 -1
  390. package/typings/esm5/datepicker/calendar-body.d.ts +1 -1
  391. package/typings/esm5/datepicker/datepicker-input.d.ts +3 -5
  392. package/typings/esm5/datepicker/datepicker-toggle.d.ts +3 -1
  393. package/typings/esm5/datepicker/datepicker.d.ts +1 -1
  394. package/typings/esm5/datepicker/index.metadata.json +1 -1
  395. package/typings/esm5/dialog/dialog-container.d.ts +1 -1
  396. package/typings/esm5/dialog/dialog-content-directives.d.ts +2 -2
  397. package/typings/esm5/dialog/index.metadata.json +1 -1
  398. package/typings/esm5/expansion/accordion-base.d.ts +30 -0
  399. package/typings/esm5/expansion/accordion.d.ts +18 -4
  400. package/typings/esm5/expansion/expansion-panel-header.d.ts +13 -2
  401. package/typings/esm5/expansion/expansion-panel.d.ts +10 -6
  402. package/typings/esm5/expansion/index.metadata.json +1 -1
  403. package/typings/esm5/expansion/public-api.d.ts +1 -0
  404. package/typings/esm5/form-field/form-field.d.ts +3 -5
  405. package/typings/esm5/form-field/index.metadata.json +1 -1
  406. package/typings/esm5/grid-list/grid-list.d.ts +1 -1
  407. package/typings/esm5/grid-list/grid-tile.d.ts +2 -2
  408. package/typings/esm5/grid-list/index.metadata.json +1 -1
  409. package/typings/esm5/icon/icon.d.ts +1 -1
  410. package/typings/esm5/icon/index.metadata.json +1 -1
  411. package/typings/esm5/index.metadata.json +1 -1
  412. package/typings/esm5/input/autosize.d.ts +2 -1
  413. package/typings/esm5/input/index.metadata.json +1 -1
  414. package/typings/esm5/input/input.d.ts +2 -2
  415. package/typings/esm5/list/index.metadata.json +1 -1
  416. package/typings/esm5/list/list.d.ts +1 -1
  417. package/typings/esm5/list/selection-list.d.ts +4 -4
  418. package/typings/esm5/menu/index.d.ts +4 -4
  419. package/typings/esm5/menu/index.metadata.json +1 -1
  420. package/typings/esm5/menu/menu-content.d.ts +3 -0
  421. package/typings/esm5/menu/menu-directive.d.ts +1 -1
  422. package/typings/esm5/menu/menu-item.d.ts +1 -1
  423. package/typings/esm5/menu/menu-trigger.d.ts +1 -1
  424. package/typings/esm5/paginator/index.metadata.json +1 -1
  425. package/typings/esm5/progress-bar/index.metadata.json +1 -1
  426. package/typings/esm5/progress-bar/progress-bar.d.ts +17 -3
  427. package/typings/esm5/radio/radio.d.ts +1 -1
  428. package/typings/esm5/sidenav/drawer.d.ts +2 -2
  429. package/typings/esm5/sidenav/index.metadata.json +1 -1
  430. package/typings/esm5/slide-toggle/index.metadata.json +1 -1
  431. package/typings/esm5/slide-toggle/slide-toggle.d.ts +3 -3
  432. package/typings/esm5/slider/index.metadata.json +1 -1
  433. package/typings/esm5/snack-bar/index.metadata.json +1 -1
  434. package/typings/esm5/snack-bar/snack-bar-container.d.ts +1 -1
  435. package/typings/esm5/stepper/index.metadata.json +1 -1
  436. package/typings/esm5/stepper/step-header.d.ts +2 -2
  437. package/typings/esm5/stepper/step-label.d.ts +2 -10
  438. package/typings/esm5/stepper/stepper-button.d.ts +4 -2
  439. package/typings/esm5/stepper/stepper.d.ts +4 -3
  440. package/typings/esm5/table/cell.d.ts +8 -5
  441. package/typings/esm5/table/index.metadata.json +1 -1
  442. package/typings/esm5/table/row.d.ts +6 -3
  443. package/typings/esm5/table/table.d.ts +2 -8
  444. package/typings/esm5/tabs/index.d.ts +5 -5
  445. package/typings/esm5/tabs/index.metadata.json +1 -1
  446. package/typings/esm5/tabs/ink-bar.d.ts +1 -1
  447. package/typings/esm5/tabs/tab-body.d.ts +1 -1
  448. package/typings/esm5/tabs/tab-label.d.ts +2 -10
  449. package/typings/esm5/tabs/tab.d.ts +2 -4
  450. package/typings/esm5/tooltip/index.metadata.json +1 -1
  451. package/typings/esm5/tooltip/tooltip.d.ts +3 -3
  452. package/typings/esm5/tree/index.metadata.json +1 -1
  453. package/typings/esm5/tree/node.d.ts +6 -5
  454. package/typings/esm5/tree/padding.d.ts +2 -1
  455. package/typings/esm5/tree/toggle.d.ts +9 -1
  456. package/typings/esm5/tree/tree.d.ts +9 -1
  457. package/typings/expansion/accordion-base.d.ts +30 -0
  458. package/typings/expansion/accordion.d.ts +18 -4
  459. package/typings/expansion/expansion-panel-header.d.ts +13 -2
  460. package/typings/expansion/expansion-panel.d.ts +10 -6
  461. package/typings/expansion/index.metadata.json +1 -1
  462. package/typings/expansion/public-api.d.ts +1 -0
  463. package/typings/form-field/form-field.d.ts +3 -5
  464. package/typings/form-field/index.metadata.json +1 -1
  465. package/typings/grid-list/grid-list.d.ts +1 -1
  466. package/typings/grid-list/grid-tile.d.ts +2 -2
  467. package/typings/grid-list/index.metadata.json +1 -1
  468. package/typings/icon/icon.d.ts +1 -1
  469. package/typings/icon/index.metadata.json +1 -1
  470. package/typings/index.metadata.json +1 -1
  471. package/typings/input/autosize.d.ts +2 -1
  472. package/typings/input/index.metadata.json +1 -1
  473. package/typings/input/input.d.ts +2 -2
  474. package/typings/list/index.metadata.json +1 -1
  475. package/typings/list/list.d.ts +1 -1
  476. package/typings/list/selection-list.d.ts +4 -4
  477. package/typings/menu/index.d.ts +4 -4
  478. package/typings/menu/index.metadata.json +1 -1
  479. package/typings/menu/menu-content.d.ts +3 -0
  480. package/typings/menu/menu-directive.d.ts +1 -1
  481. package/typings/menu/menu-item.d.ts +1 -1
  482. package/typings/menu/menu-trigger.d.ts +1 -1
  483. package/typings/paginator/index.metadata.json +1 -1
  484. package/typings/progress-bar/index.metadata.json +1 -1
  485. package/typings/progress-bar/progress-bar.d.ts +17 -3
  486. package/typings/radio/radio.d.ts +1 -1
  487. package/typings/sidenav/drawer.d.ts +2 -2
  488. package/typings/sidenav/index.metadata.json +1 -1
  489. package/typings/slide-toggle/index.metadata.json +1 -1
  490. package/typings/slide-toggle/slide-toggle.d.ts +3 -3
  491. package/typings/slider/index.metadata.json +1 -1
  492. package/typings/snack-bar/index.metadata.json +1 -1
  493. package/typings/snack-bar/snack-bar-container.d.ts +1 -1
  494. package/typings/stepper/index.metadata.json +1 -1
  495. package/typings/stepper/step-header.d.ts +2 -2
  496. package/typings/stepper/step-label.d.ts +2 -10
  497. package/typings/stepper/stepper-button.d.ts +4 -2
  498. package/typings/stepper/stepper.d.ts +4 -3
  499. package/typings/table/cell.d.ts +8 -5
  500. package/typings/table/index.metadata.json +1 -1
  501. package/typings/table/row.d.ts +6 -3
  502. package/typings/table/table.d.ts +2 -8
  503. package/typings/tabs/index.d.ts +5 -5
  504. package/typings/tabs/index.metadata.json +1 -1
  505. package/typings/tabs/ink-bar.d.ts +1 -1
  506. package/typings/tabs/tab-body.d.ts +1 -1
  507. package/typings/tabs/tab-label.d.ts +2 -10
  508. package/typings/tabs/tab.d.ts +2 -4
  509. package/typings/tooltip/index.metadata.json +1 -1
  510. package/typings/tooltip/tooltip.d.ts +3 -3
  511. package/typings/tree/index.metadata.json +1 -1
  512. package/typings/tree/node.d.ts +6 -5
  513. package/typings/tree/padding.d.ts +2 -1
  514. package/typings/tree/toggle.d.ts +9 -1
  515. package/typings/tree/tree.d.ts +9 -1
  516. package/grid-list/typings/grid-list-measure.d.ts +0 -17
  517. package/typings/esm5/grid-list/grid-list-measure.d.ts +0 -17
  518. package/typings/grid-list/grid-list-measure.d.ts +0 -17
@@ -325,7 +325,12 @@ class MatCheckbox extends _MatCheckboxMixinBase {
325
325
  this._focusRipple.fadeOut();
326
326
  this._focusRipple = null;
327
327
  }
328
- this._onTouched();
328
+ // When a focused element becomes disabled, the browser *immediately* fires a blur event.
329
+ // Angular does not expect events to be raised during change detection, so any state change
330
+ // (such as a form control's 'ng-touched') will cause a changed-after-checked error.
331
+ // See https://github.com/angular/angular/issues/17793. To work around this, we defer telling
332
+ // the form control it has been touched until the next tick.
333
+ Promise.resolve().then(() => this._onTouched());
329
334
  }
330
335
  }
331
336
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"checkbox.js","sources":["../../../src/lib/checkbox/checkbox-module.ts","../../../src/lib/checkbox/checkbox-required-validator.ts","../../../src/lib/checkbox/checkbox.ts","../../../src/lib/checkbox/checkbox-config.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 {ObserversModule} from '@angular/cdk/observers';\nimport {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {MatCommonModule, MatRippleModule} from '@angular/material/core';\nimport {MatCheckbox} from './checkbox';\nimport {MatCheckboxRequiredValidator} from './checkbox-required-validator';\n\n\n@NgModule({\n imports: [CommonModule, MatRippleModule, MatCommonModule, ObserversModule],\n exports: [MatCheckbox, MatCheckboxRequiredValidator, MatCommonModule],\n declarations: [MatCheckbox, MatCheckboxRequiredValidator],\n})\nexport class MatCheckboxModule {}\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 {\n Directive,\n forwardRef,\n Provider,\n} from '@angular/core';\nimport {\n CheckboxRequiredValidator,\n NG_VALIDATORS,\n} from '@angular/forms';\n\nexport const MAT_CHECKBOX_REQUIRED_VALIDATOR: Provider = {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => MatCheckboxRequiredValidator),\n multi: true\n};\n\n/**\n * Validator for Material checkbox's required attribute in template-driven checkbox.\n * Current CheckboxRequiredValidator only work with `input type=checkbox` and does not\n * work with `mat-checkbox`.\n */\n@Directive({\n selector: `mat-checkbox[required][formControlName],\n mat-checkbox[required][formControl], mat-checkbox[required][ngModel]`,\n providers: [MAT_CHECKBOX_REQUIRED_VALIDATOR],\n host: {'[attr.required]': 'required ? \"\" : null'}\n})\nexport class MatCheckboxRequiredValidator extends CheckboxRequiredValidator {}\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 {FocusMonitor, FocusOrigin} from '@angular/cdk/a11y';\nimport {coerceBooleanProperty} from '@angular/cdk/coercion';\nimport {\n AfterViewInit,\n Attribute,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n EventEmitter,\n forwardRef,\n Inject,\n Input,\n NgZone,\n OnDestroy,\n Optional,\n Output,\n ViewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport {ControlValueAccessor, NG_VALUE_ACCESSOR} from '@angular/forms';\nimport {\n CanColor,\n CanDisable,\n CanDisableRipple,\n HasTabIndex,\n MatRipple,\n mixinColor,\n mixinDisabled,\n mixinDisableRipple,\n mixinTabIndex,\n RippleRef,\n} from '@angular/material/core';\nimport {MAT_CHECKBOX_CLICK_ACTION, MatCheckboxClickAction} from './checkbox-config';\nimport {ANIMATION_MODULE_TYPE} from '@angular/platform-browser/animations';\n\n\n// Increasing integer for generating unique ids for checkbox components.\nlet nextUniqueId = 0;\n\n/**\n * Provider Expression that allows mat-checkbox to register as a ControlValueAccessor.\n * This allows it to support [(ngModel)].\n * @docs-private\n */\nexport const MAT_CHECKBOX_CONTROL_VALUE_ACCESSOR: any = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => MatCheckbox),\n multi: true\n};\n\n/**\n * Represents the different states that require custom transitions between them.\n * @docs-private\n */\nexport enum TransitionCheckState {\n /** The initial state of the component before any user interaction. */\n Init,\n /** The state representing the component when it's becoming checked. */\n Checked,\n /** The state representing the component when it's becoming unchecked. */\n Unchecked,\n /** The state representing the component when it's becoming indeterminate. */\n Indeterminate\n}\n\n/** Change event object emitted by MatCheckbox. */\nexport class MatCheckboxChange {\n /** The source MatCheckbox of the event. */\n source: MatCheckbox;\n /** The new `checked` value of the checkbox. */\n checked: boolean;\n}\n\n// Boilerplate for applying mixins to MatCheckbox.\n/** @docs-private */\nexport class MatCheckboxBase {\n constructor(public _elementRef: ElementRef) {}\n}\nexport const _MatCheckboxMixinBase =\n mixinTabIndex(mixinColor(mixinDisableRipple(mixinDisabled(MatCheckboxBase)), 'accent'));\n\n\n/**\n * A material design checkbox component. Supports all of the functionality of an HTML5 checkbox,\n * and exposes a similar API. A MatCheckbox can be either checked, unchecked, indeterminate, or\n * disabled. Note that all additional accessibility attributes are taken care of by the component,\n * so there is no need to provide them yourself. However, if you want to omit a label and still\n * have the checkbox be accessible, you may supply an [aria-label] input.\n * See: https://material.io/design/components/selection-controls.html\n */\n@Component({\n moduleId: module.id,\n selector: 'mat-checkbox',\n templateUrl: 'checkbox.html',\n styleUrls: ['checkbox.css'],\n exportAs: 'matCheckbox',\n host: {\n 'class': 'mat-checkbox',\n '[id]': 'id',\n '[class.mat-checkbox-indeterminate]': 'indeterminate',\n '[class.mat-checkbox-checked]': 'checked',\n '[class.mat-checkbox-disabled]': 'disabled',\n '[class.mat-checkbox-label-before]': 'labelPosition == \"before\"',\n '[class._mat-animation-noopable]': `_animationMode === 'NoopAnimations'`,\n },\n providers: [MAT_CHECKBOX_CONTROL_VALUE_ACCESSOR],\n inputs: ['disableRipple', 'color', 'tabIndex'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class MatCheckbox extends _MatCheckboxMixinBase implements ControlValueAccessor,\n AfterViewInit, OnDestroy, CanColor, CanDisable, HasTabIndex, CanDisableRipple {\n\n /**\n * Attached to the aria-label attribute of the host element. In most cases, arial-labelledby will\n * take precedence so this may be omitted.\n */\n @Input('aria-label') ariaLabel: string = '';\n\n /**\n * Users can specify the `aria-labelledby` attribute which will be forwarded to the input element\n */\n @Input('aria-labelledby') ariaLabelledby: string | null = null;\n\n private _uniqueId: string = `mat-checkbox-${++nextUniqueId}`;\n\n /** A unique id for the checkbox input. If none is supplied, it will be auto-generated. */\n @Input() id: string = this._uniqueId;\n\n /** Returns the unique id for the visual hidden input. */\n get inputId(): string { return `${this.id || this._uniqueId}-input`; }\n\n /** Whether the checkbox is required. */\n @Input()\n get required(): boolean { return this._required; }\n set required(value: boolean) { this._required = coerceBooleanProperty(value); }\n private _required: boolean;\n\n /** Whether the label should appear after or before the checkbox. Defaults to 'after' */\n @Input() labelPosition: 'before' | 'after' = 'after';\n\n /** Name value will be applied to the input element if present */\n @Input() name: string | null = null;\n\n /** Event emitted when the checkbox's `checked` value changes. */\n @Output() readonly change: EventEmitter<MatCheckboxChange> =\n new EventEmitter<MatCheckboxChange>();\n\n /** Event emitted when the checkbox's `indeterminate` value changes. */\n @Output() readonly indeterminateChange: EventEmitter<boolean> = new EventEmitter<boolean>();\n\n /** The value attribute of the native input element */\n @Input() value: string;\n\n /** The native `<input type=\"checkbox\">` element */\n @ViewChild('input') _inputElement: ElementRef;\n\n /** Reference to the ripple instance of the checkbox. */\n @ViewChild(MatRipple) ripple: MatRipple;\n\n /**\n * Called when the checkbox is blurred. Needed to properly implement ControlValueAccessor.\n * @docs-private\n */\n _onTouched: () => any = () => {};\n\n private _currentAnimationClass: string = '';\n\n private _currentCheckState: TransitionCheckState = TransitionCheckState.Init;\n\n private _controlValueAccessorChangeFn: (value: any) => void = () => {};\n\n /** Reference to the focused state ripple. */\n private _focusRipple: RippleRef | null;\n\n constructor(elementRef: ElementRef,\n private _changeDetectorRef: ChangeDetectorRef,\n private _focusMonitor: FocusMonitor,\n private _ngZone: NgZone,\n @Attribute('tabindex') tabIndex: string,\n @Optional() @Inject(MAT_CHECKBOX_CLICK_ACTION)\n private _clickAction: MatCheckboxClickAction,\n @Optional() @Inject(ANIMATION_MODULE_TYPE) public _animationMode?: string) {\n super(elementRef);\n\n this.tabIndex = parseInt(tabIndex) || 0;\n }\n\n ngAfterViewInit() {\n this._focusMonitor\n .monitor(this._inputElement.nativeElement)\n .subscribe(focusOrigin => this._onInputFocusChange(focusOrigin));\n }\n\n ngOnDestroy() {\n this._focusMonitor.stopMonitoring(this._inputElement.nativeElement);\n }\n\n /**\n * Whether the checkbox is checked.\n */\n @Input()\n get checked(): boolean { return this._checked; }\n set checked(value: boolean) {\n if (value != this.checked) {\n this._checked = value;\n this._changeDetectorRef.markForCheck();\n }\n }\n private _checked: boolean = false;\n\n /**\n * Whether the checkbox is disabled. This fully overrides the implementation provided by\n * mixinDisabled, but the mixin is still required because mixinTabIndex requires it.\n */\n @Input()\n get disabled() { return this._disabled; }\n set disabled(value: any) {\n if (value != this.disabled) {\n this._disabled = value;\n this._changeDetectorRef.markForCheck();\n }\n }\n private _disabled: boolean = false;\n\n /**\n * Whether the checkbox is indeterminate. This is also known as \"mixed\" mode and can be used to\n * represent a checkbox with three states, e.g. a checkbox that represents a nested list of\n * checkable items. Note that whenever checkbox is manually clicked, indeterminate is immediately\n * set to false.\n */\n @Input()\n get indeterminate(): boolean { return this._indeterminate; }\n set indeterminate(value: boolean) {\n const changed = value != this._indeterminate;\n this._indeterminate = value;\n\n if (changed) {\n if (this._indeterminate) {\n this._transitionCheckState(TransitionCheckState.Indeterminate);\n } else {\n this._transitionCheckState(\n this.checked ? TransitionCheckState.Checked : TransitionCheckState.Unchecked);\n }\n this.indeterminateChange.emit(this._indeterminate);\n }\n }\n private _indeterminate: boolean = false;\n\n _isRippleDisabled() {\n return this.disableRipple || this.disabled;\n }\n\n /** Method being called whenever the label text changes. */\n _onLabelTextChange() {\n // This method is getting called whenever the label of the checkbox changes.\n // Since the checkbox uses the OnPush strategy we need to notify it about the change\n // that has been recognized by the cdkObserveContent directive.\n this._changeDetectorRef.markForCheck();\n }\n\n // Implemented as part of ControlValueAccessor.\n writeValue(value: any) {\n this.checked = !!value;\n }\n\n // Implemented as part of ControlValueAccessor.\n registerOnChange(fn: (value: any) => void) {\n this._controlValueAccessorChangeFn = fn;\n }\n\n // Implemented as part of ControlValueAccessor.\n registerOnTouched(fn: any) {\n this._onTouched = fn;\n }\n\n // Implemented as part of ControlValueAccessor.\n setDisabledState(isDisabled: boolean) {\n this.disabled = isDisabled;\n }\n\n _getAriaChecked(): 'true' | 'false' | 'mixed' {\n return this.checked ? 'true' : (this.indeterminate ? 'mixed' : 'false');\n }\n\n private _transitionCheckState(newState: TransitionCheckState) {\n let oldState = this._currentCheckState;\n let element: HTMLElement = this._elementRef.nativeElement;\n\n if (oldState === newState) {\n return;\n }\n if (this._currentAnimationClass.length > 0) {\n element.classList.remove(this._currentAnimationClass);\n }\n\n this._currentAnimationClass = this._getAnimationClassForCheckStateTransition(\n oldState, newState);\n this._currentCheckState = newState;\n\n if (this._currentAnimationClass.length > 0) {\n element.classList.add(this._currentAnimationClass);\n\n // Remove the animation class to avoid animation when the checkbox is moved between containers\n const animationClass = this._currentAnimationClass;\n\n this._ngZone.runOutsideAngular(() => {\n setTimeout(() => {\n element.classList.remove(animationClass);\n }, 1000);\n });\n }\n }\n\n private _emitChangeEvent() {\n let event = new MatCheckboxChange();\n event.source = this;\n event.checked = this.checked;\n\n this._controlValueAccessorChangeFn(this.checked);\n this.change.emit(event);\n }\n\n /** Function is called whenever the focus changes for the input element. */\n private _onInputFocusChange(focusOrigin: FocusOrigin) {\n // TODO(paul): support `program`. See https://github.com/angular/material2/issues/9889\n if (!this._focusRipple && focusOrigin === 'keyboard') {\n this._focusRipple = this.ripple.launch(0, 0, {persistent: true});\n } else if (!focusOrigin) {\n if (this._focusRipple) {\n this._focusRipple.fadeOut();\n this._focusRipple = null;\n }\n\n this._onTouched();\n }\n }\n\n /** Toggles the `checked` state of the checkbox. */\n toggle(): void {\n this.checked = !this.checked;\n }\n\n /**\n * Event handler for checkbox input element.\n * Toggles checked state if element is not disabled.\n * Do not toggle on (change) event since IE doesn't fire change event when\n * indeterminate checkbox is clicked.\n * @param event\n */\n _onInputClick(event: Event) {\n // We have to stop propagation for click events on the visual hidden input element.\n // By default, when a user clicks on a label element, a generated click event will be\n // dispatched on the associated input element. Since we are using a label element as our\n // root container, the click event on the `checkbox` will be executed twice.\n // The real click event will bubble up, and the generated click event also tries to bubble up.\n // This will lead to multiple click events.\n // Preventing bubbling for the second event will solve that issue.\n event.stopPropagation();\n\n // If resetIndeterminate is false, and the current state is indeterminate, do nothing on click\n if (!this.disabled && this._clickAction !== 'noop') {\n // When user manually click on the checkbox, `indeterminate` is set to false.\n if (this.indeterminate && this._clickAction !== 'check') {\n\n Promise.resolve().then(() => {\n this._indeterminate = false;\n this.indeterminateChange.emit(this._indeterminate);\n });\n }\n\n this.toggle();\n this._transitionCheckState(\n this._checked ? TransitionCheckState.Checked : TransitionCheckState.Unchecked);\n\n // Emit our custom change event if the native input emitted one.\n // It is important to only emit it, if the native input triggered one, because\n // we don't want to trigger a change event, when the `checked` variable changes for example.\n this._emitChangeEvent();\n } else if (!this.disabled && this._clickAction === 'noop') {\n // Reset native input when clicked with noop. The native checkbox becomes checked after\n // click, reset it to be align with `checked` value of `mat-checkbox`.\n this._inputElement.nativeElement.checked = this.checked;\n this._inputElement.nativeElement.indeterminate = this.indeterminate;\n }\n }\n\n /** Focuses the checkbox. */\n focus(): void {\n this._focusMonitor.focusVia(this._inputElement.nativeElement, 'keyboard');\n }\n\n _onInteractionEvent(event: Event) {\n // We always have to stop propagation on the change event.\n // Otherwise the change event, from the input element, will bubble up and\n // emit its event object to the `change` output.\n event.stopPropagation();\n }\n\n private _getAnimationClassForCheckStateTransition(\n oldState: TransitionCheckState, newState: TransitionCheckState): string {\n // Don't transition if animations are disabled.\n if (this._animationMode === 'NoopAnimations') {\n return '';\n }\n\n let animSuffix: string = '';\n\n switch (oldState) {\n case TransitionCheckState.Init:\n // Handle edge case where user interacts with checkbox that does not have [(ngModel)] or\n // [checked] bound to it.\n if (newState === TransitionCheckState.Checked) {\n animSuffix = 'unchecked-checked';\n } else if (newState == TransitionCheckState.Indeterminate) {\n animSuffix = 'unchecked-indeterminate';\n } else {\n return '';\n }\n break;\n case TransitionCheckState.Unchecked:\n animSuffix = newState === TransitionCheckState.Checked ?\n 'unchecked-checked' : 'unchecked-indeterminate';\n break;\n case TransitionCheckState.Checked:\n animSuffix = newState === TransitionCheckState.Unchecked ?\n 'checked-unchecked' : 'checked-indeterminate';\n break;\n case TransitionCheckState.Indeterminate:\n animSuffix = newState === TransitionCheckState.Checked ?\n 'indeterminate-checked' : 'indeterminate-unchecked';\n break;\n }\n\n return `mat-checkbox-anim-${animSuffix}`;\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 */\nimport {InjectionToken} from '@angular/core';\n\n\n/**\n * Checkbox click action when user click on input element.\n * noop: Do not toggle checked or indeterminate.\n * check: Only toggle checked status, ignore indeterminate.\n * check-indeterminate: Toggle checked status, set indeterminate to false. Default behavior.\n * undefined: Same as `check-indeterminate`.\n */\nexport type MatCheckboxClickAction = 'noop' | 'check' | 'check-indeterminate' | undefined;\n\n/**\n * Injection token that can be used to specify the checkbox click behavior.\n */\nexport const MAT_CHECKBOX_CLICK_ACTION =\n new InjectionToken<MatCheckboxClickAction>('mat-checkbox-click-action');\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AGOA;;;AAeA,AAAA,MAAA,iBAAa,yBAAyB,GAClC,IAAI,cAAc,CAAyB,2BAA2B,CAAC;;;;;;;ADuB3E,qBAAI,YAAY,GAAG,CAAC,CAAC;;;;;;AAOrB,AAAA,MAAA,iBAAa,mCAAmC,GAAQ;IACtD,OAAO,EAAE,iBAAiB;IAC1B,WAAW,EAAE,UAAU,CAAC,MAAM,WAAW,CAAC;IAC1C,KAAK,EAAE,IAAI;CACZ,CAAC;;;;;;;;;;;;;;;;;;;AAkBF,AAAA,MAAA,iBAAA,CAAA;CAKC;;;;AAID,AAAA,MAAA,eAAA,CAAA;;;;IACE,WAAF,CAAqB,WAAuB,EAA5C;QAAqB,IAArB,CAAA,WAAgC,GAAX,WAAW,CAAY;KAAI;CAC/C;AACD,MAAA,iBAAa,qBAAqB,GAChC,aAAa,CAAC,UAAU,CAAC,kBAAkB,CAAC,aAAa,CAAC,eAAe,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC;;;;;;;;;AA+B1F,AAAA,MAAA,WAAyB,SAAQ,qBAAqB,CAAtD;;;;;;;;;;IAiEE,WAAF,CAAc,UAAsB,EACd,kBADtB,EAEsB,aAFtB,EAGsB,OAHtB,EAIqC,QAJrC,EAM0B,YAN1B,EAOgE,cAPhE,EAAA;QAQI,KAAK,CAAC,UAAU,CAAC,CAAC;QAPA,IAAtB,CAAA,kBAAwC,GAAlB,kBAAkB,CAAxC;QACsB,IAAtB,CAAA,aAAmC,GAAb,aAAa,CAAnC;QACsB,IAAtB,CAAA,OAA6B,GAAP,OAA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A;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"checkbox.js","sources":["../../../src/lib/checkbox/checkbox-module.ts","../../../src/lib/checkbox/checkbox-required-validator.ts","../../../src/lib/checkbox/checkbox.ts","../../../src/lib/checkbox/checkbox-config.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 {ObserversModule} from '@angular/cdk/observers';\nimport {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {MatCommonModule, MatRippleModule} from '@angular/material/core';\nimport {MatCheckbox} from './checkbox';\nimport {MatCheckboxRequiredValidator} from './checkbox-required-validator';\n\n\n@NgModule({\n imports: [CommonModule, MatRippleModule, MatCommonModule, ObserversModule],\n exports: [MatCheckbox, MatCheckboxRequiredValidator, MatCommonModule],\n declarations: [MatCheckbox, MatCheckboxRequiredValidator],\n})\nexport class MatCheckboxModule {}\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 {\n Directive,\n forwardRef,\n Provider,\n} from '@angular/core';\nimport {\n CheckboxRequiredValidator,\n NG_VALIDATORS,\n} from '@angular/forms';\n\nexport const MAT_CHECKBOX_REQUIRED_VALIDATOR: Provider = {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => MatCheckboxRequiredValidator),\n multi: true\n};\n\n/**\n * Validator for Material checkbox's required attribute in template-driven checkbox.\n * Current CheckboxRequiredValidator only work with `input type=checkbox` and does not\n * work with `mat-checkbox`.\n */\n@Directive({\n selector: `mat-checkbox[required][formControlName],\n mat-checkbox[required][formControl], mat-checkbox[required][ngModel]`,\n providers: [MAT_CHECKBOX_REQUIRED_VALIDATOR],\n host: {'[attr.required]': 'required ? \"\" : null'}\n})\nexport class MatCheckboxRequiredValidator extends CheckboxRequiredValidator {}\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 {FocusMonitor, FocusOrigin} from '@angular/cdk/a11y';\nimport {coerceBooleanProperty} from '@angular/cdk/coercion';\nimport {\n AfterViewInit,\n Attribute,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n EventEmitter,\n forwardRef,\n Inject,\n Input,\n NgZone,\n OnDestroy,\n Optional,\n Output,\n ViewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport {ControlValueAccessor, NG_VALUE_ACCESSOR} from '@angular/forms';\nimport {\n CanColor,\n CanDisable,\n CanDisableRipple,\n HasTabIndex,\n MatRipple,\n mixinColor,\n mixinDisabled,\n mixinDisableRipple,\n mixinTabIndex,\n RippleRef,\n} from '@angular/material/core';\nimport {MAT_CHECKBOX_CLICK_ACTION, MatCheckboxClickAction} from './checkbox-config';\nimport {ANIMATION_MODULE_TYPE} from '@angular/platform-browser/animations';\n\n\n// Increasing integer for generating unique ids for checkbox components.\nlet nextUniqueId = 0;\n\n/**\n * Provider Expression that allows mat-checkbox to register as a ControlValueAccessor.\n * This allows it to support [(ngModel)].\n * @docs-private\n */\nexport const MAT_CHECKBOX_CONTROL_VALUE_ACCESSOR: any = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => MatCheckbox),\n multi: true\n};\n\n/**\n * Represents the different states that require custom transitions between them.\n * @docs-private\n */\nexport enum TransitionCheckState {\n /** The initial state of the component before any user interaction. */\n Init,\n /** The state representing the component when it's becoming checked. */\n Checked,\n /** The state representing the component when it's becoming unchecked. */\n Unchecked,\n /** The state representing the component when it's becoming indeterminate. */\n Indeterminate\n}\n\n/** Change event object emitted by MatCheckbox. */\nexport class MatCheckboxChange {\n /** The source MatCheckbox of the event. */\n source: MatCheckbox;\n /** The new `checked` value of the checkbox. */\n checked: boolean;\n}\n\n// Boilerplate for applying mixins to MatCheckbox.\n/** @docs-private */\nexport class MatCheckboxBase {\n constructor(public _elementRef: ElementRef) {}\n}\nexport const _MatCheckboxMixinBase =\n mixinTabIndex(mixinColor(mixinDisableRipple(mixinDisabled(MatCheckboxBase)), 'accent'));\n\n\n/**\n * A material design checkbox component. Supports all of the functionality of an HTML5 checkbox,\n * and exposes a similar API. A MatCheckbox can be either checked, unchecked, indeterminate, or\n * disabled. Note that all additional accessibility attributes are taken care of by the component,\n * so there is no need to provide them yourself. However, if you want to omit a label and still\n * have the checkbox be accessible, you may supply an [aria-label] input.\n * See: https://material.io/design/components/selection-controls.html\n */\n@Component({\n moduleId: module.id,\n selector: 'mat-checkbox',\n templateUrl: 'checkbox.html',\n styleUrls: ['checkbox.css'],\n exportAs: 'matCheckbox',\n host: {\n 'class': 'mat-checkbox',\n '[id]': 'id',\n '[class.mat-checkbox-indeterminate]': 'indeterminate',\n '[class.mat-checkbox-checked]': 'checked',\n '[class.mat-checkbox-disabled]': 'disabled',\n '[class.mat-checkbox-label-before]': 'labelPosition == \"before\"',\n '[class._mat-animation-noopable]': `_animationMode === 'NoopAnimations'`,\n },\n providers: [MAT_CHECKBOX_CONTROL_VALUE_ACCESSOR],\n inputs: ['disableRipple', 'color', 'tabIndex'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class MatCheckbox extends _MatCheckboxMixinBase implements ControlValueAccessor,\n AfterViewInit, OnDestroy, CanColor, CanDisable, HasTabIndex, CanDisableRipple {\n\n /**\n * Attached to the aria-label attribute of the host element. In most cases, arial-labelledby will\n * take precedence so this may be omitted.\n */\n @Input('aria-label') ariaLabel: string = '';\n\n /**\n * Users can specify the `aria-labelledby` attribute which will be forwarded to the input element\n */\n @Input('aria-labelledby') ariaLabelledby: string | null = null;\n\n private _uniqueId: string = `mat-checkbox-${++nextUniqueId}`;\n\n /** A unique id for the checkbox input. If none is supplied, it will be auto-generated. */\n @Input() id: string = this._uniqueId;\n\n /** Returns the unique id for the visual hidden input. */\n get inputId(): string { return `${this.id || this._uniqueId}-input`; }\n\n /** Whether the checkbox is required. */\n @Input()\n get required(): boolean { return this._required; }\n set required(value: boolean) { this._required = coerceBooleanProperty(value); }\n private _required: boolean;\n\n /** Whether the label should appear after or before the checkbox. Defaults to 'after' */\n @Input() labelPosition: 'before' | 'after' = 'after';\n\n /** Name value will be applied to the input element if present */\n @Input() name: string | null = null;\n\n /** Event emitted when the checkbox's `checked` value changes. */\n @Output() readonly change: EventEmitter<MatCheckboxChange> =\n new EventEmitter<MatCheckboxChange>();\n\n /** Event emitted when the checkbox's `indeterminate` value changes. */\n @Output() readonly indeterminateChange: EventEmitter<boolean> = new EventEmitter<boolean>();\n\n /** The value attribute of the native input element */\n @Input() value: string;\n\n /** The native `<input type=\"checkbox\">` element */\n @ViewChild('input') _inputElement: ElementRef<HTMLInputElement>;\n\n /** Reference to the ripple instance of the checkbox. */\n @ViewChild(MatRipple) ripple: MatRipple;\n\n /**\n * Called when the checkbox is blurred. Needed to properly implement ControlValueAccessor.\n * @docs-private\n */\n _onTouched: () => any = () => {};\n\n private _currentAnimationClass: string = '';\n\n private _currentCheckState: TransitionCheckState = TransitionCheckState.Init;\n\n private _controlValueAccessorChangeFn: (value: any) => void = () => {};\n\n /** Reference to the focused state ripple. */\n private _focusRipple: RippleRef | null;\n\n constructor(elementRef: ElementRef<HTMLElement>,\n private _changeDetectorRef: ChangeDetectorRef,\n private _focusMonitor: FocusMonitor,\n private _ngZone: NgZone,\n @Attribute('tabindex') tabIndex: string,\n @Optional() @Inject(MAT_CHECKBOX_CLICK_ACTION)\n private _clickAction: MatCheckboxClickAction,\n @Optional() @Inject(ANIMATION_MODULE_TYPE) public _animationMode?: string) {\n super(elementRef);\n\n this.tabIndex = parseInt(tabIndex) || 0;\n }\n\n ngAfterViewInit() {\n this._focusMonitor\n .monitor(this._inputElement.nativeElement)\n .subscribe(focusOrigin => this._onInputFocusChange(focusOrigin));\n }\n\n ngOnDestroy() {\n this._focusMonitor.stopMonitoring(this._inputElement.nativeElement);\n }\n\n /**\n * Whether the checkbox is checked.\n */\n @Input()\n get checked(): boolean { return this._checked; }\n set checked(value: boolean) {\n if (value != this.checked) {\n this._checked = value;\n this._changeDetectorRef.markForCheck();\n }\n }\n private _checked: boolean = false;\n\n /**\n * Whether the checkbox is disabled. This fully overrides the implementation provided by\n * mixinDisabled, but the mixin is still required because mixinTabIndex requires it.\n */\n @Input()\n get disabled() { return this._disabled; }\n set disabled(value: any) {\n if (value != this.disabled) {\n this._disabled = value;\n this._changeDetectorRef.markForCheck();\n }\n }\n private _disabled: boolean = false;\n\n /**\n * Whether the checkbox is indeterminate. This is also known as \"mixed\" mode and can be used to\n * represent a checkbox with three states, e.g. a checkbox that represents a nested list of\n * checkable items. Note that whenever checkbox is manually clicked, indeterminate is immediately\n * set to false.\n */\n @Input()\n get indeterminate(): boolean { return this._indeterminate; }\n set indeterminate(value: boolean) {\n const changed = value != this._indeterminate;\n this._indeterminate = value;\n\n if (changed) {\n if (this._indeterminate) {\n this._transitionCheckState(TransitionCheckState.Indeterminate);\n } else {\n this._transitionCheckState(\n this.checked ? TransitionCheckState.Checked : TransitionCheckState.Unchecked);\n }\n this.indeterminateChange.emit(this._indeterminate);\n }\n }\n private _indeterminate: boolean = false;\n\n _isRippleDisabled() {\n return this.disableRipple || this.disabled;\n }\n\n /** Method being called whenever the label text changes. */\n _onLabelTextChange() {\n // This method is getting called whenever the label of the checkbox changes.\n // Since the checkbox uses the OnPush strategy we need to notify it about the change\n // that has been recognized by the cdkObserveContent directive.\n this._changeDetectorRef.markForCheck();\n }\n\n // Implemented as part of ControlValueAccessor.\n writeValue(value: any) {\n this.checked = !!value;\n }\n\n // Implemented as part of ControlValueAccessor.\n registerOnChange(fn: (value: any) => void) {\n this._controlValueAccessorChangeFn = fn;\n }\n\n // Implemented as part of ControlValueAccessor.\n registerOnTouched(fn: any) {\n this._onTouched = fn;\n }\n\n // Implemented as part of ControlValueAccessor.\n setDisabledState(isDisabled: boolean) {\n this.disabled = isDisabled;\n }\n\n _getAriaChecked(): 'true' | 'false' | 'mixed' {\n return this.checked ? 'true' : (this.indeterminate ? 'mixed' : 'false');\n }\n\n private _transitionCheckState(newState: TransitionCheckState) {\n let oldState = this._currentCheckState;\n let element: HTMLElement = this._elementRef.nativeElement;\n\n if (oldState === newState) {\n return;\n }\n if (this._currentAnimationClass.length > 0) {\n element.classList.remove(this._currentAnimationClass);\n }\n\n this._currentAnimationClass = this._getAnimationClassForCheckStateTransition(\n oldState, newState);\n this._currentCheckState = newState;\n\n if (this._currentAnimationClass.length > 0) {\n element.classList.add(this._currentAnimationClass);\n\n // Remove the animation class to avoid animation when the checkbox is moved between containers\n const animationClass = this._currentAnimationClass;\n\n this._ngZone.runOutsideAngular(() => {\n setTimeout(() => {\n element.classList.remove(animationClass);\n }, 1000);\n });\n }\n }\n\n private _emitChangeEvent() {\n let event = new MatCheckboxChange();\n event.source = this;\n event.checked = this.checked;\n\n this._controlValueAccessorChangeFn(this.checked);\n this.change.emit(event);\n }\n\n /** Function is called whenever the focus changes for the input element. */\n private _onInputFocusChange(focusOrigin: FocusOrigin) {\n // TODO(paul): support `program`. See https://github.com/angular/material2/issues/9889\n if (!this._focusRipple && focusOrigin === 'keyboard') {\n this._focusRipple = this.ripple.launch(0, 0, {persistent: true});\n } else if (!focusOrigin) {\n if (this._focusRipple) {\n this._focusRipple.fadeOut();\n this._focusRipple = null;\n }\n\n // When a focused element becomes disabled, the browser *immediately* fires a blur event.\n // Angular does not expect events to be raised during change detection, so any state change\n // (such as a form control's 'ng-touched') will cause a changed-after-checked error.\n // See https://github.com/angular/angular/issues/17793. To work around this, we defer telling\n // the form control it has been touched until the next tick.\n Promise.resolve().then(() => this._onTouched());\n }\n }\n\n /** Toggles the `checked` state of the checkbox. */\n toggle(): void {\n this.checked = !this.checked;\n }\n\n /**\n * Event handler for checkbox input element.\n * Toggles checked state if element is not disabled.\n * Do not toggle on (change) event since IE doesn't fire change event when\n * indeterminate checkbox is clicked.\n * @param event\n */\n _onInputClick(event: Event) {\n // We have to stop propagation for click events on the visual hidden input element.\n // By default, when a user clicks on a label element, a generated click event will be\n // dispatched on the associated input element. Since we are using a label element as our\n // root container, the click event on the `checkbox` will be executed twice.\n // The real click event will bubble up, and the generated click event also tries to bubble up.\n // This will lead to multiple click events.\n // Preventing bubbling for the second event will solve that issue.\n event.stopPropagation();\n\n // If resetIndeterminate is false, and the current state is indeterminate, do nothing on click\n if (!this.disabled && this._clickAction !== 'noop') {\n // When user manually click on the checkbox, `indeterminate` is set to false.\n if (this.indeterminate && this._clickAction !== 'check') {\n\n Promise.resolve().then(() => {\n this._indeterminate = false;\n this.indeterminateChange.emit(this._indeterminate);\n });\n }\n\n this.toggle();\n this._transitionCheckState(\n this._checked ? TransitionCheckState.Checked : TransitionCheckState.Unchecked);\n\n // Emit our custom change event if the native input emitted one.\n // It is important to only emit it, if the native input triggered one, because\n // we don't want to trigger a change event, when the `checked` variable changes for example.\n this._emitChangeEvent();\n } else if (!this.disabled && this._clickAction === 'noop') {\n // Reset native input when clicked with noop. The native checkbox becomes checked after\n // click, reset it to be align with `checked` value of `mat-checkbox`.\n this._inputElement.nativeElement.checked = this.checked;\n this._inputElement.nativeElement.indeterminate = this.indeterminate;\n }\n }\n\n /** Focuses the checkbox. */\n focus(): void {\n this._focusMonitor.focusVia(this._inputElement.nativeElement, 'keyboard');\n }\n\n _onInteractionEvent(event: Event) {\n // We always have to stop propagation on the change event.\n // Otherwise the change event, from the input element, will bubble up and\n // emit its event object to the `change` output.\n event.stopPropagation();\n }\n\n private _getAnimationClassForCheckStateTransition(\n oldState: TransitionCheckState, newState: TransitionCheckState): string {\n // Don't transition if animations are disabled.\n if (this._animationMode === 'NoopAnimations') {\n return '';\n }\n\n let animSuffix: string = '';\n\n switch (oldState) {\n case TransitionCheckState.Init:\n // Handle edge case where user interacts with checkbox that does not have [(ngModel)] or\n // [checked] bound to it.\n if (newState === TransitionCheckState.Checked) {\n animSuffix = 'unchecked-checked';\n } else if (newState == TransitionCheckState.Indeterminate) {\n animSuffix = 'unchecked-indeterminate';\n } else {\n return '';\n }\n break;\n case TransitionCheckState.Unchecked:\n animSuffix = newState === TransitionCheckState.Checked ?\n 'unchecked-checked' : 'unchecked-indeterminate';\n break;\n case TransitionCheckState.Checked:\n animSuffix = newState === TransitionCheckState.Unchecked ?\n 'checked-unchecked' : 'checked-indeterminate';\n break;\n case TransitionCheckState.Indeterminate:\n animSuffix = newState === TransitionCheckState.Checked ?\n 'indeterminate-checked' : 'indeterminate-unchecked';\n break;\n }\n\n return `mat-checkbox-anim-${animSuffix}`;\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 */\nimport {InjectionToken} from '@angular/core';\n\n\n/**\n * Checkbox click action when user click on input element.\n * noop: Do not toggle checked or indeterminate.\n * check: Only toggle checked status, ignore indeterminate.\n * check-indeterminate: Toggle checked status, set indeterminate to false. Default behavior.\n * undefined: Same as `check-indeterminate`.\n */\nexport type MatCheckboxClickAction = 'noop' | 'check' | 'check-indeterminate' | undefined;\n\n/**\n * Injection token that can be used to specify the checkbox click behavior.\n */\nexport const MAT_CHECKBOX_CLICK_ACTION =\n new InjectionToken<MatCheckboxClickAction>('mat-checkbox-click-action');\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AGOA;;;AAeA,AAAA,MAAA,iBAAa,yBAAyB,GAClC,IAAI,cAAc,CAAyB,2BAA2B,CAAC;;;;;;;ADuB3E,qBAAI,YAAY,GAAG,CAAC,CAAC;;;;;;AAOrB,AAAA,MAAA,iBAAa,mCAAmC,GAAQ;IACtD,OAAO,EAAE,iBAAiB;IAC1B,WAAW,EAAE,UAAU,CAAC,MAAM,WAAW,CAAC;IAC1C,KAAK,EAAE,IAAI;CACZ,CAAC;;;;;;;;;;;;;;;;;;;AAkBF,AAAA,MAAA,iBAAA,CAAA;CAKC;;;;AAID,AAAA,MAAA,eAAA,CAAA;;;;IACE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AAW,EAAE,UAAU,CAAC,MAAM,4BAA4B,CAAC;IAC3D,KAAK,EAAE,IAAI;CACZ,CAAC;;;;;;AAaF,AAAA,MAAA,4BAA0C,SAAQ,yBAAyB,CAA3E;;;IANA,EAAA,IAAA,EAAC,SAAS,EAAV,IAAA,EAAA,CAAW;gBACT,QAAQ,EAAE,CAAZ;iFACA,CAAkF;gBAChF,SAAS,EAAE,CAAC,+BAA+B,CAAC;gBAC5C,IAAI,EAAE,EAAC,iBAAiB,EAAE,sBAAsB,EAAC;aAClD,EAAD,EAAA;;;;;;;ADbA,MAAA,iBAAA,CAAA;;;IALA,EAAA,IAAA,EAAC,QAAQ,EAAT,IAAA,EAAA,CAAU;gBACR,OAAO,EAAE,CAAC,YAAY,EAAE,eAAe,EAAE,eAAe,EAAE,eAAe,CAAC;gBAC1E,OAAO,EAAE,CAAC,WAAW,EAAE,4BAA4B,EAAE,eAAe,CAAC;gBACrE,YAAY,EAAE,CAAC,WAAW,EAAE,4BAA4B,CAAC;aAC1D,EAAD,EAAA;;;;;;;;;;;;;;;"}
package/esm2015/chips.js CHANGED
@@ -6,17 +6,17 @@
6
6
  * found in the LICENSE file at https://angular.io/license
7
7
  */
8
8
  import { coerceBooleanProperty } from '@angular/cdk/coercion';
9
- import { BACKSPACE, DELETE, SPACE, ENTER } from '@angular/cdk/keycodes';
9
+ import { BACKSPACE, DELETE, SPACE, HOME, END, ENTER } from '@angular/cdk/keycodes';
10
10
  import { Platform } from '@angular/cdk/platform';
11
11
  import { ContentChild, Directive, ElementRef, EventEmitter, forwardRef, Inject, Input, NgZone, Optional, Output, InjectionToken, ChangeDetectionStrategy, ChangeDetectorRef, Component, ContentChildren, Self, ViewEncapsulation, NgModule } from '@angular/core';
12
12
  import { MAT_RIPPLE_GLOBAL_OPTIONS, mixinColor, mixinDisabled, mixinDisableRipple, RippleRenderer, ErrorStateMatcher, mixinErrorState } from '@angular/material/core';
13
- import { Subject, merge, Subscription } from 'rxjs';
13
+ import { Subject, merge } from 'rxjs';
14
+ import { take, startWith, takeUntil } from 'rxjs/operators';
14
15
  import { FocusKeyManager } from '@angular/cdk/a11y';
15
16
  import { Directionality } from '@angular/cdk/bidi';
16
17
  import { SelectionModel } from '@angular/cdk/collections';
17
18
  import { FormGroupDirective, NgControl, NgForm } from '@angular/forms';
18
19
  import { MatFormFieldControl } from '@angular/material/form-field';
19
- import { startWith } from 'rxjs/operators';
20
20
 
21
21
  /**
22
22
  * @fileoverview added by tsickle
@@ -80,13 +80,14 @@ MatChipTrailingIcon.decorators = [
80
80
  class MatChip extends _MatChipMixinBase {
81
81
  /**
82
82
  * @param {?} _elementRef
83
- * @param {?} ngZone
83
+ * @param {?} _ngZone
84
84
  * @param {?} platform
85
85
  * @param {?} globalOptions
86
86
  */
87
- constructor(_elementRef, ngZone, platform, globalOptions) {
87
+ constructor(_elementRef, _ngZone, platform, globalOptions) {
88
88
  super(_elementRef);
89
89
  this._elementRef = _elementRef;
90
+ this._ngZone = _ngZone;
90
91
  /**
91
92
  * Whether the ripples are globally disabled through the RippleGlobalOptions
92
93
  */
@@ -128,7 +129,7 @@ class MatChip extends _MatChipMixinBase {
128
129
  */
129
130
  this.removed = new EventEmitter();
130
131
  this._addHostClassName();
131
- this._chipRipple = new RippleRenderer(this, ngZone, _elementRef, platform);
132
+ this._chipRipple = new RippleRenderer(this, _ngZone, _elementRef, platform);
132
133
  this._chipRipple.setupTriggerEvents(_elementRef.nativeElement);
133
134
  if (globalOptions) {
134
135
  this._ripplesGloballyDisabled = !!globalOptions.disabled;
@@ -352,8 +353,19 @@ class MatChip extends _MatChipMixinBase {
352
353
  * @return {?}
353
354
  */
354
355
  _blur() {
355
- this._hasFocus = false;
356
- this._onBlur.next({ chip: this });
356
+ // When animations are enabled, Angular may end up removing the chip from the DOM a little
357
+ // earlier than usual, causing it to be blurred and throwing off the logic in the chip list
358
+ // that moves focus not the next item. To work around the issue, we defer marking the chip
359
+ // as not focused until the next time the zone stabilizes.
360
+ this._ngZone.onStable
361
+ .asObservable()
362
+ .pipe(take(1))
363
+ .subscribe(() => {
364
+ this._ngZone.run(() => {
365
+ this._hasFocus = false;
366
+ this._onBlur.next({ chip: this });
367
+ });
368
+ });
357
369
  }
358
370
  }
359
371
  MatChip.decorators = [
@@ -420,12 +432,19 @@ class MatChipRemove {
420
432
  }
421
433
  /**
422
434
  * Calls the parent chip's public `remove()` method if applicable.
435
+ * @param {?} event
423
436
  * @return {?}
424
437
  */
425
- _handleClick() {
438
+ _handleClick(event) {
426
439
  if (this._parentChip.removable) {
427
440
  this._parentChip.remove();
428
441
  }
442
+ // We need to stop event propagation because otherwise the event will bubble up to the
443
+ // form field and cause the `onContainerClick` method to be invoked. This method would then
444
+ // reset the focused chip that has been focused after chip removal. Usually the parent
445
+ // the parent click listener of the `MatChip` would prevent propagation, but it can happen
446
+ // that the chip is being removed before the event bubbles up.
447
+ event.stopPropagation();
429
448
  }
430
449
  }
431
450
  MatChipRemove.decorators = [
@@ -433,7 +452,7 @@ MatChipRemove.decorators = [
433
452
  selector: '[matChipRemove]',
434
453
  host: {
435
454
  'class': 'mat-chip-remove mat-chip-trailing-icon',
436
- '(click)': '_handleClick()',
455
+ '(click)': '_handleClick($event)',
437
456
  }
438
457
  },] },
439
458
  ];
@@ -514,17 +533,15 @@ class MatChipList extends _MatChipListMixinBase {
514
533
  */
515
534
  this.controlType = 'mat-chip-list';
516
535
  /**
517
- * When a chip is destroyed, we track the index so we can focus the appropriate next chip.
536
+ * When a chip is destroyed, we store the index of the destroyed chip until the chips
537
+ * query list notifies about the update. This is necessary because we cannot determine an
538
+ * appropriate chip that should receive focus until the array of chips updated completely.
518
539
  */
519
- this._lastDestroyedIndex = null;
540
+ this._lastDestroyedChipIndex = null;
520
541
  /**
521
- * Track which chips we're listening to for focus/destruction.
542
+ * Subject that emits when the component has been destroyed.
522
543
  */
523
- this._chipSet = new WeakMap();
524
- /**
525
- * Subscription to tabbing out from the chip list.
526
- */
527
- this._tabOutSubscription = Subscription.EMPTY;
544
+ this._destroyed = new Subject();
528
545
  /**
529
546
  * Uid of the chip list
530
547
  */
@@ -694,7 +711,12 @@ class MatChipList extends _MatChipListMixinBase {
694
711
  * @param {?} value
695
712
  * @return {?}
696
713
  */
697
- set disabled(value) { this._disabled = coerceBooleanProperty(value); }
714
+ set disabled(value) {
715
+ this._disabled = coerceBooleanProperty(value);
716
+ if (this.chips) {
717
+ this.chips.forEach(chip => chip.disabled = this._disabled);
718
+ }
719
+ }
698
720
  /**
699
721
  * Whether or not this chip list is selectable. When a chip list is not selectable,
700
722
  * the selected states for all the chips inside the chip list are always ignored.
@@ -757,12 +779,12 @@ class MatChipList extends _MatChipListMixinBase {
757
779
  .withHorizontalOrientation(this._dir ? this._dir.value : 'ltr');
758
780
  // Prevents the chip list from capturing focus and redirecting
759
781
  // it back to the first chip when the user tabs out.
760
- this._tabOutSubscription = this._keyManager.tabOut.subscribe(() => {
782
+ this._keyManager.tabOut.pipe(takeUntil(this._destroyed)).subscribe(() => {
761
783
  this._tabIndex = -1;
762
784
  setTimeout(() => this._tabIndex = this._userTabIndex || 0);
763
785
  });
764
786
  // When the list changes, re-subscribe
765
- this._changeSubscription = this.chips.changes.pipe(startWith(null)).subscribe(() => {
787
+ this.chips.changes.pipe(startWith(null), takeUntil(this._destroyed)).subscribe(() => {
766
788
  this._resetChips();
767
789
  // Reset chips selected/deselected status
768
790
  this._initializeSelection();
@@ -795,15 +817,10 @@ class MatChipList extends _MatChipListMixinBase {
795
817
  * @return {?}
796
818
  */
797
819
  ngOnDestroy() {
798
- this._tabOutSubscription.unsubscribe();
799
- if (this._changeSubscription) {
800
- this._changeSubscription.unsubscribe();
801
- }
802
- if (this._chipRemoveSubscription) {
803
- this._chipRemoveSubscription.unsubscribe();
804
- }
805
- this._dropSubscriptions();
820
+ this._destroyed.next();
821
+ this._destroyed.complete();
806
822
  this.stateChanges.complete();
823
+ this._dropSubscriptions();
807
824
  }
808
825
  /**
809
826
  * Associates an HTML input element with this chip list.
@@ -849,7 +866,6 @@ class MatChipList extends _MatChipListMixinBase {
849
866
  */
850
867
  setDisabledState(isDisabled) {
851
868
  this.disabled = isDisabled;
852
- this._elementRef.nativeElement.disabled = isDisabled;
853
869
  this.stateChanges.next();
854
870
  }
855
871
  /**
@@ -864,6 +880,9 @@ class MatChipList extends _MatChipListMixinBase {
864
880
  * @return {?}
865
881
  */
866
882
  focus() {
883
+ if (this.disabled) {
884
+ return;
885
+ }
867
886
  // TODO: ARIA says this should focus the first `selected` chip if any are selected.
868
887
  // Focus on first element if there's no chipInput inside chip-list
869
888
  if (this._chipInput && this._chipInput.focused) {
@@ -900,7 +919,17 @@ class MatChipList extends _MatChipListMixinBase {
900
919
  event.preventDefault();
901
920
  }
902
921
  else if (target && target.classList.contains('mat-chip')) {
903
- this._keyManager.onKeydown(event);
922
+ if (event.keyCode === HOME) {
923
+ this._keyManager.setFirstItemActive();
924
+ event.preventDefault();
925
+ }
926
+ else if (event.keyCode === END) {
927
+ this._keyManager.setLastItemActive();
928
+ event.preventDefault();
929
+ }
930
+ else {
931
+ this._keyManager.onKeydown(event);
932
+ }
904
933
  this.stateChanges.next();
905
934
  }
906
935
  }
@@ -913,50 +942,16 @@ class MatChipList extends _MatChipListMixinBase {
913
942
  this._tabIndex = this._userTabIndex || (this.chips.length === 0 ? -1 : 0);
914
943
  }
915
944
  /**
916
- * Update key manager's active item when chip is deleted.
917
- * If the deleted chip is the last chip in chip list, focus the new last chip.
918
- * Otherwise focus the next chip in the list.
919
- * Save `_lastDestroyedIndex` so we can set the correct focus.
920
- * @param {?} chip
921
- * @return {?}
922
- */
923
- _updateKeyManager(chip) {
924
- let /** @type {?} */ chipIndex = this.chips.toArray().indexOf(chip);
925
- if (this._isValidIndex(chipIndex)) {
926
- if (chip._hasFocus) {
927
- // Check whether the chip is not the last item
928
- if (chipIndex < this.chips.length - 1) {
929
- this._keyManager.setActiveItem(chipIndex);
930
- }
931
- else if (chipIndex - 1 >= 0) {
932
- this._keyManager.setActiveItem(chipIndex - 1);
933
- }
934
- }
935
- if (this._keyManager.activeItemIndex === chipIndex) {
936
- this._lastDestroyedIndex = chipIndex;
937
- }
938
- }
939
- }
940
- /**
941
- * Checks to see if a focus chip was recently destroyed so that we can refocus the next closest
942
- * one.
945
+ * If the amount of chips changed, we need to update the
946
+ * key manager state and focus the next closest chip.
943
947
  * @return {?}
944
948
  */
945
949
  _updateFocusForDestroyedChips() {
946
- const /** @type {?} */ chipsArray = this.chips.toArray();
947
- if (this._lastDestroyedIndex != null && chipsArray.length > 0 && (this.focused ||
948
- (this._keyManager.activeItem && chipsArray.indexOf(this._keyManager.activeItem) === -1))) {
949
- // Check whether the destroyed chip was the last item
950
- const /** @type {?} */ newFocusIndex = Math.min(this._lastDestroyedIndex, chipsArray.length - 1);
951
- this._keyManager.setActiveItem(newFocusIndex);
952
- const /** @type {?} */ focusChip = this._keyManager.activeItem;
953
- // Focus the chip
954
- if (focusChip) {
955
- focusChip.focus();
956
- }
950
+ if (this._lastDestroyedChipIndex != null && this.chips.length) {
951
+ const /** @type {?} */ newChipIndex = Math.min(this._lastDestroyedChipIndex, this.chips.length - 1);
952
+ this._keyManager.setActiveItem(newChipIndex);
957
953
  }
958
- // Reset our destroyed index
959
- this._lastDestroyedIndex = null;
954
+ this._lastDestroyedChipIndex = null;
960
955
  }
961
956
  /**
962
957
  * Utility to ensure all indexes are valid.
@@ -1137,6 +1132,10 @@ class MatChipList extends _MatChipListMixinBase {
1137
1132
  this._chipSelectionSubscription.unsubscribe();
1138
1133
  this._chipSelectionSubscription = null;
1139
1134
  }
1135
+ if (this._chipRemoveSubscription) {
1136
+ this._chipRemoveSubscription.unsubscribe();
1137
+ this._chipRemoveSubscription = null;
1138
+ }
1140
1139
  }
1141
1140
  /**
1142
1141
  * Listens to user-generated selection events on each chip.
@@ -1182,7 +1181,14 @@ class MatChipList extends _MatChipListMixinBase {
1182
1181
  */
1183
1182
  _listenToChipsRemoved() {
1184
1183
  this._chipRemoveSubscription = this.chipRemoveChanges.subscribe(event => {
1185
- this._updateKeyManager(event.chip);
1184
+ const /** @type {?} */ chip = event.chip;
1185
+ const /** @type {?} */ chipIndex = this.chips.toArray().indexOf(event.chip);
1186
+ // In case the chip that will be removed is currently focused, we temporarily store
1187
+ // the index in order to be able to determine an appropriate sibling chip that will
1188
+ // receive focus.
1189
+ if (this._isValidIndex(chipIndex) && chip._hasFocus) {
1190
+ this._lastDestroyedChipIndex = chipIndex;
1191
+ }
1186
1192
  });
1187
1193
  }
1188
1194
  }
@@ -1191,7 +1197,7 @@ MatChipList.decorators = [
1191
1197
  template: `<div class="mat-chip-list-wrapper"><ng-content></ng-content></div>`,
1192
1198
  exportAs: 'matChipList',
1193
1199
  host: {
1194
- '[attr.tabindex]': '_tabIndex',
1200
+ '[attr.tabindex]': 'disabled ? null : _tabIndex',
1195
1201
  '[attr.aria-describedby]': '_ariaDescribedby || null',
1196
1202
  '[attr.aria-required]': 'required.toString()',
1197
1203
  '[attr.aria-disabled]': 'disabled.toString()',
@@ -1209,7 +1215,7 @@ MatChipList.decorators = [
1209
1215
  '[id]': '_uid',
1210
1216
  },
1211
1217
  providers: [{ provide: MatFormFieldControl, useExisting: MatChipList }],
1212
- styles: [".mat-chip{position:relative;overflow:hidden;box-sizing:border-box;-webkit-tap-highlight-color:transparent}.mat-standard-chip{transition:box-shadow 280ms cubic-bezier(.4,0,.2,1);display:inline-flex;padding:7px 12px;border-radius:24px;align-items:center;cursor:default}.mat-standard-chip .mat-chip-remove.mat-icon{width:18px;height:18px}.mat-standard-chip:focus{box-shadow:0 3px 3px -2px rgba(0,0,0,.2),0 3px 4px 0 rgba(0,0,0,.14),0 1px 8px 0 rgba(0,0,0,.12);outline:0}@media screen and (-ms-high-contrast:active){.mat-standard-chip{outline:solid 1px}}.mat-standard-chip.mat-chip-with-avatar,.mat-standard-chip.mat-chip-with-trailing-icon.mat-chip-with-avatar{padding-top:0;padding-bottom:0}.mat-standard-chip.mat-chip-with-trailing-icon.mat-chip-with-avatar{padding-right:7px;padding-left:0}[dir=rtl] .mat-standard-chip.mat-chip-with-trailing-icon.mat-chip-with-avatar{padding-left:7px;padding-right:0}.mat-standard-chip.mat-chip-with-trailing-icon{padding-top:7px;padding-bottom:7px;padding-right:7px;padding-left:12px}[dir=rtl] .mat-standard-chip.mat-chip-with-trailing-icon{padding-left:7px;padding-right:12px}.mat-standard-chip.mat-chip-with-avatar{padding-left:0;padding-right:12px}[dir=rtl] .mat-standard-chip.mat-chip-with-avatar{padding-right:0;padding-left:12px}.mat-standard-chip .mat-chip-avatar{width:32px;height:32px;margin-right:8px;margin-left:0}[dir=rtl] .mat-standard-chip .mat-chip-avatar{margin-left:8px;margin-right:0}.mat-standard-chip .mat-chip-remove,.mat-standard-chip .mat-chip-trailing-icon{width:18px;height:18px;cursor:pointer}.mat-standard-chip .mat-chip-remove,.mat-standard-chip .mat-chip-trailing-icon{margin-left:7px;margin-right:0}[dir=rtl] .mat-standard-chip .mat-chip-remove,[dir=rtl] .mat-standard-chip .mat-chip-trailing-icon{margin-right:7px;margin-left:0}.mat-chip-list-wrapper{display:flex;flex-direction:row;flex-wrap:wrap;align-items:center;margin:-4px}.mat-chip-list-wrapper .mat-standard-chip,.mat-chip-list-wrapper input.mat-input-element{margin:4px}.mat-chip-list-stacked .mat-chip-list-wrapper{flex-direction:column;align-items:flex-start}.mat-chip-list-stacked .mat-chip-list-wrapper .mat-standard-chip{width:100%}.mat-chip-avatar{border-radius:50%;justify-content:center;align-items:center;display:flex;overflow:hidden}input.mat-chip-input{width:150px;margin:3px;flex:1 0 150px}"],
1218
+ styles: [".mat-chip{position:relative;overflow:hidden;box-sizing:border-box;-webkit-tap-highlight-color:transparent}.mat-standard-chip{transition:box-shadow 280ms cubic-bezier(.4,0,.2,1);display:inline-flex;padding:7px 12px;border-radius:24px;align-items:center;cursor:default}.mat-standard-chip .mat-chip-remove.mat-icon{width:18px;height:18px}.mat-standard-chip:focus{box-shadow:0 3px 3px -2px rgba(0,0,0,.2),0 3px 4px 0 rgba(0,0,0,.14),0 1px 8px 0 rgba(0,0,0,.12);outline:0}@media screen and (-ms-high-contrast:active){.mat-standard-chip{outline:solid 1px}.mat-standard-chip:focus{outline:dotted 2px}}.mat-standard-chip.mat-chip-with-avatar,.mat-standard-chip.mat-chip-with-trailing-icon.mat-chip-with-avatar{padding-top:0;padding-bottom:0}.mat-standard-chip.mat-chip-with-trailing-icon.mat-chip-with-avatar{padding-right:7px;padding-left:0}[dir=rtl] .mat-standard-chip.mat-chip-with-trailing-icon.mat-chip-with-avatar{padding-left:7px;padding-right:0}.mat-standard-chip.mat-chip-with-trailing-icon{padding-top:7px;padding-bottom:7px;padding-right:7px;padding-left:12px}[dir=rtl] .mat-standard-chip.mat-chip-with-trailing-icon{padding-left:7px;padding-right:12px}.mat-standard-chip.mat-chip-with-avatar{padding-left:0;padding-right:12px}[dir=rtl] .mat-standard-chip.mat-chip-with-avatar{padding-right:0;padding-left:12px}.mat-standard-chip .mat-chip-avatar{width:32px;height:32px;margin-right:8px;margin-left:0}[dir=rtl] .mat-standard-chip .mat-chip-avatar{margin-left:8px;margin-right:0}.mat-standard-chip .mat-chip-remove,.mat-standard-chip .mat-chip-trailing-icon{width:18px;height:18px;cursor:pointer}.mat-standard-chip .mat-chip-remove,.mat-standard-chip .mat-chip-trailing-icon{margin-left:7px;margin-right:0}[dir=rtl] .mat-standard-chip .mat-chip-remove,[dir=rtl] .mat-standard-chip .mat-chip-trailing-icon{margin-right:7px;margin-left:0}.mat-chip-list-wrapper{display:flex;flex-direction:row;flex-wrap:wrap;align-items:center;margin:-4px}.mat-chip-list-wrapper .mat-standard-chip,.mat-chip-list-wrapper input.mat-input-element{margin:4px}.mat-chip-list-stacked .mat-chip-list-wrapper{flex-direction:column;align-items:flex-start}.mat-chip-list-stacked .mat-chip-list-wrapper .mat-standard-chip{width:100%}.mat-chip-avatar{border-radius:50%;justify-content:center;align-items:center;display:flex;overflow:hidden;object-fit:cover}input.mat-chip-input{width:150px;margin:3px;flex:1 0 150px}"],
1213
1219
  encapsulation: ViewEncapsulation.None,
1214
1220
  changeDetection: ChangeDetectionStrategy.OnPush
1215
1221
  },] },
@@ -1275,14 +1281,13 @@ class MatChipInput {
1275
1281
  this.chipEnd = new EventEmitter();
1276
1282
  /**
1277
1283
  * The input's placeholder text.
1278
- * @deprecated Bind to the `placeholder` attribute directly.
1279
- * \@breaking-change 7.0.0
1280
1284
  */
1281
1285
  this.placeholder = '';
1282
1286
  /**
1283
1287
  * Unique id for the input.
1284
1288
  */
1285
1289
  this.id = `mat-chip-list-input-${nextUniqueId$1++}`;
1290
+ this._disabled = false;
1286
1291
  this._inputElement = /** @type {?} */ (this._elementRef.nativeElement);
1287
1292
  }
1288
1293
  /**
@@ -1306,11 +1311,27 @@ class MatChipInput {
1306
1311
  * @return {?}
1307
1312
  */
1308
1313
  set addOnBlur(value) { this._addOnBlur = coerceBooleanProperty(value); }
1314
+ /**
1315
+ * Whether the input is disabled.
1316
+ * @return {?}
1317
+ */
1318
+ get disabled() { return this._disabled || (this._chipList && this._chipList.disabled); }
1319
+ /**
1320
+ * @param {?} value
1321
+ * @return {?}
1322
+ */
1323
+ set disabled(value) { this._disabled = coerceBooleanProperty(value); }
1309
1324
  /**
1310
1325
  * Whether the input is empty.
1311
1326
  * @return {?}
1312
1327
  */
1313
1328
  get empty() { return !this._inputElement.value; }
1329
+ /**
1330
+ * @return {?}
1331
+ */
1332
+ ngOnChanges() {
1333
+ this._chipList.stateChanges.next();
1334
+ }
1314
1335
  /**
1315
1336
  * Utility method to make host definition/tests more clear.
1316
1337
  * @param {?=} event
@@ -1381,6 +1402,7 @@ MatChipInput.decorators = [
1381
1402
  '(focus)': '_focus()',
1382
1403
  '(input)': '_onInput()',
1383
1404
  '[id]': 'id',
1405
+ '[attr.disabled]': 'disabled || null',
1384
1406
  '[attr.placeholder]': 'placeholder || null',
1385
1407
  }
1386
1408
  },] },
@@ -1397,6 +1419,7 @@ MatChipInput.propDecorators = {
1397
1419
  "chipEnd": [{ type: Output, args: ['matChipInputTokenEnd',] },],
1398
1420
  "placeholder": [{ type: Input },],
1399
1421
  "id": [{ type: Input },],
1422
+ "disabled": [{ type: Input },],
1400
1423
  };
1401
1424
 
1402
1425
  /**