@angular/material 13.0.0-next.7 → 13.0.0-next.8

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 (1655) hide show
  1. package/autocomplete/autocomplete-module.d.ts +11 -7
  2. package/autocomplete/autocomplete-origin.d.ts +5 -0
  3. package/autocomplete/autocomplete-trigger.d.ts +5 -0
  4. package/autocomplete/autocomplete.d.ts +6 -1
  5. package/autocomplete/package.json +5 -5
  6. package/autocomplete/testing/package.json +5 -5
  7. package/badge/badge-module.d.ts +7 -7
  8. package/badge/badge.d.ts +4 -1
  9. package/badge/package.json +5 -5
  10. package/badge/testing/package.json +5 -5
  11. package/bottom-sheet/bottom-sheet-container.d.ts +3 -0
  12. package/bottom-sheet/bottom-sheet-module.d.ts +8 -7
  13. package/bottom-sheet/bottom-sheet.d.ts +3 -7
  14. package/bottom-sheet/package.json +5 -5
  15. package/bottom-sheet/testing/package.json +5 -5
  16. package/button/button-module.d.ts +6 -7
  17. package/button/button.d.ts +6 -1
  18. package/button/package.json +5 -5
  19. package/button/testing/package.json +5 -5
  20. package/button-toggle/button-toggle-module.d.ts +6 -7
  21. package/button-toggle/button-toggle.d.ts +6 -1
  22. package/button-toggle/package.json +5 -5
  23. package/button-toggle/testing/package.json +5 -5
  24. package/card/card-module.d.ts +6 -7
  25. package/card/card.d.ts +29 -7
  26. package/card/package.json +5 -5
  27. package/card/testing/package.json +5 -5
  28. package/checkbox/checkbox-module.d.ts +11 -7
  29. package/checkbox/checkbox-required-validator.d.ts +3 -0
  30. package/checkbox/checkbox.d.ts +4 -1
  31. package/checkbox/package.json +5 -5
  32. package/checkbox/testing/package.json +5 -5
  33. package/chips/chip-input.d.ts +3 -0
  34. package/chips/chip-list.d.ts +4 -1
  35. package/chips/chip.d.ts +10 -1
  36. package/chips/chips-module.d.ts +8 -7
  37. package/chips/package.json +5 -5
  38. package/chips/testing/package.json +5 -5
  39. package/core/common-behaviors/common-module.d.ts +5 -0
  40. package/core/common-behaviors/index.d.ts +1 -0
  41. package/core/datetime/index.d.ts +8 -7
  42. package/core/datetime/native-date-adapter.d.ts +3 -0
  43. package/core/error/error-options.d.ts +5 -7
  44. package/core/index.d.ts +0 -1
  45. package/core/line/line.d.ts +7 -0
  46. package/core/option/index.d.ts +10 -7
  47. package/core/option/optgroup.d.ts +6 -1
  48. package/core/option/option.d.ts +5 -0
  49. package/core/package.json +5 -5
  50. package/core/ripple/index.d.ts +7 -7
  51. package/core/ripple/ripple.d.ts +3 -0
  52. package/core/selection/index.d.ts +6 -7
  53. package/core/selection/pseudo-checkbox/pseudo-checkbox.d.ts +3 -7
  54. package/core/testing/package.json +5 -5
  55. package/datepicker/calendar-body.d.ts +3 -0
  56. package/datepicker/calendar.d.ts +5 -0
  57. package/datepicker/date-range-input-parts.d.ts +8 -1
  58. package/datepicker/date-range-input.d.ts +3 -0
  59. package/datepicker/date-range-picker.d.ts +3 -7
  60. package/datepicker/date-range-selection-strategy.d.ts +3 -0
  61. package/datepicker/date-selection-model.d.ts +7 -0
  62. package/datepicker/datepicker-actions.d.ts +7 -0
  63. package/datepicker/datepicker-base.d.ts +6 -1
  64. package/datepicker/datepicker-input-base.d.ts +3 -0
  65. package/datepicker/datepicker-input.d.ts +3 -0
  66. package/datepicker/datepicker-intl.d.ts +3 -7
  67. package/datepicker/datepicker-module.d.ts +24 -7
  68. package/datepicker/datepicker-toggle.d.ts +5 -0
  69. package/datepicker/datepicker.d.ts +3 -7
  70. package/datepicker/index.d.ts +0 -4
  71. package/datepicker/month-view.d.ts +3 -7
  72. package/datepicker/multi-year-view.d.ts +3 -7
  73. package/datepicker/package.json +5 -5
  74. package/datepicker/testing/package.json +5 -5
  75. package/datepicker/year-view.d.ts +3 -7
  76. package/dialog/dialog-container.d.ts +5 -0
  77. package/dialog/dialog-content-directives.d.ts +9 -0
  78. package/dialog/dialog-module.d.ts +9 -7
  79. package/dialog/dialog.d.ts +5 -7
  80. package/dialog/package.json +5 -5
  81. package/dialog/testing/dialog-harness.d.ts +14 -11
  82. package/dialog/testing/package.json +5 -5
  83. package/divider/divider-module.d.ts +6 -7
  84. package/divider/divider.d.ts +3 -7
  85. package/divider/package.json +5 -5
  86. package/divider/testing/package.json +5 -5
  87. package/esm2020/autocomplete/autocomplete-module.mjs +58 -0
  88. package/esm2020/autocomplete/autocomplete-origin.mjs +38 -0
  89. package/esm2020/autocomplete/autocomplete-trigger.mjs +651 -0
  90. package/esm2020/autocomplete/autocomplete.mjs +216 -0
  91. package/{esm2015/autocomplete/index.js → esm2020/autocomplete/index.mjs} +0 -0
  92. package/{esm2015/autocomplete/public-api.js → esm2020/autocomplete/public-api.mjs} +0 -0
  93. package/{esm2015/autocomplete/testing/autocomplete-harness-filters.js → esm2020/autocomplete/testing/autocomplete-harness-filters.mjs} +0 -0
  94. package/esm2020/autocomplete/testing/autocomplete-harness.mjs +101 -0
  95. package/{esm2015/autocomplete/testing/index.js → esm2020/autocomplete/testing/index.mjs} +0 -0
  96. package/{esm2015/autocomplete/testing/public-api.js → esm2020/autocomplete/testing/public-api.mjs} +0 -0
  97. package/esm2020/badge/badge-module.mjs +33 -0
  98. package/esm2020/badge/badge.mjs +228 -0
  99. package/{esm2015/badge/index.js → esm2020/badge/index.mjs} +0 -0
  100. package/{esm2015/badge/public-api.js → esm2020/badge/public-api.mjs} +0 -0
  101. package/{esm2015/badge/testing/badge-harness-filters.js → esm2020/badge/testing/badge-harness-filters.mjs} +0 -0
  102. package/esm2020/badge/testing/badge-harness.mjs +72 -0
  103. package/{esm2015/badge/testing/index.js → esm2020/badge/testing/index.mjs} +0 -0
  104. package/{esm2015/badge/testing/public-api.js → esm2020/badge/testing/public-api.mjs} +0 -0
  105. package/{esm2015/bottom-sheet/bottom-sheet-animations.js → esm2020/bottom-sheet/bottom-sheet-animations.mjs} +0 -0
  106. package/{esm2015/bottom-sheet/bottom-sheet-config.js → esm2020/bottom-sheet/bottom-sheet-config.mjs} +0 -0
  107. package/esm2020/bottom-sheet/bottom-sheet-container.mjs +230 -0
  108. package/esm2020/bottom-sheet/bottom-sheet-module.mjs +38 -0
  109. package/esm2020/bottom-sheet/bottom-sheet-ref.mjs +91 -0
  110. package/esm2020/bottom-sheet/bottom-sheet.mjs +172 -0
  111. package/{esm2015/bottom-sheet/index.js → esm2020/bottom-sheet/index.mjs} +0 -0
  112. package/{esm2015/bottom-sheet/public-api.js → esm2020/bottom-sheet/public-api.mjs} +0 -0
  113. package/{esm2015/bottom-sheet/testing/bottom-sheet-harness-filters.js → esm2020/bottom-sheet/testing/bottom-sheet-harness-filters.mjs} +0 -0
  114. package/esm2020/bottom-sheet/testing/bottom-sheet-harness.mjs +35 -0
  115. package/{esm2015/bottom-sheet/testing/index.js → esm2020/bottom-sheet/testing/index.mjs} +0 -0
  116. package/{esm2015/bottom-sheet/testing/public-api.js → esm2020/bottom-sheet/testing/public-api.mjs} +0 -0
  117. package/esm2020/button/button-module.mjs +42 -0
  118. package/esm2020/button/button.mjs +153 -0
  119. package/{esm2015/button/index.js → esm2020/button/index.mjs} +0 -0
  120. package/{esm2015/button/public-api.js → esm2020/button/public-api.mjs} +0 -0
  121. package/{esm2015/button/testing/button-harness-filters.js → esm2020/button/testing/button-harness-filters.mjs} +0 -0
  122. package/esm2020/button/testing/button-harness.mjs +51 -0
  123. package/{esm2015/button/testing/index.js → esm2020/button/testing/index.mjs} +0 -0
  124. package/{esm2015/button/testing/public-api.js → esm2020/button/testing/public-api.mjs} +0 -0
  125. package/esm2020/button-toggle/button-toggle-module.mjs +25 -0
  126. package/esm2020/button-toggle/button-toggle.mjs +470 -0
  127. package/{esm2015/button-toggle/index.js → esm2020/button-toggle/index.mjs} +0 -0
  128. package/{esm2015/button-toggle/public-api.js → esm2020/button-toggle/public-api.mjs} +0 -0
  129. package/{esm2015/button-toggle/testing/button-toggle-group-harness-filters.js → esm2020/button-toggle/testing/button-toggle-group-harness-filters.mjs} +0 -0
  130. package/esm2020/button-toggle/testing/button-toggle-group-harness.mjs +45 -0
  131. package/{esm2015/button-toggle/testing/button-toggle-harness-filters.js → esm2020/button-toggle/testing/button-toggle-harness-filters.mjs} +0 -0
  132. package/esm2020/button-toggle/testing/button-toggle-harness.mjs +98 -0
  133. package/{esm2015/button-toggle/testing/index.js → esm2020/button-toggle/testing/index.mjs} +0 -0
  134. package/{esm2015/button-toggle/testing/public-api.js → esm2020/button-toggle/testing/public-api.mjs} +0 -0
  135. package/esm2020/card/card-module.mjs +61 -0
  136. package/esm2020/card/card.mjs +247 -0
  137. package/{esm2015/card/index.js → esm2020/card/index.mjs} +0 -0
  138. package/{esm2015/card/public-api.js → esm2020/card/public-api.mjs} +0 -0
  139. package/{esm2015/card/testing/card-harness-filters.js → esm2020/card/testing/card-harness-filters.mjs} +0 -0
  140. package/esm2020/card/testing/card-harness.mjs +43 -0
  141. package/{esm2015/card/testing/index.js → esm2020/card/testing/index.mjs} +0 -0
  142. package/{esm2015/card/testing/public-api.js → esm2020/card/testing/public-api.mjs} +0 -0
  143. package/{esm2015/checkbox/checkbox-config.js → esm2020/checkbox/checkbox-config.mjs} +0 -0
  144. package/esm2020/checkbox/checkbox-module.mjs +46 -0
  145. package/esm2020/checkbox/checkbox-required-validator.mjs +33 -0
  146. package/esm2020/checkbox/checkbox.mjs +403 -0
  147. package/{esm2015/checkbox/index.js → esm2020/checkbox/index.mjs} +0 -0
  148. package/{esm2015/checkbox/public-api.js → esm2020/checkbox/public-api.mjs} +0 -0
  149. package/{esm2015/checkbox/testing/checkbox-harness-filters.js → esm2020/checkbox/testing/checkbox-harness-filters.mjs} +0 -0
  150. package/esm2020/checkbox/testing/checkbox-harness.mjs +123 -0
  151. package/{esm2015/checkbox/testing/index.js → esm2020/checkbox/testing/index.mjs} +0 -0
  152. package/{esm2015/checkbox/testing/public-api.js → esm2020/checkbox/testing/public-api.mjs} +0 -0
  153. package/{esm2015/chips/chip-default-options.js → esm2020/chips/chip-default-options.mjs} +0 -0
  154. package/esm2020/chips/chip-input.mjs +192 -0
  155. package/esm2020/chips/chip-list.mjs +673 -0
  156. package/{esm2015/chips/chip-text-control.js → esm2020/chips/chip-text-control.mjs} +0 -0
  157. package/esm2020/chips/chip.mjs +415 -0
  158. package/esm2020/chips/chips-module.mjs +64 -0
  159. package/{esm2015/chips/index.js → esm2020/chips/index.mjs} +0 -0
  160. package/{esm2015/chips/public-api.js → esm2020/chips/public-api.mjs} +0 -0
  161. package/{esm2015/chips/testing/chip-avatar-harness.js → esm2020/chips/testing/chip-avatar-harness.mjs} +0 -0
  162. package/{esm2015/chips/testing/chip-harness-filters.js → esm2020/chips/testing/chip-harness-filters.mjs} +0 -0
  163. package/esm2020/chips/testing/chip-harness.mjs +91 -0
  164. package/esm2020/chips/testing/chip-input-harness.mjs +82 -0
  165. package/esm2020/chips/testing/chip-list-harness.mjs +82 -0
  166. package/esm2020/chips/testing/chip-listbox-harness.mjs +44 -0
  167. package/esm2020/chips/testing/chip-option-harness.mjs +45 -0
  168. package/esm2020/chips/testing/chip-remove-harness.mjs +26 -0
  169. package/{esm2015/chips/testing/index.js → esm2020/chips/testing/index.mjs} +0 -0
  170. package/{esm2015/chips/testing/public-api.js → esm2020/chips/testing/public-api.mjs} +0 -0
  171. package/{esm2015/core/animation/animation.js → esm2020/core/animation/animation.mjs} +0 -0
  172. package/{esm2015/core/common-behaviors/color.js → esm2020/core/common-behaviors/color.mjs} +0 -0
  173. package/esm2020/core/common-behaviors/common-module.mjs +122 -0
  174. package/{esm2015/core/common-behaviors/constructor.js → esm2020/core/common-behaviors/constructor.mjs} +0 -0
  175. package/{esm2015/core/common-behaviors/disable-ripple.js → esm2020/core/common-behaviors/disable-ripple.mjs} +0 -0
  176. package/{esm2015/core/common-behaviors/disabled.js → esm2020/core/common-behaviors/disabled.mjs} +0 -0
  177. package/{esm2015/core/common-behaviors/error-state.js → esm2020/core/common-behaviors/error-state.mjs} +0 -0
  178. package/esm2020/core/common-behaviors/index.mjs +15 -0
  179. package/{esm2015/core/common-behaviors/initialized.js → esm2020/core/common-behaviors/initialized.mjs} +0 -0
  180. package/{esm2015/core/common-behaviors/tabindex.js → esm2020/core/common-behaviors/tabindex.mjs} +0 -0
  181. package/{esm2015/core/datetime/date-adapter.js → esm2020/core/datetime/date-adapter.mjs} +0 -0
  182. package/{esm2015/core/datetime/date-formats.js → esm2020/core/datetime/date-formats.mjs} +0 -0
  183. package/esm2020/core/datetime/index.mjs +47 -0
  184. package/esm2020/core/datetime/native-date-adapter.mjs +218 -0
  185. package/{esm2015/core/datetime/native-date-formats.js → esm2020/core/datetime/native-date-formats.mjs} +0 -0
  186. package/esm2020/core/error/error-options.mjs +33 -0
  187. package/esm2020/core/index.mjs +5 -0
  188. package/esm2020/core/line/line.mjs +64 -0
  189. package/esm2020/core/option/index.mjs +32 -0
  190. package/esm2020/core/option/optgroup.mjs +73 -0
  191. package/{esm2015/core/option/option-parent.js → esm2020/core/option/option-parent.mjs} +0 -0
  192. package/esm2020/core/option/option.mjs +276 -0
  193. package/{esm2015/core/public-api.js → esm2020/core/public-api.mjs} +0 -0
  194. package/esm2020/core/ripple/index.mjs +29 -0
  195. package/{esm2015/core/ripple/ripple-ref.js → esm2020/core/ripple/ripple-ref.mjs} +0 -0
  196. package/esm2020/core/ripple/ripple-renderer.mjs +261 -0
  197. package/esm2020/core/ripple/ripple.mjs +152 -0
  198. package/esm2020/core/selection/index.mjs +26 -0
  199. package/esm2020/core/selection/pseudo-checkbox/pseudo-checkbox.mjs +54 -0
  200. package/{esm2015/core/testing/index.js → esm2020/core/testing/index.mjs} +0 -0
  201. package/{esm2015/core/testing/optgroup-harness-filters.js → esm2020/core/testing/optgroup-harness-filters.mjs} +0 -0
  202. package/esm2020/core/testing/optgroup-harness.mjs +44 -0
  203. package/{esm2015/core/testing/option-harness-filters.js → esm2020/core/testing/option-harness-filters.mjs} +0 -0
  204. package/esm2020/core/testing/option-harness.mjs +54 -0
  205. package/{esm2015/core/testing/public-api.js → esm2020/core/testing/public-api.mjs} +0 -0
  206. package/esm2020/core/version.mjs +11 -0
  207. package/esm2020/datepicker/calendar-body.mjs +298 -0
  208. package/esm2020/datepicker/calendar.mjs +354 -0
  209. package/esm2020/datepicker/date-range-input-parts.mjs +342 -0
  210. package/esm2020/datepicker/date-range-input.mjs +331 -0
  211. package/esm2020/datepicker/date-range-picker.mjs +48 -0
  212. package/esm2020/datepicker/date-range-selection-strategy.mjs +59 -0
  213. package/esm2020/datepicker/date-selection-model.mjs +187 -0
  214. package/esm2020/datepicker/datepicker-actions.mjs +89 -0
  215. package/{esm2015/datepicker/datepicker-animations.js → esm2020/datepicker/datepicker-animations.mjs} +0 -0
  216. package/esm2020/datepicker/datepicker-base.mjs +549 -0
  217. package/{esm2015/datepicker/datepicker-errors.js → esm2020/datepicker/datepicker-errors.mjs} +0 -0
  218. package/esm2020/datepicker/datepicker-input-base.mjs +298 -0
  219. package/esm2020/datepicker/datepicker-input.mjs +183 -0
  220. package/esm2020/datepicker/datepicker-intl.mjs +53 -0
  221. package/esm2020/datepicker/datepicker-module.mjs +148 -0
  222. package/esm2020/datepicker/datepicker-toggle.mjs +113 -0
  223. package/esm2020/datepicker/datepicker.mjs +37 -0
  224. package/esm2020/datepicker/index.mjs +5 -0
  225. package/esm2020/datepicker/month-view.mjs +364 -0
  226. package/esm2020/datepicker/multi-year-view.mjs +289 -0
  227. package/{esm2015/datepicker/public-api.js → esm2020/datepicker/public-api.mjs} +0 -0
  228. package/esm2020/datepicker/testing/calendar-cell-harness.mjs +138 -0
  229. package/esm2020/datepicker/testing/calendar-harness.mjs +76 -0
  230. package/esm2020/datepicker/testing/date-range-input-harness.mjs +99 -0
  231. package/{esm2015/datepicker/testing/datepicker-harness-filters.js → esm2020/datepicker/testing/datepicker-harness-filters.mjs} +0 -0
  232. package/esm2020/datepicker/testing/datepicker-input-harness-base.mjs +81 -0
  233. package/esm2020/datepicker/testing/datepicker-input-harness.mjs +58 -0
  234. package/esm2020/datepicker/testing/datepicker-toggle-harness.mjs +41 -0
  235. package/esm2020/datepicker/testing/datepicker-trigger-harness-base.mjs +65 -0
  236. package/{esm2015/datepicker/testing/index.js → esm2020/datepicker/testing/index.mjs} +0 -0
  237. package/{esm2015/datepicker/testing/public-api.js → esm2020/datepicker/testing/public-api.mjs} +0 -0
  238. package/esm2020/datepicker/year-view.mjs +281 -0
  239. package/{esm2015/dialog/dialog-animations.js → esm2020/dialog/dialog-animations.mjs} +0 -0
  240. package/{esm2015/dialog/dialog-config.js → esm2020/dialog/dialog-config.mjs} +0 -0
  241. package/esm2020/dialog/dialog-container.mjs +282 -0
  242. package/esm2020/dialog/dialog-content-directives.mjs +172 -0
  243. package/esm2020/dialog/dialog-module.mjs +69 -0
  244. package/esm2020/dialog/dialog-ref.mjs +196 -0
  245. package/esm2020/dialog/dialog.mjs +358 -0
  246. package/{esm2015/dialog/index.js → esm2020/dialog/index.mjs} +0 -0
  247. package/{esm2015/dialog/public-api.js → esm2020/dialog/public-api.mjs} +0 -0
  248. package/{esm2015/dialog/testing/dialog-harness-filters.js → esm2020/dialog/testing/dialog-harness-filters.mjs} +0 -0
  249. package/esm2020/dialog/testing/dialog-harness.mjs +83 -0
  250. package/{esm2015/dialog/testing/index.js → esm2020/dialog/testing/index.mjs} +0 -0
  251. package/{esm2015/dialog/testing/public-api.js → esm2020/dialog/testing/public-api.mjs} +0 -0
  252. package/esm2020/divider/divider-module.mjs +25 -0
  253. package/esm2020/divider/divider.mjs +40 -0
  254. package/{esm2015/divider/index.js → esm2020/divider/index.mjs} +0 -0
  255. package/{esm2015/divider/public-api.js → esm2020/divider/public-api.mjs} +0 -0
  256. package/{esm2015/divider/testing/divider-harness-filters.js → esm2020/divider/testing/divider-harness-filters.mjs} +0 -0
  257. package/esm2020/divider/testing/divider-harness.mjs +22 -0
  258. package/{esm2015/divider/testing/index.js → esm2020/divider/testing/index.mjs} +0 -0
  259. package/{esm2015/divider/testing/public-api.js → esm2020/divider/testing/public-api.mjs} +0 -0
  260. package/{esm2015/expansion/accordion-base.js → esm2020/expansion/accordion-base.mjs} +0 -0
  261. package/esm2020/expansion/accordion.mjs +93 -0
  262. package/{esm2015/expansion/expansion-animations.js → esm2020/expansion/expansion-animations.mjs} +0 -0
  263. package/esm2020/expansion/expansion-module.mjs +59 -0
  264. package/esm2020/expansion/expansion-panel-content.mjs +27 -0
  265. package/esm2020/expansion/expansion-panel-header.mjs +226 -0
  266. package/esm2020/expansion/expansion-panel.mjs +195 -0
  267. package/{esm2015/expansion/index.js → esm2020/expansion/index.mjs} +0 -0
  268. package/{esm2015/expansion/public-api.js → esm2020/expansion/public-api.mjs} +0 -0
  269. package/esm2020/expansion/testing/accordion-harness.mjs +31 -0
  270. package/{esm2015/expansion/testing/expansion-harness-filters.js → esm2020/expansion/testing/expansion-harness-filters.mjs} +0 -0
  271. package/esm2020/expansion/testing/expansion-harness.mjs +120 -0
  272. package/{esm2015/expansion/testing/index.js → esm2020/expansion/testing/index.mjs} +0 -0
  273. package/{esm2015/expansion/testing/public-api.js → esm2020/expansion/testing/public-api.mjs} +0 -0
  274. package/esm2020/form-field/error.mjs +47 -0
  275. package/{esm2015/form-field/form-field-animations.js → esm2020/form-field/form-field-animations.mjs} +0 -0
  276. package/esm2020/form-field/form-field-control.mjs +11 -0
  277. package/{esm2015/form-field/form-field-errors.js → esm2020/form-field/form-field-errors.mjs} +0 -0
  278. package/esm2020/form-field/form-field-module.mjs +73 -0
  279. package/esm2020/form-field/form-field.mjs +510 -0
  280. package/esm2020/form-field/hint.mjs +49 -0
  281. package/{esm2015/form-field/index.js → esm2020/form-field/index.mjs} +0 -0
  282. package/esm2020/form-field/label.mjs +21 -0
  283. package/esm2020/form-field/placeholder.mjs +26 -0
  284. package/esm2020/form-field/prefix.mjs +28 -0
  285. package/{esm2015/form-field/public-api.js → esm2020/form-field/public-api.mjs} +0 -0
  286. package/esm2020/form-field/suffix.mjs +28 -0
  287. package/{esm2015/form-field/testing/control/form-field-control-harness.js → esm2020/form-field/testing/control/form-field-control-harness.mjs} +0 -0
  288. package/{esm2015/form-field/testing/control/index.js → esm2020/form-field/testing/control/index.mjs} +0 -0
  289. package/{esm2015/form-field/testing/form-field-harness-filters.js → esm2020/form-field/testing/form-field-harness-filters.mjs} +0 -0
  290. package/esm2020/form-field/testing/form-field-harness.mjs +181 -0
  291. package/{esm2015/form-field/testing/index.js → esm2020/form-field/testing/index.mjs} +0 -0
  292. package/{esm2015/form-field/testing/public-api.js → esm2020/form-field/testing/public-api.mjs} +0 -0
  293. package/{esm2015/grid-list/grid-list-base.js → esm2020/grid-list/grid-list-base.mjs} +0 -0
  294. package/esm2020/grid-list/grid-list-module.mjs +55 -0
  295. package/esm2020/grid-list/grid-list.mjs +135 -0
  296. package/esm2020/grid-list/grid-tile.mjs +117 -0
  297. package/esm2020/grid-list/index.mjs +5 -0
  298. package/{esm2015/grid-list/public-api.js → esm2020/grid-list/public-api.mjs} +0 -0
  299. package/{esm2015/grid-list/testing/grid-list-harness-filters.js → esm2020/grid-list/testing/grid-list-harness-filters.mjs} +0 -0
  300. package/esm2020/grid-list/testing/grid-list-harness.mjs +72 -0
  301. package/esm2020/grid-list/testing/grid-tile-harness.mjs +65 -0
  302. package/{esm2015/grid-list/testing/index.js → esm2020/grid-list/testing/index.mjs} +0 -0
  303. package/{esm2015/grid-list/testing/public-api.js → esm2020/grid-list/testing/public-api.mjs} +0 -0
  304. package/{esm2015/grid-list/tile-coordinator.js → esm2020/grid-list/tile-coordinator.mjs} +0 -0
  305. package/{esm2015/grid-list/tile-styler.js → esm2020/grid-list/tile-styler.mjs} +0 -0
  306. package/{esm2015/icon/fake-svgs.js → esm2020/icon/fake-svgs.mjs} +0 -0
  307. package/esm2020/icon/icon-module.mjs +25 -0
  308. package/esm2020/icon/icon-registry.mjs +582 -0
  309. package/esm2020/icon/icon.mjs +357 -0
  310. package/{esm2015/icon/index.js → esm2020/icon/index.mjs} +0 -0
  311. package/{esm2015/icon/public-api.js → esm2020/icon/public-api.mjs} +0 -0
  312. package/esm2020/icon/testing/fake-icon-registry.mjs +92 -0
  313. package/{esm2015/icon/testing/icon-harness-filters.js → esm2020/icon/testing/icon-harness-filters.mjs} +0 -0
  314. package/esm2020/icon/testing/icon-harness.mjs +54 -0
  315. package/{esm2015/icon/testing/index.js → esm2020/icon/testing/index.mjs} +0 -0
  316. package/{esm2015/icon/testing/public-api.js → esm2020/icon/testing/public-api.mjs} +0 -0
  317. package/esm2020/icon/trusted-types.mjs +43 -0
  318. package/{esm2015/index.js → esm2020/index.mjs} +0 -0
  319. package/{esm2015/input/index.js → esm2020/input/index.mjs} +0 -0
  320. package/{esm2015/input/input-errors.js → esm2020/input/input-errors.mjs} +0 -0
  321. package/esm2020/input/input-module.mjs +51 -0
  322. package/{esm2015/input/input-value-accessor.js → esm2020/input/input-value-accessor.mjs} +0 -0
  323. package/esm2020/input/input.mjs +428 -0
  324. package/{esm2015/input/public-api.js → esm2020/input/public-api.mjs} +0 -0
  325. package/{esm2015/input/testing/index.js → esm2020/input/testing/index.mjs} +0 -0
  326. package/{esm2015/input/testing/input-harness-filters.js → esm2020/input/testing/input-harness-filters.mjs} +0 -0
  327. package/esm2020/input/testing/input-harness.mjs +113 -0
  328. package/esm2020/input/testing/native-option-harness.mjs +42 -0
  329. package/{esm2015/input/testing/native-select-harness-filters.js → esm2020/input/testing/native-select-harness-filters.mjs} +0 -0
  330. package/esm2020/input/testing/native-select-harness.mjs +79 -0
  331. package/{esm2015/input/testing/public-api.js → esm2020/input/testing/public-api.mjs} +0 -0
  332. package/{esm2015/list/index.js → esm2020/list/index.mjs} +0 -0
  333. package/esm2020/list/list-module.mjs +71 -0
  334. package/esm2020/list/list.mjs +216 -0
  335. package/{esm2015/list/public-api.js → esm2020/list/public-api.mjs} +0 -0
  336. package/esm2020/list/selection-list.mjs +612 -0
  337. package/esm2020/list/testing/action-list-harness.mjs +59 -0
  338. package/{esm2015/list/testing/index.js → esm2020/list/testing/index.mjs} +0 -0
  339. package/esm2020/list/testing/list-harness-base.mjs +88 -0
  340. package/{esm2015/list/testing/list-harness-filters.js → esm2020/list/testing/list-harness-filters.mjs} +0 -0
  341. package/{esm2015/list/testing/list-harness.js → esm2020/list/testing/list-harness.mjs} +0 -0
  342. package/esm2020/list/testing/list-item-harness-base.mjs +72 -0
  343. package/esm2020/list/testing/nav-list-harness.mjs +64 -0
  344. package/{esm2015/list/testing/public-api.js → esm2020/list/testing/public-api.mjs} +0 -0
  345. package/esm2020/list/testing/selection-list-harness.mjs +125 -0
  346. package/esm2020/menu/index.mjs +5 -0
  347. package/{esm2015/menu/menu-animations.js → esm2020/menu/menu-animations.mjs} +0 -0
  348. package/esm2020/menu/menu-content.mjs +97 -0
  349. package/{esm2015/menu/menu-errors.js → esm2020/menu/menu-errors.mjs} +0 -0
  350. package/esm2020/menu/menu-item.mjs +164 -0
  351. package/esm2020/menu/menu-module.mjs +58 -0
  352. package/{esm2015/menu/menu-panel.js → esm2020/menu/menu-panel.mjs} +0 -0
  353. package/{esm2015/menu/menu-positions.js → esm2020/menu/menu-positions.mjs} +0 -0
  354. package/esm2020/menu/menu-trigger.mjs +540 -0
  355. package/esm2020/menu/menu.mjs +401 -0
  356. package/{esm2015/menu/public-api.js → esm2020/menu/public-api.mjs} +0 -0
  357. package/{esm2015/menu/testing/index.js → esm2020/menu/testing/index.mjs} +0 -0
  358. package/{esm2015/menu/testing/menu-harness-filters.js → esm2020/menu/testing/menu-harness-filters.mjs} +0 -0
  359. package/esm2020/menu/testing/menu-harness.mjs +183 -0
  360. package/{esm2015/menu/testing/public-api.js → esm2020/menu/testing/public-api.mjs} +0 -0
  361. package/{esm2015/paginator/index.js → esm2020/paginator/index.mjs} +0 -0
  362. package/esm2020/paginator/paginator-intl.mjs +64 -0
  363. package/esm2020/paginator/paginator-module.mjs +47 -0
  364. package/esm2020/paginator/paginator.mjs +268 -0
  365. package/{esm2015/paginator/public-api.js → esm2020/paginator/public-api.mjs} +0 -0
  366. package/{esm2015/paginator/testing/index.js → esm2020/paginator/testing/index.mjs} +0 -0
  367. package/{esm2015/paginator/testing/paginator-harness-filters.js → esm2020/paginator/testing/paginator-harness-filters.mjs} +0 -0
  368. package/esm2020/paginator/testing/paginator-harness.mjs +91 -0
  369. package/{esm2015/paginator/testing/public-api.js → esm2020/paginator/testing/public-api.mjs} +0 -0
  370. package/{esm2015/progress-bar/index.js → esm2020/progress-bar/index.mjs} +0 -0
  371. package/esm2020/progress-bar/progress-bar-module.mjs +26 -0
  372. package/esm2020/progress-bar/progress-bar.mjs +187 -0
  373. package/{esm2015/progress-bar/public-api.js → esm2020/progress-bar/public-api.mjs} +0 -0
  374. package/{esm2015/progress-bar/testing/index.js → esm2020/progress-bar/testing/index.mjs} +0 -0
  375. package/{esm2015/progress-bar/testing/progress-bar-harness-filters.js → esm2020/progress-bar/testing/progress-bar-harness-filters.mjs} +0 -0
  376. package/esm2020/progress-bar/testing/progress-bar-harness.mjs +34 -0
  377. package/{esm2015/progress-bar/testing/public-api.js → esm2020/progress-bar/testing/public-api.mjs} +0 -0
  378. package/{esm2015/progress-spinner/index.js → esm2020/progress-spinner/index.mjs} +0 -0
  379. package/esm2020/progress-spinner/progress-spinner-module.mjs +36 -0
  380. package/esm2020/progress-spinner/progress-spinner.mjs +280 -0
  381. package/{esm2015/progress-spinner/public-api.js → esm2020/progress-spinner/public-api.mjs} +0 -0
  382. package/{esm2015/progress-spinner/testing/index.js → esm2020/progress-spinner/testing/index.mjs} +0 -0
  383. package/{esm2015/progress-spinner/testing/progress-spinner-harness-filters.js → esm2020/progress-spinner/testing/progress-spinner-harness-filters.mjs} +0 -0
  384. package/esm2020/progress-spinner/testing/progress-spinner-harness.mjs +35 -0
  385. package/{esm2015/progress-spinner/testing/public-api.js → esm2020/progress-spinner/testing/public-api.mjs} +0 -0
  386. package/{esm2015/radio/index.js → esm2020/radio/index.mjs} +0 -0
  387. package/{esm2015/radio/public-api.js → esm2020/radio/public-api.mjs} +0 -0
  388. package/esm2020/radio/radio-module.mjs +25 -0
  389. package/esm2020/radio/radio.mjs +570 -0
  390. package/{esm2015/radio/testing/index.js → esm2020/radio/testing/index.mjs} +0 -0
  391. package/{esm2015/radio/testing/public-api.js → esm2020/radio/testing/public-api.mjs} +0 -0
  392. package/{esm2015/radio/testing/radio-harness-filters.js → esm2020/radio/testing/radio-harness-filters.mjs} +0 -0
  393. package/esm2020/radio/testing/radio-harness.mjs +231 -0
  394. package/{esm2015/select/index.js → esm2020/select/index.mjs} +0 -0
  395. package/{esm2015/select/public-api.js → esm2020/select/public-api.mjs} +0 -0
  396. package/{esm2015/select/select-animations.js → esm2020/select/select-animations.mjs} +0 -0
  397. package/{esm2015/select/select-errors.js → esm2020/select/select-errors.mjs} +0 -0
  398. package/esm2020/select/select-module.mjs +58 -0
  399. package/esm2020/select/select.mjs +1188 -0
  400. package/{esm2015/select/testing/index.js → esm2020/select/testing/index.mjs} +0 -0
  401. package/{esm2015/select/testing/public-api.js → esm2020/select/testing/public-api.mjs} +0 -0
  402. package/{esm2015/select/testing/select-harness-filters.js → esm2020/select/testing/select-harness-filters.mjs} +0 -0
  403. package/esm2020/select/testing/select-harness.mjs +130 -0
  404. package/{esm2015/sidenav/drawer-animations.js → esm2020/sidenav/drawer-animations.mjs} +0 -0
  405. package/esm2020/sidenav/drawer.mjs +788 -0
  406. package/esm2020/sidenav/index.mjs +5 -0
  407. package/{esm2015/sidenav/public-api.js → esm2020/sidenav/public-api.mjs} +0 -0
  408. package/esm2020/sidenav/sidenav-module.mjs +71 -0
  409. package/esm2020/sidenav/sidenav.mjs +115 -0
  410. package/esm2020/sidenav/testing/drawer-container-harness.mjs +36 -0
  411. package/{esm2015/sidenav/testing/drawer-content-harness.js → esm2020/sidenav/testing/drawer-content-harness.mjs} +0 -0
  412. package/{esm2015/sidenav/testing/drawer-harness-filters.js → esm2020/sidenav/testing/drawer-harness-filters.mjs} +0 -0
  413. package/esm2020/sidenav/testing/drawer-harness.mjs +50 -0
  414. package/{esm2015/sidenav/testing/index.js → esm2020/sidenav/testing/index.mjs} +0 -0
  415. package/{esm2015/sidenav/testing/public-api.js → esm2020/sidenav/testing/public-api.mjs} +0 -0
  416. package/esm2020/sidenav/testing/sidenav-container-harness.mjs +36 -0
  417. package/{esm2015/sidenav/testing/sidenav-content-harness.js → esm2020/sidenav/testing/sidenav-content-harness.mjs} +0 -0
  418. package/esm2020/sidenav/testing/sidenav-harness.mjs +29 -0
  419. package/{esm2015/slide-toggle/index.js → esm2020/slide-toggle/index.mjs} +0 -0
  420. package/{esm2015/slide-toggle/public-api.js → esm2020/slide-toggle/public-api.mjs} +0 -0
  421. package/{esm2015/slide-toggle/slide-toggle-config.js → esm2020/slide-toggle/slide-toggle-config.mjs} +0 -0
  422. package/esm2020/slide-toggle/slide-toggle-module.mjs +57 -0
  423. package/esm2020/slide-toggle/slide-toggle-required-validator.mjs +36 -0
  424. package/esm2020/slide-toggle/slide-toggle.mjs +253 -0
  425. package/{esm2015/slide-toggle/testing/index.js → esm2020/slide-toggle/testing/index.mjs} +0 -0
  426. package/{esm2015/slide-toggle/testing/public-api.js → esm2020/slide-toggle/testing/public-api.mjs} +0 -0
  427. package/{esm2015/slide-toggle/testing/slide-toggle-harness-filters.js → esm2020/slide-toggle/testing/slide-toggle-harness-filters.mjs} +0 -0
  428. package/esm2020/slide-toggle/testing/slide-toggle-harness.mjs +110 -0
  429. package/{esm2015/slider/index.js → esm2020/slider/index.mjs} +0 -0
  430. package/{esm2015/slider/public-api.js → esm2020/slider/public-api.mjs} +0 -0
  431. package/esm2020/slider/slider-module.mjs +26 -0
  432. package/esm2020/slider/slider.mjs +801 -0
  433. package/{esm2015/slider/testing/index.js → esm2020/slider/testing/index.mjs} +0 -0
  434. package/{esm2015/slider/testing/public-api.js → esm2020/slider/testing/public-api.mjs} +0 -0
  435. package/{esm2015/slider/testing/slider-harness-filters.js → esm2020/slider/testing/slider-harness-filters.mjs} +0 -0
  436. package/esm2020/slider/testing/slider-harness.mjs +114 -0
  437. package/{esm2015/snack-bar/index.js → esm2020/snack-bar/index.mjs} +0 -0
  438. package/{esm2015/snack-bar/public-api.js → esm2020/snack-bar/public-api.mjs} +0 -0
  439. package/esm2020/snack-bar/simple-snack-bar.mjs +44 -0
  440. package/{esm2015/snack-bar/snack-bar-animations.js → esm2020/snack-bar/snack-bar-animations.mjs} +0 -0
  441. package/{esm2015/snack-bar/snack-bar-config.js → esm2020/snack-bar/snack-bar-config.mjs} +0 -0
  442. package/esm2020/snack-bar/snack-bar-container.mjs +205 -0
  443. package/esm2020/snack-bar/snack-bar-module.mjs +47 -0
  444. package/esm2020/snack-bar/snack-bar-ref.mjs +90 -0
  445. package/esm2020/snack-bar/snack-bar.mjs +265 -0
  446. package/{esm2015/snack-bar/testing/index.js → esm2020/snack-bar/testing/index.mjs} +0 -0
  447. package/{esm2015/snack-bar/testing/public-api.js → esm2020/snack-bar/testing/public-api.mjs} +0 -0
  448. package/{esm2015/snack-bar/testing/snack-bar-harness-filters.js → esm2020/snack-bar/testing/snack-bar-harness-filters.mjs} +0 -0
  449. package/esm2020/snack-bar/testing/snack-bar-harness.mjs +118 -0
  450. package/{esm2015/sort/index.js → esm2020/sort/index.mjs} +0 -0
  451. package/{esm2015/sort/public-api.js → esm2020/sort/public-api.mjs} +0 -0
  452. package/{esm2015/sort/sort-animations.js → esm2020/sort/sort-animations.mjs} +0 -0
  453. package/{esm2015/sort/sort-direction.js → esm2020/sort/sort-direction.mjs} +0 -0
  454. package/{esm2015/sort/sort-errors.js → esm2020/sort/sort-errors.mjs} +0 -0
  455. package/esm2020/sort/sort-header-intl.mjs +43 -0
  456. package/esm2020/sort/sort-header.mjs +275 -0
  457. package/esm2020/sort/sort-module.mjs +29 -0
  458. package/esm2020/sort/sort.mjs +154 -0
  459. package/{esm2015/sort/testing/index.js → esm2020/sort/testing/index.mjs} +0 -0
  460. package/{esm2015/sort/testing/public-api.js → esm2020/sort/testing/public-api.mjs} +0 -0
  461. package/{esm2015/sort/testing/sort-harness-filters.js → esm2020/sort/testing/sort-harness-filters.mjs} +0 -0
  462. package/esm2020/sort/testing/sort-harness.mjs +36 -0
  463. package/esm2020/sort/testing/sort-header-harness.mjs +56 -0
  464. package/{esm2015/stepper/index.js → esm2020/stepper/index.mjs} +0 -0
  465. package/{esm2015/stepper/public-api.js → esm2020/stepper/public-api.mjs} +0 -0
  466. package/esm2020/stepper/step-content.mjs +26 -0
  467. package/esm2020/stepper/step-header.mjs +110 -0
  468. package/esm2020/stepper/step-label.mjs +21 -0
  469. package/{esm2015/stepper/stepper-animations.js → esm2020/stepper/stepper-animations.mjs} +0 -0
  470. package/esm2020/stepper/stepper-button.mjs +43 -0
  471. package/esm2020/stepper/stepper-icon.mjs +29 -0
  472. package/esm2020/stepper/stepper-intl.mjs +43 -0
  473. package/esm2020/stepper/stepper-module.mjs +97 -0
  474. package/esm2020/stepper/stepper.mjs +213 -0
  475. package/{esm2015/stepper/testing/index.js → esm2020/stepper/testing/index.mjs} +0 -0
  476. package/{esm2015/stepper/testing/public-api.js → esm2020/stepper/testing/public-api.mjs} +0 -0
  477. package/{esm2015/stepper/testing/step-harness-filters.js → esm2020/stepper/testing/step-harness-filters.mjs} +0 -0
  478. package/esm2020/stepper/testing/step-harness.mjs +90 -0
  479. package/esm2020/stepper/testing/stepper-button-harnesses.mjs +50 -0
  480. package/esm2020/stepper/testing/stepper-harness.mjs +50 -0
  481. package/esm2020/table/cell.mjs +139 -0
  482. package/{esm2015/table/index.js → esm2020/table/index.mjs} +0 -0
  483. package/{esm2015/table/public-api.js → esm2020/table/public-api.mjs} +0 -0
  484. package/esm2020/table/row.mjs +139 -0
  485. package/esm2020/table/table-data-source.mjs +310 -0
  486. package/esm2020/table/table-module.mjs +101 -0
  487. package/esm2020/table/table.mjs +71 -0
  488. package/esm2020/table/testing/cell-harness.mjs +72 -0
  489. package/{esm2015/table/testing/index.js → esm2020/table/testing/index.mjs} +0 -0
  490. package/{esm2015/table/testing/public-api.js → esm2020/table/testing/public-api.mjs} +0 -0
  491. package/esm2020/table/testing/row-harness.mjs +84 -0
  492. package/{esm2015/table/testing/table-harness-filters.js → esm2020/table/testing/table-harness-filters.mjs} +0 -0
  493. package/esm2020/table/testing/table-harness.mjs +88 -0
  494. package/esm2020/table/text-column.mjs +58 -0
  495. package/esm2020/tabs/index.mjs +5 -0
  496. package/esm2020/tabs/ink-bar.mjs +93 -0
  497. package/esm2020/tabs/paginated-tab-header.mjs +480 -0
  498. package/{esm2015/tabs/public-api.js → esm2020/tabs/public-api.mjs} +0 -0
  499. package/esm2020/tabs/tab-body.mjs +214 -0
  500. package/{esm2015/tabs/tab-config.js → esm2020/tabs/tab-config.mjs} +0 -0
  501. package/esm2020/tabs/tab-content.mjs +32 -0
  502. package/esm2020/tabs/tab-group.mjs +382 -0
  503. package/esm2020/tabs/tab-header.mjs +101 -0
  504. package/esm2020/tabs/tab-label-wrapper.mjs +41 -0
  505. package/esm2020/tabs/tab-label.mjs +43 -0
  506. package/{esm2015/tabs/tab-nav-bar/index.js → esm2020/tabs/tab-nav-bar/index.mjs} +0 -0
  507. package/esm2020/tabs/tab-nav-bar/tab-nav-bar.mjs +263 -0
  508. package/esm2020/tabs/tab.mjs +106 -0
  509. package/{esm2015/tabs/tabs-animations.js → esm2020/tabs/tabs-animations.mjs} +0 -0
  510. package/esm2020/tabs/tabs-module.mjs +93 -0
  511. package/{esm2015/tabs/testing/index.js → esm2020/tabs/testing/index.mjs} +0 -0
  512. package/{esm2015/tabs/testing/public-api.js → esm2020/tabs/testing/public-api.mjs} +0 -0
  513. package/esm2020/tabs/testing/tab-group-harness.mjs +58 -0
  514. package/{esm2015/tabs/testing/tab-harness-filters.js → esm2020/tabs/testing/tab-harness-filters.mjs} +0 -0
  515. package/esm2020/tabs/testing/tab-harness.mjs +66 -0
  516. package/esm2020/tabs/testing/tab-link-harness.mjs +42 -0
  517. package/esm2020/tabs/testing/tab-nav-bar-harness.mjs +54 -0
  518. package/{esm2015/toolbar/index.js → esm2020/toolbar/index.mjs} +0 -0
  519. package/{esm2015/toolbar/public-api.js → esm2020/toolbar/public-api.mjs} +0 -0
  520. package/{esm2015/toolbar/testing/index.js → esm2020/toolbar/testing/index.mjs} +0 -0
  521. package/{esm2015/toolbar/testing/public-api.js → esm2020/toolbar/testing/public-api.mjs} +0 -0
  522. package/{esm2015/toolbar/testing/toolbar-harness-filters.js → esm2020/toolbar/testing/toolbar-harness-filters.mjs} +0 -0
  523. package/esm2020/toolbar/testing/toolbar-harness.mjs +40 -0
  524. package/esm2020/toolbar/toolbar-module.mjs +25 -0
  525. package/esm2020/toolbar/toolbar.mjs +88 -0
  526. package/{esm2015/tooltip/index.js → esm2020/tooltip/index.mjs} +0 -0
  527. package/{esm2015/tooltip/public-api.js → esm2020/tooltip/public-api.mjs} +0 -0
  528. package/{esm2015/tooltip/testing/index.js → esm2020/tooltip/testing/index.mjs} +0 -0
  529. package/{esm2015/tooltip/testing/public-api.js → esm2020/tooltip/testing/public-api.mjs} +0 -0
  530. package/{esm2015/tooltip/testing/tooltip-harness-filters.js → esm2020/tooltip/testing/tooltip-harness-filters.mjs} +0 -0
  531. package/esm2020/tooltip/testing/tooltip-harness.mjs +57 -0
  532. package/{esm2015/tooltip/tooltip-animations.js → esm2020/tooltip/tooltip-animations.mjs} +0 -0
  533. package/esm2020/tooltip/tooltip-module.mjs +44 -0
  534. package/esm2020/tooltip/tooltip.mjs +739 -0
  535. package/{esm2015/tree/data-source/flat-data-source.js → esm2020/tree/data-source/flat-data-source.mjs} +0 -0
  536. package/{esm2015/tree/data-source/nested-data-source.js → esm2020/tree/data-source/nested-data-source.mjs} +0 -0
  537. package/{esm2015/tree/index.js → esm2020/tree/index.mjs} +0 -0
  538. package/esm2020/tree/node.mjs +143 -0
  539. package/esm2020/tree/outlet.mjs +41 -0
  540. package/esm2020/tree/padding.mjs +37 -0
  541. package/{esm2015/tree/public-api.js → esm2020/tree/public-api.mjs} +0 -0
  542. package/{esm2015/tree/testing/index.js → esm2020/tree/testing/index.mjs} +0 -0
  543. package/esm2020/tree/testing/node-harness.mjs +69 -0
  544. package/{esm2015/tree/testing/public-api.js → esm2020/tree/testing/public-api.mjs} +0 -0
  545. package/{esm2015/tree/testing/tree-harness-filters.js → esm2020/tree/testing/tree-harness-filters.mjs} +0 -0
  546. package/esm2020/tree/testing/tree-harness.mjs +123 -0
  547. package/esm2020/tree/toggle.mjs +36 -0
  548. package/esm2020/tree/tree-module.mjs +51 -0
  549. package/esm2020/tree/tree.mjs +37 -0
  550. package/expansion/accordion.d.ts +3 -0
  551. package/expansion/expansion-module.d.ts +12 -7
  552. package/expansion/expansion-panel-content.d.ts +3 -0
  553. package/expansion/expansion-panel-header.d.ts +8 -1
  554. package/expansion/expansion-panel.d.ts +5 -0
  555. package/expansion/package.json +5 -5
  556. package/expansion/testing/package.json +5 -5
  557. package/fesm2015/autocomplete/testing.mjs +132 -0
  558. package/fesm2015/autocomplete/testing.mjs.map +1 -0
  559. package/fesm2015/autocomplete.mjs +958 -0
  560. package/fesm2015/autocomplete.mjs.map +1 -0
  561. package/fesm2015/badge/testing.mjs +97 -0
  562. package/fesm2015/badge/testing.mjs.map +1 -0
  563. package/fesm2015/badge.mjs +266 -0
  564. package/fesm2015/badge.mjs.map +1 -0
  565. package/fesm2015/bottom-sheet/testing.mjs +52 -0
  566. package/fesm2015/bottom-sheet/testing.mjs.map +1 -0
  567. package/fesm2015/bottom-sheet.mjs +596 -0
  568. package/fesm2015/bottom-sheet.mjs.map +1 -0
  569. package/fesm2015/button/testing.mjs +76 -0
  570. package/fesm2015/button/testing.mjs.map +1 -0
  571. package/fesm2015/button-toggle/testing.mjs +181 -0
  572. package/fesm2015/button-toggle/testing.mjs.map +1 -0
  573. package/fesm2015/button-toggle.mjs +502 -0
  574. package/fesm2015/button-toggle.mjs.map +1 -0
  575. package/fesm2015/button.mjs +202 -0
  576. package/fesm2015/button.mjs.map +1 -0
  577. package/fesm2015/card/testing.mjs +64 -0
  578. package/fesm2015/card/testing.mjs.map +1 -0
  579. package/fesm2015/card.mjs +322 -0
  580. package/fesm2015/card.mjs.map +1 -0
  581. package/fesm2015/checkbox/testing.mjs +168 -0
  582. package/fesm2015/checkbox/testing.mjs.map +1 -0
  583. package/fesm2015/checkbox.mjs +503 -0
  584. package/fesm2015/checkbox.mjs.map +1 -0
  585. package/fesm2015/chips/testing.mjs +423 -0
  586. package/fesm2015/chips/testing.mjs.map +1 -0
  587. package/fesm2015/chips.mjs +1354 -0
  588. package/fesm2015/chips.mjs.map +1 -0
  589. package/fesm2015/core/testing.mjs +120 -0
  590. package/fesm2015/core/testing.mjs.map +1 -0
  591. package/fesm2015/core.mjs +1719 -0
  592. package/fesm2015/core.mjs.map +1 -0
  593. package/fesm2015/datepicker/testing.mjs +635 -0
  594. package/fesm2015/datepicker/testing.mjs.map +1 -0
  595. package/fesm2015/datepicker.mjs +3948 -0
  596. package/fesm2015/datepicker.mjs.map +1 -0
  597. package/fesm2015/dialog/testing.mjs +119 -0
  598. package/fesm2015/dialog/testing.mjs.map +1 -0
  599. package/fesm2015/dialog.mjs +1155 -0
  600. package/fesm2015/dialog.mjs.map +1 -0
  601. package/fesm2015/divider/testing.mjs +39 -0
  602. package/fesm2015/divider/testing.mjs.map +1 -0
  603. package/fesm2015/divider.mjs +77 -0
  604. package/fesm2015/divider.mjs.map +1 -0
  605. package/fesm2015/expansion/testing.mjs +187 -0
  606. package/fesm2015/expansion/testing.mjs.map +1 -0
  607. package/fesm2015/expansion.mjs +641 -0
  608. package/fesm2015/expansion.mjs.map +1 -0
  609. package/fesm2015/form-field/testing/control.mjs +26 -0
  610. package/fesm2015/form-field/testing/control.mjs.map +1 -0
  611. package/fesm2015/form-field/testing.mjs +231 -0
  612. package/fesm2015/form-field/testing.mjs.map +1 -0
  613. package/fesm2015/form-field.mjs +814 -0
  614. package/fesm2015/form-field.mjs.map +1 -0
  615. package/fesm2015/grid-list/testing.mjs +161 -0
  616. package/fesm2015/grid-list/testing.mjs.map +1 -0
  617. package/fesm2015/grid-list.mjs +700 -0
  618. package/fesm2015/grid-list.mjs.map +1 -0
  619. package/fesm2015/icon/testing.mjs +163 -0
  620. package/fesm2015/icon/testing.mjs.map +1 -0
  621. package/fesm2015/icon.mjs +1016 -0
  622. package/fesm2015/icon.mjs.map +1 -0
  623. package/fesm2015/input/testing.mjs +281 -0
  624. package/fesm2015/input/testing.mjs.map +1 -0
  625. package/fesm2015/input.mjs +515 -0
  626. package/fesm2015/input.mjs.map +1 -0
  627. package/fesm2015/list/testing.mjs +486 -0
  628. package/fesm2015/list/testing.mjs.map +1 -0
  629. package/fesm2015/list.mjs +908 -0
  630. package/fesm2015/list.mjs.map +1 -0
  631. package/fesm2015/material.mjs +16 -0
  632. package/fesm2015/material.mjs.map +1 -0
  633. package/fesm2015/menu/testing.mjs +235 -0
  634. package/fesm2015/menu/testing.mjs.map +1 -0
  635. package/fesm2015/menu.mjs +1363 -0
  636. package/fesm2015/menu.mjs.map +1 -0
  637. package/fesm2015/paginator/testing.mjs +118 -0
  638. package/fesm2015/paginator/testing.mjs.map +1 -0
  639. package/fesm2015/paginator.mjs +387 -0
  640. package/fesm2015/paginator.mjs.map +1 -0
  641. package/fesm2015/progress-bar/testing.mjs +51 -0
  642. package/fesm2015/progress-bar/testing.mjs.map +1 -0
  643. package/fesm2015/progress-bar.mjs +225 -0
  644. package/fesm2015/progress-bar.mjs.map +1 -0
  645. package/fesm2015/progress-spinner/testing.mjs +52 -0
  646. package/fesm2015/progress-spinner/testing.mjs.map +1 -0
  647. package/fesm2015/progress-spinner.mjs +330 -0
  648. package/fesm2015/progress-spinner.mjs.map +1 -0
  649. package/fesm2015/radio/testing.mjs +284 -0
  650. package/fesm2015/radio/testing.mjs.map +1 -0
  651. package/fesm2015/radio.mjs +599 -0
  652. package/fesm2015/radio.mjs.map +1 -0
  653. package/fesm2015/select/testing.mjs +169 -0
  654. package/fesm2015/select/testing.mjs.map +1 -0
  655. package/fesm2015/select.mjs +1346 -0
  656. package/fesm2015/select.mjs.map +1 -0
  657. package/fesm2015/sidenav/testing.mjs +195 -0
  658. package/fesm2015/sidenav/testing.mjs.map +1 -0
  659. package/fesm2015/sidenav.mjs +1013 -0
  660. package/fesm2015/sidenav.mjs.map +1 -0
  661. package/fesm2015/slide-toggle/testing.mjs +151 -0
  662. package/fesm2015/slide-toggle/testing.mjs.map +1 -0
  663. package/fesm2015/slide-toggle.mjs +359 -0
  664. package/fesm2015/slide-toggle.mjs.map +1 -0
  665. package/fesm2015/slider/testing.mjs +153 -0
  666. package/fesm2015/slider/testing.mjs.map +1 -0
  667. package/fesm2015/slider.mjs +830 -0
  668. package/fesm2015/slider.mjs.map +1 -0
  669. package/fesm2015/snack-bar/testing.mjs +153 -0
  670. package/fesm2015/snack-bar/testing.mjs.map +1 -0
  671. package/fesm2015/snack-bar.mjs +698 -0
  672. package/fesm2015/snack-bar.mjs.map +1 -0
  673. package/fesm2015/sort/testing.mjs +110 -0
  674. package/fesm2015/sort/testing.mjs.map +1 -0
  675. package/fesm2015/sort.mjs +605 -0
  676. package/fesm2015/sort.mjs.map +1 -0
  677. package/fesm2015/stepper/testing.mjs +216 -0
  678. package/fesm2015/stepper/testing.mjs.map +1 -0
  679. package/fesm2015/stepper.mjs +579 -0
  680. package/fesm2015/stepper.mjs.map +1 -0
  681. package/fesm2015/table/testing.mjs +259 -0
  682. package/fesm2015/table/testing.mjs.map +1 -0
  683. package/fesm2015/table.mjs +817 -0
  684. package/fesm2015/table.mjs.map +1 -0
  685. package/fesm2015/tabs/testing.mjs +245 -0
  686. package/fesm2015/tabs/testing.mjs.map +1 -0
  687. package/fesm2015/tabs.mjs +1846 -0
  688. package/fesm2015/tabs.mjs.map +1 -0
  689. package/fesm2015/toolbar/testing.mjs +59 -0
  690. package/fesm2015/toolbar/testing.mjs.map +1 -0
  691. package/fesm2015/toolbar.mjs +118 -0
  692. package/fesm2015/toolbar.mjs.map +1 -0
  693. package/fesm2015/tooltip/testing.mjs +80 -0
  694. package/fesm2015/tooltip/testing.mjs.map +1 -0
  695. package/fesm2015/tooltip.mjs +820 -0
  696. package/fesm2015/tooltip.mjs.map +1 -0
  697. package/fesm2015/tree/testing.mjs +215 -0
  698. package/fesm2015/tree/testing.mjs.map +1 -0
  699. package/fesm2015/tree.mjs +520 -0
  700. package/fesm2015/tree.mjs.map +1 -0
  701. package/fesm2020/autocomplete/testing.mjs +128 -0
  702. package/fesm2020/autocomplete/testing.mjs.map +1 -0
  703. package/fesm2020/autocomplete.mjs +958 -0
  704. package/fesm2020/autocomplete.mjs.map +1 -0
  705. package/fesm2020/badge/testing.mjs +99 -0
  706. package/fesm2020/badge/testing.mjs.map +1 -0
  707. package/fesm2020/badge.mjs +271 -0
  708. package/fesm2020/badge.mjs.map +1 -0
  709. package/fesm2020/bottom-sheet/testing.mjs +62 -0
  710. package/fesm2020/bottom-sheet/testing.mjs.map +1 -0
  711. package/fesm2020/bottom-sheet.mjs +592 -0
  712. package/fesm2020/bottom-sheet.mjs.map +1 -0
  713. package/fesm2020/button/testing.mjs +78 -0
  714. package/fesm2020/button/testing.mjs.map +1 -0
  715. package/fesm2020/button-toggle/testing.mjs +176 -0
  716. package/fesm2020/button-toggle/testing.mjs.map +1 -0
  717. package/fesm2020/button-toggle.mjs +505 -0
  718. package/fesm2020/button-toggle.mjs.map +1 -0
  719. package/fesm2020/button.mjs +205 -0
  720. package/fesm2020/button.mjs.map +1 -0
  721. package/fesm2020/card/testing.mjs +70 -0
  722. package/fesm2020/card/testing.mjs.map +1 -0
  723. package/fesm2020/card.mjs +320 -0
  724. package/fesm2020/card.mjs.map +1 -0
  725. package/fesm2020/checkbox/testing.mjs +150 -0
  726. package/fesm2020/checkbox/testing.mjs.map +1 -0
  727. package/fesm2020/checkbox.mjs +507 -0
  728. package/fesm2020/checkbox.mjs.map +1 -0
  729. package/fesm2020/chips/testing.mjs +398 -0
  730. package/fesm2020/chips/testing.mjs.map +1 -0
  731. package/fesm2020/chips.mjs +1346 -0
  732. package/fesm2020/chips.mjs.map +1 -0
  733. package/fesm2020/core/testing.mjs +131 -0
  734. package/fesm2020/core/testing.mjs.map +1 -0
  735. package/fesm2020/core.mjs +1731 -0
  736. package/fesm2020/core.mjs.map +1 -0
  737. package/fesm2020/datepicker/testing.mjs +572 -0
  738. package/fesm2020/datepicker/testing.mjs.map +1 -0
  739. package/fesm2020/datepicker.mjs +3921 -0
  740. package/fesm2020/datepicker.mjs.map +1 -0
  741. package/fesm2020/dialog/testing.mjs +110 -0
  742. package/fesm2020/dialog/testing.mjs.map +1 -0
  743. package/fesm2020/dialog.mjs +1147 -0
  744. package/fesm2020/dialog.mjs.map +1 -0
  745. package/fesm2020/divider/testing.mjs +49 -0
  746. package/fesm2020/divider/testing.mjs.map +1 -0
  747. package/fesm2020/divider.mjs +77 -0
  748. package/fesm2020/divider.mjs.map +1 -0
  749. package/fesm2020/expansion/testing.mjs +176 -0
  750. package/fesm2020/expansion/testing.mjs.map +1 -0
  751. package/fesm2020/expansion.mjs +644 -0
  752. package/fesm2020/expansion.mjs.map +1 -0
  753. package/fesm2020/form-field/testing/control.mjs +26 -0
  754. package/fesm2020/form-field/testing/control.mjs.map +1 -0
  755. package/fesm2020/form-field/testing.mjs +209 -0
  756. package/fesm2020/form-field/testing.mjs.map +1 -0
  757. package/fesm2020/form-field.mjs +817 -0
  758. package/fesm2020/form-field.mjs.map +1 -0
  759. package/fesm2020/grid-list/testing.mjs +162 -0
  760. package/fesm2020/grid-list/testing.mjs.map +1 -0
  761. package/fesm2020/grid-list.mjs +696 -0
  762. package/fesm2020/grid-list.mjs.map +1 -0
  763. package/fesm2020/icon/testing.mjs +169 -0
  764. package/fesm2020/icon/testing.mjs.map +1 -0
  765. package/fesm2020/icon.mjs +1010 -0
  766. package/fesm2020/icon.mjs.map +1 -0
  767. package/fesm2020/input/testing.mjs +265 -0
  768. package/fesm2020/input/testing.mjs.map +1 -0
  769. package/fesm2020/input.mjs +512 -0
  770. package/fesm2020/input.mjs.map +1 -0
  771. package/fesm2020/list/testing.mjs +464 -0
  772. package/fesm2020/list/testing.mjs.map +1 -0
  773. package/fesm2020/list.mjs +901 -0
  774. package/fesm2020/list.mjs.map +1 -0
  775. package/fesm2020/material.mjs +16 -0
  776. package/fesm2020/material.mjs.map +1 -0
  777. package/fesm2020/menu/testing.mjs +210 -0
  778. package/fesm2020/menu/testing.mjs.map +1 -0
  779. package/fesm2020/menu.mjs +1365 -0
  780. package/fesm2020/menu.mjs.map +1 -0
  781. package/fesm2020/paginator/testing.mjs +118 -0
  782. package/fesm2020/paginator/testing.mjs.map +1 -0
  783. package/fesm2020/paginator.mjs +385 -0
  784. package/fesm2020/paginator.mjs.map +1 -0
  785. package/fesm2020/progress-bar/testing.mjs +61 -0
  786. package/fesm2020/progress-bar/testing.mjs.map +1 -0
  787. package/fesm2020/progress-bar.mjs +223 -0
  788. package/fesm2020/progress-bar.mjs.map +1 -0
  789. package/fesm2020/progress-spinner/testing.mjs +62 -0
  790. package/fesm2020/progress-spinner/testing.mjs.map +1 -0
  791. package/fesm2020/progress-spinner.mjs +326 -0
  792. package/fesm2020/progress-spinner.mjs.map +1 -0
  793. package/fesm2020/radio/testing.mjs +258 -0
  794. package/fesm2020/radio/testing.mjs.map +1 -0
  795. package/fesm2020/radio.mjs +604 -0
  796. package/fesm2020/radio.mjs.map +1 -0
  797. package/fesm2020/select/testing.mjs +157 -0
  798. package/fesm2020/select/testing.mjs.map +1 -0
  799. package/fesm2020/select.mjs +1338 -0
  800. package/fesm2020/select.mjs.map +1 -0
  801. package/fesm2020/sidenav/testing.mjs +214 -0
  802. package/fesm2020/sidenav/testing.mjs.map +1 -0
  803. package/fesm2020/sidenav.mjs +1004 -0
  804. package/fesm2020/sidenav.mjs.map +1 -0
  805. package/fesm2020/slide-toggle/testing.mjs +137 -0
  806. package/fesm2020/slide-toggle/testing.mjs.map +1 -0
  807. package/fesm2020/slide-toggle.mjs +364 -0
  808. package/fesm2020/slide-toggle.mjs.map +1 -0
  809. package/fesm2020/slider/testing.mjs +133 -0
  810. package/fesm2020/slider/testing.mjs.map +1 -0
  811. package/fesm2020/slider.mjs +835 -0
  812. package/fesm2020/slider.mjs.map +1 -0
  813. package/fesm2020/snack-bar/testing.mjs +145 -0
  814. package/fesm2020/snack-bar/testing.mjs.map +1 -0
  815. package/fesm2020/snack-bar.mjs +701 -0
  816. package/fesm2020/snack-bar.mjs.map +1 -0
  817. package/fesm2020/sort/testing.mjs +109 -0
  818. package/fesm2020/sort/testing.mjs.map +1 -0
  819. package/fesm2020/sort.mjs +609 -0
  820. package/fesm2020/sort.mjs.map +1 -0
  821. package/fesm2020/stepper/testing.mjs +206 -0
  822. package/fesm2020/stepper/testing.mjs.map +1 -0
  823. package/fesm2020/stepper.mjs +589 -0
  824. package/fesm2020/stepper.mjs.map +1 -0
  825. package/fesm2020/table/testing.mjs +259 -0
  826. package/fesm2020/table/testing.mjs.map +1 -0
  827. package/fesm2020/table.mjs +814 -0
  828. package/fesm2020/table.mjs.map +1 -0
  829. package/fesm2020/tabs/testing.mjs +234 -0
  830. package/fesm2020/tabs/testing.mjs.map +1 -0
  831. package/fesm2020/tabs.mjs +1829 -0
  832. package/fesm2020/tabs.mjs.map +1 -0
  833. package/fesm2020/toolbar/testing.mjs +67 -0
  834. package/fesm2020/toolbar/testing.mjs.map +1 -0
  835. package/fesm2020/toolbar.mjs +123 -0
  836. package/fesm2020/toolbar.mjs.map +1 -0
  837. package/fesm2020/tooltip/testing.mjs +84 -0
  838. package/fesm2020/tooltip/testing.mjs.map +1 -0
  839. package/fesm2020/tooltip.mjs +815 -0
  840. package/fesm2020/tooltip.mjs.map +1 -0
  841. package/fesm2020/tree/testing.mjs +217 -0
  842. package/fesm2020/tree/testing.mjs.map +1 -0
  843. package/fesm2020/tree.mjs +514 -0
  844. package/fesm2020/tree.mjs.map +1 -0
  845. package/form-field/error.d.ts +3 -0
  846. package/form-field/form-field-control.d.ts +3 -0
  847. package/form-field/form-field-module.d.ts +14 -7
  848. package/form-field/form-field.d.ts +4 -1
  849. package/form-field/hint.d.ts +3 -0
  850. package/form-field/label.d.ts +3 -7
  851. package/form-field/package.json +5 -5
  852. package/form-field/placeholder.d.ts +3 -7
  853. package/form-field/prefix.d.ts +3 -0
  854. package/form-field/suffix.d.ts +3 -0
  855. package/form-field/testing/control/package.json +5 -5
  856. package/form-field/testing/package.json +5 -5
  857. package/grid-list/grid-list-module.d.ts +7 -7
  858. package/grid-list/grid-list.d.ts +3 -0
  859. package/grid-list/grid-tile.d.ts +11 -0
  860. package/grid-list/index.d.ts +0 -1
  861. package/grid-list/package.json +5 -5
  862. package/grid-list/testing/package.json +5 -5
  863. package/icon/icon-module.d.ts +6 -7
  864. package/icon/icon-registry.d.ts +3 -7
  865. package/icon/icon.d.ts +4 -1
  866. package/icon/package.json +5 -5
  867. package/icon/testing/fake-icon-registry.d.ts +6 -0
  868. package/icon/testing/package.json +5 -5
  869. package/input/input-module.d.ts +8 -7
  870. package/input/input.d.ts +4 -1
  871. package/input/package.json +5 -5
  872. package/input/testing/package.json +5 -5
  873. package/list/list-module.d.ts +9 -7
  874. package/list/list.d.ts +15 -2
  875. package/list/package.json +5 -5
  876. package/list/selection-list.d.ts +7 -2
  877. package/list/testing/package.json +5 -5
  878. package/menu/index.d.ts +0 -2
  879. package/menu/menu-content.d.ts +5 -7
  880. package/menu/menu-item.d.ts +4 -1
  881. package/menu/menu-module.d.ts +12 -7
  882. package/menu/menu-trigger.d.ts +5 -0
  883. package/menu/menu.d.ts +5 -0
  884. package/menu/package.json +5 -5
  885. package/menu/testing/package.json +5 -5
  886. package/package.json +612 -8
  887. package/paginator/package.json +5 -5
  888. package/paginator/paginator-intl.d.ts +3 -0
  889. package/paginator/paginator-module.d.ts +10 -7
  890. package/paginator/paginator.d.ts +6 -1
  891. package/paginator/testing/package.json +5 -5
  892. package/progress-bar/package.json +5 -5
  893. package/progress-bar/progress-bar-module.d.ts +7 -7
  894. package/progress-bar/progress-bar.d.ts +4 -1
  895. package/progress-bar/testing/package.json +5 -5
  896. package/progress-spinner/package.json +5 -5
  897. package/progress-spinner/progress-spinner-module.d.ts +7 -0
  898. package/progress-spinner/progress-spinner.d.ts +6 -1
  899. package/progress-spinner/testing/package.json +5 -5
  900. package/radio/package.json +5 -5
  901. package/radio/radio-module.d.ts +6 -7
  902. package/radio/radio.d.ts +10 -1
  903. package/radio/testing/package.json +5 -5
  904. package/schematics/ng-add/fonts/material-fonts.js +8 -17
  905. package/schematics/ng-add/fonts/material-fonts.mjs +8 -17
  906. package/schematics/ng-add/index.js +8 -8
  907. package/schematics/ng-add/index.mjs +8 -8
  908. package/schematics/ng-add/setup-project.js +23 -32
  909. package/schematics/ng-add/setup-project.mjs +23 -32
  910. package/schematics/ng-add/theming/create-custom-theme.js +2 -2
  911. package/schematics/ng-add/theming/create-custom-theme.mjs +2 -2
  912. package/schematics/ng-add/theming/theming.js +35 -46
  913. package/schematics/ng-add/theming/theming.mjs +35 -46
  914. package/schematics/ng-generate/address-form/index.js +13 -22
  915. package/schematics/ng-generate/address-form/index.mjs +13 -22
  916. package/schematics/ng-generate/dashboard/index.js +13 -22
  917. package/schematics/ng-generate/dashboard/index.mjs +13 -22
  918. package/schematics/ng-generate/navigation/index.js +13 -22
  919. package/schematics/ng-generate/navigation/index.mjs +13 -22
  920. package/schematics/ng-generate/table/index.js +10 -19
  921. package/schematics/ng-generate/table/index.mjs +10 -19
  922. package/schematics/ng-generate/tree/index.js +10 -19
  923. package/schematics/ng-generate/tree/index.mjs +10 -19
  924. package/schematics/ng-update/index.js +9 -9
  925. package/schematics/ng-update/index.mjs +9 -9
  926. package/schematics/ng-update/migrations/hammer-gestures-v9/hammer-gestures-migration.js +24 -24
  927. package/schematics/ng-update/migrations/hammer-gestures-v9/hammer-gestures-migration.mjs +24 -24
  928. package/schematics/ng-update/migrations/hammer-gestures-v9/import-manager.js +5 -5
  929. package/schematics/ng-update/migrations/hammer-gestures-v9/import-manager.mjs +5 -5
  930. package/schematics/ng-update/migrations/misc-checks/misc-class-inheritance.js +2 -2
  931. package/schematics/ng-update/migrations/misc-checks/misc-class-inheritance.mjs +2 -2
  932. package/schematics/ng-update/migrations/misc-checks/misc-imports.js +2 -2
  933. package/schematics/ng-update/migrations/misc-checks/misc-imports.mjs +2 -2
  934. package/schematics/ng-update/migrations/misc-checks/misc-template.js +4 -4
  935. package/schematics/ng-update/migrations/misc-checks/misc-template.mjs +4 -4
  936. package/schematics/ng-update/migrations/misc-ripples-v7/ripple-speed-factor-migration.js +7 -7
  937. package/schematics/ng-update/migrations/misc-ripples-v7/ripple-speed-factor-migration.mjs +7 -7
  938. package/schematics/ng-update/migrations/package-imports-v8/secondary-entry-points-migration.js +2 -3
  939. package/schematics/ng-update/migrations/package-imports-v8/secondary-entry-points-migration.mjs +2 -3
  940. package/schematics/ng-update/migrations/theming-api-v12/migration.d.ts +6 -6
  941. package/schematics/ng-update/migrations/theming-api-v12/migration.js +12 -12
  942. package/schematics/ng-update/migrations/theming-api-v12/migration.mjs +12 -12
  943. package/schematics/ng-update/migrations/theming-api-v12/theming-api-migration.js +3 -3
  944. package/schematics/ng-update/migrations/theming-api-v12/theming-api-migration.mjs +3 -3
  945. package/schematics/ng-update/typescript/module-specifiers.js +3 -3
  946. package/schematics/ng-update/typescript/module-specifiers.mjs +3 -3
  947. package/schematics/package.json +3 -0
  948. package/schematics/paths.js +3 -3
  949. package/schematics/paths.mjs +3 -3
  950. package/select/package.json +5 -5
  951. package/select/select-module.d.ts +10 -7
  952. package/select/select.d.ts +8 -1
  953. package/select/testing/package.json +5 -5
  954. package/sidenav/drawer.d.ts +7 -0
  955. package/sidenav/index.d.ts +0 -1
  956. package/sidenav/package.json +5 -5
  957. package/sidenav/sidenav-module.d.ts +10 -0
  958. package/sidenav/sidenav.d.ts +7 -0
  959. package/sidenav/testing/package.json +5 -5
  960. package/slide-toggle/package.json +5 -5
  961. package/slide-toggle/slide-toggle-module.d.ts +11 -7
  962. package/slide-toggle/slide-toggle-required-validator.d.ts +3 -0
  963. package/slide-toggle/slide-toggle.d.ts +4 -1
  964. package/slide-toggle/testing/package.json +5 -5
  965. package/slider/package.json +5 -5
  966. package/slider/slider-module.d.ts +7 -7
  967. package/slider/slider.d.ts +4 -1
  968. package/slider/testing/package.json +5 -5
  969. package/snack-bar/package.json +5 -5
  970. package/snack-bar/simple-snack-bar.d.ts +3 -7
  971. package/snack-bar/snack-bar-container.d.ts +3 -0
  972. package/snack-bar/snack-bar-module.d.ts +11 -7
  973. package/snack-bar/snack-bar.d.ts +3 -0
  974. package/snack-bar/testing/package.json +5 -5
  975. package/sort/package.json +5 -5
  976. package/sort/sort-header-intl.d.ts +3 -0
  977. package/sort/sort-header.d.ts +4 -1
  978. package/sort/sort-module.d.ts +8 -7
  979. package/sort/sort.d.ts +4 -1
  980. package/sort/testing/package.json +5 -5
  981. package/stepper/package.json +5 -5
  982. package/stepper/step-content.d.ts +3 -0
  983. package/stepper/step-header.d.ts +6 -1
  984. package/stepper/step-label.d.ts +3 -7
  985. package/stepper/stepper-button.d.ts +5 -0
  986. package/stepper/stepper-icon.d.ts +3 -0
  987. package/stepper/stepper-intl.d.ts +7 -0
  988. package/stepper/stepper-module.d.ts +16 -7
  989. package/stepper/stepper.d.ts +11 -0
  990. package/stepper/testing/package.json +5 -5
  991. package/table/cell.d.ts +15 -7
  992. package/table/package.json +5 -5
  993. package/table/row.d.ts +15 -0
  994. package/table/table-module.d.ts +10 -7
  995. package/table/table.d.ts +5 -0
  996. package/table/testing/package.json +5 -5
  997. package/table/text-column.d.ts +3 -0
  998. package/tabs/index.d.ts +0 -4
  999. package/tabs/ink-bar.d.ts +3 -0
  1000. package/tabs/package.json +5 -5
  1001. package/tabs/paginated-tab-header.d.ts +3 -0
  1002. package/tabs/tab-body.d.ts +7 -0
  1003. package/tabs/tab-content.d.ts +3 -0
  1004. package/tabs/tab-group.d.ts +6 -1
  1005. package/tabs/tab-header.d.ts +5 -0
  1006. package/tabs/tab-label-wrapper.d.ts +4 -1
  1007. package/tabs/tab-label.d.ts +3 -0
  1008. package/tabs/tab-nav-bar/tab-nav-bar.d.ts +10 -1
  1009. package/tabs/tab.d.ts +4 -1
  1010. package/tabs/tabs-module.d.ts +18 -7
  1011. package/tabs/testing/package.json +5 -5
  1012. package/toolbar/package.json +5 -5
  1013. package/toolbar/testing/package.json +5 -5
  1014. package/toolbar/toolbar-module.d.ts +6 -7
  1015. package/toolbar/toolbar.d.ts +6 -1
  1016. package/tooltip/package.json +5 -5
  1017. package/tooltip/testing/package.json +5 -5
  1018. package/tooltip/tooltip-module.d.ts +10 -7
  1019. package/tooltip/tooltip.d.ts +11 -2
  1020. package/tree/node.d.ts +8 -1
  1021. package/tree/outlet.d.ts +3 -0
  1022. package/tree/package.json +5 -5
  1023. package/tree/padding.d.ts +3 -0
  1024. package/tree/testing/package.json +5 -5
  1025. package/tree/toggle.d.ts +3 -7
  1026. package/tree/tree-module.d.ts +11 -7
  1027. package/tree/tree.d.ts +3 -0
  1028. package/autocomplete/index.metadata.json +0 -1
  1029. package/badge/index.metadata.json +0 -1
  1030. package/bottom-sheet/index.metadata.json +0 -1
  1031. package/bundles/material-autocomplete-testing.umd.js +0 -564
  1032. package/bundles/material-autocomplete-testing.umd.js.map +0 -1
  1033. package/bundles/material-autocomplete.umd.js +0 -1266
  1034. package/bundles/material-autocomplete.umd.js.map +0 -1
  1035. package/bundles/material-badge-testing.umd.js +0 -474
  1036. package/bundles/material-badge-testing.umd.js.map +0 -1
  1037. package/bundles/material-badge.umd.js +0 -604
  1038. package/bundles/material-badge.umd.js.map +0 -1
  1039. package/bundles/material-bottom-sheet-testing.umd.js +0 -396
  1040. package/bundles/material-bottom-sheet-testing.umd.js.map +0 -1
  1041. package/bundles/material-bottom-sheet.umd.js +0 -948
  1042. package/bundles/material-bottom-sheet.umd.js.map +0 -1
  1043. package/bundles/material-button-testing.umd.js +0 -444
  1044. package/bundles/material-button-testing.umd.js.map +0 -1
  1045. package/bundles/material-button-toggle-testing.umd.js +0 -628
  1046. package/bundles/material-button-toggle-testing.umd.js.map +0 -1
  1047. package/bundles/material-button-toggle.umd.js +0 -850
  1048. package/bundles/material-button-toggle.umd.js.map +0 -1
  1049. package/bundles/material-button.umd.js +0 -545
  1050. package/bundles/material-button.umd.js.map +0 -1
  1051. package/bundles/material-card-testing.umd.js +0 -408
  1052. package/bundles/material-card-testing.umd.js.map +0 -1
  1053. package/bundles/material-card.umd.js +0 -337
  1054. package/bundles/material-card.umd.js.map +0 -1
  1055. package/bundles/material-checkbox-testing.umd.js +0 -615
  1056. package/bundles/material-checkbox-testing.umd.js.map +0 -1
  1057. package/bundles/material-checkbox.umd.js +0 -829
  1058. package/bundles/material-checkbox.umd.js.map +0 -1
  1059. package/bundles/material-chips-testing.umd.js +0 -1023
  1060. package/bundles/material-chips-testing.umd.js.map +0 -1
  1061. package/bundles/material-chips.umd.js +0 -1753
  1062. package/bundles/material-chips.umd.js.map +0 -1
  1063. package/bundles/material-core-testing.umd.js +0 -518
  1064. package/bundles/material-core-testing.umd.js.map +0 -1
  1065. package/bundles/material-core.umd.js +0 -2175
  1066. package/bundles/material-core.umd.js.map +0 -1
  1067. package/bundles/material-datepicker-testing.umd.js +0 -1366
  1068. package/bundles/material-datepicker-testing.umd.js.map +0 -1
  1069. package/bundles/material-datepicker.umd.js +0 -4332
  1070. package/bundles/material-datepicker.umd.js.map +0 -1
  1071. package/bundles/material-dialog-testing.umd.js +0 -500
  1072. package/bundles/material-dialog-testing.umd.js.map +0 -1
  1073. package/bundles/material-dialog.umd.js +0 -1487
  1074. package/bundles/material-dialog.umd.js.map +0 -1
  1075. package/bundles/material-divider-testing.umd.js +0 -380
  1076. package/bundles/material-divider-testing.umd.js.map +0 -1
  1077. package/bundles/material-divider.umd.js +0 -95
  1078. package/bundles/material-divider.umd.js.map +0 -1
  1079. package/bundles/material-expansion-testing.umd.js +0 -627
  1080. package/bundles/material-expansion-testing.umd.js.map +0 -1
  1081. package/bundles/material-expansion.umd.js +0 -949
  1082. package/bundles/material-expansion.umd.js.map +0 -1
  1083. package/bundles/material-form-field-testing-control.umd.js +0 -350
  1084. package/bundles/material-form-field-testing-control.umd.js.map +0 -1
  1085. package/bundles/material-form-field-testing.umd.js +0 -708
  1086. package/bundles/material-form-field-testing.umd.js.map +0 -1
  1087. package/bundles/material-form-field.umd.js +0 -1131
  1088. package/bundles/material-form-field.umd.js.map +0 -1
  1089. package/bundles/material-grid-list-testing.umd.js +0 -566
  1090. package/bundles/material-grid-list-testing.umd.js.map +0 -1
  1091. package/bundles/material-grid-list.umd.js +0 -1070
  1092. package/bundles/material-grid-list.umd.js.map +0 -1
  1093. package/bundles/material-icon-testing.umd.js +0 -527
  1094. package/bundles/material-icon-testing.umd.js.map +0 -1
  1095. package/bundles/material-icon.umd.js +0 -1391
  1096. package/bundles/material-icon.umd.js.map +0 -1
  1097. package/bundles/material-input-testing.umd.js +0 -806
  1098. package/bundles/material-input-testing.umd.js.map +0 -1
  1099. package/bundles/material-input.umd.js +0 -817
  1100. package/bundles/material-input.umd.js.map +0 -1
  1101. package/bundles/material-list-testing.umd.js +0 -1092
  1102. package/bundles/material-list-testing.umd.js.map +0 -1
  1103. package/bundles/material-list.umd.js +0 -1284
  1104. package/bundles/material-list.umd.js.map +0 -1
  1105. package/bundles/material-menu-testing.umd.js +0 -722
  1106. package/bundles/material-menu-testing.umd.js.map +0 -1
  1107. package/bundles/material-menu.umd.js +0 -1677
  1108. package/bundles/material-menu.umd.js.map +0 -1
  1109. package/bundles/material-paginator-testing.umd.js +0 -504
  1110. package/bundles/material-paginator-testing.umd.js.map +0 -1
  1111. package/bundles/material-paginator.umd.js +0 -746
  1112. package/bundles/material-paginator.umd.js.map +0 -1
  1113. package/bundles/material-progress-bar-testing.umd.js +0 -395
  1114. package/bundles/material-progress-bar-testing.umd.js.map +0 -1
  1115. package/bundles/material-progress-bar.umd.js +0 -546
  1116. package/bundles/material-progress-bar.umd.js.map +0 -1
  1117. package/bundles/material-progress-spinner-testing.umd.js +0 -399
  1118. package/bundles/material-progress-spinner-testing.umd.js.map +0 -1
  1119. package/bundles/material-progress-spinner.umd.js +0 -631
  1120. package/bundles/material-progress-spinner.umd.js.map +0 -1
  1121. package/bundles/material-radio-testing.umd.js +0 -812
  1122. package/bundles/material-radio-testing.umd.js.map +0 -1
  1123. package/bundles/material-radio.umd.js +0 -971
  1124. package/bundles/material-radio.umd.js.map +0 -1
  1125. package/bundles/material-select-testing.umd.js +0 -620
  1126. package/bundles/material-select-testing.umd.js.map +0 -1
  1127. package/bundles/material-select.umd.js +0 -1667
  1128. package/bundles/material-select.umd.js.map +0 -1
  1129. package/bundles/material-sidenav-testing.umd.js +0 -603
  1130. package/bundles/material-sidenav-testing.umd.js.map +0 -1
  1131. package/bundles/material-sidenav.umd.js +0 -1368
  1132. package/bundles/material-sidenav.umd.js.map +0 -1
  1133. package/bundles/material-slide-toggle-testing.umd.js +0 -582
  1134. package/bundles/material-slide-toggle-testing.umd.js.map +0 -1
  1135. package/bundles/material-slide-toggle.umd.js +0 -670
  1136. package/bundles/material-slide-toggle.umd.js.map +0 -1
  1137. package/bundles/material-slider-testing.umd.js +0 -587
  1138. package/bundles/material-slider-testing.umd.js.map +0 -1
  1139. package/bundles/material-slider.umd.js +0 -1186
  1140. package/bundles/material-slider.umd.js.map +0 -1
  1141. package/bundles/material-snack-bar-testing.umd.js +0 -553
  1142. package/bundles/material-snack-bar-testing.umd.js.map +0 -1
  1143. package/bundles/material-snack-bar.umd.js +0 -1075
  1144. package/bundles/material-snack-bar.umd.js.map +0 -1
  1145. package/bundles/material-sort-testing.umd.js +0 -493
  1146. package/bundles/material-sort-testing.umd.js.map +0 -1
  1147. package/bundles/material-sort.umd.js +0 -943
  1148. package/bundles/material-sort.umd.js.map +0 -1
  1149. package/bundles/material-stepper-testing.umd.js +0 -703
  1150. package/bundles/material-stepper-testing.umd.js.map +0 -1
  1151. package/bundles/material-stepper.umd.js +0 -893
  1152. package/bundles/material-stepper.umd.js.map +0 -1
  1153. package/bundles/material-table-testing.umd.js +0 -700
  1154. package/bundles/material-table-testing.umd.js.map +0 -1
  1155. package/bundles/material-table.umd.js +0 -1121
  1156. package/bundles/material-table.umd.js.map +0 -1
  1157. package/bundles/material-tabs-testing.umd.js +0 -744
  1158. package/bundles/material-tabs-testing.umd.js.map +0 -1
  1159. package/bundles/material-tabs.umd.js +0 -2183
  1160. package/bundles/material-tabs.umd.js.map +0 -1
  1161. package/bundles/material-toolbar-testing.umd.js +0 -406
  1162. package/bundles/material-toolbar-testing.umd.js.map +0 -1
  1163. package/bundles/material-toolbar.umd.js +0 -454
  1164. package/bundles/material-toolbar.umd.js.map +0 -1
  1165. package/bundles/material-tooltip-testing.umd.js +0 -460
  1166. package/bundles/material-tooltip-testing.umd.js.map +0 -1
  1167. package/bundles/material-tooltip.umd.js +0 -1170
  1168. package/bundles/material-tooltip.umd.js.map +0 -1
  1169. package/bundles/material-tree-testing.umd.js +0 -636
  1170. package/bundles/material-tree-testing.umd.js.map +0 -1
  1171. package/bundles/material-tree.umd.js +0 -837
  1172. package/bundles/material-tree.umd.js.map +0 -1
  1173. package/bundles/material.umd.js +0 -26
  1174. package/bundles/material.umd.js.map +0 -1
  1175. package/button/index.metadata.json +0 -1
  1176. package/button-toggle/index.metadata.json +0 -1
  1177. package/card/index.metadata.json +0 -1
  1178. package/checkbox/index.metadata.json +0 -1
  1179. package/chips/index.metadata.json +0 -1
  1180. package/core/index.metadata.json +0 -1
  1181. package/datepicker/index.metadata.json +0 -1
  1182. package/dialog/index.metadata.json +0 -1
  1183. package/divider/index.metadata.json +0 -1
  1184. package/esm2015/autocomplete/autocomplete-module.js +0 -38
  1185. package/esm2015/autocomplete/autocomplete-origin.js +0 -35
  1186. package/esm2015/autocomplete/autocomplete-trigger.js +0 -627
  1187. package/esm2015/autocomplete/autocomplete.externs.js +0 -6
  1188. package/esm2015/autocomplete/autocomplete.js +0 -202
  1189. package/esm2015/autocomplete/testing/autocomplete-harness.js +0 -120
  1190. package/esm2015/autocomplete/testing/testing.externs.js +0 -0
  1191. package/esm2015/badge/badge-module.js +0 -24
  1192. package/esm2015/badge/badge.externs.js +0 -6
  1193. package/esm2015/badge/badge.js +0 -213
  1194. package/esm2015/badge/testing/badge-harness.js +0 -85
  1195. package/esm2015/badge/testing/testing.externs.js +0 -0
  1196. package/esm2015/bottom-sheet/bottom-sheet-container.js +0 -246
  1197. package/esm2015/bottom-sheet/bottom-sheet-module.js +0 -27
  1198. package/esm2015/bottom-sheet/bottom-sheet-ref.js +0 -91
  1199. package/esm2015/bottom-sheet/bottom-sheet.externs.js +0 -6
  1200. package/esm2015/bottom-sheet/bottom-sheet.js +0 -167
  1201. package/esm2015/bottom-sheet/testing/bottom-sheet-harness.js +0 -40
  1202. package/esm2015/bottom-sheet/testing/testing.externs.js +0 -0
  1203. package/esm2015/button/button-module.js +0 -30
  1204. package/esm2015/button/button.externs.js +0 -6
  1205. package/esm2015/button/button.js +0 -163
  1206. package/esm2015/button/testing/button-harness.js +0 -64
  1207. package/esm2015/button/testing/testing.externs.js +0 -0
  1208. package/esm2015/button-toggle/button-toggle-module.js +0 -20
  1209. package/esm2015/button-toggle/button-toggle.externs.js +0 -6
  1210. package/esm2015/button-toggle/button-toggle.js +0 -441
  1211. package/esm2015/button-toggle/testing/button-toggle-group-harness.js +0 -54
  1212. package/esm2015/button-toggle/testing/button-toggle-harness.js +0 -125
  1213. package/esm2015/button-toggle/testing/testing.externs.js +0 -0
  1214. package/esm2015/card/card-module.js +0 -40
  1215. package/esm2015/card/card.externs.js +0 -6
  1216. package/esm2015/card/card.js +0 -223
  1217. package/esm2015/card/testing/card-harness.js +0 -52
  1218. package/esm2015/card/testing/testing.externs.js +0 -0
  1219. package/esm2015/checkbox/checkbox-module.js +0 -34
  1220. package/esm2015/checkbox/checkbox-required-validator.js +0 -29
  1221. package/esm2015/checkbox/checkbox.externs.js +0 -6
  1222. package/esm2015/checkbox/checkbox.js +0 -385
  1223. package/esm2015/checkbox/testing/checkbox-harness.js +0 -156
  1224. package/esm2015/checkbox/testing/testing.externs.js +0 -0
  1225. package/esm2015/chips/chip-input.js +0 -180
  1226. package/esm2015/chips/chip-list.js +0 -663
  1227. package/esm2015/chips/chip.js +0 -394
  1228. package/esm2015/chips/chips-module.js +0 -43
  1229. package/esm2015/chips/chips.externs.js +0 -6
  1230. package/esm2015/chips/testing/chip-harness.js +0 -110
  1231. package/esm2015/chips/testing/chip-input-harness.js +0 -101
  1232. package/esm2015/chips/testing/chip-list-harness.js +0 -99
  1233. package/esm2015/chips/testing/chip-listbox-harness.js +0 -49
  1234. package/esm2015/chips/testing/chip-option-harness.js +0 -54
  1235. package/esm2015/chips/testing/chip-remove-harness.js +0 -29
  1236. package/esm2015/chips/testing/testing.externs.js +0 -0
  1237. package/esm2015/core/common-behaviors/common-module.js +0 -113
  1238. package/esm2015/core/common-behaviors/index.js +0 -15
  1239. package/esm2015/core/core.externs.js +0 -6
  1240. package/esm2015/core/datetime/index.js +0 -38
  1241. package/esm2015/core/datetime/native-date-adapter.js +0 -213
  1242. package/esm2015/core/error/error-options.js +0 -29
  1243. package/esm2015/core/index.js +0 -6
  1244. package/esm2015/core/line/line.js +0 -56
  1245. package/esm2015/core/option/index.js +0 -27
  1246. package/esm2015/core/option/optgroup.js +0 -84
  1247. package/esm2015/core/option/option.js +0 -274
  1248. package/esm2015/core/ripple/index.js +0 -24
  1249. package/esm2015/core/ripple/ripple-renderer.js +0 -261
  1250. package/esm2015/core/ripple/ripple.js +0 -128
  1251. package/esm2015/core/selection/index.js +0 -21
  1252. package/esm2015/core/selection/pseudo-checkbox/pseudo-checkbox.js +0 -55
  1253. package/esm2015/core/testing/optgroup-harness.js +0 -51
  1254. package/esm2015/core/testing/option-harness.js +0 -67
  1255. package/esm2015/core/testing/testing.externs.js +0 -0
  1256. package/esm2015/core/version.js +0 -11
  1257. package/esm2015/datepicker/calendar-body.js +0 -291
  1258. package/esm2015/datepicker/calendar.js +0 -330
  1259. package/esm2015/datepicker/date-range-input-parts.js +0 -315
  1260. package/esm2015/datepicker/date-range-input.js +0 -316
  1261. package/esm2015/datepicker/date-range-picker.js +0 -40
  1262. package/esm2015/datepicker/date-range-selection-strategy.js +0 -58
  1263. package/esm2015/datepicker/date-selection-model.js +0 -189
  1264. package/esm2015/datepicker/datepicker-actions.js +0 -89
  1265. package/esm2015/datepicker/datepicker-base.js +0 -529
  1266. package/esm2015/datepicker/datepicker-input-base.js +0 -290
  1267. package/esm2015/datepicker/datepicker-input.js +0 -164
  1268. package/esm2015/datepicker/datepicker-intl.js +0 -51
  1269. package/esm2015/datepicker/datepicker-module.js +0 -93
  1270. package/esm2015/datepicker/datepicker-toggle.js +0 -104
  1271. package/esm2015/datepicker/datepicker.externs.js +0 -6
  1272. package/esm2015/datepicker/datepicker.js +0 -30
  1273. package/esm2015/datepicker/index.js +0 -9
  1274. package/esm2015/datepicker/month-view.js +0 -344
  1275. package/esm2015/datepicker/multi-year-view.js +0 -280
  1276. package/esm2015/datepicker/testing/calendar-cell-harness.js +0 -181
  1277. package/esm2015/datepicker/testing/calendar-harness.js +0 -91
  1278. package/esm2015/datepicker/testing/date-range-input-harness.js +0 -116
  1279. package/esm2015/datepicker/testing/datepicker-input-harness-base.js +0 -102
  1280. package/esm2015/datepicker/testing/datepicker-input-harness.js +0 -69
  1281. package/esm2015/datepicker/testing/datepicker-toggle-harness.js +0 -48
  1282. package/esm2015/datepicker/testing/datepicker-trigger-harness-base.js +0 -77
  1283. package/esm2015/datepicker/testing/testing.externs.js +0 -0
  1284. package/esm2015/datepicker/year-view.js +0 -268
  1285. package/esm2015/dialog/dialog-container.js +0 -295
  1286. package/esm2015/dialog/dialog-content-directives.js +0 -159
  1287. package/esm2015/dialog/dialog-module.js +0 -46
  1288. package/esm2015/dialog/dialog-ref.js +0 -196
  1289. package/esm2015/dialog/dialog.externs.js +0 -6
  1290. package/esm2015/dialog/dialog.js +0 -353
  1291. package/esm2015/dialog/testing/dialog-harness.js +0 -103
  1292. package/esm2015/dialog/testing/testing.externs.js +0 -0
  1293. package/esm2015/divider/divider-module.js +0 -20
  1294. package/esm2015/divider/divider.externs.js +0 -6
  1295. package/esm2015/divider/divider.js +0 -43
  1296. package/esm2015/divider/testing/divider-harness.js +0 -27
  1297. package/esm2015/divider/testing/testing.externs.js +0 -0
  1298. package/esm2015/expansion/accordion.js +0 -83
  1299. package/esm2015/expansion/expansion-module.js +0 -42
  1300. package/esm2015/expansion/expansion-panel-content.js +0 -26
  1301. package/esm2015/expansion/expansion-panel-header.js +0 -214
  1302. package/esm2015/expansion/expansion-panel.js +0 -186
  1303. package/esm2015/expansion/expansion.externs.js +0 -6
  1304. package/esm2015/expansion/testing/accordion-harness.js +0 -36
  1305. package/esm2015/expansion/testing/expansion-harness.js +0 -149
  1306. package/esm2015/expansion/testing/testing.externs.js +0 -0
  1307. package/esm2015/form-field/error.js +0 -45
  1308. package/esm2015/form-field/form-field-control.js +0 -15
  1309. package/esm2015/form-field/form-field-module.js +0 -49
  1310. package/esm2015/form-field/form-field.externs.js +0 -6
  1311. package/esm2015/form-field/form-field.js +0 -482
  1312. package/esm2015/form-field/hint.js +0 -45
  1313. package/esm2015/form-field/label.js +0 -17
  1314. package/esm2015/form-field/placeholder.js +0 -22
  1315. package/esm2015/form-field/prefix.js +0 -24
  1316. package/esm2015/form-field/suffix.js +0 -24
  1317. package/esm2015/form-field/testing/control/control.externs.js +0 -0
  1318. package/esm2015/form-field/testing/form-field-harness.js +0 -218
  1319. package/esm2015/form-field/testing/testing.externs.js +0 -0
  1320. package/esm2015/grid-list/grid-list-module.js +0 -37
  1321. package/esm2015/grid-list/grid-list.externs.js +0 -6
  1322. package/esm2015/grid-list/grid-list.js +0 -135
  1323. package/esm2015/grid-list/grid-tile.js +0 -116
  1324. package/esm2015/grid-list/index.js +0 -6
  1325. package/esm2015/grid-list/testing/grid-list-harness.js +0 -79
  1326. package/esm2015/grid-list/testing/grid-tile-harness.js +0 -80
  1327. package/esm2015/grid-list/testing/testing.externs.js +0 -0
  1328. package/esm2015/icon/icon-module.js +0 -20
  1329. package/esm2015/icon/icon-registry.js +0 -581
  1330. package/esm2015/icon/icon.externs.js +0 -6
  1331. package/esm2015/icon/icon.js +0 -362
  1332. package/esm2015/icon/testing/fake-icon-registry.js +0 -85
  1333. package/esm2015/icon/testing/icon-harness.js +0 -63
  1334. package/esm2015/icon/testing/testing.externs.js +0 -6
  1335. package/esm2015/icon/trusted-types.js +0 -44
  1336. package/esm2015/input/input-module.js +0 -33
  1337. package/esm2015/input/input.externs.js +0 -6
  1338. package/esm2015/input/input.js +0 -395
  1339. package/esm2015/input/testing/input-harness.js +0 -138
  1340. package/esm2015/input/testing/native-option-harness.js +0 -51
  1341. package/esm2015/input/testing/native-select-harness.js +0 -100
  1342. package/esm2015/input/testing/testing.externs.js +0 -0
  1343. package/esm2015/list/list-module.js +0 -45
  1344. package/esm2015/list/list.externs.js +0 -6
  1345. package/esm2015/list/list.js +0 -218
  1346. package/esm2015/list/selection-list.js +0 -608
  1347. package/esm2015/list/testing/action-list-harness.js +0 -68
  1348. package/esm2015/list/testing/list-harness-base.js +0 -97
  1349. package/esm2015/list/testing/list-item-harness-base.js +0 -85
  1350. package/esm2015/list/testing/nav-list-harness.js +0 -75
  1351. package/esm2015/list/testing/selection-list-harness.js +0 -152
  1352. package/esm2015/list/testing/testing.externs.js +0 -0
  1353. package/esm2015/material.externs.js +0 -0
  1354. package/esm2015/menu/index.js +0 -7
  1355. package/esm2015/menu/menu-content.js +0 -97
  1356. package/esm2015/menu/menu-item.js +0 -164
  1357. package/esm2015/menu/menu-module.js +0 -39
  1358. package/esm2015/menu/menu-trigger.js +0 -505
  1359. package/esm2015/menu/menu.externs.js +0 -6
  1360. package/esm2015/menu/menu.js +0 -381
  1361. package/esm2015/menu/testing/menu-harness.js +0 -223
  1362. package/esm2015/menu/testing/testing.externs.js +0 -0
  1363. package/esm2015/paginator/paginator-intl.js +0 -62
  1364. package/esm2015/paginator/paginator-module.js +0 -32
  1365. package/esm2015/paginator/paginator.externs.js +0 -6
  1366. package/esm2015/paginator/paginator.js +0 -263
  1367. package/esm2015/paginator/testing/paginator-harness.js +0 -106
  1368. package/esm2015/paginator/testing/testing.externs.js +0 -0
  1369. package/esm2015/progress-bar/progress-bar-module.js +0 -21
  1370. package/esm2015/progress-bar/progress-bar.externs.js +0 -6
  1371. package/esm2015/progress-bar/progress-bar.js +0 -179
  1372. package/esm2015/progress-bar/testing/progress-bar-harness.js +0 -39
  1373. package/esm2015/progress-bar/testing/testing.externs.js +0 -0
  1374. package/esm2015/progress-spinner/progress-spinner-module.js +0 -28
  1375. package/esm2015/progress-spinner/progress-spinner.externs.js +0 -6
  1376. package/esm2015/progress-spinner/progress-spinner.js +0 -274
  1377. package/esm2015/progress-spinner/testing/progress-spinner-harness.js +0 -40
  1378. package/esm2015/progress-spinner/testing/testing.externs.js +0 -0
  1379. package/esm2015/radio/radio-module.js +0 -20
  1380. package/esm2015/radio/radio.externs.js +0 -6
  1381. package/esm2015/radio/radio.js +0 -546
  1382. package/esm2015/radio/testing/radio-harness.js +0 -272
  1383. package/esm2015/radio/testing/testing.externs.js +0 -0
  1384. package/esm2015/select/select-module.js +0 -37
  1385. package/esm2015/select/select.externs.js +0 -6
  1386. package/esm2015/select/select.js +0 -1140
  1387. package/esm2015/select/testing/select-harness.js +0 -157
  1388. package/esm2015/select/testing/testing.externs.js +0 -0
  1389. package/esm2015/sidenav/drawer.js +0 -766
  1390. package/esm2015/sidenav/index.js +0 -6
  1391. package/esm2015/sidenav/sidenav-module.js +0 -45
  1392. package/esm2015/sidenav/sidenav.externs.js +0 -6
  1393. package/esm2015/sidenav/sidenav.js +0 -118
  1394. package/esm2015/sidenav/testing/drawer-container-harness.js +0 -41
  1395. package/esm2015/sidenav/testing/drawer-harness.js +0 -57
  1396. package/esm2015/sidenav/testing/sidenav-container-harness.js +0 -41
  1397. package/esm2015/sidenav/testing/sidenav-harness.js +0 -32
  1398. package/esm2015/sidenav/testing/testing.externs.js +0 -0
  1399. package/esm2015/slide-toggle/slide-toggle-module.js +0 -40
  1400. package/esm2015/slide-toggle/slide-toggle-required-validator.js +0 -32
  1401. package/esm2015/slide-toggle/slide-toggle.externs.js +0 -6
  1402. package/esm2015/slide-toggle/slide-toggle.js +0 -236
  1403. package/esm2015/slide-toggle/testing/slide-toggle-harness.js +0 -139
  1404. package/esm2015/slide-toggle/testing/testing.externs.js +0 -0
  1405. package/esm2015/slider/slider-module.js +0 -21
  1406. package/esm2015/slider/slider.externs.js +0 -6
  1407. package/esm2015/slider/slider.js +0 -788
  1408. package/esm2015/slider/testing/slider-harness.js +0 -141
  1409. package/esm2015/slider/testing/testing.externs.js +0 -0
  1410. package/esm2015/snack-bar/simple-snack-bar.js +0 -45
  1411. package/esm2015/snack-bar/snack-bar-container.js +0 -224
  1412. package/esm2015/snack-bar/snack-bar-module.js +0 -32
  1413. package/esm2015/snack-bar/snack-bar-ref.js +0 -90
  1414. package/esm2015/snack-bar/snack-bar.externs.js +0 -6
  1415. package/esm2015/snack-bar/snack-bar.js +0 -264
  1416. package/esm2015/snack-bar/testing/snack-bar-harness.js +0 -141
  1417. package/esm2015/snack-bar/testing/testing.externs.js +0 -0
  1418. package/esm2015/sort/sort-header-intl.js +0 -41
  1419. package/esm2015/sort/sort-header.js +0 -268
  1420. package/esm2015/sort/sort-module.js +0 -24
  1421. package/esm2015/sort/sort.externs.js +0 -6
  1422. package/esm2015/sort/sort.js +0 -140
  1423. package/esm2015/sort/testing/sort-harness.js +0 -41
  1424. package/esm2015/sort/testing/sort-header-harness.js +0 -67
  1425. package/esm2015/sort/testing/testing.externs.js +0 -0
  1426. package/esm2015/stepper/step-content.js +0 -25
  1427. package/esm2015/stepper/step-header.js +0 -108
  1428. package/esm2015/stepper/step-label.js +0 -17
  1429. package/esm2015/stepper/stepper-button.js +0 -36
  1430. package/esm2015/stepper/stepper-icon.js +0 -28
  1431. package/esm2015/stepper/stepper-intl.js +0 -37
  1432. package/esm2015/stepper/stepper-module.js +0 -61
  1433. package/esm2015/stepper/stepper.externs.js +0 -6
  1434. package/esm2015/stepper/stepper.js +0 -187
  1435. package/esm2015/stepper/testing/step-harness.js +0 -111
  1436. package/esm2015/stepper/testing/stepper-button-harnesses.js +0 -55
  1437. package/esm2015/stepper/testing/stepper-harness.js +0 -57
  1438. package/esm2015/stepper/testing/testing.externs.js +0 -0
  1439. package/esm2015/table/cell.js +0 -114
  1440. package/esm2015/table/row.js +0 -116
  1441. package/esm2015/table/table-data-source.js +0 -312
  1442. package/esm2015/table/table-module.js +0 -50
  1443. package/esm2015/table/table.externs.js +0 -6
  1444. package/esm2015/table/table.js +0 -63
  1445. package/esm2015/table/testing/cell-harness.js +0 -77
  1446. package/esm2015/table/testing/row-harness.js +0 -91
  1447. package/esm2015/table/testing/table-harness.js +0 -99
  1448. package/esm2015/table/testing/testing.externs.js +0 -0
  1449. package/esm2015/table/text-column.js +0 -44
  1450. package/esm2015/tabs/index.js +0 -9
  1451. package/esm2015/tabs/ink-bar.js +0 -87
  1452. package/esm2015/tabs/paginated-tab-header.js +0 -477
  1453. package/esm2015/tabs/tab-body.js +0 -212
  1454. package/esm2015/tabs/tab-content.js +0 -31
  1455. package/esm2015/tabs/tab-group.js +0 -357
  1456. package/esm2015/tabs/tab-header.js +0 -94
  1457. package/esm2015/tabs/tab-label-wrapper.js +0 -47
  1458. package/esm2015/tabs/tab-label.js +0 -39
  1459. package/esm2015/tabs/tab-nav-bar/tab-nav-bar.js +0 -241
  1460. package/esm2015/tabs/tab.js +0 -107
  1461. package/esm2015/tabs/tabs-module.js +0 -60
  1462. package/esm2015/tabs/tabs.externs.js +0 -6
  1463. package/esm2015/tabs/testing/tab-group-harness.js +0 -65
  1464. package/esm2015/tabs/testing/tab-harness.js +0 -85
  1465. package/esm2015/tabs/testing/tab-link-harness.js +0 -51
  1466. package/esm2015/tabs/testing/tab-nav-bar-harness.js +0 -61
  1467. package/esm2015/tabs/testing/testing.externs.js +0 -0
  1468. package/esm2015/toolbar/testing/testing.externs.js +0 -0
  1469. package/esm2015/toolbar/testing/toolbar-harness.js +0 -47
  1470. package/esm2015/toolbar/toolbar-module.js +0 -20
  1471. package/esm2015/toolbar/toolbar.externs.js +0 -6
  1472. package/esm2015/toolbar/toolbar.js +0 -91
  1473. package/esm2015/tooltip/testing/testing.externs.js +0 -0
  1474. package/esm2015/tooltip/testing/tooltip-harness.js +0 -68
  1475. package/esm2015/tooltip/tooltip-module.js +0 -31
  1476. package/esm2015/tooltip/tooltip.externs.js +0 -6
  1477. package/esm2015/tooltip/tooltip.js +0 -737
  1478. package/esm2015/tree/node.js +0 -131
  1479. package/esm2015/tree/outlet.js +0 -33
  1480. package/esm2015/tree/padding.js +0 -31
  1481. package/esm2015/tree/testing/node-harness.js +0 -84
  1482. package/esm2015/tree/testing/testing.externs.js +0 -0
  1483. package/esm2015/tree/testing/tree-harness.js +0 -129
  1484. package/esm2015/tree/toggle.js +0 -32
  1485. package/esm2015/tree/tree-module.js +0 -34
  1486. package/esm2015/tree/tree.externs.js +0 -6
  1487. package/esm2015/tree/tree.js +0 -43
  1488. package/expansion/index.metadata.json +0 -1
  1489. package/fesm2015/autocomplete/testing.js +0 -147
  1490. package/fesm2015/autocomplete/testing.js.map +0 -1
  1491. package/fesm2015/autocomplete.js +0 -901
  1492. package/fesm2015/autocomplete.js.map +0 -1
  1493. package/fesm2015/badge/testing.js +0 -112
  1494. package/fesm2015/badge/testing.js.map +0 -1
  1495. package/fesm2015/badge.js +0 -248
  1496. package/fesm2015/badge.js.map +0 -1
  1497. package/fesm2015/bottom-sheet/testing.js +0 -67
  1498. package/fesm2015/bottom-sheet/testing.js.map +0 -1
  1499. package/fesm2015/bottom-sheet.js +0 -596
  1500. package/fesm2015/bottom-sheet.js.map +0 -1
  1501. package/fesm2015/button/testing.js +0 -91
  1502. package/fesm2015/button/testing.js.map +0 -1
  1503. package/fesm2015/button-toggle/testing.js +0 -211
  1504. package/fesm2015/button-toggle/testing.js.map +0 -1
  1505. package/fesm2015/button-toggle.js +0 -473
  1506. package/fesm2015/button-toggle.js.map +0 -1
  1507. package/fesm2015/button.js +0 -205
  1508. package/fesm2015/button.js.map +0 -1
  1509. package/fesm2015/card/testing.js +0 -79
  1510. package/fesm2015/card/testing.js.map +0 -1
  1511. package/fesm2015/card.js +0 -276
  1512. package/fesm2015/card.js.map +0 -1
  1513. package/fesm2015/checkbox/testing.js +0 -183
  1514. package/fesm2015/checkbox/testing.js.map +0 -1
  1515. package/fesm2015/checkbox.js +0 -476
  1516. package/fesm2015/checkbox.js.map +0 -1
  1517. package/fesm2015/chips/testing.js +0 -465
  1518. package/fesm2015/chips/testing.js.map +0 -1
  1519. package/fesm2015/chips.js +0 -1286
  1520. package/fesm2015/chips.js.map +0 -1
  1521. package/fesm2015/core/testing.js +0 -150
  1522. package/fesm2015/core/testing.js.map +0 -1
  1523. package/fesm2015/core.js +0 -1681
  1524. package/fesm2015/core.js.map +0 -1
  1525. package/fesm2015/datepicker/testing.js +0 -692
  1526. package/fesm2015/datepicker/testing.js.map +0 -1
  1527. package/fesm2015/datepicker.js +0 -3733
  1528. package/fesm2015/datepicker.js.map +0 -1
  1529. package/fesm2015/dialog/testing.js +0 -130
  1530. package/fesm2015/dialog/testing.js.map +0 -1
  1531. package/fesm2015/dialog.js +0 -1127
  1532. package/fesm2015/dialog.js.map +0 -1
  1533. package/fesm2015/divider/testing.js +0 -54
  1534. package/fesm2015/divider/testing.js.map +0 -1
  1535. package/fesm2015/divider.js +0 -76
  1536. package/fesm2015/divider.js.map +0 -1
  1537. package/fesm2015/expansion/testing.js +0 -209
  1538. package/fesm2015/expansion/testing.js.map +0 -1
  1539. package/fesm2015/expansion.js +0 -600
  1540. package/fesm2015/expansion.js.map +0 -1
  1541. package/fesm2015/form-field/testing/control.js +0 -26
  1542. package/fesm2015/form-field/testing/control.js.map +0 -1
  1543. package/fesm2015/form-field/testing.js +0 -246
  1544. package/fesm2015/form-field/testing.js.map +0 -1
  1545. package/fesm2015/form-field.js +0 -757
  1546. package/fesm2015/form-field.js.map +0 -1
  1547. package/fesm2015/grid-list/testing.js +0 -183
  1548. package/fesm2015/grid-list/testing.js.map +0 -1
  1549. package/fesm2015/grid-list.js +0 -680
  1550. package/fesm2015/grid-list.js.map +0 -1
  1551. package/fesm2015/icon/testing.js +0 -171
  1552. package/fesm2015/icon/testing.js.map +0 -1
  1553. package/fesm2015/icon.js +0 -1012
  1554. package/fesm2015/icon.js.map +0 -1
  1555. package/fesm2015/input/testing.js +0 -318
  1556. package/fesm2015/input/testing.js.map +0 -1
  1557. package/fesm2015/input.js +0 -463
  1558. package/fesm2015/input.js.map +0 -1
  1559. package/fesm2015/list/testing.js +0 -529
  1560. package/fesm2015/list/testing.js.map +0 -1
  1561. package/fesm2015/list.js +0 -876
  1562. package/fesm2015/list.js.map +0 -1
  1563. package/fesm2015/material.js +0 -16
  1564. package/fesm2015/material.js.map +0 -1
  1565. package/fesm2015/menu/testing.js +0 -250
  1566. package/fesm2015/menu/testing.js.map +0 -1
  1567. package/fesm2015/menu.js +0 -1299
  1568. package/fesm2015/menu.js.map +0 -1
  1569. package/fesm2015/paginator/testing.js +0 -133
  1570. package/fesm2015/paginator/testing.js.map +0 -1
  1571. package/fesm2015/paginator.js +0 -366
  1572. package/fesm2015/paginator.js.map +0 -1
  1573. package/fesm2015/progress-bar/testing.js +0 -66
  1574. package/fesm2015/progress-bar/testing.js.map +0 -1
  1575. package/fesm2015/progress-bar.js +0 -211
  1576. package/fesm2015/progress-bar.js.map +0 -1
  1577. package/fesm2015/progress-spinner/testing.js +0 -67
  1578. package/fesm2015/progress-spinner/testing.js.map +0 -1
  1579. package/fesm2015/progress-spinner.js +0 -313
  1580. package/fesm2015/progress-spinner.js.map +0 -1
  1581. package/fesm2015/radio/testing.js +0 -299
  1582. package/fesm2015/radio/testing.js.map +0 -1
  1583. package/fesm2015/radio.js +0 -578
  1584. package/fesm2015/radio.js.map +0 -1
  1585. package/fesm2015/select/testing.js +0 -184
  1586. package/fesm2015/select/testing.js.map +0 -1
  1587. package/fesm2015/select.js +0 -1271
  1588. package/fesm2015/select.js.map +0 -1
  1589. package/fesm2015/sidenav/testing.js +0 -231
  1590. package/fesm2015/sidenav/testing.js.map +0 -1
  1591. package/fesm2015/sidenav.js +0 -965
  1592. package/fesm2015/sidenav.js.map +0 -1
  1593. package/fesm2015/slide-toggle/testing.js +0 -166
  1594. package/fesm2015/slide-toggle/testing.js.map +0 -1
  1595. package/fesm2015/slide-toggle.js +0 -329
  1596. package/fesm2015/slide-toggle.js.map +0 -1
  1597. package/fesm2015/slider/testing.js +0 -160
  1598. package/fesm2015/slider/testing.js.map +0 -1
  1599. package/fesm2015/slider.js +0 -820
  1600. package/fesm2015/slider.js.map +0 -1
  1601. package/fesm2015/snack-bar/testing.js +0 -168
  1602. package/fesm2015/snack-bar/testing.js.map +0 -1
  1603. package/fesm2015/snack-bar.js +0 -712
  1604. package/fesm2015/snack-bar.js.map +0 -1
  1605. package/fesm2015/sort/testing.js +0 -124
  1606. package/fesm2015/sort/testing.js.map +0 -1
  1607. package/fesm2015/sort.js +0 -587
  1608. package/fesm2015/sort.js.map +0 -1
  1609. package/fesm2015/stepper/testing.js +0 -237
  1610. package/fesm2015/stepper/testing.js.map +0 -1
  1611. package/fesm2015/stepper.js +0 -519
  1612. package/fesm2015/stepper.js.map +0 -1
  1613. package/fesm2015/table/testing.js +0 -280
  1614. package/fesm2015/table/testing.js.map +0 -1
  1615. package/fesm2015/table.js +0 -701
  1616. package/fesm2015/table.js.map +0 -1
  1617. package/fesm2015/tabs/testing.js +0 -273
  1618. package/fesm2015/tabs/testing.js.map +0 -1
  1619. package/fesm2015/tabs.js +0 -1761
  1620. package/fesm2015/tabs.js.map +0 -1
  1621. package/fesm2015/toolbar/testing.js +0 -74
  1622. package/fesm2015/toolbar/testing.js.map +0 -1
  1623. package/fesm2015/toolbar.js +0 -123
  1624. package/fesm2015/toolbar.js.map +0 -1
  1625. package/fesm2015/tooltip/testing.js +0 -95
  1626. package/fesm2015/tooltip/testing.js.map +0 -1
  1627. package/fesm2015/tooltip.js +0 -802
  1628. package/fesm2015/tooltip.js.map +0 -1
  1629. package/fesm2015/tree/testing.js +0 -237
  1630. package/fesm2015/tree/testing.js.map +0 -1
  1631. package/fesm2015/tree.js +0 -479
  1632. package/fesm2015/tree.js.map +0 -1
  1633. package/form-field/index.metadata.json +0 -1
  1634. package/grid-list/index.metadata.json +0 -1
  1635. package/icon/index.metadata.json +0 -1
  1636. package/icon/testing/index.metadata.json +0 -1
  1637. package/input/index.metadata.json +0 -1
  1638. package/list/index.metadata.json +0 -1
  1639. package/menu/index.metadata.json +0 -1
  1640. package/paginator/index.metadata.json +0 -1
  1641. package/progress-bar/index.metadata.json +0 -1
  1642. package/progress-spinner/index.metadata.json +0 -1
  1643. package/radio/index.metadata.json +0 -1
  1644. package/select/index.metadata.json +0 -1
  1645. package/sidenav/index.metadata.json +0 -1
  1646. package/slide-toggle/index.metadata.json +0 -1
  1647. package/slider/index.metadata.json +0 -1
  1648. package/snack-bar/index.metadata.json +0 -1
  1649. package/sort/index.metadata.json +0 -1
  1650. package/stepper/index.metadata.json +0 -1
  1651. package/table/index.metadata.json +0 -1
  1652. package/tabs/index.metadata.json +0 -1
  1653. package/toolbar/index.metadata.json +0 -1
  1654. package/tooltip/index.metadata.json +0 -1
  1655. package/tree/index.metadata.json +0 -1
@@ -1,4332 +0,0 @@
1
- (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/cdk/a11y'), require('@angular/cdk/overlay'), require('@angular/cdk/portal'), require('@angular/common'), require('@angular/core'), require('@angular/material/button'), require('@angular/cdk/scrolling'), require('@angular/material/core'), require('rxjs'), require('@angular/cdk/keycodes'), require('@angular/cdk/bidi'), require('rxjs/operators'), require('@angular/cdk/coercion'), require('@angular/cdk/platform'), require('@angular/animations'), require('@angular/forms'), require('@angular/material/form-field'), require('@angular/material/input')) :
3
- typeof define === 'function' && define.amd ? define('@angular/material/datepicker', ['exports', '@angular/cdk/a11y', '@angular/cdk/overlay', '@angular/cdk/portal', '@angular/common', '@angular/core', '@angular/material/button', '@angular/cdk/scrolling', '@angular/material/core', 'rxjs', '@angular/cdk/keycodes', '@angular/cdk/bidi', 'rxjs/operators', '@angular/cdk/coercion', '@angular/cdk/platform', '@angular/animations', '@angular/forms', '@angular/material/form-field', '@angular/material/input'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.ng = global.ng || {}, global.ng.material = global.ng.material || {}, global.ng.material.datepicker = {}), global.ng.cdk.a11y, global.ng.cdk.overlay, global.ng.cdk.portal, global.ng.common, global.ng.core, global.ng.material.button, global.ng.cdk.scrolling, global.ng.material.core, global.rxjs, global.ng.cdk.keycodes, global.ng.cdk.bidi, global.rxjs.operators, global.ng.cdk.coercion, global.ng.cdk.platform, global.ng.animations, global.ng.forms, global.ng.material.formField, global.ng.material.input));
5
- }(this, (function (exports, a11y, overlay, portal, common, i0, button, scrolling, core, rxjs, keycodes, bidi, operators, coercion, platform, animations, forms, formField, input) { 'use strict';
6
-
7
- function _interopNamespace(e) {
8
- if (e && e.__esModule) return e;
9
- var n = Object.create(null);
10
- if (e) {
11
- Object.keys(e).forEach(function (k) {
12
- if (k !== 'default') {
13
- var d = Object.getOwnPropertyDescriptor(e, k);
14
- Object.defineProperty(n, k, d.get ? d : {
15
- enumerable: true,
16
- get: function () {
17
- return e[k];
18
- }
19
- });
20
- }
21
- });
22
- }
23
- n['default'] = e;
24
- return Object.freeze(n);
25
- }
26
-
27
- var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
28
-
29
- /**
30
- * @license
31
- * Copyright Google LLC All Rights Reserved.
32
- *
33
- * Use of this source code is governed by an MIT-style license that can be
34
- * found in the LICENSE file at https://angular.io/license
35
- */
36
- /** @docs-private */
37
- function createMissingDateImplError(provider) {
38
- return Error("MatDatepicker: No provider found for " + provider + ". You must import one of the following " +
39
- "modules at your application root: MatNativeDateModule, MatMomentDateModule, or provide a " +
40
- "custom implementation.");
41
- }
42
-
43
- /**
44
- * @license
45
- * Copyright Google LLC All Rights Reserved.
46
- *
47
- * Use of this source code is governed by an MIT-style license that can be
48
- * found in the LICENSE file at https://angular.io/license
49
- */
50
- /** Datepicker data that requires internationalization. */
51
- var MatDatepickerIntl = /** @class */ (function () {
52
- function MatDatepickerIntl() {
53
- /**
54
- * Stream that emits whenever the labels here are changed. Use this to notify
55
- * components if the labels have changed after initialization.
56
- */
57
- this.changes = new rxjs.Subject();
58
- /** A label for the calendar popup (used by screen readers). */
59
- this.calendarLabel = 'Calendar';
60
- /** A label for the button used to open the calendar popup (used by screen readers). */
61
- this.openCalendarLabel = 'Open calendar';
62
- /** Label for the button used to close the calendar popup. */
63
- this.closeCalendarLabel = 'Close calendar';
64
- /** A label for the previous month button (used by screen readers). */
65
- this.prevMonthLabel = 'Previous month';
66
- /** A label for the next month button (used by screen readers). */
67
- this.nextMonthLabel = 'Next month';
68
- /** A label for the previous year button (used by screen readers). */
69
- this.prevYearLabel = 'Previous year';
70
- /** A label for the next year button (used by screen readers). */
71
- this.nextYearLabel = 'Next year';
72
- /** A label for the previous multi-year button (used by screen readers). */
73
- this.prevMultiYearLabel = 'Previous 24 years';
74
- /** A label for the next multi-year button (used by screen readers). */
75
- this.nextMultiYearLabel = 'Next 24 years';
76
- /** A label for the 'switch to month view' button (used by screen readers). */
77
- this.switchToMonthViewLabel = 'Choose date';
78
- /** A label for the 'switch to year view' button (used by screen readers). */
79
- this.switchToMultiYearViewLabel = 'Choose month and year';
80
- }
81
- /** Formats a range of years. */
82
- MatDatepickerIntl.prototype.formatYearRange = function (start, end) {
83
- return start + " \u2013 " + end;
84
- };
85
- return MatDatepickerIntl;
86
- }());
87
- MatDatepickerIntl.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function MatDatepickerIntl_Factory() { return new MatDatepickerIntl(); }, token: MatDatepickerIntl, providedIn: "root" });
88
- MatDatepickerIntl.decorators = [
89
- { type: i0.Injectable, args: [{ providedIn: 'root' },] }
90
- ];
91
-
92
- /**
93
- * @license
94
- * Copyright Google LLC All Rights Reserved.
95
- *
96
- * Use of this source code is governed by an MIT-style license that can be
97
- * found in the LICENSE file at https://angular.io/license
98
- */
99
- /**
100
- * An internal class that represents the data corresponding to a single calendar cell.
101
- * @docs-private
102
- */
103
- var MatCalendarCell = /** @class */ (function () {
104
- function MatCalendarCell(value, displayValue, ariaLabel, enabled, cssClasses, compareValue, rawValue) {
105
- if (cssClasses === void 0) { cssClasses = {}; }
106
- if (compareValue === void 0) { compareValue = value; }
107
- this.value = value;
108
- this.displayValue = displayValue;
109
- this.ariaLabel = ariaLabel;
110
- this.enabled = enabled;
111
- this.cssClasses = cssClasses;
112
- this.compareValue = compareValue;
113
- this.rawValue = rawValue;
114
- }
115
- return MatCalendarCell;
116
- }());
117
- /**
118
- * An internal component used to display calendar data in a table.
119
- * @docs-private
120
- */
121
- var MatCalendarBody = /** @class */ (function () {
122
- function MatCalendarBody(_elementRef, _ngZone) {
123
- var _this = this;
124
- this._elementRef = _elementRef;
125
- this._ngZone = _ngZone;
126
- /** The number of columns in the table. */
127
- this.numCols = 7;
128
- /** The cell number of the active cell in the table. */
129
- this.activeCell = 0;
130
- /** Whether a range is being selected. */
131
- this.isRange = false;
132
- /**
133
- * The aspect ratio (width / height) to use for the cells in the table. This aspect ratio will be
134
- * maintained even as the table resizes.
135
- */
136
- this.cellAspectRatio = 1;
137
- /** Start of the preview range. */
138
- this.previewStart = null;
139
- /** End of the preview range. */
140
- this.previewEnd = null;
141
- /** Emits when a new value is selected. */
142
- this.selectedValueChange = new i0.EventEmitter();
143
- /** Emits when the preview has changed as a result of a user action. */
144
- this.previewChange = new i0.EventEmitter();
145
- /**
146
- * Event handler for when the user enters an element
147
- * inside the calendar body (e.g. by hovering in or focus).
148
- */
149
- this._enterHandler = function (event) {
150
- if (_this._skipNextFocus && event.type === 'focus') {
151
- _this._skipNextFocus = false;
152
- return;
153
- }
154
- // We only need to hit the zone when we're selecting a range.
155
- if (event.target && _this.isRange) {
156
- var cell_1 = _this._getCellFromElement(event.target);
157
- if (cell_1) {
158
- _this._ngZone.run(function () { return _this.previewChange.emit({ value: cell_1.enabled ? cell_1 : null, event: event }); });
159
- }
160
- }
161
- };
162
- /**
163
- * Event handler for when the user's pointer leaves an element
164
- * inside the calendar body (e.g. by hovering out or blurring).
165
- */
166
- this._leaveHandler = function (event) {
167
- // We only need to hit the zone when we're selecting a range.
168
- if (_this.previewEnd !== null && _this.isRange) {
169
- // Only reset the preview end value when leaving cells. This looks better, because
170
- // we have a gap between the cells and the rows and we don't want to remove the
171
- // range just for it to show up again when the user moves a few pixels to the side.
172
- if (event.target && isTableCell(event.target)) {
173
- _this._ngZone.run(function () { return _this.previewChange.emit({ value: null, event: event }); });
174
- }
175
- }
176
- };
177
- _ngZone.runOutsideAngular(function () {
178
- var element = _elementRef.nativeElement;
179
- element.addEventListener('mouseenter', _this._enterHandler, true);
180
- element.addEventListener('focus', _this._enterHandler, true);
181
- element.addEventListener('mouseleave', _this._leaveHandler, true);
182
- element.addEventListener('blur', _this._leaveHandler, true);
183
- });
184
- }
185
- /** Called when a cell is clicked. */
186
- MatCalendarBody.prototype._cellClicked = function (cell, event) {
187
- if (cell.enabled) {
188
- this.selectedValueChange.emit({ value: cell.value, event: event });
189
- }
190
- };
191
- /** Returns whether a cell should be marked as selected. */
192
- MatCalendarBody.prototype._isSelected = function (value) {
193
- return this.startValue === value || this.endValue === value;
194
- };
195
- MatCalendarBody.prototype.ngOnChanges = function (changes) {
196
- var columnChanges = changes['numCols'];
197
- var _a = this, rows = _a.rows, numCols = _a.numCols;
198
- if (changes['rows'] || columnChanges) {
199
- this._firstRowOffset = rows && rows.length && rows[0].length ? numCols - rows[0].length : 0;
200
- }
201
- if (changes['cellAspectRatio'] || columnChanges || !this._cellPadding) {
202
- this._cellPadding = 50 * this.cellAspectRatio / numCols + "%";
203
- }
204
- if (columnChanges || !this._cellWidth) {
205
- this._cellWidth = 100 / numCols + "%";
206
- }
207
- };
208
- MatCalendarBody.prototype.ngOnDestroy = function () {
209
- var element = this._elementRef.nativeElement;
210
- element.removeEventListener('mouseenter', this._enterHandler, true);
211
- element.removeEventListener('focus', this._enterHandler, true);
212
- element.removeEventListener('mouseleave', this._leaveHandler, true);
213
- element.removeEventListener('blur', this._leaveHandler, true);
214
- };
215
- /** Returns whether a cell is active. */
216
- MatCalendarBody.prototype._isActiveCell = function (rowIndex, colIndex) {
217
- var cellNumber = rowIndex * this.numCols + colIndex;
218
- // Account for the fact that the first row may not have as many cells.
219
- if (rowIndex) {
220
- cellNumber -= this._firstRowOffset;
221
- }
222
- return cellNumber == this.activeCell;
223
- };
224
- /** Focuses the active cell after the microtask queue is empty. */
225
- MatCalendarBody.prototype._focusActiveCell = function (movePreview) {
226
- var _this = this;
227
- if (movePreview === void 0) { movePreview = true; }
228
- this._ngZone.runOutsideAngular(function () {
229
- _this._ngZone.onStable.pipe(operators.take(1)).subscribe(function () {
230
- var activeCell = _this._elementRef.nativeElement.querySelector('.mat-calendar-body-active');
231
- if (activeCell) {
232
- if (!movePreview) {
233
- _this._skipNextFocus = true;
234
- }
235
- activeCell.focus();
236
- }
237
- });
238
- });
239
- };
240
- /** Gets whether a value is the start of the main range. */
241
- MatCalendarBody.prototype._isRangeStart = function (value) {
242
- return isStart(value, this.startValue, this.endValue);
243
- };
244
- /** Gets whether a value is the end of the main range. */
245
- MatCalendarBody.prototype._isRangeEnd = function (value) {
246
- return isEnd(value, this.startValue, this.endValue);
247
- };
248
- /** Gets whether a value is within the currently-selected range. */
249
- MatCalendarBody.prototype._isInRange = function (value) {
250
- return isInRange(value, this.startValue, this.endValue, this.isRange);
251
- };
252
- /** Gets whether a value is the start of the comparison range. */
253
- MatCalendarBody.prototype._isComparisonStart = function (value) {
254
- return isStart(value, this.comparisonStart, this.comparisonEnd);
255
- };
256
- /** Whether the cell is a start bridge cell between the main and comparison ranges. */
257
- MatCalendarBody.prototype._isComparisonBridgeStart = function (value, rowIndex, colIndex) {
258
- if (!this._isComparisonStart(value) || this._isRangeStart(value) || !this._isInRange(value)) {
259
- return false;
260
- }
261
- var previousCell = this.rows[rowIndex][colIndex - 1];
262
- if (!previousCell) {
263
- var previousRow = this.rows[rowIndex - 1];
264
- previousCell = previousRow && previousRow[previousRow.length - 1];
265
- }
266
- return previousCell && !this._isRangeEnd(previousCell.compareValue);
267
- };
268
- /** Whether the cell is an end bridge cell between the main and comparison ranges. */
269
- MatCalendarBody.prototype._isComparisonBridgeEnd = function (value, rowIndex, colIndex) {
270
- if (!this._isComparisonEnd(value) || this._isRangeEnd(value) || !this._isInRange(value)) {
271
- return false;
272
- }
273
- var nextCell = this.rows[rowIndex][colIndex + 1];
274
- if (!nextCell) {
275
- var nextRow = this.rows[rowIndex + 1];
276
- nextCell = nextRow && nextRow[0];
277
- }
278
- return nextCell && !this._isRangeStart(nextCell.compareValue);
279
- };
280
- /** Gets whether a value is the end of the comparison range. */
281
- MatCalendarBody.prototype._isComparisonEnd = function (value) {
282
- return isEnd(value, this.comparisonStart, this.comparisonEnd);
283
- };
284
- /** Gets whether a value is within the current comparison range. */
285
- MatCalendarBody.prototype._isInComparisonRange = function (value) {
286
- return isInRange(value, this.comparisonStart, this.comparisonEnd, this.isRange);
287
- };
288
- /**
289
- * Gets whether a value is the same as the start and end of the comparison range.
290
- * For context, the functions that we use to determine whether something is the start/end of
291
- * a range don't allow for the start and end to be on the same day, because we'd have to use
292
- * much more specific CSS selectors to style them correctly in all scenarios. This is fine for
293
- * the regular range, because when it happens, the selected styles take over and still show where
294
- * the range would've been, however we don't have these selected styles for a comparison range.
295
- * This function is used to apply a class that serves the same purpose as the one for selected
296
- * dates, but it only applies in the context of a comparison range.
297
- */
298
- MatCalendarBody.prototype._isComparisonIdentical = function (value) {
299
- // Note that we don't need to null check the start/end
300
- // here, because the `value` will always be defined.
301
- return this.comparisonStart === this.comparisonEnd && value === this.comparisonStart;
302
- };
303
- /** Gets whether a value is the start of the preview range. */
304
- MatCalendarBody.prototype._isPreviewStart = function (value) {
305
- return isStart(value, this.previewStart, this.previewEnd);
306
- };
307
- /** Gets whether a value is the end of the preview range. */
308
- MatCalendarBody.prototype._isPreviewEnd = function (value) {
309
- return isEnd(value, this.previewStart, this.previewEnd);
310
- };
311
- /** Gets whether a value is inside the preview range. */
312
- MatCalendarBody.prototype._isInPreview = function (value) {
313
- return isInRange(value, this.previewStart, this.previewEnd, this.isRange);
314
- };
315
- /** Finds the MatCalendarCell that corresponds to a DOM node. */
316
- MatCalendarBody.prototype._getCellFromElement = function (element) {
317
- var cell;
318
- if (isTableCell(element)) {
319
- cell = element;
320
- }
321
- else if (isTableCell(element.parentNode)) {
322
- cell = element.parentNode;
323
- }
324
- if (cell) {
325
- var row = cell.getAttribute('data-mat-row');
326
- var col = cell.getAttribute('data-mat-col');
327
- if (row && col) {
328
- return this.rows[parseInt(row)][parseInt(col)];
329
- }
330
- }
331
- return null;
332
- };
333
- return MatCalendarBody;
334
- }());
335
- MatCalendarBody.decorators = [
336
- { type: i0.Component, args: [{
337
- selector: '[mat-calendar-body]',
338
- template: "<!--\n If there's not enough space in the first row, create a separate label row. We mark this row as\n aria-hidden because we don't want it to be read out as one of the weeks in the month.\n-->\n<tr *ngIf=\"_firstRowOffset < labelMinRequiredCells\" aria-hidden=\"true\">\n <td class=\"mat-calendar-body-label\"\n [attr.colspan]=\"numCols\"\n [style.paddingTop]=\"_cellPadding\"\n [style.paddingBottom]=\"_cellPadding\">\n {{label}}\n </td>\n</tr>\n\n<!-- Create the first row separately so we can include a special spacer cell. -->\n<tr *ngFor=\"let row of rows; let rowIndex = index\" role=\"row\">\n <!--\n This cell is purely decorative, but we can't put `aria-hidden` or `role=\"presentation\"` on it,\n because it throws off the week days for the rest of the row on NVDA. The aspect ratio of the\n table cells is maintained by setting the top and bottom padding as a percentage of the width\n (a variant of the trick described here: https://www.w3schools.com/howto/howto_css_aspect_ratio.asp).\n -->\n <td *ngIf=\"rowIndex === 0 && _firstRowOffset\"\n class=\"mat-calendar-body-label\"\n [attr.colspan]=\"_firstRowOffset\"\n [style.paddingTop]=\"_cellPadding\"\n [style.paddingBottom]=\"_cellPadding\">\n {{_firstRowOffset >= labelMinRequiredCells ? label : ''}}\n </td>\n <td *ngFor=\"let item of row; let colIndex = index\"\n role=\"gridcell\"\n class=\"mat-calendar-body-cell\"\n [ngClass]=\"item.cssClasses\"\n [tabindex]=\"_isActiveCell(rowIndex, colIndex) ? 0 : -1\"\n [attr.data-mat-row]=\"rowIndex\"\n [attr.data-mat-col]=\"colIndex\"\n [class.mat-calendar-body-disabled]=\"!item.enabled\"\n [class.mat-calendar-body-active]=\"_isActiveCell(rowIndex, colIndex)\"\n [class.mat-calendar-body-range-start]=\"_isRangeStart(item.compareValue)\"\n [class.mat-calendar-body-range-end]=\"_isRangeEnd(item.compareValue)\"\n [class.mat-calendar-body-in-range]=\"_isInRange(item.compareValue)\"\n [class.mat-calendar-body-comparison-bridge-start]=\"_isComparisonBridgeStart(item.compareValue, rowIndex, colIndex)\"\n [class.mat-calendar-body-comparison-bridge-end]=\"_isComparisonBridgeEnd(item.compareValue, rowIndex, colIndex)\"\n [class.mat-calendar-body-comparison-start]=\"_isComparisonStart(item.compareValue)\"\n [class.mat-calendar-body-comparison-end]=\"_isComparisonEnd(item.compareValue)\"\n [class.mat-calendar-body-in-comparison-range]=\"_isInComparisonRange(item.compareValue)\"\n [class.mat-calendar-body-preview-start]=\"_isPreviewStart(item.compareValue)\"\n [class.mat-calendar-body-preview-end]=\"_isPreviewEnd(item.compareValue)\"\n [class.mat-calendar-body-in-preview]=\"_isInPreview(item.compareValue)\"\n [attr.aria-label]=\"item.ariaLabel\"\n [attr.aria-disabled]=\"!item.enabled || null\"\n [attr.aria-selected]=\"_isSelected(item.compareValue)\"\n (click)=\"_cellClicked(item, $event)\"\n [style.width]=\"_cellWidth\"\n [style.paddingTop]=\"_cellPadding\"\n [style.paddingBottom]=\"_cellPadding\">\n <div class=\"mat-calendar-body-cell-content mat-focus-indicator\"\n [class.mat-calendar-body-selected]=\"_isSelected(item.compareValue)\"\n [class.mat-calendar-body-comparison-identical]=\"_isComparisonIdentical(item.compareValue)\"\n [class.mat-calendar-body-today]=\"todayValue === item.compareValue\">\n {{item.displayValue}}\n </div>\n <div class=\"mat-calendar-body-cell-preview\"></div>\n </td>\n</tr>\n",
339
- host: {
340
- 'class': 'mat-calendar-body',
341
- },
342
- exportAs: 'matCalendarBody',
343
- encapsulation: i0.ViewEncapsulation.None,
344
- changeDetection: i0.ChangeDetectionStrategy.OnPush,
345
- styles: [".mat-calendar-body{min-width:224px}.mat-calendar-body-label{height:0;line-height:0;text-align:left;padding-left:4.7142857143%;padding-right:4.7142857143%}.mat-calendar-body-cell{position:relative;height:0;line-height:0;text-align:center;outline:none;cursor:pointer}.mat-calendar-body-cell::before,.mat-calendar-body-cell::after,.mat-calendar-body-cell-preview{content:\"\";position:absolute;top:5%;left:0;z-index:0;box-sizing:border-box;height:90%;width:100%}.mat-calendar-body-range-start:not(.mat-calendar-body-in-comparison-range)::before,.mat-calendar-body-range-start::after,.mat-calendar-body-comparison-start:not(.mat-calendar-body-comparison-bridge-start)::before,.mat-calendar-body-comparison-start::after,.mat-calendar-body-preview-start .mat-calendar-body-cell-preview{left:5%;width:95%;border-top-left-radius:999px;border-bottom-left-radius:999px}[dir=rtl] .mat-calendar-body-range-start:not(.mat-calendar-body-in-comparison-range)::before,[dir=rtl] .mat-calendar-body-range-start::after,[dir=rtl] .mat-calendar-body-comparison-start:not(.mat-calendar-body-comparison-bridge-start)::before,[dir=rtl] .mat-calendar-body-comparison-start::after,[dir=rtl] .mat-calendar-body-preview-start .mat-calendar-body-cell-preview{left:0;border-radius:0;border-top-right-radius:999px;border-bottom-right-radius:999px}.mat-calendar-body-range-end:not(.mat-calendar-body-in-comparison-range)::before,.mat-calendar-body-range-end::after,.mat-calendar-body-comparison-end:not(.mat-calendar-body-comparison-bridge-end)::before,.mat-calendar-body-comparison-end::after,.mat-calendar-body-preview-end .mat-calendar-body-cell-preview{width:95%;border-top-right-radius:999px;border-bottom-right-radius:999px}[dir=rtl] .mat-calendar-body-range-end:not(.mat-calendar-body-in-comparison-range)::before,[dir=rtl] .mat-calendar-body-range-end::after,[dir=rtl] .mat-calendar-body-comparison-end:not(.mat-calendar-body-comparison-bridge-end)::before,[dir=rtl] .mat-calendar-body-comparison-end::after,[dir=rtl] .mat-calendar-body-preview-end .mat-calendar-body-cell-preview{left:5%;border-radius:0;border-top-left-radius:999px;border-bottom-left-radius:999px}[dir=rtl] .mat-calendar-body-comparison-bridge-start.mat-calendar-body-range-end::after,[dir=rtl] .mat-calendar-body-comparison-bridge-end.mat-calendar-body-range-start::after{width:95%;border-top-right-radius:999px;border-bottom-right-radius:999px}.mat-calendar-body-comparison-start.mat-calendar-body-range-end::after,[dir=rtl] .mat-calendar-body-comparison-start.mat-calendar-body-range-end::after,.mat-calendar-body-comparison-end.mat-calendar-body-range-start::after,[dir=rtl] .mat-calendar-body-comparison-end.mat-calendar-body-range-start::after{width:90%}.mat-calendar-body-in-preview .mat-calendar-body-cell-preview{border-top:dashed 1px;border-bottom:dashed 1px}.mat-calendar-body-preview-start .mat-calendar-body-cell-preview{border-left:dashed 1px}[dir=rtl] .mat-calendar-body-preview-start .mat-calendar-body-cell-preview{border-left:0;border-right:dashed 1px}.mat-calendar-body-preview-end .mat-calendar-body-cell-preview{border-right:dashed 1px}[dir=rtl] .mat-calendar-body-preview-end .mat-calendar-body-cell-preview{border-right:0;border-left:dashed 1px}.mat-calendar-body-disabled{cursor:default}.cdk-high-contrast-active .mat-calendar-body-disabled{opacity:.5}.mat-calendar-body-cell-content{top:5%;left:5%;z-index:1;display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:90%;height:90%;line-height:1;border-width:1px;border-style:solid;border-radius:999px}.mat-calendar-body-cell-content.mat-focus-indicator{position:absolute}.cdk-high-contrast-active .mat-calendar-body-cell-content{border:none}.cdk-high-contrast-active .mat-datepicker-popup:not(:empty),.cdk-high-contrast-active .mat-calendar-body-cell:not(.mat-calendar-body-in-range) .mat-calendar-body-selected{outline:solid 1px}.cdk-high-contrast-active .mat-calendar-body-today{outline:dotted 1px}.cdk-high-contrast-active .cdk-keyboard-focused .mat-calendar-body-active>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected),.cdk-high-contrast-active .cdk-program-focused .mat-calendar-body-active>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected){outline:dotted 2px}.cdk-high-contrast-active .mat-calendar-body-cell::before,.cdk-high-contrast-active .mat-calendar-body-cell::after,.cdk-high-contrast-active .mat-calendar-body-selected{background:none}.cdk-high-contrast-active .mat-calendar-body-in-range::before,.cdk-high-contrast-active .mat-calendar-body-comparison-bridge-start::before,.cdk-high-contrast-active .mat-calendar-body-comparison-bridge-end::before{border-top:solid 1px;border-bottom:solid 1px}.cdk-high-contrast-active .mat-calendar-body-range-start::before{border-left:solid 1px}[dir=rtl] .cdk-high-contrast-active .mat-calendar-body-range-start::before{border-left:0;border-right:solid 1px}.cdk-high-contrast-active .mat-calendar-body-range-end::before{border-right:solid 1px}[dir=rtl] .cdk-high-contrast-active .mat-calendar-body-range-end::before{border-right:0;border-left:solid 1px}.cdk-high-contrast-active .mat-calendar-body-in-comparison-range::before{border-top:dashed 1px;border-bottom:dashed 1px}.cdk-high-contrast-active .mat-calendar-body-comparison-start::before{border-left:dashed 1px}[dir=rtl] .cdk-high-contrast-active .mat-calendar-body-comparison-start::before{border-left:0;border-right:dashed 1px}.cdk-high-contrast-active .mat-calendar-body-comparison-end::before{border-right:dashed 1px}[dir=rtl] .cdk-high-contrast-active .mat-calendar-body-comparison-end::before{border-right:0;border-left:dashed 1px}[dir=rtl] .mat-calendar-body-label{text-align:right}@media(hover: none){.mat-calendar-body-cell:not(.mat-calendar-body-disabled):hover>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected){background-color:transparent}}\n"]
346
- },] }
347
- ];
348
- MatCalendarBody.ctorParameters = function () { return [
349
- { type: i0.ElementRef },
350
- { type: i0.NgZone }
351
- ]; };
352
- MatCalendarBody.propDecorators = {
353
- label: [{ type: i0.Input }],
354
- rows: [{ type: i0.Input }],
355
- todayValue: [{ type: i0.Input }],
356
- startValue: [{ type: i0.Input }],
357
- endValue: [{ type: i0.Input }],
358
- labelMinRequiredCells: [{ type: i0.Input }],
359
- numCols: [{ type: i0.Input }],
360
- activeCell: [{ type: i0.Input }],
361
- isRange: [{ type: i0.Input }],
362
- cellAspectRatio: [{ type: i0.Input }],
363
- comparisonStart: [{ type: i0.Input }],
364
- comparisonEnd: [{ type: i0.Input }],
365
- previewStart: [{ type: i0.Input }],
366
- previewEnd: [{ type: i0.Input }],
367
- selectedValueChange: [{ type: i0.Output }],
368
- previewChange: [{ type: i0.Output }]
369
- };
370
- /** Checks whether a node is a table cell element. */
371
- function isTableCell(node) {
372
- return node.nodeName === 'TD';
373
- }
374
- /** Checks whether a value is the start of a range. */
375
- function isStart(value, start, end) {
376
- return end !== null && start !== end && value < end && value === start;
377
- }
378
- /** Checks whether a value is the end of a range. */
379
- function isEnd(value, start, end) {
380
- return start !== null && start !== end && value >= start && value === end;
381
- }
382
- /** Checks whether a value is inside of a range. */
383
- function isInRange(value, start, end, rangeEnabled) {
384
- return rangeEnabled && start !== null && end !== null && start !== end &&
385
- value >= start && value <= end;
386
- }
387
-
388
- /*! *****************************************************************************
389
- Copyright (c) Microsoft Corporation.
390
-
391
- Permission to use, copy, modify, and/or distribute this software for any
392
- purpose with or without fee is hereby granted.
393
-
394
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
395
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
396
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
397
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
398
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
399
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
400
- PERFORMANCE OF THIS SOFTWARE.
401
- ***************************************************************************** */
402
- /* global Reflect, Promise */
403
- var extendStatics = function (d, b) {
404
- extendStatics = Object.setPrototypeOf ||
405
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
406
- function (d, b) { for (var p in b)
407
- if (Object.prototype.hasOwnProperty.call(b, p))
408
- d[p] = b[p]; };
409
- return extendStatics(d, b);
410
- };
411
- function __extends(d, b) {
412
- if (typeof b !== "function" && b !== null)
413
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
414
- extendStatics(d, b);
415
- function __() { this.constructor = d; }
416
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
417
- }
418
- var __assign = function () {
419
- __assign = Object.assign || function __assign(t) {
420
- for (var s, i = 1, n = arguments.length; i < n; i++) {
421
- s = arguments[i];
422
- for (var p in s)
423
- if (Object.prototype.hasOwnProperty.call(s, p))
424
- t[p] = s[p];
425
- }
426
- return t;
427
- };
428
- return __assign.apply(this, arguments);
429
- };
430
- function __rest(s, e) {
431
- var t = {};
432
- for (var p in s)
433
- if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
434
- t[p] = s[p];
435
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
436
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
437
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
438
- t[p[i]] = s[p[i]];
439
- }
440
- return t;
441
- }
442
- function __decorate(decorators, target, key, desc) {
443
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
444
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
445
- r = Reflect.decorate(decorators, target, key, desc);
446
- else
447
- for (var i = decorators.length - 1; i >= 0; i--)
448
- if (d = decorators[i])
449
- r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
450
- return c > 3 && r && Object.defineProperty(target, key, r), r;
451
- }
452
- function __param(paramIndex, decorator) {
453
- return function (target, key) { decorator(target, key, paramIndex); };
454
- }
455
- function __metadata(metadataKey, metadataValue) {
456
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
457
- return Reflect.metadata(metadataKey, metadataValue);
458
- }
459
- function __awaiter(thisArg, _arguments, P, generator) {
460
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
461
- return new (P || (P = Promise))(function (resolve, reject) {
462
- function fulfilled(value) { try {
463
- step(generator.next(value));
464
- }
465
- catch (e) {
466
- reject(e);
467
- } }
468
- function rejected(value) { try {
469
- step(generator["throw"](value));
470
- }
471
- catch (e) {
472
- reject(e);
473
- } }
474
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
475
- step((generator = generator.apply(thisArg, _arguments || [])).next());
476
- });
477
- }
478
- function __generator(thisArg, body) {
479
- var _ = { label: 0, sent: function () { if (t[0] & 1)
480
- throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
481
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
482
- function verb(n) { return function (v) { return step([n, v]); }; }
483
- function step(op) {
484
- if (f)
485
- throw new TypeError("Generator is already executing.");
486
- while (_)
487
- try {
488
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
489
- return t;
490
- if (y = 0, t)
491
- op = [op[0] & 2, t.value];
492
- switch (op[0]) {
493
- case 0:
494
- case 1:
495
- t = op;
496
- break;
497
- case 4:
498
- _.label++;
499
- return { value: op[1], done: false };
500
- case 5:
501
- _.label++;
502
- y = op[1];
503
- op = [0];
504
- continue;
505
- case 7:
506
- op = _.ops.pop();
507
- _.trys.pop();
508
- continue;
509
- default:
510
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
511
- _ = 0;
512
- continue;
513
- }
514
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
515
- _.label = op[1];
516
- break;
517
- }
518
- if (op[0] === 6 && _.label < t[1]) {
519
- _.label = t[1];
520
- t = op;
521
- break;
522
- }
523
- if (t && _.label < t[2]) {
524
- _.label = t[2];
525
- _.ops.push(op);
526
- break;
527
- }
528
- if (t[2])
529
- _.ops.pop();
530
- _.trys.pop();
531
- continue;
532
- }
533
- op = body.call(thisArg, _);
534
- }
535
- catch (e) {
536
- op = [6, e];
537
- y = 0;
538
- }
539
- finally {
540
- f = t = 0;
541
- }
542
- if (op[0] & 5)
543
- throw op[1];
544
- return { value: op[0] ? op[1] : void 0, done: true };
545
- }
546
- }
547
- var __createBinding = Object.create ? (function (o, m, k, k2) {
548
- if (k2 === undefined)
549
- k2 = k;
550
- Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
551
- }) : (function (o, m, k, k2) {
552
- if (k2 === undefined)
553
- k2 = k;
554
- o[k2] = m[k];
555
- });
556
- function __exportStar(m, o) {
557
- for (var p in m)
558
- if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
559
- __createBinding(o, m, p);
560
- }
561
- function __values(o) {
562
- var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
563
- if (m)
564
- return m.call(o);
565
- if (o && typeof o.length === "number")
566
- return {
567
- next: function () {
568
- if (o && i >= o.length)
569
- o = void 0;
570
- return { value: o && o[i++], done: !o };
571
- }
572
- };
573
- throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
574
- }
575
- function __read(o, n) {
576
- var m = typeof Symbol === "function" && o[Symbol.iterator];
577
- if (!m)
578
- return o;
579
- var i = m.call(o), r, ar = [], e;
580
- try {
581
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
582
- ar.push(r.value);
583
- }
584
- catch (error) {
585
- e = { error: error };
586
- }
587
- finally {
588
- try {
589
- if (r && !r.done && (m = i["return"]))
590
- m.call(i);
591
- }
592
- finally {
593
- if (e)
594
- throw e.error;
595
- }
596
- }
597
- return ar;
598
- }
599
- /** @deprecated */
600
- function __spread() {
601
- for (var ar = [], i = 0; i < arguments.length; i++)
602
- ar = ar.concat(__read(arguments[i]));
603
- return ar;
604
- }
605
- /** @deprecated */
606
- function __spreadArrays() {
607
- for (var s = 0, i = 0, il = arguments.length; i < il; i++)
608
- s += arguments[i].length;
609
- for (var r = Array(s), k = 0, i = 0; i < il; i++)
610
- for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
611
- r[k] = a[j];
612
- return r;
613
- }
614
- function __spreadArray(to, from, pack) {
615
- if (pack || arguments.length === 2)
616
- for (var i = 0, l = from.length, ar; i < l; i++) {
617
- if (ar || !(i in from)) {
618
- if (!ar)
619
- ar = Array.prototype.slice.call(from, 0, i);
620
- ar[i] = from[i];
621
- }
622
- }
623
- return to.concat(ar || Array.prototype.slice.call(from));
624
- }
625
- function __await(v) {
626
- return this instanceof __await ? (this.v = v, this) : new __await(v);
627
- }
628
- function __asyncGenerator(thisArg, _arguments, generator) {
629
- if (!Symbol.asyncIterator)
630
- throw new TypeError("Symbol.asyncIterator is not defined.");
631
- var g = generator.apply(thisArg, _arguments || []), i, q = [];
632
- return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
633
- function verb(n) { if (g[n])
634
- i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
635
- function resume(n, v) { try {
636
- step(g[n](v));
637
- }
638
- catch (e) {
639
- settle(q[0][3], e);
640
- } }
641
- function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
642
- function fulfill(value) { resume("next", value); }
643
- function reject(value) { resume("throw", value); }
644
- function settle(f, v) { if (f(v), q.shift(), q.length)
645
- resume(q[0][0], q[0][1]); }
646
- }
647
- function __asyncDelegator(o) {
648
- var i, p;
649
- return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
650
- function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
651
- }
652
- function __asyncValues(o) {
653
- if (!Symbol.asyncIterator)
654
- throw new TypeError("Symbol.asyncIterator is not defined.");
655
- var m = o[Symbol.asyncIterator], i;
656
- return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
657
- function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
658
- function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
659
- }
660
- function __makeTemplateObject(cooked, raw) {
661
- if (Object.defineProperty) {
662
- Object.defineProperty(cooked, "raw", { value: raw });
663
- }
664
- else {
665
- cooked.raw = raw;
666
- }
667
- return cooked;
668
- }
669
- ;
670
- var __setModuleDefault = Object.create ? (function (o, v) {
671
- Object.defineProperty(o, "default", { enumerable: true, value: v });
672
- }) : function (o, v) {
673
- o["default"] = v;
674
- };
675
- function __importStar(mod) {
676
- if (mod && mod.__esModule)
677
- return mod;
678
- var result = {};
679
- if (mod != null)
680
- for (var k in mod)
681
- if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
682
- __createBinding(result, mod, k);
683
- __setModuleDefault(result, mod);
684
- return result;
685
- }
686
- function __importDefault(mod) {
687
- return (mod && mod.__esModule) ? mod : { default: mod };
688
- }
689
- function __classPrivateFieldGet(receiver, state, kind, f) {
690
- if (kind === "a" && !f)
691
- throw new TypeError("Private accessor was defined without a getter");
692
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
693
- throw new TypeError("Cannot read private member from an object whose class did not declare it");
694
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
695
- }
696
- function __classPrivateFieldSet(receiver, state, value, kind, f) {
697
- if (kind === "m")
698
- throw new TypeError("Private method is not writable");
699
- if (kind === "a" && !f)
700
- throw new TypeError("Private accessor was defined without a setter");
701
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
702
- throw new TypeError("Cannot write private member to an object whose class did not declare it");
703
- return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
704
- }
705
-
706
- /** A class representing a range of dates. */
707
- var DateRange = /** @class */ (function () {
708
- function DateRange(
709
- /** The start date of the range. */
710
- start,
711
- /** The end date of the range. */
712
- end) {
713
- this.start = start;
714
- this.end = end;
715
- }
716
- return DateRange;
717
- }());
718
- /**
719
- * A selection model containing a date selection.
720
- * @docs-private
721
- */
722
- var MatDateSelectionModel = /** @class */ (function () {
723
- function MatDateSelectionModel(
724
- /** The current selection. */
725
- selection, _adapter) {
726
- this.selection = selection;
727
- this._adapter = _adapter;
728
- this._selectionChanged = new rxjs.Subject();
729
- /** Emits when the selection has changed. */
730
- this.selectionChanged = this._selectionChanged;
731
- this.selection = selection;
732
- }
733
- /**
734
- * Updates the current selection in the model.
735
- * @param value New selection that should be assigned.
736
- * @param source Object that triggered the selection change.
737
- */
738
- MatDateSelectionModel.prototype.updateSelection = function (value, source) {
739
- var oldValue = this.selection;
740
- this.selection = value;
741
- this._selectionChanged.next({ selection: value, source: source, oldValue: oldValue });
742
- };
743
- MatDateSelectionModel.prototype.ngOnDestroy = function () {
744
- this._selectionChanged.complete();
745
- };
746
- MatDateSelectionModel.prototype._isValidDateInstance = function (date) {
747
- return this._adapter.isDateInstance(date) && this._adapter.isValid(date);
748
- };
749
- return MatDateSelectionModel;
750
- }());
751
- MatDateSelectionModel.decorators = [
752
- { type: i0.Injectable }
753
- ];
754
- MatDateSelectionModel.ctorParameters = function () { return [
755
- { type: undefined },
756
- { type: core.DateAdapter }
757
- ]; };
758
- /**
759
- * A selection model that contains a single date.
760
- * @docs-private
761
- */
762
- var MatSingleDateSelectionModel = /** @class */ (function (_super) {
763
- __extends(MatSingleDateSelectionModel, _super);
764
- function MatSingleDateSelectionModel(adapter) {
765
- return _super.call(this, null, adapter) || this;
766
- }
767
- /**
768
- * Adds a date to the current selection. In the case of a single date selection, the added date
769
- * simply overwrites the previous selection
770
- */
771
- MatSingleDateSelectionModel.prototype.add = function (date) {
772
- _super.prototype.updateSelection.call(this, date, this);
773
- };
774
- /** Checks whether the current selection is valid. */
775
- MatSingleDateSelectionModel.prototype.isValid = function () {
776
- return this.selection != null && this._isValidDateInstance(this.selection);
777
- };
778
- /**
779
- * Checks whether the current selection is complete. In the case of a single date selection, this
780
- * is true if the current selection is not null.
781
- */
782
- MatSingleDateSelectionModel.prototype.isComplete = function () {
783
- return this.selection != null;
784
- };
785
- /** Clones the selection model. */
786
- MatSingleDateSelectionModel.prototype.clone = function () {
787
- var clone = new MatSingleDateSelectionModel(this._adapter);
788
- clone.updateSelection(this.selection, this);
789
- return clone;
790
- };
791
- return MatSingleDateSelectionModel;
792
- }(MatDateSelectionModel));
793
- MatSingleDateSelectionModel.decorators = [
794
- { type: i0.Injectable }
795
- ];
796
- MatSingleDateSelectionModel.ctorParameters = function () { return [
797
- { type: core.DateAdapter }
798
- ]; };
799
- /**
800
- * A selection model that contains a date range.
801
- * @docs-private
802
- */
803
- var MatRangeDateSelectionModel = /** @class */ (function (_super) {
804
- __extends(MatRangeDateSelectionModel, _super);
805
- function MatRangeDateSelectionModel(adapter) {
806
- return _super.call(this, new DateRange(null, null), adapter) || this;
807
- }
808
- /**
809
- * Adds a date to the current selection. In the case of a date range selection, the added date
810
- * fills in the next `null` value in the range. If both the start and the end already have a date,
811
- * the selection is reset so that the given date is the new `start` and the `end` is null.
812
- */
813
- MatRangeDateSelectionModel.prototype.add = function (date) {
814
- var _a = this.selection, start = _a.start, end = _a.end;
815
- if (start == null) {
816
- start = date;
817
- }
818
- else if (end == null) {
819
- end = date;
820
- }
821
- else {
822
- start = date;
823
- end = null;
824
- }
825
- _super.prototype.updateSelection.call(this, new DateRange(start, end), this);
826
- };
827
- /** Checks whether the current selection is valid. */
828
- MatRangeDateSelectionModel.prototype.isValid = function () {
829
- var _a = this.selection, start = _a.start, end = _a.end;
830
- // Empty ranges are valid.
831
- if (start == null && end == null) {
832
- return true;
833
- }
834
- // Complete ranges are only valid if both dates are valid and the start is before the end.
835
- if (start != null && end != null) {
836
- return this._isValidDateInstance(start) && this._isValidDateInstance(end) &&
837
- this._adapter.compareDate(start, end) <= 0;
838
- }
839
- // Partial ranges are valid if the start/end is valid.
840
- return (start == null || this._isValidDateInstance(start)) &&
841
- (end == null || this._isValidDateInstance(end));
842
- };
843
- /**
844
- * Checks whether the current selection is complete. In the case of a date range selection, this
845
- * is true if the current selection has a non-null `start` and `end`.
846
- */
847
- MatRangeDateSelectionModel.prototype.isComplete = function () {
848
- return this.selection.start != null && this.selection.end != null;
849
- };
850
- /** Clones the selection model. */
851
- MatRangeDateSelectionModel.prototype.clone = function () {
852
- var clone = new MatRangeDateSelectionModel(this._adapter);
853
- clone.updateSelection(this.selection, this);
854
- return clone;
855
- };
856
- return MatRangeDateSelectionModel;
857
- }(MatDateSelectionModel));
858
- MatRangeDateSelectionModel.decorators = [
859
- { type: i0.Injectable }
860
- ];
861
- MatRangeDateSelectionModel.ctorParameters = function () { return [
862
- { type: core.DateAdapter }
863
- ]; };
864
- /** @docs-private */
865
- function MAT_SINGLE_DATE_SELECTION_MODEL_FACTORY(parent, adapter) {
866
- return parent || new MatSingleDateSelectionModel(adapter);
867
- }
868
- /**
869
- * Used to provide a single selection model to a component.
870
- * @docs-private
871
- */
872
- var MAT_SINGLE_DATE_SELECTION_MODEL_PROVIDER = {
873
- provide: MatDateSelectionModel,
874
- deps: [[new i0.Optional(), new i0.SkipSelf(), MatDateSelectionModel], core.DateAdapter],
875
- useFactory: MAT_SINGLE_DATE_SELECTION_MODEL_FACTORY,
876
- };
877
- /** @docs-private */
878
- function MAT_RANGE_DATE_SELECTION_MODEL_FACTORY(parent, adapter) {
879
- return parent || new MatRangeDateSelectionModel(adapter);
880
- }
881
- /**
882
- * Used to provide a range selection model to a component.
883
- * @docs-private
884
- */
885
- var MAT_RANGE_DATE_SELECTION_MODEL_PROVIDER = {
886
- provide: MatDateSelectionModel,
887
- deps: [[new i0.Optional(), new i0.SkipSelf(), MatDateSelectionModel], core.DateAdapter],
888
- useFactory: MAT_RANGE_DATE_SELECTION_MODEL_FACTORY,
889
- };
890
-
891
- /**
892
- * @license
893
- * Copyright Google LLC All Rights Reserved.
894
- *
895
- * Use of this source code is governed by an MIT-style license that can be
896
- * found in the LICENSE file at https://angular.io/license
897
- */
898
- /** Injection token used to customize the date range selection behavior. */
899
- var MAT_DATE_RANGE_SELECTION_STRATEGY = new i0.InjectionToken('MAT_DATE_RANGE_SELECTION_STRATEGY');
900
- /** Provides the default date range selection behavior. */
901
- var DefaultMatCalendarRangeStrategy = /** @class */ (function () {
902
- function DefaultMatCalendarRangeStrategy(_dateAdapter) {
903
- this._dateAdapter = _dateAdapter;
904
- }
905
- DefaultMatCalendarRangeStrategy.prototype.selectionFinished = function (date, currentRange) {
906
- var start = currentRange.start, end = currentRange.end;
907
- if (start == null) {
908
- start = date;
909
- }
910
- else if (end == null && date && this._dateAdapter.compareDate(date, start) >= 0) {
911
- end = date;
912
- }
913
- else {
914
- start = date;
915
- end = null;
916
- }
917
- return new DateRange(start, end);
918
- };
919
- DefaultMatCalendarRangeStrategy.prototype.createPreview = function (activeDate, currentRange) {
920
- var start = null;
921
- var end = null;
922
- if (currentRange.start && !currentRange.end && activeDate) {
923
- start = currentRange.start;
924
- end = activeDate;
925
- }
926
- return new DateRange(start, end);
927
- };
928
- return DefaultMatCalendarRangeStrategy;
929
- }());
930
- DefaultMatCalendarRangeStrategy.decorators = [
931
- { type: i0.Injectable }
932
- ];
933
- DefaultMatCalendarRangeStrategy.ctorParameters = function () { return [
934
- { type: core.DateAdapter }
935
- ]; };
936
- /** @docs-private */
937
- function MAT_CALENDAR_RANGE_STRATEGY_PROVIDER_FACTORY(parent, adapter) {
938
- return parent || new DefaultMatCalendarRangeStrategy(adapter);
939
- }
940
- /** @docs-private */
941
- var MAT_CALENDAR_RANGE_STRATEGY_PROVIDER = {
942
- provide: MAT_DATE_RANGE_SELECTION_STRATEGY,
943
- deps: [[new i0.Optional(), new i0.SkipSelf(), MAT_DATE_RANGE_SELECTION_STRATEGY], core.DateAdapter],
944
- useFactory: MAT_CALENDAR_RANGE_STRATEGY_PROVIDER_FACTORY,
945
- };
946
-
947
- /**
948
- * @license
949
- * Copyright Google LLC All Rights Reserved.
950
- *
951
- * Use of this source code is governed by an MIT-style license that can be
952
- * found in the LICENSE file at https://angular.io/license
953
- */
954
- var DAYS_PER_WEEK = 7;
955
- /**
956
- * An internal component used to display a single month in the datepicker.
957
- * @docs-private
958
- */
959
- var MatMonthView = /** @class */ (function () {
960
- function MatMonthView(_changeDetectorRef, _dateFormats, _dateAdapter, _dir, _rangeStrategy) {
961
- this._changeDetectorRef = _changeDetectorRef;
962
- this._dateFormats = _dateFormats;
963
- this._dateAdapter = _dateAdapter;
964
- this._dir = _dir;
965
- this._rangeStrategy = _rangeStrategy;
966
- this._rerenderSubscription = rxjs.Subscription.EMPTY;
967
- /** Emits when a new date is selected. */
968
- this.selectedChange = new i0.EventEmitter();
969
- /** Emits when any date is selected. */
970
- this._userSelection = new i0.EventEmitter();
971
- /** Emits when any date is activated. */
972
- this.activeDateChange = new i0.EventEmitter();
973
- if (typeof ngDevMode === 'undefined' || ngDevMode) {
974
- if (!this._dateAdapter) {
975
- throw createMissingDateImplError('DateAdapter');
976
- }
977
- if (!this._dateFormats) {
978
- throw createMissingDateImplError('MAT_DATE_FORMATS');
979
- }
980
- }
981
- this._activeDate = this._dateAdapter.today();
982
- }
983
- Object.defineProperty(MatMonthView.prototype, "activeDate", {
984
- /**
985
- * The date to display in this month view (everything other than the month and year is ignored).
986
- */
987
- get: function () { return this._activeDate; },
988
- set: function (value) {
989
- var oldActiveDate = this._activeDate;
990
- var validDate = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value)) || this._dateAdapter.today();
991
- this._activeDate = this._dateAdapter.clampDate(validDate, this.minDate, this.maxDate);
992
- if (!this._hasSameMonthAndYear(oldActiveDate, this._activeDate)) {
993
- this._init();
994
- }
995
- },
996
- enumerable: false,
997
- configurable: true
998
- });
999
- Object.defineProperty(MatMonthView.prototype, "selected", {
1000
- /** The currently selected date. */
1001
- get: function () { return this._selected; },
1002
- set: function (value) {
1003
- if (value instanceof DateRange) {
1004
- this._selected = value;
1005
- }
1006
- else {
1007
- this._selected = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value));
1008
- }
1009
- this._setRanges(this._selected);
1010
- },
1011
- enumerable: false,
1012
- configurable: true
1013
- });
1014
- Object.defineProperty(MatMonthView.prototype, "minDate", {
1015
- /** The minimum selectable date. */
1016
- get: function () { return this._minDate; },
1017
- set: function (value) {
1018
- this._minDate = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value));
1019
- },
1020
- enumerable: false,
1021
- configurable: true
1022
- });
1023
- Object.defineProperty(MatMonthView.prototype, "maxDate", {
1024
- /** The maximum selectable date. */
1025
- get: function () { return this._maxDate; },
1026
- set: function (value) {
1027
- this._maxDate = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value));
1028
- },
1029
- enumerable: false,
1030
- configurable: true
1031
- });
1032
- MatMonthView.prototype.ngAfterContentInit = function () {
1033
- var _this = this;
1034
- this._rerenderSubscription = this._dateAdapter.localeChanges
1035
- .pipe(operators.startWith(null))
1036
- .subscribe(function () { return _this._init(); });
1037
- };
1038
- MatMonthView.prototype.ngOnChanges = function (changes) {
1039
- var comparisonChange = changes['comparisonStart'] || changes['comparisonEnd'];
1040
- if (comparisonChange && !comparisonChange.firstChange) {
1041
- this._setRanges(this.selected);
1042
- }
1043
- };
1044
- MatMonthView.prototype.ngOnDestroy = function () {
1045
- this._rerenderSubscription.unsubscribe();
1046
- };
1047
- /** Handles when a new date is selected. */
1048
- MatMonthView.prototype._dateSelected = function (event) {
1049
- var date = event.value;
1050
- var selectedYear = this._dateAdapter.getYear(this.activeDate);
1051
- var selectedMonth = this._dateAdapter.getMonth(this.activeDate);
1052
- var selectedDate = this._dateAdapter.createDate(selectedYear, selectedMonth, date);
1053
- var rangeStartDate;
1054
- var rangeEndDate;
1055
- if (this._selected instanceof DateRange) {
1056
- rangeStartDate = this._getDateInCurrentMonth(this._selected.start);
1057
- rangeEndDate = this._getDateInCurrentMonth(this._selected.end);
1058
- }
1059
- else {
1060
- rangeStartDate = rangeEndDate = this._getDateInCurrentMonth(this._selected);
1061
- }
1062
- if (rangeStartDate !== date || rangeEndDate !== date) {
1063
- this.selectedChange.emit(selectedDate);
1064
- }
1065
- this._userSelection.emit({ value: selectedDate, event: event.event });
1066
- this._previewStart = this._previewEnd = null;
1067
- this._changeDetectorRef.markForCheck();
1068
- };
1069
- /** Handles keydown events on the calendar body when calendar is in month view. */
1070
- MatMonthView.prototype._handleCalendarBodyKeydown = function (event) {
1071
- // TODO(mmalerba): We currently allow keyboard navigation to disabled dates, but just prevent
1072
- // disabled ones from being selected. This may not be ideal, we should look into whether
1073
- // navigation should skip over disabled dates, and if so, how to implement that efficiently.
1074
- var oldActiveDate = this._activeDate;
1075
- var isRtl = this._isRtl();
1076
- switch (event.keyCode) {
1077
- case keycodes.LEFT_ARROW:
1078
- this.activeDate = this._dateAdapter.addCalendarDays(this._activeDate, isRtl ? 1 : -1);
1079
- break;
1080
- case keycodes.RIGHT_ARROW:
1081
- this.activeDate = this._dateAdapter.addCalendarDays(this._activeDate, isRtl ? -1 : 1);
1082
- break;
1083
- case keycodes.UP_ARROW:
1084
- this.activeDate = this._dateAdapter.addCalendarDays(this._activeDate, -7);
1085
- break;
1086
- case keycodes.DOWN_ARROW:
1087
- this.activeDate = this._dateAdapter.addCalendarDays(this._activeDate, 7);
1088
- break;
1089
- case keycodes.HOME:
1090
- this.activeDate = this._dateAdapter.addCalendarDays(this._activeDate, 1 - this._dateAdapter.getDate(this._activeDate));
1091
- break;
1092
- case keycodes.END:
1093
- this.activeDate = this._dateAdapter.addCalendarDays(this._activeDate, (this._dateAdapter.getNumDaysInMonth(this._activeDate) -
1094
- this._dateAdapter.getDate(this._activeDate)));
1095
- break;
1096
- case keycodes.PAGE_UP:
1097
- this.activeDate = event.altKey ?
1098
- this._dateAdapter.addCalendarYears(this._activeDate, -1) :
1099
- this._dateAdapter.addCalendarMonths(this._activeDate, -1);
1100
- break;
1101
- case keycodes.PAGE_DOWN:
1102
- this.activeDate = event.altKey ?
1103
- this._dateAdapter.addCalendarYears(this._activeDate, 1) :
1104
- this._dateAdapter.addCalendarMonths(this._activeDate, 1);
1105
- break;
1106
- case keycodes.ENTER:
1107
- case keycodes.SPACE:
1108
- this._selectionKeyPressed = true;
1109
- if (this._canSelect(this._activeDate)) {
1110
- // Prevent unexpected default actions such as form submission.
1111
- // Note that we only prevent the default action here while the selection happens in
1112
- // `keyup` below. We can't do the selection here, because it can cause the calendar to
1113
- // reopen if focus is restored immediately. We also can't call `preventDefault` on `keyup`
1114
- // because it's too late (see #23305).
1115
- event.preventDefault();
1116
- }
1117
- return;
1118
- case keycodes.ESCAPE:
1119
- // Abort the current range selection if the user presses escape mid-selection.
1120
- if (this._previewEnd != null && !keycodes.hasModifierKey(event)) {
1121
- this._previewStart = this._previewEnd = null;
1122
- this.selectedChange.emit(null);
1123
- this._userSelection.emit({ value: null, event: event });
1124
- event.preventDefault();
1125
- event.stopPropagation(); // Prevents the overlay from closing.
1126
- }
1127
- return;
1128
- default:
1129
- // Don't prevent default or focus active cell on keys that we don't explicitly handle.
1130
- return;
1131
- }
1132
- if (this._dateAdapter.compareDate(oldActiveDate, this.activeDate)) {
1133
- this.activeDateChange.emit(this.activeDate);
1134
- }
1135
- this._focusActiveCell();
1136
- // Prevent unexpected default actions such as form submission.
1137
- event.preventDefault();
1138
- };
1139
- /** Handles keyup events on the calendar body when calendar is in month view. */
1140
- MatMonthView.prototype._handleCalendarBodyKeyup = function (event) {
1141
- if (event.keyCode === keycodes.SPACE || event.keyCode === keycodes.ENTER) {
1142
- if (this._selectionKeyPressed && this._canSelect(this._activeDate)) {
1143
- this._dateSelected({ value: this._dateAdapter.getDate(this._activeDate), event: event });
1144
- }
1145
- this._selectionKeyPressed = false;
1146
- }
1147
- };
1148
- /** Initializes this month view. */
1149
- MatMonthView.prototype._init = function () {
1150
- this._setRanges(this.selected);
1151
- this._todayDate = this._getCellCompareValue(this._dateAdapter.today());
1152
- this._monthLabel = this._dateFormats.display.monthLabel
1153
- ? this._dateAdapter.format(this.activeDate, this._dateFormats.display.monthLabel)
1154
- : this._dateAdapter.getMonthNames('short')[this._dateAdapter.getMonth(this.activeDate)]
1155
- .toLocaleUpperCase();
1156
- var firstOfMonth = this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate), this._dateAdapter.getMonth(this.activeDate), 1);
1157
- this._firstWeekOffset =
1158
- (DAYS_PER_WEEK + this._dateAdapter.getDayOfWeek(firstOfMonth) -
1159
- this._dateAdapter.getFirstDayOfWeek()) % DAYS_PER_WEEK;
1160
- this._initWeekdays();
1161
- this._createWeekCells();
1162
- this._changeDetectorRef.markForCheck();
1163
- };
1164
- /** Focuses the active cell after the microtask queue is empty. */
1165
- MatMonthView.prototype._focusActiveCell = function (movePreview) {
1166
- this._matCalendarBody._focusActiveCell(movePreview);
1167
- };
1168
- /** Called when the user has activated a new cell and the preview needs to be updated. */
1169
- MatMonthView.prototype._previewChanged = function (_a) {
1170
- var event = _a.event, cell = _a.value;
1171
- if (this._rangeStrategy) {
1172
- // We can assume that this will be a range, because preview
1173
- // events aren't fired for single date selections.
1174
- var value = cell ? cell.rawValue : null;
1175
- var previewRange = this._rangeStrategy.createPreview(value, this.selected, event);
1176
- this._previewStart = this._getCellCompareValue(previewRange.start);
1177
- this._previewEnd = this._getCellCompareValue(previewRange.end);
1178
- // Note that here we need to use `detectChanges`, rather than `markForCheck`, because
1179
- // the way `_focusActiveCell` is set up at the moment makes it fire at the wrong time
1180
- // when navigating one month back using the keyboard which will cause this handler
1181
- // to throw a "changed after checked" error when updating the preview state.
1182
- this._changeDetectorRef.detectChanges();
1183
- }
1184
- };
1185
- /** Initializes the weekdays. */
1186
- MatMonthView.prototype._initWeekdays = function () {
1187
- var firstDayOfWeek = this._dateAdapter.getFirstDayOfWeek();
1188
- var narrowWeekdays = this._dateAdapter.getDayOfWeekNames('narrow');
1189
- var longWeekdays = this._dateAdapter.getDayOfWeekNames('long');
1190
- // Rotate the labels for days of the week based on the configured first day of the week.
1191
- var weekdays = longWeekdays.map(function (long, i) {
1192
- return { long: long, narrow: narrowWeekdays[i] };
1193
- });
1194
- this._weekdays = weekdays.slice(firstDayOfWeek).concat(weekdays.slice(0, firstDayOfWeek));
1195
- };
1196
- /** Creates MatCalendarCells for the dates in this month. */
1197
- MatMonthView.prototype._createWeekCells = function () {
1198
- var daysInMonth = this._dateAdapter.getNumDaysInMonth(this.activeDate);
1199
- var dateNames = this._dateAdapter.getDateNames();
1200
- this._weeks = [[]];
1201
- for (var i = 0, cell = this._firstWeekOffset; i < daysInMonth; i++, cell++) {
1202
- if (cell == DAYS_PER_WEEK) {
1203
- this._weeks.push([]);
1204
- cell = 0;
1205
- }
1206
- var date = this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate), this._dateAdapter.getMonth(this.activeDate), i + 1);
1207
- var enabled = this._shouldEnableDate(date);
1208
- var ariaLabel = this._dateAdapter.format(date, this._dateFormats.display.dateA11yLabel);
1209
- var cellClasses = this.dateClass ? this.dateClass(date, 'month') : undefined;
1210
- this._weeks[this._weeks.length - 1].push(new MatCalendarCell(i + 1, dateNames[i], ariaLabel, enabled, cellClasses, this._getCellCompareValue(date), date));
1211
- }
1212
- };
1213
- /** Date filter for the month */
1214
- MatMonthView.prototype._shouldEnableDate = function (date) {
1215
- return !!date &&
1216
- (!this.minDate || this._dateAdapter.compareDate(date, this.minDate) >= 0) &&
1217
- (!this.maxDate || this._dateAdapter.compareDate(date, this.maxDate) <= 0) &&
1218
- (!this.dateFilter || this.dateFilter(date));
1219
- };
1220
- /**
1221
- * Gets the date in this month that the given Date falls on.
1222
- * Returns null if the given Date is in another month.
1223
- */
1224
- MatMonthView.prototype._getDateInCurrentMonth = function (date) {
1225
- return date && this._hasSameMonthAndYear(date, this.activeDate) ?
1226
- this._dateAdapter.getDate(date) : null;
1227
- };
1228
- /** Checks whether the 2 dates are non-null and fall within the same month of the same year. */
1229
- MatMonthView.prototype._hasSameMonthAndYear = function (d1, d2) {
1230
- return !!(d1 && d2 && this._dateAdapter.getMonth(d1) == this._dateAdapter.getMonth(d2) &&
1231
- this._dateAdapter.getYear(d1) == this._dateAdapter.getYear(d2));
1232
- };
1233
- /** Gets the value that will be used to one cell to another. */
1234
- MatMonthView.prototype._getCellCompareValue = function (date) {
1235
- if (date) {
1236
- // We use the time since the Unix epoch to compare dates in this view, rather than the
1237
- // cell values, because we need to support ranges that span across multiple months/years.
1238
- var year = this._dateAdapter.getYear(date);
1239
- var month = this._dateAdapter.getMonth(date);
1240
- var day = this._dateAdapter.getDate(date);
1241
- return new Date(year, month, day).getTime();
1242
- }
1243
- return null;
1244
- };
1245
- /** Determines whether the user has the RTL layout direction. */
1246
- MatMonthView.prototype._isRtl = function () {
1247
- return this._dir && this._dir.value === 'rtl';
1248
- };
1249
- /** Sets the current range based on a model value. */
1250
- MatMonthView.prototype._setRanges = function (selectedValue) {
1251
- if (selectedValue instanceof DateRange) {
1252
- this._rangeStart = this._getCellCompareValue(selectedValue.start);
1253
- this._rangeEnd = this._getCellCompareValue(selectedValue.end);
1254
- this._isRange = true;
1255
- }
1256
- else {
1257
- this._rangeStart = this._rangeEnd = this._getCellCompareValue(selectedValue);
1258
- this._isRange = false;
1259
- }
1260
- this._comparisonRangeStart = this._getCellCompareValue(this.comparisonStart);
1261
- this._comparisonRangeEnd = this._getCellCompareValue(this.comparisonEnd);
1262
- };
1263
- /** Gets whether a date can be selected in the month view. */
1264
- MatMonthView.prototype._canSelect = function (date) {
1265
- return !this.dateFilter || this.dateFilter(date);
1266
- };
1267
- return MatMonthView;
1268
- }());
1269
- MatMonthView.decorators = [
1270
- { type: i0.Component, args: [{
1271
- selector: 'mat-month-view',
1272
- template: "<table class=\"mat-calendar-table\" role=\"grid\">\n <thead class=\"mat-calendar-table-header\">\n <tr>\n <!-- For the day-of-the-week column header, we use an `<abbr>` element because VoiceOver\n ignores the `aria-label`. ChromeVox, however, does not read the full name\n for the `<abbr>`, so we still set `aria-label` on the header element. -->\n <th scope=\"col\" *ngFor=\"let day of _weekdays\" [attr.aria-label]=\"day.long\">\n <abbr class=\"mat-calendar-abbr\" [attr.title]=\"day.long\">{{day.narrow}}</abbr>\n </th>\n </tr>\n <tr><th aria-hidden=\"true\" class=\"mat-calendar-table-header-divider\" colspan=\"7\"></th></tr>\n </thead>\n <tbody mat-calendar-body\n [label]=\"_monthLabel\"\n [rows]=\"_weeks\"\n [todayValue]=\"_todayDate!\"\n [startValue]=\"_rangeStart!\"\n [endValue]=\"_rangeEnd!\"\n [comparisonStart]=\"_comparisonRangeStart\"\n [comparisonEnd]=\"_comparisonRangeEnd\"\n [previewStart]=\"_previewStart\"\n [previewEnd]=\"_previewEnd\"\n [isRange]=\"_isRange\"\n [labelMinRequiredCells]=\"3\"\n [activeCell]=\"_dateAdapter.getDate(activeDate) - 1\"\n (selectedValueChange)=\"_dateSelected($event)\"\n (previewChange)=\"_previewChanged($event)\"\n (keyup)=\"_handleCalendarBodyKeyup($event)\"\n (keydown)=\"_handleCalendarBodyKeydown($event)\">\n </tbody>\n</table>\n",
1273
- exportAs: 'matMonthView',
1274
- encapsulation: i0.ViewEncapsulation.None,
1275
- changeDetection: i0.ChangeDetectionStrategy.OnPush
1276
- },] }
1277
- ];
1278
- MatMonthView.ctorParameters = function () { return [
1279
- { type: i0.ChangeDetectorRef },
1280
- { type: undefined, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [core.MAT_DATE_FORMATS,] }] },
1281
- { type: core.DateAdapter, decorators: [{ type: i0.Optional }] },
1282
- { type: bidi.Directionality, decorators: [{ type: i0.Optional }] },
1283
- { type: undefined, decorators: [{ type: i0.Inject, args: [MAT_DATE_RANGE_SELECTION_STRATEGY,] }, { type: i0.Optional }] }
1284
- ]; };
1285
- MatMonthView.propDecorators = {
1286
- activeDate: [{ type: i0.Input }],
1287
- selected: [{ type: i0.Input }],
1288
- minDate: [{ type: i0.Input }],
1289
- maxDate: [{ type: i0.Input }],
1290
- dateFilter: [{ type: i0.Input }],
1291
- dateClass: [{ type: i0.Input }],
1292
- comparisonStart: [{ type: i0.Input }],
1293
- comparisonEnd: [{ type: i0.Input }],
1294
- selectedChange: [{ type: i0.Output }],
1295
- _userSelection: [{ type: i0.Output }],
1296
- activeDateChange: [{ type: i0.Output }],
1297
- _matCalendarBody: [{ type: i0.ViewChild, args: [MatCalendarBody,] }]
1298
- };
1299
-
1300
- /**
1301
- * @license
1302
- * Copyright Google LLC All Rights Reserved.
1303
- *
1304
- * Use of this source code is governed by an MIT-style license that can be
1305
- * found in the LICENSE file at https://angular.io/license
1306
- */
1307
- var yearsPerPage = 24;
1308
- var yearsPerRow = 4;
1309
- /**
1310
- * An internal component used to display a year selector in the datepicker.
1311
- * @docs-private
1312
- */
1313
- var MatMultiYearView = /** @class */ (function () {
1314
- function MatMultiYearView(_changeDetectorRef, _dateAdapter, _dir) {
1315
- this._changeDetectorRef = _changeDetectorRef;
1316
- this._dateAdapter = _dateAdapter;
1317
- this._dir = _dir;
1318
- this._rerenderSubscription = rxjs.Subscription.EMPTY;
1319
- /** Emits when a new year is selected. */
1320
- this.selectedChange = new i0.EventEmitter();
1321
- /** Emits the selected year. This doesn't imply a change on the selected date */
1322
- this.yearSelected = new i0.EventEmitter();
1323
- /** Emits when any date is activated. */
1324
- this.activeDateChange = new i0.EventEmitter();
1325
- if (!this._dateAdapter && (typeof ngDevMode === 'undefined' || ngDevMode)) {
1326
- throw createMissingDateImplError('DateAdapter');
1327
- }
1328
- this._activeDate = this._dateAdapter.today();
1329
- }
1330
- Object.defineProperty(MatMultiYearView.prototype, "activeDate", {
1331
- /** The date to display in this multi-year view (everything other than the year is ignored). */
1332
- get: function () { return this._activeDate; },
1333
- set: function (value) {
1334
- var oldActiveDate = this._activeDate;
1335
- var validDate = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value)) || this._dateAdapter.today();
1336
- this._activeDate = this._dateAdapter.clampDate(validDate, this.minDate, this.maxDate);
1337
- if (!isSameMultiYearView(this._dateAdapter, oldActiveDate, this._activeDate, this.minDate, this.maxDate)) {
1338
- this._init();
1339
- }
1340
- },
1341
- enumerable: false,
1342
- configurable: true
1343
- });
1344
- Object.defineProperty(MatMultiYearView.prototype, "selected", {
1345
- /** The currently selected date. */
1346
- get: function () { return this._selected; },
1347
- set: function (value) {
1348
- if (value instanceof DateRange) {
1349
- this._selected = value;
1350
- }
1351
- else {
1352
- this._selected = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value));
1353
- }
1354
- this._setSelectedYear(value);
1355
- },
1356
- enumerable: false,
1357
- configurable: true
1358
- });
1359
- Object.defineProperty(MatMultiYearView.prototype, "minDate", {
1360
- /** The minimum selectable date. */
1361
- get: function () { return this._minDate; },
1362
- set: function (value) {
1363
- this._minDate = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value));
1364
- },
1365
- enumerable: false,
1366
- configurable: true
1367
- });
1368
- Object.defineProperty(MatMultiYearView.prototype, "maxDate", {
1369
- /** The maximum selectable date. */
1370
- get: function () { return this._maxDate; },
1371
- set: function (value) {
1372
- this._maxDate = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value));
1373
- },
1374
- enumerable: false,
1375
- configurable: true
1376
- });
1377
- MatMultiYearView.prototype.ngAfterContentInit = function () {
1378
- var _this = this;
1379
- this._rerenderSubscription = this._dateAdapter.localeChanges
1380
- .pipe(operators.startWith(null))
1381
- .subscribe(function () { return _this._init(); });
1382
- };
1383
- MatMultiYearView.prototype.ngOnDestroy = function () {
1384
- this._rerenderSubscription.unsubscribe();
1385
- };
1386
- /** Initializes this multi-year view. */
1387
- MatMultiYearView.prototype._init = function () {
1388
- var _this = this;
1389
- this._todayYear = this._dateAdapter.getYear(this._dateAdapter.today());
1390
- // We want a range years such that we maximize the number of
1391
- // enabled dates visible at once. This prevents issues where the minimum year
1392
- // is the last item of a page OR the maximum year is the first item of a page.
1393
- // The offset from the active year to the "slot" for the starting year is the
1394
- // *actual* first rendered year in the multi-year view.
1395
- var activeYear = this._dateAdapter.getYear(this._activeDate);
1396
- var minYearOfPage = activeYear - getActiveOffset(this._dateAdapter, this.activeDate, this.minDate, this.maxDate);
1397
- this._years = [];
1398
- for (var i = 0, row = []; i < yearsPerPage; i++) {
1399
- row.push(minYearOfPage + i);
1400
- if (row.length == yearsPerRow) {
1401
- this._years.push(row.map(function (year) { return _this._createCellForYear(year); }));
1402
- row = [];
1403
- }
1404
- }
1405
- this._changeDetectorRef.markForCheck();
1406
- };
1407
- /** Handles when a new year is selected. */
1408
- MatMultiYearView.prototype._yearSelected = function (event) {
1409
- var year = event.value;
1410
- this.yearSelected.emit(this._dateAdapter.createDate(year, 0, 1));
1411
- var month = this._dateAdapter.getMonth(this.activeDate);
1412
- var daysInMonth = this._dateAdapter.getNumDaysInMonth(this._dateAdapter.createDate(year, month, 1));
1413
- this.selectedChange.emit(this._dateAdapter.createDate(year, month, Math.min(this._dateAdapter.getDate(this.activeDate), daysInMonth)));
1414
- };
1415
- /** Handles keydown events on the calendar body when calendar is in multi-year view. */
1416
- MatMultiYearView.prototype._handleCalendarBodyKeydown = function (event) {
1417
- var oldActiveDate = this._activeDate;
1418
- var isRtl = this._isRtl();
1419
- switch (event.keyCode) {
1420
- case keycodes.LEFT_ARROW:
1421
- this.activeDate = this._dateAdapter.addCalendarYears(this._activeDate, isRtl ? 1 : -1);
1422
- break;
1423
- case keycodes.RIGHT_ARROW:
1424
- this.activeDate = this._dateAdapter.addCalendarYears(this._activeDate, isRtl ? -1 : 1);
1425
- break;
1426
- case keycodes.UP_ARROW:
1427
- this.activeDate = this._dateAdapter.addCalendarYears(this._activeDate, -yearsPerRow);
1428
- break;
1429
- case keycodes.DOWN_ARROW:
1430
- this.activeDate = this._dateAdapter.addCalendarYears(this._activeDate, yearsPerRow);
1431
- break;
1432
- case keycodes.HOME:
1433
- this.activeDate = this._dateAdapter.addCalendarYears(this._activeDate, -getActiveOffset(this._dateAdapter, this.activeDate, this.minDate, this.maxDate));
1434
- break;
1435
- case keycodes.END:
1436
- this.activeDate = this._dateAdapter.addCalendarYears(this._activeDate, yearsPerPage - getActiveOffset(this._dateAdapter, this.activeDate, this.minDate, this.maxDate) - 1);
1437
- break;
1438
- case keycodes.PAGE_UP:
1439
- this.activeDate =
1440
- this._dateAdapter.addCalendarYears(this._activeDate, event.altKey ? -yearsPerPage * 10 : -yearsPerPage);
1441
- break;
1442
- case keycodes.PAGE_DOWN:
1443
- this.activeDate =
1444
- this._dateAdapter.addCalendarYears(this._activeDate, event.altKey ? yearsPerPage * 10 : yearsPerPage);
1445
- break;
1446
- case keycodes.ENTER:
1447
- case keycodes.SPACE:
1448
- // Note that we only prevent the default action here while the selection happens in
1449
- // `keyup` below. We can't do the selection here, because it can cause the calendar to
1450
- // reopen if focus is restored immediately. We also can't call `preventDefault` on `keyup`
1451
- // because it's too late (see #23305).
1452
- this._selectionKeyPressed = true;
1453
- break;
1454
- default:
1455
- // Don't prevent default or focus active cell on keys that we don't explicitly handle.
1456
- return;
1457
- }
1458
- if (this._dateAdapter.compareDate(oldActiveDate, this.activeDate)) {
1459
- this.activeDateChange.emit(this.activeDate);
1460
- }
1461
- this._focusActiveCell();
1462
- // Prevent unexpected default actions such as form submission.
1463
- event.preventDefault();
1464
- };
1465
- /** Handles keyup events on the calendar body when calendar is in multi-year view. */
1466
- MatMultiYearView.prototype._handleCalendarBodyKeyup = function (event) {
1467
- if (event.keyCode === keycodes.SPACE || event.keyCode === keycodes.ENTER) {
1468
- if (this._selectionKeyPressed) {
1469
- this._yearSelected({ value: this._dateAdapter.getYear(this._activeDate), event: event });
1470
- }
1471
- this._selectionKeyPressed = false;
1472
- }
1473
- };
1474
- MatMultiYearView.prototype._getActiveCell = function () {
1475
- return getActiveOffset(this._dateAdapter, this.activeDate, this.minDate, this.maxDate);
1476
- };
1477
- /** Focuses the active cell after the microtask queue is empty. */
1478
- MatMultiYearView.prototype._focusActiveCell = function () {
1479
- this._matCalendarBody._focusActiveCell();
1480
- };
1481
- /** Creates an MatCalendarCell for the given year. */
1482
- MatMultiYearView.prototype._createCellForYear = function (year) {
1483
- var date = this._dateAdapter.createDate(year, 0, 1);
1484
- var yearName = this._dateAdapter.getYearName(date);
1485
- var cellClasses = this.dateClass ? this.dateClass(date, 'multi-year') : undefined;
1486
- return new MatCalendarCell(year, yearName, yearName, this._shouldEnableYear(year), cellClasses);
1487
- };
1488
- /** Whether the given year is enabled. */
1489
- MatMultiYearView.prototype._shouldEnableYear = function (year) {
1490
- // disable if the year is greater than maxDate lower than minDate
1491
- if (year === undefined || year === null ||
1492
- (this.maxDate && year > this._dateAdapter.getYear(this.maxDate)) ||
1493
- (this.minDate && year < this._dateAdapter.getYear(this.minDate))) {
1494
- return false;
1495
- }
1496
- // enable if it reaches here and there's no filter defined
1497
- if (!this.dateFilter) {
1498
- return true;
1499
- }
1500
- var firstOfYear = this._dateAdapter.createDate(year, 0, 1);
1501
- // If any date in the year is enabled count the year as enabled.
1502
- for (var date = firstOfYear; this._dateAdapter.getYear(date) == year; date = this._dateAdapter.addCalendarDays(date, 1)) {
1503
- if (this.dateFilter(date)) {
1504
- return true;
1505
- }
1506
- }
1507
- return false;
1508
- };
1509
- /** Determines whether the user has the RTL layout direction. */
1510
- MatMultiYearView.prototype._isRtl = function () {
1511
- return this._dir && this._dir.value === 'rtl';
1512
- };
1513
- /** Sets the currently-highlighted year based on a model value. */
1514
- MatMultiYearView.prototype._setSelectedYear = function (value) {
1515
- this._selectedYear = null;
1516
- if (value instanceof DateRange) {
1517
- var displayValue = value.start || value.end;
1518
- if (displayValue) {
1519
- this._selectedYear = this._dateAdapter.getYear(displayValue);
1520
- }
1521
- }
1522
- else if (value) {
1523
- this._selectedYear = this._dateAdapter.getYear(value);
1524
- }
1525
- };
1526
- return MatMultiYearView;
1527
- }());
1528
- MatMultiYearView.decorators = [
1529
- { type: i0.Component, args: [{
1530
- selector: 'mat-multi-year-view',
1531
- template: "<table class=\"mat-calendar-table\" role=\"grid\">\n <thead aria-hidden=\"true\" class=\"mat-calendar-table-header\">\n <tr><th class=\"mat-calendar-table-header-divider\" colspan=\"4\"></th></tr>\n </thead>\n <tbody mat-calendar-body\n [rows]=\"_years\"\n [todayValue]=\"_todayYear\"\n [startValue]=\"_selectedYear!\"\n [endValue]=\"_selectedYear!\"\n [numCols]=\"4\"\n [cellAspectRatio]=\"4 / 7\"\n [activeCell]=\"_getActiveCell()\"\n (selectedValueChange)=\"_yearSelected($event)\"\n (keyup)=\"_handleCalendarBodyKeyup($event)\"\n (keydown)=\"_handleCalendarBodyKeydown($event)\">\n </tbody>\n</table>\n",
1532
- exportAs: 'matMultiYearView',
1533
- encapsulation: i0.ViewEncapsulation.None,
1534
- changeDetection: i0.ChangeDetectionStrategy.OnPush
1535
- },] }
1536
- ];
1537
- MatMultiYearView.ctorParameters = function () { return [
1538
- { type: i0.ChangeDetectorRef },
1539
- { type: core.DateAdapter, decorators: [{ type: i0.Optional }] },
1540
- { type: bidi.Directionality, decorators: [{ type: i0.Optional }] }
1541
- ]; };
1542
- MatMultiYearView.propDecorators = {
1543
- activeDate: [{ type: i0.Input }],
1544
- selected: [{ type: i0.Input }],
1545
- minDate: [{ type: i0.Input }],
1546
- maxDate: [{ type: i0.Input }],
1547
- dateFilter: [{ type: i0.Input }],
1548
- dateClass: [{ type: i0.Input }],
1549
- selectedChange: [{ type: i0.Output }],
1550
- yearSelected: [{ type: i0.Output }],
1551
- activeDateChange: [{ type: i0.Output }],
1552
- _matCalendarBody: [{ type: i0.ViewChild, args: [MatCalendarBody,] }]
1553
- };
1554
- function isSameMultiYearView(dateAdapter, date1, date2, minDate, maxDate) {
1555
- var year1 = dateAdapter.getYear(date1);
1556
- var year2 = dateAdapter.getYear(date2);
1557
- var startingYear = getStartingYear(dateAdapter, minDate, maxDate);
1558
- return Math.floor((year1 - startingYear) / yearsPerPage) ===
1559
- Math.floor((year2 - startingYear) / yearsPerPage);
1560
- }
1561
- /**
1562
- * When the multi-year view is first opened, the active year will be in view.
1563
- * So we compute how many years are between the active year and the *slot* where our
1564
- * "startingYear" will render when paged into view.
1565
- */
1566
- function getActiveOffset(dateAdapter, activeDate, minDate, maxDate) {
1567
- var activeYear = dateAdapter.getYear(activeDate);
1568
- return euclideanModulo((activeYear - getStartingYear(dateAdapter, minDate, maxDate)), yearsPerPage);
1569
- }
1570
- /**
1571
- * We pick a "starting" year such that either the maximum year would be at the end
1572
- * or the minimum year would be at the beginning of a page.
1573
- */
1574
- function getStartingYear(dateAdapter, minDate, maxDate) {
1575
- var startingYear = 0;
1576
- if (maxDate) {
1577
- var maxYear = dateAdapter.getYear(maxDate);
1578
- startingYear = maxYear - yearsPerPage + 1;
1579
- }
1580
- else if (minDate) {
1581
- startingYear = dateAdapter.getYear(minDate);
1582
- }
1583
- return startingYear;
1584
- }
1585
- /** Gets remainder that is non-negative, even if first number is negative */
1586
- function euclideanModulo(a, b) {
1587
- return (a % b + b) % b;
1588
- }
1589
-
1590
- /**
1591
- * @license
1592
- * Copyright Google LLC All Rights Reserved.
1593
- *
1594
- * Use of this source code is governed by an MIT-style license that can be
1595
- * found in the LICENSE file at https://angular.io/license
1596
- */
1597
- /**
1598
- * An internal component used to display a single year in the datepicker.
1599
- * @docs-private
1600
- */
1601
- var MatYearView = /** @class */ (function () {
1602
- function MatYearView(_changeDetectorRef, _dateFormats, _dateAdapter, _dir) {
1603
- this._changeDetectorRef = _changeDetectorRef;
1604
- this._dateFormats = _dateFormats;
1605
- this._dateAdapter = _dateAdapter;
1606
- this._dir = _dir;
1607
- this._rerenderSubscription = rxjs.Subscription.EMPTY;
1608
- /** Emits when a new month is selected. */
1609
- this.selectedChange = new i0.EventEmitter();
1610
- /** Emits the selected month. This doesn't imply a change on the selected date */
1611
- this.monthSelected = new i0.EventEmitter();
1612
- /** Emits when any date is activated. */
1613
- this.activeDateChange = new i0.EventEmitter();
1614
- if (typeof ngDevMode === 'undefined' || ngDevMode) {
1615
- if (!this._dateAdapter) {
1616
- throw createMissingDateImplError('DateAdapter');
1617
- }
1618
- if (!this._dateFormats) {
1619
- throw createMissingDateImplError('MAT_DATE_FORMATS');
1620
- }
1621
- }
1622
- this._activeDate = this._dateAdapter.today();
1623
- }
1624
- Object.defineProperty(MatYearView.prototype, "activeDate", {
1625
- /** The date to display in this year view (everything other than the year is ignored). */
1626
- get: function () { return this._activeDate; },
1627
- set: function (value) {
1628
- var oldActiveDate = this._activeDate;
1629
- var validDate = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value)) || this._dateAdapter.today();
1630
- this._activeDate = this._dateAdapter.clampDate(validDate, this.minDate, this.maxDate);
1631
- if (this._dateAdapter.getYear(oldActiveDate) !== this._dateAdapter.getYear(this._activeDate)) {
1632
- this._init();
1633
- }
1634
- },
1635
- enumerable: false,
1636
- configurable: true
1637
- });
1638
- Object.defineProperty(MatYearView.prototype, "selected", {
1639
- /** The currently selected date. */
1640
- get: function () { return this._selected; },
1641
- set: function (value) {
1642
- if (value instanceof DateRange) {
1643
- this._selected = value;
1644
- }
1645
- else {
1646
- this._selected = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value));
1647
- }
1648
- this._setSelectedMonth(value);
1649
- },
1650
- enumerable: false,
1651
- configurable: true
1652
- });
1653
- Object.defineProperty(MatYearView.prototype, "minDate", {
1654
- /** The minimum selectable date. */
1655
- get: function () { return this._minDate; },
1656
- set: function (value) {
1657
- this._minDate = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value));
1658
- },
1659
- enumerable: false,
1660
- configurable: true
1661
- });
1662
- Object.defineProperty(MatYearView.prototype, "maxDate", {
1663
- /** The maximum selectable date. */
1664
- get: function () { return this._maxDate; },
1665
- set: function (value) {
1666
- this._maxDate = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value));
1667
- },
1668
- enumerable: false,
1669
- configurable: true
1670
- });
1671
- MatYearView.prototype.ngAfterContentInit = function () {
1672
- var _this = this;
1673
- this._rerenderSubscription = this._dateAdapter.localeChanges
1674
- .pipe(operators.startWith(null))
1675
- .subscribe(function () { return _this._init(); });
1676
- };
1677
- MatYearView.prototype.ngOnDestroy = function () {
1678
- this._rerenderSubscription.unsubscribe();
1679
- };
1680
- /** Handles when a new month is selected. */
1681
- MatYearView.prototype._monthSelected = function (event) {
1682
- var month = event.value;
1683
- var normalizedDate = this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate), month, 1);
1684
- this.monthSelected.emit(normalizedDate);
1685
- var daysInMonth = this._dateAdapter.getNumDaysInMonth(normalizedDate);
1686
- this.selectedChange.emit(this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate), month, Math.min(this._dateAdapter.getDate(this.activeDate), daysInMonth)));
1687
- };
1688
- /** Handles keydown events on the calendar body when calendar is in year view. */
1689
- MatYearView.prototype._handleCalendarBodyKeydown = function (event) {
1690
- // TODO(mmalerba): We currently allow keyboard navigation to disabled dates, but just prevent
1691
- // disabled ones from being selected. This may not be ideal, we should look into whether
1692
- // navigation should skip over disabled dates, and if so, how to implement that efficiently.
1693
- var oldActiveDate = this._activeDate;
1694
- var isRtl = this._isRtl();
1695
- switch (event.keyCode) {
1696
- case keycodes.LEFT_ARROW:
1697
- this.activeDate = this._dateAdapter.addCalendarMonths(this._activeDate, isRtl ? 1 : -1);
1698
- break;
1699
- case keycodes.RIGHT_ARROW:
1700
- this.activeDate = this._dateAdapter.addCalendarMonths(this._activeDate, isRtl ? -1 : 1);
1701
- break;
1702
- case keycodes.UP_ARROW:
1703
- this.activeDate = this._dateAdapter.addCalendarMonths(this._activeDate, -4);
1704
- break;
1705
- case keycodes.DOWN_ARROW:
1706
- this.activeDate = this._dateAdapter.addCalendarMonths(this._activeDate, 4);
1707
- break;
1708
- case keycodes.HOME:
1709
- this.activeDate = this._dateAdapter.addCalendarMonths(this._activeDate, -this._dateAdapter.getMonth(this._activeDate));
1710
- break;
1711
- case keycodes.END:
1712
- this.activeDate = this._dateAdapter.addCalendarMonths(this._activeDate, 11 - this._dateAdapter.getMonth(this._activeDate));
1713
- break;
1714
- case keycodes.PAGE_UP:
1715
- this.activeDate =
1716
- this._dateAdapter.addCalendarYears(this._activeDate, event.altKey ? -10 : -1);
1717
- break;
1718
- case keycodes.PAGE_DOWN:
1719
- this.activeDate =
1720
- this._dateAdapter.addCalendarYears(this._activeDate, event.altKey ? 10 : 1);
1721
- break;
1722
- case keycodes.ENTER:
1723
- case keycodes.SPACE:
1724
- // Note that we only prevent the default action here while the selection happens in
1725
- // `keyup` below. We can't do the selection here, because it can cause the calendar to
1726
- // reopen if focus is restored immediately. We also can't call `preventDefault` on `keyup`
1727
- // because it's too late (see #23305).
1728
- this._selectionKeyPressed = true;
1729
- break;
1730
- default:
1731
- // Don't prevent default or focus active cell on keys that we don't explicitly handle.
1732
- return;
1733
- }
1734
- if (this._dateAdapter.compareDate(oldActiveDate, this.activeDate)) {
1735
- this.activeDateChange.emit(this.activeDate);
1736
- }
1737
- this._focusActiveCell();
1738
- // Prevent unexpected default actions such as form submission.
1739
- event.preventDefault();
1740
- };
1741
- /** Handles keyup events on the calendar body when calendar is in year view. */
1742
- MatYearView.prototype._handleCalendarBodyKeyup = function (event) {
1743
- if (event.keyCode === keycodes.SPACE || event.keyCode === keycodes.ENTER) {
1744
- if (this._selectionKeyPressed) {
1745
- this._monthSelected({ value: this._dateAdapter.getMonth(this._activeDate), event: event });
1746
- }
1747
- this._selectionKeyPressed = false;
1748
- }
1749
- };
1750
- /** Initializes this year view. */
1751
- MatYearView.prototype._init = function () {
1752
- var _this = this;
1753
- this._setSelectedMonth(this.selected);
1754
- this._todayMonth = this._getMonthInCurrentYear(this._dateAdapter.today());
1755
- this._yearLabel = this._dateAdapter.getYearName(this.activeDate);
1756
- var monthNames = this._dateAdapter.getMonthNames('short');
1757
- // First row of months only contains 5 elements so we can fit the year label on the same row.
1758
- this._months = [[0, 1, 2, 3], [4, 5, 6, 7], [8, 9, 10, 11]].map(function (row) { return row.map(function (month) { return _this._createCellForMonth(month, monthNames[month]); }); });
1759
- this._changeDetectorRef.markForCheck();
1760
- };
1761
- /** Focuses the active cell after the microtask queue is empty. */
1762
- MatYearView.prototype._focusActiveCell = function () {
1763
- this._matCalendarBody._focusActiveCell();
1764
- };
1765
- /**
1766
- * Gets the month in this year that the given Date falls on.
1767
- * Returns null if the given Date is in another year.
1768
- */
1769
- MatYearView.prototype._getMonthInCurrentYear = function (date) {
1770
- return date && this._dateAdapter.getYear(date) == this._dateAdapter.getYear(this.activeDate) ?
1771
- this._dateAdapter.getMonth(date) : null;
1772
- };
1773
- /** Creates an MatCalendarCell for the given month. */
1774
- MatYearView.prototype._createCellForMonth = function (month, monthName) {
1775
- var date = this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate), month, 1);
1776
- var ariaLabel = this._dateAdapter.format(date, this._dateFormats.display.monthYearA11yLabel);
1777
- var cellClasses = this.dateClass ? this.dateClass(date, 'year') : undefined;
1778
- return new MatCalendarCell(month, monthName.toLocaleUpperCase(), ariaLabel, this._shouldEnableMonth(month), cellClasses);
1779
- };
1780
- /** Whether the given month is enabled. */
1781
- MatYearView.prototype._shouldEnableMonth = function (month) {
1782
- var activeYear = this._dateAdapter.getYear(this.activeDate);
1783
- if (month === undefined || month === null ||
1784
- this._isYearAndMonthAfterMaxDate(activeYear, month) ||
1785
- this._isYearAndMonthBeforeMinDate(activeYear, month)) {
1786
- return false;
1787
- }
1788
- if (!this.dateFilter) {
1789
- return true;
1790
- }
1791
- var firstOfMonth = this._dateAdapter.createDate(activeYear, month, 1);
1792
- // If any date in the month is enabled count the month as enabled.
1793
- for (var date = firstOfMonth; this._dateAdapter.getMonth(date) == month; date = this._dateAdapter.addCalendarDays(date, 1)) {
1794
- if (this.dateFilter(date)) {
1795
- return true;
1796
- }
1797
- }
1798
- return false;
1799
- };
1800
- /**
1801
- * Tests whether the combination month/year is after this.maxDate, considering
1802
- * just the month and year of this.maxDate
1803
- */
1804
- MatYearView.prototype._isYearAndMonthAfterMaxDate = function (year, month) {
1805
- if (this.maxDate) {
1806
- var maxYear = this._dateAdapter.getYear(this.maxDate);
1807
- var maxMonth = this._dateAdapter.getMonth(this.maxDate);
1808
- return year > maxYear || (year === maxYear && month > maxMonth);
1809
- }
1810
- return false;
1811
- };
1812
- /**
1813
- * Tests whether the combination month/year is before this.minDate, considering
1814
- * just the month and year of this.minDate
1815
- */
1816
- MatYearView.prototype._isYearAndMonthBeforeMinDate = function (year, month) {
1817
- if (this.minDate) {
1818
- var minYear = this._dateAdapter.getYear(this.minDate);
1819
- var minMonth = this._dateAdapter.getMonth(this.minDate);
1820
- return year < minYear || (year === minYear && month < minMonth);
1821
- }
1822
- return false;
1823
- };
1824
- /** Determines whether the user has the RTL layout direction. */
1825
- MatYearView.prototype._isRtl = function () {
1826
- return this._dir && this._dir.value === 'rtl';
1827
- };
1828
- /** Sets the currently-selected month based on a model value. */
1829
- MatYearView.prototype._setSelectedMonth = function (value) {
1830
- if (value instanceof DateRange) {
1831
- this._selectedMonth = this._getMonthInCurrentYear(value.start) ||
1832
- this._getMonthInCurrentYear(value.end);
1833
- }
1834
- else {
1835
- this._selectedMonth = this._getMonthInCurrentYear(value);
1836
- }
1837
- };
1838
- return MatYearView;
1839
- }());
1840
- MatYearView.decorators = [
1841
- { type: i0.Component, args: [{
1842
- selector: 'mat-year-view',
1843
- template: "<table class=\"mat-calendar-table\" role=\"grid\">\n <thead aria-hidden=\"true\" class=\"mat-calendar-table-header\">\n <tr><th class=\"mat-calendar-table-header-divider\" colspan=\"4\"></th></tr>\n </thead>\n <tbody mat-calendar-body\n [label]=\"_yearLabel\"\n [rows]=\"_months\"\n [todayValue]=\"_todayMonth!\"\n [startValue]=\"_selectedMonth!\"\n [endValue]=\"_selectedMonth!\"\n [labelMinRequiredCells]=\"2\"\n [numCols]=\"4\"\n [cellAspectRatio]=\"4 / 7\"\n [activeCell]=\"_dateAdapter.getMonth(activeDate)\"\n (selectedValueChange)=\"_monthSelected($event)\"\n (keyup)=\"_handleCalendarBodyKeyup($event)\"\n (keydown)=\"_handleCalendarBodyKeydown($event)\">\n </tbody>\n</table>\n",
1844
- exportAs: 'matYearView',
1845
- encapsulation: i0.ViewEncapsulation.None,
1846
- changeDetection: i0.ChangeDetectionStrategy.OnPush
1847
- },] }
1848
- ];
1849
- MatYearView.ctorParameters = function () { return [
1850
- { type: i0.ChangeDetectorRef },
1851
- { type: undefined, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [core.MAT_DATE_FORMATS,] }] },
1852
- { type: core.DateAdapter, decorators: [{ type: i0.Optional }] },
1853
- { type: bidi.Directionality, decorators: [{ type: i0.Optional }] }
1854
- ]; };
1855
- MatYearView.propDecorators = {
1856
- activeDate: [{ type: i0.Input }],
1857
- selected: [{ type: i0.Input }],
1858
- minDate: [{ type: i0.Input }],
1859
- maxDate: [{ type: i0.Input }],
1860
- dateFilter: [{ type: i0.Input }],
1861
- dateClass: [{ type: i0.Input }],
1862
- selectedChange: [{ type: i0.Output }],
1863
- monthSelected: [{ type: i0.Output }],
1864
- activeDateChange: [{ type: i0.Output }],
1865
- _matCalendarBody: [{ type: i0.ViewChild, args: [MatCalendarBody,] }]
1866
- };
1867
-
1868
- /**
1869
- * @license
1870
- * Copyright Google LLC All Rights Reserved.
1871
- *
1872
- * Use of this source code is governed by an MIT-style license that can be
1873
- * found in the LICENSE file at https://angular.io/license
1874
- */
1875
- /** Counter used to generate unique IDs. */
1876
- var uniqueId = 0;
1877
- /** Default header for MatCalendar */
1878
- var MatCalendarHeader = /** @class */ (function () {
1879
- function MatCalendarHeader(_intl, calendar, _dateAdapter, _dateFormats, changeDetectorRef) {
1880
- this._intl = _intl;
1881
- this.calendar = calendar;
1882
- this._dateAdapter = _dateAdapter;
1883
- this._dateFormats = _dateFormats;
1884
- this._buttonDescriptionId = "mat-calendar-button-" + uniqueId++;
1885
- this.calendar.stateChanges.subscribe(function () { return changeDetectorRef.markForCheck(); });
1886
- }
1887
- Object.defineProperty(MatCalendarHeader.prototype, "periodButtonText", {
1888
- /** The label for the current calendar view. */
1889
- get: function () {
1890
- if (this.calendar.currentView == 'month') {
1891
- return this._dateAdapter
1892
- .format(this.calendar.activeDate, this._dateFormats.display.monthYearLabel)
1893
- .toLocaleUpperCase();
1894
- }
1895
- if (this.calendar.currentView == 'year') {
1896
- return this._dateAdapter.getYearName(this.calendar.activeDate);
1897
- }
1898
- // The offset from the active year to the "slot" for the starting year is the
1899
- // *actual* first rendered year in the multi-year view, and the last year is
1900
- // just yearsPerPage - 1 away.
1901
- var activeYear = this._dateAdapter.getYear(this.calendar.activeDate);
1902
- var minYearOfPage = activeYear - getActiveOffset(this._dateAdapter, this.calendar.activeDate, this.calendar.minDate, this.calendar.maxDate);
1903
- var maxYearOfPage = minYearOfPage + yearsPerPage - 1;
1904
- var minYearName = this._dateAdapter.getYearName(this._dateAdapter.createDate(minYearOfPage, 0, 1));
1905
- var maxYearName = this._dateAdapter.getYearName(this._dateAdapter.createDate(maxYearOfPage, 0, 1));
1906
- return this._intl.formatYearRange(minYearName, maxYearName);
1907
- },
1908
- enumerable: false,
1909
- configurable: true
1910
- });
1911
- Object.defineProperty(MatCalendarHeader.prototype, "periodButtonLabel", {
1912
- get: function () {
1913
- return this.calendar.currentView == 'month' ?
1914
- this._intl.switchToMultiYearViewLabel : this._intl.switchToMonthViewLabel;
1915
- },
1916
- enumerable: false,
1917
- configurable: true
1918
- });
1919
- Object.defineProperty(MatCalendarHeader.prototype, "prevButtonLabel", {
1920
- /** The label for the previous button. */
1921
- get: function () {
1922
- return {
1923
- 'month': this._intl.prevMonthLabel,
1924
- 'year': this._intl.prevYearLabel,
1925
- 'multi-year': this._intl.prevMultiYearLabel
1926
- }[this.calendar.currentView];
1927
- },
1928
- enumerable: false,
1929
- configurable: true
1930
- });
1931
- Object.defineProperty(MatCalendarHeader.prototype, "nextButtonLabel", {
1932
- /** The label for the next button. */
1933
- get: function () {
1934
- return {
1935
- 'month': this._intl.nextMonthLabel,
1936
- 'year': this._intl.nextYearLabel,
1937
- 'multi-year': this._intl.nextMultiYearLabel
1938
- }[this.calendar.currentView];
1939
- },
1940
- enumerable: false,
1941
- configurable: true
1942
- });
1943
- /** Handles user clicks on the period label. */
1944
- MatCalendarHeader.prototype.currentPeriodClicked = function () {
1945
- this.calendar.currentView = this.calendar.currentView == 'month' ? 'multi-year' : 'month';
1946
- };
1947
- /** Handles user clicks on the previous button. */
1948
- MatCalendarHeader.prototype.previousClicked = function () {
1949
- this.calendar.activeDate = this.calendar.currentView == 'month' ?
1950
- this._dateAdapter.addCalendarMonths(this.calendar.activeDate, -1) :
1951
- this._dateAdapter.addCalendarYears(this.calendar.activeDate, this.calendar.currentView == 'year' ? -1 : -yearsPerPage);
1952
- };
1953
- /** Handles user clicks on the next button. */
1954
- MatCalendarHeader.prototype.nextClicked = function () {
1955
- this.calendar.activeDate = this.calendar.currentView == 'month' ?
1956
- this._dateAdapter.addCalendarMonths(this.calendar.activeDate, 1) :
1957
- this._dateAdapter.addCalendarYears(this.calendar.activeDate, this.calendar.currentView == 'year' ? 1 : yearsPerPage);
1958
- };
1959
- /** Whether the previous period button is enabled. */
1960
- MatCalendarHeader.prototype.previousEnabled = function () {
1961
- if (!this.calendar.minDate) {
1962
- return true;
1963
- }
1964
- return !this.calendar.minDate ||
1965
- !this._isSameView(this.calendar.activeDate, this.calendar.minDate);
1966
- };
1967
- /** Whether the next period button is enabled. */
1968
- MatCalendarHeader.prototype.nextEnabled = function () {
1969
- return !this.calendar.maxDate ||
1970
- !this._isSameView(this.calendar.activeDate, this.calendar.maxDate);
1971
- };
1972
- /** Whether the two dates represent the same view in the current view mode (month or year). */
1973
- MatCalendarHeader.prototype._isSameView = function (date1, date2) {
1974
- if (this.calendar.currentView == 'month') {
1975
- return this._dateAdapter.getYear(date1) == this._dateAdapter.getYear(date2) &&
1976
- this._dateAdapter.getMonth(date1) == this._dateAdapter.getMonth(date2);
1977
- }
1978
- if (this.calendar.currentView == 'year') {
1979
- return this._dateAdapter.getYear(date1) == this._dateAdapter.getYear(date2);
1980
- }
1981
- // Otherwise we are in 'multi-year' view.
1982
- return isSameMultiYearView(this._dateAdapter, date1, date2, this.calendar.minDate, this.calendar.maxDate);
1983
- };
1984
- return MatCalendarHeader;
1985
- }());
1986
- MatCalendarHeader.decorators = [
1987
- { type: i0.Component, args: [{
1988
- selector: 'mat-calendar-header',
1989
- template: "<div class=\"mat-calendar-header\">\n <div class=\"mat-calendar-controls\">\n <button mat-button type=\"button\" class=\"mat-calendar-period-button\"\n (click)=\"currentPeriodClicked()\" [attr.aria-label]=\"periodButtonLabel\"\n [attr.aria-describedby]=\"_buttonDescriptionId\"\n cdkAriaLive=\"polite\">\n <span [attr.id]=\"_buttonDescriptionId\">{{periodButtonText}}</span>\n <svg class=\"mat-calendar-arrow\" [class.mat-calendar-invert]=\"calendar.currentView !== 'month'\"\n viewBox=\"0 0 10 5\" focusable=\"false\">\n <polygon points=\"0,0 5,5 10,0\"/>\n </svg>\n </button>\n\n <div class=\"mat-calendar-spacer\"></div>\n\n <ng-content></ng-content>\n\n <button mat-icon-button type=\"button\" class=\"mat-calendar-previous-button\"\n [disabled]=\"!previousEnabled()\" (click)=\"previousClicked()\"\n [attr.aria-label]=\"prevButtonLabel\">\n </button>\n\n <button mat-icon-button type=\"button\" class=\"mat-calendar-next-button\"\n [disabled]=\"!nextEnabled()\" (click)=\"nextClicked()\"\n [attr.aria-label]=\"nextButtonLabel\">\n </button>\n </div>\n</div>\n",
1990
- exportAs: 'matCalendarHeader',
1991
- encapsulation: i0.ViewEncapsulation.None,
1992
- changeDetection: i0.ChangeDetectionStrategy.OnPush
1993
- },] }
1994
- ];
1995
- MatCalendarHeader.ctorParameters = function () { return [
1996
- { type: MatDatepickerIntl },
1997
- { type: MatCalendar, decorators: [{ type: i0.Inject, args: [i0.forwardRef(function () { return MatCalendar; }),] }] },
1998
- { type: core.DateAdapter, decorators: [{ type: i0.Optional }] },
1999
- { type: undefined, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [core.MAT_DATE_FORMATS,] }] },
2000
- { type: i0.ChangeDetectorRef }
2001
- ]; };
2002
- /** A calendar that is used as part of the datepicker. */
2003
- var MatCalendar = /** @class */ (function () {
2004
- function MatCalendar(_intl, _dateAdapter, _dateFormats, _changeDetectorRef) {
2005
- var _this = this;
2006
- this._dateAdapter = _dateAdapter;
2007
- this._dateFormats = _dateFormats;
2008
- this._changeDetectorRef = _changeDetectorRef;
2009
- /**
2010
- * Used for scheduling that focus should be moved to the active cell on the next tick.
2011
- * We need to schedule it, rather than do it immediately, because we have to wait
2012
- * for Angular to re-evaluate the view children.
2013
- */
2014
- this._moveFocusOnNextTick = false;
2015
- /** Whether the calendar should be started in month or year view. */
2016
- this.startView = 'month';
2017
- /** Emits when the currently selected date changes. */
2018
- this.selectedChange = new i0.EventEmitter();
2019
- /**
2020
- * Emits the year chosen in multiyear view.
2021
- * This doesn't imply a change on the selected date.
2022
- */
2023
- this.yearSelected = new i0.EventEmitter();
2024
- /**
2025
- * Emits the month chosen in year view.
2026
- * This doesn't imply a change on the selected date.
2027
- */
2028
- this.monthSelected = new i0.EventEmitter();
2029
- /**
2030
- * Emits when the current view changes.
2031
- */
2032
- this.viewChanged = new i0.EventEmitter(true);
2033
- /** Emits when any date is selected. */
2034
- this._userSelection = new i0.EventEmitter();
2035
- /**
2036
- * Emits whenever there is a state change that the header may need to respond to.
2037
- */
2038
- this.stateChanges = new rxjs.Subject();
2039
- if (typeof ngDevMode === 'undefined' || ngDevMode) {
2040
- if (!this._dateAdapter) {
2041
- throw createMissingDateImplError('DateAdapter');
2042
- }
2043
- if (!this._dateFormats) {
2044
- throw createMissingDateImplError('MAT_DATE_FORMATS');
2045
- }
2046
- }
2047
- this._intlChanges = _intl.changes.subscribe(function () {
2048
- _changeDetectorRef.markForCheck();
2049
- _this.stateChanges.next();
2050
- });
2051
- }
2052
- Object.defineProperty(MatCalendar.prototype, "startAt", {
2053
- /** A date representing the period (month or year) to start the calendar in. */
2054
- get: function () { return this._startAt; },
2055
- set: function (value) {
2056
- this._startAt = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value));
2057
- },
2058
- enumerable: false,
2059
- configurable: true
2060
- });
2061
- Object.defineProperty(MatCalendar.prototype, "selected", {
2062
- /** The currently selected date. */
2063
- get: function () { return this._selected; },
2064
- set: function (value) {
2065
- if (value instanceof DateRange) {
2066
- this._selected = value;
2067
- }
2068
- else {
2069
- this._selected = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value));
2070
- }
2071
- },
2072
- enumerable: false,
2073
- configurable: true
2074
- });
2075
- Object.defineProperty(MatCalendar.prototype, "minDate", {
2076
- /** The minimum selectable date. */
2077
- get: function () { return this._minDate; },
2078
- set: function (value) {
2079
- this._minDate = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value));
2080
- },
2081
- enumerable: false,
2082
- configurable: true
2083
- });
2084
- Object.defineProperty(MatCalendar.prototype, "maxDate", {
2085
- /** The maximum selectable date. */
2086
- get: function () { return this._maxDate; },
2087
- set: function (value) {
2088
- this._maxDate = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value));
2089
- },
2090
- enumerable: false,
2091
- configurable: true
2092
- });
2093
- Object.defineProperty(MatCalendar.prototype, "activeDate", {
2094
- /**
2095
- * The current active date. This determines which time period is shown and which date is
2096
- * highlighted when using keyboard navigation.
2097
- */
2098
- get: function () { return this._clampedActiveDate; },
2099
- set: function (value) {
2100
- this._clampedActiveDate = this._dateAdapter.clampDate(value, this.minDate, this.maxDate);
2101
- this.stateChanges.next();
2102
- this._changeDetectorRef.markForCheck();
2103
- },
2104
- enumerable: false,
2105
- configurable: true
2106
- });
2107
- Object.defineProperty(MatCalendar.prototype, "currentView", {
2108
- /** Whether the calendar is in month view. */
2109
- get: function () { return this._currentView; },
2110
- set: function (value) {
2111
- var viewChangedResult = this._currentView !== value ? value : null;
2112
- this._currentView = value;
2113
- this._moveFocusOnNextTick = true;
2114
- this._changeDetectorRef.markForCheck();
2115
- if (viewChangedResult) {
2116
- this.viewChanged.emit(viewChangedResult);
2117
- }
2118
- },
2119
- enumerable: false,
2120
- configurable: true
2121
- });
2122
- MatCalendar.prototype.ngAfterContentInit = function () {
2123
- this._calendarHeaderPortal = new portal.ComponentPortal(this.headerComponent || MatCalendarHeader);
2124
- this.activeDate = this.startAt || this._dateAdapter.today();
2125
- // Assign to the private property since we don't want to move focus on init.
2126
- this._currentView = this.startView;
2127
- };
2128
- MatCalendar.prototype.ngAfterViewChecked = function () {
2129
- if (this._moveFocusOnNextTick) {
2130
- this._moveFocusOnNextTick = false;
2131
- this.focusActiveCell();
2132
- }
2133
- };
2134
- MatCalendar.prototype.ngOnDestroy = function () {
2135
- this._intlChanges.unsubscribe();
2136
- this.stateChanges.complete();
2137
- };
2138
- MatCalendar.prototype.ngOnChanges = function (changes) {
2139
- var change = changes['minDate'] || changes['maxDate'] || changes['dateFilter'];
2140
- if (change && !change.firstChange) {
2141
- var view = this._getCurrentViewComponent();
2142
- if (view) {
2143
- // We need to `detectChanges` manually here, because the `minDate`, `maxDate` etc. are
2144
- // passed down to the view via data bindings which won't be up-to-date when we call `_init`.
2145
- this._changeDetectorRef.detectChanges();
2146
- view._init();
2147
- }
2148
- }
2149
- this.stateChanges.next();
2150
- };
2151
- /** Focuses the active date. */
2152
- MatCalendar.prototype.focusActiveCell = function () {
2153
- this._getCurrentViewComponent()._focusActiveCell(false);
2154
- };
2155
- /** Updates today's date after an update of the active date */
2156
- MatCalendar.prototype.updateTodaysDate = function () {
2157
- this._getCurrentViewComponent()._init();
2158
- };
2159
- /** Handles date selection in the month view. */
2160
- MatCalendar.prototype._dateSelected = function (event) {
2161
- var date = event.value;
2162
- if (this.selected instanceof DateRange ||
2163
- (date && !this._dateAdapter.sameDate(date, this.selected))) {
2164
- this.selectedChange.emit(date);
2165
- }
2166
- this._userSelection.emit(event);
2167
- };
2168
- /** Handles year selection in the multiyear view. */
2169
- MatCalendar.prototype._yearSelectedInMultiYearView = function (normalizedYear) {
2170
- this.yearSelected.emit(normalizedYear);
2171
- };
2172
- /** Handles month selection in the year view. */
2173
- MatCalendar.prototype._monthSelectedInYearView = function (normalizedMonth) {
2174
- this.monthSelected.emit(normalizedMonth);
2175
- };
2176
- /** Handles year/month selection in the multi-year/year views. */
2177
- MatCalendar.prototype._goToDateInView = function (date, view) {
2178
- this.activeDate = date;
2179
- this.currentView = view;
2180
- };
2181
- /** Returns the component instance that corresponds to the current calendar view. */
2182
- MatCalendar.prototype._getCurrentViewComponent = function () {
2183
- // The return type is explicitly written as a union to ensure that the Closure compiler does
2184
- // not optimize calls to _init(). Without the explict return type, TypeScript narrows it to
2185
- // only the first component type. See https://github.com/angular/components/issues/22996.
2186
- return this.monthView || this.yearView || this.multiYearView;
2187
- };
2188
- return MatCalendar;
2189
- }());
2190
- MatCalendar.decorators = [
2191
- { type: i0.Component, args: [{
2192
- selector: 'mat-calendar',
2193
- template: "<ng-template [cdkPortalOutlet]=\"_calendarHeaderPortal\"></ng-template>\n\n<div class=\"mat-calendar-content\" [ngSwitch]=\"currentView\" cdkMonitorSubtreeFocus tabindex=\"-1\">\n <mat-month-view\n *ngSwitchCase=\"'month'\"\n [(activeDate)]=\"activeDate\"\n [selected]=\"selected\"\n [dateFilter]=\"dateFilter\"\n [maxDate]=\"maxDate\"\n [minDate]=\"minDate\"\n [dateClass]=\"dateClass\"\n [comparisonStart]=\"comparisonStart\"\n [comparisonEnd]=\"comparisonEnd\"\n (_userSelection)=\"_dateSelected($event)\">\n </mat-month-view>\n\n <mat-year-view\n *ngSwitchCase=\"'year'\"\n [(activeDate)]=\"activeDate\"\n [selected]=\"selected\"\n [dateFilter]=\"dateFilter\"\n [maxDate]=\"maxDate\"\n [minDate]=\"minDate\"\n [dateClass]=\"dateClass\"\n (monthSelected)=\"_monthSelectedInYearView($event)\"\n (selectedChange)=\"_goToDateInView($event, 'month')\">\n </mat-year-view>\n\n <mat-multi-year-view\n *ngSwitchCase=\"'multi-year'\"\n [(activeDate)]=\"activeDate\"\n [selected]=\"selected\"\n [dateFilter]=\"dateFilter\"\n [maxDate]=\"maxDate\"\n [minDate]=\"minDate\"\n [dateClass]=\"dateClass\"\n (yearSelected)=\"_yearSelectedInMultiYearView($event)\"\n (selectedChange)=\"_goToDateInView($event, 'year')\">\n </mat-multi-year-view>\n</div>\n",
2194
- host: {
2195
- 'class': 'mat-calendar',
2196
- },
2197
- exportAs: 'matCalendar',
2198
- encapsulation: i0.ViewEncapsulation.None,
2199
- changeDetection: i0.ChangeDetectionStrategy.OnPush,
2200
- providers: [MAT_SINGLE_DATE_SELECTION_MODEL_PROVIDER],
2201
- styles: [".mat-calendar{display:block}.mat-calendar-header{padding:8px 8px 0 8px}.mat-calendar-content{padding:0 8px 8px 8px;outline:none}.mat-calendar-controls{display:flex;margin:5% calc(4.7142857143% - 16px)}.mat-calendar-controls .mat-icon-button:hover .mat-button-focus-overlay{opacity:.04}.mat-calendar-spacer{flex:1 1 auto}.mat-calendar-period-button{min-width:0}.mat-calendar-arrow{display:inline-block;width:10px;height:5px;margin:0 0 0 5px;vertical-align:middle}.mat-calendar-arrow.mat-calendar-invert{transform:rotate(180deg)}[dir=rtl] .mat-calendar-arrow{margin:0 5px 0 0}.cdk-high-contrast-active .mat-calendar-arrow{fill:CanvasText}.mat-calendar-previous-button,.mat-calendar-next-button{position:relative}.mat-calendar-previous-button::after,.mat-calendar-next-button::after{top:0;left:0;right:0;bottom:0;position:absolute;content:\"\";margin:15.5px;border:0 solid currentColor;border-top-width:2px}[dir=rtl] .mat-calendar-previous-button,[dir=rtl] .mat-calendar-next-button{transform:rotate(180deg)}.mat-calendar-previous-button::after{border-left-width:2px;transform:translateX(2px) rotate(-45deg)}.mat-calendar-next-button::after{border-right-width:2px;transform:translateX(-2px) rotate(45deg)}.mat-calendar-table{border-spacing:0;border-collapse:collapse;width:100%}.mat-calendar-table-header th{text-align:center;padding:0 0 8px 0}.mat-calendar-table-header-divider{position:relative;height:1px}.mat-calendar-table-header-divider::after{content:\"\";position:absolute;top:0;left:-8px;right:-8px;height:1px}.mat-calendar-abbr{text-decoration:none}\n"]
2202
- },] }
2203
- ];
2204
- MatCalendar.ctorParameters = function () { return [
2205
- { type: MatDatepickerIntl },
2206
- { type: core.DateAdapter, decorators: [{ type: i0.Optional }] },
2207
- { type: undefined, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [core.MAT_DATE_FORMATS,] }] },
2208
- { type: i0.ChangeDetectorRef }
2209
- ]; };
2210
- MatCalendar.propDecorators = {
2211
- headerComponent: [{ type: i0.Input }],
2212
- startAt: [{ type: i0.Input }],
2213
- startView: [{ type: i0.Input }],
2214
- selected: [{ type: i0.Input }],
2215
- minDate: [{ type: i0.Input }],
2216
- maxDate: [{ type: i0.Input }],
2217
- dateFilter: [{ type: i0.Input }],
2218
- dateClass: [{ type: i0.Input }],
2219
- comparisonStart: [{ type: i0.Input }],
2220
- comparisonEnd: [{ type: i0.Input }],
2221
- selectedChange: [{ type: i0.Output }],
2222
- yearSelected: [{ type: i0.Output }],
2223
- monthSelected: [{ type: i0.Output }],
2224
- viewChanged: [{ type: i0.Output }],
2225
- _userSelection: [{ type: i0.Output }],
2226
- monthView: [{ type: i0.ViewChild, args: [MatMonthView,] }],
2227
- yearView: [{ type: i0.ViewChild, args: [MatYearView,] }],
2228
- multiYearView: [{ type: i0.ViewChild, args: [MatMultiYearView,] }]
2229
- };
2230
-
2231
- /**
2232
- * @license
2233
- * Copyright Google LLC All Rights Reserved.
2234
- *
2235
- * Use of this source code is governed by an MIT-style license that can be
2236
- * found in the LICENSE file at https://angular.io/license
2237
- */
2238
- /**
2239
- * Animations used by the Material datepicker.
2240
- * @docs-private
2241
- */
2242
- var matDatepickerAnimations = {
2243
- /** Transforms the height of the datepicker's calendar. */
2244
- transformPanel: animations.trigger('transformPanel', [
2245
- animations.transition('void => enter-dropdown', animations.animate('120ms cubic-bezier(0, 0, 0.2, 1)', animations.keyframes([
2246
- animations.style({ opacity: 0, transform: 'scale(1, 0.8)' }),
2247
- animations.style({ opacity: 1, transform: 'scale(1, 1)' })
2248
- ]))),
2249
- animations.transition('void => enter-dialog', animations.animate('150ms cubic-bezier(0, 0, 0.2, 1)', animations.keyframes([
2250
- animations.style({ opacity: 0, transform: 'scale(0.7)' }),
2251
- animations.style({ transform: 'none', opacity: 1 })
2252
- ]))),
2253
- animations.transition('* => void', animations.animate('100ms linear', animations.style({ opacity: 0 })))
2254
- ]),
2255
- /** Fades in the content of the calendar. */
2256
- fadeInCalendar: animations.trigger('fadeInCalendar', [
2257
- animations.state('void', animations.style({ opacity: 0 })),
2258
- animations.state('enter', animations.style({ opacity: 1 })),
2259
- // TODO(crisbeto): this animation should be removed since it isn't quite on spec, but we
2260
- // need to keep it until #12440 gets in, otherwise the exit animation will look glitchy.
2261
- animations.transition('void => *', animations.animate('120ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)'))
2262
- ])
2263
- };
2264
-
2265
- /** Used to generate a unique ID for each datepicker instance. */
2266
- var datepickerUid = 0;
2267
- /** Injection token that determines the scroll handling while the calendar is open. */
2268
- var MAT_DATEPICKER_SCROLL_STRATEGY = new i0.InjectionToken('mat-datepicker-scroll-strategy');
2269
- /** @docs-private */
2270
- function MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY(overlay) {
2271
- return function () { return overlay.scrollStrategies.reposition(); };
2272
- }
2273
- /** @docs-private */
2274
- var MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY_PROVIDER = {
2275
- provide: MAT_DATEPICKER_SCROLL_STRATEGY,
2276
- deps: [overlay.Overlay],
2277
- useFactory: MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY,
2278
- };
2279
- // Boilerplate for applying mixins to MatDatepickerContent.
2280
- /** @docs-private */
2281
- var _MatDatepickerContentBase = core.mixinColor(/** @class */ (function () {
2282
- function class_1(_elementRef) {
2283
- this._elementRef = _elementRef;
2284
- }
2285
- return class_1;
2286
- }()));
2287
- /**
2288
- * Component used as the content for the datepicker overlay. We use this instead of using
2289
- * MatCalendar directly as the content so we can control the initial focus. This also gives us a
2290
- * place to put additional features of the overlay that are not part of the calendar itself in the
2291
- * future. (e.g. confirmation buttons).
2292
- * @docs-private
2293
- */
2294
- var MatDatepickerContent = /** @class */ (function (_super) {
2295
- __extends(MatDatepickerContent, _super);
2296
- function MatDatepickerContent(elementRef, _changeDetectorRef, _globalModel, _dateAdapter, _rangeSelectionStrategy, intl) {
2297
- var _this = _super.call(this, elementRef) || this;
2298
- _this._changeDetectorRef = _changeDetectorRef;
2299
- _this._globalModel = _globalModel;
2300
- _this._dateAdapter = _dateAdapter;
2301
- _this._rangeSelectionStrategy = _rangeSelectionStrategy;
2302
- _this._subscriptions = new rxjs.Subscription();
2303
- /** Emits when an animation has finished. */
2304
- _this._animationDone = new rxjs.Subject();
2305
- /** Portal with projected action buttons. */
2306
- _this._actionsPortal = null;
2307
- _this._closeButtonText = intl.closeCalendarLabel;
2308
- return _this;
2309
- }
2310
- MatDatepickerContent.prototype.ngOnInit = function () {
2311
- // If we have actions, clone the model so that we have the ability to cancel the selection,
2312
- // otherwise update the global model directly. Note that we want to assign this as soon as
2313
- // possible, but `_actionsPortal` isn't available in the constructor so we do it in `ngOnInit`.
2314
- this._model = this._actionsPortal ? this._globalModel.clone() : this._globalModel;
2315
- this._animationState = this.datepicker.touchUi ? 'enter-dialog' : 'enter-dropdown';
2316
- };
2317
- MatDatepickerContent.prototype.ngAfterViewInit = function () {
2318
- var _this = this;
2319
- this._subscriptions.add(this.datepicker.stateChanges.subscribe(function () {
2320
- _this._changeDetectorRef.markForCheck();
2321
- }));
2322
- this._calendar.focusActiveCell();
2323
- };
2324
- MatDatepickerContent.prototype.ngOnDestroy = function () {
2325
- this._subscriptions.unsubscribe();
2326
- this._animationDone.complete();
2327
- };
2328
- MatDatepickerContent.prototype._handleUserSelection = function (event) {
2329
- var selection = this._model.selection;
2330
- var value = event.value;
2331
- var isRange = selection instanceof DateRange;
2332
- // If we're selecting a range and we have a selection strategy, always pass the value through
2333
- // there. Otherwise don't assign null values to the model, unless we're selecting a range.
2334
- // A null value when picking a range means that the user cancelled the selection (e.g. by
2335
- // pressing escape), whereas when selecting a single value it means that the value didn't
2336
- // change. This isn't very intuitive, but it's here for backwards-compatibility.
2337
- if (isRange && this._rangeSelectionStrategy) {
2338
- var newSelection = this._rangeSelectionStrategy.selectionFinished(value, selection, event.event);
2339
- this._model.updateSelection(newSelection, this);
2340
- }
2341
- else if (value && (isRange ||
2342
- !this._dateAdapter.sameDate(value, selection))) {
2343
- this._model.add(value);
2344
- }
2345
- // Delegate closing the overlay to the actions.
2346
- if ((!this._model || this._model.isComplete()) && !this._actionsPortal) {
2347
- this.datepicker.close();
2348
- }
2349
- };
2350
- MatDatepickerContent.prototype._startExitAnimation = function () {
2351
- this._animationState = 'void';
2352
- this._changeDetectorRef.markForCheck();
2353
- };
2354
- MatDatepickerContent.prototype._getSelected = function () {
2355
- return this._model.selection;
2356
- };
2357
- /** Applies the current pending selection to the global model. */
2358
- MatDatepickerContent.prototype._applyPendingSelection = function () {
2359
- if (this._model !== this._globalModel) {
2360
- this._globalModel.updateSelection(this._model.selection, this);
2361
- }
2362
- };
2363
- return MatDatepickerContent;
2364
- }(_MatDatepickerContentBase));
2365
- MatDatepickerContent.decorators = [
2366
- { type: i0.Component, args: [{
2367
- selector: 'mat-datepicker-content',
2368
- template: "<div\n cdkTrapFocus\n class=\"mat-datepicker-content-container\"\n [class.mat-datepicker-content-container-with-actions]=\"_actionsPortal\">\n <mat-calendar\n [id]=\"datepicker.id\"\n [ngClass]=\"datepicker.panelClass\"\n [startAt]=\"datepicker.startAt\"\n [startView]=\"datepicker.startView\"\n [minDate]=\"datepicker._getMinDate()\"\n [maxDate]=\"datepicker._getMaxDate()\"\n [dateFilter]=\"datepicker._getDateFilter()\"\n [headerComponent]=\"datepicker.calendarHeaderComponent\"\n [selected]=\"_getSelected()\"\n [dateClass]=\"datepicker.dateClass\"\n [comparisonStart]=\"comparisonStart\"\n [comparisonEnd]=\"comparisonEnd\"\n [@fadeInCalendar]=\"'enter'\"\n (yearSelected)=\"datepicker._selectYear($event)\"\n (monthSelected)=\"datepicker._selectMonth($event)\"\n (viewChanged)=\"datepicker._viewChanged($event)\"\n (_userSelection)=\"_handleUserSelection($event)\"></mat-calendar>\n\n <ng-template [cdkPortalOutlet]=\"_actionsPortal\"></ng-template>\n\n <!-- Invisible close button for screen reader users. -->\n <button\n type=\"button\"\n mat-raised-button\n [color]=\"color || 'primary'\"\n class=\"mat-datepicker-close-button\"\n [class.cdk-visually-hidden]=\"!_closeButtonFocused\"\n (focus)=\"_closeButtonFocused = true\"\n (blur)=\"_closeButtonFocused = false\"\n (click)=\"datepicker.close()\">{{ _closeButtonText }}</button>\n</div>\n",
2369
- host: {
2370
- 'class': 'mat-datepicker-content',
2371
- '[@transformPanel]': '_animationState',
2372
- '(@transformPanel.done)': '_animationDone.next()',
2373
- '[class.mat-datepicker-content-touch]': 'datepicker.touchUi',
2374
- },
2375
- animations: [
2376
- matDatepickerAnimations.transformPanel,
2377
- matDatepickerAnimations.fadeInCalendar,
2378
- ],
2379
- exportAs: 'matDatepickerContent',
2380
- encapsulation: i0.ViewEncapsulation.None,
2381
- changeDetection: i0.ChangeDetectionStrategy.OnPush,
2382
- inputs: ['color'],
2383
- styles: [".mat-datepicker-content{display:block;border-radius:4px}.mat-datepicker-content .mat-calendar{width:296px;height:354px}.mat-datepicker-content .mat-datepicker-close-button{position:absolute;top:100%;left:0;margin-top:8px}.ng-animating .mat-datepicker-content .mat-datepicker-close-button{display:none}.mat-datepicker-content-container{display:flex;flex-direction:column;justify-content:space-between}.mat-datepicker-content-touch{display:block;max-height:80vh;position:relative;overflow:visible}.mat-datepicker-content-touch .mat-datepicker-content-container{min-height:312px;max-height:788px;min-width:250px;max-width:750px}.mat-datepicker-content-touch .mat-calendar{width:100%;height:auto}@media all and (orientation: landscape){.mat-datepicker-content-touch .mat-datepicker-content-container{width:64vh;height:80vh}}@media all and (orientation: portrait){.mat-datepicker-content-touch .mat-datepicker-content-container{width:80vw;height:100vw}.mat-datepicker-content-touch .mat-datepicker-content-container-with-actions{height:115vw}}\n"]
2384
- },] }
2385
- ];
2386
- MatDatepickerContent.ctorParameters = function () { return [
2387
- { type: i0.ElementRef },
2388
- { type: i0.ChangeDetectorRef },
2389
- { type: MatDateSelectionModel },
2390
- { type: core.DateAdapter },
2391
- { type: undefined, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [MAT_DATE_RANGE_SELECTION_STRATEGY,] }] },
2392
- { type: MatDatepickerIntl }
2393
- ]; };
2394
- MatDatepickerContent.propDecorators = {
2395
- _calendar: [{ type: i0.ViewChild, args: [MatCalendar,] }]
2396
- };
2397
- /** Base class for a datepicker. */
2398
- var MatDatepickerBase = /** @class */ (function () {
2399
- function MatDatepickerBase(_overlay, _ngZone, _viewContainerRef, scrollStrategy, _dateAdapter, _dir, _model) {
2400
- this._overlay = _overlay;
2401
- this._ngZone = _ngZone;
2402
- this._viewContainerRef = _viewContainerRef;
2403
- this._dateAdapter = _dateAdapter;
2404
- this._dir = _dir;
2405
- this._model = _model;
2406
- this._inputStateChanges = rxjs.Subscription.EMPTY;
2407
- /** The view that the calendar should start in. */
2408
- this.startView = 'month';
2409
- this._touchUi = false;
2410
- /** Preferred position of the datepicker in the X axis. */
2411
- this.xPosition = 'start';
2412
- /** Preferred position of the datepicker in the Y axis. */
2413
- this.yPosition = 'below';
2414
- this._restoreFocus = true;
2415
- /**
2416
- * Emits selected year in multiyear view.
2417
- * This doesn't imply a change on the selected date.
2418
- */
2419
- this.yearSelected = new i0.EventEmitter();
2420
- /**
2421
- * Emits selected month in year view.
2422
- * This doesn't imply a change on the selected date.
2423
- */
2424
- this.monthSelected = new i0.EventEmitter();
2425
- /**
2426
- * Emits when the current view changes.
2427
- */
2428
- this.viewChanged = new i0.EventEmitter(true);
2429
- /** Emits when the datepicker has been opened. */
2430
- this.openedStream = new i0.EventEmitter();
2431
- /** Emits when the datepicker has been closed. */
2432
- this.closedStream = new i0.EventEmitter();
2433
- this._opened = false;
2434
- /** The id for the datepicker calendar. */
2435
- this.id = "mat-datepicker-" + datepickerUid++;
2436
- /** The element that was focused before the datepicker was opened. */
2437
- this._focusedElementBeforeOpen = null;
2438
- /** Unique class that will be added to the backdrop so that the test harnesses can look it up. */
2439
- this._backdropHarnessClass = this.id + "-backdrop";
2440
- /** Emits when the datepicker's state changes. */
2441
- this.stateChanges = new rxjs.Subject();
2442
- if (!this._dateAdapter && (typeof ngDevMode === 'undefined' || ngDevMode)) {
2443
- throw createMissingDateImplError('DateAdapter');
2444
- }
2445
- this._scrollStrategy = scrollStrategy;
2446
- }
2447
- Object.defineProperty(MatDatepickerBase.prototype, "startAt", {
2448
- /** The date to open the calendar to initially. */
2449
- get: function () {
2450
- // If an explicit startAt is set we start there, otherwise we start at whatever the currently
2451
- // selected value is.
2452
- return this._startAt || (this.datepickerInput ? this.datepickerInput.getStartValue() : null);
2453
- },
2454
- set: function (value) {
2455
- this._startAt = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value));
2456
- },
2457
- enumerable: false,
2458
- configurable: true
2459
- });
2460
- Object.defineProperty(MatDatepickerBase.prototype, "color", {
2461
- /** Color palette to use on the datepicker's calendar. */
2462
- get: function () {
2463
- return this._color ||
2464
- (this.datepickerInput ? this.datepickerInput.getThemePalette() : undefined);
2465
- },
2466
- set: function (value) {
2467
- this._color = value;
2468
- },
2469
- enumerable: false,
2470
- configurable: true
2471
- });
2472
- Object.defineProperty(MatDatepickerBase.prototype, "touchUi", {
2473
- /**
2474
- * Whether the calendar UI is in touch mode. In touch mode the calendar opens in a dialog rather
2475
- * than a dropdown and elements have more padding to allow for bigger touch targets.
2476
- */
2477
- get: function () { return this._touchUi; },
2478
- set: function (value) {
2479
- this._touchUi = coercion.coerceBooleanProperty(value);
2480
- },
2481
- enumerable: false,
2482
- configurable: true
2483
- });
2484
- Object.defineProperty(MatDatepickerBase.prototype, "disabled", {
2485
- /** Whether the datepicker pop-up should be disabled. */
2486
- get: function () {
2487
- return this._disabled === undefined && this.datepickerInput ?
2488
- this.datepickerInput.disabled : !!this._disabled;
2489
- },
2490
- set: function (value) {
2491
- var newValue = coercion.coerceBooleanProperty(value);
2492
- if (newValue !== this._disabled) {
2493
- this._disabled = newValue;
2494
- this.stateChanges.next(undefined);
2495
- }
2496
- },
2497
- enumerable: false,
2498
- configurable: true
2499
- });
2500
- Object.defineProperty(MatDatepickerBase.prototype, "restoreFocus", {
2501
- /**
2502
- * Whether to restore focus to the previously-focused element when the calendar is closed.
2503
- * Note that automatic focus restoration is an accessibility feature and it is recommended that
2504
- * you provide your own equivalent, if you decide to turn it off.
2505
- */
2506
- get: function () { return this._restoreFocus; },
2507
- set: function (value) {
2508
- this._restoreFocus = coercion.coerceBooleanProperty(value);
2509
- },
2510
- enumerable: false,
2511
- configurable: true
2512
- });
2513
- Object.defineProperty(MatDatepickerBase.prototype, "panelClass", {
2514
- /**
2515
- * Classes to be passed to the date picker panel.
2516
- * Supports string and string array values, similar to `ngClass`.
2517
- */
2518
- get: function () { return this._panelClass; },
2519
- set: function (value) {
2520
- this._panelClass = coercion.coerceStringArray(value);
2521
- },
2522
- enumerable: false,
2523
- configurable: true
2524
- });
2525
- Object.defineProperty(MatDatepickerBase.prototype, "opened", {
2526
- /** Whether the calendar is open. */
2527
- get: function () { return this._opened; },
2528
- set: function (value) {
2529
- coercion.coerceBooleanProperty(value) ? this.open() : this.close();
2530
- },
2531
- enumerable: false,
2532
- configurable: true
2533
- });
2534
- /** The minimum selectable date. */
2535
- MatDatepickerBase.prototype._getMinDate = function () {
2536
- return this.datepickerInput && this.datepickerInput.min;
2537
- };
2538
- /** The maximum selectable date. */
2539
- MatDatepickerBase.prototype._getMaxDate = function () {
2540
- return this.datepickerInput && this.datepickerInput.max;
2541
- };
2542
- MatDatepickerBase.prototype._getDateFilter = function () {
2543
- return this.datepickerInput && this.datepickerInput.dateFilter;
2544
- };
2545
- MatDatepickerBase.prototype.ngOnChanges = function (changes) {
2546
- var positionChange = changes['xPosition'] || changes['yPosition'];
2547
- if (positionChange && !positionChange.firstChange && this._overlayRef) {
2548
- var positionStrategy = this._overlayRef.getConfig().positionStrategy;
2549
- if (positionStrategy instanceof overlay.FlexibleConnectedPositionStrategy) {
2550
- this._setConnectedPositions(positionStrategy);
2551
- if (this.opened) {
2552
- this._overlayRef.updatePosition();
2553
- }
2554
- }
2555
- }
2556
- this.stateChanges.next(undefined);
2557
- };
2558
- MatDatepickerBase.prototype.ngOnDestroy = function () {
2559
- this._destroyOverlay();
2560
- this.close();
2561
- this._inputStateChanges.unsubscribe();
2562
- this.stateChanges.complete();
2563
- };
2564
- /** Selects the given date */
2565
- MatDatepickerBase.prototype.select = function (date) {
2566
- this._model.add(date);
2567
- };
2568
- /** Emits the selected year in multiyear view */
2569
- MatDatepickerBase.prototype._selectYear = function (normalizedYear) {
2570
- this.yearSelected.emit(normalizedYear);
2571
- };
2572
- /** Emits selected month in year view */
2573
- MatDatepickerBase.prototype._selectMonth = function (normalizedMonth) {
2574
- this.monthSelected.emit(normalizedMonth);
2575
- };
2576
- /** Emits changed view */
2577
- MatDatepickerBase.prototype._viewChanged = function (view) {
2578
- this.viewChanged.emit(view);
2579
- };
2580
- /**
2581
- * Register an input with this datepicker.
2582
- * @param input The datepicker input to register with this datepicker.
2583
- * @returns Selection model that the input should hook itself up to.
2584
- */
2585
- MatDatepickerBase.prototype.registerInput = function (input) {
2586
- var _this = this;
2587
- if (this.datepickerInput && (typeof ngDevMode === 'undefined' || ngDevMode)) {
2588
- throw Error('A MatDatepicker can only be associated with a single input.');
2589
- }
2590
- this._inputStateChanges.unsubscribe();
2591
- this.datepickerInput = input;
2592
- this._inputStateChanges =
2593
- input.stateChanges.subscribe(function () { return _this.stateChanges.next(undefined); });
2594
- return this._model;
2595
- };
2596
- /**
2597
- * Registers a portal containing action buttons with the datepicker.
2598
- * @param portal Portal to be registered.
2599
- */
2600
- MatDatepickerBase.prototype.registerActions = function (portal) {
2601
- if (this._actionsPortal && (typeof ngDevMode === 'undefined' || ngDevMode)) {
2602
- throw Error('A MatDatepicker can only be associated with a single actions row.');
2603
- }
2604
- this._actionsPortal = portal;
2605
- };
2606
- /**
2607
- * Removes a portal containing action buttons from the datepicker.
2608
- * @param portal Portal to be removed.
2609
- */
2610
- MatDatepickerBase.prototype.removeActions = function (portal) {
2611
- if (portal === this._actionsPortal) {
2612
- this._actionsPortal = null;
2613
- }
2614
- };
2615
- /** Open the calendar. */
2616
- MatDatepickerBase.prototype.open = function () {
2617
- if (this._opened || this.disabled) {
2618
- return;
2619
- }
2620
- if (!this.datepickerInput && (typeof ngDevMode === 'undefined' || ngDevMode)) {
2621
- throw Error('Attempted to open an MatDatepicker with no associated input.');
2622
- }
2623
- this._focusedElementBeforeOpen = platform._getFocusedElementPierceShadowDom();
2624
- this._openOverlay();
2625
- this._opened = true;
2626
- this.openedStream.emit();
2627
- };
2628
- /** Close the calendar. */
2629
- MatDatepickerBase.prototype.close = function () {
2630
- var _this = this;
2631
- if (!this._opened) {
2632
- return;
2633
- }
2634
- if (this._componentRef) {
2635
- var instance = this._componentRef.instance;
2636
- instance._startExitAnimation();
2637
- instance._animationDone.pipe(operators.take(1)).subscribe(function () { return _this._destroyOverlay(); });
2638
- }
2639
- var completeClose = function () {
2640
- // The `_opened` could've been reset already if
2641
- // we got two events in quick succession.
2642
- if (_this._opened) {
2643
- _this._opened = false;
2644
- _this.closedStream.emit();
2645
- _this._focusedElementBeforeOpen = null;
2646
- }
2647
- };
2648
- if (this._restoreFocus && this._focusedElementBeforeOpen &&
2649
- typeof this._focusedElementBeforeOpen.focus === 'function') {
2650
- // Because IE moves focus asynchronously, we can't count on it being restored before we've
2651
- // marked the datepicker as closed. If the event fires out of sequence and the element that
2652
- // we're refocusing opens the datepicker on focus, the user could be stuck with not being
2653
- // able to close the calendar at all. We work around it by making the logic, that marks
2654
- // the datepicker as closed, async as well.
2655
- this._focusedElementBeforeOpen.focus();
2656
- setTimeout(completeClose);
2657
- }
2658
- else {
2659
- completeClose();
2660
- }
2661
- };
2662
- /** Applies the current pending selection on the overlay to the model. */
2663
- MatDatepickerBase.prototype._applyPendingSelection = function () {
2664
- var _a, _b;
2665
- (_b = (_a = this._componentRef) === null || _a === void 0 ? void 0 : _a.instance) === null || _b === void 0 ? void 0 : _b._applyPendingSelection();
2666
- };
2667
- /** Forwards relevant values from the datepicker to the datepicker content inside the overlay. */
2668
- MatDatepickerBase.prototype._forwardContentValues = function (instance) {
2669
- instance.datepicker = this;
2670
- instance.color = this.color;
2671
- instance._actionsPortal = this._actionsPortal;
2672
- };
2673
- /** Opens the overlay with the calendar. */
2674
- MatDatepickerBase.prototype._openOverlay = function () {
2675
- var _this = this;
2676
- this._destroyOverlay();
2677
- var isDialog = this.touchUi;
2678
- var labelId = this.datepickerInput.getOverlayLabelId();
2679
- var portal$1 = new portal.ComponentPortal(MatDatepickerContent, this._viewContainerRef);
2680
- var overlayRef = this._overlayRef = this._overlay.create(new overlay.OverlayConfig({
2681
- positionStrategy: isDialog ? this._getDialogStrategy() : this._getDropdownStrategy(),
2682
- hasBackdrop: true,
2683
- backdropClass: [
2684
- isDialog ? 'cdk-overlay-dark-backdrop' : 'mat-overlay-transparent-backdrop',
2685
- this._backdropHarnessClass
2686
- ],
2687
- direction: this._dir,
2688
- scrollStrategy: isDialog ? this._overlay.scrollStrategies.block() : this._scrollStrategy(),
2689
- panelClass: "mat-datepicker-" + (isDialog ? 'dialog' : 'popup'),
2690
- }));
2691
- var overlayElement = overlayRef.overlayElement;
2692
- overlayElement.setAttribute('role', 'dialog');
2693
- if (labelId) {
2694
- overlayElement.setAttribute('aria-labelledby', labelId);
2695
- }
2696
- if (isDialog) {
2697
- overlayElement.setAttribute('aria-modal', 'true');
2698
- }
2699
- this._getCloseStream(overlayRef).subscribe(function (event) {
2700
- if (event) {
2701
- event.preventDefault();
2702
- }
2703
- _this.close();
2704
- });
2705
- this._componentRef = overlayRef.attach(portal$1);
2706
- this._forwardContentValues(this._componentRef.instance);
2707
- // Update the position once the calendar has rendered. Only relevant in dropdown mode.
2708
- if (!isDialog) {
2709
- this._ngZone.onStable.pipe(operators.take(1)).subscribe(function () { return overlayRef.updatePosition(); });
2710
- }
2711
- };
2712
- /** Destroys the current overlay. */
2713
- MatDatepickerBase.prototype._destroyOverlay = function () {
2714
- if (this._overlayRef) {
2715
- this._overlayRef.dispose();
2716
- this._overlayRef = this._componentRef = null;
2717
- }
2718
- };
2719
- /** Gets a position strategy that will open the calendar as a dropdown. */
2720
- MatDatepickerBase.prototype._getDialogStrategy = function () {
2721
- return this._overlay.position().global().centerHorizontally().centerVertically();
2722
- };
2723
- /** Gets a position strategy that will open the calendar as a dropdown. */
2724
- MatDatepickerBase.prototype._getDropdownStrategy = function () {
2725
- var strategy = this._overlay.position()
2726
- .flexibleConnectedTo(this.datepickerInput.getConnectedOverlayOrigin())
2727
- .withTransformOriginOn('.mat-datepicker-content')
2728
- .withFlexibleDimensions(false)
2729
- .withViewportMargin(8)
2730
- .withLockedPosition();
2731
- return this._setConnectedPositions(strategy);
2732
- };
2733
- /** Sets the positions of the datepicker in dropdown mode based on the current configuration. */
2734
- MatDatepickerBase.prototype._setConnectedPositions = function (strategy) {
2735
- var primaryX = this.xPosition === 'end' ? 'end' : 'start';
2736
- var secondaryX = primaryX === 'start' ? 'end' : 'start';
2737
- var primaryY = this.yPosition === 'above' ? 'bottom' : 'top';
2738
- var secondaryY = primaryY === 'top' ? 'bottom' : 'top';
2739
- return strategy.withPositions([
2740
- {
2741
- originX: primaryX,
2742
- originY: secondaryY,
2743
- overlayX: primaryX,
2744
- overlayY: primaryY
2745
- },
2746
- {
2747
- originX: primaryX,
2748
- originY: primaryY,
2749
- overlayX: primaryX,
2750
- overlayY: secondaryY
2751
- },
2752
- {
2753
- originX: secondaryX,
2754
- originY: secondaryY,
2755
- overlayX: secondaryX,
2756
- overlayY: primaryY
2757
- },
2758
- {
2759
- originX: secondaryX,
2760
- originY: primaryY,
2761
- overlayX: secondaryX,
2762
- overlayY: secondaryY
2763
- }
2764
- ]);
2765
- };
2766
- /** Gets an observable that will emit when the overlay is supposed to be closed. */
2767
- MatDatepickerBase.prototype._getCloseStream = function (overlayRef) {
2768
- var _this = this;
2769
- return rxjs.merge(overlayRef.backdropClick(), overlayRef.detachments(), overlayRef.keydownEvents().pipe(operators.filter(function (event) {
2770
- // Closing on alt + up is only valid when there's an input associated with the datepicker.
2771
- return (event.keyCode === keycodes.ESCAPE && !keycodes.hasModifierKey(event)) || (_this.datepickerInput &&
2772
- keycodes.hasModifierKey(event, 'altKey') && event.keyCode === keycodes.UP_ARROW);
2773
- })));
2774
- };
2775
- return MatDatepickerBase;
2776
- }());
2777
- MatDatepickerBase.decorators = [
2778
- { type: i0.Directive }
2779
- ];
2780
- MatDatepickerBase.ctorParameters = function () { return [
2781
- { type: overlay.Overlay },
2782
- { type: i0.NgZone },
2783
- { type: i0.ViewContainerRef },
2784
- { type: undefined, decorators: [{ type: i0.Inject, args: [MAT_DATEPICKER_SCROLL_STRATEGY,] }] },
2785
- { type: core.DateAdapter, decorators: [{ type: i0.Optional }] },
2786
- { type: bidi.Directionality, decorators: [{ type: i0.Optional }] },
2787
- { type: MatDateSelectionModel }
2788
- ]; };
2789
- MatDatepickerBase.propDecorators = {
2790
- calendarHeaderComponent: [{ type: i0.Input }],
2791
- startAt: [{ type: i0.Input }],
2792
- startView: [{ type: i0.Input }],
2793
- color: [{ type: i0.Input }],
2794
- touchUi: [{ type: i0.Input }],
2795
- disabled: [{ type: i0.Input }],
2796
- xPosition: [{ type: i0.Input }],
2797
- yPosition: [{ type: i0.Input }],
2798
- restoreFocus: [{ type: i0.Input }],
2799
- yearSelected: [{ type: i0.Output }],
2800
- monthSelected: [{ type: i0.Output }],
2801
- viewChanged: [{ type: i0.Output }],
2802
- dateClass: [{ type: i0.Input }],
2803
- openedStream: [{ type: i0.Output, args: ['opened',] }],
2804
- closedStream: [{ type: i0.Output, args: ['closed',] }],
2805
- panelClass: [{ type: i0.Input }],
2806
- opened: [{ type: i0.Input }]
2807
- };
2808
-
2809
- // TODO(mmalerba): We use a component instead of a directive here so the user can use implicit
2810
- // template reference variables (e.g. #d vs #d="matDatepicker"). We can change this to a directive
2811
- // if angular adds support for `exportAs: '$implicit'` on directives.
2812
- /** Component responsible for managing the datepicker popup/dialog. */
2813
- var MatDatepicker = /** @class */ (function (_super) {
2814
- __extends(MatDatepicker, _super);
2815
- function MatDatepicker() {
2816
- return _super !== null && _super.apply(this, arguments) || this;
2817
- }
2818
- return MatDatepicker;
2819
- }(MatDatepickerBase));
2820
- MatDatepicker.decorators = [
2821
- { type: i0.Component, args: [{
2822
- selector: 'mat-datepicker',
2823
- template: '',
2824
- exportAs: 'matDatepicker',
2825
- changeDetection: i0.ChangeDetectionStrategy.OnPush,
2826
- encapsulation: i0.ViewEncapsulation.None,
2827
- providers: [
2828
- MAT_SINGLE_DATE_SELECTION_MODEL_PROVIDER,
2829
- { provide: MatDatepickerBase, useExisting: MatDatepicker },
2830
- ]
2831
- },] }
2832
- ];
2833
-
2834
- /**
2835
- * An event used for datepicker input and change events. We don't always have access to a native
2836
- * input or change event because the event may have been triggered by the user clicking on the
2837
- * calendar popup. For consistency, we always use MatDatepickerInputEvent instead.
2838
- */
2839
- var MatDatepickerInputEvent = /** @class */ (function () {
2840
- function MatDatepickerInputEvent(
2841
- /** Reference to the datepicker input component that emitted the event. */
2842
- target,
2843
- /** Reference to the native input element associated with the datepicker input. */
2844
- targetElement) {
2845
- this.target = target;
2846
- this.targetElement = targetElement;
2847
- this.value = this.target.value;
2848
- }
2849
- return MatDatepickerInputEvent;
2850
- }());
2851
- /** Base class for datepicker inputs. */
2852
- var MatDatepickerInputBase = /** @class */ (function () {
2853
- function MatDatepickerInputBase(_elementRef, _dateAdapter, _dateFormats) {
2854
- var _this = this;
2855
- this._elementRef = _elementRef;
2856
- this._dateAdapter = _dateAdapter;
2857
- this._dateFormats = _dateFormats;
2858
- /** Emits when a `change` event is fired on this `<input>`. */
2859
- this.dateChange = new i0.EventEmitter();
2860
- /** Emits when an `input` event is fired on this `<input>`. */
2861
- this.dateInput = new i0.EventEmitter();
2862
- /** Emits when the internal state has changed */
2863
- this.stateChanges = new rxjs.Subject();
2864
- this._onTouched = function () { };
2865
- this._validatorOnChange = function () { };
2866
- this._cvaOnChange = function () { };
2867
- this._valueChangesSubscription = rxjs.Subscription.EMPTY;
2868
- this._localeSubscription = rxjs.Subscription.EMPTY;
2869
- /** The form control validator for whether the input parses. */
2870
- this._parseValidator = function () {
2871
- return _this._lastValueValid ?
2872
- null : { 'matDatepickerParse': { 'text': _this._elementRef.nativeElement.value } };
2873
- };
2874
- /** The form control validator for the date filter. */
2875
- this._filterValidator = function (control) {
2876
- var controlValue = _this._dateAdapter.getValidDateOrNull(_this._dateAdapter.deserialize(control.value));
2877
- return !controlValue || _this._matchesFilter(controlValue) ?
2878
- null : { 'matDatepickerFilter': true };
2879
- };
2880
- /** The form control validator for the min date. */
2881
- this._minValidator = function (control) {
2882
- var controlValue = _this._dateAdapter.getValidDateOrNull(_this._dateAdapter.deserialize(control.value));
2883
- var min = _this._getMinDate();
2884
- return (!min || !controlValue ||
2885
- _this._dateAdapter.compareDate(min, controlValue) <= 0) ?
2886
- null : { 'matDatepickerMin': { 'min': min, 'actual': controlValue } };
2887
- };
2888
- /** The form control validator for the max date. */
2889
- this._maxValidator = function (control) {
2890
- var controlValue = _this._dateAdapter.getValidDateOrNull(_this._dateAdapter.deserialize(control.value));
2891
- var max = _this._getMaxDate();
2892
- return (!max || !controlValue ||
2893
- _this._dateAdapter.compareDate(max, controlValue) >= 0) ?
2894
- null : { 'matDatepickerMax': { 'max': max, 'actual': controlValue } };
2895
- };
2896
- /** Whether the last value set on the input was valid. */
2897
- this._lastValueValid = false;
2898
- if (typeof ngDevMode === 'undefined' || ngDevMode) {
2899
- if (!this._dateAdapter) {
2900
- throw createMissingDateImplError('DateAdapter');
2901
- }
2902
- if (!this._dateFormats) {
2903
- throw createMissingDateImplError('MAT_DATE_FORMATS');
2904
- }
2905
- }
2906
- // Update the displayed date when the locale changes.
2907
- this._localeSubscription = _dateAdapter.localeChanges.subscribe(function () {
2908
- _this._assignValueProgrammatically(_this.value);
2909
- });
2910
- }
2911
- Object.defineProperty(MatDatepickerInputBase.prototype, "value", {
2912
- /** The value of the input. */
2913
- get: function () {
2914
- return this._model ? this._getValueFromModel(this._model.selection) : this._pendingValue;
2915
- },
2916
- set: function (value) {
2917
- this._assignValueProgrammatically(value);
2918
- },
2919
- enumerable: false,
2920
- configurable: true
2921
- });
2922
- Object.defineProperty(MatDatepickerInputBase.prototype, "disabled", {
2923
- /** Whether the datepicker-input is disabled. */
2924
- get: function () { return !!this._disabled || this._parentDisabled(); },
2925
- set: function (value) {
2926
- var newValue = coercion.coerceBooleanProperty(value);
2927
- var element = this._elementRef.nativeElement;
2928
- if (this._disabled !== newValue) {
2929
- this._disabled = newValue;
2930
- this.stateChanges.next(undefined);
2931
- }
2932
- // We need to null check the `blur` method, because it's undefined during SSR.
2933
- // In Ivy static bindings are invoked earlier, before the element is attached to the DOM.
2934
- // This can cause an error to be thrown in some browsers (IE/Edge) which assert that the
2935
- // element has been inserted.
2936
- if (newValue && this._isInitialized && element.blur) {
2937
- // Normally, native input elements automatically blur if they turn disabled. This behavior
2938
- // is problematic, because it would mean that it triggers another change detection cycle,
2939
- // which then causes a changed after checked error if the input element was focused before.
2940
- element.blur();
2941
- }
2942
- },
2943
- enumerable: false,
2944
- configurable: true
2945
- });
2946
- /** Gets the base validator functions. */
2947
- MatDatepickerInputBase.prototype._getValidators = function () {
2948
- return [this._parseValidator, this._minValidator, this._maxValidator, this._filterValidator];
2949
- };
2950
- /** Registers a date selection model with the input. */
2951
- MatDatepickerInputBase.prototype._registerModel = function (model) {
2952
- var _this = this;
2953
- this._model = model;
2954
- this._valueChangesSubscription.unsubscribe();
2955
- if (this._pendingValue) {
2956
- this._assignValue(this._pendingValue);
2957
- }
2958
- this._valueChangesSubscription = this._model.selectionChanged.subscribe(function (event) {
2959
- if (_this._shouldHandleChangeEvent(event)) {
2960
- var value = _this._getValueFromModel(event.selection);
2961
- _this._lastValueValid = _this._isValidValue(value);
2962
- _this._cvaOnChange(value);
2963
- _this._onTouched();
2964
- _this._formatValue(value);
2965
- _this.dateInput.emit(new MatDatepickerInputEvent(_this, _this._elementRef.nativeElement));
2966
- _this.dateChange.emit(new MatDatepickerInputEvent(_this, _this._elementRef.nativeElement));
2967
- }
2968
- });
2969
- };
2970
- MatDatepickerInputBase.prototype.ngAfterViewInit = function () {
2971
- this._isInitialized = true;
2972
- };
2973
- MatDatepickerInputBase.prototype.ngOnChanges = function (changes) {
2974
- if (dateInputsHaveChanged(changes, this._dateAdapter)) {
2975
- this.stateChanges.next(undefined);
2976
- }
2977
- };
2978
- MatDatepickerInputBase.prototype.ngOnDestroy = function () {
2979
- this._valueChangesSubscription.unsubscribe();
2980
- this._localeSubscription.unsubscribe();
2981
- this.stateChanges.complete();
2982
- };
2983
- /** @docs-private */
2984
- MatDatepickerInputBase.prototype.registerOnValidatorChange = function (fn) {
2985
- this._validatorOnChange = fn;
2986
- };
2987
- /** @docs-private */
2988
- MatDatepickerInputBase.prototype.validate = function (c) {
2989
- return this._validator ? this._validator(c) : null;
2990
- };
2991
- // Implemented as part of ControlValueAccessor.
2992
- MatDatepickerInputBase.prototype.writeValue = function (value) {
2993
- this._assignValueProgrammatically(value);
2994
- };
2995
- // Implemented as part of ControlValueAccessor.
2996
- MatDatepickerInputBase.prototype.registerOnChange = function (fn) {
2997
- this._cvaOnChange = fn;
2998
- };
2999
- // Implemented as part of ControlValueAccessor.
3000
- MatDatepickerInputBase.prototype.registerOnTouched = function (fn) {
3001
- this._onTouched = fn;
3002
- };
3003
- // Implemented as part of ControlValueAccessor.
3004
- MatDatepickerInputBase.prototype.setDisabledState = function (isDisabled) {
3005
- this.disabled = isDisabled;
3006
- };
3007
- MatDatepickerInputBase.prototype._onKeydown = function (event) {
3008
- var isAltDownArrow = event.altKey && event.keyCode === keycodes.DOWN_ARROW;
3009
- if (isAltDownArrow && !this._elementRef.nativeElement.readOnly) {
3010
- this._openPopup();
3011
- event.preventDefault();
3012
- }
3013
- };
3014
- MatDatepickerInputBase.prototype._onInput = function (value) {
3015
- var lastValueWasValid = this._lastValueValid;
3016
- var date = this._dateAdapter.parse(value, this._dateFormats.parse.dateInput);
3017
- this._lastValueValid = this._isValidValue(date);
3018
- date = this._dateAdapter.getValidDateOrNull(date);
3019
- if (!this._dateAdapter.sameDate(date, this.value)) {
3020
- this._assignValue(date);
3021
- this._cvaOnChange(date);
3022
- this.dateInput.emit(new MatDatepickerInputEvent(this, this._elementRef.nativeElement));
3023
- }
3024
- else {
3025
- // Call the CVA change handler for invalid values
3026
- // since this is what marks the control as dirty.
3027
- if (value && !this.value) {
3028
- this._cvaOnChange(date);
3029
- }
3030
- if (lastValueWasValid !== this._lastValueValid) {
3031
- this._validatorOnChange();
3032
- }
3033
- }
3034
- };
3035
- MatDatepickerInputBase.prototype._onChange = function () {
3036
- this.dateChange.emit(new MatDatepickerInputEvent(this, this._elementRef.nativeElement));
3037
- };
3038
- /** Handles blur events on the input. */
3039
- MatDatepickerInputBase.prototype._onBlur = function () {
3040
- // Reformat the input only if we have a valid value.
3041
- if (this.value) {
3042
- this._formatValue(this.value);
3043
- }
3044
- this._onTouched();
3045
- };
3046
- /** Formats a value and sets it on the input element. */
3047
- MatDatepickerInputBase.prototype._formatValue = function (value) {
3048
- this._elementRef.nativeElement.value =
3049
- value ? this._dateAdapter.format(value, this._dateFormats.display.dateInput) : '';
3050
- };
3051
- /** Assigns a value to the model. */
3052
- MatDatepickerInputBase.prototype._assignValue = function (value) {
3053
- // We may get some incoming values before the model was
3054
- // assigned. Save the value so that we can assign it later.
3055
- if (this._model) {
3056
- this._assignValueToModel(value);
3057
- this._pendingValue = null;
3058
- }
3059
- else {
3060
- this._pendingValue = value;
3061
- }
3062
- };
3063
- /** Whether a value is considered valid. */
3064
- MatDatepickerInputBase.prototype._isValidValue = function (value) {
3065
- return !value || this._dateAdapter.isValid(value);
3066
- };
3067
- /**
3068
- * Checks whether a parent control is disabled. This is in place so that it can be overridden
3069
- * by inputs extending this one which can be placed inside of a group that can be disabled.
3070
- */
3071
- MatDatepickerInputBase.prototype._parentDisabled = function () {
3072
- return false;
3073
- };
3074
- /** Programmatically assigns a value to the input. */
3075
- MatDatepickerInputBase.prototype._assignValueProgrammatically = function (value) {
3076
- value = this._dateAdapter.deserialize(value);
3077
- this._lastValueValid = this._isValidValue(value);
3078
- value = this._dateAdapter.getValidDateOrNull(value);
3079
- this._assignValue(value);
3080
- this._formatValue(value);
3081
- };
3082
- /** Gets whether a value matches the current date filter. */
3083
- MatDatepickerInputBase.prototype._matchesFilter = function (value) {
3084
- var filter = this._getDateFilter();
3085
- return !filter || filter(value);
3086
- };
3087
- return MatDatepickerInputBase;
3088
- }());
3089
- MatDatepickerInputBase.decorators = [
3090
- { type: i0.Directive }
3091
- ];
3092
- MatDatepickerInputBase.ctorParameters = function () { return [
3093
- { type: i0.ElementRef },
3094
- { type: core.DateAdapter, decorators: [{ type: i0.Optional }] },
3095
- { type: undefined, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [core.MAT_DATE_FORMATS,] }] }
3096
- ]; };
3097
- MatDatepickerInputBase.propDecorators = {
3098
- value: [{ type: i0.Input }],
3099
- disabled: [{ type: i0.Input }],
3100
- dateChange: [{ type: i0.Output }],
3101
- dateInput: [{ type: i0.Output }]
3102
- };
3103
- /**
3104
- * Checks whether the `SimpleChanges` object from an `ngOnChanges`
3105
- * callback has any changes, accounting for date objects.
3106
- */
3107
- function dateInputsHaveChanged(changes, adapter) {
3108
- var e_1, _a;
3109
- var keys = Object.keys(changes);
3110
- try {
3111
- for (var keys_1 = __values(keys), keys_1_1 = keys_1.next(); !keys_1_1.done; keys_1_1 = keys_1.next()) {
3112
- var key = keys_1_1.value;
3113
- var _b = changes[key], previousValue = _b.previousValue, currentValue = _b.currentValue;
3114
- if (adapter.isDateInstance(previousValue) && adapter.isDateInstance(currentValue)) {
3115
- if (!adapter.sameDate(previousValue, currentValue)) {
3116
- return true;
3117
- }
3118
- }
3119
- else {
3120
- return true;
3121
- }
3122
- }
3123
- }
3124
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
3125
- finally {
3126
- try {
3127
- if (keys_1_1 && !keys_1_1.done && (_a = keys_1.return)) _a.call(keys_1);
3128
- }
3129
- finally { if (e_1) throw e_1.error; }
3130
- }
3131
- return false;
3132
- }
3133
-
3134
- /** @docs-private */
3135
- var MAT_DATEPICKER_VALUE_ACCESSOR = {
3136
- provide: forms.NG_VALUE_ACCESSOR,
3137
- useExisting: i0.forwardRef(function () { return MatDatepickerInput; }),
3138
- multi: true
3139
- };
3140
- /** @docs-private */
3141
- var MAT_DATEPICKER_VALIDATORS = {
3142
- provide: forms.NG_VALIDATORS,
3143
- useExisting: i0.forwardRef(function () { return MatDatepickerInput; }),
3144
- multi: true
3145
- };
3146
- /** Directive used to connect an input to a MatDatepicker. */
3147
- var MatDatepickerInput = /** @class */ (function (_super) {
3148
- __extends(MatDatepickerInput, _super);
3149
- function MatDatepickerInput(elementRef, dateAdapter, dateFormats, _formField) {
3150
- var _this = _super.call(this, elementRef, dateAdapter, dateFormats) || this;
3151
- _this._formField = _formField;
3152
- _this._closedSubscription = rxjs.Subscription.EMPTY;
3153
- _this._validator = forms.Validators.compose(_super.prototype._getValidators.call(_this));
3154
- return _this;
3155
- }
3156
- Object.defineProperty(MatDatepickerInput.prototype, "matDatepicker", {
3157
- /** The datepicker that this input is associated with. */
3158
- set: function (datepicker) {
3159
- var _this = this;
3160
- if (datepicker) {
3161
- this._datepicker = datepicker;
3162
- this._closedSubscription = datepicker.closedStream.subscribe(function () { return _this._onTouched(); });
3163
- this._registerModel(datepicker.registerInput(this));
3164
- }
3165
- },
3166
- enumerable: false,
3167
- configurable: true
3168
- });
3169
- Object.defineProperty(MatDatepickerInput.prototype, "min", {
3170
- /** The minimum valid date. */
3171
- get: function () { return this._min; },
3172
- set: function (value) {
3173
- var validValue = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value));
3174
- if (!this._dateAdapter.sameDate(validValue, this._min)) {
3175
- this._min = validValue;
3176
- this._validatorOnChange();
3177
- }
3178
- },
3179
- enumerable: false,
3180
- configurable: true
3181
- });
3182
- Object.defineProperty(MatDatepickerInput.prototype, "max", {
3183
- /** The maximum valid date. */
3184
- get: function () { return this._max; },
3185
- set: function (value) {
3186
- var validValue = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value));
3187
- if (!this._dateAdapter.sameDate(validValue, this._max)) {
3188
- this._max = validValue;
3189
- this._validatorOnChange();
3190
- }
3191
- },
3192
- enumerable: false,
3193
- configurable: true
3194
- });
3195
- Object.defineProperty(MatDatepickerInput.prototype, "dateFilter", {
3196
- /** Function that can be used to filter out dates within the datepicker. */
3197
- get: function () { return this._dateFilter; },
3198
- set: function (value) {
3199
- var wasMatchingValue = this._matchesFilter(this.value);
3200
- this._dateFilter = value;
3201
- if (this._matchesFilter(this.value) !== wasMatchingValue) {
3202
- this._validatorOnChange();
3203
- }
3204
- },
3205
- enumerable: false,
3206
- configurable: true
3207
- });
3208
- /**
3209
- * Gets the element that the datepicker popup should be connected to.
3210
- * @return The element to connect the popup to.
3211
- */
3212
- MatDatepickerInput.prototype.getConnectedOverlayOrigin = function () {
3213
- return this._formField ? this._formField.getConnectedOverlayOrigin() : this._elementRef;
3214
- };
3215
- /** Gets the ID of an element that should be used a description for the calendar overlay. */
3216
- MatDatepickerInput.prototype.getOverlayLabelId = function () {
3217
- if (this._formField) {
3218
- return this._formField.getLabelId();
3219
- }
3220
- return this._elementRef.nativeElement.getAttribute('aria-labelledby');
3221
- };
3222
- /** Returns the palette used by the input's form field, if any. */
3223
- MatDatepickerInput.prototype.getThemePalette = function () {
3224
- return this._formField ? this._formField.color : undefined;
3225
- };
3226
- /** Gets the value at which the calendar should start. */
3227
- MatDatepickerInput.prototype.getStartValue = function () {
3228
- return this.value;
3229
- };
3230
- MatDatepickerInput.prototype.ngOnDestroy = function () {
3231
- _super.prototype.ngOnDestroy.call(this);
3232
- this._closedSubscription.unsubscribe();
3233
- };
3234
- /** Opens the associated datepicker. */
3235
- MatDatepickerInput.prototype._openPopup = function () {
3236
- if (this._datepicker) {
3237
- this._datepicker.open();
3238
- }
3239
- };
3240
- MatDatepickerInput.prototype._getValueFromModel = function (modelValue) {
3241
- return modelValue;
3242
- };
3243
- MatDatepickerInput.prototype._assignValueToModel = function (value) {
3244
- if (this._model) {
3245
- this._model.updateSelection(value, this);
3246
- }
3247
- };
3248
- /** Gets the input's minimum date. */
3249
- MatDatepickerInput.prototype._getMinDate = function () {
3250
- return this._min;
3251
- };
3252
- /** Gets the input's maximum date. */
3253
- MatDatepickerInput.prototype._getMaxDate = function () {
3254
- return this._max;
3255
- };
3256
- /** Gets the input's date filtering function. */
3257
- MatDatepickerInput.prototype._getDateFilter = function () {
3258
- return this._dateFilter;
3259
- };
3260
- MatDatepickerInput.prototype._shouldHandleChangeEvent = function (event) {
3261
- return event.source !== this;
3262
- };
3263
- return MatDatepickerInput;
3264
- }(MatDatepickerInputBase));
3265
- MatDatepickerInput.decorators = [
3266
- { type: i0.Directive, args: [{
3267
- selector: 'input[matDatepicker]',
3268
- providers: [
3269
- MAT_DATEPICKER_VALUE_ACCESSOR,
3270
- MAT_DATEPICKER_VALIDATORS,
3271
- { provide: input.MAT_INPUT_VALUE_ACCESSOR, useExisting: MatDatepickerInput },
3272
- ],
3273
- host: {
3274
- 'class': 'mat-datepicker-input',
3275
- '[attr.aria-haspopup]': '_datepicker ? "dialog" : null',
3276
- '[attr.aria-owns]': '(_datepicker?.opened && _datepicker.id) || null',
3277
- '[attr.min]': 'min ? _dateAdapter.toIso8601(min) : null',
3278
- '[attr.max]': 'max ? _dateAdapter.toIso8601(max) : null',
3279
- // Used by the test harness to tie this input to its calendar. We can't depend on
3280
- // `aria-owns` for this, because it's only defined while the calendar is open.
3281
- '[attr.data-mat-calendar]': '_datepicker ? _datepicker.id : null',
3282
- '[disabled]': 'disabled',
3283
- '(input)': '_onInput($event.target.value)',
3284
- '(change)': '_onChange()',
3285
- '(blur)': '_onBlur()',
3286
- '(keydown)': '_onKeydown($event)',
3287
- },
3288
- exportAs: 'matDatepickerInput',
3289
- },] }
3290
- ];
3291
- MatDatepickerInput.ctorParameters = function () { return [
3292
- { type: i0.ElementRef },
3293
- { type: core.DateAdapter, decorators: [{ type: i0.Optional }] },
3294
- { type: undefined, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [core.MAT_DATE_FORMATS,] }] },
3295
- { type: formField.MatFormField, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [formField.MAT_FORM_FIELD,] }] }
3296
- ]; };
3297
- MatDatepickerInput.propDecorators = {
3298
- matDatepicker: [{ type: i0.Input }],
3299
- min: [{ type: i0.Input }],
3300
- max: [{ type: i0.Input }],
3301
- dateFilter: [{ type: i0.Input, args: ['matDatepickerFilter',] }]
3302
- };
3303
-
3304
- /**
3305
- * @license
3306
- * Copyright Google LLC All Rights Reserved.
3307
- *
3308
- * Use of this source code is governed by an MIT-style license that can be
3309
- * found in the LICENSE file at https://angular.io/license
3310
- */
3311
- /** Can be used to override the icon of a `matDatepickerToggle`. */
3312
- var MatDatepickerToggleIcon = /** @class */ (function () {
3313
- function MatDatepickerToggleIcon() {
3314
- }
3315
- return MatDatepickerToggleIcon;
3316
- }());
3317
- MatDatepickerToggleIcon.decorators = [
3318
- { type: i0.Directive, args: [{
3319
- selector: '[matDatepickerToggleIcon]'
3320
- },] }
3321
- ];
3322
- var MatDatepickerToggle = /** @class */ (function () {
3323
- function MatDatepickerToggle(_intl, _changeDetectorRef, defaultTabIndex) {
3324
- this._intl = _intl;
3325
- this._changeDetectorRef = _changeDetectorRef;
3326
- this._stateChanges = rxjs.Subscription.EMPTY;
3327
- var parsedTabIndex = Number(defaultTabIndex);
3328
- this.tabIndex = (parsedTabIndex || parsedTabIndex === 0) ? parsedTabIndex : null;
3329
- }
3330
- Object.defineProperty(MatDatepickerToggle.prototype, "disabled", {
3331
- /** Whether the toggle button is disabled. */
3332
- get: function () {
3333
- if (this._disabled === undefined && this.datepicker) {
3334
- return this.datepicker.disabled;
3335
- }
3336
- return !!this._disabled;
3337
- },
3338
- set: function (value) {
3339
- this._disabled = coercion.coerceBooleanProperty(value);
3340
- },
3341
- enumerable: false,
3342
- configurable: true
3343
- });
3344
- MatDatepickerToggle.prototype.ngOnChanges = function (changes) {
3345
- if (changes['datepicker']) {
3346
- this._watchStateChanges();
3347
- }
3348
- };
3349
- MatDatepickerToggle.prototype.ngOnDestroy = function () {
3350
- this._stateChanges.unsubscribe();
3351
- };
3352
- MatDatepickerToggle.prototype.ngAfterContentInit = function () {
3353
- this._watchStateChanges();
3354
- };
3355
- MatDatepickerToggle.prototype._open = function (event) {
3356
- if (this.datepicker && !this.disabled) {
3357
- this.datepicker.open();
3358
- event.stopPropagation();
3359
- }
3360
- };
3361
- MatDatepickerToggle.prototype._watchStateChanges = function () {
3362
- var _this = this;
3363
- var datepickerStateChanged = this.datepicker ? this.datepicker.stateChanges : rxjs.of();
3364
- var inputStateChanged = this.datepicker && this.datepicker.datepickerInput ?
3365
- this.datepicker.datepickerInput.stateChanges : rxjs.of();
3366
- var datepickerToggled = this.datepicker ?
3367
- rxjs.merge(this.datepicker.openedStream, this.datepicker.closedStream) :
3368
- rxjs.of();
3369
- this._stateChanges.unsubscribe();
3370
- this._stateChanges = rxjs.merge(this._intl.changes, datepickerStateChanged, inputStateChanged, datepickerToggled).subscribe(function () { return _this._changeDetectorRef.markForCheck(); });
3371
- };
3372
- return MatDatepickerToggle;
3373
- }());
3374
- MatDatepickerToggle.decorators = [
3375
- { type: i0.Component, args: [{
3376
- selector: 'mat-datepicker-toggle',
3377
- template: "<button\n #button\n mat-icon-button\n type=\"button\"\n [attr.aria-haspopup]=\"datepicker ? 'dialog' : null\"\n [attr.aria-label]=\"ariaLabel || _intl.openCalendarLabel\"\n [attr.tabindex]=\"disabled ? -1 : tabIndex\"\n [disabled]=\"disabled\"\n [disableRipple]=\"disableRipple\">\n\n <svg\n *ngIf=\"!_customIcon\"\n class=\"mat-datepicker-toggle-default-icon\"\n viewBox=\"0 0 24 24\"\n width=\"24px\"\n height=\"24px\"\n fill=\"currentColor\"\n focusable=\"false\">\n <path d=\"M19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11zM7 10h5v5H7z\"/>\n </svg>\n\n <ng-content select=\"[matDatepickerToggleIcon]\"></ng-content>\n</button>\n",
3378
- host: {
3379
- 'class': 'mat-datepicker-toggle',
3380
- '[attr.tabindex]': 'null',
3381
- '[class.mat-datepicker-toggle-active]': 'datepicker && datepicker.opened',
3382
- '[class.mat-accent]': 'datepicker && datepicker.color === "accent"',
3383
- '[class.mat-warn]': 'datepicker && datepicker.color === "warn"',
3384
- // Used by the test harness to tie this toggle to its datepicker.
3385
- '[attr.data-mat-calendar]': 'datepicker ? datepicker.id : null',
3386
- // Bind the `click` on the host, rather than the inner `button`, so that we can call
3387
- // `stopPropagation` on it without affecting the user's `click` handlers. We need to stop
3388
- // it so that the input doesn't get focused automatically by the form field (See #21836).
3389
- '(click)': '_open($event)',
3390
- },
3391
- exportAs: 'matDatepickerToggle',
3392
- encapsulation: i0.ViewEncapsulation.None,
3393
- changeDetection: i0.ChangeDetectionStrategy.OnPush,
3394
- styles: [".mat-form-field-appearance-legacy .mat-form-field-prefix .mat-datepicker-toggle-default-icon,.mat-form-field-appearance-legacy .mat-form-field-suffix .mat-datepicker-toggle-default-icon{width:1em}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-datepicker-toggle-default-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-datepicker-toggle-default-icon{display:block;width:1.5em;height:1.5em}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon-button .mat-datepicker-toggle-default-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button .mat-datepicker-toggle-default-icon{margin:auto}.cdk-high-contrast-active .mat-datepicker-toggle-default-icon{color:CanvasText}\n"]
3395
- },] }
3396
- ];
3397
- MatDatepickerToggle.ctorParameters = function () { return [
3398
- { type: MatDatepickerIntl },
3399
- { type: i0.ChangeDetectorRef },
3400
- { type: String, decorators: [{ type: i0.Attribute, args: ['tabindex',] }] }
3401
- ]; };
3402
- MatDatepickerToggle.propDecorators = {
3403
- datepicker: [{ type: i0.Input, args: ['for',] }],
3404
- tabIndex: [{ type: i0.Input }],
3405
- ariaLabel: [{ type: i0.Input, args: ['aria-label',] }],
3406
- disabled: [{ type: i0.Input }],
3407
- disableRipple: [{ type: i0.Input }],
3408
- _customIcon: [{ type: i0.ContentChild, args: [MatDatepickerToggleIcon,] }],
3409
- _button: [{ type: i0.ViewChild, args: ['button',] }]
3410
- };
3411
-
3412
- /**
3413
- * Used to provide the date range input wrapper component
3414
- * to the parts without circular dependencies.
3415
- */
3416
- var MAT_DATE_RANGE_INPUT_PARENT = new i0.InjectionToken('MAT_DATE_RANGE_INPUT_PARENT');
3417
- /**
3418
- * Base class for the individual inputs that can be projected inside a `mat-date-range-input`.
3419
- */
3420
- var MatDateRangeInputPartBase = /** @class */ (function (_super) {
3421
- __extends(MatDateRangeInputPartBase, _super);
3422
- function MatDateRangeInputPartBase(_rangeInput, elementRef, _defaultErrorStateMatcher, _injector, _parentForm, _parentFormGroup, dateAdapter, dateFormats) {
3423
- var _this = _super.call(this, elementRef, dateAdapter, dateFormats) || this;
3424
- _this._rangeInput = _rangeInput;
3425
- _this._defaultErrorStateMatcher = _defaultErrorStateMatcher;
3426
- _this._injector = _injector;
3427
- _this._parentForm = _parentForm;
3428
- _this._parentFormGroup = _parentFormGroup;
3429
- return _this;
3430
- }
3431
- MatDateRangeInputPartBase.prototype.ngOnInit = function () {
3432
- // We need the date input to provide itself as a `ControlValueAccessor` and a `Validator`, while
3433
- // injecting its `NgControl` so that the error state is handled correctly. This introduces a
3434
- // circular dependency, because both `ControlValueAccessor` and `Validator` depend on the input
3435
- // itself. Usually we can work around it for the CVA, but there's no API to do it for the
3436
- // validator. We work around it here by injecting the `NgControl` in `ngOnInit`, after
3437
- // everything has been resolved.
3438
- // tslint:disable-next-line:no-bitwise
3439
- var ngControl = this._injector.get(forms.NgControl, null, i0.InjectFlags.Self | i0.InjectFlags.Optional);
3440
- if (ngControl) {
3441
- this.ngControl = ngControl;
3442
- }
3443
- };
3444
- MatDateRangeInputPartBase.prototype.ngDoCheck = function () {
3445
- if (this.ngControl) {
3446
- // We need to re-evaluate this on every change detection cycle, because there are some
3447
- // error triggers that we can't subscribe to (e.g. parent form submissions). This means
3448
- // that whatever logic is in here has to be super lean or we risk destroying the performance.
3449
- this.updateErrorState();
3450
- }
3451
- };
3452
- /** Gets whether the input is empty. */
3453
- MatDateRangeInputPartBase.prototype.isEmpty = function () {
3454
- return this._elementRef.nativeElement.value.length === 0;
3455
- };
3456
- /** Gets the placeholder of the input. */
3457
- MatDateRangeInputPartBase.prototype._getPlaceholder = function () {
3458
- return this._elementRef.nativeElement.placeholder;
3459
- };
3460
- /** Focuses the input. */
3461
- MatDateRangeInputPartBase.prototype.focus = function () {
3462
- this._elementRef.nativeElement.focus();
3463
- };
3464
- /** Handles `input` events on the input element. */
3465
- MatDateRangeInputPartBase.prototype._onInput = function (value) {
3466
- _super.prototype._onInput.call(this, value);
3467
- this._rangeInput._handleChildValueChange();
3468
- };
3469
- /** Opens the datepicker associated with the input. */
3470
- MatDateRangeInputPartBase.prototype._openPopup = function () {
3471
- this._rangeInput._openDatepicker();
3472
- };
3473
- /** Gets the minimum date from the range input. */
3474
- MatDateRangeInputPartBase.prototype._getMinDate = function () {
3475
- return this._rangeInput.min;
3476
- };
3477
- /** Gets the maximum date from the range input. */
3478
- MatDateRangeInputPartBase.prototype._getMaxDate = function () {
3479
- return this._rangeInput.max;
3480
- };
3481
- /** Gets the date filter function from the range input. */
3482
- MatDateRangeInputPartBase.prototype._getDateFilter = function () {
3483
- return this._rangeInput.dateFilter;
3484
- };
3485
- MatDateRangeInputPartBase.prototype._parentDisabled = function () {
3486
- return this._rangeInput._groupDisabled;
3487
- };
3488
- MatDateRangeInputPartBase.prototype._shouldHandleChangeEvent = function (_b) {
3489
- var source = _b.source;
3490
- return source !== this._rangeInput._startInput && source !== this._rangeInput._endInput;
3491
- };
3492
- MatDateRangeInputPartBase.prototype._assignValueProgrammatically = function (value) {
3493
- _super.prototype._assignValueProgrammatically.call(this, value);
3494
- var opposite = (this === this._rangeInput._startInput ? this._rangeInput._endInput :
3495
- this._rangeInput._startInput);
3496
- opposite === null || opposite === void 0 ? void 0 : opposite._validatorOnChange();
3497
- };
3498
- return MatDateRangeInputPartBase;
3499
- }(MatDatepickerInputBase));
3500
- MatDateRangeInputPartBase.decorators = [
3501
- { type: i0.Directive }
3502
- ];
3503
- MatDateRangeInputPartBase.ctorParameters = function () { return [
3504
- { type: undefined, decorators: [{ type: i0.Inject, args: [MAT_DATE_RANGE_INPUT_PARENT,] }] },
3505
- { type: i0.ElementRef },
3506
- { type: core.ErrorStateMatcher },
3507
- { type: i0.Injector },
3508
- { type: forms.NgForm, decorators: [{ type: i0.Optional }] },
3509
- { type: forms.FormGroupDirective, decorators: [{ type: i0.Optional }] },
3510
- { type: core.DateAdapter, decorators: [{ type: i0.Optional }] },
3511
- { type: undefined, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [core.MAT_DATE_FORMATS,] }] }
3512
- ]; };
3513
- var _MatDateRangeInputBase = core.mixinErrorState(MatDateRangeInputPartBase);
3514
- /** Input for entering the start date in a `mat-date-range-input`. */
3515
- var MatStartDate = /** @class */ (function (_super) {
3516
- __extends(MatStartDate, _super);
3517
- function MatStartDate(rangeInput, elementRef, defaultErrorStateMatcher, injector, parentForm, parentFormGroup, dateAdapter, dateFormats) {
3518
- var _this =
3519
- // TODO(crisbeto): this constructor shouldn't be necessary, but ViewEngine doesn't seem to
3520
- // handle DI correctly when it is inherited from `MatDateRangeInputPartBase`. We can drop this
3521
- // constructor once ViewEngine is removed.
3522
- _super.call(this, rangeInput, elementRef, defaultErrorStateMatcher, injector, parentForm, parentFormGroup, dateAdapter, dateFormats) || this;
3523
- /** Validator that checks that the start date isn't after the end date. */
3524
- _this._startValidator = function (control) {
3525
- var start = _this._dateAdapter.getValidDateOrNull(_this._dateAdapter.deserialize(control.value));
3526
- var end = _this._model ? _this._model.selection.end : null;
3527
- return (!start || !end ||
3528
- _this._dateAdapter.compareDate(start, end) <= 0) ?
3529
- null : { 'matStartDateInvalid': { 'end': end, 'actual': start } };
3530
- };
3531
- _this._validator = forms.Validators.compose(__spreadArray(__spreadArray([], __read(_super.prototype._getValidators.call(_this))), [_this._startValidator]));
3532
- return _this;
3533
- }
3534
- MatStartDate.prototype.ngOnInit = function () {
3535
- // Normally this happens automatically, but it seems to break if not added explicitly when all
3536
- // of the criteria below are met:
3537
- // 1) The class extends a TS mixin.
3538
- // 2) The application is running in ViewEngine.
3539
- // 3) The application is being transpiled through tsickle.
3540
- // This can be removed once google3 is completely migrated to Ivy.
3541
- _super.prototype.ngOnInit.call(this);
3542
- };
3543
- MatStartDate.prototype.ngDoCheck = function () {
3544
- // Normally this happens automatically, but it seems to break if not added explicitly when all
3545
- // of the criteria below are met:
3546
- // 1) The class extends a TS mixin.
3547
- // 2) The application is running in ViewEngine.
3548
- // 3) The application is being transpiled through tsickle.
3549
- // This can be removed once google3 is completely migrated to Ivy.
3550
- _super.prototype.ngDoCheck.call(this);
3551
- };
3552
- MatStartDate.prototype._getValueFromModel = function (modelValue) {
3553
- return modelValue.start;
3554
- };
3555
- MatStartDate.prototype._shouldHandleChangeEvent = function (change) {
3556
- var _a;
3557
- if (!_super.prototype._shouldHandleChangeEvent.call(this, change)) {
3558
- return false;
3559
- }
3560
- else {
3561
- return !((_a = change.oldValue) === null || _a === void 0 ? void 0 : _a.start) ? !!change.selection.start :
3562
- !change.selection.start ||
3563
- !!this._dateAdapter.compareDate(change.oldValue.start, change.selection.start);
3564
- }
3565
- };
3566
- MatStartDate.prototype._assignValueToModel = function (value) {
3567
- if (this._model) {
3568
- var range = new DateRange(value, this._model.selection.end);
3569
- this._model.updateSelection(range, this);
3570
- }
3571
- };
3572
- MatStartDate.prototype._formatValue = function (value) {
3573
- _super.prototype._formatValue.call(this, value);
3574
- // Any time the input value is reformatted we need to tell the parent.
3575
- this._rangeInput._handleChildValueChange();
3576
- };
3577
- /** Gets the value that should be used when mirroring the input's size. */
3578
- MatStartDate.prototype.getMirrorValue = function () {
3579
- var element = this._elementRef.nativeElement;
3580
- var value = element.value;
3581
- return value.length > 0 ? value : element.placeholder;
3582
- };
3583
- return MatStartDate;
3584
- }(_MatDateRangeInputBase));
3585
- MatStartDate.decorators = [
3586
- { type: i0.Directive, args: [{
3587
- selector: 'input[matStartDate]',
3588
- host: {
3589
- 'class': 'mat-start-date mat-date-range-input-inner',
3590
- '[disabled]': 'disabled',
3591
- '(input)': '_onInput($event.target.value)',
3592
- '(change)': '_onChange()',
3593
- '(keydown)': '_onKeydown($event)',
3594
- '[attr.id]': '_rangeInput.id',
3595
- '[attr.aria-haspopup]': '_rangeInput.rangePicker ? "dialog" : null',
3596
- '[attr.aria-owns]': '(_rangeInput.rangePicker?.opened && _rangeInput.rangePicker.id) || null',
3597
- '[attr.min]': '_getMinDate() ? _dateAdapter.toIso8601(_getMinDate()) : null',
3598
- '[attr.max]': '_getMaxDate() ? _dateAdapter.toIso8601(_getMaxDate()) : null',
3599
- '(blur)': '_onBlur()',
3600
- 'type': 'text',
3601
- },
3602
- providers: [
3603
- { provide: forms.NG_VALUE_ACCESSOR, useExisting: MatStartDate, multi: true },
3604
- { provide: forms.NG_VALIDATORS, useExisting: MatStartDate, multi: true }
3605
- ],
3606
- // These need to be specified explicitly, because some tooling doesn't
3607
- // seem to pick them up from the base class. See #20932.
3608
- outputs: ['dateChange', 'dateInput'],
3609
- inputs: ['errorStateMatcher']
3610
- },] }
3611
- ];
3612
- MatStartDate.ctorParameters = function () { return [
3613
- { type: undefined, decorators: [{ type: i0.Inject, args: [MAT_DATE_RANGE_INPUT_PARENT,] }] },
3614
- { type: i0.ElementRef },
3615
- { type: core.ErrorStateMatcher },
3616
- { type: i0.Injector },
3617
- { type: forms.NgForm, decorators: [{ type: i0.Optional }] },
3618
- { type: forms.FormGroupDirective, decorators: [{ type: i0.Optional }] },
3619
- { type: core.DateAdapter, decorators: [{ type: i0.Optional }] },
3620
- { type: undefined, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [core.MAT_DATE_FORMATS,] }] }
3621
- ]; };
3622
- /** Input for entering the end date in a `mat-date-range-input`. */
3623
- var MatEndDate = /** @class */ (function (_super) {
3624
- __extends(MatEndDate, _super);
3625
- function MatEndDate(rangeInput, elementRef, defaultErrorStateMatcher, injector, parentForm, parentFormGroup, dateAdapter, dateFormats) {
3626
- var _this =
3627
- // TODO(crisbeto): this constructor shouldn't be necessary, but ViewEngine doesn't seem to
3628
- // handle DI correctly when it is inherited from `MatDateRangeInputPartBase`. We can drop this
3629
- // constructor once ViewEngine is removed.
3630
- _super.call(this, rangeInput, elementRef, defaultErrorStateMatcher, injector, parentForm, parentFormGroup, dateAdapter, dateFormats) || this;
3631
- /** Validator that checks that the end date isn't before the start date. */
3632
- _this._endValidator = function (control) {
3633
- var end = _this._dateAdapter.getValidDateOrNull(_this._dateAdapter.deserialize(control.value));
3634
- var start = _this._model ? _this._model.selection.start : null;
3635
- return (!end || !start ||
3636
- _this._dateAdapter.compareDate(end, start) >= 0) ?
3637
- null : { 'matEndDateInvalid': { 'start': start, 'actual': end } };
3638
- };
3639
- _this._validator = forms.Validators.compose(__spreadArray(__spreadArray([], __read(_super.prototype._getValidators.call(_this))), [_this._endValidator]));
3640
- return _this;
3641
- }
3642
- MatEndDate.prototype.ngOnInit = function () {
3643
- // Normally this happens automatically, but it seems to break if not added explicitly when all
3644
- // of the criteria below are met:
3645
- // 1) The class extends a TS mixin.
3646
- // 2) The application is running in ViewEngine.
3647
- // 3) The application is being transpiled through tsickle.
3648
- // This can be removed once google3 is completely migrated to Ivy.
3649
- _super.prototype.ngOnInit.call(this);
3650
- };
3651
- MatEndDate.prototype.ngDoCheck = function () {
3652
- // Normally this happens automatically, but it seems to break if not added explicitly when all
3653
- // of the criteria below are met:
3654
- // 1) The class extends a TS mixin.
3655
- // 2) The application is running in ViewEngine.
3656
- // 3) The application is being transpiled through tsickle.
3657
- // This can be removed once google3 is completely migrated to Ivy.
3658
- _super.prototype.ngDoCheck.call(this);
3659
- };
3660
- MatEndDate.prototype._getValueFromModel = function (modelValue) {
3661
- return modelValue.end;
3662
- };
3663
- MatEndDate.prototype._shouldHandleChangeEvent = function (change) {
3664
- var _a;
3665
- if (!_super.prototype._shouldHandleChangeEvent.call(this, change)) {
3666
- return false;
3667
- }
3668
- else {
3669
- return !((_a = change.oldValue) === null || _a === void 0 ? void 0 : _a.end) ? !!change.selection.end :
3670
- !change.selection.end ||
3671
- !!this._dateAdapter.compareDate(change.oldValue.end, change.selection.end);
3672
- }
3673
- };
3674
- MatEndDate.prototype._assignValueToModel = function (value) {
3675
- if (this._model) {
3676
- var range = new DateRange(this._model.selection.start, value);
3677
- this._model.updateSelection(range, this);
3678
- }
3679
- };
3680
- MatEndDate.prototype._onKeydown = function (event) {
3681
- // If the user is pressing backspace on an empty end input, move focus back to the start.
3682
- if (event.keyCode === keycodes.BACKSPACE && !this._elementRef.nativeElement.value) {
3683
- this._rangeInput._startInput.focus();
3684
- }
3685
- _super.prototype._onKeydown.call(this, event);
3686
- };
3687
- return MatEndDate;
3688
- }(_MatDateRangeInputBase));
3689
- MatEndDate.decorators = [
3690
- { type: i0.Directive, args: [{
3691
- selector: 'input[matEndDate]',
3692
- host: {
3693
- 'class': 'mat-end-date mat-date-range-input-inner',
3694
- '[disabled]': 'disabled',
3695
- '(input)': '_onInput($event.target.value)',
3696
- '(change)': '_onChange()',
3697
- '(keydown)': '_onKeydown($event)',
3698
- '[attr.aria-haspopup]': '_rangeInput.rangePicker ? "dialog" : null',
3699
- '[attr.aria-owns]': '(_rangeInput.rangePicker?.opened && _rangeInput.rangePicker.id) || null',
3700
- '[attr.min]': '_getMinDate() ? _dateAdapter.toIso8601(_getMinDate()) : null',
3701
- '[attr.max]': '_getMaxDate() ? _dateAdapter.toIso8601(_getMaxDate()) : null',
3702
- '(blur)': '_onBlur()',
3703
- 'type': 'text',
3704
- },
3705
- providers: [
3706
- { provide: forms.NG_VALUE_ACCESSOR, useExisting: MatEndDate, multi: true },
3707
- { provide: forms.NG_VALIDATORS, useExisting: MatEndDate, multi: true }
3708
- ],
3709
- // These need to be specified explicitly, because some tooling doesn't
3710
- // seem to pick them up from the base class. See #20932.
3711
- outputs: ['dateChange', 'dateInput'],
3712
- inputs: ['errorStateMatcher']
3713
- },] }
3714
- ];
3715
- MatEndDate.ctorParameters = function () { return [
3716
- { type: undefined, decorators: [{ type: i0.Inject, args: [MAT_DATE_RANGE_INPUT_PARENT,] }] },
3717
- { type: i0.ElementRef },
3718
- { type: core.ErrorStateMatcher },
3719
- { type: i0.Injector },
3720
- { type: forms.NgForm, decorators: [{ type: i0.Optional }] },
3721
- { type: forms.FormGroupDirective, decorators: [{ type: i0.Optional }] },
3722
- { type: core.DateAdapter, decorators: [{ type: i0.Optional }] },
3723
- { type: undefined, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [core.MAT_DATE_FORMATS,] }] }
3724
- ]; };
3725
-
3726
- /**
3727
- * @license
3728
- * Copyright Google LLC All Rights Reserved.
3729
- *
3730
- * Use of this source code is governed by an MIT-style license that can be
3731
- * found in the LICENSE file at https://angular.io/license
3732
- */
3733
- var nextUniqueId = 0;
3734
- var MatDateRangeInput = /** @class */ (function () {
3735
- function MatDateRangeInput(_changeDetectorRef, _elementRef, control, _dateAdapter, _formField) {
3736
- this._changeDetectorRef = _changeDetectorRef;
3737
- this._elementRef = _elementRef;
3738
- this._dateAdapter = _dateAdapter;
3739
- this._formField = _formField;
3740
- this._closedSubscription = rxjs.Subscription.EMPTY;
3741
- /** Unique ID for the input. */
3742
- this.id = "mat-date-range-input-" + nextUniqueId++;
3743
- /** Whether the control is focused. */
3744
- this.focused = false;
3745
- /** Name of the form control. */
3746
- this.controlType = 'mat-date-range-input';
3747
- this._groupDisabled = false;
3748
- /** Value for the `aria-describedby` attribute of the inputs. */
3749
- this._ariaDescribedBy = null;
3750
- /** Separator text to be shown between the inputs. */
3751
- this.separator = '–';
3752
- /** Start of the comparison range that should be shown in the calendar. */
3753
- this.comparisonStart = null;
3754
- /** End of the comparison range that should be shown in the calendar. */
3755
- this.comparisonEnd = null;
3756
- /** Emits when the input's state has changed. */
3757
- this.stateChanges = new rxjs.Subject();
3758
- if (!_dateAdapter && (typeof ngDevMode === 'undefined' || ngDevMode)) {
3759
- throw createMissingDateImplError('DateAdapter');
3760
- }
3761
- // The datepicker module can be used both with MDC and non-MDC form fields. We have
3762
- // to conditionally add the MDC input class so that the range picker looks correctly.
3763
- if (_formField === null || _formField === void 0 ? void 0 : _formField._elementRef.nativeElement.classList.contains('mat-mdc-form-field')) {
3764
- var classList = _elementRef.nativeElement.classList;
3765
- classList.add('mat-mdc-input-element');
3766
- classList.add('mat-mdc-form-field-input-control');
3767
- }
3768
- // TODO(crisbeto): remove `as any` after #18206 lands.
3769
- this.ngControl = control;
3770
- }
3771
- Object.defineProperty(MatDateRangeInput.prototype, "value", {
3772
- /** Current value of the range input. */
3773
- get: function () {
3774
- return this._model ? this._model.selection : null;
3775
- },
3776
- enumerable: false,
3777
- configurable: true
3778
- });
3779
- Object.defineProperty(MatDateRangeInput.prototype, "shouldLabelFloat", {
3780
- /** Whether the control's label should float. */
3781
- get: function () {
3782
- return this.focused || !this.empty;
3783
- },
3784
- enumerable: false,
3785
- configurable: true
3786
- });
3787
- Object.defineProperty(MatDateRangeInput.prototype, "placeholder", {
3788
- /**
3789
- * Implemented as a part of `MatFormFieldControl`.
3790
- * Set the placeholder attribute on `matStartDate` and `matEndDate`.
3791
- * @docs-private
3792
- */
3793
- get: function () {
3794
- var _a, _b;
3795
- var start = ((_a = this._startInput) === null || _a === void 0 ? void 0 : _a._getPlaceholder()) || '';
3796
- var end = ((_b = this._endInput) === null || _b === void 0 ? void 0 : _b._getPlaceholder()) || '';
3797
- return (start || end) ? start + " " + this.separator + " " + end : '';
3798
- },
3799
- enumerable: false,
3800
- configurable: true
3801
- });
3802
- Object.defineProperty(MatDateRangeInput.prototype, "rangePicker", {
3803
- /** The range picker that this input is associated with. */
3804
- get: function () { return this._rangePicker; },
3805
- set: function (rangePicker) {
3806
- var _this = this;
3807
- if (rangePicker) {
3808
- this._model = rangePicker.registerInput(this);
3809
- this._rangePicker = rangePicker;
3810
- this._closedSubscription.unsubscribe();
3811
- this._closedSubscription = rangePicker.closedStream.subscribe(function () {
3812
- var _a, _b;
3813
- (_a = _this._startInput) === null || _a === void 0 ? void 0 : _a._onTouched();
3814
- (_b = _this._endInput) === null || _b === void 0 ? void 0 : _b._onTouched();
3815
- });
3816
- this._registerModel(this._model);
3817
- }
3818
- },
3819
- enumerable: false,
3820
- configurable: true
3821
- });
3822
- Object.defineProperty(MatDateRangeInput.prototype, "required", {
3823
- /** Whether the input is required. */
3824
- get: function () { return !!this._required; },
3825
- set: function (value) {
3826
- this._required = coercion.coerceBooleanProperty(value);
3827
- },
3828
- enumerable: false,
3829
- configurable: true
3830
- });
3831
- Object.defineProperty(MatDateRangeInput.prototype, "dateFilter", {
3832
- /** Function that can be used to filter out dates within the date range picker. */
3833
- get: function () { return this._dateFilter; },
3834
- set: function (value) {
3835
- var start = this._startInput;
3836
- var end = this._endInput;
3837
- var wasMatchingStart = start && start._matchesFilter(start.value);
3838
- var wasMatchingEnd = end && end._matchesFilter(start.value);
3839
- this._dateFilter = value;
3840
- if (start && start._matchesFilter(start.value) !== wasMatchingStart) {
3841
- start._validatorOnChange();
3842
- }
3843
- if (end && end._matchesFilter(end.value) !== wasMatchingEnd) {
3844
- end._validatorOnChange();
3845
- }
3846
- },
3847
- enumerable: false,
3848
- configurable: true
3849
- });
3850
- Object.defineProperty(MatDateRangeInput.prototype, "min", {
3851
- /** The minimum valid date. */
3852
- get: function () { return this._min; },
3853
- set: function (value) {
3854
- var validValue = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value));
3855
- if (!this._dateAdapter.sameDate(validValue, this._min)) {
3856
- this._min = validValue;
3857
- this._revalidate();
3858
- }
3859
- },
3860
- enumerable: false,
3861
- configurable: true
3862
- });
3863
- Object.defineProperty(MatDateRangeInput.prototype, "max", {
3864
- /** The maximum valid date. */
3865
- get: function () { return this._max; },
3866
- set: function (value) {
3867
- var validValue = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value));
3868
- if (!this._dateAdapter.sameDate(validValue, this._max)) {
3869
- this._max = validValue;
3870
- this._revalidate();
3871
- }
3872
- },
3873
- enumerable: false,
3874
- configurable: true
3875
- });
3876
- Object.defineProperty(MatDateRangeInput.prototype, "disabled", {
3877
- /** Whether the input is disabled. */
3878
- get: function () {
3879
- return (this._startInput && this._endInput) ?
3880
- (this._startInput.disabled && this._endInput.disabled) :
3881
- this._groupDisabled;
3882
- },
3883
- set: function (value) {
3884
- var newValue = coercion.coerceBooleanProperty(value);
3885
- if (newValue !== this._groupDisabled) {
3886
- this._groupDisabled = newValue;
3887
- this.stateChanges.next(undefined);
3888
- }
3889
- },
3890
- enumerable: false,
3891
- configurable: true
3892
- });
3893
- Object.defineProperty(MatDateRangeInput.prototype, "errorState", {
3894
- /** Whether the input is in an error state. */
3895
- get: function () {
3896
- if (this._startInput && this._endInput) {
3897
- return this._startInput.errorState || this._endInput.errorState;
3898
- }
3899
- return false;
3900
- },
3901
- enumerable: false,
3902
- configurable: true
3903
- });
3904
- Object.defineProperty(MatDateRangeInput.prototype, "empty", {
3905
- /** Whether the datepicker input is empty. */
3906
- get: function () {
3907
- var startEmpty = this._startInput ? this._startInput.isEmpty() : false;
3908
- var endEmpty = this._endInput ? this._endInput.isEmpty() : false;
3909
- return startEmpty && endEmpty;
3910
- },
3911
- enumerable: false,
3912
- configurable: true
3913
- });
3914
- /**
3915
- * Implemented as a part of `MatFormFieldControl`.
3916
- * @docs-private
3917
- */
3918
- MatDateRangeInput.prototype.setDescribedByIds = function (ids) {
3919
- this._ariaDescribedBy = ids.length ? ids.join(' ') : null;
3920
- };
3921
- /**
3922
- * Implemented as a part of `MatFormFieldControl`.
3923
- * @docs-private
3924
- */
3925
- MatDateRangeInput.prototype.onContainerClick = function () {
3926
- if (!this.focused && !this.disabled) {
3927
- if (!this._model || !this._model.selection.start) {
3928
- this._startInput.focus();
3929
- }
3930
- else {
3931
- this._endInput.focus();
3932
- }
3933
- }
3934
- };
3935
- MatDateRangeInput.prototype.ngAfterContentInit = function () {
3936
- var _this = this;
3937
- if (typeof ngDevMode === 'undefined' || ngDevMode) {
3938
- if (!this._startInput) {
3939
- throw Error('mat-date-range-input must contain a matStartDate input');
3940
- }
3941
- if (!this._endInput) {
3942
- throw Error('mat-date-range-input must contain a matEndDate input');
3943
- }
3944
- }
3945
- if (this._model) {
3946
- this._registerModel(this._model);
3947
- }
3948
- // We don't need to unsubscribe from this, because we
3949
- // know that the input streams will be completed on destroy.
3950
- rxjs.merge(this._startInput.stateChanges, this._endInput.stateChanges).subscribe(function () {
3951
- _this.stateChanges.next(undefined);
3952
- });
3953
- };
3954
- MatDateRangeInput.prototype.ngOnChanges = function (changes) {
3955
- if (dateInputsHaveChanged(changes, this._dateAdapter)) {
3956
- this.stateChanges.next(undefined);
3957
- }
3958
- };
3959
- MatDateRangeInput.prototype.ngOnDestroy = function () {
3960
- this._closedSubscription.unsubscribe();
3961
- this.stateChanges.complete();
3962
- };
3963
- /** Gets the date at which the calendar should start. */
3964
- MatDateRangeInput.prototype.getStartValue = function () {
3965
- return this.value ? this.value.start : null;
3966
- };
3967
- /** Gets the input's theme palette. */
3968
- MatDateRangeInput.prototype.getThemePalette = function () {
3969
- return this._formField ? this._formField.color : undefined;
3970
- };
3971
- /** Gets the element to which the calendar overlay should be attached. */
3972
- MatDateRangeInput.prototype.getConnectedOverlayOrigin = function () {
3973
- return this._formField ? this._formField.getConnectedOverlayOrigin() : this._elementRef;
3974
- };
3975
- /** Gets the ID of an element that should be used a description for the calendar overlay. */
3976
- MatDateRangeInput.prototype.getOverlayLabelId = function () {
3977
- return this._formField ? this._formField.getLabelId() : null;
3978
- };
3979
- /** Gets the value that is used to mirror the state input. */
3980
- MatDateRangeInput.prototype._getInputMirrorValue = function () {
3981
- return this._startInput ? this._startInput.getMirrorValue() : '';
3982
- };
3983
- /** Whether the input placeholders should be hidden. */
3984
- MatDateRangeInput.prototype._shouldHidePlaceholders = function () {
3985
- return this._startInput ? !this._startInput.isEmpty() : false;
3986
- };
3987
- /** Handles the value in one of the child inputs changing. */
3988
- MatDateRangeInput.prototype._handleChildValueChange = function () {
3989
- this.stateChanges.next(undefined);
3990
- this._changeDetectorRef.markForCheck();
3991
- };
3992
- /** Opens the date range picker associated with the input. */
3993
- MatDateRangeInput.prototype._openDatepicker = function () {
3994
- if (this._rangePicker) {
3995
- this._rangePicker.open();
3996
- }
3997
- };
3998
- /** Whether the separate text should be hidden. */
3999
- MatDateRangeInput.prototype._shouldHideSeparator = function () {
4000
- return (!this._formField || (this._formField.getLabelId() &&
4001
- !this._formField._shouldLabelFloat())) && this.empty;
4002
- };
4003
- /** Gets the value for the `aria-labelledby` attribute of the inputs. */
4004
- MatDateRangeInput.prototype._getAriaLabelledby = function () {
4005
- var formField = this._formField;
4006
- return formField && formField._hasFloatingLabel() ? formField._labelId : null;
4007
- };
4008
- /** Updates the focused state of the range input. */
4009
- MatDateRangeInput.prototype._updateFocus = function (origin) {
4010
- this.focused = origin !== null;
4011
- this.stateChanges.next();
4012
- };
4013
- /** Re-runs the validators on the start/end inputs. */
4014
- MatDateRangeInput.prototype._revalidate = function () {
4015
- if (this._startInput) {
4016
- this._startInput._validatorOnChange();
4017
- }
4018
- if (this._endInput) {
4019
- this._endInput._validatorOnChange();
4020
- }
4021
- };
4022
- /** Registers the current date selection model with the start/end inputs. */
4023
- MatDateRangeInput.prototype._registerModel = function (model) {
4024
- if (this._startInput) {
4025
- this._startInput._registerModel(model);
4026
- }
4027
- if (this._endInput) {
4028
- this._endInput._registerModel(model);
4029
- }
4030
- };
4031
- return MatDateRangeInput;
4032
- }());
4033
- MatDateRangeInput.decorators = [
4034
- { type: i0.Component, args: [{
4035
- selector: 'mat-date-range-input',
4036
- template: "<div\n class=\"mat-date-range-input-container\"\n cdkMonitorSubtreeFocus\n (cdkFocusChange)=\"_updateFocus($event)\">\n <div class=\"mat-date-range-input-start-wrapper\">\n <ng-content select=\"input[matStartDate]\"></ng-content>\n <span\n class=\"mat-date-range-input-mirror\"\n aria-hidden=\"true\">{{_getInputMirrorValue()}}</span>\n </div>\n\n <span\n class=\"mat-date-range-input-separator\"\n [class.mat-date-range-input-separator-hidden]=\"_shouldHideSeparator()\">{{separator}}</span>\n\n <div class=\"mat-date-range-input-end-wrapper\">\n <ng-content select=\"input[matEndDate]\"></ng-content>\n </div>\n</div>\n\n",
4037
- exportAs: 'matDateRangeInput',
4038
- host: {
4039
- 'class': 'mat-date-range-input',
4040
- '[class.mat-date-range-input-hide-placeholders]': '_shouldHidePlaceholders()',
4041
- '[class.mat-date-range-input-required]': 'required',
4042
- '[attr.id]': 'null',
4043
- 'role': 'group',
4044
- '[attr.aria-labelledby]': '_getAriaLabelledby()',
4045
- '[attr.aria-describedby]': '_ariaDescribedBy',
4046
- // Used by the test harness to tie this input to its calendar. We can't depend on
4047
- // `aria-owns` for this, because it's only defined while the calendar is open.
4048
- '[attr.data-mat-calendar]': 'rangePicker ? rangePicker.id : null',
4049
- },
4050
- changeDetection: i0.ChangeDetectionStrategy.OnPush,
4051
- encapsulation: i0.ViewEncapsulation.None,
4052
- providers: [
4053
- { provide: formField.MatFormFieldControl, useExisting: MatDateRangeInput },
4054
- { provide: MAT_DATE_RANGE_INPUT_PARENT, useExisting: MatDateRangeInput },
4055
- ],
4056
- styles: [".mat-date-range-input{display:block;width:100%}.mat-date-range-input-container{display:flex;align-items:center}.mat-date-range-input-separator{transition:opacity 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1);margin:0 4px}.mat-date-range-input-separator-hidden{-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:0;transition:none}.mat-date-range-input-inner{font:inherit;background:transparent;color:currentColor;border:none;outline:none;padding:0;margin:0;vertical-align:bottom;text-align:inherit;-webkit-appearance:none;width:100%}.mat-date-range-input-inner:-moz-ui-invalid{box-shadow:none}.mat-date-range-input-inner::placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-date-range-input-inner::-moz-placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-date-range-input-inner::-webkit-input-placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-date-range-input-inner:-ms-input-placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-form-field-hide-placeholder .mat-date-range-input-inner::placeholder,.mat-date-range-input-hide-placeholders .mat-date-range-input-inner::placeholder{-webkit-user-select:none;-moz-user-select:none;user-select:none;color:transparent !important;-webkit-text-fill-color:transparent;transition:none}.cdk-high-contrast-active .mat-form-field-hide-placeholder .mat-date-range-input-inner::placeholder,.cdk-high-contrast-active .mat-date-range-input-hide-placeholders .mat-date-range-input-inner::placeholder{opacity:0}.mat-form-field-hide-placeholder .mat-date-range-input-inner::-moz-placeholder,.mat-date-range-input-hide-placeholders .mat-date-range-input-inner::-moz-placeholder{-webkit-user-select:none;-moz-user-select:none;user-select:none;color:transparent !important;-webkit-text-fill-color:transparent;transition:none}.cdk-high-contrast-active .mat-form-field-hide-placeholder .mat-date-range-input-inner::-moz-placeholder,.cdk-high-contrast-active .mat-date-range-input-hide-placeholders .mat-date-range-input-inner::-moz-placeholder{opacity:0}.mat-form-field-hide-placeholder .mat-date-range-input-inner::-webkit-input-placeholder,.mat-date-range-input-hide-placeholders .mat-date-range-input-inner::-webkit-input-placeholder{-webkit-user-select:none;-moz-user-select:none;user-select:none;color:transparent !important;-webkit-text-fill-color:transparent;transition:none}.cdk-high-contrast-active .mat-form-field-hide-placeholder .mat-date-range-input-inner::-webkit-input-placeholder,.cdk-high-contrast-active .mat-date-range-input-hide-placeholders .mat-date-range-input-inner::-webkit-input-placeholder{opacity:0}.mat-form-field-hide-placeholder .mat-date-range-input-inner:-ms-input-placeholder,.mat-date-range-input-hide-placeholders .mat-date-range-input-inner:-ms-input-placeholder{-webkit-user-select:none;-moz-user-select:none;user-select:none;color:transparent !important;-webkit-text-fill-color:transparent;transition:none}.cdk-high-contrast-active .mat-form-field-hide-placeholder .mat-date-range-input-inner:-ms-input-placeholder,.cdk-high-contrast-active .mat-date-range-input-hide-placeholders .mat-date-range-input-inner:-ms-input-placeholder{opacity:0}.mat-date-range-input-mirror{-webkit-user-select:none;-moz-user-select:none;user-select:none;visibility:hidden;white-space:nowrap;display:inline-block;min-width:2px}.mat-date-range-input-start-wrapper{position:relative;overflow:hidden;max-width:calc(50% - 4px)}.mat-date-range-input-start-wrapper .mat-date-range-input-inner{position:absolute;top:0;left:0}.mat-date-range-input-end-wrapper{flex-grow:1;max-width:calc(50% - 4px)}.mat-form-field-type-mat-date-range-input .mat-form-field-infix{width:200px}\n"]
4057
- },] }
4058
- ];
4059
- MatDateRangeInput.ctorParameters = function () { return [
4060
- { type: i0.ChangeDetectorRef },
4061
- { type: i0.ElementRef },
4062
- { type: forms.ControlContainer, decorators: [{ type: i0.Optional }, { type: i0.Self }] },
4063
- { type: core.DateAdapter, decorators: [{ type: i0.Optional }] },
4064
- { type: formField.MatFormField, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [formField.MAT_FORM_FIELD,] }] }
4065
- ]; };
4066
- MatDateRangeInput.propDecorators = {
4067
- rangePicker: [{ type: i0.Input }],
4068
- required: [{ type: i0.Input }],
4069
- dateFilter: [{ type: i0.Input }],
4070
- min: [{ type: i0.Input }],
4071
- max: [{ type: i0.Input }],
4072
- disabled: [{ type: i0.Input }],
4073
- separator: [{ type: i0.Input }],
4074
- comparisonStart: [{ type: i0.Input }],
4075
- comparisonEnd: [{ type: i0.Input }],
4076
- _startInput: [{ type: i0.ContentChild, args: [MatStartDate,] }],
4077
- _endInput: [{ type: i0.ContentChild, args: [MatEndDate,] }]
4078
- };
4079
-
4080
- // TODO(mmalerba): We use a component instead of a directive here so the user can use implicit
4081
- // template reference variables (e.g. #d vs #d="matDateRangePicker"). We can change this to a
4082
- // directive if angular adds support for `exportAs: '$implicit'` on directives.
4083
- /** Component responsible for managing the date range picker popup/dialog. */
4084
- var MatDateRangePicker = /** @class */ (function (_super) {
4085
- __extends(MatDateRangePicker, _super);
4086
- function MatDateRangePicker() {
4087
- return _super !== null && _super.apply(this, arguments) || this;
4088
- }
4089
- MatDateRangePicker.prototype._forwardContentValues = function (instance) {
4090
- _super.prototype._forwardContentValues.call(this, instance);
4091
- var input = this.datepickerInput;
4092
- if (input) {
4093
- instance.comparisonStart = input.comparisonStart;
4094
- instance.comparisonEnd = input.comparisonEnd;
4095
- }
4096
- };
4097
- return MatDateRangePicker;
4098
- }(MatDatepickerBase));
4099
- MatDateRangePicker.decorators = [
4100
- { type: i0.Component, args: [{
4101
- selector: 'mat-date-range-picker',
4102
- template: '',
4103
- exportAs: 'matDateRangePicker',
4104
- changeDetection: i0.ChangeDetectionStrategy.OnPush,
4105
- encapsulation: i0.ViewEncapsulation.None,
4106
- providers: [
4107
- MAT_RANGE_DATE_SELECTION_MODEL_PROVIDER,
4108
- MAT_CALENDAR_RANGE_STRATEGY_PROVIDER,
4109
- { provide: MatDatepickerBase, useExisting: MatDateRangePicker },
4110
- ]
4111
- },] }
4112
- ];
4113
-
4114
- /**
4115
- * @license
4116
- * Copyright Google LLC All Rights Reserved.
4117
- *
4118
- * Use of this source code is governed by an MIT-style license that can be
4119
- * found in the LICENSE file at https://angular.io/license
4120
- */
4121
- /** Button that will close the datepicker and assign the current selection to the data model. */
4122
- var MatDatepickerApply = /** @class */ (function () {
4123
- function MatDatepickerApply(_datepicker) {
4124
- this._datepicker = _datepicker;
4125
- }
4126
- MatDatepickerApply.prototype._applySelection = function () {
4127
- this._datepicker._applyPendingSelection();
4128
- this._datepicker.close();
4129
- };
4130
- return MatDatepickerApply;
4131
- }());
4132
- MatDatepickerApply.decorators = [
4133
- { type: i0.Directive, args: [{
4134
- selector: '[matDatepickerApply], [matDateRangePickerApply]',
4135
- host: { '(click)': '_applySelection()' }
4136
- },] }
4137
- ];
4138
- MatDatepickerApply.ctorParameters = function () { return [
4139
- { type: MatDatepickerBase }
4140
- ]; };
4141
- /** Button that will close the datepicker and discard the current selection. */
4142
- var MatDatepickerCancel = /** @class */ (function () {
4143
- function MatDatepickerCancel(_datepicker) {
4144
- this._datepicker = _datepicker;
4145
- }
4146
- return MatDatepickerCancel;
4147
- }());
4148
- MatDatepickerCancel.decorators = [
4149
- { type: i0.Directive, args: [{
4150
- selector: '[matDatepickerCancel], [matDateRangePickerCancel]',
4151
- host: { '(click)': '_datepicker.close()' }
4152
- },] }
4153
- ];
4154
- MatDatepickerCancel.ctorParameters = function () { return [
4155
- { type: MatDatepickerBase }
4156
- ]; };
4157
- /**
4158
- * Container that can be used to project a row of action buttons
4159
- * to the bottom of a datepicker or date range picker.
4160
- */
4161
- var MatDatepickerActions = /** @class */ (function () {
4162
- function MatDatepickerActions(_datepicker, _viewContainerRef) {
4163
- this._datepicker = _datepicker;
4164
- this._viewContainerRef = _viewContainerRef;
4165
- }
4166
- MatDatepickerActions.prototype.ngAfterViewInit = function () {
4167
- this._portal = new portal.TemplatePortal(this._template, this._viewContainerRef);
4168
- this._datepicker.registerActions(this._portal);
4169
- };
4170
- MatDatepickerActions.prototype.ngOnDestroy = function () {
4171
- var _a;
4172
- this._datepicker.removeActions(this._portal);
4173
- // Needs to be null checked since we initialize it in `ngAfterViewInit`.
4174
- if (this._portal && this._portal.isAttached) {
4175
- (_a = this._portal) === null || _a === void 0 ? void 0 : _a.detach();
4176
- }
4177
- };
4178
- return MatDatepickerActions;
4179
- }());
4180
- MatDatepickerActions.decorators = [
4181
- { type: i0.Component, args: [{
4182
- selector: 'mat-datepicker-actions, mat-date-range-picker-actions',
4183
- template: "\n <ng-template>\n <div class=\"mat-datepicker-actions\">\n <ng-content></ng-content>\n </div>\n </ng-template>\n ",
4184
- changeDetection: i0.ChangeDetectionStrategy.OnPush,
4185
- encapsulation: i0.ViewEncapsulation.None,
4186
- styles: [".mat-datepicker-actions{display:flex;justify-content:flex-end;align-items:center;padding:0 8px 8px 8px}.mat-datepicker-actions .mat-button-base+.mat-button-base{margin-left:8px}[dir=rtl] .mat-datepicker-actions .mat-button-base+.mat-button-base{margin-left:0;margin-right:8px}\n"]
4187
- },] }
4188
- ];
4189
- MatDatepickerActions.ctorParameters = function () { return [
4190
- { type: MatDatepickerBase },
4191
- { type: i0.ViewContainerRef }
4192
- ]; };
4193
- MatDatepickerActions.propDecorators = {
4194
- _template: [{ type: i0.ViewChild, args: [i0.TemplateRef,] }]
4195
- };
4196
-
4197
- /**
4198
- * @license
4199
- * Copyright Google LLC All Rights Reserved.
4200
- *
4201
- * Use of this source code is governed by an MIT-style license that can be
4202
- * found in the LICENSE file at https://angular.io/license
4203
- */
4204
- var MatDatepickerModule = /** @class */ (function () {
4205
- function MatDatepickerModule() {
4206
- }
4207
- return MatDatepickerModule;
4208
- }());
4209
- MatDatepickerModule.decorators = [
4210
- { type: i0.NgModule, args: [{
4211
- imports: [
4212
- common.CommonModule,
4213
- button.MatButtonModule,
4214
- overlay.OverlayModule,
4215
- a11y.A11yModule,
4216
- portal.PortalModule,
4217
- core.MatCommonModule,
4218
- ],
4219
- exports: [
4220
- scrolling.CdkScrollableModule,
4221
- MatCalendar,
4222
- MatCalendarBody,
4223
- MatDatepicker,
4224
- MatDatepickerContent,
4225
- MatDatepickerInput,
4226
- MatDatepickerToggle,
4227
- MatDatepickerToggleIcon,
4228
- MatMonthView,
4229
- MatYearView,
4230
- MatMultiYearView,
4231
- MatCalendarHeader,
4232
- MatDateRangeInput,
4233
- MatStartDate,
4234
- MatEndDate,
4235
- MatDateRangePicker,
4236
- MatDatepickerActions,
4237
- MatDatepickerCancel,
4238
- MatDatepickerApply
4239
- ],
4240
- declarations: [
4241
- MatCalendar,
4242
- MatCalendarBody,
4243
- MatDatepicker,
4244
- MatDatepickerContent,
4245
- MatDatepickerInput,
4246
- MatDatepickerToggle,
4247
- MatDatepickerToggleIcon,
4248
- MatMonthView,
4249
- MatYearView,
4250
- MatMultiYearView,
4251
- MatCalendarHeader,
4252
- MatDateRangeInput,
4253
- MatStartDate,
4254
- MatEndDate,
4255
- MatDateRangePicker,
4256
- MatDatepickerActions,
4257
- MatDatepickerCancel,
4258
- MatDatepickerApply
4259
- ],
4260
- providers: [
4261
- MatDatepickerIntl,
4262
- MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY_PROVIDER
4263
- ],
4264
- entryComponents: [
4265
- MatDatepickerContent,
4266
- MatCalendarHeader,
4267
- ]
4268
- },] }
4269
- ];
4270
-
4271
- /**
4272
- * @license
4273
- * Copyright Google LLC All Rights Reserved.
4274
- *
4275
- * Use of this source code is governed by an MIT-style license that can be
4276
- * found in the LICENSE file at https://angular.io/license
4277
- */
4278
-
4279
- /**
4280
- * Generated bundle index. Do not edit.
4281
- */
4282
-
4283
- exports.DateRange = DateRange;
4284
- exports.DefaultMatCalendarRangeStrategy = DefaultMatCalendarRangeStrategy;
4285
- exports.MAT_DATEPICKER_SCROLL_STRATEGY = MAT_DATEPICKER_SCROLL_STRATEGY;
4286
- exports.MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY = MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY;
4287
- exports.MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY_PROVIDER = MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY_PROVIDER;
4288
- exports.MAT_DATEPICKER_VALIDATORS = MAT_DATEPICKER_VALIDATORS;
4289
- exports.MAT_DATEPICKER_VALUE_ACCESSOR = MAT_DATEPICKER_VALUE_ACCESSOR;
4290
- exports.MAT_DATE_RANGE_SELECTION_STRATEGY = MAT_DATE_RANGE_SELECTION_STRATEGY;
4291
- exports.MAT_RANGE_DATE_SELECTION_MODEL_FACTORY = MAT_RANGE_DATE_SELECTION_MODEL_FACTORY;
4292
- exports.MAT_RANGE_DATE_SELECTION_MODEL_PROVIDER = MAT_RANGE_DATE_SELECTION_MODEL_PROVIDER;
4293
- exports.MAT_SINGLE_DATE_SELECTION_MODEL_FACTORY = MAT_SINGLE_DATE_SELECTION_MODEL_FACTORY;
4294
- exports.MAT_SINGLE_DATE_SELECTION_MODEL_PROVIDER = MAT_SINGLE_DATE_SELECTION_MODEL_PROVIDER;
4295
- exports.MatCalendar = MatCalendar;
4296
- exports.MatCalendarBody = MatCalendarBody;
4297
- exports.MatCalendarCell = MatCalendarCell;
4298
- exports.MatCalendarHeader = MatCalendarHeader;
4299
- exports.MatDateRangeInput = MatDateRangeInput;
4300
- exports.MatDateRangePicker = MatDateRangePicker;
4301
- exports.MatDateSelectionModel = MatDateSelectionModel;
4302
- exports.MatDatepicker = MatDatepicker;
4303
- exports.MatDatepickerActions = MatDatepickerActions;
4304
- exports.MatDatepickerApply = MatDatepickerApply;
4305
- exports.MatDatepickerCancel = MatDatepickerCancel;
4306
- exports.MatDatepickerContent = MatDatepickerContent;
4307
- exports.MatDatepickerInput = MatDatepickerInput;
4308
- exports.MatDatepickerInputEvent = MatDatepickerInputEvent;
4309
- exports.MatDatepickerIntl = MatDatepickerIntl;
4310
- exports.MatDatepickerModule = MatDatepickerModule;
4311
- exports.MatDatepickerToggle = MatDatepickerToggle;
4312
- exports.MatDatepickerToggleIcon = MatDatepickerToggleIcon;
4313
- exports.MatEndDate = MatEndDate;
4314
- exports.MatMonthView = MatMonthView;
4315
- exports.MatMultiYearView = MatMultiYearView;
4316
- exports.MatRangeDateSelectionModel = MatRangeDateSelectionModel;
4317
- exports.MatSingleDateSelectionModel = MatSingleDateSelectionModel;
4318
- exports.MatStartDate = MatStartDate;
4319
- exports.MatYearView = MatYearView;
4320
- exports.matDatepickerAnimations = matDatepickerAnimations;
4321
- exports.yearsPerPage = yearsPerPage;
4322
- exports.yearsPerRow = yearsPerRow;
4323
- exports.ɵangular_material_src_material_datepicker_datepicker_a = MAT_CALENDAR_RANGE_STRATEGY_PROVIDER_FACTORY;
4324
- exports.ɵangular_material_src_material_datepicker_datepicker_b = MAT_CALENDAR_RANGE_STRATEGY_PROVIDER;
4325
- exports.ɵangular_material_src_material_datepicker_datepicker_c = MatDatepickerBase;
4326
- exports.ɵangular_material_src_material_datepicker_datepicker_d = MatDatepickerInputBase;
4327
- exports.ɵangular_material_src_material_datepicker_datepicker_e = MAT_DATE_RANGE_INPUT_PARENT;
4328
-
4329
- Object.defineProperty(exports, '__esModule', { value: true });
4330
-
4331
- })));
4332
- //# sourceMappingURL=material-datepicker.umd.js.map