@ptsecurity/mosaic 12.1.0 → 13.0.0

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 (731) hide show
  1. package/_theming.scss +113 -66
  2. package/_visual.scss +11 -9
  3. package/autocomplete/README.md +0 -0
  4. package/autocomplete/package.json +5 -5
  5. package/button/README.md +0 -0
  6. package/button/button.component.d.ts +17 -14
  7. package/button/button.module.d.ts +1 -1
  8. package/button/package.json +5 -5
  9. package/button-toggle/README.md +0 -0
  10. package/button-toggle/package.json +5 -5
  11. package/card/README.md +0 -0
  12. package/card/package.json +5 -5
  13. package/checkbox/README.md +1 -0
  14. package/checkbox/package.json +5 -5
  15. package/core/formatters/date/formatter.d.ts +4 -4
  16. package/core/formatters/date/templates/en-US.d.ts +8 -8
  17. package/core/formatters/date/templates/ru-RU.d.ts +8 -8
  18. package/core/package.json +5 -5
  19. package/core/pop-up/pop-up-trigger.d.ts +9 -12
  20. package/datepicker/README.md +0 -0
  21. package/datepicker/package.json +5 -5
  22. package/design-tokens/package.json +5 -5
  23. package/design-tokens/style-dictionary/build.js +6 -0
  24. package/design-tokens/style-dictionary/configs/index.js +2 -1
  25. package/design-tokens/tokens/components/navbar.json5 +12 -9
  26. package/design-tokens/tokens.d.ts +11 -9
  27. package/divider/README.md +0 -0
  28. package/divider/package.json +5 -5
  29. package/dropdown/dropdown-item.component.d.ts +1 -0
  30. package/dropdown/package.json +5 -5
  31. package/{esm2015/autocomplete/autocomplete-origin.directive.js → esm2020/autocomplete/autocomplete-origin.directive.mjs} +4 -4
  32. package/{esm2015/autocomplete/autocomplete-trigger.directive.js → esm2020/autocomplete/autocomplete-trigger.directive.mjs} +4 -4
  33. package/esm2020/autocomplete/autocomplete.component.mjs +154 -0
  34. package/{esm2015/autocomplete/autocomplete.module.js → esm2020/autocomplete/autocomplete.module.mjs} +5 -5
  35. package/{esm2015/autocomplete/index.js → esm2020/autocomplete/index.mjs} +0 -0
  36. package/{esm2015/autocomplete/ptsecurity-mosaic-autocomplete.js → esm2020/autocomplete/ptsecurity-mosaic-autocomplete.mjs} +0 -0
  37. package/{esm2015/autocomplete/public-api.js → esm2020/autocomplete/public-api.mjs} +0 -0
  38. package/esm2020/button/button.component.mjs +129 -0
  39. package/esm2020/button/button.module.mjs +38 -0
  40. package/{esm2015/button/index.js → esm2020/button/index.mjs} +0 -0
  41. package/{esm2015/button/ptsecurity-mosaic-button.js → esm2020/button/ptsecurity-mosaic-button.mjs} +0 -0
  42. package/{esm2015/button/public-api.js → esm2020/button/public-api.mjs} +0 -0
  43. package/esm2020/button-toggle/button-toggle.component.mjs +362 -0
  44. package/{esm2015/button-toggle/button-toggle.module.js → esm2020/button-toggle/button-toggle.module.mjs} +5 -5
  45. package/{esm2015/button-toggle/index.js → esm2020/button-toggle/index.mjs} +0 -0
  46. package/{esm2015/button-toggle/ptsecurity-mosaic-button-toggle.js → esm2020/button-toggle/ptsecurity-mosaic-button-toggle.mjs} +0 -0
  47. package/{esm2015/button-toggle/public-api.js → esm2020/button-toggle/public-api.mjs} +0 -0
  48. package/esm2020/card/card.component.mjs +80 -0
  49. package/{esm2015/card/card.module.js → esm2020/card/card.module.mjs} +5 -5
  50. package/{esm2015/card/index.js → esm2020/card/index.mjs} +0 -0
  51. package/{esm2015/card/ptsecurity-mosaic-card.js → esm2020/card/ptsecurity-mosaic-card.mjs} +0 -0
  52. package/{esm2015/card/public-api.js → esm2020/card/public-api.mjs} +0 -0
  53. package/{esm2015/checkbox/checkbox-config.js → esm2020/checkbox/checkbox-config.mjs} +0 -0
  54. package/{esm2015/checkbox/checkbox-module.js → esm2020/checkbox/checkbox-module.mjs} +5 -5
  55. package/{esm2015/checkbox/checkbox-required-validator.js → esm2020/checkbox/checkbox-required-validator.mjs} +4 -4
  56. package/esm2020/checkbox/checkbox.mjs +315 -0
  57. package/{esm2015/checkbox/index.js → esm2020/checkbox/index.mjs} +0 -0
  58. package/{esm2015/checkbox/ptsecurity-mosaic-checkbox.js → esm2020/checkbox/ptsecurity-mosaic-checkbox.mjs} +0 -0
  59. package/{esm2015/checkbox/public-api.js → esm2020/checkbox/public-api.mjs} +0 -0
  60. package/{esm2015/core/animation/animation.js → esm2020/core/animation/animation.mjs} +0 -0
  61. package/{esm2015/core/animation/fade-animations.js → esm2020/core/animation/fade-animations.mjs} +0 -0
  62. package/{esm2015/core/animation/index.js → esm2020/core/animation/index.mjs} +0 -0
  63. package/{esm2015/core/animation/select-animations.js → esm2020/core/animation/select-animations.mjs} +0 -0
  64. package/{esm2015/core/common-behaviors/color.js → esm2020/core/common-behaviors/color.mjs} +0 -0
  65. package/{esm2015/core/common-behaviors/common-module.js → esm2020/core/common-behaviors/common-module.mjs} +5 -5
  66. package/{esm2015/core/common-behaviors/constructor.js → esm2020/core/common-behaviors/constructor.mjs} +0 -0
  67. package/{esm2015/core/common-behaviors/disabled.js → esm2020/core/common-behaviors/disabled.mjs} +0 -0
  68. package/{esm2015/core/common-behaviors/error-state.js → esm2020/core/common-behaviors/error-state.mjs} +0 -0
  69. package/{esm2015/core/common-behaviors/index.js → esm2020/core/common-behaviors/index.mjs} +0 -0
  70. package/{esm2015/core/common-behaviors/tabindex.js → esm2020/core/common-behaviors/tabindex.mjs} +0 -0
  71. package/{esm2015/core/error/error-options.js → esm2020/core/error/error-options.mjs} +7 -7
  72. package/esm2020/core/formatters/date/formatter.mjs +314 -0
  73. package/esm2020/core/formatters/date/templates/en-US.mjs +280 -0
  74. package/esm2020/core/formatters/date/templates/ru-RU.mjs +280 -0
  75. package/{esm2015/core/formatters/index.js → esm2020/core/formatters/index.mjs} +5 -5
  76. package/esm2020/core/formatters/number/formatter.mjs +105 -0
  77. package/{esm2015/core/forms/forms-module.js → esm2020/core/forms/forms-module.mjs} +5 -5
  78. package/{esm2015/core/forms/forms.directive.js → esm2020/core/forms/forms.directive.mjs} +7 -7
  79. package/{esm2015/core/forms/index.js → esm2020/core/forms/index.mjs} +0 -0
  80. package/{esm2015/core/highlight/highlight.pipe.js → esm2020/core/highlight/highlight.pipe.mjs} +4 -4
  81. package/{esm2015/core/highlight/index.js → esm2020/core/highlight/index.mjs} +5 -5
  82. package/{esm2015/core/index.js → esm2020/core/index.mjs} +0 -0
  83. package/{esm2015/core/label/label-options.js → esm2020/core/label/label-options.mjs} +0 -0
  84. package/{esm2015/core/line/line.js → esm2020/core/line/line.mjs} +8 -8
  85. package/esm2020/core/option/action.mjs +121 -0
  86. package/{esm2015/core/option/index.js → esm2020/core/option/index.mjs} +0 -0
  87. package/esm2020/core/option/optgroup.mjs +31 -0
  88. package/{esm2015/core/option/option-module.js → esm2020/core/option/option-module.mjs} +5 -5
  89. package/esm2020/core/option/option.mjs +254 -0
  90. package/{esm2015/core/overlay/overlay-position-map.js → esm2020/core/overlay/overlay-position-map.mjs} +0 -0
  91. package/{esm2015/core/pop-up/constants.js → esm2020/core/pop-up/constants.mjs} +0 -0
  92. package/{esm2015/core/pop-up/index.js → esm2020/core/pop-up/index.mjs} +0 -0
  93. package/esm2020/core/pop-up/pop-up-trigger.mjs +246 -0
  94. package/esm2020/core/pop-up/pop-up.mjs +91 -0
  95. package/{esm2015/core/ptsecurity-mosaic-core.js → esm2020/core/ptsecurity-mosaic-core.mjs} +0 -0
  96. package/{esm2015/core/public-api.js → esm2020/core/public-api.mjs} +0 -0
  97. package/{esm2015/core/select/constants.js → esm2020/core/select/constants.mjs} +0 -0
  98. package/{esm2015/core/select/errors.js → esm2020/core/select/errors.mjs} +0 -0
  99. package/{esm2015/core/select/events.js → esm2020/core/select/events.mjs} +0 -0
  100. package/{esm2015/core/select/index.js → esm2020/core/select/index.mjs} +0 -0
  101. package/{esm2015/core/selection/constants.js → esm2020/core/selection/constants.mjs} +0 -0
  102. package/{esm2015/core/selection/index.js → esm2020/core/selection/index.mjs} +0 -0
  103. package/esm2020/core/selection/pseudo-checkbox/pseudo-checkbox.mjs +37 -0
  104. package/{esm2015/core/selection/pseudo-checkbox/pseudo-checkbox.module.js → esm2020/core/selection/pseudo-checkbox/pseudo-checkbox.module.mjs} +5 -5
  105. package/{esm2015/core/services/measure-scrollbar.service.js → esm2020/core/services/measure-scrollbar.service.mjs} +4 -4
  106. package/{esm2015/core/utils/index.js → esm2020/core/utils/index.mjs} +0 -0
  107. package/{esm2015/core/utils/public-api.js → esm2020/core/utils/public-api.mjs} +0 -0
  108. package/{esm2015/core/utils/utils.js → esm2020/core/utils/utils.mjs} +0 -0
  109. package/{esm2015/core/validation/index.js → esm2020/core/validation/index.mjs} +0 -0
  110. package/{esm2015/core/validation/validation.js → esm2020/core/validation/validation.mjs} +0 -0
  111. package/esm2020/datepicker/calendar-body.component.mjs +106 -0
  112. package/esm2020/datepicker/calendar.component.mjs +362 -0
  113. package/{esm2015/datepicker/datepicker-animations.js → esm2020/datepicker/datepicker-animations.mjs} +0 -0
  114. package/{esm2015/datepicker/datepicker-errors.js → esm2020/datepicker/datepicker-errors.mjs} +0 -0
  115. package/esm2020/datepicker/datepicker-input.directive.mjs +900 -0
  116. package/{esm2015/datepicker/datepicker-intl.js → esm2020/datepicker/datepicker-intl.mjs} +4 -4
  117. package/{esm2015/datepicker/datepicker-module.js → esm2020/datepicker/datepicker-module.mjs} +5 -5
  118. package/esm2020/datepicker/datepicker-toggle.component.mjs +86 -0
  119. package/esm2020/datepicker/datepicker.component.mjs +408 -0
  120. package/{esm2015/datepicker/index.js → esm2020/datepicker/index.mjs} +0 -0
  121. package/{esm2015/datepicker/month-view.component.js → esm2020/datepicker/month-view.component.mjs} +5 -11
  122. package/{esm2015/datepicker/multi-year-view.component.js → esm2020/datepicker/multi-year-view.component.mjs} +5 -11
  123. package/{esm2015/datepicker/ptsecurity-mosaic-datepicker.js → esm2020/datepicker/ptsecurity-mosaic-datepicker.mjs} +0 -0
  124. package/{esm2015/datepicker/public-api.js → esm2020/datepicker/public-api.mjs} +0 -0
  125. package/{esm2015/datepicker/year-view.component.js → esm2020/datepicker/year-view.component.mjs} +5 -11
  126. package/{esm2015/design-tokens/index.js → esm2020/design-tokens/index.mjs} +0 -0
  127. package/{esm2015/design-tokens/ptsecurity-mosaic-design-tokens.js → esm2020/design-tokens/ptsecurity-mosaic-design-tokens.mjs} +0 -0
  128. package/{esm2015/design-tokens/public-api.js → esm2020/design-tokens/public-api.mjs} +0 -0
  129. package/{esm2015/design-tokens/tokens.js → esm2020/design-tokens/tokens.mjs} +12 -10
  130. package/{esm2015/divider/divider.component.js → esm2020/divider/divider.component.mjs} +6 -13
  131. package/{esm2015/divider/divider.module.js → esm2020/divider/divider.module.mjs} +5 -5
  132. package/{esm2015/divider/index.js → esm2020/divider/index.mjs} +0 -0
  133. package/{esm2015/divider/ptsecurity-mosaic-divider.js → esm2020/divider/ptsecurity-mosaic-divider.mjs} +0 -0
  134. package/{esm2015/divider/public-api.js → esm2020/divider/public-api.mjs} +0 -0
  135. package/{esm2015/dropdown/dropdown-animations.js → esm2020/dropdown/dropdown-animations.mjs} +0 -0
  136. package/{esm2015/dropdown/dropdown-content.directive.js → esm2020/dropdown/dropdown-content.directive.mjs} +6 -8
  137. package/{esm2015/dropdown/dropdown-errors.js → esm2020/dropdown/dropdown-errors.mjs} +0 -0
  138. package/esm2020/dropdown/dropdown-item.component.mjs +139 -0
  139. package/esm2020/dropdown/dropdown-trigger.directive.mjs +485 -0
  140. package/esm2020/dropdown/dropdown.component.mjs +292 -0
  141. package/{esm2015/dropdown/dropdown.module.js → esm2020/dropdown/dropdown.module.mjs} +5 -5
  142. package/{esm2015/dropdown/dropdown.types.js → esm2020/dropdown/dropdown.types.mjs} +0 -0
  143. package/{esm2015/dropdown/index.js → esm2020/dropdown/index.mjs} +0 -0
  144. package/{esm2015/dropdown/ptsecurity-mosaic-dropdown.js → esm2020/dropdown/ptsecurity-mosaic-dropdown.mjs} +0 -0
  145. package/{esm2015/dropdown/public-api.js → esm2020/dropdown/public-api.mjs} +0 -0
  146. package/esm2020/form-field/cleaner.mjs +23 -0
  147. package/{esm2015/form-field/form-field-control.js → esm2020/form-field/form-field-control.mjs} +0 -0
  148. package/{esm2015/form-field/form-field-errors.js → esm2020/form-field/form-field-errors.mjs} +0 -0
  149. package/esm2020/form-field/form-field.mjs +205 -0
  150. package/{esm2015/form-field/form-field.module.js → esm2020/form-field/form-field.module.mjs} +5 -5
  151. package/{esm2015/form-field/hint.js → esm2020/form-field/hint.mjs} +4 -4
  152. package/{esm2015/form-field/index.js → esm2020/form-field/index.mjs} +0 -0
  153. package/{esm2015/form-field/prefix.js → esm2020/form-field/prefix.mjs} +4 -4
  154. package/{esm2015/form-field/ptsecurity-mosaic-form-field.js → esm2020/form-field/ptsecurity-mosaic-form-field.mjs} +0 -0
  155. package/{esm2015/form-field/public-api.js → esm2020/form-field/public-api.mjs} +0 -0
  156. package/{esm2015/form-field/stepper.js → esm2020/form-field/stepper.mjs} +4 -4
  157. package/{esm2015/form-field/suffix.js → esm2020/form-field/suffix.mjs} +4 -4
  158. package/esm2020/icon/icon.component.mjs +44 -0
  159. package/{esm2015/icon/icon.module.js → esm2020/icon/icon.module.mjs} +5 -5
  160. package/{esm2015/icon/index.js → esm2020/icon/index.mjs} +0 -0
  161. package/{esm2015/icon/ptsecurity-mosaic-icon.js → esm2020/icon/ptsecurity-mosaic-icon.mjs} +0 -0
  162. package/{esm2015/icon/public-api.js → esm2020/icon/public-api.mjs} +0 -0
  163. package/{esm2015/index.js → esm2020/index.mjs} +0 -0
  164. package/{esm2015/input/index.js → esm2020/input/index.mjs} +0 -0
  165. package/{esm2015/input/input-errors.js → esm2020/input/input-errors.mjs} +0 -0
  166. package/esm2020/input/input-number-validators.mjs +92 -0
  167. package/{esm2015/input/input-number.js → esm2020/input/input-number.mjs} +4 -4
  168. package/{esm2015/input/input-value-accessor.js → esm2020/input/input-value-accessor.mjs} +0 -0
  169. package/{esm2015/input/input.js → esm2020/input/input.mjs} +7 -7
  170. package/{esm2015/input/input.module.js → esm2020/input/input.module.mjs} +5 -5
  171. package/{esm2015/input/ptsecurity-mosaic-input.js → esm2020/input/ptsecurity-mosaic-input.mjs} +0 -0
  172. package/{esm2015/input/public-api.js → esm2020/input/public-api.mjs} +0 -0
  173. package/{esm2015/link/index.js → esm2020/link/index.mjs} +0 -0
  174. package/esm2020/link/link.component.mjs +107 -0
  175. package/{esm2015/link/link.module.js → esm2020/link/link.module.mjs} +5 -5
  176. package/{esm2015/link/ptsecurity-mosaic-link.js → esm2020/link/ptsecurity-mosaic-link.mjs} +0 -0
  177. package/{esm2015/link/public-api.js → esm2020/link/public-api.mjs} +0 -0
  178. package/{esm2015/list/index.js → esm2020/list/index.mjs} +0 -0
  179. package/esm2020/list/list-selection.component.mjs +693 -0
  180. package/esm2020/list/list.component.mjs +44 -0
  181. package/{esm2015/list/list.module.js → esm2020/list/list.module.mjs} +5 -5
  182. package/{esm2015/list/ptsecurity-mosaic-list.js → esm2020/list/ptsecurity-mosaic-list.mjs} +0 -0
  183. package/{esm2015/list/public-api.js → esm2020/list/public-api.mjs} +0 -0
  184. package/{esm2015/modal/css-unit.pipe.js → esm2020/modal/css-unit.pipe.mjs} +4 -4
  185. package/{esm2015/modal/index.js → esm2020/modal/index.mjs} +0 -0
  186. package/{esm2015/modal/modal-control.service.js → esm2020/modal/modal-control.service.mjs} +4 -4
  187. package/{esm2015/modal/modal-ref.class.js → esm2020/modal/modal-ref.class.mjs} +0 -0
  188. package/{esm2015/modal/modal-util.js → esm2020/modal/modal-util.mjs} +0 -0
  189. package/esm2020/modal/modal.component.mjs +501 -0
  190. package/{esm2015/modal/modal.directive.js → esm2020/modal/modal.directive.mjs} +13 -13
  191. package/esm2020/modal/modal.module.mjs +72 -0
  192. package/esm2020/modal/modal.service.mjs +124 -0
  193. package/{esm2015/modal/modal.type.js → esm2020/modal/modal.type.mjs} +0 -0
  194. package/{esm2015/modal/ptsecurity-mosaic-modal.js → esm2020/modal/ptsecurity-mosaic-modal.mjs} +0 -0
  195. package/{esm2015/modal/public-api.js → esm2020/modal/public-api.mjs} +0 -0
  196. package/{esm2015/navbar/index.js → esm2020/navbar/index.mjs} +0 -0
  197. package/esm2020/navbar/navbar-item.component.mjs +577 -0
  198. package/esm2020/navbar/navbar.component.mjs +237 -0
  199. package/esm2020/navbar/navbar.module.mjs +92 -0
  200. package/{esm2015/navbar/ptsecurity-mosaic-navbar.js → esm2020/navbar/ptsecurity-mosaic-navbar.mjs} +0 -0
  201. package/{esm2015/navbar/public-api.js → esm2020/navbar/public-api.mjs} +0 -0
  202. package/{esm2015/navbar/vertical-navbar.animation.js → esm2020/navbar/vertical-navbar.animation.mjs} +2 -2
  203. package/esm2020/navbar/vertical-navbar.component.mjs +114 -0
  204. package/{esm2015/popover/index.js → esm2020/popover/index.mjs} +0 -0
  205. package/{esm2015/popover/popover-animations.js → esm2020/popover/popover-animations.mjs} +0 -0
  206. package/esm2020/popover/popover-confirm.component.mjs +108 -0
  207. package/esm2020/popover/popover.component.mjs +253 -0
  208. package/esm2020/popover/popover.module.mjs +24 -0
  209. package/{esm2015/popover/ptsecurity-mosaic-popover.js → esm2020/popover/ptsecurity-mosaic-popover.mjs} +0 -0
  210. package/{esm2015/popover/public-api.js → esm2020/popover/public-api.mjs} +2 -1
  211. package/{esm2015/progress-bar/index.js → esm2020/progress-bar/index.mjs} +0 -0
  212. package/esm2020/progress-bar/progress-bar.component.mjs +42 -0
  213. package/{esm2015/progress-bar/progress-bar.module.js → esm2020/progress-bar/progress-bar.module.mjs} +5 -5
  214. package/{esm2015/progress-bar/ptsecurity-mosaic-progress-bar.js → esm2020/progress-bar/ptsecurity-mosaic-progress-bar.mjs} +0 -0
  215. package/{esm2015/progress-bar/public-api.js → esm2020/progress-bar/public-api.mjs} +0 -0
  216. package/{esm2015/progress-spinner/index.js → esm2020/progress-spinner/index.mjs} +0 -0
  217. package/esm2020/progress-spinner/progress-spinner.component.mjs +46 -0
  218. package/{esm2015/progress-spinner/progress-spinner.module.js → esm2020/progress-spinner/progress-spinner.module.mjs} +5 -5
  219. package/{esm2015/progress-spinner/ptsecurity-mosaic-progress-spinner.js → esm2020/progress-spinner/ptsecurity-mosaic-progress-spinner.mjs} +0 -0
  220. package/{esm2015/progress-spinner/public-api.js → esm2020/progress-spinner/public-api.mjs} +0 -0
  221. package/{esm2015/ptsecurity-mosaic.js → esm2020/ptsecurity-mosaic.mjs} +0 -0
  222. package/{esm2015/public-api.js → esm2020/public-api.mjs} +0 -0
  223. package/{esm2015/radio/index.js → esm2020/radio/index.mjs} +0 -0
  224. package/{esm2015/radio/ptsecurity-mosaic-radio.js → esm2020/radio/ptsecurity-mosaic-radio.mjs} +0 -0
  225. package/{esm2015/radio/public-api.js → esm2020/radio/public-api.mjs} +0 -0
  226. package/esm2020/radio/radio.component.mjs +458 -0
  227. package/{esm2015/radio/radio.module.js → esm2020/radio/radio.module.mjs} +5 -5
  228. package/{esm2015/select/index.js → esm2020/select/index.mjs} +0 -0
  229. package/{esm2015/select/ptsecurity-mosaic-select.js → esm2020/select/ptsecurity-mosaic-select.mjs} +0 -0
  230. package/{esm2015/select/public-api.js → esm2020/select/public-api.mjs} +0 -0
  231. package/esm2020/select/select.component.mjs +1110 -0
  232. package/{esm2015/select/select.module.js → esm2020/select/select.module.mjs} +5 -5
  233. package/{esm2015/sidebar/index.js → esm2020/sidebar/index.mjs} +0 -0
  234. package/{esm2015/sidebar/ptsecurity-mosaic-sidebar.js → esm2020/sidebar/ptsecurity-mosaic-sidebar.mjs} +0 -0
  235. package/{esm2015/sidebar/public-api.js → esm2020/sidebar/public-api.mjs} +0 -0
  236. package/{esm2015/sidebar/sidebar-animations.js → esm2020/sidebar/sidebar-animations.mjs} +0 -0
  237. package/esm2020/sidebar/sidebar.component.mjs +146 -0
  238. package/{esm2015/sidebar/sidebar.module.js → esm2020/sidebar/sidebar.module.mjs} +5 -5
  239. package/{esm2015/sidepanel/index.js → esm2020/sidepanel/index.mjs} +0 -0
  240. package/{esm2015/sidepanel/ptsecurity-mosaic-sidepanel.js → esm2020/sidepanel/ptsecurity-mosaic-sidepanel.mjs} +0 -0
  241. package/{esm2015/sidepanel/public-api.js → esm2020/sidepanel/public-api.mjs} +0 -0
  242. package/{esm2015/sidepanel/sidepanel-animations.js → esm2020/sidepanel/sidepanel-animations.mjs} +0 -0
  243. package/{esm2015/sidepanel/sidepanel-config.js → esm2020/sidepanel/sidepanel-config.mjs} +0 -0
  244. package/esm2020/sidepanel/sidepanel-container.component.mjs +106 -0
  245. package/esm2020/sidepanel/sidepanel-directives.mjs +159 -0
  246. package/{esm2015/sidepanel/sidepanel-ref.js → esm2020/sidepanel/sidepanel-ref.mjs} +0 -0
  247. package/esm2020/sidepanel/sidepanel.module.mjs +74 -0
  248. package/esm2020/sidepanel/sidepanel.service.mjs +167 -0
  249. package/{esm2015/splitter/index.js → esm2020/splitter/index.mjs} +0 -0
  250. package/{esm2015/splitter/ptsecurity-mosaic-splitter.js → esm2020/splitter/ptsecurity-mosaic-splitter.mjs} +0 -0
  251. package/{esm2015/splitter/public-api.js → esm2020/splitter/public-api.mjs} +0 -0
  252. package/esm2020/splitter/splitter.component.mjs +480 -0
  253. package/esm2020/splitter/splitter.module.mjs +40 -0
  254. package/{esm2015/table/index.js → esm2020/table/index.mjs} +0 -0
  255. package/{esm2015/table/ptsecurity-mosaic-table.js → esm2020/table/ptsecurity-mosaic-table.mjs} +0 -0
  256. package/{esm2015/table/public-api.js → esm2020/table/public-api.mjs} +0 -0
  257. package/{esm2015/table/table.component.js → esm2020/table/table.component.mjs} +4 -4
  258. package/{esm2015/table/table.module.js → esm2020/table/table.module.mjs} +5 -5
  259. package/{esm2015/tabs/index.js → esm2020/tabs/index.mjs} +0 -0
  260. package/esm2020/tabs/paginated-tab-header.mjs +479 -0
  261. package/{esm2015/tabs/ptsecurity-mosaic-tabs.js → esm2020/tabs/ptsecurity-mosaic-tabs.mjs} +0 -0
  262. package/{esm2015/tabs/public-api.js → esm2020/tabs/public-api.mjs} +0 -0
  263. package/esm2020/tabs/tab-body.component.mjs +178 -0
  264. package/{esm2015/tabs/tab-content.directive.js → esm2020/tabs/tab-content.directive.mjs} +4 -4
  265. package/esm2020/tabs/tab-group.component.mjs +350 -0
  266. package/esm2020/tabs/tab-header.component.mjs +67 -0
  267. package/{esm2015/tabs/tab-label-wrapper.directive.js → esm2020/tabs/tab-label-wrapper.directive.mjs} +4 -4
  268. package/{esm2015/tabs/tab-label.directive.js → esm2020/tabs/tab-label.directive.mjs} +4 -4
  269. package/{esm2015/tabs/tab-nav-bar/index.js → esm2020/tabs/tab-nav-bar/index.mjs} +0 -0
  270. package/esm2020/tabs/tab-nav-bar/tab-nav-bar.mjs +110 -0
  271. package/{esm2015/tabs/tab.component.js → esm2020/tabs/tab.component.mjs} +4 -4
  272. package/{esm2015/tabs/tabs-animations.js → esm2020/tabs/tabs-animations.mjs} +0 -0
  273. package/{esm2015/tabs/tabs.module.js → esm2020/tabs/tabs.module.mjs} +5 -5
  274. package/{esm2015/tags/index.js → esm2020/tags/index.mjs} +0 -0
  275. package/{esm2015/tags/ptsecurity-mosaic-tags.js → esm2020/tags/ptsecurity-mosaic-tags.mjs} +0 -0
  276. package/{esm2015/tags/public-api.js → esm2020/tags/public-api.mjs} +0 -0
  277. package/{esm2015/tags/tag-default-options.js → esm2020/tags/tag-default-options.mjs} +0 -0
  278. package/{esm2015/tags/tag-input.js → esm2020/tags/tag-input.mjs} +4 -4
  279. package/esm2020/tags/tag-list.component.mjs +722 -0
  280. package/{esm2015/tags/tag-text-control.js → esm2020/tags/tag-text-control.mjs} +0 -0
  281. package/esm2020/tags/tag.component.mjs +374 -0
  282. package/{esm2015/tags/tag.module.js → esm2020/tags/tag.module.mjs} +5 -5
  283. package/{esm2015/textarea/index.js → esm2020/textarea/index.mjs} +0 -0
  284. package/{esm2015/textarea/ptsecurity-mosaic-textarea.js → esm2020/textarea/ptsecurity-mosaic-textarea.mjs} +0 -0
  285. package/{esm2015/textarea/public-api.js → esm2020/textarea/public-api.mjs} +0 -0
  286. package/{esm2015/textarea/textarea.component.js → esm2020/textarea/textarea.component.mjs} +4 -4
  287. package/{esm2015/textarea/textarea.module.js → esm2020/textarea/textarea.module.mjs} +5 -5
  288. package/{esm2015/timepicker/index.js → esm2020/timepicker/index.mjs} +0 -0
  289. package/{esm2015/timepicker/ptsecurity-mosaic-timepicker.js → esm2020/timepicker/ptsecurity-mosaic-timepicker.mjs} +0 -0
  290. package/{esm2015/timepicker/public-api.js → esm2020/timepicker/public-api.mjs} +0 -0
  291. package/{esm2015/timepicker/timepicker.constants.js → esm2020/timepicker/timepicker.constants.mjs} +0 -0
  292. package/esm2020/timepicker/timepicker.directive.mjs +653 -0
  293. package/{esm2015/timepicker/timepicker.module.js → esm2020/timepicker/timepicker.module.mjs} +5 -5
  294. package/{esm2015/toggle/index.js → esm2020/toggle/index.mjs} +0 -0
  295. package/{esm2015/toggle/ptsecurity-mosaic-toggle.js → esm2020/toggle/ptsecurity-mosaic-toggle.mjs} +0 -0
  296. package/{esm2015/toggle/public-api.js → esm2020/toggle/public-api.mjs} +0 -0
  297. package/esm2020/toggle/toggle.component.mjs +158 -0
  298. package/{esm2015/toggle/toggle.module.js → esm2020/toggle/toggle.module.mjs} +5 -5
  299. package/{esm2015/tooltip/index.js → esm2020/tooltip/index.mjs} +0 -0
  300. package/{esm2015/tooltip/ptsecurity-mosaic-tooltip.js → esm2020/tooltip/ptsecurity-mosaic-tooltip.mjs} +0 -0
  301. package/{esm2015/tooltip/public-api.js → esm2020/tooltip/public-api.mjs} +0 -0
  302. package/{esm2015/tooltip/tooltip.animations.js → esm2020/tooltip/tooltip.animations.mjs} +0 -0
  303. package/esm2020/tooltip/tooltip.component.mjs +291 -0
  304. package/{esm2015/tooltip/tooltip.module.js → esm2020/tooltip/tooltip.module.mjs} +5 -5
  305. package/{esm2015/tree/control/base-tree-control.js → esm2020/tree/control/base-tree-control.mjs} +0 -0
  306. package/{esm2015/tree/control/flat-tree-control.js → esm2020/tree/control/flat-tree-control.mjs} +0 -0
  307. package/{esm2015/tree/control/nested-tree-control.js → esm2020/tree/control/nested-tree-control.mjs} +0 -0
  308. package/{esm2015/tree/control/tree-control.js → esm2020/tree/control/tree-control.mjs} +0 -0
  309. package/{esm2015/tree/data-source/flat-data-source.js → esm2020/tree/data-source/flat-data-source.mjs} +0 -0
  310. package/{esm2015/tree/data-source/nested-data-source.js → esm2020/tree/data-source/nested-data-source.mjs} +0 -0
  311. package/{esm2015/tree/index.js → esm2020/tree/index.mjs} +0 -0
  312. package/{esm2015/tree/node.js → esm2020/tree/node.mjs} +4 -4
  313. package/{esm2015/tree/outlet.js → esm2020/tree/outlet.mjs} +4 -4
  314. package/esm2020/tree/padding.directive.mjs +110 -0
  315. package/{esm2015/tree/ptsecurity-mosaic-tree.js → esm2020/tree/ptsecurity-mosaic-tree.mjs} +0 -0
  316. package/{esm2015/tree/public-api.js → esm2020/tree/public-api.mjs} +0 -0
  317. package/esm2020/tree/toggle.mjs +80 -0
  318. package/{esm2015/tree/tree-base.js → esm2020/tree/tree-base.mjs} +7 -7
  319. package/{esm2015/tree/tree-errors.js → esm2020/tree/tree-errors.mjs} +0 -0
  320. package/esm2020/tree/tree-option.component.mjs +226 -0
  321. package/esm2020/tree/tree-selection.component.mjs +530 -0
  322. package/esm2020/tree/tree.mjs +15 -0
  323. package/esm2020/tree/tree.module.mjs +53 -0
  324. package/{esm2015/tree-select/index.js → esm2020/tree-select/index.mjs} +0 -0
  325. package/{esm2015/tree-select/ptsecurity-mosaic-tree-select.js → esm2020/tree-select/ptsecurity-mosaic-tree-select.mjs} +0 -0
  326. package/{esm2015/tree-select/public-api.js → esm2020/tree-select/public-api.mjs} +0 -0
  327. package/esm2020/tree-select/tree-select.component.mjs +889 -0
  328. package/{esm2015/tree-select/tree-select.module.js → esm2020/tree-select/tree-select.module.mjs} +5 -5
  329. package/fesm2015/ptsecurity-mosaic-autocomplete.mjs +756 -0
  330. package/fesm2015/ptsecurity-mosaic-autocomplete.mjs.map +1 -0
  331. package/fesm2015/ptsecurity-mosaic-button-toggle.mjs +385 -0
  332. package/fesm2015/ptsecurity-mosaic-button-toggle.mjs.map +1 -0
  333. package/fesm2015/ptsecurity-mosaic-button.mjs +170 -0
  334. package/fesm2015/ptsecurity-mosaic-button.mjs.map +1 -0
  335. package/fesm2015/{ptsecurity-mosaic-card.js → ptsecurity-mosaic-card.mjs} +10 -18
  336. package/fesm2015/ptsecurity-mosaic-card.mjs.map +1 -0
  337. package/fesm2015/ptsecurity-mosaic-checkbox.mjs +366 -0
  338. package/fesm2015/ptsecurity-mosaic-checkbox.mjs.map +1 -0
  339. package/fesm2015/{ptsecurity-mosaic-core.js → ptsecurity-mosaic-core.mjs} +186 -241
  340. package/fesm2015/ptsecurity-mosaic-core.mjs.map +1 -0
  341. package/fesm2015/ptsecurity-mosaic-datepicker.mjs +2700 -0
  342. package/fesm2015/ptsecurity-mosaic-datepicker.mjs.map +1 -0
  343. package/fesm2015/{ptsecurity-mosaic-design-tokens.js → ptsecurity-mosaic-design-tokens.mjs} +13 -11
  344. package/fesm2015/ptsecurity-mosaic-design-tokens.mjs.map +1 -0
  345. package/fesm2015/ptsecurity-mosaic-divider.mjs +61 -0
  346. package/fesm2015/ptsecurity-mosaic-divider.mjs.map +1 -0
  347. package/fesm2015/ptsecurity-mosaic-dropdown.mjs +1106 -0
  348. package/fesm2015/ptsecurity-mosaic-dropdown.mjs.map +1 -0
  349. package/fesm2015/ptsecurity-mosaic-form-field.mjs +378 -0
  350. package/fesm2015/ptsecurity-mosaic-form-field.mjs.map +1 -0
  351. package/fesm2015/ptsecurity-mosaic-icon.mjs +88 -0
  352. package/fesm2015/ptsecurity-mosaic-icon.mjs.map +1 -0
  353. package/fesm2015/ptsecurity-mosaic-input.mjs +609 -0
  354. package/fesm2015/ptsecurity-mosaic-input.mjs.map +1 -0
  355. package/fesm2015/{ptsecurity-mosaic-link.js → ptsecurity-mosaic-link.mjs} +8 -8
  356. package/fesm2015/ptsecurity-mosaic-link.mjs.map +1 -0
  357. package/fesm2015/ptsecurity-mosaic-list.mjs +796 -0
  358. package/fesm2015/ptsecurity-mosaic-list.mjs.map +1 -0
  359. package/fesm2015/ptsecurity-mosaic-modal.mjs +842 -0
  360. package/fesm2015/ptsecurity-mosaic-modal.mjs.map +1 -0
  361. package/fesm2015/ptsecurity-mosaic-navbar.mjs +1025 -0
  362. package/fesm2015/ptsecurity-mosaic-navbar.mjs.map +1 -0
  363. package/fesm2015/ptsecurity-mosaic-popover.mjs +393 -0
  364. package/fesm2015/ptsecurity-mosaic-popover.mjs.map +1 -0
  365. package/fesm2015/{ptsecurity-mosaic-progress-bar.js → ptsecurity-mosaic-progress-bar.mjs} +10 -18
  366. package/fesm2015/ptsecurity-mosaic-progress-bar.mjs.map +1 -0
  367. package/fesm2015/ptsecurity-mosaic-progress-spinner.mjs +80 -0
  368. package/fesm2015/ptsecurity-mosaic-progress-spinner.mjs.map +1 -0
  369. package/fesm2015/ptsecurity-mosaic-radio.mjs +481 -0
  370. package/fesm2015/ptsecurity-mosaic-radio.mjs.map +1 -0
  371. package/fesm2015/ptsecurity-mosaic-select.mjs +1175 -0
  372. package/fesm2015/ptsecurity-mosaic-select.mjs.map +1 -0
  373. package/fesm2015/{ptsecurity-mosaic-sidebar.js → ptsecurity-mosaic-sidebar.mjs} +16 -25
  374. package/fesm2015/ptsecurity-mosaic-sidebar.mjs.map +1 -0
  375. package/fesm2015/ptsecurity-mosaic-sidepanel.mjs +592 -0
  376. package/fesm2015/ptsecurity-mosaic-sidepanel.mjs.map +1 -0
  377. package/fesm2015/ptsecurity-mosaic-splitter.mjs +524 -0
  378. package/fesm2015/ptsecurity-mosaic-splitter.mjs.map +1 -0
  379. package/fesm2015/{ptsecurity-mosaic-table.js → ptsecurity-mosaic-table.mjs} +8 -8
  380. package/fesm2015/ptsecurity-mosaic-table.mjs.map +1 -0
  381. package/fesm2015/ptsecurity-mosaic-tabs.mjs +1511 -0
  382. package/fesm2015/ptsecurity-mosaic-tabs.mjs.map +1 -0
  383. package/fesm2015/ptsecurity-mosaic-tags.mjs +1372 -0
  384. package/fesm2015/ptsecurity-mosaic-tags.mjs.map +1 -0
  385. package/fesm2015/ptsecurity-mosaic-textarea.mjs +293 -0
  386. package/fesm2015/ptsecurity-mosaic-textarea.mjs.map +1 -0
  387. package/fesm2015/ptsecurity-mosaic-timepicker.mjs +715 -0
  388. package/fesm2015/ptsecurity-mosaic-timepicker.mjs.map +1 -0
  389. package/fesm2015/{ptsecurity-mosaic-toggle.js → ptsecurity-mosaic-toggle.mjs} +12 -23
  390. package/fesm2015/ptsecurity-mosaic-toggle.mjs.map +1 -0
  391. package/fesm2015/ptsecurity-mosaic-tooltip.mjs +362 -0
  392. package/fesm2015/ptsecurity-mosaic-tooltip.mjs.map +1 -0
  393. package/fesm2015/ptsecurity-mosaic-tree-select.mjs +932 -0
  394. package/fesm2015/ptsecurity-mosaic-tree-select.mjs.map +1 -0
  395. package/fesm2015/ptsecurity-mosaic-tree.mjs +1707 -0
  396. package/fesm2015/ptsecurity-mosaic-tree.mjs.map +1 -0
  397. package/fesm2015/{ptsecurity-mosaic.js → ptsecurity-mosaic.mjs} +1 -1
  398. package/fesm2015/ptsecurity-mosaic.mjs.map +1 -0
  399. package/{fesm2015/ptsecurity-mosaic-autocomplete.js → fesm2020/ptsecurity-mosaic-autocomplete.mjs} +17 -26
  400. package/fesm2020/ptsecurity-mosaic-autocomplete.mjs.map +1 -0
  401. package/{fesm2015/ptsecurity-mosaic-button-toggle.js → fesm2020/ptsecurity-mosaic-button-toggle.mjs} +15 -23
  402. package/fesm2020/ptsecurity-mosaic-button-toggle.mjs.map +1 -0
  403. package/fesm2020/ptsecurity-mosaic-button.mjs +170 -0
  404. package/fesm2020/ptsecurity-mosaic-button.mjs.map +1 -0
  405. package/fesm2020/ptsecurity-mosaic-card.mjs +113 -0
  406. package/fesm2020/ptsecurity-mosaic-card.mjs.map +1 -0
  407. package/{fesm2015/ptsecurity-mosaic-checkbox.js → fesm2020/ptsecurity-mosaic-checkbox.mjs} +13 -23
  408. package/fesm2020/ptsecurity-mosaic-checkbox.mjs.map +1 -0
  409. package/fesm2020/ptsecurity-mosaic-core.mjs +2688 -0
  410. package/fesm2020/ptsecurity-mosaic-core.mjs.map +1 -0
  411. package/{fesm2015/ptsecurity-mosaic-datepicker.js → fesm2020/ptsecurity-mosaic-datepicker.mjs} +77 -121
  412. package/fesm2020/ptsecurity-mosaic-datepicker.mjs.map +1 -0
  413. package/fesm2020/ptsecurity-mosaic-design-tokens.mjs +939 -0
  414. package/fesm2020/ptsecurity-mosaic-design-tokens.mjs.map +1 -0
  415. package/fesm2020/ptsecurity-mosaic-divider.mjs +61 -0
  416. package/fesm2020/ptsecurity-mosaic-divider.mjs.map +1 -0
  417. package/{fesm2015/ptsecurity-mosaic-dropdown.js → fesm2020/ptsecurity-mosaic-dropdown.mjs} +45 -53
  418. package/fesm2020/ptsecurity-mosaic-dropdown.mjs.map +1 -0
  419. package/fesm2020/ptsecurity-mosaic-form-field.mjs +377 -0
  420. package/fesm2020/ptsecurity-mosaic-form-field.mjs.map +1 -0
  421. package/fesm2020/ptsecurity-mosaic-icon.mjs +86 -0
  422. package/fesm2020/ptsecurity-mosaic-icon.mjs.map +1 -0
  423. package/{fesm2015/ptsecurity-mosaic-input.js → fesm2020/ptsecurity-mosaic-input.mjs} +41 -27
  424. package/fesm2020/ptsecurity-mosaic-input.mjs.map +1 -0
  425. package/fesm2020/ptsecurity-mosaic-link.mjs +136 -0
  426. package/fesm2020/ptsecurity-mosaic-link.mjs.map +1 -0
  427. package/{fesm2015/ptsecurity-mosaic-list.js → fesm2020/ptsecurity-mosaic-list.mjs} +41 -70
  428. package/fesm2020/ptsecurity-mosaic-list.mjs.map +1 -0
  429. package/{fesm2015/ptsecurity-mosaic-modal.js → fesm2020/ptsecurity-mosaic-modal.mjs} +63 -59
  430. package/fesm2020/ptsecurity-mosaic-modal.mjs.map +1 -0
  431. package/fesm2020/ptsecurity-mosaic-navbar.mjs +1009 -0
  432. package/fesm2020/ptsecurity-mosaic-navbar.mjs.map +1 -0
  433. package/fesm2020/ptsecurity-mosaic-popover.mjs +389 -0
  434. package/fesm2020/ptsecurity-mosaic-popover.mjs.map +1 -0
  435. package/fesm2020/ptsecurity-mosaic-progress-bar.mjs +76 -0
  436. package/fesm2020/ptsecurity-mosaic-progress-bar.mjs.map +1 -0
  437. package/fesm2020/ptsecurity-mosaic-progress-spinner.mjs +80 -0
  438. package/fesm2020/ptsecurity-mosaic-progress-spinner.mjs.map +1 -0
  439. package/{fesm2015/ptsecurity-mosaic-radio.js → fesm2020/ptsecurity-mosaic-radio.mjs} +13 -22
  440. package/fesm2020/ptsecurity-mosaic-radio.mjs.map +1 -0
  441. package/{fesm2015/ptsecurity-mosaic-select.js → fesm2020/ptsecurity-mosaic-select.mjs} +23 -35
  442. package/fesm2020/ptsecurity-mosaic-select.mjs.map +1 -0
  443. package/fesm2020/ptsecurity-mosaic-sidebar.mjs +202 -0
  444. package/fesm2020/ptsecurity-mosaic-sidebar.mjs.map +1 -0
  445. package/{fesm2015/ptsecurity-mosaic-sidepanel.js → fesm2020/ptsecurity-mosaic-sidepanel.mjs} +57 -53
  446. package/fesm2020/ptsecurity-mosaic-sidepanel.mjs.map +1 -0
  447. package/fesm2020/ptsecurity-mosaic-splitter.mjs +524 -0
  448. package/fesm2020/ptsecurity-mosaic-splitter.mjs.map +1 -0
  449. package/fesm2020/ptsecurity-mosaic-table.mjs +50 -0
  450. package/fesm2020/ptsecurity-mosaic-table.mjs.map +1 -0
  451. package/{fesm2015/ptsecurity-mosaic-tabs.js → fesm2020/ptsecurity-mosaic-tabs.mjs} +65 -102
  452. package/fesm2020/ptsecurity-mosaic-tabs.mjs.map +1 -0
  453. package/{fesm2015/ptsecurity-mosaic-tags.js → fesm2020/ptsecurity-mosaic-tags.mjs} +29 -47
  454. package/fesm2020/ptsecurity-mosaic-tags.mjs.map +1 -0
  455. package/{fesm2015/ptsecurity-mosaic-textarea.js → fesm2020/ptsecurity-mosaic-textarea.mjs} +8 -8
  456. package/fesm2020/ptsecurity-mosaic-textarea.mjs.map +1 -0
  457. package/{fesm2015/ptsecurity-mosaic-timepicker.js → fesm2020/ptsecurity-mosaic-timepicker.mjs} +16 -15
  458. package/fesm2020/ptsecurity-mosaic-timepicker.mjs.map +1 -0
  459. package/fesm2020/ptsecurity-mosaic-toggle.mjs +180 -0
  460. package/fesm2020/ptsecurity-mosaic-toggle.mjs.map +1 -0
  461. package/fesm2020/ptsecurity-mosaic-tooltip.mjs +354 -0
  462. package/fesm2020/ptsecurity-mosaic-tooltip.mjs.map +1 -0
  463. package/{fesm2015/ptsecurity-mosaic-tree-select.js → fesm2020/ptsecurity-mosaic-tree-select.mjs} +16 -27
  464. package/fesm2020/ptsecurity-mosaic-tree-select.mjs.map +1 -0
  465. package/{fesm2015/ptsecurity-mosaic-tree.js → fesm2020/ptsecurity-mosaic-tree.mjs} +61 -108
  466. package/fesm2020/ptsecurity-mosaic-tree.mjs.map +1 -0
  467. package/fesm2020/ptsecurity-mosaic.mjs +4 -0
  468. package/fesm2020/ptsecurity-mosaic.mjs.map +1 -0
  469. package/form-field/README.md +0 -0
  470. package/form-field/cleaner.d.ts +2 -0
  471. package/form-field/package.json +5 -5
  472. package/icon/README.md +0 -0
  473. package/icon/package.json +5 -5
  474. package/input/input-number-validators.d.ts +2 -2
  475. package/input/package.json +5 -5
  476. package/link/README.md +0 -0
  477. package/link/package.json +5 -5
  478. package/list/README.md +0 -0
  479. package/list/package.json +5 -5
  480. package/modal/README.md +34 -0
  481. package/modal/modal.component.d.ts +2 -0
  482. package/modal/modal.module.d.ts +1 -1
  483. package/modal/package.json +5 -5
  484. package/navbar/README.md +41 -0
  485. package/navbar/navbar-item.component.d.ts +122 -34
  486. package/navbar/navbar.component.d.ts +37 -9
  487. package/navbar/navbar.module.d.ts +2 -1
  488. package/navbar/package.json +5 -5
  489. package/navbar/vertical-navbar.component.d.ts +15 -26
  490. package/package.json +299 -14
  491. package/popover/README.md +32 -0
  492. package/popover/package.json +5 -5
  493. package/popover/popover-confirm.component.d.ts +33 -0
  494. package/popover/popover.component.d.ts +14 -4
  495. package/popover/popover.module.d.ts +6 -3
  496. package/popover/public-api.d.ts +1 -0
  497. package/prebuilt-themes/dark-theme.css +1 -1
  498. package/prebuilt-themes/default-theme.css +1 -1
  499. package/prebuilt-visual/default-visual.css +1 -1
  500. package/progress-bar/README.md +0 -0
  501. package/progress-bar/package.json +5 -5
  502. package/progress-spinner/README.md +0 -0
  503. package/progress-spinner/package.json +5 -5
  504. package/radio/package.json +5 -5
  505. package/schematics/README.md +35 -0
  506. package/schematics/ng-update/data/index.d.ts +1 -0
  507. package/schematics/ng-update/data/index.js +10 -9
  508. package/schematics/ng-update/data/index.js.map +1 -1
  509. package/schematics/ng-update/data/symbol-removal.d.ts +2 -0
  510. package/schematics/ng-update/data/symbol-removal.js +5 -0
  511. package/schematics/ng-update/data/symbol-removal.js.map +1 -0
  512. package/schematics/ng-update/index.js +3 -3
  513. package/schematics/ng-update/index.js.map +1 -1
  514. package/schematics/ng-update/update-9.0.0/secondary-entry-points-migration.js +1 -2
  515. package/schematics/ng-update/update-9.0.0/secondary-entry-points-migration.js.map +1 -1
  516. package/schematics/ng-update/upgrade-data.js +2 -1
  517. package/schematics/ng-update/upgrade-data.js.map +1 -1
  518. package/schematics/tsconfig.lib.json +2 -2
  519. package/select/README.md +0 -0
  520. package/select/package.json +5 -5
  521. package/select/select.component.d.ts +2 -7
  522. package/sidebar/package.json +5 -5
  523. package/sidepanel/package.json +5 -5
  524. package/sidepanel/sidepanel-directives.d.ts +2 -0
  525. package/sidepanel/sidepanel.module.d.ts +2 -1
  526. package/splitter/package.json +5 -5
  527. package/splitter/splitter.component.d.ts +46 -5
  528. package/splitter/splitter.module.d.ts +1 -1
  529. package/table/README.md +0 -0
  530. package/table/package.json +5 -5
  531. package/tabs/README.md +0 -0
  532. package/tabs/package.json +5 -5
  533. package/tags/README.md +0 -0
  534. package/tags/package.json +5 -5
  535. package/textarea/README.md +0 -0
  536. package/textarea/package.json +5 -5
  537. package/timepicker/README.md +0 -0
  538. package/timepicker/package.json +5 -5
  539. package/toggle/package.json +5 -5
  540. package/tooltip/package.json +5 -5
  541. package/tooltip/tooltip.component.d.ts +12 -3
  542. package/tree/package.json +5 -5
  543. package/tree/padding.directive.d.ts +1 -1
  544. package/tree/tree-option.component.d.ts +1 -1
  545. package/tree/tree-selection.component.d.ts +2 -2
  546. package/tree/tree.module.d.ts +1 -1
  547. package/tree-select/README.md +0 -0
  548. package/tree-select/package.json +5 -5
  549. package/tree-select/tree-select.component.d.ts +2 -7
  550. package/bundles/ptsecurity-mosaic-autocomplete.umd.js +0 -1162
  551. package/bundles/ptsecurity-mosaic-autocomplete.umd.js.map +0 -1
  552. package/bundles/ptsecurity-mosaic-button-toggle.umd.js +0 -757
  553. package/bundles/ptsecurity-mosaic-button-toggle.umd.js.map +0 -1
  554. package/bundles/ptsecurity-mosaic-button.umd.js +0 -535
  555. package/bundles/ptsecurity-mosaic-button.umd.js.map +0 -1
  556. package/bundles/ptsecurity-mosaic-card.umd.js +0 -481
  557. package/bundles/ptsecurity-mosaic-card.umd.js.map +0 -1
  558. package/bundles/ptsecurity-mosaic-checkbox.umd.js +0 -764
  559. package/bundles/ptsecurity-mosaic-checkbox.umd.js.map +0 -1
  560. package/bundles/ptsecurity-mosaic-core.umd.js +0 -2887
  561. package/bundles/ptsecurity-mosaic-core.umd.js.map +0 -1
  562. package/bundles/ptsecurity-mosaic-datepicker.umd.js +0 -3357
  563. package/bundles/ptsecurity-mosaic-datepicker.umd.js.map +0 -1
  564. package/bundles/ptsecurity-mosaic-design-tokens.umd.js +0 -1872
  565. package/bundles/ptsecurity-mosaic-design-tokens.umd.js.map +0 -1
  566. package/bundles/ptsecurity-mosaic-divider.umd.js +0 -108
  567. package/bundles/ptsecurity-mosaic-divider.umd.js.map +0 -1
  568. package/bundles/ptsecurity-mosaic-dropdown.umd.js +0 -1519
  569. package/bundles/ptsecurity-mosaic-dropdown.umd.js.map +0 -1
  570. package/bundles/ptsecurity-mosaic-form-field.umd.js +0 -789
  571. package/bundles/ptsecurity-mosaic-form-field.umd.js.map +0 -1
  572. package/bundles/ptsecurity-mosaic-icon.umd.js +0 -452
  573. package/bundles/ptsecurity-mosaic-icon.umd.js.map +0 -1
  574. package/bundles/ptsecurity-mosaic-input.umd.js +0 -996
  575. package/bundles/ptsecurity-mosaic-input.umd.js.map +0 -1
  576. package/bundles/ptsecurity-mosaic-link.umd.js +0 -517
  577. package/bundles/ptsecurity-mosaic-link.umd.js.map +0 -1
  578. package/bundles/ptsecurity-mosaic-list.umd.js +0 -1250
  579. package/bundles/ptsecurity-mosaic-list.umd.js.map +0 -1
  580. package/bundles/ptsecurity-mosaic-modal.umd.js +0 -1304
  581. package/bundles/ptsecurity-mosaic-modal.umd.js.map +0 -1
  582. package/bundles/ptsecurity-mosaic-navbar.umd.js +0 -932
  583. package/bundles/ptsecurity-mosaic-navbar.umd.js.map +0 -1
  584. package/bundles/ptsecurity-mosaic-popover.umd.js +0 -655
  585. package/bundles/ptsecurity-mosaic-popover.umd.js.map +0 -1
  586. package/bundles/ptsecurity-mosaic-progress-bar.umd.js +0 -442
  587. package/bundles/ptsecurity-mosaic-progress-bar.umd.js.map +0 -1
  588. package/bundles/ptsecurity-mosaic-progress-spinner.umd.js +0 -450
  589. package/bundles/ptsecurity-mosaic-progress-spinner.umd.js.map +0 -1
  590. package/bundles/ptsecurity-mosaic-radio.umd.js +0 -903
  591. package/bundles/ptsecurity-mosaic-radio.umd.js.map +0 -1
  592. package/bundles/ptsecurity-mosaic-select.umd.js +0 -1608
  593. package/bundles/ptsecurity-mosaic-select.umd.js.map +0 -1
  594. package/bundles/ptsecurity-mosaic-sidebar.umd.js +0 -256
  595. package/bundles/ptsecurity-mosaic-sidebar.umd.js.map +0 -1
  596. package/bundles/ptsecurity-mosaic-sidepanel.umd.js +0 -950
  597. package/bundles/ptsecurity-mosaic-sidepanel.umd.js.map +0 -1
  598. package/bundles/ptsecurity-mosaic-splitter.umd.js +0 -438
  599. package/bundles/ptsecurity-mosaic-splitter.umd.js.map +0 -1
  600. package/bundles/ptsecurity-mosaic-table.umd.js +0 -83
  601. package/bundles/ptsecurity-mosaic-table.umd.js.map +0 -1
  602. package/bundles/ptsecurity-mosaic-tabs.umd.js +0 -2015
  603. package/bundles/ptsecurity-mosaic-tabs.umd.js.map +0 -1
  604. package/bundles/ptsecurity-mosaic-tags.umd.js +0 -1913
  605. package/bundles/ptsecurity-mosaic-tags.umd.js.map +0 -1
  606. package/bundles/ptsecurity-mosaic-textarea.umd.js +0 -666
  607. package/bundles/ptsecurity-mosaic-textarea.umd.js.map +0 -1
  608. package/bundles/ptsecurity-mosaic-timepicker.umd.js +0 -822
  609. package/bundles/ptsecurity-mosaic-timepicker.umd.js.map +0 -1
  610. package/bundles/ptsecurity-mosaic-toggle.umd.js +0 -559
  611. package/bundles/ptsecurity-mosaic-toggle.umd.js.map +0 -1
  612. package/bundles/ptsecurity-mosaic-tooltip.umd.js +0 -728
  613. package/bundles/ptsecurity-mosaic-tooltip.umd.js.map +0 -1
  614. package/bundles/ptsecurity-mosaic-tree-select.umd.js +0 -1370
  615. package/bundles/ptsecurity-mosaic-tree-select.umd.js.map +0 -1
  616. package/bundles/ptsecurity-mosaic-tree.umd.js +0 -2309
  617. package/bundles/ptsecurity-mosaic-tree.umd.js.map +0 -1
  618. package/bundles/ptsecurity-mosaic.umd.js +0 -11
  619. package/bundles/ptsecurity-mosaic.umd.js.map +0 -1
  620. package/esm2015/autocomplete/autocomplete.component.js +0 -163
  621. package/esm2015/button/button.component.js +0 -129
  622. package/esm2015/button/button.module.js +0 -42
  623. package/esm2015/button-toggle/button-toggle.component.js +0 -370
  624. package/esm2015/card/card.component.js +0 -88
  625. package/esm2015/checkbox/checkbox.js +0 -325
  626. package/esm2015/core/formatters/date/formatter.js +0 -287
  627. package/esm2015/core/formatters/date/templates/en-US.js +0 -280
  628. package/esm2015/core/formatters/date/templates/ru-RU.js +0 -280
  629. package/esm2015/core/formatters/number/formatter.js +0 -99
  630. package/esm2015/core/option/action.js +0 -131
  631. package/esm2015/core/option/optgroup.js +0 -40
  632. package/esm2015/core/option/option.js +0 -262
  633. package/esm2015/core/pop-up/pop-up-trigger.js +0 -273
  634. package/esm2015/core/pop-up/pop-up.js +0 -87
  635. package/esm2015/core/selection/pseudo-checkbox/pseudo-checkbox.js +0 -45
  636. package/esm2015/datepicker/calendar-body.component.js +0 -114
  637. package/esm2015/datepicker/calendar.component.js +0 -377
  638. package/esm2015/datepicker/datepicker-input.directive.js +0 -885
  639. package/esm2015/datepicker/datepicker-toggle.component.js +0 -94
  640. package/esm2015/datepicker/datepicker.component.js +0 -418
  641. package/esm2015/dropdown/dropdown-item.component.js +0 -142
  642. package/esm2015/dropdown/dropdown-trigger.directive.js +0 -478
  643. package/esm2015/dropdown/dropdown.component.js +0 -302
  644. package/esm2015/form-field/cleaner.js +0 -19
  645. package/esm2015/form-field/form-field.js +0 -224
  646. package/esm2015/icon/icon.component.js +0 -51
  647. package/esm2015/input/input-number-validators.js +0 -78
  648. package/esm2015/link/link.component.js +0 -108
  649. package/esm2015/list/list-selection.component.js +0 -708
  650. package/esm2015/list/list.component.js +0 -58
  651. package/esm2015/modal/modal.component.js +0 -506
  652. package/esm2015/modal/modal.module.js +0 -70
  653. package/esm2015/modal/modal.service.js +0 -117
  654. package/esm2015/navbar/navbar-item.component.js +0 -209
  655. package/esm2015/navbar/navbar.component.js +0 -118
  656. package/esm2015/navbar/navbar.module.js +0 -76
  657. package/esm2015/navbar/vertical-navbar.component.js +0 -140
  658. package/esm2015/popover/popover.component.js +0 -219
  659. package/esm2015/popover/popover.module.js +0 -21
  660. package/esm2015/progress-bar/progress-bar.component.js +0 -50
  661. package/esm2015/progress-spinner/progress-spinner.component.js +0 -54
  662. package/esm2015/radio/radio.component.js +0 -467
  663. package/esm2015/select/select.component.js +0 -1122
  664. package/esm2015/sidebar/sidebar.component.js +0 -155
  665. package/esm2015/sidepanel/sidepanel-container.component.js +0 -113
  666. package/esm2015/sidepanel/sidepanel-directives.js +0 -155
  667. package/esm2015/sidepanel/sidepanel.module.js +0 -70
  668. package/esm2015/sidepanel/sidepanel.service.js +0 -163
  669. package/esm2015/splitter/splitter.component.js +0 -331
  670. package/esm2015/splitter/splitter.module.js +0 -38
  671. package/esm2015/tabs/paginated-tab-header.js +0 -482
  672. package/esm2015/tabs/tab-body.component.js +0 -186
  673. package/esm2015/tabs/tab-group.component.js +0 -359
  674. package/esm2015/tabs/tab-header.component.js +0 -76
  675. package/esm2015/tabs/tab-nav-bar/tab-nav-bar.js +0 -118
  676. package/esm2015/tags/tag-list.component.js +0 -732
  677. package/esm2015/tags/tag.component.js +0 -382
  678. package/esm2015/timepicker/timepicker.directive.js +0 -652
  679. package/esm2015/toggle/toggle.component.js +0 -169
  680. package/esm2015/tooltip/tooltip.component.js +0 -260
  681. package/esm2015/tree/padding.directive.js +0 -114
  682. package/esm2015/tree/toggle.js +0 -89
  683. package/esm2015/tree/tree-option.component.js +0 -238
  684. package/esm2015/tree/tree-selection.component.js +0 -541
  685. package/esm2015/tree/tree.js +0 -23
  686. package/esm2015/tree/tree.module.js +0 -56
  687. package/esm2015/tree-select/tree-select.component.js +0 -900
  688. package/fesm2015/ptsecurity-mosaic-autocomplete.js.map +0 -1
  689. package/fesm2015/ptsecurity-mosaic-button-toggle.js.map +0 -1
  690. package/fesm2015/ptsecurity-mosaic-button.js +0 -174
  691. package/fesm2015/ptsecurity-mosaic-button.js.map +0 -1
  692. package/fesm2015/ptsecurity-mosaic-card.js.map +0 -1
  693. package/fesm2015/ptsecurity-mosaic-checkbox.js.map +0 -1
  694. package/fesm2015/ptsecurity-mosaic-core.js.map +0 -1
  695. package/fesm2015/ptsecurity-mosaic-datepicker.js.map +0 -1
  696. package/fesm2015/ptsecurity-mosaic-design-tokens.js.map +0 -1
  697. package/fesm2015/ptsecurity-mosaic-divider.js +0 -68
  698. package/fesm2015/ptsecurity-mosaic-divider.js.map +0 -1
  699. package/fesm2015/ptsecurity-mosaic-dropdown.js.map +0 -1
  700. package/fesm2015/ptsecurity-mosaic-form-field.js +0 -393
  701. package/fesm2015/ptsecurity-mosaic-form-field.js.map +0 -1
  702. package/fesm2015/ptsecurity-mosaic-icon.js +0 -93
  703. package/fesm2015/ptsecurity-mosaic-icon.js.map +0 -1
  704. package/fesm2015/ptsecurity-mosaic-input.js.map +0 -1
  705. package/fesm2015/ptsecurity-mosaic-link.js.map +0 -1
  706. package/fesm2015/ptsecurity-mosaic-list.js.map +0 -1
  707. package/fesm2015/ptsecurity-mosaic-modal.js.map +0 -1
  708. package/fesm2015/ptsecurity-mosaic-navbar.js +0 -539
  709. package/fesm2015/ptsecurity-mosaic-navbar.js.map +0 -1
  710. package/fesm2015/ptsecurity-mosaic-popover.js +0 -257
  711. package/fesm2015/ptsecurity-mosaic-popover.js.map +0 -1
  712. package/fesm2015/ptsecurity-mosaic-progress-bar.js.map +0 -1
  713. package/fesm2015/ptsecurity-mosaic-progress-spinner.js +0 -88
  714. package/fesm2015/ptsecurity-mosaic-progress-spinner.js.map +0 -1
  715. package/fesm2015/ptsecurity-mosaic-radio.js.map +0 -1
  716. package/fesm2015/ptsecurity-mosaic-select.js.map +0 -1
  717. package/fesm2015/ptsecurity-mosaic-sidebar.js.map +0 -1
  718. package/fesm2015/ptsecurity-mosaic-sidepanel.js.map +0 -1
  719. package/fesm2015/ptsecurity-mosaic-splitter.js +0 -373
  720. package/fesm2015/ptsecurity-mosaic-splitter.js.map +0 -1
  721. package/fesm2015/ptsecurity-mosaic-table.js.map +0 -1
  722. package/fesm2015/ptsecurity-mosaic-tabs.js.map +0 -1
  723. package/fesm2015/ptsecurity-mosaic-tags.js.map +0 -1
  724. package/fesm2015/ptsecurity-mosaic-textarea.js.map +0 -1
  725. package/fesm2015/ptsecurity-mosaic-timepicker.js.map +0 -1
  726. package/fesm2015/ptsecurity-mosaic-toggle.js.map +0 -1
  727. package/fesm2015/ptsecurity-mosaic-tooltip.js +0 -323
  728. package/fesm2015/ptsecurity-mosaic-tooltip.js.map +0 -1
  729. package/fesm2015/ptsecurity-mosaic-tree-select.js.map +0 -1
  730. package/fesm2015/ptsecurity-mosaic-tree.js.map +0 -1
  731. package/fesm2015/ptsecurity-mosaic.js.map +0 -1
@@ -1,3357 +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('@ptsecurity/mosaic/button'), require('@ptsecurity/mosaic/icon'), require('rxjs/operators'), require('@ptsecurity/cdk/datetime'), require('rxjs'), require('@ptsecurity/cdk/keycodes'), require('@angular/cdk/bidi'), require('@angular/cdk/coercion'), require('@angular/forms'), require('@ptsecurity/mosaic/core'), require('@ptsecurity/mosaic/form-field'), require('@angular/animations')) :
3
- typeof define === 'function' && define.amd ? define('@ptsecurity/mosaic/datepicker', ['exports', '@angular/cdk/a11y', '@angular/cdk/overlay', '@angular/cdk/portal', '@angular/common', '@angular/core', '@ptsecurity/mosaic/button', '@ptsecurity/mosaic/icon', 'rxjs/operators', '@ptsecurity/cdk/datetime', 'rxjs', '@ptsecurity/cdk/keycodes', '@angular/cdk/bidi', '@angular/cdk/coercion', '@angular/forms', '@ptsecurity/mosaic/core', '@ptsecurity/mosaic/form-field', '@angular/animations'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.ptsecurity = global.ptsecurity || {}, global.ptsecurity.mosaic = global.ptsecurity.mosaic || {}, global.ptsecurity.mosaic.datepicker = {}), global.ng.cdk.a11y, global.ng.cdk.overlay, global.ng.cdk.portal, global.ng.common, global.ng.core, global.ptsecurity.mosaic.button, global.ptsecurity.mosaic.icon, global.rxjs.operators, global.mc.cdk.datetime, global.rxjs, global.mc.cdk.keycodes, global.ng.cdk.bidi, global.ng.cdk.coercion, global.ng.forms, global.ptsecurity.mosaic.core, global.ptsecurity.mosaic['form-field'], global.ng.animations));
5
- }(this, (function (exports, a11y, i3$1, i8, i1, i0, i3, i4, operators, i1$1, rxjs, keycodes, i2, coercion, forms, core, formField, animations) { '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 i3__namespace$1 = /*#__PURE__*/_interopNamespace(i3$1);
28
- var i8__namespace = /*#__PURE__*/_interopNamespace(i8);
29
- var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
30
- var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
31
- var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
32
- var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
33
- var i1__namespace$1 = /*#__PURE__*/_interopNamespace(i1$1);
34
- var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
35
-
36
- // tslint:disable:no-magic-numbers
37
- /**
38
- * An internal class that represents the data corresponding to a single calendar cell.
39
- * @docs-private
40
- */
41
- var McCalendarCell = /** @class */ (function () {
42
- function McCalendarCell(value, displayValue, ariaLabel, enabled, cssClasses) {
43
- this.value = value;
44
- this.displayValue = displayValue;
45
- this.ariaLabel = ariaLabel;
46
- this.enabled = enabled;
47
- this.cssClasses = cssClasses;
48
- }
49
- return McCalendarCell;
50
- }());
51
- /**
52
- * An internal component used to display calendar data in a table.
53
- * @docs-private
54
- */
55
- var McCalendarBody = /** @class */ (function () {
56
- function McCalendarBody(elementRef, ngZone) {
57
- this.elementRef = elementRef;
58
- this.ngZone = ngZone;
59
- /** The number of columns in the table. */
60
- this.numCols = 7;
61
- /** The cell number of the active cell in the table. */
62
- this.activeCell = 0;
63
- /**
64
- * The aspect ratio (width / height) to use for the cells in the table. This aspect ratio will be
65
- * maintained even as the table resizes.
66
- */
67
- this.cellAspectRatio = 1;
68
- /** Emits when a new value is selected. */
69
- this.selectedValueChange = new i0.EventEmitter();
70
- }
71
- McCalendarBody.prototype.cellClicked = function (cell) {
72
- if (cell.enabled) {
73
- this.selectedValueChange.emit(cell.value);
74
- }
75
- };
76
- McCalendarBody.prototype.ngOnChanges = function (changes) {
77
- var columnChanges = changes.numCols;
78
- // tslint:disable-next-line:no-this-assignment
79
- var _a = this, rows = _a.rows, numCols = _a.numCols;
80
- if (changes.rows || columnChanges) {
81
- this.firstRowOffset = rows && rows.length && rows[0].length ? numCols - rows[0].length : 0;
82
- }
83
- if (changes.cellAspectRatio || columnChanges || !this.cellPadding) {
84
- this.cellPadding = this.cellAspectRatio * 50 / numCols + "%";
85
- }
86
- if (columnChanges || !this.cellWidth) {
87
- this.cellWidth = 100 / numCols + "%";
88
- }
89
- };
90
- McCalendarBody.prototype.isActiveCell = function (rowIndex, colIndex) {
91
- var cellNumber = rowIndex * this.numCols + colIndex;
92
- // Account for the fact that the first row may not have as many cells.
93
- if (rowIndex) {
94
- cellNumber -= this.firstRowOffset;
95
- }
96
- return cellNumber === this.activeCell;
97
- };
98
- /** Focuses the active cell after the microtask queue is empty. */
99
- McCalendarBody.prototype.focusActiveCell = function () {
100
- var _this = this;
101
- this.ngZone.runOutsideAngular(function () {
102
- _this.ngZone.onStable.asObservable().pipe(operators.take(1)).subscribe(function () {
103
- var activeCell = _this.elementRef.nativeElement.querySelector('.mc-calendar__body_active');
104
- if (activeCell) {
105
- activeCell.focus();
106
- }
107
- });
108
- });
109
- };
110
- return McCalendarBody;
111
- }());
112
- /** @nocollapse */ McCalendarBody.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: McCalendarBody, deps: [{ token: i0__namespace.ElementRef }, { token: i0__namespace.NgZone }], target: i0__namespace.ɵɵFactoryTarget.Component });
113
- /** @nocollapse */ McCalendarBody.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.5", type: McCalendarBody, selector: "[mc-calendar-body]", inputs: { label: "label", rows: "rows", todayValue: "todayValue", selectedValue: "selectedValue", labelMinRequiredCells: "labelMinRequiredCells", numCols: "numCols", activeCell: "activeCell", cellAspectRatio: "cellAspectRatio" }, outputs: { selectedValueChange: "selectedValueChange" }, host: { attributes: { "role": "grid", "aria-readonly": "true" }, classAttribute: "mc-calendar__body" }, exportAs: ["mcCalendarBody"], usesOnChanges: true, ngImport: i0__namespace, 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\">\n <td class=\"mc-calendar__body-label\" [attr.colspan]=\"numCols\">\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\">\n <!--\n We mark this cell as aria-hidden so it doesn't get read out as one of the days in the week.\n The aspect ratio of the table cells is maintained by setting the top and bottom padding as a\n percentage of the width (a variant of the trick described here:\n https://www.w3schools.com/howto/howto_css_aspect_ratio.asp).\n -->\n <td *ngIf=\"rowIndex === 0 && firstRowOffset\"\n class=\"mc-calendar__body-label\"\n [attr.colspan]=\"firstRowOffset\">\n {{ firstRowOffset >= labelMinRequiredCells ? label : '' }}\n </td>\n <td *ngFor=\"let item of row; let colIndex = index\"\n class=\"mc-calendar__body-cell\"\n [ngClass]=\"item.cssClasses\"\n [tabindex]=\"isActiveCell(rowIndex, colIndex) ? 0 : -1\"\n [class.mc-calendar__body_disabled]=\"!item.enabled\"\n [class.mc-calendar__body_active]=\"isActiveCell(rowIndex, colIndex)\"\n (click)=\"cellClicked(item)\"\n [style.width]=\"cellWidth\"\n [style.paddingTop]=\"cellPadding\"\n [style.paddingBottom]=\"cellPadding\">\n <div class=\"mc-calendar__body-cell-content\"\n [class.mc-selected]=\"selectedValue === item.value\"\n [class.mc-calendar__body-today]=\"todayValue === item.value\">\n {{ item.displayValue }}\n </div>\n </td>\n</tr>\n", styles: [".mc-calendar__body{min-width:calc(7 * $datepicker-body-size-cell-min-size);min-width:calc(7 * var(--mc-datepicker-body-size-cell-min-size, $datepicker-body-size-cell-min-size))}.mc-calendar__body-label{text-align:left;padding:8px 28px 12px 12px;padding:var(--mc-datepicker-body-size-label-paddings, 8px 28px 12px 12px)}.mc-calendar__body-cell{position:relative;height:0;line-height:0;text-align:center;outline:none;cursor:pointer}.mc-calendar__body_disabled{cursor:default}.mc-calendar__body-cell-content{position:absolute;top:5%;top:var(--mc-datepicker-body-size-cell-margin, 5%);left:5%;left:var(--mc-datepicker-body-size-cell-margin, 5%);padding:8px;padding:var(--mc-datepicker-body-size-cell-padding, 8px);display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:90%;height:90%;line-height:1;border-width:1px;border-width:var(--mc-datepicker-body-size-cell-border-width, 1px);border-style:solid}.cdk-high-contrast-active .mc-calendar__body-cell-content{border:none}.cdk-high-contrast-active :host .mc-calendar__body-cell-content{border:none}mc-month-view .mc-calendar__body-cell-content{justify-content:flex-end}mc-multi-year-view .mc-calendar__body-cell-content,mc-year-view .mc-calendar__body-cell-content{justify-content:center}.cdk-high-contrast-active .mc-datepicker__popup:not(:empty),.cdk-high-contrast-active .mc-selected{outline:solid 1px}.cdk-high-contrast-active .mc-calendar__body-today{outline:dotted 1px}.cdk-high-contrast-active :host .mc-datepicker__popup:not(:empty),.cdk-high-contrast-active :host .mc-selected{outline:solid 1px}.cdk-high-contrast-active :host .mc-calendar__body-today{outline:dotted 1px}[dir=rtl] .mc-calendar__body-label{text-align:right}\n"], directives: [{ type: i1__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush, encapsulation: i0__namespace.ViewEncapsulation.None });
114
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: McCalendarBody, decorators: [{
115
- type: i0.Component,
116
- args: [{
117
- selector: '[mc-calendar-body]',
118
- exportAs: 'mcCalendarBody',
119
- templateUrl: 'calendar-body.html',
120
- styleUrls: ['calendar-body.scss'],
121
- host: {
122
- class: 'mc-calendar__body',
123
- role: 'grid',
124
- 'aria-readonly': 'true'
125
- },
126
- encapsulation: i0.ViewEncapsulation.None,
127
- changeDetection: i0.ChangeDetectionStrategy.OnPush
128
- }]
129
- }], ctorParameters: function () { return [{ type: i0__namespace.ElementRef }, { type: i0__namespace.NgZone }]; }, propDecorators: { label: [{
130
- type: i0.Input
131
- }], rows: [{
132
- type: i0.Input
133
- }], todayValue: [{
134
- type: i0.Input
135
- }], selectedValue: [{
136
- type: i0.Input
137
- }], labelMinRequiredCells: [{
138
- type: i0.Input
139
- }], numCols: [{
140
- type: i0.Input
141
- }], activeCell: [{
142
- type: i0.Input
143
- }], cellAspectRatio: [{
144
- type: i0.Input
145
- }], selectedValueChange: [{
146
- type: i0.Output
147
- }] } });
148
-
149
- /** @docs-private */
150
- function createMissingDateImplError(provider) {
151
- return Error("McDatepicker: No provider found for " + provider + ". You must import one of the existing " +
152
- "modules at your application root or provide a custom implementation or use exists ones.");
153
- }
154
-
155
- var DAYS_PER_WEEK = 7;
156
- /**
157
- * An internal component used to display a single month in the datepicker.
158
- * @docs-private
159
- */
160
- var McMonthView = /** @class */ (function () {
161
- function McMonthView(changeDetectorRef, dateFormats, dateAdapter, dir) {
162
- this.changeDetectorRef = changeDetectorRef;
163
- this.dateFormats = dateFormats;
164
- this.dateAdapter = dateAdapter;
165
- this.dir = dir;
166
- /** Emits when a new date is selected. */
167
- this.selectedChange = new i0.EventEmitter();
168
- /** Emits when any date is selected. */
169
- this.userSelection = new i0.EventEmitter();
170
- /** Emits when any date is activated. */
171
- this.activeDateChange = new i0.EventEmitter();
172
- if (!this.dateAdapter) {
173
- throw createMissingDateImplError('DateAdapter');
174
- }
175
- if (!this.dateFormats) {
176
- throw createMissingDateImplError('MC_DATE_FORMATS');
177
- }
178
- var firstDayOfWeek = this.dateAdapter.getFirstDayOfWeek();
179
- var narrowWeekdays = this.dateAdapter.getDayOfWeekNames('short');
180
- var longWeekdays = this.dateAdapter.getDayOfWeekNames('long');
181
- // Rotate the labels for days of the week based on the configured first day of the week.
182
- var weekdays = longWeekdays.map(function (long, i) {
183
- return { long: long, narrow: narrowWeekdays[i] };
184
- });
185
- this.weekdays = weekdays
186
- .slice(firstDayOfWeek)
187
- .concat(weekdays.slice(0, firstDayOfWeek));
188
- this._activeDate = this.dateAdapter.today();
189
- }
190
- Object.defineProperty(McMonthView.prototype, "activeDate", {
191
- /**
192
- * The date to display in this month view (everything other than the month and year is ignored).
193
- */
194
- get: function () {
195
- return this._activeDate;
196
- },
197
- set: function (value) {
198
- var oldActiveDate = this._activeDate;
199
- var validDate = this.getValidDateOrNull(this.dateAdapter.deserialize(value)) || this.dateAdapter.today();
200
- this._activeDate = this.dateAdapter.clampDate(validDate, this.minDate, this.maxDate);
201
- if (!this.hasSameMonthAndYear(oldActiveDate, this._activeDate)) {
202
- this.init();
203
- }
204
- },
205
- enumerable: false,
206
- configurable: true
207
- });
208
- Object.defineProperty(McMonthView.prototype, "selected", {
209
- /** The currently selected date. */
210
- get: function () {
211
- return this._selected;
212
- },
213
- set: function (value) {
214
- this._selected = this.getValidDateOrNull(this.dateAdapter.deserialize(value));
215
- this.selectedDate = this.getDateInCurrentMonth(this._selected);
216
- },
217
- enumerable: false,
218
- configurable: true
219
- });
220
- Object.defineProperty(McMonthView.prototype, "minDate", {
221
- /** The minimum selectable date. */
222
- get: function () {
223
- return this._minDate;
224
- },
225
- set: function (value) {
226
- this._minDate = this.getValidDateOrNull(this.dateAdapter.deserialize(value));
227
- },
228
- enumerable: false,
229
- configurable: true
230
- });
231
- Object.defineProperty(McMonthView.prototype, "maxDate", {
232
- /** The maximum selectable date. */
233
- get: function () {
234
- return this._maxDate;
235
- },
236
- set: function (value) {
237
- this._maxDate = this.getValidDateOrNull(this.dateAdapter.deserialize(value));
238
- },
239
- enumerable: false,
240
- configurable: true
241
- });
242
- McMonthView.prototype.ngAfterContentInit = function () {
243
- this.init();
244
- };
245
- /** Handles when a new date is selected. */
246
- McMonthView.prototype.dateSelected = function (date) {
247
- if (this.selectedDate !== date) {
248
- var selectedYear = this.dateAdapter.getYear(this.activeDate);
249
- var selectedMonth = this.dateAdapter.getMonth(this.activeDate);
250
- var selectedDate = this.dateAdapter.createDate(selectedYear, selectedMonth, date);
251
- this.selectedChange.emit(selectedDate);
252
- }
253
- this.userSelection.emit();
254
- };
255
- /** Handles keydown events on the calendar body when calendar is in month view. */
256
- McMonthView.prototype.handleCalendarBodyKeydown = function (event) {
257
- // TODO(mmalerba): We currently allow keyboard navigation to disabled dates, but just prevent
258
- // disabled ones from being selected. This may not be ideal, we should look into whether
259
- // navigation should skip over disabled dates, and if so, how to implement that efficiently.
260
- var oldActiveDate = this._activeDate;
261
- var isRtl = this.isRtl();
262
- // tslint:disable-next-line:deprecation
263
- switch (event.keyCode) {
264
- case keycodes.LEFT_ARROW:
265
- this.activeDate = this.dateAdapter.addCalendarDays(this._activeDate, isRtl ? 1 : -1);
266
- break;
267
- case keycodes.RIGHT_ARROW:
268
- this.activeDate = this.dateAdapter.addCalendarDays(this._activeDate, isRtl ? -1 : 1);
269
- break;
270
- case keycodes.UP_ARROW:
271
- this.activeDate = this.dateAdapter.addCalendarDays(this._activeDate, -7);
272
- break;
273
- case keycodes.DOWN_ARROW:
274
- this.activeDate = this.dateAdapter.addCalendarDays(this._activeDate, 7);
275
- break;
276
- case keycodes.HOME:
277
- this.activeDate = this.dateAdapter.addCalendarDays(this._activeDate, 1 - this.dateAdapter.getDate(this._activeDate));
278
- break;
279
- case keycodes.END:
280
- this.activeDate = this.dateAdapter.addCalendarDays(this._activeDate, (this.dateAdapter.getNumDaysInMonth(this._activeDate) - this.dateAdapter.getDate(this._activeDate)));
281
- break;
282
- case keycodes.PAGE_UP:
283
- this.activeDate = event.altKey ?
284
- this.dateAdapter.addCalendarYears(this._activeDate, -1) :
285
- this.dateAdapter.addCalendarMonths(this._activeDate, -1);
286
- break;
287
- case keycodes.PAGE_DOWN:
288
- this.activeDate = event.altKey ?
289
- this.dateAdapter.addCalendarYears(this._activeDate, 1) :
290
- this.dateAdapter.addCalendarMonths(this._activeDate, 1);
291
- break;
292
- case keycodes.ENTER:
293
- case keycodes.SPACE:
294
- if (!this.dateFilter || this.dateFilter(this._activeDate)) {
295
- this.dateSelected(this.dateAdapter.getDate(this._activeDate));
296
- this.userSelection.emit();
297
- // Prevent unexpected default actions such as form submission.
298
- event.preventDefault();
299
- }
300
- return;
301
- default:
302
- // Don't prevent default or focus active cell on keys that we don't explicitly handle.
303
- return;
304
- }
305
- if (this.dateAdapter.compareDate(oldActiveDate, this.activeDate)) {
306
- this.activeDateChange.emit(this.activeDate);
307
- }
308
- this.focusActiveCell();
309
- // Prevent unexpected default actions such as form submission.
310
- event.preventDefault();
311
- };
312
- /** Initializes this month view. */
313
- McMonthView.prototype.init = function () {
314
- this.selectedDate = this.getDateInCurrentMonth(this.selected);
315
- this.todayDate = this.getDateInCurrentMonth(this.dateAdapter.today());
316
- this.monthLabel = this.dateAdapter.getMonthNames('short')[this.dateAdapter.getMonth(this.activeDate)];
317
- this.monthLabel = this.monthLabel[0].toLocaleUpperCase() + this.monthLabel.substr(1);
318
- var firstOfMonth = this.dateAdapter.createDate(this.dateAdapter.getYear(this.activeDate), this.dateAdapter.getMonth(this.activeDate));
319
- this.firstWeekOffset =
320
- (DAYS_PER_WEEK + this.dateAdapter.getDayOfWeek(firstOfMonth) -
321
- this.dateAdapter.getFirstDayOfWeek()) % DAYS_PER_WEEK;
322
- this.createWeekCells();
323
- this.changeDetectorRef.markForCheck();
324
- };
325
- /** Focuses the active cell after the microtask queue is empty. */
326
- McMonthView.prototype.focusActiveCell = function () {
327
- this.mcCalendarBody.focusActiveCell();
328
- };
329
- /** Creates McCalendarCells for the dates in this month. */
330
- McMonthView.prototype.createWeekCells = function () {
331
- var daysInMonth = this.dateAdapter.getNumDaysInMonth(this.activeDate);
332
- var dateNames = this.dateAdapter.getDateNames();
333
- this.weeks = [[]];
334
- for (var i = 0, cell = this.firstWeekOffset; i < daysInMonth; i++, cell++) {
335
- if (cell === DAYS_PER_WEEK) {
336
- this.weeks.push([]);
337
- cell = 0;
338
- }
339
- var date = this.dateAdapter.createDate(this.dateAdapter.getYear(this.activeDate), this.dateAdapter.getMonth(this.activeDate), i + 1);
340
- var enabled = this.shouldEnableDate(date);
341
- var ariaLabel = this.dateAdapter.format(date, this.dateFormats.dateA11yLabel);
342
- var cellClasses = this.dateClass ? this.dateClass(date) : undefined;
343
- this.weeks[this.weeks.length - 1]
344
- .push(new McCalendarCell(i + 1, dateNames[i], ariaLabel, enabled, cellClasses));
345
- }
346
- };
347
- /** Date filter for the month */
348
- McMonthView.prototype.shouldEnableDate = function (date) {
349
- return !!date &&
350
- (!this.dateFilter || this.dateFilter(date)) &&
351
- (!this.minDate || this.dateAdapter.compareDate(date, this.minDate) >= 0) &&
352
- (!this.maxDate || this.dateAdapter.compareDate(date, this.maxDate) <= 0);
353
- };
354
- /**
355
- * Gets the date in this month that the given Date falls on.
356
- * Returns null if the given Date is in another month.
357
- */
358
- McMonthView.prototype.getDateInCurrentMonth = function (date) {
359
- return date && this.hasSameMonthAndYear(date, this.activeDate) ?
360
- this.dateAdapter.getDate(date) : null;
361
- };
362
- /** Checks whether the 2 dates are non-null and fall within the same month of the same year. */
363
- McMonthView.prototype.hasSameMonthAndYear = function (d1, d2) {
364
- return !!(d1 && d2 && this.dateAdapter.getMonth(d1) === this.dateAdapter.getMonth(d2) &&
365
- this.dateAdapter.getYear(d1) === this.dateAdapter.getYear(d2));
366
- };
367
- /**
368
- * @param obj The object to check.
369
- * @returns The given object if it is both a date instance and valid, otherwise null.
370
- */
371
- McMonthView.prototype.getValidDateOrNull = function (obj) {
372
- return (this.dateAdapter.isDateInstance(obj) && this.dateAdapter.isValid(obj)) ? obj : null;
373
- };
374
- /** Determines whether the user has the RTL layout direction. */
375
- McMonthView.prototype.isRtl = function () {
376
- return this.dir && this.dir.value === 'rtl';
377
- };
378
- return McMonthView;
379
- }());
380
- /** @nocollapse */ McMonthView.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: McMonthView, deps: [{ token: i0__namespace.ChangeDetectorRef }, { token: i1$1.MC_DATE_FORMATS, optional: true }, { token: i1__namespace$1.DateAdapter, optional: true }, { token: i2__namespace.Directionality, optional: true }], target: i0__namespace.ɵɵFactoryTarget.Component });
381
- /** @nocollapse */ McMonthView.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.5", type: McMonthView, selector: "mc-month-view", inputs: { activeDate: "activeDate", selected: "selected", minDate: "minDate", maxDate: "maxDate", dateFilter: "dateFilter", dateClass: "dateClass" }, outputs: { selectedChange: "selectedChange", userSelection: "userSelection", activeDateChange: "activeDateChange" }, viewQueries: [{ propertyName: "mcCalendarBody", first: true, predicate: McCalendarBody, descendants: true }], exportAs: ["mcMonthView"], ngImport: i0__namespace, template: "<table class=\"mc-calendar__table\">\n <thead class=\"mc-calendar__table-header\">\n <tr>\n <th *ngFor=\"let day of weekdays\" [attr.aria-label]=\"day.long\">{{day.narrow}}</th>\n </tr>\n <tr>\n <th class=\"mc-calendar__table-header-divider\" colspan=\"7\"></th>\n </tr>\n </thead>\n <tbody mc-calendar-body\n [label]=\"monthLabel\"\n [rows]=\"weeks\"\n [todayValue]=\"todayDate\"\n [selectedValue]=\"selectedDate\"\n [labelMinRequiredCells]=\"3\"\n [activeCell]=\"dateAdapter.getDate(activeDate) - 1\"\n (selectedValueChange)=\"dateSelected($event)\"\n (keydown)=\"handleCalendarBodyKeydown($event)\">\n </tbody>\n</table>\n", components: [{ type: McCalendarBody, selector: "[mc-calendar-body]", inputs: ["label", "rows", "todayValue", "selectedValue", "labelMinRequiredCells", "numCols", "activeCell", "cellAspectRatio"], outputs: ["selectedValueChange"], exportAs: ["mcCalendarBody"] }], directives: [{ type: i1__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush, encapsulation: i0__namespace.ViewEncapsulation.None });
382
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: McMonthView, decorators: [{
383
- type: i0.Component,
384
- args: [{
385
- selector: 'mc-month-view',
386
- exportAs: 'mcMonthView',
387
- templateUrl: 'month-view.html',
388
- encapsulation: i0.ViewEncapsulation.None,
389
- changeDetection: i0.ChangeDetectionStrategy.OnPush
390
- }]
391
- }], ctorParameters: function () {
392
- return [{ type: i0__namespace.ChangeDetectorRef }, { type: undefined, decorators: [{
393
- type: i0.Optional
394
- }, {
395
- type: i0.Inject,
396
- args: [i1$1.MC_DATE_FORMATS]
397
- }] }, { type: i1__namespace$1.DateAdapter, decorators: [{
398
- type: i0.Optional
399
- }] }, { type: i2__namespace.Directionality, decorators: [{
400
- type: i0.Optional
401
- }] }];
402
- }, propDecorators: { activeDate: [{
403
- type: i0.Input
404
- }], selected: [{
405
- type: i0.Input
406
- }], minDate: [{
407
- type: i0.Input
408
- }], maxDate: [{
409
- type: i0.Input
410
- }], dateFilter: [{
411
- type: i0.Input
412
- }], dateClass: [{
413
- type: i0.Input
414
- }], selectedChange: [{
415
- type: i0.Output
416
- }], userSelection: [{
417
- type: i0.Output
418
- }], activeDateChange: [{
419
- type: i0.Output
420
- }], mcCalendarBody: [{
421
- type: i0.ViewChild,
422
- args: [McCalendarBody, { static: false }]
423
- }] } });
424
-
425
- var yearsPerPage = 24;
426
- var yearsPerRow = 4;
427
- /**
428
- * An internal component used to display a year selector in the datepicker.
429
- * @docs-private
430
- */
431
- var McMultiYearView = /** @class */ (function () {
432
- function McMultiYearView(changeDetectorRef, dateAdapter, dir) {
433
- this.changeDetectorRef = changeDetectorRef;
434
- this.dateAdapter = dateAdapter;
435
- this.dir = dir;
436
- /** Emits when a new year is selected. */
437
- this.selectedChange = new i0.EventEmitter();
438
- /** Emits the selected year. This doesn't imply a change on the selected date */
439
- this.yearSelected = new i0.EventEmitter();
440
- /** Emits when any date is activated. */
441
- this.activeDateChange = new i0.EventEmitter();
442
- if (!this.dateAdapter) {
443
- throw createMissingDateImplError('DateAdapter');
444
- }
445
- this._activeDate = this.dateAdapter.today();
446
- }
447
- Object.defineProperty(McMultiYearView.prototype, "activeDate", {
448
- /** The date to display in this multi-year view (everything other than the year is ignored). */
449
- get: function () {
450
- return this._activeDate;
451
- },
452
- set: function (value) {
453
- var oldActiveDate = this._activeDate;
454
- var validDate = this.getValidDateOrNull(this.dateAdapter.deserialize(value)) || this.dateAdapter.today();
455
- this._activeDate = this.dateAdapter.clampDate(validDate, this.minDate, this.maxDate);
456
- if (Math.floor(this.dateAdapter.getYear(oldActiveDate) / yearsPerPage) !==
457
- Math.floor(this.dateAdapter.getYear(this._activeDate) / yearsPerPage)) {
458
- this.init();
459
- }
460
- },
461
- enumerable: false,
462
- configurable: true
463
- });
464
- Object.defineProperty(McMultiYearView.prototype, "selected", {
465
- /** The currently selected date. */
466
- get: function () {
467
- return this._selected;
468
- },
469
- set: function (value) {
470
- this._selected = this.getValidDateOrNull(this.dateAdapter.deserialize(value));
471
- this.selectedYear = this._selected && this.dateAdapter.getYear(this._selected);
472
- },
473
- enumerable: false,
474
- configurable: true
475
- });
476
- Object.defineProperty(McMultiYearView.prototype, "minDate", {
477
- /** The minimum selectable date. */
478
- get: function () {
479
- return this._minDate;
480
- },
481
- set: function (value) {
482
- this._minDate = this.getValidDateOrNull(this.dateAdapter.deserialize(value));
483
- },
484
- enumerable: false,
485
- configurable: true
486
- });
487
- Object.defineProperty(McMultiYearView.prototype, "maxDate", {
488
- /** The maximum selectable date. */
489
- get: function () {
490
- return this._maxDate;
491
- },
492
- set: function (value) {
493
- this._maxDate = this.getValidDateOrNull(this.dateAdapter.deserialize(value));
494
- },
495
- enumerable: false,
496
- configurable: true
497
- });
498
- McMultiYearView.prototype.ngAfterContentInit = function () {
499
- this.init();
500
- };
501
- /** Initializes this multi-year view. */
502
- McMultiYearView.prototype.init = function () {
503
- var _this = this;
504
- this.todayYear = this.dateAdapter.getYear(this.dateAdapter.today());
505
- var activeYear = this.dateAdapter.getYear(this._activeDate);
506
- var activeOffset = activeYear % yearsPerPage;
507
- this.years = [];
508
- for (var i = 0, row = []; i < yearsPerPage; i++) {
509
- row.push(activeYear - activeOffset + i);
510
- if (row.length === yearsPerRow) {
511
- this.years.push(row.map(function (year) { return _this.createCellForYear(year); }));
512
- row = [];
513
- }
514
- }
515
- this.changeDetectorRef.markForCheck();
516
- };
517
- /** Handles when a new year is selected. */
518
- McMultiYearView.prototype.onYearSelected = function (year) {
519
- this.yearSelected.emit(this.dateAdapter.createDate(year));
520
- var month = this.dateAdapter.getMonth(this.activeDate);
521
- var daysInMonth = this.dateAdapter.getNumDaysInMonth(this.dateAdapter.createDate(year, month));
522
- this.selectedChange.emit(this.dateAdapter.createDate(year, month, Math.min(this.dateAdapter.getDate(this.activeDate), daysInMonth)));
523
- };
524
- /** Handles keydown events on the calendar body when calendar is in multi-year view. */
525
- McMultiYearView.prototype.handleCalendarBodyKeydown = function (event) {
526
- // TODO(mmalerba): We currently allow keyboard navigation to disabled dates, but just prevent
527
- // disabled ones from being selected. This may not be ideal, we should look into whether
528
- // navigation should skip over disabled dates, and if so, how to implement that efficiently.
529
- var oldActiveDate = this._activeDate;
530
- var isRtl = this.isRtl();
531
- // tslint:disable-next-line:deprecation
532
- switch (event.keyCode) {
533
- case keycodes.LEFT_ARROW:
534
- this.activeDate = this.dateAdapter.addCalendarYears(this._activeDate, isRtl ? 1 : -1);
535
- break;
536
- case keycodes.RIGHT_ARROW:
537
- this.activeDate = this.dateAdapter.addCalendarYears(this._activeDate, isRtl ? -1 : 1);
538
- break;
539
- case keycodes.UP_ARROW:
540
- this.activeDate = this.dateAdapter.addCalendarYears(this._activeDate, -yearsPerRow);
541
- break;
542
- case keycodes.DOWN_ARROW:
543
- this.activeDate = this.dateAdapter.addCalendarYears(this._activeDate, yearsPerRow);
544
- break;
545
- case keycodes.HOME:
546
- this.activeDate = this.dateAdapter.addCalendarYears(this._activeDate, -this.dateAdapter.getYear(this._activeDate) % yearsPerPage);
547
- break;
548
- case keycodes.END:
549
- this.activeDate = this.dateAdapter.addCalendarYears(this._activeDate, yearsPerPage - this.dateAdapter.getYear(this._activeDate) % yearsPerPage - 1);
550
- break;
551
- case keycodes.PAGE_UP:
552
- this.activeDate =
553
- this.dateAdapter.addCalendarYears(this._activeDate, event.altKey ? -yearsPerPage * 10 : -yearsPerPage);
554
- break;
555
- case keycodes.PAGE_DOWN:
556
- this.activeDate =
557
- this.dateAdapter.addCalendarYears(this._activeDate, event.altKey ? yearsPerPage * 10 : yearsPerPage);
558
- break;
559
- case keycodes.ENTER:
560
- case keycodes.SPACE:
561
- this.onYearSelected(this.dateAdapter.getYear(this._activeDate));
562
- break;
563
- default:
564
- // Don't prevent default or focus active cell on keys that we don't explicitly handle.
565
- return;
566
- }
567
- if (this.dateAdapter.compareDate(oldActiveDate, this.activeDate)) {
568
- this.activeDateChange.emit(this.activeDate);
569
- }
570
- this.focusActiveCell();
571
- // Prevent unexpected default actions such as form submission.
572
- event.preventDefault();
573
- };
574
- McMultiYearView.prototype.getActiveCell = function () {
575
- return this.dateAdapter.getYear(this.activeDate) % yearsPerPage;
576
- };
577
- /** Focuses the active cell after the microtask queue is empty. */
578
- McMultiYearView.prototype.focusActiveCell = function () {
579
- this.mcCalendarBody.focusActiveCell();
580
- };
581
- /** Creates an McCalendarCell for the given year. */
582
- McMultiYearView.prototype.createCellForYear = function (year) {
583
- var yearName = this.dateAdapter.getYearName(this.dateAdapter.createDate(year));
584
- return new McCalendarCell(year, yearName, yearName, this.shouldEnableYear(year));
585
- };
586
- /** Whether the given year is enabled. */
587
- McMultiYearView.prototype.shouldEnableYear = function (year) {
588
- // disable if the year is greater than maxDate lower than minDate
589
- if (year === undefined || year === null ||
590
- (this.maxDate && year > this.dateAdapter.getYear(this.maxDate)) ||
591
- (this.minDate && year < this.dateAdapter.getYear(this.minDate))) {
592
- return false;
593
- }
594
- // enable if it reaches here and there's no filter defined
595
- if (!this.dateFilter) {
596
- return true;
597
- }
598
- var firstOfYear = this.dateAdapter.createDate(year);
599
- // If any date in the year is enabled count the year as enabled.
600
- for (var date = firstOfYear; this.dateAdapter.getYear(date) === year; date = this.dateAdapter.addCalendarDays(date, 1)) {
601
- if (this.dateFilter(date)) {
602
- return true;
603
- }
604
- }
605
- return false;
606
- };
607
- /**
608
- * @param obj The object to check.
609
- * @returns The given object if it is both a date instance and valid, otherwise null.
610
- */
611
- McMultiYearView.prototype.getValidDateOrNull = function (obj) {
612
- return (this.dateAdapter.isDateInstance(obj) && this.dateAdapter.isValid(obj)) ? obj : null;
613
- };
614
- /** Determines whether the user has the RTL layout direction. */
615
- McMultiYearView.prototype.isRtl = function () {
616
- return this.dir && this.dir.value === 'rtl';
617
- };
618
- return McMultiYearView;
619
- }());
620
- /** @nocollapse */ McMultiYearView.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: McMultiYearView, deps: [{ token: i0__namespace.ChangeDetectorRef }, { token: i1__namespace$1.DateAdapter, optional: true }, { token: i2__namespace.Directionality, optional: true }], target: i0__namespace.ɵɵFactoryTarget.Component });
621
- /** @nocollapse */ McMultiYearView.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.5", type: McMultiYearView, selector: "mc-multi-year-view", inputs: { activeDate: "activeDate", selected: "selected", minDate: "minDate", maxDate: "maxDate", dateFilter: "dateFilter" }, outputs: { selectedChange: "selectedChange", yearSelected: "yearSelected", activeDateChange: "activeDateChange" }, viewQueries: [{ propertyName: "mcCalendarBody", first: true, predicate: McCalendarBody, descendants: true }], exportAs: ["mcMultiYearView"], ngImport: i0__namespace, template: "<table class=\"mc-calendar__table\">\n <thead class=\"mc-calendar__table-header\">\n <tr>\n <th class=\"mc-calendar__table-header-divider\" colspan=\"4\"></th>\n </tr>\n </thead>\n <tbody mc-calendar-body\n [rows]=\"years\"\n [todayValue]=\"todayYear\"\n [selectedValue]=\"selectedYear\"\n [numCols]=\"4\"\n [cellAspectRatio]=\"4 / 7\"\n [activeCell]=\"getActiveCell()\"\n (selectedValueChange)=\"onYearSelected($event)\"\n (keydown)=\"handleCalendarBodyKeydown($event)\">\n </tbody>\n</table>\n", components: [{ type: McCalendarBody, selector: "[mc-calendar-body]", inputs: ["label", "rows", "todayValue", "selectedValue", "labelMinRequiredCells", "numCols", "activeCell", "cellAspectRatio"], outputs: ["selectedValueChange"], exportAs: ["mcCalendarBody"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush, encapsulation: i0__namespace.ViewEncapsulation.None });
622
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: McMultiYearView, decorators: [{
623
- type: i0.Component,
624
- args: [{
625
- selector: 'mc-multi-year-view',
626
- exportAs: 'mcMultiYearView',
627
- templateUrl: 'multi-year-view.html',
628
- encapsulation: i0.ViewEncapsulation.None,
629
- changeDetection: i0.ChangeDetectionStrategy.OnPush
630
- }]
631
- }], ctorParameters: function () {
632
- return [{ type: i0__namespace.ChangeDetectorRef }, { type: i1__namespace$1.DateAdapter, decorators: [{
633
- type: i0.Optional
634
- }] }, { type: i2__namespace.Directionality, decorators: [{
635
- type: i0.Optional
636
- }] }];
637
- }, propDecorators: { activeDate: [{
638
- type: i0.Input
639
- }], selected: [{
640
- type: i0.Input
641
- }], minDate: [{
642
- type: i0.Input
643
- }], maxDate: [{
644
- type: i0.Input
645
- }], dateFilter: [{
646
- type: i0.Input
647
- }], selectedChange: [{
648
- type: i0.Output
649
- }], yearSelected: [{
650
- type: i0.Output
651
- }], activeDateChange: [{
652
- type: i0.Output
653
- }], mcCalendarBody: [{
654
- type: i0.ViewChild,
655
- args: [McCalendarBody, { static: false }]
656
- }] } });
657
-
658
- /**
659
- * An internal component used to display a single year in the datepicker.
660
- * @docs-private
661
- */
662
- var McYearView = /** @class */ (function () {
663
- function McYearView(changeDetectorRef, dateFormats, dateAdapter, dir) {
664
- this.changeDetectorRef = changeDetectorRef;
665
- this.dateFormats = dateFormats;
666
- this.dateAdapter = dateAdapter;
667
- this.dir = dir;
668
- /** Emits when a new month is selected. */
669
- this.selectedChange = new i0.EventEmitter();
670
- /** Emits the selected month. This doesn't imply a change on the selected date */
671
- this.monthSelected = new i0.EventEmitter();
672
- /** Emits when any date is activated. */
673
- this.activeDateChange = new i0.EventEmitter();
674
- if (!this.dateAdapter) {
675
- throw createMissingDateImplError('DateAdapter');
676
- }
677
- if (!this.dateFormats) {
678
- throw createMissingDateImplError('MC_DATE_FORMATS');
679
- }
680
- this._activeDate = this.dateAdapter.today();
681
- }
682
- Object.defineProperty(McYearView.prototype, "activeDate", {
683
- /** The date to display in this year view (everything other than the year is ignored). */
684
- get: function () {
685
- return this._activeDate;
686
- },
687
- set: function (value) {
688
- var oldActiveDate = this._activeDate;
689
- var validDate = this.getValidDateOrNull(this.dateAdapter.deserialize(value)) || this.dateAdapter.today();
690
- this._activeDate = this.dateAdapter.clampDate(validDate, this.minDate, this.maxDate);
691
- if (this.dateAdapter.getYear(oldActiveDate) !== this.dateAdapter.getYear(this._activeDate)) {
692
- this.init();
693
- }
694
- },
695
- enumerable: false,
696
- configurable: true
697
- });
698
- Object.defineProperty(McYearView.prototype, "selected", {
699
- /** The currently selected date. */
700
- get: function () {
701
- return this._selected;
702
- },
703
- set: function (value) {
704
- this._selected = this.getValidDateOrNull(this.dateAdapter.deserialize(value));
705
- this.selectedMonth = this.getMonthInCurrentYear(this._selected);
706
- },
707
- enumerable: false,
708
- configurable: true
709
- });
710
- Object.defineProperty(McYearView.prototype, "minDate", {
711
- /** The minimum selectable date. */
712
- get: function () {
713
- return this._minDate;
714
- },
715
- set: function (value) {
716
- this._minDate = this.getValidDateOrNull(this.dateAdapter.deserialize(value));
717
- },
718
- enumerable: false,
719
- configurable: true
720
- });
721
- Object.defineProperty(McYearView.prototype, "maxDate", {
722
- /** The maximum selectable date. */
723
- get: function () {
724
- return this._maxDate;
725
- },
726
- set: function (value) {
727
- this._maxDate = this.getValidDateOrNull(this.dateAdapter.deserialize(value));
728
- },
729
- enumerable: false,
730
- configurable: true
731
- });
732
- McYearView.prototype.ngAfterContentInit = function () {
733
- this.init();
734
- };
735
- /** Handles when a new month is selected. */
736
- McYearView.prototype.onMonthSelected = function (month) {
737
- var year = this.dateAdapter.getYear(this.activeDate);
738
- var normalizedDate = this.dateAdapter.createDate(year, month);
739
- this.monthSelected.emit(normalizedDate);
740
- var daysInMonth = this.dateAdapter.getNumDaysInMonth(normalizedDate);
741
- this.selectedChange.emit(this.dateAdapter.createDate(year, month, Math.min(this.dateAdapter.getDate(this.activeDate), daysInMonth)));
742
- };
743
- /** Handles keydown events on the calendar body when calendar is in year view. */
744
- McYearView.prototype.handleCalendarBodyKeydown = function (event) {
745
- // TODO(mmalerba): We currently allow keyboard navigation to disabled dates, but just prevent
746
- // disabled ones from being selected. This may not be ideal, we should look into whether
747
- // navigation should skip over disabled dates, and if so, how to implement that efficiently.
748
- var oldActiveDate = this._activeDate;
749
- var isRtl = this.isRtl();
750
- var VERTICAL_SHIFT = 4;
751
- var PAGE_SHIFT = 10;
752
- var MAX_MONTH_INDEX = 11;
753
- // tslint:disable-next-line:deprecation
754
- switch (event.keyCode) {
755
- case keycodes.LEFT_ARROW:
756
- this.activeDate = this.dateAdapter.addCalendarMonths(this._activeDate, isRtl ? 1 : -1);
757
- break;
758
- case keycodes.RIGHT_ARROW:
759
- this.activeDate = this.dateAdapter.addCalendarMonths(this._activeDate, isRtl ? -1 : 1);
760
- break;
761
- case keycodes.UP_ARROW:
762
- this.activeDate = this.dateAdapter.addCalendarMonths(this._activeDate, -VERTICAL_SHIFT);
763
- break;
764
- case keycodes.DOWN_ARROW:
765
- this.activeDate = this.dateAdapter.addCalendarMonths(this._activeDate, VERTICAL_SHIFT);
766
- break;
767
- case keycodes.HOME:
768
- this.activeDate = this.dateAdapter.addCalendarMonths(this._activeDate, -this.dateAdapter.getMonth(this._activeDate));
769
- break;
770
- case keycodes.END:
771
- this.activeDate = this.dateAdapter.addCalendarMonths(this._activeDate, MAX_MONTH_INDEX - this.dateAdapter.getMonth(this._activeDate));
772
- break;
773
- case keycodes.PAGE_UP:
774
- this.activeDate =
775
- this.dateAdapter.addCalendarYears(this._activeDate, event.altKey ? -PAGE_SHIFT : -1);
776
- break;
777
- case keycodes.PAGE_DOWN:
778
- this.activeDate =
779
- this.dateAdapter.addCalendarYears(this._activeDate, event.altKey ? PAGE_SHIFT : 1);
780
- break;
781
- case keycodes.ENTER:
782
- case keycodes.SPACE:
783
- this.onMonthSelected(this.dateAdapter.getMonth(this._activeDate));
784
- break;
785
- default:
786
- // Don't prevent default or focus active cell on keys that we don't explicitly handle.
787
- return;
788
- }
789
- if (this.dateAdapter.compareDate(oldActiveDate, this.activeDate)) {
790
- this.activeDateChange.emit(this.activeDate);
791
- }
792
- this.focusActiveCell();
793
- // Prevent unexpected default actions such as form submission.
794
- event.preventDefault();
795
- };
796
- /** Initializes this year view. */
797
- McYearView.prototype.init = function () {
798
- var _this = this;
799
- this.selectedMonth = this.getMonthInCurrentYear(this.selected);
800
- this.todayMonth = this.getMonthInCurrentYear(this.dateAdapter.today());
801
- this.yearLabel = this.dateAdapter.getYearName(this.activeDate);
802
- var monthNames = this.dateAdapter.getMonthNames('short');
803
- // First row of months only contains 5 elements so we can fit the year label on the same row.
804
- // tslint:disable-next-line:no-magic-numbers
805
- this.months = [[0, 1, 2, 3], [4, 5, 6, 7], [8, 9, 10, 11]]
806
- .map(function (row) { return row.map(function (month) { return _this.createCellForMonth(month, monthNames[month]); }); });
807
- this.changeDetectorRef.markForCheck();
808
- };
809
- /** Focuses the active cell after the microtask queue is empty. */
810
- McYearView.prototype.focusActiveCell = function () {
811
- this.mcCalendarBody.focusActiveCell();
812
- };
813
- /**
814
- * Gets the month in this year that the given Date falls on.
815
- * Returns null if the given Date is in another year.
816
- */
817
- McYearView.prototype.getMonthInCurrentYear = function (date) {
818
- return date && this.dateAdapter.getYear(date) === this.dateAdapter.getYear(this.activeDate) ?
819
- this.dateAdapter.getMonth(date) : null;
820
- };
821
- /** Creates an McCalendarCell for the given month. */
822
- McYearView.prototype.createCellForMonth = function (month, monthName) {
823
- var ariaLabel = this.dateAdapter.format(this.dateAdapter.createDate(this.dateAdapter.getYear(this.activeDate), month), this.dateFormats.monthYearA11yLabel);
824
- var newMonthName = monthName[0].toLocaleUpperCase() + monthName.substr(1);
825
- return new McCalendarCell(month, newMonthName, ariaLabel, this.shouldEnableMonth(month));
826
- };
827
- /** Whether the given month is enabled. */
828
- McYearView.prototype.shouldEnableMonth = function (month) {
829
- var activeYear = this.dateAdapter.getYear(this.activeDate);
830
- if (month === undefined || month === null ||
831
- this.isYearAndMonthAfterMaxDate(activeYear, month) ||
832
- this.isYearAndMonthBeforeMinDate(activeYear, month)) {
833
- return false;
834
- }
835
- if (!this.dateFilter) {
836
- return true;
837
- }
838
- var firstOfMonth = this.dateAdapter.createDate(activeYear, month);
839
- // If any date in the month is enabled count the month as enabled.
840
- for (var date = firstOfMonth; this.dateAdapter.getMonth(date) === month; date = this.dateAdapter.addCalendarDays(date, 1)) {
841
- if (this.dateFilter(date)) {
842
- return true;
843
- }
844
- }
845
- return false;
846
- };
847
- /**
848
- * Tests whether the combination month/year is after this.maxDate, considering
849
- * just the month and year of this.maxDate
850
- */
851
- McYearView.prototype.isYearAndMonthAfterMaxDate = function (year, month) {
852
- if (this.maxDate) {
853
- var maxYear = this.dateAdapter.getYear(this.maxDate);
854
- var maxMonth = this.dateAdapter.getMonth(this.maxDate);
855
- return year > maxYear || (year === maxYear && month > maxMonth);
856
- }
857
- return false;
858
- };
859
- /**
860
- * Tests whether the combination month/year is before this.minDate, considering
861
- * just the month and year of this.minDate
862
- */
863
- McYearView.prototype.isYearAndMonthBeforeMinDate = function (year, month) {
864
- if (this.minDate) {
865
- var minYear = this.dateAdapter.getYear(this.minDate);
866
- var minMonth = this.dateAdapter.getMonth(this.minDate);
867
- return year < minYear || (year === minYear && month < minMonth);
868
- }
869
- return false;
870
- };
871
- /**
872
- * @param obj The object to check.
873
- * @returns The given object if it is both a date instance and valid, otherwise null.
874
- */
875
- McYearView.prototype.getValidDateOrNull = function (obj) {
876
- return (this.dateAdapter.isDateInstance(obj) && this.dateAdapter.isValid(obj)) ? obj : null;
877
- };
878
- /** Determines whether the user has the RTL layout direction. */
879
- McYearView.prototype.isRtl = function () {
880
- return this.dir && this.dir.value === 'rtl';
881
- };
882
- return McYearView;
883
- }());
884
- /** @nocollapse */ McYearView.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: McYearView, deps: [{ token: i0__namespace.ChangeDetectorRef }, { token: i1$1.MC_DATE_FORMATS, optional: true }, { token: i1__namespace$1.DateAdapter, optional: true }, { token: i2__namespace.Directionality, optional: true }], target: i0__namespace.ɵɵFactoryTarget.Component });
885
- /** @nocollapse */ McYearView.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.5", type: McYearView, selector: "mc-year-view", inputs: { activeDate: "activeDate", selected: "selected", minDate: "minDate", maxDate: "maxDate", dateFilter: "dateFilter" }, outputs: { selectedChange: "selectedChange", monthSelected: "monthSelected", activeDateChange: "activeDateChange" }, viewQueries: [{ propertyName: "mcCalendarBody", first: true, predicate: McCalendarBody, descendants: true }], exportAs: ["mcYearView"], ngImport: i0__namespace, template: "<table class=\"mc-calendar__table\">\n <thead class=\"mc-calendar__table-header\">\n <tr>\n <th class=\"mc-calendar__table-header-divider\" colspan=\"4\"></th>\n </tr>\n </thead>\n <tbody mc-calendar-body\n [label]=\"yearLabel\"\n [rows]=\"months\"\n [todayValue]=\"todayMonth\"\n [selectedValue]=\"selectedMonth\"\n [labelMinRequiredCells]=\"2\"\n [numCols]=\"4\"\n [cellAspectRatio]=\"4 / 7\"\n [activeCell]=\"dateAdapter.getMonth(activeDate)\"\n (selectedValueChange)=\"onMonthSelected($event)\"\n (keydown)=\"handleCalendarBodyKeydown($event)\">\n </tbody>\n</table>\n", components: [{ type: McCalendarBody, selector: "[mc-calendar-body]", inputs: ["label", "rows", "todayValue", "selectedValue", "labelMinRequiredCells", "numCols", "activeCell", "cellAspectRatio"], outputs: ["selectedValueChange"], exportAs: ["mcCalendarBody"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush, encapsulation: i0__namespace.ViewEncapsulation.None });
886
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: McYearView, decorators: [{
887
- type: i0.Component,
888
- args: [{
889
- selector: 'mc-year-view',
890
- exportAs: 'mcYearView',
891
- templateUrl: 'year-view.html',
892
- encapsulation: i0.ViewEncapsulation.None,
893
- changeDetection: i0.ChangeDetectionStrategy.OnPush
894
- }]
895
- }], ctorParameters: function () {
896
- return [{ type: i0__namespace.ChangeDetectorRef }, { type: undefined, decorators: [{
897
- type: i0.Optional
898
- }, {
899
- type: i0.Inject,
900
- args: [i1$1.MC_DATE_FORMATS]
901
- }] }, { type: i1__namespace$1.DateAdapter, decorators: [{
902
- type: i0.Optional
903
- }] }, { type: i2__namespace.Directionality, decorators: [{
904
- type: i0.Optional
905
- }] }];
906
- }, propDecorators: { activeDate: [{
907
- type: i0.Input
908
- }], selected: [{
909
- type: i0.Input
910
- }], minDate: [{
911
- type: i0.Input
912
- }], maxDate: [{
913
- type: i0.Input
914
- }], dateFilter: [{
915
- type: i0.Input
916
- }], selectedChange: [{
917
- type: i0.Output
918
- }], monthSelected: [{
919
- type: i0.Output
920
- }], activeDateChange: [{
921
- type: i0.Output
922
- }], mcCalendarBody: [{
923
- type: i0.ViewChild,
924
- args: [McCalendarBody, { static: false }]
925
- }] } });
926
-
927
- /** Datepicker data that requires internationalization. */
928
- var McDatepickerIntl = /** @class */ (function () {
929
- function McDatepickerIntl() {
930
- /**
931
- * Stream that emits whenever the labels here are changed. Use this to notify
932
- * components if the labels have changed after initialization.
933
- */
934
- this.changes = new rxjs.Subject();
935
- /** A label for the calendar popup (used by screen readers). */
936
- this.calendarLabel = 'Calendar';
937
- /** A label for the button used to open the calendar popup (used by screen readers). */
938
- this.openCalendarLabel = 'Open calendar';
939
- /** A label for the previous month button (used by screen readers). */
940
- this.prevMonthLabel = 'Previous month';
941
- /** A label for the next month button (used by screen readers). */
942
- this.nextMonthLabel = 'Next month';
943
- /** A label for the previous year button (used by screen readers). */
944
- this.prevYearLabel = 'Previous year';
945
- /** A label for the next year button (used by screen readers). */
946
- this.nextYearLabel = 'Next year';
947
- /** A label for the previous multi-year button (used by screen readers). */
948
- this.prevMultiYearLabel = 'Previous 20 years';
949
- /** A label for the next multi-year button (used by screen readers). */
950
- this.nextMultiYearLabel = 'Next 20 years';
951
- /** A label for the 'switch to month view' button (used by screen readers). */
952
- this.switchToMonthViewLabel = 'Choose date';
953
- /** A label for the 'switch to year view' button (used by screen readers). */
954
- this.switchToMultiYearViewLabel = 'Choose month and year';
955
- }
956
- return McDatepickerIntl;
957
- }());
958
- /** @nocollapse */ McDatepickerIntl.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: McDatepickerIntl, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
959
- /** @nocollapse */ McDatepickerIntl.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: McDatepickerIntl, providedIn: 'root' });
960
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: McDatepickerIntl, decorators: [{
961
- type: i0.Injectable,
962
- args: [{ providedIn: 'root' }]
963
- }] });
964
-
965
- /**
966
- * Possible views for the calendar.
967
- * @docs-private
968
- */
969
- exports.McCalendarView = void 0;
970
- (function (McCalendarView) {
971
- McCalendarView["Month"] = "month";
972
- McCalendarView["Year"] = "year";
973
- McCalendarView["MultiYear"] = "multi-year";
974
- })(exports.McCalendarView || (exports.McCalendarView = {}));
975
- /** Default header for McCalendar */
976
- var McCalendarHeader = /** @class */ (function () {
977
- function McCalendarHeader(intl, calendar, dateAdapter, dateFormats, changeDetectorRef) {
978
- this.intl = intl;
979
- this.calendar = calendar;
980
- this.dateAdapter = dateAdapter;
981
- this.dateFormats = dateFormats;
982
- this.calendar.stateChanges.subscribe(function () { return changeDetectorRef.markForCheck(); });
983
- }
984
- Object.defineProperty(McCalendarHeader.prototype, "periodButtonText", {
985
- /** The label for the current calendar view. */
986
- get: function () {
987
- if (this.calendar.currentView === exports.McCalendarView.Month) {
988
- var label = this.dateAdapter.format(this.calendar.activeDate, this.dateFormats.monthYearLabel);
989
- return (label[0].toLocaleUpperCase() + label.substr(1)).replace('.', '');
990
- }
991
- if (this.calendar.currentView === exports.McCalendarView.Year) {
992
- return this.dateAdapter.getYearName(this.calendar.activeDate);
993
- }
994
- var activeYear = this.dateAdapter.getYear(this.calendar.activeDate);
995
- var firstYearInView = this.dateAdapter.getYearName(
996
- // tslint:disable-next-line:no-magic-numbers
997
- this.dateAdapter.createDate(activeYear - activeYear % 24));
998
- var lastYearInView = this.dateAdapter.getYearName(
999
- // tslint:disable-next-line:no-magic-numbers
1000
- this.dateAdapter.createDate(activeYear + yearsPerPage - 1 - activeYear % 24));
1001
- return firstYearInView + " \u2013 " + lastYearInView;
1002
- },
1003
- enumerable: false,
1004
- configurable: true
1005
- });
1006
- Object.defineProperty(McCalendarHeader.prototype, "periodButtonLabel", {
1007
- get: function () {
1008
- return this.calendar.currentView === exports.McCalendarView.Month ?
1009
- this.intl.switchToMultiYearViewLabel : this.intl.switchToMonthViewLabel;
1010
- },
1011
- enumerable: false,
1012
- configurable: true
1013
- });
1014
- Object.defineProperty(McCalendarHeader.prototype, "prevButtonLabel", {
1015
- /** The label for the previous button. */
1016
- get: function () {
1017
- var _a;
1018
- return (_a = {},
1019
- _a[exports.McCalendarView.Month] = this.intl.prevMonthLabel,
1020
- _a[exports.McCalendarView.Year] = this.intl.prevYearLabel,
1021
- _a[exports.McCalendarView.MultiYear] = this.intl.prevMultiYearLabel,
1022
- _a)[this.calendar.currentView];
1023
- },
1024
- enumerable: false,
1025
- configurable: true
1026
- });
1027
- Object.defineProperty(McCalendarHeader.prototype, "nextButtonLabel", {
1028
- /** The label for the next button. */
1029
- get: function () {
1030
- var _a;
1031
- return (_a = {},
1032
- _a[exports.McCalendarView.Month] = this.intl.nextMonthLabel,
1033
- _a[exports.McCalendarView.Year] = this.intl.nextYearLabel,
1034
- _a[exports.McCalendarView.MultiYear] = this.intl.nextMultiYearLabel,
1035
- _a)[this.calendar.currentView];
1036
- },
1037
- enumerable: false,
1038
- configurable: true
1039
- });
1040
- /** Handles user clicks on the period label. */
1041
- McCalendarHeader.prototype.currentPeriodClicked = function () {
1042
- if ([exports.McCalendarView.Month, exports.McCalendarView.MultiYear].includes(this.calendar.currentView)) {
1043
- this.calendar.currentView = exports.McCalendarView.Year;
1044
- }
1045
- else if (this.calendar.currentView === exports.McCalendarView.Year) {
1046
- this.calendar.currentView = exports.McCalendarView.Month;
1047
- }
1048
- };
1049
- /** Handles user clicks on the previous button. */
1050
- McCalendarHeader.prototype.previousClicked = function () {
1051
- if (this.calendar.currentView === exports.McCalendarView.Month) {
1052
- this.calendar.activeDate = this.dateAdapter.addCalendarMonths(this.calendar.activeDate, -1);
1053
- }
1054
- else {
1055
- this.calendar.activeDate = this.dateAdapter.addCalendarYears(this.calendar.activeDate, this.calendar.currentView === exports.McCalendarView.Year ? -1 : -yearsPerPage);
1056
- }
1057
- };
1058
- /** Handles user clicks on the next button. */
1059
- McCalendarHeader.prototype.nextClicked = function () {
1060
- if (this.calendar.currentView === exports.McCalendarView.Month) {
1061
- this.calendar.activeDate = this.dateAdapter.addCalendarMonths(this.calendar.activeDate, 1);
1062
- }
1063
- else {
1064
- this.calendar.activeDate = this.dateAdapter.addCalendarYears(this.calendar.activeDate, this.calendar.currentView === exports.McCalendarView.Year ? 1 : yearsPerPage);
1065
- }
1066
- };
1067
- /** Whether the previous period button is enabled. */
1068
- McCalendarHeader.prototype.previousEnabled = function () {
1069
- if (!this.calendar.minDate) {
1070
- return true;
1071
- }
1072
- return !this.calendar.minDate || !this.isSameView(this.calendar.activeDate, this.calendar.minDate);
1073
- };
1074
- /** Whether the next period button is enabled. */
1075
- McCalendarHeader.prototype.nextEnabled = function () {
1076
- return !this.calendar.maxDate || !this.isSameView(this.calendar.activeDate, this.calendar.maxDate);
1077
- };
1078
- /** Whether the two dates represent the same view in the current view mode (month or year). */
1079
- McCalendarHeader.prototype.isSameView = function (firstDate, secondDate) {
1080
- var firstYear = this.dateAdapter.getYear(firstDate);
1081
- var secondYear = this.dateAdapter.getYear(secondDate);
1082
- var firstMonth = this.dateAdapter.getMonth(firstDate);
1083
- var secondMonth = this.dateAdapter.getMonth(secondDate);
1084
- if (this.calendar.currentView === exports.McCalendarView.Month) {
1085
- return firstYear === secondYear && firstMonth === secondMonth;
1086
- }
1087
- if (this.calendar.currentView === exports.McCalendarView.Year) {
1088
- return firstYear === secondYear;
1089
- }
1090
- // Otherwise we are in 'multi-year' view.
1091
- return Math.floor(firstYear / yearsPerPage) === Math.floor(secondYear / yearsPerPage);
1092
- };
1093
- return McCalendarHeader;
1094
- }());
1095
- /** @nocollapse */ McCalendarHeader.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: McCalendarHeader, deps: [{ token: McDatepickerIntl }, { token: i0.forwardRef(function () { return McCalendar; }) }, { token: i1__namespace$1.DateAdapter, optional: true }, { token: i1$1.MC_DATE_FORMATS, optional: true }, { token: i0__namespace.ChangeDetectorRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
1096
- /** @nocollapse */ McCalendarHeader.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.5", type: McCalendarHeader, selector: "mc-calendar-header", host: { classAttribute: "mc-calendar-header" }, exportAs: ["mcCalendarHeader"], ngImport: i0__namespace, template: "<button mc-button\n [tabindex]=\"'-1'\"\n class=\"mc-button_transparent mc-calendar__period-button\"\n (click)=\"currentPeriodClicked()\">\n {{ periodButtonText }}\n\n <i class=\"mc mc-icon\"\n [class.mc-angle-up-M_16]=\"calendar.currentView !== 'month'\"\n [class.mc-angle-down-M_16]=\"calendar.currentView === 'month'\">\n </i>\n</button>\n\n<div class=\"mc-calendar-spacer\"></div>\n\n<button mc-button\n [tabindex]=\"'-1'\"\n class=\"mc-button_transparent mc-calendar__previous-button\"\n [disabled]=\"!previousEnabled()\"\n (click)=\"previousClicked()\">\n\n <i mc-icon=\"mc-angle-left-L_16\"></i>\n</button>\n\n<button mc-button\n [tabindex]=\"'-1'\"\n class=\"mc-button_transparent mc-calendar__next-button\"\n [disabled]=\"!nextEnabled()\"\n (click)=\"nextClicked()\">\n\n <i mc-icon=\"mc-angle-right-L_16\"></i>\n</button>\n", components: [{ type: i3__namespace.McButton, selector: "button[mc-button]", inputs: ["disabled", "color"] }, { type: i4__namespace.McIcon, selector: "[mc-icon]", inputs: ["color"] }], directives: [{ type: i3__namespace.McButtonCssStyler, selector: "button[mc-button], a[mc-button]" }, { type: i4__namespace.McIconCSSStyler, selector: "[mc-icon]" }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush, encapsulation: i0__namespace.ViewEncapsulation.None });
1097
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: McCalendarHeader, decorators: [{
1098
- type: i0.Component,
1099
- args: [{
1100
- selector: 'mc-calendar-header',
1101
- templateUrl: 'calendar-header.html',
1102
- exportAs: 'mcCalendarHeader',
1103
- host: {
1104
- class: 'mc-calendar-header'
1105
- },
1106
- encapsulation: i0.ViewEncapsulation.None,
1107
- changeDetection: i0.ChangeDetectionStrategy.OnPush
1108
- }]
1109
- }], ctorParameters: function () {
1110
- return [{ type: McDatepickerIntl }, { type: McCalendar, decorators: [{
1111
- type: i0.Inject,
1112
- args: [i0.forwardRef(function () { return McCalendar; })]
1113
- }] }, { type: i1__namespace$1.DateAdapter, decorators: [{
1114
- type: i0.Optional
1115
- }] }, { type: undefined, decorators: [{
1116
- type: i0.Optional
1117
- }, {
1118
- type: i0.Inject,
1119
- args: [i1$1.MC_DATE_FORMATS]
1120
- }] }, { type: i0__namespace.ChangeDetectorRef }];
1121
- } });
1122
- /**
1123
- * A calendar that is used as part of the datepicker.
1124
- * @docs-private
1125
- */
1126
- var McCalendar = /** @class */ (function () {
1127
- function McCalendar(intl, dateAdapter, dateFormats, changeDetectorRef) {
1128
- var _this = this;
1129
- this.dateAdapter = dateAdapter;
1130
- this.dateFormats = dateFormats;
1131
- this.changeDetectorRef = changeDetectorRef;
1132
- /** Whether the calendar should be started in month or year view. */
1133
- this.startView = exports.McCalendarView.Month;
1134
- /** Emits when the currently selected date changes. */
1135
- this.selectedChange = new i0.EventEmitter();
1136
- /**
1137
- * Emits the year chosen in multiyear view.
1138
- * This doesn't imply a change on the selected date.
1139
- */
1140
- this.yearSelected = new i0.EventEmitter();
1141
- /**
1142
- * Emits the month chosen in year view.
1143
- * This doesn't imply a change on the selected date.
1144
- */
1145
- this.monthSelected = new i0.EventEmitter();
1146
- /** Emits when any date is selected. */
1147
- this.userSelection = new i0.EventEmitter();
1148
- /**
1149
- * Emits whenever there is a state change that the header may need to respond to.
1150
- */
1151
- this.stateChanges = new rxjs.Subject();
1152
- /**
1153
- * Used for scheduling that focus should be moved to the active cell on the next tick.
1154
- * We need to schedule it, rather than do it immediately, because we have to wait
1155
- * for Angular to re-evaluate the view children.
1156
- */
1157
- this.moveFocusOnNextTick = false;
1158
- if (!this.dateAdapter) {
1159
- throw createMissingDateImplError('DateAdapter');
1160
- }
1161
- if (!this.dateFormats) {
1162
- throw createMissingDateImplError('MC_DATE_FORMATS');
1163
- }
1164
- this.intlChanges = intl.changes.subscribe(function () {
1165
- changeDetectorRef.markForCheck();
1166
- _this.stateChanges.next();
1167
- });
1168
- }
1169
- Object.defineProperty(McCalendar.prototype, "startAt", {
1170
- /** A date representing the period (month or year) to start the calendar in. */
1171
- get: function () {
1172
- return this._startAt;
1173
- },
1174
- set: function (value) {
1175
- this._startAt = this.getValidDateOrNull(this.dateAdapter.deserialize(value));
1176
- },
1177
- enumerable: false,
1178
- configurable: true
1179
- });
1180
- Object.defineProperty(McCalendar.prototype, "selected", {
1181
- /** The currently selected date. */
1182
- get: function () {
1183
- return this._selected;
1184
- },
1185
- set: function (value) {
1186
- this._selected = this.getValidDateOrNull(this.dateAdapter.deserialize(value));
1187
- },
1188
- enumerable: false,
1189
- configurable: true
1190
- });
1191
- Object.defineProperty(McCalendar.prototype, "minDate", {
1192
- /** The minimum selectable date. */
1193
- get: function () {
1194
- return this._minDate;
1195
- },
1196
- set: function (value) {
1197
- this._minDate = this.getValidDateOrNull(this.dateAdapter.deserialize(value));
1198
- },
1199
- enumerable: false,
1200
- configurable: true
1201
- });
1202
- Object.defineProperty(McCalendar.prototype, "maxDate", {
1203
- /** The maximum selectable date. */
1204
- get: function () {
1205
- return this._maxDate;
1206
- },
1207
- set: function (value) {
1208
- this._maxDate = this.getValidDateOrNull(this.dateAdapter.deserialize(value));
1209
- },
1210
- enumerable: false,
1211
- configurable: true
1212
- });
1213
- Object.defineProperty(McCalendar.prototype, "activeDate", {
1214
- /**
1215
- * The current active date. This determines which time period is shown and which date is
1216
- * highlighted when using keyboard navigation.
1217
- */
1218
- get: function () {
1219
- return this.clampedActiveDate;
1220
- },
1221
- set: function (value) {
1222
- this.clampedActiveDate = this.dateAdapter.clampDate(value, this.minDate, this.maxDate);
1223
- this.stateChanges.next();
1224
- },
1225
- enumerable: false,
1226
- configurable: true
1227
- });
1228
- Object.defineProperty(McCalendar.prototype, "currentView", {
1229
- /** Whether the calendar is in month view. */
1230
- get: function () {
1231
- return this._currentView;
1232
- },
1233
- set: function (value) {
1234
- this._currentView = value;
1235
- this.moveFocusOnNextTick = true;
1236
- },
1237
- enumerable: false,
1238
- configurable: true
1239
- });
1240
- McCalendar.prototype.ngAfterContentInit = function () {
1241
- this.calendarHeaderPortal = new i8.ComponentPortal(this.headerComponent || McCalendarHeader);
1242
- this.activeDate = this.startAt || this.dateAdapter.today();
1243
- // Assign to the private property since we don't want to move focus on init.
1244
- this._currentView = this.startView;
1245
- };
1246
- McCalendar.prototype.ngAfterViewChecked = function () {
1247
- if (this.moveFocusOnNextTick) {
1248
- this.moveFocusOnNextTick = false;
1249
- this.focusActiveCell();
1250
- }
1251
- };
1252
- McCalendar.prototype.ngOnDestroy = function () {
1253
- this.intlChanges.unsubscribe();
1254
- this.stateChanges.complete();
1255
- };
1256
- McCalendar.prototype.ngOnChanges = function (changes) {
1257
- var change = changes.minDate || changes.maxDate || changes.dateFilter;
1258
- if (change && !change.firstChange) {
1259
- var view = this.getCurrentViewComponent();
1260
- if (view) {
1261
- // We need to `detectChanges` manually here, because the `minDate`, `maxDate` etc. are
1262
- // passed down to the view via data bindings which won't be up-to-date when we call `init`.
1263
- this.changeDetectorRef.detectChanges();
1264
- view.init();
1265
- }
1266
- }
1267
- this.stateChanges.next();
1268
- };
1269
- McCalendar.prototype.focusActiveCell = function () {
1270
- this.getCurrentViewComponent().focusActiveCell();
1271
- };
1272
- /** Updates today's date after an update of the active date */
1273
- McCalendar.prototype.updateTodaysDate = function () {
1274
- var view = this.currentView === exports.McCalendarView.Month ? this.monthView :
1275
- (this.currentView === exports.McCalendarView.Year ? this.yearView : this.multiYearView);
1276
- view.ngAfterContentInit();
1277
- };
1278
- /** Handles date selection in the month view. */
1279
- McCalendar.prototype.dateSelected = function (date) {
1280
- if (!this.dateAdapter.sameDate(date, this.selected)) {
1281
- this.selectedChange.emit(date);
1282
- }
1283
- };
1284
- /** Handles year selection in the multiyear view. */
1285
- McCalendar.prototype.yearSelectedInMultiYearView = function (normalizedYear) {
1286
- this.yearSelected.emit(normalizedYear);
1287
- };
1288
- /** Handles month selection in the year view. */
1289
- McCalendar.prototype.monthSelectedInYearView = function (normalizedMonth) {
1290
- this.monthSelected.emit(normalizedMonth);
1291
- };
1292
- McCalendar.prototype.userSelected = function () {
1293
- this.userSelection.emit();
1294
- };
1295
- /** Handles year/month selection in the multi-year/year views. */
1296
- McCalendar.prototype.goToDateInView = function (date, view) {
1297
- this.activeDate = date;
1298
- this.currentView = view;
1299
- };
1300
- /**
1301
- * @param obj The object to check.
1302
- * @returns The given object if it is both a date instance and valid, otherwise null.
1303
- */
1304
- McCalendar.prototype.getValidDateOrNull = function (obj) {
1305
- return (this.dateAdapter.isDateInstance(obj) && this.dateAdapter.isValid(obj)) ? obj : null;
1306
- };
1307
- /** Returns the component instance that corresponds to the current calendar view. */
1308
- McCalendar.prototype.getCurrentViewComponent = function () {
1309
- return this.monthView || this.yearView || this.multiYearView;
1310
- };
1311
- return McCalendar;
1312
- }());
1313
- /** @nocollapse */ McCalendar.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: McCalendar, deps: [{ token: McDatepickerIntl }, { token: i1__namespace$1.DateAdapter, optional: true }, { token: i1$1.MC_DATE_FORMATS, optional: true }, { token: i0__namespace.ChangeDetectorRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
1314
- /** @nocollapse */ McCalendar.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.5", type: McCalendar, selector: "mc-calendar", inputs: { startAt: "startAt", selected: "selected", minDate: "minDate", maxDate: "maxDate", headerComponent: "headerComponent", startView: "startView", dateFilter: "dateFilter", dateClass: "dateClass" }, outputs: { selectedChange: "selectedChange", yearSelected: "yearSelected", monthSelected: "monthSelected", userSelection: "userSelection" }, host: { classAttribute: "mc-calendar" }, viewQueries: [{ propertyName: "monthView", first: true, predicate: McMonthView, descendants: true }, { propertyName: "yearView", first: true, predicate: McYearView, descendants: true }, { propertyName: "multiYearView", first: true, predicate: McMultiYearView, descendants: true }], exportAs: ["mcCalendar"], usesOnChanges: true, ngImport: i0__namespace, template: "<ng-template [cdkPortalOutlet]=\"calendarHeaderPortal\"></ng-template>\n\n<div class=\"mc-calendar__content\" [ngSwitch]=\"currentView\">\n <mc-month-view\n *ngSwitchCase=\"'month'\"\n [(activeDate)]=\"activeDate\"\n [selected]=\"selected\"\n [dateFilter]=\"dateFilter\"\n [maxDate]=\"maxDate\"\n [minDate]=\"minDate\"\n [dateClass]=\"dateClass\"\n (selectedChange)=\"dateSelected($event)\"\n (userSelection)=\"userSelected()\">\n </mc-month-view>\n\n <mc-year-view\n *ngSwitchCase=\"'year'\"\n [(activeDate)]=\"activeDate\"\n [selected]=\"selected\"\n [dateFilter]=\"dateFilter\"\n [maxDate]=\"maxDate\"\n [minDate]=\"minDate\"\n (monthSelected)=\"monthSelectedInYearView($event)\"\n (selectedChange)=\"goToDateInView($event, 'multi-year')\">\n </mc-year-view>\n\n <mc-multi-year-view\n *ngSwitchCase=\"'multi-year'\"\n [(activeDate)]=\"activeDate\"\n [selected]=\"selected\"\n [dateFilter]=\"dateFilter\"\n [maxDate]=\"maxDate\"\n [minDate]=\"minDate\"\n (yearSelected)=\"yearSelectedInMultiYearView($event)\"\n (selectedChange)=\"goToDateInView($event, 'month')\">\n </mc-multi-year-view>\n</div>\n", styles: [".mc-calendar{display:block}.mc-calendar-header{display:flex;padding:16px 8px 12px;padding:var(--mc-datepicker-calendar-size-padding-top, 16px) var(--mc-datepicker-calendar-size-padding-horizontal, 8px) var(--mc-datepicker-calendar-size-padding-blocks, 12px) var(--mc-datepicker-calendar-size-padding-horizontal, 8px)}.mc-calendar__content{padding:0 8px 8px;padding:0 var(--mc-datepicker-calendar-size-padding-horizontal, 8px) var(--mc-datepicker-calendar-size-padding-horizontal, 8px) var(--mc-datepicker-calendar-size-padding-horizontal, 8px);outline:none}.mc-calendar-spacer{flex:1 1 auto}.mc-calendar__period-button{min-width:0}.mc-calendar__period-button .mc-icon{vertical-align:baseline}.mc-calendar__previous-button:after{border-left-width:2px;border-left-width:var(--mc-datepicker-calendar-size-icon-border-width, 2px);transform:translate(2px) rotate(-45deg);transform:var(--mc-datepicker-calendar-size-icon-prev-icon-transform, translateX(2px) rotate(-45deg))}.mc-calendar__next-button:after{border-right-width:2px;border-right-width:var(--mc-datepicker-calendar-size-icon-border-width, 2px);transform:translate(-2px) rotate(45deg);transform:var(--mc-datepicker-calendar-size-icon-nex-icon-transform, translateX(-2px) rotate(45deg))}.mc-calendar__table{border-spacing:0;border-collapse:collapse;width:100%}.mc-calendar__table-header th{text-align:center;height:30px}.mc-calendar__table-header th.mc-calendar__table-header-divider{position:relative;height:calc(12px - 2px);height:calc(var(--mc-datepicker-calendar-size-padding-blocks, 12px) - 2px)}.mc-calendar__table-header th.mc-calendar__table-header-divider:after{content:\"\";position:absolute;top:0;left:calc(-1 * 8px);left:calc(-1 * var(--mc-datepicker-calendar-size-padding-horizontal, 8px));right:calc(-1 * 8px);right:calc(-1 * var(--mc-datepicker-calendar-size-padding-horizontal, 8px));height:1px;height:var(--mc-datepicker-calendar-size-divider-width, 1px)}\n"], components: [{ type: McMonthView, selector: "mc-month-view", inputs: ["activeDate", "selected", "minDate", "maxDate", "dateFilter", "dateClass"], outputs: ["selectedChange", "userSelection", "activeDateChange"], exportAs: ["mcMonthView"] }, { type: McYearView, selector: "mc-year-view", inputs: ["activeDate", "selected", "minDate", "maxDate", "dateFilter"], outputs: ["selectedChange", "monthSelected", "activeDateChange"], exportAs: ["mcYearView"] }, { type: McMultiYearView, selector: "mc-multi-year-view", inputs: ["activeDate", "selected", "minDate", "maxDate", "dateFilter"], outputs: ["selectedChange", "yearSelected", "activeDateChange"], exportAs: ["mcMultiYearView"] }], directives: [{ type: i8__namespace.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }, { type: i1__namespace.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i1__namespace.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush, encapsulation: i0__namespace.ViewEncapsulation.None });
1315
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: McCalendar, decorators: [{
1316
- type: i0.Component,
1317
- args: [{
1318
- selector: 'mc-calendar',
1319
- exportAs: 'mcCalendar',
1320
- templateUrl: 'calendar.html',
1321
- styleUrls: ['calendar.scss'],
1322
- host: {
1323
- class: 'mc-calendar'
1324
- },
1325
- encapsulation: i0.ViewEncapsulation.None,
1326
- changeDetection: i0.ChangeDetectionStrategy.OnPush
1327
- }]
1328
- }], ctorParameters: function () {
1329
- return [{ type: McDatepickerIntl }, { type: i1__namespace$1.DateAdapter, decorators: [{
1330
- type: i0.Optional
1331
- }] }, { type: undefined, decorators: [{
1332
- type: i0.Optional
1333
- }, {
1334
- type: i0.Inject,
1335
- args: [i1$1.MC_DATE_FORMATS]
1336
- }] }, { type: i0__namespace.ChangeDetectorRef }];
1337
- }, propDecorators: { startAt: [{
1338
- type: i0.Input
1339
- }], selected: [{
1340
- type: i0.Input
1341
- }], minDate: [{
1342
- type: i0.Input
1343
- }], maxDate: [{
1344
- type: i0.Input
1345
- }], headerComponent: [{
1346
- type: i0.Input
1347
- }], startView: [{
1348
- type: i0.Input
1349
- }], dateFilter: [{
1350
- type: i0.Input
1351
- }], dateClass: [{
1352
- type: i0.Input
1353
- }], selectedChange: [{
1354
- type: i0.Output
1355
- }], yearSelected: [{
1356
- type: i0.Output
1357
- }], monthSelected: [{
1358
- type: i0.Output
1359
- }], userSelection: [{
1360
- type: i0.Output
1361
- }], monthView: [{
1362
- type: i0.ViewChild,
1363
- args: [McMonthView, { static: false }]
1364
- }], yearView: [{
1365
- type: i0.ViewChild,
1366
- args: [McYearView, { static: false }]
1367
- }], multiYearView: [{
1368
- type: i0.ViewChild,
1369
- args: [McMultiYearView, { static: false }]
1370
- }] } });
1371
-
1372
- /*! *****************************************************************************
1373
- Copyright (c) Microsoft Corporation.
1374
-
1375
- Permission to use, copy, modify, and/or distribute this software for any
1376
- purpose with or without fee is hereby granted.
1377
-
1378
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
1379
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
1380
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
1381
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
1382
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
1383
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
1384
- PERFORMANCE OF THIS SOFTWARE.
1385
- ***************************************************************************** */
1386
- /* global Reflect, Promise */
1387
- var extendStatics = function (d, b) {
1388
- extendStatics = Object.setPrototypeOf ||
1389
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
1390
- function (d, b) { for (var p in b)
1391
- if (Object.prototype.hasOwnProperty.call(b, p))
1392
- d[p] = b[p]; };
1393
- return extendStatics(d, b);
1394
- };
1395
- function __extends(d, b) {
1396
- if (typeof b !== "function" && b !== null)
1397
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
1398
- extendStatics(d, b);
1399
- function __() { this.constructor = d; }
1400
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
1401
- }
1402
- var __assign = function () {
1403
- __assign = Object.assign || function __assign(t) {
1404
- for (var s, i = 1, n = arguments.length; i < n; i++) {
1405
- s = arguments[i];
1406
- for (var p in s)
1407
- if (Object.prototype.hasOwnProperty.call(s, p))
1408
- t[p] = s[p];
1409
- }
1410
- return t;
1411
- };
1412
- return __assign.apply(this, arguments);
1413
- };
1414
- function __rest(s, e) {
1415
- var t = {};
1416
- for (var p in s)
1417
- if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
1418
- t[p] = s[p];
1419
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
1420
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
1421
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
1422
- t[p[i]] = s[p[i]];
1423
- }
1424
- return t;
1425
- }
1426
- function __decorate(decorators, target, key, desc) {
1427
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
1428
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
1429
- r = Reflect.decorate(decorators, target, key, desc);
1430
- else
1431
- for (var i = decorators.length - 1; i >= 0; i--)
1432
- if (d = decorators[i])
1433
- r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
1434
- return c > 3 && r && Object.defineProperty(target, key, r), r;
1435
- }
1436
- function __param(paramIndex, decorator) {
1437
- return function (target, key) { decorator(target, key, paramIndex); };
1438
- }
1439
- function __metadata(metadataKey, metadataValue) {
1440
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
1441
- return Reflect.metadata(metadataKey, metadataValue);
1442
- }
1443
- function __awaiter(thisArg, _arguments, P, generator) {
1444
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
1445
- return new (P || (P = Promise))(function (resolve, reject) {
1446
- function fulfilled(value) { try {
1447
- step(generator.next(value));
1448
- }
1449
- catch (e) {
1450
- reject(e);
1451
- } }
1452
- function rejected(value) { try {
1453
- step(generator["throw"](value));
1454
- }
1455
- catch (e) {
1456
- reject(e);
1457
- } }
1458
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
1459
- step((generator = generator.apply(thisArg, _arguments || [])).next());
1460
- });
1461
- }
1462
- function __generator(thisArg, body) {
1463
- var _ = { label: 0, sent: function () { if (t[0] & 1)
1464
- throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
1465
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
1466
- function verb(n) { return function (v) { return step([n, v]); }; }
1467
- function step(op) {
1468
- if (f)
1469
- throw new TypeError("Generator is already executing.");
1470
- while (_)
1471
- try {
1472
- 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)
1473
- return t;
1474
- if (y = 0, t)
1475
- op = [op[0] & 2, t.value];
1476
- switch (op[0]) {
1477
- case 0:
1478
- case 1:
1479
- t = op;
1480
- break;
1481
- case 4:
1482
- _.label++;
1483
- return { value: op[1], done: false };
1484
- case 5:
1485
- _.label++;
1486
- y = op[1];
1487
- op = [0];
1488
- continue;
1489
- case 7:
1490
- op = _.ops.pop();
1491
- _.trys.pop();
1492
- continue;
1493
- default:
1494
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
1495
- _ = 0;
1496
- continue;
1497
- }
1498
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
1499
- _.label = op[1];
1500
- break;
1501
- }
1502
- if (op[0] === 6 && _.label < t[1]) {
1503
- _.label = t[1];
1504
- t = op;
1505
- break;
1506
- }
1507
- if (t && _.label < t[2]) {
1508
- _.label = t[2];
1509
- _.ops.push(op);
1510
- break;
1511
- }
1512
- if (t[2])
1513
- _.ops.pop();
1514
- _.trys.pop();
1515
- continue;
1516
- }
1517
- op = body.call(thisArg, _);
1518
- }
1519
- catch (e) {
1520
- op = [6, e];
1521
- y = 0;
1522
- }
1523
- finally {
1524
- f = t = 0;
1525
- }
1526
- if (op[0] & 5)
1527
- throw op[1];
1528
- return { value: op[0] ? op[1] : void 0, done: true };
1529
- }
1530
- }
1531
- var __createBinding = Object.create ? (function (o, m, k, k2) {
1532
- if (k2 === undefined)
1533
- k2 = k;
1534
- Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
1535
- }) : (function (o, m, k, k2) {
1536
- if (k2 === undefined)
1537
- k2 = k;
1538
- o[k2] = m[k];
1539
- });
1540
- function __exportStar(m, o) {
1541
- for (var p in m)
1542
- if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
1543
- __createBinding(o, m, p);
1544
- }
1545
- function __values(o) {
1546
- var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
1547
- if (m)
1548
- return m.call(o);
1549
- if (o && typeof o.length === "number")
1550
- return {
1551
- next: function () {
1552
- if (o && i >= o.length)
1553
- o = void 0;
1554
- return { value: o && o[i++], done: !o };
1555
- }
1556
- };
1557
- throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
1558
- }
1559
- function __read(o, n) {
1560
- var m = typeof Symbol === "function" && o[Symbol.iterator];
1561
- if (!m)
1562
- return o;
1563
- var i = m.call(o), r, ar = [], e;
1564
- try {
1565
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
1566
- ar.push(r.value);
1567
- }
1568
- catch (error) {
1569
- e = { error: error };
1570
- }
1571
- finally {
1572
- try {
1573
- if (r && !r.done && (m = i["return"]))
1574
- m.call(i);
1575
- }
1576
- finally {
1577
- if (e)
1578
- throw e.error;
1579
- }
1580
- }
1581
- return ar;
1582
- }
1583
- /** @deprecated */
1584
- function __spread() {
1585
- for (var ar = [], i = 0; i < arguments.length; i++)
1586
- ar = ar.concat(__read(arguments[i]));
1587
- return ar;
1588
- }
1589
- /** @deprecated */
1590
- function __spreadArrays() {
1591
- for (var s = 0, i = 0, il = arguments.length; i < il; i++)
1592
- s += arguments[i].length;
1593
- for (var r = Array(s), k = 0, i = 0; i < il; i++)
1594
- for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
1595
- r[k] = a[j];
1596
- return r;
1597
- }
1598
- function __spreadArray(to, from, pack) {
1599
- if (pack || arguments.length === 2)
1600
- for (var i = 0, l = from.length, ar; i < l; i++) {
1601
- if (ar || !(i in from)) {
1602
- if (!ar)
1603
- ar = Array.prototype.slice.call(from, 0, i);
1604
- ar[i] = from[i];
1605
- }
1606
- }
1607
- return to.concat(ar || Array.prototype.slice.call(from));
1608
- }
1609
- function __await(v) {
1610
- return this instanceof __await ? (this.v = v, this) : new __await(v);
1611
- }
1612
- function __asyncGenerator(thisArg, _arguments, generator) {
1613
- if (!Symbol.asyncIterator)
1614
- throw new TypeError("Symbol.asyncIterator is not defined.");
1615
- var g = generator.apply(thisArg, _arguments || []), i, q = [];
1616
- return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
1617
- function verb(n) { if (g[n])
1618
- i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
1619
- function resume(n, v) { try {
1620
- step(g[n](v));
1621
- }
1622
- catch (e) {
1623
- settle(q[0][3], e);
1624
- } }
1625
- function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
1626
- function fulfill(value) { resume("next", value); }
1627
- function reject(value) { resume("throw", value); }
1628
- function settle(f, v) { if (f(v), q.shift(), q.length)
1629
- resume(q[0][0], q[0][1]); }
1630
- }
1631
- function __asyncDelegator(o) {
1632
- var i, p;
1633
- return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
1634
- 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; }
1635
- }
1636
- function __asyncValues(o) {
1637
- if (!Symbol.asyncIterator)
1638
- throw new TypeError("Symbol.asyncIterator is not defined.");
1639
- var m = o[Symbol.asyncIterator], i;
1640
- 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);
1641
- 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); }); }; }
1642
- function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
1643
- }
1644
- function __makeTemplateObject(cooked, raw) {
1645
- if (Object.defineProperty) {
1646
- Object.defineProperty(cooked, "raw", { value: raw });
1647
- }
1648
- else {
1649
- cooked.raw = raw;
1650
- }
1651
- return cooked;
1652
- }
1653
- ;
1654
- var __setModuleDefault = Object.create ? (function (o, v) {
1655
- Object.defineProperty(o, "default", { enumerable: true, value: v });
1656
- }) : function (o, v) {
1657
- o["default"] = v;
1658
- };
1659
- function __importStar(mod) {
1660
- if (mod && mod.__esModule)
1661
- return mod;
1662
- var result = {};
1663
- if (mod != null)
1664
- for (var k in mod)
1665
- if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
1666
- __createBinding(result, mod, k);
1667
- __setModuleDefault(result, mod);
1668
- return result;
1669
- }
1670
- function __importDefault(mod) {
1671
- return (mod && mod.__esModule) ? mod : { default: mod };
1672
- }
1673
- function __classPrivateFieldGet(receiver, state, kind, f) {
1674
- if (kind === "a" && !f)
1675
- throw new TypeError("Private accessor was defined without a getter");
1676
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
1677
- throw new TypeError("Cannot read private member from an object whose class did not declare it");
1678
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
1679
- }
1680
- function __classPrivateFieldSet(receiver, state, value, kind, f) {
1681
- if (kind === "m")
1682
- throw new TypeError("Private method is not writable");
1683
- if (kind === "a" && !f)
1684
- throw new TypeError("Private accessor was defined without a setter");
1685
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
1686
- throw new TypeError("Cannot write private member to an object whose class did not declare it");
1687
- return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
1688
- }
1689
-
1690
- // tslint:disable:naming-convention
1691
- var DateParts;
1692
- (function (DateParts) {
1693
- DateParts["year"] = "y";
1694
- DateParts["month"] = "m";
1695
- DateParts["day"] = "d";
1696
- })(DateParts || (DateParts = {}));
1697
- var MAX_YEAR = 9999;
1698
- var DateDigit = /** @class */ (function () {
1699
- function DateDigit(value, start, length) {
1700
- this.value = value;
1701
- this.start = start;
1702
- this.length = length;
1703
- this.maxDays = 31;
1704
- this.maxMonth = 12;
1705
- if (value === DateParts.day) {
1706
- this.parse = this.parseDay;
1707
- }
1708
- else if (value === DateParts.month) {
1709
- this.parse = this.parseMonth;
1710
- }
1711
- else if (value === DateParts.year) {
1712
- this.parse = this.parseYear;
1713
- }
1714
- }
1715
- Object.defineProperty(DateDigit.prototype, "end", {
1716
- get: function () {
1717
- return this.start + this.length;
1718
- },
1719
- enumerable: false,
1720
- configurable: true
1721
- });
1722
- Object.defineProperty(DateDigit.prototype, "isDay", {
1723
- get: function () {
1724
- return this.value === DateParts.day;
1725
- },
1726
- enumerable: false,
1727
- configurable: true
1728
- });
1729
- Object.defineProperty(DateDigit.prototype, "isMonth", {
1730
- get: function () {
1731
- return this.value === DateParts.month;
1732
- },
1733
- enumerable: false,
1734
- configurable: true
1735
- });
1736
- Object.defineProperty(DateDigit.prototype, "isYear", {
1737
- get: function () {
1738
- return this.value === DateParts.year;
1739
- },
1740
- enumerable: false,
1741
- configurable: true
1742
- });
1743
- Object.defineProperty(DateDigit.prototype, "fullName", {
1744
- get: function () {
1745
- if (this.isDay) {
1746
- return 'date';
1747
- }
1748
- if (this.isMonth) {
1749
- return 'month';
1750
- }
1751
- if (this.isYear) {
1752
- return 'year';
1753
- }
1754
- },
1755
- enumerable: false,
1756
- configurable: true
1757
- });
1758
- DateDigit.prototype.parseDay = function (value) {
1759
- var parsedValue = parseInt(value);
1760
- if (parsedValue === 0) {
1761
- return 1;
1762
- }
1763
- if (parsedValue > this.maxDays) {
1764
- return this.maxDays;
1765
- }
1766
- return parsedValue;
1767
- };
1768
- DateDigit.prototype.parseMonth = function (value) {
1769
- var parsedValue = parseInt(value);
1770
- if (parsedValue === 0) {
1771
- return 1;
1772
- }
1773
- if (parsedValue > this.maxMonth) {
1774
- return this.maxMonth;
1775
- }
1776
- return parsedValue;
1777
- };
1778
- DateDigit.prototype.parseYear = function (value) {
1779
- var parsedValue = parseInt(value);
1780
- if (parsedValue === 0) {
1781
- return 1;
1782
- }
1783
- if (parsedValue > MAX_YEAR) {
1784
- return MAX_YEAR;
1785
- }
1786
- return parsedValue;
1787
- };
1788
- return DateDigit;
1789
- }());
1790
- /** @docs-private */
1791
- var MC_DATEPICKER_VALUE_ACCESSOR = {
1792
- provide: forms.NG_VALUE_ACCESSOR,
1793
- useExisting: i0.forwardRef(function () { return McDatepickerInput; }),
1794
- multi: true
1795
- };
1796
- /** @docs-private */
1797
- var MC_DATEPICKER_VALIDATORS = {
1798
- provide: forms.NG_VALIDATORS,
1799
- useExisting: i0.forwardRef(function () { return McDatepickerInput; }),
1800
- multi: true
1801
- };
1802
- /**
1803
- * An event used for datepicker input and change events. We don't always have access to a native
1804
- * input or change event because the event may have been triggered by the user clicking on the
1805
- * calendar popup. For consistency, we always use McDatepickerInputEvent instead.
1806
- */
1807
- var McDatepickerInputEvent = /** @class */ (function () {
1808
- function McDatepickerInputEvent(
1809
- /** Reference to the datepicker input component that emitted the event. */
1810
- target,
1811
- /** Reference to the native input element associated with the datepicker input. */
1812
- targetElement) {
1813
- this.target = target;
1814
- this.targetElement = targetElement;
1815
- this.value = this.target.value;
1816
- }
1817
- return McDatepickerInputEvent;
1818
- }());
1819
- var uniqueComponentIdSuffix = 0;
1820
- /** Directive used to connect an input to a McDatepicker. */
1821
- var McDatepickerInput = /** @class */ (function () {
1822
- function McDatepickerInput(elementRef, renderer, dateAdapter, dateFormats) {
1823
- var _this = this;
1824
- this.elementRef = elementRef;
1825
- this.renderer = renderer;
1826
- this.dateAdapter = dateAdapter;
1827
- this.dateFormats = dateFormats;
1828
- this.stateChanges = new rxjs.Subject();
1829
- this.controlType = 'datepicker';
1830
- this.focused = false;
1831
- /** Emits when the value changes (either due to user input or programmatic change). */
1832
- this.valueChange = new i0.EventEmitter();
1833
- /** Emits when the disabled state has changed */
1834
- this.disabledChange = new i0.EventEmitter();
1835
- this._disabled = false;
1836
- this.incorrectInput = new i0.EventEmitter();
1837
- /** Emits when a `change` event is fired on this `<input>`. */
1838
- this.dateChange = new i0.EventEmitter();
1839
- /** Emits when an `input` event is fired on this `<input>`. */
1840
- this.dateInput = new i0.EventEmitter();
1841
- this.uid = "mc-datepicker-" + uniqueComponentIdSuffix++;
1842
- this.datepickerSubscription = rxjs.Subscription.EMPTY;
1843
- this.localeSubscription = rxjs.Subscription.EMPTY;
1844
- /** Whether the last value set on the input was valid. */
1845
- this.lastValueValid = false;
1846
- this.onTouched = function () { };
1847
- this.onInput = function () {
1848
- _this.correctCursorPosition();
1849
- var formattedValue = _this.replaceSymbols(_this.viewValue);
1850
- var newTimeObj = _this.getDateFromString(formattedValue);
1851
- _this.lastValueValid = !!newTimeObj;
1852
- if (!newTimeObj) {
1853
- if (!_this.viewValue) {
1854
- _this._value = null;
1855
- _this.cvaOnChange(null);
1856
- }
1857
- _this.control.updateValueAndValidity({ emitEvent: false });
1858
- return;
1859
- }
1860
- _this.setViewValue(_this.getTimeStringFromDate(newTimeObj, _this.dateFormats.dateInput), true);
1861
- _this.selectNextDigitByCursor(_this.selectionStart);
1862
- _this.updateValue(newTimeObj);
1863
- };
1864
- this.parseOnBlur = function () {
1865
- if (!_this.viewValue) {
1866
- return null;
1867
- }
1868
- var date = _this.getDefaultValue();
1869
- var viewDigits = _this.viewValue
1870
- .split(_this.separator)
1871
- .map(function (value) { return value; })
1872
- .filter(function (value) { return value; });
1873
- var _d = __read(viewDigits, 3), firsViewDigit = _d[0], secondViewDigit = _d[1], thirdViewDigit = _d[2];
1874
- // tslint:disable-next-line:no-magic-numbers
1875
- if (viewDigits.length !== 3) {
1876
- _this.lastValueValid = false;
1877
- _this._value = null;
1878
- return setTimeout(function () { return _this.control.updateValueAndValidity(); });
1879
- }
1880
- date[_this.firstDigit.fullName] = _this.firstDigit.parse(firsViewDigit);
1881
- date[_this.secondDigit.fullName] = _this.secondDigit.parse(secondViewDigit);
1882
- date[_this.thirdDigit.fullName] = _this.thirdDigit.parse(thirdViewDigit);
1883
- var _e = __read([_this.firstDigit, _this.secondDigit, _this.thirdDigit]
1884
- .reduce(function (acc, digit, index) { return digit.value === DateParts.year ? [digit, viewDigits[index]] : acc; }, []), 2), digitWithYear = _e[0], viewDigitWithYear = _e[1];
1885
- // tslint:disable-next-line:no-magic-numbers
1886
- if (viewDigitWithYear.length < 3) {
1887
- // tslint:disable-next-line:no-magic-numbers
1888
- date.year += date.year < 30 ? 2000 : 1900;
1889
- }
1890
- else if (viewDigitWithYear.length < digitWithYear.length) {
1891
- _this.lastValueValid = false;
1892
- _this._value = null;
1893
- return setTimeout(function () { return _this.control.updateValueAndValidity(); });
1894
- }
1895
- var newTimeObj = _this.getValidDateOrNull(_this.dateAdapter.createDateTime(date.year, date.month - 1, date.date, date.hours, date.minutes, date.seconds, date.milliseconds));
1896
- _this.lastValueValid = !!newTimeObj;
1897
- _this.setViewValue(_this.getTimeStringFromDate(newTimeObj, _this.dateFormats.dateInput), true);
1898
- _this.updateValue(newTimeObj);
1899
- };
1900
- this.updateLocaleParams = function () {
1901
- _this.setFormat(_this.dateFormats.dateInput);
1902
- _this.value = _this.value;
1903
- };
1904
- this.cvaOnChange = function () { };
1905
- this.validatorOnChange = function () { };
1906
- /** The form control validator for whether the input parses. */
1907
- this.parseValidator = function () {
1908
- return _this.focused ||
1909
- _this.empty ||
1910
- _this.lastValueValid ? null : { mcDatepickerParse: { text: _this.elementRef.nativeElement.value } };
1911
- };
1912
- /** The form control validator for the min date. */
1913
- this.minValidator = function (control) {
1914
- var controlValue = _this.getValidDateOrNull(_this.dateAdapter.deserialize(control.value));
1915
- return (!_this.min || !controlValue ||
1916
- _this.dateAdapter.compareDate(_this.min, controlValue) <= 0) ?
1917
- null : { mcDatepickerMin: { min: _this.min, actual: controlValue } };
1918
- };
1919
- /** The form control validator for the max date. */
1920
- this.maxValidator = function (control) {
1921
- var controlValue = _this.getValidDateOrNull(_this.dateAdapter.deserialize(control.value));
1922
- return (!_this.max || !controlValue ||
1923
- _this.dateAdapter.compareDate(_this.max, controlValue) >= 0) ?
1924
- null : { mcDatepickerMax: { max: _this.max, actual: controlValue } };
1925
- };
1926
- /** The form control validator for the date filter. */
1927
- this.filterValidator = function (control) {
1928
- var controlValue = _this.getValidDateOrNull(_this.dateAdapter.deserialize(control.value));
1929
- return !_this.dateFilter || !controlValue || _this.dateFilter(controlValue) ?
1930
- null : { mcDatepickerFilter: true };
1931
- };
1932
- this.validator = forms.Validators.compose([
1933
- this.parseValidator,
1934
- this.minValidator,
1935
- this.maxValidator,
1936
- this.filterValidator
1937
- ]);
1938
- if (!this.dateAdapter) {
1939
- throw createMissingDateImplError('DateAdapter');
1940
- }
1941
- if (!this.dateFormats) {
1942
- throw createMissingDateImplError('MC_DATE_FORMATS');
1943
- }
1944
- this.setFormat(dateFormats.dateInput);
1945
- this.localeSubscription = dateAdapter.localeChanges
1946
- .subscribe(this.updateLocaleParams);
1947
- }
1948
- Object.defineProperty(McDatepickerInput.prototype, "required", {
1949
- get: function () {
1950
- return this._required;
1951
- },
1952
- set: function (value) {
1953
- this._required = coercion.coerceBooleanProperty(value);
1954
- },
1955
- enumerable: false,
1956
- configurable: true
1957
- });
1958
- Object.defineProperty(McDatepickerInput.prototype, "mcDatepicker", {
1959
- /** The datepicker that this input is associated with. */
1960
- set: function (value) {
1961
- var _this = this;
1962
- if (!value) {
1963
- return;
1964
- }
1965
- this.datepicker = value;
1966
- this.datepicker.registerInput(this);
1967
- this.datepickerSubscription.unsubscribe();
1968
- this.datepickerSubscription = this.datepicker.selectedChanged
1969
- .subscribe(function (selected) {
1970
- _this.value = selected;
1971
- _this.cvaOnChange(selected);
1972
- _this.onTouched();
1973
- _this.dateChange.emit(new McDatepickerInputEvent(_this, _this.elementRef.nativeElement));
1974
- });
1975
- },
1976
- enumerable: false,
1977
- configurable: true
1978
- });
1979
- Object.defineProperty(McDatepickerInput.prototype, "mcDatepickerFilter", {
1980
- /** Function that can be used to filter out dates within the datepicker. */
1981
- set: function (value) {
1982
- this.dateFilter = value;
1983
- this.validatorOnChange();
1984
- },
1985
- enumerable: false,
1986
- configurable: true
1987
- });
1988
- Object.defineProperty(McDatepickerInput.prototype, "value", {
1989
- /** The value of the input. */
1990
- get: function () {
1991
- return this._value;
1992
- },
1993
- set: function (value) {
1994
- var newValue = this.dateAdapter.deserialize(value);
1995
- this.lastValueValid = !newValue || this.dateAdapter.isValid(newValue);
1996
- newValue = this.getValidDateOrNull(newValue);
1997
- var oldDate = this.value;
1998
- this._value = newValue;
1999
- this.formatValue(newValue);
2000
- if (!this.dateAdapter.sameDate(oldDate, newValue)) {
2001
- this.valueChange.emit(newValue);
2002
- }
2003
- },
2004
- enumerable: false,
2005
- configurable: true
2006
- });
2007
- Object.defineProperty(McDatepickerInput.prototype, "min", {
2008
- /** The minimum valid date. */
2009
- get: function () {
2010
- return this._min;
2011
- },
2012
- set: function (value) {
2013
- this._min = this.getValidDateOrNull(this.dateAdapter.deserialize(value));
2014
- this.validatorOnChange();
2015
- },
2016
- enumerable: false,
2017
- configurable: true
2018
- });
2019
- Object.defineProperty(McDatepickerInput.prototype, "max", {
2020
- /** The maximum valid date. */
2021
- get: function () {
2022
- return this._max;
2023
- },
2024
- set: function (value) {
2025
- this._max = this.getValidDateOrNull(this.dateAdapter.deserialize(value));
2026
- this.validatorOnChange();
2027
- },
2028
- enumerable: false,
2029
- configurable: true
2030
- });
2031
- Object.defineProperty(McDatepickerInput.prototype, "disabled", {
2032
- /** Whether the datepicker-input is disabled. */
2033
- get: function () {
2034
- return this._disabled;
2035
- },
2036
- set: function (value) {
2037
- var newValue = coercion.coerceBooleanProperty(value);
2038
- var element = this.elementRef.nativeElement;
2039
- if (this._disabled !== newValue) {
2040
- this._disabled = newValue;
2041
- this.disabledChange.emit(newValue);
2042
- }
2043
- // We need to null check the `blur` method, because it's undefined during SSR.
2044
- if (newValue && element.blur) {
2045
- // Normally, native input elements automatically blur if they turn disabled. This behavior
2046
- // is problematic, because it would mean that it triggers another change detection cycle,
2047
- // which then causes a changed after checked error if the input element was focused before.
2048
- element.blur();
2049
- }
2050
- },
2051
- enumerable: false,
2052
- configurable: true
2053
- });
2054
- Object.defineProperty(McDatepickerInput.prototype, "id", {
2055
- get: function () {
2056
- return this._id;
2057
- },
2058
- set: function (value) {
2059
- this._id = value || this.uid;
2060
- },
2061
- enumerable: false,
2062
- configurable: true
2063
- });
2064
- Object.defineProperty(McDatepickerInput.prototype, "mcValidationTooltip", {
2065
- set: function (tooltip) {
2066
- if (!tooltip) {
2067
- return;
2068
- }
2069
- tooltip.enterDelay = core.validationTooltipShowDelay;
2070
- tooltip.trigger = 'manual';
2071
- tooltip.initListeners();
2072
- this.incorrectInput.subscribe(function () {
2073
- if (tooltip.isOpen) {
2074
- return;
2075
- }
2076
- tooltip.show();
2077
- setTimeout(function () { return tooltip.hide(); }, core.validationTooltipHideDelay);
2078
- });
2079
- },
2080
- enumerable: false,
2081
- configurable: true
2082
- });
2083
- Object.defineProperty(McDatepickerInput.prototype, "empty", {
2084
- get: function () {
2085
- return !this.viewValue && !this.isBadInput();
2086
- },
2087
- enumerable: false,
2088
- configurable: true
2089
- });
2090
- Object.defineProperty(McDatepickerInput.prototype, "viewValue", {
2091
- get: function () {
2092
- return this.elementRef.nativeElement.value;
2093
- },
2094
- enumerable: false,
2095
- configurable: true
2096
- });
2097
- Object.defineProperty(McDatepickerInput.prototype, "ngControl", {
2098
- get: function () {
2099
- return this.control;
2100
- },
2101
- enumerable: false,
2102
- configurable: true
2103
- });
2104
- Object.defineProperty(McDatepickerInput.prototype, "isReadOnly", {
2105
- get: function () {
2106
- return this.elementRef.nativeElement.readOnly;
2107
- },
2108
- enumerable: false,
2109
- configurable: true
2110
- });
2111
- Object.defineProperty(McDatepickerInput.prototype, "selectionStart", {
2112
- get: function () {
2113
- return this.elementRef.nativeElement.selectionStart;
2114
- },
2115
- set: function (value) {
2116
- this.elementRef.nativeElement.selectionStart = value;
2117
- },
2118
- enumerable: false,
2119
- configurable: true
2120
- });
2121
- Object.defineProperty(McDatepickerInput.prototype, "selectionEnd", {
2122
- get: function () {
2123
- return this.elementRef.nativeElement.selectionEnd;
2124
- },
2125
- set: function (value) {
2126
- this.elementRef.nativeElement.selectionEnd = value;
2127
- },
2128
- enumerable: false,
2129
- configurable: true
2130
- });
2131
- McDatepickerInput.prototype.onContainerClick = function () {
2132
- this.focus();
2133
- };
2134
- McDatepickerInput.prototype.focus = function () {
2135
- this.elementRef.nativeElement.focus();
2136
- };
2137
- McDatepickerInput.prototype.focusChanged = function (isFocused) {
2138
- if (isFocused !== this.focused) {
2139
- this.focused = isFocused;
2140
- this.onTouched();
2141
- this.stateChanges.next();
2142
- }
2143
- };
2144
- McDatepickerInput.prototype.ngOnDestroy = function () {
2145
- this.datepickerSubscription.unsubscribe();
2146
- this.localeSubscription.unsubscribe();
2147
- this.valueChange.complete();
2148
- this.disabledChange.complete();
2149
- };
2150
- /** @docs-private */
2151
- McDatepickerInput.prototype.registerOnValidatorChange = function (fn) {
2152
- this.validatorOnChange = fn;
2153
- };
2154
- /** @docs-private */
2155
- McDatepickerInput.prototype.validate = function (control) {
2156
- this.setControl(control);
2157
- return this.validator ? this.validator(control) : null;
2158
- };
2159
- // Implemented as part of ControlValueAccessor.
2160
- McDatepickerInput.prototype.writeValue = function (value) {
2161
- this.value = value;
2162
- };
2163
- // Implemented as part of ControlValueAccessor.
2164
- McDatepickerInput.prototype.registerOnChange = function (fn) {
2165
- this.cvaOnChange = fn;
2166
- };
2167
- // Implemented as part of ControlValueAccessor.
2168
- McDatepickerInput.prototype.registerOnTouched = function (fn) {
2169
- this.onTouched = fn;
2170
- };
2171
- // Implemented as part of ControlValueAccessor.
2172
- McDatepickerInput.prototype.setDisabledState = function (isDisabled) {
2173
- this.disabled = isDisabled;
2174
- };
2175
- McDatepickerInput.prototype.onKeyDown = function (event) {
2176
- var _a;
2177
- if (this.isReadOnly) {
2178
- return;
2179
- }
2180
- // tslint:disable-next-line: deprecation
2181
- var keyCode = event.keyCode;
2182
- if (this.isLetterKey(event)) {
2183
- event.preventDefault();
2184
- this.incorrectInput.emit();
2185
- }
2186
- else if (this.isKeyForOpen(event)) {
2187
- event.preventDefault();
2188
- (_a = this.datepicker) === null || _a === void 0 ? void 0 : _a.open();
2189
- }
2190
- else if (this.isKeyForClose(event)) {
2191
- event.preventDefault();
2192
- this.datepicker.close();
2193
- }
2194
- else if (keyCode === keycodes.TAB) {
2195
- this.datepicker.close(false);
2196
- }
2197
- else if (this.isKeyForByPass(event)) {
2198
- return;
2199
- }
2200
- else if (keyCode === keycodes.SPACE) {
2201
- this.spaceKeyHandler(event);
2202
- }
2203
- else if ([keycodes.UP_ARROW, keycodes.DOWN_ARROW].includes(keyCode)) {
2204
- event.preventDefault();
2205
- this.verticalArrowKeyHandler(keyCode);
2206
- }
2207
- else if ([keycodes.LEFT_ARROW, keycodes.RIGHT_ARROW, keycodes.HOME, keycodes.PAGE_UP, keycodes.END, keycodes.PAGE_DOWN].includes(keyCode)) {
2208
- event.preventDefault();
2209
- this.changeCaretPosition(keyCode);
2210
- }
2211
- else if (/^\D$/.test(event.key)) {
2212
- event.preventDefault();
2213
- var newValue = this.getNewValue(event.key, this.selectionStart);
2214
- var formattedValue = this.replaceSymbols(newValue);
2215
- if (newValue !== formattedValue) {
2216
- this.setViewValue(formattedValue, true);
2217
- setTimeout(this.onInput);
2218
- }
2219
- else {
2220
- this.incorrectInput.emit();
2221
- }
2222
- }
2223
- else {
2224
- setTimeout(this.onInput);
2225
- }
2226
- };
2227
- McDatepickerInput.prototype.onChange = function () {
2228
- this.dateChange.emit(new McDatepickerInputEvent(this, this.elementRef.nativeElement));
2229
- };
2230
- /** Handles blur events on the input. */
2231
- McDatepickerInput.prototype.onBlur = function () {
2232
- // Reformat the input only if we have a valid value.
2233
- this.parseOnBlur();
2234
- this.focusChanged(false);
2235
- };
2236
- McDatepickerInput.prototype.onPaste = function ($event) {
2237
- var _a, _b, _c;
2238
- $event.preventDefault();
2239
- var rawValue = $event.clipboardData.getData('text');
2240
- var match = rawValue.match(/^(?<first>\d+)\W(?<second>\d+)\W(?<third>\d+)$/);
2241
- if (!((_a = match === null || match === void 0 ? void 0 : match.groups) === null || _a === void 0 ? void 0 : _a.first) || !((_b = match === null || match === void 0 ? void 0 : match.groups) === null || _b === void 0 ? void 0 : _b.second) || !((_c = match === null || match === void 0 ? void 0 : match.groups) === null || _c === void 0 ? void 0 : _c.third)) {
2242
- this.setViewValue(rawValue);
2243
- return rawValue;
2244
- }
2245
- var value = [match.groups.first, match.groups.second, match.groups.third].join(this.separator);
2246
- var newTimeObj = this.getDateFromString(value);
2247
- if (!newTimeObj) {
2248
- this.setViewValue(value);
2249
- return value;
2250
- }
2251
- this.setViewValue(this.getTimeStringFromDate(newTimeObj, this.dateFormats.dateInput));
2252
- this.updateValue(newTimeObj);
2253
- };
2254
- McDatepickerInput.prototype.toISO8601 = function (value) {
2255
- return this.dateAdapter.toIso8601(value);
2256
- };
2257
- McDatepickerInput.prototype.setFormat = function (format) {
2258
- var _this = this;
2259
- this.separator = format.match(/[aA-zZ]+(?<separator>\W|\D)[aA-zZ]+/).groups.separator;
2260
- this.separatorPositions = format
2261
- .split('')
2262
- .reduce(function (acc, item, index) { return _this.separator === item ? __spreadArray(__spreadArray([], __read(acc)), [index + 1]) : acc; }, []);
2263
- this.getDigitPositions(format);
2264
- };
2265
- McDatepickerInput.prototype.updateValue = function (newValue) {
2266
- if (!this.dateAdapter.sameDate(newValue, this.value)) {
2267
- this._value = newValue;
2268
- this.cvaOnChange(newValue);
2269
- this.valueChange.emit(newValue);
2270
- this.dateInput.emit(new McDatepickerInputEvent(this, this.elementRef.nativeElement));
2271
- }
2272
- this.control.updateValueAndValidity({ emitEvent: false });
2273
- };
2274
- McDatepickerInput.prototype.isKeyForClose = function (event) {
2275
- // tslint:disable-next-line: deprecation
2276
- return (event.altKey && event.keyCode === keycodes.UP_ARROW) || event.keyCode === keycodes.ESCAPE;
2277
- };
2278
- McDatepickerInput.prototype.isKeyForOpen = function (event) {
2279
- // tslint:disable-next-line: deprecation
2280
- return event.altKey && event.keyCode === keycodes.DOWN_ARROW;
2281
- };
2282
- McDatepickerInput.prototype.isLetterKey = function (event) {
2283
- return keycodes.isLetterKey(event) && !event.ctrlKey && !event.metaKey;
2284
- };
2285
- McDatepickerInput.prototype.isKeyForByPass = function (event) {
2286
- // tslint:disable-next-line: deprecation
2287
- return (keycodes.hasModifierKey(event) && (keycodes.isVerticalMovement(event.keyCode) || keycodes.isHorizontalMovement(event.keyCode))) ||
2288
- event.ctrlKey ||
2289
- event.metaKey;
2290
- };
2291
- McDatepickerInput.prototype.spaceKeyHandler = function (event) {
2292
- event.preventDefault();
2293
- if (this.selectionStart === this.selectionEnd) {
2294
- var value = this.getNewValue(event.key, this.selectionStart);
2295
- this.setViewValue(value);
2296
- setTimeout(this.onInput);
2297
- }
2298
- else if (this.selectionStart !== this.selectionEnd) {
2299
- this.selectNextDigit(this.selectionStart, true);
2300
- }
2301
- };
2302
- McDatepickerInput.prototype.getNewValue = function (key, position) {
2303
- return [this.viewValue.slice(0, position), key, this.viewValue.slice(position)].join('');
2304
- };
2305
- McDatepickerInput.prototype.setViewValue = function (value, savePosition) {
2306
- if (savePosition === void 0) { savePosition = false; }
2307
- if (savePosition) {
2308
- var selectionStart = this.selectionStart;
2309
- var selectionEnd = this.selectionEnd;
2310
- this.renderer.setProperty(this.elementRef.nativeElement, 'value', value);
2311
- this.selectionStart = selectionStart;
2312
- this.selectionEnd = selectionEnd;
2313
- }
2314
- else {
2315
- this.renderer.setProperty(this.elementRef.nativeElement, 'value', value);
2316
- }
2317
- };
2318
- McDatepickerInput.prototype.replaceSymbols = function (value) {
2319
- return value
2320
- .split(this.separator)
2321
- .map(function (part) { return part.replace(/^([0-9]+)\W$/, '0$1'); })
2322
- .join(this.separator);
2323
- };
2324
- McDatepickerInput.prototype.getDateFromString = function (timeString) {
2325
- if (!timeString || timeString.length < this.firstDigit.length) {
2326
- return null;
2327
- }
2328
- var date = this.getDefaultValue();
2329
- var viewDigits = timeString
2330
- .split(this.separator)
2331
- .map(function (value) { return value; });
2332
- var _d = __read(viewDigits, 3), firsViewDigit = _d[0], secondViewDigit = _d[1], thirdViewDigit = _d[2];
2333
- if (viewDigits.length === 1) {
2334
- if (firsViewDigit.length < this.firstDigit.length) {
2335
- return null;
2336
- }
2337
- date[this.firstDigit.fullName] = this.firstDigit.parse(firsViewDigit);
2338
- date.month = 1;
2339
- // tslint:disable-next-line:no-magic-numbers
2340
- }
2341
- else if (viewDigits.length === 2) {
2342
- if (firsViewDigit.length < this.firstDigit.length || secondViewDigit.length < this.secondDigit.length) {
2343
- return null;
2344
- }
2345
- date[this.firstDigit.fullName] = this.firstDigit.parse(firsViewDigit);
2346
- date[this.secondDigit.fullName] = this.secondDigit.parse(secondViewDigit);
2347
- // tslint:disable-next-line:no-magic-numbers
2348
- }
2349
- else if (viewDigits.length === 3) {
2350
- if (firsViewDigit.length < this.firstDigit.length ||
2351
- secondViewDigit.length < this.secondDigit.length ||
2352
- thirdViewDigit.length < this.thirdDigit.length) {
2353
- return null;
2354
- }
2355
- date[this.firstDigit.fullName] = this.firstDigit.parse(firsViewDigit);
2356
- date[this.secondDigit.fullName] = this.secondDigit.parse(secondViewDigit);
2357
- date[this.thirdDigit.fullName] = this.thirdDigit.parse(thirdViewDigit);
2358
- }
2359
- else {
2360
- return null;
2361
- }
2362
- return this.getValidDateOrNull(this.dateAdapter.createDateTime(date.year, date.month - 1, date.date, date.hours, date.minutes, date.seconds, date.milliseconds));
2363
- };
2364
- McDatepickerInput.prototype.getDefaultValue = function () {
2365
- var defaultValue = this.value || this.dateAdapter.today();
2366
- return {
2367
- year: this.dateAdapter.getYear(defaultValue),
2368
- month: this.dateAdapter.getMonth(defaultValue),
2369
- date: this.dateAdapter.getDate(defaultValue),
2370
- hours: this.dateAdapter.getHours(defaultValue),
2371
- minutes: this.dateAdapter.getMinutes(defaultValue),
2372
- seconds: this.dateAdapter.getSeconds(defaultValue),
2373
- milliseconds: this.dateAdapter.getMilliseconds(defaultValue)
2374
- };
2375
- };
2376
- McDatepickerInput.prototype.getTimeStringFromDate = function (value, timeFormat) {
2377
- if (!value || !this.dateAdapter.isValid(value)) {
2378
- return '';
2379
- }
2380
- return this.dateAdapter.format(value, timeFormat);
2381
- };
2382
- McDatepickerInput.prototype.getDateEditMetrics = function (cursorPosition) {
2383
- var e_1, _d;
2384
- try {
2385
- for (var _e = __values([this.firstDigit, this.secondDigit, this.thirdDigit]), _f = _e.next(); !_f.done; _f = _e.next()) {
2386
- var digit = _f.value;
2387
- if (cursorPosition >= digit.start && cursorPosition <= digit.end) {
2388
- return [digit.value, digit.start, digit.end];
2389
- }
2390
- }
2391
- }
2392
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
2393
- finally {
2394
- try {
2395
- if (_f && !_f.done && (_d = _e.return)) _d.call(_e);
2396
- }
2397
- finally { if (e_1) throw e_1.error; }
2398
- }
2399
- return [this.thirdDigit.value, this.thirdDigit.start, this.thirdDigit.end];
2400
- };
2401
- McDatepickerInput.prototype.incrementDate = function (dateVal, whatToIncrement) {
2402
- var year = this.dateAdapter.getYear(dateVal);
2403
- var month = this.dateAdapter.getMonth(dateVal);
2404
- var day = this.dateAdapter.getDate(dateVal);
2405
- switch (whatToIncrement) {
2406
- case DateParts.day:
2407
- day++;
2408
- if (day > this.dateAdapter.getNumDaysInMonth(dateVal)) {
2409
- day = 1;
2410
- }
2411
- break;
2412
- case DateParts.month:
2413
- month++;
2414
- // tslint:disable-next-line:no-magic-numbers
2415
- if (month > 11) {
2416
- month = 0;
2417
- }
2418
- var lastDay = this.getLastDayFor(year, month);
2419
- if (day > lastDay) {
2420
- day = lastDay;
2421
- }
2422
- break;
2423
- case DateParts.year:
2424
- year++;
2425
- if (year > MAX_YEAR) {
2426
- year = 1;
2427
- }
2428
- break;
2429
- default:
2430
- }
2431
- return this.createDate(year, month, day);
2432
- };
2433
- McDatepickerInput.prototype.getLastDayFor = function (year, month) {
2434
- return this.dateAdapter.getNumDaysInMonth(this.createDate(year, month, 1));
2435
- };
2436
- McDatepickerInput.prototype.decrementDate = function (dateVal, whatToDecrement) {
2437
- var year = this.dateAdapter.getYear(dateVal);
2438
- var month = this.dateAdapter.getMonth(dateVal);
2439
- var day = this.dateAdapter.getDate(dateVal);
2440
- switch (whatToDecrement) {
2441
- case DateParts.day:
2442
- day--;
2443
- if (day < 1) {
2444
- day = this.dateAdapter.getNumDaysInMonth(dateVal);
2445
- }
2446
- break;
2447
- case DateParts.month:
2448
- month--;
2449
- if (month < 0) {
2450
- // tslint:disable-next-line:no-magic-numbers
2451
- month = 11;
2452
- }
2453
- var lastDay = this.getLastDayFor(year, month);
2454
- if (day > lastDay) {
2455
- day = lastDay;
2456
- }
2457
- break;
2458
- case DateParts.year:
2459
- year--;
2460
- if (year < 1) {
2461
- year = MAX_YEAR;
2462
- }
2463
- break;
2464
- default:
2465
- }
2466
- return this.createDate(year, month, day);
2467
- };
2468
- McDatepickerInput.prototype.verticalArrowKeyHandler = function (keyCode) {
2469
- if (!this.value) {
2470
- return;
2471
- }
2472
- var changedTime;
2473
- var _d = __read(this.getDateEditMetrics(this.selectionStart), 3), modifiedTimePart = _d[0], selectionStart = _d[1], selectionEnd = _d[2];
2474
- if (keyCode === keycodes.UP_ARROW) {
2475
- changedTime = this.incrementDate(this.value, modifiedTimePart);
2476
- }
2477
- if (keyCode === keycodes.DOWN_ARROW) {
2478
- changedTime = this.decrementDate(this.value, modifiedTimePart);
2479
- }
2480
- this.value = changedTime;
2481
- this.selectionStart = selectionStart;
2482
- this.selectionEnd = selectionEnd;
2483
- this.cvaOnChange(changedTime);
2484
- this.onChange();
2485
- this.stateChanges.next();
2486
- };
2487
- McDatepickerInput.prototype.changeCaretPosition = function (keyCode) {
2488
- if (!this.value) {
2489
- return;
2490
- }
2491
- var cursorPos = this.selectionStart;
2492
- if ([keycodes.HOME, keycodes.PAGE_UP].includes(keyCode)) {
2493
- cursorPos = 0;
2494
- }
2495
- else if ([keycodes.END, keycodes.PAGE_DOWN].includes(keyCode)) {
2496
- cursorPos = this.viewValue.length;
2497
- }
2498
- else if (keyCode === keycodes.LEFT_ARROW) {
2499
- cursorPos = cursorPos === 0 ? this.viewValue.length : cursorPos - 1;
2500
- }
2501
- else if (keyCode === keycodes.RIGHT_ARROW) {
2502
- var nextSeparatorPos = this.viewValue.indexOf(this.separator, cursorPos);
2503
- cursorPos = nextSeparatorPos ? nextSeparatorPos + 1 : 0;
2504
- }
2505
- this.selectDigitByCursor(cursorPos);
2506
- };
2507
- McDatepickerInput.prototype.selectDigitByCursor = function (cursorPos) {
2508
- var _this = this;
2509
- setTimeout(function () {
2510
- var _d = __read(_this.getDateEditMetrics(cursorPos), 3), selectionStart = _d[1], selectionEnd = _d[2];
2511
- _this.selectionStart = selectionStart;
2512
- _this.selectionEnd = selectionEnd;
2513
- });
2514
- };
2515
- McDatepickerInput.prototype.selectNextDigitByCursor = function (cursorPos) {
2516
- var _this = this;
2517
- setTimeout(function () {
2518
- var _d = __read(_this.getDateEditMetrics(cursorPos), 3), endPositionOfCurrentDigit = _d[2];
2519
- var _e = __read(_this.getDateEditMetrics(endPositionOfCurrentDigit + 1), 3), selectionStart = _e[1], selectionEnd = _e[2];
2520
- _this.selectionStart = selectionStart;
2521
- _this.selectionEnd = selectionEnd;
2522
- });
2523
- };
2524
- McDatepickerInput.prototype.selectNextDigit = function (cursorPos, cycle) {
2525
- var _this = this;
2526
- if (cycle === void 0) { cycle = false; }
2527
- setTimeout(function () {
2528
- var lastValue = cycle ? 0 : cursorPos;
2529
- var nextSeparatorPos = _this.viewValue.indexOf(_this.separator, cursorPos);
2530
- var newCursorPos = nextSeparatorPos > 0 ? nextSeparatorPos + 1 : lastValue;
2531
- var _d = __read(_this.getDateEditMetrics(newCursorPos), 3), selectionStart = _d[1], selectionEnd = _d[2];
2532
- _this.selectionStart = selectionStart;
2533
- _this.selectionEnd = selectionEnd;
2534
- });
2535
- };
2536
- /** Checks whether the input is invalid based on the native validation. */
2537
- McDatepickerInput.prototype.isBadInput = function () {
2538
- var validity = this.elementRef.nativeElement.validity;
2539
- return validity && validity.badInput;
2540
- };
2541
- /** Formats a value and sets it on the input element. */
2542
- McDatepickerInput.prototype.formatValue = function (value) {
2543
- var formattedValue = value ? this.dateAdapter.format(value, this.dateFormats.dateInput) : '';
2544
- this.setViewValue(formattedValue);
2545
- };
2546
- /**
2547
- * @param obj The object to check.
2548
- * @returns The given object if it is both a date instance and valid, otherwise null.
2549
- */
2550
- McDatepickerInput.prototype.getValidDateOrNull = function (obj) {
2551
- return (this.dateAdapter.isDateInstance(obj) && this.dateAdapter.isValid(obj)) ? obj : null;
2552
- };
2553
- McDatepickerInput.prototype.setControl = function (control) {
2554
- if (!this.control) {
2555
- this.control = control;
2556
- }
2557
- };
2558
- McDatepickerInput.prototype.getDigitPositions = function (format) {
2559
- var _this = this;
2560
- var formatInLowerCase = format.toLowerCase();
2561
- formatInLowerCase
2562
- .split('')
2563
- .reduce(function (_d, value, index, arr) {
2564
- var prev = _d.prev, length = _d.length, start = _d.start;
2565
- if (value === _this.separator || (arr.length - 1) === index) {
2566
- if (!_this.firstDigit) {
2567
- _this.firstDigit = new DateDigit(prev, start, length);
2568
- }
2569
- else if (!_this.secondDigit) {
2570
- _this.secondDigit = new DateDigit(prev, start, length);
2571
- }
2572
- else if (!_this.thirdDigit) {
2573
- _this.thirdDigit = new DateDigit(prev, start, arr.length - start);
2574
- }
2575
- // tslint:disable:no-parameter-reassignment
2576
- length = 0;
2577
- start = index + 1;
2578
- }
2579
- else {
2580
- length++;
2581
- }
2582
- return { prev: value, length: length, start: start };
2583
- }, { length: 0, start: 0 });
2584
- if (!this.firstDigit || !this.secondDigit || !this.thirdDigit) {
2585
- Error("Can' t use this format: " + format);
2586
- }
2587
- };
2588
- McDatepickerInput.prototype.createDate = function (year, month, day) {
2589
- return this.dateAdapter.createDateTime(year, month, day, this.dateAdapter.getHours(this.value), this.dateAdapter.getMinutes(this.value), this.dateAdapter.getSeconds(this.value), this.dateAdapter.getMilliseconds(this.value));
2590
- };
2591
- McDatepickerInput.prototype.correctCursorPosition = function () {
2592
- if (this.selectionStart && this.separatorPositions.includes(this.selectionStart)) {
2593
- this.selectionStart = this.selectionStart - 1;
2594
- }
2595
- };
2596
- return McDatepickerInput;
2597
- }());
2598
- /** @nocollapse */ McDatepickerInput.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: McDatepickerInput, deps: [{ token: i0__namespace.ElementRef }, { token: i0__namespace.Renderer2 }, { token: i1__namespace$1.DateAdapter, optional: true }, { token: i1$1.MC_DATE_FORMATS, optional: true }], target: i0__namespace.ɵɵFactoryTarget.Directive });
2599
- /** @nocollapse */ McDatepickerInput.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.5", type: McDatepickerInput, selector: "input[mcDatepicker]", inputs: { placeholder: "placeholder", required: "required", mcDatepicker: "mcDatepicker", mcDatepickerFilter: "mcDatepickerFilter", value: "value", min: "min", max: "max", disabled: "disabled", id: "id", mcValidationTooltip: "mcValidationTooltip" }, outputs: { incorrectInput: "incorrectInput", dateChange: "dateChange", dateInput: "dateInput" }, host: { listeners: { "paste": "onPaste($event)", "change": "onChange()", "focus": "focusChanged(true)", "blur": "onBlur()", "keydown": "onKeyDown($event)" }, properties: { "attr.placeholder": "placeholder", "attr.required": "required", "attr.disabled": "disabled || null", "attr.min": "min ? toISO8601(min) : null", "attr.max": "max ? toISO8601(max) : null", "attr.autocomplete": "\"off\"" }, classAttribute: "mc-input mc-datepicker" }, providers: [
2600
- MC_DATEPICKER_VALUE_ACCESSOR,
2601
- MC_DATEPICKER_VALIDATORS,
2602
- { provide: formField.McFormFieldControl, useExisting: McDatepickerInput }
2603
- ], exportAs: ["mcDatepickerInput"], ngImport: i0__namespace });
2604
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: McDatepickerInput, decorators: [{
2605
- type: i0.Directive,
2606
- args: [{
2607
- selector: 'input[mcDatepicker]',
2608
- exportAs: 'mcDatepickerInput',
2609
- providers: [
2610
- MC_DATEPICKER_VALUE_ACCESSOR,
2611
- MC_DATEPICKER_VALIDATORS,
2612
- { provide: formField.McFormFieldControl, useExisting: McDatepickerInput }
2613
- ],
2614
- host: {
2615
- class: 'mc-input mc-datepicker',
2616
- '[attr.placeholder]': 'placeholder',
2617
- '[attr.required]': 'required',
2618
- '[attr.disabled]': 'disabled || null',
2619
- '[attr.min]': 'min ? toISO8601(min) : null',
2620
- '[attr.max]': 'max ? toISO8601(max) : null',
2621
- '[attr.autocomplete]': '"off"',
2622
- '(paste)': 'onPaste($event)',
2623
- '(change)': 'onChange()',
2624
- '(focus)': 'focusChanged(true)',
2625
- '(blur)': 'onBlur()',
2626
- '(keydown)': 'onKeyDown($event)'
2627
- }
2628
- }]
2629
- }], ctorParameters: function () {
2630
- return [{ type: i0__namespace.ElementRef }, { type: i0__namespace.Renderer2 }, { type: i1__namespace$1.DateAdapter, decorators: [{
2631
- type: i0.Optional
2632
- }] }, { type: undefined, decorators: [{
2633
- type: i0.Optional
2634
- }, {
2635
- type: i0.Inject,
2636
- args: [i1$1.MC_DATE_FORMATS]
2637
- }] }];
2638
- }, propDecorators: { placeholder: [{
2639
- type: i0.Input
2640
- }], required: [{
2641
- type: i0.Input
2642
- }], mcDatepicker: [{
2643
- type: i0.Input
2644
- }], mcDatepickerFilter: [{
2645
- type: i0.Input
2646
- }], value: [{
2647
- type: i0.Input
2648
- }], min: [{
2649
- type: i0.Input
2650
- }], max: [{
2651
- type: i0.Input
2652
- }], disabled: [{
2653
- type: i0.Input
2654
- }], id: [{
2655
- type: i0.Input
2656
- }], mcValidationTooltip: [{
2657
- type: i0.Input
2658
- }], incorrectInput: [{
2659
- type: i0.Output
2660
- }], dateChange: [{
2661
- type: i0.Output
2662
- }], dateInput: [{
2663
- type: i0.Output
2664
- }] } });
2665
-
2666
- /** Can be used to override the icon of a `mcDatepickerToggle`. */
2667
- var McDatepickerToggleIcon = /** @class */ (function () {
2668
- function McDatepickerToggleIcon() {
2669
- }
2670
- return McDatepickerToggleIcon;
2671
- }());
2672
- /** @nocollapse */ McDatepickerToggleIcon.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: McDatepickerToggleIcon, deps: [], target: i0__namespace.ɵɵFactoryTarget.Directive });
2673
- /** @nocollapse */ McDatepickerToggleIcon.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.5", type: McDatepickerToggleIcon, selector: "[mcDatepickerToggleIcon]", ngImport: i0__namespace });
2674
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: McDatepickerToggleIcon, decorators: [{
2675
- type: i0.Directive,
2676
- args: [{
2677
- selector: '[mcDatepickerToggleIcon]'
2678
- }]
2679
- }] });
2680
- var McDatepickerToggle = /** @class */ (function () {
2681
- function McDatepickerToggle(intl, changeDetectorRef) {
2682
- this.intl = intl;
2683
- this.changeDetectorRef = changeDetectorRef;
2684
- this.stateChanges = rxjs.Subscription.EMPTY;
2685
- }
2686
- Object.defineProperty(McDatepickerToggle.prototype, "disabled", {
2687
- /** Whether the toggle button is disabled. */
2688
- get: function () {
2689
- return this._disabled === undefined ? this.datepicker.disabled : this._disabled;
2690
- },
2691
- set: function (value) {
2692
- this._disabled = coercion.coerceBooleanProperty(value);
2693
- },
2694
- enumerable: false,
2695
- configurable: true
2696
- });
2697
- McDatepickerToggle.prototype.ngOnChanges = function (changes) {
2698
- if (changes.datepicker) {
2699
- this.watchStateChanges();
2700
- }
2701
- };
2702
- McDatepickerToggle.prototype.ngOnDestroy = function () {
2703
- this.stateChanges.unsubscribe();
2704
- };
2705
- McDatepickerToggle.prototype.ngAfterContentInit = function () {
2706
- this.watchStateChanges();
2707
- };
2708
- McDatepickerToggle.prototype.open = function (event) {
2709
- if (this.datepicker && !this.disabled) {
2710
- this.datepicker.open();
2711
- event.stopPropagation();
2712
- }
2713
- };
2714
- McDatepickerToggle.prototype.watchStateChanges = function () {
2715
- var _this = this;
2716
- var datepickerDisabled = this.datepicker ? this.datepicker.disabledChange : rxjs.of();
2717
- var inputDisabled = this.datepicker && this.datepicker.datepickerInput ?
2718
- this.datepicker.datepickerInput.disabledChange : rxjs.of();
2719
- var datepickerToggled = this.datepicker ?
2720
- rxjs.merge(this.datepicker.openedStream, this.datepicker.closedStream) :
2721
- rxjs.of();
2722
- this.stateChanges.unsubscribe();
2723
- this.stateChanges = rxjs.merge(this.intl.changes, datepickerDisabled, inputDisabled, datepickerToggled).subscribe(function () { return _this.changeDetectorRef.markForCheck(); });
2724
- };
2725
- return McDatepickerToggle;
2726
- }());
2727
- /** @nocollapse */ McDatepickerToggle.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: McDatepickerToggle, deps: [{ token: McDatepickerIntl }, { token: i0__namespace.ChangeDetectorRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
2728
- /** @nocollapse */ McDatepickerToggle.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.5", type: McDatepickerToggle, selector: "mc-datepicker-toggle", inputs: { disabled: "disabled", datepicker: ["for", "datepicker"], tabIndex: "tabIndex" }, host: { properties: { "class.mc-active": "datepicker && datepicker.opened" }, classAttribute: "mc-datepicker-toggle" }, queries: [{ propertyName: "customIcon", first: true, predicate: McDatepickerToggleIcon, descendants: true }], viewQueries: [{ propertyName: "button", first: true, predicate: ["button"], descendants: true }], exportAs: ["mcDatepickerToggle"], usesOnChanges: true, ngImport: i0__namespace, template: "<!--todo need simplify this-->\n<button\n #button\n mc-button\n type=\"button\"\n class=\"mc-datepicker-toggle__button\"\n aria-haspopup=\"true\"\n [attr.aria-label]=\"intl.openCalendarLabel\"\n [attr.tabindex]=\"tabIndex\"\n [disabled]=\"disabled\"\n (click)=\"open($event)\">\n\n <i *ngIf=\"!customIcon\" mc-icon=\"mc-calendar_16\" class=\"mc-datepicker-toggle__default-icon\"></i>\n\n <ng-content select=\"[mcDatepickerToggleIcon]\"></ng-content>\n</button>\n", styles: [".mc-datepicker-toggle:focus{outline:0}.mc-datepicker-toggle__button.mc-icon-button{width:30px;width:var(--mc-datepicker-toggle-size-width, 30px);height:30px;height:var(--mc-datepicker-toggle-size-height, 30px);margin-left:2px}.mc-form-field-appearance-legacy .mc-form-field-prefix .mc-datepicker-toggle__default-icon,.mc-form-field-appearance-legacy .mc-form-field-suffix .mc-datepicker-toggle__default-icon{width:1em}.mc-form-field:not(.mc-form-field-appearance-legacy) .mc-form-field-prefix .mc-datepicker-toggle__default-icon,.mc-form-field:not(.mc-form-field-appearance-legacy) .mc-form-field-suffix .mc-datepicker-toggle__default-icon{display:block;width:1.5em;height:1.5em}.mc-form-field:not(.mc-form-field-appearance-legacy) .mc-form-field-prefix .mc-icon-button .mc-datepicker-toggle__default-icon,.mc-form-field:not(.mc-form-field-appearance-legacy) .mc-form-field-suffix .mc-icon-button .mc-datepicker-toggle__default-icon{margin:auto}\n"], components: [{ type: i3__namespace.McButton, selector: "button[mc-button]", inputs: ["disabled", "color"] }, { type: i4__namespace.McIcon, selector: "[mc-icon]", inputs: ["color"] }], directives: [{ type: i3__namespace.McButtonCssStyler, selector: "button[mc-button], a[mc-button]" }, { type: i1__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4__namespace.McIconCSSStyler, selector: "[mc-icon]" }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush, encapsulation: i0__namespace.ViewEncapsulation.None });
2729
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: McDatepickerToggle, decorators: [{
2730
- type: i0.Component,
2731
- args: [{
2732
- selector: 'mc-datepicker-toggle',
2733
- templateUrl: 'datepicker-toggle.html',
2734
- styleUrls: ['datepicker-toggle.scss'],
2735
- host: {
2736
- class: 'mc-datepicker-toggle',
2737
- '[class.mc-active]': 'datepicker && datepicker.opened'
2738
- },
2739
- exportAs: 'mcDatepickerToggle',
2740
- encapsulation: i0.ViewEncapsulation.None,
2741
- changeDetection: i0.ChangeDetectionStrategy.OnPush
2742
- }]
2743
- }], ctorParameters: function () { return [{ type: McDatepickerIntl }, { type: i0__namespace.ChangeDetectorRef }]; }, propDecorators: { disabled: [{
2744
- type: i0.Input
2745
- }], datepicker: [{
2746
- type: i0.Input,
2747
- args: ['for']
2748
- }], tabIndex: [{
2749
- type: i0.Input
2750
- }], customIcon: [{
2751
- type: i0.ContentChild,
2752
- args: [McDatepickerToggleIcon, { static: false }]
2753
- }], button: [{
2754
- type: i0.ViewChild,
2755
- args: ['button', { static: false }]
2756
- }] } });
2757
-
2758
- /**
2759
- * Animations used by the mosaic datepicker.
2760
- * @docs-private
2761
- */
2762
- var mcDatepickerAnimations = {
2763
- /** Transforms the height of the datepicker's calendar. */
2764
- transformPanel: animations.trigger('transformPanel', [
2765
- animations.state('void', animations.style({
2766
- opacity: 0,
2767
- transform: 'scale(1, 0.8)'
2768
- })),
2769
- animations.transition('void => enter', animations.animate('120ms cubic-bezier(0, 0, 0.2, 1)', animations.style({
2770
- opacity: 1,
2771
- transform: 'scale(1, 1)'
2772
- }))),
2773
- animations.transition('* => void', animations.animate('100ms linear', animations.style({ opacity: 0 })))
2774
- ]),
2775
- /** Fades in the content of the calendar. */
2776
- fadeInCalendar: animations.trigger('fadeInCalendar', [
2777
- animations.state('void', animations.style({ opacity: 0 })),
2778
- animations.state('enter', animations.style({ opacity: 1 })),
2779
- // need to keep it until #12440 gets in, otherwise the exit animation will look glitchy.
2780
- animations.transition('void => *', animations.animate('120ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)'))
2781
- ])
2782
- };
2783
- // todo should be put into polyfils
2784
- // https://github.com/angular/angular/issues/24769
2785
- if (!Element.prototype.matches) {
2786
- Element.prototype.matches = Element.prototype.msMatchesSelector;
2787
- }
2788
-
2789
- /** Used to generate a unique ID for each datepicker instance. */
2790
- var datepickerUid = 0;
2791
- /** Injection token that determines the scroll handling while the calendar is open. */
2792
- var MC_DATEPICKER_SCROLL_STRATEGY = new i0.InjectionToken('mc-datepicker-scroll-strategy');
2793
- /** @docs-private */
2794
- // tslint:disable-next-line:naming-convention
2795
- function MC_DATEPICKER_SCROLL_STRATEGY_FACTORY(overlay) {
2796
- return function () { return overlay.scrollStrategies.reposition(); };
2797
- }
2798
- /** @docs-private */
2799
- var MC_DATEPICKER_SCROLL_STRATEGY_FACTORY_PROVIDER = {
2800
- provide: MC_DATEPICKER_SCROLL_STRATEGY,
2801
- deps: [i3$1.Overlay],
2802
- useFactory: MC_DATEPICKER_SCROLL_STRATEGY_FACTORY
2803
- };
2804
- /**
2805
- * Component used as the content for the datepicker dialog and popup. We use this instead of using
2806
- * McCalendar directly as the content so we can control the initial focus. This also gives us a
2807
- * place to put additional features of the popup that are not part of the calendar itself in the
2808
- * future. (e.g. confirmation buttons).
2809
- * @docs-private
2810
- */
2811
- var McDatepickerContent = /** @class */ (function () {
2812
- function McDatepickerContent(changeDetectorRef) {
2813
- this.changeDetectorRef = changeDetectorRef;
2814
- /** Emits when an animation has finished. */
2815
- this.animationDone = new rxjs.Subject();
2816
- this.subscriptions = new rxjs.Subscription();
2817
- }
2818
- McDatepickerContent.prototype.ngAfterViewInit = function () {
2819
- var _this = this;
2820
- this.subscriptions.add(this.datepicker.stateChanges.subscribe(function () {
2821
- _this.changeDetectorRef.markForCheck();
2822
- }));
2823
- };
2824
- McDatepickerContent.prototype.ngOnDestroy = function () {
2825
- this.subscriptions.unsubscribe();
2826
- this.animationDone.complete();
2827
- };
2828
- McDatepickerContent.prototype.startExitAnimation = function () {
2829
- this.animationState = 'void';
2830
- this.changeDetectorRef.markForCheck();
2831
- };
2832
- return McDatepickerContent;
2833
- }());
2834
- /** @nocollapse */ McDatepickerContent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: McDatepickerContent, deps: [{ token: i0__namespace.ChangeDetectorRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
2835
- /** @nocollapse */ McDatepickerContent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.5", type: McDatepickerContent, selector: "mc-datepicker__content", host: { listeners: { "@transformPanel.done": "animationDone.next()" }, properties: { "@transformPanel": "animationState" }, classAttribute: "mc-datepicker__content" }, viewQueries: [{ propertyName: "calendar", first: true, predicate: McCalendar, descendants: true }], exportAs: ["mcDatepickerContent"], ngImport: i0__namespace, template: "<mc-calendar [id]=\"datepicker.id\"\n [ngClass]=\"datepicker.panelClass\"\n [startAt]=\"datepicker.startAt\"\n [startView]=\"datepicker.startView\"\n [minDate]=\"datepicker.minDate\"\n [maxDate]=\"datepicker.maxDate\"\n [dateFilter]=\"datepicker.dateFilter\"\n [headerComponent]=\"datepicker.calendarHeaderComponent\"\n [selected]=\"datepicker.selected\"\n [dateClass]=\"datepicker.dateClass\"\n [@fadeInCalendar]=\"'enter'\"\n (selectedChange)=\"datepicker.select($event)\"\n (yearSelected)=\"datepicker.selectYear($event)\"\n (monthSelected)=\"datepicker.selectMonth($event)\"\n (userSelection)=\"datepicker.close()\">\n</mc-calendar>\n", styles: [".mc-calendar{display:block}.mc-calendar-header{display:flex;padding:16px 8px 12px;padding:var(--mc-datepicker-calendar-size-padding-top, 16px) var(--mc-datepicker-calendar-size-padding-horizontal, 8px) var(--mc-datepicker-calendar-size-padding-blocks, 12px) var(--mc-datepicker-calendar-size-padding-horizontal, 8px)}.mc-calendar__content{padding:0 8px 8px;padding:0 var(--mc-datepicker-calendar-size-padding-horizontal, 8px) var(--mc-datepicker-calendar-size-padding-horizontal, 8px) var(--mc-datepicker-calendar-size-padding-horizontal, 8px);outline:none}.mc-calendar-spacer{flex:1 1 auto}.mc-calendar__period-button{min-width:0}.mc-calendar__period-button .mc-icon{vertical-align:baseline}.mc-calendar__previous-button:after{border-left-width:2px;border-left-width:var(--mc-datepicker-calendar-size-icon-border-width, 2px);transform:translate(2px) rotate(-45deg);transform:var(--mc-datepicker-calendar-size-icon-prev-icon-transform, translateX(2px) rotate(-45deg))}.mc-calendar__next-button:after{border-right-width:2px;border-right-width:var(--mc-datepicker-calendar-size-icon-border-width, 2px);transform:translate(-2px) rotate(45deg);transform:var(--mc-datepicker-calendar-size-icon-nex-icon-transform, translateX(-2px) rotate(45deg))}.mc-calendar__table{border-spacing:0;border-collapse:collapse;width:100%}.mc-calendar__table-header th{text-align:center;height:30px}.mc-calendar__table-header th.mc-calendar__table-header-divider{position:relative;height:calc(12px - 2px);height:calc(var(--mc-datepicker-calendar-size-padding-blocks, 12px) - 2px)}.mc-calendar__table-header th.mc-calendar__table-header-divider:after{content:\"\";position:absolute;top:0;left:calc(-1 * 8px);left:calc(-1 * var(--mc-datepicker-calendar-size-padding-horizontal, 8px));right:calc(-1 * 8px);right:calc(-1 * var(--mc-datepicker-calendar-size-padding-horizontal, 8px));height:1px;height:var(--mc-datepicker-calendar-size-divider-width, 1px)}.mc-datepicker__content{display:block;border-width:1px;border-style:solid}.mc-datepicker__content .mc-calendar{width:296px;height:348px}.mc-datepicker__content .mc-calendar__next-button[disabled],.mc-datepicker__content .mc-calendar__previous-button[disabled]{border:0}\n"], components: [{ type: McCalendar, selector: "mc-calendar", inputs: ["startAt", "selected", "minDate", "maxDate", "headerComponent", "startView", "dateFilter", "dateClass"], outputs: ["selectedChange", "yearSelected", "monthSelected", "userSelection"], exportAs: ["mcCalendar"] }], directives: [{ type: i1__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], animations: [
2836
- mcDatepickerAnimations.transformPanel,
2837
- mcDatepickerAnimations.fadeInCalendar
2838
- ], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush, encapsulation: i0__namespace.ViewEncapsulation.None });
2839
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: McDatepickerContent, decorators: [{
2840
- type: i0.Component,
2841
- args: [{
2842
- selector: 'mc-datepicker__content',
2843
- exportAs: 'mcDatepickerContent',
2844
- templateUrl: 'datepicker-content.html',
2845
- styleUrls: ['datepicker-content.scss'],
2846
- host: {
2847
- class: 'mc-datepicker__content',
2848
- '[@transformPanel]': 'animationState',
2849
- '(@transformPanel.done)': 'animationDone.next()'
2850
- },
2851
- animations: [
2852
- mcDatepickerAnimations.transformPanel,
2853
- mcDatepickerAnimations.fadeInCalendar
2854
- ],
2855
- encapsulation: i0.ViewEncapsulation.None,
2856
- changeDetection: i0.ChangeDetectionStrategy.OnPush
2857
- }]
2858
- }], ctorParameters: function () { return [{ type: i0__namespace.ChangeDetectorRef }]; }, propDecorators: { calendar: [{
2859
- type: i0.ViewChild,
2860
- args: [McCalendar]
2861
- }] } });
2862
- // TODO: We use a component instead of a directive here so the user can use implicit
2863
- // template reference variables (e.g. #d vs #d="mcDatepicker"). We can change this to a directive
2864
- // if angular adds support for `exportAs: '$implicit'` on directives.
2865
- /** Component responsible for managing the datepicker popup/dialog. */
2866
- var McDatepicker = /** @class */ (function () {
2867
- function McDatepicker(overlay, ngZone, viewContainerRef, scrollStrategy, dateAdapter, dir, document) {
2868
- this.overlay = overlay;
2869
- this.ngZone = ngZone;
2870
- this.viewContainerRef = viewContainerRef;
2871
- this.dateAdapter = dateAdapter;
2872
- this.dir = dir;
2873
- this.document = document;
2874
- this._hasBackdrop = false;
2875
- this._opened = false;
2876
- /** The view that the calendar should start in. */
2877
- this.startView = exports.McCalendarView.Month;
2878
- /**
2879
- * Emits selected year in multiyear view.
2880
- * This doesn't imply a change on the selected date.
2881
- */
2882
- this.yearSelected = new i0.EventEmitter();
2883
- /**
2884
- * Emits selected month in year view.
2885
- * This doesn't imply a change on the selected date.
2886
- */
2887
- this.monthSelected = new i0.EventEmitter();
2888
- this.backdropClass = 'cdk-overlay-transparent-backdrop';
2889
- /** Emits when the datepicker has been opened. */
2890
- this.openedStream = new i0.EventEmitter();
2891
- /** Emits when the datepicker has been closed. */
2892
- this.closedStream = new i0.EventEmitter();
2893
- /** The id for the datepicker calendar. */
2894
- this.id = "mc-datepicker-" + datepickerUid++;
2895
- this.stateChanges = new rxjs.Subject();
2896
- /** Emits when the datepicker is disabled. */
2897
- this.disabledChange = new rxjs.Subject();
2898
- /** Emits new selected date when selected date changes. */
2899
- this.selectedChanged = new rxjs.Subject();
2900
- this.validSelected = null;
2901
- /** The element that was focused before the datepicker was opened. */
2902
- this.focusedElementBeforeOpen = null;
2903
- /** Subscription to value changes in the associated input element. */
2904
- this.inputSubscription = rxjs.Subscription.EMPTY;
2905
- this.closeSubscription = rxjs.Subscription.EMPTY;
2906
- if (!this.dateAdapter) {
2907
- throw createMissingDateImplError('DateAdapter');
2908
- }
2909
- this.scrollStrategy = scrollStrategy;
2910
- }
2911
- Object.defineProperty(McDatepicker.prototype, "hasBackdrop", {
2912
- get: function () {
2913
- return this._hasBackdrop;
2914
- },
2915
- set: function (value) {
2916
- this._hasBackdrop = coercion.coerceBooleanProperty(value);
2917
- },
2918
- enumerable: false,
2919
- configurable: true
2920
- });
2921
- Object.defineProperty(McDatepicker.prototype, "startAt", {
2922
- /** The date to open the calendar to initially. */
2923
- get: function () {
2924
- // If an explicit startAt is set we start there, otherwise we start at whatever the currently
2925
- // selected value is.
2926
- return this._startAt || (this.datepickerInput ? this.datepickerInput.value : null);
2927
- },
2928
- set: function (value) {
2929
- this._startAt = this.getValidDateOrNull(this.dateAdapter.deserialize(value));
2930
- },
2931
- enumerable: false,
2932
- configurable: true
2933
- });
2934
- Object.defineProperty(McDatepicker.prototype, "disabled", {
2935
- /** Whether the datepicker pop-up should be disabled. */
2936
- get: function () {
2937
- return this._disabled === undefined && this.datepickerInput ? this.datepickerInput.disabled : this._disabled;
2938
- },
2939
- set: function (value) {
2940
- var newValue = coercion.coerceBooleanProperty(value);
2941
- if (newValue !== this._disabled) {
2942
- this._disabled = newValue;
2943
- this.disabledChange.next(newValue);
2944
- }
2945
- },
2946
- enumerable: false,
2947
- configurable: true
2948
- });
2949
- Object.defineProperty(McDatepicker.prototype, "opened", {
2950
- /** Whether the calendar is open. */
2951
- get: function () {
2952
- return this._opened;
2953
- },
2954
- set: function (value) {
2955
- coercion.coerceBooleanProperty(value) ? this.open() : this.close();
2956
- },
2957
- enumerable: false,
2958
- configurable: true
2959
- });
2960
- Object.defineProperty(McDatepicker.prototype, "selected", {
2961
- /** The currently selected date. */
2962
- get: function () {
2963
- return this.validSelected;
2964
- },
2965
- set: function (value) {
2966
- this.validSelected = value;
2967
- },
2968
- enumerable: false,
2969
- configurable: true
2970
- });
2971
- Object.defineProperty(McDatepicker.prototype, "minDate", {
2972
- /** The minimum selectable date. */
2973
- get: function () {
2974
- return this.datepickerInput && this.datepickerInput.min;
2975
- },
2976
- enumerable: false,
2977
- configurable: true
2978
- });
2979
- Object.defineProperty(McDatepicker.prototype, "maxDate", {
2980
- /** The maximum selectable date. */
2981
- get: function () {
2982
- return this.datepickerInput && this.datepickerInput.max;
2983
- },
2984
- enumerable: false,
2985
- configurable: true
2986
- });
2987
- Object.defineProperty(McDatepicker.prototype, "dateFilter", {
2988
- get: function () {
2989
- return this.datepickerInput && this.datepickerInput.dateFilter;
2990
- },
2991
- enumerable: false,
2992
- configurable: true
2993
- });
2994
- Object.defineProperty(McDatepicker.prototype, "value", {
2995
- get: function () {
2996
- return this.selected;
2997
- },
2998
- enumerable: false,
2999
- configurable: true
3000
- });
3001
- McDatepicker.prototype.ngOnDestroy = function () {
3002
- this.close();
3003
- this.inputSubscription.unsubscribe();
3004
- this.closeSubscription.unsubscribe();
3005
- this.disabledChange.complete();
3006
- this.destroyOverlay();
3007
- };
3008
- /** Selects the given date */
3009
- McDatepicker.prototype.select = function (date) {
3010
- var oldValue = this.selected;
3011
- this.selected = date;
3012
- if (!this.dateAdapter.sameDate(oldValue, this.selected)) {
3013
- this.selectedChanged.next(date);
3014
- }
3015
- };
3016
- /** Emits the selected year in multiyear view */
3017
- McDatepicker.prototype.selectYear = function (normalizedYear) {
3018
- this.yearSelected.emit(normalizedYear);
3019
- };
3020
- /** Emits selected month in year view */
3021
- McDatepicker.prototype.selectMonth = function (normalizedMonth) {
3022
- this.monthSelected.emit(normalizedMonth);
3023
- };
3024
- /**
3025
- * Register an input with this datepicker.
3026
- * @param input The datepicker input to register with this datepicker.
3027
- */
3028
- McDatepicker.prototype.registerInput = function (input) {
3029
- var _this = this;
3030
- if (this.datepickerInput) {
3031
- throw Error('A McDatepicker can only be associated with a single input.');
3032
- }
3033
- this.datepickerInput = input;
3034
- this.inputSubscription = this.datepickerInput.valueChange
3035
- .subscribe(function (value) {
3036
- var _a;
3037
- _this.selected = value;
3038
- if (_this.popupComponentRef) {
3039
- (_a = _this.popupComponentRef.instance.calendar.monthView) === null || _a === void 0 ? void 0 : _a.init();
3040
- _this.popupComponentRef.instance.calendar.activeDate = value;
3041
- }
3042
- });
3043
- };
3044
- /** Open the calendar. */
3045
- McDatepicker.prototype.open = function () {
3046
- if (this._opened || this.disabled) {
3047
- return;
3048
- }
3049
- if (!this.datepickerInput) {
3050
- throw Error('Attempted to open an McDatepicker with no associated input.');
3051
- }
3052
- if (this.document) {
3053
- this.focusedElementBeforeOpen = this.document.activeElement;
3054
- }
3055
- this.openAsPopup();
3056
- this._opened = true;
3057
- this.openedStream.emit();
3058
- };
3059
- /** Close the calendar. */
3060
- McDatepicker.prototype.close = function (restoreFocus) {
3061
- var _this = this;
3062
- if (restoreFocus === void 0) { restoreFocus = true; }
3063
- if (!this._opened) {
3064
- return;
3065
- }
3066
- if (this.popupComponentRef) {
3067
- var instance = this.popupComponentRef.instance;
3068
- instance.startExitAnimation();
3069
- instance.animationDone
3070
- .pipe(operators.take(1))
3071
- .subscribe(function () { return _this.destroyOverlay(); });
3072
- }
3073
- if (restoreFocus) {
3074
- this.focusedElementBeforeOpen.focus();
3075
- }
3076
- this._opened = false;
3077
- this.closedStream.emit();
3078
- this.focusedElementBeforeOpen = null;
3079
- };
3080
- McDatepicker.prototype.toggle = function () {
3081
- if (this.datepickerInput.isReadOnly) {
3082
- return;
3083
- }
3084
- this._opened ? this.close() : this.open();
3085
- };
3086
- /** Destroys the current overlay. */
3087
- McDatepicker.prototype.destroyOverlay = function () {
3088
- if (this.popupRef) {
3089
- this.popupRef.dispose();
3090
- this.popupRef = this.popupComponentRef = null;
3091
- }
3092
- };
3093
- /** Open the calendar as a popup. */
3094
- McDatepicker.prototype.openAsPopup = function () {
3095
- var _this = this;
3096
- if (!this.calendarPortal) {
3097
- this.calendarPortal = new i8.ComponentPortal(McDatepickerContent, this.viewContainerRef);
3098
- }
3099
- if (!this.popupRef) {
3100
- this.createPopup();
3101
- }
3102
- if (!this.popupRef.hasAttached()) {
3103
- this.popupComponentRef = this.popupRef.attach(this.calendarPortal);
3104
- this.popupComponentRef.instance.datepicker = this;
3105
- // Update the position once the calendar has rendered.
3106
- this.ngZone.onStable.asObservable()
3107
- .pipe(operators.take(1))
3108
- .subscribe(function () { return _this.popupRef.updatePosition(); });
3109
- }
3110
- };
3111
- /** Create the popup. */
3112
- McDatepicker.prototype.createPopup = function () {
3113
- var _this = this;
3114
- var overlayConfig = new i3$1.OverlayConfig({
3115
- positionStrategy: this.createPopupPositionStrategy(),
3116
- hasBackdrop: this.hasBackdrop,
3117
- backdropClass: this.backdropClass,
3118
- direction: this.dir,
3119
- scrollStrategy: this.scrollStrategy(),
3120
- panelClass: 'mc-datepicker__popup'
3121
- });
3122
- this.popupRef = this.overlay.create(overlayConfig);
3123
- this.closeSubscription = this.closingActions()
3124
- .subscribe(function () { return _this.close(_this.restoreFocus()); });
3125
- };
3126
- McDatepicker.prototype.restoreFocus = function () {
3127
- return this.document.activeElement === this.document.body;
3128
- };
3129
- McDatepicker.prototype.closingActions = function () {
3130
- return rxjs.merge(this.popupRef.backdropClick(), this.popupRef.outsidePointerEvents(), this.popupRef.detachments());
3131
- };
3132
- /** Create the popup PositionStrategy. */
3133
- McDatepicker.prototype.createPopupPositionStrategy = function () {
3134
- return this.overlay.position()
3135
- .flexibleConnectedTo(this.datepickerInput.elementRef)
3136
- .withTransformOriginOn('.mc-datepicker__content')
3137
- .withFlexibleDimensions(false)
3138
- .withViewportMargin(8)
3139
- .withLockedPosition()
3140
- .withPositions([
3141
- {
3142
- originX: 'start',
3143
- originY: 'bottom',
3144
- overlayX: 'start',
3145
- overlayY: 'top'
3146
- },
3147
- {
3148
- originX: 'start',
3149
- originY: 'top',
3150
- overlayX: 'start',
3151
- overlayY: 'bottom'
3152
- },
3153
- {
3154
- originX: 'end',
3155
- originY: 'bottom',
3156
- overlayX: 'end',
3157
- overlayY: 'top'
3158
- },
3159
- {
3160
- originX: 'end',
3161
- originY: 'top',
3162
- overlayX: 'end',
3163
- overlayY: 'bottom'
3164
- }
3165
- ]);
3166
- };
3167
- /**
3168
- * @param obj The object to check.
3169
- * @returns The given object if it is both a date instance and valid, otherwise null.
3170
- */
3171
- McDatepicker.prototype.getValidDateOrNull = function (obj) {
3172
- return (this.dateAdapter.isDateInstance(obj) && this.dateAdapter.isValid(obj)) ? obj : null;
3173
- };
3174
- return McDatepicker;
3175
- }());
3176
- /** @nocollapse */ McDatepicker.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: McDatepicker, deps: [{ token: i3__namespace$1.Overlay }, { token: i0__namespace.NgZone }, { token: i0__namespace.ViewContainerRef }, { token: MC_DATEPICKER_SCROLL_STRATEGY }, { token: i1__namespace$1.DateAdapter, optional: true }, { token: i2__namespace.Directionality, optional: true }, { token: i1.DOCUMENT, optional: true }], target: i0__namespace.ɵɵFactoryTarget.Component });
3177
- /** @nocollapse */ McDatepicker.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.5", type: McDatepicker, selector: "mc-datepicker", inputs: { hasBackdrop: "hasBackdrop", startAt: "startAt", disabled: "disabled", opened: "opened", calendarHeaderComponent: "calendarHeaderComponent", startView: "startView", panelClass: "panelClass", dateClass: "dateClass", backdropClass: "backdropClass" }, outputs: { yearSelected: "yearSelected", monthSelected: "monthSelected", openedStream: "opened", closedStream: "closed" }, providers: [{ provide: formField.McFormFieldControl, useExisting: McDatepicker }], exportAs: ["mcDatepicker"], ngImport: i0__namespace, template: '', isInline: true, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush, encapsulation: i0__namespace.ViewEncapsulation.None });
3178
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: McDatepicker, decorators: [{
3179
- type: i0.Component,
3180
- args: [{
3181
- selector: 'mc-datepicker',
3182
- template: '',
3183
- exportAs: 'mcDatepicker',
3184
- changeDetection: i0.ChangeDetectionStrategy.OnPush,
3185
- encapsulation: i0.ViewEncapsulation.None,
3186
- providers: [{ provide: formField.McFormFieldControl, useExisting: McDatepicker }]
3187
- }]
3188
- }], ctorParameters: function () {
3189
- return [{ type: i3__namespace$1.Overlay }, { type: i0__namespace.NgZone }, { type: i0__namespace.ViewContainerRef }, { type: undefined, decorators: [{
3190
- type: i0.Inject,
3191
- args: [MC_DATEPICKER_SCROLL_STRATEGY]
3192
- }] }, { type: i1__namespace$1.DateAdapter, decorators: [{
3193
- type: i0.Optional
3194
- }] }, { type: i2__namespace.Directionality, decorators: [{
3195
- type: i0.Optional
3196
- }] }, { type: undefined, decorators: [{
3197
- type: i0.Optional
3198
- }, {
3199
- type: i0.Inject,
3200
- args: [i1.DOCUMENT]
3201
- }] }];
3202
- }, propDecorators: { hasBackdrop: [{
3203
- type: i0.Input
3204
- }], startAt: [{
3205
- type: i0.Input
3206
- }], disabled: [{
3207
- type: i0.Input
3208
- }], opened: [{
3209
- type: i0.Input
3210
- }], calendarHeaderComponent: [{
3211
- type: i0.Input
3212
- }], startView: [{
3213
- type: i0.Input
3214
- }], yearSelected: [{
3215
- type: i0.Output
3216
- }], monthSelected: [{
3217
- type: i0.Output
3218
- }], panelClass: [{
3219
- type: i0.Input
3220
- }], dateClass: [{
3221
- type: i0.Input
3222
- }], backdropClass: [{
3223
- type: i0.Input
3224
- }], openedStream: [{
3225
- type: i0.Output,
3226
- args: ['opened']
3227
- }], closedStream: [{
3228
- type: i0.Output,
3229
- args: ['closed']
3230
- }] } });
3231
-
3232
- var McDatepickerModule = /** @class */ (function () {
3233
- function McDatepickerModule() {
3234
- }
3235
- return McDatepickerModule;
3236
- }());
3237
- /** @nocollapse */ McDatepickerModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: McDatepickerModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
3238
- /** @nocollapse */ McDatepickerModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: McDatepickerModule, declarations: [McCalendar,
3239
- McCalendarBody,
3240
- McDatepicker,
3241
- McDatepickerContent,
3242
- McDatepickerInput,
3243
- McDatepickerToggle,
3244
- McDatepickerToggleIcon,
3245
- McMonthView,
3246
- McYearView,
3247
- McMultiYearView,
3248
- McCalendarHeader], imports: [i1.CommonModule,
3249
- i3.McButtonModule,
3250
- i3$1.OverlayModule,
3251
- a11y.A11yModule,
3252
- i8.PortalModule,
3253
- i4.McIconModule], exports: [McCalendar,
3254
- McCalendarBody,
3255
- McDatepicker,
3256
- McDatepickerContent,
3257
- McDatepickerInput,
3258
- McDatepickerToggle,
3259
- McDatepickerToggleIcon,
3260
- McMonthView,
3261
- McYearView,
3262
- McMultiYearView,
3263
- McCalendarHeader,
3264
- i3.McButtonModule] });
3265
- /** @nocollapse */ McDatepickerModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: McDatepickerModule, providers: [
3266
- McDatepickerIntl,
3267
- MC_DATEPICKER_SCROLL_STRATEGY_FACTORY_PROVIDER
3268
- ], imports: [[
3269
- i1.CommonModule,
3270
- i3.McButtonModule,
3271
- i3$1.OverlayModule,
3272
- a11y.A11yModule,
3273
- i8.PortalModule,
3274
- i4.McIconModule
3275
- ], i3.McButtonModule] });
3276
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImport: i0__namespace, type: McDatepickerModule, decorators: [{
3277
- type: i0.NgModule,
3278
- args: [{
3279
- imports: [
3280
- i1.CommonModule,
3281
- i3.McButtonModule,
3282
- i3$1.OverlayModule,
3283
- a11y.A11yModule,
3284
- i8.PortalModule,
3285
- i4.McIconModule
3286
- ],
3287
- exports: [
3288
- McCalendar,
3289
- McCalendarBody,
3290
- McDatepicker,
3291
- McDatepickerContent,
3292
- McDatepickerInput,
3293
- McDatepickerToggle,
3294
- McDatepickerToggleIcon,
3295
- McMonthView,
3296
- McYearView,
3297
- McMultiYearView,
3298
- McCalendarHeader,
3299
- i3.McButtonModule
3300
- ],
3301
- declarations: [
3302
- McCalendar,
3303
- McCalendarBody,
3304
- McDatepicker,
3305
- McDatepickerContent,
3306
- McDatepickerInput,
3307
- McDatepickerToggle,
3308
- McDatepickerToggleIcon,
3309
- McMonthView,
3310
- McYearView,
3311
- McMultiYearView,
3312
- McCalendarHeader
3313
- ],
3314
- providers: [
3315
- McDatepickerIntl,
3316
- MC_DATEPICKER_SCROLL_STRATEGY_FACTORY_PROVIDER
3317
- ],
3318
- entryComponents: [
3319
- McDatepickerContent,
3320
- McCalendarHeader
3321
- ]
3322
- }]
3323
- }] });
3324
-
3325
- /**
3326
- * Generated bundle index. Do not edit.
3327
- */
3328
-
3329
- exports.MAX_YEAR = MAX_YEAR;
3330
- exports.MC_DATEPICKER_SCROLL_STRATEGY = MC_DATEPICKER_SCROLL_STRATEGY;
3331
- exports.MC_DATEPICKER_SCROLL_STRATEGY_FACTORY = MC_DATEPICKER_SCROLL_STRATEGY_FACTORY;
3332
- exports.MC_DATEPICKER_SCROLL_STRATEGY_FACTORY_PROVIDER = MC_DATEPICKER_SCROLL_STRATEGY_FACTORY_PROVIDER;
3333
- exports.MC_DATEPICKER_VALIDATORS = MC_DATEPICKER_VALIDATORS;
3334
- exports.MC_DATEPICKER_VALUE_ACCESSOR = MC_DATEPICKER_VALUE_ACCESSOR;
3335
- exports.McCalendar = McCalendar;
3336
- exports.McCalendarBody = McCalendarBody;
3337
- exports.McCalendarCell = McCalendarCell;
3338
- exports.McCalendarHeader = McCalendarHeader;
3339
- exports.McDatepicker = McDatepicker;
3340
- exports.McDatepickerContent = McDatepickerContent;
3341
- exports.McDatepickerInput = McDatepickerInput;
3342
- exports.McDatepickerInputEvent = McDatepickerInputEvent;
3343
- exports.McDatepickerIntl = McDatepickerIntl;
3344
- exports.McDatepickerModule = McDatepickerModule;
3345
- exports.McDatepickerToggle = McDatepickerToggle;
3346
- exports.McDatepickerToggleIcon = McDatepickerToggleIcon;
3347
- exports.McMonthView = McMonthView;
3348
- exports.McMultiYearView = McMultiYearView;
3349
- exports.McYearView = McYearView;
3350
- exports.mcDatepickerAnimations = mcDatepickerAnimations;
3351
- exports.yearsPerPage = yearsPerPage;
3352
- exports.yearsPerRow = yearsPerRow;
3353
-
3354
- Object.defineProperty(exports, '__esModule', { value: true });
3355
-
3356
- })));
3357
- //# sourceMappingURL=ptsecurity-mosaic-datepicker.umd.js.map