@ptsecurity/mosaic 12.3.0 → 13.1.1

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 (905) hide show
  1. package/_theming.scss +978 -781
  2. package/_visual.scss +848 -692
  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/pop-up/pop-up.d.ts +1 -0
  20. package/core/public-api.d.ts +1 -0
  21. package/core/version.d.ts +2 -0
  22. package/datepicker/README.md +0 -0
  23. package/datepicker/package.json +5 -5
  24. package/design-tokens/{tokens → legacy-2017/tokens}/components/alert.json5 +0 -0
  25. package/design-tokens/{tokens → legacy-2017/tokens}/components/autocomplete.json5 +0 -0
  26. package/design-tokens/{tokens → legacy-2017/tokens}/components/badge.json5 +0 -0
  27. package/design-tokens/{tokens → legacy-2017/tokens}/components/button-toggle.json5 +0 -0
  28. package/design-tokens/{tokens → legacy-2017/tokens}/components/button.json5 +0 -0
  29. package/design-tokens/{tokens → legacy-2017/tokens}/components/card.json5 +0 -0
  30. package/design-tokens/legacy-2017/tokens/components/checkbox.json5 +39 -0
  31. package/design-tokens/{tokens → legacy-2017/tokens}/components/datepicker.json5 +0 -0
  32. package/design-tokens/{tokens → legacy-2017/tokens}/components/divider.json5 +0 -0
  33. package/design-tokens/{tokens → legacy-2017/tokens}/components/dropdown.json5 +0 -0
  34. package/design-tokens/{tokens → legacy-2017/tokens}/components/form-field.json5 +0 -0
  35. package/design-tokens/{tokens → legacy-2017/tokens}/components/forms.json5 +0 -0
  36. package/design-tokens/{tokens → legacy-2017/tokens}/components/input.json5 +0 -0
  37. package/design-tokens/{tokens → legacy-2017/tokens}/components/link.json5 +0 -0
  38. package/design-tokens/{tokens → legacy-2017/tokens}/components/list.json5 +0 -0
  39. package/design-tokens/legacy-2017/tokens/components/modal.json5 +79 -0
  40. package/design-tokens/legacy-2017/tokens/components/navbar.json5 +69 -0
  41. package/design-tokens/{tokens → legacy-2017/tokens}/components/optgroup.json5 +0 -0
  42. package/design-tokens/{tokens → legacy-2017/tokens}/components/option.json5 +0 -0
  43. package/design-tokens/{tokens → legacy-2017/tokens}/components/popover.json5 +0 -0
  44. package/design-tokens/{tokens → legacy-2017/tokens}/components/popup.json5 +0 -0
  45. package/design-tokens/{tokens → legacy-2017/tokens}/components/progress-bar.json5 +0 -0
  46. package/design-tokens/{tokens → legacy-2017/tokens}/components/progress-spinner.json5 +0 -0
  47. package/design-tokens/legacy-2017/tokens/components/radio.json5 +44 -0
  48. package/design-tokens/{tokens → legacy-2017/tokens}/components/select.json5 +0 -0
  49. package/design-tokens/{tokens → legacy-2017/tokens}/components/sidepanel.json5 +0 -0
  50. package/design-tokens/{tokens → legacy-2017/tokens}/components/table.json5 +0 -0
  51. package/design-tokens/{tokens → legacy-2017/tokens}/components/tabs.json5 +0 -0
  52. package/design-tokens/legacy-2017/tokens/components/tags.json5 +132 -0
  53. package/design-tokens/{tokens → legacy-2017/tokens}/components/textarea.json5 +0 -0
  54. package/design-tokens/{tokens → legacy-2017/tokens}/components/timepicker.json5 +0 -0
  55. package/design-tokens/legacy-2017/tokens/components/toggle.json5 +79 -0
  56. package/design-tokens/{tokens → legacy-2017/tokens}/components/tooltip.json5 +0 -0
  57. package/design-tokens/{tokens → legacy-2017/tokens}/components/tree.json5 +0 -0
  58. package/design-tokens/{tokens → legacy-2017/tokens}/properties/aliases.json5 +0 -0
  59. package/design-tokens/{tokens → legacy-2017/tokens}/properties/colors.json5 +0 -0
  60. package/design-tokens/{tokens → legacy-2017/tokens}/properties/font.json5 +0 -0
  61. package/design-tokens/{tokens → legacy-2017/tokens}/properties/globals.json5 +0 -0
  62. package/design-tokens/{tokens → legacy-2017/tokens}/properties/padding.json5 +0 -0
  63. package/design-tokens/{tokens → legacy-2017/tokens}/properties/palette.json5 +0 -0
  64. package/design-tokens/{tokens → legacy-2017/tokens}/properties/typography.json5 +0 -0
  65. package/design-tokens/legacy-2017/tokens.d.ts +7659 -0
  66. package/design-tokens/package.json +5 -5
  67. package/design-tokens/pt-2022/tokens/components/alert.json5 +83 -0
  68. package/design-tokens/pt-2022/tokens/components/autocomplete.json5 +11 -0
  69. package/design-tokens/pt-2022/tokens/components/badge.json5 +184 -0
  70. package/design-tokens/pt-2022/tokens/components/button-toggle.json5 +10 -0
  71. package/design-tokens/pt-2022/tokens/components/button.json5 +143 -0
  72. package/design-tokens/pt-2022/tokens/components/card.json5 +51 -0
  73. package/design-tokens/pt-2022/tokens/components/checkbox.json5 +39 -0
  74. package/design-tokens/pt-2022/tokens/components/datepicker.json5 +64 -0
  75. package/design-tokens/pt-2022/tokens/components/divider.json5 +8 -0
  76. package/design-tokens/pt-2022/tokens/components/dropdown.json5 +47 -0
  77. package/design-tokens/pt-2022/tokens/components/form-field.json5 +52 -0
  78. package/design-tokens/pt-2022/tokens/components/forms.json5 +52 -0
  79. package/design-tokens/pt-2022/tokens/components/input.json5 +13 -0
  80. package/design-tokens/pt-2022/tokens/components/link.json5 +56 -0
  81. package/design-tokens/pt-2022/tokens/components/list.json5 +15 -0
  82. package/design-tokens/pt-2022/tokens/components/modal.json5 +79 -0
  83. package/design-tokens/pt-2022/tokens/components/navbar.json5 +69 -0
  84. package/design-tokens/pt-2022/tokens/components/optgroup.json5 +10 -0
  85. package/design-tokens/pt-2022/tokens/components/option.json5 +12 -0
  86. package/design-tokens/pt-2022/tokens/components/popover.json5 +68 -0
  87. package/design-tokens/pt-2022/tokens/components/popup.json5 +18 -0
  88. package/design-tokens/pt-2022/tokens/components/progress-bar.json5 +13 -0
  89. package/design-tokens/pt-2022/tokens/components/progress-spinner.json5 +7 -0
  90. package/design-tokens/pt-2022/tokens/components/radio.json5 +44 -0
  91. package/design-tokens/pt-2022/tokens/components/select.json5 +25 -0
  92. package/design-tokens/pt-2022/tokens/components/sidepanel.json5 +30 -0
  93. package/design-tokens/pt-2022/tokens/components/table.json5 +15 -0
  94. package/design-tokens/pt-2022/tokens/components/tabs.json5 +25 -0
  95. package/design-tokens/pt-2022/tokens/components/tags.json5 +132 -0
  96. package/design-tokens/pt-2022/tokens/components/textarea.json5 +12 -0
  97. package/design-tokens/pt-2022/tokens/components/timepicker.json5 +7 -0
  98. package/design-tokens/pt-2022/tokens/components/toggle.json5 +79 -0
  99. package/design-tokens/pt-2022/tokens/components/tooltip.json5 +83 -0
  100. package/design-tokens/pt-2022/tokens/components/tree.json5 +12 -0
  101. package/design-tokens/pt-2022/tokens/properties/aliases.json5 +3 -0
  102. package/design-tokens/pt-2022/tokens/properties/colors.json5 +112 -0
  103. package/design-tokens/pt-2022/tokens/properties/font.json5 +15 -0
  104. package/design-tokens/pt-2022/tokens/properties/globals.json5 +30 -0
  105. package/design-tokens/pt-2022/tokens/properties/padding.json5 +3 -0
  106. package/design-tokens/pt-2022/tokens/properties/palette.json5 +226 -0
  107. package/design-tokens/pt-2022/tokens/properties/typography.json5 +140 -0
  108. package/design-tokens/pt-2022/tokens.d.ts +8696 -0
  109. package/design-tokens/public-api.d.ts +3 -1
  110. package/divider/README.md +0 -0
  111. package/divider/package.json +5 -5
  112. package/dropdown/package.json +5 -5
  113. package/esm2020/autocomplete/autocomplete-origin.directive.mjs +21 -0
  114. package/esm2020/autocomplete/autocomplete-trigger.directive.mjs +555 -0
  115. package/esm2020/autocomplete/autocomplete.component.mjs +154 -0
  116. package/esm2020/autocomplete/autocomplete.module.mjs +34 -0
  117. package/{esm2015/autocomplete/index.js → esm2020/autocomplete/index.mjs} +0 -0
  118. package/{esm2015/autocomplete/ptsecurity-mosaic-autocomplete.js → esm2020/autocomplete/ptsecurity-mosaic-autocomplete.mjs} +0 -0
  119. package/{esm2015/autocomplete/public-api.js → esm2020/autocomplete/public-api.mjs} +0 -0
  120. package/esm2020/button/button.component.mjs +129 -0
  121. package/esm2020/button/button.module.mjs +38 -0
  122. package/{esm2015/button/index.js → esm2020/button/index.mjs} +0 -0
  123. package/{esm2015/button/ptsecurity-mosaic-button.js → esm2020/button/ptsecurity-mosaic-button.mjs} +0 -0
  124. package/{esm2015/button/public-api.js → esm2020/button/public-api.mjs} +0 -0
  125. package/esm2020/button-toggle/button-toggle.component.mjs +362 -0
  126. package/esm2020/button-toggle/button-toggle.module.mjs +19 -0
  127. package/{esm2015/button-toggle/index.js → esm2020/button-toggle/index.mjs} +0 -0
  128. package/{esm2015/button-toggle/ptsecurity-mosaic-button-toggle.js → esm2020/button-toggle/ptsecurity-mosaic-button-toggle.mjs} +0 -0
  129. package/{esm2015/button-toggle/public-api.js → esm2020/button-toggle/public-api.mjs} +0 -0
  130. package/esm2020/card/card.component.mjs +80 -0
  131. package/esm2020/card/card.module.mjs +30 -0
  132. package/{esm2015/card/index.js → esm2020/card/index.mjs} +0 -0
  133. package/{esm2015/card/ptsecurity-mosaic-card.js → esm2020/card/ptsecurity-mosaic-card.mjs} +0 -0
  134. package/{esm2015/card/public-api.js → esm2020/card/public-api.mjs} +0 -0
  135. package/{esm2015/checkbox/checkbox-config.js → esm2020/checkbox/checkbox-config.mjs} +0 -0
  136. package/esm2020/checkbox/checkbox-module.mjs +19 -0
  137. package/esm2020/checkbox/checkbox-required-validator.mjs +27 -0
  138. package/esm2020/checkbox/checkbox.mjs +315 -0
  139. package/{esm2015/checkbox/index.js → esm2020/checkbox/index.mjs} +0 -0
  140. package/{esm2015/checkbox/ptsecurity-mosaic-checkbox.js → esm2020/checkbox/ptsecurity-mosaic-checkbox.mjs} +0 -0
  141. package/{esm2015/checkbox/public-api.js → esm2020/checkbox/public-api.mjs} +0 -0
  142. package/{esm2015/core/animation/animation.js → esm2020/core/animation/animation.mjs} +0 -0
  143. package/{esm2015/core/animation/fade-animations.js → esm2020/core/animation/fade-animations.mjs} +0 -0
  144. package/{esm2015/core/animation/index.js → esm2020/core/animation/index.mjs} +0 -0
  145. package/{esm2015/core/animation/select-animations.js → esm2020/core/animation/select-animations.mjs} +0 -0
  146. package/{esm2015/core/common-behaviors/color.js → esm2020/core/common-behaviors/color.mjs} +0 -0
  147. package/esm2020/core/common-behaviors/common-module.mjs +83 -0
  148. package/{esm2015/core/common-behaviors/constructor.js → esm2020/core/common-behaviors/constructor.mjs} +0 -0
  149. package/{esm2015/core/common-behaviors/disabled.js → esm2020/core/common-behaviors/disabled.mjs} +0 -0
  150. package/{esm2015/core/common-behaviors/error-state.js → esm2020/core/common-behaviors/error-state.mjs} +0 -0
  151. package/{esm2015/core/common-behaviors/index.js → esm2020/core/common-behaviors/index.mjs} +0 -0
  152. package/{esm2015/core/common-behaviors/tabindex.js → esm2020/core/common-behaviors/tabindex.mjs} +0 -0
  153. package/esm2020/core/error/error-options.mjs +26 -0
  154. package/esm2020/core/formatters/date/formatter.mjs +359 -0
  155. package/esm2020/core/formatters/date/templates/en-US.mjs +281 -0
  156. package/esm2020/core/formatters/date/templates/ru-RU.mjs +281 -0
  157. package/esm2020/core/formatters/index.mjs +20 -0
  158. package/esm2020/core/formatters/number/formatter.mjs +105 -0
  159. package/esm2020/core/forms/forms-module.mjs +24 -0
  160. package/esm2020/core/forms/forms.directive.mjs +66 -0
  161. package/{esm2015/core/forms/index.js → esm2020/core/forms/index.mjs} +0 -0
  162. package/esm2020/core/highlight/highlight.pipe.mjs +17 -0
  163. package/esm2020/core/highlight/index.mjs +19 -0
  164. package/{esm2015/core/index.js → esm2020/core/index.mjs} +0 -0
  165. package/{esm2015/core/label/label-options.js → esm2020/core/label/label-options.mjs} +0 -0
  166. package/esm2020/core/line/line.mjs +70 -0
  167. package/esm2020/core/option/action.mjs +121 -0
  168. package/{esm2015/core/option/index.js → esm2020/core/option/index.mjs} +0 -0
  169. package/esm2020/core/option/optgroup.mjs +31 -0
  170. package/esm2020/core/option/option-module.mjs +21 -0
  171. package/esm2020/core/option/option.mjs +254 -0
  172. package/{esm2015/core/overlay/overlay-position-map.js → esm2020/core/overlay/overlay-position-map.mjs} +0 -0
  173. package/{esm2015/core/pop-up/constants.js → esm2020/core/pop-up/constants.mjs} +0 -0
  174. package/{esm2015/core/pop-up/index.js → esm2020/core/pop-up/index.mjs} +0 -0
  175. package/esm2020/core/pop-up/pop-up-trigger.mjs +239 -0
  176. package/esm2020/core/pop-up/pop-up.mjs +94 -0
  177. package/{esm2015/core/ptsecurity-mosaic-core.js → esm2020/core/ptsecurity-mosaic-core.mjs} +0 -0
  178. package/esm2020/core/public-api.mjs +18 -0
  179. package/{esm2015/core/select/constants.js → esm2020/core/select/constants.mjs} +0 -0
  180. package/{esm2015/core/select/errors.js → esm2020/core/select/errors.mjs} +0 -0
  181. package/{esm2015/core/select/events.js → esm2020/core/select/events.mjs} +0 -0
  182. package/{esm2015/core/select/index.js → esm2020/core/select/index.mjs} +0 -0
  183. package/{esm2015/core/selection/constants.js → esm2020/core/selection/constants.mjs} +0 -0
  184. package/{esm2015/core/selection/index.js → esm2020/core/selection/index.mjs} +0 -0
  185. package/esm2020/core/selection/pseudo-checkbox/pseudo-checkbox.mjs +37 -0
  186. package/esm2020/core/selection/pseudo-checkbox/pseudo-checkbox.module.mjs +18 -0
  187. package/esm2020/core/services/measure-scrollbar.service.mjs +48 -0
  188. package/{esm2015/core/utils/index.js → esm2020/core/utils/index.mjs} +0 -0
  189. package/{esm2015/core/utils/public-api.js → esm2020/core/utils/public-api.mjs} +0 -0
  190. package/{esm2015/core/utils/utils.js → esm2020/core/utils/utils.mjs} +0 -0
  191. package/{esm2015/core/validation/index.js → esm2020/core/validation/index.mjs} +0 -0
  192. package/{esm2015/core/validation/validation.js → esm2020/core/validation/validation.mjs} +0 -0
  193. package/esm2020/core/version.mjs +3 -0
  194. package/esm2020/datepicker/calendar-body.component.mjs +106 -0
  195. package/esm2020/datepicker/calendar.component.mjs +362 -0
  196. package/{esm2015/datepicker/datepicker-animations.js → esm2020/datepicker/datepicker-animations.mjs} +0 -0
  197. package/{esm2015/datepicker/datepicker-errors.js → esm2020/datepicker/datepicker-errors.mjs} +0 -0
  198. package/esm2020/datepicker/datepicker-input.directive.mjs +900 -0
  199. package/esm2020/datepicker/datepicker-intl.mjs +40 -0
  200. package/esm2020/datepicker/datepicker-module.mjs +107 -0
  201. package/esm2020/datepicker/datepicker-toggle.component.mjs +86 -0
  202. package/esm2020/datepicker/datepicker.component.mjs +408 -0
  203. package/{esm2015/datepicker/index.js → esm2020/datepicker/index.mjs} +0 -0
  204. package/esm2020/datepicker/month-view.component.mjs +257 -0
  205. package/esm2020/datepicker/multi-year-view.component.mjs +218 -0
  206. package/{esm2015/datepicker/ptsecurity-mosaic-datepicker.js → esm2020/datepicker/ptsecurity-mosaic-datepicker.mjs} +0 -0
  207. package/{esm2015/datepicker/public-api.js → esm2020/datepicker/public-api.mjs} +0 -0
  208. package/esm2020/datepicker/year-view.component.mjs +253 -0
  209. package/{esm2015/design-tokens/index.js → esm2020/design-tokens/index.mjs} +0 -0
  210. package/esm2020/design-tokens/legacy-2017/tokens.mjs +953 -0
  211. package/esm2020/design-tokens/pt-2022/tokens.mjs +1013 -0
  212. package/{esm2015/design-tokens/ptsecurity-mosaic-design-tokens.js → esm2020/design-tokens/ptsecurity-mosaic-design-tokens.mjs} +0 -0
  213. package/esm2020/design-tokens/public-api.mjs +4 -0
  214. package/esm2020/divider/divider.component.mjs +39 -0
  215. package/esm2020/divider/divider.module.mjs +18 -0
  216. package/{esm2015/divider/index.js → esm2020/divider/index.mjs} +0 -0
  217. package/{esm2015/divider/ptsecurity-mosaic-divider.js → esm2020/divider/ptsecurity-mosaic-divider.mjs} +0 -0
  218. package/{esm2015/divider/public-api.js → esm2020/divider/public-api.mjs} +0 -0
  219. package/{esm2015/dropdown/dropdown-animations.js → esm2020/dropdown/dropdown-animations.mjs} +0 -0
  220. package/esm2020/dropdown/dropdown-content.directive.mjs +64 -0
  221. package/{esm2015/dropdown/dropdown-errors.js → esm2020/dropdown/dropdown-errors.mjs} +0 -0
  222. package/esm2020/dropdown/dropdown-item.component.mjs +139 -0
  223. package/esm2020/dropdown/dropdown-trigger.directive.mjs +485 -0
  224. package/esm2020/dropdown/dropdown.component.mjs +292 -0
  225. package/esm2020/dropdown/dropdown.module.mjs +50 -0
  226. package/{esm2015/dropdown/dropdown.types.js → esm2020/dropdown/dropdown.types.mjs} +0 -0
  227. package/{esm2015/dropdown/index.js → esm2020/dropdown/index.mjs} +0 -0
  228. package/{esm2015/dropdown/ptsecurity-mosaic-dropdown.js → esm2020/dropdown/ptsecurity-mosaic-dropdown.mjs} +0 -0
  229. package/{esm2015/dropdown/public-api.js → esm2020/dropdown/public-api.mjs} +0 -0
  230. package/esm2020/form-field/cleaner.mjs +23 -0
  231. package/{esm2015/form-field/form-field-control.js → esm2020/form-field/form-field-control.mjs} +0 -0
  232. package/{esm2015/form-field/form-field-errors.js → esm2020/form-field/form-field-errors.mjs} +0 -0
  233. package/esm2020/form-field/form-field.mjs +205 -0
  234. package/esm2020/form-field/form-field.module.mjs +52 -0
  235. package/esm2020/form-field/hint.mjs +23 -0
  236. package/{esm2015/form-field/index.js → esm2020/form-field/index.mjs} +0 -0
  237. package/esm2020/form-field/prefix.mjs +13 -0
  238. package/{esm2015/form-field/ptsecurity-mosaic-form-field.js → esm2020/form-field/ptsecurity-mosaic-form-field.mjs} +0 -0
  239. package/{esm2015/form-field/public-api.js → esm2020/form-field/public-api.mjs} +0 -0
  240. package/esm2020/form-field/stepper.mjs +55 -0
  241. package/esm2020/form-field/suffix.mjs +13 -0
  242. package/esm2020/icon/icon.component.mjs +44 -0
  243. package/esm2020/icon/icon.module.mjs +38 -0
  244. package/{esm2015/icon/index.js → esm2020/icon/index.mjs} +0 -0
  245. package/{esm2015/icon/ptsecurity-mosaic-icon.js → esm2020/icon/ptsecurity-mosaic-icon.mjs} +0 -0
  246. package/{esm2015/icon/public-api.js → esm2020/icon/public-api.mjs} +0 -0
  247. package/{esm2015/index.js → esm2020/index.mjs} +0 -0
  248. package/{esm2015/input/index.js → esm2020/input/index.mjs} +0 -0
  249. package/{esm2015/input/input-errors.js → esm2020/input/input-errors.mjs} +0 -0
  250. package/esm2020/input/input-number-validators.mjs +92 -0
  251. package/esm2020/input/input-number.mjs +163 -0
  252. package/{esm2015/input/input-value-accessor.js → esm2020/input/input-value-accessor.mjs} +0 -0
  253. package/esm2020/input/input.mjs +333 -0
  254. package/esm2020/input/input.module.mjs +23 -0
  255. package/{esm2015/input/ptsecurity-mosaic-input.js → esm2020/input/ptsecurity-mosaic-input.mjs} +0 -0
  256. package/{esm2015/input/public-api.js → esm2020/input/public-api.mjs} +0 -0
  257. package/{esm2015/link/index.js → esm2020/link/index.mjs} +0 -0
  258. package/esm2020/link/link.component.mjs +107 -0
  259. package/esm2020/link/link.module.mjs +26 -0
  260. package/{esm2015/link/ptsecurity-mosaic-link.js → esm2020/link/ptsecurity-mosaic-link.mjs} +0 -0
  261. package/{esm2015/link/public-api.js → esm2020/link/public-api.mjs} +0 -0
  262. package/{esm2015/list/index.js → esm2020/list/index.mjs} +0 -0
  263. package/esm2020/list/list-selection.component.mjs +687 -0
  264. package/esm2020/list/list.component.mjs +44 -0
  265. package/esm2020/list/list.module.mjs +55 -0
  266. package/{esm2015/list/ptsecurity-mosaic-list.js → esm2020/list/ptsecurity-mosaic-list.mjs} +0 -0
  267. package/{esm2015/list/public-api.js → esm2020/list/public-api.mjs} +0 -0
  268. package/esm2020/modal/css-unit.pipe.mjs +17 -0
  269. package/{esm2015/modal/index.js → esm2020/modal/index.mjs} +0 -0
  270. package/esm2020/modal/modal-control.service.mjs +85 -0
  271. package/{esm2015/modal/modal-ref.class.js → esm2020/modal/modal-ref.class.mjs} +0 -0
  272. package/{esm2015/modal/modal-util.js → esm2020/modal/modal-util.mjs} +0 -0
  273. package/esm2020/modal/modal.component.mjs +501 -0
  274. package/esm2020/modal/modal.directive.mjs +52 -0
  275. package/esm2020/modal/modal.module.mjs +72 -0
  276. package/esm2020/modal/modal.service.mjs +124 -0
  277. package/{esm2015/modal/modal.type.js → esm2020/modal/modal.type.mjs} +0 -0
  278. package/{esm2015/modal/ptsecurity-mosaic-modal.js → esm2020/modal/ptsecurity-mosaic-modal.mjs} +0 -0
  279. package/{esm2015/modal/public-api.js → esm2020/modal/public-api.mjs} +0 -0
  280. package/{esm2015/navbar/index.js → esm2020/navbar/index.mjs} +0 -0
  281. package/esm2020/navbar/navbar-item.component.mjs +583 -0
  282. package/esm2020/navbar/navbar.component.mjs +237 -0
  283. package/esm2020/navbar/navbar.module.mjs +92 -0
  284. package/{esm2015/navbar/ptsecurity-mosaic-navbar.js → esm2020/navbar/ptsecurity-mosaic-navbar.mjs} +0 -0
  285. package/{esm2015/navbar/public-api.js → esm2020/navbar/public-api.mjs} +0 -0
  286. package/esm2020/navbar/vertical-navbar.animation.mjs +10 -0
  287. package/esm2020/navbar/vertical-navbar.component.mjs +114 -0
  288. package/{esm2015/popover/index.js → esm2020/popover/index.mjs} +0 -0
  289. package/{esm2015/popover/popover-animations.js → esm2020/popover/popover-animations.mjs} +0 -0
  290. package/esm2020/popover/popover-confirm.component.mjs +108 -0
  291. package/esm2020/popover/popover.component.mjs +253 -0
  292. package/esm2020/popover/popover.module.mjs +24 -0
  293. package/{esm2015/popover/ptsecurity-mosaic-popover.js → esm2020/popover/ptsecurity-mosaic-popover.mjs} +0 -0
  294. package/{esm2015/popover/public-api.js → esm2020/popover/public-api.mjs} +0 -0
  295. package/{esm2015/progress-bar/index.js → esm2020/progress-bar/index.mjs} +0 -0
  296. package/esm2020/progress-bar/progress-bar.component.mjs +42 -0
  297. package/esm2020/progress-bar/progress-bar.module.mjs +30 -0
  298. package/{esm2015/progress-bar/ptsecurity-mosaic-progress-bar.js → esm2020/progress-bar/ptsecurity-mosaic-progress-bar.mjs} +0 -0
  299. package/{esm2015/progress-bar/public-api.js → esm2020/progress-bar/public-api.mjs} +0 -0
  300. package/{esm2015/progress-spinner/index.js → esm2020/progress-spinner/index.mjs} +0 -0
  301. package/esm2020/progress-spinner/progress-spinner.component.mjs +46 -0
  302. package/esm2020/progress-spinner/progress-spinner.module.mjs +30 -0
  303. package/{esm2015/progress-spinner/ptsecurity-mosaic-progress-spinner.js → esm2020/progress-spinner/ptsecurity-mosaic-progress-spinner.mjs} +0 -0
  304. package/{esm2015/progress-spinner/public-api.js → esm2020/progress-spinner/public-api.mjs} +0 -0
  305. package/{esm2015/ptsecurity-mosaic.js → esm2020/ptsecurity-mosaic.mjs} +0 -0
  306. package/{esm2015/public-api.js → esm2020/public-api.mjs} +0 -0
  307. package/{esm2015/radio/index.js → esm2020/radio/index.mjs} +0 -0
  308. package/{esm2015/radio/ptsecurity-mosaic-radio.js → esm2020/radio/ptsecurity-mosaic-radio.mjs} +0 -0
  309. package/{esm2015/radio/public-api.js → esm2020/radio/public-api.mjs} +0 -0
  310. package/esm2020/radio/radio.component.mjs +458 -0
  311. package/esm2020/radio/radio.module.mjs +20 -0
  312. package/{esm2015/select/index.js → esm2020/select/index.mjs} +0 -0
  313. package/{esm2015/select/ptsecurity-mosaic-select.js → esm2020/select/ptsecurity-mosaic-select.mjs} +0 -0
  314. package/{esm2015/select/public-api.js → esm2020/select/public-api.mjs} +0 -0
  315. package/esm2020/select/select.component.mjs +1110 -0
  316. package/esm2020/select/select.module.mjs +64 -0
  317. package/{esm2015/sidebar/index.js → esm2020/sidebar/index.mjs} +0 -0
  318. package/{esm2015/sidebar/ptsecurity-mosaic-sidebar.js → esm2020/sidebar/ptsecurity-mosaic-sidebar.mjs} +0 -0
  319. package/{esm2015/sidebar/public-api.js → esm2020/sidebar/public-api.mjs} +0 -0
  320. package/{esm2015/sidebar/sidebar-animations.js → esm2020/sidebar/sidebar-animations.mjs} +0 -0
  321. package/esm2020/sidebar/sidebar.component.mjs +146 -0
  322. package/esm2020/sidebar/sidebar.module.mjs +30 -0
  323. package/{esm2015/sidepanel/index.js → esm2020/sidepanel/index.mjs} +0 -0
  324. package/{esm2015/sidepanel/ptsecurity-mosaic-sidepanel.js → esm2020/sidepanel/ptsecurity-mosaic-sidepanel.mjs} +0 -0
  325. package/{esm2015/sidepanel/public-api.js → esm2020/sidepanel/public-api.mjs} +0 -0
  326. package/{esm2015/sidepanel/sidepanel-animations.js → esm2020/sidepanel/sidepanel-animations.mjs} +0 -0
  327. package/{esm2015/sidepanel/sidepanel-config.js → esm2020/sidepanel/sidepanel-config.mjs} +0 -0
  328. package/esm2020/sidepanel/sidepanel-container.component.mjs +106 -0
  329. package/esm2020/sidepanel/sidepanel-directives.mjs +159 -0
  330. package/{esm2015/sidepanel/sidepanel-ref.js → esm2020/sidepanel/sidepanel-ref.mjs} +0 -0
  331. package/esm2020/sidepanel/sidepanel.module.mjs +74 -0
  332. package/esm2020/sidepanel/sidepanel.service.mjs +167 -0
  333. package/{esm2015/splitter/index.js → esm2020/splitter/index.mjs} +0 -0
  334. package/{esm2015/splitter/ptsecurity-mosaic-splitter.js → esm2020/splitter/ptsecurity-mosaic-splitter.mjs} +0 -0
  335. package/{esm2015/splitter/public-api.js → esm2020/splitter/public-api.mjs} +0 -0
  336. package/esm2020/splitter/splitter.component.mjs +482 -0
  337. package/esm2020/splitter/splitter.module.mjs +40 -0
  338. package/{esm2015/table/index.js → esm2020/table/index.mjs} +0 -0
  339. package/{esm2015/table/ptsecurity-mosaic-table.js → esm2020/table/ptsecurity-mosaic-table.mjs} +0 -0
  340. package/{esm2015/table/public-api.js → esm2020/table/public-api.mjs} +0 -0
  341. package/esm2020/table/table.component.mjs +16 -0
  342. package/esm2020/table/table.module.mjs +30 -0
  343. package/{esm2015/tabs/index.js → esm2020/tabs/index.mjs} +0 -0
  344. package/esm2020/tabs/paginated-tab-header.mjs +479 -0
  345. package/{esm2015/tabs/ptsecurity-mosaic-tabs.js → esm2020/tabs/ptsecurity-mosaic-tabs.mjs} +0 -0
  346. package/{esm2015/tabs/public-api.js → esm2020/tabs/public-api.mjs} +0 -0
  347. package/esm2020/tabs/tab-body.component.mjs +178 -0
  348. package/esm2020/tabs/tab-content.directive.mjs +15 -0
  349. package/esm2020/tabs/tab-group.component.mjs +350 -0
  350. package/esm2020/tabs/tab-header.component.mjs +67 -0
  351. package/esm2020/tabs/tab-label-wrapper.directive.mjs +78 -0
  352. package/esm2020/tabs/tab-label.directive.mjs +17 -0
  353. package/{esm2015/tabs/tab-nav-bar/index.js → esm2020/tabs/tab-nav-bar/index.mjs} +0 -0
  354. package/esm2020/tabs/tab-nav-bar/tab-nav-bar.mjs +110 -0
  355. package/esm2020/tabs/tab.component.mjs +133 -0
  356. package/{esm2015/tabs/tabs-animations.js → esm2020/tabs/tabs-animations.mjs} +0 -0
  357. package/esm2020/tabs/tabs.module.mjs +104 -0
  358. package/{esm2015/tags/index.js → esm2020/tags/index.mjs} +0 -0
  359. package/{esm2015/tags/ptsecurity-mosaic-tags.js → esm2020/tags/ptsecurity-mosaic-tags.mjs} +0 -0
  360. package/{esm2015/tags/public-api.js → esm2020/tags/public-api.mjs} +0 -0
  361. package/{esm2015/tags/tag-default-options.js → esm2020/tags/tag-default-options.mjs} +0 -0
  362. package/esm2020/tags/tag-input.mjs +229 -0
  363. package/esm2020/tags/tag-list.component.mjs +722 -0
  364. package/{esm2015/tags/tag-text-control.js → esm2020/tags/tag-text-control.mjs} +0 -0
  365. package/esm2020/tags/tag.component.mjs +377 -0
  366. package/esm2020/tags/tag.module.mjs +56 -0
  367. package/{esm2015/textarea/index.js → esm2020/textarea/index.mjs} +0 -0
  368. package/{esm2015/textarea/ptsecurity-mosaic-textarea.js → esm2020/textarea/ptsecurity-mosaic-textarea.mjs} +0 -0
  369. package/{esm2015/textarea/public-api.js → esm2020/textarea/public-api.mjs} +0 -0
  370. package/esm2020/textarea/textarea.component.mjs +268 -0
  371. package/esm2020/textarea/textarea.module.mjs +21 -0
  372. package/{esm2015/timepicker/index.js → esm2020/timepicker/index.mjs} +0 -0
  373. package/{esm2015/timepicker/ptsecurity-mosaic-timepicker.js → esm2020/timepicker/ptsecurity-mosaic-timepicker.mjs} +0 -0
  374. package/{esm2015/timepicker/public-api.js → esm2020/timepicker/public-api.mjs} +0 -0
  375. package/{esm2015/timepicker/timepicker.constants.js → esm2020/timepicker/timepicker.constants.mjs} +0 -0
  376. package/esm2020/timepicker/timepicker.directive.mjs +653 -0
  377. package/esm2020/timepicker/timepicker.module.mjs +34 -0
  378. package/{esm2015/toggle/index.js → esm2020/toggle/index.mjs} +0 -0
  379. package/{esm2015/toggle/ptsecurity-mosaic-toggle.js → esm2020/toggle/ptsecurity-mosaic-toggle.mjs} +0 -0
  380. package/{esm2015/toggle/public-api.js → esm2020/toggle/public-api.mjs} +0 -0
  381. package/esm2020/toggle/toggle.component.mjs +158 -0
  382. package/esm2020/toggle/toggle.module.mjs +20 -0
  383. package/{esm2015/tooltip/index.js → esm2020/tooltip/index.mjs} +0 -0
  384. package/{esm2015/tooltip/ptsecurity-mosaic-tooltip.js → esm2020/tooltip/ptsecurity-mosaic-tooltip.mjs} +0 -0
  385. package/{esm2015/tooltip/public-api.js → esm2020/tooltip/public-api.mjs} +0 -0
  386. package/{esm2015/tooltip/tooltip.animations.js → esm2020/tooltip/tooltip.animations.mjs} +0 -0
  387. package/esm2020/tooltip/tooltip.component.mjs +294 -0
  388. package/esm2020/tooltip/tooltip.module.mjs +43 -0
  389. package/{esm2015/tree/control/base-tree-control.js → esm2020/tree/control/base-tree-control.mjs} +0 -0
  390. package/{esm2015/tree/control/flat-tree-control.js → esm2020/tree/control/flat-tree-control.mjs} +0 -0
  391. package/{esm2015/tree/control/nested-tree-control.js → esm2020/tree/control/nested-tree-control.mjs} +0 -0
  392. package/{esm2015/tree/control/tree-control.js → esm2020/tree/control/tree-control.mjs} +0 -0
  393. package/esm2020/tree/data-source/flat-data-source.mjs +162 -0
  394. package/{esm2015/tree/data-source/nested-data-source.js → esm2020/tree/data-source/nested-data-source.mjs} +0 -0
  395. package/{esm2015/tree/index.js → esm2020/tree/index.mjs} +0 -0
  396. package/esm2020/tree/node.mjs +31 -0
  397. package/esm2020/tree/outlet.mjs +15 -0
  398. package/esm2020/tree/padding.directive.mjs +110 -0
  399. package/{esm2015/tree/ptsecurity-mosaic-tree.js → esm2020/tree/ptsecurity-mosaic-tree.mjs} +0 -0
  400. package/{esm2015/tree/public-api.js → esm2020/tree/public-api.mjs} +0 -0
  401. package/esm2020/tree/toggle.mjs +80 -0
  402. package/esm2020/tree/tree-base.mjs +243 -0
  403. package/{esm2015/tree/tree-errors.js → esm2020/tree/tree-errors.mjs} +0 -0
  404. package/esm2020/tree/tree-option.component.mjs +234 -0
  405. package/esm2020/tree/tree-selection.component.mjs +533 -0
  406. package/esm2020/tree/tree.mjs +15 -0
  407. package/esm2020/tree/tree.module.mjs +53 -0
  408. package/{esm2015/tree-select/index.js → esm2020/tree-select/index.mjs} +0 -0
  409. package/{esm2015/tree-select/ptsecurity-mosaic-tree-select.js → esm2020/tree-select/ptsecurity-mosaic-tree-select.mjs} +0 -0
  410. package/{esm2015/tree-select/public-api.js → esm2020/tree-select/public-api.mjs} +0 -0
  411. package/esm2020/tree-select/tree-select.component.mjs +925 -0
  412. package/esm2020/tree-select/tree-select.module.mjs +47 -0
  413. package/fesm2015/ptsecurity-mosaic-autocomplete.mjs +756 -0
  414. package/fesm2015/ptsecurity-mosaic-autocomplete.mjs.map +1 -0
  415. package/fesm2015/ptsecurity-mosaic-button-toggle.mjs +385 -0
  416. package/fesm2015/ptsecurity-mosaic-button-toggle.mjs.map +1 -0
  417. package/fesm2015/ptsecurity-mosaic-button.mjs +170 -0
  418. package/fesm2015/ptsecurity-mosaic-button.mjs.map +1 -0
  419. package/fesm2015/ptsecurity-mosaic-card.mjs +113 -0
  420. package/fesm2015/ptsecurity-mosaic-card.mjs.map +1 -0
  421. package/fesm2015/ptsecurity-mosaic-checkbox.mjs +366 -0
  422. package/fesm2015/ptsecurity-mosaic-checkbox.mjs.map +1 -0
  423. package/fesm2015/ptsecurity-mosaic-core.mjs +2704 -0
  424. package/fesm2015/ptsecurity-mosaic-core.mjs.map +1 -0
  425. package/fesm2015/ptsecurity-mosaic-datepicker.mjs +2700 -0
  426. package/fesm2015/ptsecurity-mosaic-datepicker.mjs.map +1 -0
  427. package/fesm2015/ptsecurity-mosaic-design-tokens.mjs +2925 -0
  428. package/fesm2015/ptsecurity-mosaic-design-tokens.mjs.map +1 -0
  429. package/fesm2015/ptsecurity-mosaic-divider.mjs +61 -0
  430. package/fesm2015/ptsecurity-mosaic-divider.mjs.map +1 -0
  431. package/fesm2015/ptsecurity-mosaic-dropdown.mjs +1106 -0
  432. package/fesm2015/ptsecurity-mosaic-dropdown.mjs.map +1 -0
  433. package/fesm2015/ptsecurity-mosaic-form-field.mjs +378 -0
  434. package/fesm2015/ptsecurity-mosaic-form-field.mjs.map +1 -0
  435. package/fesm2015/ptsecurity-mosaic-icon.mjs +88 -0
  436. package/fesm2015/ptsecurity-mosaic-icon.mjs.map +1 -0
  437. package/fesm2015/ptsecurity-mosaic-input.mjs +609 -0
  438. package/fesm2015/ptsecurity-mosaic-input.mjs.map +1 -0
  439. package/fesm2015/ptsecurity-mosaic-link.mjs +137 -0
  440. package/fesm2015/ptsecurity-mosaic-link.mjs.map +1 -0
  441. package/fesm2015/ptsecurity-mosaic-list.mjs +791 -0
  442. package/fesm2015/ptsecurity-mosaic-list.mjs.map +1 -0
  443. package/fesm2015/ptsecurity-mosaic-modal.mjs +864 -0
  444. package/fesm2015/ptsecurity-mosaic-modal.mjs.map +1 -0
  445. package/fesm2015/ptsecurity-mosaic-navbar.mjs +1031 -0
  446. package/fesm2015/ptsecurity-mosaic-navbar.mjs.map +1 -0
  447. package/fesm2015/ptsecurity-mosaic-popover.mjs +393 -0
  448. package/fesm2015/ptsecurity-mosaic-popover.mjs.map +1 -0
  449. package/fesm2015/ptsecurity-mosaic-progress-bar.mjs +76 -0
  450. package/fesm2015/ptsecurity-mosaic-progress-bar.mjs.map +1 -0
  451. package/fesm2015/ptsecurity-mosaic-progress-spinner.mjs +80 -0
  452. package/fesm2015/ptsecurity-mosaic-progress-spinner.mjs.map +1 -0
  453. package/fesm2015/ptsecurity-mosaic-radio.mjs +481 -0
  454. package/fesm2015/ptsecurity-mosaic-radio.mjs.map +1 -0
  455. package/fesm2015/ptsecurity-mosaic-select.mjs +1175 -0
  456. package/fesm2015/ptsecurity-mosaic-select.mjs.map +1 -0
  457. package/fesm2015/ptsecurity-mosaic-sidebar.mjs +202 -0
  458. package/fesm2015/ptsecurity-mosaic-sidebar.mjs.map +1 -0
  459. package/fesm2015/ptsecurity-mosaic-sidepanel.mjs +592 -0
  460. package/fesm2015/ptsecurity-mosaic-sidepanel.mjs.map +1 -0
  461. package/fesm2015/ptsecurity-mosaic-splitter.mjs +526 -0
  462. package/fesm2015/ptsecurity-mosaic-splitter.mjs.map +1 -0
  463. package/fesm2015/ptsecurity-mosaic-table.mjs +50 -0
  464. package/fesm2015/ptsecurity-mosaic-table.mjs.map +1 -0
  465. package/fesm2015/ptsecurity-mosaic-tabs.mjs +1511 -0
  466. package/fesm2015/ptsecurity-mosaic-tabs.mjs.map +1 -0
  467. package/fesm2015/ptsecurity-mosaic-tags.mjs +1377 -0
  468. package/fesm2015/ptsecurity-mosaic-tags.mjs.map +1 -0
  469. package/fesm2015/ptsecurity-mosaic-textarea.mjs +293 -0
  470. package/fesm2015/ptsecurity-mosaic-textarea.mjs.map +1 -0
  471. package/fesm2015/ptsecurity-mosaic-timepicker.mjs +715 -0
  472. package/fesm2015/ptsecurity-mosaic-timepicker.mjs.map +1 -0
  473. package/fesm2015/ptsecurity-mosaic-toggle.mjs +180 -0
  474. package/fesm2015/ptsecurity-mosaic-toggle.mjs.map +1 -0
  475. package/fesm2015/ptsecurity-mosaic-tooltip.mjs +365 -0
  476. package/fesm2015/ptsecurity-mosaic-tooltip.mjs.map +1 -0
  477. package/fesm2015/ptsecurity-mosaic-tree-select.mjs +972 -0
  478. package/fesm2015/ptsecurity-mosaic-tree-select.mjs.map +1 -0
  479. package/fesm2015/ptsecurity-mosaic-tree.mjs +1718 -0
  480. package/fesm2015/ptsecurity-mosaic-tree.mjs.map +1 -0
  481. package/fesm2015/ptsecurity-mosaic.mjs +4 -0
  482. package/fesm2015/ptsecurity-mosaic.mjs.map +1 -0
  483. package/fesm2020/ptsecurity-mosaic-autocomplete.mjs +752 -0
  484. package/fesm2020/ptsecurity-mosaic-autocomplete.mjs.map +1 -0
  485. package/fesm2020/ptsecurity-mosaic-button-toggle.mjs +383 -0
  486. package/fesm2020/ptsecurity-mosaic-button-toggle.mjs.map +1 -0
  487. package/fesm2020/ptsecurity-mosaic-button.mjs +170 -0
  488. package/fesm2020/ptsecurity-mosaic-button.mjs.map +1 -0
  489. package/fesm2020/ptsecurity-mosaic-card.mjs +113 -0
  490. package/fesm2020/ptsecurity-mosaic-card.mjs.map +1 -0
  491. package/fesm2020/ptsecurity-mosaic-checkbox.mjs +364 -0
  492. package/fesm2020/ptsecurity-mosaic-checkbox.mjs.map +1 -0
  493. package/fesm2020/ptsecurity-mosaic-core.mjs +2733 -0
  494. package/fesm2020/ptsecurity-mosaic-core.mjs.map +1 -0
  495. package/fesm2020/ptsecurity-mosaic-datepicker.mjs +2687 -0
  496. package/fesm2020/ptsecurity-mosaic-datepicker.mjs.map +1 -0
  497. package/fesm2020/ptsecurity-mosaic-design-tokens.mjs +2925 -0
  498. package/fesm2020/ptsecurity-mosaic-design-tokens.mjs.map +1 -0
  499. package/fesm2020/ptsecurity-mosaic-divider.mjs +61 -0
  500. package/fesm2020/ptsecurity-mosaic-divider.mjs.map +1 -0
  501. package/fesm2020/ptsecurity-mosaic-dropdown.mjs +1093 -0
  502. package/fesm2020/ptsecurity-mosaic-dropdown.mjs.map +1 -0
  503. package/fesm2020/ptsecurity-mosaic-form-field.mjs +377 -0
  504. package/fesm2020/ptsecurity-mosaic-form-field.mjs.map +1 -0
  505. package/fesm2020/ptsecurity-mosaic-icon.mjs +86 -0
  506. package/fesm2020/ptsecurity-mosaic-icon.mjs.map +1 -0
  507. package/fesm2020/ptsecurity-mosaic-input.mjs +605 -0
  508. package/fesm2020/ptsecurity-mosaic-input.mjs.map +1 -0
  509. package/fesm2020/ptsecurity-mosaic-link.mjs +136 -0
  510. package/fesm2020/ptsecurity-mosaic-link.mjs.map +1 -0
  511. package/fesm2020/ptsecurity-mosaic-list.mjs +784 -0
  512. package/fesm2020/ptsecurity-mosaic-list.mjs.map +1 -0
  513. package/fesm2020/ptsecurity-mosaic-modal.mjs +860 -0
  514. package/fesm2020/ptsecurity-mosaic-modal.mjs.map +1 -0
  515. package/fesm2020/ptsecurity-mosaic-navbar.mjs +1015 -0
  516. package/fesm2020/ptsecurity-mosaic-navbar.mjs.map +1 -0
  517. package/fesm2020/ptsecurity-mosaic-popover.mjs +389 -0
  518. package/fesm2020/ptsecurity-mosaic-popover.mjs.map +1 -0
  519. package/fesm2020/ptsecurity-mosaic-progress-bar.mjs +76 -0
  520. package/fesm2020/ptsecurity-mosaic-progress-bar.mjs.map +1 -0
  521. package/fesm2020/ptsecurity-mosaic-progress-spinner.mjs +80 -0
  522. package/fesm2020/ptsecurity-mosaic-progress-spinner.mjs.map +1 -0
  523. package/fesm2020/ptsecurity-mosaic-radio.mjs +479 -0
  524. package/fesm2020/ptsecurity-mosaic-radio.mjs.map +1 -0
  525. package/fesm2020/ptsecurity-mosaic-select.mjs +1173 -0
  526. package/fesm2020/ptsecurity-mosaic-select.mjs.map +1 -0
  527. package/fesm2020/ptsecurity-mosaic-sidebar.mjs +202 -0
  528. package/fesm2020/ptsecurity-mosaic-sidebar.mjs.map +1 -0
  529. package/fesm2020/ptsecurity-mosaic-sidepanel.mjs +589 -0
  530. package/fesm2020/ptsecurity-mosaic-sidepanel.mjs.map +1 -0
  531. package/fesm2020/ptsecurity-mosaic-splitter.mjs +526 -0
  532. package/fesm2020/ptsecurity-mosaic-splitter.mjs.map +1 -0
  533. package/fesm2020/ptsecurity-mosaic-table.mjs +50 -0
  534. package/fesm2020/ptsecurity-mosaic-table.mjs.map +1 -0
  535. package/fesm2020/ptsecurity-mosaic-tabs.mjs +1496 -0
  536. package/fesm2020/ptsecurity-mosaic-tabs.mjs.map +1 -0
  537. package/fesm2020/ptsecurity-mosaic-tags.mjs +1370 -0
  538. package/fesm2020/ptsecurity-mosaic-tags.mjs.map +1 -0
  539. package/fesm2020/ptsecurity-mosaic-textarea.mjs +291 -0
  540. package/fesm2020/ptsecurity-mosaic-textarea.mjs.map +1 -0
  541. package/fesm2020/ptsecurity-mosaic-timepicker.mjs +713 -0
  542. package/fesm2020/ptsecurity-mosaic-timepicker.mjs.map +1 -0
  543. package/fesm2020/ptsecurity-mosaic-toggle.mjs +180 -0
  544. package/fesm2020/ptsecurity-mosaic-toggle.mjs.map +1 -0
  545. package/fesm2020/ptsecurity-mosaic-tooltip.mjs +357 -0
  546. package/fesm2020/ptsecurity-mosaic-tooltip.mjs.map +1 -0
  547. package/fesm2020/ptsecurity-mosaic-tree-select.mjs +970 -0
  548. package/fesm2020/ptsecurity-mosaic-tree-select.mjs.map +1 -0
  549. package/fesm2020/ptsecurity-mosaic-tree.mjs +1705 -0
  550. package/fesm2020/ptsecurity-mosaic-tree.mjs.map +1 -0
  551. package/fesm2020/ptsecurity-mosaic.mjs +4 -0
  552. package/fesm2020/ptsecurity-mosaic.mjs.map +1 -0
  553. package/form-field/README.md +0 -0
  554. package/form-field/package.json +5 -5
  555. package/icon/README.md +0 -0
  556. package/icon/package.json +5 -5
  557. package/input/package.json +5 -5
  558. package/link/README.md +0 -0
  559. package/link/package.json +5 -5
  560. package/list/README.md +0 -0
  561. package/list/package.json +5 -5
  562. package/modal/README.md +34 -0
  563. package/modal/modal-control.service.d.ts +1 -0
  564. package/modal/package.json +5 -5
  565. package/navbar/README.md +41 -0
  566. package/navbar/navbar-item.component.d.ts +123 -34
  567. package/navbar/navbar.component.d.ts +37 -9
  568. package/navbar/navbar.module.d.ts +2 -1
  569. package/navbar/package.json +5 -5
  570. package/navbar/vertical-navbar.component.d.ts +15 -26
  571. package/package.json +299 -14
  572. package/popover/README.md +32 -0
  573. package/popover/package.json +5 -5
  574. package/prebuilt-themes/dark-theme.css +1 -1
  575. package/prebuilt-themes/default-theme.css +1 -1
  576. package/prebuilt-visual/default-visual.css +1 -1
  577. package/progress-bar/README.md +0 -0
  578. package/progress-bar/package.json +5 -5
  579. package/progress-spinner/README.md +0 -0
  580. package/progress-spinner/package.json +5 -5
  581. package/radio/package.json +5 -5
  582. package/schematics/README.md +35 -0
  583. package/schematics/ng-update/data/index.d.ts +1 -0
  584. package/schematics/ng-update/data/index.js +10 -9
  585. package/schematics/ng-update/data/index.js.map +1 -1
  586. package/schematics/ng-update/data/symbol-removal.d.ts +2 -0
  587. package/schematics/ng-update/data/symbol-removal.js +5 -0
  588. package/schematics/ng-update/data/symbol-removal.js.map +1 -0
  589. package/schematics/ng-update/index.js +3 -3
  590. package/schematics/ng-update/index.js.map +1 -1
  591. package/schematics/ng-update/update-9.0.0/secondary-entry-points-migration.js +1 -2
  592. package/schematics/ng-update/update-9.0.0/secondary-entry-points-migration.js.map +1 -1
  593. package/schematics/ng-update/upgrade-data.js +2 -1
  594. package/schematics/ng-update/upgrade-data.js.map +1 -1
  595. package/schematics/tsconfig.lib.json +2 -2
  596. package/select/README.md +0 -0
  597. package/select/package.json +5 -5
  598. package/sidebar/package.json +5 -5
  599. package/sidepanel/package.json +5 -5
  600. package/splitter/package.json +5 -5
  601. package/table/README.md +0 -0
  602. package/table/package.json +5 -5
  603. package/tabs/README.md +0 -0
  604. package/tabs/package.json +5 -5
  605. package/tags/README.md +0 -0
  606. package/tags/package.json +5 -5
  607. package/textarea/README.md +0 -0
  608. package/textarea/package.json +5 -5
  609. package/timepicker/README.md +0 -0
  610. package/timepicker/package.json +5 -5
  611. package/toggle/package.json +5 -5
  612. package/tooltip/package.json +5 -5
  613. package/tree/data-source/flat-data-source.d.ts +2 -2
  614. package/tree/package.json +5 -5
  615. package/tree/tree-option.component.d.ts +5 -3
  616. package/tree/tree-selection.component.d.ts +1 -0
  617. package/tree-select/README.md +0 -0
  618. package/tree-select/package.json +5 -5
  619. package/tree-select/tree-select.component.d.ts +9 -1
  620. package/tree-select/tree-select.module.d.ts +2 -1
  621. package/bundles/ptsecurity-mosaic-autocomplete.umd.js +0 -1160
  622. package/bundles/ptsecurity-mosaic-autocomplete.umd.js.map +0 -1
  623. package/bundles/ptsecurity-mosaic-button-toggle.umd.js +0 -755
  624. package/bundles/ptsecurity-mosaic-button-toggle.umd.js.map +0 -1
  625. package/bundles/ptsecurity-mosaic-button.umd.js +0 -533
  626. package/bundles/ptsecurity-mosaic-button.umd.js.map +0 -1
  627. package/bundles/ptsecurity-mosaic-card.umd.js +0 -479
  628. package/bundles/ptsecurity-mosaic-card.umd.js.map +0 -1
  629. package/bundles/ptsecurity-mosaic-checkbox.umd.js +0 -762
  630. package/bundles/ptsecurity-mosaic-checkbox.umd.js.map +0 -1
  631. package/bundles/ptsecurity-mosaic-core.umd.js +0 -2841
  632. package/bundles/ptsecurity-mosaic-core.umd.js.map +0 -1
  633. package/bundles/ptsecurity-mosaic-datepicker.umd.js +0 -3362
  634. package/bundles/ptsecurity-mosaic-datepicker.umd.js.map +0 -1
  635. package/bundles/ptsecurity-mosaic-design-tokens.umd.js +0 -1871
  636. package/bundles/ptsecurity-mosaic-design-tokens.umd.js.map +0 -1
  637. package/bundles/ptsecurity-mosaic-divider.umd.js +0 -106
  638. package/bundles/ptsecurity-mosaic-divider.umd.js.map +0 -1
  639. package/bundles/ptsecurity-mosaic-dropdown.umd.js +0 -1532
  640. package/bundles/ptsecurity-mosaic-dropdown.umd.js.map +0 -1
  641. package/bundles/ptsecurity-mosaic-form-field.umd.js +0 -788
  642. package/bundles/ptsecurity-mosaic-form-field.umd.js.map +0 -1
  643. package/bundles/ptsecurity-mosaic-icon.umd.js +0 -450
  644. package/bundles/ptsecurity-mosaic-icon.umd.js.map +0 -1
  645. package/bundles/ptsecurity-mosaic-input.umd.js +0 -1008
  646. package/bundles/ptsecurity-mosaic-input.umd.js.map +0 -1
  647. package/bundles/ptsecurity-mosaic-link.umd.js +0 -515
  648. package/bundles/ptsecurity-mosaic-link.umd.js.map +0 -1
  649. package/bundles/ptsecurity-mosaic-list.umd.js +0 -1251
  650. package/bundles/ptsecurity-mosaic-list.umd.js.map +0 -1
  651. package/bundles/ptsecurity-mosaic-modal.umd.js +0 -1312
  652. package/bundles/ptsecurity-mosaic-modal.umd.js.map +0 -1
  653. package/bundles/ptsecurity-mosaic-navbar.umd.js +0 -930
  654. package/bundles/ptsecurity-mosaic-navbar.umd.js.map +0 -1
  655. package/bundles/ptsecurity-mosaic-popover.umd.js +0 -836
  656. package/bundles/ptsecurity-mosaic-popover.umd.js.map +0 -1
  657. package/bundles/ptsecurity-mosaic-progress-bar.umd.js +0 -440
  658. package/bundles/ptsecurity-mosaic-progress-bar.umd.js.map +0 -1
  659. package/bundles/ptsecurity-mosaic-progress-spinner.umd.js +0 -448
  660. package/bundles/ptsecurity-mosaic-progress-spinner.umd.js.map +0 -1
  661. package/bundles/ptsecurity-mosaic-radio.umd.js +0 -901
  662. package/bundles/ptsecurity-mosaic-radio.umd.js.map +0 -1
  663. package/bundles/ptsecurity-mosaic-select.umd.js +0 -1606
  664. package/bundles/ptsecurity-mosaic-select.umd.js.map +0 -1
  665. package/bundles/ptsecurity-mosaic-sidebar.umd.js +0 -254
  666. package/bundles/ptsecurity-mosaic-sidebar.umd.js.map +0 -1
  667. package/bundles/ptsecurity-mosaic-sidepanel.umd.js +0 -954
  668. package/bundles/ptsecurity-mosaic-sidepanel.umd.js.map +0 -1
  669. package/bundles/ptsecurity-mosaic-splitter.umd.js +0 -635
  670. package/bundles/ptsecurity-mosaic-splitter.umd.js.map +0 -1
  671. package/bundles/ptsecurity-mosaic-table.umd.js +0 -81
  672. package/bundles/ptsecurity-mosaic-table.umd.js.map +0 -1
  673. package/bundles/ptsecurity-mosaic-tabs.umd.js +0 -2013
  674. package/bundles/ptsecurity-mosaic-tabs.umd.js.map +0 -1
  675. package/bundles/ptsecurity-mosaic-tags.umd.js +0 -1917
  676. package/bundles/ptsecurity-mosaic-tags.umd.js.map +0 -1
  677. package/bundles/ptsecurity-mosaic-textarea.umd.js +0 -664
  678. package/bundles/ptsecurity-mosaic-textarea.umd.js.map +0 -1
  679. package/bundles/ptsecurity-mosaic-timepicker.umd.js +0 -821
  680. package/bundles/ptsecurity-mosaic-timepicker.umd.js.map +0 -1
  681. package/bundles/ptsecurity-mosaic-toggle.umd.js +0 -557
  682. package/bundles/ptsecurity-mosaic-toggle.umd.js.map +0 -1
  683. package/bundles/ptsecurity-mosaic-tooltip.umd.js +0 -777
  684. package/bundles/ptsecurity-mosaic-tooltip.umd.js.map +0 -1
  685. package/bundles/ptsecurity-mosaic-tree-select.umd.js +0 -1369
  686. package/bundles/ptsecurity-mosaic-tree-select.umd.js.map +0 -1
  687. package/bundles/ptsecurity-mosaic-tree.umd.js +0 -2301
  688. package/bundles/ptsecurity-mosaic-tree.umd.js.map +0 -1
  689. package/bundles/ptsecurity-mosaic.umd.js +0 -11
  690. package/bundles/ptsecurity-mosaic.umd.js.map +0 -1
  691. package/design-tokens/tokens/components/checkbox.json5 +0 -39
  692. package/design-tokens/tokens/components/modal.json5 +0 -67
  693. package/design-tokens/tokens/components/navbar.json5 +0 -64
  694. package/design-tokens/tokens/components/radio.json5 +0 -45
  695. package/design-tokens/tokens/components/tags.json5 +0 -126
  696. package/design-tokens/tokens/components/toggle.json5 +0 -55
  697. package/design-tokens/tokens.d.ts +0 -7636
  698. package/esm2015/autocomplete/autocomplete-origin.directive.js +0 -21
  699. package/esm2015/autocomplete/autocomplete-trigger.directive.js +0 -555
  700. package/esm2015/autocomplete/autocomplete.component.js +0 -163
  701. package/esm2015/autocomplete/autocomplete.module.js +0 -34
  702. package/esm2015/button/button.component.js +0 -129
  703. package/esm2015/button/button.module.js +0 -42
  704. package/esm2015/button-toggle/button-toggle.component.js +0 -370
  705. package/esm2015/button-toggle/button-toggle.module.js +0 -19
  706. package/esm2015/card/card.component.js +0 -88
  707. package/esm2015/card/card.module.js +0 -30
  708. package/esm2015/checkbox/checkbox-module.js +0 -19
  709. package/esm2015/checkbox/checkbox-required-validator.js +0 -27
  710. package/esm2015/checkbox/checkbox.js +0 -325
  711. package/esm2015/core/common-behaviors/common-module.js +0 -83
  712. package/esm2015/core/error/error-options.js +0 -26
  713. package/esm2015/core/formatters/date/formatter.js +0 -288
  714. package/esm2015/core/formatters/date/templates/en-US.js +0 -280
  715. package/esm2015/core/formatters/date/templates/ru-RU.js +0 -280
  716. package/esm2015/core/formatters/index.js +0 -20
  717. package/esm2015/core/formatters/number/formatter.js +0 -99
  718. package/esm2015/core/forms/forms-module.js +0 -24
  719. package/esm2015/core/forms/forms.directive.js +0 -66
  720. package/esm2015/core/highlight/highlight.pipe.js +0 -17
  721. package/esm2015/core/highlight/index.js +0 -19
  722. package/esm2015/core/line/line.js +0 -70
  723. package/esm2015/core/option/action.js +0 -131
  724. package/esm2015/core/option/optgroup.js +0 -40
  725. package/esm2015/core/option/option-module.js +0 -21
  726. package/esm2015/core/option/option.js +0 -262
  727. package/esm2015/core/pop-up/pop-up-trigger.js +0 -239
  728. package/esm2015/core/pop-up/pop-up.js +0 -87
  729. package/esm2015/core/public-api.js +0 -17
  730. package/esm2015/core/selection/pseudo-checkbox/pseudo-checkbox.js +0 -45
  731. package/esm2015/core/selection/pseudo-checkbox/pseudo-checkbox.module.js +0 -18
  732. package/esm2015/core/services/measure-scrollbar.service.js +0 -48
  733. package/esm2015/datepicker/calendar-body.component.js +0 -114
  734. package/esm2015/datepicker/calendar.component.js +0 -377
  735. package/esm2015/datepicker/datepicker-input.directive.js +0 -892
  736. package/esm2015/datepicker/datepicker-intl.js +0 -40
  737. package/esm2015/datepicker/datepicker-module.js +0 -107
  738. package/esm2015/datepicker/datepicker-toggle.component.js +0 -94
  739. package/esm2015/datepicker/datepicker.component.js +0 -418
  740. package/esm2015/datepicker/month-view.component.js +0 -263
  741. package/esm2015/datepicker/multi-year-view.component.js +0 -224
  742. package/esm2015/datepicker/year-view.component.js +0 -259
  743. package/esm2015/design-tokens/public-api.js +0 -2
  744. package/esm2015/design-tokens/tokens.js +0 -930
  745. package/esm2015/divider/divider.component.js +0 -46
  746. package/esm2015/divider/divider.module.js +0 -18
  747. package/esm2015/dropdown/dropdown-content.directive.js +0 -66
  748. package/esm2015/dropdown/dropdown-item.component.js +0 -149
  749. package/esm2015/dropdown/dropdown-trigger.directive.js +0 -486
  750. package/esm2015/dropdown/dropdown.component.js +0 -302
  751. package/esm2015/dropdown/dropdown.module.js +0 -50
  752. package/esm2015/form-field/cleaner.js +0 -23
  753. package/esm2015/form-field/form-field.js +0 -224
  754. package/esm2015/form-field/form-field.module.js +0 -52
  755. package/esm2015/form-field/hint.js +0 -23
  756. package/esm2015/form-field/prefix.js +0 -13
  757. package/esm2015/form-field/stepper.js +0 -55
  758. package/esm2015/form-field/suffix.js +0 -13
  759. package/esm2015/icon/icon.component.js +0 -51
  760. package/esm2015/icon/icon.module.js +0 -38
  761. package/esm2015/input/input-number-validators.js +0 -92
  762. package/esm2015/input/input-number.js +0 -163
  763. package/esm2015/input/input.js +0 -333
  764. package/esm2015/input/input.module.js +0 -23
  765. package/esm2015/link/link.component.js +0 -108
  766. package/esm2015/link/link.module.js +0 -26
  767. package/esm2015/list/list-selection.component.js +0 -711
  768. package/esm2015/list/list.component.js +0 -58
  769. package/esm2015/list/list.module.js +0 -55
  770. package/esm2015/modal/css-unit.pipe.js +0 -17
  771. package/esm2015/modal/modal-control.service.js +0 -63
  772. package/esm2015/modal/modal.component.js +0 -508
  773. package/esm2015/modal/modal.directive.js +0 -52
  774. package/esm2015/modal/modal.module.js +0 -72
  775. package/esm2015/modal/modal.service.js +0 -124
  776. package/esm2015/navbar/navbar-item.component.js +0 -209
  777. package/esm2015/navbar/navbar.component.js +0 -118
  778. package/esm2015/navbar/navbar.module.js +0 -76
  779. package/esm2015/navbar/vertical-navbar.animation.js +0 -10
  780. package/esm2015/navbar/vertical-navbar.component.js +0 -140
  781. package/esm2015/popover/popover-confirm.component.js +0 -116
  782. package/esm2015/popover/popover.component.js +0 -262
  783. package/esm2015/popover/popover.module.js +0 -24
  784. package/esm2015/progress-bar/progress-bar.component.js +0 -50
  785. package/esm2015/progress-bar/progress-bar.module.js +0 -30
  786. package/esm2015/progress-spinner/progress-spinner.component.js +0 -54
  787. package/esm2015/progress-spinner/progress-spinner.module.js +0 -30
  788. package/esm2015/radio/radio.component.js +0 -467
  789. package/esm2015/radio/radio.module.js +0 -20
  790. package/esm2015/select/select.component.js +0 -1122
  791. package/esm2015/select/select.module.js +0 -64
  792. package/esm2015/sidebar/sidebar.component.js +0 -155
  793. package/esm2015/sidebar/sidebar.module.js +0 -30
  794. package/esm2015/sidepanel/sidepanel-container.component.js +0 -114
  795. package/esm2015/sidepanel/sidepanel-directives.js +0 -159
  796. package/esm2015/sidepanel/sidepanel.module.js +0 -74
  797. package/esm2015/sidepanel/sidepanel.service.js +0 -164
  798. package/esm2015/splitter/splitter.component.js +0 -489
  799. package/esm2015/splitter/splitter.module.js +0 -40
  800. package/esm2015/table/table.component.js +0 -16
  801. package/esm2015/table/table.module.js +0 -30
  802. package/esm2015/tabs/paginated-tab-header.js +0 -482
  803. package/esm2015/tabs/tab-body.component.js +0 -186
  804. package/esm2015/tabs/tab-content.directive.js +0 -15
  805. package/esm2015/tabs/tab-group.component.js +0 -359
  806. package/esm2015/tabs/tab-header.component.js +0 -76
  807. package/esm2015/tabs/tab-label-wrapper.directive.js +0 -78
  808. package/esm2015/tabs/tab-label.directive.js +0 -17
  809. package/esm2015/tabs/tab-nav-bar/tab-nav-bar.js +0 -118
  810. package/esm2015/tabs/tab.component.js +0 -133
  811. package/esm2015/tabs/tabs.module.js +0 -104
  812. package/esm2015/tags/tag-input.js +0 -229
  813. package/esm2015/tags/tag-list.component.js +0 -732
  814. package/esm2015/tags/tag.component.js +0 -386
  815. package/esm2015/tags/tag.module.js +0 -56
  816. package/esm2015/textarea/textarea.component.js +0 -268
  817. package/esm2015/textarea/textarea.module.js +0 -21
  818. package/esm2015/timepicker/timepicker.directive.js +0 -653
  819. package/esm2015/timepicker/timepicker.module.js +0 -34
  820. package/esm2015/toggle/toggle.component.js +0 -169
  821. package/esm2015/toggle/toggle.module.js +0 -20
  822. package/esm2015/tooltip/tooltip.component.js +0 -299
  823. package/esm2015/tooltip/tooltip.module.js +0 -43
  824. package/esm2015/tree/data-source/flat-data-source.js +0 -162
  825. package/esm2015/tree/node.js +0 -31
  826. package/esm2015/tree/outlet.js +0 -15
  827. package/esm2015/tree/padding.directive.js +0 -111
  828. package/esm2015/tree/toggle.js +0 -89
  829. package/esm2015/tree/tree-base.js +0 -243
  830. package/esm2015/tree/tree-option.component.js +0 -238
  831. package/esm2015/tree/tree-selection.component.js +0 -541
  832. package/esm2015/tree/tree.js +0 -23
  833. package/esm2015/tree/tree.module.js +0 -53
  834. package/esm2015/tree-select/tree-select.component.js +0 -901
  835. package/esm2015/tree-select/tree-select.module.js +0 -43
  836. package/fesm2015/ptsecurity-mosaic-autocomplete.js +0 -761
  837. package/fesm2015/ptsecurity-mosaic-autocomplete.js.map +0 -1
  838. package/fesm2015/ptsecurity-mosaic-button-toggle.js +0 -391
  839. package/fesm2015/ptsecurity-mosaic-button-toggle.js.map +0 -1
  840. package/fesm2015/ptsecurity-mosaic-button.js +0 -174
  841. package/fesm2015/ptsecurity-mosaic-button.js.map +0 -1
  842. package/fesm2015/ptsecurity-mosaic-card.js +0 -121
  843. package/fesm2015/ptsecurity-mosaic-card.js.map +0 -1
  844. package/fesm2015/ptsecurity-mosaic-checkbox.js +0 -374
  845. package/fesm2015/ptsecurity-mosaic-checkbox.js.map +0 -1
  846. package/fesm2015/ptsecurity-mosaic-core.js +0 -2680
  847. package/fesm2015/ptsecurity-mosaic-core.js.map +0 -1
  848. package/fesm2015/ptsecurity-mosaic-datepicker.js +0 -2738
  849. package/fesm2015/ptsecurity-mosaic-datepicker.js.map +0 -1
  850. package/fesm2015/ptsecurity-mosaic-design-tokens.js +0 -936
  851. package/fesm2015/ptsecurity-mosaic-design-tokens.js.map +0 -1
  852. package/fesm2015/ptsecurity-mosaic-divider.js +0 -68
  853. package/fesm2015/ptsecurity-mosaic-divider.js.map +0 -1
  854. package/fesm2015/ptsecurity-mosaic-dropdown.js +0 -1116
  855. package/fesm2015/ptsecurity-mosaic-dropdown.js.map +0 -1
  856. package/fesm2015/ptsecurity-mosaic-form-field.js +0 -396
  857. package/fesm2015/ptsecurity-mosaic-form-field.js.map +0 -1
  858. package/fesm2015/ptsecurity-mosaic-icon.js +0 -93
  859. package/fesm2015/ptsecurity-mosaic-icon.js.map +0 -1
  860. package/fesm2015/ptsecurity-mosaic-input.js +0 -605
  861. package/fesm2015/ptsecurity-mosaic-input.js.map +0 -1
  862. package/fesm2015/ptsecurity-mosaic-link.js +0 -137
  863. package/fesm2015/ptsecurity-mosaic-link.js.map +0 -1
  864. package/fesm2015/ptsecurity-mosaic-list.js +0 -822
  865. package/fesm2015/ptsecurity-mosaic-list.js.map +0 -1
  866. package/fesm2015/ptsecurity-mosaic-modal.js +0 -845
  867. package/fesm2015/ptsecurity-mosaic-modal.js.map +0 -1
  868. package/fesm2015/ptsecurity-mosaic-navbar.js +0 -539
  869. package/fesm2015/ptsecurity-mosaic-navbar.js.map +0 -1
  870. package/fesm2015/ptsecurity-mosaic-popover.js +0 -406
  871. package/fesm2015/ptsecurity-mosaic-popover.js.map +0 -1
  872. package/fesm2015/ptsecurity-mosaic-progress-bar.js +0 -84
  873. package/fesm2015/ptsecurity-mosaic-progress-bar.js.map +0 -1
  874. package/fesm2015/ptsecurity-mosaic-progress-spinner.js +0 -88
  875. package/fesm2015/ptsecurity-mosaic-progress-spinner.js.map +0 -1
  876. package/fesm2015/ptsecurity-mosaic-radio.js +0 -488
  877. package/fesm2015/ptsecurity-mosaic-radio.js.map +0 -1
  878. package/fesm2015/ptsecurity-mosaic-select.js +0 -1185
  879. package/fesm2015/ptsecurity-mosaic-select.js.map +0 -1
  880. package/fesm2015/ptsecurity-mosaic-sidebar.js +0 -211
  881. package/fesm2015/ptsecurity-mosaic-sidebar.js.map +0 -1
  882. package/fesm2015/ptsecurity-mosaic-sidepanel.js +0 -594
  883. package/fesm2015/ptsecurity-mosaic-sidepanel.js.map +0 -1
  884. package/fesm2015/ptsecurity-mosaic-splitter.js +0 -533
  885. package/fesm2015/ptsecurity-mosaic-splitter.js.map +0 -1
  886. package/fesm2015/ptsecurity-mosaic-table.js +0 -50
  887. package/fesm2015/ptsecurity-mosaic-table.js.map +0 -1
  888. package/fesm2015/ptsecurity-mosaic-tabs.js +0 -1533
  889. package/fesm2015/ptsecurity-mosaic-tabs.js.map +0 -1
  890. package/fesm2015/ptsecurity-mosaic-tags.js +0 -1389
  891. package/fesm2015/ptsecurity-mosaic-tags.js.map +0 -1
  892. package/fesm2015/ptsecurity-mosaic-textarea.js +0 -291
  893. package/fesm2015/ptsecurity-mosaic-textarea.js.map +0 -1
  894. package/fesm2015/ptsecurity-mosaic-timepicker.js +0 -713
  895. package/fesm2015/ptsecurity-mosaic-timepicker.js.map +0 -1
  896. package/fesm2015/ptsecurity-mosaic-toggle.js +0 -191
  897. package/fesm2015/ptsecurity-mosaic-toggle.js.map +0 -1
  898. package/fesm2015/ptsecurity-mosaic-tooltip.js +0 -362
  899. package/fesm2015/ptsecurity-mosaic-tooltip.js.map +0 -1
  900. package/fesm2015/ptsecurity-mosaic-tree-select.js +0 -943
  901. package/fesm2015/ptsecurity-mosaic-tree-select.js.map +0 -1
  902. package/fesm2015/ptsecurity-mosaic-tree.js +0 -1735
  903. package/fesm2015/ptsecurity-mosaic-tree.js.map +0 -1
  904. package/fesm2015/ptsecurity-mosaic.js +0 -4
  905. package/fesm2015/ptsecurity-mosaic.js.map +0 -1
@@ -1,2738 +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
- const YEAR_LENGTH = 4;
1692
- class DateDigit {
1693
- constructor(value, start, length) {
1694
- this.value = value;
1695
- this.start = start;
1696
- this.length = length;
1697
- this.maxDays = 31;
1698
- this.maxMonth = 12;
1699
- if (value === DateParts.day) {
1700
- this.parse = this.parseDay;
1701
- }
1702
- else if (value === DateParts.month) {
1703
- this.parse = this.parseMonth;
1704
- }
1705
- else if (value === DateParts.year) {
1706
- this.parse = this.parseYear;
1707
- }
1708
- }
1709
- get end() {
1710
- return this.start + this.length;
1711
- }
1712
- get isDay() {
1713
- return this.value === DateParts.day;
1714
- }
1715
- get isMonth() {
1716
- return this.value === DateParts.month;
1717
- }
1718
- get isYear() {
1719
- return this.value === DateParts.year;
1720
- }
1721
- get fullName() {
1722
- if (this.isDay) {
1723
- return 'date';
1724
- }
1725
- if (this.isMonth) {
1726
- return 'month';
1727
- }
1728
- if (this.isYear) {
1729
- return 'year';
1730
- }
1731
- }
1732
- parseDay(value) {
1733
- const parsedValue = parseInt(value);
1734
- if (parsedValue === 0) {
1735
- return 1;
1736
- }
1737
- if (parsedValue > this.maxDays) {
1738
- return this.maxDays;
1739
- }
1740
- return parsedValue;
1741
- }
1742
- parseMonth(value) {
1743
- const parsedValue = parseInt(value);
1744
- if (parsedValue === 0) {
1745
- return 1;
1746
- }
1747
- if (parsedValue > this.maxMonth) {
1748
- return this.maxMonth;
1749
- }
1750
- return parsedValue;
1751
- }
1752
- parseYear(value) {
1753
- const parsedValue = parseInt(value);
1754
- if (parsedValue === 0) {
1755
- return 1;
1756
- }
1757
- if (parsedValue > MAX_YEAR) {
1758
- return parseInt(value.substring(0, YEAR_LENGTH));
1759
- }
1760
- return parsedValue;
1761
- }
1762
- }
1763
- /** @docs-private */
1764
- const MC_DATEPICKER_VALUE_ACCESSOR = {
1765
- provide: NG_VALUE_ACCESSOR,
1766
- useExisting: forwardRef(() => McDatepickerInput),
1767
- multi: true
1768
- };
1769
- /** @docs-private */
1770
- const MC_DATEPICKER_VALIDATORS = {
1771
- provide: NG_VALIDATORS,
1772
- useExisting: forwardRef(() => McDatepickerInput),
1773
- multi: true
1774
- };
1775
- /**
1776
- * An event used for datepicker input and change events. We don't always have access to a native
1777
- * input or change event because the event may have been triggered by the user clicking on the
1778
- * calendar popup. For consistency, we always use McDatepickerInputEvent instead.
1779
- */
1780
- class McDatepickerInputEvent {
1781
- constructor(
1782
- /** Reference to the datepicker input component that emitted the event. */
1783
- target,
1784
- /** Reference to the native input element associated with the datepicker input. */
1785
- targetElement) {
1786
- this.target = target;
1787
- this.targetElement = targetElement;
1788
- this.value = this.target.value;
1789
- }
1790
- }
1791
- let uniqueComponentIdSuffix = 0;
1792
- /** Directive used to connect an input to a McDatepicker. */
1793
- class McDatepickerInput {
1794
- constructor(elementRef, renderer, dateAdapter, dateFormats) {
1795
- this.elementRef = elementRef;
1796
- this.renderer = renderer;
1797
- this.dateAdapter = dateAdapter;
1798
- this.dateFormats = dateFormats;
1799
- this.stateChanges = new Subject();
1800
- this.controlType = 'datepicker';
1801
- this.focused = false;
1802
- /** Emits when the value changes (either due to user input or programmatic change). */
1803
- this.valueChange = new EventEmitter();
1804
- /** Emits when the disabled state has changed */
1805
- this.disabledChange = new EventEmitter();
1806
- this._disabled = false;
1807
- this.incorrectInput = new EventEmitter();
1808
- /** Emits when a `change` event is fired on this `<input>`. */
1809
- this.dateChange = new EventEmitter();
1810
- /** Emits when an `input` event is fired on this `<input>`. */
1811
- this.dateInput = new EventEmitter();
1812
- this.uid = `mc-datepicker-${uniqueComponentIdSuffix++}`;
1813
- this.datepickerSubscription = Subscription.EMPTY;
1814
- this.localeSubscription = Subscription.EMPTY;
1815
- /** Whether the last value set on the input was valid. */
1816
- this.lastValueValid = false;
1817
- this.onTouched = () => { };
1818
- this.onInput = () => {
1819
- this.correctCursorPosition();
1820
- const formattedValue = this.replaceSymbols(this.viewValue);
1821
- const newTimeObj = this.getDateFromString(formattedValue);
1822
- this.lastValueValid = !!newTimeObj;
1823
- if (!newTimeObj) {
1824
- if (!this.viewValue) {
1825
- this._value = null;
1826
- this.cvaOnChange(null);
1827
- }
1828
- this.control.updateValueAndValidity({ emitEvent: false });
1829
- return;
1830
- }
1831
- this.setViewValue(this.getTimeStringFromDate(newTimeObj, this.dateFormats.dateInput), true);
1832
- this.selectNextDigitByCursor(this.selectionStart);
1833
- this.updateValue(newTimeObj);
1834
- };
1835
- this.parseOnBlur = () => {
1836
- if (!this.viewValue) {
1837
- return null;
1838
- }
1839
- const date = this.getDefaultValue();
1840
- const viewDigits = this.viewValue
1841
- .split(this.separator)
1842
- .map((value) => value)
1843
- .filter((value) => value);
1844
- const [firsViewDigit, secondViewDigit, thirdViewDigit] = viewDigits;
1845
- // tslint:disable-next-line:no-magic-numbers
1846
- if (viewDigits.length !== 3) {
1847
- this.lastValueValid = false;
1848
- this._value = null;
1849
- return setTimeout(() => this.control.updateValueAndValidity());
1850
- }
1851
- date[this.firstDigit.fullName] = this.firstDigit.parse(firsViewDigit);
1852
- date[this.secondDigit.fullName] = this.secondDigit.parse(secondViewDigit);
1853
- date[this.thirdDigit.fullName] = this.thirdDigit.parse(thirdViewDigit);
1854
- const [digitWithYear, viewDigitWithYear] = [this.firstDigit, this.secondDigit, this.thirdDigit]
1855
- .reduce((acc, digit, index) => digit.value === DateParts.year ? [digit, viewDigits[index]] : acc, []);
1856
- // tslint:disable-next-line:no-magic-numbers
1857
- if (viewDigitWithYear.length < 3) {
1858
- // tslint:disable-next-line:no-magic-numbers
1859
- date.year += date.year < 30 ? 2000 : 1900;
1860
- }
1861
- else if (viewDigitWithYear.length < digitWithYear.length) {
1862
- this.lastValueValid = false;
1863
- this._value = null;
1864
- return setTimeout(() => this.control.updateValueAndValidity());
1865
- }
1866
- const newTimeObj = this.getValidDateOrNull(this.dateAdapter.createDateTime(date.year, date.month - 1, date.date, date.hours, date.minutes, date.seconds, date.milliseconds));
1867
- if (!newTimeObj) {
1868
- this.lastValueValid = false;
1869
- this._value = null;
1870
- this.cvaOnChange(null);
1871
- return setTimeout(() => this.control.updateValueAndValidity());
1872
- }
1873
- this.lastValueValid = !!newTimeObj;
1874
- this.setViewValue(this.getTimeStringFromDate(newTimeObj, this.dateFormats.dateInput), true);
1875
- this.updateValue(newTimeObj);
1876
- };
1877
- this.updateLocaleParams = () => {
1878
- this.setFormat(this.dateFormats.dateInput);
1879
- this.value = this.value;
1880
- };
1881
- this.cvaOnChange = () => { };
1882
- this.validatorOnChange = () => { };
1883
- /** The form control validator for whether the input parses. */
1884
- this.parseValidator = () => {
1885
- return this.focused ||
1886
- this.empty ||
1887
- this.lastValueValid ? null : { mcDatepickerParse: { text: this.elementRef.nativeElement.value } };
1888
- };
1889
- /** The form control validator for the min date. */
1890
- this.minValidator = (control) => {
1891
- const controlValue = this.getValidDateOrNull(this.dateAdapter.deserialize(control.value));
1892
- return (!this.min || !controlValue ||
1893
- this.dateAdapter.compareDate(this.min, controlValue) <= 0) ?
1894
- null : { mcDatepickerMin: { min: this.min, actual: controlValue } };
1895
- };
1896
- /** The form control validator for the max date. */
1897
- this.maxValidator = (control) => {
1898
- const controlValue = this.getValidDateOrNull(this.dateAdapter.deserialize(control.value));
1899
- return (!this.max || !controlValue ||
1900
- this.dateAdapter.compareDate(this.max, controlValue) >= 0) ?
1901
- null : { mcDatepickerMax: { max: this.max, actual: controlValue } };
1902
- };
1903
- /** The form control validator for the date filter. */
1904
- this.filterValidator = (control) => {
1905
- const controlValue = this.getValidDateOrNull(this.dateAdapter.deserialize(control.value));
1906
- return !this.dateFilter || !controlValue || this.dateFilter(controlValue) ?
1907
- null : { mcDatepickerFilter: true };
1908
- };
1909
- this.validator = Validators.compose([
1910
- this.parseValidator,
1911
- this.minValidator,
1912
- this.maxValidator,
1913
- this.filterValidator
1914
- ]);
1915
- if (!this.dateAdapter) {
1916
- throw createMissingDateImplError('DateAdapter');
1917
- }
1918
- if (!this.dateFormats) {
1919
- throw createMissingDateImplError('MC_DATE_FORMATS');
1920
- }
1921
- this.setFormat(dateFormats.dateInput);
1922
- this.localeSubscription = dateAdapter.localeChanges
1923
- .subscribe(this.updateLocaleParams);
1924
- }
1925
- get required() {
1926
- return this._required;
1927
- }
1928
- set required(value) {
1929
- this._required = coerceBooleanProperty(value);
1930
- }
1931
- /** The datepicker that this input is associated with. */
1932
- set mcDatepicker(value) {
1933
- if (!value) {
1934
- return;
1935
- }
1936
- this.datepicker = value;
1937
- this.datepicker.registerInput(this);
1938
- this.datepickerSubscription.unsubscribe();
1939
- this.datepickerSubscription = this.datepicker.selectedChanged
1940
- .subscribe((selected) => {
1941
- this.value = selected;
1942
- this.cvaOnChange(selected);
1943
- this.onTouched();
1944
- this.dateChange.emit(new McDatepickerInputEvent(this, this.elementRef.nativeElement));
1945
- });
1946
- }
1947
- /** Function that can be used to filter out dates within the datepicker. */
1948
- set mcDatepickerFilter(value) {
1949
- this.dateFilter = value;
1950
- this.validatorOnChange();
1951
- }
1952
- /** The value of the input. */
1953
- get value() {
1954
- return this._value;
1955
- }
1956
- set value(value) {
1957
- let newValue = this.dateAdapter.deserialize(value);
1958
- this.lastValueValid = !newValue || this.dateAdapter.isValid(newValue);
1959
- newValue = this.getValidDateOrNull(newValue);
1960
- const oldDate = this.value;
1961
- this._value = newValue;
1962
- this.formatValue(newValue);
1963
- if (!this.dateAdapter.sameDate(oldDate, newValue)) {
1964
- this.valueChange.emit(newValue);
1965
- }
1966
- }
1967
- /** The minimum valid date. */
1968
- get min() {
1969
- return this._min;
1970
- }
1971
- set min(value) {
1972
- this._min = this.getValidDateOrNull(this.dateAdapter.deserialize(value));
1973
- this.validatorOnChange();
1974
- }
1975
- /** The maximum valid date. */
1976
- get max() {
1977
- return this._max;
1978
- }
1979
- set max(value) {
1980
- this._max = this.getValidDateOrNull(this.dateAdapter.deserialize(value));
1981
- this.validatorOnChange();
1982
- }
1983
- /** Whether the datepicker-input is disabled. */
1984
- get disabled() {
1985
- return this._disabled;
1986
- }
1987
- set disabled(value) {
1988
- const newValue = coerceBooleanProperty(value);
1989
- const element = this.elementRef.nativeElement;
1990
- if (this._disabled !== newValue) {
1991
- this._disabled = newValue;
1992
- this.disabledChange.emit(newValue);
1993
- }
1994
- // We need to null check the `blur` method, because it's undefined during SSR.
1995
- if (newValue && element.blur) {
1996
- // Normally, native input elements automatically blur if they turn disabled. This behavior
1997
- // is problematic, because it would mean that it triggers another change detection cycle,
1998
- // which then causes a changed after checked error if the input element was focused before.
1999
- element.blur();
2000
- }
2001
- }
2002
- get id() {
2003
- return this._id;
2004
- }
2005
- set id(value) {
2006
- this._id = value || this.uid;
2007
- }
2008
- set mcValidationTooltip(tooltip) {
2009
- if (!tooltip) {
2010
- return;
2011
- }
2012
- tooltip.enterDelay = validationTooltipShowDelay;
2013
- tooltip.trigger = 'manual';
2014
- tooltip.initListeners();
2015
- this.incorrectInput.subscribe(() => {
2016
- if (tooltip.isOpen) {
2017
- return;
2018
- }
2019
- tooltip.show();
2020
- setTimeout(() => tooltip.hide(), validationTooltipHideDelay);
2021
- });
2022
- }
2023
- get empty() {
2024
- return !this.viewValue && !this.isBadInput();
2025
- }
2026
- get viewValue() {
2027
- return this.elementRef.nativeElement.value;
2028
- }
2029
- get ngControl() {
2030
- return this.control;
2031
- }
2032
- get isReadOnly() {
2033
- return this.elementRef.nativeElement.readOnly;
2034
- }
2035
- get selectionStart() {
2036
- return this.elementRef.nativeElement.selectionStart;
2037
- }
2038
- set selectionStart(value) {
2039
- this.elementRef.nativeElement.selectionStart = value;
2040
- }
2041
- get selectionEnd() {
2042
- return this.elementRef.nativeElement.selectionEnd;
2043
- }
2044
- set selectionEnd(value) {
2045
- this.elementRef.nativeElement.selectionEnd = value;
2046
- }
2047
- onContainerClick() {
2048
- this.focus();
2049
- }
2050
- focus() {
2051
- this.elementRef.nativeElement.focus();
2052
- }
2053
- focusChanged(isFocused) {
2054
- if (isFocused !== this.focused) {
2055
- this.focused = isFocused;
2056
- this.onTouched();
2057
- this.stateChanges.next();
2058
- }
2059
- }
2060
- ngOnDestroy() {
2061
- this.datepickerSubscription.unsubscribe();
2062
- this.localeSubscription.unsubscribe();
2063
- this.valueChange.complete();
2064
- this.disabledChange.complete();
2065
- }
2066
- /** @docs-private */
2067
- registerOnValidatorChange(fn) {
2068
- this.validatorOnChange = fn;
2069
- }
2070
- /** @docs-private */
2071
- validate(control) {
2072
- this.setControl(control);
2073
- return this.validator ? this.validator(control) : null;
2074
- }
2075
- // Implemented as part of ControlValueAccessor.
2076
- writeValue(value) {
2077
- this.value = value;
2078
- }
2079
- // Implemented as part of ControlValueAccessor.
2080
- registerOnChange(fn) {
2081
- this.cvaOnChange = fn;
2082
- }
2083
- // Implemented as part of ControlValueAccessor.
2084
- registerOnTouched(fn) {
2085
- this.onTouched = fn;
2086
- }
2087
- // Implemented as part of ControlValueAccessor.
2088
- setDisabledState(isDisabled) {
2089
- this.disabled = isDisabled;
2090
- }
2091
- onKeyDown(event) {
2092
- var _a;
2093
- if (this.isReadOnly) {
2094
- return;
2095
- }
2096
- // tslint:disable-next-line: deprecation
2097
- const keyCode = event.keyCode;
2098
- if (this.isLetterKey(event)) {
2099
- event.preventDefault();
2100
- this.incorrectInput.emit();
2101
- }
2102
- else if (this.isKeyForOpen(event)) {
2103
- event.preventDefault();
2104
- (_a = this.datepicker) === null || _a === void 0 ? void 0 : _a.open();
2105
- }
2106
- else if (this.isKeyForClose(event)) {
2107
- event.preventDefault();
2108
- this.datepicker.close();
2109
- }
2110
- else if (keyCode === TAB) {
2111
- this.datepicker.close(false);
2112
- }
2113
- else if (this.isKeyForByPass(event)) {
2114
- return;
2115
- }
2116
- else if (keyCode === SPACE) {
2117
- this.spaceKeyHandler(event);
2118
- }
2119
- else if ([UP_ARROW, DOWN_ARROW].includes(keyCode)) {
2120
- event.preventDefault();
2121
- this.verticalArrowKeyHandler(keyCode);
2122
- }
2123
- else if ([LEFT_ARROW, RIGHT_ARROW, HOME, PAGE_UP, END, PAGE_DOWN].includes(keyCode)) {
2124
- event.preventDefault();
2125
- this.changeCaretPosition(keyCode);
2126
- }
2127
- else if (/^\D$/.test(event.key)) {
2128
- event.preventDefault();
2129
- const newValue = this.getNewValue(event.key, this.selectionStart);
2130
- const formattedValue = this.replaceSymbols(newValue);
2131
- if (newValue !== formattedValue) {
2132
- this.setViewValue(formattedValue, true);
2133
- setTimeout(this.onInput);
2134
- }
2135
- else {
2136
- this.incorrectInput.emit();
2137
- }
2138
- }
2139
- else {
2140
- setTimeout(this.onInput);
2141
- }
2142
- }
2143
- onChange() {
2144
- this.dateChange.emit(new McDatepickerInputEvent(this, this.elementRef.nativeElement));
2145
- }
2146
- /** Handles blur events on the input. */
2147
- onBlur() {
2148
- // Reformat the input only if we have a valid value.
2149
- this.parseOnBlur();
2150
- this.focusChanged(false);
2151
- }
2152
- onPaste($event) {
2153
- var _a, _b, _c;
2154
- $event.preventDefault();
2155
- const rawValue = $event.clipboardData.getData('text');
2156
- const match = rawValue.match(/^(?<first>\d+)\W(?<second>\d+)\W(?<third>\d+)$/);
2157
- 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)) {
2158
- this.setViewValue(rawValue);
2159
- return rawValue;
2160
- }
2161
- const value = [match.groups.first, match.groups.second, match.groups.third].join(this.separator);
2162
- const newTimeObj = this.getDateFromString(value);
2163
- if (!newTimeObj) {
2164
- this.setViewValue(value);
2165
- return value;
2166
- }
2167
- this.setViewValue(this.getTimeStringFromDate(newTimeObj, this.dateFormats.dateInput));
2168
- this.updateValue(newTimeObj);
2169
- }
2170
- toISO8601(value) {
2171
- return this.dateAdapter.toIso8601(value);
2172
- }
2173
- setFormat(format) {
2174
- this.separator = format.match(/[aA-zZ]+(?<separator>\W|\D)[aA-zZ]+/).groups.separator;
2175
- this.separatorPositions = format
2176
- .split('')
2177
- .reduce((acc, item, index) => this.separator === item ? [...acc, index + 1] : acc, []);
2178
- this.getDigitPositions(format);
2179
- }
2180
- updateValue(newValue) {
2181
- if (!this.dateAdapter.sameDate(newValue, this.value)) {
2182
- this._value = newValue;
2183
- this.cvaOnChange(newValue);
2184
- this.valueChange.emit(newValue);
2185
- this.dateInput.emit(new McDatepickerInputEvent(this, this.elementRef.nativeElement));
2186
- }
2187
- this.control.updateValueAndValidity({ emitEvent: false });
2188
- }
2189
- isKeyForClose(event) {
2190
- // tslint:disable-next-line: deprecation
2191
- return (event.altKey && event.keyCode === UP_ARROW) || event.keyCode === ESCAPE;
2192
- }
2193
- isKeyForOpen(event) {
2194
- // tslint:disable-next-line: deprecation
2195
- return event.altKey && event.keyCode === DOWN_ARROW;
2196
- }
2197
- isLetterKey(event) {
2198
- return isLetterKey(event) && !event.ctrlKey && !event.metaKey;
2199
- }
2200
- isKeyForByPass(event) {
2201
- // tslint:disable-next-line: deprecation
2202
- return (hasModifierKey(event) && (isVerticalMovement(event.keyCode) || isHorizontalMovement(event.keyCode))) ||
2203
- event.ctrlKey ||
2204
- event.metaKey;
2205
- }
2206
- spaceKeyHandler(event) {
2207
- event.preventDefault();
2208
- if (this.selectionStart === this.selectionEnd) {
2209
- const value = this.getNewValue(event.key, this.selectionStart);
2210
- this.setViewValue(value);
2211
- setTimeout(this.onInput);
2212
- }
2213
- else if (this.selectionStart !== this.selectionEnd) {
2214
- this.selectNextDigit(this.selectionStart, true);
2215
- }
2216
- }
2217
- getNewValue(key, position) {
2218
- return [this.viewValue.slice(0, position), key, this.viewValue.slice(position)].join('');
2219
- }
2220
- setViewValue(value, savePosition = false) {
2221
- if (savePosition) {
2222
- const selectionStart = this.selectionStart;
2223
- const selectionEnd = this.selectionEnd;
2224
- this.renderer.setProperty(this.elementRef.nativeElement, 'value', value);
2225
- this.selectionStart = selectionStart;
2226
- this.selectionEnd = selectionEnd;
2227
- }
2228
- else {
2229
- this.renderer.setProperty(this.elementRef.nativeElement, 'value', value);
2230
- }
2231
- }
2232
- replaceSymbols(value) {
2233
- return value
2234
- .split(this.separator)
2235
- .map((part) => part.replace(/^([0-9]+)\W$/, '0$1'))
2236
- .join(this.separator);
2237
- }
2238
- getDateFromString(timeString) {
2239
- if (!timeString || timeString.length < this.firstDigit.length) {
2240
- return null;
2241
- }
2242
- const date = this.getDefaultValue();
2243
- const viewDigits = timeString
2244
- .split(this.separator)
2245
- .map((value) => value);
2246
- const [firsViewDigit, secondViewDigit, thirdViewDigit] = viewDigits;
2247
- if (viewDigits.length === 1) {
2248
- if (firsViewDigit.length < this.firstDigit.length) {
2249
- return null;
2250
- }
2251
- date[this.firstDigit.fullName] = this.firstDigit.parse(firsViewDigit);
2252
- date.month = 1;
2253
- // tslint:disable-next-line:no-magic-numbers
2254
- }
2255
- else if (viewDigits.length === 2) {
2256
- if (firsViewDigit.length < this.firstDigit.length || secondViewDigit.length < this.secondDigit.length) {
2257
- return null;
2258
- }
2259
- date[this.firstDigit.fullName] = this.firstDigit.parse(firsViewDigit);
2260
- date[this.secondDigit.fullName] = this.secondDigit.parse(secondViewDigit);
2261
- // tslint:disable-next-line:no-magic-numbers
2262
- }
2263
- else if (viewDigits.length === 3) {
2264
- if (firsViewDigit.length < this.firstDigit.length ||
2265
- secondViewDigit.length < this.secondDigit.length ||
2266
- thirdViewDigit.length < this.thirdDigit.length) {
2267
- return null;
2268
- }
2269
- date[this.firstDigit.fullName] = this.firstDigit.parse(firsViewDigit);
2270
- date[this.secondDigit.fullName] = this.secondDigit.parse(secondViewDigit);
2271
- date[this.thirdDigit.fullName] = this.thirdDigit.parse(thirdViewDigit);
2272
- }
2273
- else {
2274
- return null;
2275
- }
2276
- return this.getValidDateOrNull(this.dateAdapter.createDateTime(date.year, date.month - 1, date.date, date.hours, date.minutes, date.seconds, date.milliseconds));
2277
- }
2278
- getDefaultValue() {
2279
- const defaultValue = this.value || this.dateAdapter.today();
2280
- return {
2281
- year: this.dateAdapter.getYear(defaultValue),
2282
- month: this.dateAdapter.getMonth(defaultValue),
2283
- date: this.dateAdapter.getDate(defaultValue),
2284
- hours: this.dateAdapter.getHours(defaultValue),
2285
- minutes: this.dateAdapter.getMinutes(defaultValue),
2286
- seconds: this.dateAdapter.getSeconds(defaultValue),
2287
- milliseconds: this.dateAdapter.getMilliseconds(defaultValue)
2288
- };
2289
- }
2290
- getTimeStringFromDate(value, timeFormat) {
2291
- if (!value || !this.dateAdapter.isValid(value)) {
2292
- return '';
2293
- }
2294
- return this.dateAdapter.format(value, timeFormat);
2295
- }
2296
- getDateEditMetrics(cursorPosition) {
2297
- for (const digit of [this.firstDigit, this.secondDigit, this.thirdDigit]) {
2298
- if (cursorPosition >= digit.start && cursorPosition <= digit.end) {
2299
- return [digit.value, digit.start, digit.end];
2300
- }
2301
- }
2302
- return [this.thirdDigit.value, this.thirdDigit.start, this.thirdDigit.end];
2303
- }
2304
- incrementDate(dateVal, whatToIncrement) {
2305
- let year = this.dateAdapter.getYear(dateVal);
2306
- let month = this.dateAdapter.getMonth(dateVal);
2307
- let day = this.dateAdapter.getDate(dateVal);
2308
- switch (whatToIncrement) {
2309
- case DateParts.day:
2310
- day++;
2311
- if (day > this.dateAdapter.getNumDaysInMonth(dateVal)) {
2312
- day = 1;
2313
- }
2314
- break;
2315
- case DateParts.month:
2316
- month++;
2317
- // tslint:disable-next-line:no-magic-numbers
2318
- if (month > 11) {
2319
- month = 0;
2320
- }
2321
- const lastDay = this.getLastDayFor(year, month);
2322
- if (day > lastDay) {
2323
- day = lastDay;
2324
- }
2325
- break;
2326
- case DateParts.year:
2327
- year++;
2328
- if (year > MAX_YEAR) {
2329
- year = 1;
2330
- }
2331
- break;
2332
- default:
2333
- }
2334
- return this.createDate(year, month, day);
2335
- }
2336
- getLastDayFor(year, month) {
2337
- return this.dateAdapter.getNumDaysInMonth(this.createDate(year, month, 1));
2338
- }
2339
- decrementDate(dateVal, whatToDecrement) {
2340
- let year = this.dateAdapter.getYear(dateVal);
2341
- let month = this.dateAdapter.getMonth(dateVal);
2342
- let day = this.dateAdapter.getDate(dateVal);
2343
- switch (whatToDecrement) {
2344
- case DateParts.day:
2345
- day--;
2346
- if (day < 1) {
2347
- day = this.dateAdapter.getNumDaysInMonth(dateVal);
2348
- }
2349
- break;
2350
- case DateParts.month:
2351
- month--;
2352
- if (month < 0) {
2353
- // tslint:disable-next-line:no-magic-numbers
2354
- month = 11;
2355
- }
2356
- const lastDay = this.getLastDayFor(year, month);
2357
- if (day > lastDay) {
2358
- day = lastDay;
2359
- }
2360
- break;
2361
- case DateParts.year:
2362
- year--;
2363
- if (year < 1) {
2364
- year = MAX_YEAR;
2365
- }
2366
- break;
2367
- default:
2368
- }
2369
- return this.createDate(year, month, day);
2370
- }
2371
- verticalArrowKeyHandler(keyCode) {
2372
- if (!this.value) {
2373
- return;
2374
- }
2375
- let changedTime;
2376
- const [modifiedTimePart, selectionStart, selectionEnd] = this.getDateEditMetrics(this.selectionStart);
2377
- if (keyCode === UP_ARROW) {
2378
- changedTime = this.incrementDate(this.value, modifiedTimePart);
2379
- }
2380
- if (keyCode === DOWN_ARROW) {
2381
- changedTime = this.decrementDate(this.value, modifiedTimePart);
2382
- }
2383
- this.value = changedTime;
2384
- this.selectionStart = selectionStart;
2385
- this.selectionEnd = selectionEnd;
2386
- this.cvaOnChange(changedTime);
2387
- this.onChange();
2388
- this.stateChanges.next();
2389
- }
2390
- changeCaretPosition(keyCode) {
2391
- if (!this.value) {
2392
- return;
2393
- }
2394
- let cursorPos = this.selectionStart;
2395
- if ([HOME, PAGE_UP].includes(keyCode)) {
2396
- cursorPos = 0;
2397
- }
2398
- else if ([END, PAGE_DOWN].includes(keyCode)) {
2399
- cursorPos = this.viewValue.length;
2400
- }
2401
- else if (keyCode === LEFT_ARROW) {
2402
- cursorPos = cursorPos === 0 ? this.viewValue.length : cursorPos - 1;
2403
- }
2404
- else if (keyCode === RIGHT_ARROW) {
2405
- const nextSeparatorPos = this.viewValue.indexOf(this.separator, cursorPos);
2406
- cursorPos = nextSeparatorPos ? nextSeparatorPos + 1 : 0;
2407
- }
2408
- this.selectDigitByCursor(cursorPos);
2409
- }
2410
- selectDigitByCursor(cursorPos) {
2411
- setTimeout(() => {
2412
- const [, selectionStart, selectionEnd] = this.getDateEditMetrics(cursorPos);
2413
- this.selectionStart = selectionStart;
2414
- this.selectionEnd = selectionEnd;
2415
- });
2416
- }
2417
- selectNextDigitByCursor(cursorPos) {
2418
- setTimeout(() => {
2419
- const [, , endPositionOfCurrentDigit] = this.getDateEditMetrics(cursorPos);
2420
- const [, selectionStart, selectionEnd] = this.getDateEditMetrics(endPositionOfCurrentDigit + 1);
2421
- this.selectionStart = selectionStart;
2422
- this.selectionEnd = selectionEnd;
2423
- });
2424
- }
2425
- selectNextDigit(cursorPos, cycle = false) {
2426
- setTimeout(() => {
2427
- const lastValue = cycle ? 0 : cursorPos;
2428
- const nextSeparatorPos = this.viewValue.indexOf(this.separator, cursorPos);
2429
- const newCursorPos = nextSeparatorPos > 0 ? nextSeparatorPos + 1 : lastValue;
2430
- const [, selectionStart, selectionEnd] = this.getDateEditMetrics(newCursorPos);
2431
- this.selectionStart = selectionStart;
2432
- this.selectionEnd = selectionEnd;
2433
- });
2434
- }
2435
- /** Checks whether the input is invalid based on the native validation. */
2436
- isBadInput() {
2437
- const validity = this.elementRef.nativeElement.validity;
2438
- return validity && validity.badInput;
2439
- }
2440
- /** Formats a value and sets it on the input element. */
2441
- formatValue(value) {
2442
- const formattedValue = value ? this.dateAdapter.format(value, this.dateFormats.dateInput) : '';
2443
- this.setViewValue(formattedValue);
2444
- }
2445
- /**
2446
- * @param obj The object to check.
2447
- * @returns The given object if it is both a date instance and valid, otherwise null.
2448
- */
2449
- getValidDateOrNull(obj) {
2450
- return (this.dateAdapter.isDateInstance(obj) && this.dateAdapter.isValid(obj)) ? obj : null;
2451
- }
2452
- setControl(control) {
2453
- if (!this.control) {
2454
- this.control = control;
2455
- }
2456
- }
2457
- getDigitPositions(format) {
2458
- const formatInLowerCase = format.toLowerCase();
2459
- formatInLowerCase
2460
- .split('')
2461
- .reduce(({ prev, length, start }, value, index, arr) => {
2462
- if (value === this.separator || (arr.length - 1) === index) {
2463
- if (!this.firstDigit) {
2464
- this.firstDigit = new DateDigit(prev, start, length);
2465
- }
2466
- else if (!this.secondDigit) {
2467
- this.secondDigit = new DateDigit(prev, start, length);
2468
- }
2469
- else if (!this.thirdDigit) {
2470
- this.thirdDigit = new DateDigit(prev, start, arr.length - start);
2471
- }
2472
- // tslint:disable:no-parameter-reassignment
2473
- length = 0;
2474
- start = index + 1;
2475
- }
2476
- else {
2477
- length++;
2478
- }
2479
- return { prev: value, length, start };
2480
- }, { length: 0, start: 0 });
2481
- if (!this.firstDigit || !this.secondDigit || !this.thirdDigit) {
2482
- Error(`Can' t use this format: ${format}`);
2483
- }
2484
- }
2485
- createDate(year, month, day) {
2486
- 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));
2487
- }
2488
- correctCursorPosition() {
2489
- if (this.selectionStart && this.separatorPositions.includes(this.selectionStart)) {
2490
- this.selectionStart = this.selectionStart - 1;
2491
- }
2492
- }
2493
- }
2494
- /** @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 });
2495
- /** @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: [
2496
- MC_DATEPICKER_VALUE_ACCESSOR,
2497
- MC_DATEPICKER_VALIDATORS,
2498
- { provide: McFormFieldControl, useExisting: McDatepickerInput }
2499
- ], exportAs: ["mcDatepickerInput"], ngImport: i0 });
2500
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: McDatepickerInput, decorators: [{
2501
- type: Directive,
2502
- args: [{
2503
- selector: 'input[mcDatepicker]',
2504
- exportAs: 'mcDatepickerInput',
2505
- providers: [
2506
- MC_DATEPICKER_VALUE_ACCESSOR,
2507
- MC_DATEPICKER_VALIDATORS,
2508
- { provide: McFormFieldControl, useExisting: McDatepickerInput }
2509
- ],
2510
- host: {
2511
- class: 'mc-input mc-datepicker',
2512
- '[attr.placeholder]': 'placeholder',
2513
- '[attr.required]': 'required',
2514
- '[attr.disabled]': 'disabled || null',
2515
- '[attr.min]': 'min ? toISO8601(min) : null',
2516
- '[attr.max]': 'max ? toISO8601(max) : null',
2517
- '[attr.autocomplete]': '"off"',
2518
- '(paste)': 'onPaste($event)',
2519
- '(change)': 'onChange()',
2520
- '(focus)': 'focusChanged(true)',
2521
- '(blur)': 'onBlur()',
2522
- '(keydown)': 'onKeyDown($event)'
2523
- }
2524
- }]
2525
- }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i1$1.DateAdapter, decorators: [{
2526
- type: Optional
2527
- }] }, { type: undefined, decorators: [{
2528
- type: Optional
2529
- }, {
2530
- type: Inject,
2531
- args: [MC_DATE_FORMATS]
2532
- }] }]; }, propDecorators: { placeholder: [{
2533
- type: Input
2534
- }], required: [{
2535
- type: Input
2536
- }], mcDatepicker: [{
2537
- type: Input
2538
- }], mcDatepickerFilter: [{
2539
- type: Input
2540
- }], value: [{
2541
- type: Input
2542
- }], min: [{
2543
- type: Input
2544
- }], max: [{
2545
- type: Input
2546
- }], disabled: [{
2547
- type: Input
2548
- }], id: [{
2549
- type: Input
2550
- }], mcValidationTooltip: [{
2551
- type: Input
2552
- }], incorrectInput: [{
2553
- type: Output
2554
- }], dateChange: [{
2555
- type: Output
2556
- }], dateInput: [{
2557
- type: Output
2558
- }] } });
2559
-
2560
- /** Can be used to override the icon of a `mcDatepickerToggle`. */
2561
- class McDatepickerToggleIcon {
2562
- }
2563
- /** @nocollapse */ McDatepickerToggleIcon.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: McDatepickerToggleIcon, deps: [], target: i0.ɵɵFactoryTarget.Directive });
2564
- /** @nocollapse */ McDatepickerToggleIcon.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.13", type: McDatepickerToggleIcon, selector: "[mcDatepickerToggleIcon]", ngImport: i0 });
2565
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: McDatepickerToggleIcon, decorators: [{
2566
- type: Directive,
2567
- args: [{
2568
- selector: '[mcDatepickerToggleIcon]'
2569
- }]
2570
- }] });
2571
- class McDatepickerToggle {
2572
- constructor(intl, changeDetectorRef) {
2573
- this.intl = intl;
2574
- this.changeDetectorRef = changeDetectorRef;
2575
- this.stateChanges = Subscription.EMPTY;
2576
- }
2577
- /** Whether the toggle button is disabled. */
2578
- get disabled() {
2579
- return this._disabled === undefined ? this.datepicker.disabled : this._disabled;
2580
- }
2581
- set disabled(value) {
2582
- this._disabled = coerceBooleanProperty(value);
2583
- }
2584
- ngOnChanges(changes) {
2585
- if (changes.datepicker) {
2586
- this.watchStateChanges();
2587
- }
2588
- }
2589
- ngOnDestroy() {
2590
- this.stateChanges.unsubscribe();
2591
- }
2592
- ngAfterContentInit() {
2593
- this.watchStateChanges();
2594
- }
2595
- open(event) {
2596
- if (this.datepicker && !this.disabled) {
2597
- this.datepicker.open();
2598
- event.stopPropagation();
2599
- }
2600
- }
2601
- watchStateChanges() {
2602
- const datepickerDisabled = this.datepicker ? this.datepicker.disabledChange : of();
2603
- const inputDisabled = this.datepicker && this.datepicker.datepickerInput ?
2604
- this.datepicker.datepickerInput.disabledChange : of();
2605
- const datepickerToggled = this.datepicker ?
2606
- merge(this.datepicker.openedStream, this.datepicker.closedStream) :
2607
- of();
2608
- this.stateChanges.unsubscribe();
2609
- this.stateChanges = merge(this.intl.changes, datepickerDisabled, inputDisabled, datepickerToggled).subscribe(() => this.changeDetectorRef.markForCheck());
2610
- }
2611
- }
2612
- /** @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 });
2613
- /** @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 });
2614
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: McDatepickerToggle, decorators: [{
2615
- type: Component,
2616
- args: [{
2617
- selector: 'mc-datepicker-toggle',
2618
- templateUrl: 'datepicker-toggle.html',
2619
- styleUrls: ['datepicker-toggle.scss'],
2620
- host: {
2621
- class: 'mc-datepicker-toggle',
2622
- '[class.mc-active]': 'datepicker && datepicker.opened'
2623
- },
2624
- exportAs: 'mcDatepickerToggle',
2625
- encapsulation: ViewEncapsulation.None,
2626
- changeDetection: ChangeDetectionStrategy.OnPush
2627
- }]
2628
- }], ctorParameters: function () { return [{ type: McDatepickerIntl }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { disabled: [{
2629
- type: Input
2630
- }], datepicker: [{
2631
- type: Input,
2632
- args: ['for']
2633
- }], tabIndex: [{
2634
- type: Input
2635
- }], customIcon: [{
2636
- type: ContentChild,
2637
- args: [McDatepickerToggleIcon, { static: false }]
2638
- }], button: [{
2639
- type: ViewChild,
2640
- args: ['button', { static: false }]
2641
- }] } });
2642
-
2643
- class McDatepickerModule {
2644
- }
2645
- /** @nocollapse */ McDatepickerModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: McDatepickerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2646
- /** @nocollapse */ McDatepickerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: McDatepickerModule, declarations: [McCalendar,
2647
- McCalendarBody,
2648
- McDatepicker,
2649
- McDatepickerContent,
2650
- McDatepickerInput,
2651
- McDatepickerToggle,
2652
- McDatepickerToggleIcon,
2653
- McMonthView,
2654
- McYearView,
2655
- McMultiYearView,
2656
- McCalendarHeader], imports: [CommonModule,
2657
- McButtonModule,
2658
- OverlayModule,
2659
- A11yModule,
2660
- PortalModule,
2661
- McIconModule], exports: [McCalendar,
2662
- McCalendarBody,
2663
- McDatepicker,
2664
- McDatepickerContent,
2665
- McDatepickerInput,
2666
- McDatepickerToggle,
2667
- McDatepickerToggleIcon,
2668
- McMonthView,
2669
- McYearView,
2670
- McMultiYearView,
2671
- McCalendarHeader,
2672
- McButtonModule] });
2673
- /** @nocollapse */ McDatepickerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: McDatepickerModule, providers: [
2674
- McDatepickerIntl,
2675
- MC_DATEPICKER_SCROLL_STRATEGY_FACTORY_PROVIDER
2676
- ], imports: [[
2677
- CommonModule,
2678
- McButtonModule,
2679
- OverlayModule,
2680
- A11yModule,
2681
- PortalModule,
2682
- McIconModule
2683
- ], McButtonModule] });
2684
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: McDatepickerModule, decorators: [{
2685
- type: NgModule,
2686
- args: [{
2687
- imports: [
2688
- CommonModule,
2689
- McButtonModule,
2690
- OverlayModule,
2691
- A11yModule,
2692
- PortalModule,
2693
- McIconModule
2694
- ],
2695
- exports: [
2696
- McCalendar,
2697
- McCalendarBody,
2698
- McDatepicker,
2699
- McDatepickerContent,
2700
- McDatepickerInput,
2701
- McDatepickerToggle,
2702
- McDatepickerToggleIcon,
2703
- McMonthView,
2704
- McYearView,
2705
- McMultiYearView,
2706
- McCalendarHeader,
2707
- McButtonModule
2708
- ],
2709
- declarations: [
2710
- McCalendar,
2711
- McCalendarBody,
2712
- McDatepicker,
2713
- McDatepickerContent,
2714
- McDatepickerInput,
2715
- McDatepickerToggle,
2716
- McDatepickerToggleIcon,
2717
- McMonthView,
2718
- McYearView,
2719
- McMultiYearView,
2720
- McCalendarHeader
2721
- ],
2722
- providers: [
2723
- McDatepickerIntl,
2724
- MC_DATEPICKER_SCROLL_STRATEGY_FACTORY_PROVIDER
2725
- ],
2726
- entryComponents: [
2727
- McDatepickerContent,
2728
- McCalendarHeader
2729
- ]
2730
- }]
2731
- }] });
2732
-
2733
- /**
2734
- * Generated bundle index. Do not edit.
2735
- */
2736
-
2737
- 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 };
2738
- //# sourceMappingURL=ptsecurity-mosaic-datepicker.js.map