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