@ptsecurity/mosaic 14.7.2 → 15.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (712) hide show
  1. package/_index.scss +3 -0
  2. package/_theming.scss +1559 -1685
  3. package/_visual.scss +84 -64
  4. package/autocomplete/_autocomplete-theme.scss +21 -0
  5. package/autocomplete/autocomplete-origin.directive.d.ts +1 -1
  6. package/autocomplete/autocomplete-trigger.directive.d.ts +1 -1
  7. package/autocomplete/autocomplete.component.d.ts +1 -1
  8. package/autocomplete/autocomplete.scss +63 -0
  9. package/button/_button-base.scss +63 -0
  10. package/button/_button-theme.scss +154 -0
  11. package/button/button.component.d.ts +2 -2
  12. package/button/button.scss +45 -0
  13. package/button-toggle/button-toggle.component.d.ts +2 -2
  14. package/button-toggle/button-toggle.scss +135 -0
  15. package/card/_card-theme.scss +61 -0
  16. package/card/card.component.d.ts +1 -1
  17. package/card/card.component.scss +40 -0
  18. package/checkbox/_checkbox-theme.scss +103 -0
  19. package/checkbox/checkbox-required-validator.d.ts +1 -1
  20. package/checkbox/checkbox.d.ts +1 -1
  21. package/checkbox/checkbox.scss +144 -0
  22. package/code-block/_code-block-theme.scss +329 -0
  23. package/code-block/actionbar.component.d.ts +1 -1
  24. package/code-block/actionbar.component.scss +27 -0
  25. package/code-block/code-block.component.d.ts +1 -1
  26. package/code-block/code-block.scss +128 -0
  27. package/core/_index.scss +1 -0
  28. package/core/common-behaviors/color.d.ts +2 -2
  29. package/core/datetime/date-adapter.d.ts +12 -0
  30. package/core/datetime/date-formats.d.ts +4 -0
  31. package/core/datetime/index.d.ts +2 -0
  32. package/core/formatters/date/formatter.d.ts +4 -265
  33. package/core/formatters/date/formatter.pipe.d.ts +3 -2
  34. package/core/forms/_forms-theme.scss +32 -0
  35. package/core/forms/_forms.scss +109 -0
  36. package/core/forms/forms.directive.d.ts +2 -2
  37. package/core/highlight/_highlight-theme.scss +10 -0
  38. package/core/line/line.d.ts +1 -1
  39. package/core/option/_optgroup-theme.scss +26 -0
  40. package/core/option/_option-action-theme.scss +41 -0
  41. package/core/option/_option-theme.scss +46 -0
  42. package/core/option/action.d.ts +1 -1
  43. package/core/option/action.scss +28 -0
  44. package/core/option/optgroup.d.ts +1 -1
  45. package/core/option/optgroup.scss +16 -0
  46. package/core/option/option.d.ts +1 -1
  47. package/core/option/option.scss +62 -0
  48. package/core/pop-up/_pop-up.scss +129 -0
  49. package/core/pop-up/pop-up-trigger.d.ts +1 -1
  50. package/core/pop-up/pop-up.d.ts +1 -1
  51. package/core/public-api.d.ts +11 -10
  52. package/core/selection/pseudo-checkbox/_pseudo-checkbox-theme.scss +48 -0
  53. package/core/selection/pseudo-checkbox/pseudo-checkbox.d.ts +1 -1
  54. package/core/selection/pseudo-checkbox/pseudo-checkbox.scss +57 -0
  55. package/core/styles/_core.scss +11 -0
  56. package/core/styles/_mosaic-theme.scss +147 -0
  57. package/core/styles/_tokens.scss +6 -0
  58. package/core/styles/_variables.scss +9 -0
  59. package/core/styles/common/_animation.scss +35 -0
  60. package/core/styles/common/_button.scss +10 -0
  61. package/core/styles/common/_clearfix.scss +13 -0
  62. package/core/styles/common/_groups.scss +116 -0
  63. package/core/styles/common/_index.scss +13 -0
  64. package/core/styles/common/_input.scss +28 -0
  65. package/core/styles/common/_layout.scss +8 -0
  66. package/core/styles/common/_list.scss +46 -0
  67. package/core/styles/common/_overlay.scss +173 -0
  68. package/core/styles/common/_popup.scss +11 -0
  69. package/core/styles/common/_rtl.scss +33 -0
  70. package/core/styles/common/_size.scss +8 -0
  71. package/core/styles/common/_vendor-prefixes.scss +24 -0
  72. package/core/styles/common/_visually-hidden.scss +36 -0
  73. package/core/styles/functions/_index.scss +3 -0
  74. package/core/styles/functions/_number.scss +65 -0
  75. package/core/styles/functions/_string.scss +19 -0
  76. package/core/styles/functions/_timing.scss +30 -0
  77. package/core/styles/theming/_alerts.scss +166 -0
  78. package/core/styles/theming/_badges.scss +142 -0
  79. package/core/styles/theming/_components-theming.scss +721 -0
  80. package/core/styles/theming/_index.scss +2 -0
  81. package/core/styles/theming/_scrollbars.scss +133 -0
  82. package/core/styles/theming/_theming.scss +155 -0
  83. package/core/styles/typography/_index.scss +2 -0
  84. package/core/styles/typography/_typography-utils.scss +78 -0
  85. package/core/styles/typography/_typography.scss +180 -0
  86. package/core/styles/visual/_body.scss +35 -0
  87. package/core/styles/visual/_index.scss +3 -0
  88. package/core/styles/visual/_layout-media.scss +7 -0
  89. package/core/styles/visual/_layout.scss +527 -0
  90. package/datepicker/_datepicker-theme.scss +103 -0
  91. package/datepicker/calendar-body.component.d.ts +1 -1
  92. package/datepicker/calendar-body.scss +61 -0
  93. package/datepicker/calendar-header.component.d.ts +2 -2
  94. package/datepicker/calendar-header.scss +69 -0
  95. package/datepicker/calendar.component.d.ts +2 -2
  96. package/datepicker/calendar.scss +68 -0
  97. package/datepicker/datepicker-content.scss +32 -0
  98. package/datepicker/datepicker-input.directive.d.ts +2 -2
  99. package/datepicker/datepicker-input.scss +15 -0
  100. package/datepicker/datepicker-toggle.component.d.ts +2 -2
  101. package/datepicker/datepicker-toggle.scss +41 -0
  102. package/datepicker/datepicker.component.d.ts +3 -3
  103. package/datepicker/month-view.component.d.ts +2 -2
  104. package/divider/_divider-theme.scss +13 -0
  105. package/divider/divider.component.d.ts +1 -1
  106. package/divider/divider.scss +47 -0
  107. package/dl/_dl-theme.scss +44 -0
  108. package/dl/dl.component.d.ts +3 -3
  109. package/dl/dl.scss +66 -0
  110. package/dropdown/_dropdown-theme.scss +87 -0
  111. package/dropdown/dropdown-content.directive.d.ts +1 -1
  112. package/dropdown/dropdown-item.component.d.ts +1 -1
  113. package/dropdown/dropdown-item.scss +82 -0
  114. package/dropdown/dropdown-trigger.directive.d.ts +1 -1
  115. package/dropdown/dropdown.component.d.ts +1 -1
  116. package/dropdown/dropdown.scss +79 -0
  117. package/esm2020/autocomplete/autocomplete-origin.directive.mjs +4 -4
  118. package/esm2020/autocomplete/autocomplete-trigger.directive.mjs +4 -4
  119. package/esm2020/autocomplete/autocomplete.component.mjs +6 -6
  120. package/esm2020/autocomplete/autocomplete.module.mjs +5 -5
  121. package/esm2020/button/button.component.mjs +8 -8
  122. package/esm2020/button/button.module.mjs +5 -5
  123. package/esm2020/button-toggle/button-toggle.component.mjs +9 -9
  124. package/esm2020/button-toggle/button-toggle.module.mjs +5 -5
  125. package/esm2020/card/card.component.mjs +5 -5
  126. package/esm2020/card/card.module.mjs +5 -5
  127. package/esm2020/checkbox/checkbox-module.mjs +5 -5
  128. package/esm2020/checkbox/checkbox-required-validator.mjs +4 -4
  129. package/esm2020/checkbox/checkbox.mjs +5 -5
  130. package/esm2020/code-block/actionbar.component.mjs +4 -4
  131. package/esm2020/code-block/code-block.component.mjs +5 -5
  132. package/esm2020/code-block/code-block.module.mjs +5 -5
  133. package/esm2020/core/common-behaviors/color.mjs +3 -3
  134. package/esm2020/core/common-behaviors/common-module.mjs +5 -5
  135. package/esm2020/core/datetime/date-adapter.mjs +15 -0
  136. package/esm2020/core/datetime/date-formats.mjs +3 -0
  137. package/esm2020/core/datetime/index.mjs +3 -0
  138. package/esm2020/core/error/error-options.mjs +7 -7
  139. package/esm2020/core/formatters/date/formatter.mjs +10 -434
  140. package/esm2020/core/formatters/date/formatter.pipe.mjs +42 -42
  141. package/esm2020/core/formatters/index.mjs +5 -5
  142. package/esm2020/core/formatters/number/formatter.mjs +5 -5
  143. package/esm2020/core/forms/forms-module.mjs +5 -5
  144. package/esm2020/core/forms/forms.directive.mjs +7 -7
  145. package/esm2020/core/highlight/highlight.pipe.mjs +4 -4
  146. package/esm2020/core/highlight/index.mjs +5 -5
  147. package/esm2020/core/line/line.mjs +8 -8
  148. package/esm2020/core/option/action.mjs +6 -6
  149. package/esm2020/core/option/optgroup.mjs +5 -5
  150. package/esm2020/core/option/option-module.mjs +5 -5
  151. package/esm2020/core/option/option.mjs +5 -5
  152. package/esm2020/core/pop-up/pop-up-trigger.mjs +4 -4
  153. package/esm2020/core/pop-up/pop-up.mjs +4 -4
  154. package/esm2020/core/public-api.mjs +12 -11
  155. package/esm2020/core/selection/pseudo-checkbox/pseudo-checkbox.mjs +5 -5
  156. package/esm2020/core/selection/pseudo-checkbox/pseudo-checkbox.module.mjs +5 -5
  157. package/esm2020/core/services/measure-scrollbar.service.mjs +4 -4
  158. package/esm2020/core/version.mjs +2 -2
  159. package/esm2020/datepicker/calendar-body.component.mjs +5 -5
  160. package/esm2020/datepicker/calendar-header.component.mjs +8 -9
  161. package/esm2020/datepicker/calendar.component.mjs +7 -7
  162. package/esm2020/datepicker/datepicker-input.directive.mjs +6 -7
  163. package/esm2020/datepicker/datepicker-intl.mjs +4 -4
  164. package/esm2020/datepicker/datepicker-module.mjs +5 -5
  165. package/esm2020/datepicker/datepicker-toggle.component.mjs +8 -8
  166. package/esm2020/datepicker/datepicker.component.mjs +10 -10
  167. package/esm2020/datepicker/month-view.component.mjs +6 -6
  168. package/esm2020/divider/divider.component.mjs +5 -5
  169. package/esm2020/divider/divider.module.mjs +5 -5
  170. package/esm2020/dl/dl.component.mjs +11 -11
  171. package/esm2020/dl/dl.module.mjs +5 -5
  172. package/esm2020/dropdown/dropdown-content.directive.mjs +4 -4
  173. package/esm2020/dropdown/dropdown-item.component.mjs +5 -5
  174. package/esm2020/dropdown/dropdown-trigger.directive.mjs +4 -4
  175. package/esm2020/dropdown/dropdown.component.mjs +6 -6
  176. package/esm2020/dropdown/dropdown.module.mjs +5 -5
  177. package/esm2020/form-field/cleaner.mjs +5 -5
  178. package/esm2020/form-field/form-field.mjs +11 -11
  179. package/esm2020/form-field/form-field.module.mjs +5 -5
  180. package/esm2020/form-field/hint.mjs +4 -4
  181. package/esm2020/form-field/password-hint.mjs +4 -4
  182. package/esm2020/form-field/prefix.mjs +4 -4
  183. package/esm2020/form-field/stepper.mjs +8 -8
  184. package/esm2020/form-field/suffix.mjs +4 -4
  185. package/esm2020/form-field/validate.directive.mjs +4 -4
  186. package/esm2020/icon/icon.component.mjs +7 -7
  187. package/esm2020/icon/icon.module.mjs +5 -5
  188. package/esm2020/input/input-number-validators.mjs +7 -7
  189. package/esm2020/input/input-number.mjs +4 -4
  190. package/esm2020/input/input-password.mjs +7 -7
  191. package/esm2020/input/input.mjs +7 -7
  192. package/esm2020/input/input.module.mjs +5 -5
  193. package/esm2020/link/link.component.mjs +4 -4
  194. package/esm2020/link/link.module.mjs +5 -5
  195. package/esm2020/list/list-selection.component.mjs +9 -9
  196. package/esm2020/list/list.component.mjs +8 -8
  197. package/esm2020/list/list.module.mjs +5 -5
  198. package/esm2020/loader-overlay/loader-overlay.component.mjs +14 -14
  199. package/esm2020/loader-overlay/loader-overlay.module.mjs +5 -5
  200. package/esm2020/markdown/markdown.component.mjs +6 -6
  201. package/esm2020/markdown/markdown.module.mjs +5 -5
  202. package/esm2020/markdown/markdown.service.mjs +4 -4
  203. package/esm2020/modal/css-unit.pipe.mjs +4 -4
  204. package/esm2020/modal/modal-control.service.mjs +4 -4
  205. package/esm2020/modal/modal.component.mjs +5 -5
  206. package/esm2020/modal/modal.directive.mjs +13 -13
  207. package/esm2020/modal/modal.module.mjs +5 -5
  208. package/esm2020/modal/modal.service.mjs +4 -4
  209. package/esm2020/navbar/navbar-item.component.mjs +31 -31
  210. package/esm2020/navbar/navbar.component.mjs +11 -11
  211. package/esm2020/navbar/navbar.module.mjs +5 -5
  212. package/esm2020/navbar/vertical-navbar.animation.mjs +2 -2
  213. package/esm2020/navbar/vertical-navbar.component.mjs +6 -6
  214. package/esm2020/popover/popover-confirm.component.mjs +8 -8
  215. package/esm2020/popover/popover.component.mjs +8 -8
  216. package/esm2020/popover/popover.module.mjs +5 -5
  217. package/esm2020/progress-bar/progress-bar.component.mjs +5 -5
  218. package/esm2020/progress-bar/progress-bar.module.mjs +5 -5
  219. package/esm2020/progress-spinner/progress-spinner.component.mjs +6 -6
  220. package/esm2020/progress-spinner/progress-spinner.module.mjs +5 -5
  221. package/esm2020/radio/radio.component.mjs +8 -8
  222. package/esm2020/radio/radio.module.mjs +5 -5
  223. package/esm2020/select/select-option.directive.mjs +4 -4
  224. package/esm2020/select/select.component.mjs +18 -18
  225. package/esm2020/select/select.module.mjs +5 -5
  226. package/esm2020/sidebar/sidebar.component.mjs +10 -10
  227. package/esm2020/sidebar/sidebar.module.mjs +5 -5
  228. package/esm2020/sidepanel/sidepanel-container.component.mjs +5 -5
  229. package/esm2020/sidepanel/sidepanel-directives.mjs +18 -18
  230. package/esm2020/sidepanel/sidepanel.module.mjs +5 -5
  231. package/esm2020/sidepanel/sidepanel.service.mjs +4 -4
  232. package/esm2020/splitter/splitter.component.mjs +13 -13
  233. package/esm2020/splitter/splitter.module.mjs +5 -5
  234. package/esm2020/table/table.component.mjs +5 -5
  235. package/esm2020/table/table.module.mjs +5 -5
  236. package/esm2020/tabs/paginated-tab-header.mjs +4 -4
  237. package/esm2020/tabs/tab-body.component.mjs +7 -7
  238. package/esm2020/tabs/tab-content.directive.mjs +4 -4
  239. package/esm2020/tabs/tab-group.component.mjs +20 -20
  240. package/esm2020/tabs/tab-header.component.mjs +5 -5
  241. package/esm2020/tabs/tab-label-wrapper.directive.mjs +4 -4
  242. package/esm2020/tabs/tab-label.directive.mjs +4 -4
  243. package/esm2020/tabs/tab-nav-bar/tab-nav-bar.mjs +8 -8
  244. package/esm2020/tabs/tab.component.mjs +4 -4
  245. package/esm2020/tabs/tabs.module.mjs +5 -5
  246. package/esm2020/tags/tag-input.mjs +4 -4
  247. package/esm2020/tags/tag-list.component.mjs +5 -5
  248. package/esm2020/tags/tag.component.mjs +14 -14
  249. package/esm2020/tags/tag.module.mjs +5 -5
  250. package/esm2020/textarea/textarea.component.mjs +4 -4
  251. package/esm2020/textarea/textarea.module.mjs +5 -5
  252. package/esm2020/timepicker/timepicker.directive.mjs +6 -7
  253. package/esm2020/timepicker/timepicker.module.mjs +5 -5
  254. package/esm2020/timezone/cities-by-filter.pipe.mjs +4 -4
  255. package/esm2020/timezone/timezone-option.component.mjs +6 -6
  256. package/esm2020/timezone/timezone-option.directive.mjs +4 -4
  257. package/esm2020/timezone/timezone-select.component.mjs +9 -9
  258. package/esm2020/timezone/timezone.module.mjs +5 -5
  259. package/esm2020/timezone/utc-offset.pipe.mjs +4 -4
  260. package/esm2020/toast/toast-container.component.mjs +5 -5
  261. package/esm2020/toast/toast.component.mjs +5 -5
  262. package/esm2020/toast/toast.module.mjs +5 -5
  263. package/esm2020/toast/toast.service.mjs +4 -4
  264. package/esm2020/toggle/toggle.component.mjs +6 -6
  265. package/esm2020/toggle/toggle.module.mjs +5 -5
  266. package/esm2020/tooltip/tooltip.component.mjs +14 -14
  267. package/esm2020/tooltip/tooltip.module.mjs +5 -5
  268. package/esm2020/tree/node.mjs +4 -4
  269. package/esm2020/tree/outlet.mjs +4 -4
  270. package/esm2020/tree/padding.directive.mjs +5 -5
  271. package/esm2020/tree/toggle.mjs +11 -11
  272. package/esm2020/tree/tree-base.mjs +7 -7
  273. package/esm2020/tree/tree-option.component.mjs +6 -6
  274. package/esm2020/tree/tree-selection.component.mjs +4 -4
  275. package/esm2020/tree/tree.mjs +4 -4
  276. package/esm2020/tree/tree.module.mjs +5 -5
  277. package/esm2020/tree-select/tree-select.component.mjs +12 -12
  278. package/esm2020/tree-select/tree-select.module.mjs +5 -5
  279. package/fesm2015/ptsecurity-mosaic-autocomplete.mjs +15 -15
  280. package/fesm2015/ptsecurity-mosaic-autocomplete.mjs.map +1 -1
  281. package/fesm2015/ptsecurity-mosaic-button-toggle.mjs +12 -12
  282. package/fesm2015/ptsecurity-mosaic-button-toggle.mjs.map +1 -1
  283. package/fesm2015/ptsecurity-mosaic-button.mjs +11 -11
  284. package/fesm2015/ptsecurity-mosaic-button.mjs.map +1 -1
  285. package/fesm2015/ptsecurity-mosaic-card.mjs +8 -8
  286. package/fesm2015/ptsecurity-mosaic-card.mjs.map +1 -1
  287. package/fesm2015/ptsecurity-mosaic-checkbox.mjs +11 -11
  288. package/fesm2015/ptsecurity-mosaic-checkbox.mjs.map +1 -1
  289. package/fesm2015/ptsecurity-mosaic-code-block.mjs +11 -11
  290. package/fesm2015/ptsecurity-mosaic-code-block.mjs.map +1 -1
  291. package/fesm2015/ptsecurity-mosaic-core.mjs +789 -1877
  292. package/fesm2015/ptsecurity-mosaic-core.mjs.map +1 -1
  293. package/fesm2015/ptsecurity-mosaic-datepicker.mjs +42 -44
  294. package/fesm2015/ptsecurity-mosaic-datepicker.mjs.map +1 -1
  295. package/fesm2015/ptsecurity-mosaic-divider.mjs +8 -8
  296. package/fesm2015/ptsecurity-mosaic-divider.mjs.map +1 -1
  297. package/fesm2015/ptsecurity-mosaic-dl.mjs +14 -14
  298. package/fesm2015/ptsecurity-mosaic-dl.mjs.map +1 -1
  299. package/fesm2015/ptsecurity-mosaic-dropdown.mjs +19 -19
  300. package/fesm2015/ptsecurity-mosaic-dropdown.mjs.map +1 -1
  301. package/fesm2015/ptsecurity-mosaic-form-field.mjs +40 -40
  302. package/fesm2015/ptsecurity-mosaic-form-field.mjs.map +1 -1
  303. package/fesm2015/ptsecurity-mosaic-icon.mjs +10 -10
  304. package/fesm2015/ptsecurity-mosaic-icon.mjs.map +1 -1
  305. package/fesm2015/ptsecurity-mosaic-input.mjs +25 -25
  306. package/fesm2015/ptsecurity-mosaic-input.mjs.map +1 -1
  307. package/fesm2015/ptsecurity-mosaic-link.mjs +7 -7
  308. package/fesm2015/ptsecurity-mosaic-link.mjs.map +1 -1
  309. package/fesm2015/ptsecurity-mosaic-list.mjs +19 -19
  310. package/fesm2015/ptsecurity-mosaic-list.mjs.map +1 -1
  311. package/fesm2015/ptsecurity-mosaic-loader-overlay.mjs +17 -17
  312. package/fesm2015/ptsecurity-mosaic-loader-overlay.mjs.map +1 -1
  313. package/fesm2015/ptsecurity-mosaic-markdown.mjs +12 -12
  314. package/fesm2015/ptsecurity-mosaic-markdown.mjs.map +1 -1
  315. package/fesm2015/ptsecurity-mosaic-modal.mjs +29 -29
  316. package/fesm2015/ptsecurity-mosaic-modal.mjs.map +1 -1
  317. package/fesm2015/ptsecurity-mosaic-navbar.mjs +50 -50
  318. package/fesm2015/ptsecurity-mosaic-navbar.mjs.map +1 -1
  319. package/fesm2015/ptsecurity-mosaic-popover.mjs +18 -18
  320. package/fesm2015/ptsecurity-mosaic-popover.mjs.map +1 -1
  321. package/fesm2015/ptsecurity-mosaic-progress-bar.mjs +8 -8
  322. package/fesm2015/ptsecurity-mosaic-progress-bar.mjs.map +1 -1
  323. package/fesm2015/ptsecurity-mosaic-progress-spinner.mjs +9 -9
  324. package/fesm2015/ptsecurity-mosaic-progress-spinner.mjs.map +1 -1
  325. package/fesm2015/ptsecurity-mosaic-radio.mjs +11 -11
  326. package/fesm2015/ptsecurity-mosaic-radio.mjs.map +1 -1
  327. package/fesm2015/ptsecurity-mosaic-select.mjs +24 -24
  328. package/fesm2015/ptsecurity-mosaic-select.mjs.map +1 -1
  329. package/fesm2015/ptsecurity-mosaic-sidebar.mjs +13 -13
  330. package/fesm2015/ptsecurity-mosaic-sidebar.mjs.map +1 -1
  331. package/fesm2015/ptsecurity-mosaic-sidepanel.mjs +28 -28
  332. package/fesm2015/ptsecurity-mosaic-sidepanel.mjs.map +1 -1
  333. package/fesm2015/ptsecurity-mosaic-splitter.mjs +16 -16
  334. package/fesm2015/ptsecurity-mosaic-splitter.mjs.map +1 -1
  335. package/fesm2015/ptsecurity-mosaic-table.mjs +8 -8
  336. package/fesm2015/ptsecurity-mosaic-table.mjs.map +1 -1
  337. package/fesm2015/ptsecurity-mosaic-tabs.mjs +55 -55
  338. package/fesm2015/ptsecurity-mosaic-tabs.mjs.map +1 -1
  339. package/fesm2015/ptsecurity-mosaic-tags.mjs +24 -24
  340. package/fesm2015/ptsecurity-mosaic-tags.mjs.map +1 -1
  341. package/fesm2015/ptsecurity-mosaic-textarea.mjs +7 -7
  342. package/fesm2015/ptsecurity-mosaic-textarea.mjs.map +1 -1
  343. package/fesm2015/ptsecurity-mosaic-timepicker.mjs +8 -8
  344. package/fesm2015/ptsecurity-mosaic-timepicker.mjs.map +1 -1
  345. package/fesm2015/ptsecurity-mosaic-timezone.mjs +26 -26
  346. package/fesm2015/ptsecurity-mosaic-timezone.mjs.map +1 -1
  347. package/fesm2015/ptsecurity-mosaic-toast.mjs +15 -15
  348. package/fesm2015/ptsecurity-mosaic-toast.mjs.map +1 -1
  349. package/fesm2015/ptsecurity-mosaic-toggle.mjs +9 -9
  350. package/fesm2015/ptsecurity-mosaic-toggle.mjs.map +1 -1
  351. package/fesm2015/ptsecurity-mosaic-tooltip.mjs +17 -17
  352. package/fesm2015/ptsecurity-mosaic-tooltip.mjs.map +1 -1
  353. package/fesm2015/ptsecurity-mosaic-tree-select.mjs +15 -15
  354. package/fesm2015/ptsecurity-mosaic-tree-select.mjs.map +1 -1
  355. package/fesm2015/ptsecurity-mosaic-tree.mjs +41 -41
  356. package/fesm2015/ptsecurity-mosaic-tree.mjs.map +1 -1
  357. package/fesm2020/ptsecurity-mosaic-autocomplete.mjs +15 -15
  358. package/fesm2020/ptsecurity-mosaic-autocomplete.mjs.map +1 -1
  359. package/fesm2020/ptsecurity-mosaic-button-toggle.mjs +12 -12
  360. package/fesm2020/ptsecurity-mosaic-button-toggle.mjs.map +1 -1
  361. package/fesm2020/ptsecurity-mosaic-button.mjs +11 -11
  362. package/fesm2020/ptsecurity-mosaic-button.mjs.map +1 -1
  363. package/fesm2020/ptsecurity-mosaic-card.mjs +8 -8
  364. package/fesm2020/ptsecurity-mosaic-card.mjs.map +1 -1
  365. package/fesm2020/ptsecurity-mosaic-checkbox.mjs +11 -11
  366. package/fesm2020/ptsecurity-mosaic-checkbox.mjs.map +1 -1
  367. package/fesm2020/ptsecurity-mosaic-code-block.mjs +11 -11
  368. package/fesm2020/ptsecurity-mosaic-code-block.mjs.map +1 -1
  369. package/fesm2020/ptsecurity-mosaic-core.mjs +785 -1900
  370. package/fesm2020/ptsecurity-mosaic-core.mjs.map +1 -1
  371. package/fesm2020/ptsecurity-mosaic-datepicker.mjs +42 -44
  372. package/fesm2020/ptsecurity-mosaic-datepicker.mjs.map +1 -1
  373. package/fesm2020/ptsecurity-mosaic-divider.mjs +8 -8
  374. package/fesm2020/ptsecurity-mosaic-divider.mjs.map +1 -1
  375. package/fesm2020/ptsecurity-mosaic-dl.mjs +14 -14
  376. package/fesm2020/ptsecurity-mosaic-dl.mjs.map +1 -1
  377. package/fesm2020/ptsecurity-mosaic-dropdown.mjs +19 -19
  378. package/fesm2020/ptsecurity-mosaic-dropdown.mjs.map +1 -1
  379. package/fesm2020/ptsecurity-mosaic-form-field.mjs +40 -40
  380. package/fesm2020/ptsecurity-mosaic-form-field.mjs.map +1 -1
  381. package/fesm2020/ptsecurity-mosaic-icon.mjs +10 -10
  382. package/fesm2020/ptsecurity-mosaic-icon.mjs.map +1 -1
  383. package/fesm2020/ptsecurity-mosaic-input.mjs +25 -25
  384. package/fesm2020/ptsecurity-mosaic-input.mjs.map +1 -1
  385. package/fesm2020/ptsecurity-mosaic-link.mjs +7 -7
  386. package/fesm2020/ptsecurity-mosaic-link.mjs.map +1 -1
  387. package/fesm2020/ptsecurity-mosaic-list.mjs +19 -19
  388. package/fesm2020/ptsecurity-mosaic-list.mjs.map +1 -1
  389. package/fesm2020/ptsecurity-mosaic-loader-overlay.mjs +17 -17
  390. package/fesm2020/ptsecurity-mosaic-loader-overlay.mjs.map +1 -1
  391. package/fesm2020/ptsecurity-mosaic-markdown.mjs +12 -12
  392. package/fesm2020/ptsecurity-mosaic-markdown.mjs.map +1 -1
  393. package/fesm2020/ptsecurity-mosaic-modal.mjs +29 -29
  394. package/fesm2020/ptsecurity-mosaic-modal.mjs.map +1 -1
  395. package/fesm2020/ptsecurity-mosaic-navbar.mjs +50 -50
  396. package/fesm2020/ptsecurity-mosaic-navbar.mjs.map +1 -1
  397. package/fesm2020/ptsecurity-mosaic-popover.mjs +18 -18
  398. package/fesm2020/ptsecurity-mosaic-popover.mjs.map +1 -1
  399. package/fesm2020/ptsecurity-mosaic-progress-bar.mjs +8 -8
  400. package/fesm2020/ptsecurity-mosaic-progress-bar.mjs.map +1 -1
  401. package/fesm2020/ptsecurity-mosaic-progress-spinner.mjs +9 -9
  402. package/fesm2020/ptsecurity-mosaic-progress-spinner.mjs.map +1 -1
  403. package/fesm2020/ptsecurity-mosaic-radio.mjs +11 -11
  404. package/fesm2020/ptsecurity-mosaic-radio.mjs.map +1 -1
  405. package/fesm2020/ptsecurity-mosaic-select.mjs +24 -24
  406. package/fesm2020/ptsecurity-mosaic-select.mjs.map +1 -1
  407. package/fesm2020/ptsecurity-mosaic-sidebar.mjs +13 -13
  408. package/fesm2020/ptsecurity-mosaic-sidebar.mjs.map +1 -1
  409. package/fesm2020/ptsecurity-mosaic-sidepanel.mjs +28 -28
  410. package/fesm2020/ptsecurity-mosaic-sidepanel.mjs.map +1 -1
  411. package/fesm2020/ptsecurity-mosaic-splitter.mjs +16 -16
  412. package/fesm2020/ptsecurity-mosaic-splitter.mjs.map +1 -1
  413. package/fesm2020/ptsecurity-mosaic-table.mjs +8 -8
  414. package/fesm2020/ptsecurity-mosaic-table.mjs.map +1 -1
  415. package/fesm2020/ptsecurity-mosaic-tabs.mjs +55 -55
  416. package/fesm2020/ptsecurity-mosaic-tabs.mjs.map +1 -1
  417. package/fesm2020/ptsecurity-mosaic-tags.mjs +24 -24
  418. package/fesm2020/ptsecurity-mosaic-tags.mjs.map +1 -1
  419. package/fesm2020/ptsecurity-mosaic-textarea.mjs +7 -7
  420. package/fesm2020/ptsecurity-mosaic-textarea.mjs.map +1 -1
  421. package/fesm2020/ptsecurity-mosaic-timepicker.mjs +8 -8
  422. package/fesm2020/ptsecurity-mosaic-timepicker.mjs.map +1 -1
  423. package/fesm2020/ptsecurity-mosaic-timezone.mjs +26 -26
  424. package/fesm2020/ptsecurity-mosaic-timezone.mjs.map +1 -1
  425. package/fesm2020/ptsecurity-mosaic-toast.mjs +15 -15
  426. package/fesm2020/ptsecurity-mosaic-toast.mjs.map +1 -1
  427. package/fesm2020/ptsecurity-mosaic-toggle.mjs +9 -9
  428. package/fesm2020/ptsecurity-mosaic-toggle.mjs.map +1 -1
  429. package/fesm2020/ptsecurity-mosaic-tooltip.mjs +17 -17
  430. package/fesm2020/ptsecurity-mosaic-tooltip.mjs.map +1 -1
  431. package/fesm2020/ptsecurity-mosaic-tree-select.mjs +15 -15
  432. package/fesm2020/ptsecurity-mosaic-tree-select.mjs.map +1 -1
  433. package/fesm2020/ptsecurity-mosaic-tree.mjs +41 -41
  434. package/fesm2020/ptsecurity-mosaic-tree.mjs.map +1 -1
  435. package/form-field/_form-field-theme.scss +133 -0
  436. package/form-field/cleaner.d.ts +1 -1
  437. package/form-field/form-field.d.ts +3 -3
  438. package/form-field/form-field.scss +163 -0
  439. package/form-field/hint.d.ts +1 -1
  440. package/form-field/password-hint.d.ts +1 -1
  441. package/form-field/prefix.d.ts +1 -1
  442. package/form-field/stepper.d.ts +1 -1
  443. package/form-field/suffix.d.ts +1 -1
  444. package/form-field/validate.directive.d.ts +1 -1
  445. package/icon/_icon-theme.scss +152 -0
  446. package/icon/icon.component.d.ts +2 -2
  447. package/icon/icon.scss +30 -0
  448. package/input/_input-base.scss +21 -0
  449. package/input/_input-theme.scss +58 -0
  450. package/input/input-number-validators.d.ts +2 -2
  451. package/input/input-number.d.ts +1 -1
  452. package/input/input-password.d.ts +2 -2
  453. package/input/input.d.ts +2 -2
  454. package/input/input.scss +62 -0
  455. package/link/_link-theme.scss +172 -0
  456. package/link/link.component.d.ts +1 -1
  457. package/list/_list-base.scss +50 -0
  458. package/list/_list-theme.scss +49 -0
  459. package/list/list-selection.component.d.ts +2 -2
  460. package/list/list.component.d.ts +2 -2
  461. package/list/list.scss +52 -0
  462. package/loader-overlay/_loader-overlay-theme.scss +36 -0
  463. package/loader-overlay/loader-overlay.component.d.ts +4 -4
  464. package/loader-overlay/loader-overlay.scss +64 -0
  465. package/markdown/_markdown-theme.scss +142 -0
  466. package/markdown/markdown.component.d.ts +1 -1
  467. package/markdown/markdown.scss +240 -0
  468. package/modal/_modal-animation.scss +114 -0
  469. package/modal/_modal-confirm.scss +53 -0
  470. package/modal/_modal-theme.scss +90 -0
  471. package/modal/modal.component.d.ts +1 -1
  472. package/modal/modal.directive.d.ts +4 -4
  473. package/modal/modal.scss +143 -0
  474. package/navbar/_navbar-theme.scss +125 -0
  475. package/navbar/navbar-brand.scss +70 -0
  476. package/navbar/navbar-divider.scss +18 -0
  477. package/navbar/navbar-item.component.d.ts +10 -10
  478. package/navbar/navbar-item.scss +159 -0
  479. package/navbar/navbar.component.d.ts +3 -3
  480. package/navbar/navbar.scss +20 -0
  481. package/navbar/vertical-navbar.component.d.ts +1 -1
  482. package/navbar/vertical-navbar.scss +46 -0
  483. package/package.json +28 -27
  484. package/popover/_popover-theme.scss +113 -0
  485. package/popover/popover-confirm.component.d.ts +2 -2
  486. package/popover/popover.component.d.ts +2 -2
  487. package/popover/popover.scss +114 -0
  488. package/prebuilt-themes/dark-theme.css +1 -1
  489. package/prebuilt-themes/default-theme.css +1 -1
  490. package/prebuilt-visual/default-visual.css +1 -1
  491. package/progress-bar/_progress-bar-theme.scss +28 -0
  492. package/progress-bar/progress-bar.component.d.ts +1 -1
  493. package/progress-bar/progress-bar.scss +42 -0
  494. package/progress-spinner/_progress-spinner-theme.scss +24 -0
  495. package/progress-spinner/progress-spinner.component.d.ts +1 -1
  496. package/progress-spinner/progress-spinner.scss +70 -0
  497. package/radio/_radio-theme.scss +99 -0
  498. package/radio/radio.component.d.ts +2 -2
  499. package/radio/radio.scss +110 -0
  500. package/select/_select-theme.scss +57 -0
  501. package/select/select-option.directive.d.ts +1 -1
  502. package/select/select.component.d.ts +5 -5
  503. package/select/select.scss +197 -0
  504. package/sidebar/sidebar.component.d.ts +3 -3
  505. package/sidebar/sidebar.scss +12 -0
  506. package/sidepanel/_sidepanel-theme.scss +69 -0
  507. package/sidepanel/sidepanel-container.component.d.ts +1 -1
  508. package/sidepanel/sidepanel-directives.d.ts +5 -5
  509. package/sidepanel/sidepanel.scss +190 -0
  510. package/splitter/_splitter-theme.scss +31 -0
  511. package/splitter/splitter.component.d.ts +4 -4
  512. package/splitter/splitter.scss +48 -0
  513. package/table/_table-theme.scss +67 -0
  514. package/table/table.component.d.ts +1 -1
  515. package/table/table.scss +76 -0
  516. package/tabs/_tabs-common.scss +197 -0
  517. package/tabs/_tabs-theme.scss +241 -0
  518. package/tabs/paginated-tab-header.d.ts +1 -1
  519. package/tabs/tab-body.component.d.ts +2 -2
  520. package/tabs/tab-body.scss +8 -0
  521. package/tabs/tab-content.directive.d.ts +1 -1
  522. package/tabs/tab-group.component.d.ts +6 -6
  523. package/tabs/tab-group.scss +63 -0
  524. package/tabs/tab-header.component.d.ts +1 -1
  525. package/tabs/tab-header.scss +106 -0
  526. package/tabs/tab-label-wrapper.directive.d.ts +1 -1
  527. package/tabs/tab-label.directive.d.ts +1 -1
  528. package/tabs/tab-nav-bar/tab-nav-bar.d.ts +2 -2
  529. package/tabs/tab-nav-bar/tab-nav-bar.scss +54 -0
  530. package/tabs/tab.component.d.ts +1 -1
  531. package/tags/_tag-theme.scss +122 -0
  532. package/tags/tag-input.d.ts +1 -1
  533. package/tags/tag-list.component.d.ts +1 -1
  534. package/tags/tag-list.scss +52 -0
  535. package/tags/tag.component.d.ts +4 -4
  536. package/tags/tag.scss +115 -0
  537. package/textarea/_textarea-base.scss +22 -0
  538. package/textarea/_textarea-theme.scss +40 -0
  539. package/textarea/textarea.component.d.ts +1 -1
  540. package/textarea/textarea.scss +32 -0
  541. package/timepicker/timepicker.directive.d.ts +2 -2
  542. package/timepicker/timepicker.scss +18 -0
  543. package/timezone/_timezone-option-theme.scss +36 -0
  544. package/timezone/timezone-option.component.d.ts +1 -1
  545. package/timezone/timezone-option.component.scss +35 -0
  546. package/timezone/timezone-option.directive.d.ts +1 -1
  547. package/timezone/timezone-select.component.d.ts +2 -2
  548. package/toast/_toast-theme.scss +64 -0
  549. package/toast/toast-container.component.d.ts +1 -1
  550. package/toast/toast-container.component.scss +23 -0
  551. package/toast/toast.component.d.ts +1 -1
  552. package/toast/toast.component.scss +76 -0
  553. package/toggle/_toggle-theme.scss +82 -0
  554. package/toggle/toggle.component.d.ts +1 -1
  555. package/toggle/toggle.scss +124 -0
  556. package/tooltip/_tooltip-theme.scss +104 -0
  557. package/tooltip/tooltip.component.d.ts +4 -4
  558. package/tooltip/tooltip.scss +75 -0
  559. package/tree/_tree-theme.scss +70 -0
  560. package/tree/node.d.ts +1 -1
  561. package/tree/outlet.d.ts +1 -1
  562. package/tree/padding.directive.d.ts +1 -1
  563. package/tree/toggle.d.ts +3 -3
  564. package/tree/toggle.scss +35 -0
  565. package/tree/tree-base.d.ts +2 -2
  566. package/tree/tree-option.component.d.ts +1 -1
  567. package/tree/tree-option.scss +67 -0
  568. package/tree/tree-selection.component.d.ts +1 -1
  569. package/tree/tree-selection.scss +3 -0
  570. package/tree/tree.d.ts +1 -1
  571. package/tree/tree.scss +3 -0
  572. package/tree-select/_tree-select-theme.scss +44 -0
  573. package/tree-select/tree-select.component.d.ts +3 -3
  574. package/tree-select/tree-select.scss +212 -0
  575. package/core/formatters/date/templates/en-US.d.ts +0 -2
  576. package/core/formatters/date/templates/ru-RU.d.ts +0 -2
  577. package/design-tokens/index.d.ts +0 -1
  578. package/design-tokens/legacy-2017/tokens/components/alert.json5 +0 -83
  579. package/design-tokens/legacy-2017/tokens/components/autocomplete.json5 +0 -11
  580. package/design-tokens/legacy-2017/tokens/components/badge.json5 +0 -174
  581. package/design-tokens/legacy-2017/tokens/components/button-toggle.json5 +0 -11
  582. package/design-tokens/legacy-2017/tokens/components/button.json5 +0 -142
  583. package/design-tokens/legacy-2017/tokens/components/card.json5 +0 -51
  584. package/design-tokens/legacy-2017/tokens/components/checkbox.json5 +0 -106
  585. package/design-tokens/legacy-2017/tokens/components/code-block.json5 +0 -704
  586. package/design-tokens/legacy-2017/tokens/components/datepicker.json5 +0 -73
  587. package/design-tokens/legacy-2017/tokens/components/divider.json5 +0 -14
  588. package/design-tokens/legacy-2017/tokens/components/dl.json5 +0 -38
  589. package/design-tokens/legacy-2017/tokens/components/dropdown.json5 +0 -48
  590. package/design-tokens/legacy-2017/tokens/components/form-field.json5 +0 -92
  591. package/design-tokens/legacy-2017/tokens/components/forms.json5 +0 -48
  592. package/design-tokens/legacy-2017/tokens/components/icon.json5 +0 -104
  593. package/design-tokens/legacy-2017/tokens/components/input.json5 +0 -12
  594. package/design-tokens/legacy-2017/tokens/components/link.json5 +0 -50
  595. package/design-tokens/legacy-2017/tokens/components/list.json5 +0 -13
  596. package/design-tokens/legacy-2017/tokens/components/loader-overlay.json5 +0 -23
  597. package/design-tokens/legacy-2017/tokens/components/markdown.json5 +0 -294
  598. package/design-tokens/legacy-2017/tokens/components/modal.json5 +0 -81
  599. package/design-tokens/legacy-2017/tokens/components/navbar.json5 +0 -70
  600. package/design-tokens/legacy-2017/tokens/components/optgroup.json5 +0 -10
  601. package/design-tokens/legacy-2017/tokens/components/option.json5 +0 -12
  602. package/design-tokens/legacy-2017/tokens/components/popover.json5 +0 -69
  603. package/design-tokens/legacy-2017/tokens/components/popup.json5 +0 -16
  604. package/design-tokens/legacy-2017/tokens/components/progress-bar.json5 +0 -13
  605. package/design-tokens/legacy-2017/tokens/components/progress-spinner.json5 +0 -16
  606. package/design-tokens/legacy-2017/tokens/components/radio.json5 +0 -47
  607. package/design-tokens/legacy-2017/tokens/components/scrollbars.json5 +0 -52
  608. package/design-tokens/legacy-2017/tokens/components/select.json5 +0 -24
  609. package/design-tokens/legacy-2017/tokens/components/sidepanel.json5 +0 -44
  610. package/design-tokens/legacy-2017/tokens/components/table.json5 +0 -15
  611. package/design-tokens/legacy-2017/tokens/components/tabs.json5 +0 -101
  612. package/design-tokens/legacy-2017/tokens/components/tags.json5 +0 -134
  613. package/design-tokens/legacy-2017/tokens/components/textarea.json5 +0 -12
  614. package/design-tokens/legacy-2017/tokens/components/timepicker.json5 +0 -7
  615. package/design-tokens/legacy-2017/tokens/components/timezone.json5 +0 -23
  616. package/design-tokens/legacy-2017/tokens/components/toast.json5 +0 -54
  617. package/design-tokens/legacy-2017/tokens/components/toggle.json5 +0 -79
  618. package/design-tokens/legacy-2017/tokens/components/tooltip.json5 +0 -83
  619. package/design-tokens/legacy-2017/tokens/components/tree.json5 +0 -15
  620. package/design-tokens/legacy-2017/tokens/properties/aliases.json5 +0 -3
  621. package/design-tokens/legacy-2017/tokens/properties/colors.json5 +0 -119
  622. package/design-tokens/legacy-2017/tokens/properties/font.json5 +0 -12
  623. package/design-tokens/legacy-2017/tokens/properties/globals.json5 +0 -49
  624. package/design-tokens/legacy-2017/tokens/properties/md-typography.json5 +0 -103
  625. package/design-tokens/legacy-2017/tokens/properties/padding.json5 +0 -3
  626. package/design-tokens/legacy-2017/tokens/properties/palette.json5 +0 -163
  627. package/design-tokens/legacy-2017/tokens/properties/typography.json5 +0 -184
  628. package/design-tokens/legacy-2017/tokens.d.ts +0 -8520
  629. package/design-tokens/pt-2022/tokens/components/alert.json5 +0 -83
  630. package/design-tokens/pt-2022/tokens/components/autocomplete.json5 +0 -11
  631. package/design-tokens/pt-2022/tokens/components/badge.json5 +0 -174
  632. package/design-tokens/pt-2022/tokens/components/button-toggle.json5 +0 -11
  633. package/design-tokens/pt-2022/tokens/components/button.json5 +0 -142
  634. package/design-tokens/pt-2022/tokens/components/card.json5 +0 -51
  635. package/design-tokens/pt-2022/tokens/components/checkbox.json5 +0 -106
  636. package/design-tokens/pt-2022/tokens/components/code-block.json5 +0 -697
  637. package/design-tokens/pt-2022/tokens/components/datepicker.json5 +0 -73
  638. package/design-tokens/pt-2022/tokens/components/divider.json5 +0 -14
  639. package/design-tokens/pt-2022/tokens/components/dl.json5 +0 -38
  640. package/design-tokens/pt-2022/tokens/components/dropdown.json5 +0 -48
  641. package/design-tokens/pt-2022/tokens/components/form-field.json5 +0 -92
  642. package/design-tokens/pt-2022/tokens/components/forms.json5 +0 -48
  643. package/design-tokens/pt-2022/tokens/components/icon.json5 +0 -104
  644. package/design-tokens/pt-2022/tokens/components/input.json5 +0 -12
  645. package/design-tokens/pt-2022/tokens/components/link.json5 +0 -50
  646. package/design-tokens/pt-2022/tokens/components/list.json5 +0 -13
  647. package/design-tokens/pt-2022/tokens/components/loader-overlay.json5 +0 -23
  648. package/design-tokens/pt-2022/tokens/components/markdown.json5 +0 -294
  649. package/design-tokens/pt-2022/tokens/components/modal.json5 +0 -81
  650. package/design-tokens/pt-2022/tokens/components/navbar.json5 +0 -70
  651. package/design-tokens/pt-2022/tokens/components/optgroup.json5 +0 -10
  652. package/design-tokens/pt-2022/tokens/components/option.json5 +0 -12
  653. package/design-tokens/pt-2022/tokens/components/popover.json5 +0 -69
  654. package/design-tokens/pt-2022/tokens/components/popup.json5 +0 -16
  655. package/design-tokens/pt-2022/tokens/components/progress-bar.json5 +0 -13
  656. package/design-tokens/pt-2022/tokens/components/progress-spinner.json5 +0 -16
  657. package/design-tokens/pt-2022/tokens/components/radio.json5 +0 -48
  658. package/design-tokens/pt-2022/tokens/components/scrollbars.json5 +0 -52
  659. package/design-tokens/pt-2022/tokens/components/select.json5 +0 -24
  660. package/design-tokens/pt-2022/tokens/components/sidepanel.json5 +0 -43
  661. package/design-tokens/pt-2022/tokens/components/table.json5 +0 -15
  662. package/design-tokens/pt-2022/tokens/components/tabs.json5 +0 -101
  663. package/design-tokens/pt-2022/tokens/components/tags.json5 +0 -137
  664. package/design-tokens/pt-2022/tokens/components/textarea.json5 +0 -12
  665. package/design-tokens/pt-2022/tokens/components/timepicker.json5 +0 -7
  666. package/design-tokens/pt-2022/tokens/components/timezone.json5 +0 -23
  667. package/design-tokens/pt-2022/tokens/components/toast.json5 +0 -54
  668. package/design-tokens/pt-2022/tokens/components/toggle.json5 +0 -79
  669. package/design-tokens/pt-2022/tokens/components/tooltip.json5 +0 -83
  670. package/design-tokens/pt-2022/tokens/components/tree.json5 +0 -15
  671. package/design-tokens/pt-2022/tokens/properties/aliases.json5 +0 -3
  672. package/design-tokens/pt-2022/tokens/properties/colors.json5 +0 -122
  673. package/design-tokens/pt-2022/tokens/properties/font.json5 +0 -15
  674. package/design-tokens/pt-2022/tokens/properties/globals.json5 +0 -49
  675. package/design-tokens/pt-2022/tokens/properties/md-typography.json5 +0 -103
  676. package/design-tokens/pt-2022/tokens/properties/padding.json5 +0 -3
  677. package/design-tokens/pt-2022/tokens/properties/palette.json5 +0 -233
  678. package/design-tokens/pt-2022/tokens/properties/typography.json5 +0 -184
  679. package/design-tokens/pt-2022/tokens.d.ts +0 -9851
  680. package/design-tokens/public-api.d.ts +0 -3
  681. package/design-tokens/style-dictionary/build.js +0 -65
  682. package/design-tokens/style-dictionary/configs/css.js +0 -13
  683. package/design-tokens/style-dictionary/configs/index.js +0 -44
  684. package/design-tokens/style-dictionary/configs/js.js +0 -9
  685. package/design-tokens/style-dictionary/configs/scss.js +0 -29
  686. package/design-tokens/style-dictionary/filters/color.js +0 -9
  687. package/design-tokens/style-dictionary/filters/md-typography.js +0 -7
  688. package/design-tokens/style-dictionary/filters/palette.js +0 -7
  689. package/design-tokens/style-dictionary/filters/size.js +0 -7
  690. package/design-tokens/style-dictionary/filters/typography.js +0 -7
  691. package/design-tokens/style-dictionary/formats/palette.js +0 -25
  692. package/design-tokens/style-dictionary/formats/typography.js +0 -52
  693. package/design-tokens/style-dictionary/transformGroups/css.js +0 -13
  694. package/design-tokens/style-dictionary/transformGroups/scss.js +0 -13
  695. package/design-tokens/style-dictionary/transformGroups/ts.js +0 -11
  696. package/design-tokens/style-dictionary/transforms/attribute/md-typography.js +0 -9
  697. package/design-tokens/style-dictionary/transforms/attribute/palette.js +0 -9
  698. package/design-tokens/style-dictionary/transforms/attribute/prefix.js +0 -11
  699. package/design-tokens/style-dictionary/transforms/attribute/size.js +0 -8
  700. package/design-tokens/style-dictionary/transforms/attribute/typography.js +0 -9
  701. package/esm2020/core/formatters/date/templates/en-US.mjs +0 -336
  702. package/esm2020/core/formatters/date/templates/ru-RU.mjs +0 -372
  703. package/esm2020/design-tokens/index.mjs +0 -2
  704. package/esm2020/design-tokens/legacy-2017/tokens.mjs +0 -1814
  705. package/esm2020/design-tokens/pt-2022/tokens.mjs +0 -1883
  706. package/esm2020/design-tokens/ptsecurity-mosaic-design-tokens.mjs +0 -5
  707. package/esm2020/design-tokens/public-api.mjs +0 -4
  708. package/fesm2015/ptsecurity-mosaic-design-tokens.mjs +0 -5517
  709. package/fesm2015/ptsecurity-mosaic-design-tokens.mjs.map +0 -1
  710. package/fesm2020/ptsecurity-mosaic-design-tokens.mjs +0 -5517
  711. package/fesm2020/ptsecurity-mosaic-design-tokens.mjs.map +0 -1
  712. package/schematics/README.md +0 -35
@@ -1,28 +1,81 @@
1
- import * as i0 from '@angular/core';
2
- import { Version, InjectionToken, isDevMode, NgModule, Optional, Inject, Directive, Injectable, Pipe, Component, ChangeDetectionStrategy, ViewEncapsulation, Input, EventEmitter, ViewChild, Output, ContentChild, ContentChildren, TemplateRef } from '@angular/core';
1
+ import { trigger, state, style, transition, animate, group } from '@angular/animations';
3
2
  import * as i2$1 from '@angular/cdk/bidi';
4
3
  import { BidiModule } from '@angular/cdk/bidi';
4
+ import * as i0 from '@angular/core';
5
+ import { InjectionToken, isDevMode, NgModule, Optional, Inject, inject, LOCALE_ID, Injectable, Pipe, Directive, ContentChildren, Component, ViewEncapsulation, ChangeDetectionStrategy, Input, EventEmitter, ViewChild, Output, ContentChild, TemplateRef, Version } from '@angular/core';
5
6
  import { coerceBooleanProperty, coerceNumberProperty } from '@angular/cdk/coercion';
6
- import MessageFormat from '@messageformat/core';
7
- import * as i1 from '@ptsecurity/cdk/datetime';
8
- import { MC_DATE_LOCALE } from '@ptsecurity/cdk/datetime';
7
+ import * as i1 from '@mosaic-design/date-adapter';
8
+ import { DateAdapter as DateAdapter$1 } from '@mosaic-design/date-adapter';
9
+ import { DateFormatter as DateFormatter$1 } from '@mosaic-design/date-formatter';
9
10
  import * as i2 from '@angular/common';
10
11
  import { CommonModule, DOCUMENT } from '@angular/common';
11
- import * as i1$2 from '@angular/cdk/overlay';
12
- import { Overlay } from '@angular/cdk/overlay';
13
- import { trigger, state, style, transition, animate, group } from '@angular/animations';
14
12
  import { ENTER, SPACE, TAB, ESCAPE } from '@ptsecurity/cdk/keycodes';
15
13
  import { Subject } from 'rxjs';
16
14
  import * as i1$1 from '@angular/cdk/a11y';
17
15
  import { takeUntil, distinctUntilChanged, delay } from 'rxjs/operators';
16
+ import * as i1$2 from '@angular/cdk/overlay';
17
+ import { Overlay } from '@angular/cdk/overlay';
18
18
  import { ComponentPortal } from '@angular/cdk/portal';
19
19
 
20
- const VERSION = new Version('14.7.2+sha-052c4a8');
20
+ const fadeAnimation = trigger('fadeAnimation', [
21
+ state('void', style({ opacity: 0 })),
22
+ state('true', style({ opacity: 1 })),
23
+ state('false', style({ opacity: 0 })),
24
+ transition('* => true', animate('150ms cubic-bezier(0.0, 0.0, 0.2, 1)')),
25
+ transition('* => void', animate('150ms cubic-bezier(0.4, 0.0, 1, 1)'))
26
+ ]);
21
27
 
22
- function isBoolean(val) { return typeof val === 'boolean'; }
23
- function toBoolean(value) {
24
- return value != null && `${value}` !== 'false';
25
- }
28
+ var AnimationCurves;
29
+ (function (AnimationCurves) {
30
+ AnimationCurves["StandardCurve"] = "cubic-bezier(0.4,0.0,0.2,1)";
31
+ AnimationCurves["DecelerationCurve"] = "cubic-bezier(0.0,0.0,0.2,1)";
32
+ AnimationCurves["AccelerationCurve"] = "cubic-bezier(0.4,0.0,1,1)";
33
+ AnimationCurves["SharpCurve"] = "cubic-bezier(0.4,0.0,0.6,1)";
34
+ })(AnimationCurves || (AnimationCurves = {}));
35
+
36
+ /**
37
+ * The following are all the animations for the mc-select component, with each
38
+ * const containing the metadata for one animation.
39
+ *
40
+ */
41
+ const mcSelectAnimations = {
42
+ /**
43
+ * This animation transforms the select's overlay panel on and off the page.
44
+ *
45
+ * When the panel is attached to the DOM, it expands its width by the amount of padding, scales it
46
+ * up to 100% on the Y axis, fades in its border, and translates slightly up and to the
47
+ * side to ensure the option text correctly overlaps the trigger text.
48
+ *
49
+ * When the panel is removed from the DOM, it simply fades out linearly.
50
+ */
51
+ transformPanel: trigger('transformPanel', [
52
+ state('void', style({
53
+ transform: 'scaleY(0)',
54
+ minWidth: '100%',
55
+ opacity: 0
56
+ })),
57
+ transition('void => *', group([
58
+ animate('150ms cubic-bezier(0.25, 0.8, 0.25, 1)')
59
+ ])),
60
+ transition('* => void', [
61
+ animate('250ms 100ms linear', style({ opacity: 0 }))
62
+ ])
63
+ ]),
64
+ /**
65
+ * This animation fades in the background color and text content of the
66
+ * select's options. It is time delayed to occur 100ms after the overlay
67
+ * panel has transformed in.
68
+ */
69
+ fadeInContent: trigger('fadeInContent', [
70
+ state('showing', style({ opacity: 1 })),
71
+ transition('void => showing', [
72
+ style({ opacity: 0 }),
73
+ animate('150ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)')
74
+ ])
75
+ ])
76
+ };
77
+ const transformPanel = mcSelectAnimations.transformPanel;
78
+ const fadeInContent = mcSelectAnimations.fadeInContent;
26
79
 
27
80
  // Injection token that configures whether the Mosaic sanity checks are enabled.
28
81
  const MC_SANITY_CHECKS = new InjectionToken('mc-sanity-checks', {
@@ -88,10 +141,10 @@ class McCommonModule {
88
141
  }
89
142
  }
90
143
  }
91
- /** @nocollapse */ McCommonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: McCommonModule, deps: [{ token: MC_SANITY_CHECKS, optional: true }], target: i0.ɵɵFactoryTarget.NgModule });
92
- /** @nocollapse */ McCommonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.12", ngImport: i0, type: McCommonModule, imports: [BidiModule], exports: [BidiModule] });
93
- /** @nocollapse */ McCommonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: McCommonModule, imports: [BidiModule, BidiModule] });
94
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: McCommonModule, decorators: [{
144
+ /** @nocollapse */ McCommonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: McCommonModule, deps: [{ token: MC_SANITY_CHECKS, optional: true }], target: i0.ɵɵFactoryTarget.NgModule });
145
+ /** @nocollapse */ McCommonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.2", ngImport: i0, type: McCommonModule, imports: [BidiModule], exports: [BidiModule] });
146
+ /** @nocollapse */ McCommonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: McCommonModule, imports: [BidiModule, BidiModule] });
147
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: McCommonModule, decorators: [{
95
148
  type: NgModule,
96
149
  args: [{
97
150
  imports: [BidiModule],
@@ -123,12 +176,12 @@ function mixinDisabled(base) {
123
176
  var ThemePalette;
124
177
  (function (ThemePalette) {
125
178
  ThemePalette["Primary"] = "primary";
126
- ThemePalette["Second"] = "second";
179
+ ThemePalette["Secondary"] = "secondary";
127
180
  ThemePalette["Error"] = "error";
128
181
  ThemePalette["Info"] = "info";
129
182
  ThemePalette["Warning"] = "warning";
130
183
  ThemePalette["Success"] = "success";
131
- ThemePalette["Default"] = "second";
184
+ ThemePalette["Default"] = "secondary";
132
185
  ThemePalette["Empty"] = "";
133
186
  })(ThemePalette || (ThemePalette = {}));
134
187
  function mixinColor(base, defaultColor = ThemePalette.Default) {
@@ -191,73 +244,20 @@ function mixinErrorState(base) {
191
244
  };
192
245
  }
193
246
 
194
- /**
195
- * Shared directive to count lines inside a text area, such as a list item.
196
- * Line elements can be extracted with a @ContentChildren(McLine) query, then
197
- * counted by checking the query list's length.
198
- */
199
- class McLine {
200
- }
201
- /** @nocollapse */ McLine.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: McLine, deps: [], target: i0.ɵɵFactoryTarget.Directive });
202
- /** @nocollapse */ McLine.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.12", type: McLine, selector: "[mc-line], [mcLine]", host: { classAttribute: "mc-line" }, ngImport: i0 });
203
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: McLine, decorators: [{
204
- type: Directive,
205
- args: [{
206
- selector: '[mc-line], [mcLine]',
207
- host: { class: 'mc-line' }
208
- }]
209
- }] });
210
- /**
211
- * Helper that takes a query list of lines and sets the correct class on the host.
212
- * @docs-private
213
- */
214
- class McLineSetter {
215
- constructor(_lines, _element) {
216
- this._lines = _lines;
217
- this._element = _element;
218
- this.setLineClass(this._lines.length);
219
- this._lines.changes.subscribe(() => {
220
- this.setLineClass(this._lines.length);
221
- });
222
- }
223
- setLineClass(count) {
224
- const minLineClassNumber = 2;
225
- const maxLineClassNumber = 3;
226
- this.resetClasses();
227
- if (count === minLineClassNumber || count === maxLineClassNumber) {
228
- this.setClass(`mc-${count}-line`, true);
229
- }
230
- else if (count > maxLineClassNumber) {
231
- this.setClass(`mc-multi-line`, true);
232
- }
233
- }
234
- resetClasses() {
235
- this.setClass('mc-2-line', false);
236
- this.setClass('mc-3-line', false);
237
- this.setClass('mc-multi-line', false);
238
- }
239
- setClass(className, isAdd) {
240
- if (isAdd) {
241
- this._element.nativeElement.classList.add(className);
242
- }
243
- else {
244
- this._element.nativeElement.classList.remove(className);
245
- }
246
- }
247
+ const MC_DATE_FORMATS = new InjectionToken('mc-date-formats');
248
+
249
+ /** InjectionToken for datepicker that can be used to override default locale code. */
250
+ const MC_DATE_LOCALE = new InjectionToken('MC_DATE_LOCALE', {
251
+ providedIn: 'root',
252
+ factory: MC_DATE_LOCALE_FACTORY
253
+ });
254
+ /** @docs-private */
255
+ // tslint:disable-next-line:naming-convention
256
+ function MC_DATE_LOCALE_FACTORY() {
257
+ return inject(LOCALE_ID);
247
258
  }
248
- class McLineModule {
259
+ class DateAdapter extends DateAdapter$1 {
249
260
  }
250
- /** @nocollapse */ McLineModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: McLineModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
251
- /** @nocollapse */ McLineModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.12", ngImport: i0, type: McLineModule, declarations: [McLine], exports: [McLine] });
252
- /** @nocollapse */ McLineModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: McLineModule });
253
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: McLineModule, decorators: [{
254
- type: NgModule,
255
- args: [{
256
- imports: [],
257
- exports: [McLine],
258
- declarations: [McLine]
259
- }]
260
- }] });
261
261
 
262
262
  /** Error state matcher that matches when a control is invalid and dirty. */
263
263
  class ShowOnDirtyErrorStateMatcher {
@@ -265,9 +265,9 @@ class ShowOnDirtyErrorStateMatcher {
265
265
  return !!(control && control.invalid && (control.dirty || (form && form.submitted)));
266
266
  }
267
267
  }
268
- /** @nocollapse */ ShowOnDirtyErrorStateMatcher.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: ShowOnDirtyErrorStateMatcher, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
269
- /** @nocollapse */ ShowOnDirtyErrorStateMatcher.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: ShowOnDirtyErrorStateMatcher });
270
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: ShowOnDirtyErrorStateMatcher, decorators: [{
268
+ /** @nocollapse */ ShowOnDirtyErrorStateMatcher.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: ShowOnDirtyErrorStateMatcher, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
269
+ /** @nocollapse */ ShowOnDirtyErrorStateMatcher.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: ShowOnDirtyErrorStateMatcher });
270
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: ShowOnDirtyErrorStateMatcher, decorators: [{
271
271
  type: Injectable
272
272
  }] });
273
273
  /** Provider that defines how form controls behave with regards to displaying error messages. */
@@ -276,1254 +276,124 @@ class ErrorStateMatcher {
276
276
  return !!(control && control.invalid && (control.touched || (form && form.submitted)));
277
277
  }
278
278
  }
279
- /** @nocollapse */ ErrorStateMatcher.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: ErrorStateMatcher, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
280
- /** @nocollapse */ ErrorStateMatcher.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: ErrorStateMatcher, providedIn: 'root' });
281
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: ErrorStateMatcher, decorators: [{
279
+ /** @nocollapse */ ErrorStateMatcher.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: ErrorStateMatcher, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
280
+ /** @nocollapse */ ErrorStateMatcher.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: ErrorStateMatcher, providedIn: 'root' });
281
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: ErrorStateMatcher, decorators: [{
282
282
  type: Injectable,
283
283
  args: [{ providedIn: 'root' }]
284
284
  }] });
285
285
 
286
- const SECONDS_TEMPLATE$1 = `{
287
- SHOW_MILLISECONDS,
288
- select,
289
- yes{:{SECONDS}{MILLISECONDS}}
290
- other{{
291
- SHOW_SECONDS,
292
- select,
293
- yes{:{SECONDS}}
294
- other{}
295
- }}
296
- }`;
297
- const enUS = {
298
- relativeTemplates: {
299
- short: {
300
- BEFORE_YESTERDAY: `{CURRENT_YEAR, select, yes{{SHORT_DATE}, {TIME}} other{{SHORT_DATE}, {YEAR}}}${SECONDS_TEMPLATE$1}`,
301
- YESTERDAY: `Yesterday, {TIME}${SECONDS_TEMPLATE$1}`,
302
- TODAY: `Today, {TIME}${SECONDS_TEMPLATE$1}`,
303
- TOMORROW: `Tomorrow, {TIME}${SECONDS_TEMPLATE$1}`,
304
- AFTER_TOMORROW: `{CURRENT_YEAR, select, yes{{SHORT_DATE}, {TIME}} other{{SHORT_DATE}, {YEAR}}}${SECONDS_TEMPLATE$1}`
305
- },
306
- long: {
307
- BEFORE_YESTERDAY: `{CURRENT_YEAR, select, yes{{DATE}, {TIME}} other{{DATE}, {YEAR}}}${SECONDS_TEMPLATE$1}`,
308
- YESTERDAY: `Yesterday, {TIME}${SECONDS_TEMPLATE$1}`,
309
- TODAY: `Today, {TIME}${SECONDS_TEMPLATE$1}`,
310
- TOMORROW: `Tomorrow, {TIME}${SECONDS_TEMPLATE$1}`,
311
- AFTER_TOMORROW: `{CURRENT_YEAR, select, yes{{DATE}, {TIME}} other{{DATE}, {YEAR}}}${SECONDS_TEMPLATE$1}`
312
- }
313
- },
314
- absoluteTemplates: {
315
- short: {
316
- DATE: '{CURRENT_YEAR, select, yes{{SHORT_DATE}} other{{SHORT_DATE}, {YEAR}}}',
317
- DATETIME: `{
318
- CURRENT_YEAR,
319
- select,
320
- yes{{SHORT_DATE}, {TIME}}
321
- other{{SHORT_DATE}, {YEAR}, {TIME}}
322
- }${SECONDS_TEMPLATE$1}`
323
- },
324
- long: {
325
- DATE: '{CURRENT_YEAR, select, yes{{DATE}} other{{DATE}, {YEAR}}}',
326
- DATETIME: `{
327
- CURRENT_YEAR,
328
- select,
329
- yes{{DATE}, {TIME}}
330
- other{{DATE}, {YEAR}, {TIME}}
331
- }${SECONDS_TEMPLATE$1}`
332
- }
333
- },
334
- rangeTemplates: {
335
- closedRange: {
336
- short: {
337
- START_DATE: '{CURRENT_YEAR, select, yes{{SHORT_DATE}} other{{SHORT_DATE}, {YEAR}}}',
338
- END_DATE: `{
339
- SAME_MONTH,
340
- select,
341
- yes{{DAY}}
342
- other{{
343
- CURRENT_YEAR,
344
- select,
345
- yes{{SHORT_DATE}}
346
- other{{SHORT_DATE}, {YEAR}}
347
- }}
348
- }`,
349
- DATE: `{
350
- SAME_MONTH,
351
- select,
352
- yes{{START_DATE}{DASH}{END_DATE}}
353
- other{{START_DATE}{LONG_DASH}{END_DATE}}
354
- }`,
355
- START_DATETIME: `{
356
- SAME_DAY,
357
- select,
358
- yes{{TIME}}
359
- other{{
360
- CURRENT_YEAR,
361
- select,
362
- yes{{SHORT_DATE}, {TIME}}
363
- other{{SHORT_DATE}, {YEAR}, {TIME}}
364
- }}
365
- }${SECONDS_TEMPLATE$1}`,
366
- END_DATETIME: `{
367
- SAME_DAY,
368
- select,
369
- yes{{
370
- CURRENT_YEAR,
371
- select,
372
- yes{{TIME}${SECONDS_TEMPLATE$1}, {SHORT_DATE}}
373
- other{{TIME}${SECONDS_TEMPLATE$1}, {SHORT_DATE}, {YEAR}}
374
- }}
375
- other{{
376
- CURRENT_YEAR,
377
- select,
378
- yes{{SHORT_DATE}, {TIME}}
379
- other{{SHORT_DATE}, {YEAR}, {TIME}}
380
- }${SECONDS_TEMPLATE$1}}
381
- }`,
382
- DATETIME: `{
383
- SAME_DAY,
384
- select,
385
- yes{{START_DATETIME}{DASH}{END_DATETIME}}
386
- other{{START_DATETIME}{LONG_DASH}{END_DATETIME}}
387
- }`
388
- },
389
- middle: {
390
- START_DATE: `{
391
- SAME_MONTH,
392
- select,
393
- yes{{DAY}}
394
- other{{
395
- CURRENT_YEAR,
396
- select,
397
- yes{{DATE}}
398
- other{{DATE}, {YEAR}}
399
- }}
400
- }`,
401
- END_DATE: '{CURRENT_YEAR, select, yes{{DATE}} other{{DATE}, {YEAR}}}',
402
- DATE: `{
403
- SAME_MONTH,
404
- select,
405
- yes{{START_DATE}{DASH}{END_DATE}}
406
- other{{START_DATE}{LONG_DASH}{END_DATE}}
407
- }`,
408
- START_DATETIME: `{
409
- SAME_DAY,
410
- select,
411
- yes{{TIME}}
412
- other{{
413
- CURRENT_YEAR,
414
- select,
415
- yes{{DATE}, {TIME}}
416
- other{{DATE}, {YEAR}, {TIME}}
417
- }}
418
- }${SECONDS_TEMPLATE$1}`,
419
- END_DATETIME: `{
420
- SAME_DAY,
421
- select,
422
- yes{{
423
- CURRENT_YEAR,
424
- select,
425
- yes{{TIME}${SECONDS_TEMPLATE$1}, {DATE}}
426
- other{{TIME}${SECONDS_TEMPLATE$1}, {DATE}, {YEAR}}
427
- }}
428
- other{{
429
- CURRENT_YEAR,
430
- select,
431
- yes{{DATE}, {TIME}}
432
- other{{DATE}, {YEAR}, {TIME}}
433
- }${SECONDS_TEMPLATE$1}}
434
- }`,
435
- DATETIME: `{
436
- SAME_DAY,
437
- select,
438
- yes{{START_DATETIME}{DASH}{END_DATETIME}}
439
- other{{START_DATETIME}{LONG_DASH}{END_DATETIME}}
440
- }`
441
- },
442
- long: {
443
- START_DATE: '{CURRENT_YEAR, select, yes{{DATE}} other{{DATE}, {YEAR}}}',
444
- END_DATE: `{
445
- SAME_MONTH,
446
- select,
447
- yes{{DAY}}
448
- other{{
449
- CURRENT_YEAR,
450
- select,
451
- yes{{DATE}}
452
- other{{DATE}, {YEAR}}
453
- }}
454
- }`,
455
- DATE: `{
456
- SAME_MONTH,
457
- select,
458
- yes{{START_DATE}{DASH}{END_DATE}}
459
- other{{START_DATE}{LONG_DASH}{END_DATE}}
460
- }`,
461
- START_DATETIME: `{
462
- SAME_DAY,
463
- select,
464
- yes{{
465
- CURRENT_YEAR,
466
- select,
467
- yes{{DATE}, from{NBSP}{TIME}}
468
- other{{DATE}, {YEAR}, from{NBSP}{TIME}}
469
- }}
470
- other{{
471
- CURRENT_YEAR,
472
- select,
473
- yes{{DATE}, {TIME}}
474
- other{{DATE}, {YEAR}, {TIME}}
475
- }}
476
- }${SECONDS_TEMPLATE$1}`,
477
- END_DATETIME: `{
478
- SAME_DAY,
479
- select,
480
- yes{to{NBSP}{TIME}}
481
- other{{
482
- CURRENT_YEAR,
483
- select,
484
- yes{{DATE}, {TIME}}
485
- other{{DATE}, {YEAR}, {TIME}}
486
- }}
487
- }${SECONDS_TEMPLATE$1}`,
488
- DATETIME: `{
489
- SAME_DAY,
490
- select,
491
- yes{{START_DATETIME} {END_DATETIME}}
492
- other{From {START_DATETIME} to{NBSP}{END_DATETIME}}
493
- }`
494
- }
495
- },
496
- openedRange: {
497
- short: {
498
- START_DATE: `{
499
- CURRENT_YEAR,
500
- select,
501
- yes{{SHORT_DATE}}
502
- other{{SHORT_DATE} {YEAR}}
503
- }`,
504
- END_DATE: '{CURRENT_YEAR, select, yes{{SHORT_DATE}} other{{SHORT_DATE} {YEAR}}}',
505
- DATE: `{
506
- RANGE_TYPE,
507
- select,
508
- onlyStart{From{NBSP}{START_DATE}}
509
- other{Until{NBSP}{END_DATE}}
510
- }`,
511
- START_DATETIME: `{
512
- CURRENT_YEAR,
513
- select,
514
- yes{{SHORT_DATE}, {TIME}}
515
- other{{SHORT_DATE} {YEAR}, {TIME}}
516
- }${SECONDS_TEMPLATE$1}`,
517
- END_DATETIME: `{
518
- CURRENT_YEAR,
519
- select,
520
- yes{{SHORT_DATE}, {TIME}}
521
- other{{SHORT_DATE} {YEAR}, {TIME}}
522
- }${SECONDS_TEMPLATE$1}`,
523
- DATETIME: `{
524
- RANGE_TYPE,
525
- select,
526
- onlyStart{From{NBSP}{START_DATETIME}}
527
- other{Until{NBSP}{END_DATETIME}}
528
- }`
529
- },
530
- long: {
531
- START_DATE: `{
532
- CURRENT_YEAR,
533
- select,
534
- yes{{DATE}}
535
- other{{DATE} {YEAR}}
536
- }`,
537
- END_DATE: '{CURRENT_YEAR, select, yes{{DATE}} other{{DATE} {YEAR}}}',
538
- DATE: `{
539
- RANGE_TYPE,
540
- select,
541
- onlyStart{From{NBSP}{START_DATE}}
542
- other{Until{NBSP}{END_DATE}}
543
- }`,
544
- START_DATETIME: `{
545
- CURRENT_YEAR,
546
- select,
547
- yes{{DATE}, {TIME}}
548
- other{{DATE} {YEAR}, {TIME}}
549
- }${SECONDS_TEMPLATE$1}`,
550
- END_DATETIME: `{
551
- CURRENT_YEAR,
552
- select,
553
- yes{{DATE}, {TIME}}
554
- other{{DATE} {YEAR}, {TIME}}
555
- }${SECONDS_TEMPLATE$1}`,
556
- DATETIME: `{
557
- RANGE_TYPE,
558
- select,
559
- onlyStart{From{NBSP}{START_DATETIME}}
560
- other{Until{NBSP}{END_DATETIME}}
561
- }`
562
- }
563
- }
564
- },
565
- durationTemplates: {
566
- shortest: {
567
- FULL: '{D, duration}{SHOW_MILLISECONDS, select, yes{,{MILLISECONDS}} other {}}',
568
- ONLY_MINUTES: '{HOURS}:{MINUTES, number, ::integer-width/00}'
569
- },
570
- long: {
571
- SEPARATOR: '',
572
- YEARS: `{years, plural,
573
- =1 {# year}
574
- other {# years}
575
- }`,
576
- MONTHS: `{months, plural,
577
- =1 {# month}
578
- other {# months}
579
- }`,
580
- WEEKS: `{weeks, plural,
581
- =1 {# week}
582
- other {# weeks}
583
- }`,
584
- DAYS: `{days, plural,
585
- =1 {# day}
586
- other {# days}
587
- }`,
588
- HOURS: `{hours, plural,
589
- =1 {# hour}
590
- other {# hours}
591
- }`,
592
- MINUTES: `{minutes, plural,
593
- =1 {# minute}
594
- other {# minutes}
595
- }`,
596
- SECONDS: `{seconds, plural,
597
- =1 {# second}
598
- other {# seconds}
599
- }`,
600
- YEARS_FRACTION: `{years} years`,
601
- MONTHS_FRACTION: `{months} months`
602
- },
603
- short: {
604
- SEPARATOR: '',
605
- YEARS: `{years} y`,
606
- MONTHS: `{months} mo`,
607
- WEEKS: `{weeks} w`,
608
- DAYS: `{days} d`,
609
- HOURS: `{hours} h`,
610
- MINUTES: `{minutes} min`,
611
- SECONDS: `{SHOW_MILLISECONDS, select, yes
612
- {{seconds}.{milliseconds} s}
613
- other
614
- {{seconds} s}
615
- }`,
616
- YEARS_FRACTION: '{years} y',
617
- MONTHS_FRACTION: '{months} mo'
618
- }
619
- }
620
- };
621
-
622
- const SECONDS_TEMPLATE = `{
623
- SHOW_MILLISECONDS,
624
- select,
625
- yes{:{SECONDS}{MILLISECONDS}}
626
- other{{
627
- SHOW_SECONDS,
628
- select,
629
- yes{:{SECONDS}}
630
- other{}
631
- }}
632
- }`;
633
- const ruRU = {
634
- relativeTemplates: {
635
- short: {
636
- BEFORE_YESTERDAY: `{CURRENT_YEAR, select, yes{{SHORT_DATE}, {TIME}} other{{SHORT_DATE} {YEAR}}}${SECONDS_TEMPLATE}`,
637
- YESTERDAY: `Вчера, {TIME}${SECONDS_TEMPLATE}`,
638
- TODAY: `Сегодня, {TIME}${SECONDS_TEMPLATE}`,
639
- TOMORROW: `Завтра, {TIME}${SECONDS_TEMPLATE}`,
640
- AFTER_TOMORROW: `{CURRENT_YEAR, select, yes{{SHORT_DATE}, {TIME}} other{{SHORT_DATE} {YEAR}}}${SECONDS_TEMPLATE}`
641
- },
642
- long: {
643
- BEFORE_YESTERDAY: `{CURRENT_YEAR, select, yes{{DATE}, {TIME}} other{{DATE} {YEAR}}}${SECONDS_TEMPLATE}`,
644
- YESTERDAY: `Вчера, {TIME}${SECONDS_TEMPLATE}`,
645
- TODAY: `Сегодня, {TIME}${SECONDS_TEMPLATE}`,
646
- TOMORROW: `Завтра, {TIME}${SECONDS_TEMPLATE}`,
647
- AFTER_TOMORROW: `{CURRENT_YEAR, select, yes{{DATE}, {TIME}} other{{DATE} {YEAR}}}${SECONDS_TEMPLATE}`
648
- }
649
- },
650
- absoluteTemplates: {
651
- short: {
652
- DATE: '{CURRENT_YEAR, select, yes{{SHORT_DATE}} other{{SHORT_DATE} {YEAR}}}',
653
- DATETIME: `{
654
- CURRENT_YEAR,
655
- select,
656
- yes{{SHORT_DATE}, {TIME}}
657
- other{{SHORT_DATE} {YEAR}, {TIME}}
658
- }${SECONDS_TEMPLATE}`
659
- },
660
- long: {
661
- DATE: '{CURRENT_YEAR, select, yes{{DATE}} other{{DATE} {YEAR}}}',
662
- DATETIME: `{
663
- CURRENT_YEAR,
664
- select,
665
- yes{{DATE}, {TIME}}
666
- other{{DATE} {YEAR}, {TIME}}
667
- }${SECONDS_TEMPLATE}`
668
- }
669
- },
670
- rangeTemplates: {
671
- closedRange: {
672
- short: {
673
- START_DATE: `{
674
- SAME_MONTH,
675
- select,
676
- yes{{DAY}}
677
- other{{
678
- CURRENT_YEAR,
679
- select,
680
- yes{{SHORT_DATE}}
681
- other{{SHORT_DATE} {YEAR}}
682
- }}
683
- }`,
684
- END_DATE: '{CURRENT_YEAR, select, yes{{SHORT_DATE}} other{{SHORT_DATE} {YEAR}}}',
685
- DATE: `{
686
- SAME_MONTH,
687
- select,
688
- yes{{START_DATE}{DASH}{END_DATE}}
689
- other{{START_DATE}{LONG_DASH}{END_DATE}}
690
- }`,
691
- START_DATETIME: `{
692
- SAME_DAY,
693
- select,
694
- yes{{TIME}}
695
- other{{
696
- CURRENT_YEAR,
697
- select,
698
- yes{{SHORT_DATE}, {TIME}}
699
- other{{SHORT_DATE} {YEAR}, {TIME}}
700
- }}
701
- }${SECONDS_TEMPLATE}`,
702
- END_DATETIME: `{
703
- SAME_DAY,
704
- select,
705
- yes{{
706
- CURRENT_YEAR,
707
- select,
708
- yes{{TIME}${SECONDS_TEMPLATE}, {SHORT_DATE}}
709
- other{{TIME}${SECONDS_TEMPLATE}, {SHORT_DATE} {YEAR}}
710
- }}
711
- other{{
712
- CURRENT_YEAR,
713
- select,
714
- yes{{SHORT_DATE}, {TIME}}
715
- other{{SHORT_DATE} {YEAR}, {TIME}}
716
- }${SECONDS_TEMPLATE}}
717
- }`,
718
- DATETIME: `{
719
- SAME_DAY,
720
- select,
721
- yes{{START_DATETIME}{DASH}{END_DATETIME}}
722
- other{{START_DATETIME}{LONG_DASH}{END_DATETIME}}
723
- }`
724
- },
725
- middle: {
726
- START_DATE: `{
727
- SAME_MONTH,
728
- select,
729
- yes{{DAY}}
730
- other{{
731
- CURRENT_YEAR,
732
- select,
733
- yes{{DATE}}
734
- other{{DATE} {YEAR}}
735
- }}
736
- }`,
737
- END_DATE: '{CURRENT_YEAR, select, yes{{DATE}} other{{DATE} {YEAR}}}',
738
- DATE: `{
739
- SAME_MONTH,
740
- select,
741
- yes{{START_DATE}{DASH}{END_DATE}}
742
- other{{START_DATE}{LONG_DASH}{END_DATE}}
743
- }`,
744
- START_DATETIME: `{
745
- SAME_DAY,
746
- select,
747
- yes{{TIME}}
748
- other{{
749
- CURRENT_YEAR,
750
- select,
751
- yes{{DATE}, {TIME}}
752
- other{{DATE} {YEAR}, {TIME}}
753
- }}
754
- }${SECONDS_TEMPLATE}`,
755
- END_DATETIME: `{
756
- SAME_DAY,
757
- select,
758
- yes{{
759
- CURRENT_YEAR,
760
- select,
761
- yes{{TIME}${SECONDS_TEMPLATE}, {DATE}}
762
- other{{TIME}${SECONDS_TEMPLATE}, {DATE} {YEAR}}
763
- }}
764
- other{{
765
- CURRENT_YEAR,
766
- select,
767
- yes{{DATE}, {TIME}}
768
- other{{DATE} {YEAR}, {TIME}}
769
- }${SECONDS_TEMPLATE}}
770
- }`,
771
- DATETIME: `{
772
- SAME_DAY,
773
- select,
774
- yes{{START_DATETIME}{DASH}{END_DATETIME}}
775
- other{{START_DATETIME}{LONG_DASH}{END_DATETIME}}
776
- }`
777
- },
778
- long: {
779
- START_DATE: `{
780
- SAME_MONTH,
781
- select,
782
- yes{{DAY}}
783
- other{{
784
- CURRENT_YEAR,
785
- select,
786
- yes{{DATE}}
787
- other{{DATE} {YEAR}}
788
- }}
789
- }`,
790
- END_DATE: '{CURRENT_YEAR, select, yes{{DATE}} other{{DATE} {YEAR}}}',
791
- DATE: `{
792
- SAME_MONTH,
793
- select,
794
- yes{{START_DATE}{DASH}{END_DATE}}
795
- other{{START_DATE}{LONG_DASH}{END_DATE}}
796
- }`,
797
- START_DATETIME: `{
798
- SAME_DAY,
799
- select,
800
- yes{{
801
- CURRENT_YEAR,
802
- select,
803
- yes{{DATE}, с{NBSP}{TIME}}
804
- other{{DATE} {YEAR}, с{NBSP}{TIME}}
805
- }}
806
- other{{
807
- CURRENT_YEAR,
808
- select,
809
- yes{{DATE}, {TIME}}
810
- other{{DATE} {YEAR}, {TIME}}
811
- }}
812
- }${SECONDS_TEMPLATE}`,
813
- END_DATETIME: `{
814
- SAME_DAY,
815
- select,
816
- yes{по{NBSP}{TIME}}
817
- other{{
818
- CURRENT_YEAR,
819
- select,
820
- yes{{DATE}, {TIME}}
821
- other{{DATE} {YEAR}, {TIME}}
822
- }}
823
- }${SECONDS_TEMPLATE}`,
824
- DATETIME: `{
825
- SAME_DAY,
826
- select,
827
- yes{{START_DATETIME} {END_DATETIME}}
828
- other{С{NBSP}{START_DATETIME} по{NBSP}{END_DATETIME}}
829
- }`
830
- }
831
- },
832
- openedRange: {
833
- short: {
834
- START_DATE: `{
835
- CURRENT_YEAR,
836
- select,
837
- yes{{SHORT_DATE}}
838
- other{{SHORT_DATE} {YEAR}}
839
- }`,
840
- END_DATE: '{CURRENT_YEAR, select, yes{{SHORT_DATE}} other{{SHORT_DATE} {YEAR}}}',
841
- DATE: `{
842
- RANGE_TYPE,
843
- select,
844
- onlyStart{С{NBSP}{START_DATE}}
845
- other{По{NBSP}{END_DATE}}
846
- }`,
847
- START_DATETIME: `{
848
- CURRENT_YEAR,
849
- select,
850
- yes{{SHORT_DATE}, {TIME}}
851
- other{{SHORT_DATE} {YEAR}, {TIME}}
852
- }${SECONDS_TEMPLATE}`,
853
- END_DATETIME: `{
854
- CURRENT_YEAR,
855
- select,
856
- yes{{SHORT_DATE}, {TIME}}
857
- other{{SHORT_DATE} {YEAR}, {TIME}}
858
- }${SECONDS_TEMPLATE}`,
859
- DATETIME: `{
860
- RANGE_TYPE,
861
- select,
862
- onlyStart{С{NBSP}{START_DATETIME}}
863
- other{По{NBSP}{END_DATETIME}}
864
- }`
865
- },
866
- long: {
867
- START_DATE: `{
868
- CURRENT_YEAR,
869
- select,
870
- yes{{DATE}}
871
- other{{DATE} {YEAR}}
872
- }`,
873
- END_DATE: '{CURRENT_YEAR, select, yes{{DATE}} other{{DATE} {YEAR}}}',
874
- DATE: `{
875
- RANGE_TYPE,
876
- select,
877
- onlyStart{С{NBSP}{START_DATE}}
878
- other{По{NBSP}{END_DATE}}
879
- }`,
880
- START_DATETIME: `{
881
- CURRENT_YEAR,
882
- select,
883
- yes{{DATE}, {TIME}}
884
- other{{DATE} {YEAR}, {TIME}}
885
- }${SECONDS_TEMPLATE}`,
886
- END_DATETIME: `{
887
- CURRENT_YEAR,
888
- select,
889
- yes{{DATE}, {TIME}}
890
- other{{DATE} {YEAR}, {TIME}}
891
- }${SECONDS_TEMPLATE}`,
892
- DATETIME: `{
893
- RANGE_TYPE,
894
- select,
895
- onlyStart{С{NBSP}{START_DATETIME}}
896
- other{По{NBSP}{END_DATETIME}}
897
- }`
898
- }
899
- }
900
- },
901
- durationTemplates: {
902
- shortest: {
903
- FULL: '{D, duration}{SHOW_MILLISECONDS, select, yes{,{MILLISECONDS}} other {}}',
904
- ONLY_MINUTES: '{HOURS}:{MINUTES, number, ::integer-width/00}'
905
- },
906
- long: {
907
- SEPARATOR: 'и',
908
- YEARS: `{years, plural,
909
- one {# год}
910
- few {# года}
911
- many {# лет}
912
- other {}
913
- }`,
914
- MONTHS: `{months, plural,
915
- one {# месяц}
916
- few {# месяца}
917
- many {# месяцев}
918
- other {}
919
- }`,
920
- WEEKS: `{weeks, plural,
921
- one {# неделя}
922
- few {# недели}
923
- many {# недель}
924
- other {}
925
- }`,
926
- DAYS: `{days, plural,
927
- one {# день}
928
- few {# дня}
929
- many {# дней}
930
- other {}
931
- }`,
932
- HOURS: `{hours, plural,
933
- one {# час}
934
- few {# часа}
935
- many {# часов}
936
- other {}
937
- }`,
938
- MINUTES: `{minutes, plural,
939
- one {# минута}
940
- few {# минуты}
941
- many {# минут}
942
- other {}
943
- }`,
944
- SECONDS: `{seconds, plural,
945
- one {# секунда}
946
- few {# секунды}
947
- many {# секунд}
948
- other {}
949
- }`,
950
- YEARS_FRACTION: `{floorValue, plural,
951
- =1 {{years, number, ::#,#} года}
952
- one {{years, number, ::#,#} год}
953
- few {{years, number, ::#,#} года}
954
- other {{years, number, ::#,#} лет}
955
- }`,
956
- MONTHS_FRACTION: `{floorValue, plural,
957
- =1 {{months, number, ::#,#} месяца}
958
- one {{months, number, ::#,#} месяц}
959
- few {{months, number, ::#,#} месяца}
960
- other {{months, number, ::#,#} месяцев}
961
- }`
962
- },
963
- short: {
964
- SEPARATOR: '',
965
- YEARS: `{years, plural,
966
- one {# г}
967
- few {# г}
968
- many {# л}
969
- other {}
970
- }`,
971
- MONTHS: `{months} мес`,
972
- WEEKS: `{weeks} нед`,
973
- DAYS: `{days} д`,
974
- HOURS: `{hours} ч`,
975
- MINUTES: `{minutes} мин`,
976
- SECONDS: `{SHOW_MILLISECONDS, select, yes
977
- {{seconds},{milliseconds} с}
978
- other
979
- {{seconds} с}
980
- }`,
981
- YEARS_FRACTION: `{floorValue, plural,
982
- one {{years, number, ::#,#} г}
983
- few {{years, number, ::#,#} г}
984
- other {{years, number, ::#,#} л}
985
- }`,
986
- MONTHS_FRACTION: `{floorValue, plural,
987
- =1 {{months, number, ::#,#} мес}
988
- other {{months, number, ::#,#} мес}
989
- }`
990
- }
991
- }
992
- };
993
-
994
- // tslint:disable:no-magic-numbers
995
- class DateFormatter {
286
+ class DateFormatter extends DateFormatter$1 {
996
287
  constructor(adapter, locale) {
288
+ super(adapter, locale);
997
289
  this.adapter = adapter;
998
- this.invalidDateErrorText = 'Invalid date';
999
- this.config = locale === 'en' ? enUS : ruRU;
1000
- this.messageFormat = new MessageFormat(locale);
1001
290
  }
1002
- setLocale(locale) {
1003
- this.config = locale === 'en' ? enUS : ruRU;
1004
- this.adapter.setLocale(locale);
291
+ }
292
+ /** @nocollapse */ DateFormatter.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: DateFormatter, deps: [{ token: i1.DateAdapter }, { token: MC_DATE_LOCALE }], target: i0.ɵɵFactoryTarget.Injectable });
293
+ /** @nocollapse */ DateFormatter.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: DateFormatter });
294
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: DateFormatter, decorators: [{
295
+ type: Injectable
296
+ }], ctorParameters: function () { return [{ type: i1.DateAdapter }, { type: undefined, decorators: [{
297
+ type: Inject,
298
+ args: [MC_DATE_LOCALE]
299
+ }] }]; } });
300
+
301
+ class AbsoluteDateFormatterPipe {
302
+ constructor(adapter, formatter) {
303
+ this.adapter = adapter;
304
+ this.formatter = formatter;
1005
305
  }
1006
- /**
1007
- * @param date - date
1008
- * @param template - template
1009
- * @param seconds - use seconds
1010
- * @param milliseconds - use milliseconds
1011
- * @returns relative date by template
1012
- */
1013
- relativeDate(date, template, seconds = false, milliseconds = false) {
1014
- if (!this.adapter.isDateInstance(date)) {
1015
- throw new Error(this.invalidDateErrorText);
1016
- }
1017
- let newTemplate;
1018
- const templateVariables = { ...this.adapter.config.variables, ...template.variables };
1019
- if (this.isBeforeYesterday(date)) {
1020
- newTemplate = template.BEFORE_YESTERDAY;
1021
- }
1022
- else if (this.isYesterday(date)) {
1023
- newTemplate = template.YESTERDAY;
1024
- }
1025
- else if (this.isToday(date)) {
1026
- newTemplate = template.TODAY;
1027
- }
1028
- else if (this.isTomorrow(date)) {
1029
- newTemplate = template.TOMORROW;
1030
- }
1031
- else if (this.isAfterTomorrow(date)) {
1032
- newTemplate = template.AFTER_TOMORROW;
1033
- }
1034
- const variables = this.compileVariables(date, templateVariables);
1035
- variables.SHOW_SECONDS = seconds ? 'yes' : 'no';
1036
- variables.SHOW_MILLISECONDS = milliseconds ? 'yes' : 'no';
1037
- return this.messageFormat.compile(newTemplate)(variables);
306
+ transform(value, currYear) {
307
+ const date = this.adapter.deserialize(value);
308
+ return date ? this.formatter.absoluteLongDate(date, currYear) : '';
1038
309
  }
1039
- /**
1040
- * @param date - date
1041
- * @returns relative date in short format
1042
- */
1043
- relativeShortDate(date) {
1044
- return this.relativeDate(date, this.config.relativeTemplates.short);
310
+ }
311
+ /** @nocollapse */ AbsoluteDateFormatterPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: AbsoluteDateFormatterPipe, deps: [{ token: DateAdapter }, { token: DateFormatter }], target: i0.ɵɵFactoryTarget.Pipe });
312
+ /** @nocollapse */ AbsoluteDateFormatterPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.2.2", ngImport: i0, type: AbsoluteDateFormatterPipe, name: "absoluteLongDate" });
313
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: AbsoluteDateFormatterPipe, decorators: [{
314
+ type: Pipe,
315
+ args: [{ name: 'absoluteLongDate' }]
316
+ }], ctorParameters: function () { return [{ type: DateAdapter }, { type: DateFormatter }]; } });
317
+ class AbsoluteDateTimeFormatterPipe {
318
+ constructor(adapter, formatter) {
319
+ this.adapter = adapter;
320
+ this.formatter = formatter;
1045
321
  }
1046
- /**
1047
- * @param date - date
1048
- * @returns relative date in long format
1049
- */
1050
- relativeLongDate(date) {
1051
- return this.relativeDate(date, this.config.relativeTemplates.long);
322
+ transform(value, options) {
323
+ const date = this.adapter.deserialize(value);
324
+ return date ? this.formatter.absoluteLongDateTime(date, options) : '';
1052
325
  }
1053
- /**
1054
- * @param date - date
1055
- * @param options - DateTimeOptions
1056
- * @returns relative date in short format with time
1057
- */
1058
- relativeShortDateTime(date, options) {
1059
- return this.relativeDate(date, this.config.relativeTemplates.short, options?.seconds, options?.milliseconds);
326
+ }
327
+ /** @nocollapse */ AbsoluteDateTimeFormatterPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: AbsoluteDateTimeFormatterPipe, deps: [{ token: DateAdapter }, { token: DateFormatter }], target: i0.ɵɵFactoryTarget.Pipe });
328
+ /** @nocollapse */ AbsoluteDateTimeFormatterPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.2.2", ngImport: i0, type: AbsoluteDateTimeFormatterPipe, name: "absoluteLongDateTime" });
329
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: AbsoluteDateTimeFormatterPipe, decorators: [{
330
+ type: Pipe,
331
+ args: [{ name: 'absoluteLongDateTime' }]
332
+ }], ctorParameters: function () { return [{ type: DateAdapter }, { type: DateFormatter }]; } });
333
+ class AbsoluteDateShortFormatterPipe {
334
+ constructor(adapter, formatter) {
335
+ this.adapter = adapter;
336
+ this.formatter = formatter;
1060
337
  }
1061
- /**
1062
- * @param date - date
1063
- * @param options - DateTimeOptions
1064
- * @returns relative date in long format with time
1065
- */
1066
- relativeLongDateTime(date, options) {
1067
- return this.relativeDate(date, this.config.relativeTemplates.long, options?.seconds, options?.milliseconds);
338
+ transform(value, currYear) {
339
+ const date = this.adapter.deserialize(value);
340
+ return date ? this.formatter.absoluteShortDate(date, currYear) : '';
1068
341
  }
1069
- /**
1070
- * @param date - date
1071
- * @param params - parameters
1072
- * @param datetime - should time be shown as well
1073
- * @param seconds - should time with seconds be shown as well
1074
- * @param milliseconds - should time with milliseconds be shown as well
1075
- * @param currYear - should current year be shown as well
1076
- */
1077
- absoluteDate(date, params, datetime = false, seconds = false, milliseconds = false, currYear = false) {
1078
- if (!this.adapter.isDateInstance(date)) {
1079
- throw new Error(this.invalidDateErrorText);
1080
- }
1081
- const variables = this.compileVariables(date, { ...this.adapter.config.variables, ...params.variables }, currYear);
1082
- variables.SHOW_SECONDS = seconds ? 'yes' : 'no';
1083
- variables.SHOW_MILLISECONDS = milliseconds ? 'yes' : 'no';
1084
- const template = datetime ? params.DATETIME : params.DATE;
1085
- return this.messageFormat.compile(template)(variables);
342
+ }
343
+ /** @nocollapse */ AbsoluteDateShortFormatterPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: AbsoluteDateShortFormatterPipe, deps: [{ token: DateAdapter }, { token: DateFormatter }], target: i0.ɵɵFactoryTarget.Pipe });
344
+ /** @nocollapse */ AbsoluteDateShortFormatterPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.2.2", ngImport: i0, type: AbsoluteDateShortFormatterPipe, name: "absoluteShortDate" });
345
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: AbsoluteDateShortFormatterPipe, decorators: [{
346
+ type: Pipe,
347
+ args: [{ name: 'absoluteShortDate' }]
348
+ }], ctorParameters: function () { return [{ type: DateAdapter }, { type: DateFormatter }]; } });
349
+ class AbsoluteShortDateTimeFormatterPipe {
350
+ constructor(adapter, formatter) {
351
+ this.adapter = adapter;
352
+ this.formatter = formatter;
1086
353
  }
1087
- /**
1088
- * @param date - date
1089
- * @param currYear - should the year be shown forced
1090
- * @returns absolute date in short format
1091
- */
1092
- absoluteShortDate(date, currYear = false) {
1093
- return this.absoluteDate(date, this.config.absoluteTemplates.short, false, false, false, currYear);
354
+ transform(value, options) {
355
+ const date = this.adapter.deserialize(value);
356
+ return date ? this.formatter.absoluteShortDateTime(date, options) : '';
1094
357
  }
1095
- /**
1096
- * @param date - date
1097
- * @param options - DateTimeOptions
1098
- * @returns absolute date in short format with time
1099
- */
1100
- absoluteShortDateTime(date, options) {
1101
- return this.absoluteDate(date, this.config.absoluteTemplates.short, true, options?.seconds, options?.milliseconds, options?.currYear);
358
+ }
359
+ /** @nocollapse */ AbsoluteShortDateTimeFormatterPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: AbsoluteShortDateTimeFormatterPipe, deps: [{ token: DateAdapter }, { token: DateFormatter }], target: i0.ɵɵFactoryTarget.Pipe });
360
+ /** @nocollapse */ AbsoluteShortDateTimeFormatterPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.2.2", ngImport: i0, type: AbsoluteShortDateTimeFormatterPipe, name: "absoluteShortDateTime" });
361
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: AbsoluteShortDateTimeFormatterPipe, decorators: [{
362
+ type: Pipe,
363
+ args: [{ name: 'absoluteShortDateTime' }]
364
+ }], ctorParameters: function () { return [{ type: DateAdapter }, { type: DateFormatter }]; } });
365
+ class RelativeDateFormatterPipe {
366
+ constructor(adapter, formatter) {
367
+ this.adapter = adapter;
368
+ this.formatter = formatter;
1102
369
  }
1103
- /**
1104
- * @param date - date
1105
- * @param currYear - should the year be shown forced
1106
- * @returns absolute date in long format
1107
- */
1108
- absoluteLongDate(date, currYear = false) {
1109
- return this.absoluteDate(date, this.config.absoluteTemplates.long, false, false, false, currYear);
370
+ transform(value) {
371
+ const date = this.adapter.deserialize(value);
372
+ return date ? this.formatter.relativeLongDate(date) : '';
1110
373
  }
1111
- /**
1112
- * @param date - date
1113
- * @param options - DateTimeOptions
1114
- * @returns absolute date in long format with time
1115
- */
1116
- absoluteLongDateTime(date, options) {
1117
- return this.absoluteDate(date, this.config.absoluteTemplates.long, true, options?.seconds, options?.milliseconds, options?.currYear);
374
+ }
375
+ /** @nocollapse */ RelativeDateFormatterPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: RelativeDateFormatterPipe, deps: [{ token: DateAdapter }, { token: DateFormatter }], target: i0.ɵɵFactoryTarget.Pipe });
376
+ /** @nocollapse */ RelativeDateFormatterPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.2.2", ngImport: i0, type: RelativeDateFormatterPipe, name: "relativeLongDate" });
377
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: RelativeDateFormatterPipe, decorators: [{
378
+ type: Pipe,
379
+ args: [{ name: 'relativeLongDate' }]
380
+ }], ctorParameters: function () { return [{ type: DateAdapter }, { type: DateFormatter }]; } });
381
+ class RelativeDateTimeFormatterPipe {
382
+ constructor(adapter, formatter) {
383
+ this.adapter = adapter;
384
+ this.formatter = formatter;
1118
385
  }
1119
- /**
1120
- * @param startDate - start date
1121
- * @param endDate - end date
1122
- * @param template - template
1123
- * @returns opened date
1124
- */
1125
- openedRangeDate(startDate, endDate, template) {
1126
- if (!this.adapter.isDateInstance(startDate) && !this.adapter.isDateInstance(endDate)) {
1127
- throw new Error(this.invalidDateErrorText);
1128
- }
1129
- const variables = { ...this.adapter.config.variables, ...template.variables };
1130
- let params = {};
1131
- if (startDate) {
1132
- const startDateVariables = this.compileVariables(startDate, variables);
1133
- params = {
1134
- ...variables,
1135
- START_DATE: this.messageFormat.compile(template.START_DATE)(startDateVariables),
1136
- RANGE_TYPE: 'onlyStart'
1137
- };
1138
- }
1139
- else if (endDate) {
1140
- const endDateVariables = this.compileVariables(endDate, variables);
1141
- params = {
1142
- ...variables,
1143
- END_DATE: this.messageFormat.compile(template.END_DATE)(endDateVariables),
1144
- RANGE_TYPE: 'onlyEnd'
1145
- };
1146
- }
1147
- return this.messageFormat.compile(template.DATE)(params);
1148
- }
1149
- /**
1150
- * @param startDate - start date
1151
- * @param endDate - end date
1152
- * @param template - template
1153
- * @param seconds - should time with seconds be shown as well
1154
- * @param milliseconds - should time with milliseconds be shown as well
1155
- * @returns opened date
1156
- */
1157
- openedRangeDateTime(startDate, endDate, template, seconds = false, milliseconds = false) {
1158
- if (!this.adapter.isDateInstance(startDate) && !this.adapter.isDateInstance(endDate)) {
1159
- throw new Error(this.invalidDateErrorText);
1160
- }
1161
- const variables = { ...this.adapter.config.variables, ...template.variables };
1162
- let params = {};
1163
- if (startDate) {
1164
- const startDateVariables = this.compileVariables(startDate, variables);
1165
- startDateVariables.SHOW_SECONDS = seconds ? 'yes' : 'no';
1166
- startDateVariables.SHOW_MILLISECONDS = milliseconds ? 'yes' : 'no';
1167
- params = {
1168
- ...variables,
1169
- START_DATETIME: this.messageFormat.compile(template.START_DATETIME)(startDateVariables),
1170
- RANGE_TYPE: 'onlyStart'
1171
- };
1172
- }
1173
- else if (endDate) {
1174
- const endDateVariables = this.compileVariables(endDate, variables);
1175
- endDateVariables.SHOW_SECONDS = seconds ? 'yes' : 'no';
1176
- endDateVariables.SHOW_MILLISECONDS = milliseconds ? 'yes' : 'no';
1177
- params = {
1178
- ...variables,
1179
- END_DATETIME: this.messageFormat.compile(template.END_DATETIME)(endDateVariables),
1180
- RANGE_TYPE: 'onlyEnd'
1181
- };
1182
- }
1183
- return this.messageFormat.compile(template.DATETIME)(params);
1184
- }
1185
- /**
1186
- * @param startDate - start date
1187
- * @param endDate - end date
1188
- * @param template - template
1189
- * @returns range date in template format
1190
- */
1191
- rangeDate(startDate, endDate, template) {
1192
- if (!this.adapter.isDateInstance(startDate) || !this.adapter.isDateInstance(endDate)) {
1193
- throw new Error(this.invalidDateErrorText);
1194
- }
1195
- const variables = { ...this.adapter.config.variables, ...template.variables };
1196
- const sameMonth = this.hasSame(startDate, endDate, 'month');
1197
- const startDateVariables = this.compileVariables(startDate, variables);
1198
- startDateVariables.SAME_MONTH = sameMonth;
1199
- const endDateVariables = this.compileVariables(endDate, variables);
1200
- endDateVariables.SAME_MONTH = sameMonth;
1201
- const bothCurrentYear = startDateVariables.CURRENT_YEAR === 'yes' && endDateVariables.CURRENT_YEAR === 'yes';
1202
- startDateVariables.CURRENT_YEAR = bothCurrentYear ? 'yes' : 'no';
1203
- endDateVariables.CURRENT_YEAR = bothCurrentYear ? 'yes' : 'no';
1204
- const params = {
1205
- ...variables,
1206
- START_DATE: this.messageFormat.compile(template.START_DATE)(startDateVariables),
1207
- END_DATE: this.messageFormat.compile(template.END_DATE)(endDateVariables),
1208
- SAME_MONTH: sameMonth
1209
- };
1210
- return this.messageFormat.compile(template.DATE)(params);
1211
- }
1212
- /**
1213
- * @param startDate - start date
1214
- * @param endDate - end date
1215
- * @param template - template
1216
- * @param seconds - use seconds
1217
- * @param milliseconds - use milliseconds
1218
- * @returns range date in template format with time
1219
- */
1220
- rangeDateTime(startDate, endDate, template, seconds = false, milliseconds = false) {
1221
- if (!this.adapter.isDateInstance(startDate) || !this.adapter.isDateInstance(endDate)) {
1222
- throw new Error(this.invalidDateErrorText);
1223
- }
1224
- const variables = { ...this.adapter.config.variables, ...template.variables };
1225
- const sameMonth = this.hasSame(startDate, endDate, 'month');
1226
- const sameDay = this.hasSame(startDate, endDate, 'day');
1227
- const startDateVariables = this.compileVariables(startDate, variables);
1228
- startDateVariables.SAME_MONTH = sameMonth;
1229
- startDateVariables.SAME_DAY = sameDay;
1230
- startDateVariables.SHOW_SECONDS = seconds ? 'yes' : 'no';
1231
- startDateVariables.SHOW_MILLISECONDS = milliseconds ? 'yes' : 'no';
1232
- const endDateVariables = this.compileVariables(endDate, variables);
1233
- endDateVariables.SAME_MONTH = sameMonth;
1234
- endDateVariables.SAME_DAY = sameDay;
1235
- endDateVariables.SHOW_SECONDS = seconds ? 'yes' : 'no';
1236
- endDateVariables.SHOW_MILLISECONDS = milliseconds ? 'yes' : 'no';
1237
- const bothCurrentYear = startDateVariables.CURRENT_YEAR === 'yes' && endDateVariables.CURRENT_YEAR === 'yes';
1238
- startDateVariables.CURRENT_YEAR = bothCurrentYear ? 'yes' : 'no';
1239
- endDateVariables.CURRENT_YEAR = bothCurrentYear ? 'yes' : 'no';
1240
- const params = {
1241
- ...variables,
1242
- START_DATETIME: this.messageFormat.compile(template.START_DATETIME)(startDateVariables),
1243
- END_DATETIME: this.messageFormat.compile(template.END_DATETIME)(endDateVariables),
1244
- SAME_MONTH: sameMonth,
1245
- SAME_DAY: sameDay
1246
- };
1247
- return this.messageFormat.compile(template.DATETIME)(params);
1248
- }
1249
- /**
1250
- * @param startDate - start date
1251
- * @param endDate - end date
1252
- * @returns range date in short format
1253
- */
1254
- rangeShortDate(startDate, endDate) {
1255
- const rangeTemplates = this.config.rangeTemplates;
1256
- if (startDate && endDate) {
1257
- return this.rangeDate(startDate, endDate, rangeTemplates.closedRange.short);
1258
- }
1259
- return this.openedRangeDate(startDate, endDate || null, rangeTemplates.openedRange.short);
1260
- }
1261
- /**
1262
- * @param startDate - start date
1263
- * @param endDate - end date
1264
- * @param options - DateTimeOptions
1265
- * @returns range date in short format with time
1266
- */
1267
- rangeShortDateTime(startDate, endDate, options) {
1268
- const rangeTemplates = this.config.rangeTemplates;
1269
- if (startDate && endDate) {
1270
- return this.rangeDateTime(startDate, endDate, rangeTemplates.closedRange.short, options?.seconds, options?.milliseconds);
1271
- }
1272
- return this.openedRangeDateTime(startDate, endDate || null, rangeTemplates.openedRange.short, options?.seconds, options?.milliseconds);
1273
- }
1274
- /**
1275
- * @param startDate - start date
1276
- * @param endDate - end date
1277
- * @returns range date in long format
1278
- */
1279
- rangeLongDate(startDate, endDate) {
1280
- const rangeTemplates = this.config.rangeTemplates;
1281
- if (startDate && endDate) {
1282
- return this.rangeDate(startDate, endDate, rangeTemplates.closedRange.long);
1283
- }
1284
- return this.openedRangeDate(startDate, endDate || null, rangeTemplates.openedRange.long);
1285
- }
1286
- /**
1287
- * @param startDate - start date
1288
- * @param endDate - end date
1289
- * @param options - DateTimeOptions
1290
- * @returns range date in long format with time
1291
- */
1292
- rangeLongDateTime(startDate, endDate, options) {
1293
- const rangeTemplates = this.config.rangeTemplates;
1294
- if (startDate && endDate) {
1295
- return this.rangeDateTime(startDate, endDate, rangeTemplates.closedRange.long, options?.seconds, options?.milliseconds);
1296
- }
1297
- return this.openedRangeDateTime(startDate, endDate || null, rangeTemplates.openedRange.long);
1298
- }
1299
- /**
1300
- * @param startDate - start date
1301
- * @param endDate - end date
1302
- * @param options - DateTimeOptions
1303
- * @returns range middle date with time
1304
- */
1305
- rangeMiddleDateTime(startDate, endDate, options) {
1306
- return this.rangeDateTime(startDate, endDate, this.config.rangeTemplates.closedRange.middle, options?.seconds, options?.milliseconds);
1307
- }
1308
- /**
1309
- * @param startDate - start date
1310
- * @param endDate - end date
1311
- * @param seconds - add seconds to formatted value
1312
- * @param milliseconds - add milliseconds to formatted value
1313
- * @returns formatted duration as string like 48:02:25
1314
- */
1315
- durationShortest(startDate, endDate, seconds = true, milliseconds = false) {
1316
- this.checkDates(startDate, endDate);
1317
- if (startDate > endDate) {
1318
- throw new Error(this.invalidDateErrorText);
1319
- }
1320
- const durationObject = this.adapter.durationObjectFromDates(startDate, endDate, ['hours', 'minutes', 'seconds', 'milliseconds']);
1321
- const roundedSeconds = Math.floor(this.adapter.durationAs(durationObject, 'seconds'));
1322
- if (seconds) {
1323
- return this.compileMessage(this.config.durationTemplates.shortest.FULL, {
1324
- D: roundedSeconds,
1325
- SHOW_MILLISECONDS: milliseconds ? 'yes' : 'no',
1326
- MILLISECONDS: durationObject.milliseconds
1327
- });
1328
- }
1329
- return roundedSeconds - (roundedSeconds % 60) ? this.compileMessage(this.config.durationTemplates.shortest.ONLY_MINUTES, {
1330
- HOURS: durationObject.hours,
1331
- MINUTES: durationObject.minutes
1332
- }) : '';
1333
- }
1334
- /**
1335
- * @param startDate - start date
1336
- * @param endDate - end date
1337
- * @param units - if defined, units to show will be specified
1338
- * @param fraction - shows fraction part for years and months
1339
- * @param template - specify template
1340
- * @returns formatted duration as string
1341
- */
1342
- duration(startDate, endDate, units, fraction, template) {
1343
- this.checkDates(startDate, endDate);
1344
- if (startDate > endDate) {
1345
- throw new Error(this.invalidDateErrorText);
1346
- }
1347
- const values = this.adapter.durationObjectFromDates(startDate, endDate, units, fraction);
1348
- const variables = { ...values };
1349
- variables.SHOW_MILLISECONDS = values.milliseconds ? 'yes' : 'no';
1350
- return Object
1351
- .keys(values)
1352
- .reduce((acc, unit, index, arr) => {
1353
- if (fraction) {
1354
- variables.floorValue = Math.floor(values[unit]);
1355
- acc.push(this.compileMessage(template[`${unit.toUpperCase()}_FRACTION`], variables));
1356
- }
1357
- else {
1358
- if (arr.length > 1 && index === arr.length - 1) {
1359
- acc.push(this.compileMessage(template.SEPARATOR, variables));
1360
- }
1361
- acc.push(this.compileMessage(template[unit.toUpperCase()], variables));
1362
- }
1363
- return acc;
1364
- }, [])
1365
- .filter((text) => !!text)
1366
- .join(' ');
1367
- }
1368
- durationLong(startDate, endDate, units = [], fraction = false) {
1369
- return this.duration(startDate, endDate, units, fraction, this.config.durationTemplates.long);
1370
- }
1371
- durationShort(startDate, endDate, units = [], fraction = false) {
1372
- return this.duration(startDate, endDate, units, fraction, this.config.durationTemplates.short);
1373
- }
1374
- checkDates(...args) {
1375
- args.forEach((date) => {
1376
- if (!this.adapter.isDateInstance(date) || !this.adapter.isValid(date)) {
1377
- throw new Error(this.invalidDateErrorText);
1378
- }
1379
- });
1380
- }
1381
- compileMessage(message, variables) {
1382
- return this.messageFormat.compile(message)(variables);
1383
- }
1384
- /**
1385
- * @param date - date for compile
1386
- * @param variables - date template variables
1387
- * @param currYearForced - param for absolute days formatting
1388
- * @returns compiledVariables
1389
- */
1390
- compileVariables(date, variables, currYearForced = false) {
1391
- const compiledVariables = {};
1392
- // tslint:disable-next-line:no-for-in
1393
- for (const key in variables) {
1394
- if (!variables.hasOwnProperty(key)) {
1395
- continue;
1396
- }
1397
- const value = variables[key];
1398
- compiledVariables[key] = this.adapter.format(date, value);
1399
- }
1400
- compiledVariables.CURRENT_YEAR = (currYearForced && 'no') || this.hasSame(date, this.adapter.today(), 'year');
1401
- return compiledVariables;
1402
- }
1403
- isBeforeYesterday(date) {
1404
- return this.adapter.daysFromToday(date) <= -2;
1405
- }
1406
- isYesterday(date) {
1407
- return this.adapter.daysFromToday(date) === -1;
1408
- }
1409
- isToday(date) {
1410
- return this.adapter.daysFromToday(date) === 0;
1411
- }
1412
- isTomorrow(date) {
1413
- return this.adapter.daysFromToday(date) === 1;
1414
- }
1415
- isAfterTomorrow(date) {
1416
- return this.adapter.daysFromToday(date) >= 2;
1417
- }
1418
- hasSame(startDate, endDate, unit) {
1419
- return this.adapter.hasSame(startDate, endDate, unit) ? 'yes' : 'no';
1420
- }
1421
- }
1422
- /** @nocollapse */ DateFormatter.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DateFormatter, deps: [{ token: i1.DateAdapter }, { token: MC_DATE_LOCALE }], target: i0.ɵɵFactoryTarget.Injectable });
1423
- /** @nocollapse */ DateFormatter.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DateFormatter });
1424
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DateFormatter, decorators: [{
1425
- type: Injectable
1426
- }], ctorParameters: function () { return [{ type: i1.DateAdapter }, { type: undefined, decorators: [{
1427
- type: Inject,
1428
- args: [MC_DATE_LOCALE]
1429
- }] }]; } });
1430
-
1431
- class AbsoluteDateFormatterPipe {
1432
- constructor(adapter, formatter) {
1433
- this.adapter = adapter;
1434
- this.formatter = formatter;
1435
- }
1436
- transform(value, currYear) {
1437
- const date = this.adapter.deserialize(value);
1438
- return date ? this.formatter.absoluteLongDate(date, currYear) : '';
1439
- }
1440
- }
1441
- /** @nocollapse */ AbsoluteDateFormatterPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: AbsoluteDateFormatterPipe, deps: [{ token: i1.DateAdapter }, { token: DateFormatter }], target: i0.ɵɵFactoryTarget.Pipe });
1442
- /** @nocollapse */ AbsoluteDateFormatterPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.12", ngImport: i0, type: AbsoluteDateFormatterPipe, name: "absoluteLongDate" });
1443
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: AbsoluteDateFormatterPipe, decorators: [{
1444
- type: Pipe,
1445
- args: [{ name: 'absoluteLongDate' }]
1446
- }], ctorParameters: function () { return [{ type: i1.DateAdapter }, { type: DateFormatter }]; } });
1447
- class AbsoluteDateTimeFormatterPipe {
1448
- constructor(adapter, formatter) {
1449
- this.adapter = adapter;
1450
- this.formatter = formatter;
1451
- }
1452
- transform(value, options) {
1453
- const date = this.adapter.deserialize(value);
1454
- return date ? this.formatter.absoluteLongDateTime(date, options) : '';
1455
- }
1456
- }
1457
- /** @nocollapse */ AbsoluteDateTimeFormatterPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: AbsoluteDateTimeFormatterPipe, deps: [{ token: i1.DateAdapter }, { token: DateFormatter }], target: i0.ɵɵFactoryTarget.Pipe });
1458
- /** @nocollapse */ AbsoluteDateTimeFormatterPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.12", ngImport: i0, type: AbsoluteDateTimeFormatterPipe, name: "absoluteLongDateTime" });
1459
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: AbsoluteDateTimeFormatterPipe, decorators: [{
1460
- type: Pipe,
1461
- args: [{ name: 'absoluteLongDateTime' }]
1462
- }], ctorParameters: function () { return [{ type: i1.DateAdapter }, { type: DateFormatter }]; } });
1463
- class AbsoluteDateShortFormatterPipe {
1464
- constructor(adapter, formatter) {
1465
- this.adapter = adapter;
1466
- this.formatter = formatter;
1467
- }
1468
- transform(value, currYear) {
1469
- const date = this.adapter.deserialize(value);
1470
- return date ? this.formatter.absoluteShortDate(date, currYear) : '';
1471
- }
1472
- }
1473
- /** @nocollapse */ AbsoluteDateShortFormatterPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: AbsoluteDateShortFormatterPipe, deps: [{ token: i1.DateAdapter }, { token: DateFormatter }], target: i0.ɵɵFactoryTarget.Pipe });
1474
- /** @nocollapse */ AbsoluteDateShortFormatterPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.12", ngImport: i0, type: AbsoluteDateShortFormatterPipe, name: "absoluteShortDate" });
1475
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: AbsoluteDateShortFormatterPipe, decorators: [{
1476
- type: Pipe,
1477
- args: [{ name: 'absoluteShortDate' }]
1478
- }], ctorParameters: function () { return [{ type: i1.DateAdapter }, { type: DateFormatter }]; } });
1479
- class AbsoluteShortDateTimeFormatterPipe {
1480
- constructor(adapter, formatter) {
1481
- this.adapter = adapter;
1482
- this.formatter = formatter;
1483
- }
1484
- transform(value, options) {
1485
- const date = this.adapter.deserialize(value);
1486
- return date ? this.formatter.absoluteShortDateTime(date, options) : '';
1487
- }
1488
- }
1489
- /** @nocollapse */ AbsoluteShortDateTimeFormatterPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: AbsoluteShortDateTimeFormatterPipe, deps: [{ token: i1.DateAdapter }, { token: DateFormatter }], target: i0.ɵɵFactoryTarget.Pipe });
1490
- /** @nocollapse */ AbsoluteShortDateTimeFormatterPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.12", ngImport: i0, type: AbsoluteShortDateTimeFormatterPipe, name: "absoluteShortDateTime" });
1491
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: AbsoluteShortDateTimeFormatterPipe, decorators: [{
1492
- type: Pipe,
1493
- args: [{ name: 'absoluteShortDateTime' }]
1494
- }], ctorParameters: function () { return [{ type: i1.DateAdapter }, { type: DateFormatter }]; } });
1495
- class RelativeDateFormatterPipe {
1496
- constructor(adapter, formatter) {
1497
- this.adapter = adapter;
1498
- this.formatter = formatter;
1499
- }
1500
- transform(value) {
1501
- const date = this.adapter.deserialize(value);
1502
- return date ? this.formatter.relativeLongDate(date) : '';
1503
- }
1504
- }
1505
- /** @nocollapse */ RelativeDateFormatterPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: RelativeDateFormatterPipe, deps: [{ token: i1.DateAdapter }, { token: DateFormatter }], target: i0.ɵɵFactoryTarget.Pipe });
1506
- /** @nocollapse */ RelativeDateFormatterPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.12", ngImport: i0, type: RelativeDateFormatterPipe, name: "relativeLongDate" });
1507
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: RelativeDateFormatterPipe, decorators: [{
1508
- type: Pipe,
1509
- args: [{ name: 'relativeLongDate' }]
1510
- }], ctorParameters: function () { return [{ type: i1.DateAdapter }, { type: DateFormatter }]; } });
1511
- class RelativeDateTimeFormatterPipe {
1512
- constructor(adapter, formatter) {
1513
- this.adapter = adapter;
1514
- this.formatter = formatter;
1515
- }
1516
- transform(value, options) {
1517
- const date = this.adapter.deserialize(value);
1518
- return date ? this.formatter.relativeLongDateTime(date, options) : '';
386
+ transform(value, options) {
387
+ const date = this.adapter.deserialize(value);
388
+ return date ? this.formatter.relativeLongDateTime(date, options) : '';
1519
389
  }
1520
390
  }
1521
- /** @nocollapse */ RelativeDateTimeFormatterPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: RelativeDateTimeFormatterPipe, deps: [{ token: i1.DateAdapter }, { token: DateFormatter }], target: i0.ɵɵFactoryTarget.Pipe });
1522
- /** @nocollapse */ RelativeDateTimeFormatterPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.12", ngImport: i0, type: RelativeDateTimeFormatterPipe, name: "relativeLongDateTime" });
1523
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: RelativeDateTimeFormatterPipe, decorators: [{
391
+ /** @nocollapse */ RelativeDateTimeFormatterPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: RelativeDateTimeFormatterPipe, deps: [{ token: DateAdapter }, { token: DateFormatter }], target: i0.ɵɵFactoryTarget.Pipe });
392
+ /** @nocollapse */ RelativeDateTimeFormatterPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.2.2", ngImport: i0, type: RelativeDateTimeFormatterPipe, name: "relativeLongDateTime" });
393
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: RelativeDateTimeFormatterPipe, decorators: [{
1524
394
  type: Pipe,
1525
395
  args: [{ name: 'relativeLongDateTime' }]
1526
- }], ctorParameters: function () { return [{ type: i1.DateAdapter }, { type: DateFormatter }]; } });
396
+ }], ctorParameters: function () { return [{ type: DateAdapter }, { type: DateFormatter }]; } });
1527
397
  class RelativeShortDateFormatterPipe {
1528
398
  constructor(adapter, formatter) {
1529
399
  this.adapter = adapter;
@@ -1534,12 +404,12 @@ class RelativeShortDateFormatterPipe {
1534
404
  return date ? this.formatter.relativeShortDate(date) : '';
1535
405
  }
1536
406
  }
1537
- /** @nocollapse */ RelativeShortDateFormatterPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: RelativeShortDateFormatterPipe, deps: [{ token: i1.DateAdapter }, { token: DateFormatter }], target: i0.ɵɵFactoryTarget.Pipe });
1538
- /** @nocollapse */ RelativeShortDateFormatterPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.12", ngImport: i0, type: RelativeShortDateFormatterPipe, name: "relativeShortDate" });
1539
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: RelativeShortDateFormatterPipe, decorators: [{
407
+ /** @nocollapse */ RelativeShortDateFormatterPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: RelativeShortDateFormatterPipe, deps: [{ token: DateAdapter }, { token: DateFormatter }], target: i0.ɵɵFactoryTarget.Pipe });
408
+ /** @nocollapse */ RelativeShortDateFormatterPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.2.2", ngImport: i0, type: RelativeShortDateFormatterPipe, name: "relativeShortDate" });
409
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: RelativeShortDateFormatterPipe, decorators: [{
1540
410
  type: Pipe,
1541
411
  args: [{ name: 'relativeShortDate' }]
1542
- }], ctorParameters: function () { return [{ type: i1.DateAdapter }, { type: DateFormatter }]; } });
412
+ }], ctorParameters: function () { return [{ type: DateAdapter }, { type: DateFormatter }]; } });
1543
413
  class RelativeShortDateTimeFormatterPipe {
1544
414
  constructor(adapter, formatter) {
1545
415
  this.adapter = adapter;
@@ -1550,12 +420,12 @@ class RelativeShortDateTimeFormatterPipe {
1550
420
  return date ? this.formatter.relativeShortDateTime(date, options) : '';
1551
421
  }
1552
422
  }
1553
- /** @nocollapse */ RelativeShortDateTimeFormatterPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: RelativeShortDateTimeFormatterPipe, deps: [{ token: i1.DateAdapter }, { token: DateFormatter }], target: i0.ɵɵFactoryTarget.Pipe });
1554
- /** @nocollapse */ RelativeShortDateTimeFormatterPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.12", ngImport: i0, type: RelativeShortDateTimeFormatterPipe, name: "relativeShortDateTime" });
1555
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: RelativeShortDateTimeFormatterPipe, decorators: [{
423
+ /** @nocollapse */ RelativeShortDateTimeFormatterPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: RelativeShortDateTimeFormatterPipe, deps: [{ token: DateAdapter }, { token: DateFormatter }], target: i0.ɵɵFactoryTarget.Pipe });
424
+ /** @nocollapse */ RelativeShortDateTimeFormatterPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.2.2", ngImport: i0, type: RelativeShortDateTimeFormatterPipe, name: "relativeShortDateTime" });
425
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: RelativeShortDateTimeFormatterPipe, decorators: [{
1556
426
  type: Pipe,
1557
427
  args: [{ name: 'relativeShortDateTime' }]
1558
- }], ctorParameters: function () { return [{ type: i1.DateAdapter }, { type: DateFormatter }]; } });
428
+ }], ctorParameters: function () { return [{ type: DateAdapter }, { type: DateFormatter }]; } });
1559
429
  class RangeDateFormatterPipe {
1560
430
  constructor(adapter, formatter) {
1561
431
  this.adapter = adapter;
@@ -1567,12 +437,12 @@ class RangeDateFormatterPipe {
1567
437
  return this.formatter.rangeLongDate(date1, date2);
1568
438
  }
1569
439
  }
1570
- /** @nocollapse */ RangeDateFormatterPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: RangeDateFormatterPipe, deps: [{ token: i1.DateAdapter }, { token: DateFormatter }], target: i0.ɵɵFactoryTarget.Pipe });
1571
- /** @nocollapse */ RangeDateFormatterPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.12", ngImport: i0, type: RangeDateFormatterPipe, name: "rangeLongDate" });
1572
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: RangeDateFormatterPipe, decorators: [{
440
+ /** @nocollapse */ RangeDateFormatterPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: RangeDateFormatterPipe, deps: [{ token: DateAdapter }, { token: DateFormatter }], target: i0.ɵɵFactoryTarget.Pipe });
441
+ /** @nocollapse */ RangeDateFormatterPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.2.2", ngImport: i0, type: RangeDateFormatterPipe, name: "rangeLongDate" });
442
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: RangeDateFormatterPipe, decorators: [{
1573
443
  type: Pipe,
1574
444
  args: [{ name: 'rangeLongDate' }]
1575
- }], ctorParameters: function () { return [{ type: i1.DateAdapter }, { type: DateFormatter }]; } });
445
+ }], ctorParameters: function () { return [{ type: DateAdapter }, { type: DateFormatter }]; } });
1576
446
  class RangeShortDateFormatterPipe {
1577
447
  constructor(adapter, formatter) {
1578
448
  this.adapter = adapter;
@@ -1584,12 +454,12 @@ class RangeShortDateFormatterPipe {
1584
454
  return this.formatter.rangeShortDate(date1, date2);
1585
455
  }
1586
456
  }
1587
- /** @nocollapse */ RangeShortDateFormatterPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: RangeShortDateFormatterPipe, deps: [{ token: i1.DateAdapter }, { token: DateFormatter }], target: i0.ɵɵFactoryTarget.Pipe });
1588
- /** @nocollapse */ RangeShortDateFormatterPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.12", ngImport: i0, type: RangeShortDateFormatterPipe, name: "rangeShortDate" });
1589
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: RangeShortDateFormatterPipe, decorators: [{
457
+ /** @nocollapse */ RangeShortDateFormatterPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: RangeShortDateFormatterPipe, deps: [{ token: DateAdapter }, { token: DateFormatter }], target: i0.ɵɵFactoryTarget.Pipe });
458
+ /** @nocollapse */ RangeShortDateFormatterPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.2.2", ngImport: i0, type: RangeShortDateFormatterPipe, name: "rangeShortDate" });
459
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: RangeShortDateFormatterPipe, decorators: [{
1590
460
  type: Pipe,
1591
461
  args: [{ name: 'rangeShortDate' }]
1592
- }], ctorParameters: function () { return [{ type: i1.DateAdapter }, { type: DateFormatter }]; } });
462
+ }], ctorParameters: function () { return [{ type: DateAdapter }, { type: DateFormatter }]; } });
1593
463
  class RangeDateTimeFormatterPipe {
1594
464
  constructor(adapter, formatter) {
1595
465
  this.adapter = adapter;
@@ -1601,12 +471,12 @@ class RangeDateTimeFormatterPipe {
1601
471
  return this.formatter.rangeLongDateTime(date1, date2, options);
1602
472
  }
1603
473
  }
1604
- /** @nocollapse */ RangeDateTimeFormatterPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: RangeDateTimeFormatterPipe, deps: [{ token: i1.DateAdapter }, { token: DateFormatter }], target: i0.ɵɵFactoryTarget.Pipe });
1605
- /** @nocollapse */ RangeDateTimeFormatterPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.12", ngImport: i0, type: RangeDateTimeFormatterPipe, name: "rangeLongDateTime" });
1606
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: RangeDateTimeFormatterPipe, decorators: [{
474
+ /** @nocollapse */ RangeDateTimeFormatterPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: RangeDateTimeFormatterPipe, deps: [{ token: DateAdapter }, { token: DateFormatter }], target: i0.ɵɵFactoryTarget.Pipe });
475
+ /** @nocollapse */ RangeDateTimeFormatterPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.2.2", ngImport: i0, type: RangeDateTimeFormatterPipe, name: "rangeLongDateTime" });
476
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: RangeDateTimeFormatterPipe, decorators: [{
1607
477
  type: Pipe,
1608
478
  args: [{ name: 'rangeLongDateTime' }]
1609
- }], ctorParameters: function () { return [{ type: i1.DateAdapter }, { type: DateFormatter }]; } });
479
+ }], ctorParameters: function () { return [{ type: DateAdapter }, { type: DateFormatter }]; } });
1610
480
  class RangeMiddleDateTimeFormatterPipe {
1611
481
  constructor(adapter, formatter) {
1612
482
  this.adapter = adapter;
@@ -1618,12 +488,12 @@ class RangeMiddleDateTimeFormatterPipe {
1618
488
  return this.formatter.rangeMiddleDateTime(date1, date2, options);
1619
489
  }
1620
490
  }
1621
- /** @nocollapse */ RangeMiddleDateTimeFormatterPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: RangeMiddleDateTimeFormatterPipe, deps: [{ token: i1.DateAdapter }, { token: DateFormatter }], target: i0.ɵɵFactoryTarget.Pipe });
1622
- /** @nocollapse */ RangeMiddleDateTimeFormatterPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.12", ngImport: i0, type: RangeMiddleDateTimeFormatterPipe, name: "rangeMiddleDateTime" });
1623
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: RangeMiddleDateTimeFormatterPipe, decorators: [{
491
+ /** @nocollapse */ RangeMiddleDateTimeFormatterPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: RangeMiddleDateTimeFormatterPipe, deps: [{ token: DateAdapter }, { token: DateFormatter }], target: i0.ɵɵFactoryTarget.Pipe });
492
+ /** @nocollapse */ RangeMiddleDateTimeFormatterPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.2.2", ngImport: i0, type: RangeMiddleDateTimeFormatterPipe, name: "rangeMiddleDateTime" });
493
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: RangeMiddleDateTimeFormatterPipe, decorators: [{
1624
494
  type: Pipe,
1625
495
  args: [{ name: 'rangeMiddleDateTime' }]
1626
- }], ctorParameters: function () { return [{ type: i1.DateAdapter }, { type: DateFormatter }]; } });
496
+ }], ctorParameters: function () { return [{ type: DateAdapter }, { type: DateFormatter }]; } });
1627
497
  class RangeShortDateTimeFormatterPipe {
1628
498
  constructor(adapter, formatter) {
1629
499
  this.adapter = adapter;
@@ -1635,12 +505,12 @@ class RangeShortDateTimeFormatterPipe {
1635
505
  return this.formatter.rangeShortDateTime(date1, date2, options);
1636
506
  }
1637
507
  }
1638
- /** @nocollapse */ RangeShortDateTimeFormatterPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: RangeShortDateTimeFormatterPipe, deps: [{ token: i1.DateAdapter }, { token: DateFormatter }], target: i0.ɵɵFactoryTarget.Pipe });
1639
- /** @nocollapse */ RangeShortDateTimeFormatterPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.12", ngImport: i0, type: RangeShortDateTimeFormatterPipe, name: "rangeShortDateTime" });
1640
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: RangeShortDateTimeFormatterPipe, decorators: [{
508
+ /** @nocollapse */ RangeShortDateTimeFormatterPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: RangeShortDateTimeFormatterPipe, deps: [{ token: DateAdapter }, { token: DateFormatter }], target: i0.ɵɵFactoryTarget.Pipe });
509
+ /** @nocollapse */ RangeShortDateTimeFormatterPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.2.2", ngImport: i0, type: RangeShortDateTimeFormatterPipe, name: "rangeShortDateTime" });
510
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: RangeShortDateTimeFormatterPipe, decorators: [{
1641
511
  type: Pipe,
1642
512
  args: [{ name: 'rangeShortDateTime' }]
1643
- }], ctorParameters: function () { return [{ type: i1.DateAdapter }, { type: DateFormatter }]; } });
513
+ }], ctorParameters: function () { return [{ type: DateAdapter }, { type: DateFormatter }]; } });
1644
514
 
1645
515
  /* tslint:disable:naming-convention */
1646
516
  const MC_LOCALE_ID = new InjectionToken('McLocaleId');
@@ -1740,10 +610,10 @@ class McDecimalPipe {
1740
610
  }
1741
611
  }
1742
612
  }
1743
- /** @nocollapse */ McDecimalPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: McDecimalPipe, deps: [{ token: MC_LOCALE_ID, optional: true }, { token: MC_NUMBER_FORMATTER_OPTIONS, optional: true }], target: i0.ɵɵFactoryTarget.Pipe });
1744
- /** @nocollapse */ McDecimalPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.12", ngImport: i0, type: McDecimalPipe, name: "mcNumber" });
1745
- /** @nocollapse */ McDecimalPipe.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: McDecimalPipe, providedIn: 'root' });
1746
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: McDecimalPipe, decorators: [{
613
+ /** @nocollapse */ McDecimalPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: McDecimalPipe, deps: [{ token: MC_LOCALE_ID, optional: true }, { token: MC_NUMBER_FORMATTER_OPTIONS, optional: true }], target: i0.ɵɵFactoryTarget.Pipe });
614
+ /** @nocollapse */ McDecimalPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.2.2", ngImport: i0, type: McDecimalPipe, name: "mcNumber" });
615
+ /** @nocollapse */ McDecimalPipe.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: McDecimalPipe, providedIn: 'root' });
616
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: McDecimalPipe, decorators: [{
1747
617
  type: Injectable,
1748
618
  args: [{ providedIn: 'root' }]
1749
619
  }, {
@@ -1763,8 +633,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
1763
633
 
1764
634
  class McFormattersModule {
1765
635
  }
1766
- /** @nocollapse */ McFormattersModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: McFormattersModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1767
- /** @nocollapse */ McFormattersModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.12", ngImport: i0, type: McFormattersModule, declarations: [McDecimalPipe,
636
+ /** @nocollapse */ McFormattersModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: McFormattersModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
637
+ /** @nocollapse */ McFormattersModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.2", ngImport: i0, type: McFormattersModule, declarations: [McDecimalPipe,
1768
638
  AbsoluteDateFormatterPipe,
1769
639
  AbsoluteDateTimeFormatterPipe,
1770
640
  AbsoluteDateShortFormatterPipe,
@@ -1791,8 +661,8 @@ class McFormattersModule {
1791
661
  RangeDateTimeFormatterPipe,
1792
662
  RangeShortDateTimeFormatterPipe,
1793
663
  RangeMiddleDateTimeFormatterPipe] });
1794
- /** @nocollapse */ McFormattersModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: McFormattersModule, providers: [DateFormatter] });
1795
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: McFormattersModule, decorators: [{
664
+ /** @nocollapse */ McFormattersModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: McFormattersModule, providers: [DateFormatter] });
665
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: McFormattersModule, decorators: [{
1796
666
  type: NgModule,
1797
667
  args: [{
1798
668
  declarations: [
@@ -1831,9 +701,90 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
1831
701
  }]
1832
702
  }] });
1833
703
 
1834
- const validationTooltipShowDelay = 10;
1835
- const validationTooltipHideDelay = 3000;
1836
- const MC_VALIDATION = new InjectionToken('McUseValidation', { factory: () => ({ useValidation: true }) });
704
+ class McFormElement {
705
+ constructor(element) {
706
+ this.element = element;
707
+ this.margin = false;
708
+ this.isRow = false;
709
+ this.isFieldSet = false;
710
+ this.hasLegend = false;
711
+ this.isHorizontal = false;
712
+ }
713
+ ngAfterContentInit() {
714
+ const classList = this.element.nativeElement.classList;
715
+ this.isRow = classList.contains('mc-form__row');
716
+ this.isHorizontal = classList.contains('mc-horizontal');
717
+ this.isFieldSet = classList.contains('mc-form__fieldset');
718
+ if (this.isFieldSet && this.element.nativeElement.firstElementChild) {
719
+ this.hasLegend = this.element.nativeElement.firstElementChild.classList.contains('mc-form__legend');
720
+ }
721
+ }
722
+ }
723
+ /** @nocollapse */ McFormElement.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: McFormElement, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
724
+ /** @nocollapse */ McFormElement.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.2", type: McFormElement, selector: ".mc-form__row, .mc-form__fieldset, .mc-form__legend", host: { properties: { "class.mc-form-row_margin": "margin" } }, queries: [{ propertyName: "elements", predicate: McFormElement }], exportAs: ["mcFormElement"], ngImport: i0 });
725
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: McFormElement, decorators: [{
726
+ type: Directive,
727
+ args: [{
728
+ selector: '.mc-form__row, .mc-form__fieldset, .mc-form__legend',
729
+ exportAs: 'mcFormElement',
730
+ host: {
731
+ '[class.mc-form-row_margin]': 'margin'
732
+ }
733
+ }]
734
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { elements: [{
735
+ type: ContentChildren,
736
+ args: [McFormElement]
737
+ }] } });
738
+ class McForm {
739
+ ngAfterContentInit() {
740
+ this.handleElements(this.elements);
741
+ }
742
+ handleElements(elements) {
743
+ elements.forEach((element, index) => {
744
+ const nextElement = elements.get(index + 1);
745
+ if (element.isFieldSet && !element.isHorizontal) {
746
+ this.handleElements(element.elements);
747
+ }
748
+ element.margin = !!(nextElement && !nextElement.hasLegend);
749
+ });
750
+ }
751
+ }
752
+ /** @nocollapse */ McForm.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: McForm, deps: [], target: i0.ɵɵFactoryTarget.Directive });
753
+ /** @nocollapse */ McForm.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.2", type: McForm, selector: ".mc-form-vertical, .mc-form-horizontal", host: { classAttribute: "mc-form" }, queries: [{ propertyName: "elements", predicate: McFormElement }], exportAs: ["mcForm"], ngImport: i0 });
754
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: McForm, decorators: [{
755
+ type: Directive,
756
+ args: [{
757
+ selector: '.mc-form-vertical, .mc-form-horizontal',
758
+ exportAs: 'mcForm',
759
+ host: {
760
+ class: 'mc-form'
761
+ }
762
+ }]
763
+ }], propDecorators: { elements: [{
764
+ type: ContentChildren,
765
+ args: [McFormElement]
766
+ }] } });
767
+
768
+ class McFormsModule {
769
+ }
770
+ /** @nocollapse */ McFormsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: McFormsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
771
+ /** @nocollapse */ McFormsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.2", ngImport: i0, type: McFormsModule, declarations: [McForm,
772
+ McFormElement], exports: [McForm,
773
+ McFormElement] });
774
+ /** @nocollapse */ McFormsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: McFormsModule });
775
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: McFormsModule, decorators: [{
776
+ type: NgModule,
777
+ args: [{
778
+ exports: [
779
+ McForm,
780
+ McFormElement
781
+ ],
782
+ declarations: [
783
+ McForm,
784
+ McFormElement
785
+ ]
786
+ }]
787
+ }] });
1837
788
 
1838
789
  function escapeRegExp(value) {
1839
790
  if (value) {
@@ -1849,19 +800,19 @@ class McHighlightPipe {
1849
800
  return value.replace(new RegExp(`(${escapeRegExp(args)})`, 'gi'), '<mark class="mc-highlight">$1</mark>');
1850
801
  }
1851
802
  }
1852
- /** @nocollapse */ McHighlightPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: McHighlightPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
1853
- /** @nocollapse */ McHighlightPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.12", ngImport: i0, type: McHighlightPipe, name: "mcHighlight" });
1854
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: McHighlightPipe, decorators: [{
803
+ /** @nocollapse */ McHighlightPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: McHighlightPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
804
+ /** @nocollapse */ McHighlightPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.2.2", ngImport: i0, type: McHighlightPipe, name: "mcHighlight" });
805
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: McHighlightPipe, decorators: [{
1855
806
  type: Pipe,
1856
807
  args: [{ name: 'mcHighlight' }]
1857
808
  }] });
1858
809
 
1859
810
  class McHighlightModule {
1860
811
  }
1861
- /** @nocollapse */ McHighlightModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: McHighlightModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1862
- /** @nocollapse */ McHighlightModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.12", ngImport: i0, type: McHighlightModule, declarations: [McHighlightPipe], imports: [CommonModule], exports: [McHighlightPipe] });
1863
- /** @nocollapse */ McHighlightModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: McHighlightModule, imports: [CommonModule] });
1864
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: McHighlightModule, decorators: [{
812
+ /** @nocollapse */ McHighlightModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: McHighlightModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
813
+ /** @nocollapse */ McHighlightModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.2", ngImport: i0, type: McHighlightModule, declarations: [McHighlightPipe], imports: [CommonModule], exports: [McHighlightPipe] });
814
+ /** @nocollapse */ McHighlightModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: McHighlightModule, imports: [CommonModule] });
815
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: McHighlightModule, decorators: [{
1865
816
  type: NgModule,
1866
817
  args: [{
1867
818
  imports: [CommonModule],
@@ -1870,371 +821,104 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
1870
821
  }]
1871
822
  }] });
1872
823
 
1873
- const selectEvents = 'selectEvents';
824
+ /** InjectionToken that can be used to specify the global label options. */
825
+ const MC_LABEL_GLOBAL_OPTIONS = new InjectionToken('mc-label-global-options');
1874
826
 
1875
827
  /**
1876
- * Returns an exception to be thrown when attempting to change a select's `multiple` option
1877
- * after initialization.
1878
- * @docs-private
828
+ * Shared directive to count lines inside a text area, such as a list item.
829
+ * Line elements can be extracted with a @ContentChildren(McLine) query, then
830
+ * counted by checking the query list's length.
1879
831
  */
1880
- function getMcSelectDynamicMultipleError() {
1881
- return Error('Cannot change `multiple` mode of select after initialization.');
832
+ class McLine {
1882
833
  }
834
+ /** @nocollapse */ McLine.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: McLine, deps: [], target: i0.ɵɵFactoryTarget.Directive });
835
+ /** @nocollapse */ McLine.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.2", type: McLine, selector: "[mc-line], [mcLine]", host: { classAttribute: "mc-line" }, ngImport: i0 });
836
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: McLine, decorators: [{
837
+ type: Directive,
838
+ args: [{
839
+ selector: '[mc-line], [mcLine]',
840
+ host: { class: 'mc-line' }
841
+ }]
842
+ }] });
1883
843
  /**
1884
- * Returns an exception to be thrown when attempting to assign a non-array value to a select
1885
- * in `multiple` mode. Note that `undefined` and `null` are still valid values to allow for
1886
- * resetting the value.
844
+ * Helper that takes a query list of lines and sets the correct class on the host.
1887
845
  * @docs-private
1888
846
  */
1889
- function getMcSelectNonArrayValueError() {
1890
- return Error('Value must be an array in multiple-selection mode.');
1891
- }
1892
- /**
1893
- * Returns an exception to be thrown when assigning a non-function value to the comparator
1894
- * used to determine if a value corresponds to an option. Note that whether the function
1895
- * actually takes two values and returns a boolean is not checked.
1896
- */
1897
- function getMcSelectNonFunctionValueError() {
1898
- return Error('`compareWith` must be a function.');
1899
- }
1900
-
1901
- /** The max height of the select's overlay panel */
1902
- const SELECT_PANEL_MAX_HEIGHT = 224;
1903
- /** The panel's padding on the x-axis */
1904
- const SELECT_PANEL_PADDING_X = 1;
1905
- /** The panel's x axis padding if it is indented (e.g. there is an option group). */
1906
- /* tslint:disable-next-line:no-magic-numbers */
1907
- const SELECT_PANEL_INDENT_PADDING_X = SELECT_PANEL_PADDING_X * 2;
1908
- /**
1909
- * The select panel will only "fit" inside the viewport if it is positioned at
1910
- * this value or more away from the viewport boundary.
1911
- */
1912
- const SELECT_PANEL_VIEWPORT_PADDING = 8;
1913
- /** Injection token that determines the scroll handling while a select is open. */
1914
- const MC_SELECT_SCROLL_STRATEGY = new InjectionToken('mc-select-scroll-strategy');
1915
- /** @docs-private */
1916
- function mcSelectScrollStrategyProviderFactory(overlay) {
1917
- return () => overlay.scrollStrategies.reposition();
1918
- }
1919
- /** @docs-private */
1920
- const MC_SELECT_SCROLL_STRATEGY_PROVIDER = {
1921
- provide: MC_SELECT_SCROLL_STRATEGY,
1922
- deps: [Overlay],
1923
- useFactory: mcSelectScrollStrategyProviderFactory
1924
- };
1925
-
1926
- const POSITION_MAP = {
1927
- top: {
1928
- originX: 'center',
1929
- originY: 'top',
1930
- overlayX: 'center',
1931
- overlayY: 'bottom'
1932
- },
1933
- topCenter: {
1934
- originX: 'center',
1935
- originY: 'top',
1936
- overlayX: 'center',
1937
- overlayY: 'bottom'
1938
- },
1939
- topLeft: {
1940
- originX: 'start',
1941
- originY: 'top',
1942
- overlayX: 'start',
1943
- overlayY: 'bottom'
1944
- },
1945
- topRight: {
1946
- originX: 'end',
1947
- originY: 'top',
1948
- overlayX: 'end',
1949
- overlayY: 'bottom'
1950
- },
1951
- right: {
1952
- originX: 'end',
1953
- originY: 'center',
1954
- overlayX: 'start',
1955
- overlayY: 'center'
1956
- },
1957
- rightTop: {
1958
- originX: 'end',
1959
- originY: 'top',
1960
- overlayX: 'start',
1961
- overlayY: 'top'
1962
- },
1963
- rightBottom: {
1964
- originX: 'end',
1965
- originY: 'bottom',
1966
- overlayX: 'start',
1967
- overlayY: 'bottom'
1968
- },
1969
- bottom: {
1970
- originX: 'center',
1971
- originY: 'bottom',
1972
- overlayX: 'center',
1973
- overlayY: 'top'
1974
- },
1975
- bottomCenter: {
1976
- originX: 'center',
1977
- originY: 'bottom',
1978
- overlayX: 'center',
1979
- overlayY: 'top'
1980
- },
1981
- bottomLeft: {
1982
- originX: 'start',
1983
- originY: 'bottom',
1984
- overlayX: 'start',
1985
- overlayY: 'top'
1986
- },
1987
- bottomRight: {
1988
- originX: 'end',
1989
- originY: 'bottom',
1990
- overlayX: 'end',
1991
- overlayY: 'top'
1992
- },
1993
- left: {
1994
- originX: 'start',
1995
- originY: 'center',
1996
- overlayX: 'end',
1997
- overlayY: 'center'
1998
- },
1999
- leftTop: {
2000
- originX: 'start',
2001
- originY: 'top',
2002
- overlayX: 'end',
2003
- overlayY: 'top'
2004
- },
2005
- leftBottom: {
2006
- originX: 'start',
2007
- originY: 'bottom',
2008
- overlayX: 'end',
2009
- overlayY: 'bottom'
847
+ class McLineSetter {
848
+ constructor(_lines, _element) {
849
+ this._lines = _lines;
850
+ this._element = _element;
851
+ this.setLineClass(this._lines.length);
852
+ this._lines.changes.subscribe(() => {
853
+ this.setLineClass(this._lines.length);
854
+ });
2010
855
  }
2011
- };
2012
- const EXTENDED_OVERLAY_POSITIONS = objectValues([
2013
- POSITION_MAP.top,
2014
- POSITION_MAP.topLeft,
2015
- POSITION_MAP.topRight,
2016
- POSITION_MAP.right,
2017
- POSITION_MAP.rightTop,
2018
- POSITION_MAP.rightBottom,
2019
- POSITION_MAP.bottom,
2020
- POSITION_MAP.bottomLeft,
2021
- POSITION_MAP.bottomRight,
2022
- POSITION_MAP.left,
2023
- POSITION_MAP.leftTop,
2024
- POSITION_MAP.leftBottom
2025
- ]);
2026
- const TOP_POSITION_PRIORITY = objectValues([
2027
- POSITION_MAP.top,
2028
- POSITION_MAP.bottom,
2029
- POSITION_MAP.rightBottom,
2030
- POSITION_MAP.leftBottom,
2031
- POSITION_MAP.bottomLeft,
2032
- POSITION_MAP.bottomRight
2033
- ]);
2034
- const BOTTOM_POSITION_PRIORITY = objectValues([
2035
- POSITION_MAP.bottom,
2036
- POSITION_MAP.top,
2037
- POSITION_MAP.topLeft,
2038
- POSITION_MAP.topRight,
2039
- POSITION_MAP.rightBottom,
2040
- POSITION_MAP.leftBottom
2041
- ]);
2042
- const RIGHT_POSITION_PRIORITY = objectValues([
2043
- POSITION_MAP.right,
2044
- POSITION_MAP.left,
2045
- POSITION_MAP.leftTop,
2046
- POSITION_MAP.leftBottom,
2047
- POSITION_MAP.top,
2048
- POSITION_MAP.bottom
2049
- ]);
2050
- const LEFT_POSITION_PRIORITY = objectValues([
2051
- POSITION_MAP.left,
2052
- POSITION_MAP.right,
2053
- POSITION_MAP.rightTop,
2054
- POSITION_MAP.rightBottom,
2055
- POSITION_MAP.top,
2056
- POSITION_MAP.bottom
2057
- ]);
2058
- const RIGHT_TOP_POSITION_PRIORITY = objectValues([
2059
- POSITION_MAP.rightTop,
2060
- POSITION_MAP.leftTop,
2061
- POSITION_MAP.left,
2062
- POSITION_MAP.leftBottom,
2063
- POSITION_MAP.topLeft,
2064
- POSITION_MAP.bottomLeft
2065
- ]);
2066
- const RIGHT_BOTTOM_POSITION_PRIORITY = objectValues([
2067
- POSITION_MAP.rightBottom,
2068
- POSITION_MAP.leftBottom,
2069
- POSITION_MAP.left,
2070
- POSITION_MAP.leftTop,
2071
- POSITION_MAP.topLeft,
2072
- POSITION_MAP.bottomLeft
2073
- ]);
2074
- const LEFT_TOP_POSITION_PRIORITY = objectValues([
2075
- POSITION_MAP.leftTop,
2076
- POSITION_MAP.rightTop,
2077
- POSITION_MAP.right,
2078
- POSITION_MAP.rightBottom,
2079
- POSITION_MAP.topRight,
2080
- POSITION_MAP.bottomRight
2081
- ]);
2082
- const LEFT_BOTTOM_POSITION_PRIORITY = objectValues([
2083
- POSITION_MAP.leftBottom,
2084
- POSITION_MAP.rightBottom,
2085
- POSITION_MAP.right,
2086
- POSITION_MAP.rightTop,
2087
- POSITION_MAP.topRight,
2088
- POSITION_MAP.bottomRight
2089
- ]);
2090
- const TOP_LEFT_POSITION_PRIORITY = objectValues([
2091
- POSITION_MAP.topLeft,
2092
- POSITION_MAP.topRight,
2093
- POSITION_MAP.bottomLeft,
2094
- POSITION_MAP.bottom,
2095
- POSITION_MAP.bottomRight,
2096
- POSITION_MAP.leftBottom,
2097
- POSITION_MAP.rightBottom
2098
- ]);
2099
- const TOP_RIGHT_POSITION_PRIORITY = objectValues([
2100
- POSITION_MAP.topRight,
2101
- POSITION_MAP.topLeft,
2102
- POSITION_MAP.bottomRight,
2103
- POSITION_MAP.bottom,
2104
- POSITION_MAP.bottomLeft,
2105
- POSITION_MAP.leftBottom,
2106
- POSITION_MAP.rightBottom
2107
- ]);
2108
- const BOTTOM_RIGHT_POSITION_PRIORITY = objectValues([
2109
- POSITION_MAP.bottomRight,
2110
- POSITION_MAP.bottomLeft,
2111
- POSITION_MAP.topRight,
2112
- POSITION_MAP.top,
2113
- POSITION_MAP.topLeft,
2114
- POSITION_MAP.leftTop,
2115
- POSITION_MAP.rightTop
2116
- ]);
2117
- const BOTTOM_LEFT_POSITION_PRIORITY = objectValues([
2118
- POSITION_MAP.bottomLeft,
2119
- POSITION_MAP.bottomRight,
2120
- POSITION_MAP.topLeft,
2121
- POSITION_MAP.top,
2122
- POSITION_MAP.topRight,
2123
- POSITION_MAP.rightTop,
2124
- POSITION_MAP.leftTop
2125
- ]);
2126
- const POSITION_PRIORITY_STRATEGY = {
2127
- top: TOP_POSITION_PRIORITY,
2128
- topLeft: TOP_LEFT_POSITION_PRIORITY,
2129
- topRight: TOP_RIGHT_POSITION_PRIORITY,
2130
- bottom: BOTTOM_POSITION_PRIORITY,
2131
- bottomLeft: BOTTOM_LEFT_POSITION_PRIORITY,
2132
- bottomRight: BOTTOM_RIGHT_POSITION_PRIORITY,
2133
- left: LEFT_POSITION_PRIORITY,
2134
- leftTop: LEFT_TOP_POSITION_PRIORITY,
2135
- leftBottom: LEFT_BOTTOM_POSITION_PRIORITY,
2136
- right: RIGHT_POSITION_PRIORITY,
2137
- rightTop: RIGHT_TOP_POSITION_PRIORITY,
2138
- rightBottom: RIGHT_BOTTOM_POSITION_PRIORITY
2139
- };
2140
- const POSITION_TO_CSS_MAP = {
2141
- top: 'top',
2142
- topLeft: 'top-left',
2143
- topRight: 'top-right',
2144
- right: 'right',
2145
- rightTop: 'right-top',
2146
- rightBottom: 'right-bottom',
2147
- left: 'left',
2148
- leftTop: 'left-top',
2149
- leftBottom: 'left-bottom',
2150
- bottom: 'bottom',
2151
- bottomLeft: 'bottom-left',
2152
- bottomRight: 'bottom-right'
2153
- };
2154
- function arrayMap(array, iteratee) {
2155
- let index = -1;
2156
- const length = array === null ? 0 : array.length;
2157
- const result = Array(length);
2158
- while (++index < length) {
2159
- result[index] = iteratee(array[index], index, array);
856
+ setLineClass(count) {
857
+ const minLineClassNumber = 2;
858
+ const maxLineClassNumber = 3;
859
+ this.resetClasses();
860
+ if (count === minLineClassNumber || count === maxLineClassNumber) {
861
+ this.setClass(`mc-${count}-line`, true);
862
+ }
863
+ else if (count > maxLineClassNumber) {
864
+ this.setClass(`mc-multi-line`, true);
865
+ }
866
+ }
867
+ resetClasses() {
868
+ this.setClass('mc-2-line', false);
869
+ this.setClass('mc-3-line', false);
870
+ this.setClass('mc-multi-line', false);
871
+ }
872
+ setClass(className, isAdd) {
873
+ if (isAdd) {
874
+ this._element.nativeElement.classList.add(className);
875
+ }
876
+ else {
877
+ this._element.nativeElement.classList.remove(className);
878
+ }
2160
879
  }
2161
- return result;
2162
- }
2163
- function baseValues(object, props) {
2164
- return arrayMap(props, (key) => object[key]);
2165
880
  }
2166
- function objectValues(object) {
2167
- return object === null ? [] : baseValues(object, Object.keys(object));
881
+ class McLineModule {
2168
882
  }
883
+ /** @nocollapse */ McLineModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: McLineModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
884
+ /** @nocollapse */ McLineModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.2", ngImport: i0, type: McLineModule, declarations: [McLine], exports: [McLine] });
885
+ /** @nocollapse */ McLineModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: McLineModule });
886
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: McLineModule, decorators: [{
887
+ type: NgModule,
888
+ args: [{
889
+ imports: [],
890
+ exports: [McLine],
891
+ declarations: [McLine]
892
+ }]
893
+ }] });
2169
894
 
2170
- const fadeAnimation = trigger('fadeAnimation', [
2171
- state('void', style({ opacity: 0 })),
2172
- state('true', style({ opacity: 1 })),
2173
- state('false', style({ opacity: 0 })),
2174
- transition('* => true', animate('150ms cubic-bezier(0.0, 0.0, 0.2, 1)')),
2175
- transition('* => void', animate('150ms cubic-bezier(0.4, 0.0, 1, 1)'))
2176
- ]);
2177
-
2178
- var AnimationCurves;
2179
- (function (AnimationCurves) {
2180
- AnimationCurves["StandardCurve"] = "cubic-bezier(0.4,0.0,0.2,1)";
2181
- AnimationCurves["DecelerationCurve"] = "cubic-bezier(0.0,0.0,0.2,1)";
2182
- AnimationCurves["AccelerationCurve"] = "cubic-bezier(0.4,0.0,1,1)";
2183
- AnimationCurves["SharpCurve"] = "cubic-bezier(0.4,0.0,0.6,1)";
2184
- })(AnimationCurves || (AnimationCurves = {}));
2185
-
895
+ /** @docs-private */
896
+ class McOptgroupBase {
897
+ }
898
+ // tslint:disable-next-line: naming-convention
899
+ const McOptgroupMixinBase = mixinDisabled(McOptgroupBase);
900
+ let uniqueOptgroupIdCounter = 0;
2186
901
  /**
2187
- * The following are all the animations for the mc-select component, with each
2188
- * const containing the metadata for one animation.
2189
- *
902
+ * Component that is used to group instances of `mc-option`.
2190
903
  */
2191
- const mcSelectAnimations = {
2192
- /**
2193
- * This animation transforms the select's overlay panel on and off the page.
2194
- *
2195
- * When the panel is attached to the DOM, it expands its width by the amount of padding, scales it
2196
- * up to 100% on the Y axis, fades in its border, and translates slightly up and to the
2197
- * side to ensure the option text correctly overlaps the trigger text.
2198
- *
2199
- * When the panel is removed from the DOM, it simply fades out linearly.
2200
- */
2201
- transformPanel: trigger('transformPanel', [
2202
- state('void', style({
2203
- transform: 'scaleY(0)',
2204
- minWidth: '100%',
2205
- opacity: 0
2206
- })),
2207
- transition('void => *', group([
2208
- animate('150ms cubic-bezier(0.25, 0.8, 0.25, 1)')
2209
- ])),
2210
- transition('* => void', [
2211
- animate('250ms 100ms linear', style({ opacity: 0 }))
2212
- ])
2213
- ]),
2214
- /**
2215
- * This animation fades in the background color and text content of the
2216
- * select's options. It is time delayed to occur 100ms after the overlay
2217
- * panel has transformed in.
2218
- */
2219
- fadeInContent: trigger('fadeInContent', [
2220
- state('showing', style({ opacity: 1 })),
2221
- transition('void => showing', [
2222
- style({ opacity: 0 }),
2223
- animate('150ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)')
2224
- ])
2225
- ])
2226
- };
2227
- const transformPanel = mcSelectAnimations.transformPanel;
2228
- const fadeInContent = mcSelectAnimations.fadeInContent;
2229
-
2230
- /** InjectionToken that can be used to specify the global label options. */
2231
- const MC_LABEL_GLOBAL_OPTIONS = new InjectionToken('mc-label-global-options');
2232
-
2233
- var MultipleMode;
2234
- (function (MultipleMode) {
2235
- MultipleMode["CHECKBOX"] = "checkbox";
2236
- MultipleMode["KEYBOARD"] = "keyboard";
2237
- })(MultipleMode || (MultipleMode = {}));
904
+ class McOptgroup extends McOptgroupMixinBase {
905
+ constructor() {
906
+ super(...arguments);
907
+ /** Unique id for the underlying label. */
908
+ this.labelId = `mc-optgroup-label-${uniqueOptgroupIdCounter++}`;
909
+ }
910
+ }
911
+ /** @nocollapse */ McOptgroup.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: McOptgroup, deps: null, target: i0.ɵɵFactoryTarget.Component });
912
+ /** @nocollapse */ McOptgroup.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.2", type: McOptgroup, selector: "mc-optgroup", inputs: { disabled: "disabled", label: "label" }, host: { properties: { "class.mc-disabled": "disabled" }, classAttribute: "mc-optgroup" }, exportAs: ["mcOptgroup"], usesInheritance: true, ngImport: i0, template: "<label class=\"mc-optgroup-label\" [id]=\"labelId\">{{ label }}</label>\n<ng-content select=\"mc-option, mc-list-option, mc-timezone-option, ng-container\"></ng-content>\n", styles: [".mc-optgroup-label{padding-left:var(--mc-optgroup-size-padding-left, 17px);-webkit-user-select:none;user-select:none;cursor:default}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
913
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: McOptgroup, decorators: [{
914
+ type: Component,
915
+ args: [{ selector: 'mc-optgroup', exportAs: 'mcOptgroup', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, inputs: ['disabled'], host: {
916
+ class: 'mc-optgroup',
917
+ '[class.mc-disabled]': 'disabled'
918
+ }, template: "<label class=\"mc-optgroup-label\" [id]=\"labelId\">{{ label }}</label>\n<ng-content select=\"mc-option, mc-list-option, mc-timezone-option, ng-container\"></ng-content>\n", styles: [".mc-optgroup-label{padding-left:var(--mc-optgroup-size-padding-left, 17px);-webkit-user-select:none;user-select:none;cursor:default}\n"] }]
919
+ }], propDecorators: { label: [{
920
+ type: Input
921
+ }] } });
2238
922
 
2239
923
  // Boilerplate for applying mixins to McPseudoCheckbox.
2240
924
  /** @docs-private */
@@ -2265,109 +949,22 @@ class McPseudoCheckbox extends McPseudoCheckboxMixinBase {
2265
949
  this.disabled = false;
2266
950
  }
2267
951
  }
2268
- /** @nocollapse */ McPseudoCheckbox.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: McPseudoCheckbox, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
2269
- /** @nocollapse */ McPseudoCheckbox.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: McPseudoCheckbox, selector: "mc-pseudo-checkbox", inputs: { color: "color", state: "state", disabled: "disabled" }, host: { properties: { "class.mc-indeterminate": "state === \"indeterminate\"", "class.mc-checked": "state === \"checked\"", "class.mc-disabled": "disabled" }, classAttribute: "mc-pseudo-checkbox" }, usesInheritance: true, ngImport: i0, template: "<i class=\"mc-checkbox-checkmark mc mc-check_16\"></i>\n<i class=\"mc-checkbox-mixedmark mc mc-minus_16\"></i>\n", styles: [".mc-pseudo-checkbox{position:relative;display:inline-block;box-sizing:border-box;width:16px;width:var(--mc-checkbox-size-width, 16px);height:16px;height:var(--mc-checkbox-size-width, 16px);border-radius:3px;border-width:1px;border-width:var(--mc-checkbox-size-border-width, 1px);border-style:solid;cursor:pointer;vertical-align:middle;flex-shrink:0}.mc-pseudo-checkbox .mc-checkbox-checkmark,.mc-pseudo-checkbox .mc-checkbox-mixedmark{display:none;position:absolute;top:-1px;top:calc(-1 * var(--mc-checkbox-size-border-width, 1px));left:-1px;left:calc(-1 * var(--mc-checkbox-size-border-width, 1px))}.mc-pseudo-checkbox.mc-pseudo-checkbox-checked,.mc-pseudo-checkbox.mc-pseudo-checkbox-indeterminate{border-color:transparent}.mc-pseudo-checkbox.mc-checked .mc-checkbox-checkmark,.mc-pseudo-checkbox.mc-indeterminate .mc-checkbox-mixedmark{display:inline-block}.mc-pseudo-checkbox.mc-disabled{cursor:default}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
2270
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: McPseudoCheckbox, decorators: [{
952
+ /** @nocollapse */ McPseudoCheckbox.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: McPseudoCheckbox, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
953
+ /** @nocollapse */ McPseudoCheckbox.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.2", type: McPseudoCheckbox, selector: "mc-pseudo-checkbox", inputs: { color: "color", state: "state", disabled: "disabled" }, host: { properties: { "class.mc-indeterminate": "state === \"indeterminate\"", "class.mc-checked": "state === \"checked\"", "class.mc-disabled": "disabled" }, classAttribute: "mc-pseudo-checkbox" }, usesInheritance: true, ngImport: i0, template: "<i class=\"mc-checkbox-checkmark mc mc-check_16\"></i>\n<i class=\"mc-checkbox-mixedmark mc mc-minus_16\"></i>\n", styles: [".mc-pseudo-checkbox{position:relative;display:inline-block;box-sizing:border-box;width:var(--mc-checkbox-size-width, 16px);height:var(--mc-checkbox-size-width, 16px);border-radius:3px;border-width:var(--mc-checkbox-size-border-width, 1px);border-style:solid;cursor:pointer;vertical-align:middle;flex-shrink:0}.mc-pseudo-checkbox .mc-checkbox-checkmark,.mc-pseudo-checkbox .mc-checkbox-mixedmark{display:none;position:absolute;top:calc(-1 * var(--mc-checkbox-size-border-width, 1px));left:calc(-1 * var(--mc-checkbox-size-border-width, 1px))}.mc-pseudo-checkbox.mc-pseudo-checkbox-checked,.mc-pseudo-checkbox.mc-pseudo-checkbox-indeterminate{border-color:transparent}.mc-pseudo-checkbox.mc-checked .mc-checkbox-checkmark,.mc-pseudo-checkbox.mc-indeterminate .mc-checkbox-mixedmark{display:inline-block}.mc-pseudo-checkbox.mc-disabled{cursor:default}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
954
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: McPseudoCheckbox, decorators: [{
2271
955
  type: Component,
2272
956
  args: [{ selector: 'mc-pseudo-checkbox', host: {
2273
957
  class: 'mc-pseudo-checkbox',
2274
958
  '[class.mc-indeterminate]': 'state === "indeterminate"',
2275
959
  '[class.mc-checked]': 'state === "checked"',
2276
960
  '[class.mc-disabled]': 'disabled'
2277
- }, preserveWhitespaces: false, inputs: ['color'], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<i class=\"mc-checkbox-checkmark mc mc-check_16\"></i>\n<i class=\"mc-checkbox-mixedmark mc mc-minus_16\"></i>\n", styles: [".mc-pseudo-checkbox{position:relative;display:inline-block;box-sizing:border-box;width:16px;width:var(--mc-checkbox-size-width, 16px);height:16px;height:var(--mc-checkbox-size-width, 16px);border-radius:3px;border-width:1px;border-width:var(--mc-checkbox-size-border-width, 1px);border-style:solid;cursor:pointer;vertical-align:middle;flex-shrink:0}.mc-pseudo-checkbox .mc-checkbox-checkmark,.mc-pseudo-checkbox .mc-checkbox-mixedmark{display:none;position:absolute;top:-1px;top:calc(-1 * var(--mc-checkbox-size-border-width, 1px));left:-1px;left:calc(-1 * var(--mc-checkbox-size-border-width, 1px))}.mc-pseudo-checkbox.mc-pseudo-checkbox-checked,.mc-pseudo-checkbox.mc-pseudo-checkbox-indeterminate{border-color:transparent}.mc-pseudo-checkbox.mc-checked .mc-checkbox-checkmark,.mc-pseudo-checkbox.mc-indeterminate .mc-checkbox-mixedmark{display:inline-block}.mc-pseudo-checkbox.mc-disabled{cursor:default}\n"] }]
961
+ }, preserveWhitespaces: false, inputs: ['color'], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<i class=\"mc-checkbox-checkmark mc mc-check_16\"></i>\n<i class=\"mc-checkbox-mixedmark mc mc-minus_16\"></i>\n", styles: [".mc-pseudo-checkbox{position:relative;display:inline-block;box-sizing:border-box;width:var(--mc-checkbox-size-width, 16px);height:var(--mc-checkbox-size-width, 16px);border-radius:3px;border-width:var(--mc-checkbox-size-border-width, 1px);border-style:solid;cursor:pointer;vertical-align:middle;flex-shrink:0}.mc-pseudo-checkbox .mc-checkbox-checkmark,.mc-pseudo-checkbox .mc-checkbox-mixedmark{display:none;position:absolute;top:calc(-1 * var(--mc-checkbox-size-border-width, 1px));left:calc(-1 * var(--mc-checkbox-size-border-width, 1px))}.mc-pseudo-checkbox.mc-pseudo-checkbox-checked,.mc-pseudo-checkbox.mc-pseudo-checkbox-indeterminate{border-color:transparent}.mc-pseudo-checkbox.mc-checked .mc-checkbox-checkmark,.mc-pseudo-checkbox.mc-indeterminate .mc-checkbox-mixedmark{display:inline-block}.mc-pseudo-checkbox.mc-disabled{cursor:default}\n"] }]
2278
962
  }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { state: [{
2279
963
  type: Input
2280
964
  }], disabled: [{
2281
965
  type: Input
2282
966
  }] } });
2283
967
 
2284
- class McPseudoCheckboxModule {
2285
- }
2286
- /** @nocollapse */ McPseudoCheckboxModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: McPseudoCheckboxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2287
- /** @nocollapse */ McPseudoCheckboxModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.12", ngImport: i0, type: McPseudoCheckboxModule, declarations: [McPseudoCheckbox], imports: [CommonModule], exports: [McPseudoCheckbox] });
2288
- /** @nocollapse */ McPseudoCheckboxModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: McPseudoCheckboxModule, imports: [CommonModule] });
2289
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: McPseudoCheckboxModule, decorators: [{
2290
- type: NgModule,
2291
- args: [{
2292
- imports: [CommonModule],
2293
- exports: [McPseudoCheckbox],
2294
- declarations: [McPseudoCheckbox]
2295
- }]
2296
- }] });
2297
-
2298
- class McMeasureScrollbarService {
2299
- constructor(document) {
2300
- this.document = document;
2301
- this.scrollbarMeasure = {
2302
- position: 'absolute',
2303
- top: '-9999px',
2304
- width: '50px',
2305
- height: '50px',
2306
- overflow: 'scroll'
2307
- };
2308
- this.initScrollBarWidth();
2309
- }
2310
- get scrollBarWidth() {
2311
- if (this._scrollBarWidth) {
2312
- return this._scrollBarWidth;
2313
- }
2314
- this.initScrollBarWidth();
2315
- return this._scrollBarWidth;
2316
- }
2317
- initScrollBarWidth() {
2318
- const scrollDiv = this.document.createElement('div');
2319
- // tslint:disable-next-line
2320
- for (const scrollProp in this.scrollbarMeasure) {
2321
- if (this.scrollbarMeasure.hasOwnProperty(scrollProp)) {
2322
- scrollDiv.style[scrollProp] = this.scrollbarMeasure[scrollProp];
2323
- }
2324
- }
2325
- this.document.body.appendChild(scrollDiv);
2326
- const width = scrollDiv.offsetWidth - scrollDiv.clientWidth;
2327
- this.document.body.removeChild(scrollDiv);
2328
- this._scrollBarWidth = width;
2329
- }
2330
- }
2331
- /** @nocollapse */ McMeasureScrollbarService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: McMeasureScrollbarService, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });
2332
- /** @nocollapse */ McMeasureScrollbarService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: McMeasureScrollbarService, providedIn: 'root' });
2333
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: McMeasureScrollbarService, decorators: [{
2334
- type: Injectable,
2335
- args: [{
2336
- providedIn: 'root'
2337
- }]
2338
- }], ctorParameters: function () { return [{ type: undefined, decorators: [{
2339
- type: Inject,
2340
- args: [DOCUMENT]
2341
- }] }]; } });
2342
-
2343
- /** @docs-private */
2344
- class McOptgroupBase {
2345
- }
2346
- // tslint:disable-next-line: naming-convention
2347
- const McOptgroupMixinBase = mixinDisabled(McOptgroupBase);
2348
- let uniqueOptgroupIdCounter = 0;
2349
- /**
2350
- * Component that is used to group instances of `mc-option`.
2351
- */
2352
- class McOptgroup extends McOptgroupMixinBase {
2353
- constructor() {
2354
- super(...arguments);
2355
- /** Unique id for the underlying label. */
2356
- this.labelId = `mc-optgroup-label-${uniqueOptgroupIdCounter++}`;
2357
- }
2358
- }
2359
- /** @nocollapse */ McOptgroup.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: McOptgroup, deps: null, target: i0.ɵɵFactoryTarget.Component });
2360
- /** @nocollapse */ McOptgroup.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: McOptgroup, selector: "mc-optgroup", inputs: { disabled: "disabled", label: "label" }, host: { properties: { "class.mc-disabled": "disabled" }, classAttribute: "mc-optgroup" }, exportAs: ["mcOptgroup"], usesInheritance: true, ngImport: i0, template: "<label class=\"mc-optgroup-label\" [id]=\"labelId\">{{ label }}</label>\n<ng-content select=\"mc-option, mc-list-option, mc-timezone-option, ng-container\"></ng-content>\n", styles: [".mc-optgroup-label{padding-left:17px;padding-left:var(--mc-optgroup-size-padding-left, 17px);-webkit-user-select:none;user-select:none;cursor:default}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
2361
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: McOptgroup, decorators: [{
2362
- type: Component,
2363
- args: [{ selector: 'mc-optgroup', exportAs: 'mcOptgroup', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, inputs: ['disabled'], host: {
2364
- class: 'mc-optgroup',
2365
- '[class.mc-disabled]': 'disabled'
2366
- }, template: "<label class=\"mc-optgroup-label\" [id]=\"labelId\">{{ label }}</label>\n<ng-content select=\"mc-option, mc-list-option, mc-timezone-option, ng-container\"></ng-content>\n", styles: [".mc-optgroup-label{padding-left:17px;padding-left:var(--mc-optgroup-size-padding-left, 17px);-webkit-user-select:none;user-select:none;cursor:default}\n"] }]
2367
- }], propDecorators: { label: [{
2368
- type: Input
2369
- }] } });
2370
-
2371
968
  /**
2372
969
  * Option IDs need to be unique across components, so this counter exists outside of
2373
970
  * the component definition.
@@ -2542,9 +1139,9 @@ class McOption {
2542
1139
  this.onSelectionChange.emit(new McOptionSelectionChange(this, isUserInput));
2543
1140
  }
2544
1141
  }
2545
- /** @nocollapse */ McOption.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: McOption, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: MC_OPTION_PARENT_COMPONENT, optional: true }, { token: McOptgroup, optional: true }], target: i0.ɵɵFactoryTarget.Component });
2546
- /** @nocollapse */ McOption.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: McOption, selector: "mc-option", inputs: { value: "value", showCheckbox: "showCheckbox", disabled: "disabled" }, outputs: { onSelectionChange: "onSelectionChange" }, host: { listeners: { "click": "selectViaInteraction()", "keydown": "handleKeydown($event)" }, properties: { "attr.tabindex": "getTabIndex()", "class.mc-selected": "selected", "class.mc-option-multiple": "multiple", "class.mc-active": "active", "class.mc-disabled": "disabled", "id": "id" }, classAttribute: "mc-option" }, viewQueries: [{ propertyName: "textElement", first: true, predicate: ["mcTextElement"], descendants: true }], exportAs: ["mcOption"], ngImport: i0, template: "<mc-pseudo-checkbox\n *ngIf=\"showCheckbox\"\n [state]=\"selected ? 'checked' : 'unchecked'\"\n [disabled]=\"disabled\">\n</mc-pseudo-checkbox>\n\n<span #mcTextElement class=\"mc-option-text\"><ng-content></ng-content></span>\n\n<div class=\"mc-option-overlay\"></div>\n", styles: [".mc-option{display:flex;flex-direction:row;align-items:center;box-sizing:border-box;position:relative;max-width:100%;height:32px;height:var(--mc-option-size-height, 32px);border:2px solid transparent;border:var(--mc-option-size-border-width, 2px) solid transparent;cursor:pointer;outline:none;padding-left:12px;padding-left:var(--mc-option-size-horizontal-padding, 12px);padding-right:12px;padding-right:var(--mc-option-size-horizontal-padding, 12px);-webkit-tap-highlight-color:transparent}.mc-option.mc-disabled{cursor:default}.mc-option .mc-pseudo-checkbox{margin-right:8px}.mc-option .mc-option-overlay{position:absolute;top:-2px;top:calc(-1 * var(--mc-option-size-border-width, 2px));left:-2px;left:calc(-1 * var(--mc-option-size-border-width, 2px));right:-2px;right:calc(-1 * var(--mc-option-size-border-width, 2px));bottom:-2px;bottom:calc(-1 * var(--mc-option-size-border-width, 2px));pointer-events:none;border-radius:inherit}.mc-option-text{display:inline-block;flex-grow:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: McPseudoCheckbox, selector: "mc-pseudo-checkbox", inputs: ["color", "state", "disabled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
2547
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: McOption, decorators: [{
1142
+ /** @nocollapse */ McOption.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: McOption, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: MC_OPTION_PARENT_COMPONENT, optional: true }, { token: McOptgroup, optional: true }], target: i0.ɵɵFactoryTarget.Component });
1143
+ /** @nocollapse */ McOption.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.2", type: McOption, selector: "mc-option", inputs: { value: "value", showCheckbox: "showCheckbox", disabled: "disabled" }, outputs: { onSelectionChange: "onSelectionChange" }, host: { listeners: { "click": "selectViaInteraction()", "keydown": "handleKeydown($event)" }, properties: { "attr.tabindex": "getTabIndex()", "class.mc-selected": "selected", "class.mc-option-multiple": "multiple", "class.mc-active": "active", "class.mc-disabled": "disabled", "id": "id" }, classAttribute: "mc-option" }, viewQueries: [{ propertyName: "textElement", first: true, predicate: ["mcTextElement"], descendants: true }], exportAs: ["mcOption"], ngImport: i0, template: "<mc-pseudo-checkbox\n *ngIf=\"showCheckbox\"\n [state]=\"selected ? 'checked' : 'unchecked'\"\n [disabled]=\"disabled\">\n</mc-pseudo-checkbox>\n\n<span #mcTextElement class=\"mc-option-text\"><ng-content></ng-content></span>\n\n<div class=\"mc-option-overlay\"></div>\n", styles: [".mc-option{display:flex;flex-direction:row;align-items:center;box-sizing:border-box;position:relative;max-width:100%;height:var(--mc-option-size-height, 32px);border:var(--mc-option-size-border-width, 2px) solid transparent;cursor:pointer;outline:none;padding-left:var(--mc-option-size-horizontal-padding, 12px);padding-right:var(--mc-option-size-horizontal-padding, 12px);-webkit-tap-highlight-color:transparent}.mc-option.mc-disabled{cursor:default}.mc-option .mc-pseudo-checkbox{margin-right:8px}.mc-option .mc-option-overlay{position:absolute;top:calc(-1 * var(--mc-option-size-border-width, 2px));left:calc(-1 * var(--mc-option-size-border-width, 2px));right:calc(-1 * var(--mc-option-size-border-width, 2px));bottom:calc(-1 * var(--mc-option-size-border-width, 2px));pointer-events:none;border-radius:inherit}.mc-option-text{display:inline-block;flex-grow:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: McPseudoCheckbox, selector: "mc-pseudo-checkbox", inputs: ["color", "state", "disabled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
1144
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: McOption, decorators: [{
2548
1145
  type: Component,
2549
1146
  args: [{ selector: 'mc-option', exportAs: 'mcOption', host: {
2550
1147
  '[attr.tabindex]': 'getTabIndex()',
@@ -2556,7 +1153,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
2556
1153
  '[id]': 'id',
2557
1154
  '(click)': 'selectViaInteraction()',
2558
1155
  '(keydown)': 'handleKeydown($event)'
2559
- }, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<mc-pseudo-checkbox\n *ngIf=\"showCheckbox\"\n [state]=\"selected ? 'checked' : 'unchecked'\"\n [disabled]=\"disabled\">\n</mc-pseudo-checkbox>\n\n<span #mcTextElement class=\"mc-option-text\"><ng-content></ng-content></span>\n\n<div class=\"mc-option-overlay\"></div>\n", styles: [".mc-option{display:flex;flex-direction:row;align-items:center;box-sizing:border-box;position:relative;max-width:100%;height:32px;height:var(--mc-option-size-height, 32px);border:2px solid transparent;border:var(--mc-option-size-border-width, 2px) solid transparent;cursor:pointer;outline:none;padding-left:12px;padding-left:var(--mc-option-size-horizontal-padding, 12px);padding-right:12px;padding-right:var(--mc-option-size-horizontal-padding, 12px);-webkit-tap-highlight-color:transparent}.mc-option.mc-disabled{cursor:default}.mc-option .mc-pseudo-checkbox{margin-right:8px}.mc-option .mc-option-overlay{position:absolute;top:-2px;top:calc(-1 * var(--mc-option-size-border-width, 2px));left:-2px;left:calc(-1 * var(--mc-option-size-border-width, 2px));right:-2px;right:calc(-1 * var(--mc-option-size-border-width, 2px));bottom:-2px;bottom:calc(-1 * var(--mc-option-size-border-width, 2px));pointer-events:none;border-radius:inherit}.mc-option-text{display:inline-block;flex-grow:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}\n"] }]
1156
+ }, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<mc-pseudo-checkbox\n *ngIf=\"showCheckbox\"\n [state]=\"selected ? 'checked' : 'unchecked'\"\n [disabled]=\"disabled\">\n</mc-pseudo-checkbox>\n\n<span #mcTextElement class=\"mc-option-text\"><ng-content></ng-content></span>\n\n<div class=\"mc-option-overlay\"></div>\n", styles: [".mc-option{display:flex;flex-direction:row;align-items:center;box-sizing:border-box;position:relative;max-width:100%;height:var(--mc-option-size-height, 32px);border:var(--mc-option-size-border-width, 2px) solid transparent;cursor:pointer;outline:none;padding-left:var(--mc-option-size-horizontal-padding, 12px);padding-right:var(--mc-option-size-horizontal-padding, 12px);-webkit-tap-highlight-color:transparent}.mc-option.mc-disabled{cursor:default}.mc-option .mc-pseudo-checkbox{margin-right:8px}.mc-option .mc-option-overlay{position:absolute;top:calc(-1 * var(--mc-option-size-border-width, 2px));left:calc(-1 * var(--mc-option-size-border-width, 2px));right:calc(-1 * var(--mc-option-size-border-width, 2px));bottom:calc(-1 * var(--mc-option-size-border-width, 2px));pointer-events:none;border-radius:inherit}.mc-option-text{display:inline-block;flex-grow:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}\n"] }]
2560
1157
  }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: undefined, decorators: [{
2561
1158
  type: Optional
2562
1159
  }, {
@@ -2697,14 +1294,14 @@ class McOptionActionComponent extends McOptionActionMixinBase {
2697
1294
  setTimeout(() => this.option.tooltipTrigger.disabled = false);
2698
1295
  }
2699
1296
  }
2700
- /** @nocollapse */ McOptionActionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: McOptionActionComponent, deps: [{ token: i0.ElementRef }, { token: i1$1.FocusMonitor }, { token: MC_OPTION_ACTION_PARENT }], target: i0.ɵɵFactoryTarget.Component });
2701
- /** @nocollapse */ McOptionActionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: McOptionActionComponent, selector: "mc-option-action", inputs: { disabled: "disabled" }, host: { listeners: { "focus": "onFocus($event)", "blur": "onBlur()", "click": "onClick($event)", "keydown": "onKeyDown($event)" }, properties: { "class.mc-expanded": "false", "attr.disabled": "disabled || null", "attr.tabIndex": "-1" }, classAttribute: "mc-option-action" }, queries: [{ propertyName: "customIcon", first: true, predicate: ["customIcon"], descendants: true }], exportAs: ["mcOptionAction"], usesInheritance: true, ngImport: i0, template: `
1297
+ /** @nocollapse */ McOptionActionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: McOptionActionComponent, deps: [{ token: i0.ElementRef }, { token: i1$1.FocusMonitor }, { token: MC_OPTION_ACTION_PARENT }], target: i0.ɵɵFactoryTarget.Component });
1298
+ /** @nocollapse */ McOptionActionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.2", type: McOptionActionComponent, selector: "mc-option-action", inputs: { disabled: "disabled" }, host: { listeners: { "focus": "onFocus($event)", "blur": "onBlur()", "click": "onClick($event)", "keydown": "onKeyDown($event)" }, properties: { "class.mc-expanded": "false", "attr.disabled": "disabled || null", "attr.tabIndex": "-1" }, classAttribute: "mc-option-action" }, queries: [{ propertyName: "customIcon", first: true, predicate: ["customIcon"], descendants: true }], exportAs: ["mcOptionAction"], usesInheritance: true, ngImport: i0, template: `
2702
1299
  <ng-container [ngSwitch]="!!customIcon">
2703
1300
  <i class="mc mc-icon mc-ellipsis_16" *ngSwitchCase="false"></i>
2704
1301
  <ng-content select="[mc-icon]" *ngSwitchCase="true"></ng-content>
2705
1302
  </ng-container>
2706
- `, isInline: true, styles: [".mc-option-action{box-sizing:content-box;box-sizing:initial;position:relative;display:flex;align-items:center;justify-content:center;flex-shrink:0;margin-right:-2px;width:28px;height:100%;cursor:pointer;outline:none;border:2px solid transparent;background:transparent}.mc-option-action[disabled]{cursor:default}\n"], dependencies: [{ kind: "directive", type: i2.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i2.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
2707
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: McOptionActionComponent, decorators: [{
1303
+ `, isInline: true, styles: [".mc-option-action{box-sizing:unset;position:relative;display:flex;align-items:center;justify-content:center;flex-shrink:0;margin-right:-2px;width:28px;height:100%;cursor:pointer;outline:none;border:2px solid transparent;background:transparent}.mc-option-action[disabled]{cursor:default}\n"], dependencies: [{ kind: "directive", type: i2.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i2.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
1304
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: McOptionActionComponent, decorators: [{
2708
1305
  type: Component,
2709
1306
  args: [{ selector: 'mc-option-action', exportAs: 'mcOptionAction', template: `
2710
1307
  <ng-container [ngSwitch]="!!customIcon">
@@ -2720,7 +1317,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
2720
1317
  '(blur)': 'onBlur()',
2721
1318
  '(click)': 'onClick($event)',
2722
1319
  '(keydown)': 'onKeyDown($event)'
2723
- }, inputs: ['disabled'], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, styles: [".mc-option-action{box-sizing:content-box;box-sizing:initial;position:relative;display:flex;align-items:center;justify-content:center;flex-shrink:0;margin-right:-2px;width:28px;height:100%;cursor:pointer;outline:none;border:2px solid transparent;background:transparent}.mc-option-action[disabled]{cursor:default}\n"] }]
1320
+ }, inputs: ['disabled'], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, styles: [".mc-option-action{box-sizing:unset;position:relative;display:flex;align-items:center;justify-content:center;flex-shrink:0;margin-right:-2px;width:28px;height:100%;cursor:pointer;outline:none;border:2px solid transparent;background:transparent}.mc-option-action[disabled]{cursor:default}\n"] }]
2724
1321
  }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1$1.FocusMonitor }, { type: undefined, decorators: [{
2725
1322
  type: Inject,
2726
1323
  args: [MC_OPTION_ACTION_PARENT]
@@ -2729,12 +1326,32 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
2729
1326
  args: ['customIcon']
2730
1327
  }] } });
2731
1328
 
1329
+ var MultipleMode;
1330
+ (function (MultipleMode) {
1331
+ MultipleMode["CHECKBOX"] = "checkbox";
1332
+ MultipleMode["KEYBOARD"] = "keyboard";
1333
+ })(MultipleMode || (MultipleMode = {}));
1334
+
1335
+ class McPseudoCheckboxModule {
1336
+ }
1337
+ /** @nocollapse */ McPseudoCheckboxModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: McPseudoCheckboxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1338
+ /** @nocollapse */ McPseudoCheckboxModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.2", ngImport: i0, type: McPseudoCheckboxModule, declarations: [McPseudoCheckbox], imports: [CommonModule], exports: [McPseudoCheckbox] });
1339
+ /** @nocollapse */ McPseudoCheckboxModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: McPseudoCheckboxModule, imports: [CommonModule] });
1340
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: McPseudoCheckboxModule, decorators: [{
1341
+ type: NgModule,
1342
+ args: [{
1343
+ imports: [CommonModule],
1344
+ exports: [McPseudoCheckbox],
1345
+ declarations: [McPseudoCheckbox]
1346
+ }]
1347
+ }] });
1348
+
2732
1349
  class McOptionModule {
2733
1350
  }
2734
- /** @nocollapse */ McOptionModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: McOptionModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2735
- /** @nocollapse */ McOptionModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.12", ngImport: i0, type: McOptionModule, declarations: [McOption, McOptgroup, McOptionActionComponent], imports: [CommonModule, McPseudoCheckboxModule], exports: [McOption, McOptgroup, McOptionActionComponent] });
2736
- /** @nocollapse */ McOptionModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: McOptionModule, imports: [CommonModule, McPseudoCheckboxModule] });
2737
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: McOptionModule, decorators: [{
1351
+ /** @nocollapse */ McOptionModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: McOptionModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1352
+ /** @nocollapse */ McOptionModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.2", ngImport: i0, type: McOptionModule, declarations: [McOption, McOptgroup, McOptionActionComponent], imports: [CommonModule, McPseudoCheckboxModule], exports: [McOption, McOptgroup, McOptionActionComponent] });
1353
+ /** @nocollapse */ McOptionModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: McOptionModule, imports: [CommonModule, McPseudoCheckboxModule] });
1354
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: McOptionModule, decorators: [{
2738
1355
  type: NgModule,
2739
1356
  args: [{
2740
1357
  imports: [CommonModule, McPseudoCheckboxModule],
@@ -2743,90 +1360,249 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
2743
1360
  }]
2744
1361
  }] });
2745
1362
 
2746
- class McFormElement {
2747
- constructor(element) {
2748
- this.element = element;
2749
- this.margin = false;
2750
- this.isRow = false;
2751
- this.isFieldSet = false;
2752
- this.hasLegend = false;
2753
- this.isHorizontal = false;
1363
+ const POSITION_MAP = {
1364
+ top: {
1365
+ originX: 'center',
1366
+ originY: 'top',
1367
+ overlayX: 'center',
1368
+ overlayY: 'bottom'
1369
+ },
1370
+ topCenter: {
1371
+ originX: 'center',
1372
+ originY: 'top',
1373
+ overlayX: 'center',
1374
+ overlayY: 'bottom'
1375
+ },
1376
+ topLeft: {
1377
+ originX: 'start',
1378
+ originY: 'top',
1379
+ overlayX: 'start',
1380
+ overlayY: 'bottom'
1381
+ },
1382
+ topRight: {
1383
+ originX: 'end',
1384
+ originY: 'top',
1385
+ overlayX: 'end',
1386
+ overlayY: 'bottom'
1387
+ },
1388
+ right: {
1389
+ originX: 'end',
1390
+ originY: 'center',
1391
+ overlayX: 'start',
1392
+ overlayY: 'center'
1393
+ },
1394
+ rightTop: {
1395
+ originX: 'end',
1396
+ originY: 'top',
1397
+ overlayX: 'start',
1398
+ overlayY: 'top'
1399
+ },
1400
+ rightBottom: {
1401
+ originX: 'end',
1402
+ originY: 'bottom',
1403
+ overlayX: 'start',
1404
+ overlayY: 'bottom'
1405
+ },
1406
+ bottom: {
1407
+ originX: 'center',
1408
+ originY: 'bottom',
1409
+ overlayX: 'center',
1410
+ overlayY: 'top'
1411
+ },
1412
+ bottomCenter: {
1413
+ originX: 'center',
1414
+ originY: 'bottom',
1415
+ overlayX: 'center',
1416
+ overlayY: 'top'
1417
+ },
1418
+ bottomLeft: {
1419
+ originX: 'start',
1420
+ originY: 'bottom',
1421
+ overlayX: 'start',
1422
+ overlayY: 'top'
1423
+ },
1424
+ bottomRight: {
1425
+ originX: 'end',
1426
+ originY: 'bottom',
1427
+ overlayX: 'end',
1428
+ overlayY: 'top'
1429
+ },
1430
+ left: {
1431
+ originX: 'start',
1432
+ originY: 'center',
1433
+ overlayX: 'end',
1434
+ overlayY: 'center'
1435
+ },
1436
+ leftTop: {
1437
+ originX: 'start',
1438
+ originY: 'top',
1439
+ overlayX: 'end',
1440
+ overlayY: 'top'
1441
+ },
1442
+ leftBottom: {
1443
+ originX: 'start',
1444
+ originY: 'bottom',
1445
+ overlayX: 'end',
1446
+ overlayY: 'bottom'
2754
1447
  }
2755
- ngAfterContentInit() {
2756
- const classList = this.element.nativeElement.classList;
2757
- this.isRow = classList.contains('mc-form__row');
2758
- this.isHorizontal = classList.contains('mc-horizontal');
2759
- this.isFieldSet = classList.contains('mc-form__fieldset');
2760
- if (this.isFieldSet && this.element.nativeElement.firstElementChild) {
2761
- this.hasLegend = this.element.nativeElement.firstElementChild.classList.contains('mc-form__legend');
2762
- }
1448
+ };
1449
+ const EXTENDED_OVERLAY_POSITIONS = objectValues([
1450
+ POSITION_MAP.top,
1451
+ POSITION_MAP.topLeft,
1452
+ POSITION_MAP.topRight,
1453
+ POSITION_MAP.right,
1454
+ POSITION_MAP.rightTop,
1455
+ POSITION_MAP.rightBottom,
1456
+ POSITION_MAP.bottom,
1457
+ POSITION_MAP.bottomLeft,
1458
+ POSITION_MAP.bottomRight,
1459
+ POSITION_MAP.left,
1460
+ POSITION_MAP.leftTop,
1461
+ POSITION_MAP.leftBottom
1462
+ ]);
1463
+ const TOP_POSITION_PRIORITY = objectValues([
1464
+ POSITION_MAP.top,
1465
+ POSITION_MAP.bottom,
1466
+ POSITION_MAP.rightBottom,
1467
+ POSITION_MAP.leftBottom,
1468
+ POSITION_MAP.bottomLeft,
1469
+ POSITION_MAP.bottomRight
1470
+ ]);
1471
+ const BOTTOM_POSITION_PRIORITY = objectValues([
1472
+ POSITION_MAP.bottom,
1473
+ POSITION_MAP.top,
1474
+ POSITION_MAP.topLeft,
1475
+ POSITION_MAP.topRight,
1476
+ POSITION_MAP.rightBottom,
1477
+ POSITION_MAP.leftBottom
1478
+ ]);
1479
+ const RIGHT_POSITION_PRIORITY = objectValues([
1480
+ POSITION_MAP.right,
1481
+ POSITION_MAP.left,
1482
+ POSITION_MAP.leftTop,
1483
+ POSITION_MAP.leftBottom,
1484
+ POSITION_MAP.top,
1485
+ POSITION_MAP.bottom
1486
+ ]);
1487
+ const LEFT_POSITION_PRIORITY = objectValues([
1488
+ POSITION_MAP.left,
1489
+ POSITION_MAP.right,
1490
+ POSITION_MAP.rightTop,
1491
+ POSITION_MAP.rightBottom,
1492
+ POSITION_MAP.top,
1493
+ POSITION_MAP.bottom
1494
+ ]);
1495
+ const RIGHT_TOP_POSITION_PRIORITY = objectValues([
1496
+ POSITION_MAP.rightTop,
1497
+ POSITION_MAP.leftTop,
1498
+ POSITION_MAP.left,
1499
+ POSITION_MAP.leftBottom,
1500
+ POSITION_MAP.topLeft,
1501
+ POSITION_MAP.bottomLeft
1502
+ ]);
1503
+ const RIGHT_BOTTOM_POSITION_PRIORITY = objectValues([
1504
+ POSITION_MAP.rightBottom,
1505
+ POSITION_MAP.leftBottom,
1506
+ POSITION_MAP.left,
1507
+ POSITION_MAP.leftTop,
1508
+ POSITION_MAP.topLeft,
1509
+ POSITION_MAP.bottomLeft
1510
+ ]);
1511
+ const LEFT_TOP_POSITION_PRIORITY = objectValues([
1512
+ POSITION_MAP.leftTop,
1513
+ POSITION_MAP.rightTop,
1514
+ POSITION_MAP.right,
1515
+ POSITION_MAP.rightBottom,
1516
+ POSITION_MAP.topRight,
1517
+ POSITION_MAP.bottomRight
1518
+ ]);
1519
+ const LEFT_BOTTOM_POSITION_PRIORITY = objectValues([
1520
+ POSITION_MAP.leftBottom,
1521
+ POSITION_MAP.rightBottom,
1522
+ POSITION_MAP.right,
1523
+ POSITION_MAP.rightTop,
1524
+ POSITION_MAP.topRight,
1525
+ POSITION_MAP.bottomRight
1526
+ ]);
1527
+ const TOP_LEFT_POSITION_PRIORITY = objectValues([
1528
+ POSITION_MAP.topLeft,
1529
+ POSITION_MAP.topRight,
1530
+ POSITION_MAP.bottomLeft,
1531
+ POSITION_MAP.bottom,
1532
+ POSITION_MAP.bottomRight,
1533
+ POSITION_MAP.leftBottom,
1534
+ POSITION_MAP.rightBottom
1535
+ ]);
1536
+ const TOP_RIGHT_POSITION_PRIORITY = objectValues([
1537
+ POSITION_MAP.topRight,
1538
+ POSITION_MAP.topLeft,
1539
+ POSITION_MAP.bottomRight,
1540
+ POSITION_MAP.bottom,
1541
+ POSITION_MAP.bottomLeft,
1542
+ POSITION_MAP.leftBottom,
1543
+ POSITION_MAP.rightBottom
1544
+ ]);
1545
+ const BOTTOM_RIGHT_POSITION_PRIORITY = objectValues([
1546
+ POSITION_MAP.bottomRight,
1547
+ POSITION_MAP.bottomLeft,
1548
+ POSITION_MAP.topRight,
1549
+ POSITION_MAP.top,
1550
+ POSITION_MAP.topLeft,
1551
+ POSITION_MAP.leftTop,
1552
+ POSITION_MAP.rightTop
1553
+ ]);
1554
+ const BOTTOM_LEFT_POSITION_PRIORITY = objectValues([
1555
+ POSITION_MAP.bottomLeft,
1556
+ POSITION_MAP.bottomRight,
1557
+ POSITION_MAP.topLeft,
1558
+ POSITION_MAP.top,
1559
+ POSITION_MAP.topRight,
1560
+ POSITION_MAP.rightTop,
1561
+ POSITION_MAP.leftTop
1562
+ ]);
1563
+ const POSITION_PRIORITY_STRATEGY = {
1564
+ top: TOP_POSITION_PRIORITY,
1565
+ topLeft: TOP_LEFT_POSITION_PRIORITY,
1566
+ topRight: TOP_RIGHT_POSITION_PRIORITY,
1567
+ bottom: BOTTOM_POSITION_PRIORITY,
1568
+ bottomLeft: BOTTOM_LEFT_POSITION_PRIORITY,
1569
+ bottomRight: BOTTOM_RIGHT_POSITION_PRIORITY,
1570
+ left: LEFT_POSITION_PRIORITY,
1571
+ leftTop: LEFT_TOP_POSITION_PRIORITY,
1572
+ leftBottom: LEFT_BOTTOM_POSITION_PRIORITY,
1573
+ right: RIGHT_POSITION_PRIORITY,
1574
+ rightTop: RIGHT_TOP_POSITION_PRIORITY,
1575
+ rightBottom: RIGHT_BOTTOM_POSITION_PRIORITY
1576
+ };
1577
+ const POSITION_TO_CSS_MAP = {
1578
+ top: 'top',
1579
+ topLeft: 'top-left',
1580
+ topRight: 'top-right',
1581
+ right: 'right',
1582
+ rightTop: 'right-top',
1583
+ rightBottom: 'right-bottom',
1584
+ left: 'left',
1585
+ leftTop: 'left-top',
1586
+ leftBottom: 'left-bottom',
1587
+ bottom: 'bottom',
1588
+ bottomLeft: 'bottom-left',
1589
+ bottomRight: 'bottom-right'
1590
+ };
1591
+ function arrayMap(array, iteratee) {
1592
+ let index = -1;
1593
+ const length = array === null ? 0 : array.length;
1594
+ const result = Array(length);
1595
+ while (++index < length) {
1596
+ result[index] = iteratee(array[index], index, array);
2763
1597
  }
1598
+ return result;
2764
1599
  }
2765
- /** @nocollapse */ McFormElement.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: McFormElement, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
2766
- /** @nocollapse */ McFormElement.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.12", type: McFormElement, selector: ".mc-form__row, .mc-form__fieldset, .mc-form__legend", host: { properties: { "class.mc-form-row_margin": "margin" } }, queries: [{ propertyName: "elements", predicate: McFormElement }], exportAs: ["mcFormElement"], ngImport: i0 });
2767
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: McFormElement, decorators: [{
2768
- type: Directive,
2769
- args: [{
2770
- selector: '.mc-form__row, .mc-form__fieldset, .mc-form__legend',
2771
- exportAs: 'mcFormElement',
2772
- host: {
2773
- '[class.mc-form-row_margin]': 'margin'
2774
- }
2775
- }]
2776
- }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { elements: [{
2777
- type: ContentChildren,
2778
- args: [McFormElement]
2779
- }] } });
2780
- class McForm {
2781
- ngAfterContentInit() {
2782
- this.handleElements(this.elements);
2783
- }
2784
- handleElements(elements) {
2785
- elements.forEach((element, index) => {
2786
- const nextElement = elements.get(index + 1);
2787
- if (element.isFieldSet && !element.isHorizontal) {
2788
- this.handleElements(element.elements);
2789
- }
2790
- element.margin = !!(nextElement && !nextElement.hasLegend);
2791
- });
2792
- }
1600
+ function baseValues(object, props) {
1601
+ return arrayMap(props, (key) => object[key]);
2793
1602
  }
2794
- /** @nocollapse */ McForm.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: McForm, deps: [], target: i0.ɵɵFactoryTarget.Directive });
2795
- /** @nocollapse */ McForm.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.12", type: McForm, selector: ".mc-form-vertical, .mc-form-horizontal", host: { classAttribute: "mc-form" }, queries: [{ propertyName: "elements", predicate: McFormElement }], exportAs: ["mcForm"], ngImport: i0 });
2796
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: McForm, decorators: [{
2797
- type: Directive,
2798
- args: [{
2799
- selector: '.mc-form-vertical, .mc-form-horizontal',
2800
- exportAs: 'mcForm',
2801
- host: {
2802
- class: 'mc-form'
2803
- }
2804
- }]
2805
- }], propDecorators: { elements: [{
2806
- type: ContentChildren,
2807
- args: [McFormElement]
2808
- }] } });
2809
-
2810
- class McFormsModule {
1603
+ function objectValues(object) {
1604
+ return object === null ? [] : baseValues(object, Object.keys(object));
2811
1605
  }
2812
- /** @nocollapse */ McFormsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: McFormsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2813
- /** @nocollapse */ McFormsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.12", ngImport: i0, type: McFormsModule, declarations: [McForm,
2814
- McFormElement], exports: [McForm,
2815
- McFormElement] });
2816
- /** @nocollapse */ McFormsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: McFormsModule });
2817
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: McFormsModule, decorators: [{
2818
- type: NgModule,
2819
- args: [{
2820
- exports: [
2821
- McForm,
2822
- McFormElement
2823
- ],
2824
- declarations: [
2825
- McForm,
2826
- McFormElement
2827
- ]
2828
- }]
2829
- }] });
2830
1606
 
2831
1607
  var PopUpPlacements;
2832
1608
  (function (PopUpPlacements) {
@@ -2946,9 +1722,9 @@ class McPopUp {
2946
1722
  }
2947
1723
  }
2948
1724
  }
2949
- /** @nocollapse */ McPopUp.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: McPopUp, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });
2950
- /** @nocollapse */ McPopUp.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.12", type: McPopUp, ngImport: i0 });
2951
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: McPopUp, decorators: [{
1725
+ /** @nocollapse */ McPopUp.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: McPopUp, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });
1726
+ /** @nocollapse */ McPopUp.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.2", type: McPopUp, ngImport: i0 });
1727
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: McPopUp, decorators: [{
2952
1728
  type: Directive
2953
1729
  }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; } });
2954
1730
 
@@ -3179,15 +1955,124 @@ class McPopUpTrigger {
3179
1955
  });
3180
1956
  }
3181
1957
  }
3182
- /** @nocollapse */ McPopUpTrigger.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: McPopUpTrigger, deps: "invalid", target: i0.ɵɵFactoryTarget.Directive });
3183
- /** @nocollapse */ McPopUpTrigger.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.12", type: McPopUpTrigger, ngImport: i0 });
3184
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: McPopUpTrigger, decorators: [{
1958
+ /** @nocollapse */ McPopUpTrigger.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: McPopUpTrigger, deps: "invalid", target: i0.ɵɵFactoryTarget.Directive });
1959
+ /** @nocollapse */ McPopUpTrigger.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.2", type: McPopUpTrigger, ngImport: i0 });
1960
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: McPopUpTrigger, decorators: [{
3185
1961
  type: Directive
3186
1962
  }], ctorParameters: function () { return [{ type: i1$2.Overlay }, { type: i0.ElementRef }, { type: i0.NgZone }, { type: i1$2.ScrollDispatcher }, { type: i0.ViewContainerRef }, { type: undefined }, { type: i2$1.Directionality }]; } });
3187
1963
 
1964
+ const selectEvents = 'selectEvents';
1965
+
1966
+ /**
1967
+ * Returns an exception to be thrown when attempting to change a select's `multiple` option
1968
+ * after initialization.
1969
+ * @docs-private
1970
+ */
1971
+ function getMcSelectDynamicMultipleError() {
1972
+ return Error('Cannot change `multiple` mode of select after initialization.');
1973
+ }
1974
+ /**
1975
+ * Returns an exception to be thrown when attempting to assign a non-array value to a select
1976
+ * in `multiple` mode. Note that `undefined` and `null` are still valid values to allow for
1977
+ * resetting the value.
1978
+ * @docs-private
1979
+ */
1980
+ function getMcSelectNonArrayValueError() {
1981
+ return Error('Value must be an array in multiple-selection mode.');
1982
+ }
1983
+ /**
1984
+ * Returns an exception to be thrown when assigning a non-function value to the comparator
1985
+ * used to determine if a value corresponds to an option. Note that whether the function
1986
+ * actually takes two values and returns a boolean is not checked.
1987
+ */
1988
+ function getMcSelectNonFunctionValueError() {
1989
+ return Error('`compareWith` must be a function.');
1990
+ }
1991
+
1992
+ /** The max height of the select's overlay panel */
1993
+ const SELECT_PANEL_MAX_HEIGHT = 224;
1994
+ /** The panel's padding on the x-axis */
1995
+ const SELECT_PANEL_PADDING_X = 1;
1996
+ /** The panel's x axis padding if it is indented (e.g. there is an option group). */
1997
+ /* tslint:disable-next-line:no-magic-numbers */
1998
+ const SELECT_PANEL_INDENT_PADDING_X = SELECT_PANEL_PADDING_X * 2;
1999
+ /**
2000
+ * The select panel will only "fit" inside the viewport if it is positioned at
2001
+ * this value or more away from the viewport boundary.
2002
+ */
2003
+ const SELECT_PANEL_VIEWPORT_PADDING = 8;
2004
+ /** Injection token that determines the scroll handling while a select is open. */
2005
+ const MC_SELECT_SCROLL_STRATEGY = new InjectionToken('mc-select-scroll-strategy');
2006
+ /** @docs-private */
2007
+ function mcSelectScrollStrategyProviderFactory(overlay) {
2008
+ return () => overlay.scrollStrategies.reposition();
2009
+ }
2010
+ /** @docs-private */
2011
+ const MC_SELECT_SCROLL_STRATEGY_PROVIDER = {
2012
+ provide: MC_SELECT_SCROLL_STRATEGY,
2013
+ deps: [Overlay],
2014
+ useFactory: mcSelectScrollStrategyProviderFactory
2015
+ };
2016
+
2017
+ class McMeasureScrollbarService {
2018
+ constructor(document) {
2019
+ this.document = document;
2020
+ this.scrollbarMeasure = {
2021
+ position: 'absolute',
2022
+ top: '-9999px',
2023
+ width: '50px',
2024
+ height: '50px',
2025
+ overflow: 'scroll'
2026
+ };
2027
+ this.initScrollBarWidth();
2028
+ }
2029
+ get scrollBarWidth() {
2030
+ if (this._scrollBarWidth) {
2031
+ return this._scrollBarWidth;
2032
+ }
2033
+ this.initScrollBarWidth();
2034
+ return this._scrollBarWidth;
2035
+ }
2036
+ initScrollBarWidth() {
2037
+ const scrollDiv = this.document.createElement('div');
2038
+ // tslint:disable-next-line
2039
+ for (const scrollProp in this.scrollbarMeasure) {
2040
+ if (this.scrollbarMeasure.hasOwnProperty(scrollProp)) {
2041
+ scrollDiv.style[scrollProp] = this.scrollbarMeasure[scrollProp];
2042
+ }
2043
+ }
2044
+ this.document.body.appendChild(scrollDiv);
2045
+ const width = scrollDiv.offsetWidth - scrollDiv.clientWidth;
2046
+ this.document.body.removeChild(scrollDiv);
2047
+ this._scrollBarWidth = width;
2048
+ }
2049
+ }
2050
+ /** @nocollapse */ McMeasureScrollbarService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: McMeasureScrollbarService, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });
2051
+ /** @nocollapse */ McMeasureScrollbarService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: McMeasureScrollbarService, providedIn: 'root' });
2052
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: McMeasureScrollbarService, decorators: [{
2053
+ type: Injectable,
2054
+ args: [{
2055
+ providedIn: 'root'
2056
+ }]
2057
+ }], ctorParameters: function () { return [{ type: undefined, decorators: [{
2058
+ type: Inject,
2059
+ args: [DOCUMENT]
2060
+ }] }]; } });
2061
+
2062
+ function isBoolean(val) { return typeof val === 'boolean'; }
2063
+ function toBoolean(value) {
2064
+ return value != null && `${value}` !== 'false';
2065
+ }
2066
+
2067
+ const validationTooltipShowDelay = 10;
2068
+ const validationTooltipHideDelay = 3000;
2069
+ const MC_VALIDATION = new InjectionToken('McUseValidation', { factory: () => ({ useValidation: true }) });
2070
+
2071
+ const VERSION = new Version('15.0.0+sha-e73ad01');
2072
+
3188
2073
  /**
3189
2074
  * Generated bundle index. Do not edit.
3190
2075
  */
3191
2076
 
3192
- export { AbsoluteDateFormatterPipe, AbsoluteDateShortFormatterPipe, AbsoluteDateTimeFormatterPipe, AbsoluteShortDateTimeFormatterPipe, AnimationCurves, BOTTOM_LEFT_POSITION_PRIORITY, BOTTOM_POSITION_PRIORITY, BOTTOM_RIGHT_POSITION_PRIORITY, DEFAULT_MC_LOCALE_ID, DateFormatter, EXTENDED_OVERLAY_POSITIONS, ErrorStateMatcher, LEFT_BOTTOM_POSITION_PRIORITY, LEFT_POSITION_PRIORITY, LEFT_TOP_POSITION_PRIORITY, MC_LABEL_GLOBAL_OPTIONS, MC_LOCALE_ID, MC_NUMBER_FORMATTER_DEFAULT_OPTIONS, MC_NUMBER_FORMATTER_OPTIONS, MC_OPTION_ACTION_PARENT, MC_OPTION_PARENT_COMPONENT, MC_SANITY_CHECKS, MC_SELECT_SCROLL_STRATEGY, MC_SELECT_SCROLL_STRATEGY_PROVIDER, MC_VALIDATION, McCommonModule, McDecimalPipe, McForm, McFormElement, McFormattersModule, McFormsModule, McHighlightModule, McHighlightPipe, McLine, McLineModule, McLineSetter, McMeasureScrollbarService, McOptgroup, McOptgroupBase, McOptgroupMixinBase, McOption, McOptionActionBase, McOptionActionComponent, McOptionActionMixinBase, McOptionModule, McOptionSelectionChange, McPopUp, McPopUpTrigger, McPseudoCheckbox, McPseudoCheckboxBase, McPseudoCheckboxMixinBase, McPseudoCheckboxModule, MultipleMode, NUMBER_FORMAT_REGEXP, POSITION_MAP, POSITION_PRIORITY_STRATEGY, POSITION_TO_CSS_MAP, PopUpPlacements, PopUpSizes, PopUpTriggers, PopUpVisibility, RIGHT_BOTTOM_POSITION_PRIORITY, RIGHT_POSITION_PRIORITY, RIGHT_TOP_POSITION_PRIORITY, RangeDateFormatterPipe, RangeDateTimeFormatterPipe, RangeMiddleDateTimeFormatterPipe, RangeShortDateFormatterPipe, RangeShortDateTimeFormatterPipe, RelativeDateFormatterPipe, RelativeDateTimeFormatterPipe, RelativeShortDateFormatterPipe, RelativeShortDateTimeFormatterPipe, SELECT_PANEL_INDENT_PADDING_X, SELECT_PANEL_MAX_HEIGHT, SELECT_PANEL_PADDING_X, SELECT_PANEL_VIEWPORT_PADDING, ShowOnDirtyErrorStateMatcher, TOP_LEFT_POSITION_PRIORITY, TOP_POSITION_PRIORITY, TOP_RIGHT_POSITION_PRIORITY, ThemePalette, VERSION, countGroupLabelsBeforeOption, escapeRegExp, fadeAnimation, getMcSelectDynamicMultipleError, getMcSelectNonArrayValueError, getMcSelectNonFunctionValueError, getOptionScrollPosition, isBoolean, mcSelectAnimations, mcSelectScrollStrategyProviderFactory, mixinColor, mixinDisabled, mixinErrorState, mixinTabIndex, selectEvents, toBoolean, validationTooltipHideDelay, validationTooltipShowDelay };
2077
+ export { AbsoluteDateFormatterPipe, AbsoluteDateShortFormatterPipe, AbsoluteDateTimeFormatterPipe, AbsoluteShortDateTimeFormatterPipe, AnimationCurves, BOTTOM_LEFT_POSITION_PRIORITY, BOTTOM_POSITION_PRIORITY, BOTTOM_RIGHT_POSITION_PRIORITY, DEFAULT_MC_LOCALE_ID, DateAdapter, DateFormatter, EXTENDED_OVERLAY_POSITIONS, ErrorStateMatcher, LEFT_BOTTOM_POSITION_PRIORITY, LEFT_POSITION_PRIORITY, LEFT_TOP_POSITION_PRIORITY, MC_DATE_FORMATS, MC_DATE_LOCALE, MC_DATE_LOCALE_FACTORY, MC_LABEL_GLOBAL_OPTIONS, MC_LOCALE_ID, MC_NUMBER_FORMATTER_DEFAULT_OPTIONS, MC_NUMBER_FORMATTER_OPTIONS, MC_OPTION_ACTION_PARENT, MC_OPTION_PARENT_COMPONENT, MC_SANITY_CHECKS, MC_SELECT_SCROLL_STRATEGY, MC_SELECT_SCROLL_STRATEGY_PROVIDER, MC_VALIDATION, McCommonModule, McDecimalPipe, McForm, McFormElement, McFormattersModule, McFormsModule, McHighlightModule, McHighlightPipe, McLine, McLineModule, McLineSetter, McMeasureScrollbarService, McOptgroup, McOptgroupBase, McOptgroupMixinBase, McOption, McOptionActionBase, McOptionActionComponent, McOptionActionMixinBase, McOptionModule, McOptionSelectionChange, McPopUp, McPopUpTrigger, McPseudoCheckbox, McPseudoCheckboxBase, McPseudoCheckboxMixinBase, McPseudoCheckboxModule, MultipleMode, NUMBER_FORMAT_REGEXP, POSITION_MAP, POSITION_PRIORITY_STRATEGY, POSITION_TO_CSS_MAP, PopUpPlacements, PopUpSizes, PopUpTriggers, PopUpVisibility, RIGHT_BOTTOM_POSITION_PRIORITY, RIGHT_POSITION_PRIORITY, RIGHT_TOP_POSITION_PRIORITY, RangeDateFormatterPipe, RangeDateTimeFormatterPipe, RangeMiddleDateTimeFormatterPipe, RangeShortDateFormatterPipe, RangeShortDateTimeFormatterPipe, RelativeDateFormatterPipe, RelativeDateTimeFormatterPipe, RelativeShortDateFormatterPipe, RelativeShortDateTimeFormatterPipe, SELECT_PANEL_INDENT_PADDING_X, SELECT_PANEL_MAX_HEIGHT, SELECT_PANEL_PADDING_X, SELECT_PANEL_VIEWPORT_PADDING, ShowOnDirtyErrorStateMatcher, TOP_LEFT_POSITION_PRIORITY, TOP_POSITION_PRIORITY, TOP_RIGHT_POSITION_PRIORITY, ThemePalette, VERSION, countGroupLabelsBeforeOption, escapeRegExp, fadeAnimation, getMcSelectDynamicMultipleError, getMcSelectNonArrayValueError, getMcSelectNonFunctionValueError, getOptionScrollPosition, isBoolean, mcSelectAnimations, mcSelectScrollStrategyProviderFactory, mixinColor, mixinDisabled, mixinErrorState, mixinTabIndex, selectEvents, toBoolean, validationTooltipHideDelay, validationTooltipShowDelay };
3193
2078
  //# sourceMappingURL=ptsecurity-mosaic-core.mjs.map