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