@ptsecurity/mosaic 12.1.0 → 13.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (731) hide show
  1. package/_theming.scss +113 -66
  2. package/_visual.scss +11 -9
  3. package/autocomplete/README.md +0 -0
  4. package/autocomplete/package.json +5 -5
  5. package/button/README.md +0 -0
  6. package/button/button.component.d.ts +17 -14
  7. package/button/button.module.d.ts +1 -1
  8. package/button/package.json +5 -5
  9. package/button-toggle/README.md +0 -0
  10. package/button-toggle/package.json +5 -5
  11. package/card/README.md +0 -0
  12. package/card/package.json +5 -5
  13. package/checkbox/README.md +1 -0
  14. package/checkbox/package.json +5 -5
  15. package/core/formatters/date/formatter.d.ts +4 -4
  16. package/core/formatters/date/templates/en-US.d.ts +8 -8
  17. package/core/formatters/date/templates/ru-RU.d.ts +8 -8
  18. package/core/package.json +5 -5
  19. package/core/pop-up/pop-up-trigger.d.ts +9 -12
  20. package/datepicker/README.md +0 -0
  21. package/datepicker/package.json +5 -5
  22. package/design-tokens/package.json +5 -5
  23. package/design-tokens/style-dictionary/build.js +6 -0
  24. package/design-tokens/style-dictionary/configs/index.js +2 -1
  25. package/design-tokens/tokens/components/navbar.json5 +12 -9
  26. package/design-tokens/tokens.d.ts +11 -9
  27. package/divider/README.md +0 -0
  28. package/divider/package.json +5 -5
  29. package/dropdown/dropdown-item.component.d.ts +1 -0
  30. package/dropdown/package.json +5 -5
  31. package/{esm2015/autocomplete/autocomplete-origin.directive.js → esm2020/autocomplete/autocomplete-origin.directive.mjs} +4 -4
  32. package/{esm2015/autocomplete/autocomplete-trigger.directive.js → esm2020/autocomplete/autocomplete-trigger.directive.mjs} +4 -4
  33. package/esm2020/autocomplete/autocomplete.component.mjs +154 -0
  34. package/{esm2015/autocomplete/autocomplete.module.js → esm2020/autocomplete/autocomplete.module.mjs} +5 -5
  35. package/{esm2015/autocomplete/index.js → esm2020/autocomplete/index.mjs} +0 -0
  36. package/{esm2015/autocomplete/ptsecurity-mosaic-autocomplete.js → esm2020/autocomplete/ptsecurity-mosaic-autocomplete.mjs} +0 -0
  37. package/{esm2015/autocomplete/public-api.js → esm2020/autocomplete/public-api.mjs} +0 -0
  38. package/esm2020/button/button.component.mjs +129 -0
  39. package/esm2020/button/button.module.mjs +38 -0
  40. package/{esm2015/button/index.js → esm2020/button/index.mjs} +0 -0
  41. package/{esm2015/button/ptsecurity-mosaic-button.js → esm2020/button/ptsecurity-mosaic-button.mjs} +0 -0
  42. package/{esm2015/button/public-api.js → esm2020/button/public-api.mjs} +0 -0
  43. package/esm2020/button-toggle/button-toggle.component.mjs +362 -0
  44. package/{esm2015/button-toggle/button-toggle.module.js → esm2020/button-toggle/button-toggle.module.mjs} +5 -5
  45. package/{esm2015/button-toggle/index.js → esm2020/button-toggle/index.mjs} +0 -0
  46. package/{esm2015/button-toggle/ptsecurity-mosaic-button-toggle.js → esm2020/button-toggle/ptsecurity-mosaic-button-toggle.mjs} +0 -0
  47. package/{esm2015/button-toggle/public-api.js → esm2020/button-toggle/public-api.mjs} +0 -0
  48. package/esm2020/card/card.component.mjs +80 -0
  49. package/{esm2015/card/card.module.js → esm2020/card/card.module.mjs} +5 -5
  50. package/{esm2015/card/index.js → esm2020/card/index.mjs} +0 -0
  51. package/{esm2015/card/ptsecurity-mosaic-card.js → esm2020/card/ptsecurity-mosaic-card.mjs} +0 -0
  52. package/{esm2015/card/public-api.js → esm2020/card/public-api.mjs} +0 -0
  53. package/{esm2015/checkbox/checkbox-config.js → esm2020/checkbox/checkbox-config.mjs} +0 -0
  54. package/{esm2015/checkbox/checkbox-module.js → esm2020/checkbox/checkbox-module.mjs} +5 -5
  55. package/{esm2015/checkbox/checkbox-required-validator.js → esm2020/checkbox/checkbox-required-validator.mjs} +4 -4
  56. package/esm2020/checkbox/checkbox.mjs +315 -0
  57. package/{esm2015/checkbox/index.js → esm2020/checkbox/index.mjs} +0 -0
  58. package/{esm2015/checkbox/ptsecurity-mosaic-checkbox.js → esm2020/checkbox/ptsecurity-mosaic-checkbox.mjs} +0 -0
  59. package/{esm2015/checkbox/public-api.js → esm2020/checkbox/public-api.mjs} +0 -0
  60. package/{esm2015/core/animation/animation.js → esm2020/core/animation/animation.mjs} +0 -0
  61. package/{esm2015/core/animation/fade-animations.js → esm2020/core/animation/fade-animations.mjs} +0 -0
  62. package/{esm2015/core/animation/index.js → esm2020/core/animation/index.mjs} +0 -0
  63. package/{esm2015/core/animation/select-animations.js → esm2020/core/animation/select-animations.mjs} +0 -0
  64. package/{esm2015/core/common-behaviors/color.js → esm2020/core/common-behaviors/color.mjs} +0 -0
  65. package/{esm2015/core/common-behaviors/common-module.js → esm2020/core/common-behaviors/common-module.mjs} +5 -5
  66. package/{esm2015/core/common-behaviors/constructor.js → esm2020/core/common-behaviors/constructor.mjs} +0 -0
  67. package/{esm2015/core/common-behaviors/disabled.js → esm2020/core/common-behaviors/disabled.mjs} +0 -0
  68. package/{esm2015/core/common-behaviors/error-state.js → esm2020/core/common-behaviors/error-state.mjs} +0 -0
  69. package/{esm2015/core/common-behaviors/index.js → esm2020/core/common-behaviors/index.mjs} +0 -0
  70. package/{esm2015/core/common-behaviors/tabindex.js → esm2020/core/common-behaviors/tabindex.mjs} +0 -0
  71. package/{esm2015/core/error/error-options.js → esm2020/core/error/error-options.mjs} +7 -7
  72. package/esm2020/core/formatters/date/formatter.mjs +314 -0
  73. package/esm2020/core/formatters/date/templates/en-US.mjs +280 -0
  74. package/esm2020/core/formatters/date/templates/ru-RU.mjs +280 -0
  75. package/{esm2015/core/formatters/index.js → esm2020/core/formatters/index.mjs} +5 -5
  76. package/esm2020/core/formatters/number/formatter.mjs +105 -0
  77. package/{esm2015/core/forms/forms-module.js → esm2020/core/forms/forms-module.mjs} +5 -5
  78. package/{esm2015/core/forms/forms.directive.js → esm2020/core/forms/forms.directive.mjs} +7 -7
  79. package/{esm2015/core/forms/index.js → esm2020/core/forms/index.mjs} +0 -0
  80. package/{esm2015/core/highlight/highlight.pipe.js → esm2020/core/highlight/highlight.pipe.mjs} +4 -4
  81. package/{esm2015/core/highlight/index.js → esm2020/core/highlight/index.mjs} +5 -5
  82. package/{esm2015/core/index.js → esm2020/core/index.mjs} +0 -0
  83. package/{esm2015/core/label/label-options.js → esm2020/core/label/label-options.mjs} +0 -0
  84. package/{esm2015/core/line/line.js → esm2020/core/line/line.mjs} +8 -8
  85. package/esm2020/core/option/action.mjs +121 -0
  86. package/{esm2015/core/option/index.js → esm2020/core/option/index.mjs} +0 -0
  87. package/esm2020/core/option/optgroup.mjs +31 -0
  88. package/{esm2015/core/option/option-module.js → esm2020/core/option/option-module.mjs} +5 -5
  89. package/esm2020/core/option/option.mjs +254 -0
  90. package/{esm2015/core/overlay/overlay-position-map.js → esm2020/core/overlay/overlay-position-map.mjs} +0 -0
  91. package/{esm2015/core/pop-up/constants.js → esm2020/core/pop-up/constants.mjs} +0 -0
  92. package/{esm2015/core/pop-up/index.js → esm2020/core/pop-up/index.mjs} +0 -0
  93. package/esm2020/core/pop-up/pop-up-trigger.mjs +246 -0
  94. package/esm2020/core/pop-up/pop-up.mjs +91 -0
  95. package/{esm2015/core/ptsecurity-mosaic-core.js → esm2020/core/ptsecurity-mosaic-core.mjs} +0 -0
  96. package/{esm2015/core/public-api.js → esm2020/core/public-api.mjs} +0 -0
  97. package/{esm2015/core/select/constants.js → esm2020/core/select/constants.mjs} +0 -0
  98. package/{esm2015/core/select/errors.js → esm2020/core/select/errors.mjs} +0 -0
  99. package/{esm2015/core/select/events.js → esm2020/core/select/events.mjs} +0 -0
  100. package/{esm2015/core/select/index.js → esm2020/core/select/index.mjs} +0 -0
  101. package/{esm2015/core/selection/constants.js → esm2020/core/selection/constants.mjs} +0 -0
  102. package/{esm2015/core/selection/index.js → esm2020/core/selection/index.mjs} +0 -0
  103. package/esm2020/core/selection/pseudo-checkbox/pseudo-checkbox.mjs +37 -0
  104. package/{esm2015/core/selection/pseudo-checkbox/pseudo-checkbox.module.js → esm2020/core/selection/pseudo-checkbox/pseudo-checkbox.module.mjs} +5 -5
  105. package/{esm2015/core/services/measure-scrollbar.service.js → esm2020/core/services/measure-scrollbar.service.mjs} +4 -4
  106. package/{esm2015/core/utils/index.js → esm2020/core/utils/index.mjs} +0 -0
  107. package/{esm2015/core/utils/public-api.js → esm2020/core/utils/public-api.mjs} +0 -0
  108. package/{esm2015/core/utils/utils.js → esm2020/core/utils/utils.mjs} +0 -0
  109. package/{esm2015/core/validation/index.js → esm2020/core/validation/index.mjs} +0 -0
  110. package/{esm2015/core/validation/validation.js → esm2020/core/validation/validation.mjs} +0 -0
  111. package/esm2020/datepicker/calendar-body.component.mjs +106 -0
  112. package/esm2020/datepicker/calendar.component.mjs +362 -0
  113. package/{esm2015/datepicker/datepicker-animations.js → esm2020/datepicker/datepicker-animations.mjs} +0 -0
  114. package/{esm2015/datepicker/datepicker-errors.js → esm2020/datepicker/datepicker-errors.mjs} +0 -0
  115. package/esm2020/datepicker/datepicker-input.directive.mjs +900 -0
  116. package/{esm2015/datepicker/datepicker-intl.js → esm2020/datepicker/datepicker-intl.mjs} +4 -4
  117. package/{esm2015/datepicker/datepicker-module.js → esm2020/datepicker/datepicker-module.mjs} +5 -5
  118. package/esm2020/datepicker/datepicker-toggle.component.mjs +86 -0
  119. package/esm2020/datepicker/datepicker.component.mjs +408 -0
  120. package/{esm2015/datepicker/index.js → esm2020/datepicker/index.mjs} +0 -0
  121. package/{esm2015/datepicker/month-view.component.js → esm2020/datepicker/month-view.component.mjs} +5 -11
  122. package/{esm2015/datepicker/multi-year-view.component.js → esm2020/datepicker/multi-year-view.component.mjs} +5 -11
  123. package/{esm2015/datepicker/ptsecurity-mosaic-datepicker.js → esm2020/datepicker/ptsecurity-mosaic-datepicker.mjs} +0 -0
  124. package/{esm2015/datepicker/public-api.js → esm2020/datepicker/public-api.mjs} +0 -0
  125. package/{esm2015/datepicker/year-view.component.js → esm2020/datepicker/year-view.component.mjs} +5 -11
  126. package/{esm2015/design-tokens/index.js → esm2020/design-tokens/index.mjs} +0 -0
  127. package/{esm2015/design-tokens/ptsecurity-mosaic-design-tokens.js → esm2020/design-tokens/ptsecurity-mosaic-design-tokens.mjs} +0 -0
  128. package/{esm2015/design-tokens/public-api.js → esm2020/design-tokens/public-api.mjs} +0 -0
  129. package/{esm2015/design-tokens/tokens.js → esm2020/design-tokens/tokens.mjs} +12 -10
  130. package/{esm2015/divider/divider.component.js → esm2020/divider/divider.component.mjs} +6 -13
  131. package/{esm2015/divider/divider.module.js → esm2020/divider/divider.module.mjs} +5 -5
  132. package/{esm2015/divider/index.js → esm2020/divider/index.mjs} +0 -0
  133. package/{esm2015/divider/ptsecurity-mosaic-divider.js → esm2020/divider/ptsecurity-mosaic-divider.mjs} +0 -0
  134. package/{esm2015/divider/public-api.js → esm2020/divider/public-api.mjs} +0 -0
  135. package/{esm2015/dropdown/dropdown-animations.js → esm2020/dropdown/dropdown-animations.mjs} +0 -0
  136. package/{esm2015/dropdown/dropdown-content.directive.js → esm2020/dropdown/dropdown-content.directive.mjs} +6 -8
  137. package/{esm2015/dropdown/dropdown-errors.js → esm2020/dropdown/dropdown-errors.mjs} +0 -0
  138. package/esm2020/dropdown/dropdown-item.component.mjs +139 -0
  139. package/esm2020/dropdown/dropdown-trigger.directive.mjs +485 -0
  140. package/esm2020/dropdown/dropdown.component.mjs +292 -0
  141. package/{esm2015/dropdown/dropdown.module.js → esm2020/dropdown/dropdown.module.mjs} +5 -5
  142. package/{esm2015/dropdown/dropdown.types.js → esm2020/dropdown/dropdown.types.mjs} +0 -0
  143. package/{esm2015/dropdown/index.js → esm2020/dropdown/index.mjs} +0 -0
  144. package/{esm2015/dropdown/ptsecurity-mosaic-dropdown.js → esm2020/dropdown/ptsecurity-mosaic-dropdown.mjs} +0 -0
  145. package/{esm2015/dropdown/public-api.js → esm2020/dropdown/public-api.mjs} +0 -0
  146. package/esm2020/form-field/cleaner.mjs +23 -0
  147. package/{esm2015/form-field/form-field-control.js → esm2020/form-field/form-field-control.mjs} +0 -0
  148. package/{esm2015/form-field/form-field-errors.js → esm2020/form-field/form-field-errors.mjs} +0 -0
  149. package/esm2020/form-field/form-field.mjs +205 -0
  150. package/{esm2015/form-field/form-field.module.js → esm2020/form-field/form-field.module.mjs} +5 -5
  151. package/{esm2015/form-field/hint.js → esm2020/form-field/hint.mjs} +4 -4
  152. package/{esm2015/form-field/index.js → esm2020/form-field/index.mjs} +0 -0
  153. package/{esm2015/form-field/prefix.js → esm2020/form-field/prefix.mjs} +4 -4
  154. package/{esm2015/form-field/ptsecurity-mosaic-form-field.js → esm2020/form-field/ptsecurity-mosaic-form-field.mjs} +0 -0
  155. package/{esm2015/form-field/public-api.js → esm2020/form-field/public-api.mjs} +0 -0
  156. package/{esm2015/form-field/stepper.js → esm2020/form-field/stepper.mjs} +4 -4
  157. package/{esm2015/form-field/suffix.js → esm2020/form-field/suffix.mjs} +4 -4
  158. package/esm2020/icon/icon.component.mjs +44 -0
  159. package/{esm2015/icon/icon.module.js → esm2020/icon/icon.module.mjs} +5 -5
  160. package/{esm2015/icon/index.js → esm2020/icon/index.mjs} +0 -0
  161. package/{esm2015/icon/ptsecurity-mosaic-icon.js → esm2020/icon/ptsecurity-mosaic-icon.mjs} +0 -0
  162. package/{esm2015/icon/public-api.js → esm2020/icon/public-api.mjs} +0 -0
  163. package/{esm2015/index.js → esm2020/index.mjs} +0 -0
  164. package/{esm2015/input/index.js → esm2020/input/index.mjs} +0 -0
  165. package/{esm2015/input/input-errors.js → esm2020/input/input-errors.mjs} +0 -0
  166. package/esm2020/input/input-number-validators.mjs +92 -0
  167. package/{esm2015/input/input-number.js → esm2020/input/input-number.mjs} +4 -4
  168. package/{esm2015/input/input-value-accessor.js → esm2020/input/input-value-accessor.mjs} +0 -0
  169. package/{esm2015/input/input.js → esm2020/input/input.mjs} +7 -7
  170. package/{esm2015/input/input.module.js → esm2020/input/input.module.mjs} +5 -5
  171. package/{esm2015/input/ptsecurity-mosaic-input.js → esm2020/input/ptsecurity-mosaic-input.mjs} +0 -0
  172. package/{esm2015/input/public-api.js → esm2020/input/public-api.mjs} +0 -0
  173. package/{esm2015/link/index.js → esm2020/link/index.mjs} +0 -0
  174. package/esm2020/link/link.component.mjs +107 -0
  175. package/{esm2015/link/link.module.js → esm2020/link/link.module.mjs} +5 -5
  176. package/{esm2015/link/ptsecurity-mosaic-link.js → esm2020/link/ptsecurity-mosaic-link.mjs} +0 -0
  177. package/{esm2015/link/public-api.js → esm2020/link/public-api.mjs} +0 -0
  178. package/{esm2015/list/index.js → esm2020/list/index.mjs} +0 -0
  179. package/esm2020/list/list-selection.component.mjs +693 -0
  180. package/esm2020/list/list.component.mjs +44 -0
  181. package/{esm2015/list/list.module.js → esm2020/list/list.module.mjs} +5 -5
  182. package/{esm2015/list/ptsecurity-mosaic-list.js → esm2020/list/ptsecurity-mosaic-list.mjs} +0 -0
  183. package/{esm2015/list/public-api.js → esm2020/list/public-api.mjs} +0 -0
  184. package/{esm2015/modal/css-unit.pipe.js → esm2020/modal/css-unit.pipe.mjs} +4 -4
  185. package/{esm2015/modal/index.js → esm2020/modal/index.mjs} +0 -0
  186. package/{esm2015/modal/modal-control.service.js → esm2020/modal/modal-control.service.mjs} +4 -4
  187. package/{esm2015/modal/modal-ref.class.js → esm2020/modal/modal-ref.class.mjs} +0 -0
  188. package/{esm2015/modal/modal-util.js → esm2020/modal/modal-util.mjs} +0 -0
  189. package/esm2020/modal/modal.component.mjs +501 -0
  190. package/{esm2015/modal/modal.directive.js → esm2020/modal/modal.directive.mjs} +13 -13
  191. package/esm2020/modal/modal.module.mjs +72 -0
  192. package/esm2020/modal/modal.service.mjs +124 -0
  193. package/{esm2015/modal/modal.type.js → esm2020/modal/modal.type.mjs} +0 -0
  194. package/{esm2015/modal/ptsecurity-mosaic-modal.js → esm2020/modal/ptsecurity-mosaic-modal.mjs} +0 -0
  195. package/{esm2015/modal/public-api.js → esm2020/modal/public-api.mjs} +0 -0
  196. package/{esm2015/navbar/index.js → esm2020/navbar/index.mjs} +0 -0
  197. package/esm2020/navbar/navbar-item.component.mjs +577 -0
  198. package/esm2020/navbar/navbar.component.mjs +237 -0
  199. package/esm2020/navbar/navbar.module.mjs +92 -0
  200. package/{esm2015/navbar/ptsecurity-mosaic-navbar.js → esm2020/navbar/ptsecurity-mosaic-navbar.mjs} +0 -0
  201. package/{esm2015/navbar/public-api.js → esm2020/navbar/public-api.mjs} +0 -0
  202. package/{esm2015/navbar/vertical-navbar.animation.js → esm2020/navbar/vertical-navbar.animation.mjs} +2 -2
  203. package/esm2020/navbar/vertical-navbar.component.mjs +114 -0
  204. package/{esm2015/popover/index.js → esm2020/popover/index.mjs} +0 -0
  205. package/{esm2015/popover/popover-animations.js → esm2020/popover/popover-animations.mjs} +0 -0
  206. package/esm2020/popover/popover-confirm.component.mjs +108 -0
  207. package/esm2020/popover/popover.component.mjs +253 -0
  208. package/esm2020/popover/popover.module.mjs +24 -0
  209. package/{esm2015/popover/ptsecurity-mosaic-popover.js → esm2020/popover/ptsecurity-mosaic-popover.mjs} +0 -0
  210. package/{esm2015/popover/public-api.js → esm2020/popover/public-api.mjs} +2 -1
  211. package/{esm2015/progress-bar/index.js → esm2020/progress-bar/index.mjs} +0 -0
  212. package/esm2020/progress-bar/progress-bar.component.mjs +42 -0
  213. package/{esm2015/progress-bar/progress-bar.module.js → esm2020/progress-bar/progress-bar.module.mjs} +5 -5
  214. package/{esm2015/progress-bar/ptsecurity-mosaic-progress-bar.js → esm2020/progress-bar/ptsecurity-mosaic-progress-bar.mjs} +0 -0
  215. package/{esm2015/progress-bar/public-api.js → esm2020/progress-bar/public-api.mjs} +0 -0
  216. package/{esm2015/progress-spinner/index.js → esm2020/progress-spinner/index.mjs} +0 -0
  217. package/esm2020/progress-spinner/progress-spinner.component.mjs +46 -0
  218. package/{esm2015/progress-spinner/progress-spinner.module.js → esm2020/progress-spinner/progress-spinner.module.mjs} +5 -5
  219. package/{esm2015/progress-spinner/ptsecurity-mosaic-progress-spinner.js → esm2020/progress-spinner/ptsecurity-mosaic-progress-spinner.mjs} +0 -0
  220. package/{esm2015/progress-spinner/public-api.js → esm2020/progress-spinner/public-api.mjs} +0 -0
  221. package/{esm2015/ptsecurity-mosaic.js → esm2020/ptsecurity-mosaic.mjs} +0 -0
  222. package/{esm2015/public-api.js → esm2020/public-api.mjs} +0 -0
  223. package/{esm2015/radio/index.js → esm2020/radio/index.mjs} +0 -0
  224. package/{esm2015/radio/ptsecurity-mosaic-radio.js → esm2020/radio/ptsecurity-mosaic-radio.mjs} +0 -0
  225. package/{esm2015/radio/public-api.js → esm2020/radio/public-api.mjs} +0 -0
  226. package/esm2020/radio/radio.component.mjs +458 -0
  227. package/{esm2015/radio/radio.module.js → esm2020/radio/radio.module.mjs} +5 -5
  228. package/{esm2015/select/index.js → esm2020/select/index.mjs} +0 -0
  229. package/{esm2015/select/ptsecurity-mosaic-select.js → esm2020/select/ptsecurity-mosaic-select.mjs} +0 -0
  230. package/{esm2015/select/public-api.js → esm2020/select/public-api.mjs} +0 -0
  231. package/esm2020/select/select.component.mjs +1110 -0
  232. package/{esm2015/select/select.module.js → esm2020/select/select.module.mjs} +5 -5
  233. package/{esm2015/sidebar/index.js → esm2020/sidebar/index.mjs} +0 -0
  234. package/{esm2015/sidebar/ptsecurity-mosaic-sidebar.js → esm2020/sidebar/ptsecurity-mosaic-sidebar.mjs} +0 -0
  235. package/{esm2015/sidebar/public-api.js → esm2020/sidebar/public-api.mjs} +0 -0
  236. package/{esm2015/sidebar/sidebar-animations.js → esm2020/sidebar/sidebar-animations.mjs} +0 -0
  237. package/esm2020/sidebar/sidebar.component.mjs +146 -0
  238. package/{esm2015/sidebar/sidebar.module.js → esm2020/sidebar/sidebar.module.mjs} +5 -5
  239. package/{esm2015/sidepanel/index.js → esm2020/sidepanel/index.mjs} +0 -0
  240. package/{esm2015/sidepanel/ptsecurity-mosaic-sidepanel.js → esm2020/sidepanel/ptsecurity-mosaic-sidepanel.mjs} +0 -0
  241. package/{esm2015/sidepanel/public-api.js → esm2020/sidepanel/public-api.mjs} +0 -0
  242. package/{esm2015/sidepanel/sidepanel-animations.js → esm2020/sidepanel/sidepanel-animations.mjs} +0 -0
  243. package/{esm2015/sidepanel/sidepanel-config.js → esm2020/sidepanel/sidepanel-config.mjs} +0 -0
  244. package/esm2020/sidepanel/sidepanel-container.component.mjs +106 -0
  245. package/esm2020/sidepanel/sidepanel-directives.mjs +159 -0
  246. package/{esm2015/sidepanel/sidepanel-ref.js → esm2020/sidepanel/sidepanel-ref.mjs} +0 -0
  247. package/esm2020/sidepanel/sidepanel.module.mjs +74 -0
  248. package/esm2020/sidepanel/sidepanel.service.mjs +167 -0
  249. package/{esm2015/splitter/index.js → esm2020/splitter/index.mjs} +0 -0
  250. package/{esm2015/splitter/ptsecurity-mosaic-splitter.js → esm2020/splitter/ptsecurity-mosaic-splitter.mjs} +0 -0
  251. package/{esm2015/splitter/public-api.js → esm2020/splitter/public-api.mjs} +0 -0
  252. package/esm2020/splitter/splitter.component.mjs +480 -0
  253. package/esm2020/splitter/splitter.module.mjs +40 -0
  254. package/{esm2015/table/index.js → esm2020/table/index.mjs} +0 -0
  255. package/{esm2015/table/ptsecurity-mosaic-table.js → esm2020/table/ptsecurity-mosaic-table.mjs} +0 -0
  256. package/{esm2015/table/public-api.js → esm2020/table/public-api.mjs} +0 -0
  257. package/{esm2015/table/table.component.js → esm2020/table/table.component.mjs} +4 -4
  258. package/{esm2015/table/table.module.js → esm2020/table/table.module.mjs} +5 -5
  259. package/{esm2015/tabs/index.js → esm2020/tabs/index.mjs} +0 -0
  260. package/esm2020/tabs/paginated-tab-header.mjs +479 -0
  261. package/{esm2015/tabs/ptsecurity-mosaic-tabs.js → esm2020/tabs/ptsecurity-mosaic-tabs.mjs} +0 -0
  262. package/{esm2015/tabs/public-api.js → esm2020/tabs/public-api.mjs} +0 -0
  263. package/esm2020/tabs/tab-body.component.mjs +178 -0
  264. package/{esm2015/tabs/tab-content.directive.js → esm2020/tabs/tab-content.directive.mjs} +4 -4
  265. package/esm2020/tabs/tab-group.component.mjs +350 -0
  266. package/esm2020/tabs/tab-header.component.mjs +67 -0
  267. package/{esm2015/tabs/tab-label-wrapper.directive.js → esm2020/tabs/tab-label-wrapper.directive.mjs} +4 -4
  268. package/{esm2015/tabs/tab-label.directive.js → esm2020/tabs/tab-label.directive.mjs} +4 -4
  269. package/{esm2015/tabs/tab-nav-bar/index.js → esm2020/tabs/tab-nav-bar/index.mjs} +0 -0
  270. package/esm2020/tabs/tab-nav-bar/tab-nav-bar.mjs +110 -0
  271. package/{esm2015/tabs/tab.component.js → esm2020/tabs/tab.component.mjs} +4 -4
  272. package/{esm2015/tabs/tabs-animations.js → esm2020/tabs/tabs-animations.mjs} +0 -0
  273. package/{esm2015/tabs/tabs.module.js → esm2020/tabs/tabs.module.mjs} +5 -5
  274. package/{esm2015/tags/index.js → esm2020/tags/index.mjs} +0 -0
  275. package/{esm2015/tags/ptsecurity-mosaic-tags.js → esm2020/tags/ptsecurity-mosaic-tags.mjs} +0 -0
  276. package/{esm2015/tags/public-api.js → esm2020/tags/public-api.mjs} +0 -0
  277. package/{esm2015/tags/tag-default-options.js → esm2020/tags/tag-default-options.mjs} +0 -0
  278. package/{esm2015/tags/tag-input.js → esm2020/tags/tag-input.mjs} +4 -4
  279. package/esm2020/tags/tag-list.component.mjs +722 -0
  280. package/{esm2015/tags/tag-text-control.js → esm2020/tags/tag-text-control.mjs} +0 -0
  281. package/esm2020/tags/tag.component.mjs +374 -0
  282. package/{esm2015/tags/tag.module.js → esm2020/tags/tag.module.mjs} +5 -5
  283. package/{esm2015/textarea/index.js → esm2020/textarea/index.mjs} +0 -0
  284. package/{esm2015/textarea/ptsecurity-mosaic-textarea.js → esm2020/textarea/ptsecurity-mosaic-textarea.mjs} +0 -0
  285. package/{esm2015/textarea/public-api.js → esm2020/textarea/public-api.mjs} +0 -0
  286. package/{esm2015/textarea/textarea.component.js → esm2020/textarea/textarea.component.mjs} +4 -4
  287. package/{esm2015/textarea/textarea.module.js → esm2020/textarea/textarea.module.mjs} +5 -5
  288. package/{esm2015/timepicker/index.js → esm2020/timepicker/index.mjs} +0 -0
  289. package/{esm2015/timepicker/ptsecurity-mosaic-timepicker.js → esm2020/timepicker/ptsecurity-mosaic-timepicker.mjs} +0 -0
  290. package/{esm2015/timepicker/public-api.js → esm2020/timepicker/public-api.mjs} +0 -0
  291. package/{esm2015/timepicker/timepicker.constants.js → esm2020/timepicker/timepicker.constants.mjs} +0 -0
  292. package/esm2020/timepicker/timepicker.directive.mjs +653 -0
  293. package/{esm2015/timepicker/timepicker.module.js → esm2020/timepicker/timepicker.module.mjs} +5 -5
  294. package/{esm2015/toggle/index.js → esm2020/toggle/index.mjs} +0 -0
  295. package/{esm2015/toggle/ptsecurity-mosaic-toggle.js → esm2020/toggle/ptsecurity-mosaic-toggle.mjs} +0 -0
  296. package/{esm2015/toggle/public-api.js → esm2020/toggle/public-api.mjs} +0 -0
  297. package/esm2020/toggle/toggle.component.mjs +158 -0
  298. package/{esm2015/toggle/toggle.module.js → esm2020/toggle/toggle.module.mjs} +5 -5
  299. package/{esm2015/tooltip/index.js → esm2020/tooltip/index.mjs} +0 -0
  300. package/{esm2015/tooltip/ptsecurity-mosaic-tooltip.js → esm2020/tooltip/ptsecurity-mosaic-tooltip.mjs} +0 -0
  301. package/{esm2015/tooltip/public-api.js → esm2020/tooltip/public-api.mjs} +0 -0
  302. package/{esm2015/tooltip/tooltip.animations.js → esm2020/tooltip/tooltip.animations.mjs} +0 -0
  303. package/esm2020/tooltip/tooltip.component.mjs +291 -0
  304. package/{esm2015/tooltip/tooltip.module.js → esm2020/tooltip/tooltip.module.mjs} +5 -5
  305. package/{esm2015/tree/control/base-tree-control.js → esm2020/tree/control/base-tree-control.mjs} +0 -0
  306. package/{esm2015/tree/control/flat-tree-control.js → esm2020/tree/control/flat-tree-control.mjs} +0 -0
  307. package/{esm2015/tree/control/nested-tree-control.js → esm2020/tree/control/nested-tree-control.mjs} +0 -0
  308. package/{esm2015/tree/control/tree-control.js → esm2020/tree/control/tree-control.mjs} +0 -0
  309. package/{esm2015/tree/data-source/flat-data-source.js → esm2020/tree/data-source/flat-data-source.mjs} +0 -0
  310. package/{esm2015/tree/data-source/nested-data-source.js → esm2020/tree/data-source/nested-data-source.mjs} +0 -0
  311. package/{esm2015/tree/index.js → esm2020/tree/index.mjs} +0 -0
  312. package/{esm2015/tree/node.js → esm2020/tree/node.mjs} +4 -4
  313. package/{esm2015/tree/outlet.js → esm2020/tree/outlet.mjs} +4 -4
  314. package/esm2020/tree/padding.directive.mjs +110 -0
  315. package/{esm2015/tree/ptsecurity-mosaic-tree.js → esm2020/tree/ptsecurity-mosaic-tree.mjs} +0 -0
  316. package/{esm2015/tree/public-api.js → esm2020/tree/public-api.mjs} +0 -0
  317. package/esm2020/tree/toggle.mjs +80 -0
  318. package/{esm2015/tree/tree-base.js → esm2020/tree/tree-base.mjs} +7 -7
  319. package/{esm2015/tree/tree-errors.js → esm2020/tree/tree-errors.mjs} +0 -0
  320. package/esm2020/tree/tree-option.component.mjs +226 -0
  321. package/esm2020/tree/tree-selection.component.mjs +530 -0
  322. package/esm2020/tree/tree.mjs +15 -0
  323. package/esm2020/tree/tree.module.mjs +53 -0
  324. package/{esm2015/tree-select/index.js → esm2020/tree-select/index.mjs} +0 -0
  325. package/{esm2015/tree-select/ptsecurity-mosaic-tree-select.js → esm2020/tree-select/ptsecurity-mosaic-tree-select.mjs} +0 -0
  326. package/{esm2015/tree-select/public-api.js → esm2020/tree-select/public-api.mjs} +0 -0
  327. package/esm2020/tree-select/tree-select.component.mjs +889 -0
  328. package/{esm2015/tree-select/tree-select.module.js → esm2020/tree-select/tree-select.module.mjs} +5 -5
  329. package/fesm2015/ptsecurity-mosaic-autocomplete.mjs +756 -0
  330. package/fesm2015/ptsecurity-mosaic-autocomplete.mjs.map +1 -0
  331. package/fesm2015/ptsecurity-mosaic-button-toggle.mjs +385 -0
  332. package/fesm2015/ptsecurity-mosaic-button-toggle.mjs.map +1 -0
  333. package/fesm2015/ptsecurity-mosaic-button.mjs +170 -0
  334. package/fesm2015/ptsecurity-mosaic-button.mjs.map +1 -0
  335. package/fesm2015/{ptsecurity-mosaic-card.js → ptsecurity-mosaic-card.mjs} +10 -18
  336. package/fesm2015/ptsecurity-mosaic-card.mjs.map +1 -0
  337. package/fesm2015/ptsecurity-mosaic-checkbox.mjs +366 -0
  338. package/fesm2015/ptsecurity-mosaic-checkbox.mjs.map +1 -0
  339. package/fesm2015/{ptsecurity-mosaic-core.js → ptsecurity-mosaic-core.mjs} +186 -241
  340. package/fesm2015/ptsecurity-mosaic-core.mjs.map +1 -0
  341. package/fesm2015/ptsecurity-mosaic-datepicker.mjs +2700 -0
  342. package/fesm2015/ptsecurity-mosaic-datepicker.mjs.map +1 -0
  343. package/fesm2015/{ptsecurity-mosaic-design-tokens.js → ptsecurity-mosaic-design-tokens.mjs} +13 -11
  344. package/fesm2015/ptsecurity-mosaic-design-tokens.mjs.map +1 -0
  345. package/fesm2015/ptsecurity-mosaic-divider.mjs +61 -0
  346. package/fesm2015/ptsecurity-mosaic-divider.mjs.map +1 -0
  347. package/fesm2015/ptsecurity-mosaic-dropdown.mjs +1106 -0
  348. package/fesm2015/ptsecurity-mosaic-dropdown.mjs.map +1 -0
  349. package/fesm2015/ptsecurity-mosaic-form-field.mjs +378 -0
  350. package/fesm2015/ptsecurity-mosaic-form-field.mjs.map +1 -0
  351. package/fesm2015/ptsecurity-mosaic-icon.mjs +88 -0
  352. package/fesm2015/ptsecurity-mosaic-icon.mjs.map +1 -0
  353. package/fesm2015/ptsecurity-mosaic-input.mjs +609 -0
  354. package/fesm2015/ptsecurity-mosaic-input.mjs.map +1 -0
  355. package/fesm2015/{ptsecurity-mosaic-link.js → ptsecurity-mosaic-link.mjs} +8 -8
  356. package/fesm2015/ptsecurity-mosaic-link.mjs.map +1 -0
  357. package/fesm2015/ptsecurity-mosaic-list.mjs +796 -0
  358. package/fesm2015/ptsecurity-mosaic-list.mjs.map +1 -0
  359. package/fesm2015/ptsecurity-mosaic-modal.mjs +842 -0
  360. package/fesm2015/ptsecurity-mosaic-modal.mjs.map +1 -0
  361. package/fesm2015/ptsecurity-mosaic-navbar.mjs +1025 -0
  362. package/fesm2015/ptsecurity-mosaic-navbar.mjs.map +1 -0
  363. package/fesm2015/ptsecurity-mosaic-popover.mjs +393 -0
  364. package/fesm2015/ptsecurity-mosaic-popover.mjs.map +1 -0
  365. package/fesm2015/{ptsecurity-mosaic-progress-bar.js → ptsecurity-mosaic-progress-bar.mjs} +10 -18
  366. package/fesm2015/ptsecurity-mosaic-progress-bar.mjs.map +1 -0
  367. package/fesm2015/ptsecurity-mosaic-progress-spinner.mjs +80 -0
  368. package/fesm2015/ptsecurity-mosaic-progress-spinner.mjs.map +1 -0
  369. package/fesm2015/ptsecurity-mosaic-radio.mjs +481 -0
  370. package/fesm2015/ptsecurity-mosaic-radio.mjs.map +1 -0
  371. package/fesm2015/ptsecurity-mosaic-select.mjs +1175 -0
  372. package/fesm2015/ptsecurity-mosaic-select.mjs.map +1 -0
  373. package/fesm2015/{ptsecurity-mosaic-sidebar.js → ptsecurity-mosaic-sidebar.mjs} +16 -25
  374. package/fesm2015/ptsecurity-mosaic-sidebar.mjs.map +1 -0
  375. package/fesm2015/ptsecurity-mosaic-sidepanel.mjs +592 -0
  376. package/fesm2015/ptsecurity-mosaic-sidepanel.mjs.map +1 -0
  377. package/fesm2015/ptsecurity-mosaic-splitter.mjs +524 -0
  378. package/fesm2015/ptsecurity-mosaic-splitter.mjs.map +1 -0
  379. package/fesm2015/{ptsecurity-mosaic-table.js → ptsecurity-mosaic-table.mjs} +8 -8
  380. package/fesm2015/ptsecurity-mosaic-table.mjs.map +1 -0
  381. package/fesm2015/ptsecurity-mosaic-tabs.mjs +1511 -0
  382. package/fesm2015/ptsecurity-mosaic-tabs.mjs.map +1 -0
  383. package/fesm2015/ptsecurity-mosaic-tags.mjs +1372 -0
  384. package/fesm2015/ptsecurity-mosaic-tags.mjs.map +1 -0
  385. package/fesm2015/ptsecurity-mosaic-textarea.mjs +293 -0
  386. package/fesm2015/ptsecurity-mosaic-textarea.mjs.map +1 -0
  387. package/fesm2015/ptsecurity-mosaic-timepicker.mjs +715 -0
  388. package/fesm2015/ptsecurity-mosaic-timepicker.mjs.map +1 -0
  389. package/fesm2015/{ptsecurity-mosaic-toggle.js → ptsecurity-mosaic-toggle.mjs} +12 -23
  390. package/fesm2015/ptsecurity-mosaic-toggle.mjs.map +1 -0
  391. package/fesm2015/ptsecurity-mosaic-tooltip.mjs +362 -0
  392. package/fesm2015/ptsecurity-mosaic-tooltip.mjs.map +1 -0
  393. package/fesm2015/ptsecurity-mosaic-tree-select.mjs +932 -0
  394. package/fesm2015/ptsecurity-mosaic-tree-select.mjs.map +1 -0
  395. package/fesm2015/ptsecurity-mosaic-tree.mjs +1707 -0
  396. package/fesm2015/ptsecurity-mosaic-tree.mjs.map +1 -0
  397. package/fesm2015/{ptsecurity-mosaic.js → ptsecurity-mosaic.mjs} +1 -1
  398. package/fesm2015/ptsecurity-mosaic.mjs.map +1 -0
  399. package/{fesm2015/ptsecurity-mosaic-autocomplete.js → fesm2020/ptsecurity-mosaic-autocomplete.mjs} +17 -26
  400. package/fesm2020/ptsecurity-mosaic-autocomplete.mjs.map +1 -0
  401. package/{fesm2015/ptsecurity-mosaic-button-toggle.js → fesm2020/ptsecurity-mosaic-button-toggle.mjs} +15 -23
  402. package/fesm2020/ptsecurity-mosaic-button-toggle.mjs.map +1 -0
  403. package/fesm2020/ptsecurity-mosaic-button.mjs +170 -0
  404. package/fesm2020/ptsecurity-mosaic-button.mjs.map +1 -0
  405. package/fesm2020/ptsecurity-mosaic-card.mjs +113 -0
  406. package/fesm2020/ptsecurity-mosaic-card.mjs.map +1 -0
  407. package/{fesm2015/ptsecurity-mosaic-checkbox.js → fesm2020/ptsecurity-mosaic-checkbox.mjs} +13 -23
  408. package/fesm2020/ptsecurity-mosaic-checkbox.mjs.map +1 -0
  409. package/fesm2020/ptsecurity-mosaic-core.mjs +2688 -0
  410. package/fesm2020/ptsecurity-mosaic-core.mjs.map +1 -0
  411. package/{fesm2015/ptsecurity-mosaic-datepicker.js → fesm2020/ptsecurity-mosaic-datepicker.mjs} +77 -121
  412. package/fesm2020/ptsecurity-mosaic-datepicker.mjs.map +1 -0
  413. package/fesm2020/ptsecurity-mosaic-design-tokens.mjs +939 -0
  414. package/fesm2020/ptsecurity-mosaic-design-tokens.mjs.map +1 -0
  415. package/fesm2020/ptsecurity-mosaic-divider.mjs +61 -0
  416. package/fesm2020/ptsecurity-mosaic-divider.mjs.map +1 -0
  417. package/{fesm2015/ptsecurity-mosaic-dropdown.js → fesm2020/ptsecurity-mosaic-dropdown.mjs} +45 -53
  418. package/fesm2020/ptsecurity-mosaic-dropdown.mjs.map +1 -0
  419. package/fesm2020/ptsecurity-mosaic-form-field.mjs +377 -0
  420. package/fesm2020/ptsecurity-mosaic-form-field.mjs.map +1 -0
  421. package/fesm2020/ptsecurity-mosaic-icon.mjs +86 -0
  422. package/fesm2020/ptsecurity-mosaic-icon.mjs.map +1 -0
  423. package/{fesm2015/ptsecurity-mosaic-input.js → fesm2020/ptsecurity-mosaic-input.mjs} +41 -27
  424. package/fesm2020/ptsecurity-mosaic-input.mjs.map +1 -0
  425. package/fesm2020/ptsecurity-mosaic-link.mjs +136 -0
  426. package/fesm2020/ptsecurity-mosaic-link.mjs.map +1 -0
  427. package/{fesm2015/ptsecurity-mosaic-list.js → fesm2020/ptsecurity-mosaic-list.mjs} +41 -70
  428. package/fesm2020/ptsecurity-mosaic-list.mjs.map +1 -0
  429. package/{fesm2015/ptsecurity-mosaic-modal.js → fesm2020/ptsecurity-mosaic-modal.mjs} +63 -59
  430. package/fesm2020/ptsecurity-mosaic-modal.mjs.map +1 -0
  431. package/fesm2020/ptsecurity-mosaic-navbar.mjs +1009 -0
  432. package/fesm2020/ptsecurity-mosaic-navbar.mjs.map +1 -0
  433. package/fesm2020/ptsecurity-mosaic-popover.mjs +389 -0
  434. package/fesm2020/ptsecurity-mosaic-popover.mjs.map +1 -0
  435. package/fesm2020/ptsecurity-mosaic-progress-bar.mjs +76 -0
  436. package/fesm2020/ptsecurity-mosaic-progress-bar.mjs.map +1 -0
  437. package/fesm2020/ptsecurity-mosaic-progress-spinner.mjs +80 -0
  438. package/fesm2020/ptsecurity-mosaic-progress-spinner.mjs.map +1 -0
  439. package/{fesm2015/ptsecurity-mosaic-radio.js → fesm2020/ptsecurity-mosaic-radio.mjs} +13 -22
  440. package/fesm2020/ptsecurity-mosaic-radio.mjs.map +1 -0
  441. package/{fesm2015/ptsecurity-mosaic-select.js → fesm2020/ptsecurity-mosaic-select.mjs} +23 -35
  442. package/fesm2020/ptsecurity-mosaic-select.mjs.map +1 -0
  443. package/fesm2020/ptsecurity-mosaic-sidebar.mjs +202 -0
  444. package/fesm2020/ptsecurity-mosaic-sidebar.mjs.map +1 -0
  445. package/{fesm2015/ptsecurity-mosaic-sidepanel.js → fesm2020/ptsecurity-mosaic-sidepanel.mjs} +57 -53
  446. package/fesm2020/ptsecurity-mosaic-sidepanel.mjs.map +1 -0
  447. package/fesm2020/ptsecurity-mosaic-splitter.mjs +524 -0
  448. package/fesm2020/ptsecurity-mosaic-splitter.mjs.map +1 -0
  449. package/fesm2020/ptsecurity-mosaic-table.mjs +50 -0
  450. package/fesm2020/ptsecurity-mosaic-table.mjs.map +1 -0
  451. package/{fesm2015/ptsecurity-mosaic-tabs.js → fesm2020/ptsecurity-mosaic-tabs.mjs} +65 -102
  452. package/fesm2020/ptsecurity-mosaic-tabs.mjs.map +1 -0
  453. package/{fesm2015/ptsecurity-mosaic-tags.js → fesm2020/ptsecurity-mosaic-tags.mjs} +29 -47
  454. package/fesm2020/ptsecurity-mosaic-tags.mjs.map +1 -0
  455. package/{fesm2015/ptsecurity-mosaic-textarea.js → fesm2020/ptsecurity-mosaic-textarea.mjs} +8 -8
  456. package/fesm2020/ptsecurity-mosaic-textarea.mjs.map +1 -0
  457. package/{fesm2015/ptsecurity-mosaic-timepicker.js → fesm2020/ptsecurity-mosaic-timepicker.mjs} +16 -15
  458. package/fesm2020/ptsecurity-mosaic-timepicker.mjs.map +1 -0
  459. package/fesm2020/ptsecurity-mosaic-toggle.mjs +180 -0
  460. package/fesm2020/ptsecurity-mosaic-toggle.mjs.map +1 -0
  461. package/fesm2020/ptsecurity-mosaic-tooltip.mjs +354 -0
  462. package/fesm2020/ptsecurity-mosaic-tooltip.mjs.map +1 -0
  463. package/{fesm2015/ptsecurity-mosaic-tree-select.js → fesm2020/ptsecurity-mosaic-tree-select.mjs} +16 -27
  464. package/fesm2020/ptsecurity-mosaic-tree-select.mjs.map +1 -0
  465. package/{fesm2015/ptsecurity-mosaic-tree.js → fesm2020/ptsecurity-mosaic-tree.mjs} +61 -108
  466. package/fesm2020/ptsecurity-mosaic-tree.mjs.map +1 -0
  467. package/fesm2020/ptsecurity-mosaic.mjs +4 -0
  468. package/fesm2020/ptsecurity-mosaic.mjs.map +1 -0
  469. package/form-field/README.md +0 -0
  470. package/form-field/cleaner.d.ts +2 -0
  471. package/form-field/package.json +5 -5
  472. package/icon/README.md +0 -0
  473. package/icon/package.json +5 -5
  474. package/input/input-number-validators.d.ts +2 -2
  475. package/input/package.json +5 -5
  476. package/link/README.md +0 -0
  477. package/link/package.json +5 -5
  478. package/list/README.md +0 -0
  479. package/list/package.json +5 -5
  480. package/modal/README.md +34 -0
  481. package/modal/modal.component.d.ts +2 -0
  482. package/modal/modal.module.d.ts +1 -1
  483. package/modal/package.json +5 -5
  484. package/navbar/README.md +41 -0
  485. package/navbar/navbar-item.component.d.ts +122 -34
  486. package/navbar/navbar.component.d.ts +37 -9
  487. package/navbar/navbar.module.d.ts +2 -1
  488. package/navbar/package.json +5 -5
  489. package/navbar/vertical-navbar.component.d.ts +15 -26
  490. package/package.json +299 -14
  491. package/popover/README.md +32 -0
  492. package/popover/package.json +5 -5
  493. package/popover/popover-confirm.component.d.ts +33 -0
  494. package/popover/popover.component.d.ts +14 -4
  495. package/popover/popover.module.d.ts +6 -3
  496. package/popover/public-api.d.ts +1 -0
  497. package/prebuilt-themes/dark-theme.css +1 -1
  498. package/prebuilt-themes/default-theme.css +1 -1
  499. package/prebuilt-visual/default-visual.css +1 -1
  500. package/progress-bar/README.md +0 -0
  501. package/progress-bar/package.json +5 -5
  502. package/progress-spinner/README.md +0 -0
  503. package/progress-spinner/package.json +5 -5
  504. package/radio/package.json +5 -5
  505. package/schematics/README.md +35 -0
  506. package/schematics/ng-update/data/index.d.ts +1 -0
  507. package/schematics/ng-update/data/index.js +10 -9
  508. package/schematics/ng-update/data/index.js.map +1 -1
  509. package/schematics/ng-update/data/symbol-removal.d.ts +2 -0
  510. package/schematics/ng-update/data/symbol-removal.js +5 -0
  511. package/schematics/ng-update/data/symbol-removal.js.map +1 -0
  512. package/schematics/ng-update/index.js +3 -3
  513. package/schematics/ng-update/index.js.map +1 -1
  514. package/schematics/ng-update/update-9.0.0/secondary-entry-points-migration.js +1 -2
  515. package/schematics/ng-update/update-9.0.0/secondary-entry-points-migration.js.map +1 -1
  516. package/schematics/ng-update/upgrade-data.js +2 -1
  517. package/schematics/ng-update/upgrade-data.js.map +1 -1
  518. package/schematics/tsconfig.lib.json +2 -2
  519. package/select/README.md +0 -0
  520. package/select/package.json +5 -5
  521. package/select/select.component.d.ts +2 -7
  522. package/sidebar/package.json +5 -5
  523. package/sidepanel/package.json +5 -5
  524. package/sidepanel/sidepanel-directives.d.ts +2 -0
  525. package/sidepanel/sidepanel.module.d.ts +2 -1
  526. package/splitter/package.json +5 -5
  527. package/splitter/splitter.component.d.ts +46 -5
  528. package/splitter/splitter.module.d.ts +1 -1
  529. package/table/README.md +0 -0
  530. package/table/package.json +5 -5
  531. package/tabs/README.md +0 -0
  532. package/tabs/package.json +5 -5
  533. package/tags/README.md +0 -0
  534. package/tags/package.json +5 -5
  535. package/textarea/README.md +0 -0
  536. package/textarea/package.json +5 -5
  537. package/timepicker/README.md +0 -0
  538. package/timepicker/package.json +5 -5
  539. package/toggle/package.json +5 -5
  540. package/tooltip/package.json +5 -5
  541. package/tooltip/tooltip.component.d.ts +12 -3
  542. package/tree/package.json +5 -5
  543. package/tree/padding.directive.d.ts +1 -1
  544. package/tree/tree-option.component.d.ts +1 -1
  545. package/tree/tree-selection.component.d.ts +2 -2
  546. package/tree/tree.module.d.ts +1 -1
  547. package/tree-select/README.md +0 -0
  548. package/tree-select/package.json +5 -5
  549. package/tree-select/tree-select.component.d.ts +2 -7
  550. package/bundles/ptsecurity-mosaic-autocomplete.umd.js +0 -1162
  551. package/bundles/ptsecurity-mosaic-autocomplete.umd.js.map +0 -1
  552. package/bundles/ptsecurity-mosaic-button-toggle.umd.js +0 -757
  553. package/bundles/ptsecurity-mosaic-button-toggle.umd.js.map +0 -1
  554. package/bundles/ptsecurity-mosaic-button.umd.js +0 -535
  555. package/bundles/ptsecurity-mosaic-button.umd.js.map +0 -1
  556. package/bundles/ptsecurity-mosaic-card.umd.js +0 -481
  557. package/bundles/ptsecurity-mosaic-card.umd.js.map +0 -1
  558. package/bundles/ptsecurity-mosaic-checkbox.umd.js +0 -764
  559. package/bundles/ptsecurity-mosaic-checkbox.umd.js.map +0 -1
  560. package/bundles/ptsecurity-mosaic-core.umd.js +0 -2887
  561. package/bundles/ptsecurity-mosaic-core.umd.js.map +0 -1
  562. package/bundles/ptsecurity-mosaic-datepicker.umd.js +0 -3357
  563. package/bundles/ptsecurity-mosaic-datepicker.umd.js.map +0 -1
  564. package/bundles/ptsecurity-mosaic-design-tokens.umd.js +0 -1872
  565. package/bundles/ptsecurity-mosaic-design-tokens.umd.js.map +0 -1
  566. package/bundles/ptsecurity-mosaic-divider.umd.js +0 -108
  567. package/bundles/ptsecurity-mosaic-divider.umd.js.map +0 -1
  568. package/bundles/ptsecurity-mosaic-dropdown.umd.js +0 -1519
  569. package/bundles/ptsecurity-mosaic-dropdown.umd.js.map +0 -1
  570. package/bundles/ptsecurity-mosaic-form-field.umd.js +0 -789
  571. package/bundles/ptsecurity-mosaic-form-field.umd.js.map +0 -1
  572. package/bundles/ptsecurity-mosaic-icon.umd.js +0 -452
  573. package/bundles/ptsecurity-mosaic-icon.umd.js.map +0 -1
  574. package/bundles/ptsecurity-mosaic-input.umd.js +0 -996
  575. package/bundles/ptsecurity-mosaic-input.umd.js.map +0 -1
  576. package/bundles/ptsecurity-mosaic-link.umd.js +0 -517
  577. package/bundles/ptsecurity-mosaic-link.umd.js.map +0 -1
  578. package/bundles/ptsecurity-mosaic-list.umd.js +0 -1250
  579. package/bundles/ptsecurity-mosaic-list.umd.js.map +0 -1
  580. package/bundles/ptsecurity-mosaic-modal.umd.js +0 -1304
  581. package/bundles/ptsecurity-mosaic-modal.umd.js.map +0 -1
  582. package/bundles/ptsecurity-mosaic-navbar.umd.js +0 -932
  583. package/bundles/ptsecurity-mosaic-navbar.umd.js.map +0 -1
  584. package/bundles/ptsecurity-mosaic-popover.umd.js +0 -655
  585. package/bundles/ptsecurity-mosaic-popover.umd.js.map +0 -1
  586. package/bundles/ptsecurity-mosaic-progress-bar.umd.js +0 -442
  587. package/bundles/ptsecurity-mosaic-progress-bar.umd.js.map +0 -1
  588. package/bundles/ptsecurity-mosaic-progress-spinner.umd.js +0 -450
  589. package/bundles/ptsecurity-mosaic-progress-spinner.umd.js.map +0 -1
  590. package/bundles/ptsecurity-mosaic-radio.umd.js +0 -903
  591. package/bundles/ptsecurity-mosaic-radio.umd.js.map +0 -1
  592. package/bundles/ptsecurity-mosaic-select.umd.js +0 -1608
  593. package/bundles/ptsecurity-mosaic-select.umd.js.map +0 -1
  594. package/bundles/ptsecurity-mosaic-sidebar.umd.js +0 -256
  595. package/bundles/ptsecurity-mosaic-sidebar.umd.js.map +0 -1
  596. package/bundles/ptsecurity-mosaic-sidepanel.umd.js +0 -950
  597. package/bundles/ptsecurity-mosaic-sidepanel.umd.js.map +0 -1
  598. package/bundles/ptsecurity-mosaic-splitter.umd.js +0 -438
  599. package/bundles/ptsecurity-mosaic-splitter.umd.js.map +0 -1
  600. package/bundles/ptsecurity-mosaic-table.umd.js +0 -83
  601. package/bundles/ptsecurity-mosaic-table.umd.js.map +0 -1
  602. package/bundles/ptsecurity-mosaic-tabs.umd.js +0 -2015
  603. package/bundles/ptsecurity-mosaic-tabs.umd.js.map +0 -1
  604. package/bundles/ptsecurity-mosaic-tags.umd.js +0 -1913
  605. package/bundles/ptsecurity-mosaic-tags.umd.js.map +0 -1
  606. package/bundles/ptsecurity-mosaic-textarea.umd.js +0 -666
  607. package/bundles/ptsecurity-mosaic-textarea.umd.js.map +0 -1
  608. package/bundles/ptsecurity-mosaic-timepicker.umd.js +0 -822
  609. package/bundles/ptsecurity-mosaic-timepicker.umd.js.map +0 -1
  610. package/bundles/ptsecurity-mosaic-toggle.umd.js +0 -559
  611. package/bundles/ptsecurity-mosaic-toggle.umd.js.map +0 -1
  612. package/bundles/ptsecurity-mosaic-tooltip.umd.js +0 -728
  613. package/bundles/ptsecurity-mosaic-tooltip.umd.js.map +0 -1
  614. package/bundles/ptsecurity-mosaic-tree-select.umd.js +0 -1370
  615. package/bundles/ptsecurity-mosaic-tree-select.umd.js.map +0 -1
  616. package/bundles/ptsecurity-mosaic-tree.umd.js +0 -2309
  617. package/bundles/ptsecurity-mosaic-tree.umd.js.map +0 -1
  618. package/bundles/ptsecurity-mosaic.umd.js +0 -11
  619. package/bundles/ptsecurity-mosaic.umd.js.map +0 -1
  620. package/esm2015/autocomplete/autocomplete.component.js +0 -163
  621. package/esm2015/button/button.component.js +0 -129
  622. package/esm2015/button/button.module.js +0 -42
  623. package/esm2015/button-toggle/button-toggle.component.js +0 -370
  624. package/esm2015/card/card.component.js +0 -88
  625. package/esm2015/checkbox/checkbox.js +0 -325
  626. package/esm2015/core/formatters/date/formatter.js +0 -287
  627. package/esm2015/core/formatters/date/templates/en-US.js +0 -280
  628. package/esm2015/core/formatters/date/templates/ru-RU.js +0 -280
  629. package/esm2015/core/formatters/number/formatter.js +0 -99
  630. package/esm2015/core/option/action.js +0 -131
  631. package/esm2015/core/option/optgroup.js +0 -40
  632. package/esm2015/core/option/option.js +0 -262
  633. package/esm2015/core/pop-up/pop-up-trigger.js +0 -273
  634. package/esm2015/core/pop-up/pop-up.js +0 -87
  635. package/esm2015/core/selection/pseudo-checkbox/pseudo-checkbox.js +0 -45
  636. package/esm2015/datepicker/calendar-body.component.js +0 -114
  637. package/esm2015/datepicker/calendar.component.js +0 -377
  638. package/esm2015/datepicker/datepicker-input.directive.js +0 -885
  639. package/esm2015/datepicker/datepicker-toggle.component.js +0 -94
  640. package/esm2015/datepicker/datepicker.component.js +0 -418
  641. package/esm2015/dropdown/dropdown-item.component.js +0 -142
  642. package/esm2015/dropdown/dropdown-trigger.directive.js +0 -478
  643. package/esm2015/dropdown/dropdown.component.js +0 -302
  644. package/esm2015/form-field/cleaner.js +0 -19
  645. package/esm2015/form-field/form-field.js +0 -224
  646. package/esm2015/icon/icon.component.js +0 -51
  647. package/esm2015/input/input-number-validators.js +0 -78
  648. package/esm2015/link/link.component.js +0 -108
  649. package/esm2015/list/list-selection.component.js +0 -708
  650. package/esm2015/list/list.component.js +0 -58
  651. package/esm2015/modal/modal.component.js +0 -506
  652. package/esm2015/modal/modal.module.js +0 -70
  653. package/esm2015/modal/modal.service.js +0 -117
  654. package/esm2015/navbar/navbar-item.component.js +0 -209
  655. package/esm2015/navbar/navbar.component.js +0 -118
  656. package/esm2015/navbar/navbar.module.js +0 -76
  657. package/esm2015/navbar/vertical-navbar.component.js +0 -140
  658. package/esm2015/popover/popover.component.js +0 -219
  659. package/esm2015/popover/popover.module.js +0 -21
  660. package/esm2015/progress-bar/progress-bar.component.js +0 -50
  661. package/esm2015/progress-spinner/progress-spinner.component.js +0 -54
  662. package/esm2015/radio/radio.component.js +0 -467
  663. package/esm2015/select/select.component.js +0 -1122
  664. package/esm2015/sidebar/sidebar.component.js +0 -155
  665. package/esm2015/sidepanel/sidepanel-container.component.js +0 -113
  666. package/esm2015/sidepanel/sidepanel-directives.js +0 -155
  667. package/esm2015/sidepanel/sidepanel.module.js +0 -70
  668. package/esm2015/sidepanel/sidepanel.service.js +0 -163
  669. package/esm2015/splitter/splitter.component.js +0 -331
  670. package/esm2015/splitter/splitter.module.js +0 -38
  671. package/esm2015/tabs/paginated-tab-header.js +0 -482
  672. package/esm2015/tabs/tab-body.component.js +0 -186
  673. package/esm2015/tabs/tab-group.component.js +0 -359
  674. package/esm2015/tabs/tab-header.component.js +0 -76
  675. package/esm2015/tabs/tab-nav-bar/tab-nav-bar.js +0 -118
  676. package/esm2015/tags/tag-list.component.js +0 -732
  677. package/esm2015/tags/tag.component.js +0 -382
  678. package/esm2015/timepicker/timepicker.directive.js +0 -652
  679. package/esm2015/toggle/toggle.component.js +0 -169
  680. package/esm2015/tooltip/tooltip.component.js +0 -260
  681. package/esm2015/tree/padding.directive.js +0 -114
  682. package/esm2015/tree/toggle.js +0 -89
  683. package/esm2015/tree/tree-option.component.js +0 -238
  684. package/esm2015/tree/tree-selection.component.js +0 -541
  685. package/esm2015/tree/tree.js +0 -23
  686. package/esm2015/tree/tree.module.js +0 -56
  687. package/esm2015/tree-select/tree-select.component.js +0 -900
  688. package/fesm2015/ptsecurity-mosaic-autocomplete.js.map +0 -1
  689. package/fesm2015/ptsecurity-mosaic-button-toggle.js.map +0 -1
  690. package/fesm2015/ptsecurity-mosaic-button.js +0 -174
  691. package/fesm2015/ptsecurity-mosaic-button.js.map +0 -1
  692. package/fesm2015/ptsecurity-mosaic-card.js.map +0 -1
  693. package/fesm2015/ptsecurity-mosaic-checkbox.js.map +0 -1
  694. package/fesm2015/ptsecurity-mosaic-core.js.map +0 -1
  695. package/fesm2015/ptsecurity-mosaic-datepicker.js.map +0 -1
  696. package/fesm2015/ptsecurity-mosaic-design-tokens.js.map +0 -1
  697. package/fesm2015/ptsecurity-mosaic-divider.js +0 -68
  698. package/fesm2015/ptsecurity-mosaic-divider.js.map +0 -1
  699. package/fesm2015/ptsecurity-mosaic-dropdown.js.map +0 -1
  700. package/fesm2015/ptsecurity-mosaic-form-field.js +0 -393
  701. package/fesm2015/ptsecurity-mosaic-form-field.js.map +0 -1
  702. package/fesm2015/ptsecurity-mosaic-icon.js +0 -93
  703. package/fesm2015/ptsecurity-mosaic-icon.js.map +0 -1
  704. package/fesm2015/ptsecurity-mosaic-input.js.map +0 -1
  705. package/fesm2015/ptsecurity-mosaic-link.js.map +0 -1
  706. package/fesm2015/ptsecurity-mosaic-list.js.map +0 -1
  707. package/fesm2015/ptsecurity-mosaic-modal.js.map +0 -1
  708. package/fesm2015/ptsecurity-mosaic-navbar.js +0 -539
  709. package/fesm2015/ptsecurity-mosaic-navbar.js.map +0 -1
  710. package/fesm2015/ptsecurity-mosaic-popover.js +0 -257
  711. package/fesm2015/ptsecurity-mosaic-popover.js.map +0 -1
  712. package/fesm2015/ptsecurity-mosaic-progress-bar.js.map +0 -1
  713. package/fesm2015/ptsecurity-mosaic-progress-spinner.js +0 -88
  714. package/fesm2015/ptsecurity-mosaic-progress-spinner.js.map +0 -1
  715. package/fesm2015/ptsecurity-mosaic-radio.js.map +0 -1
  716. package/fesm2015/ptsecurity-mosaic-select.js.map +0 -1
  717. package/fesm2015/ptsecurity-mosaic-sidebar.js.map +0 -1
  718. package/fesm2015/ptsecurity-mosaic-sidepanel.js.map +0 -1
  719. package/fesm2015/ptsecurity-mosaic-splitter.js +0 -373
  720. package/fesm2015/ptsecurity-mosaic-splitter.js.map +0 -1
  721. package/fesm2015/ptsecurity-mosaic-table.js.map +0 -1
  722. package/fesm2015/ptsecurity-mosaic-tabs.js.map +0 -1
  723. package/fesm2015/ptsecurity-mosaic-tags.js.map +0 -1
  724. package/fesm2015/ptsecurity-mosaic-textarea.js.map +0 -1
  725. package/fesm2015/ptsecurity-mosaic-timepicker.js.map +0 -1
  726. package/fesm2015/ptsecurity-mosaic-toggle.js.map +0 -1
  727. package/fesm2015/ptsecurity-mosaic-tooltip.js +0 -323
  728. package/fesm2015/ptsecurity-mosaic-tooltip.js.map +0 -1
  729. package/fesm2015/ptsecurity-mosaic-tree-select.js.map +0 -1
  730. package/fesm2015/ptsecurity-mosaic-tree.js.map +0 -1
  731. package/fesm2015/ptsecurity-mosaic.js.map +0 -1
@@ -0,0 +1,2688 @@
1
+ import * as i2$1 from '@angular/cdk/bidi';
2
+ import { BidiModule } from '@angular/cdk/bidi';
3
+ import * as i0 from '@angular/core';
4
+ import { InjectionToken, isDevMode, NgModule, Optional, Inject, Directive, Injectable, Pipe, Component, ChangeDetectionStrategy, ViewEncapsulation, Input, EventEmitter, Output, ContentChild, ContentChildren, TemplateRef } from '@angular/core';
5
+ import { coerceBooleanProperty, coerceNumberProperty } from '@angular/cdk/coercion';
6
+ import { Subject } from 'rxjs';
7
+ import MessageFormat from '@messageformat/core';
8
+ import * as i1 from '@ptsecurity/cdk/datetime';
9
+ import { MC_DATE_LOCALE } from '@ptsecurity/cdk/datetime';
10
+ import { RequiredValidator } from '@angular/forms';
11
+ import * as i2 from '@angular/common';
12
+ import { CommonModule, DOCUMENT } from '@angular/common';
13
+ import * as i1$2 from '@angular/cdk/overlay';
14
+ import { Overlay } from '@angular/cdk/overlay';
15
+ import { trigger, state, style, transition, animate, group } from '@angular/animations';
16
+ import { ENTER, SPACE, TAB, ESCAPE } from '@ptsecurity/cdk/keycodes';
17
+ import * as i1$1 from '@angular/cdk/a11y';
18
+ import { takeUntil, distinctUntilChanged, delay } from 'rxjs/operators';
19
+ import { ComponentPortal } from '@angular/cdk/portal';
20
+
21
+ function isBoolean(val) { return typeof val === 'boolean'; }
22
+ function toBoolean(value) {
23
+ return value != null && `${value}` !== 'false';
24
+ }
25
+
26
+ // Injection token that configures whether the Mosaic sanity checks are enabled.
27
+ const MC_SANITY_CHECKS = new InjectionToken('mc-sanity-checks', {
28
+ providedIn: 'root',
29
+ factory: mcSanityChecksFactory
30
+ });
31
+ function mcSanityChecksFactory() {
32
+ return true;
33
+ }
34
+ /**
35
+ * Module that captures anything that should be loaded and/or run for *all* Mosaic
36
+ * components. This includes Bidi, etc.
37
+ *
38
+ * This module should be imported to each top-level component module (e.g., McTabsModule).
39
+ */
40
+ class McCommonModule {
41
+ constructor(_sanityChecksEnabled) {
42
+ this._sanityChecksEnabled = _sanityChecksEnabled;
43
+ // Whether we've done the global sanity checks (e.g. a theme is loaded, there is a doctype).
44
+ this.hasDoneGlobalChecks = false;
45
+ // Reference to the global `document` object.
46
+ // tslint:disable-next-line: orthodox-getter-and-setter
47
+ this._document = typeof document === 'object' && document ? document : null;
48
+ // Reference to the global 'window' object.
49
+ // tslint:disable-next-line: orthodox-getter-and-setter
50
+ this._window = typeof window === 'object' && window ? window : null;
51
+ if (this.areChecksEnabled() && !this.hasDoneGlobalChecks) {
52
+ this.checkDoctypeIsDefined();
53
+ this.checkThemeIsPresent();
54
+ this.hasDoneGlobalChecks = true;
55
+ }
56
+ }
57
+ // Whether any sanity checks are enabled
58
+ areChecksEnabled() {
59
+ return this._sanityChecksEnabled && isDevMode() && !this.isTestEnv();
60
+ }
61
+ // Whether the code is running in tests.
62
+ isTestEnv() {
63
+ // tslint:disable-next-line
64
+ return this._window && (this._window['__karma__'] || this._window['jasmine']);
65
+ }
66
+ checkDoctypeIsDefined() {
67
+ if (this._document && !this._document.doctype) {
68
+ console.warn('Current document does not have a doctype. This may cause ' +
69
+ 'some Mosaic components not to behave as expected.');
70
+ }
71
+ }
72
+ checkThemeIsPresent() {
73
+ if (this._document && typeof getComputedStyle === 'function') {
74
+ const testElement = this._document.createElement('div');
75
+ testElement.classList.add('mc-theme-loaded-marker');
76
+ this._document.body.appendChild(testElement);
77
+ const computedStyle = getComputedStyle(testElement);
78
+ // In some situations, the computed style of the test element can be null. For example in
79
+ // Firefox, the computed style is null if an application is running inside of a hidden iframe.
80
+ // See: https://bugzilla.mozilla.org/show_bug.cgi?id=548397
81
+ if (computedStyle && computedStyle.display !== 'none') {
82
+ console.warn('Could not find Mosaic core theme. Most Mosaic ' +
83
+ 'components may not work as expected. For more info refer ' +
84
+ 'to the theming guide: link there');
85
+ }
86
+ this._document.body.removeChild(testElement);
87
+ }
88
+ }
89
+ }
90
+ /** @nocollapse */ /** @nocollapse */ McCommonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McCommonModule, deps: [{ token: MC_SANITY_CHECKS, optional: true }], target: i0.ɵɵFactoryTarget.NgModule });
91
+ /** @nocollapse */ /** @nocollapse */ McCommonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McCommonModule, imports: [BidiModule], exports: [BidiModule] });
92
+ /** @nocollapse */ /** @nocollapse */ McCommonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McCommonModule, imports: [[BidiModule], BidiModule] });
93
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McCommonModule, decorators: [{
94
+ type: NgModule,
95
+ args: [{
96
+ imports: [BidiModule],
97
+ exports: [BidiModule]
98
+ }]
99
+ }], ctorParameters: function () { return [{ type: undefined, decorators: [{
100
+ type: Optional
101
+ }, {
102
+ type: Inject,
103
+ args: [MC_SANITY_CHECKS]
104
+ }] }]; } });
105
+
106
+ function mixinDisabled(base) {
107
+ return class extends base {
108
+ constructor(...args) {
109
+ // tslint:disable-next-line
110
+ super(...args);
111
+ this._disabled = false;
112
+ }
113
+ get disabled() {
114
+ return this._disabled;
115
+ }
116
+ set disabled(value) {
117
+ this._disabled = coerceBooleanProperty(value);
118
+ }
119
+ };
120
+ }
121
+
122
+ var ThemePalette;
123
+ (function (ThemePalette) {
124
+ ThemePalette["Primary"] = "primary";
125
+ ThemePalette["Second"] = "second";
126
+ ThemePalette["Error"] = "error";
127
+ ThemePalette["Default"] = "second";
128
+ ThemePalette["Empty"] = "";
129
+ })(ThemePalette || (ThemePalette = {}));
130
+ function mixinColor(base, defaultColor = ThemePalette.Default) {
131
+ return class extends base {
132
+ constructor(...args) {
133
+ super(...args);
134
+ this.color = defaultColor;
135
+ }
136
+ get color() { return this._color; }
137
+ set color(value) {
138
+ const colorPalette = value || defaultColor;
139
+ if (colorPalette !== this._color) {
140
+ if (this._color) {
141
+ this._elementRef.nativeElement.classList.remove(`mc-${this._color}`);
142
+ }
143
+ if (colorPalette) {
144
+ this._elementRef.nativeElement.classList.add(`mc-${colorPalette}`);
145
+ }
146
+ this._color = colorPalette;
147
+ }
148
+ }
149
+ };
150
+ }
151
+
152
+ function mixinTabIndex(base, defaultTabIndex = 0) {
153
+ return class extends base {
154
+ constructor(...args) {
155
+ super(...args);
156
+ this.defaultTabIndex = defaultTabIndex;
157
+ this._tabIndex = defaultTabIndex;
158
+ }
159
+ get tabIndex() {
160
+ return this.disabled ? -1 : this._tabIndex;
161
+ }
162
+ set tabIndex(value) {
163
+ // If the specified tabIndex value is null or undefined, fall back to the default value.
164
+ this._tabIndex = value != null ? coerceNumberProperty(value) : this.defaultTabIndex;
165
+ }
166
+ };
167
+ }
168
+
169
+ /**
170
+ * Mixin to augment a directive with updateErrorState method.
171
+ * For component with `errorState` and need to update `errorState`.
172
+ */
173
+ function mixinErrorState(base) {
174
+ return class extends base {
175
+ constructor(...args) {
176
+ super(...args);
177
+ /** Whether the component is in an error state. */
178
+ this.errorState = false;
179
+ /**
180
+ * Stream that emits whenever the state of the input changes such that the wrapping
181
+ * `MatFormField` needs to run change detection.
182
+ */
183
+ this.stateChanges = new Subject();
184
+ }
185
+ updateErrorState() {
186
+ const oldState = this.errorState;
187
+ const parent = this.parentFormGroup || this.parentForm;
188
+ const matcher = this.errorStateMatcher || this.defaultErrorStateMatcher;
189
+ const control = this.ngControl ? this.ngControl.control : null;
190
+ const newState = matcher.isErrorState(control, parent);
191
+ if (newState !== oldState) {
192
+ this.errorState = newState;
193
+ this.stateChanges.next();
194
+ }
195
+ }
196
+ };
197
+ }
198
+
199
+ /**
200
+ * Shared directive to count lines inside a text area, such as a list item.
201
+ * Line elements can be extracted with a @ContentChildren(McLine) query, then
202
+ * counted by checking the query list's length.
203
+ */
204
+ class McLine {
205
+ }
206
+ /** @nocollapse */ /** @nocollapse */ McLine.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McLine, deps: [], target: i0.ɵɵFactoryTarget.Directive });
207
+ /** @nocollapse */ /** @nocollapse */ McLine.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.1", type: McLine, selector: "[mc-line], [mcLine]", host: { classAttribute: "mc-line" }, ngImport: i0 });
208
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McLine, decorators: [{
209
+ type: Directive,
210
+ args: [{
211
+ selector: '[mc-line], [mcLine]',
212
+ host: { class: 'mc-line' }
213
+ }]
214
+ }] });
215
+ /**
216
+ * Helper that takes a query list of lines and sets the correct class on the host.
217
+ * @docs-private
218
+ */
219
+ class McLineSetter {
220
+ constructor(_lines, _element) {
221
+ this._lines = _lines;
222
+ this._element = _element;
223
+ this.setLineClass(this._lines.length);
224
+ this._lines.changes.subscribe(() => {
225
+ this.setLineClass(this._lines.length);
226
+ });
227
+ }
228
+ setLineClass(count) {
229
+ const minLineClassNumber = 2;
230
+ const maxLineClassNumber = 3;
231
+ this.resetClasses();
232
+ if (count === minLineClassNumber || count === maxLineClassNumber) {
233
+ this.setClass(`mc-${count}-line`, true);
234
+ }
235
+ else if (count > maxLineClassNumber) {
236
+ this.setClass(`mc-multi-line`, true);
237
+ }
238
+ }
239
+ resetClasses() {
240
+ this.setClass('mc-2-line', false);
241
+ this.setClass('mc-3-line', false);
242
+ this.setClass('mc-multi-line', false);
243
+ }
244
+ setClass(className, isAdd) {
245
+ if (isAdd) {
246
+ this._element.nativeElement.classList.add(className);
247
+ }
248
+ else {
249
+ this._element.nativeElement.classList.remove(className);
250
+ }
251
+ }
252
+ }
253
+ class McLineModule {
254
+ }
255
+ /** @nocollapse */ /** @nocollapse */ McLineModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McLineModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
256
+ /** @nocollapse */ /** @nocollapse */ McLineModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McLineModule, declarations: [McLine], exports: [McLine] });
257
+ /** @nocollapse */ /** @nocollapse */ McLineModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McLineModule, imports: [[]] });
258
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McLineModule, decorators: [{
259
+ type: NgModule,
260
+ args: [{
261
+ imports: [],
262
+ exports: [McLine],
263
+ declarations: [McLine]
264
+ }]
265
+ }] });
266
+
267
+ /** Error state matcher that matches when a control is invalid and dirty. */
268
+ class ShowOnDirtyErrorStateMatcher {
269
+ isErrorState(control, form) {
270
+ return !!(control && control.invalid && (control.dirty || (form && form.submitted)));
271
+ }
272
+ }
273
+ /** @nocollapse */ /** @nocollapse */ ShowOnDirtyErrorStateMatcher.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: ShowOnDirtyErrorStateMatcher, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
274
+ /** @nocollapse */ /** @nocollapse */ ShowOnDirtyErrorStateMatcher.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: ShowOnDirtyErrorStateMatcher });
275
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: ShowOnDirtyErrorStateMatcher, decorators: [{
276
+ type: Injectable
277
+ }] });
278
+ /** Provider that defines how form controls behave with regards to displaying error messages. */
279
+ class ErrorStateMatcher {
280
+ isErrorState(control, form) {
281
+ return !!(control && control.invalid && (control.touched || (form && form.submitted)));
282
+ }
283
+ }
284
+ /** @nocollapse */ /** @nocollapse */ ErrorStateMatcher.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: ErrorStateMatcher, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
285
+ /** @nocollapse */ /** @nocollapse */ ErrorStateMatcher.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: ErrorStateMatcher, providedIn: 'root' });
286
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: ErrorStateMatcher, decorators: [{
287
+ type: Injectable,
288
+ args: [{ providedIn: 'root' }]
289
+ }] });
290
+
291
+ const enUS = {
292
+ relativeTemplates: {
293
+ short: {
294
+ BEFORE_YESTERDAY: '{CURRENT_YEAR, select, yes{{SHORT_DATE}, {TIME}} other{{SHORT_DATE}, {YEAR}}}',
295
+ YESTERDAY: 'Yesterday, {TIME}',
296
+ TODAY: 'Today, {TIME}',
297
+ TOMORROW: 'Tomorrow, {TIME}',
298
+ AFTER_TOMORROW: '{CURRENT_YEAR, select, yes{{SHORT_DATE}, {TIME}} other{{SHORT_DATE}, {YEAR}}}'
299
+ },
300
+ long: {
301
+ BEFORE_YESTERDAY: '{CURRENT_YEAR, select, yes{{DATE}, {TIME}} other{{DATE}, {YEAR}}}',
302
+ YESTERDAY: 'Yesterday, {TIME}',
303
+ TODAY: 'Today, {TIME}',
304
+ TOMORROW: 'Tomorrow, {TIME}',
305
+ AFTER_TOMORROW: '{CURRENT_YEAR, select, yes{{DATE}, {TIME}} other{{DATE}, {YEAR}}}'
306
+ }
307
+ },
308
+ absoluteTemplates: {
309
+ short: {
310
+ DATE: '{CURRENT_YEAR, select, yes{{SHORT_DATE}} other{{SHORT_DATE}, {YEAR}}}',
311
+ DATETIME: `{
312
+ CURRENT_YEAR,
313
+ select,
314
+ yes{{SHORT_DATE}, {TIME}}
315
+ other{{SHORT_DATE}, {YEAR}, {TIME}}
316
+ }{
317
+ SHOW_MILLISECONDS,
318
+ select,
319
+ yes{:{SECONDS}{MILLISECONDS}}
320
+ other{}
321
+ }`
322
+ },
323
+ long: {
324
+ DATE: '{CURRENT_YEAR, select, yes{{DATE}} other{{DATE}, {YEAR}}}',
325
+ DATETIME: `{
326
+ CURRENT_YEAR,
327
+ select,
328
+ yes{{DATE}, {TIME}}
329
+ other{{DATE}, {YEAR}, {TIME}}
330
+ }{
331
+ SHOW_MILLISECONDS,
332
+ select,
333
+ yes{:{SECONDS}{MILLISECONDS}}
334
+ other{}
335
+ }`
336
+ }
337
+ },
338
+ rangeTemplates: {
339
+ closedRange: {
340
+ short: {
341
+ START_DATE: '{CURRENT_YEAR, select, yes{{SHORT_DATE}} other{{SHORT_DATE}, {YEAR}}}',
342
+ END_DATE: `{
343
+ SAME_MONTH,
344
+ select,
345
+ yes{{DAY}}
346
+ other{{
347
+ CURRENT_YEAR,
348
+ select,
349
+ yes{{SHORT_DATE}}
350
+ other{{SHORT_DATE}, {YEAR}}
351
+ }}
352
+ }`,
353
+ DATE: `{
354
+ SAME_MONTH,
355
+ select,
356
+ yes{{START_DATE}{DASH}{END_DATE}}
357
+ other{{START_DATE}{LONG_DASH}{END_DATE}}
358
+ }`,
359
+ START_DATETIME: `{
360
+ SAME_DAY,
361
+ select,
362
+ yes{{TIME}}
363
+ other{{
364
+ CURRENT_YEAR,
365
+ select,
366
+ yes{{SHORT_DATE}, {TIME}}
367
+ other{{SHORT_DATE}, {YEAR}, {TIME}}
368
+ }}
369
+ }`,
370
+ END_DATETIME: `{
371
+ SAME_DAY,
372
+ select,
373
+ yes{{
374
+ CURRENT_YEAR,
375
+ select,
376
+ yes{{TIME}, {SHORT_DATE}}
377
+ other{{TIME}, {SHORT_DATE}, {YEAR}}
378
+ }}
379
+ other{{
380
+ CURRENT_YEAR,
381
+ select,
382
+ yes{{SHORT_DATE}, {TIME}}
383
+ other{{SHORT_DATE}, {YEAR}, {TIME}}
384
+ }}
385
+ }`,
386
+ DATETIME: `{
387
+ SAME_DAY,
388
+ select,
389
+ yes{{START_DATETIME}{DASH}{END_DATETIME}}
390
+ other{{START_DATETIME}{LONG_DASH}{END_DATETIME}}
391
+ }`
392
+ },
393
+ middle: {
394
+ START_DATE: `{
395
+ SAME_MONTH,
396
+ select,
397
+ yes{{DAY}}
398
+ other{{
399
+ CURRENT_YEAR,
400
+ select,
401
+ yes{{DATE}}
402
+ other{{DATE}, {YEAR}}
403
+ }}
404
+ }`,
405
+ END_DATE: '{CURRENT_YEAR, select, yes{{DATE}} other{{DATE}, {YEAR}}}',
406
+ DATE: `{
407
+ SAME_MONTH,
408
+ select,
409
+ yes{{START_DATE}{DASH}{END_DATE}}
410
+ other{{START_DATE}{LONG_DASH}{END_DATE}}
411
+ }`,
412
+ START_DATETIME: `{
413
+ SAME_DAY,
414
+ select,
415
+ yes{{TIME}}
416
+ other{{
417
+ CURRENT_YEAR,
418
+ select,
419
+ yes{{DATE}, {TIME}}
420
+ other{{DATE}, {YEAR}, {TIME}}
421
+ }}
422
+ }`,
423
+ END_DATETIME: `{
424
+ SAME_DAY,
425
+ select,
426
+ yes{{
427
+ CURRENT_YEAR,
428
+ select,
429
+ yes{{TIME}, {DATE}}
430
+ other{{TIME}, {DATE}, {YEAR}}
431
+ }}
432
+ other{{
433
+ CURRENT_YEAR,
434
+ select,
435
+ yes{{DATE}, {TIME}}
436
+ other{{DATE}, {YEAR}, {TIME}}
437
+ }}
438
+ }`,
439
+ DATETIME: `{
440
+ SAME_DAY,
441
+ select,
442
+ yes{{START_DATETIME}{DASH}{END_DATETIME}}
443
+ other{{START_DATETIME}{LONG_DASH}{END_DATETIME}}
444
+ }`
445
+ },
446
+ long: {
447
+ START_DATE: '{CURRENT_YEAR, select, yes{{DATE}} other{{DATE}, {YEAR}}}',
448
+ END_DATE: `{
449
+ SAME_MONTH,
450
+ select,
451
+ yes{{DAY}}
452
+ other{{
453
+ CURRENT_YEAR,
454
+ select,
455
+ yes{{DATE}}
456
+ other{{DATE}, {YEAR}}
457
+ }}
458
+ }`,
459
+ DATE: `{
460
+ SAME_MONTH,
461
+ select,
462
+ yes{{START_DATE}{DASH}{END_DATE}}
463
+ other{{START_DATE}{LONG_DASH}{END_DATE}}
464
+ }`,
465
+ START_DATETIME: `{
466
+ SAME_DAY,
467
+ select,
468
+ yes{{
469
+ CURRENT_YEAR,
470
+ select,
471
+ yes{{DATE}, from{NBSP}{TIME}}
472
+ other{{DATE}, {YEAR}, from{NBSP}{TIME}}
473
+ }}
474
+ other{{
475
+ CURRENT_YEAR,
476
+ select,
477
+ yes{{DATE}, {TIME}}
478
+ other{{DATE}, {YEAR}, {TIME}}
479
+ }}
480
+ }`,
481
+ END_DATETIME: `{
482
+ SAME_DAY,
483
+ select,
484
+ yes{to{NBSP}{TIME}}
485
+ other{{
486
+ CURRENT_YEAR,
487
+ select,
488
+ yes{{DATE}, {TIME}}
489
+ other{{DATE}, {YEAR}, {TIME}}
490
+ }}
491
+ }`,
492
+ DATETIME: `{
493
+ SAME_DAY,
494
+ select,
495
+ yes{{START_DATETIME} {END_DATETIME}}
496
+ other{From {START_DATETIME} to{NBSP}{END_DATETIME}}
497
+ }`
498
+ }
499
+ },
500
+ openedRange: {
501
+ short: {
502
+ START_DATE: `{
503
+ CURRENT_YEAR,
504
+ select,
505
+ yes{{SHORT_DATE}}
506
+ other{{SHORT_DATE} {YEAR}}
507
+ }`,
508
+ END_DATE: '{CURRENT_YEAR, select, yes{{SHORT_DATE}} other{{SHORT_DATE} {YEAR}}}',
509
+ DATE: `{
510
+ RANGE_TYPE,
511
+ select,
512
+ onlyStart{From{NBSP}{START_DATE}}
513
+ other{Until{NBSP}{END_DATE}}
514
+ }`,
515
+ START_DATETIME: `{
516
+ CURRENT_YEAR,
517
+ select,
518
+ yes{{SHORT_DATE}, {TIME}}
519
+ other{{SHORT_DATE} {YEAR}, {TIME}}
520
+ }`,
521
+ END_DATETIME: `{
522
+ CURRENT_YEAR,
523
+ select,
524
+ yes{{SHORT_DATE}, {TIME}}
525
+ other{{SHORT_DATE} {YEAR}, {TIME}}
526
+ }`,
527
+ DATETIME: `{
528
+ RANGE_TYPE,
529
+ select,
530
+ onlyStart{From{NBSP}{START_DATETIME}}
531
+ other{Until{NBSP}{END_DATETIME}}
532
+ }`
533
+ },
534
+ long: {
535
+ START_DATE: `{
536
+ CURRENT_YEAR,
537
+ select,
538
+ yes{{DATE}}
539
+ other{{DATE} {YEAR}}
540
+ }`,
541
+ END_DATE: '{CURRENT_YEAR, select, yes{{DATE}} other{{DATE} {YEAR}}}',
542
+ DATE: `{
543
+ RANGE_TYPE,
544
+ select,
545
+ onlyStart{From{NBSP}{START_DATE}}
546
+ other{Until{NBSP}{END_DATE}}
547
+ }`,
548
+ START_DATETIME: `{
549
+ CURRENT_YEAR,
550
+ select,
551
+ yes{{DATE}, {TIME}}
552
+ other{{DATE} {YEAR}, {TIME}}
553
+ }`,
554
+ END_DATETIME: `{
555
+ CURRENT_YEAR,
556
+ select,
557
+ yes{{DATE}, {TIME}}
558
+ other{{DATE} {YEAR}, {TIME}}
559
+ }`,
560
+ DATETIME: `{
561
+ RANGE_TYPE,
562
+ select,
563
+ onlyStart{From{NBSP}{START_DATETIME}}
564
+ other{Until{NBSP}{END_DATETIME}}
565
+ }`
566
+ }
567
+ }
568
+ }
569
+ };
570
+
571
+ const ruRU = {
572
+ relativeTemplates: {
573
+ short: {
574
+ BEFORE_YESTERDAY: '{CURRENT_YEAR, select, yes{{SHORT_DATE}, {TIME}} other{{SHORT_DATE} {YEAR}}}',
575
+ YESTERDAY: 'Вчера, {TIME}',
576
+ TODAY: 'Сегодня, {TIME}',
577
+ TOMORROW: 'Завтра, {TIME}',
578
+ AFTER_TOMORROW: '{CURRENT_YEAR, select, yes{{SHORT_DATE}, {TIME}} other{{SHORT_DATE} {YEAR}}}'
579
+ },
580
+ long: {
581
+ BEFORE_YESTERDAY: '{CURRENT_YEAR, select, yes{{DATE}, {TIME}} other{{DATE} {YEAR}}}',
582
+ YESTERDAY: 'Вчера, {TIME}',
583
+ TODAY: 'Сегодня, {TIME}',
584
+ TOMORROW: 'Завтра, {TIME}',
585
+ AFTER_TOMORROW: '{CURRENT_YEAR, select, yes{{DATE}, {TIME}} other{{DATE} {YEAR}}}'
586
+ }
587
+ },
588
+ absoluteTemplates: {
589
+ short: {
590
+ DATE: '{CURRENT_YEAR, select, yes{{SHORT_DATE}} other{{SHORT_DATE} {YEAR}}}',
591
+ DATETIME: `{
592
+ CURRENT_YEAR,
593
+ select,
594
+ yes{{SHORT_DATE}, {TIME}}
595
+ other{{SHORT_DATE} {YEAR}, {TIME}}
596
+ }{
597
+ SHOW_MILLISECONDS,
598
+ select,
599
+ yes{:{SECONDS}{MILLISECONDS}}
600
+ other{}
601
+ }`
602
+ },
603
+ long: {
604
+ DATE: '{CURRENT_YEAR, select, yes{{DATE}} other{{DATE} {YEAR}}}',
605
+ DATETIME: `{
606
+ CURRENT_YEAR,
607
+ select,
608
+ yes{{DATE}, {TIME}}
609
+ other{{DATE} {YEAR}, {TIME}}
610
+ }{
611
+ SHOW_MILLISECONDS,
612
+ select,
613
+ yes{:{SECONDS}{MILLISECONDS}}
614
+ other{}
615
+ }`
616
+ }
617
+ },
618
+ rangeTemplates: {
619
+ closedRange: {
620
+ short: {
621
+ START_DATE: `{
622
+ SAME_MONTH,
623
+ select,
624
+ yes{{DAY}}
625
+ other{{
626
+ CURRENT_YEAR,
627
+ select,
628
+ yes{{SHORT_DATE}}
629
+ other{{SHORT_DATE} {YEAR}}
630
+ }}
631
+ }`,
632
+ END_DATE: '{CURRENT_YEAR, select, yes{{SHORT_DATE}} other{{SHORT_DATE} {YEAR}}}',
633
+ DATE: `{
634
+ SAME_MONTH,
635
+ select,
636
+ yes{{START_DATE}{DASH}{END_DATE}}
637
+ other{{START_DATE}{LONG_DASH}{END_DATE}}
638
+ }`,
639
+ START_DATETIME: `{
640
+ SAME_DAY,
641
+ select,
642
+ yes{{TIME}}
643
+ other{{
644
+ CURRENT_YEAR,
645
+ select,
646
+ yes{{SHORT_DATE}, {TIME}}
647
+ other{{SHORT_DATE} {YEAR}, {TIME}}
648
+ }}
649
+ }`,
650
+ END_DATETIME: `{
651
+ SAME_DAY,
652
+ select,
653
+ yes{{
654
+ CURRENT_YEAR,
655
+ select,
656
+ yes{{TIME}, {SHORT_DATE}}
657
+ other{{TIME}, {SHORT_DATE} {YEAR}}
658
+ }}
659
+ other{{
660
+ CURRENT_YEAR,
661
+ select,
662
+ yes{{SHORT_DATE}, {TIME}}
663
+ other{{SHORT_DATE} {YEAR}, {TIME}}
664
+ }}
665
+ }`,
666
+ DATETIME: `{
667
+ SAME_DAY,
668
+ select,
669
+ yes{{START_DATETIME}{DASH}{END_DATETIME}}
670
+ other{{START_DATETIME}{LONG_DASH}{END_DATETIME}}
671
+ }`
672
+ },
673
+ middle: {
674
+ START_DATE: `{
675
+ SAME_MONTH,
676
+ select,
677
+ yes{{DAY}}
678
+ other{{
679
+ CURRENT_YEAR,
680
+ select,
681
+ yes{{DATE}}
682
+ other{{DATE} {YEAR}}
683
+ }}
684
+ }`,
685
+ END_DATE: '{CURRENT_YEAR, select, yes{{DATE}} other{{DATE} {YEAR}}}',
686
+ DATE: `{
687
+ SAME_MONTH,
688
+ select,
689
+ yes{{START_DATE}{DASH}{END_DATE}}
690
+ other{{START_DATE}{LONG_DASH}{END_DATE}}
691
+ }`,
692
+ START_DATETIME: `{
693
+ SAME_DAY,
694
+ select,
695
+ yes{{TIME}}
696
+ other{{
697
+ CURRENT_YEAR,
698
+ select,
699
+ yes{{DATE}, {TIME}}
700
+ other{{DATE} {YEAR}, {TIME}}
701
+ }}
702
+ }`,
703
+ END_DATETIME: `{
704
+ SAME_DAY,
705
+ select,
706
+ yes{{
707
+ CURRENT_YEAR,
708
+ select,
709
+ yes{{TIME}, {DATE}}
710
+ other{{TIME}, {DATE} {YEAR}}
711
+ }}
712
+ other{{
713
+ CURRENT_YEAR,
714
+ select,
715
+ yes{{DATE}, {TIME}}
716
+ other{{DATE} {YEAR}, {TIME}}
717
+ }}
718
+ }`,
719
+ DATETIME: `{
720
+ SAME_DAY,
721
+ select,
722
+ yes{{START_DATETIME}{DASH}{END_DATETIME}}
723
+ other{{START_DATETIME}{LONG_DASH}{END_DATETIME}}
724
+ }`
725
+ },
726
+ long: {
727
+ START_DATE: `{
728
+ SAME_MONTH,
729
+ select,
730
+ yes{{DAY}}
731
+ other{{
732
+ CURRENT_YEAR,
733
+ select,
734
+ yes{{DATE}}
735
+ other{{DATE} {YEAR}}
736
+ }}
737
+ }`,
738
+ END_DATE: '{CURRENT_YEAR, select, yes{{DATE}} other{{DATE} {YEAR}}}',
739
+ DATE: `{
740
+ SAME_MONTH,
741
+ select,
742
+ yes{{START_DATE}{DASH}{END_DATE}}
743
+ other{{START_DATE}{LONG_DASH}{END_DATE}}
744
+ }`,
745
+ START_DATETIME: `{
746
+ SAME_DAY,
747
+ select,
748
+ yes{{
749
+ CURRENT_YEAR,
750
+ select,
751
+ yes{{DATE}, с{NBSP}{TIME}}
752
+ other{{DATE} {YEAR}, с{NBSP}{TIME}}
753
+ }}
754
+ other{{
755
+ CURRENT_YEAR,
756
+ select,
757
+ yes{{DATE}, {TIME}}
758
+ other{{DATE} {YEAR}, {TIME}}
759
+ }}
760
+ }`,
761
+ END_DATETIME: `{
762
+ SAME_DAY,
763
+ select,
764
+ yes{по{NBSP}{TIME}}
765
+ other{{
766
+ CURRENT_YEAR,
767
+ select,
768
+ yes{{DATE}, {TIME}}
769
+ other{{DATE} {YEAR}, {TIME}}
770
+ }}
771
+ }`,
772
+ DATETIME: `{
773
+ SAME_DAY,
774
+ select,
775
+ yes{{START_DATETIME} {END_DATETIME}}
776
+ other{С{NBSP}{START_DATETIME} по{NBSP}{END_DATETIME}}
777
+ }`
778
+ }
779
+ },
780
+ openedRange: {
781
+ short: {
782
+ START_DATE: `{
783
+ CURRENT_YEAR,
784
+ select,
785
+ yes{{SHORT_DATE}}
786
+ other{{SHORT_DATE} {YEAR}}
787
+ }`,
788
+ END_DATE: '{CURRENT_YEAR, select, yes{{SHORT_DATE}} other{{SHORT_DATE} {YEAR}}}',
789
+ DATE: `{
790
+ RANGE_TYPE,
791
+ select,
792
+ onlyStart{С{NBSP}{START_DATE}}
793
+ other{По{NBSP}{END_DATE}}
794
+ }`,
795
+ START_DATETIME: `{
796
+ CURRENT_YEAR,
797
+ select,
798
+ yes{{SHORT_DATE}, {TIME}}
799
+ other{{SHORT_DATE} {YEAR}, {TIME}}
800
+ }`,
801
+ END_DATETIME: `{
802
+ CURRENT_YEAR,
803
+ select,
804
+ yes{{SHORT_DATE}, {TIME}}
805
+ other{{SHORT_DATE} {YEAR}, {TIME}}
806
+ }`,
807
+ DATETIME: `{
808
+ RANGE_TYPE,
809
+ select,
810
+ onlyStart{С{NBSP}{START_DATETIME}}
811
+ other{По{NBSP}{END_DATETIME}}
812
+ }`
813
+ },
814
+ long: {
815
+ START_DATE: `{
816
+ CURRENT_YEAR,
817
+ select,
818
+ yes{{DATE}}
819
+ other{{DATE} {YEAR}}
820
+ }`,
821
+ END_DATE: '{CURRENT_YEAR, select, yes{{DATE}} other{{DATE} {YEAR}}}',
822
+ DATE: `{
823
+ RANGE_TYPE,
824
+ select,
825
+ onlyStart{С{NBSP}{START_DATE}}
826
+ other{По{NBSP}{END_DATE}}
827
+ }`,
828
+ START_DATETIME: `{
829
+ CURRENT_YEAR,
830
+ select,
831
+ yes{{DATE}, {TIME}}
832
+ other{{DATE} {YEAR}, {TIME}}
833
+ }`,
834
+ END_DATETIME: `{
835
+ CURRENT_YEAR,
836
+ select,
837
+ yes{{DATE}, {TIME}}
838
+ other{{DATE} {YEAR}, {TIME}}
839
+ }`,
840
+ DATETIME: `{
841
+ RANGE_TYPE,
842
+ select,
843
+ onlyStart{С{NBSP}{START_DATETIME}}
844
+ other{По{NBSP}{END_DATETIME}}
845
+ }`
846
+ }
847
+ }
848
+ }
849
+ };
850
+
851
+ // tslint:disable:no-magic-numbers
852
+ class DateFormatter {
853
+ constructor(adapter, locale) {
854
+ this.adapter = adapter;
855
+ this.invalidDateErrorText = 'Invalid date';
856
+ this.config = locale === 'en' ? enUS : ruRU;
857
+ this.messageFormat = new MessageFormat(locale);
858
+ }
859
+ setLocale(locale) {
860
+ this.config = locale === 'en' ? enUS : ruRU;
861
+ this.adapter.setLocale(locale);
862
+ }
863
+ /**
864
+ * @param date - date
865
+ * @param template - template
866
+ * @returns relative date by template
867
+ */
868
+ relativeDate(date, template) {
869
+ if (!this.adapter.isDateInstance(date)) {
870
+ throw new Error(this.invalidDateErrorText);
871
+ }
872
+ const isBeforeYesterday = this.adapter.diffNow(date, 'days') <= -2;
873
+ const isYesterday = this.adapter.diffNow(date, 'days') <= -1 && this.adapter.diffNow(date, 'days') > -2;
874
+ const isToday = this.adapter.hasSame(this.adapter.today(), date, 'days');
875
+ const isTomorrow = this.adapter.diffNow(date, 'days') >= 1 && this.adapter.diffNow(date, 'days') < 2;
876
+ const isAfterTomorrow = this.adapter.diffNow(date, 'days') > 1;
877
+ const templateVariables = { ...this.adapter.config.variables, ...template.variables };
878
+ const variables = this.compileVariables(date, templateVariables);
879
+ let newTemplate;
880
+ if (isBeforeYesterday) {
881
+ newTemplate = template.BEFORE_YESTERDAY;
882
+ }
883
+ else if (isYesterday) {
884
+ newTemplate = template.YESTERDAY;
885
+ }
886
+ else if (isToday) {
887
+ newTemplate = template.TODAY;
888
+ }
889
+ else if (isTomorrow) {
890
+ newTemplate = template.TOMORROW;
891
+ }
892
+ else if (isAfterTomorrow) {
893
+ newTemplate = template.AFTER_TOMORROW;
894
+ }
895
+ return this.messageFormat.compile(newTemplate)(variables);
896
+ }
897
+ /**
898
+ * @param date - date
899
+ * @returns relative date in short format
900
+ */
901
+ relativeShortDate(date) {
902
+ return this.relativeDate(date, this.config.relativeTemplates.short);
903
+ }
904
+ /**
905
+ * @param date - date
906
+ * @returns relative date in long format
907
+ */
908
+ relativeLongDate(date) {
909
+ return this.relativeDate(date, this.config.relativeTemplates.long);
910
+ }
911
+ /**
912
+ * @param date - date
913
+ * @param params - parameters
914
+ * @param datetime - should time be shown as well
915
+ * @param milliseconds - should time with milliseconds be shown as well
916
+ * @returns absolute date in common format
917
+ */
918
+ absoluteDate(date, params, datetime = false, milliseconds = false) {
919
+ if (!this.adapter.isDateInstance(date)) {
920
+ throw new Error(this.invalidDateErrorText);
921
+ }
922
+ const variables = this.compileVariables(date, { ...this.adapter.config.variables, ...params.variables });
923
+ variables.SHOW_MILLISECONDS = milliseconds ? 'yes' : 'no';
924
+ const template = datetime ? params.DATETIME : params.DATE;
925
+ return this.messageFormat.compile(template)(variables);
926
+ }
927
+ /**
928
+ * @param date - date
929
+ * @returns absolute date in short format
930
+ */
931
+ absoluteShortDate(date) {
932
+ return this.absoluteDate(date, this.config.absoluteTemplates.short);
933
+ }
934
+ /**
935
+ * @param date - date
936
+ * @param options - AbsoluteDateTimeOptions
937
+ * @returns absolute date in short format with time
938
+ */
939
+ absoluteShortDateTime(date, options) {
940
+ return this.absoluteDate(date, this.config.absoluteTemplates.short, true, options?.milliseconds);
941
+ }
942
+ /**
943
+ * @param date - date
944
+ * @returns absolute date in long format
945
+ */
946
+ absoluteLongDate(date) {
947
+ return this.absoluteDate(date, this.config.absoluteTemplates.long);
948
+ }
949
+ /**
950
+ * @param date - date
951
+ * @param options - AbsoluteDateTimeOptions
952
+ * @returns absolute date in long format with time
953
+ */
954
+ absoluteLongDateTime(date, options) {
955
+ return this.absoluteDate(date, this.config.absoluteTemplates.long, true, options?.milliseconds);
956
+ }
957
+ /**
958
+ * @param startDate - start date
959
+ * @param endDate - end date
960
+ * @param template - template
961
+ * @returns opened date
962
+ */
963
+ openedRangeDate(startDate, endDate, template) {
964
+ if (!this.adapter.isDateInstance(startDate) && !this.adapter.isDateInstance(endDate)) {
965
+ throw new Error(this.invalidDateErrorText);
966
+ }
967
+ const variables = { ...this.adapter.config.variables, ...template.variables };
968
+ let params = {};
969
+ if (startDate) {
970
+ const startDateVariables = this.compileVariables(startDate, variables);
971
+ params = {
972
+ ...variables,
973
+ START_DATE: this.messageFormat.compile(template.START_DATE)(startDateVariables),
974
+ RANGE_TYPE: 'onlyStart'
975
+ };
976
+ }
977
+ else if (endDate) {
978
+ const endDateVariables = this.compileVariables(endDate, variables);
979
+ params = {
980
+ ...variables,
981
+ END_DATE: this.messageFormat.compile(template.END_DATE)(endDateVariables),
982
+ RANGE_TYPE: 'onlyEnd'
983
+ };
984
+ }
985
+ return this.messageFormat.compile(template.DATE)(params);
986
+ }
987
+ /**
988
+ * @param startDate - start date
989
+ * @param endDate - end date
990
+ * @param template - template
991
+ * @returns opened date
992
+ */
993
+ openedRangeDateTime(startDate, endDate, template) {
994
+ if (!this.adapter.isDateInstance(startDate) && !this.adapter.isDateInstance(endDate)) {
995
+ throw new Error(this.invalidDateErrorText);
996
+ }
997
+ const variables = { ...this.adapter.config.variables, ...template.variables };
998
+ let params = {};
999
+ if (startDate) {
1000
+ const startDateVariables = this.compileVariables(startDate, variables);
1001
+ params = {
1002
+ ...variables,
1003
+ START_DATETIME: this.messageFormat.compile(template.START_DATETIME)(startDateVariables),
1004
+ RANGE_TYPE: 'onlyStart'
1005
+ };
1006
+ }
1007
+ else if (endDate) {
1008
+ const endDateVariables = this.compileVariables(endDate, variables);
1009
+ params = {
1010
+ ...variables,
1011
+ END_DATETIME: this.messageFormat.compile(template.END_DATETIME)(endDateVariables),
1012
+ RANGE_TYPE: 'onlyEnd'
1013
+ };
1014
+ }
1015
+ return this.messageFormat.compile(template.DATETIME)(params);
1016
+ }
1017
+ /**
1018
+ * @param startDate - start date
1019
+ * @param endDate - end date
1020
+ * @param template - template
1021
+ * @returns range date in template format
1022
+ */
1023
+ rangeDate(startDate, endDate, template) {
1024
+ if (!this.adapter.isDateInstance(startDate) || !this.adapter.isDateInstance(endDate)) {
1025
+ throw new Error(this.invalidDateErrorText);
1026
+ }
1027
+ const variables = { ...this.adapter.config.variables, ...template.variables };
1028
+ const sameMonth = this.hasSame(startDate, endDate, 'month');
1029
+ const startDateVariables = this.compileVariables(startDate, variables);
1030
+ startDateVariables.SAME_MONTH = sameMonth;
1031
+ const endDateVariables = this.compileVariables(endDate, variables);
1032
+ endDateVariables.SAME_MONTH = sameMonth;
1033
+ const bothCurrentYear = startDateVariables.CURRENT_YEAR === 'yes' && endDateVariables.CURRENT_YEAR === 'yes';
1034
+ startDateVariables.CURRENT_YEAR = bothCurrentYear ? 'yes' : 'no';
1035
+ endDateVariables.CURRENT_YEAR = bothCurrentYear ? 'yes' : 'no';
1036
+ const params = {
1037
+ ...variables,
1038
+ START_DATE: this.messageFormat.compile(template.START_DATE)(startDateVariables),
1039
+ END_DATE: this.messageFormat.compile(template.END_DATE)(endDateVariables),
1040
+ SAME_MONTH: sameMonth
1041
+ };
1042
+ return this.messageFormat.compile(template.DATE)(params);
1043
+ }
1044
+ /**
1045
+ * @param startDate - start date
1046
+ * @param endDate - end date
1047
+ * @param template - template
1048
+ * @returns range date in template format with time
1049
+ */
1050
+ rangeDateTime(startDate, endDate, template) {
1051
+ if (!this.adapter.isDateInstance(startDate) || !this.adapter.isDateInstance(endDate)) {
1052
+ throw new Error(this.invalidDateErrorText);
1053
+ }
1054
+ const variables = { ...this.adapter.config.variables, ...template.variables };
1055
+ const sameMonth = this.hasSame(startDate, endDate, 'month');
1056
+ const sameDay = this.hasSame(startDate, endDate, 'day');
1057
+ const startDateVariables = this.compileVariables(startDate, variables);
1058
+ startDateVariables.SAME_MONTH = sameMonth;
1059
+ startDateVariables.SAME_DAY = sameDay;
1060
+ const endDateVariables = this.compileVariables(endDate, variables);
1061
+ endDateVariables.SAME_MONTH = sameMonth;
1062
+ endDateVariables.SAME_DAY = sameDay;
1063
+ const bothCurrentYear = startDateVariables.CURRENT_YEAR === 'yes' && endDateVariables.CURRENT_YEAR === 'yes';
1064
+ startDateVariables.CURRENT_YEAR = bothCurrentYear ? 'yes' : 'no';
1065
+ endDateVariables.CURRENT_YEAR = bothCurrentYear ? 'yes' : 'no';
1066
+ const params = {
1067
+ ...variables,
1068
+ START_DATETIME: this.messageFormat.compile(template.START_DATETIME)(startDateVariables),
1069
+ END_DATETIME: this.messageFormat.compile(template.END_DATETIME)(endDateVariables),
1070
+ SAME_MONTH: sameMonth,
1071
+ SAME_DAY: sameDay
1072
+ };
1073
+ return this.messageFormat.compile(template.DATETIME)(params);
1074
+ }
1075
+ /**
1076
+ * @param startDate - start date
1077
+ * @param endDate - end date
1078
+ * @returns range date in short format
1079
+ */
1080
+ rangeShortDate(startDate, endDate) {
1081
+ const rangeTemplates = this.config.rangeTemplates;
1082
+ if (startDate && endDate) {
1083
+ return this.rangeDate(startDate, endDate, rangeTemplates.closedRange.short);
1084
+ }
1085
+ return this.openedRangeDate(startDate, endDate || null, rangeTemplates.openedRange.short);
1086
+ }
1087
+ /**
1088
+ * @param startDate - start date
1089
+ * @param endDate - end date
1090
+ * @returns range date in short format with time
1091
+ */
1092
+ rangeShortDateTime(startDate, endDate) {
1093
+ const rangeTemplates = this.config.rangeTemplates;
1094
+ if (startDate && endDate) {
1095
+ return this.rangeDateTime(startDate, endDate, rangeTemplates.closedRange.short);
1096
+ }
1097
+ return this.openedRangeDateTime(startDate, endDate || null, rangeTemplates.openedRange.short);
1098
+ }
1099
+ /**
1100
+ * @param startDate - start date
1101
+ * @param endDate - end date
1102
+ * @returns range date in long format
1103
+ */
1104
+ rangeLongDate(startDate, endDate) {
1105
+ const rangeTemplates = this.config.rangeTemplates;
1106
+ if (startDate && endDate) {
1107
+ return this.rangeDate(startDate, endDate, rangeTemplates.closedRange.long);
1108
+ }
1109
+ return this.openedRangeDate(startDate, endDate || null, rangeTemplates.openedRange.long);
1110
+ }
1111
+ /**
1112
+ * @param startDate - start date
1113
+ * @param endDate - end date
1114
+ * @returns range date in long format with time
1115
+ */
1116
+ rangeLongDateTime(startDate, endDate) {
1117
+ const rangeTemplates = this.config.rangeTemplates;
1118
+ if (startDate && endDate) {
1119
+ return this.rangeDateTime(startDate, endDate, rangeTemplates.closedRange.long);
1120
+ }
1121
+ return this.openedRangeDateTime(startDate, endDate || null, rangeTemplates.openedRange.long);
1122
+ }
1123
+ /**
1124
+ * @param startDate - start date
1125
+ * @param endDate - end date
1126
+ * @returns range middle date with time
1127
+ */
1128
+ rangeMiddleDateTime(startDate, endDate) {
1129
+ return this.rangeDateTime(startDate, endDate, this.config.rangeTemplates.closedRange.middle);
1130
+ }
1131
+ compileVariables(date, variables) {
1132
+ const compiledVariables = {};
1133
+ // tslint:disable-next-line:no-for-in
1134
+ for (const key in variables) {
1135
+ if (!variables.hasOwnProperty(key)) {
1136
+ continue;
1137
+ }
1138
+ const value = variables[key];
1139
+ compiledVariables[key] = this.adapter.format(date, value);
1140
+ }
1141
+ compiledVariables.CURRENT_YEAR = this.hasSame(date, this.adapter.today(), 'year');
1142
+ return compiledVariables;
1143
+ }
1144
+ hasSame(startDate, endDate, unit) {
1145
+ return this.adapter.hasSame(startDate, endDate, unit) ? 'yes' : 'no';
1146
+ }
1147
+ }
1148
+ /** @nocollapse */ /** @nocollapse */ DateFormatter.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: DateFormatter, deps: [{ token: i1.DateAdapter }, { token: MC_DATE_LOCALE }], target: i0.ɵɵFactoryTarget.Injectable });
1149
+ /** @nocollapse */ /** @nocollapse */ DateFormatter.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: DateFormatter });
1150
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: DateFormatter, decorators: [{
1151
+ type: Injectable
1152
+ }], ctorParameters: function () { return [{ type: i1.DateAdapter }, { type: undefined, decorators: [{
1153
+ type: Inject,
1154
+ args: [MC_DATE_LOCALE]
1155
+ }] }]; } });
1156
+
1157
+ /* tslint:disable:naming-convention */
1158
+ const MC_LOCALE_ID = new InjectionToken('McLocaleId');
1159
+ const DEFAULT_MC_LOCALE_ID = 'ru';
1160
+ function isEmpty(value) {
1161
+ return value == null || value === '' || value !== value;
1162
+ }
1163
+ function strToNumber(value) {
1164
+ if (typeof value === 'string' && !isNaN(Number(value) - parseFloat(value))) {
1165
+ return Number(value);
1166
+ }
1167
+ if (typeof value !== 'number') {
1168
+ throw new Error(`${value} is not a number`);
1169
+ }
1170
+ return value;
1171
+ }
1172
+ const NUMBER_FORMAT_REGEXP = /^(\d+)?\.((\d+)(-(\d+))?)?$/;
1173
+ const minIntGroupPosition = 1;
1174
+ const minFractionGroupPosition = 3;
1175
+ const maxFractionGroupPosition = 5;
1176
+ class ParsedDigitsInfo {
1177
+ }
1178
+ function parseDigitsInfo(digitsInfo) {
1179
+ const parts = digitsInfo.match(NUMBER_FORMAT_REGEXP);
1180
+ if (parts === null) {
1181
+ throw new Error(`${digitsInfo} is not a valid digit info`);
1182
+ }
1183
+ const minIntPart = parts[minIntGroupPosition];
1184
+ const minFractionPart = parts[minFractionGroupPosition];
1185
+ const maxFractionPart = parts[maxFractionGroupPosition];
1186
+ const result = new ParsedDigitsInfo();
1187
+ if (minIntPart != null) {
1188
+ result.minimumIntegerDigits = parseInt(minIntPart);
1189
+ }
1190
+ if (minFractionPart != null) {
1191
+ result.minimumFractionDigits = parseInt(minFractionPart);
1192
+ }
1193
+ if (maxFractionPart != null) {
1194
+ result.maximumFractionDigits = parseInt(maxFractionPart);
1195
+ }
1196
+ else if (minFractionPart != null && result.minimumFractionDigits > result.maximumFractionDigits) {
1197
+ result.maximumFractionDigits = result.minimumFractionDigits;
1198
+ }
1199
+ return result;
1200
+ }
1201
+ class McDecimalPipe {
1202
+ constructor(_locale) {
1203
+ this._locale = _locale;
1204
+ }
1205
+ /**
1206
+ * @param value The number to be formatted.
1207
+ * @param digitsInfo Decimal representation options, specified by a string
1208
+ * in the following format:<br>
1209
+ * <code>{minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}</code>.
1210
+ * - `minIntegerDigits`: The minimum number of integer digits before the decimal point.
1211
+ * Default is `1`.
1212
+ * - `minFractionDigits`: The minimum number of digits after the decimal point.
1213
+ * Default is `0`.
1214
+ * - `maxFractionDigits`: The maximum number of digits after the decimal point.
1215
+ * Default is `3`.
1216
+ * @param locale A locale code for the locale format rules to use.
1217
+ * When not supplied, uses the value of `MC_LOCALE_ID`, which is `ru` by default.
1218
+ */
1219
+ transform(value, digitsInfo, locale) {
1220
+ if (isEmpty(value)) {
1221
+ return null;
1222
+ }
1223
+ const currentLocale = locale || this._locale || DEFAULT_MC_LOCALE_ID;
1224
+ let parsedDigitsInfo;
1225
+ if (digitsInfo) {
1226
+ parsedDigitsInfo = parseDigitsInfo(digitsInfo);
1227
+ }
1228
+ const options = {
1229
+ useGrouping: true,
1230
+ minimumIntegerDigits: 1,
1231
+ minimumFractionDigits: 0,
1232
+ maximumFractionDigits: 3,
1233
+ ...parsedDigitsInfo
1234
+ };
1235
+ try {
1236
+ const num = strToNumber(value);
1237
+ return Intl.NumberFormat.call(this, currentLocale, options).format(num);
1238
+ }
1239
+ catch (error) {
1240
+ throw Error(`InvalidPipeArgument: McDecimalPipe for pipe '${JSON.stringify(error.message)}'`);
1241
+ }
1242
+ }
1243
+ }
1244
+ /** @nocollapse */ /** @nocollapse */ McDecimalPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McDecimalPipe, deps: [{ token: MC_LOCALE_ID, optional: true }], target: i0.ɵɵFactoryTarget.Pipe });
1245
+ /** @nocollapse */ /** @nocollapse */ McDecimalPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McDecimalPipe, name: "mcNumber" });
1246
+ /** @nocollapse */ /** @nocollapse */ McDecimalPipe.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McDecimalPipe, providedIn: 'root' });
1247
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McDecimalPipe, decorators: [{
1248
+ type: Injectable,
1249
+ args: [{ providedIn: 'root' }]
1250
+ }, {
1251
+ type: Pipe,
1252
+ args: [{ name: 'mcNumber' }]
1253
+ }], ctorParameters: function () { return [{ type: undefined, decorators: [{
1254
+ type: Optional
1255
+ }, {
1256
+ type: Inject,
1257
+ args: [MC_LOCALE_ID]
1258
+ }] }]; } });
1259
+
1260
+ class McFormattersModule {
1261
+ }
1262
+ /** @nocollapse */ /** @nocollapse */ McFormattersModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McFormattersModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1263
+ /** @nocollapse */ /** @nocollapse */ McFormattersModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McFormattersModule, declarations: [McDecimalPipe], exports: [McDecimalPipe] });
1264
+ /** @nocollapse */ /** @nocollapse */ McFormattersModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McFormattersModule, providers: [DateFormatter] });
1265
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McFormattersModule, decorators: [{
1266
+ type: NgModule,
1267
+ args: [{
1268
+ exports: [McDecimalPipe],
1269
+ declarations: [McDecimalPipe],
1270
+ providers: [DateFormatter]
1271
+ }]
1272
+ }] });
1273
+
1274
+ const validationTooltipShowDelay = 10;
1275
+ const validationTooltipHideDelay = 3000;
1276
+ const MC_VALIDATION = new InjectionToken('McUseValidation', { factory: () => ({ useValidation: true }) });
1277
+ function setValidState(control, validator) {
1278
+ if (!control) {
1279
+ return;
1280
+ }
1281
+ control.clearValidators();
1282
+ control.updateValueAndValidity({ emitEvent: false });
1283
+ control.setValidators(validator);
1284
+ }
1285
+ /** This function do next:
1286
+ * - run validation on submitting parent form
1287
+ * - prevent validation in required validator if form doesn't submitted
1288
+ * - if control has focus validation will be prevented
1289
+ */
1290
+ function setMosaicValidation(component) {
1291
+ const ngControl = component.ngControl;
1292
+ if (!ngControl) {
1293
+ return;
1294
+ }
1295
+ const parentForm = component.parentForm || component.parentFormGroup;
1296
+ if (parentForm) {
1297
+ parentForm.ngSubmit.subscribe(() => {
1298
+ // tslint:disable-next-line: no-unnecessary-type-assertion
1299
+ ngControl.control.updateValueAndValidity({ emitEvent: false });
1300
+ });
1301
+ }
1302
+ if (component.ngModel) {
1303
+ setMosaicValidationForModelControl(component, component.rawValidators, parentForm);
1304
+ }
1305
+ else if (component.formControlName || component.ngControl) {
1306
+ setMosaicValidationForFormControl(component, parentForm, ngControl);
1307
+ }
1308
+ }
1309
+ function setMosaicValidationForModelControl(component, validators, parentForm) {
1310
+ if (!validators) {
1311
+ return;
1312
+ }
1313
+ validators.forEach((validator) => {
1314
+ // tslint:disable-next-line: no-unbound-method
1315
+ const originalValidate = validator.validate;
1316
+ if (validator instanceof RequiredValidator) {
1317
+ // changed required validation logic
1318
+ validator.validate = (control) => {
1319
+ if (parentForm && !parentForm.submitted) {
1320
+ return null;
1321
+ }
1322
+ return originalValidate.call(validator, control);
1323
+ };
1324
+ }
1325
+ else {
1326
+ // changed all other validation logic
1327
+ validator.validate = (control) => {
1328
+ if (component.focused) {
1329
+ return null;
1330
+ }
1331
+ return originalValidate.call(validator, control);
1332
+ };
1333
+ }
1334
+ });
1335
+ }
1336
+ function setMosaicValidationForFormControl(component, parentForm, ngControl) {
1337
+ const originalValidator = ngControl.control.validator;
1338
+ // changed required validation logic after initialization
1339
+ if (ngControl.invalid && ngControl.errors.required) {
1340
+ Promise.resolve().then(() => setValidState(ngControl.control, originalValidator));
1341
+ }
1342
+ // check dynamic updates
1343
+ ngControl.statusChanges
1344
+ .subscribe(() => {
1345
+ // changed required validation logic
1346
+ if (ngControl.invalid && (parentForm && !parentForm.submitted) && ngControl.errors.required) {
1347
+ setValidState(ngControl.control, originalValidator);
1348
+ }
1349
+ // changed all other validation logic
1350
+ if (ngControl.invalid && component.focused) {
1351
+ setValidState(ngControl.control, originalValidator);
1352
+ }
1353
+ });
1354
+ }
1355
+
1356
+ class McHighlightPipe {
1357
+ transform(value, args) {
1358
+ if (!args) {
1359
+ return value;
1360
+ }
1361
+ return value.replace(new RegExp(`(${args})`, 'gi'), '<mark class="mc-highlight">$1</mark>');
1362
+ }
1363
+ }
1364
+ /** @nocollapse */ /** @nocollapse */ McHighlightPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McHighlightPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
1365
+ /** @nocollapse */ /** @nocollapse */ McHighlightPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McHighlightPipe, name: "mcHighlight" });
1366
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McHighlightPipe, decorators: [{
1367
+ type: Pipe,
1368
+ args: [{ name: 'mcHighlight' }]
1369
+ }] });
1370
+
1371
+ class McHighlightModule {
1372
+ }
1373
+ /** @nocollapse */ /** @nocollapse */ McHighlightModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McHighlightModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1374
+ /** @nocollapse */ /** @nocollapse */ McHighlightModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McHighlightModule, declarations: [McHighlightPipe], imports: [CommonModule], exports: [McHighlightPipe] });
1375
+ /** @nocollapse */ /** @nocollapse */ McHighlightModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McHighlightModule, imports: [[CommonModule]] });
1376
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McHighlightModule, decorators: [{
1377
+ type: NgModule,
1378
+ args: [{
1379
+ imports: [CommonModule],
1380
+ exports: [McHighlightPipe],
1381
+ declarations: [McHighlightPipe]
1382
+ }]
1383
+ }] });
1384
+
1385
+ const selectEvents = 'selectEvents';
1386
+
1387
+ /**
1388
+ * Returns an exception to be thrown when attempting to change a select's `multiple` option
1389
+ * after initialization.
1390
+ * @docs-private
1391
+ */
1392
+ function getMcSelectDynamicMultipleError() {
1393
+ return Error('Cannot change `multiple` mode of select after initialization.');
1394
+ }
1395
+ /**
1396
+ * Returns an exception to be thrown when attempting to assign a non-array value to a select
1397
+ * in `multiple` mode. Note that `undefined` and `null` are still valid values to allow for
1398
+ * resetting the value.
1399
+ * @docs-private
1400
+ */
1401
+ function getMcSelectNonArrayValueError() {
1402
+ return Error('Value must be an array in multiple-selection mode.');
1403
+ }
1404
+ /**
1405
+ * Returns an exception to be thrown when assigning a non-function value to the comparator
1406
+ * used to determine if a value corresponds to an option. Note that whether the function
1407
+ * actually takes two values and returns a boolean is not checked.
1408
+ */
1409
+ function getMcSelectNonFunctionValueError() {
1410
+ return Error('`compareWith` must be a function.');
1411
+ }
1412
+
1413
+ /** The max height of the select's overlay panel */
1414
+ const SELECT_PANEL_MAX_HEIGHT = 224;
1415
+ /** The panel's padding on the x-axis */
1416
+ const SELECT_PANEL_PADDING_X = 1;
1417
+ /** The panel's x axis padding if it is indented (e.g. there is an option group). */
1418
+ /* tslint:disable-next-line:no-magic-numbers */
1419
+ const SELECT_PANEL_INDENT_PADDING_X = SELECT_PANEL_PADDING_X * 2;
1420
+ /**
1421
+ * The select panel will only "fit" inside the viewport if it is positioned at
1422
+ * this value or more away from the viewport boundary.
1423
+ */
1424
+ const SELECT_PANEL_VIEWPORT_PADDING = 8;
1425
+ /** Injection token that determines the scroll handling while a select is open. */
1426
+ const MC_SELECT_SCROLL_STRATEGY = new InjectionToken('mc-select-scroll-strategy');
1427
+ /** @docs-private */
1428
+ function mcSelectScrollStrategyProviderFactory(overlay) {
1429
+ return () => overlay.scrollStrategies.reposition();
1430
+ }
1431
+ /** @docs-private */
1432
+ const MC_SELECT_SCROLL_STRATEGY_PROVIDER = {
1433
+ provide: MC_SELECT_SCROLL_STRATEGY,
1434
+ deps: [Overlay],
1435
+ useFactory: mcSelectScrollStrategyProviderFactory
1436
+ };
1437
+
1438
+ const POSITION_MAP = {
1439
+ top: {
1440
+ originX: 'center',
1441
+ originY: 'top',
1442
+ overlayX: 'center',
1443
+ overlayY: 'bottom'
1444
+ },
1445
+ topCenter: {
1446
+ originX: 'center',
1447
+ originY: 'top',
1448
+ overlayX: 'center',
1449
+ overlayY: 'bottom'
1450
+ },
1451
+ topLeft: {
1452
+ originX: 'start',
1453
+ originY: 'top',
1454
+ overlayX: 'start',
1455
+ overlayY: 'bottom'
1456
+ },
1457
+ topRight: {
1458
+ originX: 'end',
1459
+ originY: 'top',
1460
+ overlayX: 'end',
1461
+ overlayY: 'bottom'
1462
+ },
1463
+ right: {
1464
+ originX: 'end',
1465
+ originY: 'center',
1466
+ overlayX: 'start',
1467
+ overlayY: 'center'
1468
+ },
1469
+ rightTop: {
1470
+ originX: 'end',
1471
+ originY: 'top',
1472
+ overlayX: 'start',
1473
+ overlayY: 'top'
1474
+ },
1475
+ rightBottom: {
1476
+ originX: 'end',
1477
+ originY: 'bottom',
1478
+ overlayX: 'start',
1479
+ overlayY: 'bottom'
1480
+ },
1481
+ bottom: {
1482
+ originX: 'center',
1483
+ originY: 'bottom',
1484
+ overlayX: 'center',
1485
+ overlayY: 'top'
1486
+ },
1487
+ bottomCenter: {
1488
+ originX: 'center',
1489
+ originY: 'bottom',
1490
+ overlayX: 'center',
1491
+ overlayY: 'top'
1492
+ },
1493
+ bottomLeft: {
1494
+ originX: 'start',
1495
+ originY: 'bottom',
1496
+ overlayX: 'start',
1497
+ overlayY: 'top'
1498
+ },
1499
+ bottomRight: {
1500
+ originX: 'end',
1501
+ originY: 'bottom',
1502
+ overlayX: 'end',
1503
+ overlayY: 'top'
1504
+ },
1505
+ left: {
1506
+ originX: 'start',
1507
+ originY: 'center',
1508
+ overlayX: 'end',
1509
+ overlayY: 'center'
1510
+ },
1511
+ leftTop: {
1512
+ originX: 'start',
1513
+ originY: 'top',
1514
+ overlayX: 'end',
1515
+ overlayY: 'top'
1516
+ },
1517
+ leftBottom: {
1518
+ originX: 'start',
1519
+ originY: 'bottom',
1520
+ overlayX: 'end',
1521
+ overlayY: 'bottom'
1522
+ }
1523
+ };
1524
+ const EXTENDED_OVERLAY_POSITIONS = objectValues([
1525
+ POSITION_MAP.top,
1526
+ POSITION_MAP.topLeft,
1527
+ POSITION_MAP.topRight,
1528
+ POSITION_MAP.right,
1529
+ POSITION_MAP.rightTop,
1530
+ POSITION_MAP.rightBottom,
1531
+ POSITION_MAP.bottom,
1532
+ POSITION_MAP.bottomLeft,
1533
+ POSITION_MAP.bottomRight,
1534
+ POSITION_MAP.left,
1535
+ POSITION_MAP.leftTop,
1536
+ POSITION_MAP.leftBottom
1537
+ ]);
1538
+ const TOP_POSITION_PRIORITY = objectValues([
1539
+ POSITION_MAP.top,
1540
+ POSITION_MAP.bottom,
1541
+ POSITION_MAP.rightBottom,
1542
+ POSITION_MAP.leftBottom,
1543
+ POSITION_MAP.bottomLeft,
1544
+ POSITION_MAP.bottomRight
1545
+ ]);
1546
+ const BOTTOM_POSITION_PRIORITY = objectValues([
1547
+ POSITION_MAP.bottom,
1548
+ POSITION_MAP.top,
1549
+ POSITION_MAP.topLeft,
1550
+ POSITION_MAP.topRight,
1551
+ POSITION_MAP.rightBottom,
1552
+ POSITION_MAP.leftBottom
1553
+ ]);
1554
+ const RIGHT_POSITION_PRIORITY = objectValues([
1555
+ POSITION_MAP.right,
1556
+ POSITION_MAP.left,
1557
+ POSITION_MAP.leftTop,
1558
+ POSITION_MAP.leftBottom,
1559
+ POSITION_MAP.top,
1560
+ POSITION_MAP.bottom
1561
+ ]);
1562
+ const LEFT_POSITION_PRIORITY = objectValues([
1563
+ POSITION_MAP.left,
1564
+ POSITION_MAP.right,
1565
+ POSITION_MAP.rightTop,
1566
+ POSITION_MAP.rightBottom,
1567
+ POSITION_MAP.top,
1568
+ POSITION_MAP.bottom
1569
+ ]);
1570
+ const RIGHT_TOP_POSITION_PRIORITY = objectValues([
1571
+ POSITION_MAP.rightTop,
1572
+ POSITION_MAP.leftTop,
1573
+ POSITION_MAP.left,
1574
+ POSITION_MAP.leftBottom,
1575
+ POSITION_MAP.topLeft,
1576
+ POSITION_MAP.bottomLeft
1577
+ ]);
1578
+ const RIGHT_BOTTOM_POSITION_PRIORITY = objectValues([
1579
+ POSITION_MAP.rightBottom,
1580
+ POSITION_MAP.leftBottom,
1581
+ POSITION_MAP.left,
1582
+ POSITION_MAP.leftTop,
1583
+ POSITION_MAP.topLeft,
1584
+ POSITION_MAP.bottomLeft
1585
+ ]);
1586
+ const LEFT_TOP_POSITION_PRIORITY = objectValues([
1587
+ POSITION_MAP.leftTop,
1588
+ POSITION_MAP.rightTop,
1589
+ POSITION_MAP.right,
1590
+ POSITION_MAP.rightBottom,
1591
+ POSITION_MAP.topRight,
1592
+ POSITION_MAP.bottomRight
1593
+ ]);
1594
+ const LEFT_BOTTOM_POSITION_PRIORITY = objectValues([
1595
+ POSITION_MAP.leftBottom,
1596
+ POSITION_MAP.rightBottom,
1597
+ POSITION_MAP.right,
1598
+ POSITION_MAP.rightTop,
1599
+ POSITION_MAP.topRight,
1600
+ POSITION_MAP.bottomRight
1601
+ ]);
1602
+ const TOP_LEFT_POSITION_PRIORITY = objectValues([
1603
+ POSITION_MAP.topLeft,
1604
+ POSITION_MAP.topRight,
1605
+ POSITION_MAP.bottomLeft,
1606
+ POSITION_MAP.bottom,
1607
+ POSITION_MAP.bottomRight,
1608
+ POSITION_MAP.leftBottom,
1609
+ POSITION_MAP.rightBottom
1610
+ ]);
1611
+ const TOP_RIGHT_POSITION_PRIORITY = objectValues([
1612
+ POSITION_MAP.topRight,
1613
+ POSITION_MAP.topLeft,
1614
+ POSITION_MAP.bottomRight,
1615
+ POSITION_MAP.bottom,
1616
+ POSITION_MAP.bottomLeft,
1617
+ POSITION_MAP.leftBottom,
1618
+ POSITION_MAP.rightBottom
1619
+ ]);
1620
+ const BOTTOM_RIGHT_POSITION_PRIORITY = objectValues([
1621
+ POSITION_MAP.bottomRight,
1622
+ POSITION_MAP.bottomLeft,
1623
+ POSITION_MAP.topRight,
1624
+ POSITION_MAP.top,
1625
+ POSITION_MAP.topLeft,
1626
+ POSITION_MAP.leftTop,
1627
+ POSITION_MAP.rightTop
1628
+ ]);
1629
+ const BOTTOM_LEFT_POSITION_PRIORITY = objectValues([
1630
+ POSITION_MAP.bottomLeft,
1631
+ POSITION_MAP.bottomRight,
1632
+ POSITION_MAP.topLeft,
1633
+ POSITION_MAP.top,
1634
+ POSITION_MAP.topRight,
1635
+ POSITION_MAP.rightTop,
1636
+ POSITION_MAP.leftTop
1637
+ ]);
1638
+ const POSITION_PRIORITY_STRATEGY = {
1639
+ top: TOP_POSITION_PRIORITY,
1640
+ topLeft: TOP_LEFT_POSITION_PRIORITY,
1641
+ topRight: TOP_RIGHT_POSITION_PRIORITY,
1642
+ bottom: BOTTOM_POSITION_PRIORITY,
1643
+ bottomLeft: BOTTOM_LEFT_POSITION_PRIORITY,
1644
+ bottomRight: BOTTOM_RIGHT_POSITION_PRIORITY,
1645
+ left: LEFT_POSITION_PRIORITY,
1646
+ leftTop: LEFT_TOP_POSITION_PRIORITY,
1647
+ leftBottom: LEFT_BOTTOM_POSITION_PRIORITY,
1648
+ right: RIGHT_POSITION_PRIORITY,
1649
+ rightTop: RIGHT_TOP_POSITION_PRIORITY,
1650
+ rightBottom: RIGHT_BOTTOM_POSITION_PRIORITY
1651
+ };
1652
+ const POSITION_TO_CSS_MAP = {
1653
+ top: 'top',
1654
+ topLeft: 'top-left',
1655
+ topRight: 'top-right',
1656
+ right: 'right',
1657
+ rightTop: 'right-top',
1658
+ rightBottom: 'right-bottom',
1659
+ left: 'left',
1660
+ leftTop: 'left-top',
1661
+ leftBottom: 'left-bottom',
1662
+ bottom: 'bottom',
1663
+ bottomLeft: 'bottom-left',
1664
+ bottomRight: 'bottom-right'
1665
+ };
1666
+ function arrayMap(array, iteratee) {
1667
+ let index = -1;
1668
+ const length = array === null ? 0 : array.length;
1669
+ const result = Array(length);
1670
+ while (++index < length) {
1671
+ result[index] = iteratee(array[index], index, array);
1672
+ }
1673
+ return result;
1674
+ }
1675
+ function baseValues(object, props) {
1676
+ return arrayMap(props, (key) => object[key]);
1677
+ }
1678
+ function objectValues(object) {
1679
+ return object === null ? [] : baseValues(object, Object.keys(object));
1680
+ }
1681
+
1682
+ const fadeAnimation = trigger('fadeAnimation', [
1683
+ state('void', style({ opacity: 0 })),
1684
+ state('true', style({ opacity: 1 })),
1685
+ state('false', style({ opacity: 0 })),
1686
+ transition('* => true', animate('150ms cubic-bezier(0.0, 0.0, 0.2, 1)')),
1687
+ transition('* => void', animate('150ms cubic-bezier(0.4, 0.0, 1, 1)'))
1688
+ ]);
1689
+
1690
+ var AnimationCurves;
1691
+ (function (AnimationCurves) {
1692
+ AnimationCurves["StandardCurve"] = "cubic-bezier(0.4,0.0,0.2,1)";
1693
+ AnimationCurves["DecelerationCurve"] = "cubic-bezier(0.0,0.0,0.2,1)";
1694
+ AnimationCurves["AccelerationCurve"] = "cubic-bezier(0.4,0.0,1,1)";
1695
+ AnimationCurves["SharpCurve"] = "cubic-bezier(0.4,0.0,0.6,1)";
1696
+ })(AnimationCurves || (AnimationCurves = {}));
1697
+
1698
+ /**
1699
+ * The following are all the animations for the mc-select component, with each
1700
+ * const containing the metadata for one animation.
1701
+ *
1702
+ */
1703
+ const mcSelectAnimations = {
1704
+ /**
1705
+ * This animation transforms the select's overlay panel on and off the page.
1706
+ *
1707
+ * When the panel is attached to the DOM, it expands its width by the amount of padding, scales it
1708
+ * up to 100% on the Y axis, fades in its border, and translates slightly up and to the
1709
+ * side to ensure the option text correctly overlaps the trigger text.
1710
+ *
1711
+ * When the panel is removed from the DOM, it simply fades out linearly.
1712
+ */
1713
+ transformPanel: trigger('transformPanel', [
1714
+ state('void', style({
1715
+ transform: 'scaleY(0)',
1716
+ minWidth: '100%',
1717
+ opacity: 0
1718
+ })),
1719
+ transition('void => *', group([
1720
+ animate('150ms cubic-bezier(0.25, 0.8, 0.25, 1)')
1721
+ ])),
1722
+ transition('* => void', [
1723
+ animate('250ms 100ms linear', style({ opacity: 0 }))
1724
+ ])
1725
+ ]),
1726
+ /**
1727
+ * This animation fades in the background color and text content of the
1728
+ * select's options. It is time delayed to occur 100ms after the overlay
1729
+ * panel has transformed in.
1730
+ */
1731
+ fadeInContent: trigger('fadeInContent', [
1732
+ state('showing', style({ opacity: 1 })),
1733
+ transition('void => showing', [
1734
+ style({ opacity: 0 }),
1735
+ animate('150ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)')
1736
+ ])
1737
+ ])
1738
+ };
1739
+ const transformPanel = mcSelectAnimations.transformPanel;
1740
+ const fadeInContent = mcSelectAnimations.fadeInContent;
1741
+
1742
+ /** InjectionToken that can be used to specify the global label options. */
1743
+ const MC_LABEL_GLOBAL_OPTIONS = new InjectionToken('mc-label-global-options');
1744
+
1745
+ var MultipleMode;
1746
+ (function (MultipleMode) {
1747
+ MultipleMode["CHECKBOX"] = "checkbox";
1748
+ MultipleMode["KEYBOARD"] = "keyboard";
1749
+ })(MultipleMode || (MultipleMode = {}));
1750
+
1751
+ /**
1752
+ * Component that shows a simplified checkbox without including any kind of "real" checkbox.
1753
+ * Meant to be used when the checkbox is purely decorative and a large number of them will be
1754
+ * included, such as for the options in a multi-select. Uses no SVGs or complex animations.
1755
+ * Note that theming is meant to be handled by the parent element, e.g.
1756
+ * `mc-primary .mc-pseudo-checkbox`.
1757
+ *
1758
+ * Note that this component will be completely invisible to screen-reader users. This is *not*
1759
+ * interchangeable with `<mc-checkbox>` and should *not* be used if the user would directly
1760
+ * interact with the checkbox. The pseudo-checkbox should only be used as an implementation detail
1761
+ * of more complex components that appropriately handle selected / checked state.
1762
+ * @docs-private
1763
+ */
1764
+ class McPseudoCheckbox {
1765
+ constructor() {
1766
+ this.state = 'unchecked';
1767
+ this.disabled = false;
1768
+ }
1769
+ }
1770
+ /** @nocollapse */ /** @nocollapse */ McPseudoCheckbox.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McPseudoCheckbox, deps: [], target: i0.ɵɵFactoryTarget.Component });
1771
+ /** @nocollapse */ /** @nocollapse */ McPseudoCheckbox.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: McPseudoCheckbox, selector: "mc-pseudo-checkbox", inputs: { state: "state", disabled: "disabled" }, host: { properties: { "class.mc-indeterminate": "state === \"indeterminate\"", "class.mc-checked": "state === \"checked\"", "class.mc-disabled": "disabled" }, classAttribute: "mc-pseudo-checkbox" }, 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 });
1772
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McPseudoCheckbox, decorators: [{
1773
+ type: Component,
1774
+ args: [{ selector: 'mc-pseudo-checkbox', host: {
1775
+ class: 'mc-pseudo-checkbox',
1776
+ '[class.mc-indeterminate]': 'state === "indeterminate"',
1777
+ '[class.mc-checked]': 'state === "checked"',
1778
+ '[class.mc-disabled]': 'disabled'
1779
+ }, preserveWhitespaces: false, 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"] }]
1780
+ }], propDecorators: { state: [{
1781
+ type: Input
1782
+ }], disabled: [{
1783
+ type: Input
1784
+ }] } });
1785
+
1786
+ class McPseudoCheckboxModule {
1787
+ }
1788
+ /** @nocollapse */ /** @nocollapse */ McPseudoCheckboxModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McPseudoCheckboxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1789
+ /** @nocollapse */ /** @nocollapse */ McPseudoCheckboxModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McPseudoCheckboxModule, declarations: [McPseudoCheckbox], imports: [CommonModule], exports: [McPseudoCheckbox] });
1790
+ /** @nocollapse */ /** @nocollapse */ McPseudoCheckboxModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McPseudoCheckboxModule, imports: [[CommonModule]] });
1791
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McPseudoCheckboxModule, decorators: [{
1792
+ type: NgModule,
1793
+ args: [{
1794
+ imports: [CommonModule],
1795
+ exports: [McPseudoCheckbox],
1796
+ declarations: [McPseudoCheckbox]
1797
+ }]
1798
+ }] });
1799
+
1800
+ class McMeasureScrollbarService {
1801
+ constructor(document) {
1802
+ this.document = document;
1803
+ this.scrollbarMeasure = {
1804
+ position: 'absolute',
1805
+ top: '-9999px',
1806
+ width: '50px',
1807
+ height: '50px',
1808
+ overflow: 'scroll'
1809
+ };
1810
+ this.initScrollBarWidth();
1811
+ }
1812
+ get scrollBarWidth() {
1813
+ if (this._scrollBarWidth) {
1814
+ return this._scrollBarWidth;
1815
+ }
1816
+ this.initScrollBarWidth();
1817
+ return this._scrollBarWidth;
1818
+ }
1819
+ initScrollBarWidth() {
1820
+ const scrollDiv = this.document.createElement('div');
1821
+ // tslint:disable-next-line
1822
+ for (const scrollProp in this.scrollbarMeasure) {
1823
+ if (this.scrollbarMeasure.hasOwnProperty(scrollProp)) {
1824
+ scrollDiv.style[scrollProp] = this.scrollbarMeasure[scrollProp];
1825
+ }
1826
+ }
1827
+ this.document.body.appendChild(scrollDiv);
1828
+ const width = scrollDiv.offsetWidth - scrollDiv.clientWidth;
1829
+ this.document.body.removeChild(scrollDiv);
1830
+ this._scrollBarWidth = width;
1831
+ }
1832
+ }
1833
+ /** @nocollapse */ /** @nocollapse */ McMeasureScrollbarService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McMeasureScrollbarService, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });
1834
+ /** @nocollapse */ /** @nocollapse */ McMeasureScrollbarService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McMeasureScrollbarService, providedIn: 'root' });
1835
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McMeasureScrollbarService, decorators: [{
1836
+ type: Injectable,
1837
+ args: [{
1838
+ providedIn: 'root'
1839
+ }]
1840
+ }], ctorParameters: function () { return [{ type: undefined, decorators: [{
1841
+ type: Inject,
1842
+ args: [DOCUMENT]
1843
+ }] }]; } });
1844
+
1845
+ /** @docs-private */
1846
+ class McOptgroupBase {
1847
+ }
1848
+ // tslint:disable-next-line: naming-convention
1849
+ const McOptgroupMixinBase = mixinDisabled(McOptgroupBase);
1850
+ let uniqueOptgroupIdCounter = 0;
1851
+ /**
1852
+ * Component that is used to group instances of `mc-option`.
1853
+ */
1854
+ class McOptgroup extends McOptgroupMixinBase {
1855
+ constructor() {
1856
+ super(...arguments);
1857
+ /** Unique id for the underlying label. */
1858
+ this.labelId = `mc-optgroup-label-${uniqueOptgroupIdCounter++}`;
1859
+ }
1860
+ }
1861
+ /** @nocollapse */ /** @nocollapse */ McOptgroup.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McOptgroup, deps: null, target: i0.ɵɵFactoryTarget.Component });
1862
+ /** @nocollapse */ /** @nocollapse */ McOptgroup.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", 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, 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 });
1863
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McOptgroup, decorators: [{
1864
+ type: Component,
1865
+ args: [{ selector: 'mc-optgroup', exportAs: 'mcOptgroup', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, inputs: ['disabled'], host: {
1866
+ class: 'mc-optgroup',
1867
+ '[class.mc-disabled]': 'disabled'
1868
+ }, template: "<label class=\"mc-optgroup-label\" [id]=\"labelId\">{{ label }}</label>\n<ng-content select=\"mc-option, mc-list-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"] }]
1869
+ }], propDecorators: { label: [{
1870
+ type: Input
1871
+ }] } });
1872
+
1873
+ /**
1874
+ * Option IDs need to be unique across components, so this counter exists outside of
1875
+ * the component definition.
1876
+ */
1877
+ let uniqueIdCounter = 0;
1878
+ /** Event object emitted by McOption when selected or deselected. */
1879
+ class McOptionSelectionChange {
1880
+ constructor(source, isUserInput = false) {
1881
+ this.source = source;
1882
+ this.isUserInput = isUserInput;
1883
+ }
1884
+ }
1885
+ /**
1886
+ * Injection token used to provide the parent component to options.
1887
+ */
1888
+ const MC_OPTION_PARENT_COMPONENT = new InjectionToken('MC_OPTION_PARENT_COMPONENT');
1889
+ /**
1890
+ * Single option inside of a `<mc-select>` element.
1891
+ */
1892
+ class McOption {
1893
+ constructor(element, changeDetectorRef, parent, group) {
1894
+ this.element = element;
1895
+ this.changeDetectorRef = changeDetectorRef;
1896
+ this.parent = parent;
1897
+ this.group = group;
1898
+ /** Event emitted when the option is selected or deselected. */
1899
+ // tslint:disable-next-line:no-output-on-prefix
1900
+ this.onSelectionChange = new EventEmitter();
1901
+ /** Emits when the state of the option changes and any parents have to be notified. */
1902
+ this.stateChanges = new Subject();
1903
+ this._id = `mc-option-${uniqueIdCounter++}`;
1904
+ this._selected = false;
1905
+ this._disabled = false;
1906
+ this._active = false;
1907
+ this.mostRecentViewValue = '';
1908
+ }
1909
+ get showCheckbox() {
1910
+ return this._showCheckbox === undefined ? this.multiple : this._showCheckbox;
1911
+ }
1912
+ set showCheckbox(value) {
1913
+ this._showCheckbox = coerceBooleanProperty(value);
1914
+ }
1915
+ /**
1916
+ * The displayed value of the option. It is necessary to show the selected option in the
1917
+ * select's trigger.
1918
+ */
1919
+ get viewValue() {
1920
+ // TODO: Add input property alternative for node envs.
1921
+ return (this.getHostElement().textContent || '').trim();
1922
+ }
1923
+ /** Whether the wrapping component is in multiple selection mode. */
1924
+ get multiple() {
1925
+ return this.parent && this.parent.multiple;
1926
+ }
1927
+ get id() {
1928
+ return this._id;
1929
+ }
1930
+ get selected() {
1931
+ return this._selected;
1932
+ }
1933
+ get disabled() {
1934
+ return (this.group && this.group.disabled) || this._disabled;
1935
+ }
1936
+ set disabled(value) {
1937
+ this._disabled = coerceBooleanProperty(value);
1938
+ }
1939
+ /**
1940
+ * Whether or not the option is currently active and ready to be selected.
1941
+ * An active option displays styles as if it is focused, but the
1942
+ * focus is actually retained somewhere else. This comes in handy
1943
+ * for components like autocomplete where focus must remain on the input.
1944
+ */
1945
+ get active() {
1946
+ return this._active;
1947
+ }
1948
+ ngAfterViewChecked() {
1949
+ // Since parent components could be using the option's label to display the selected values
1950
+ // (e.g. `mc-select`) and they don't have a way of knowing if the option's label has changed
1951
+ // we have to check for changes in the DOM ourselves and dispatch an event. These checks are
1952
+ // relatively cheap, however we still limit them only to selected options in order to avoid
1953
+ // hitting the DOM too often.
1954
+ if (this._selected) {
1955
+ const viewValue = this.viewValue;
1956
+ if (viewValue !== this.mostRecentViewValue) {
1957
+ this.mostRecentViewValue = viewValue;
1958
+ this.stateChanges.next();
1959
+ }
1960
+ }
1961
+ }
1962
+ ngOnDestroy() {
1963
+ this.stateChanges.complete();
1964
+ }
1965
+ getHeight() {
1966
+ // tslint:disable-next-line:naming-convention
1967
+ const DOMRect = this.element.nativeElement.getClientRects()[0];
1968
+ return DOMRect ? DOMRect.height : 0;
1969
+ }
1970
+ select() {
1971
+ if (!this._selected) {
1972
+ this._selected = true;
1973
+ this.changeDetectorRef.markForCheck();
1974
+ this.emitSelectionChangeEvent();
1975
+ }
1976
+ }
1977
+ deselect() {
1978
+ if (this._selected) {
1979
+ this._selected = false;
1980
+ this.changeDetectorRef.markForCheck();
1981
+ this.emitSelectionChangeEvent();
1982
+ }
1983
+ }
1984
+ focus() {
1985
+ const element = this.getHostElement();
1986
+ if (typeof element.focus === 'function') {
1987
+ element.focus();
1988
+ }
1989
+ }
1990
+ /**
1991
+ * This method sets display styles on the option to make it appear
1992
+ * active. This is used by the ActiveDescendantKeyManager so key
1993
+ * events will display the proper options as active on arrow key events.
1994
+ */
1995
+ setActiveStyles() {
1996
+ if (!this._active) {
1997
+ this._active = true;
1998
+ this.changeDetectorRef.markForCheck();
1999
+ }
2000
+ }
2001
+ /**
2002
+ * This method removes display styles on the option that made it appear
2003
+ * active. This is used by the ActiveDescendantKeyManager so key
2004
+ * events will display the proper options as active on arrow key events.
2005
+ */
2006
+ setInactiveStyles() {
2007
+ if (this._active) {
2008
+ this._active = false;
2009
+ this.changeDetectorRef.markForCheck();
2010
+ }
2011
+ }
2012
+ /** Gets the label to be used when determining whether the option should be focused. */
2013
+ getLabel() {
2014
+ return this.viewValue;
2015
+ }
2016
+ /** Ensures the option is selected when activated from the keyboard. */
2017
+ handleKeydown(event) {
2018
+ // tslint:disable-next-line
2019
+ if (event.keyCode === ENTER || event.keyCode === SPACE) {
2020
+ this.selectViaInteraction();
2021
+ // Prevent the page from scrolling down and form submits.
2022
+ event.preventDefault();
2023
+ }
2024
+ }
2025
+ /**
2026
+ * `Selects the option while indicating the selection came from the user. Used to
2027
+ * determine if the select's view -> model callback should be invoked.`
2028
+ */
2029
+ selectViaInteraction() {
2030
+ if (!this.disabled) {
2031
+ this._selected = this.multiple ? !this._selected : true;
2032
+ this.changeDetectorRef.markForCheck();
2033
+ this.emitSelectionChangeEvent(true);
2034
+ }
2035
+ }
2036
+ getTabIndex() {
2037
+ return this.disabled ? '-1' : '0';
2038
+ }
2039
+ getHostElement() {
2040
+ return this.element.nativeElement;
2041
+ }
2042
+ /** Emits the selection change event. */
2043
+ emitSelectionChangeEvent(isUserInput = false) {
2044
+ this.onSelectionChange.emit(new McOptionSelectionChange(this, isUserInput));
2045
+ }
2046
+ }
2047
+ /** @nocollapse */ /** @nocollapse */ McOption.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", 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 });
2048
+ /** @nocollapse */ /** @nocollapse */ McOption.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", 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" }, 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 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:16px;padding-left:var(--mc-option-size-horizontal-padding, 16px);padding-right:16px;padding-right:var(--mc-option-size-horizontal-padding, 16px);-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"], components: [{ type: McPseudoCheckbox, selector: "mc-pseudo-checkbox", inputs: ["state", "disabled"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
2049
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McOption, decorators: [{
2050
+ type: Component,
2051
+ args: [{ selector: 'mc-option', exportAs: 'mcOption', host: {
2052
+ '[attr.tabindex]': 'getTabIndex()',
2053
+ class: 'mc-option',
2054
+ '[class.mc-selected]': 'selected',
2055
+ '[class.mc-option-multiple]': 'multiple',
2056
+ '[class.mc-active]': 'active',
2057
+ '[class.mc-disabled]': 'disabled',
2058
+ '[id]': 'id',
2059
+ '(click)': 'selectViaInteraction()',
2060
+ '(keydown)': 'handleKeydown($event)'
2061
+ }, 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 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:16px;padding-left:var(--mc-option-size-horizontal-padding, 16px);padding-right:16px;padding-right:var(--mc-option-size-horizontal-padding, 16px);-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"] }]
2062
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: undefined, decorators: [{
2063
+ type: Optional
2064
+ }, {
2065
+ type: Inject,
2066
+ args: [MC_OPTION_PARENT_COMPONENT]
2067
+ }] }, { type: McOptgroup, decorators: [{
2068
+ type: Optional
2069
+ }] }]; }, propDecorators: { value: [{
2070
+ type: Input
2071
+ }], showCheckbox: [{
2072
+ type: Input
2073
+ }], onSelectionChange: [{
2074
+ type: Output
2075
+ }], disabled: [{
2076
+ type: Input
2077
+ }] } });
2078
+ /**
2079
+ * Counts the amount of option group labels that precede the specified option.
2080
+ * @param optionIndex Index of the option at which to start counting.
2081
+ * @param options Flat list of all of the options.
2082
+ * @param optionGroups Flat list of all of the option groups.
2083
+ * @docs-private
2084
+ */
2085
+ function countGroupLabelsBeforeOption(optionIndex, options, optionGroups) {
2086
+ if (optionGroups.length) {
2087
+ const optionsArray = options.toArray();
2088
+ const groups = optionGroups.toArray();
2089
+ let groupCounter = 0;
2090
+ for (let i = 0; i < optionIndex + 1; i++) {
2091
+ if (optionsArray[i].group && optionsArray[i].group === groups[groupCounter]) {
2092
+ groupCounter++;
2093
+ }
2094
+ }
2095
+ return groupCounter;
2096
+ }
2097
+ return 0;
2098
+ }
2099
+ /**
2100
+ * Determines the position to which to scroll a panel in order for an option to be into view.
2101
+ * @param optionIndex Index of the option to be scrolled into the view.
2102
+ * @param optionHeight Height of the options.
2103
+ * @param currentScrollPosition Current scroll position of the panel.
2104
+ * @param panelHeight Height of the panel.
2105
+ * @docs-private
2106
+ */
2107
+ function getOptionScrollPosition(optionIndex, optionHeight, currentScrollPosition, panelHeight) {
2108
+ const optionOffset = optionIndex * optionHeight;
2109
+ if (optionOffset < currentScrollPosition) {
2110
+ return optionOffset;
2111
+ }
2112
+ if (optionOffset + optionHeight > currentScrollPosition + panelHeight) {
2113
+ return Math.max(0, optionOffset - panelHeight + optionHeight);
2114
+ }
2115
+ return currentScrollPosition;
2116
+ }
2117
+
2118
+ const MC_OPTION_ACTION_PARENT = new InjectionToken('MC_OPTION_ACTION_PARENT');
2119
+ class McOptionActionBase {
2120
+ }
2121
+ // tslint:disable-next-line:naming-convention
2122
+ const McOptionActionMixinBase = mixinTabIndex(mixinDisabled(McOptionActionBase));
2123
+ class McOptionActionComponent extends McOptionActionMixinBase {
2124
+ constructor(elementRef, focusMonitor, option) {
2125
+ super();
2126
+ this.elementRef = elementRef;
2127
+ this.focusMonitor = focusMonitor;
2128
+ this.option = option;
2129
+ this.hasFocus = false;
2130
+ this.destroy = new Subject();
2131
+ this.focusMonitor.monitor(this.elementRef.nativeElement);
2132
+ }
2133
+ get active() {
2134
+ return this.hasFocus || !!this.option.dropdownTrigger?.opened;
2135
+ }
2136
+ ngAfterViewInit() {
2137
+ if (!this.option.dropdownTrigger) {
2138
+ return;
2139
+ }
2140
+ this.option.dropdownTrigger.restoreFocus = false;
2141
+ this.option.dropdownTrigger.dropdownClosed
2142
+ .pipe(takeUntil(this.destroy))
2143
+ .subscribe(() => {
2144
+ this.preventShowingTooltip();
2145
+ const destroyReason = this.option.dropdownTrigger.lastDestroyReason === 'keydown' ?
2146
+ 'keyboard' :
2147
+ 'program';
2148
+ this.focus(destroyReason);
2149
+ });
2150
+ }
2151
+ ngOnDestroy() {
2152
+ this.destroy.next();
2153
+ this.destroy.complete();
2154
+ this.focusMonitor.stopMonitoring(this.elementRef.nativeElement);
2155
+ }
2156
+ focus(origin, options) {
2157
+ if (this.focusMonitor && origin) {
2158
+ this.focusMonitor.focusVia(this.elementRef.nativeElement, origin, options);
2159
+ }
2160
+ else {
2161
+ this.elementRef.nativeElement.focus();
2162
+ }
2163
+ this.hasFocus = true;
2164
+ }
2165
+ onFocus($event) {
2166
+ $event.stopPropagation();
2167
+ this.hasFocus = true;
2168
+ }
2169
+ onBlur() {
2170
+ this.hasFocus = false;
2171
+ }
2172
+ onClick($event) {
2173
+ $event.stopPropagation();
2174
+ }
2175
+ onKeyDown($event) {
2176
+ if ([SPACE, ENTER].includes($event.keyCode) && this.option.dropdownTrigger) {
2177
+ this.option.dropdownTrigger.openedBy = 'keyboard';
2178
+ this.option.dropdownTrigger.toggle();
2179
+ }
2180
+ else if ($event.shiftKey && $event.keyCode === TAB) {
2181
+ this.hasFocus = false;
2182
+ this.option.focus();
2183
+ }
2184
+ else if ($event.keyCode === TAB) {
2185
+ return;
2186
+ }
2187
+ $event.preventDefault();
2188
+ $event.stopPropagation();
2189
+ }
2190
+ preventShowingTooltip() {
2191
+ if (!this.option.tooltipTrigger) {
2192
+ return;
2193
+ }
2194
+ this.option.tooltipTrigger.disabled = true;
2195
+ setTimeout(() => this.option.tooltipTrigger.disabled = false);
2196
+ }
2197
+ }
2198
+ /** @nocollapse */ /** @nocollapse */ McOptionActionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McOptionActionComponent, deps: [{ token: i0.ElementRef }, { token: i1$1.FocusMonitor }, { token: MC_OPTION_ACTION_PARENT }], target: i0.ɵɵFactoryTarget.Component });
2199
+ /** @nocollapse */ /** @nocollapse */ McOptionActionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", 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: `
2200
+ <ng-container [ngSwitch]="!!customIcon">
2201
+ <i class="mc mc-icon mc-ellipsis_16" *ngSwitchCase="false"></i>
2202
+ <ng-content select="[mc-icon]" *ngSwitchCase="true"></ng-content>
2203
+ </ng-container>
2204
+ `, 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"], directives: [{ type: i2.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i2.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
2205
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McOptionActionComponent, decorators: [{
2206
+ type: Component,
2207
+ args: [{ selector: 'mc-option-action', exportAs: 'mcOptionAction', template: `
2208
+ <ng-container [ngSwitch]="!!customIcon">
2209
+ <i class="mc mc-icon mc-ellipsis_16" *ngSwitchCase="false"></i>
2210
+ <ng-content select="[mc-icon]" *ngSwitchCase="true"></ng-content>
2211
+ </ng-container>
2212
+ `, host: {
2213
+ class: 'mc-option-action',
2214
+ '[class.mc-expanded]': 'false',
2215
+ '[attr.disabled]': 'disabled || null',
2216
+ '[attr.tabIndex]': '-1',
2217
+ '(focus)': 'onFocus($event)',
2218
+ '(blur)': 'onBlur()',
2219
+ '(click)': 'onClick($event)',
2220
+ '(keydown)': 'onKeyDown($event)'
2221
+ }, 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"] }]
2222
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1$1.FocusMonitor }, { type: undefined, decorators: [{
2223
+ type: Inject,
2224
+ args: [MC_OPTION_ACTION_PARENT]
2225
+ }] }]; }, propDecorators: { customIcon: [{
2226
+ type: ContentChild,
2227
+ args: ['customIcon']
2228
+ }] } });
2229
+
2230
+ class McOptionModule {
2231
+ }
2232
+ /** @nocollapse */ /** @nocollapse */ McOptionModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McOptionModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2233
+ /** @nocollapse */ /** @nocollapse */ McOptionModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McOptionModule, declarations: [McOption, McOptgroup, McOptionActionComponent], imports: [CommonModule, McPseudoCheckboxModule], exports: [McOption, McOptgroup, McOptionActionComponent] });
2234
+ /** @nocollapse */ /** @nocollapse */ McOptionModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McOptionModule, imports: [[CommonModule, McPseudoCheckboxModule]] });
2235
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McOptionModule, decorators: [{
2236
+ type: NgModule,
2237
+ args: [{
2238
+ imports: [CommonModule, McPseudoCheckboxModule],
2239
+ declarations: [McOption, McOptgroup, McOptionActionComponent],
2240
+ exports: [McOption, McOptgroup, McOptionActionComponent]
2241
+ }]
2242
+ }] });
2243
+
2244
+ class McFormElement {
2245
+ constructor(element) {
2246
+ this.element = element;
2247
+ this.margin = false;
2248
+ this.isRow = false;
2249
+ this.isFieldSet = false;
2250
+ this.hasLegend = false;
2251
+ this.isHorizontal = false;
2252
+ }
2253
+ ngAfterContentInit() {
2254
+ const classList = this.element.nativeElement.classList;
2255
+ this.isRow = classList.contains('mc-form__row');
2256
+ this.isHorizontal = classList.contains('mc-horizontal');
2257
+ this.isFieldSet = classList.contains('mc-form__fieldset');
2258
+ if (this.isFieldSet && this.element.nativeElement.firstElementChild) {
2259
+ this.hasLegend = this.element.nativeElement.firstElementChild.classList.contains('mc-form__legend');
2260
+ }
2261
+ }
2262
+ }
2263
+ /** @nocollapse */ /** @nocollapse */ McFormElement.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McFormElement, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
2264
+ /** @nocollapse */ /** @nocollapse */ McFormElement.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.1", 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 });
2265
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McFormElement, decorators: [{
2266
+ type: Directive,
2267
+ args: [{
2268
+ selector: '.mc-form__row, .mc-form__fieldset, .mc-form__legend',
2269
+ exportAs: 'mcFormElement',
2270
+ host: {
2271
+ '[class.mc-form-row_margin]': 'margin'
2272
+ }
2273
+ }]
2274
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { elements: [{
2275
+ type: ContentChildren,
2276
+ args: [McFormElement]
2277
+ }] } });
2278
+ class McForm {
2279
+ ngAfterContentInit() {
2280
+ this.handleElements(this.elements);
2281
+ }
2282
+ handleElements(elements) {
2283
+ elements.forEach((element, index) => {
2284
+ const nextElement = elements.get(index + 1);
2285
+ if (element.isFieldSet && !element.isHorizontal) {
2286
+ this.handleElements(element.elements);
2287
+ }
2288
+ element.margin = !!(nextElement && !nextElement.hasLegend);
2289
+ });
2290
+ }
2291
+ }
2292
+ /** @nocollapse */ /** @nocollapse */ McForm.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McForm, deps: [], target: i0.ɵɵFactoryTarget.Directive });
2293
+ /** @nocollapse */ /** @nocollapse */ McForm.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.1", type: McForm, selector: ".mc-form-vertical, .mc-form-horizontal", host: { classAttribute: "mc-form" }, queries: [{ propertyName: "elements", predicate: McFormElement }], exportAs: ["mcForm"], ngImport: i0 });
2294
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McForm, decorators: [{
2295
+ type: Directive,
2296
+ args: [{
2297
+ selector: '.mc-form-vertical, .mc-form-horizontal',
2298
+ exportAs: 'mcForm',
2299
+ host: {
2300
+ class: 'mc-form'
2301
+ }
2302
+ }]
2303
+ }], propDecorators: { elements: [{
2304
+ type: ContentChildren,
2305
+ args: [McFormElement]
2306
+ }] } });
2307
+
2308
+ class McFormsModule {
2309
+ }
2310
+ /** @nocollapse */ /** @nocollapse */ McFormsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McFormsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2311
+ /** @nocollapse */ /** @nocollapse */ McFormsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McFormsModule, declarations: [McForm,
2312
+ McFormElement], exports: [McForm,
2313
+ McFormElement] });
2314
+ /** @nocollapse */ /** @nocollapse */ McFormsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McFormsModule });
2315
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McFormsModule, decorators: [{
2316
+ type: NgModule,
2317
+ args: [{
2318
+ exports: [
2319
+ McForm,
2320
+ McFormElement
2321
+ ],
2322
+ declarations: [
2323
+ McForm,
2324
+ McFormElement
2325
+ ]
2326
+ }]
2327
+ }] });
2328
+
2329
+ var PopUpPlacements;
2330
+ (function (PopUpPlacements) {
2331
+ PopUpPlacements["Top"] = "top";
2332
+ PopUpPlacements["TopLeft"] = "topLeft";
2333
+ PopUpPlacements["TopRight"] = "topRight";
2334
+ PopUpPlacements["Right"] = "right";
2335
+ PopUpPlacements["RightTop"] = "rightTop";
2336
+ PopUpPlacements["RightBottom"] = "rightBottom";
2337
+ PopUpPlacements["Left"] = "left";
2338
+ PopUpPlacements["LeftTop"] = "leftTop";
2339
+ PopUpPlacements["LeftBottom"] = "leftBottom";
2340
+ PopUpPlacements["Bottom"] = "bottom";
2341
+ PopUpPlacements["BottomLeft"] = "bottomLeft";
2342
+ PopUpPlacements["BottomRight"] = "bottomRight";
2343
+ })(PopUpPlacements || (PopUpPlacements = {}));
2344
+ var PopUpVisibility;
2345
+ (function (PopUpVisibility) {
2346
+ PopUpVisibility["Initial"] = "initial";
2347
+ PopUpVisibility["Visible"] = "visible";
2348
+ PopUpVisibility["Hidden"] = "hidden";
2349
+ })(PopUpVisibility || (PopUpVisibility = {}));
2350
+ var PopUpTriggers;
2351
+ (function (PopUpTriggers) {
2352
+ PopUpTriggers["Click"] = "click";
2353
+ PopUpTriggers["Focus"] = "focus";
2354
+ PopUpTriggers["Hover"] = "hover";
2355
+ })(PopUpTriggers || (PopUpTriggers = {}));
2356
+ var PopUpSizes;
2357
+ (function (PopUpSizes) {
2358
+ PopUpSizes["Small"] = "small";
2359
+ PopUpSizes["Normal"] = "normal";
2360
+ PopUpSizes["Large"] = "large";
2361
+ })(PopUpSizes || (PopUpSizes = {}));
2362
+
2363
+ // tslint:disable-next-line:naming-convention
2364
+ class McPopUp {
2365
+ constructor(changeDetectorRef) {
2366
+ this.changeDetectorRef = changeDetectorRef;
2367
+ this.classMap = {};
2368
+ this.visibility = PopUpVisibility.Initial;
2369
+ this.visibleChange = new EventEmitter();
2370
+ /** Subject for notifying that the tooltip has been hidden from the view */
2371
+ this.onHideSubject = new Subject();
2372
+ this.closeOnInteraction = false;
2373
+ }
2374
+ ngOnDestroy() {
2375
+ clearTimeout(this.showTimeoutId);
2376
+ clearTimeout(this.hideTimeoutId);
2377
+ this.onHideSubject.complete();
2378
+ }
2379
+ isTemplateRef(value) {
2380
+ return value instanceof TemplateRef;
2381
+ }
2382
+ show(delay) {
2383
+ if (this.hideTimeoutId) {
2384
+ clearTimeout(this.hideTimeoutId);
2385
+ }
2386
+ this.closeOnInteraction = true;
2387
+ this.showTimeoutId = setTimeout(() => {
2388
+ this.showTimeoutId = undefined;
2389
+ this.visibility = PopUpVisibility.Visible;
2390
+ this.visibleChange.emit(true);
2391
+ // Mark for check so if any parent component has set the
2392
+ // ChangeDetectionStrategy to OnPush it will be checked anyways
2393
+ this.markForCheck();
2394
+ }, delay);
2395
+ }
2396
+ hide(delay) {
2397
+ if (this.showTimeoutId) {
2398
+ clearTimeout(this.showTimeoutId);
2399
+ }
2400
+ this.hideTimeoutId = setTimeout(() => {
2401
+ this.hideTimeoutId = undefined;
2402
+ this.visibility = PopUpVisibility.Hidden;
2403
+ this.visibleChange.emit(false);
2404
+ this.onHideSubject.next();
2405
+ // Mark for check so if any parent component has set the
2406
+ // ChangeDetectionStrategy to OnPush it will be checked anyways
2407
+ this.markForCheck();
2408
+ }, delay);
2409
+ }
2410
+ isVisible() {
2411
+ return this.visibility === PopUpVisibility.Visible;
2412
+ }
2413
+ updateClassMap(placement, customClass, classMap) {
2414
+ this.classMap = {
2415
+ [`${this.prefix}_placement-${placement}`]: true,
2416
+ [customClass]: !!customClass,
2417
+ ...classMap
2418
+ };
2419
+ }
2420
+ /** Returns an observable that notifies when the tooltip has been hidden from view. */
2421
+ afterHidden() {
2422
+ return this.onHideSubject.asObservable();
2423
+ }
2424
+ markForCheck() {
2425
+ this.changeDetectorRef.markForCheck();
2426
+ }
2427
+ animationStart() {
2428
+ this.closeOnInteraction = false;
2429
+ }
2430
+ animationDone({ toState }) {
2431
+ if (toState === PopUpVisibility.Hidden && !this.isVisible()) {
2432
+ this.onHideSubject.next();
2433
+ }
2434
+ if (toState === PopUpVisibility.Visible || toState === PopUpVisibility.Hidden) {
2435
+ this.closeOnInteraction = true;
2436
+ }
2437
+ }
2438
+ handleBodyInteraction() {
2439
+ if (this.closeOnInteraction) {
2440
+ this.hide(0);
2441
+ }
2442
+ }
2443
+ }
2444
+ /** @nocollapse */ /** @nocollapse */ McPopUp.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McPopUp, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });
2445
+ /** @nocollapse */ /** @nocollapse */ McPopUp.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.1", type: McPopUp, ngImport: i0 });
2446
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McPopUp, decorators: [{
2447
+ type: Directive
2448
+ }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; } });
2449
+
2450
+ const VIEWPORT_MARGIN = 8;
2451
+ // tslint:disable-next-line:naming-convention
2452
+ class McPopUpTrigger {
2453
+ constructor(overlay, elementRef, ngZone, scrollDispatcher, hostView, scrollStrategy, direction) {
2454
+ this.overlay = overlay;
2455
+ this.elementRef = elementRef;
2456
+ this.ngZone = ngZone;
2457
+ this.scrollDispatcher = scrollDispatcher;
2458
+ this.hostView = hostView;
2459
+ this.scrollStrategy = scrollStrategy;
2460
+ this.direction = direction;
2461
+ this.isOpen = false;
2462
+ this.enterDelay = 0;
2463
+ this.leaveDelay = 0;
2464
+ this.placement = PopUpPlacements.Top;
2465
+ this.placementPriority = null;
2466
+ this.visible = false;
2467
+ // tslint:disable-next-line:naming-convention orthodox-getter-and-setter
2468
+ this._disabled = false;
2469
+ this.listeners = new Map();
2470
+ this.destroyed = new Subject();
2471
+ this.detach = () => {
2472
+ if (this.overlayRef && this.overlayRef.hasAttached()) {
2473
+ this.overlayRef.detach();
2474
+ }
2475
+ this.instance = null;
2476
+ };
2477
+ this.onPositionChange = ($event) => {
2478
+ if (!this.instance) {
2479
+ return;
2480
+ }
2481
+ let newPlacement = this.placement;
2482
+ const { originX, originY, overlayX, overlayY } = $event.connectionPair;
2483
+ Object.keys(this.availablePositions).some((key) => {
2484
+ if (originX === this.availablePositions[key].originX && originY === this.availablePositions[key].originY &&
2485
+ overlayX === this.availablePositions[key].overlayX && overlayY === this.availablePositions[key].overlayY) {
2486
+ newPlacement = key;
2487
+ return true;
2488
+ }
2489
+ return false;
2490
+ });
2491
+ this.placementChange.emit(newPlacement);
2492
+ this.updateClassMap(newPlacement);
2493
+ if ($event.scrollableViewProperties.isOverlayClipped && this.instance.isVisible()) {
2494
+ // After position changes occur and the overlay is clipped by
2495
+ // a parent scrollable then close the tooltip.
2496
+ this.ngZone.run(() => this.hide());
2497
+ }
2498
+ };
2499
+ this.addEventListener = (listener, event) => {
2500
+ this.elementRef.nativeElement.addEventListener(event, listener);
2501
+ };
2502
+ this.removeEventListener = (listener, event) => {
2503
+ this.elementRef.nativeElement.removeEventListener(event, listener);
2504
+ };
2505
+ this.availablePositions = POSITION_MAP;
2506
+ }
2507
+ ngOnInit() {
2508
+ this.initListeners();
2509
+ }
2510
+ ngOnDestroy() {
2511
+ if (this.overlayRef) {
2512
+ this.overlayRef.dispose();
2513
+ }
2514
+ this.listeners.forEach(this.removeEventListener);
2515
+ this.listeners.clear();
2516
+ this.destroyed.next();
2517
+ this.destroyed.complete();
2518
+ }
2519
+ updatePlacement(value) {
2520
+ if (POSITION_TO_CSS_MAP[value]) {
2521
+ this.placement = value;
2522
+ this.updateClassMap();
2523
+ }
2524
+ else {
2525
+ this.placement = PopUpPlacements.Top;
2526
+ console.warn(`Unknown position: ${value}. Will used default position: ${this.placement}`);
2527
+ }
2528
+ if (this.visible) {
2529
+ this.updatePosition();
2530
+ }
2531
+ }
2532
+ updatePlacementPriority(value) {
2533
+ if (value && value.length > 0) {
2534
+ this.placementPriority = value;
2535
+ }
2536
+ else {
2537
+ this.placementPriority = null;
2538
+ }
2539
+ }
2540
+ updateVisible(externalValue) {
2541
+ const value = coerceBooleanProperty(externalValue);
2542
+ if (this.visible !== value) {
2543
+ this.visible = value;
2544
+ if (value) {
2545
+ this.show();
2546
+ }
2547
+ else {
2548
+ this.hide();
2549
+ }
2550
+ }
2551
+ }
2552
+ handleKeydown(event) {
2553
+ if (this.isOpen && event.keyCode === ESCAPE) { // tslint:disable-line
2554
+ this.hide();
2555
+ }
2556
+ }
2557
+ handleTouchend() {
2558
+ this.hide();
2559
+ }
2560
+ show(delay = this.enterDelay) {
2561
+ if (this.disabled || this.instance) {
2562
+ return;
2563
+ }
2564
+ this.overlayRef = this.createOverlay();
2565
+ this.detach();
2566
+ this.portal = this.portal || new ComponentPortal(this.getOverlayHandleComponentType(), this.hostView);
2567
+ this.instance = this.overlayRef.attach(this.portal).instance;
2568
+ this.instance.afterHidden()
2569
+ .pipe(takeUntil(this.destroyed))
2570
+ .subscribe(this.detach);
2571
+ this.updateClassMap();
2572
+ this.updateData();
2573
+ this.instance.visibleChange
2574
+ .pipe(takeUntil(this.destroyed), distinctUntilChanged())
2575
+ .subscribe((value) => {
2576
+ this.visible = value;
2577
+ this.visibleChange.emit(value);
2578
+ this.isOpen = value;
2579
+ });
2580
+ this.updatePosition();
2581
+ this.instance.show(delay);
2582
+ }
2583
+ hide(delay = this.leaveDelay) {
2584
+ if (this.instance) {
2585
+ this.instance.hide(delay);
2586
+ }
2587
+ }
2588
+ /** Create the overlay config and position strategy */
2589
+ createOverlay() {
2590
+ if (this.overlayRef) {
2591
+ return this.overlayRef;
2592
+ }
2593
+ // Create connected position strategy that listens for scroll events to reposition.
2594
+ const strategy = this.overlay.position()
2595
+ .flexibleConnectedTo(this.elementRef)
2596
+ .withTransformOriginOn(this.originSelector)
2597
+ .withFlexibleDimensions(false)
2598
+ .withViewportMargin(VIEWPORT_MARGIN)
2599
+ .withPositions([...EXTENDED_OVERLAY_POSITIONS])
2600
+ .withScrollableContainers(this.scrollDispatcher.getAncestorScrollContainers(this.elementRef));
2601
+ strategy.positionChanges
2602
+ .pipe(takeUntil(this.destroyed))
2603
+ .subscribe(this.onPositionChange);
2604
+ this.overlayRef = this.overlay.create({
2605
+ ...this.overlayConfig,
2606
+ direction: this.direction,
2607
+ positionStrategy: strategy,
2608
+ scrollStrategy: this.scrollStrategy()
2609
+ });
2610
+ this.closingActions()
2611
+ .pipe(takeUntil(this.destroyed))
2612
+ .pipe(delay(0))
2613
+ .subscribe(() => this.hide());
2614
+ this.overlayRef.outsidePointerEvents()
2615
+ .subscribe(() => this.instance.handleBodyInteraction());
2616
+ this.overlayRef.detachments()
2617
+ .pipe(takeUntil(this.destroyed))
2618
+ .subscribe(this.detach);
2619
+ return this.overlayRef;
2620
+ }
2621
+ initListeners() {
2622
+ this.clearListeners();
2623
+ if (this.trigger.includes(PopUpTriggers.Click)) {
2624
+ this.listeners
2625
+ .set('click', () => this.show())
2626
+ .forEach(this.addEventListener);
2627
+ }
2628
+ if (this.trigger.includes(PopUpTriggers.Hover)) {
2629
+ this.listeners
2630
+ .set('mouseenter', () => this.show())
2631
+ .set('mouseleave', () => this.hide())
2632
+ .forEach(this.addEventListener);
2633
+ }
2634
+ if (this.trigger.includes(PopUpTriggers.Focus)) {
2635
+ this.listeners
2636
+ .set('focus', () => this.show())
2637
+ .set('blur', () => this.hide())
2638
+ .forEach(this.addEventListener);
2639
+ }
2640
+ }
2641
+ /** Updates the position of the current popover. */
2642
+ updatePosition(reapplyPosition = false) {
2643
+ this.overlayRef = this.createOverlay();
2644
+ const position = this.overlayRef.getConfig().positionStrategy
2645
+ .withPositions(this.getPrioritizedPositions())
2646
+ .withPush(true);
2647
+ if (reapplyPosition) {
2648
+ setTimeout(() => position.reapplyLastPosition());
2649
+ }
2650
+ }
2651
+ getPriorityPlacementStrategy(value) {
2652
+ const result = [];
2653
+ const possiblePositions = Object.keys(this.availablePositions);
2654
+ if (Array.isArray(value)) {
2655
+ value.forEach((position) => {
2656
+ if (possiblePositions.includes(position)) {
2657
+ result.push(this.availablePositions[position]);
2658
+ }
2659
+ });
2660
+ }
2661
+ else if (possiblePositions.includes(value)) {
2662
+ result.push(this.availablePositions[value]);
2663
+ }
2664
+ return result;
2665
+ }
2666
+ getPrioritizedPositions() {
2667
+ if (this.placementPriority) {
2668
+ return this.getPriorityPlacementStrategy(this.placementPriority);
2669
+ }
2670
+ return POSITION_PRIORITY_STRATEGY[this.placement];
2671
+ }
2672
+ clearListeners() {
2673
+ this.listeners.forEach(this.removeEventListener);
2674
+ this.listeners.clear();
2675
+ }
2676
+ }
2677
+ /** @nocollapse */ /** @nocollapse */ McPopUpTrigger.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McPopUpTrigger, deps: "invalid", target: i0.ɵɵFactoryTarget.Directive });
2678
+ /** @nocollapse */ /** @nocollapse */ McPopUpTrigger.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.1", type: McPopUpTrigger, ngImport: i0 });
2679
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: McPopUpTrigger, decorators: [{
2680
+ type: Directive
2681
+ }], 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 }]; } });
2682
+
2683
+ /**
2684
+ * Generated bundle index. Do not edit.
2685
+ */
2686
+
2687
+ export { 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_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, 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, 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, countGroupLabelsBeforeOption, fadeAnimation, getMcSelectDynamicMultipleError, getMcSelectNonArrayValueError, getMcSelectNonFunctionValueError, getOptionScrollPosition, isBoolean, mcSelectAnimations, mcSelectScrollStrategyProviderFactory, mixinColor, mixinDisabled, mixinErrorState, mixinTabIndex, selectEvents, setMosaicValidation, setMosaicValidationForFormControl, setMosaicValidationForModelControl, toBoolean, validationTooltipHideDelay, validationTooltipShowDelay };
2688
+ //# sourceMappingURL=ptsecurity-mosaic-core.mjs.map