@angular/material 20.0.0-next.0 → 20.0.0-next.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (368) hide show
  1. package/autocomplete/_autocomplete-theme.scss +4 -4
  2. package/autocomplete/index.d.ts +96 -126
  3. package/autocomplete/testing/index.d.ts +6 -11
  4. package/badge/_badge-theme.scss +5 -5
  5. package/badge/index.d.ts +8 -112
  6. package/badge/testing/index.d.ts +7 -8
  7. package/badge.d-49a8a74b.d.ts +98 -0
  8. package/bottom-sheet/_bottom-sheet-theme.scss +3 -3
  9. package/bottom-sheet/index.d.ts +88 -103
  10. package/bottom-sheet/testing/index.d.ts +4 -6
  11. package/button/_button-theme.scss +84 -32
  12. package/button/_fab-theme.scss +13 -13
  13. package/button/_icon-button-theme.scss +5 -5
  14. package/button/index.d.ts +10 -245
  15. package/button/testing/index.d.ts +13 -10
  16. package/button-toggle/_button-toggle-theme.scss +8 -8
  17. package/button-toggle/index.d.ts +12 -285
  18. package/button-toggle/testing/index.d.ts +38 -37
  19. package/button-toggle.d-edc8acff.d.ts +257 -0
  20. package/card/_card-theme.scss +12 -12
  21. package/card/index.d.ts +80 -117
  22. package/card/testing/index.d.ts +11 -15
  23. package/checkbox/_checkbox-theme.scss +10 -10
  24. package/checkbox/index.d.ts +43 -104
  25. package/checkbox/testing/index.d.ts +6 -10
  26. package/chips/_chips-theme.scss +14 -14
  27. package/chips/index.d.ts +599 -693
  28. package/chips/testing/index.d.ts +78 -93
  29. package/common-module.d-0e6515ae.d.ts +43 -0
  30. package/core/_core-theme.scss +2 -2
  31. package/core/index.d.ts +50 -979
  32. package/core/option/_optgroup-theme.scss +2 -2
  33. package/core/option/_option-theme.scss +4 -4
  34. package/core/ripple/_ripple-theme.scss +3 -3
  35. package/core/selection/pseudo-checkbox/_pseudo-checkbox-theme.scss +4 -4
  36. package/core/testing/index.d.ts +3 -65
  37. package/core/theming/_color-api-backwards-compatibility.scss +19 -8
  38. package/core/tokens/_density.scss +3 -0
  39. package/core/tokens/_token-definition.scss +1 -2
  40. package/core/tokens/_token-utils.scss +20 -5
  41. package/core/tokens/m2/_index.scss +2 -0
  42. package/core/tokens/m2/mat/_tonal-button.scss +110 -0
  43. package/core/tokens/m3/_index.scss +2 -0
  44. package/core/tokens/m3/definitions/_index.scss +1 -1
  45. package/core/tokens/m3/definitions/_md-comp-elevated-card.scss +3 -1
  46. package/core/tokens/m3/definitions/_md-sys-color.scss +44 -2
  47. package/core/tokens/m3/definitions/_md-sys-typescale.scss +20 -1
  48. package/core/tokens/m3/mat/_tonal-button.scss +101 -0
  49. package/date-adapter.d-c6835d41.d.ts +267 -0
  50. package/date-range-input-harness.d-549a9f7e.d.ts +278 -0
  51. package/datepicker/_datepicker-theme.scss +8 -7
  52. package/datepicker/index.d.ts +1332 -1482
  53. package/datepicker/testing/index.d.ts +5 -287
  54. package/dialog/_dialog-theme.scss +6 -6
  55. package/dialog/index.d.ts +59 -453
  56. package/dialog/testing/index.d.ts +22 -26
  57. package/dialog.d-57867441.d.ts +335 -0
  58. package/divider/_divider-theme.scss +2 -2
  59. package/divider/index.d.ts +6 -11
  60. package/divider/testing/index.d.ts +2 -16
  61. package/divider-harness.d-d34fede4.d.ts +14 -0
  62. package/error-options.d-448d9046.d.ts +17 -0
  63. package/expansion/_expansion-theme.scss +4 -4
  64. package/expansion/index.d.ts +139 -190
  65. package/expansion/testing/index.d.ts +25 -31
  66. package/fesm2022/autocomplete/testing.mjs +2 -1
  67. package/fesm2022/autocomplete/testing.mjs.map +1 -1
  68. package/fesm2022/autocomplete.mjs +56 -32
  69. package/fesm2022/autocomplete.mjs.map +1 -1
  70. package/fesm2022/badge/testing.mjs.map +1 -1
  71. package/fesm2022/badge.mjs +14 -17
  72. package/fesm2022/badge.mjs.map +1 -1
  73. package/fesm2022/bottom-sheet/testing.mjs.map +1 -1
  74. package/fesm2022/bottom-sheet.mjs +13 -15
  75. package/fesm2022/bottom-sheet.mjs.map +1 -1
  76. package/fesm2022/button/testing.mjs +34 -15
  77. package/fesm2022/button/testing.mjs.map +1 -1
  78. package/fesm2022/button-toggle/testing.mjs.map +1 -1
  79. package/fesm2022/button-toggle.mjs +22 -15
  80. package/fesm2022/button-toggle.mjs.map +1 -1
  81. package/fesm2022/button.mjs +14 -395
  82. package/fesm2022/button.mjs.map +1 -1
  83. package/fesm2022/card/testing.mjs.map +1 -1
  84. package/fesm2022/card.mjs +49 -51
  85. package/fesm2022/card.mjs.map +1 -1
  86. package/fesm2022/checkbox/testing.mjs.map +1 -1
  87. package/fesm2022/checkbox.mjs +32 -73
  88. package/fesm2022/checkbox.mjs.map +1 -1
  89. package/fesm2022/chips/testing.mjs.map +1 -1
  90. package/fesm2022/chips.mjs +51 -46
  91. package/fesm2022/chips.mjs.map +1 -1
  92. package/fesm2022/common-module-2d64df09.mjs +42 -0
  93. package/fesm2022/common-module-2d64df09.mjs.map +1 -0
  94. package/fesm2022/core/testing.mjs +3 -76
  95. package/fesm2022/core/testing.mjs.map +1 -1
  96. package/fesm2022/core.mjs +38 -1598
  97. package/fesm2022/core.mjs.map +1 -1
  98. package/fesm2022/date-formats-b618acb8.mjs +190 -0
  99. package/fesm2022/date-formats-b618acb8.mjs.map +1 -0
  100. package/fesm2022/date-range-input-harness-de70be6a.mjs +467 -0
  101. package/fesm2022/date-range-input-harness-de70be6a.mjs.map +1 -0
  102. package/fesm2022/datepicker/testing.mjs +5 -465
  103. package/fesm2022/datepicker/testing.mjs.map +1 -1
  104. package/fesm2022/datepicker.mjs +162 -131
  105. package/fesm2022/datepicker.mjs.map +1 -1
  106. package/fesm2022/dialog/testing.mjs +12 -1
  107. package/fesm2022/dialog/testing.mjs.map +1 -1
  108. package/fesm2022/dialog.mjs +14 -895
  109. package/fesm2022/dialog.mjs.map +1 -1
  110. package/fesm2022/divider/testing.mjs +2 -17
  111. package/fesm2022/divider/testing.mjs.map +1 -1
  112. package/fesm2022/divider-harness-8099453f.mjs +18 -0
  113. package/fesm2022/divider-harness-8099453f.mjs.map +1 -0
  114. package/fesm2022/divider.mjs +10 -12
  115. package/fesm2022/divider.mjs.map +1 -1
  116. package/fesm2022/error-options-4a00765e.mjs +29 -0
  117. package/fesm2022/error-options-4a00765e.mjs.map +1 -0
  118. package/fesm2022/error-state-8f4ce1af.mjs +37 -0
  119. package/fesm2022/error-state-8f4ce1af.mjs.map +1 -0
  120. package/fesm2022/expansion/testing.mjs.map +1 -1
  121. package/fesm2022/expansion.mjs +30 -32
  122. package/fesm2022/expansion.mjs.map +1 -1
  123. package/fesm2022/form-field/testing/control.mjs +2 -10
  124. package/fesm2022/form-field/testing/control.mjs.map +1 -1
  125. package/fesm2022/form-field/testing.mjs +7 -6
  126. package/fesm2022/form-field/testing.mjs.map +1 -1
  127. package/fesm2022/form-field-6d755764.mjs +1076 -0
  128. package/fesm2022/form-field-6d755764.mjs.map +1 -0
  129. package/fesm2022/form-field-control-harness-efefd4cf.mjs +11 -0
  130. package/fesm2022/form-field-control-harness-efefd4cf.mjs.map +1 -0
  131. package/fesm2022/form-field.mjs +14 -1110
  132. package/fesm2022/form-field.mjs.map +1 -1
  133. package/fesm2022/grid-list/testing.mjs +1 -1
  134. package/fesm2022/grid-list/testing.mjs.map +1 -1
  135. package/fesm2022/grid-list.mjs +30 -173
  136. package/fesm2022/grid-list.mjs.map +1 -1
  137. package/fesm2022/icon/testing.mjs +12 -12
  138. package/fesm2022/icon/testing.mjs.map +1 -1
  139. package/fesm2022/icon-button-0850d958.mjs +211 -0
  140. package/fesm2022/icon-button-0850d958.mjs.map +1 -0
  141. package/fesm2022/icon-module-3f77a24d.mjs +395 -0
  142. package/fesm2022/icon-module-3f77a24d.mjs.map +1 -0
  143. package/fesm2022/icon-registry-13a3b98e.mjs +639 -0
  144. package/fesm2022/icon-registry-13a3b98e.mjs.map +1 -0
  145. package/fesm2022/icon.mjs +11 -1016
  146. package/fesm2022/icon.mjs.map +1 -1
  147. package/fesm2022/index-1763d3a6.mjs +22 -0
  148. package/fesm2022/index-1763d3a6.mjs.map +1 -0
  149. package/fesm2022/index-4bc1d6d3.mjs +20 -0
  150. package/fesm2022/index-4bc1d6d3.mjs.map +1 -0
  151. package/fesm2022/input/testing.mjs +5 -113
  152. package/fesm2022/input/testing.mjs.map +1 -1
  153. package/fesm2022/input-harness-e68bb132.mjs +115 -0
  154. package/fesm2022/input-harness-e68bb132.mjs.map +1 -0
  155. package/fesm2022/input-value-accessor-8a79a24e.mjs +12 -0
  156. package/fesm2022/input-value-accessor-8a79a24e.mjs.map +1 -0
  157. package/fesm2022/input.mjs +21 -23
  158. package/fesm2022/input.mjs.map +1 -1
  159. package/fesm2022/internal-form-field-434c4039.mjs +27 -0
  160. package/fesm2022/internal-form-field-434c4039.mjs.map +1 -0
  161. package/fesm2022/line-d6afe347.mjs +59 -0
  162. package/fesm2022/line-d6afe347.mjs.map +1 -0
  163. package/fesm2022/list/testing.mjs +2 -2
  164. package/fesm2022/list/testing.mjs.map +1 -1
  165. package/fesm2022/list.mjs +59 -56
  166. package/fesm2022/list.mjs.map +1 -1
  167. package/fesm2022/menu/testing.mjs.map +1 -1
  168. package/fesm2022/menu.mjs +37 -25
  169. package/fesm2022/menu.mjs.map +1 -1
  170. package/fesm2022/module-1c16a0a9.mjs +1293 -0
  171. package/fesm2022/module-1c16a0a9.mjs.map +1 -0
  172. package/fesm2022/module-47e3be58.mjs +970 -0
  173. package/fesm2022/module-47e3be58.mjs.map +1 -0
  174. package/fesm2022/module-a5f9ab72.mjs +875 -0
  175. package/fesm2022/module-a5f9ab72.mjs.map +1 -0
  176. package/fesm2022/module-cf951a02.mjs +214 -0
  177. package/fesm2022/module-cf951a02.mjs.map +1 -0
  178. package/fesm2022/module-d757bba0.mjs +38 -0
  179. package/fesm2022/module-d757bba0.mjs.map +1 -0
  180. package/fesm2022/optgroup-harness-5e66b138.mjs +36 -0
  181. package/fesm2022/optgroup-harness-5e66b138.mjs.map +1 -0
  182. package/fesm2022/option-07c3c660.mjs +348 -0
  183. package/fesm2022/option-07c3c660.mjs.map +1 -0
  184. package/fesm2022/option-harness-3b7c1106.mjs +46 -0
  185. package/fesm2022/option-harness-3b7c1106.mjs.map +1 -0
  186. package/fesm2022/paginator/testing.mjs +4 -1
  187. package/fesm2022/paginator/testing.mjs.map +1 -1
  188. package/fesm2022/paginator.mjs +52 -22
  189. package/fesm2022/paginator.mjs.map +1 -1
  190. package/fesm2022/progress-bar/testing.mjs +0 -4
  191. package/fesm2022/progress-bar/testing.mjs.map +1 -1
  192. package/fesm2022/progress-bar.mjs +15 -13
  193. package/fesm2022/progress-bar.mjs.map +1 -1
  194. package/fesm2022/progress-spinner/testing.mjs +0 -4
  195. package/fesm2022/progress-spinner/testing.mjs.map +1 -1
  196. package/fesm2022/progress-spinner.mjs +15 -13
  197. package/fesm2022/progress-spinner.mjs.map +1 -1
  198. package/fesm2022/pseudo-checkbox-af5a4ea4.mjs +52 -0
  199. package/fesm2022/pseudo-checkbox-af5a4ea4.mjs.map +1 -0
  200. package/fesm2022/pseudo-checkbox-module-216fae38.mjs +20 -0
  201. package/fesm2022/pseudo-checkbox-module-216fae38.mjs.map +1 -0
  202. package/fesm2022/public-api-c5ab57f5.mjs +147 -0
  203. package/fesm2022/public-api-c5ab57f5.mjs.map +1 -0
  204. package/fesm2022/radio/testing.mjs.map +1 -1
  205. package/fesm2022/radio.mjs +23 -15
  206. package/fesm2022/radio.mjs.map +1 -1
  207. package/fesm2022/ripple-9939d1f5.mjs +639 -0
  208. package/fesm2022/ripple-9939d1f5.mjs.map +1 -0
  209. package/fesm2022/ripple-loader-f2078c66.mjs +165 -0
  210. package/fesm2022/ripple-loader-f2078c66.mjs.map +1 -0
  211. package/fesm2022/select/testing.mjs +5 -121
  212. package/fesm2022/select/testing.mjs.map +1 -1
  213. package/fesm2022/select-harness-69d47123.mjs +123 -0
  214. package/fesm2022/select-harness-69d47123.mjs.map +1 -0
  215. package/fesm2022/select.mjs +30 -1311
  216. package/fesm2022/select.mjs.map +1 -1
  217. package/fesm2022/sidenav/testing.mjs +1 -1
  218. package/fesm2022/sidenav/testing.mjs.map +1 -1
  219. package/fesm2022/sidenav.mjs +31 -31
  220. package/fesm2022/sidenav.mjs.map +1 -1
  221. package/fesm2022/slide-toggle/testing.mjs.map +1 -1
  222. package/fesm2022/slide-toggle.mjs +27 -75
  223. package/fesm2022/slide-toggle.mjs.map +1 -1
  224. package/fesm2022/slider/testing.mjs.map +1 -1
  225. package/fesm2022/slider.mjs +27 -23
  226. package/fesm2022/slider.mjs.map +1 -1
  227. package/fesm2022/snack-bar/testing.mjs.map +1 -1
  228. package/fesm2022/snack-bar.mjs +38 -30
  229. package/fesm2022/snack-bar.mjs.map +1 -1
  230. package/fesm2022/sort/testing.mjs.map +1 -1
  231. package/fesm2022/sort.mjs +26 -20
  232. package/fesm2022/sort.mjs.map +1 -1
  233. package/fesm2022/stepper/testing.mjs.map +1 -1
  234. package/fesm2022/stepper.mjs +52 -39
  235. package/fesm2022/stepper.mjs.map +1 -1
  236. package/fesm2022/structural-styles-d5ada3b3.mjs +18 -0
  237. package/fesm2022/structural-styles-d5ada3b3.mjs.map +1 -0
  238. package/fesm2022/table/testing.mjs.map +1 -1
  239. package/fesm2022/table.mjs +58 -60
  240. package/fesm2022/table.mjs.map +1 -1
  241. package/fesm2022/tabs/testing.mjs.map +1 -1
  242. package/fesm2022/tabs.mjs +54 -58
  243. package/fesm2022/tabs.mjs.map +1 -1
  244. package/fesm2022/timepicker/testing.mjs +1 -1
  245. package/fesm2022/timepicker/testing.mjs.map +1 -1
  246. package/fesm2022/timepicker.mjs +37 -26
  247. package/fesm2022/timepicker.mjs.map +1 -1
  248. package/fesm2022/toolbar/testing.mjs.map +1 -1
  249. package/fesm2022/toolbar.mjs +13 -15
  250. package/fesm2022/toolbar.mjs.map +1 -1
  251. package/fesm2022/tooltip/testing.mjs.map +1 -1
  252. package/fesm2022/tooltip.mjs +15 -960
  253. package/fesm2022/tooltip.mjs.map +1 -1
  254. package/fesm2022/tree/testing.mjs.map +1 -1
  255. package/fesm2022/tree.mjs +28 -30
  256. package/fesm2022/tree.mjs.map +1 -1
  257. package/form-field/_form-field-theme.scss +16 -16
  258. package/form-field/index.d.ts +16 -508
  259. package/form-field/testing/control/index.d.ts +2 -10
  260. package/form-field/testing/index.d.ts +19 -24
  261. package/form-field-control-harness.d-2d91f25a.d.ts +10 -0
  262. package/form-field-control.d-eb86711c.d.ts +62 -0
  263. package/form-field.d-2edbc094.d.ts +367 -0
  264. package/grid-list/_grid-list-theme.scss +1 -1
  265. package/grid-list/index.d.ts +128 -152
  266. package/grid-list/testing/index.d.ts +39 -44
  267. package/icon/_icon-theme.scss +2 -2
  268. package/icon/index.d.ts +9 -470
  269. package/icon/testing/index.d.ts +41 -44
  270. package/icon-module.d-aa3bbba0.d.ts +167 -0
  271. package/icon-registry.d-1dffe9de.d.ts +286 -0
  272. package/index.d-0536b706.d.ts +11 -0
  273. package/index.d-37e31cd3.d.ts +13 -0
  274. package/index.d.ts +2 -3
  275. package/input/index.d.ts +33 -62
  276. package/input/testing/index.d.ts +13 -71
  277. package/input-harness.d-4eecd1d3.d.ts +60 -0
  278. package/line.d-570a2537.d.ts +25 -0
  279. package/list/_list-theme.scss +15 -15
  280. package/list/index.d.ts +155 -244
  281. package/list/testing/index.d.ts +158 -180
  282. package/list-option-types.d-8739f903.d.ts +15 -0
  283. package/menu/_menu-theme.scss +3 -3
  284. package/menu/index.d.ts +183 -231
  285. package/menu/testing/index.d.ts +17 -23
  286. package/module.d-74a721b9.d.ts +326 -0
  287. package/module.d-792a497c.d.ts +213 -0
  288. package/module.d-ba05faa6.d.ts +448 -0
  289. package/module.d-c17c834e.d.ts +18 -0
  290. package/optgroup-harness.d-7f741f69.d.ts +31 -0
  291. package/option-harness.d-3d33fc9a.d.ts +34 -0
  292. package/option-parent.d-559ad5c5.d.ts +19 -0
  293. package/option.d-6f493d78.d.ts +146 -0
  294. package/package.json +2 -2
  295. package/paginator/_paginator-theme.scss +3 -3
  296. package/paginator/index.d.ts +31 -216
  297. package/paginator/testing/index.d.ts +14 -15
  298. package/paginator.d-40b1766e.d.ts +199 -0
  299. package/palette.d-ec4a617c.d.ts +4 -0
  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/_progress-bar-theme.scss +2 -2
  305. package/progress-bar/index.d.ts +40 -59
  306. package/progress-bar/testing/index.d.ts +7 -10
  307. package/progress-spinner/_progress-spinner-theme.scss +4 -4
  308. package/progress-spinner/index.d.ts +8 -110
  309. package/progress-spinner/testing/index.d.ts +10 -11
  310. package/progress-spinner.d-1fc040c5.d.ts +96 -0
  311. package/pseudo-checkbox-module.d-3abc0461.d.ts +44 -0
  312. package/radio/_radio-theme.scss +12 -12
  313. package/radio/index.d.ts +151 -170
  314. package/radio/testing/index.d.ts +61 -67
  315. package/ripple-loader.d-8aac2988.d.ts +48 -0
  316. package/ripple.d-2fb57d04.d.ts +255 -0
  317. package/schematics/ng-add/index.js +1 -1
  318. package/schematics/ng-add/index.mjs +1 -1
  319. package/schematics/ng-generate/address-form/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.html.template +2 -2
  320. package/schematics/ng-generate/dashboard/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.html.template +1 -1
  321. package/schematics/ng-generate/navigation/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.html.template +1 -1
  322. package/schematics/ng-generate/theme-color/index_bundled.js +2 -2
  323. package/schematics/ng-generate/theme-color/schema.json +10 -0
  324. package/schematics/ng-generate/tree/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.html.template +2 -2
  325. package/schematics/ng-update/index_bundled.js +31 -31
  326. package/select/_select-theme.scss +6 -6
  327. package/select/index.d.ts +25 -505
  328. package/select/testing/index.d.ts +5 -67
  329. package/select-harness.d-7441a7ac.d.ts +63 -0
  330. package/sidenav/_sidenav-theme.scss +2 -2
  331. package/sidenav/index.d.ts +49 -92
  332. package/sidenav/testing/index.d.ts +58 -63
  333. package/slide-toggle/_slide-toggle-theme.scss +10 -10
  334. package/slide-toggle/index.d.ts +39 -110
  335. package/slide-toggle/testing/index.d.ts +17 -21
  336. package/slider/_slider-theme.scss +10 -10
  337. package/slider/index.d.ts +281 -328
  338. package/slider/testing/index.d.ts +42 -47
  339. package/snack-bar/_snack-bar-theme.scss +4 -4
  340. package/snack-bar/index.d.ts +152 -185
  341. package/snack-bar/testing/index.d.ts +7 -9
  342. package/sort/_sort-theme.scss +3 -3
  343. package/sort/index.d.ts +61 -169
  344. package/sort/testing/index.d.ts +22 -25
  345. package/sort-direction.d-f4ce4649.d.ts +3 -0
  346. package/sort.d-c2b79a45.d.ts +87 -0
  347. package/stepper/_stepper-theme.scss +5 -5
  348. package/stepper/index.d.ts +115 -167
  349. package/stepper/testing/index.d.ts +43 -52
  350. package/table/_table-theme.scss +4 -4
  351. package/table/index.d.ts +97 -156
  352. package/table/testing/index.d.ts +64 -78
  353. package/tabs/_tabs-theme.scss +16 -16
  354. package/tabs/index.d.ts +309 -383
  355. package/tabs/testing/index.d.ts +67 -76
  356. package/timepicker/_timepicker-theme.scss +4 -4
  357. package/timepicker/index.d.ts +127 -160
  358. package/timepicker/testing/index.d.ts +20 -26
  359. package/toolbar/_toolbar-theme.scss +4 -4
  360. package/toolbar/index.d.ts +15 -26
  361. package/toolbar/testing/index.d.ts +13 -16
  362. package/tooltip/_tooltip-theme.scss +4 -4
  363. package/tooltip/index.d.ts +11 -355
  364. package/tooltip/testing/index.d.ts +7 -10
  365. package/tree/_tree-theme.scss +3 -3
  366. package/tree/index.d.ts +117 -163
  367. package/tree/testing/index.d.ts +52 -58
  368. /package/core/tokens/m3/definitions/{unused/_md-comp-filled-tonal-button.scss → _md-comp-filled-tonal-button.scss} +0 -0
@@ -1,385 +1,58 @@
1
- import { AbstractControl } from '@angular/forms';
2
- import { AfterContentInit } from '@angular/core';
3
- import { AfterViewChecked } from '@angular/core';
4
- import { AfterViewInit } from '@angular/core';
5
- import { ChangeDetectorRef } from '@angular/core';
6
- import { ComponentType } from '@angular/cdk/portal';
7
- import { ControlValueAccessor } from '@angular/forms';
8
- import { DateAdapter } from '@angular/material/core';
9
- import { Directionality } from '@angular/cdk/bidi';
10
- import { DoCheck } from '@angular/core';
11
- import { ElementRef } from '@angular/core';
12
- import { ErrorStateMatcher } from '@angular/material/core';
13
- import { EventEmitter } from '@angular/core';
14
- import { FactoryProvider } from '@angular/core';
15
- import { FocusOrigin } from '@angular/cdk/a11y';
16
- import { FormGroupDirective } from '@angular/forms';
17
1
  import * as i0 from '@angular/core';
18
- import * as i1 from '@angular/material/button';
19
- import * as i19 from '@angular/cdk/scrolling';
2
+ import { OnChanges, OnDestroy, AfterViewChecked, EventEmitter, SimpleChanges, FactoryProvider, AfterContentInit, ChangeDetectorRef, AfterViewInit, ElementRef, InjectionToken, OnInit, DoCheck, TemplateRef } from '@angular/core';
3
+ import { c as MatButton, n as MatButtonModule } from '../module.d-792a497c.js';
20
4
  import * as i2 from '@angular/cdk/overlay';
21
- import * as i3 from '@angular/cdk/a11y';
22
- import * as i4 from '@angular/cdk/portal';
23
- import * as i5 from '@angular/material/core';
24
- import { InjectionToken } from '@angular/core';
25
- import { MatButton } from '@angular/material/button';
26
- import { MatFormFieldControl } from '@angular/material/form-field';
27
- import { NgControl } from '@angular/forms';
28
- import { NgForm } from '@angular/forms';
29
- import { Observable } from 'rxjs';
30
- import { OnChanges } from '@angular/core';
31
- import { OnDestroy } from '@angular/core';
32
- import { OnInit } from '@angular/core';
33
- import { Overlay } from '@angular/cdk/overlay';
34
- import { Portal } from '@angular/cdk/portal';
35
- import { ScrollStrategy } from '@angular/cdk/overlay';
36
- import { SimpleChanges } from '@angular/core';
37
- import { Subject } from 'rxjs';
38
- import { TemplatePortal } from '@angular/cdk/portal';
39
- import { TemplateRef } from '@angular/core';
40
- import { ThemePalette } from '@angular/material/core';
41
- import { ValidationErrors } from '@angular/forms';
42
- import { Validator } from '@angular/forms';
43
- import { ValidatorFn } from '@angular/forms';
44
- import { WritableSignal } from '@angular/core';
45
-
46
- /**
47
- * Function that can be used to filter out dates from a calendar.
48
- * Datepicker can sometimes receive a null value as input for the date argument.
49
- * This doesn't represent a "null date" but rather signifies that no date has been selected yet in the calendar.
50
- */
51
- export declare type DateFilterFn<D> = (date: D | null) => boolean;
52
-
53
- /** Possible positions for the datepicker dropdown along the X axis. */
54
- export declare type DatepickerDropdownPositionX = 'start' | 'end';
55
-
56
- /** Possible positions for the datepicker dropdown along the Y axis. */
57
- export declare type DatepickerDropdownPositionY = 'above' | 'below';
58
-
59
- /** A class representing a range of dates. */
60
- export declare class DateRange<D> {
61
- /** The start date of the range. */
62
- readonly start: D | null;
63
- /** The end date of the range. */
64
- readonly end: D | null;
65
- /**
66
- * Ensures that objects with a `start` and `end` property can't be assigned to a variable that
67
- * expects a `DateRange`
68
- */
69
- private _disableStructuralEquivalency;
70
- constructor(
71
- /** The start date of the range. */
72
- start: D | null,
73
- /** The end date of the range. */
74
- end: D | null);
75
- }
76
-
77
- /**
78
- * Event emitted by the date selection model when its selection changes.
79
- * @docs-private
80
- */
81
- export declare interface DateSelectionModelChange<S> {
82
- /** New value for the selection. */
83
- selection: S;
84
- /** Object that triggered the change. */
85
- source: unknown;
86
- /** Previous value */
87
- oldValue?: S;
88
- }
89
-
90
- /** Provides the default date range selection behavior. */
91
- export declare class DefaultMatCalendarRangeStrategy<D> implements MatDateRangeSelectionStrategy<D> {
92
- private _dateAdapter;
93
- constructor(_dateAdapter: DateAdapter<D>);
94
- selectionFinished(date: D, currentRange: DateRange<D>): DateRange<D>;
95
- createPreview(activeDate: D | null, currentRange: DateRange<D>): DateRange<D>;
96
- createDrag(dragOrigin: D, originalRange: DateRange<D>, newDate: D): DateRange<D> | null;
97
- static ɵfac: i0.ɵɵFactoryDeclaration<DefaultMatCalendarRangeStrategy<any>, never>;
98
- static ɵprov: i0.ɵɵInjectableDeclaration<DefaultMatCalendarRangeStrategy<any>>;
99
- }
100
-
101
- /**
102
- * Conditionally picks the date type, if a DateRange is passed in.
103
- * @docs-private
104
- */
105
- export declare type ExtractDateTypeFromSelection<T> = T extends DateRange<infer D> ? D : NonNullable<T>;
106
-
107
- /**
108
- * When the multi-year view is first opened, the active year will be in view.
109
- * So we compute how many years are between the active year and the *slot* where our
110
- * "startingYear" will render when paged into view.
111
- */
112
- declare function getActiveOffset<D>(dateAdapter: DateAdapter<D>, activeDate: D, minDate: D | null, maxDate: D | null): number;
113
-
114
- declare namespace i10 {
115
- export {
116
- MAT_DATEPICKER_VALUE_ACCESSOR,
117
- MAT_DATEPICKER_VALIDATORS,
118
- MatDatepickerInput
119
- }
120
- }
121
-
122
- declare namespace i11 {
123
- export {
124
- MatDatepickerToggleIcon,
125
- MatDatepickerToggle
126
- }
127
- }
128
-
129
- declare namespace i12 {
130
- export {
131
- MatMonthView
132
- }
133
- }
134
-
135
- declare namespace i13 {
136
- export {
137
- MatYearView
138
- }
139
- }
140
-
141
- declare namespace i14 {
142
- export {
143
- isSameMultiYearView,
144
- getActiveOffset,
145
- yearsPerPage,
146
- yearsPerRow,
147
- MatMultiYearView
148
- }
149
- }
150
-
151
- declare namespace i15 {
152
- export {
153
- MatDateRangeInput
154
- }
155
- }
156
-
157
- declare namespace i16 {
158
- export {
159
- MatStartDate,
160
- MatEndDate
161
- }
162
- }
163
-
164
- declare namespace i17 {
165
- export {
166
- MatDateRangePickerInput,
167
- MatDateRangePicker
168
- }
169
- }
170
-
171
- declare namespace i18 {
172
- export {
173
- MatDatepickerApply,
174
- MatDatepickerCancel,
175
- MatDatepickerActions
176
- }
177
- }
178
-
179
- declare namespace i6 {
180
- export {
181
- MatCalendarView,
182
- MatCalendarHeader,
183
- MatCalendar
184
- }
185
- }
186
-
187
- declare namespace i7 {
188
- export {
189
- MatCalendarCellCssClasses,
190
- MatCalendarCellClassFunction,
191
- MatCalendarCell,
192
- MatCalendarUserEvent,
193
- MatCalendarBody
194
- }
195
- }
196
-
197
- declare namespace i8 {
198
- export {
199
- MatDatepicker
200
- }
201
- }
202
-
203
- declare namespace i9 {
204
- export {
205
- MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY,
206
- MAT_DATEPICKER_SCROLL_STRATEGY,
207
- DatepickerDropdownPositionX,
208
- DatepickerDropdownPositionY,
209
- MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY_PROVIDER,
210
- MatDatepickerContent,
211
- MatDatepickerControl,
212
- MatDatepickerPanel,
213
- MatDatepickerBase
214
- }
215
- }
216
-
217
- declare function isSameMultiYearView<D>(dateAdapter: DateAdapter<D>, date1: D, date2: D, minDate: D | null, maxDate: D | null): boolean;
218
-
219
- /** Injection token used to customize the date range selection behavior. */
220
- export declare const MAT_DATE_RANGE_SELECTION_STRATEGY: InjectionToken<MatDateRangeSelectionStrategy<any>>;
221
-
222
- /** Injection token that determines the scroll handling while the calendar is open. */
223
- export declare const MAT_DATEPICKER_SCROLL_STRATEGY: InjectionToken<() => ScrollStrategy>;
224
-
225
- /** @docs-private */
226
- export declare function MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY(overlay: Overlay): () => ScrollStrategy;
5
+ import { ScrollStrategy, Overlay } from '@angular/cdk/overlay';
6
+ import * as i1 from '@angular/cdk/a11y';
7
+ import { FocusOrigin } from '@angular/cdk/a11y';
8
+ import * as i3 from '@angular/cdk/portal';
9
+ import { ComponentType, Portal, TemplatePortal } from '@angular/cdk/portal';
10
+ import { M as MatCommonModule } from '../common-module.d-0e6515ae.js';
11
+ import { Observable, Subject } from 'rxjs';
12
+ import { D as DateAdapter$1 } from '../date-adapter.d-c6835d41.js';
13
+ import { DateAdapter } from '@angular/material/core';
14
+ import { T as ThemePalette } from '../palette.d-ec4a617c.js';
15
+ import { ControlValueAccessor, Validator, ValidatorFn, AbstractControl, ValidationErrors, NgForm, FormGroupDirective, NgControl } from '@angular/forms';
16
+ import { M as MatFormFieldControl } from '../form-field-control.d-eb86711c.js';
17
+ import { Directionality } from '@angular/cdk/bidi';
18
+ import { E as ErrorStateMatcher } from '../error-options.d-448d9046.js';
19
+ import * as i5 from '@angular/cdk/scrolling';
20
+ import '../index.d-0536b706.js';
21
+ import '../ripple.d-2fb57d04.js';
22
+ import '@angular/cdk/platform';
23
+ import '../ripple-loader.d-8aac2988.js';
227
24
 
228
- /** @docs-private */
229
- export declare const MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY_PROVIDER: {
230
- provide: InjectionToken<() => ScrollStrategy>;
231
- deps: (typeof Overlay)[];
232
- useFactory: typeof MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY;
25
+ /** Extra CSS classes that can be associated with a calendar cell. */
26
+ type MatCalendarCellCssClasses = string | string[] | Set<string> | {
27
+ [key: string]: any;
233
28
  };
234
-
235
- /** @docs-private */
236
- export declare const MAT_DATEPICKER_VALIDATORS: any;
237
-
238
- /** @docs-private */
239
- export declare const MAT_DATEPICKER_VALUE_ACCESSOR: any;
240
-
241
- /** @docs-private */
242
- export declare function MAT_RANGE_DATE_SELECTION_MODEL_FACTORY(parent: MatSingleDateSelectionModel<unknown>, adapter: DateAdapter<unknown>): MatSingleDateSelectionModel<unknown>;
243
-
244
- /**
245
- * Used to provide a range selection model to a component.
246
- * @docs-private
247
- */
248
- export declare const MAT_RANGE_DATE_SELECTION_MODEL_PROVIDER: FactoryProvider;
249
-
250
- /** @docs-private */
251
- export declare function MAT_SINGLE_DATE_SELECTION_MODEL_FACTORY(parent: MatSingleDateSelectionModel<unknown>, adapter: DateAdapter<unknown>): MatSingleDateSelectionModel<unknown>;
252
-
29
+ /** Function that can generate the extra classes that should be added to a calendar cell. */
30
+ type MatCalendarCellClassFunction<D> = (date: D, view: 'month' | 'year' | 'multi-year') => MatCalendarCellCssClasses;
253
31
  /**
254
- * Used to provide a single selection model to a component.
32
+ * An internal class that represents the data corresponding to a single calendar cell.
255
33
  * @docs-private
256
34
  */
257
- export declare const MAT_SINGLE_DATE_SELECTION_MODEL_PROVIDER: FactoryProvider;
258
-
259
- /** A calendar that is used as part of the datepicker. */
260
- export declare class MatCalendar<D> implements AfterContentInit, AfterViewChecked, OnDestroy, OnChanges {
261
- private _dateAdapter;
262
- private _dateFormats;
263
- private _changeDetectorRef;
264
- /** An input indicating the type of the header component, if set. */
265
- headerComponent: ComponentType<any>;
266
- /** A portal containing the header component type for this calendar. */
267
- _calendarHeaderPortal: Portal<any>;
268
- private _intlChanges;
269
- /**
270
- * Used for scheduling that focus should be moved to the active cell on the next tick.
271
- * We need to schedule it, rather than do it immediately, because we have to wait
272
- * for Angular to re-evaluate the view children.
273
- */
274
- private _moveFocusOnNextTick;
275
- /** A date representing the period (month or year) to start the calendar in. */
276
- get startAt(): D | null;
277
- set startAt(value: D | null);
278
- private _startAt;
279
- /** Whether the calendar should be started in month or year view. */
280
- startView: MatCalendarView;
281
- /** The currently selected date. */
282
- get selected(): DateRange<D> | D | null;
283
- set selected(value: DateRange<D> | D | null);
284
- private _selected;
285
- /** The minimum selectable date. */
286
- get minDate(): D | null;
287
- set minDate(value: D | null);
288
- private _minDate;
289
- /** The maximum selectable date. */
290
- get maxDate(): D | null;
291
- set maxDate(value: D | null);
292
- private _maxDate;
293
- /** Function used to filter which dates are selectable. */
294
- dateFilter: (date: D) => boolean;
295
- /** Function that can be used to add custom CSS classes to dates. */
296
- dateClass: MatCalendarCellClassFunction<D>;
297
- /** Start of the comparison range. */
298
- comparisonStart: D | null;
299
- /** End of the comparison range. */
300
- comparisonEnd: D | null;
301
- /** ARIA Accessible name of the `<input matStartDate/>` */
302
- startDateAccessibleName: string | null;
303
- /** ARIA Accessible name of the `<input matEndDate/>` */
304
- endDateAccessibleName: string | null;
305
- /** Emits when the currently selected date changes. */
306
- readonly selectedChange: EventEmitter<D | null>;
307
- /**
308
- * Emits the year chosen in multiyear view.
309
- * This doesn't imply a change on the selected date.
310
- */
311
- readonly yearSelected: EventEmitter<D>;
312
- /**
313
- * Emits the month chosen in year view.
314
- * This doesn't imply a change on the selected date.
315
- */
316
- readonly monthSelected: EventEmitter<D>;
317
- /**
318
- * Emits when the current view changes.
319
- */
320
- readonly viewChanged: EventEmitter<MatCalendarView>;
321
- /** Emits when any date is selected. */
322
- readonly _userSelection: EventEmitter<MatCalendarUserEvent<D | null>>;
323
- /** Emits a new date range value when the user completes a drag drop operation. */
324
- readonly _userDragDrop: EventEmitter<MatCalendarUserEvent<DateRange<D>>>;
325
- /** Reference to the current month view component. */
326
- monthView: MatMonthView<D>;
327
- /** Reference to the current year view component. */
328
- yearView: MatYearView<D>;
329
- /** Reference to the current multi-year view component. */
330
- multiYearView: MatMultiYearView<D>;
331
- /**
332
- * The current active date. This determines which time period is shown and which date is
333
- * highlighted when using keyboard navigation.
334
- */
335
- get activeDate(): D;
336
- set activeDate(value: D);
337
- private _clampedActiveDate;
338
- /** Whether the calendar is in month view. */
339
- get currentView(): MatCalendarView;
340
- set currentView(value: MatCalendarView);
341
- private _currentView;
342
- /** Origin of active drag, or null when dragging is not active. */
343
- protected _activeDrag: MatCalendarUserEvent<D> | null;
344
- /**
345
- * Emits whenever there is a state change that the header may need to respond to.
346
- */
347
- readonly stateChanges: Subject<void>;
348
- constructor(...args: unknown[]);
349
- ngAfterContentInit(): void;
350
- ngAfterViewChecked(): void;
351
- ngOnDestroy(): void;
352
- ngOnChanges(changes: SimpleChanges): void;
353
- /** Focuses the active date. */
354
- focusActiveCell(): void;
355
- /** Updates today's date after an update of the active date */
356
- updateTodaysDate(): void;
357
- /** Handles date selection in the month view. */
358
- _dateSelected(event: MatCalendarUserEvent<D | null>): void;
359
- /** Handles year selection in the multiyear view. */
360
- _yearSelectedInMultiYearView(normalizedYear: D): void;
361
- /** Handles month selection in the year view. */
362
- _monthSelectedInYearView(normalizedMonth: D): void;
363
- /** Handles year/month selection in the multi-year/year views. */
364
- _goToDateInView(date: D, view: 'month' | 'year' | 'multi-year'): void;
365
- /** Called when the user starts dragging to change a date range. */
366
- _dragStarted(event: MatCalendarUserEvent<D>): void;
367
- /**
368
- * Called when a drag completes. It may end in cancelation or in the selection
369
- * of a new range.
370
- */
371
- _dragEnded(event: MatCalendarUserEvent<DateRange<D> | null>): void;
372
- /** Returns the component instance that corresponds to the current calendar view. */
373
- private _getCurrentViewComponent;
374
- static ɵfac: i0.ɵɵFactoryDeclaration<MatCalendar<any>, never>;
375
- static ɵcmp: i0.ɵɵComponentDeclaration<MatCalendar<any>, "mat-calendar", ["matCalendar"], { "headerComponent": { "alias": "headerComponent"; "required": false; }; "startAt": { "alias": "startAt"; "required": false; }; "startView": { "alias": "startView"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; "minDate": { "alias": "minDate"; "required": false; }; "maxDate": { "alias": "maxDate"; "required": false; }; "dateFilter": { "alias": "dateFilter"; "required": false; }; "dateClass": { "alias": "dateClass"; "required": false; }; "comparisonStart": { "alias": "comparisonStart"; "required": false; }; "comparisonEnd": { "alias": "comparisonEnd"; "required": false; }; "startDateAccessibleName": { "alias": "startDateAccessibleName"; "required": false; }; "endDateAccessibleName": { "alias": "endDateAccessibleName"; "required": false; }; }, { "selectedChange": "selectedChange"; "yearSelected": "yearSelected"; "monthSelected": "monthSelected"; "viewChanged": "viewChanged"; "_userSelection": "_userSelection"; "_userDragDrop": "_userDragDrop"; }, never, never, true, never>;
35
+ declare class MatCalendarCell<D = any> {
36
+ value: number;
37
+ displayValue: string;
38
+ ariaLabel: string;
39
+ enabled: boolean;
40
+ cssClasses: MatCalendarCellCssClasses;
41
+ compareValue: number;
42
+ rawValue?: D | undefined;
43
+ readonly id: number;
44
+ constructor(value: number, displayValue: string, ariaLabel: string, enabled: boolean, cssClasses?: MatCalendarCellCssClasses, compareValue?: number, rawValue?: D | undefined);
45
+ }
46
+ /** Event emitted when a date inside the calendar is triggered as a result of a user action. */
47
+ interface MatCalendarUserEvent<D> {
48
+ value: D;
49
+ event: Event;
376
50
  }
377
-
378
51
  /**
379
52
  * An internal component used to display calendar data in a table.
380
53
  * @docs-private
381
54
  */
382
- export declare class MatCalendarBody<D = any> implements OnChanges, OnDestroy, AfterViewChecked {
55
+ declare class MatCalendarBody<D = any> implements OnChanges, OnDestroy, AfterViewChecked {
383
56
  private _elementRef;
384
57
  private _ngZone;
385
58
  private _platform;
@@ -558,429 +231,692 @@ export declare class MatCalendarBody<D = any> implements OnChanges, OnDestroy, A
558
231
  static ɵcmp: i0.ɵɵComponentDeclaration<MatCalendarBody<any>, "[mat-calendar-body]", ["matCalendarBody"], { "label": { "alias": "label"; "required": false; }; "rows": { "alias": "rows"; "required": false; }; "todayValue": { "alias": "todayValue"; "required": false; }; "startValue": { "alias": "startValue"; "required": false; }; "endValue": { "alias": "endValue"; "required": false; }; "labelMinRequiredCells": { "alias": "labelMinRequiredCells"; "required": false; }; "numCols": { "alias": "numCols"; "required": false; }; "activeCell": { "alias": "activeCell"; "required": false; }; "isRange": { "alias": "isRange"; "required": false; }; "cellAspectRatio": { "alias": "cellAspectRatio"; "required": false; }; "comparisonStart": { "alias": "comparisonStart"; "required": false; }; "comparisonEnd": { "alias": "comparisonEnd"; "required": false; }; "previewStart": { "alias": "previewStart"; "required": false; }; "previewEnd": { "alias": "previewEnd"; "required": false; }; "startDateAccessibleName": { "alias": "startDateAccessibleName"; "required": false; }; "endDateAccessibleName": { "alias": "endDateAccessibleName"; "required": false; }; }, { "selectedValueChange": "selectedValueChange"; "previewChange": "previewChange"; "activeDateChange": "activeDateChange"; "dragStarted": "dragStarted"; "dragEnded": "dragEnded"; }, never, never, true, never>;
559
232
  }
560
233
 
561
- /**
562
- * An internal class that represents the data corresponding to a single calendar cell.
563
- * @docs-private
564
- */
565
- export declare class MatCalendarCell<D = any> {
566
- value: number;
567
- displayValue: string;
568
- ariaLabel: string;
569
- enabled: boolean;
570
- cssClasses: MatCalendarCellCssClasses;
571
- compareValue: number;
572
- rawValue?: D | undefined;
573
- readonly id: number;
574
- constructor(value: number, displayValue: string, ariaLabel: string, enabled: boolean, cssClasses?: MatCalendarCellCssClasses, compareValue?: number, rawValue?: D | undefined);
575
- }
576
-
577
- /** Function that can generate the extra classes that should be added to a calendar cell. */
578
- export declare type MatCalendarCellClassFunction<D> = (date: D, view: 'month' | 'year' | 'multi-year') => MatCalendarCellCssClasses;
579
-
580
- /** Extra CSS classes that can be associated with a calendar cell. */
581
- export declare type MatCalendarCellCssClasses = string | string[] | Set<string> | {
582
- [key: string]: any;
583
- };
584
-
585
- /** Default header for MatCalendar */
586
- export declare class MatCalendarHeader<D> {
587
- private _intl;
588
- calendar: MatCalendar<D>;
589
- private _dateAdapter;
590
- private _dateFormats;
591
- constructor(...args: unknown[]);
592
- /** The display text for the current calendar view. */
593
- get periodButtonText(): string;
594
- /** The aria description for the current calendar view. */
595
- get periodButtonDescription(): string;
596
- /** The `aria-label` for changing the calendar view. */
597
- get periodButtonLabel(): string;
598
- /** The label for the previous button. */
599
- get prevButtonLabel(): string;
600
- /** The label for the next button. */
601
- get nextButtonLabel(): string;
602
- /** Handles user clicks on the period label. */
603
- currentPeriodClicked(): void;
604
- /** Handles user clicks on the previous button. */
605
- previousClicked(): void;
606
- /** Handles user clicks on the next button. */
607
- nextClicked(): void;
608
- /** Whether the previous period button is enabled. */
609
- previousEnabled(): boolean;
610
- /** Whether the next period button is enabled. */
611
- nextEnabled(): boolean;
612
- /** Whether the two dates represent the same view in the current view mode (month or year). */
613
- private _isSameView;
234
+ /** A class representing a range of dates. */
235
+ declare class DateRange<D> {
236
+ /** The start date of the range. */
237
+ readonly start: D | null;
238
+ /** The end date of the range. */
239
+ readonly end: D | null;
614
240
  /**
615
- * Format two individual labels for the minimum year and maximum year available in the multi-year
616
- * calendar view. Returns an array of two strings where the first string is the formatted label
617
- * for the minimum year, and the second string is the formatted label for the maximum year.
241
+ * Ensures that objects with a `start` and `end` property can't be assigned to a variable that
242
+ * expects a `DateRange`
618
243
  */
619
- private _formatMinAndMaxYearLabels;
620
- _periodButtonLabelId: string;
621
- static ɵfac: i0.ɵɵFactoryDeclaration<MatCalendarHeader<any>, never>;
622
- static ɵcmp: i0.ɵɵComponentDeclaration<MatCalendarHeader<any>, "mat-calendar-header", ["matCalendarHeader"], {}, {}, never, ["*"], true, never>;
623
- }
624
-
625
- /** Event emitted when a date inside the calendar is triggered as a result of a user action. */
626
- export declare interface MatCalendarUserEvent<D> {
627
- value: D;
628
- event: Event;
244
+ private _disableStructuralEquivalency;
245
+ constructor(
246
+ /** The start date of the range. */
247
+ start: D | null,
248
+ /** The end date of the range. */
249
+ end: D | null);
629
250
  }
630
-
631
251
  /**
632
- * Possible views for the calendar.
252
+ * Conditionally picks the date type, if a DateRange is passed in.
633
253
  * @docs-private
634
254
  */
635
- export declare type MatCalendarView = 'month' | 'year' | 'multi-year';
636
-
637
- /** Component responsible for managing the datepicker popup/dialog. */
638
- export declare class MatDatepicker<D> extends MatDatepickerBase<MatDatepickerControl<D>, D | null, D> {
639
- static ɵfac: i0.ɵɵFactoryDeclaration<MatDatepicker<any>, never>;
640
- static ɵcmp: i0.ɵɵComponentDeclaration<MatDatepicker<any>, "mat-datepicker", ["matDatepicker"], {}, {}, never, never, true, never>;
255
+ type ExtractDateTypeFromSelection<T> = T extends DateRange<infer D> ? D : NonNullable<T>;
256
+ /**
257
+ * Event emitted by the date selection model when its selection changes.
258
+ * @docs-private
259
+ */
260
+ interface DateSelectionModelChange<S> {
261
+ /** New value for the selection. */
262
+ selection: S;
263
+ /** Object that triggered the change. */
264
+ source: unknown;
265
+ /** Previous value */
266
+ oldValue?: S;
641
267
  }
642
-
643
268
  /**
644
- * Container that can be used to project a row of action buttons
645
- * to the bottom of a datepicker or date range picker.
269
+ * A selection model containing a date selection.
270
+ * @docs-private
646
271
  */
647
- export declare class MatDatepickerActions implements AfterViewInit, OnDestroy {
648
- private _datepicker;
649
- private _viewContainerRef;
650
- _template: TemplateRef<unknown>;
651
- private _portal;
652
- constructor(...args: unknown[]);
653
- ngAfterViewInit(): void;
272
+ declare abstract class MatDateSelectionModel<S, D = ExtractDateTypeFromSelection<S>> implements OnDestroy {
273
+ /** The current selection. */
274
+ readonly selection: S;
275
+ protected _adapter: DateAdapter<D>;
276
+ private readonly _selectionChanged;
277
+ /** Emits when the selection has changed. */
278
+ selectionChanged: Observable<DateSelectionModelChange<S>>;
279
+ protected constructor(
280
+ /** The current selection. */
281
+ selection: S, _adapter: DateAdapter<D>);
282
+ /**
283
+ * Updates the current selection in the model.
284
+ * @param value New selection that should be assigned.
285
+ * @param source Object that triggered the selection change.
286
+ */
287
+ updateSelection(value: S, source: unknown): void;
654
288
  ngOnDestroy(): void;
655
- static ɵfac: i0.ɵɵFactoryDeclaration<MatDatepickerActions, never>;
656
- static ɵcmp: i0.ɵɵComponentDeclaration<MatDatepickerActions, "mat-datepicker-actions, mat-date-range-picker-actions", never, {}, {}, never, ["*"], true, never>;
289
+ protected _isValidDateInstance(date: D): boolean;
290
+ /** Adds a date to the current selection. */
291
+ abstract add(date: D | null): void;
292
+ /** Checks whether the current selection is valid. */
293
+ abstract isValid(): boolean;
294
+ /** Checks whether the current selection is complete. */
295
+ abstract isComplete(): boolean;
296
+ /** Clones the selection model. */
297
+ abstract clone(): MatDateSelectionModel<S, D>;
298
+ static ɵfac: i0.ɵɵFactoryDeclaration<MatDateSelectionModel<any, any>, never>;
299
+ static ɵprov: i0.ɵɵInjectableDeclaration<MatDateSelectionModel<any, any>>;
657
300
  }
658
-
659
301
  /**
660
- * Animations used by the Material datepicker.
302
+ * A selection model that contains a single date.
661
303
  * @docs-private
662
- * @deprecated No longer used, will be removed.
663
- * @breaking-change 21.0.0
664
304
  */
665
- export declare const matDatepickerAnimations: {
666
- readonly transformPanel: any;
667
- readonly fadeInCalendar: any;
668
- };
669
-
670
- /** Button that will close the datepicker and assign the current selection to the data model. */
671
- export declare class MatDatepickerApply {
672
- private _datepicker;
673
- constructor(...args: unknown[]);
674
- _applySelection(): void;
675
- static ɵfac: i0.ɵɵFactoryDeclaration<MatDatepickerApply, never>;
676
- static ɵdir: i0.ɵɵDirectiveDeclaration<MatDatepickerApply, "[matDatepickerApply], [matDateRangePickerApply]", never, {}, {}, never, never, true, never>;
677
- }
678
-
679
- /** Base class for a datepicker. */
680
- declare abstract class MatDatepickerBase<C extends MatDatepickerControl<D>, S, D = ExtractDateTypeFromSelection<S>> implements MatDatepickerPanel<C, S, D>, OnDestroy, OnChanges {
681
- private _overlay;
682
- private _viewContainerRef;
683
- private _dateAdapter;
684
- private _dir;
685
- private _model;
686
- private _scrollStrategy;
687
- private _inputStateChanges;
688
- private _document;
689
- /** An input indicating the type of the custom header component for the calendar, if set. */
690
- calendarHeaderComponent: ComponentType<any>;
691
- /** The date to open the calendar to initially. */
692
- get startAt(): D | null;
693
- set startAt(value: D | null);
694
- private _startAt;
695
- /** The view that the calendar should start in. */
696
- startView: 'month' | 'year' | 'multi-year';
305
+ declare class MatSingleDateSelectionModel<D> extends MatDateSelectionModel<D | null, D> {
306
+ constructor(adapter: DateAdapter<D>);
697
307
  /**
698
- * Theme color of the datepicker's calendar. This API is supported in M2 themes only, it
699
- * has no effect in M3 themes. For color customization in M3, see https://material.angular.io/components/datepicker/styling.
700
- *
701
- * For information on applying color variants in M3, see
702
- * https://material.angular.io/guide/material-2-theming#optional-add-backwards-compatibility-styles-for-color-variants
308
+ * Adds a date to the current selection. In the case of a single date selection, the added date
309
+ * simply overwrites the previous selection
703
310
  */
704
- get color(): ThemePalette;
705
- set color(value: ThemePalette);
706
- _color: ThemePalette;
311
+ add(date: D | null): void;
312
+ /** Checks whether the current selection is valid. */
313
+ isValid(): boolean;
707
314
  /**
708
- * Whether the calendar UI is in touch mode. In touch mode the calendar opens in a dialog rather
709
- * than a dropdown and elements have more padding to allow for bigger touch targets.
315
+ * Checks whether the current selection is complete. In the case of a single date selection, this
316
+ * is true if the current selection is not null.
710
317
  */
711
- touchUi: boolean;
712
- /** Whether the datepicker pop-up should be disabled. */
713
- get disabled(): boolean;
714
- set disabled(value: boolean);
715
- private _disabled;
716
- /** Preferred position of the datepicker in the X axis. */
717
- xPosition: DatepickerDropdownPositionX;
718
- /** Preferred position of the datepicker in the Y axis. */
719
- yPosition: DatepickerDropdownPositionY;
318
+ isComplete(): boolean;
319
+ /** Clones the selection model. */
320
+ clone(): MatSingleDateSelectionModel<D>;
321
+ static ɵfac: i0.ɵɵFactoryDeclaration<MatSingleDateSelectionModel<any>, never>;
322
+ static ɵprov: i0.ɵɵInjectableDeclaration<MatSingleDateSelectionModel<any>>;
323
+ }
324
+ /**
325
+ * A selection model that contains a date range.
326
+ * @docs-private
327
+ */
328
+ declare class MatRangeDateSelectionModel<D> extends MatDateSelectionModel<DateRange<D>, D> {
329
+ constructor(adapter: DateAdapter<D>);
720
330
  /**
721
- * Whether to restore focus to the previously-focused element when the calendar is closed.
722
- * Note that automatic focus restoration is an accessibility feature and it is recommended that
723
- * you provide your own equivalent, if you decide to turn it off.
331
+ * Adds a date to the current selection. In the case of a date range selection, the added date
332
+ * fills in the next `null` value in the range. If both the start and the end already have a date,
333
+ * the selection is reset so that the given date is the new `start` and the `end` is null.
724
334
  */
725
- restoreFocus: boolean;
335
+ add(date: D | null): void;
336
+ /** Checks whether the current selection is valid. */
337
+ isValid(): boolean;
726
338
  /**
727
- * Emits selected year in multiyear view.
728
- * This doesn't imply a change on the selected date.
339
+ * Checks whether the current selection is complete. In the case of a date range selection, this
340
+ * is true if the current selection has a non-null `start` and `end`.
729
341
  */
730
- readonly yearSelected: EventEmitter<D>;
342
+ isComplete(): boolean;
343
+ /** Clones the selection model. */
344
+ clone(): MatRangeDateSelectionModel<D>;
345
+ static ɵfac: i0.ɵɵFactoryDeclaration<MatRangeDateSelectionModel<any>, never>;
346
+ static ɵprov: i0.ɵɵInjectableDeclaration<MatRangeDateSelectionModel<any>>;
347
+ }
348
+ /**
349
+ * @docs-private
350
+ * @deprecated No longer used, will be removed.
351
+ * @breaking-change 21.0.0
352
+ */
353
+ declare function MAT_SINGLE_DATE_SELECTION_MODEL_FACTORY(parent: MatSingleDateSelectionModel<unknown>, adapter: DateAdapter<unknown>): MatSingleDateSelectionModel<unknown>;
354
+ /**
355
+ * Used to provide a single selection model to a component.
356
+ * @docs-private
357
+ * @deprecated No longer used, will be removed.
358
+ * @breaking-change 21.0.0
359
+ */
360
+ declare const MAT_SINGLE_DATE_SELECTION_MODEL_PROVIDER: FactoryProvider;
361
+ /**
362
+ * @docs-private
363
+ * @deprecated No longer used, will be removed.
364
+ * @breaking-change 21.0.0
365
+ */
366
+ declare function MAT_RANGE_DATE_SELECTION_MODEL_FACTORY(parent: MatSingleDateSelectionModel<unknown>, adapter: DateAdapter<unknown>): MatSingleDateSelectionModel<unknown>;
367
+ /**
368
+ * Used to provide a range selection model to a component.
369
+ * @docs-private
370
+ * @deprecated No longer used, will be removed.
371
+ * @breaking-change 21.0.0
372
+ */
373
+ declare const MAT_RANGE_DATE_SELECTION_MODEL_PROVIDER: FactoryProvider;
374
+
375
+ /**
376
+ * An internal component used to display a single month in the datepicker.
377
+ * @docs-private
378
+ */
379
+ declare class MatMonthView<D> implements AfterContentInit, OnChanges, OnDestroy {
380
+ readonly _changeDetectorRef: ChangeDetectorRef;
381
+ private _dateFormats;
382
+ _dateAdapter: DateAdapter$1<D, any>;
383
+ private _dir;
384
+ private _rangeStrategy;
385
+ private _rerenderSubscription;
386
+ /** Flag used to filter out space/enter keyup events that originated outside of the view. */
387
+ private _selectionKeyPressed;
731
388
  /**
732
- * Emits selected month in year view.
733
- * This doesn't imply a change on the selected date.
389
+ * The date to display in this month view (everything other than the month and year is ignored).
734
390
  */
735
- readonly monthSelected: EventEmitter<D>;
736
- /**
737
- * Emits when the current view changes.
738
- */
739
- readonly viewChanged: EventEmitter<MatCalendarView>;
740
- /** Function that can be used to add custom CSS classes to dates. */
741
- dateClass: MatCalendarCellClassFunction<D>;
742
- /** Emits when the datepicker has been opened. */
743
- readonly openedStream: EventEmitter<void>;
744
- /** Emits when the datepicker has been closed. */
745
- readonly closedStream: EventEmitter<void>;
746
- /** Classes to be passed to the date picker panel. */
747
- get panelClass(): string | string[];
748
- set panelClass(value: string | string[]);
749
- private _panelClass;
750
- /** Whether the calendar is open. */
751
- get opened(): boolean;
752
- set opened(value: boolean);
753
- private _opened;
754
- /** The id for the datepicker calendar. */
755
- id: string;
391
+ get activeDate(): D;
392
+ set activeDate(value: D);
393
+ private _activeDate;
394
+ /** The currently selected date. */
395
+ get selected(): DateRange<D> | D | null;
396
+ set selected(value: DateRange<D> | D | null);
397
+ private _selected;
756
398
  /** The minimum selectable date. */
757
- _getMinDate(): D | null;
399
+ get minDate(): D | null;
400
+ set minDate(value: D | null);
401
+ private _minDate;
758
402
  /** The maximum selectable date. */
759
- _getMaxDate(): D | null;
760
- _getDateFilter(): DateFilterFn<D>;
761
- /** A reference to the overlay into which we've rendered the calendar. */
762
- private _overlayRef;
763
- /** Reference to the component instance rendered in the overlay. */
764
- private _componentRef;
765
- /** The element that was focused before the datepicker was opened. */
766
- private _focusedElementBeforeOpen;
767
- /** Unique class that will be added to the backdrop so that the test harnesses can look it up. */
768
- private _backdropHarnessClass;
769
- /** Currently-registered actions portal. */
770
- private _actionsPortal;
771
- /** The input element this datepicker is associated with. */
772
- datepickerInput: C;
773
- /** Emits when the datepicker's state changes. */
774
- readonly stateChanges: Subject<void>;
775
- private _injector;
776
- private readonly _changeDetectorRef;
403
+ get maxDate(): D | null;
404
+ set maxDate(value: D | null);
405
+ private _maxDate;
406
+ /** Function used to filter which dates are selectable. */
407
+ dateFilter: (date: D) => boolean;
408
+ /** Function that can be used to add custom CSS classes to dates. */
409
+ dateClass: MatCalendarCellClassFunction<D>;
410
+ /** Start of the comparison range. */
411
+ comparisonStart: D | null;
412
+ /** End of the comparison range. */
413
+ comparisonEnd: D | null;
414
+ /** ARIA Accessible name of the `<input matStartDate/>` */
415
+ startDateAccessibleName: string | null;
416
+ /** ARIA Accessible name of the `<input matEndDate/>` */
417
+ endDateAccessibleName: string | null;
418
+ /** Origin of active drag, or null when dragging is not active. */
419
+ activeDrag: MatCalendarUserEvent<D> | null;
420
+ /** Emits when a new date is selected. */
421
+ readonly selectedChange: EventEmitter<D | null>;
422
+ /** Emits when any date is selected. */
423
+ readonly _userSelection: EventEmitter<MatCalendarUserEvent<D | null>>;
424
+ /** Emits when the user initiates a date range drag via mouse or touch. */
425
+ readonly dragStarted: EventEmitter<MatCalendarUserEvent<D>>;
426
+ /**
427
+ * Emits when the user completes or cancels a date range drag.
428
+ * Emits null when the drag was canceled or the newly selected date range if completed.
429
+ */
430
+ readonly dragEnded: EventEmitter<MatCalendarUserEvent<DateRange<D> | null>>;
431
+ /** Emits when any date is activated. */
432
+ readonly activeDateChange: EventEmitter<D>;
433
+ /** The body of calendar table */
434
+ _matCalendarBody: MatCalendarBody;
435
+ /** The label for this month (e.g. "January 2017"). */
436
+ _monthLabel: string;
437
+ /** Grid of calendar cells representing the dates of the month. */
438
+ _weeks: MatCalendarCell[][];
439
+ /** The number of blank cells in the first row before the 1st of the month. */
440
+ _firstWeekOffset: number;
441
+ /** Start value of the currently-shown date range. */
442
+ _rangeStart: number | null;
443
+ /** End value of the currently-shown date range. */
444
+ _rangeEnd: number | null;
445
+ /** Start value of the currently-shown comparison date range. */
446
+ _comparisonRangeStart: number | null;
447
+ /** End value of the currently-shown comparison date range. */
448
+ _comparisonRangeEnd: number | null;
449
+ /** Start of the preview range. */
450
+ _previewStart: number | null;
451
+ /** End of the preview range. */
452
+ _previewEnd: number | null;
453
+ /** Whether the user is currently selecting a range of dates. */
454
+ _isRange: boolean;
455
+ /** The date of the month that today falls on. Null if today is in another month. */
456
+ _todayDate: number | null;
457
+ /** The names of the weekdays. */
458
+ _weekdays: {
459
+ long: string;
460
+ narrow: string;
461
+ id: number;
462
+ }[];
777
463
  constructor(...args: unknown[]);
464
+ ngAfterContentInit(): void;
778
465
  ngOnChanges(changes: SimpleChanges): void;
779
466
  ngOnDestroy(): void;
780
- /** Selects the given date */
781
- select(date: D): void;
782
- /** Emits the selected year in multiyear view */
783
- _selectYear(normalizedYear: D): void;
784
- /** Emits selected month in year view */
785
- _selectMonth(normalizedMonth: D): void;
786
- /** Emits changed view */
787
- _viewChanged(view: MatCalendarView): void;
467
+ /** Handles when a new date is selected. */
468
+ _dateSelected(event: MatCalendarUserEvent<number>): void;
788
469
  /**
789
- * Register an input with this datepicker.
790
- * @param input The datepicker input to register with this datepicker.
791
- * @returns Selection model that the input should hook itself up to.
470
+ * Takes the index of a calendar body cell wrapped in an event as argument. For the date that
471
+ * corresponds to the given cell, set `activeDate` to that date and fire `activeDateChange` with
472
+ * that date.
473
+ *
474
+ * This function is used to match each component's model of the active date with the calendar
475
+ * body cell that was focused. It updates its value of `activeDate` synchronously and updates the
476
+ * parent's value asynchronously via the `activeDateChange` event. The child component receives an
477
+ * updated value asynchronously via the `activeCell` Input.
792
478
  */
793
- registerInput(input: C): MatDateSelectionModel<S, D>;
479
+ _updateActiveDate(event: MatCalendarUserEvent<number>): void;
480
+ /** Handles keydown events on the calendar body when calendar is in month view. */
481
+ _handleCalendarBodyKeydown(event: KeyboardEvent): void;
482
+ /** Handles keyup events on the calendar body when calendar is in month view. */
483
+ _handleCalendarBodyKeyup(event: KeyboardEvent): void;
484
+ /** Initializes this month view. */
485
+ _init(): void;
486
+ /** Focuses the active cell after the microtask queue is empty. */
487
+ _focusActiveCell(movePreview?: boolean): void;
488
+ /** Focuses the active cell after change detection has run and the microtask queue is empty. */
489
+ _focusActiveCellAfterViewChecked(): void;
490
+ /** Called when the user has activated a new cell and the preview needs to be updated. */
491
+ _previewChanged({ event, value: cell }: MatCalendarUserEvent<MatCalendarCell<D> | null>): void;
794
492
  /**
795
- * Registers a portal containing action buttons with the datepicker.
796
- * @param portal Portal to be registered.
493
+ * Called when the user has ended a drag. If the drag/drop was successful,
494
+ * computes and emits the new range selection.
797
495
  */
798
- registerActions(portal: TemplatePortal): void;
496
+ protected _dragEnded(event: MatCalendarUserEvent<D | null>): void;
799
497
  /**
800
- * Removes a portal containing action buttons from the datepicker.
801
- * @param portal Portal to be removed.
498
+ * Takes a day of the month and returns a new date in the same month and year as the currently
499
+ * active date. The returned date will have the same day of the month as the argument date.
802
500
  */
803
- removeActions(portal: TemplatePortal): void;
804
- /** Open the calendar. */
805
- open(): void;
806
- /** Close the calendar. */
807
- close(): void;
808
- /** Applies the current pending selection on the overlay to the model. */
809
- _applyPendingSelection(): void;
810
- /** Forwards relevant values from the datepicker to the datepicker content inside the overlay. */
811
- protected _forwardContentValues(instance: MatDatepickerContent<S, D>): void;
812
- /** Opens the overlay with the calendar. */
813
- private _openOverlay;
814
- /** Destroys the current overlay. */
815
- private _destroyOverlay;
816
- /** Gets a position strategy that will open the calendar as a dropdown. */
817
- private _getDialogStrategy;
818
- /** Gets a position strategy that will open the calendar as a dropdown. */
819
- private _getDropdownStrategy;
820
- /** Sets the positions of the datepicker in dropdown mode based on the current configuration. */
821
- private _setConnectedPositions;
822
- /** Gets an observable that will emit when the overlay is supposed to be closed. */
823
- private _getCloseStream;
824
- static ɵfac: i0.ɵɵFactoryDeclaration<MatDatepickerBase<any, any, any>, never>;
825
- static ɵdir: i0.ɵɵDirectiveDeclaration<MatDatepickerBase<any, any, any>, never, never, { "calendarHeaderComponent": { "alias": "calendarHeaderComponent"; "required": false; }; "startAt": { "alias": "startAt"; "required": false; }; "startView": { "alias": "startView"; "required": false; }; "color": { "alias": "color"; "required": false; }; "touchUi": { "alias": "touchUi"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "xPosition": { "alias": "xPosition"; "required": false; }; "yPosition": { "alias": "yPosition"; "required": false; }; "restoreFocus": { "alias": "restoreFocus"; "required": false; }; "dateClass": { "alias": "dateClass"; "required": false; }; "panelClass": { "alias": "panelClass"; "required": false; }; "opened": { "alias": "opened"; "required": false; }; }, { "yearSelected": "yearSelected"; "monthSelected": "monthSelected"; "viewChanged": "viewChanged"; "openedStream": "opened"; "closedStream": "closed"; }, never, never, true, never>;
826
- static ngAcceptInputType_touchUi: unknown;
827
- static ngAcceptInputType_disabled: unknown;
828
- static ngAcceptInputType_restoreFocus: unknown;
829
- static ngAcceptInputType_opened: unknown;
830
- }
831
-
832
- /** Button that will close the datepicker and discard the current selection. */
833
- export declare class MatDatepickerCancel {
834
- _datepicker: MatDatepickerBase<MatDatepickerControl<any>, unknown, {}>;
835
- constructor(...args: unknown[]);
836
- static ɵfac: i0.ɵɵFactoryDeclaration<MatDatepickerCancel, never>;
837
- static ɵdir: i0.ɵɵDirectiveDeclaration<MatDatepickerCancel, "[matDatepickerCancel], [matDateRangePickerCancel]", never, {}, {}, never, never, true, never>;
501
+ private _getDateFromDayOfMonth;
502
+ /** Initializes the weekdays. */
503
+ private _initWeekdays;
504
+ /** Creates MatCalendarCells for the dates in this month. */
505
+ private _createWeekCells;
506
+ /** Date filter for the month */
507
+ private _shouldEnableDate;
508
+ /**
509
+ * Gets the date in this month that the given Date falls on.
510
+ * Returns null if the given Date is in another month.
511
+ */
512
+ private _getDateInCurrentMonth;
513
+ /** Checks whether the 2 dates are non-null and fall within the same month of the same year. */
514
+ private _hasSameMonthAndYear;
515
+ /** Gets the value that will be used to one cell to another. */
516
+ private _getCellCompareValue;
517
+ /** Determines whether the user has the RTL layout direction. */
518
+ private _isRtl;
519
+ /** Sets the current range based on a model value. */
520
+ private _setRanges;
521
+ /** Gets whether a date can be selected in the month view. */
522
+ private _canSelect;
523
+ /** Clears out preview state. */
524
+ private _clearPreview;
525
+ static ɵfac: i0.ɵɵFactoryDeclaration<MatMonthView<any>, never>;
526
+ static ɵcmp: i0.ɵɵComponentDeclaration<MatMonthView<any>, "mat-month-view", ["matMonthView"], { "activeDate": { "alias": "activeDate"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; "minDate": { "alias": "minDate"; "required": false; }; "maxDate": { "alias": "maxDate"; "required": false; }; "dateFilter": { "alias": "dateFilter"; "required": false; }; "dateClass": { "alias": "dateClass"; "required": false; }; "comparisonStart": { "alias": "comparisonStart"; "required": false; }; "comparisonEnd": { "alias": "comparisonEnd"; "required": false; }; "startDateAccessibleName": { "alias": "startDateAccessibleName"; "required": false; }; "endDateAccessibleName": { "alias": "endDateAccessibleName"; "required": false; }; "activeDrag": { "alias": "activeDrag"; "required": false; }; }, { "selectedChange": "selectedChange"; "_userSelection": "_userSelection"; "dragStarted": "dragStarted"; "dragEnded": "dragEnded"; "activeDateChange": "activeDateChange"; }, never, never, true, never>;
838
527
  }
839
528
 
529
+ declare const yearsPerPage = 24;
530
+ declare const yearsPerRow = 4;
840
531
  /**
841
- * Component used as the content for the datepicker overlay. We use this instead of using
842
- * MatCalendar directly as the content so we can control the initial focus. This also gives us a
843
- * place to put additional features of the overlay that are not part of the calendar itself in the
844
- * future. (e.g. confirmation buttons).
532
+ * An internal component used to display a year selector in the datepicker.
845
533
  * @docs-private
846
534
  */
847
- export declare class MatDatepickerContent<S, D = ExtractDateTypeFromSelection<S>> implements AfterViewInit, OnDestroy {
848
- protected _elementRef: ElementRef<HTMLElement>;
849
- protected _animationsDisabled: boolean;
535
+ declare class MatMultiYearView<D> implements AfterContentInit, OnDestroy {
850
536
  private _changeDetectorRef;
851
- private _globalModel;
852
- private _dateAdapter;
853
- private _ngZone;
854
- private _rangeSelectionStrategy;
855
- private _stateChanges;
856
- private _model;
857
- private _eventCleanups;
858
- private _animationFallback;
859
- /** Reference to the internal calendar component. */
860
- _calendar: MatCalendar<D>;
861
- /**
862
- * Theme color of the internal calendar. This API is supported in M2 themes
863
- * only, it has no effect in M3 themes. For color customization in M3, see https://material.angular.io/components/datepicker/styling.
864
- *
865
- * For information on applying color variants in M3, see
866
- * https://material.angular.io/guide/material-2-theming#optional-add-backwards-compatibility-styles-for-color-variants
867
- */
868
- color: ThemePalette;
869
- /** Reference to the datepicker that created the overlay. */
870
- datepicker: MatDatepickerBase<any, S, D>;
871
- /** Start of the comparison range. */
872
- comparisonStart: D | null;
873
- /** End of the comparison range. */
874
- comparisonEnd: D | null;
875
- /** ARIA Accessible name of the `<input matStartDate/>` */
876
- startDateAccessibleName: string | null;
877
- /** ARIA Accessible name of the `<input matEndDate/>` */
878
- endDateAccessibleName: string | null;
879
- /** Whether the datepicker is above or below the input. */
880
- _isAbove: boolean;
881
- /** Emits when an animation has finished. */
882
- readonly _animationDone: Subject<void>;
883
- /** Whether there is an in-progress animation. */
884
- _isAnimating: boolean;
885
- /** Text for the close button. */
886
- _closeButtonText: string;
887
- /** Whether the close button currently has focus. */
888
- _closeButtonFocused: boolean;
889
- /** Portal with projected action buttons. */
890
- _actionsPortal: TemplatePortal | null;
891
- /** Id of the label for the `role="dialog"` element. */
892
- _dialogLabelId: string | null;
537
+ _dateAdapter: DateAdapter$1<D, any>;
538
+ private _dir;
539
+ private _rerenderSubscription;
540
+ /** Flag used to filter out space/enter keyup events that originated outside of the view. */
541
+ private _selectionKeyPressed;
542
+ /** The date to display in this multi-year view (everything other than the year is ignored). */
543
+ get activeDate(): D;
544
+ set activeDate(value: D);
545
+ private _activeDate;
546
+ /** The currently selected date. */
547
+ get selected(): DateRange<D> | D | null;
548
+ set selected(value: DateRange<D> | D | null);
549
+ private _selected;
550
+ /** The minimum selectable date. */
551
+ get minDate(): D | null;
552
+ set minDate(value: D | null);
553
+ private _minDate;
554
+ /** The maximum selectable date. */
555
+ get maxDate(): D | null;
556
+ set maxDate(value: D | null);
557
+ private _maxDate;
558
+ /** A function used to filter which dates are selectable. */
559
+ dateFilter: (date: D) => boolean;
560
+ /** Function that can be used to add custom CSS classes to date cells. */
561
+ dateClass: MatCalendarCellClassFunction<D>;
562
+ /** Emits when a new year is selected. */
563
+ readonly selectedChange: EventEmitter<D>;
564
+ /** Emits the selected year. This doesn't imply a change on the selected date */
565
+ readonly yearSelected: EventEmitter<D>;
566
+ /** Emits when any date is activated. */
567
+ readonly activeDateChange: EventEmitter<D>;
568
+ /** The body of calendar table */
569
+ _matCalendarBody: MatCalendarBody;
570
+ /** Grid of calendar cells representing the currently displayed years. */
571
+ _years: MatCalendarCell[][];
572
+ /** The year that today falls on. */
573
+ _todayYear: number;
574
+ /** The year of the selected date. Null if the selected date is null. */
575
+ _selectedYear: number | null;
893
576
  constructor(...args: unknown[]);
894
- ngAfterViewInit(): void;
577
+ ngAfterContentInit(): void;
895
578
  ngOnDestroy(): void;
896
- _handleUserSelection(event: MatCalendarUserEvent<D | null>): void;
897
- _handleUserDragDrop(event: MatCalendarUserEvent<DateRange<D>>): void;
898
- _startExitAnimation(): void;
899
- private _handleAnimationEvent;
900
- _getSelected(): D | DateRange<D> | null;
901
- /** Applies the current pending selection to the global model. */
902
- _applyPendingSelection(): void;
579
+ /** Initializes this multi-year view. */
580
+ _init(): void;
581
+ /** Handles when a new year is selected. */
582
+ _yearSelected(event: MatCalendarUserEvent<number>): void;
903
583
  /**
904
- * Assigns a new portal containing the datepicker actions.
905
- * @param portal Portal with the actions to be assigned.
906
- * @param forceRerender Whether a re-render of the portal should be triggered. This isn't
907
- * necessary if the portal is assigned during initialization, but it may be required if it's
908
- * added at a later point.
584
+ * Takes the index of a calendar body cell wrapped in an event as argument. For the date that
585
+ * corresponds to the given cell, set `activeDate` to that date and fire `activeDateChange` with
586
+ * that date.
587
+ *
588
+ * This function is used to match each component's model of the active date with the calendar
589
+ * body cell that was focused. It updates its value of `activeDate` synchronously and updates the
590
+ * parent's value asynchronously via the `activeDateChange` event. The child component receives an
591
+ * updated value asynchronously via the `activeCell` Input.
909
592
  */
910
- _assignActions(portal: TemplatePortal<any> | null, forceRerender: boolean): void;
911
- static ɵfac: i0.ɵɵFactoryDeclaration<MatDatepickerContent<any, any>, never>;
912
- static ɵcmp: i0.ɵɵComponentDeclaration<MatDatepickerContent<any, any>, "mat-datepicker-content", ["matDatepickerContent"], { "color": { "alias": "color"; "required": false; }; }, {}, never, never, true, never>;
593
+ _updateActiveDate(event: MatCalendarUserEvent<number>): void;
594
+ /** Handles keydown events on the calendar body when calendar is in multi-year view. */
595
+ _handleCalendarBodyKeydown(event: KeyboardEvent): void;
596
+ /** Handles keyup events on the calendar body when calendar is in multi-year view. */
597
+ _handleCalendarBodyKeyup(event: KeyboardEvent): void;
598
+ _getActiveCell(): number;
599
+ /** Focuses the active cell after the microtask queue is empty. */
600
+ _focusActiveCell(): void;
601
+ /** Focuses the active cell after change detection has run and the microtask queue is empty. */
602
+ _focusActiveCellAfterViewChecked(): void;
603
+ /**
604
+ * Takes a year and returns a new date on the same day and month as the currently active date
605
+ * The returned date will have the same year as the argument date.
606
+ */
607
+ private _getDateFromYear;
608
+ /** Creates an MatCalendarCell for the given year. */
609
+ private _createCellForYear;
610
+ /** Whether the given year is enabled. */
611
+ private _shouldEnableYear;
612
+ /** Determines whether the user has the RTL layout direction. */
613
+ private _isRtl;
614
+ /** Sets the currently-highlighted year based on a model value. */
615
+ private _setSelectedYear;
616
+ static ɵfac: i0.ɵɵFactoryDeclaration<MatMultiYearView<any>, never>;
617
+ static ɵcmp: i0.ɵɵComponentDeclaration<MatMultiYearView<any>, "mat-multi-year-view", ["matMultiYearView"], { "activeDate": { "alias": "activeDate"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; "minDate": { "alias": "minDate"; "required": false; }; "maxDate": { "alias": "maxDate"; "required": false; }; "dateFilter": { "alias": "dateFilter"; "required": false; }; "dateClass": { "alias": "dateClass"; "required": false; }; }, { "selectedChange": "selectedChange"; "yearSelected": "yearSelected"; "activeDateChange": "activeDateChange"; }, never, never, true, never>;
913
618
  }
914
619
 
915
- /** Form control that can be associated with a datepicker. */
916
- export declare interface MatDatepickerControl<D> {
917
- getStartValue(): D | null;
918
- getThemePalette(): ThemePalette;
919
- min: D | null;
920
- max: D | null;
921
- disabled: boolean;
922
- dateFilter: DateFilterFn<D>;
923
- getConnectedOverlayOrigin(): ElementRef;
924
- getOverlayLabelId(): string | null;
925
- stateChanges: Observable<void>;
620
+ /**
621
+ * An internal component used to display a single year in the datepicker.
622
+ * @docs-private
623
+ */
624
+ declare class MatYearView<D> implements AfterContentInit, OnDestroy {
625
+ readonly _changeDetectorRef: ChangeDetectorRef;
626
+ private _dateFormats;
627
+ _dateAdapter: DateAdapter$1<D, any>;
628
+ private _dir;
629
+ private _rerenderSubscription;
630
+ /** Flag used to filter out space/enter keyup events that originated outside of the view. */
631
+ private _selectionKeyPressed;
632
+ /** The date to display in this year view (everything other than the year is ignored). */
633
+ get activeDate(): D;
634
+ set activeDate(value: D);
635
+ private _activeDate;
636
+ /** The currently selected date. */
637
+ get selected(): DateRange<D> | D | null;
638
+ set selected(value: DateRange<D> | D | null);
639
+ private _selected;
640
+ /** The minimum selectable date. */
641
+ get minDate(): D | null;
642
+ set minDate(value: D | null);
643
+ private _minDate;
644
+ /** The maximum selectable date. */
645
+ get maxDate(): D | null;
646
+ set maxDate(value: D | null);
647
+ private _maxDate;
648
+ /** A function used to filter which dates are selectable. */
649
+ dateFilter: (date: D) => boolean;
650
+ /** Function that can be used to add custom CSS classes to date cells. */
651
+ dateClass: MatCalendarCellClassFunction<D>;
652
+ /** Emits when a new month is selected. */
653
+ readonly selectedChange: EventEmitter<D>;
654
+ /** Emits the selected month. This doesn't imply a change on the selected date */
655
+ readonly monthSelected: EventEmitter<D>;
656
+ /** Emits when any date is activated. */
657
+ readonly activeDateChange: EventEmitter<D>;
658
+ /** The body of calendar table */
659
+ _matCalendarBody: MatCalendarBody;
660
+ /** Grid of calendar cells representing the months of the year. */
661
+ _months: MatCalendarCell[][];
662
+ /** The label for this year (e.g. "2017"). */
663
+ _yearLabel: string;
664
+ /** The month in this year that today falls on. Null if today is in a different year. */
665
+ _todayMonth: number | null;
666
+ /**
667
+ * The month in this year that the selected Date falls on.
668
+ * Null if the selected Date is in a different year.
669
+ */
670
+ _selectedMonth: number | null;
671
+ constructor(...args: unknown[]);
672
+ ngAfterContentInit(): void;
673
+ ngOnDestroy(): void;
674
+ /** Handles when a new month is selected. */
675
+ _monthSelected(event: MatCalendarUserEvent<number>): void;
676
+ /**
677
+ * Takes the index of a calendar body cell wrapped in an event as argument. For the date that
678
+ * corresponds to the given cell, set `activeDate` to that date and fire `activeDateChange` with
679
+ * that date.
680
+ *
681
+ * This function is used to match each component's model of the active date with the calendar
682
+ * body cell that was focused. It updates its value of `activeDate` synchronously and updates the
683
+ * parent's value asynchronously via the `activeDateChange` event. The child component receives an
684
+ * updated value asynchronously via the `activeCell` Input.
685
+ */
686
+ _updateActiveDate(event: MatCalendarUserEvent<number>): void;
687
+ /** Handles keydown events on the calendar body when calendar is in year view. */
688
+ _handleCalendarBodyKeydown(event: KeyboardEvent): void;
689
+ /** Handles keyup events on the calendar body when calendar is in year view. */
690
+ _handleCalendarBodyKeyup(event: KeyboardEvent): void;
691
+ /** Initializes this year view. */
692
+ _init(): void;
693
+ /** Focuses the active cell after the microtask queue is empty. */
694
+ _focusActiveCell(): void;
695
+ /** Schedules the matCalendarBody to focus the active cell after change detection has run */
696
+ _focusActiveCellAfterViewChecked(): void;
697
+ /**
698
+ * Gets the month in this year that the given Date falls on.
699
+ * Returns null if the given Date is in another year.
700
+ */
701
+ private _getMonthInCurrentYear;
702
+ /**
703
+ * Takes a month and returns a new date in the same day and year as the currently active date.
704
+ * The returned date will have the same month as the argument date.
705
+ */
706
+ private _getDateFromMonth;
707
+ /** Creates an MatCalendarCell for the given month. */
708
+ private _createCellForMonth;
709
+ /** Whether the given month is enabled. */
710
+ private _shouldEnableMonth;
711
+ /**
712
+ * Tests whether the combination month/year is after this.maxDate, considering
713
+ * just the month and year of this.maxDate
714
+ */
715
+ private _isYearAndMonthAfterMaxDate;
716
+ /**
717
+ * Tests whether the combination month/year is before this.minDate, considering
718
+ * just the month and year of this.minDate
719
+ */
720
+ private _isYearAndMonthBeforeMinDate;
721
+ /** Determines whether the user has the RTL layout direction. */
722
+ private _isRtl;
723
+ /** Sets the currently-selected month based on a model value. */
724
+ private _setSelectedMonth;
725
+ static ɵfac: i0.ɵɵFactoryDeclaration<MatYearView<any>, never>;
726
+ static ɵcmp: i0.ɵɵComponentDeclaration<MatYearView<any>, "mat-year-view", ["matYearView"], { "activeDate": { "alias": "activeDate"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; "minDate": { "alias": "minDate"; "required": false; }; "maxDate": { "alias": "maxDate"; "required": false; }; "dateFilter": { "alias": "dateFilter"; "required": false; }; "dateClass": { "alias": "dateClass"; "required": false; }; }, { "selectedChange": "selectedChange"; "monthSelected": "monthSelected"; "activeDateChange": "activeDateChange"; }, never, never, true, never>;
926
727
  }
927
728
 
928
- /** Directive used to connect an input to a MatDatepicker. */
929
- export declare class MatDatepickerInput<D> extends MatDatepickerInputBase<D | null, D> implements MatDatepickerControl<D | null>, OnDestroy {
930
- private _formField;
931
- private _closedSubscription;
932
- private _openedSubscription;
933
- /** The datepicker that this input is associated with. */
934
- set matDatepicker(datepicker: MatDatepickerPanel<MatDatepickerControl<D>, D | null, D>);
935
- _datepicker: MatDatepickerPanel<MatDatepickerControl<D>, D | null, D>;
936
- /** The id of the panel owned by this input. */
937
- protected _ariaOwns: WritableSignal<string | null>;
938
- /** The minimum valid date. */
939
- get min(): D | null;
940
- set min(value: D | null);
941
- private _min;
942
- /** The maximum valid date. */
943
- get max(): D | null;
944
- set max(value: D | null);
945
- private _max;
946
- /** Function that can be used to filter out dates within the datepicker. */
947
- get dateFilter(): DateFilterFn<D | null>;
948
- set dateFilter(value: DateFilterFn<D | null>);
949
- private _dateFilter;
950
- /** The combined form control validator for this input. */
951
- protected _validator: ValidatorFn | null;
729
+ /**
730
+ * Possible views for the calendar.
731
+ * @docs-private
732
+ */
733
+ type MatCalendarView = 'month' | 'year' | 'multi-year';
734
+ /** Default header for MatCalendar */
735
+ declare class MatCalendarHeader<D> {
736
+ private _intl;
737
+ calendar: MatCalendar<D>;
738
+ private _dateAdapter;
739
+ private _dateFormats;
952
740
  constructor(...args: unknown[]);
741
+ /** The display text for the current calendar view. */
742
+ get periodButtonText(): string;
743
+ /** The aria description for the current calendar view. */
744
+ get periodButtonDescription(): string;
745
+ /** The `aria-label` for changing the calendar view. */
746
+ get periodButtonLabel(): string;
747
+ /** The label for the previous button. */
748
+ get prevButtonLabel(): string;
749
+ /** The label for the next button. */
750
+ get nextButtonLabel(): string;
751
+ /** Handles user clicks on the period label. */
752
+ currentPeriodClicked(): void;
753
+ /** Handles user clicks on the previous button. */
754
+ previousClicked(): void;
755
+ /** Handles user clicks on the next button. */
756
+ nextClicked(): void;
757
+ /** Whether the previous period button is enabled. */
758
+ previousEnabled(): boolean;
759
+ /** Whether the next period button is enabled. */
760
+ nextEnabled(): boolean;
761
+ /** Whether the two dates represent the same view in the current view mode (month or year). */
762
+ private _isSameView;
953
763
  /**
954
- * Gets the element that the datepicker popup should be connected to.
955
- * @return The element to connect the popup to.
764
+ * Format two individual labels for the minimum year and maximum year available in the multi-year
765
+ * calendar view. Returns an array of two strings where the first string is the formatted label
766
+ * for the minimum year, and the second string is the formatted label for the maximum year.
956
767
  */
957
- getConnectedOverlayOrigin(): ElementRef;
958
- /** Gets the ID of an element that should be used a description for the calendar overlay. */
959
- getOverlayLabelId(): string | null;
960
- /** Returns the palette used by the input's form field, if any. */
961
- getThemePalette(): ThemePalette;
962
- /** Gets the value at which the calendar should start. */
963
- getStartValue(): D | null;
768
+ private _formatMinAndMaxYearLabels;
769
+ _periodButtonLabelId: string;
770
+ static ɵfac: i0.ɵɵFactoryDeclaration<MatCalendarHeader<any>, never>;
771
+ static ɵcmp: i0.ɵɵComponentDeclaration<MatCalendarHeader<any>, "mat-calendar-header", ["matCalendarHeader"], {}, {}, never, ["*"], true, never>;
772
+ }
773
+ /** A calendar that is used as part of the datepicker. */
774
+ declare class MatCalendar<D> implements AfterContentInit, AfterViewChecked, OnDestroy, OnChanges {
775
+ private _dateAdapter;
776
+ private _dateFormats;
777
+ private _changeDetectorRef;
778
+ /** An input indicating the type of the header component, if set. */
779
+ headerComponent: ComponentType<any>;
780
+ /** A portal containing the header component type for this calendar. */
781
+ _calendarHeaderPortal: Portal<any>;
782
+ private _intlChanges;
783
+ /**
784
+ * Used for scheduling that focus should be moved to the active cell on the next tick.
785
+ * We need to schedule it, rather than do it immediately, because we have to wait
786
+ * for Angular to re-evaluate the view children.
787
+ */
788
+ private _moveFocusOnNextTick;
789
+ /** A date representing the period (month or year) to start the calendar in. */
790
+ get startAt(): D | null;
791
+ set startAt(value: D | null);
792
+ private _startAt;
793
+ /** Whether the calendar should be started in month or year view. */
794
+ startView: MatCalendarView;
795
+ /** The currently selected date. */
796
+ get selected(): DateRange<D> | D | null;
797
+ set selected(value: DateRange<D> | D | null);
798
+ private _selected;
799
+ /** The minimum selectable date. */
800
+ get minDate(): D | null;
801
+ set minDate(value: D | null);
802
+ private _minDate;
803
+ /** The maximum selectable date. */
804
+ get maxDate(): D | null;
805
+ set maxDate(value: D | null);
806
+ private _maxDate;
807
+ /** Function used to filter which dates are selectable. */
808
+ dateFilter: (date: D) => boolean;
809
+ /** Function that can be used to add custom CSS classes to dates. */
810
+ dateClass: MatCalendarCellClassFunction<D>;
811
+ /** Start of the comparison range. */
812
+ comparisonStart: D | null;
813
+ /** End of the comparison range. */
814
+ comparisonEnd: D | null;
815
+ /** ARIA Accessible name of the `<input matStartDate/>` */
816
+ startDateAccessibleName: string | null;
817
+ /** ARIA Accessible name of the `<input matEndDate/>` */
818
+ endDateAccessibleName: string | null;
819
+ /** Emits when the currently selected date changes. */
820
+ readonly selectedChange: EventEmitter<D | null>;
821
+ /**
822
+ * Emits the year chosen in multiyear view.
823
+ * This doesn't imply a change on the selected date.
824
+ */
825
+ readonly yearSelected: EventEmitter<D>;
826
+ /**
827
+ * Emits the month chosen in year view.
828
+ * This doesn't imply a change on the selected date.
829
+ */
830
+ readonly monthSelected: EventEmitter<D>;
831
+ /**
832
+ * Emits when the current view changes.
833
+ */
834
+ readonly viewChanged: EventEmitter<MatCalendarView>;
835
+ /** Emits when any date is selected. */
836
+ readonly _userSelection: EventEmitter<MatCalendarUserEvent<D | null>>;
837
+ /** Emits a new date range value when the user completes a drag drop operation. */
838
+ readonly _userDragDrop: EventEmitter<MatCalendarUserEvent<DateRange<D>>>;
839
+ /** Reference to the current month view component. */
840
+ monthView: MatMonthView<D>;
841
+ /** Reference to the current year view component. */
842
+ yearView: MatYearView<D>;
843
+ /** Reference to the current multi-year view component. */
844
+ multiYearView: MatMultiYearView<D>;
845
+ /**
846
+ * The current active date. This determines which time period is shown and which date is
847
+ * highlighted when using keyboard navigation.
848
+ */
849
+ get activeDate(): D;
850
+ set activeDate(value: D);
851
+ private _clampedActiveDate;
852
+ /** Whether the calendar is in month view. */
853
+ get currentView(): MatCalendarView;
854
+ set currentView(value: MatCalendarView);
855
+ private _currentView;
856
+ /** Origin of active drag, or null when dragging is not active. */
857
+ protected _activeDrag: MatCalendarUserEvent<D> | null;
858
+ /**
859
+ * Emits whenever there is a state change that the header may need to respond to.
860
+ */
861
+ readonly stateChanges: Subject<void>;
862
+ constructor(...args: unknown[]);
863
+ ngAfterContentInit(): void;
864
+ ngAfterViewChecked(): void;
964
865
  ngOnDestroy(): void;
965
- /** Opens the associated datepicker. */
966
- protected _openPopup(): void;
967
- protected _getValueFromModel(modelValue: D | null): D | null;
968
- protected _assignValueToModel(value: D | null): void;
969
- /** Gets the input's minimum date. */
970
- _getMinDate(): D | null;
971
- /** Gets the input's maximum date. */
972
- _getMaxDate(): D | null;
973
- /** Gets the input's date filtering function. */
974
- protected _getDateFilter(): DateFilterFn<D | null>;
975
- protected _shouldHandleChangeEvent(event: DateSelectionModelChange<D>): boolean;
976
- static ɵfac: i0.ɵɵFactoryDeclaration<MatDatepickerInput<any>, never>;
977
- static ɵdir: i0.ɵɵDirectiveDeclaration<MatDatepickerInput<any>, "input[matDatepicker]", ["matDatepickerInput"], { "matDatepicker": { "alias": "matDatepicker"; "required": false; }; "min": { "alias": "min"; "required": false; }; "max": { "alias": "max"; "required": false; }; "dateFilter": { "alias": "matDatepickerFilter"; "required": false; }; }, {}, never, never, true, never>;
866
+ ngOnChanges(changes: SimpleChanges): void;
867
+ /** Focuses the active date. */
868
+ focusActiveCell(): void;
869
+ /** Updates today's date after an update of the active date */
870
+ updateTodaysDate(): void;
871
+ /** Handles date selection in the month view. */
872
+ _dateSelected(event: MatCalendarUserEvent<D | null>): void;
873
+ /** Handles year selection in the multiyear view. */
874
+ _yearSelectedInMultiYearView(normalizedYear: D): void;
875
+ /** Handles month selection in the year view. */
876
+ _monthSelectedInYearView(normalizedMonth: D): void;
877
+ /** Handles year/month selection in the multi-year/year views. */
878
+ _goToDateInView(date: D, view: 'month' | 'year' | 'multi-year'): void;
879
+ /** Called when the user starts dragging to change a date range. */
880
+ _dragStarted(event: MatCalendarUserEvent<D>): void;
881
+ /**
882
+ * Called when a drag completes. It may end in cancelation or in the selection
883
+ * of a new range.
884
+ */
885
+ _dragEnded(event: MatCalendarUserEvent<DateRange<D> | null>): void;
886
+ /** Returns the component instance that corresponds to the current calendar view. */
887
+ private _getCurrentViewComponent;
888
+ static ɵfac: i0.ɵɵFactoryDeclaration<MatCalendar<any>, never>;
889
+ static ɵcmp: i0.ɵɵComponentDeclaration<MatCalendar<any>, "mat-calendar", ["matCalendar"], { "headerComponent": { "alias": "headerComponent"; "required": false; }; "startAt": { "alias": "startAt"; "required": false; }; "startView": { "alias": "startView"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; "minDate": { "alias": "minDate"; "required": false; }; "maxDate": { "alias": "maxDate"; "required": false; }; "dateFilter": { "alias": "dateFilter"; "required": false; }; "dateClass": { "alias": "dateClass"; "required": false; }; "comparisonStart": { "alias": "comparisonStart"; "required": false; }; "comparisonEnd": { "alias": "comparisonEnd"; "required": false; }; "startDateAccessibleName": { "alias": "startDateAccessibleName"; "required": false; }; "endDateAccessibleName": { "alias": "endDateAccessibleName"; "required": false; }; }, { "selectedChange": "selectedChange"; "yearSelected": "yearSelected"; "monthSelected": "monthSelected"; "viewChanged": "viewChanged"; "_userSelection": "_userSelection"; "_userDragDrop": "_userDragDrop"; }, never, never, true, never>;
978
890
  }
979
891
 
892
+ /**
893
+ * An event used for datepicker input and change events. We don't always have access to a native
894
+ * input or change event because the event may have been triggered by the user clicking on the
895
+ * calendar popup. For consistency, we always use MatDatepickerInputEvent instead.
896
+ */
897
+ declare class MatDatepickerInputEvent<D, S = unknown> {
898
+ /** Reference to the datepicker input component that emitted the event. */
899
+ target: MatDatepickerInputBase<S, D>;
900
+ /** Reference to the native input element associated with the datepicker input. */
901
+ targetElement: HTMLElement;
902
+ /** The new value for the target datepicker input. */
903
+ value: D | null;
904
+ constructor(
905
+ /** Reference to the datepicker input component that emitted the event. */
906
+ target: MatDatepickerInputBase<S, D>,
907
+ /** Reference to the native input element associated with the datepicker input. */
908
+ targetElement: HTMLElement);
909
+ }
910
+ /**
911
+ * Function that can be used to filter out dates from a calendar.
912
+ * Datepicker can sometimes receive a null value as input for the date argument.
913
+ * This doesn't represent a "null date" but rather signifies that no date has been selected yet in the calendar.
914
+ */
915
+ type DateFilterFn<D> = (date: D | null) => boolean;
980
916
  /** Base class for datepicker inputs. */
981
917
  declare abstract class MatDatepickerInputBase<S, D = ExtractDateTypeFromSelection<S>> implements ControlValueAccessor, AfterViewInit, OnChanges, OnDestroy, Validator {
982
918
  protected _elementRef: ElementRef<HTMLInputElement>;
983
- _dateAdapter: DateAdapter<D, any>;
919
+ _dateAdapter: DateAdapter$1<D, any>;
984
920
  private _dateFormats;
985
921
  /** Whether the component has been initialized. */
986
922
  private _isInitialized;
@@ -1052,7 +988,7 @@ declare abstract class MatDatepickerInputBase<S, D = ExtractDateTypeFromSelectio
1052
988
  registerOnTouched(fn: () => void): void;
1053
989
  setDisabledState(isDisabled: boolean): void;
1054
990
  _onKeydown(event: KeyboardEvent): void;
1055
- _onInput(value: string): void;
991
+ _onInput(event: Event): void;
1056
992
  _onChange(): void;
1057
993
  /** Handles blur events on the input. */
1058
994
  _onBlur(): void;
@@ -1076,86 +1012,116 @@ declare abstract class MatDatepickerInputBase<S, D = ExtractDateTypeFromSelectio
1076
1012
  static ngAcceptInputType_disabled: unknown;
1077
1013
  }
1078
1014
 
1015
+ /** Injection token that determines the scroll handling while the calendar is open. */
1016
+ declare const MAT_DATEPICKER_SCROLL_STRATEGY: InjectionToken<() => ScrollStrategy>;
1079
1017
  /**
1080
- * An event used for datepicker input and change events. We don't always have access to a native
1081
- * input or change event because the event may have been triggered by the user clicking on the
1082
- * calendar popup. For consistency, we always use MatDatepickerInputEvent instead.
1018
+ * @docs-private
1019
+ * @deprecated No longer used, will be removed.
1020
+ * @breaking-change 21.0.0
1083
1021
  */
1084
- export declare class MatDatepickerInputEvent<D, S = unknown> {
1085
- /** Reference to the datepicker input component that emitted the event. */
1086
- target: MatDatepickerInputBase<S, D>;
1087
- /** Reference to the native input element associated with the datepicker input. */
1088
- targetElement: HTMLElement;
1089
- /** The new value for the target datepicker input. */
1090
- value: D | null;
1091
- constructor(
1092
- /** Reference to the datepicker input component that emitted the event. */
1093
- target: MatDatepickerInputBase<S, D>,
1094
- /** Reference to the native input element associated with the datepicker input. */
1095
- targetElement: HTMLElement);
1096
- }
1097
-
1098
- /** Datepicker data that requires internationalization. */
1099
- export declare class MatDatepickerIntl {
1100
- /**
1101
- * Stream that emits whenever the labels here are changed. Use this to notify
1102
- * components if the labels have changed after initialization.
1103
- */
1104
- readonly changes: Subject<void>;
1105
- /** A label for the calendar popup (used by screen readers). */
1106
- calendarLabel: string;
1107
- /** A label for the button used to open the calendar popup (used by screen readers). */
1108
- openCalendarLabel: string;
1109
- /** Label for the button used to close the calendar popup. */
1110
- closeCalendarLabel: string;
1111
- /** A label for the previous month button (used by screen readers). */
1112
- prevMonthLabel: string;
1113
- /** A label for the next month button (used by screen readers). */
1114
- nextMonthLabel: string;
1115
- /** A label for the previous year button (used by screen readers). */
1116
- prevYearLabel: string;
1117
- /** A label for the next year button (used by screen readers). */
1118
- nextYearLabel: string;
1119
- /** A label for the previous multi-year button (used by screen readers). */
1120
- prevMultiYearLabel: string;
1121
- /** A label for the next multi-year button (used by screen readers). */
1122
- nextMultiYearLabel: string;
1123
- /** A label for the 'switch to month view' button (used by screen readers). */
1124
- switchToMonthViewLabel: string;
1125
- /** A label for the 'switch to year view' button (used by screen readers). */
1126
- switchToMultiYearViewLabel: string;
1127
- /**
1128
- * A label for the first date of a range of dates (used by screen readers).
1129
- * @deprecated Provide your own internationalization string.
1130
- * @breaking-change 17.0.0
1131
- */
1132
- startDateLabel: string;
1022
+ declare function MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY(overlay: Overlay): () => ScrollStrategy;
1023
+ /** Possible positions for the datepicker dropdown along the X axis. */
1024
+ type DatepickerDropdownPositionX = 'start' | 'end';
1025
+ /** Possible positions for the datepicker dropdown along the Y axis. */
1026
+ type DatepickerDropdownPositionY = 'above' | 'below';
1027
+ /**
1028
+ * @docs-private
1029
+ * @deprecated No longer used, will be removed.
1030
+ * @breaking-change 21.0.0
1031
+ */
1032
+ declare const MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY_PROVIDER: {
1033
+ provide: InjectionToken<() => ScrollStrategy>;
1034
+ deps: (typeof Overlay)[];
1035
+ useFactory: typeof MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY;
1036
+ };
1037
+ /**
1038
+ * Component used as the content for the datepicker overlay. We use this instead of using
1039
+ * MatCalendar directly as the content so we can control the initial focus. This also gives us a
1040
+ * place to put additional features of the overlay that are not part of the calendar itself in the
1041
+ * future. (e.g. confirmation buttons).
1042
+ * @docs-private
1043
+ */
1044
+ declare class MatDatepickerContent<S, D = ExtractDateTypeFromSelection<S>> implements AfterViewInit, OnDestroy {
1045
+ protected _elementRef: ElementRef<HTMLElement>;
1046
+ protected _animationsDisabled: boolean;
1047
+ private _changeDetectorRef;
1048
+ private _globalModel;
1049
+ private _dateAdapter;
1050
+ private _ngZone;
1051
+ private _rangeSelectionStrategy;
1052
+ private _stateChanges;
1053
+ private _model;
1054
+ private _eventCleanups;
1055
+ private _animationFallback;
1056
+ /** Reference to the internal calendar component. */
1057
+ _calendar: MatCalendar<D>;
1133
1058
  /**
1134
- * A label for the last date of a range of dates (used by screen readers).
1135
- * @deprecated Provide your own internationalization string.
1136
- * @breaking-change 17.0.0
1059
+ * Theme color of the internal calendar. This API is supported in M2 themes
1060
+ * only, it has no effect in M3 themes. For color customization in M3, see https://material.angular.io/components/datepicker/styling.
1061
+ *
1062
+ * For information on applying color variants in M3, see
1063
+ * https://material.angular.io/guide/material-2-theming#optional-add-backwards-compatibility-styles-for-color-variants
1137
1064
  */
1138
- endDateLabel: string;
1065
+ color: ThemePalette;
1066
+ /** Reference to the datepicker that created the overlay. */
1067
+ datepicker: MatDatepickerBase<any, S, D>;
1068
+ /** Start of the comparison range. */
1069
+ comparisonStart: D | null;
1070
+ /** End of the comparison range. */
1071
+ comparisonEnd: D | null;
1072
+ /** ARIA Accessible name of the `<input matStartDate/>` */
1073
+ startDateAccessibleName: string | null;
1074
+ /** ARIA Accessible name of the `<input matEndDate/>` */
1075
+ endDateAccessibleName: string | null;
1076
+ /** Whether the datepicker is above or below the input. */
1077
+ _isAbove: boolean;
1078
+ /** Emits when an animation has finished. */
1079
+ readonly _animationDone: Subject<void>;
1080
+ /** Whether there is an in-progress animation. */
1081
+ _isAnimating: boolean;
1082
+ /** Text for the close button. */
1083
+ _closeButtonText: string;
1084
+ /** Whether the close button currently has focus. */
1085
+ _closeButtonFocused: boolean;
1086
+ /** Portal with projected action buttons. */
1087
+ _actionsPortal: TemplatePortal | null;
1088
+ /** Id of the label for the `role="dialog"` element. */
1089
+ _dialogLabelId: string | null;
1090
+ constructor(...args: unknown[]);
1091
+ ngAfterViewInit(): void;
1092
+ ngOnDestroy(): void;
1093
+ _handleUserSelection(event: MatCalendarUserEvent<D | null>): void;
1094
+ _handleUserDragDrop(event: MatCalendarUserEvent<DateRange<D>>): void;
1095
+ _startExitAnimation(): void;
1096
+ private _handleAnimationEvent;
1097
+ _getSelected(): D | DateRange<D> | null;
1098
+ /** Applies the current pending selection to the global model. */
1099
+ _applyPendingSelection(): void;
1139
1100
  /**
1140
- * A label for the Comparison date of a range of dates (used by screen readers).
1101
+ * Assigns a new portal containing the datepicker actions.
1102
+ * @param portal Portal with the actions to be assigned.
1103
+ * @param forceRerender Whether a re-render of the portal should be triggered. This isn't
1104
+ * necessary if the portal is assigned during initialization, but it may be required if it's
1105
+ * added at a later point.
1141
1106
  */
1142
- comparisonDateLabel: string;
1143
- /** Formats a range of years (used for visuals). */
1144
- formatYearRange(start: string, end: string): string;
1145
- /** Formats a label for a range of years (used by screen readers). */
1146
- formatYearRangeLabel(start: string, end: string): string;
1147
- static ɵfac: i0.ɵɵFactoryDeclaration<MatDatepickerIntl, never>;
1148
- static ɵprov: i0.ɵɵInjectableDeclaration<MatDatepickerIntl>;
1107
+ _assignActions(portal: TemplatePortal<any> | null, forceRerender: boolean): void;
1108
+ static ɵfac: i0.ɵɵFactoryDeclaration<MatDatepickerContent<any, any>, never>;
1109
+ static ɵcmp: i0.ɵɵComponentDeclaration<MatDatepickerContent<any, any>, "mat-datepicker-content", ["matDatepickerContent"], { "color": { "alias": "color"; "required": false; }; }, {}, never, never, true, never>;
1149
1110
  }
1150
-
1151
- export declare class MatDatepickerModule {
1152
- static ɵfac: i0.ɵɵFactoryDeclaration<MatDatepickerModule, never>;
1153
- static ɵmod: i0.ɵɵNgModuleDeclaration<MatDatepickerModule, never, [typeof i1.MatButtonModule, typeof i2.OverlayModule, typeof i3.A11yModule, typeof i4.PortalModule, typeof i5.MatCommonModule, typeof i6.MatCalendar, typeof i7.MatCalendarBody, typeof i8.MatDatepicker, typeof i9.MatDatepickerContent, typeof i10.MatDatepickerInput, typeof i11.MatDatepickerToggle, typeof i11.MatDatepickerToggleIcon, typeof i12.MatMonthView, typeof i13.MatYearView, typeof i14.MatMultiYearView, typeof i6.MatCalendarHeader, typeof i15.MatDateRangeInput, typeof i16.MatStartDate, typeof i16.MatEndDate, typeof i17.MatDateRangePicker, typeof i18.MatDatepickerActions, typeof i18.MatDatepickerCancel, typeof i18.MatDatepickerApply], [typeof i19.CdkScrollableModule, typeof i6.MatCalendar, typeof i7.MatCalendarBody, typeof i8.MatDatepicker, typeof i9.MatDatepickerContent, typeof i10.MatDatepickerInput, typeof i11.MatDatepickerToggle, typeof i11.MatDatepickerToggleIcon, typeof i12.MatMonthView, typeof i13.MatYearView, typeof i14.MatMultiYearView, typeof i6.MatCalendarHeader, typeof i15.MatDateRangeInput, typeof i16.MatStartDate, typeof i16.MatEndDate, typeof i17.MatDateRangePicker, typeof i18.MatDatepickerActions, typeof i18.MatDatepickerCancel, typeof i18.MatDatepickerApply]>;
1154
- static ɵinj: i0.ɵɵInjectorDeclaration<MatDatepickerModule>;
1111
+ /** Form control that can be associated with a datepicker. */
1112
+ interface MatDatepickerControl<D> {
1113
+ getStartValue(): D | null;
1114
+ getThemePalette(): ThemePalette;
1115
+ min: D | null;
1116
+ max: D | null;
1117
+ disabled: boolean;
1118
+ dateFilter: DateFilterFn<D>;
1119
+ getConnectedOverlayOrigin(): ElementRef;
1120
+ getOverlayLabelId(): string | null;
1121
+ stateChanges: Observable<void>;
1155
1122
  }
1156
-
1157
1123
  /** A datepicker that can be attached to a {@link MatDatepickerControl}. */
1158
- export declare interface MatDatepickerPanel<C extends MatDatepickerControl<D>, S, D = ExtractDateTypeFromSelection<S>> {
1124
+ interface MatDatepickerPanel<C extends MatDatepickerControl<D>, S, D = ExtractDateTypeFromSelection<S>> {
1159
1125
  /** Stream that emits whenever the date picker is closed. */
1160
1126
  closedStream: EventEmitter<void>;
1161
1127
  /**
@@ -1183,83 +1149,179 @@ export declare interface MatDatepickerPanel<C extends MatDatepickerControl<D>, S
1183
1149
  /** Register an input with the datepicker. */
1184
1150
  registerInput(input: C): MatDateSelectionModel<S, D>;
1185
1151
  }
1186
-
1187
- export declare class MatDatepickerToggle<D> implements AfterContentInit, OnChanges, OnDestroy {
1188
- _intl: MatDatepickerIntl;
1189
- private _changeDetectorRef;
1190
- private _stateChanges;
1191
- /** Datepicker instance that the button will toggle. */
1192
- datepicker: MatDatepickerPanel<MatDatepickerControl<any>, D>;
1193
- /** Tabindex for the toggle. */
1194
- tabIndex: number | null;
1195
- /** Screen-reader label for the button. */
1196
- ariaLabel: string;
1197
- /** Whether the toggle button is disabled. */
1152
+ /** Base class for a datepicker. */
1153
+ declare abstract class MatDatepickerBase<C extends MatDatepickerControl<D>, S, D = ExtractDateTypeFromSelection<S>> implements MatDatepickerPanel<C, S, D>, OnDestroy, OnChanges {
1154
+ private _overlay;
1155
+ private _viewContainerRef;
1156
+ private _dateAdapter;
1157
+ private _dir;
1158
+ private _model;
1159
+ private _scrollStrategy;
1160
+ private _inputStateChanges;
1161
+ private _document;
1162
+ /** An input indicating the type of the custom header component for the calendar, if set. */
1163
+ calendarHeaderComponent: ComponentType<any>;
1164
+ /** The date to open the calendar to initially. */
1165
+ get startAt(): D | null;
1166
+ set startAt(value: D | null);
1167
+ private _startAt;
1168
+ /** The view that the calendar should start in. */
1169
+ startView: 'month' | 'year' | 'multi-year';
1170
+ /**
1171
+ * Theme color of the datepicker's calendar. This API is supported in M2 themes only, it
1172
+ * has no effect in M3 themes. For color customization in M3, see https://material.angular.io/components/datepicker/styling.
1173
+ *
1174
+ * For information on applying color variants in M3, see
1175
+ * https://material.angular.io/guide/material-2-theming#optional-add-backwards-compatibility-styles-for-color-variants
1176
+ */
1177
+ get color(): ThemePalette;
1178
+ set color(value: ThemePalette);
1179
+ _color: ThemePalette;
1180
+ /**
1181
+ * Whether the calendar UI is in touch mode. In touch mode the calendar opens in a dialog rather
1182
+ * than a dropdown and elements have more padding to allow for bigger touch targets.
1183
+ */
1184
+ touchUi: boolean;
1185
+ /** Whether the datepicker pop-up should be disabled. */
1198
1186
  get disabled(): boolean;
1199
1187
  set disabled(value: boolean);
1200
1188
  private _disabled;
1201
- /** Whether ripples on the toggle should be disabled. */
1202
- disableRipple: boolean;
1203
- /** Custom icon set by the consumer. */
1204
- _customIcon: MatDatepickerToggleIcon;
1205
- /** Underlying button element. */
1206
- _button: MatButton;
1189
+ /** Preferred position of the datepicker in the X axis. */
1190
+ xPosition: DatepickerDropdownPositionX;
1191
+ /** Preferred position of the datepicker in the Y axis. */
1192
+ yPosition: DatepickerDropdownPositionY;
1193
+ /**
1194
+ * Whether to restore focus to the previously-focused element when the calendar is closed.
1195
+ * Note that automatic focus restoration is an accessibility feature and it is recommended that
1196
+ * you provide your own equivalent, if you decide to turn it off.
1197
+ */
1198
+ restoreFocus: boolean;
1199
+ /**
1200
+ * Emits selected year in multiyear view.
1201
+ * This doesn't imply a change on the selected date.
1202
+ */
1203
+ readonly yearSelected: EventEmitter<D>;
1204
+ /**
1205
+ * Emits selected month in year view.
1206
+ * This doesn't imply a change on the selected date.
1207
+ */
1208
+ readonly monthSelected: EventEmitter<D>;
1209
+ /**
1210
+ * Emits when the current view changes.
1211
+ */
1212
+ readonly viewChanged: EventEmitter<MatCalendarView>;
1213
+ /** Function that can be used to add custom CSS classes to dates. */
1214
+ dateClass: MatCalendarCellClassFunction<D>;
1215
+ /** Emits when the datepicker has been opened. */
1216
+ readonly openedStream: EventEmitter<void>;
1217
+ /** Emits when the datepicker has been closed. */
1218
+ readonly closedStream: EventEmitter<void>;
1219
+ /** Classes to be passed to the date picker panel. */
1220
+ get panelClass(): string | string[];
1221
+ set panelClass(value: string | string[]);
1222
+ private _panelClass;
1223
+ /** Whether the calendar is open. */
1224
+ get opened(): boolean;
1225
+ set opened(value: boolean);
1226
+ private _opened;
1227
+ /** The id for the datepicker calendar. */
1228
+ id: string;
1229
+ /** The minimum selectable date. */
1230
+ _getMinDate(): D | null;
1231
+ /** The maximum selectable date. */
1232
+ _getMaxDate(): D | null;
1233
+ _getDateFilter(): DateFilterFn<D>;
1234
+ /** A reference to the overlay into which we've rendered the calendar. */
1235
+ private _overlayRef;
1236
+ /** Reference to the component instance rendered in the overlay. */
1237
+ private _componentRef;
1238
+ /** The element that was focused before the datepicker was opened. */
1239
+ private _focusedElementBeforeOpen;
1240
+ /** Unique class that will be added to the backdrop so that the test harnesses can look it up. */
1241
+ private _backdropHarnessClass;
1242
+ /** Currently-registered actions portal. */
1243
+ private _actionsPortal;
1244
+ /** The input element this datepicker is associated with. */
1245
+ datepickerInput: C;
1246
+ /** Emits when the datepicker's state changes. */
1247
+ readonly stateChanges: Subject<void>;
1248
+ private _injector;
1249
+ private readonly _changeDetectorRef;
1207
1250
  constructor(...args: unknown[]);
1208
1251
  ngOnChanges(changes: SimpleChanges): void;
1209
1252
  ngOnDestroy(): void;
1210
- ngAfterContentInit(): void;
1211
- _open(event: Event): void;
1212
- private _watchStateChanges;
1213
- static ɵfac: i0.ɵɵFactoryDeclaration<MatDatepickerToggle<any>, never>;
1214
- static ɵcmp: i0.ɵɵComponentDeclaration<MatDatepickerToggle<any>, "mat-datepicker-toggle", ["matDatepickerToggle"], { "datepicker": { "alias": "for"; "required": false; }; "tabIndex": { "alias": "tabIndex"; "required": false; }; "ariaLabel": { "alias": "aria-label"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "disableRipple": { "alias": "disableRipple"; "required": false; }; }, {}, ["_customIcon"], ["[matDatepickerToggleIcon]"], true, never>;
1253
+ /** Selects the given date */
1254
+ select(date: D): void;
1255
+ /** Emits the selected year in multiyear view */
1256
+ _selectYear(normalizedYear: D): void;
1257
+ /** Emits selected month in year view */
1258
+ _selectMonth(normalizedMonth: D): void;
1259
+ /** Emits changed view */
1260
+ _viewChanged(view: MatCalendarView): void;
1261
+ /**
1262
+ * Register an input with this datepicker.
1263
+ * @param input The datepicker input to register with this datepicker.
1264
+ * @returns Selection model that the input should hook itself up to.
1265
+ */
1266
+ registerInput(input: C): MatDateSelectionModel<S, D>;
1267
+ /**
1268
+ * Registers a portal containing action buttons with the datepicker.
1269
+ * @param portal Portal to be registered.
1270
+ */
1271
+ registerActions(portal: TemplatePortal): void;
1272
+ /**
1273
+ * Removes a portal containing action buttons from the datepicker.
1274
+ * @param portal Portal to be removed.
1275
+ */
1276
+ removeActions(portal: TemplatePortal): void;
1277
+ /** Open the calendar. */
1278
+ open(): void;
1279
+ /** Close the calendar. */
1280
+ close(): void;
1281
+ /** Applies the current pending selection on the overlay to the model. */
1282
+ _applyPendingSelection(): void;
1283
+ /** Forwards relevant values from the datepicker to the datepicker content inside the overlay. */
1284
+ protected _forwardContentValues(instance: MatDatepickerContent<S, D>): void;
1285
+ /** Opens the overlay with the calendar. */
1286
+ private _openOverlay;
1287
+ /** Destroys the current overlay. */
1288
+ private _destroyOverlay;
1289
+ /** Gets a position strategy that will open the calendar as a dropdown. */
1290
+ private _getDialogStrategy;
1291
+ /** Gets a position strategy that will open the calendar as a dropdown. */
1292
+ private _getDropdownStrategy;
1293
+ /** Sets the positions of the datepicker in dropdown mode based on the current configuration. */
1294
+ private _setConnectedPositions;
1295
+ /** Gets an observable that will emit when the overlay is supposed to be closed. */
1296
+ private _getCloseStream;
1297
+ static ɵfac: i0.ɵɵFactoryDeclaration<MatDatepickerBase<any, any, any>, never>;
1298
+ static ɵdir: i0.ɵɵDirectiveDeclaration<MatDatepickerBase<any, any, any>, never, never, { "calendarHeaderComponent": { "alias": "calendarHeaderComponent"; "required": false; }; "startAt": { "alias": "startAt"; "required": false; }; "startView": { "alias": "startView"; "required": false; }; "color": { "alias": "color"; "required": false; }; "touchUi": { "alias": "touchUi"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "xPosition": { "alias": "xPosition"; "required": false; }; "yPosition": { "alias": "yPosition"; "required": false; }; "restoreFocus": { "alias": "restoreFocus"; "required": false; }; "dateClass": { "alias": "dateClass"; "required": false; }; "panelClass": { "alias": "panelClass"; "required": false; }; "opened": { "alias": "opened"; "required": false; }; }, { "yearSelected": "yearSelected"; "monthSelected": "monthSelected"; "viewChanged": "viewChanged"; "openedStream": "opened"; "closedStream": "closed"; }, never, never, true, never>;
1299
+ static ngAcceptInputType_touchUi: unknown;
1215
1300
  static ngAcceptInputType_disabled: unknown;
1301
+ static ngAcceptInputType_restoreFocus: unknown;
1302
+ static ngAcceptInputType_opened: unknown;
1216
1303
  }
1217
1304
 
1218
- /** Can be used to override the icon of a `matDatepickerToggle`. */
1219
- export declare class MatDatepickerToggleIcon {
1220
- static ɵfac: i0.ɵɵFactoryDeclaration<MatDatepickerToggleIcon, never>;
1221
- static ɵdir: i0.ɵɵDirectiveDeclaration<MatDatepickerToggleIcon, "[matDatepickerToggleIcon]", never, {}, {}, never, never, true, never>;
1305
+ /** Component responsible for managing the datepicker popup/dialog. */
1306
+ declare class MatDatepicker<D> extends MatDatepickerBase<MatDatepickerControl<D>, D | null, D> {
1307
+ static ɵfac: i0.ɵɵFactoryDeclaration<MatDatepicker<any>, never>;
1308
+ static ɵcmp: i0.ɵɵComponentDeclaration<MatDatepicker<any>, "mat-datepicker", ["matDatepicker"], {}, {}, never, never, true, never>;
1222
1309
  }
1223
1310
 
1224
- export declare class MatDateRangeInput<D> implements MatFormFieldControl<DateRange<D>>, MatDatepickerControl<D>, MatDateRangePickerInput<D>, AfterContentInit, OnChanges, OnDestroy {
1225
- private _changeDetectorRef;
1226
- private _elementRef;
1227
- private _dateAdapter;
1311
+ /** @docs-private */
1312
+ declare const MAT_DATEPICKER_VALUE_ACCESSOR: any;
1313
+ /** @docs-private */
1314
+ declare const MAT_DATEPICKER_VALIDATORS: any;
1315
+ /** Directive used to connect an input to a MatDatepicker. */
1316
+ declare class MatDatepickerInput<D> extends MatDatepickerInputBase<D | null, D> implements MatDatepickerControl<D | null>, OnDestroy {
1228
1317
  private _formField;
1229
1318
  private _closedSubscription;
1230
1319
  private _openedSubscription;
1231
- _startInput: MatStartDate<D>;
1232
- _endInput: MatEndDate<D>;
1233
- /** Current value of the range input. */
1234
- get value(): DateRange<D> | null;
1235
- /** Unique ID for the group. */
1236
- id: string;
1237
- /** Whether the control is focused. */
1238
- focused: boolean;
1239
- /** Whether the control's label should float. */
1240
- get shouldLabelFloat(): boolean;
1241
- /** Name of the form control. */
1242
- controlType: string;
1243
- /**
1244
- * Implemented as a part of `MatFormFieldControl`.
1245
- * Set the placeholder attribute on `matStartDate` and `matEndDate`.
1246
- * @docs-private
1247
- */
1248
- get placeholder(): string;
1249
- /** The range picker that this input is associated with. */
1250
- get rangePicker(): MatDatepickerPanel<MatDatepickerControl<D>, DateRange<D>, D>;
1251
- set rangePicker(rangePicker: MatDatepickerPanel<MatDatepickerControl<D>, DateRange<D>, D>);
1252
- private _rangePicker;
1320
+ /** The datepicker that this input is associated with. */
1321
+ set matDatepicker(datepicker: MatDatepickerPanel<MatDatepickerControl<D>, D | null, D>);
1322
+ _datepicker: MatDatepickerPanel<MatDatepickerControl<D>, D | null, D>;
1253
1323
  /** The id of the panel owned by this input. */
1254
- _ariaOwns: WritableSignal<string | null>;
1255
- /** Whether the input is required. */
1256
- get required(): boolean;
1257
- set required(value: boolean);
1258
- private _required;
1259
- /** Function that can be used to filter out dates within the date range picker. */
1260
- get dateFilter(): DateFilterFn<D>;
1261
- set dateFilter(value: DateFilterFn<D>);
1262
- private _dateFilter;
1324
+ protected _ariaOwns: i0.WritableSignal<string | null>;
1263
1325
  /** The minimum valid date. */
1264
1326
  get min(): D | null;
1265
1327
  set min(value: D | null);
@@ -1268,666 +1330,454 @@ export declare class MatDateRangeInput<D> implements MatFormFieldControl<DateRan
1268
1330
  get max(): D | null;
1269
1331
  set max(value: D | null);
1270
1332
  private _max;
1271
- /** Whether the input is disabled. */
1272
- get disabled(): boolean;
1273
- set disabled(value: boolean);
1274
- _groupDisabled: boolean;
1275
- /** Whether the input is in an error state. */
1276
- get errorState(): boolean;
1277
- /** Whether the datepicker input is empty. */
1278
- get empty(): boolean;
1279
- /** Value for the `aria-describedby` attribute of the inputs. */
1280
- _ariaDescribedBy: string | null;
1281
- /** Date selection model currently registered with the input. */
1282
- private _model;
1283
- /** Separator text to be shown between the inputs. */
1284
- separator: string;
1285
- /** Start of the comparison range that should be shown in the calendar. */
1286
- comparisonStart: D | null;
1287
- /** End of the comparison range that should be shown in the calendar. */
1288
- comparisonEnd: D | null;
1289
- /**
1290
- * Implemented as a part of `MatFormFieldControl`.
1291
- * TODO(crisbeto): change type to `AbstractControlDirective` after #18206 lands.
1292
- * @docs-private
1293
- */
1294
- ngControl: NgControl | null;
1295
- /** Emits when the input's state has changed. */
1296
- readonly stateChanges: Subject<void>;
1297
- /**
1298
- * Disable the automatic labeling to avoid issues like #27241.
1299
- * @docs-private
1300
- */
1301
- readonly disableAutomaticLabeling = true;
1302
- constructor(...args: unknown[]);
1303
- /**
1304
- * Implemented as a part of `MatFormFieldControl`.
1305
- * @docs-private
1306
- */
1307
- setDescribedByIds(ids: string[]): void;
1308
- /**
1309
- * Implemented as a part of `MatFormFieldControl`.
1310
- * @docs-private
1311
- */
1312
- onContainerClick(): void;
1313
- ngAfterContentInit(): void;
1314
- ngOnChanges(changes: SimpleChanges): void;
1315
- ngOnDestroy(): void;
1316
- /** Gets the date at which the calendar should start. */
1317
- getStartValue(): D | null;
1318
- /** Gets the input's theme palette. */
1319
- getThemePalette(): ThemePalette;
1320
- /** Gets the element to which the calendar overlay should be attached. */
1321
- getConnectedOverlayOrigin(): ElementRef;
1322
- /** Gets the ID of an element that should be used a description for the calendar overlay. */
1323
- getOverlayLabelId(): string | null;
1324
- /** Gets the value that is used to mirror the state input. */
1325
- _getInputMirrorValue(part: 'start' | 'end'): string;
1326
- /** Whether the input placeholders should be hidden. */
1327
- _shouldHidePlaceholders(): boolean;
1328
- /** Handles the value in one of the child inputs changing. */
1329
- _handleChildValueChange(): void;
1330
- /** Opens the date range picker associated with the input. */
1331
- _openDatepicker(): void;
1332
- /** Whether the separate text should be hidden. */
1333
- _shouldHideSeparator(): boolean | "" | null;
1334
- /** Gets the value for the `aria-labelledby` attribute of the inputs. */
1335
- _getAriaLabelledby(): string | null;
1336
- _getStartDateAccessibleName(): string;
1337
- _getEndDateAccessibleName(): string;
1338
- /** Updates the focused state of the range input. */
1339
- _updateFocus(origin: FocusOrigin): void;
1340
- /** Re-runs the validators on the start/end inputs. */
1341
- private _revalidate;
1342
- /** Registers the current date selection model with the start/end inputs. */
1343
- private _registerModel;
1344
- /** Checks whether a specific range input directive is required. */
1345
- private _isTargetRequired;
1346
- static ɵfac: i0.ɵɵFactoryDeclaration<MatDateRangeInput<any>, never>;
1347
- static ɵcmp: i0.ɵɵComponentDeclaration<MatDateRangeInput<any>, "mat-date-range-input", ["matDateRangeInput"], { "rangePicker": { "alias": "rangePicker"; "required": false; }; "required": { "alias": "required"; "required": false; }; "dateFilter": { "alias": "dateFilter"; "required": false; }; "min": { "alias": "min"; "required": false; }; "max": { "alias": "max"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "separator": { "alias": "separator"; "required": false; }; "comparisonStart": { "alias": "comparisonStart"; "required": false; }; "comparisonEnd": { "alias": "comparisonEnd"; "required": false; }; }, {}, never, ["input[matStartDate]", "input[matEndDate]"], true, never>;
1348
- static ngAcceptInputType_required: unknown;
1349
- static ngAcceptInputType_disabled: unknown;
1350
- }
1351
-
1352
- /**
1353
- * Base class for the individual inputs that can be projected inside a `mat-date-range-input`.
1354
- */
1355
- declare abstract class MatDateRangeInputPartBase<D> extends MatDatepickerInputBase<DateRange<D>> implements OnInit, AfterContentInit, DoCheck {
1356
- _rangeInput: MatDateRangeInput<D>;
1357
- _elementRef: ElementRef<HTMLInputElement>;
1358
- _defaultErrorStateMatcher: ErrorStateMatcher;
1359
- private _injector;
1360
- _parentForm: NgForm | null;
1361
- _parentFormGroup: FormGroupDirective | null;
1362
- /**
1363
- * Form control bound to this input part.
1364
- * @docs-private
1365
- */
1366
- ngControl: NgControl;
1367
- protected abstract _validator: ValidatorFn | null;
1368
- protected abstract _assignValueToModel(value: D | null): void;
1369
- protected abstract _getValueFromModel(modelValue: DateRange<D>): D | null;
1370
- protected abstract _register(): void;
1371
- protected readonly _dir: Directionality | null;
1372
- private _errorStateTracker;
1373
- /** Object used to control when error messages are shown. */
1374
- get errorStateMatcher(): ErrorStateMatcher;
1375
- set errorStateMatcher(value: ErrorStateMatcher);
1376
- /** Whether the input is in an error state. */
1377
- get errorState(): boolean;
1378
- set errorState(value: boolean);
1333
+ /** Function that can be used to filter out dates within the datepicker. */
1334
+ get dateFilter(): DateFilterFn<D | null>;
1335
+ set dateFilter(value: DateFilterFn<D | null>);
1336
+ private _dateFilter;
1337
+ /** The combined form control validator for this input. */
1338
+ protected _validator: ValidatorFn | null;
1379
1339
  constructor(...args: unknown[]);
1380
- ngOnInit(): void;
1381
- ngAfterContentInit(): void;
1382
- ngDoCheck(): void;
1383
- /** Gets whether the input is empty. */
1384
- isEmpty(): boolean;
1385
- /** Gets the placeholder of the input. */
1386
- _getPlaceholder(): string;
1387
- /** Focuses the input. */
1388
- focus(): void;
1389
- /** Gets the value that should be used when mirroring the input's size. */
1390
- getMirrorValue(): string;
1391
- /** Refreshes the error state of the input. */
1392
- updateErrorState(): void;
1393
- /** Handles `input` events on the input element. */
1394
- _onInput(value: string): void;
1395
- /** Opens the datepicker associated with the input. */
1396
- protected _openPopup(): void;
1397
- /** Gets the minimum date from the range input. */
1398
- _getMinDate(): D | null;
1399
- /** Gets the maximum date from the range input. */
1400
- _getMaxDate(): D | null;
1401
- /** Gets the date filter function from the range input. */
1402
- protected _getDateFilter(): DateFilterFn<D>;
1403
- protected _parentDisabled(): boolean;
1404
- protected _shouldHandleChangeEvent({ source }: DateSelectionModelChange<DateRange<D>>): boolean;
1405
- protected _assignValueProgrammatically(value: D | null): void;
1406
- protected _formatValue(value: D | null): void;
1407
- /** return the ARIA accessible name of the input element */
1408
- _getAccessibleName(): string;
1409
- static ɵfac: i0.ɵɵFactoryDeclaration<MatDateRangeInputPartBase<any>, never>;
1410
- static ɵdir: i0.ɵɵDirectiveDeclaration<MatDateRangeInputPartBase<any>, never, never, { "errorStateMatcher": { "alias": "errorStateMatcher"; "required": false; }; }, {}, never, never, true, never>;
1411
- }
1412
-
1413
- /** Component responsible for managing the date range picker popup/dialog. */
1414
- export declare class MatDateRangePicker<D> extends MatDatepickerBase<MatDateRangePickerInput<D>, DateRange<D>, D> {
1415
- protected _forwardContentValues(instance: MatDatepickerContent<DateRange<D>, D>): void;
1416
- static ɵfac: i0.ɵɵFactoryDeclaration<MatDateRangePicker<any>, never>;
1417
- static ɵcmp: i0.ɵɵComponentDeclaration<MatDateRangePicker<any>, "mat-date-range-picker", ["matDateRangePicker"], {}, {}, never, never, true, never>;
1418
- }
1419
-
1420
- /**
1421
- * Input that can be associated with a date range picker.
1422
- * @docs-private
1423
- */
1424
- declare interface MatDateRangePickerInput<D> extends MatDatepickerControl<D> {
1425
- _getEndDateAccessibleName(): string | null;
1426
- _getStartDateAccessibleName(): string | null;
1427
- comparisonStart: D | null;
1428
- comparisonEnd: D | null;
1429
- }
1430
-
1431
- /** Object that can be provided in order to customize the date range selection behavior. */
1432
- export declare interface MatDateRangeSelectionStrategy<D> {
1433
- /**
1434
- * Called when the user has finished selecting a value.
1435
- * @param date Date that was selected. Will be null if the user cleared the selection.
1436
- * @param currentRange Range that is currently show in the calendar.
1437
- * @param event DOM event that triggered the selection. Currently only corresponds to a `click`
1438
- * event, but it may get expanded in the future.
1439
- */
1440
- selectionFinished(date: D | null, currentRange: DateRange<D>, event: Event): DateRange<D>;
1441
- /**
1442
- * Called when the user has activated a new date (e.g. by hovering over
1443
- * it or moving focus) and the calendar tries to display a date range.
1444
- *
1445
- * @param activeDate Date that the user has activated. Will be null if the user moved
1446
- * focus to an element that's no a calendar cell.
1447
- * @param currentRange Range that is currently shown in the calendar.
1448
- * @param event DOM event that caused the preview to be changed. Will be either a
1449
- * `mouseenter`/`mouseleave` or `focus`/`blur` depending on how the user is navigating.
1450
- */
1451
- createPreview(activeDate: D | null, currentRange: DateRange<D>, event: Event): DateRange<D>;
1452
- /**
1453
- * Called when the user has dragged a date in the currently selected range to another
1454
- * date. Returns the date updated range that should result from this interaction.
1455
- *
1456
- * @param dateOrigin The date the user started dragging from.
1457
- * @param originalRange The originally selected date range.
1458
- * @param newDate The currently targeted date in the drag operation.
1459
- * @param event DOM event that triggered the updated drag state. Will be
1460
- * `mouseenter`/`mouseup` or `touchmove`/`touchend` depending on the device type.
1461
- */
1462
- createDrag?(dragOrigin: D, originalRange: DateRange<D>, newDate: D, event: Event): DateRange<D> | null;
1463
- }
1464
-
1465
- /**
1466
- * A selection model containing a date selection.
1467
- * @docs-private
1468
- */
1469
- export declare abstract class MatDateSelectionModel<S, D = ExtractDateTypeFromSelection<S>> implements OnDestroy {
1470
- /** The current selection. */
1471
- readonly selection: S;
1472
- protected _adapter: DateAdapter<D>;
1473
- private readonly _selectionChanged;
1474
- /** Emits when the selection has changed. */
1475
- selectionChanged: Observable<DateSelectionModelChange<S>>;
1476
- protected constructor(
1477
- /** The current selection. */
1478
- selection: S, _adapter: DateAdapter<D>);
1479
1340
  /**
1480
- * Updates the current selection in the model.
1481
- * @param value New selection that should be assigned.
1482
- * @param source Object that triggered the selection change.
1341
+ * Gets the element that the datepicker popup should be connected to.
1342
+ * @return The element to connect the popup to.
1483
1343
  */
1484
- updateSelection(value: S, source: unknown): void;
1344
+ getConnectedOverlayOrigin(): ElementRef;
1345
+ /** Gets the ID of an element that should be used a description for the calendar overlay. */
1346
+ getOverlayLabelId(): string | null;
1347
+ /** Returns the palette used by the input's form field, if any. */
1348
+ getThemePalette(): ThemePalette;
1349
+ /** Gets the value at which the calendar should start. */
1350
+ getStartValue(): D | null;
1485
1351
  ngOnDestroy(): void;
1486
- protected _isValidDateInstance(date: D): boolean;
1487
- /** Adds a date to the current selection. */
1488
- abstract add(date: D | null): void;
1489
- /** Checks whether the current selection is valid. */
1490
- abstract isValid(): boolean;
1491
- /** Checks whether the current selection is complete. */
1492
- abstract isComplete(): boolean;
1493
- /** Clones the selection model. */
1494
- abstract clone(): MatDateSelectionModel<S, D>;
1495
- static ɵfac: i0.ɵɵFactoryDeclaration<MatDateSelectionModel<any, any>, never>;
1496
- static ɵprov: i0.ɵɵInjectableDeclaration<MatDateSelectionModel<any, any>>;
1497
- }
1498
-
1499
- /** Input for entering the end date in a `mat-date-range-input`. */
1500
- export declare class MatEndDate<D> extends MatDateRangeInputPartBase<D> {
1501
- /** Validator that checks that the end date isn't before the start date. */
1502
- private _endValidator;
1503
- protected _register(): void;
1504
- protected _validator: ValidatorFn | null;
1505
- protected _getValueFromModel(modelValue: DateRange<D>): D | null;
1506
- protected _shouldHandleChangeEvent(change: DateSelectionModelChange<DateRange<D>>): boolean;
1352
+ /** Opens the associated datepicker. */
1353
+ protected _openPopup(): void;
1354
+ protected _getValueFromModel(modelValue: D | null): D | null;
1507
1355
  protected _assignValueToModel(value: D | null): void;
1508
- private _moveCaretToEndOfStartInput;
1509
- _onKeydown(event: KeyboardEvent): void;
1510
- static ɵfac: i0.ɵɵFactoryDeclaration<MatEndDate<any>, never>;
1511
- static ɵdir: i0.ɵɵDirectiveDeclaration<MatEndDate<any>, "input[matEndDate]", never, {}, { "dateChange": "dateChange"; "dateInput": "dateInput"; }, never, never, true, never>;
1356
+ /** Gets the input's minimum date. */
1357
+ _getMinDate(): D | null;
1358
+ /** Gets the input's maximum date. */
1359
+ _getMaxDate(): D | null;
1360
+ /** Gets the input's date filtering function. */
1361
+ protected _getDateFilter(): DateFilterFn<D | null>;
1362
+ protected _shouldHandleChangeEvent(event: DateSelectionModelChange<D>): boolean;
1363
+ static ɵfac: i0.ɵɵFactoryDeclaration<MatDatepickerInput<any>, never>;
1364
+ static ɵdir: i0.ɵɵDirectiveDeclaration<MatDatepickerInput<any>, "input[matDatepicker]", ["matDatepickerInput"], { "matDatepicker": { "alias": "matDatepicker"; "required": false; }; "min": { "alias": "min"; "required": false; }; "max": { "alias": "max"; "required": false; }; "dateFilter": { "alias": "matDatepickerFilter"; "required": false; }; }, {}, never, never, true, never>;
1512
1365
  }
1513
1366
 
1514
- /**
1515
- * An internal component used to display a single month in the datepicker.
1516
- * @docs-private
1517
- */
1518
- export declare class MatMonthView<D> implements AfterContentInit, OnChanges, OnDestroy {
1519
- readonly _changeDetectorRef: ChangeDetectorRef;
1520
- private _dateFormats;
1521
- _dateAdapter: DateAdapter<D, any>;
1522
- private _dir;
1523
- private _rangeStrategy;
1524
- private _rerenderSubscription;
1525
- /** Flag used to filter out space/enter keyup events that originated outside of the view. */
1526
- private _selectionKeyPressed;
1527
- /**
1528
- * The date to display in this month view (everything other than the month and year is ignored).
1529
- */
1530
- get activeDate(): D;
1531
- set activeDate(value: D);
1532
- private _activeDate;
1533
- /** The currently selected date. */
1534
- get selected(): DateRange<D> | D | null;
1535
- set selected(value: DateRange<D> | D | null);
1536
- private _selected;
1537
- /** The minimum selectable date. */
1538
- get minDate(): D | null;
1539
- set minDate(value: D | null);
1540
- private _minDate;
1541
- /** The maximum selectable date. */
1542
- get maxDate(): D | null;
1543
- set maxDate(value: D | null);
1544
- private _maxDate;
1545
- /** Function used to filter which dates are selectable. */
1546
- dateFilter: (date: D) => boolean;
1547
- /** Function that can be used to add custom CSS classes to dates. */
1548
- dateClass: MatCalendarCellClassFunction<D>;
1549
- /** Start of the comparison range. */
1550
- comparisonStart: D | null;
1551
- /** End of the comparison range. */
1552
- comparisonEnd: D | null;
1553
- /** ARIA Accessible name of the `<input matStartDate/>` */
1554
- startDateAccessibleName: string | null;
1555
- /** ARIA Accessible name of the `<input matEndDate/>` */
1556
- endDateAccessibleName: string | null;
1557
- /** Origin of active drag, or null when dragging is not active. */
1558
- activeDrag: MatCalendarUserEvent<D> | null;
1559
- /** Emits when a new date is selected. */
1560
- readonly selectedChange: EventEmitter<D | null>;
1561
- /** Emits when any date is selected. */
1562
- readonly _userSelection: EventEmitter<MatCalendarUserEvent<D | null>>;
1563
- /** Emits when the user initiates a date range drag via mouse or touch. */
1564
- readonly dragStarted: EventEmitter<MatCalendarUserEvent<D>>;
1565
- /**
1566
- * Emits when the user completes or cancels a date range drag.
1567
- * Emits null when the drag was canceled or the newly selected date range if completed.
1568
- */
1569
- readonly dragEnded: EventEmitter<MatCalendarUserEvent<DateRange<D> | null>>;
1570
- /** Emits when any date is activated. */
1571
- readonly activeDateChange: EventEmitter<D>;
1572
- /** The body of calendar table */
1573
- _matCalendarBody: MatCalendarBody;
1574
- /** The label for this month (e.g. "January 2017"). */
1575
- _monthLabel: string;
1576
- /** Grid of calendar cells representing the dates of the month. */
1577
- _weeks: MatCalendarCell[][];
1578
- /** The number of blank cells in the first row before the 1st of the month. */
1579
- _firstWeekOffset: number;
1580
- /** Start value of the currently-shown date range. */
1581
- _rangeStart: number | null;
1582
- /** End value of the currently-shown date range. */
1583
- _rangeEnd: number | null;
1584
- /** Start value of the currently-shown comparison date range. */
1585
- _comparisonRangeStart: number | null;
1586
- /** End value of the currently-shown comparison date range. */
1587
- _comparisonRangeEnd: number | null;
1588
- /** Start of the preview range. */
1589
- _previewStart: number | null;
1590
- /** End of the preview range. */
1591
- _previewEnd: number | null;
1592
- /** Whether the user is currently selecting a range of dates. */
1593
- _isRange: boolean;
1594
- /** The date of the month that today falls on. Null if today is in another month. */
1595
- _todayDate: number | null;
1596
- /** The names of the weekdays. */
1597
- _weekdays: {
1598
- long: string;
1599
- narrow: string;
1600
- id: number;
1601
- }[];
1602
- constructor(...args: unknown[]);
1603
- ngAfterContentInit(): void;
1604
- ngOnChanges(changes: SimpleChanges): void;
1605
- ngOnDestroy(): void;
1606
- /** Handles when a new date is selected. */
1607
- _dateSelected(event: MatCalendarUserEvent<number>): void;
1367
+ /** Datepicker data that requires internationalization. */
1368
+ declare class MatDatepickerIntl {
1608
1369
  /**
1609
- * Takes the index of a calendar body cell wrapped in an event as argument. For the date that
1610
- * corresponds to the given cell, set `activeDate` to that date and fire `activeDateChange` with
1611
- * that date.
1612
- *
1613
- * This function is used to match each component's model of the active date with the calendar
1614
- * body cell that was focused. It updates its value of `activeDate` synchronously and updates the
1615
- * parent's value asynchronously via the `activeDateChange` event. The child component receives an
1616
- * updated value asynchronously via the `activeCell` Input.
1370
+ * Stream that emits whenever the labels here are changed. Use this to notify
1371
+ * components if the labels have changed after initialization.
1617
1372
  */
1618
- _updateActiveDate(event: MatCalendarUserEvent<number>): void;
1619
- /** Handles keydown events on the calendar body when calendar is in month view. */
1620
- _handleCalendarBodyKeydown(event: KeyboardEvent): void;
1621
- /** Handles keyup events on the calendar body when calendar is in month view. */
1622
- _handleCalendarBodyKeyup(event: KeyboardEvent): void;
1623
- /** Initializes this month view. */
1624
- _init(): void;
1625
- /** Focuses the active cell after the microtask queue is empty. */
1626
- _focusActiveCell(movePreview?: boolean): void;
1627
- /** Focuses the active cell after change detection has run and the microtask queue is empty. */
1628
- _focusActiveCellAfterViewChecked(): void;
1629
- /** Called when the user has activated a new cell and the preview needs to be updated. */
1630
- _previewChanged({ event, value: cell }: MatCalendarUserEvent<MatCalendarCell<D> | null>): void;
1373
+ readonly changes: Subject<void>;
1374
+ /** A label for the calendar popup (used by screen readers). */
1375
+ calendarLabel: string;
1376
+ /** A label for the button used to open the calendar popup (used by screen readers). */
1377
+ openCalendarLabel: string;
1378
+ /** Label for the button used to close the calendar popup. */
1379
+ closeCalendarLabel: string;
1380
+ /** A label for the previous month button (used by screen readers). */
1381
+ prevMonthLabel: string;
1382
+ /** A label for the next month button (used by screen readers). */
1383
+ nextMonthLabel: string;
1384
+ /** A label for the previous year button (used by screen readers). */
1385
+ prevYearLabel: string;
1386
+ /** A label for the next year button (used by screen readers). */
1387
+ nextYearLabel: string;
1388
+ /** A label for the previous multi-year button (used by screen readers). */
1389
+ prevMultiYearLabel: string;
1390
+ /** A label for the next multi-year button (used by screen readers). */
1391
+ nextMultiYearLabel: string;
1392
+ /** A label for the 'switch to month view' button (used by screen readers). */
1393
+ switchToMonthViewLabel: string;
1394
+ /** A label for the 'switch to year view' button (used by screen readers). */
1395
+ switchToMultiYearViewLabel: string;
1631
1396
  /**
1632
- * Called when the user has ended a drag. If the drag/drop was successful,
1633
- * computes and emits the new range selection.
1397
+ * A label for the first date of a range of dates (used by screen readers).
1398
+ * @deprecated Provide your own internationalization string.
1399
+ * @breaking-change 17.0.0
1634
1400
  */
1635
- protected _dragEnded(event: MatCalendarUserEvent<D | null>): void;
1401
+ startDateLabel: string;
1636
1402
  /**
1637
- * Takes a day of the month and returns a new date in the same month and year as the currently
1638
- * active date. The returned date will have the same day of the month as the argument date.
1403
+ * A label for the last date of a range of dates (used by screen readers).
1404
+ * @deprecated Provide your own internationalization string.
1405
+ * @breaking-change 17.0.0
1639
1406
  */
1640
- private _getDateFromDayOfMonth;
1641
- /** Initializes the weekdays. */
1642
- private _initWeekdays;
1643
- /** Creates MatCalendarCells for the dates in this month. */
1644
- private _createWeekCells;
1645
- /** Date filter for the month */
1646
- private _shouldEnableDate;
1407
+ endDateLabel: string;
1647
1408
  /**
1648
- * Gets the date in this month that the given Date falls on.
1649
- * Returns null if the given Date is in another month.
1409
+ * A label for the Comparison date of a range of dates (used by screen readers).
1650
1410
  */
1651
- private _getDateInCurrentMonth;
1652
- /** Checks whether the 2 dates are non-null and fall within the same month of the same year. */
1653
- private _hasSameMonthAndYear;
1654
- /** Gets the value that will be used to one cell to another. */
1655
- private _getCellCompareValue;
1656
- /** Determines whether the user has the RTL layout direction. */
1657
- private _isRtl;
1658
- /** Sets the current range based on a model value. */
1659
- private _setRanges;
1660
- /** Gets whether a date can be selected in the month view. */
1661
- private _canSelect;
1662
- /** Clears out preview state. */
1663
- private _clearPreview;
1664
- static ɵfac: i0.ɵɵFactoryDeclaration<MatMonthView<any>, never>;
1665
- static ɵcmp: i0.ɵɵComponentDeclaration<MatMonthView<any>, "mat-month-view", ["matMonthView"], { "activeDate": { "alias": "activeDate"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; "minDate": { "alias": "minDate"; "required": false; }; "maxDate": { "alias": "maxDate"; "required": false; }; "dateFilter": { "alias": "dateFilter"; "required": false; }; "dateClass": { "alias": "dateClass"; "required": false; }; "comparisonStart": { "alias": "comparisonStart"; "required": false; }; "comparisonEnd": { "alias": "comparisonEnd"; "required": false; }; "startDateAccessibleName": { "alias": "startDateAccessibleName"; "required": false; }; "endDateAccessibleName": { "alias": "endDateAccessibleName"; "required": false; }; "activeDrag": { "alias": "activeDrag"; "required": false; }; }, { "selectedChange": "selectedChange"; "_userSelection": "_userSelection"; "dragStarted": "dragStarted"; "dragEnded": "dragEnded"; "activeDateChange": "activeDateChange"; }, never, never, true, never>;
1411
+ comparisonDateLabel: string;
1412
+ /** Formats a range of years (used for visuals). */
1413
+ formatYearRange(start: string, end: string): string;
1414
+ /** Formats a label for a range of years (used by screen readers). */
1415
+ formatYearRangeLabel(start: string, end: string): string;
1416
+ static ɵfac: i0.ɵɵFactoryDeclaration<MatDatepickerIntl, never>;
1417
+ static ɵprov: i0.ɵɵInjectableDeclaration<MatDatepickerIntl>;
1418
+ }
1419
+
1420
+ /** Can be used to override the icon of a `matDatepickerToggle`. */
1421
+ declare class MatDatepickerToggleIcon {
1422
+ static ɵfac: i0.ɵɵFactoryDeclaration<MatDatepickerToggleIcon, never>;
1423
+ static ɵdir: i0.ɵɵDirectiveDeclaration<MatDatepickerToggleIcon, "[matDatepickerToggleIcon]", never, {}, {}, never, never, true, never>;
1424
+ }
1425
+ declare class MatDatepickerToggle<D> implements AfterContentInit, OnChanges, OnDestroy {
1426
+ _intl: MatDatepickerIntl;
1427
+ private _changeDetectorRef;
1428
+ private _stateChanges;
1429
+ /** Datepicker instance that the button will toggle. */
1430
+ datepicker: MatDatepickerPanel<MatDatepickerControl<any>, D>;
1431
+ /** Tabindex for the toggle. */
1432
+ tabIndex: number | null;
1433
+ /** Screen-reader label for the button. */
1434
+ ariaLabel: string;
1435
+ /** Whether the toggle button is disabled. */
1436
+ get disabled(): boolean;
1437
+ set disabled(value: boolean);
1438
+ private _disabled;
1439
+ /** Whether ripples on the toggle should be disabled. */
1440
+ disableRipple: boolean;
1441
+ /** Custom icon set by the consumer. */
1442
+ _customIcon: MatDatepickerToggleIcon;
1443
+ /** Underlying button element. */
1444
+ _button: MatButton;
1445
+ constructor(...args: unknown[]);
1446
+ ngOnChanges(changes: SimpleChanges): void;
1447
+ ngOnDestroy(): void;
1448
+ ngAfterContentInit(): void;
1449
+ _open(event: Event): void;
1450
+ private _watchStateChanges;
1451
+ static ɵfac: i0.ɵɵFactoryDeclaration<MatDatepickerToggle<any>, never>;
1452
+ static ɵcmp: i0.ɵɵComponentDeclaration<MatDatepickerToggle<any>, "mat-datepicker-toggle", ["matDatepickerToggle"], { "datepicker": { "alias": "for"; "required": false; }; "tabIndex": { "alias": "tabIndex"; "required": false; }; "ariaLabel": { "alias": "aria-label"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "disableRipple": { "alias": "disableRipple"; "required": false; }; }, {}, ["_customIcon"], ["[matDatepickerToggleIcon]"], true, never>;
1453
+ static ngAcceptInputType_disabled: unknown;
1666
1454
  }
1667
1455
 
1668
1456
  /**
1669
- * An internal component used to display a year selector in the datepicker.
1670
- * @docs-private
1457
+ * Base class for the individual inputs that can be projected inside a `mat-date-range-input`.
1671
1458
  */
1672
- export declare class MatMultiYearView<D> implements AfterContentInit, OnDestroy {
1673
- private _changeDetectorRef;
1674
- _dateAdapter: DateAdapter<D, any>;
1675
- private _dir;
1676
- private _rerenderSubscription;
1677
- /** Flag used to filter out space/enter keyup events that originated outside of the view. */
1678
- private _selectionKeyPressed;
1679
- /** The date to display in this multi-year view (everything other than the year is ignored). */
1680
- get activeDate(): D;
1681
- set activeDate(value: D);
1682
- private _activeDate;
1683
- /** The currently selected date. */
1684
- get selected(): DateRange<D> | D | null;
1685
- set selected(value: DateRange<D> | D | null);
1686
- private _selected;
1687
- /** The minimum selectable date. */
1688
- get minDate(): D | null;
1689
- set minDate(value: D | null);
1690
- private _minDate;
1691
- /** The maximum selectable date. */
1692
- get maxDate(): D | null;
1693
- set maxDate(value: D | null);
1694
- private _maxDate;
1695
- /** A function used to filter which dates are selectable. */
1696
- dateFilter: (date: D) => boolean;
1697
- /** Function that can be used to add custom CSS classes to date cells. */
1698
- dateClass: MatCalendarCellClassFunction<D>;
1699
- /** Emits when a new year is selected. */
1700
- readonly selectedChange: EventEmitter<D>;
1701
- /** Emits the selected year. This doesn't imply a change on the selected date */
1702
- readonly yearSelected: EventEmitter<D>;
1703
- /** Emits when any date is activated. */
1704
- readonly activeDateChange: EventEmitter<D>;
1705
- /** The body of calendar table */
1706
- _matCalendarBody: MatCalendarBody;
1707
- /** Grid of calendar cells representing the currently displayed years. */
1708
- _years: MatCalendarCell[][];
1709
- /** The year that today falls on. */
1710
- _todayYear: number;
1711
- /** The year of the selected date. Null if the selected date is null. */
1712
- _selectedYear: number | null;
1713
- constructor(...args: unknown[]);
1714
- ngAfterContentInit(): void;
1715
- ngOnDestroy(): void;
1716
- /** Initializes this multi-year view. */
1717
- _init(): void;
1718
- /** Handles when a new year is selected. */
1719
- _yearSelected(event: MatCalendarUserEvent<number>): void;
1720
- /**
1721
- * Takes the index of a calendar body cell wrapped in an event as argument. For the date that
1722
- * corresponds to the given cell, set `activeDate` to that date and fire `activeDateChange` with
1723
- * that date.
1724
- *
1725
- * This function is used to match each component's model of the active date with the calendar
1726
- * body cell that was focused. It updates its value of `activeDate` synchronously and updates the
1727
- * parent's value asynchronously via the `activeDateChange` event. The child component receives an
1728
- * updated value asynchronously via the `activeCell` Input.
1729
- */
1730
- _updateActiveDate(event: MatCalendarUserEvent<number>): void;
1731
- /** Handles keydown events on the calendar body when calendar is in multi-year view. */
1732
- _handleCalendarBodyKeydown(event: KeyboardEvent): void;
1733
- /** Handles keyup events on the calendar body when calendar is in multi-year view. */
1734
- _handleCalendarBodyKeyup(event: KeyboardEvent): void;
1735
- _getActiveCell(): number;
1736
- /** Focuses the active cell after the microtask queue is empty. */
1737
- _focusActiveCell(): void;
1738
- /** Focuses the active cell after change detection has run and the microtask queue is empty. */
1739
- _focusActiveCellAfterViewChecked(): void;
1459
+ declare abstract class MatDateRangeInputPartBase<D> extends MatDatepickerInputBase<DateRange<D>> implements OnInit, AfterContentInit, DoCheck {
1460
+ _rangeInput: MatDateRangeInput<D>;
1461
+ _elementRef: ElementRef<HTMLInputElement>;
1462
+ _defaultErrorStateMatcher: ErrorStateMatcher;
1463
+ private _injector;
1464
+ _parentForm: NgForm | null;
1465
+ _parentFormGroup: FormGroupDirective | null;
1740
1466
  /**
1741
- * Takes a year and returns a new date on the same day and month as the currently active date
1742
- * The returned date will have the same year as the argument date.
1467
+ * Form control bound to this input part.
1468
+ * @docs-private
1743
1469
  */
1744
- private _getDateFromYear;
1745
- /** Creates an MatCalendarCell for the given year. */
1746
- private _createCellForYear;
1747
- /** Whether the given year is enabled. */
1748
- private _shouldEnableYear;
1749
- /** Determines whether the user has the RTL layout direction. */
1750
- private _isRtl;
1751
- /** Sets the currently-highlighted year based on a model value. */
1752
- private _setSelectedYear;
1753
- static ɵfac: i0.ɵɵFactoryDeclaration<MatMultiYearView<any>, never>;
1754
- static ɵcmp: i0.ɵɵComponentDeclaration<MatMultiYearView<any>, "mat-multi-year-view", ["matMultiYearView"], { "activeDate": { "alias": "activeDate"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; "minDate": { "alias": "minDate"; "required": false; }; "maxDate": { "alias": "maxDate"; "required": false; }; "dateFilter": { "alias": "dateFilter"; "required": false; }; "dateClass": { "alias": "dateClass"; "required": false; }; }, { "selectedChange": "selectedChange"; "yearSelected": "yearSelected"; "activeDateChange": "activeDateChange"; }, never, never, true, never>;
1470
+ ngControl: NgControl;
1471
+ protected abstract _validator: ValidatorFn | null;
1472
+ protected abstract _assignValueToModel(value: D | null): void;
1473
+ protected abstract _getValueFromModel(modelValue: DateRange<D>): D | null;
1474
+ protected abstract _register(): void;
1475
+ protected readonly _dir: Directionality | null;
1476
+ private _errorStateTracker;
1477
+ /** Object used to control when error messages are shown. */
1478
+ get errorStateMatcher(): ErrorStateMatcher;
1479
+ set errorStateMatcher(value: ErrorStateMatcher);
1480
+ /** Whether the input is in an error state. */
1481
+ get errorState(): boolean;
1482
+ set errorState(value: boolean);
1483
+ constructor(...args: unknown[]);
1484
+ ngOnInit(): void;
1485
+ ngAfterContentInit(): void;
1486
+ ngDoCheck(): void;
1487
+ /** Gets whether the input is empty. */
1488
+ isEmpty(): boolean;
1489
+ /** Gets the placeholder of the input. */
1490
+ _getPlaceholder(): string;
1491
+ /** Focuses the input. */
1492
+ focus(): void;
1493
+ /** Gets the value that should be used when mirroring the input's size. */
1494
+ getMirrorValue(): string;
1495
+ /** Refreshes the error state of the input. */
1496
+ updateErrorState(): void;
1497
+ /** Handles `input` events on the input element. */
1498
+ _onInput(event: Event): void;
1499
+ /** Opens the datepicker associated with the input. */
1500
+ protected _openPopup(): void;
1501
+ /** Gets the minimum date from the range input. */
1502
+ _getMinDate(): D | null;
1503
+ /** Gets the maximum date from the range input. */
1504
+ _getMaxDate(): D | null;
1505
+ /** Gets the date filter function from the range input. */
1506
+ protected _getDateFilter(): DateFilterFn<D>;
1507
+ protected _parentDisabled(): boolean;
1508
+ protected _shouldHandleChangeEvent({ source }: DateSelectionModelChange<DateRange<D>>): boolean;
1509
+ protected _assignValueProgrammatically(value: D | null): void;
1510
+ protected _formatValue(value: D | null): void;
1511
+ /** return the ARIA accessible name of the input element */
1512
+ _getAccessibleName(): string;
1513
+ static ɵfac: i0.ɵɵFactoryDeclaration<MatDateRangeInputPartBase<any>, never>;
1514
+ static ɵdir: i0.ɵɵDirectiveDeclaration<MatDateRangeInputPartBase<any>, never, never, { "errorStateMatcher": { "alias": "errorStateMatcher"; "required": false; }; }, {}, never, never, true, never>;
1515
+ }
1516
+ /** Input for entering the start date in a `mat-date-range-input`. */
1517
+ declare class MatStartDate<D> extends MatDateRangeInputPartBase<D> {
1518
+ /** Validator that checks that the start date isn't after the end date. */
1519
+ private _startValidator;
1520
+ protected _validator: ValidatorFn | null;
1521
+ protected _register(): void;
1522
+ protected _getValueFromModel(modelValue: DateRange<D>): D | null;
1523
+ protected _shouldHandleChangeEvent(change: DateSelectionModelChange<DateRange<D>>): boolean;
1524
+ protected _assignValueToModel(value: D | null): void;
1525
+ _onKeydown(event: KeyboardEvent): void;
1526
+ static ɵfac: i0.ɵɵFactoryDeclaration<MatStartDate<any>, never>;
1527
+ static ɵdir: i0.ɵɵDirectiveDeclaration<MatStartDate<any>, "input[matStartDate]", never, {}, { "dateChange": "dateChange"; "dateInput": "dateInput"; }, never, never, true, never>;
1528
+ }
1529
+ /** Input for entering the end date in a `mat-date-range-input`. */
1530
+ declare class MatEndDate<D> extends MatDateRangeInputPartBase<D> {
1531
+ /** Validator that checks that the end date isn't before the start date. */
1532
+ private _endValidator;
1533
+ protected _register(): void;
1534
+ protected _validator: ValidatorFn | null;
1535
+ protected _getValueFromModel(modelValue: DateRange<D>): D | null;
1536
+ protected _shouldHandleChangeEvent(change: DateSelectionModelChange<DateRange<D>>): boolean;
1537
+ protected _assignValueToModel(value: D | null): void;
1538
+ private _moveCaretToEndOfStartInput;
1539
+ _onKeydown(event: KeyboardEvent): void;
1540
+ static ɵfac: i0.ɵɵFactoryDeclaration<MatEndDate<any>, never>;
1541
+ static ɵdir: i0.ɵɵDirectiveDeclaration<MatEndDate<any>, "input[matEndDate]", never, {}, { "dateChange": "dateChange"; "dateInput": "dateInput"; }, never, never, true, never>;
1755
1542
  }
1756
1543
 
1757
1544
  /**
1758
- * A selection model that contains a date range.
1545
+ * Input that can be associated with a date range picker.
1759
1546
  * @docs-private
1760
1547
  */
1761
- export declare class MatRangeDateSelectionModel<D> extends MatDateSelectionModel<DateRange<D>, D> {
1762
- constructor(adapter: DateAdapter<D>);
1548
+ interface MatDateRangePickerInput<D> extends MatDatepickerControl<D> {
1549
+ _getEndDateAccessibleName(): string | null;
1550
+ _getStartDateAccessibleName(): string | null;
1551
+ comparisonStart: D | null;
1552
+ comparisonEnd: D | null;
1553
+ }
1554
+ /** Component responsible for managing the date range picker popup/dialog. */
1555
+ declare class MatDateRangePicker<D> extends MatDatepickerBase<MatDateRangePickerInput<D>, DateRange<D>, D> {
1556
+ protected _forwardContentValues(instance: MatDatepickerContent<DateRange<D>, D>): void;
1557
+ static ɵfac: i0.ɵɵFactoryDeclaration<MatDateRangePicker<any>, never>;
1558
+ static ɵcmp: i0.ɵɵComponentDeclaration<MatDateRangePicker<any>, "mat-date-range-picker", ["matDateRangePicker"], {}, {}, never, never, true, never>;
1559
+ }
1560
+
1561
+ declare class MatDateRangeInput<D> implements MatFormFieldControl<DateRange<D>>, MatDatepickerControl<D>, MatDateRangePickerInput<D>, AfterContentInit, OnChanges, OnDestroy {
1562
+ private _changeDetectorRef;
1563
+ private _elementRef;
1564
+ private _dateAdapter;
1565
+ private _formField;
1566
+ private _closedSubscription;
1567
+ private _openedSubscription;
1568
+ _startInput: MatStartDate<D>;
1569
+ _endInput: MatEndDate<D>;
1570
+ /** Current value of the range input. */
1571
+ get value(): DateRange<D> | null;
1572
+ /** Unique ID for the group. */
1573
+ id: string;
1574
+ /** Whether the control is focused. */
1575
+ focused: boolean;
1576
+ /** Whether the control's label should float. */
1577
+ get shouldLabelFloat(): boolean;
1578
+ /** Name of the form control. */
1579
+ controlType: string;
1763
1580
  /**
1764
- * Adds a date to the current selection. In the case of a date range selection, the added date
1765
- * fills in the next `null` value in the range. If both the start and the end already have a date,
1766
- * the selection is reset so that the given date is the new `start` and the `end` is null.
1581
+ * Implemented as a part of `MatFormFieldControl`.
1582
+ * Set the placeholder attribute on `matStartDate` and `matEndDate`.
1583
+ * @docs-private
1767
1584
  */
1768
- add(date: D | null): void;
1769
- /** Checks whether the current selection is valid. */
1770
- isValid(): boolean;
1585
+ get placeholder(): string;
1586
+ /** The range picker that this input is associated with. */
1587
+ get rangePicker(): MatDatepickerPanel<MatDatepickerControl<D>, DateRange<D>, D>;
1588
+ set rangePicker(rangePicker: MatDatepickerPanel<MatDatepickerControl<D>, DateRange<D>, D>);
1589
+ private _rangePicker;
1590
+ /** The id of the panel owned by this input. */
1591
+ _ariaOwns: i0.WritableSignal<string | null>;
1592
+ /** Whether the input is required. */
1593
+ get required(): boolean;
1594
+ set required(value: boolean);
1595
+ private _required;
1596
+ /** Function that can be used to filter out dates within the date range picker. */
1597
+ get dateFilter(): DateFilterFn<D>;
1598
+ set dateFilter(value: DateFilterFn<D>);
1599
+ private _dateFilter;
1600
+ /** The minimum valid date. */
1601
+ get min(): D | null;
1602
+ set min(value: D | null);
1603
+ private _min;
1604
+ /** The maximum valid date. */
1605
+ get max(): D | null;
1606
+ set max(value: D | null);
1607
+ private _max;
1608
+ /** Whether the input is disabled. */
1609
+ get disabled(): boolean;
1610
+ set disabled(value: boolean);
1611
+ _groupDisabled: boolean;
1612
+ /** Whether the input is in an error state. */
1613
+ get errorState(): boolean;
1614
+ /** Whether the datepicker input is empty. */
1615
+ get empty(): boolean;
1616
+ /** Value for the `aria-describedby` attribute of the inputs. */
1617
+ _ariaDescribedBy: string | null;
1618
+ /** Date selection model currently registered with the input. */
1619
+ private _model;
1620
+ /** Separator text to be shown between the inputs. */
1621
+ separator: string;
1622
+ /** Start of the comparison range that should be shown in the calendar. */
1623
+ comparisonStart: D | null;
1624
+ /** End of the comparison range that should be shown in the calendar. */
1625
+ comparisonEnd: D | null;
1626
+ /**
1627
+ * Implemented as a part of `MatFormFieldControl`.
1628
+ * TODO(crisbeto): change type to `AbstractControlDirective` after #18206 lands.
1629
+ * @docs-private
1630
+ */
1631
+ ngControl: NgControl | null;
1632
+ /** Emits when the input's state has changed. */
1633
+ readonly stateChanges: Subject<void>;
1771
1634
  /**
1772
- * Checks whether the current selection is complete. In the case of a date range selection, this
1773
- * is true if the current selection has a non-null `start` and `end`.
1635
+ * Disable the automatic labeling to avoid issues like #27241.
1636
+ * @docs-private
1774
1637
  */
1775
- isComplete(): boolean;
1776
- /** Clones the selection model. */
1777
- clone(): MatRangeDateSelectionModel<D>;
1778
- static ɵfac: i0.ɵɵFactoryDeclaration<MatRangeDateSelectionModel<any>, never>;
1779
- static ɵprov: i0.ɵɵInjectableDeclaration<MatRangeDateSelectionModel<any>>;
1780
- }
1781
-
1782
- /**
1783
- * A selection model that contains a single date.
1784
- * @docs-private
1785
- */
1786
- export declare class MatSingleDateSelectionModel<D> extends MatDateSelectionModel<D | null, D> {
1787
- constructor(adapter: DateAdapter<D>);
1638
+ readonly disableAutomaticLabeling = true;
1639
+ constructor(...args: unknown[]);
1788
1640
  /**
1789
- * Adds a date to the current selection. In the case of a single date selection, the added date
1790
- * simply overwrites the previous selection
1641
+ * Implemented as a part of `MatFormFieldControl`.
1642
+ * @docs-private
1791
1643
  */
1792
- add(date: D | null): void;
1793
- /** Checks whether the current selection is valid. */
1794
- isValid(): boolean;
1644
+ setDescribedByIds(ids: string[]): void;
1795
1645
  /**
1796
- * Checks whether the current selection is complete. In the case of a single date selection, this
1797
- * is true if the current selection is not null.
1646
+ * Implemented as a part of `MatFormFieldControl`.
1647
+ * @docs-private
1798
1648
  */
1799
- isComplete(): boolean;
1800
- /** Clones the selection model. */
1801
- clone(): MatSingleDateSelectionModel<D>;
1802
- static ɵfac: i0.ɵɵFactoryDeclaration<MatSingleDateSelectionModel<any>, never>;
1803
- static ɵprov: i0.ɵɵInjectableDeclaration<MatSingleDateSelectionModel<any>>;
1649
+ onContainerClick(): void;
1650
+ ngAfterContentInit(): void;
1651
+ ngOnChanges(changes: SimpleChanges): void;
1652
+ ngOnDestroy(): void;
1653
+ /** Gets the date at which the calendar should start. */
1654
+ getStartValue(): D | null;
1655
+ /** Gets the input's theme palette. */
1656
+ getThemePalette(): ThemePalette;
1657
+ /** Gets the element to which the calendar overlay should be attached. */
1658
+ getConnectedOverlayOrigin(): ElementRef;
1659
+ /** Gets the ID of an element that should be used a description for the calendar overlay. */
1660
+ getOverlayLabelId(): string | null;
1661
+ /** Gets the value that is used to mirror the state input. */
1662
+ _getInputMirrorValue(part: 'start' | 'end'): string;
1663
+ /** Whether the input placeholders should be hidden. */
1664
+ _shouldHidePlaceholders(): boolean;
1665
+ /** Handles the value in one of the child inputs changing. */
1666
+ _handleChildValueChange(): void;
1667
+ /** Opens the date range picker associated with the input. */
1668
+ _openDatepicker(): void;
1669
+ /** Whether the separate text should be hidden. */
1670
+ _shouldHideSeparator(): boolean | "" | null;
1671
+ /** Gets the value for the `aria-labelledby` attribute of the inputs. */
1672
+ _getAriaLabelledby(): string | null;
1673
+ _getStartDateAccessibleName(): string;
1674
+ _getEndDateAccessibleName(): string;
1675
+ /** Updates the focused state of the range input. */
1676
+ _updateFocus(origin: FocusOrigin): void;
1677
+ /** Re-runs the validators on the start/end inputs. */
1678
+ private _revalidate;
1679
+ /** Registers the current date selection model with the start/end inputs. */
1680
+ private _registerModel;
1681
+ /** Checks whether a specific range input directive is required. */
1682
+ private _isTargetRequired;
1683
+ static ɵfac: i0.ɵɵFactoryDeclaration<MatDateRangeInput<any>, never>;
1684
+ static ɵcmp: i0.ɵɵComponentDeclaration<MatDateRangeInput<any>, "mat-date-range-input", ["matDateRangeInput"], { "rangePicker": { "alias": "rangePicker"; "required": false; }; "required": { "alias": "required"; "required": false; }; "dateFilter": { "alias": "dateFilter"; "required": false; }; "min": { "alias": "min"; "required": false; }; "max": { "alias": "max"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "separator": { "alias": "separator"; "required": false; }; "comparisonStart": { "alias": "comparisonStart"; "required": false; }; "comparisonEnd": { "alias": "comparisonEnd"; "required": false; }; }, {}, never, ["input[matStartDate]", "input[matEndDate]"], true, never>;
1685
+ static ngAcceptInputType_required: unknown;
1686
+ static ngAcceptInputType_disabled: unknown;
1804
1687
  }
1805
1688
 
1806
- /** Input for entering the start date in a `mat-date-range-input`. */
1807
- export declare class MatStartDate<D> extends MatDateRangeInputPartBase<D> {
1808
- /** Validator that checks that the start date isn't after the end date. */
1809
- private _startValidator;
1810
- protected _validator: ValidatorFn | null;
1811
- protected _register(): void;
1812
- protected _getValueFromModel(modelValue: DateRange<D>): D | null;
1813
- protected _shouldHandleChangeEvent(change: DateSelectionModelChange<DateRange<D>>): boolean;
1814
- protected _assignValueToModel(value: D | null): void;
1815
- _onKeydown(event: KeyboardEvent): void;
1816
- static ɵfac: i0.ɵɵFactoryDeclaration<MatStartDate<any>, never>;
1817
- static ɵdir: i0.ɵɵDirectiveDeclaration<MatStartDate<any>, "input[matStartDate]", never, {}, { "dateChange": "dateChange"; "dateInput": "dateInput"; }, never, never, true, never>;
1689
+ /** Button that will close the datepicker and assign the current selection to the data model. */
1690
+ declare class MatDatepickerApply {
1691
+ private _datepicker;
1692
+ constructor(...args: unknown[]);
1693
+ _applySelection(): void;
1694
+ static ɵfac: i0.ɵɵFactoryDeclaration<MatDatepickerApply, never>;
1695
+ static ɵdir: i0.ɵɵDirectiveDeclaration<MatDatepickerApply, "[matDatepickerApply], [matDateRangePickerApply]", never, {}, {}, never, never, true, never>;
1696
+ }
1697
+ /** Button that will close the datepicker and discard the current selection. */
1698
+ declare class MatDatepickerCancel {
1699
+ _datepicker: MatDatepickerBase<MatDatepickerControl<any>, unknown, {}>;
1700
+ constructor(...args: unknown[]);
1701
+ static ɵfac: i0.ɵɵFactoryDeclaration<MatDatepickerCancel, never>;
1702
+ static ɵdir: i0.ɵɵDirectiveDeclaration<MatDatepickerCancel, "[matDatepickerCancel], [matDateRangePickerCancel]", never, {}, {}, never, never, true, never>;
1818
1703
  }
1819
-
1820
1704
  /**
1821
- * An internal component used to display a single year in the datepicker.
1822
- * @docs-private
1705
+ * Container that can be used to project a row of action buttons
1706
+ * to the bottom of a datepicker or date range picker.
1823
1707
  */
1824
- export declare class MatYearView<D> implements AfterContentInit, OnDestroy {
1825
- readonly _changeDetectorRef: ChangeDetectorRef;
1826
- private _dateFormats;
1827
- _dateAdapter: DateAdapter<D, any>;
1828
- private _dir;
1829
- private _rerenderSubscription;
1830
- /** Flag used to filter out space/enter keyup events that originated outside of the view. */
1831
- private _selectionKeyPressed;
1832
- /** The date to display in this year view (everything other than the year is ignored). */
1833
- get activeDate(): D;
1834
- set activeDate(value: D);
1835
- private _activeDate;
1836
- /** The currently selected date. */
1837
- get selected(): DateRange<D> | D | null;
1838
- set selected(value: DateRange<D> | D | null);
1839
- private _selected;
1840
- /** The minimum selectable date. */
1841
- get minDate(): D | null;
1842
- set minDate(value: D | null);
1843
- private _minDate;
1844
- /** The maximum selectable date. */
1845
- get maxDate(): D | null;
1846
- set maxDate(value: D | null);
1847
- private _maxDate;
1848
- /** A function used to filter which dates are selectable. */
1849
- dateFilter: (date: D) => boolean;
1850
- /** Function that can be used to add custom CSS classes to date cells. */
1851
- dateClass: MatCalendarCellClassFunction<D>;
1852
- /** Emits when a new month is selected. */
1853
- readonly selectedChange: EventEmitter<D>;
1854
- /** Emits the selected month. This doesn't imply a change on the selected date */
1855
- readonly monthSelected: EventEmitter<D>;
1856
- /** Emits when any date is activated. */
1857
- readonly activeDateChange: EventEmitter<D>;
1858
- /** The body of calendar table */
1859
- _matCalendarBody: MatCalendarBody;
1860
- /** Grid of calendar cells representing the months of the year. */
1861
- _months: MatCalendarCell[][];
1862
- /** The label for this year (e.g. "2017"). */
1863
- _yearLabel: string;
1864
- /** The month in this year that today falls on. Null if today is in a different year. */
1865
- _todayMonth: number | null;
1866
- /**
1867
- * The month in this year that the selected Date falls on.
1868
- * Null if the selected Date is in a different year.
1869
- */
1870
- _selectedMonth: number | null;
1708
+ declare class MatDatepickerActions implements AfterViewInit, OnDestroy {
1709
+ private _datepicker;
1710
+ private _viewContainerRef;
1711
+ _template: TemplateRef<unknown>;
1712
+ private _portal;
1871
1713
  constructor(...args: unknown[]);
1872
- ngAfterContentInit(): void;
1714
+ ngAfterViewInit(): void;
1873
1715
  ngOnDestroy(): void;
1874
- /** Handles when a new month is selected. */
1875
- _monthSelected(event: MatCalendarUserEvent<number>): void;
1876
- /**
1877
- * Takes the index of a calendar body cell wrapped in an event as argument. For the date that
1878
- * corresponds to the given cell, set `activeDate` to that date and fire `activeDateChange` with
1879
- * that date.
1880
- *
1881
- * This function is used to match each component's model of the active date with the calendar
1882
- * body cell that was focused. It updates its value of `activeDate` synchronously and updates the
1883
- * parent's value asynchronously via the `activeDateChange` event. The child component receives an
1884
- * updated value asynchronously via the `activeCell` Input.
1885
- */
1886
- _updateActiveDate(event: MatCalendarUserEvent<number>): void;
1887
- /** Handles keydown events on the calendar body when calendar is in year view. */
1888
- _handleCalendarBodyKeydown(event: KeyboardEvent): void;
1889
- /** Handles keyup events on the calendar body when calendar is in year view. */
1890
- _handleCalendarBodyKeyup(event: KeyboardEvent): void;
1891
- /** Initializes this year view. */
1892
- _init(): void;
1893
- /** Focuses the active cell after the microtask queue is empty. */
1894
- _focusActiveCell(): void;
1895
- /** Schedules the matCalendarBody to focus the active cell after change detection has run */
1896
- _focusActiveCellAfterViewChecked(): void;
1897
- /**
1898
- * Gets the month in this year that the given Date falls on.
1899
- * Returns null if the given Date is in another year.
1900
- */
1901
- private _getMonthInCurrentYear;
1716
+ static ɵfac: i0.ɵɵFactoryDeclaration<MatDatepickerActions, never>;
1717
+ static ɵcmp: i0.ɵɵComponentDeclaration<MatDatepickerActions, "mat-datepicker-actions, mat-date-range-picker-actions", never, {}, {}, never, ["*"], true, never>;
1718
+ }
1719
+
1720
+ declare class MatDatepickerModule {
1721
+ static ɵfac: i0.ɵɵFactoryDeclaration<MatDatepickerModule, never>;
1722
+ static ɵmod: i0.ɵɵNgModuleDeclaration<MatDatepickerModule, never, [typeof MatButtonModule, typeof i2.OverlayModule, typeof i1.A11yModule, typeof i3.PortalModule, typeof MatCommonModule, typeof MatCalendar, typeof MatCalendarBody, typeof MatDatepicker, typeof MatDatepickerContent, typeof MatDatepickerInput, typeof MatDatepickerToggle, typeof MatDatepickerToggleIcon, typeof MatMonthView, typeof MatYearView, typeof MatMultiYearView, typeof MatCalendarHeader, typeof MatDateRangeInput, typeof MatStartDate, typeof MatEndDate, typeof MatDateRangePicker, typeof MatDatepickerActions, typeof MatDatepickerCancel, typeof MatDatepickerApply], [typeof i5.CdkScrollableModule, typeof MatCalendar, typeof MatCalendarBody, typeof MatDatepicker, typeof MatDatepickerContent, typeof MatDatepickerInput, typeof MatDatepickerToggle, typeof MatDatepickerToggleIcon, typeof MatMonthView, typeof MatYearView, typeof MatMultiYearView, typeof MatCalendarHeader, typeof MatDateRangeInput, typeof MatStartDate, typeof MatEndDate, typeof MatDateRangePicker, typeof MatDatepickerActions, typeof MatDatepickerCancel, typeof MatDatepickerApply]>;
1723
+ static ɵinj: i0.ɵɵInjectorDeclaration<MatDatepickerModule>;
1724
+ }
1725
+
1726
+ /** Injection token used to customize the date range selection behavior. */
1727
+ declare const MAT_DATE_RANGE_SELECTION_STRATEGY: InjectionToken<MatDateRangeSelectionStrategy<any>>;
1728
+ /** Object that can be provided in order to customize the date range selection behavior. */
1729
+ interface MatDateRangeSelectionStrategy<D> {
1902
1730
  /**
1903
- * Takes a month and returns a new date in the same day and year as the currently active date.
1904
- * The returned date will have the same month as the argument date.
1731
+ * Called when the user has finished selecting a value.
1732
+ * @param date Date that was selected. Will be null if the user cleared the selection.
1733
+ * @param currentRange Range that is currently show in the calendar.
1734
+ * @param event DOM event that triggered the selection. Currently only corresponds to a `click`
1735
+ * event, but it may get expanded in the future.
1905
1736
  */
1906
- private _getDateFromMonth;
1907
- /** Creates an MatCalendarCell for the given month. */
1908
- private _createCellForMonth;
1909
- /** Whether the given month is enabled. */
1910
- private _shouldEnableMonth;
1737
+ selectionFinished(date: D | null, currentRange: DateRange<D>, event: Event): DateRange<D>;
1911
1738
  /**
1912
- * Tests whether the combination month/year is after this.maxDate, considering
1913
- * just the month and year of this.maxDate
1739
+ * Called when the user has activated a new date (e.g. by hovering over
1740
+ * it or moving focus) and the calendar tries to display a date range.
1741
+ *
1742
+ * @param activeDate Date that the user has activated. Will be null if the user moved
1743
+ * focus to an element that's no a calendar cell.
1744
+ * @param currentRange Range that is currently shown in the calendar.
1745
+ * @param event DOM event that caused the preview to be changed. Will be either a
1746
+ * `mouseenter`/`mouseleave` or `focus`/`blur` depending on how the user is navigating.
1914
1747
  */
1915
- private _isYearAndMonthAfterMaxDate;
1748
+ createPreview(activeDate: D | null, currentRange: DateRange<D>, event: Event): DateRange<D>;
1916
1749
  /**
1917
- * Tests whether the combination month/year is before this.minDate, considering
1918
- * just the month and year of this.minDate
1750
+ * Called when the user has dragged a date in the currently selected range to another
1751
+ * date. Returns the date updated range that should result from this interaction.
1752
+ *
1753
+ * @param dateOrigin The date the user started dragging from.
1754
+ * @param originalRange The originally selected date range.
1755
+ * @param newDate The currently targeted date in the drag operation.
1756
+ * @param event DOM event that triggered the updated drag state. Will be
1757
+ * `mouseenter`/`mouseup` or `touchmove`/`touchend` depending on the device type.
1919
1758
  */
1920
- private _isYearAndMonthBeforeMinDate;
1921
- /** Determines whether the user has the RTL layout direction. */
1922
- private _isRtl;
1923
- /** Sets the currently-selected month based on a model value. */
1924
- private _setSelectedMonth;
1925
- static ɵfac: i0.ɵɵFactoryDeclaration<MatYearView<any>, never>;
1926
- static ɵcmp: i0.ɵɵComponentDeclaration<MatYearView<any>, "mat-year-view", ["matYearView"], { "activeDate": { "alias": "activeDate"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; "minDate": { "alias": "minDate"; "required": false; }; "maxDate": { "alias": "maxDate"; "required": false; }; "dateFilter": { "alias": "dateFilter"; "required": false; }; "dateClass": { "alias": "dateClass"; "required": false; }; }, { "selectedChange": "selectedChange"; "monthSelected": "monthSelected"; "activeDateChange": "activeDateChange"; }, never, never, true, never>;
1759
+ createDrag?(dragOrigin: D, originalRange: DateRange<D>, newDate: D, event: Event): DateRange<D> | null;
1760
+ }
1761
+ /** Provides the default date range selection behavior. */
1762
+ declare class DefaultMatCalendarRangeStrategy<D> implements MatDateRangeSelectionStrategy<D> {
1763
+ private _dateAdapter;
1764
+ constructor(_dateAdapter: DateAdapter<D>);
1765
+ selectionFinished(date: D, currentRange: DateRange<D>): DateRange<D>;
1766
+ createPreview(activeDate: D | null, currentRange: DateRange<D>): DateRange<D>;
1767
+ createDrag(dragOrigin: D, originalRange: DateRange<D>, newDate: D): DateRange<D> | null;
1768
+ static ɵfac: i0.ɵɵFactoryDeclaration<DefaultMatCalendarRangeStrategy<any>, never>;
1769
+ static ɵprov: i0.ɵɵInjectableDeclaration<DefaultMatCalendarRangeStrategy<any>>;
1927
1770
  }
1928
1771
 
1929
- export declare const yearsPerPage = 24;
1930
-
1931
- export declare const yearsPerRow = 4;
1772
+ /**
1773
+ * Animations used by the Material datepicker.
1774
+ * @docs-private
1775
+ * @deprecated No longer used, will be removed.
1776
+ * @breaking-change 21.0.0
1777
+ */
1778
+ declare const matDatepickerAnimations: {
1779
+ readonly transformPanel: any;
1780
+ readonly fadeInCalendar: any;
1781
+ };
1932
1782
 
1933
- export { }
1783
+ export { type DateFilterFn, DateRange, type DateSelectionModelChange, type DatepickerDropdownPositionX, type DatepickerDropdownPositionY, DefaultMatCalendarRangeStrategy, type ExtractDateTypeFromSelection, MAT_DATEPICKER_SCROLL_STRATEGY, MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY, MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY_PROVIDER, MAT_DATEPICKER_VALIDATORS, MAT_DATEPICKER_VALUE_ACCESSOR, MAT_DATE_RANGE_SELECTION_STRATEGY, MAT_RANGE_DATE_SELECTION_MODEL_FACTORY, MAT_RANGE_DATE_SELECTION_MODEL_PROVIDER, MAT_SINGLE_DATE_SELECTION_MODEL_FACTORY, MAT_SINGLE_DATE_SELECTION_MODEL_PROVIDER, MatCalendar, MatCalendarBody, MatCalendarCell, type MatCalendarCellClassFunction, type MatCalendarCellCssClasses, MatCalendarHeader, type MatCalendarUserEvent, type MatCalendarView, MatDateRangeInput, MatDateRangePicker, type MatDateRangeSelectionStrategy, MatDateSelectionModel, MatDatepicker, MatDatepickerActions, MatDatepickerApply, MatDatepickerCancel, MatDatepickerContent, type MatDatepickerControl, MatDatepickerInput, MatDatepickerInputEvent, MatDatepickerIntl, MatDatepickerModule, type MatDatepickerPanel, MatDatepickerToggle, MatDatepickerToggleIcon, MatEndDate, MatMonthView, MatMultiYearView, MatRangeDateSelectionModel, MatSingleDateSelectionModel, MatStartDate, MatYearView, matDatepickerAnimations, yearsPerPage, yearsPerRow };